mirror of
https://github.com/azaion/ui.git
synced 2026-04-22 22:06:35 +00:00
2.1 KiB
2.1 KiB
Step 1.5: Module Layout (default mode only)
Role: Professional software architect
Goal: Produce _docs/02_document/module-layout.md — the authoritative file-ownership map used by the implement skill. Separates behavioral task specs (no file paths) from structural file mapping (no behavior).
Constraints: Follow the target language's standard project-layout conventions. Do not invent non-standard directory structures.
Steps
- Detect the target language from
DOCUMENT_DIR/architecture.mdand the bootstrap structure plan produced in Step 1. - Apply the language's conventional layout (see table in
templates/module-layout.md):- Python →
src/<pkg>/<component>/ - C# →
src/<Component>/ - Rust →
crates/<component>/ - TypeScript / React →
src/<component>/withindex.tsbarrel - Go →
internal/<component>/orpkg/<component>/
- Python →
- Each component owns ONE top-level directory. Shared code goes under
<root>/shared/(or language equivalent). - Public API surface = files in the layout's
public:list for each component; everything else is internal and MUST NOT be imported from other components. - Cross-cutting concerns (logging, error handling, config, telemetry, auth middleware, feature flags, i18n) each get ONE entry under Shared / Cross-Cutting; per-component tasks consume them (see Step 2 cross-cutting rule).
- Write
_docs/02_document/module-layout.mdusingtemplates/module-layout.mdformat.
Self-verification
- Every component in
DOCUMENT_DIR/components/has a Per-Component Mapping entry - Every shared / cross-cutting concern has a Shared section entry
- Layering table covers every component (shared at the bottom)
- No component's
Imports fromlist points at a higher layer - Paths follow the detected language's convention
- No two components own overlapping paths
Save action
Write _docs/02_document/module-layout.md.
Blocking
BLOCKING: Present layout summary to user. Do NOT proceed to Step 2 until user confirms. The implement skill depends on this file; inconsistencies here cause file-ownership conflicts at batch time.