devforgeai 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1217 +0,0 @@
1
- # Source Tree Structure - DevForgeAI Framework
2
-
3
- **Status**: LOCKED
4
- **Last Updated**: 2026-03-04
5
- **Version**: 5.6 (Added: positioning-strategy.md reference — ADR-035)
6
-
7
- ## CRITICAL RULE: Framework Organization
8
-
9
- This file defines WHERE framework components belong in the DevForgeAI repository. Projects using DevForgeAI will have their own source-tree.md files created by the designing-systems skill.
10
-
11
- ---
12
-
13
- ## Framework Directory Structure
14
- Do not modify operational files.
15
- Only modify src/, tests/ files. Unit tests must point to src/ tree and reside within the tests/ folder as denoted in the following directory structure.
16
-
17
- ```
18
- DevForgeAI2/
19
- ├── .github/ # GitHub-specific configuration (STANDARD LOCATION)
20
- │ └── workflows/ # GitHub Actions workflow files (generated by /setup-github-actions)
21
- │ ├── dev-story.yml # Headless /dev execution workflow (AC#1)
22
- │ ├── qa-validation.yml # PR quality gate workflow (AC#2)
23
- │ ├── parallel-stories.yml # Matrix parallel execution workflow (AC#3)
24
- │ └── installer-testing.yml # Installer test workflow
25
-
26
- ├── .claude/ # Claude Code Terminal configuration (OPERATIONAL - do not modify files)
27
- │ ├── skills/ # Framework implementation (21 skills)
28
- │ │ ├── discovering-requirements/
29
- │ │ │ ├── SKILL.md # Main skill (500-800 lines)
30
- │ │ │ ├── references/ # Deep documentation (loaded on demand)
31
- │ │ │ │ ├── discovery-workflow.md
32
- │ │ │ │ ├── requirements-elicitation-workflow.md
33
- │ │ │ │ ├── complexity-assessment-workflow.md
34
- │ │ │ │ ├── epic-decomposition-workflow.md
35
- │ │ │ │ ├── feasibility-analysis-workflow.md
36
- │ │ │ │ ├── artifact-generation.md
37
- │ │ │ │ ├── self-validation-workflow.md
38
- │ │ │ │ ├── completion-handoff.md
39
- │ │ │ │ ├── user-interaction-patterns.md
40
- │ │ │ │ ├── error-handling.md
41
- │ │ │ │ ├── requirements-elicitation-guide.md
42
- │ │ │ │ ├── complexity-assessment-matrix.md
43
- │ │ │ │ ├── domain-specific-patterns.md
44
- │ │ │ │ ├── feasibility-analysis-framework.md
45
- │ │ │ │ ├── validation-checklists.md
46
- │ │ │ │ └── output-templates.md
47
- │ │ │ └── assets/
48
- │ │ │ └── templates/
49
- │ │ │ ├── epic-template.md
50
- │ │ │ ├── requirements-spec-template.md
51
- │ │ │ ├── feature-prioritization-matrix.md
52
- │ │ │ └── user-persona-template.md
53
- │ │ ├── assessing-entrepreneur/ # Guided self-assessment skill (STORY-465, EPIC-072)
54
- │ │ │ ├── SKILL.md # 9-phase assessment workflow (~196 lines)
55
- │ │ │ └── references/
56
- │ │ │ ├── adhd-adaptation-framework.md
57
- │ │ │ ├── confidence-assessment-workflow.md
58
- │ │ │ ├── work-style-questionnaire.md
59
- │ │ │ └── plan-calibration-engine.md
60
- │ │ ├── researching-market/ # Market research skill (EPIC-074, ADR-029)
61
- │ │ │ ├── SKILL.md # Market sizing, competitive analysis, interviews
62
- │ │ │ └── references/
63
- │ │ │ ├── market-sizing-methodology.md # TAM/SAM/SOM estimation (STORY-535)
64
- │ │ │ ├── fermi-estimation.md # Fermi estimation guidance (STORY-535)
65
- │ │ │ ├── competitive-analysis-framework.md # Competitor positioning (STORY-536)
66
- │ │ │ └── customer-interview-guide.md # Interview best practices (STORY-537)
67
- │ │ ├── auditing-w3-compliance/ # W3 compliance scanning skill (STORY-462, ADR-020)
68
- │ │ │ └── SKILL.md # 4-phase violation scanning (CRITICAL/HIGH/MEDIUM/INFO)
69
- │ │ ├── brainstorming/ # Business Analyst discovery skill
70
- │ │ │ ├── SKILL.md # Main skill (BA discovery phases)
71
- │ │ │ └── assets/
72
- │ │ │ └── templates/
73
- │ │ │ └── brainstorm-template.md
74
- │ │ ├── coaching-entrepreneur/ # Confidence coaching skill (STORY-469, EPIC-072)
75
- │ │ │ ├── SKILL.md # Main skill (placeholder)
76
- │ │ │ └── references/
77
- │ │ │ ├── confidence-building-patterns.md
78
- │ │ │ └── imposter-syndrome-interventions.md
79
- │ │ ├── designing-systems/
80
- │ │ │ ├── SKILL.md
81
- │ │ │ ├── references/
82
- │ │ │ │ ├── project-context-discovery.md
83
- │ │ │ │ ├── context-file-creation.md
84
- │ │ │ │ ├── adr-creation.md
85
- │ │ │ │ ├── spec-validation.md
86
- │ │ │ │ ├── ambiguity-detection.md
87
- │ │ │ │ ├── prompt-alignment-workflow.md
88
- │ │ │ │ └── completion-handoff.md
89
- │ │ │ └── assets/
90
- │ │ │ └── templates/
91
- │ │ │ ├── tech-stack-template.md
92
- │ │ │ ├── source-tree-template.md
93
- │ │ │ ├── dependencies-template.md
94
- │ │ │ ├── coding-standards-template.md
95
- │ │ │ ├── architecture-constraints-template.md
96
- │ │ │ ├── anti-patterns-template.md
97
- │ │ │ └── adr-template.md
98
- │ │ ├── devforgeai-orchestration/
99
- │ │ │ ├── SKILL.md
100
- │ │ │ ├── references/
101
- │ │ │ │ ├── skill-invocation.md
102
- │ │ │ │ ├── workflow-state-machine.md
103
- │ │ │ │ ├── quality-gates.md
104
- │ │ │ │ ├── story-lifecycle-management.md
105
- │ │ │ │ └── sprint-command-workflow.md
106
- │ │ │ └── assets/ # EPIC-048 - Template storage
107
- │ │ │ └── templates/
108
- │ │ │ └── technical-debt-register-template.md # v2.0 YAML frontmatter template (STORY-285)
109
- │ │ ├── devforgeai-story-creation/
110
- │ │ │ ├── SKILL.md
111
- │ │ │ ├── references/
112
- │ │ │ │ ├── requirements-analysis.md
113
- │ │ │ │ ├── acceptance-criteria-creation.md
114
- │ │ │ │ ├── technical-specification-creation.md
115
- │ │ │ │ ├── ui-specification-creation.md
116
- │ │ │ │ ├── self-validation.md
117
- │ │ │ │ ├── completion-handoff.md
118
- │ │ │ ├── context-validation.md
119
- │ │ │ └── custody-chain-workflow.md
120
- │ │ │ └── assets/
121
- │ │ │ ├── templates/
122
- │ │ │ │ └── story-template.md
123
- │ │ │ └── contracts/
124
- │ │ │ ├── requirements-analyst-contract.yaml
125
- │ │ │ └── api-designer-contract.yaml
126
- │ │ ├── devforgeai-ui-generator/
127
- │ │ │ ├── SKILL.md
128
- │ │ │ ├── references/
129
- │ │ │ │ ├── ui-type-detection.md
130
- │ │ │ │ ├── technology-selection.md
131
- │ │ │ │ ├── component-generation.md
132
- │ │ │ │ └── spec-validation.md
133
- │ │ │ └── assets/
134
- │ │ │ └── templates/
135
- │ │ │ ├── web-component-template.md
136
- │ │ │ ├── gui-component-template.md
137
- │ │ │ └── terminal-component-template.md
138
- │ │ ├── implementing-stories/
139
- │ │ │ ├── SKILL.md
140
- │ │ │ ├── phases/ # Phase-specific execution guides (10 phases)
141
- │ │ │ │ ├── phase-01-preflight.md
142
- │ │ │ │ ├── phase-02-test-first.md
143
- │ │ │ │ ├── phase-03-implementation.md
144
- │ │ │ │ ├── phase-04-refactoring.md
145
- │ │ │ │ ├── phase-05-integration.md
146
- │ │ │ │ ├── phase-06-deferral.md
147
- │ │ │ │ ├── phase-07-dod-update.md
148
- │ │ │ │ ├── phase-08-git-workflow.md
149
- │ │ │ │ ├── phase-09-feedback.md
150
- │ │ │ │ └── phase-10-result.md
151
- │ │ │ └── references/ # Deep documentation (loaded on demand)
152
- │ │ │ ├── preflight-validation.md
153
- │ │ │ ├── tdd-red-phase.md
154
- │ │ │ ├── tdd-green-phase.md
155
- │ │ │ ├── tdd-refactor-phase.md
156
- │ │ │ ├── integration-testing.md
157
- │ │ │ ├── phase-06-deferral-challenge.md
158
- │ │ │ ├── dod-update-workflow.md
159
- │ │ │ ├── ac-checklist-update-workflow.md
160
- │ │ │ └── git-workflow-conventions.md
161
- │ │ ├── marketing-business/ # Marketing skill (STORY-539, EPIC-075, ADR-033)
162
- │ │ │ ├── SKILL.md
163
- │ │ │ └── references/
164
- │ │ │ ├── go-to-market-framework.md
165
- │ │ │ ├── channel-selection-matrix.md
166
- │ │ │ └── positioning-strategy.md # STORY-540, ADR-035
167
- │ │ ├── planning-business/ # Business planning skill (STORY-531/532/533, EPIC-073, ADR-034)
168
- │ │ │ ├── SKILL.md
169
- │ │ │ └── references/
170
- │ │ │ ├── lean-canvas-workflow.md
171
- │ │ │ ├── milestone-generator.md
172
- │ │ │ ├── business-model-patterns.md
173
- │ │ │ └── viability-scoring.md
174
- │ │ ├── validating-epic-coverage/ # STORY-457, ADR-020
175
- │ │ │ ├── SKILL.md
176
- │ │ │ └── references/
177
- │ │ │ └── story-quality-gates.md
178
- │ │ ├── devforgeai-qa/
179
- │ │ │ ├── SKILL.md
180
- │ │ │ ├── references/
181
- │ │ │ │ ├── coverage-analysis-workflow.md
182
- │ │ │ │ ├── code-quality-workflow.md
183
- │ │ │ │ ├── anti-pattern-detection-workflow.md
184
- │ │ │ │ ├── spec-compliance-workflow.md
185
- │ │ │ │ ├── validation-procedures.md
186
- │ │ │ │ ├── report-generation.md
187
- │ │ │ │ ├── dod-protocol.md
188
- │ │ │ │ ├── phase-0-setup-workflow.md
189
- │ │ │ │ ├── phase-3-reporting-workflow.md
190
- │ │ │ │ ├── phase-4-cleanup-workflow.md
191
- │ │ │ │ └── phase-marker-protocol.md
192
- │ │ │ ├── assets/
193
- │ │ │ │ ├── config/
194
- │ │ │ │ │ ├── coverage-thresholds.md
195
- │ │ │ │ │ ├── quality-metrics.md
196
- │ │ │ │ │ └── security-policies.md
197
- │ │ │ │ └── templates/
198
- │ │ │ │ └── qa-report-template.md
199
- │ │ │ └── scripts/
200
- │ │ │ ├── analyze_complexity.py
201
- │ │ │ ├── detect_duplicates.py
202
- │ │ │ ├── generate_coverage_report.py
203
- │ │ │ ├── generate_test_stubs.py
204
- │ │ │ ├── security_scan.py
205
- │ │ │ └── validate_spec_compliance.py
206
- │ │ ├── devforgeai-release/
207
- │ │ │ ├── SKILL.md
208
- │ │ │ └── references/
209
- │ │ │ ├── deployment-strategies.md
210
- │ │ │ ├── smoke-testing-guide.md
211
- │ │ │ ├── rollback-procedures.md
212
- │ │ │ ├── monitoring-metrics.md
213
- │ │ │ └── release-checklist.md
214
- │ │ ├── devforgeai-documentation/
215
- │ │ │ ├── SKILL.md
216
- │ │ │ ├── references/
217
- │ │ │ │ ├── mode-selection.md
218
- │ │ │ │ ├── greenfield-workflow.md
219
- │ │ │ │ ├── brownfield-workflow.md
220
- │ │ │ │ ├── architecture-documentation.md
221
- │ │ │ │ ├── api-documentation.md
222
- │ │ │ │ ├── user-guides.md
223
- │ │ │ │ └── coverage-validation.md
224
- │ │ │ └── assets/
225
- │ │ │ └── templates/
226
- │ │ │ ├── readme-template.md
227
- │ │ │ ├── api-doc-template.md
228
- │ │ │ ├── developer-guide-template.md
229
- │ │ │ └── architecture-diagram-template.md
230
- │ │ ├── devforgeai-feedback/
231
- │ │ │ ├── SKILL.md
232
- │ │ │ ├── references/
233
- │ │ │ │ ├── session-initialization.md
234
- │ │ │ │ ├── challenge-detection.md
235
- │ │ │ │ ├── insight-extraction.md
236
- │ │ │ │ ├── improvement-recommendation.md
237
- │ │ │ │ ├── session-finalization.md
238
- │ │ │ │ └── triage-workflow.md
239
- │ │ │ └── assets/
240
- │ │ │ ├── config/
241
- │ │ │ │ └── feedback-config.json
242
- │ │ │ └── templates/
243
- │ │ │ └── session-template.md
244
- │ │ ├── devforgeai-rca/
245
- │ │ │ ├── SKILL.md
246
- │ │ │ ├── references/
247
- │ │ │ │ ├── file-discovery.md
248
- │ │ │ │ ├── five-whys-analysis.md
249
- │ │ │ │ ├── evidence-collection.md
250
- │ │ │ │ ├── recommendation-generation.md
251
- │ │ │ │ └── rca-document-creation.md
252
- │ │ │ └── assets/
253
- │ │ │ └── templates/
254
- │ │ │ └── rca-template.md
255
- │ │ ├── devforgeai-subagent-creation/
256
- │ │ │ ├── SKILL.md
257
- │ │ │ └── references/
258
- │ │ │ ├── requirements-gathering.md
259
- │ │ │ ├── agent-generation.md
260
- │ │ │ └── validation.md
261
- │ │ ├── devforgeai-mcp-cli-converter/
262
- │ │ │ ├── SKILL.md
263
- │ │ │ └── references/
264
- │ │ │ └── conversion-workflow.md
265
- │ │ ├── claude-code-terminal-expert/
266
- │ │ │ ├── SKILL.md
267
- │ │ │ └── references/
268
- │ │ │ └── terminal-knowledge-base.md
269
- │ │ ├── cross-ai-collaboration/ # Cross-AI collaboration document generation (ADR-024)
270
- │ │ │ ├── SKILL.md # 6-phase interactive collaboration workflow
271
- │ │ │ └── references/
272
- │ │ │ └── collaboration-prompt-template.md
273
- │ │ ├── internet-sleuth-integration/
274
- │ │ │ └── SKILL.md (incomplete - use internet-sleuth subagent instead)
275
- │ │ ├── skill-creator/
276
- │ │ │ └── SKILL.md
277
- │ │ ├── story-remediation/ # Story/epic fix workflow (post-audit remediation)
278
- │ │ │ ├── SKILL.md
279
- │ │ │ └── references/
280
- │ │ │ ├── fix-actions-catalog.md
281
- │ │ │ └── fix-verification-workflow.md
282
- │ │ ├── advising-legal/ # Legal guidance skill (EPIC-076, ADR-028)
283
- │ │ │ ├── SKILL.md # Legal assessment orchestrator (< 1,000 lines)
284
- │ │ │ └── references/
285
- │ │ │ ├── business-structure-guide.md # LLC/S-Corp/Sole Prop decision tree (STORY-544)
286
- │ │ │ ├── ip-protection-checklist.md # Copyright/trademark/patent guidance (STORY-545)
287
- │ │ │ └── when-to-hire-professional.md # Professional referral framework (STORY-547)
288
- │ │ ├── managing-finances/ # Financial planning skill (EPIC-077, ADR-030)
289
- │ │ │ ├── SKILL.md # Financial planning orchestrator (< 1,000 lines)
290
- │ │ │ └── references/
291
- │ │ │ ├── pricing-strategy-framework.md # Cost-plus/value-based/competitive pricing (STORY-549)
292
- │ │ │ ├── break-even-analysis.md # Break-even calculation + ASCII chart (STORY-550)
293
- │ │ │ ├── funding-options-guide.md # Funding decision tree (STORY-552)
294
- │ │ │ └── startup-financial-model.md # 12-month projection generator (STORY-553)
295
- │ │ ├── operating-business/ # Operations & launch skill (EPIC-078, ADR-029)
296
- │ │ │ ├── SKILL.md # Operations orchestrator with progressive disclosure menu
297
- │ │ │ └── references/
298
- │ │ │ ├── mvp-launch-checklist.md # 5-domain launch checklist (STORY-554)
299
- │ │ │ ├── tool-selection-guide.md # Budget-aware tool recommendations (STORY-555)
300
- │ │ │ ├── process-design-framework.md # Core business process templates (STORY-557)
301
- │ │ │ └── scaling-readiness-assessment.md # Post-launch scaling criteria (STORY-558)
302
- │ │ └── devforgeai-github-actions/
303
- │ │ ├── SKILL.md # GitHub Actions workflow generation (STORY-097)
304
- │ │ └── references/ # Loaded on demand
305
- │ │ ├── workflow-generation.md
306
- │ │ └── cost-optimization-guide.md
307
- │ │
308
- │ ├── agents/ # Specialized subagents (34 agents)
309
- │ │ ├── agent-generator.md
310
- │ │ ├── anti-pattern-scanner.md
311
- │ │ ├── anti-pattern-scanner/
312
- │ │ │ └── references/
313
- │ │ │ ├── code-smell-catalog.md
314
- │ │ │ └── two-stage-filter-patterns.md
315
- │ │ ├── api-designer.md
316
- │ │ ├── architect-reviewer.md
317
- │ │ ├── backend-architect.md
318
- │ │ ├── business-coach.md # Confidence detection coaching (STORY-469, EPIC-072)
319
- │ │ ├── code-analyzer.md
320
- │ │ ├── code-quality-auditor.md
321
- │ │ ├── code-reviewer.md
322
- │ │ ├── dead-code-detector.md
323
- │ │ ├── dead-code-detector/
324
- │ │ │ └── references/
325
- │ │ │ └── entry-point-patterns.md
326
- │ │ ├── context-validator.md
327
- │ │ ├── coverage-analyzer.md
328
- │ │ ├── deferral-validator.md
329
- │ │ ├── deployment-engineer.md
330
- │ │ ├── dev-result-interpreter.md
331
- │ │ ├── epic-coverage-result-interpreter.md # STORY-457, ADR-020
332
- │ │ ├── financial-modeler.md # Financial projections subagent (STORY-551, EPIC-077, ADR-030)
333
- │ │ ├── documentation-writer.md
334
- │ │ ├── frontend-developer.md
335
- │ │ ├── git-validator.md
336
- │ │ ├── integration-tester.md
337
- │ │ ├── internet-sleuth.md
338
- │ │ ├── market-analyst.md # Research synthesis subagent (STORY-536, EPIC-074, ADR-029)
339
- │ │ ├── pattern-compliance-auditor.md
340
- │ │ ├── qa-result-interpreter.md
341
- │ │ ├── refactoring-specialist.md
342
- │ │ ├── requirements-analyst.md
343
- │ │ ├── security-auditor.md
344
- │ │ ├── sprint-planner.md
345
- │ │ ├── stakeholder-analyst.md
346
- │ │ ├── story-requirements-analyst.md
347
- │ │ ├── tech-stack-detector.md
348
- │ │ ├── technical-debt-analyzer.md
349
- │ │ ├── test-automator.md
350
- │ │ └── ui-spec-formatter.md
351
- │ │
352
- │ ├── commands/ # User-facing workflows (28 commands - do not modify files)
353
- │ │ ├── audit-alignment.md
354
- │ │ ├── audit-budget.md
355
- │ │ ├── audit-deferrals.md
356
- │ │ ├── audit-hooks.md
357
- │ │ ├── brainstorm.md # /brainstorm [topic] | --resume BRAINSTORM-ID
358
- │ │ ├── collaborate.md # /collaborate [issue-description] [--target=AI]
359
- │ │ ├── create-agent.md
360
- │ │ ├── create-context.md
361
- │ │ ├── create-epic.md
362
- │ │ ├── create-sprint.md
363
- │ │ ├── create-story.md
364
- │ │ ├── create-ui.md
365
- │ │ ├── dev.md
366
- │ │ ├── document.md
367
- │ │ ├── export-feedback.md
368
- │ │ ├── feedback-config.md
369
- │ │ ├── feedback-export-data.md
370
- │ │ ├── feedback-reindex.md
371
- │ │ ├── feedback-search.md
372
- │ │ ├── financial-model.md # /financial-model command (STORY-551, EPIC-077, ADR-030)
373
- │ │ ├── ideate.md
374
- │ │ ├── import-feedback.md
375
- │ │ ├── legal-check.md # /legal-check command (STORY-546, EPIC-076, ADR-031)
376
- │ │ ├── market-research.md # /market-research command (STORY-538, EPIC-074, ADR-028)
377
- │ │ ├── ops-plan.md # /ops-plan command (STORY-556, EPIC-078, ADR-029)
378
- │ │ ├── orchestrate.md
379
- │ │ ├── qa.md
380
- │ │ ├── rca.md
381
- │ │ ├── release.md
382
- │ │ ├── DF/
383
- │ │ └── feedback.md
384
- │ │
385
- │ ├── memory/ # Progressive disclosure references
386
- │ │ ├── sessions/ # Session-level workflow artifacts (EPIC-052, ADR-014)
387
- │ │ │ └── {SESSION-ID}/ # Per-session observations, decisions, outcomes
388
- │ │ ├── learning/ # Cross-session framework learnings (EPIC-052, ADR-014)
389
- │ │ │ ├── patterns/ # Validated workflow patterns
390
- │ │ │ ├── improvements/ # Pending framework improvements
391
- │ │ │ └── index.md # Learning catalog for discovery
392
- │ │ ├── skills-reference.md
393
- │ │ ├── subagents-reference.md
394
- │ │ ├── commands-reference.md
395
- │ │ ├── documentation-command-guide.md
396
- │ │ ├── qa-automation.md
397
- │ │ ├── context-files-guide.md
398
- │ │ ├── ui-generator-guide.md
399
- │ │ ├── token-efficiency.md
400
- │ │ ├── epic-creation-guide.md
401
- │ │ ├── token-budget-guidelines.md
402
- │ │ └── skill-execution-troubleshooting.md
403
- │ │
404
- │ ├── scripts/ # DevForgeAI CLI tools
405
- │ │ ├── devforgeai_cli/
406
- │ │ │ ├── __init__.py
407
- │ │ │ ├── cli.py
408
- │ │ │ ├── commands/ # CLI command modules (ADR-026)
409
- │ │ │ │ ├── __init__.py
410
- │ │ │ │ ├── phase_commands.py # phase-init, phase-complete, phase-ready, phase-status
411
- │ │ │ │ ├── check_hooks.py # Hook validation commands
412
- │ │ │ │ ├── invoke_hooks.py # Hook invocation commands
413
- │ │ │ │ └── validate_installation.py # Installation verification
414
- │ │ │ ├── validators/
415
- │ │ │ │ ├── dod_validator.py
416
- │ │ │ │ ├── git_validator.py
417
- │ │ │ │ └── context_validator.py
418
- │ │ │ └── README.md
419
- │ │ ├── install_hooks.sh
420
- │ │ └── setup.py
421
- │ │
422
- │ └── hooks/ # .claude/hooks/ directory for workflow and event hooks
423
- │ │ # Workflow hooks (EPIC-048): post-{workflow}-{action}.sh
424
- │ │ # Event-driven hooks (EPIC-086): inject-{context}-context.sh (ADR-027)
425
- │ │ # Claude Code event hooks registered in .claude/settings.json
426
- │ ├── pre-tool-use.sh # Pre-tool execution hook
427
- │ ├── post-qa-debt-detection.sh # QA gap detection hook
428
- │ └── inject-phase-context.sh # SessionStart hook: workflow state injection (STORY-529)
429
-
430
- ├── .treelint/ # Treelint AST-aware code search working directory (ADR-013)
431
- │ ├── index.db # SQLite AST index (gitignored, regenerable on demand)
432
- │ ├── config.toml # Project configuration (optional commit, TOML format)
433
- │ └── daemon.sock # IPC Unix socket (gitignored, ephemeral, auto-cleaned on shutdown)
434
-
435
- ├── devforgeai/ # Framework context and project specs (VISIBLE TO GLOB - do not modify files)
436
- │ ├── specs/ # Project specifications
437
- │ │ ├── STRUCTURED-FORMAT-SPECIFICATION.md # Story/Epic format schema definition
438
- │ │ ├── Stories/ # User stories (STORY-NNN-title.story.md)
439
- │ │ │ └── archive/ # Released stories (moved here after /release)
440
- │ │ ├── Epics/ # Epic definitions (EPIC-NNN-title.epic.md)
441
- │ │ ├── Sprints/ # Sprint plans (Sprint-N.md)
442
- │ │ ├── brainstorms/ # Brainstorm session outputs (BRAINSTORM-NNN.brainstorm.md)
443
- │ │ ├── context/ # Framework architectural constraints
444
- │ │ │ ├── tech-stack.md # Framework implementation constraints
445
- │ │ │ ├── source-tree.md # This file
446
- │ │ │ ├── dependencies.md # Framework dependencies
447
- │ │ │ ├── coding-standards.md # Framework coding patterns
448
- │ │ │ ├── architecture-constraints.md # Framework design rules
449
- │ │ │ └── anti-patterns.md # Framework anti-patterns
450
- │ │ ├── adrs/ # Architecture Decision Records
451
- │ │ ├── research/ # Research documentation
452
- │ │ ├── analysis/ # Analysis documents
453
- │ │ ├── requirements/ # Requirements and analysis deliverables
454
- │ │ │ └── dev-analysis/ # /dev command conformance analysis outputs
455
- │ │ ├── business/ # Business planning outputs (EPIC-073, EPIC-074, EPIC-075, EPIC-076)
456
- │ │ │ ├── market-research/ # Market sizing, competitive analysis, customer interviews
457
- │ │ │ ├── marketing/ # Go-to-market strategy, positioning, content strategy (EPIC-075)
458
- │ │ │ ├── legal/ # Legal guidance outputs (EPIC-076)
459
- │ │ │ └── operations/ # Operations & launch artifacts (EPIC-078)
460
- │ │ └── implementation-notes/
461
- │ │
462
- │ ├── RCA/ # Root Cause Analysis documents
463
- │ │ ├── RCA-006-autonomous-deferrals.md
464
- │ │ ├── RCA-007-multi-file-story-creation.md
465
- │ │ └── [additional RCA documents...]
466
- │ │
467
- │ ├── qa/ # QA validation configuration
468
- │ │ ├── coverage-thresholds.md
469
- │ │ ├── quality-metrics.md
470
- │ │ ├── audit/ # Custody chain audit reports (generated)
471
- │ │ │ └── custody-chain-audit-{scope}.md
472
- │ │ ├── reports/ # Per-story QA reports (generated)
473
- │ │ │ └── {STORY-ID}-gaps.json
474
- │ │ ├── verification/ # AC compliance verification reports (EPIC-046)
475
- │ │ │ └── {STORY-ID}-ac-verification.json
476
- │ │ ├── resolved/ # Archived gap files
477
- │ │ └── snapshots/ # Red-phase test integrity snapshots (ADR-025)
478
- │ │ └── {STORY_ID}/ # Per-story isolation directory
479
- │ │ └── red-phase-checksums.json # SHA-256 checksums of test files from Red phase
480
- │ │
481
- │ ├── protocols/ # Framework protocols and patterns
482
- │ │ ├── lean-orchestration-pattern.md
483
- │ │ └── troubleshooting-lean-orchestration-violations.md
484
- │ │
485
- │ ├── config/ # Framework configuration
486
- │ │ └── hooks.yaml # Hook system configuration (opt-in/opt-out)
487
- │ ├── feedback/ # Feedback system data
488
- │ ├── deployment/ # Deployment configurations
489
- │ ├── backups/ # Backup files (gitignored)
490
- │ ├── epic-coverage/ # Epic coverage validation data
491
- │ └── technical-debt-register.md # Technical debt tracking (auto-updated by /dev and /qa)
492
-
493
- ├── tests/ # Framework test files
494
-
495
- ├── src/ # DISTRIBUTION SOURCE (installer deployment)
496
- │ ├── claude/ # Claude Code configuration (source)
497
- │ │ ├── agents/ # All 30 subagents (source copies)
498
- │ │ ├── commands/ # All 22 commands (source copies)
499
- │ │ ├──────────── DF/ # 1 Feedback command
500
- │ │ ├── rules/ # Framework rules (source copies, ADR-023)
501
- │ │ │ ├── core/ # Critical rules (always apply)
502
- │ │ │ ├── workflow/ # TDD and story lifecycle rules
503
- │ │ │ ├── security/ # Security and compliance rules
504
- │ │ │ └── conditional/ # Path-specific rules (activate by file type)
505
- │ │ ├── skills/ # All 18 skills (source copies)
506
- │ │ ├── memory/ # Progressive disclosure references
507
- │ │ └── scripts/ # DevForgeAI CLI tools
508
- │ │
509
- │ ├── devforgeai/ # DevForgeAI configuration (source)
510
- │ │ ├── config/ # Configuration templates
511
- │ │ ├── protocols/ # Framework protocols
512
- │ │ ├── specs/ # Specification templates
513
- │ │ ├── templates/ # Document templates
514
- │ │ ├── feedback/ # Feedback system templates
515
- │ │ └── qa/ # QA configuration (distribution)
516
- │ │ └── resolved/ # Template for resolved gaps archive
517
- │ │
518
- │ ├── bin/ # Binary distributions (EPIC-055, STORY-352)
519
- │ │ └── treelint/ # Treelint AST-aware code search binaries
520
- │ │ ├── treelint-linux-x86_64 # Linux x86_64 binary
521
- │ │ ├── treelint-linux-aarch64 # Linux ARM64 binary
522
- │ │ ├── treelint-darwin-x86_64 # macOS x86_64 binary
523
- │ │ ├── treelint-darwin-aarch64 # macOS Apple Silicon binary
524
- │ │ ├── treelint-windows-x86_64.exe # Windows x86_64 binary
525
- │ │ └── checksums.txt # SHA256 checksums for all binaries
526
- │ │
527
- │ ├── scripts/ # Installer scripts
528
- │ │ ├── install.sh # Main installer
529
- │ │ ├── update-framework.sh # Framework updater
530
- │ │ ├── validate-installation.sh
531
- │ │ ├── rollback-*.sh # Version rollback scripts
532
- │ │ └── audit-*.sh # Audit scripts
533
- │ │
534
- │ ├── CLAUDE.md # Template CLAUDE.md (installer merges with user's)
535
- │ ├── README.md # Distribution README
536
- │ ├── version.json # Version metadata
537
- │ └── checksums.txt # File integrity checksums
538
-
539
- ├── installer/ # PYTHON INSTALLER PACKAGE (EPIC-012, 013, 014, 035-039)
540
- │ ├── __init__.py # Package initialization
541
- │ ├── __main__.py # CLI entry point (python -m installer)
542
- │ │
543
- │ ├── install.py # Core installer orchestrator
544
- │ ├── backup.py # Backup/restore system
545
- │ ├── rollback.py # Rollback mechanism
546
- │ ├── merge.py # CLAUDE.md merge logic
547
- │ ├── version.py # Version management
548
- │ ├── validate.py # Installation validation
549
- │ ├── deploy.py # File deployment
550
- │ ├── claude_parser.py # CLAUDE.md parsing
551
- │ ├── variables.py # Variable substitution
552
- │ │
553
- │ ├── network.py # Network availability detection (STORY-069)
554
- │ ├── checksum.py # SHA256 integrity verification (STORY-069)
555
- │ ├── binary_deploy.py # Treelint binary deployment (STORY-352)
556
- │ ├── offline.py # Offline installation workflow (STORY-069, STORY-250)
557
- │ ├── bundle.py # Bundle structure validation (STORY-069)
558
- │ │
559
- │ ├── platform_detector.py # Platform detection module (STORY-235)
560
- │ ├── preflight.py # Pre-flight validation (STORY-236)
561
- │ ├── exit_codes.py # Enhanced exit codes (STORY-237)
562
- │ ├── tech_stack_detector.py # Tech stack detection (STORY-238)
563
- │ ├── build_executor.py # Build command execution (STORY-239)
564
- │ ├── package_creator.py # Language-specific packages (STORY-241)
565
- │ ├── installer_generator.py # OS-specific installers (STORY-242)
566
- │ ├── installer_mode_config.py # Installer mode config (STORY-243)
567
- │ ├── registry_publisher.py # Registry publishing (STORY-244)
568
- │ ├── registry_config.py # Registry configuration (STORY-245)
569
- │ ├── credential_masker.py # Credential masking (STORY-244)
570
- │ ├── wizard.py # CLI wizard installer (STORY-247)
571
- │ ├── silent.py # Silent/headless installer (STORY-249)
572
- │ ├── upgrade.py # Upgrade operations (STORY-251)
573
- │ ├── repair.py # Repair operations (STORY-251)
574
- │ ├── uninstall.py # Uninstall operations (STORY-251)
575
- │ ├── status.py # Status reporting (STORY-251)
576
- │ │
577
- │ ├── gui/ # GUI installer template (STORY-248, ADR-009)
578
- │ │ ├── package.json # Electron dependencies
579
- │ │ ├── main.js # Electron main process
580
- │ │ ├── preload.js # Context bridge
581
- │ │ ├── renderer/ # Frontend (HTML/CSS/JS)
582
- │ │ │ ├── index.html
583
- │ │ │ ├── styles.css
584
- │ │ │ ├── app.js
585
- │ │ │ └── pages/ # Page templates
586
- │ │ ├── assets/ # Icons, logos
587
- │ │ └── build/ # electron-builder config
588
- │ │
589
- │ ├── config.yaml # Installer configuration
590
- │ ├── merge-config.yaml # CLAUDE.md merge configuration
591
- │ │
592
- │ ├── tests/ # Installer test suite
593
- │ │ ├── test_offline_installer.py # Offline mode tests (STORY-069)
594
- │ │ └── test_*.py # Additional test modules
595
- │ │
596
- │ ├── API.md # Installer API documentation
597
- │ ├── INSTALL.md # Installation guide
598
- │ ├── README.md # Installer README
599
- │ └── TROUBLESHOOTING.md # Troubleshooting guide
600
-
601
- │ # PLANNED (Not Yet Implemented):
602
- │ # ├── cli/ # Node.js CLI wrapper (EPIC-012)
603
- │ # └── migrations/ # Version migration scripts (EPIC-014)
604
-
605
- ├── docs/ # Framework documentation
606
- │ ├── architecture/ # Architecture documentation
607
- │ │ ├── decisions/ # Architecture Decision Records (ADRs)
608
- │ │ │ ├── ADR-001-markdown-for-documentation.md
609
- │ │ │ ├── ADR-002-skills-over-monolithic-workflows.md
610
- │ │ │ ├── ADR-003-subagents-for-parallelism.md
611
- │ │ │ └── ADR-NNN-[decision-name].md
612
- │ │ ├── diagrams/ # Architecture diagrams (Mermaid)
613
- │ │ └── patterns/ # Design patterns documentation
614
- │ │
615
- │ ├── guides/ # User guides
616
- │ │ ├── quickstart.md
617
- │ │ ├── skill-development.md
618
- │ │ └── subagent-development.md
619
- │ │
620
- │ └── api/ # API specifications
621
- │ ├── skill-api.md
622
- │ ├── subagent-api.md
623
- │ └── command-api.md
624
-
625
- ├── CLAUDE.md # Claude Code project instructions (main entry point)
626
- ├── README.md # Framework overview and quick start
627
- ├── ROADMAP.md # Implementation phases and timelines
628
- ├── LICENSE # MIT License
629
- └── .gitignore # Git ignore rules
630
- ```
631
-
632
- ---
633
-
634
- ## Directory Purpose and Rules
635
-
636
- ### Dual-Location Architecture (STORY-048, Updated for devforgeai/ migration)
637
-
638
- **DevForgeAI maintains TWO parallel structures:**
639
-
640
- 1. **OPERATIONAL folders** (`.claude/` and `devforgeai/`) - Used by Claude Code Terminal during development
641
- 2. **DISTRIBUTION source** (`src/`) - Clean copies for external deployment via installer
642
-
643
- **Why both exist:**
644
- - `src/` is the source of truth for framework development
645
- - Operational folders (`.claude/`, `devforgeai/`) are populated by the installer
646
- - Operational folders may contain runtime artifacts (backups, generated outputs)
647
- - Installer copies from `src/` → target project's `.claude/` and `devforgeai/`
648
-
649
- **Note:** `devforgeai/` (without dot prefix) is used instead of `devforgeai/` to ensure
650
- compatibility with Claude Code's Glob tool, which skips dot-prefixed directories.
651
-
652
- **Update protocol:**
653
- - Changes made in `src/` (source of truth)
654
- - Installer deploys from `src/` to operational folders
655
- - Operational folders (`.claude/`, `devforgeai/`) are READ-ONLY at runtime
656
-
657
- ---
658
-
659
- ### `.claude/` - Claude Code Configuration (OPERATIONAL - LOCKED)
660
-
661
- **Purpose**: Claude Code Terminal automatically discovers skills, subagents, and commands from this directory.
662
-
663
- **Rules**:
664
- - ✅ ALL skills go in `.claude/skills/[skill-name]/`
665
- - ✅ ALL subagents go in `.claude/agents/[agent-name].md`
666
- - ✅ ALL slash commands go in `.claude/commands/[command-name].md`
667
- - ✅ Contains 19 skills, 31 subagents, 25 commands (as of 2026-02-24)
668
- - ❌ NO executable code in `.claude/` (Markdown documentation only)
669
- - ❌ NO language-specific implementations (framework must be agnostic)
670
-
671
- **Rationale**: Claude Code Terminal's discovery mechanism requires this exact structure.
672
-
673
- ### `.claude/skills/` - Framework Skills (LOCKED)
674
-
675
- **Purpose**: Autonomous, model-invoked capabilities for each development phase.
676
-
677
- **Rules**:
678
- - ✅ Each skill in its own subdirectory (e.g., `implementing-stories/`)
679
- - ✅ Main skill file MUST be named `SKILL.md`
680
- - ✅ SKILL.md MUST have YAML frontmatter with `name:` and `description:`
681
- - ✅ Keep SKILL.md under 1,000 lines (target: 500-800 lines)
682
- - ✅ Deep documentation goes in `references/` subdirectory
683
- - ✅ Templates and assets go in `assets/` subdirectory
684
- - ✅ Phase-specific execution guides go in `phases/` subdirectory (optional)
685
- - ❌ NO skills in root `.claude/` directory
686
- - ❌ NO executable scripts in skill directories (documentation only)
687
-
688
- **Naming Convention**: `[gerund-phrase]` per ADR-017 (e.g., `implementing-stories`, `designing-systems`)
689
-
690
- **Example** (simple skill):
691
- ```
692
- .claude/skills/designing-systems/
693
- ├── SKILL.md # Main skill (500-800 lines)
694
- └── references/ # Loaded on demand
695
- ├── context-file-creation.md
696
- └── adr-creation.md
697
- ```
698
-
699
- **Example** (complex skill with phases):
700
- ```
701
- .claude/skills/implementing-stories/
702
- ├── SKILL.md # Main skill (500-800 lines)
703
- ├── phases/ # Phase-specific execution guides
704
- │ ├── phase-01-preflight.md
705
- │ ├── phase-02-test-first.md
706
- │ └── ... # (10 phases total)
707
- └── references/ # Deep documentation (loaded on demand)
708
- ├── tdd-patterns.md
709
- └── refactoring-patterns.md
710
- ```
711
-
712
- ### `.claude/agents/` - Specialized Subagents (LOCKED)
713
-
714
- **Purpose**: Domain-specific AI workers with separate context windows.
715
-
716
- **Rules**:
717
- - ✅ Each subagent is a single `.md` file
718
- - ✅ File name becomes subagent name (e.g., `test-automator.md` → `test-automator`)
719
- - ✅ MUST have YAML frontmatter with `name:`, `description:`, `tools:`, `model:`
720
- - ✅ Keep under 500 lines (target: 100-300 lines)
721
- - ✅ Single responsibility per subagent
722
- - ✅ `references/` subdirectory ALLOWED for subagents exceeding 500 lines (progressive disclosure per ADR-012)
723
- - ❌ Subagents ≤500 lines MUST remain single `.md` files (no subdirectory required)
724
- - ❌ NO multi-responsibility subagents
725
-
726
- **Progressive Disclosure Pattern (ADR-012):**
727
-
728
- When a subagent exceeds 500 lines, extract reference documentation to enable token efficiency:
729
-
730
- ```
731
- .claude/agents/
732
- ├── test-automator.md # Core subagent (≤300 lines)
733
- └── test-automator/ # Reference subdirectory (same name as .md file)
734
- └── references/
735
- ├── remediation-mode.md # QA integration details
736
- ├── framework-patterns.md # Language-specific patterns
737
- └── common-patterns.md # Mocking, async, exceptions
738
- ```
739
-
740
- **Pattern Requirements:**
741
- - Core `.md` file MUST remain ≤300 lines after extraction
742
- - Subdirectory name MUST match the `.md` filename (without extension)
743
- - Only `references/` subdirectory allowed (no custom names)
744
- - Reference files loaded on-demand via `Read()` instructions in core file
745
-
746
- **Shared Cross-Agent References (ADR-012 Extension):**
747
-
748
- For reference documentation shared across multiple subagents (e.g., tool integration patterns), use a shared `references/` directory:
749
-
750
- ```
751
- .claude/agents/
752
- ├── references/ # Shared cross-agent references
753
- │ └── treelint-search-patterns.md # Used by 7+ subagents
754
- ├── test-automator.md
755
- ├── backend-architect.md
756
- └── ...
757
- ```
758
-
759
- **Shared References Requirements:**
760
- - Use ONLY for documentation consumed by 3+ subagents
761
- - MUST have YAML frontmatter with `name:`, `description:`, `version:`
762
- - Keep under 400 lines per file (token budget)
763
- - Subagents load via `Read(file_path=".claude/agents/references/{file}.md")`
764
-
765
- **Naming Convention**: `[domain]-[role]` (e.g., `test-automator`, `backend-architect`)
766
-
767
- **Current components (33 total):**
768
- ```
769
- .claude/agents/
770
- ├── ac-compliance-verifier.md
771
- ├── agent-generator.md
772
- ├── anti-pattern-scanner.md
773
- ├── api-designer.md
774
- ├── architect-reviewer.md
775
- ├── backend-architect.md
776
- ├── code-analyzer.md
777
- ├── code-quality-auditor.md
778
- ├── code-reviewer.md
779
- ├── context-validator.md
780
- ├── coverage-analyzer.md
781
- ├── dead-code-detector.md
782
- ├── deferral-validator.md
783
- ├── deployment-engineer.md
784
- ├── dev-result-interpreter.md
785
- ├── documentation-writer.md
786
- ├── frontend-developer.md
787
- ├── git-validator.md
788
- ├── integration-tester.md
789
- ├── internet-sleuth.md
790
- ├── pattern-compliance-auditor.md
791
- ├── qa-result-interpreter.md
792
- ├── refactoring-specialist.md
793
- ├── requirements-analyst.md
794
- ├── security-auditor.md
795
- ├── sprint-planner.md
796
- ├── stakeholder-analyst.md
797
- ├── story-requirements-analyst.md
798
- ├── tech-stack-detector.md
799
- ├── technical-debt-analyzer.md
800
- ├── test-automator.md
801
- └── ui-spec-formatter.md
802
- ```
803
-
804
- ### `.claude/commands/` - Slash Commands (LOCKED)
805
-
806
- **Purpose**: User-invoked, parameterized workflows.
807
-
808
- **Rules**:
809
- - ✅ Each command is a single `.md` file
810
- - ✅ File name becomes command name (e.g., `dev.md` → `/dev`)
811
- - ✅ MUST have YAML frontmatter with `description:` and `argument-hint:`
812
- - ✅ Keep under 500 lines (target: 200-400 lines)
813
- - ✅ Use `$ARGUMENTS` placeholder for parameters
814
- - ✅ Can invoke skills and subagents
815
- - ❌ NO subdirectories in `.claude/commands/` (flat structure)
816
- - ❌ NO commands exceeding 500 lines (extract to skills)
817
-
818
- **Naming Convention**: `[action]` or `[action]-[object]` (e.g., `dev`, `create-context`)
819
-
820
- **Current commands (26 total):**
821
- ```
822
- .claude/commands/
823
- ├── audit-alignment.md # /audit-alignment [--layer=all|claudemd|prompt|context|rules|adrs] [--fix] [--output=console|file]
824
- ├── audit-budget.md # /audit-budget
825
- ├── audit-deferrals.md # /audit-deferrals
826
- ├── audit-hooks.md # /audit-hooks [--validate|--performance|--check-circular]
827
- ├── brainstorm.md # /brainstorm [topic] | --resume BRAINSTORM-ID
828
- ├── collaborate.md # /collaborate [issue-description] [--target=AI]
829
- ├── create-agent.md # /create-agent [name] [options]
830
- ├── create-context.md # /create-context [project-name]
831
- ├── create-epic.md # /create-epic [epic-name]
832
- ├── create-sprint.md # /create-sprint [sprint-name]
833
- ├── create-story.md # /create-story [feature-description | epic-id]
834
- ├── create-ui.md # /create-ui [STORY-ID or component-description]
835
- ├── dev.md # /dev [STORY-ID]
836
- ├── document.md # /document [STORY-ID | --type=TYPE | --mode=MODE]
837
- ├── export-feedback.md # /export-feedback [--date-range RANGE] [--sanitize true/false]
838
- ├── feedback-config.md # /feedback-config [view|edit|reset] [field] [value]
839
- ├── feedback-export-data.md # /feedback-export-data [--format] [--date-range] [--story-ids]
840
- ├── feedback-reindex.md # /feedback-reindex
841
- ├── feedback-search.md # /feedback-search [query] [--severity] [--status] [--limit]
842
- ├── feedback.md # /feedback [context]
843
- ├── ideate.md # /ideate [business-idea-description]
844
- ├── import-feedback.md # /import-feedback <archive-path>
845
- ├── orchestrate.md # /orchestrate [STORY-ID]
846
- ├── qa.md # /qa [STORY-ID] [mode]
847
- ├── marketing-plan.md # /marketing-plan [--mode=standalone|project]
848
- ├── rca.md # /rca [issue-description] [severity]
849
- └── release.md # /release [STORY-ID] [environment]
850
- ```
851
-
852
- ---
853
-
854
- ### `.treelint/` Gitignore Pattern Guidance
855
-
856
- **Purpose**: Defines which `.treelint/` artifacts to commit and which to exclude from version control.
857
-
858
- | File Pattern | Recommendation | Rationale |
859
- |--------------|----------------|-----------|
860
- | `index.db` | GITIGNORED | SQLite AST index that is fully regenerable by running Treelint commands. It can grow large proportional to codebase size, causing unnecessary merge conflicts and repository bloat. |
861
- | `daemon.sock` | GITIGNORED | Ephemeral Unix IPC socket created at runtime by the Treelint daemon process. It is machine-specific and cannot meaningfully exist in version control. |
862
- | `config.toml` | OPTIONAL COMMIT | Contains project-specific Treelint settings (language filters, ignore patterns, daemon configuration) that benefit from team-wide consistency when shared via version control. Note: the current `.gitignore` blanket-ignores `.treelint/`, so a negation rule (`!.treelint/config.toml`) is needed to allow tracking this file. |
863
-
864
- ### `devforgeai/` - Framework Context and Project Specs (OPERATIONAL - LOCKED)
865
-
866
- **Purpose**: Framework's architectural constraints and project specifications.
867
-
868
- **Rules**:
869
- - ✅ Project specs go in `devforgeai/specs/` (Stories, Epics, Sprints, context, adrs)
870
- - ✅ Framework's context files go in `devforgeai/specs/context/`
871
- - ✅ QA configuration goes in `devforgeai/qa/`
872
- - ✅ RCA documents go in `devforgeai/RCA/`
873
- - ✅ Protocols go in `devforgeai/protocols/`
874
- - ✅ Feedback data goes in `devforgeai/feedback/`
875
- - ✅ Epic coverage validation data goes in `devforgeai/epic-coverage/` (EPIC-015)
876
- - ❌ NO executable code in `devforgeai/` (documentation only)
877
-
878
- **Why no dot prefix**: Claude Code's Glob tool skips directories starting with `.` (like `devforgeai/`).
879
- Using `devforgeai/` ensures story files can be found by `/qa`, `/dev`, and other commands.
880
-
881
- **Rationale**: Projects using DevForgeAI will have their own `devforgeai/specs/context/` files created by designing-systems skill.
882
-
883
- ---
884
-
885
- ### `src/` - Distribution Source (STORY-048 - LOCKED)
886
-
887
- **Purpose**: Clean, version-controlled source files for installer deployment to external projects.
888
-
889
- **Rules**:
890
- - ✅ Contains ONLY essential framework files (no backups, no generated outputs)
891
- - ✅ `src/claude/` mirrors `.claude/` structure (skills, agents, commands, memory, scripts)
892
- - ✅ `src/devforgeai/` contains distribution templates (config, protocols, specs, templates)
893
- - ✅ `src/scripts/` contains installer and update scripts
894
- - ✅ Version metadata in `version.json` and integrity checks in `checksums.txt`
895
- - ✅ Template `CLAUDE.md` for installer merge with user's existing file
896
- - ❌ NO operational files (backups, test outputs, generated reports)
897
- - ❌ NO .backup files or temporary files
898
- - ❌ NO user-specific configurations
899
-
900
- **Update workflow:**
901
- 1. Make changes in `src/claude/` or `src/devforgeai/` (source of truth)
902
- 2. Run tests against `src/` tree
903
- 3. Update `version.json` with new version number
904
- 4. Regenerate `checksums.txt` for integrity validation
905
- 5. Commit `src/` changes
906
- 6. Installer deploys to operational folders (`.claude/`, `devforgeai/`)
907
-
908
- **Installer behavior:**
909
- - Reads framework files from `src/claude/` and `src/devforgeai/`
910
- - Deploys to target project's `.claude/` and `devforgeai/`
911
- - Merges template `CLAUDE.md` with user's existing file (preserves user instructions)
912
- - Creates timestamped backups before deployment
913
- - Validates checksums for integrity
914
- - Supports rollback to previous version
915
-
916
- **Rationale**: Separates clean distribution source from messy operational workspace, enables versioned external deployment.
917
-
918
- ### `devforgeai/specs/` - Project Specifications (LOCKED)
919
-
920
- **Purpose**: Epics, sprints, stories, context files, ADRs, and research documentation.
921
-
922
- **Rules**:
923
- - ✅ Epics go in `devforgeai/specs/Epics/`
924
- - ✅ Sprints go in `devforgeai/specs/Sprints/`
925
- - ✅ Stories go in `devforgeai/specs/Stories/`
926
- - ✅ Context files go in `devforgeai/specs/context/`
927
- - ✅ ADRs go in `devforgeai/specs/adrs/`
928
- - ✅ Research documentation in `devforgeai/specs/research/`
929
- - ✅ Prompt version snapshots go in `devforgeai/specs/prompt-versions/` (ADR-015)
930
- - ✅ Business planning outputs go in `devforgeai/specs/business/` (EPIC-073, EPIC-074, EPIC-075, EPIC-076, EPIC-077)
931
- - ✅ Stories MUST have YAML frontmatter with id, title, epic, sprint, status, points, priority
932
- - ❌ NO code in `devforgeai/specs/` (documentation only)
933
-
934
- **Story Naming**: `STORY-NNN-[title].story.md` (e.g., `STORY-001-user-authentication.story.md`)
935
- **Epic Naming**: `EPIC-NNN-[title].epic.md` (e.g., `EPIC-001-user-management.epic.md`)
936
- **Sprint Naming**: `Sprint-N.md` (e.g., `Sprint-1.md`)
937
-
938
- ### `docs/` - Framework Documentation (LOCKED)
939
-
940
- **Purpose**: Architecture documentation, ADRs, guides, API specs.
941
-
942
- **Rules**:
943
- - ✅ ADRs go in `docs/architecture/decisions/`
944
- - ✅ Diagrams go in `docs/architecture/diagrams/`
945
- - ✅ User guides go in `docs/guides/`
946
- - ✅ API specifications go in `docs/api/`
947
- - ❌ NO generated documentation (commit only source)
948
- - ❌ NO language-specific docs (framework must be agnostic)
949
-
950
- **ADR Naming**: `ADR-NNN-[decision-title].md` (e.g., `ADR-001-markdown-for-documentation.md`)
951
-
952
- ---
953
-
954
- ## File Naming Conventions
955
-
956
- ### Skills
957
-
958
- **Pattern**: `[gerund-phrase]` (ADR-017)
959
- **Examples**:
960
- - ✅ `implementing-stories`
961
- - ✅ `validating-quality`
962
- - ✅ `creating-stories`
963
- - ✅ `designing-architecture`
964
- - ❌ `IdeationSkill` (no CamelCase)
965
- - ❌ `dev-skill` (not gerund form)
966
- - ❌ `implementing-stories` (legacy — prefix removed, use gerund form)
967
-
968
- ### Subagents
969
-
970
- **Pattern**: `[domain]-[role]`
971
- **Examples**:
972
- - ✅ `test-automator`
973
- - ✅ `backend-architect`
974
- - ✅ `deployment-engineer`
975
- - ❌ `TestAutomator` (no CamelCase)
976
- - ❌ `test_automator` (use hyphens, not underscores)
977
-
978
- ### Slash Commands
979
-
980
- **Pattern**: `[action]` or `[action]-[object]`
981
- **Examples**:
982
- - ✅ `dev`
983
- - ✅ `qa`
984
- - ✅ `create-context`
985
- - ✅ `create-story`
986
- - ❌ `DevCommand` (no CamelCase)
987
- - ❌ `create_context` (use hyphens, not underscores)
988
-
989
- ### Context Files
990
-
991
- **Pattern**: `[purpose].md` (all lowercase, hyphens)
992
- **Required Files**:
993
- - `tech-stack.md`
994
- - `source-tree.md`
995
- - `dependencies.md`
996
- - `coding-standards.md`
997
- - `architecture-constraints.md`
998
- - `anti-patterns.md`
999
-
1000
- **Examples**:
1001
- - ✅ `tech-stack.md`
1002
- - ✅ `anti-patterns.md`
1003
- - ❌ `TechStack.md` (no CamelCase)
1004
- - ❌ `tech_stack.md` (use hyphens, not underscores)
1005
-
1006
- ### Documentation Files
1007
-
1008
- **Pattern**: `[topic].md` or `[topic]-[subtopic].md`
1009
- **Examples**:
1010
- - ✅ `README.md`
1011
- - ✅ `ROADMAP.md`
1012
- - ✅ `tdd-workflow-guide.md`
1013
- - ✅ `complexity-assessment-matrix.md`
1014
- - ❌ `readme.md` (use UPPERCASE for root docs)
1015
- - ❌ `TDDWorkflowGuide.md` (no CamelCase for reference docs)
1016
-
1017
- ---
1018
-
1019
- ## Forbidden Patterns
1020
-
1021
- ### ❌ FORBIDDEN: Monolithic Skills
1022
-
1023
- **Wrong**:
1024
- ```
1025
- .claude/skills/
1026
- └── devforgeai-all-in-one/
1027
- └── SKILL.md # 5,000 lines doing everything
1028
- ```
1029
-
1030
- **Correct**:
1031
- ```
1032
- .claude/skills/
1033
- ├── discovering-requirements/
1034
- ├── designing-systems/
1035
- ├── implementing-stories/
1036
- ├── devforgeai-qa/
1037
- └── devforgeai-release/
1038
- ```
1039
-
1040
- **Rationale**: Modularity enables independent updates and token efficiency.
1041
-
1042
- ### ❌ FORBIDDEN: Executable Code in Framework
1043
-
1044
- **Wrong**:
1045
- ```
1046
- .claude/skills/implementing-stories/
1047
- ├── SKILL.md
1048
- └── scripts/
1049
- └── implement.py # Python implementation code
1050
- ```
1051
-
1052
- **Correct**:
1053
- ```
1054
- .claude/skills/implementing-stories/
1055
- ├── SKILL.md
1056
- └── references/
1057
- └── tdd-workflow-guide.md # Documentation only
1058
- ```
1059
-
1060
- **Rationale**: Framework must be language-agnostic. Skills provide instructions, not code.
1061
-
1062
- ### ❌ FORBIDDEN: Flat Command Structure
1063
-
1064
- **Wrong**:
1065
- ```
1066
- .claude/commands/
1067
- ├── dev-backend.md
1068
- ├── dev-frontend.md
1069
- ├── dev-database.md
1070
- └── dev-tests.md
1071
- ```
1072
-
1073
- **Correct**:
1074
- ```
1075
- .claude/commands/
1076
- └── dev.md # Single command that handles all development
1077
- ```
1078
-
1079
- **Rationale**: Commands should orchestrate subagents for specialization, not duplicate command for each domain.
1080
-
1081
- ### ❌ FORBIDDEN: Context Files Outside `devforgeai/specs/context/`
1082
-
1083
- **Wrong**:
1084
- ```
1085
- .claude/
1086
- ├── tech-stack.md # ❌ Wrong location
1087
- └── skills/
1088
- ```
1089
-
1090
- **Correct**:
1091
- ```
1092
- devforgeai/specs/context/
1093
- ├── tech-stack.md # ✅ Correct location
1094
- ```
1095
-
1096
- **Rationale**: Consistent location for AI agents to discover constraints.
1097
-
1098
- ---
1099
-
1100
- ## Progressive Disclosure Pattern
1101
-
1102
- **Principle**: Keep main files concise, deep details in references.
1103
-
1104
- **Example**:
1105
- ```
1106
- .claude/skills/discovering-requirements/
1107
- ├── SKILL.md (500 lines)
1108
- │ # Phase 1: Discovery
1109
- │ # Phase 2: Requirements Elicitation
1110
- │ # For detailed questions by domain, see references/requirements-elicitation-guide.md
1111
- │ # Phase 3: Complexity Assessment
1112
- │ # For scoring rubric, see references/complexity-assessment-matrix.md
1113
-
1114
- └── references/
1115
- ├── requirements-elicitation-guide.md (1,000 lines)
1116
- ├── complexity-assessment-matrix.md (800 lines)
1117
- ├── domain-specific-patterns.md (1,200 lines)
1118
- └── feasibility-analysis-framework.md (600 lines)
1119
- ```
1120
-
1121
- **Benefit**: SKILL.md loads immediately (~20K tokens), references load only when needed (saving 60-80% tokens).
1122
-
1123
- ---
1124
-
1125
- ## Project Context Pattern (For Projects Using DevForgeAI)
1126
-
1127
- When designing-systems skill creates context for a **project** using DevForgeAI:
1128
-
1129
- ```
1130
- my-project/
1131
- ├── devforgeai/
1132
- │ └── specs/
1133
- │ ├── context/
1134
- │ │ ├── tech-stack.md # Project's tech choices (e.g., C#, React, PostgreSQL)
1135
- │ │ ├── source-tree.md # Project's structure (e.g., Clean Architecture)
1136
- │ │ ├── dependencies.md # Project's packages (e.g., Dapper 2.1.28)
1137
- │ │ ├── coding-standards.md # Project's patterns (e.g., async/await rules)
1138
- │ │ ├── architecture-constraints.md # Project's layer rules
1139
- │ │ └── anti-patterns.md # Project's forbidden patterns
1140
- │ ├── Stories/ # Project's user stories
1141
- │ ├── Epics/ # Project's epics
1142
- │ └── Sprints/ # Project's sprints
1143
- ```
1144
-
1145
- **Distinction**:
1146
- - **DevForgeAI's `devforgeai/specs/context/`**: Framework's own constraints (meta-level)
1147
- - **Project's `devforgeai/specs/context/`**: Project-specific constraints (implementation-level)
1148
-
1149
- ---
1150
-
1151
- ## Enforcement Checklist
1152
-
1153
- Before committing framework changes:
1154
- - [ ] Skills are in `.claude/skills/[skill-name]/` with SKILL.md
1155
- - [ ] Subagents are in `.claude/agents/[agent-name].md`
1156
- - [ ] Commands are in `.claude/commands/[command-name].md`
1157
- - [ ] Context files are in `devforgeai/specs/context/`
1158
- - [ ] ADRs are in `devforgeai/specs/adrs/`
1159
- - [ ] Stories are in `devforgeai/specs/Stories/`
1160
- - [ ] NO executable code in `.claude/` or `devforgeai/`
1161
- - [ ] ALL components use Markdown format (not JSON/YAML)
1162
- - [ ] File naming follows conventions (lowercase, hyphens)
1163
- - [ ] Main files under size limits (skills <1000 lines, commands <500 lines)
1164
- - [ ] Reference documentation uses progressive disclosure
1165
-
1166
- ---
1167
-
1168
- ## Class Names Registry
1169
-
1170
- **Purpose:** Track public class names across modules to prevent naming collisions.
1171
-
1172
- **Collision Resolution:** When two modules define the same class name, use fully qualified imports:
1173
- ```python
1174
- # Option 1: Namespace imports
1175
- from installer import registry_config
1176
- from installer import registry_publisher
1177
- config = registry_config.RegistryConfig(...)
1178
- pub_config = registry_publisher.RegistryConfig(...)
1179
-
1180
- # Option 2: Aliased imports
1181
- from installer.registry_config import RegistryConfig as ConfigSettings
1182
- from installer.registry_publisher import RegistryConfig as PublisherConfig
1183
- ```
1184
-
1185
- ### installer/ Module Classes
1186
-
1187
- | Class Name | Module | Story | Description |
1188
- |------------|--------|-------|-------------|
1189
- | RegistryConfig | registry_config.py | STORY-245 | Container for all registry configurations |
1190
- | RegistryConfig | registry_publisher.py | STORY-244 | Configuration for package registry publishing |
1191
- | RegistrySettings | registry_config.py | STORY-245 | Per-registry configuration settings |
1192
- | CredentialConfig | registry_config.py | STORY-245 | Credential environment variable mapping |
1193
- | ConfigValidationResult | registry_config.py | STORY-245 | Validation result container |
1194
- | ConfigError | registry_config.py | STORY-245 | Validation error with field/message/line |
1195
- | ConfigWarning | registry_config.py | STORY-245 | Validation warning (non-blocking) |
1196
- | RegistryResult | registry_publisher.py | STORY-244 | Result of registry publish operation |
1197
- | PublishResult | registry_publisher.py | STORY-244 | Result of publish_all operation |
1198
- | RegistryPublisher | registry_publisher.py | STORY-244 | Publishes packages to registries |
1199
- | InstallerModeConfig | installer_mode_config.py | STORY-243 | Installer mode configuration |
1200
- | CredentialMasker | credential_masker.py | STORY-244 | Masks credentials in output |
1201
-
1202
- **Known Collisions:**
1203
- - `RegistryConfig`: Exists in both `registry_config.py` (STORY-245) and `registry_publisher.py` (STORY-244)
1204
- - Resolution: Use fully qualified imports when both modules needed
1205
-
1206
- ---
1207
-
1208
- ## References
1209
-
1210
- - [CLAUDE.md](src/CLAUDE.md) - Project instructions for Claude Code
1211
- - [README.md](README.md) - Framework overview
1212
- - [tech-stack.md](tech-stack.md) - Technology constraints
1213
- - [Claude Code Skills Documentation](https://docs.claude.com/en/docs/claude-code/agent-skills)
1214
-
1215
- ---
1216
-
1217
- **REMEMBER**: This source-tree.md defines the **framework's own structure**. Projects using DevForgeAI will have their own source-tree.md files created by the designing-systems skill based on project architecture patterns.