Repository Architecture
Purpose
Translate the logical architecture into a concrete repository layout: how apps and packages are organized on disk, directory conventions, and where shared code lives — so implementation has an agreed structure to fill in.
When to Use
- After
architecture-design, before implementation scaffolding.
- When adding a new application area to an existing repo (fitting its conventions).
- Not for edits within an already-established structure.
Inputs
- The recorded architecture (
architecture-design).
- Selected applications and approved stack.
- Existing repo conventions (
existing-project-audit) when applicable.
Discovery Questions
- Single repo or monorepo? Any tooling constraint (workspaces, package manager)?
- How many applications and shared packages must coexist?
- Are there existing conventions to match?
Responsibilities
- Decide repo strategy (single-app · multi-app monorepo) with justification.
- Define top-level layout (apps, packages, shared, tooling, docs).
- Place
docs/ at the root with one folder per application, named as the apps are named here (application-documentation).
- Set directory conventions per application type.
- Place shared code (types, UI, utilities) so ≥2 consumers can use it cleanly.
- Keep the layout consistent with the approved stack and
../../system/ conventions.
- Describe structure as documentation, not committed application code.
Required Workflow
- Read architecture + selected apps + stack.
- Choose repo strategy.
- Define top-level and per-app directory layout, including
docs/ and its per-app folders.
- Decide shared-code placement.
- Record the layout (in
../../projects/current/ / ../../knowledge/).
- Hand off to task/phase generation.
Decision Rules
- Monorepo only when ≥2 apps/packages genuinely share code or lifecycle; otherwise single-app.
- Match existing conventions in an established repo rather than imposing new ones.
- Shared packages exist only with ≥2 real consumers (aligns with
application-selection).
- Keep the tree shallow and predictable; optimize for navigation.
Rules
- No application code or dependency install — layout is documented, then filled during implementation.
- Consistent with the approved stack and system conventions.
- Record the "why" behind strategy and boundaries.
Anti-Patterns
- Monorepo with one app "just in case."
- Deep, inconsistent directory nesting.
- Shared packages with a single consumer.
- Reorganizing an existing repo without cause.
Validation Checklist
Definition of Done
A recorded repository layout (strategy, top-level tree, per-app conventions, shared-code placement) consistent with the architecture and stack, ready to guide implementation.
Related Skills
architecture-design, application-selection, stack-recommendation, application-documentation, task-planning, git-workflow, github-repository.
Related Knowledge
../../knowledge/ (structure decisions).
Related References
None typically.
Context Loading Guidance
- Requires: architecture, selected apps, stack, existing conventions (if any).
- Does not require: full source, references, review skills.
- May load: none (returns to orchestrator/task-planning).
- Stop when: the layout is recorded.
Token Efficiency Guidance
Express the layout as a compact tree plus a few convention notes. Don't enumerate every future file — define patterns, not contents.
1---2name: repository-architecture3description: Use after architecture design to define the on-disk repository layout — single-repo vs monorepo, app/package boundaries, directory conventions, and shared-code placement. Translates the logical architecture into a concrete, navigable structure. No application code.4---56# Repository Architecture78## Purpose910Translate the logical architecture into a concrete repository layout: how apps and packages are organized on disk, directory conventions, and where shared code lives — so implementation has an agreed structure to fill in.1112## When to Use1314- After `architecture-design`, before implementation scaffolding.15- When adding a new application area to an existing repo (fitting its conventions).16- **Not** for edits within an already-established structure.1718## Inputs1920- The recorded architecture (`architecture-design`).21- Selected applications and approved stack.22- Existing repo conventions (`existing-project-audit`) when applicable.2324## Discovery Questions2526- Single repo or monorepo? Any tooling constraint (workspaces, package manager)?27- How many applications and shared packages must coexist?28- Are there existing conventions to match?2930## Responsibilities3132- Decide **repo strategy** (single-app · multi-app monorepo) with justification.33- Define **top-level layout** (apps, packages, shared, tooling, docs).34- Place **`docs/` at the root** with one folder per application, named as the apps are named here (`application-documentation`).35- Set **directory conventions** per application type.36- Place **shared code** (types, UI, utilities) so ≥2 consumers can use it cleanly.37- Keep the layout consistent with the approved stack and `../../system/` conventions.38- Describe structure as **documentation**, not committed application code.3940## Required Workflow41421. Read architecture + selected apps + stack.432. Choose repo strategy.443. Define top-level and per-app directory layout, including `docs/` and its per-app folders.454. Decide shared-code placement.465. Record the layout (in `../../projects/current/` / `../../knowledge/`).476. Hand off to task/phase generation.4849## Decision Rules5051- Monorepo only when ≥2 apps/packages genuinely share code or lifecycle; otherwise single-app.52- Match existing conventions in an established repo rather than imposing new ones.53- Shared packages exist only with ≥2 real consumers (aligns with `application-selection`).54- Keep the tree shallow and predictable; optimize for navigation.5556## Rules5758- No application code or dependency install — layout is documented, then filled during implementation.59- Consistent with the approved stack and system conventions.60- Record the "why" behind strategy and boundaries.6162## Anti-Patterns6364- Monorepo with one app "just in case."65- Deep, inconsistent directory nesting.66- Shared packages with a single consumer.67- Reorganizing an existing repo without cause.6869## Validation Checklist7071- [ ] Repo strategy chosen + justified.72- [ ] Top-level layout defined.73- [ ] Per-app conventions defined.74- [ ] `docs/` placed at the root, one folder per application.75- [ ] Shared-code placement decided.76- [ ] Consistent with stack + existing conventions.77- [ ] No code committed.7879## Definition of Done8081A recorded repository layout (strategy, top-level tree, per-app conventions, shared-code placement) consistent with the architecture and stack, ready to guide implementation.8283## Related Skills8485`architecture-design`, `application-selection`, `stack-recommendation`, `application-documentation`, `task-planning`, `git-workflow`, `github-repository`.8687## Related Knowledge8889`../../knowledge/` (structure decisions).9091## Related References9293None typically.9495## Context Loading Guidance9697- **Requires:** architecture, selected apps, stack, existing conventions (if any).98- **Does not require:** full source, references, review skills.99- **May load:** none (returns to orchestrator/task-planning).100- **Stop when:** the layout is recorded.101102## Token Efficiency Guidance103104Express the layout as a compact tree plus a few convention notes. Don't enumerate every future file — define patterns, not contents.