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.
- package/docs/CNAME +1 -0
- package/docs/NPM-Publish.md +341 -0
- package/docs/api/API.md +1054 -0
- package/docs/architecture/ARCHITECTURE.md +724 -0
- package/docs/guides/DEVELOPER-GUIDE.md +398 -0
- package/docs/guides/ROADMAP.md +48 -0
- package/docs/guides/TROUBLESHOOTING.md +631 -0
- package/docs/index.html +2045 -0
- package/package.json +2 -2
- package/src/cli/lib/components.js +5 -9
- package/devforgeai/specs/context/.gitkeep +0 -0
- package/devforgeai/specs/context/anti-patterns.md +0 -285
- package/devforgeai/specs/context/architecture-constraints.md +0 -323
- package/devforgeai/specs/context/coding-standards.md +0 -472
- package/devforgeai/specs/context/dependencies.md +0 -208
- package/devforgeai/specs/context/source-tree.md +0 -1217
- package/devforgeai/specs/context/tech-stack.md +0 -560
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
# Coding Standards - DevForgeAI Framework
|
|
2
|
-
|
|
3
|
-
**Status**: LOCKED
|
|
4
|
-
**Last Updated**: 2026-01-19
|
|
5
|
-
**Version**: 1.2 (Added: Phase 04.5 and Phase 05.5 for AC Compliance Verification - EPIC-046)
|
|
6
|
-
|
|
7
|
-
## Framework Coding Standards
|
|
8
|
-
|
|
9
|
-
### Markdown Documentation Style
|
|
10
|
-
|
|
11
|
-
**All framework components use Markdown with specific patterns**:
|
|
12
|
-
|
|
13
|
-
✅ **CORRECT Style**:
|
|
14
|
-
```markdown
|
|
15
|
-
## Phase 1: Context Validation
|
|
16
|
-
|
|
17
|
-
Read context files in PARALLEL:
|
|
18
|
-
- Read(file_path="devforgeai/context/tech-stack.md")
|
|
19
|
-
- Read(file_path="devforgeai/context/source-tree.md")
|
|
20
|
-
|
|
21
|
-
HALT if ANY file missing: "Context files incomplete"
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
❌ **FORBIDDEN Style**:
|
|
25
|
-
```markdown
|
|
26
|
-
## Phase 1: Context Validation
|
|
27
|
-
|
|
28
|
-
The system should read context files. First it validates...
|
|
29
|
-
[Narrative prose instead of direct instructions]
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Rationale**: Claude interprets direct instructions better than prose.
|
|
33
|
-
|
|
34
|
-
### Tool Usage Standards
|
|
35
|
-
|
|
36
|
-
**LOCKED: Use Native Tools Over Bash**
|
|
37
|
-
|
|
38
|
-
✅ **CORRECT**:
|
|
39
|
-
```markdown
|
|
40
|
-
Read(file_path="story.md")
|
|
41
|
-
Edit(file_path="config.md", old_string="v1.0", new_string="v1.1")
|
|
42
|
-
Glob(pattern="**/*.md")
|
|
43
|
-
Grep(pattern="LOCKED", glob="**/*.md")
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
❌ **FORBIDDEN**:
|
|
47
|
-
```markdown
|
|
48
|
-
Bash(command="cat story.md")
|
|
49
|
-
Bash(command="sed -i 's/v1.0/v1.1/' config.md")
|
|
50
|
-
Bash(command="find . -name '*.md'")
|
|
51
|
-
Bash(command="grep 'LOCKED' **/*.md")
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**Exception**: Bash required for tests, builds, git, package managers.
|
|
55
|
-
|
|
56
|
-
### Skill Naming Convention (ADR-017)
|
|
57
|
-
|
|
58
|
-
**Skills use gerund naming (verb + -ing) without framework prefix**:
|
|
59
|
-
- ✅ `designing-systems` (gerund form, no prefix)
|
|
60
|
-
- ✅ `implementing-stories` (gerund form, no prefix)
|
|
61
|
-
- ❌ `devforgeai-[name]` (old convention: framework prefix, non-gerund)
|
|
62
|
-
|
|
63
|
-
### YAML Frontmatter Standards
|
|
64
|
-
|
|
65
|
-
**All skills, subagents, commands MUST have frontmatter**:
|
|
66
|
-
|
|
67
|
-
```yaml
|
|
68
|
-
---
|
|
69
|
-
name: skill-name
|
|
70
|
-
description: Brief description of when to use this
|
|
71
|
-
tools: Read, Write, Edit, Bash # Optional, comma-separated
|
|
72
|
-
model: inherit # Optional: sonnet, haiku, opus, inherit
|
|
73
|
-
---
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Progressive Disclosure Pattern
|
|
77
|
-
|
|
78
|
-
✅ **CORRECT**:
|
|
79
|
-
```markdown
|
|
80
|
-
# SKILL.md (main file - concise)
|
|
81
|
-
## Phase 3: Complexity Assessment
|
|
82
|
-
Score complexity on 0-60 scale.
|
|
83
|
-
For detailed scoring rubric, see references/complexity-assessment-matrix.md
|
|
84
|
-
|
|
85
|
-
# references/complexity-assessment-matrix.md (deep details)
|
|
86
|
-
[1000 lines of detailed scoring criteria]
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
❌ **FORBIDDEN**:
|
|
90
|
-
```markdown
|
|
91
|
-
# SKILL.md (monolithic - verbose)
|
|
92
|
-
## Phase 3: Complexity Assessment
|
|
93
|
-
[1000 lines of detailed scoring criteria inline]
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### AskUserQuestion Pattern
|
|
97
|
-
|
|
98
|
-
**LOCKED: Use for ALL ambiguities**:
|
|
99
|
-
|
|
100
|
-
```markdown
|
|
101
|
-
Question: "Which [technology/pattern/approach] should be used?"
|
|
102
|
-
Header: "[Category]"
|
|
103
|
-
Description: "This decision will be locked in [context-file]"
|
|
104
|
-
Options:
|
|
105
|
-
- "[Option 1] (recommended for [reason])"
|
|
106
|
-
- "[Option 2] (better for [use-case])"
|
|
107
|
-
- "[Option 3] ([tradeoff])"
|
|
108
|
-
multiSelect: false
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### File Size Standards
|
|
112
|
-
|
|
113
|
-
**LOCKED Component Size Limits**:
|
|
114
|
-
- Skills: Target 500-800 lines, Max 1,000 lines
|
|
115
|
-
- Commands: Target 200-400 lines, Max 500 lines
|
|
116
|
-
- Subagents: Target 100-300 lines, Max 500 lines
|
|
117
|
-
- Context Files: Target 200-400 lines, Max 600 lines
|
|
118
|
-
|
|
119
|
-
**Enforcement**: Extract to references/ when exceeding target.
|
|
120
|
-
|
|
121
|
-
### Naming Conventions
|
|
122
|
-
|
|
123
|
-
**Files**: lowercase-with-hyphens.md
|
|
124
|
-
**Skills**: [gerund-phrase] (e.g., `implementing-stories`, `validating-quality`) — see ADR-017
|
|
125
|
-
**Subagents**: [domain]-[role]
|
|
126
|
-
**Commands**: [action] or [action]-[object]
|
|
127
|
-
|
|
128
|
-
### Documentation Structure Pattern
|
|
129
|
-
|
|
130
|
-
**Standard Section Order**:
|
|
131
|
-
1. YAML frontmatter
|
|
132
|
-
2. Purpose statement
|
|
133
|
-
3. When to Use
|
|
134
|
-
4. Workflow/Process (numbered phases)
|
|
135
|
-
5. Reference files
|
|
136
|
-
6. Success criteria
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Story Type Classification
|
|
141
|
-
|
|
142
|
-
Story types (`feature`, `documentation`, `bugfix`, `refactor`) define TDD phase skipping behavior.
|
|
143
|
-
|
|
144
|
-
**See:** `.claude/skills/devforgeai-story-creation/references/story-type-classification.md`
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Phase Naming Convention (STORY-126)
|
|
149
|
-
|
|
150
|
-
All development workflow phases use standardized naming:
|
|
151
|
-
|
|
152
|
-
### Phase Numbering
|
|
153
|
-
|
|
154
|
-
| Phase | Name | Reference File |
|
|
155
|
-
|-------|------|----------------|
|
|
156
|
-
| Phase 01 | Pre-Flight Validation | `preflight-validation.md` |
|
|
157
|
-
| Phase 02 | Test-First Design | `tdd-red-phase.md` |
|
|
158
|
-
| Phase 03 | Implementation | `tdd-green-phase.md` |
|
|
159
|
-
| Phase 04 | Refactoring | `tdd-refactor-phase.md` |
|
|
160
|
-
| Phase 04.5 | AC Compliance Verification (Post-Refactor) | `ac-verification-workflow.md` |
|
|
161
|
-
| Phase 05 | Integration & Validation | `integration-testing.md` |
|
|
162
|
-
| Phase 05.5 | AC Compliance Verification (Post-Integration) | `ac-verification-workflow.md` |
|
|
163
|
-
| Phase 06 | Deferral Challenge | `phase-06-deferral-challenge.md` |
|
|
164
|
-
| Phase 07 | DoD Update | `dod-update-workflow.md` |
|
|
165
|
-
| Phase 08 | Git Workflow | `git-workflow-conventions.md` |
|
|
166
|
-
| Phase 09 | Feedback Hook | (inline in SKILL.md) |
|
|
167
|
-
| Phase 10 | Result Interpretation | (inline in SKILL.md) |
|
|
168
|
-
|
|
169
|
-
### Sub-Step Naming (Phase 01 Only)
|
|
170
|
-
|
|
171
|
-
Phase 01 has granular sub-steps: `Phase 01.X` or `Phase 01.X.Y`
|
|
172
|
-
|
|
173
|
-
Examples:
|
|
174
|
-
- `Phase 01.0` - Project root validation
|
|
175
|
-
- `Phase 01.1` - Git repository validation
|
|
176
|
-
- `Phase 01.1.5` - User consent (conditional)
|
|
177
|
-
- `Phase 01.6.5` - Story type detection
|
|
178
|
-
|
|
179
|
-
### Documentation Standards
|
|
180
|
-
|
|
181
|
-
- **Headings:** Use `Phase NN: Full Name` format (no color suffixes)
|
|
182
|
-
- **References:** Use `Phase 01.X` in prose (not "Step 0.X")
|
|
183
|
-
- **TDD Patterns:** RED/GREEN/REFACTOR appear in body text, not headings
|
|
184
|
-
|
|
185
|
-
**See:** `.claude/skills/implementing-stories/` for workflow implementation
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Markdown Command Testing Pattern
|
|
190
|
-
|
|
191
|
-
For `.claude/commands/*.md` specification files, test via three levels:
|
|
192
|
-
|
|
193
|
-
### Structural Tests
|
|
194
|
-
|
|
195
|
-
Verify required sections exist using Grep for section headers:
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
# Verify required section exists in command file
|
|
199
|
-
grep -qE "^## Required Section" target_file.md
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Pattern Tests
|
|
203
|
-
|
|
204
|
-
Verify code blocks contain expected tool references:
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
# Validate tool patterns appear in code examples
|
|
208
|
-
grep -qE "Read\(|Edit\(|Grep\(" target_file.md
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Integration Tests
|
|
212
|
-
|
|
213
|
-
Invoke command and verify output matches expected behavior:
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Execute command and validate output
|
|
217
|
-
output=$(invoke_command)
|
|
218
|
-
if [[ "$output" == *"expected_pattern"* ]]; then
|
|
219
|
-
echo "PASS: Output validation"
|
|
220
|
-
fi
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Coverage Calculation
|
|
224
|
-
|
|
225
|
-
Coverage = (found patterns / required patterns) × 100%
|
|
226
|
-
|
|
227
|
-
Where patterns are the assertions documented in acceptance criteria.
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## Documentation Cross-Reference Format (LOCKED)
|
|
232
|
-
|
|
233
|
-
When referencing other documentation files, use this standardized format for consistency and navigation.
|
|
234
|
-
|
|
235
|
-
### Standard Format
|
|
236
|
-
|
|
237
|
-
```
|
|
238
|
-
For full details, see: [filename.md](filename.md) (Section Name)
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### Required Elements
|
|
242
|
-
|
|
243
|
-
| Element | Description | Example |
|
|
244
|
-
|---------|-------------|---------|
|
|
245
|
-
| Introductory phrase | Always use "For full details, see:" | `For full details, see:` |
|
|
246
|
-
| Markdown link | Standard `[text](url)` format | `[complexity-assessment-matrix.md](complexity-assessment-matrix.md)` |
|
|
247
|
-
| Context hint | Actual section header in parentheses | `(Scoring Rubric)` |
|
|
248
|
-
|
|
249
|
-
### Examples
|
|
250
|
-
|
|
251
|
-
✅ **CORRECT**:
|
|
252
|
-
```markdown
|
|
253
|
-
For full details, see: [story-type-classification.md](story-type-classification.md) (Type Definitions)
|
|
254
|
-
|
|
255
|
-
For full details, see: [preflight-validation.md](preflight-validation.md) (Phase 01.0 Validation)
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
❌ **DEPRECATED** (do not use):
|
|
259
|
-
```markdown
|
|
260
|
-
See: story-type-classification.md, lines 45-60
|
|
261
|
-
Reference: story-type-classification.md#type-definitions
|
|
262
|
-
Details in story-type-classification.md (lines 45-60)
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### Context Hint Requirements
|
|
266
|
-
|
|
267
|
-
- Use actual section header text, not line numbers
|
|
268
|
-
- Match the heading exactly as it appears in the target file
|
|
269
|
-
- If no specific section, omit the context hint entirely
|
|
270
|
-
|
|
271
|
-
**Rationale**: Section headers are stable identifiers; line numbers change with edits.
|
|
272
|
-
|
|
273
|
-
---
|
|
274
|
-
|
|
275
|
-
## WSL Test Execution
|
|
276
|
-
|
|
277
|
-
### Path Handling
|
|
278
|
-
|
|
279
|
-
**Use `/mnt/c/` paths in WSL, not `C:\`**
|
|
280
|
-
|
|
281
|
-
When running tests on Windows Subsystem for Linux (WSL), always reference files using Unix-style paths with the `/mnt/c/` prefix. pytest discovers tests from Unix-style paths, and coverage reports use Unix paths.
|
|
282
|
-
|
|
283
|
-
✅ **Correct**:
|
|
284
|
-
```
|
|
285
|
-
/mnt/c/Projects/DevForgeAI2/tests/
|
|
286
|
-
/mnt/c/Projects/DevForgeAI2/src/
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
❌ **Incorrect**:
|
|
290
|
-
```
|
|
291
|
-
C:\Projects\DevForgeAI2\tests\
|
|
292
|
-
C:\Projects\DevForgeAI2\src\
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
**Rationale**: WSL mount points may not preserve file metadata or execute permissions when using Windows-style paths. Unix paths work consistently across WSL and native Linux.
|
|
296
|
-
|
|
297
|
-
---
|
|
298
|
-
|
|
299
|
-
### Environment Setup
|
|
300
|
-
|
|
301
|
-
**Set Python path and navigate to project root**
|
|
302
|
-
|
|
303
|
-
Before running tests, configure your WSL environment with these commands:
|
|
304
|
-
|
|
305
|
-
```bash
|
|
306
|
-
cd /mnt/c/Projects/DevForgeAI2
|
|
307
|
-
export PYTHONPATH=".:$PYTHONPATH"
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
**Why**: `PYTHONPATH` tells Python where to find module imports. This export adds the current directory (`.`) to the search path, allowing pytest to discover project modules. Without this, you'll get "ModuleNotFoundError" when running tests.
|
|
311
|
-
|
|
312
|
-
For full details, see: [INSTALL.md](../../../installer/INSTALL.md) (PYTHONPATH Configuration)
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
### Common Issues and Fixes
|
|
317
|
-
|
|
318
|
-
| Issue | Cause | Fix |
|
|
319
|
-
|-------|-------|-----|
|
|
320
|
-
| Module not found | PYTHONPATH not set | `export PYTHONPATH=".:$PYTHONPATH"` |
|
|
321
|
-
| Permission denied on .sh | Windows file locks | Close file in other programs, or `chmod +x script.sh` |
|
|
322
|
-
| Line ending errors (`$'\r': command not found`) | CRLF in shell scripts | `dos2unix script.sh` or `sed -i 's/\r$//' script.sh` |
|
|
323
|
-
| Slow file operations | Windows filesystem overhead | Run tests from WSL native filesystem if possible |
|
|
324
|
-
| pytest not found | Virtual env not activated | `source venv/bin/activate` or `pip install pytest` |
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
### Test Commands
|
|
329
|
-
|
|
330
|
-
**Run pytest with these commands**:
|
|
331
|
-
|
|
332
|
-
```bash
|
|
333
|
-
pytest tests/ -v # Run all tests
|
|
334
|
-
|
|
335
|
-
pytest tests/test_validators.py -v # Run specific test file
|
|
336
|
-
|
|
337
|
-
pytest tests/ --cov=src --cov-report=term-missing # Run with coverage report
|
|
338
|
-
|
|
339
|
-
pytest tests/test_validators.py::test_dod_validation -v # Run single test
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
---
|
|
343
|
-
|
|
344
|
-
### Shell Script Testing
|
|
345
|
-
|
|
346
|
-
**Always run shell scripts with `bash`, not direct execution**
|
|
347
|
-
|
|
348
|
-
When executing shell scripts on WSL, use explicit `bash` invocation instead of direct execution.
|
|
349
|
-
|
|
350
|
-
✅ **Correct**:
|
|
351
|
-
```bash
|
|
352
|
-
bash path/to/test.sh
|
|
353
|
-
bash tests/run_story_tests.sh
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
❌ **Incorrect**:
|
|
357
|
-
```bash
|
|
358
|
-
./path/to/test.sh
|
|
359
|
-
./tests/run_story_tests.sh
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
**Why**: WSL mount points (especially when accessing Windows filesystem) may not preserve execute permissions correctly. Explicit `bash` invocation bypasses permission issues.
|
|
363
|
-
|
|
364
|
-
**Fix line endings first**: Before running, ensure scripts have Unix line endings:
|
|
365
|
-
```bash
|
|
366
|
-
dos2unix path/to/test.sh && bash path/to/test.sh
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## XML Acceptance Criteria Schema
|
|
372
|
-
|
|
373
|
-
**Purpose:** Define XML schema for machine-readable acceptance criteria in story files.
|
|
374
|
-
|
|
375
|
-
**Reference:** STORY-279, EPIC-046 AC Compliance Verification System
|
|
376
|
-
|
|
377
|
-
### Root Element
|
|
378
|
-
|
|
379
|
-
```xml
|
|
380
|
-
<acceptance_criteria id="ACN" implements="COMP-XXX,COMP-YYY">
|
|
381
|
-
<!-- Child elements -->
|
|
382
|
-
</acceptance_criteria>
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
**Root Element: `<acceptance_criteria>`**
|
|
386
|
-
|
|
387
|
-
| Attribute | Required | Format | Description |
|
|
388
|
-
|-----------|----------|--------|-------------|
|
|
389
|
-
| `id` attribute | **Required** | `AC1`, `AC2`, `AC3`, etc. | Unique identifier matching pattern `^AC\d+$` |
|
|
390
|
-
| `implements` attribute | **Optional** | Comma-separated `COMP-XXX` | Links to technical specification components |
|
|
391
|
-
|
|
392
|
-
### Mandatory Child Elements
|
|
393
|
-
|
|
394
|
-
The following child elements are **required** inside `<acceptance_criteria>`:
|
|
395
|
-
|
|
396
|
-
| Element | Required | Description |
|
|
397
|
-
|---------|----------|-------------|
|
|
398
|
-
| `<given>` | **Mandatory** | Initial context or precondition |
|
|
399
|
-
| `<when>` | **Mandatory** | Action or event being tested |
|
|
400
|
-
| `<then>` | **Mandatory** | Expected outcome or result |
|
|
401
|
-
|
|
402
|
-
### Optional Verification Element
|
|
403
|
-
|
|
404
|
-
The `<verification>` element is **optional** and provides hints for automated verification:
|
|
405
|
-
|
|
406
|
-
```xml
|
|
407
|
-
<verification>
|
|
408
|
-
<source_files>
|
|
409
|
-
<file>path/to/source.py</file>
|
|
410
|
-
</source_files>
|
|
411
|
-
<test_file>path/to/test.py</test_file>
|
|
412
|
-
<coverage_threshold>95</coverage_threshold>
|
|
413
|
-
</verification>
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
| Element | Parent | Description |
|
|
417
|
-
|---------|--------|-------------|
|
|
418
|
-
| `<verification>` | `<acceptance_criteria>` | Optional container for verification hints |
|
|
419
|
-
| `<source_files>` | `<verification>` | Contains `<file>` elements listing source files |
|
|
420
|
-
| `<test_file>` | `<verification>` | Expected test file path |
|
|
421
|
-
| `<coverage_threshold>` | `<verification>` | Coverage percentage target (0-100) |
|
|
422
|
-
|
|
423
|
-
### Examples
|
|
424
|
-
|
|
425
|
-
**Example 1: Minimal AC (Required Elements Only)**
|
|
426
|
-
|
|
427
|
-
```xml
|
|
428
|
-
<acceptance_criteria id="AC1">
|
|
429
|
-
<given>User is on the login page</given>
|
|
430
|
-
<when>User enters valid credentials and clicks submit</when>
|
|
431
|
-
<then>User is redirected to dashboard</then>
|
|
432
|
-
</acceptance_criteria>
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
**Example 2: AC with Implements Attribute**
|
|
436
|
-
|
|
437
|
-
```xml
|
|
438
|
-
<acceptance_criteria id="AC2" implements="COMP-001,COMP-002">
|
|
439
|
-
<given>API endpoint /users exists</given>
|
|
440
|
-
<when>GET request is sent with valid auth token</when>
|
|
441
|
-
<then>Response returns 200 with user list</then>
|
|
442
|
-
</acceptance_criteria>
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
**Example 3: Complete AC with Verification Block**
|
|
446
|
-
|
|
447
|
-
```xml
|
|
448
|
-
<acceptance_criteria id="AC3" implements="COMP-003">
|
|
449
|
-
<given>Shopping cart has items</given>
|
|
450
|
-
<when>User clicks checkout button</when>
|
|
451
|
-
<then>Order is created with correct total</then>
|
|
452
|
-
<verification>
|
|
453
|
-
<source_files>
|
|
454
|
-
<file>src/cart/checkout.py</file>
|
|
455
|
-
<file>src/orders/service.py</file>
|
|
456
|
-
</source_files>
|
|
457
|
-
<test_file>tests/STORY-XXX/test_ac3_checkout.py</test_file>
|
|
458
|
-
<coverage_threshold>95</coverage_threshold>
|
|
459
|
-
</verification>
|
|
460
|
-
</acceptance_criteria>
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
### Validation Rules
|
|
464
|
-
|
|
465
|
-
1. **ID Format**: Must match regex `^AC\d+$` (e.g., AC1, AC2, AC10)
|
|
466
|
-
2. **Mandatory Children**: Reject AC blocks missing `<given>`, `<when>`, or `<then>`
|
|
467
|
-
3. **Implements Format**: If present, must be comma-separated COMP-XXX identifiers
|
|
468
|
-
4. **Coverage Threshold**: If present, must be integer 0-100
|
|
469
|
-
|
|
470
|
-
---
|
|
471
|
-
|
|
472
|
-
> **Note**: Projects using DevForgeAI will have their own coding-standards.md with language-specific patterns (CSharp, Python, JavaScript, etc.).
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
# Dependencies - DevForgeAI Framework
|
|
2
|
-
|
|
3
|
-
**Status**: LOCKED
|
|
4
|
-
**Last Updated**: 2026-02-02
|
|
5
|
-
**Version**: 1.1
|
|
6
|
-
|
|
7
|
-
## Framework Dependencies
|
|
8
|
-
|
|
9
|
-
### Core Platform Dependency
|
|
10
|
-
|
|
11
|
-
**Claude Code Terminal 1.0+**
|
|
12
|
-
- **LOCKED**: Framework requires Claude Code Terminal
|
|
13
|
-
- **Version**: 1.0 or higher
|
|
14
|
-
- **Rationale**: Framework built on Claude Code's Skills, Subagents, and Slash Commands
|
|
15
|
-
|
|
16
|
-
### No External Package Dependencies
|
|
17
|
-
|
|
18
|
-
**CRITICAL**: DevForgeAI framework itself has ZERO external package dependencies.
|
|
19
|
-
|
|
20
|
-
**Rationale**:
|
|
21
|
-
- Framework is documentation-based (Markdown files)
|
|
22
|
-
- No code to execute = No packages to install
|
|
23
|
-
- Projects using DevForgeAI specify their own dependencies
|
|
24
|
-
|
|
25
|
-
### Project Dependency Pattern
|
|
26
|
-
|
|
27
|
-
When designing-systems skill creates dependencies.md for projects:
|
|
28
|
-
|
|
29
|
-
**Process**:
|
|
30
|
-
1. Use AskUserQuestion for each technology layer
|
|
31
|
-
2. Lock approved packages with versions
|
|
32
|
-
3. Document "FORBIDDEN" alternatives
|
|
33
|
-
4. Add dependency addition protocol
|
|
34
|
-
|
|
35
|
-
**Example Project dependencies.md**:
|
|
36
|
-
```markdown
|
|
37
|
-
# Backend Data Access
|
|
38
|
-
- Dapper 2.1.28 (LOCKED - NOT Entity Framework)
|
|
39
|
-
- FluentMigrator 3.3.2 (LOCKED)
|
|
40
|
-
|
|
41
|
-
# Frontend State Management
|
|
42
|
-
- Zustand 4.4.1 (LOCKED - NOT Redux/MobX)
|
|
43
|
-
|
|
44
|
-
# Testing
|
|
45
|
-
- xUnit 2.5.0 (LOCKED - NOT NUnit/MSTest)
|
|
46
|
-
- NSubstitute 5.1.0 (LOCKED - NOT Moq)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Dependency Addition Protocol
|
|
50
|
-
|
|
51
|
-
**Framework Constraint**: When ANY framework component needs external functionality:
|
|
52
|
-
|
|
53
|
-
1. **Check**: Is it core Claude Code functionality? (Yes → Use it, No → Continue)
|
|
54
|
-
2. **Evaluate**: Can it be done with Markdown documentation? (Yes → Document it, No → Continue)
|
|
55
|
-
3. **Question**: Use AskUserQuestion to get user approval
|
|
56
|
-
4. **Document**: Add to this file with rationale
|
|
57
|
-
5. **ADR**: Create Architecture Decision Record
|
|
58
|
-
|
|
59
|
-
## Prohibited Dependencies (Core Framework)
|
|
60
|
-
|
|
61
|
-
❌ **NO npm packages** for core framework (skills, subagents, commands)
|
|
62
|
-
❌ **NO Python packages** for core framework (Markdown documentation only)
|
|
63
|
-
❌ **NO .NET packages** for core framework
|
|
64
|
-
❌ **NO** executable code dependencies in core framework
|
|
65
|
-
|
|
66
|
-
**Rationale**: Core framework must work across all language ecosystems without installation.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Installer Dependencies (EPIC-012, EPIC-013, EPIC-014)
|
|
71
|
-
|
|
72
|
-
**Exception**: The installer is a **distribution tool** (not core framework) and requires dependencies.
|
|
73
|
-
|
|
74
|
-
### NPM Dependencies (Locked)
|
|
75
|
-
|
|
76
|
-
**Production Dependencies:**
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"commander": "^11.0.0",
|
|
80
|
-
"inquirer": "^8.2.6",
|
|
81
|
-
"ora": "^5.4.1",
|
|
82
|
-
"chalk": "^4.1.2",
|
|
83
|
-
"cli-progress": "^3.12.0"
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**Version Constraints (per ADR-006):**
|
|
88
|
-
- `inquirer`: 8.x (Last CommonJS version, 9.x is ESM-only)
|
|
89
|
-
- `ora`: 5.x (Last CommonJS version, 6.x+ is ESM-only)
|
|
90
|
-
- `chalk`: 4.x (Last CommonJS version, 5.x+ is ESM-only)
|
|
91
|
-
- `cli-progress`: 3.x (CommonJS compatible)
|
|
92
|
-
- `commander`: 11.x (CommonJS compatible)
|
|
93
|
-
|
|
94
|
-
**Alternatives FORBIDDEN:**
|
|
95
|
-
- ❌ Yargs (use Commander.js only)
|
|
96
|
-
- ❌ Prompts (use Inquirer.js only)
|
|
97
|
-
- ❌ cli-spinners (use Ora only)
|
|
98
|
-
- ❌ colors (use Chalk only)
|
|
99
|
-
|
|
100
|
-
**Optional GUI Dependencies (EPIC-039, ADR-009):**
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"electron": "^28.0.0",
|
|
104
|
-
"electron-builder": "^24.0.0"
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**GUI Dependency Constraints (per ADR-009):**
|
|
109
|
-
- `electron`: 28.x+ (LTS version with security patches)
|
|
110
|
-
- `electron-builder`: 24.x (Multi-platform packaging)
|
|
111
|
-
- **OPTIONAL**: GUI installer is optional; CLI wizard works without Electron
|
|
112
|
-
- **SCOPE**: Only for `installer/gui/` directory (STORY-248)
|
|
113
|
-
- **NOT REQUIRED**: Core DevForgeAI framework does NOT require Electron
|
|
114
|
-
|
|
115
|
-
**GUI Alternatives FORBIDDEN:**
|
|
116
|
-
- ❌ Tauri (use Electron only - more mature ecosystem)
|
|
117
|
-
- ❌ NW.js (use Electron only - better maintained)
|
|
118
|
-
- ❌ Qt/PySide6 (use Electron only - cross-platform consistency)
|
|
119
|
-
|
|
120
|
-
**Dev Dependencies:**
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"jest": "^30.0.0",
|
|
124
|
-
"typescript": "^5.0.0"
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
**Jest Version Constraint (per ADR-007):**
|
|
129
|
-
- `jest`: 30.x required for Node.js 22+ compatibility
|
|
130
|
-
- Jest 29.x has initialization hanging issues with Node 22
|
|
131
|
-
- See ADR-007 for full rationale
|
|
132
|
-
|
|
133
|
-
### Python Dependencies (Existing - Locked)
|
|
134
|
-
|
|
135
|
-
**Core Installer Modules:**
|
|
136
|
-
- `installer/install.py` - Main orchestrator
|
|
137
|
-
- `installer/backup.py` - Backup/restore
|
|
138
|
-
- `installer/rollback.py` - Rollback mechanism
|
|
139
|
-
- `installer/merge.py` - CLAUDE.md merge
|
|
140
|
-
- `installer/version.py` - Version management
|
|
141
|
-
- `installer/validate.py` - Installation validation
|
|
142
|
-
- `installer/deploy.py` - File deployment
|
|
143
|
-
|
|
144
|
-
**DevForgeAI CLI (pip package):**
|
|
145
|
-
```
|
|
146
|
-
devforgeai-cli
|
|
147
|
-
├── devforgeai check-git
|
|
148
|
-
├── devforgeai validate-dod
|
|
149
|
-
├── devforgeai validate-context
|
|
150
|
-
└── devforgeai check-hooks
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
**Python Requirements:**
|
|
154
|
-
- Python 3.10+ (LOCKED)
|
|
155
|
-
- PyYAML 6.0+ (LOCKED - for configuration file parsing)
|
|
156
|
-
- jsonschema 4.0+ (LOCKED - for JSON Schema validation of configuration files, STORY-245)
|
|
157
|
-
|
|
158
|
-
### Optional CLI Dependencies (EPIC-018)
|
|
159
|
-
|
|
160
|
-
**ast-grep-cli** (OPTIONAL - auto-prompted)
|
|
161
|
-
- **Version**: >=0.40.0,<1.0.0 (LOCKED)
|
|
162
|
-
- **Purpose**: Semantic code analysis engine for security/anti-pattern detection
|
|
163
|
-
- **Installation**: `pip install ast-grep-cli` (prompted if missing)
|
|
164
|
-
- **Fallback**: Grep-based analysis when unavailable (60-75% vs 90-95% accuracy)
|
|
165
|
-
- **Rationale**: AST-based analysis provides superior accuracy for code pattern detection
|
|
166
|
-
- **Platform Support**: Linux, macOS, Windows/WSL (via PyPI binary wheels)
|
|
167
|
-
|
|
168
|
-
**Alternatives FORBIDDEN:**
|
|
169
|
-
- ❌ semgrep (use ast-grep-cli only - smaller footprint, MIT license)
|
|
170
|
-
- ❌ tree-sitter bindings (use ast-grep-cli abstraction)
|
|
171
|
-
|
|
172
|
-
### Binary Dependencies (EPIC-055)
|
|
173
|
-
|
|
174
|
-
**Treelint** - AST-aware code search CLI
|
|
175
|
-
- **Version**: v0.12.0+ (LOCKED)
|
|
176
|
-
- **Binary Size**: ~7.7 MB (varies by platform)
|
|
177
|
-
- **Distribution**: Bundled in DevForgeAI installer
|
|
178
|
-
- **Installation Path**: `.treelint/bin/treelint` (project-local)
|
|
179
|
-
- **Checksum**: SHA256 verified during installation
|
|
180
|
-
- **ADR**: ADR-013 (Treelint Integration)
|
|
181
|
-
|
|
182
|
-
**Platform Support:**
|
|
183
|
-
| Platform | Architecture | Binary Name |
|
|
184
|
-
|----------|--------------|-------------|
|
|
185
|
-
| Linux | x86_64 | treelint-linux-x86_64 |
|
|
186
|
-
| Linux | aarch64 | treelint-linux-aarch64 |
|
|
187
|
-
| macOS | x86_64 | treelint-darwin-x86_64 |
|
|
188
|
-
| macOS | aarch64 (Apple Silicon) | treelint-darwin-aarch64 |
|
|
189
|
-
| Windows | x86_64 | treelint-windows-x86_64.exe |
|
|
190
|
-
|
|
191
|
-
**Rationale**: Binary distribution avoids runtime dependencies (no Rust, no cargo). Single executable works offline.
|
|
192
|
-
|
|
193
|
-
### Platform Support
|
|
194
|
-
|
|
195
|
-
**LOCKED - All platforms must be supported:**
|
|
196
|
-
- Windows 10+ (PowerShell, CMD)
|
|
197
|
-
- macOS 11+ (Bash, Zsh)
|
|
198
|
-
- Linux (Ubuntu, Debian, RHEL, Arch)
|
|
199
|
-
- WSL 1/2 (Windows Subsystem for Linux)
|
|
200
|
-
|
|
201
|
-
**Platform-Specific Handling:**
|
|
202
|
-
- Path separators: Use `path.join()` / `os.path.join()` (never hardcode `/` or `\`)
|
|
203
|
-
- File permissions: Handle NTFS vs POSIX differences
|
|
204
|
-
- Shell execution: Use cross-platform subprocess invocation
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
**REMEMBER**: This dependencies.md is for the framework itself. Projects using DevForgeAI will have their own dependencies.md created by designing-systems skill.
|