Project Bootstrap: Normalize Repository Structure
You are a repository analyzer that transforms existing codebases into the project's canonical knowledge layer.
When to Invoke
Typically executed once per repository or after major architectural changes.
Your Process
- Environment Manager: Prevents version ambiguity and auto-activates the correct runtime and package manager.
- Fast Linter/Formatter: Provides a deterministic, auto-fixable gate for code quality before review.
- Pre-commit Framework: Runs local gates automatically on every commit without cloud CI dependencies.
- Type Checker: Catches silent property and type mismatches before runtime execution.
- Produce documentation gap analysis — Note what canonical docs still need attention.
- Recommend first milestone — Suggest appropriate starting scope.
Discovery Priority
Code Analysis Strategy
Prefer semantic discovery:
- Use
code-search skill if available: ~/devcode/aef/agent/skills/code-search/code-search.sh --skeletons
- Generate index and skeletons before reading full files
- Identify entry points via
main functions, route handlers, public APIs
Read selectively:
- Configuration to understand integration points
- Key module boundaries only when structural understanding insufficient
- Test setup to understand verification patterns
Document Creation
AGENTS.md
- Repository overview and entry point for agents
- Build and test commands
- Coding conventions if detectable
- Preferred tool patterns
AGENTS.md (Repository Overview)
- Repository overview and entry point for agents.
- Build and test commands.
- Coding conventions, emphasizing canonical artifact system usage.
- Preferred tool patterns.
.omp/config.yml (Project Configuration)
- Canonical project configuration file, defining
project_id, project_slug, mode (framework/application), and artifact-related settings.
- Treated as a canonical artifact itself (validation, storage).
Project-Specific Agent Guidance (e.g., .agent/guidance/)
- Stack-specific agent guardrails and conventions, parameterized and generated by bootstrap.
- Example:
Do not modify layout classes unless the active specification explicitly requires a visual or structural change.
README.md
- Project overview and purpose
- Quick start guide
- Build and run instructions
- Link to canonical documentation layer
CHANGELOG.md (docs/)
- Chronological record of changes
- Milestone releases with links to archived artifacts
- Version history and significant updates
FRAMEWORK.md
- Architectural patterns
- Module organization
- Component relationships
- Extension guidelines
SPEC.md
- Current system architecture as specification
- Public APIs and interfaces
- Data models
ROADMAP.md
- Existing capabilities as completed items
- Known gaps as future items
PLAYBOOK.md
- How to run/test/deploy
- Operational procedures
- Common tasks
DATA.md
- Database schema (if any)
- Configuration schema
- Data flow patterns
MILESTONES.md
- List all active milestones (initially empty)
- Format:
- [M{X}] - {goal} (active) for active work
- Format:
- [M{X}] - {goal} (archived) → milestones/archive/M{X}/ for archived work
EXPERIENCES.md
- Meta-learning ledger tracking framework friction and applied skill updates
- Two sections: "Active Friction Points" and "Applied Skill Updates (Resolved)"
- Record issues and solutions during skill evolution and hotfix scenarios
- Distill learnings into AGENTS.md or PLAYBOOK.md when they establish new coding conventions
Documentation Principles
- Repository reality first — Code defines truth, docs follow
- Merge, distill, normalize — Combine scattered knowledge into coherent docs
- Cross-reference — Link related sections, avoid duplication
- Preserve knowledge — Keep architectural decisions and rationale
- Eliminate obsolescence — Remove outdated information
Output Structure
{repository}/
├── README.md # Created or updated with project overview and quick start
├── AGENTS.md # Created or updated (agent entry point)
{repository}/docs/
├── CHANGELOG.md # Created (chronological record of changes)
├── FRAMEWORK.md # Created if missing
├── SPEC.md # Created or updated
├── ROADMAP.md # Created or updated
├── PLAYBOOK.md # Created or updated
├── DATA.md # Created if data components exist
├── MILESTONES.md # Created (empty initially)
├── skeletons/ # Structural code signatures
└── templates/ # Backup and template-source directories
{repository}/milestones/
├── archive/ # Created for archived milestones
└── M{X}/ # Future milestone directories
{repository}/data/ # Layer 1: Data (JSON/YAML/SQLite) [218, 220]
{repository}/src/ # Layer 3: Logic (Python/JS/TS) [218, 220]
{repository}/web/ # Layer 2: View (HTML/CSS/JS) [218, 220]
- Documentation gap analysis summary
Documentation Principles
- Repository reality first — Code defines truth, docs follow
- Merge, distill, normalize — Combine scattered knowledge into coherent docs
- Cross-reference — Link related sections, avoid duplication
- Preserve knowledge — Keep architectural decisions and rationale
- Eliminate obsolescence — Remove outdated information
Out of Scope
- Rewrite source code
- Perform refactoring
- Generate milestones, specifications, verification
- Perform Git operations
- Archive documents
- Modify implementation files
Documentation
References
1---2name: bootstrap-project3description: Analyze an existing repository and normalize it into standard engineering structure. One-time setup for brownfield projects.4---5
6# Project Bootstrap: Normalize Repository Structure
7
8You are a repository analyzer that transforms existing codebases into the project's canonical knowledge layer.
9
10## When to Invoke
11
12Typically executed once per repository or after major architectural changes.
13
14## Your Process
15
16- **Environment Manager**: Prevents version ambiguity and auto-activates the correct runtime and package manager.
17- **Fast Linter/Formatter**: Provides a deterministic, auto-fixable gate for code quality before review.
18- **Pre-commit Framework**: Runs local gates automatically on every commit without cloud CI dependencies.
19- **Type Checker**: Catches silent property and type mismatches before runtime execution.
20
2110. **Produce documentation gap analysis** — Note what canonical docs still need attention.
2211. **Recommend first milestone** — Suggest appropriate starting scope.
23
24## Discovery Priority
25
26## Code Analysis Strategy
27
28**Prefer semantic discovery:**
29
30- Use `code-search` skill if available: `~/devcode/aef/agent/skills/code-search/code-search.sh --skeletons`
31- Generate index and skeletons before reading full files
32- Identify entry points via `main` functions, route handlers, public APIs
33
34**Read selectively:**
35
36- Configuration to understand integration points
37- Key module boundaries only when structural understanding insufficient
38- Test setup to understand verification patterns
39
40## Document Creation
41
42### AGENTS.md
43
44- Repository overview and entry point for agents
45- Build and test commands
46- Coding conventions if detectable
47- Preferred tool patterns
48
49### AGENTS.md (Repository Overview)
50
51- Repository overview and entry point for agents.
52- Build and test commands.
53- Coding conventions, emphasizing canonical artifact system usage.
54- Preferred tool patterns.
55
56### .omp/config.yml (Project Configuration)
57
58- Canonical project configuration file, defining `project_id`, `project_slug`, `mode` (framework/application), and artifact-related settings.
59- Treated as a canonical artifact itself (validation, storage).
60
61### Project-Specific Agent Guidance (e.g., .agent/guidance/)
62
63- Stack-specific agent guardrails and conventions, parameterized and generated by bootstrap.
64- Example: `Do not modify layout classes unless the active specification explicitly requires a visual or structural change.`
65
66### README.md
67
68- Project overview and purpose
69- Quick start guide
70- Build and run instructions
71- Link to canonical documentation layer
72
73### CHANGELOG.md (docs/)
74
75- Chronological record of changes
76- Milestone releases with links to archived artifacts
77- Version history and significant updates
78
79### FRAMEWORK.md
80
81- Architectural patterns
82- Module organization
83- Component relationships
84- Extension guidelines
85
86### SPEC.md
87
88- Current system architecture as specification
89- Public APIs and interfaces
90- Data models
91
92### ROADMAP.md
93
94- Existing capabilities as completed items
95- Known gaps as future items
96
97### PLAYBOOK.md
98
99- How to run/test/deploy
100- Operational procedures
101- Common tasks
102
103### DATA.md
104
105- Database schema (if any)
106- Configuration schema
107- Data flow patterns
108
109### MILESTONES.md
110
111- List all active milestones (initially empty)
112- Format: `- [M{X}] - {goal} (active)` for active work
113- Format: `- [M{X}] - {goal} (archived) → milestones/archive/M{X}/` for archived work
114
115### EXPERIENCES.md
116
117- Meta-learning ledger tracking framework friction and applied skill updates
118- Two sections: "Active Friction Points" and "Applied Skill Updates (Resolved)"
119- Record issues and solutions during skill evolution and hotfix scenarios
120- Distill learnings into AGENTS.md or PLAYBOOK.md when they establish new coding conventions
121
122## Documentation Principles
123
124- **Repository reality first** — Code defines truth, docs follow
125- **Merge, distill, normalize** — Combine scattered knowledge into coherent docs
126- **Cross-reference** — Link related sections, avoid duplication
127- **Preserve knowledge** — Keep architectural decisions and rationale
128- **Eliminate obsolescence** — Remove outdated information
129
130## Output Structure
131
132```
133{repository}/
134├── README.md # Created or updated with project overview and quick start
135├── AGENTS.md # Created or updated (agent entry point)
136
137{repository}/docs/
138├── CHANGELOG.md # Created (chronological record of changes)
139├── FRAMEWORK.md # Created if missing
140├── SPEC.md # Created or updated
141├── ROADMAP.md # Created or updated
142├── PLAYBOOK.md # Created or updated
143├── DATA.md # Created if data components exist
144├── MILESTONES.md # Created (empty initially)
145├── skeletons/ # Structural code signatures
146└── templates/ # Backup and template-source directories
147
148{repository}/milestones/
149├── archive/ # Created for archived milestones
150└── M{X}/ # Future milestone directories
151
152{repository}/data/ # Layer 1: Data (JSON/YAML/SQLite) [218, 220]
153{repository}/src/ # Layer 3: Logic (Python/JS/TS) [218, 220]
154{repository}/web/ # Layer 2: View (HTML/CSS/JS) [218, 220]
155
156- Documentation gap analysis summary
157```
158
159## Documentation Principles
160
161- **Repository reality first** — Code defines truth, docs follow
162- **Merge, distill, normalize** — Combine scattered knowledge into coherent docs
163- **Cross-reference** — Link related sections, avoid duplication
164- **Preserve knowledge** — Keep architectural decisions and rationale
165- **Eliminate obsolescence** — Remove outdated information
166
167## Out of Scope
168
169- Rewrite source code
170- Perform refactoring
171- Generate milestones, specifications, verification
172- Perform Git operations
173- Archive documents
174- Modify implementation files
175
176## Documentation
177
178- **[skills.md](../../../docs/skills.md)** — Comprehensive skill catalog
179- **[INDEX.md](../../../docs/INDEX.md)** — Complete skill catalog
180
181## References
182
183- [INDEX.md](../../../docs/INDEX.md) — Complete skill catalog
184- [AGENTS.md](../AGENTS.md) — Framework overview
185- [PLAYBOOK.md](../../../docs/PLAYBOOK.md) — Operational workflows
186- [FRAMEWORK.md](../../../docs/FRAMEWORK.md) — Architecture patterns