devforgeai 1.0.4 → 1.0.6
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/CLAUDE.md +120 -0
- package/package.json +9 -1
- package/src/CLAUDE.md +699 -0
- package/src/claude/scripts/README.md +396 -0
- package/src/claude/scripts/audit-command-skill-overlap.sh +67 -0
- package/src/claude/scripts/check-hooks-fast.sh +70 -0
- package/src/claude/scripts/devforgeai-validate +6 -0
- package/src/claude/scripts/devforgeai_cli/README.md +531 -0
- package/src/claude/scripts/devforgeai_cli/__init__.py +12 -0
- package/src/claude/scripts/devforgeai_cli/cli.py +716 -0
- package/src/claude/scripts/devforgeai_cli/commands/__init__.py +1 -0
- package/src/claude/scripts/devforgeai_cli/commands/check_hooks.py +384 -0
- package/src/claude/scripts/devforgeai_cli/commands/invoke_hooks.py +149 -0
- package/src/claude/scripts/devforgeai_cli/commands/phase_commands.py +731 -0
- package/src/claude/scripts/devforgeai_cli/commands/validate_installation.py +412 -0
- package/src/claude/scripts/devforgeai_cli/context_extraction.py +426 -0
- package/src/claude/scripts/devforgeai_cli/feedback/AC_TO_TEST_MAPPING.md +636 -0
- package/src/claude/scripts/devforgeai_cli/feedback/DELIVERY_SUMMARY.txt +329 -0
- package/src/claude/scripts/devforgeai_cli/feedback/README_TEST_SPECS.md +486 -0
- package/src/claude/scripts/devforgeai_cli/feedback/TEST_IMPLEMENTATION_GUIDE.md +529 -0
- package/src/claude/scripts/devforgeai_cli/feedback/TEST_SPECIFICATIONS.md +2652 -0
- package/src/claude/scripts/devforgeai_cli/feedback/TEST_SPECS_INDEX.md +398 -0
- package/src/claude/scripts/devforgeai_cli/feedback/__init__.py +34 -0
- package/src/claude/scripts/devforgeai_cli/feedback/adaptive_questioning_engine.py +581 -0
- package/src/claude/scripts/devforgeai_cli/feedback/aggregation.py +179 -0
- package/src/claude/scripts/devforgeai_cli/feedback/commands.py +535 -0
- package/src/claude/scripts/devforgeai_cli/feedback/config_defaults.py +58 -0
- package/src/claude/scripts/devforgeai_cli/feedback/config_manager.py +423 -0
- package/src/claude/scripts/devforgeai_cli/feedback/config_models.py +192 -0
- package/src/claude/scripts/devforgeai_cli/feedback/config_schema.py +140 -0
- package/src/claude/scripts/devforgeai_cli/feedback/coverage.json +1 -0
- package/src/claude/scripts/devforgeai_cli/feedback/feature_flag.py +152 -0
- package/src/claude/scripts/devforgeai_cli/feedback/feedback_indexer.py +394 -0
- package/src/claude/scripts/devforgeai_cli/feedback/hot_reload.py +226 -0
- package/src/claude/scripts/devforgeai_cli/feedback/longitudinal.py +115 -0
- package/src/claude/scripts/devforgeai_cli/feedback/models.py +67 -0
- package/src/claude/scripts/devforgeai_cli/feedback/question_router.py +236 -0
- package/src/claude/scripts/devforgeai_cli/feedback/retrospective.py +233 -0
- package/src/claude/scripts/devforgeai_cli/feedback/skip_tracker.py +177 -0
- package/src/claude/scripts/devforgeai_cli/feedback/skip_tracking.py +221 -0
- package/src/claude/scripts/devforgeai_cli/feedback/template_engine.py +549 -0
- package/src/claude/scripts/devforgeai_cli/feedback/validation.py +163 -0
- package/src/claude/scripts/devforgeai_cli/headless/__init__.py +30 -0
- package/src/claude/scripts/devforgeai_cli/headless/answer_models.py +206 -0
- package/src/claude/scripts/devforgeai_cli/headless/answer_resolver.py +204 -0
- package/src/claude/scripts/devforgeai_cli/headless/exceptions.py +36 -0
- package/src/claude/scripts/devforgeai_cli/headless/pattern_matcher.py +156 -0
- package/src/claude/scripts/devforgeai_cli/hooks.py +313 -0
- package/src/claude/scripts/devforgeai_cli/metrics/__init__.py +46 -0
- package/src/claude/scripts/devforgeai_cli/metrics/command_metrics.py +142 -0
- package/src/claude/scripts/devforgeai_cli/metrics/failure_modes.py +152 -0
- package/src/claude/scripts/devforgeai_cli/metrics/story_segmentation.py +181 -0
- package/src/claude/scripts/devforgeai_cli/orchestrate_hooks.py +780 -0
- package/src/claude/scripts/devforgeai_cli/phase_state.py +1229 -0
- package/src/claude/scripts/devforgeai_cli/session/__init__.py +30 -0
- package/src/claude/scripts/devforgeai_cli/session/checkpoint.py +268 -0
- package/src/claude/scripts/devforgeai_cli/tests/__init__.py +1 -0
- package/src/claude/scripts/devforgeai_cli/tests/conftest.py +29 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/TEST_EXECUTION_GUIDE.md +298 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/__init__.py +3 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_adaptive_questioning_engine.py +2171 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_aggregation.py +476 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_config_defaults.py +133 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_config_manager.py +592 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_config_models.py +373 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_config_schema.py +130 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_configuration_management.py +1355 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_edge_cases.py +308 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_feature_flag.py +307 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_feedback_indexer.py +384 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_hot_reload.py +580 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_integration.py +402 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_models.py +105 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_question_routing.py +262 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_retrospective.py +333 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_skip_tracker.py +410 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_skip_tracking.py +159 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_skip_tracking_integration.py +1155 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_template_engine.py +1389 -0
- package/src/claude/scripts/devforgeai_cli/tests/feedback/test_validation_comprehensive.py +210 -0
- package/src/claude/scripts/devforgeai_cli/tests/fixtures/autonomous-deferral-story.md +46 -0
- package/src/claude/scripts/devforgeai_cli/tests/fixtures/missing-impl-notes.md +31 -0
- package/src/claude/scripts/devforgeai_cli/tests/fixtures/valid-deferral-story.md +46 -0
- package/src/claude/scripts/devforgeai_cli/tests/fixtures/valid-story-complete.md +48 -0
- package/src/claude/scripts/devforgeai_cli/tests/manual_test_invoke_hooks.sh +200 -0
- package/src/claude/scripts/devforgeai_cli/tests/session/DELIVERABLES.md +518 -0
- package/src/claude/scripts/devforgeai_cli/tests/session/TEST_SUMMARY.md +468 -0
- package/src/claude/scripts/devforgeai_cli/tests/session/__init__.py +6 -0
- package/src/claude/scripts/devforgeai_cli/tests/session/fixtures/corrupted-checkpoint.json +1 -0
- package/src/claude/scripts/devforgeai_cli/tests/session/fixtures/missing-fields-checkpoint.json +4 -0
- package/src/claude/scripts/devforgeai_cli/tests/session/fixtures/valid-checkpoint.json +15 -0
- package/src/claude/scripts/devforgeai_cli/tests/session/test_checkpoint.py +851 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_check_hooks.py +1886 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_depends_on_normalizer.py +171 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_dod_validator.py +97 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_invoke_hooks.py +1902 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_phase_commands.py +320 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_phase_commands_error_handling.py +1021 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_phase_commands_import.py +697 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_phase_state.py +2187 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_skip_tracking.py +2141 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_skip_tracking_coverage_gap.py +195 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_subagent_enforcement.py +539 -0
- package/src/claude/scripts/devforgeai_cli/tests/test_validate_installation.py +361 -0
- package/src/claude/scripts/devforgeai_cli/utils/__init__.py +11 -0
- package/src/claude/scripts/devforgeai_cli/utils/depends_on_normalizer.py +149 -0
- package/src/claude/scripts/devforgeai_cli/utils/markdown_parser.py +219 -0
- package/src/claude/scripts/devforgeai_cli/utils/story_analyzer.py +249 -0
- package/src/claude/scripts/devforgeai_cli/utils/yaml_parser.py +152 -0
- package/src/claude/scripts/devforgeai_cli/validators/__init__.py +27 -0
- package/src/claude/scripts/devforgeai_cli/validators/ast_grep_validator.py +373 -0
- package/src/claude/scripts/devforgeai_cli/validators/context_validator.py +180 -0
- package/src/claude/scripts/devforgeai_cli/validators/dod_validator.py +309 -0
- package/src/claude/scripts/devforgeai_cli/validators/git_validator.py +107 -0
- package/src/claude/scripts/devforgeai_cli/validators/grep_fallback.py +300 -0
- package/src/claude/scripts/install_hooks.sh +186 -0
- package/src/claude/scripts/invoke_feedback_hooks.sh +59 -0
- package/src/claude/scripts/migrate-ac-headers.sh +122 -0
- package/src/claude/scripts/plan_file_kb.sh +704 -0
- package/src/claude/scripts/requirements.txt +8 -0
- package/src/claude/scripts/session_catalog.sh +543 -0
- package/src/claude/scripts/setup.py +55 -0
- package/src/claude/scripts/start-devforgeai.sh +16 -0
- package/src/claude/scripts/statusline.sh +27 -0
- package/src/claude/scripts/validate_deferrals.py +344 -0
- package/src/claude/skills/devforgeai-qa/SKILL.md +1 -1
- package/src/claude/skills/researching-market/SKILL.md +2 -1
- package/src/cli/lib/copier.js +13 -1
- package/src/claude/skills/designing-systems/scripts/__pycache__/detect_anti_patterns.cpython-312.pyc +0 -0
- package/src/claude/skills/designing-systems/scripts/__pycache__/validate_all_context.cpython-312.pyc +0 -0
- package/src/claude/skills/designing-systems/scripts/__pycache__/validate_architecture.cpython-312.pyc +0 -0
- package/src/claude/skills/designing-systems/scripts/__pycache__/validate_dependencies.cpython-312.pyc +0 -0
- package/src/claude/skills/devforgeai-story-creation/scripts/__pycache__/migrate_story_v1_to_v2.cpython-312.pyc +0 -0
- package/src/claude/skills/devforgeai-story-creation/scripts/tests/__pycache__/measure_accuracy.cpython-312.pyc +0 -0
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
|
|
2
|
+
Default to plan mode when asked to do something.
|
|
3
|
+
|
|
4
|
+
**NO EXCEPTION:** Plans MUST be self-contained with full documentation, reference links, and progress checkpoints that survive context window clears.
|
|
5
|
+
|
|
6
|
+
If asked to do something and do not enter plan mode - HALT!
|
|
7
|
+
|
|
8
|
+
Be Honest. Be objective - never sycophantic.
|
|
9
|
+
|
|
10
|
+
**Important** test against src/ tree not operational folders. wsl has historically generated corrupt or missing file errors when testing against operational folders.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## File Architecture Rules
|
|
15
|
+
|
|
16
|
+
This project uses a dual-path architecture: `src/` contains source files and `.claude/` (or operational folders) contains operational/runtime files. When editing or creating files:
|
|
17
|
+
- Development work (implementations, source code) goes in `src/` tree
|
|
18
|
+
- Operational configs, skills, and workflow files stay in their respective operational directories
|
|
19
|
+
- NEVER replace operational paths with src/ paths or vice versa — they serve different purposes
|
|
20
|
+
- When running tests, always run against `src/` tree unless explicitly told otherwise
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<identity>
|
|
25
|
+
|
|
26
|
+
## Identity and Delegation
|
|
27
|
+
|
|
28
|
+
You are **opus** — the orchestrator for this DevForgeAI project. You delegate work to subagents in `.claude/agents/` and skills in `.claude/skills/`.
|
|
29
|
+
|
|
30
|
+
**Core responsibilities:**
|
|
31
|
+
1. **Opus delegates** — do not perform manual labor yourself
|
|
32
|
+
2. **Create task lists** (TaskCreate) — always, no exceptions
|
|
33
|
+
3. **Provide context** to subagents — they cannot see the full picture without you
|
|
34
|
+
4. **HALT on ambiguity** — use AskUserQuestion tool immediately
|
|
35
|
+
|
|
36
|
+
**DevForgeAI Framework:** Spec-driven development with zero technical debt. Enforces constraints, prevents anti-patterns, maintains quality through validation.
|
|
37
|
+
|
|
38
|
+
**Core loop:** Immutable context files → TDD workflow → Quality gates
|
|
39
|
+
|
|
40
|
+
**Constitution** documents in `.claude/memory/Constitution/`. Reading these files will reduce QA fix cycles.
|
|
41
|
+
|
|
42
|
+
</identity>
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
<rules>
|
|
47
|
+
|
|
48
|
+
## Critical Rules
|
|
49
|
+
|
|
50
|
+
**Load from:** `.claude/rules/core/critical-rules.md`
|
|
51
|
+
|
|
52
|
+
**Summary (12 rules):**
|
|
53
|
+
1. Check tech-stack.md before technologies
|
|
54
|
+
2. Use native tools over Bash for files
|
|
55
|
+
3. AskUserQuestion for ALL ambiguities
|
|
56
|
+
4. Context files are **IMMUTABLE** (changes require ADR — see ADR-021 for layer mutability rules)
|
|
57
|
+
5. TDD is mandatory
|
|
58
|
+
6. Quality gates are strict (coverage gaps are CRITICAL blockers per ADR-010, not warnings)
|
|
59
|
+
7. No library substitution
|
|
60
|
+
8. Anti-patterns forbidden
|
|
61
|
+
9. Document decisions in ADRs
|
|
62
|
+
10. Ask, don't assume
|
|
63
|
+
11. Git operations require user approval
|
|
64
|
+
12. Citation requirements for recommendations
|
|
65
|
+
|
|
66
|
+
</rules>
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
<halt_triggers>
|
|
71
|
+
|
|
72
|
+
## HALT Triggers
|
|
73
|
+
|
|
74
|
+
HALT immediately and use AskUserQuestion when ANY of these occur:
|
|
75
|
+
|
|
76
|
+
1. **Bash for file operations** — Use Read/Write/Edit/Glob/Grep instead
|
|
77
|
+
2. **Deferrals without user approval** — Never autonomously defer DoD items
|
|
78
|
+
3. **`--no-verify` commits** — Fix the validation, do not bypass it
|
|
79
|
+
4. **Pre-commit hook modifications** — Never modify `.git/hooks/`
|
|
80
|
+
5. **Technology not in tech-stack.md** — Cannot introduce without ADR
|
|
81
|
+
6. **Conflicting requirements** — Do not guess which takes priority
|
|
82
|
+
7. **Security-sensitive decisions** — Authentication, secrets, permissions
|
|
83
|
+
8. **Multiple valid approaches** — Let the user choose direction
|
|
84
|
+
9. **3+ consecutive fix attempts fail** — Invoke root-cause-diagnosis skill first
|
|
85
|
+
|
|
86
|
+
</halt_triggers>
|
|
87
|
+
|
|
88
|
+
<no_token_optimization_of_phases>
|
|
89
|
+
|
|
90
|
+
## Prohibited Phase Rationalizations
|
|
91
|
+
|
|
92
|
+
The following rationalizations for skipping phases are **explicitly forbidden**:
|
|
93
|
+
|
|
94
|
+
1. "This phase is simple enough to skip" — Execute it anyway
|
|
95
|
+
2. "I already know the answer, no need to verify" — Verify it anyway
|
|
96
|
+
3. "The subagent would just confirm what I already concluded" — Invoke it anyway
|
|
97
|
+
4. "Skipping this saves tokens/time" — Phase discipline is non-negotiable
|
|
98
|
+
5. "The user seems to want speed over thoroughness" — Unless they explicitly say "skip phase N"
|
|
99
|
+
|
|
100
|
+
**Only the user can authorize phase skipping**, and only via explicit instruction.
|
|
101
|
+
|
|
102
|
+
</no_token_optimization_of_phases>
|
|
103
|
+
|
|
104
|
+
## Plan File Convention
|
|
105
|
+
|
|
106
|
+
Before creating new plan file, check for existing:
|
|
107
|
+
|
|
108
|
+
**Search Algorithm:**
|
|
109
|
+
1. `Glob(".claude/plans/*.md")` - list all plan files
|
|
110
|
+
2. For each file, `Grep(pattern="STORY-XXX", path="{plan_file}")` - search for story ID with word boundaries
|
|
111
|
+
3. If match found, offer to resume existing plan via `AskUserQuestion`
|
|
112
|
+
4. If no match, create new plan with story ID in filename
|
|
113
|
+
|
|
114
|
+
**Naming Convention:**
|
|
115
|
+
- Include story ID when working on a specific story
|
|
116
|
+
- Good: `STORY-127-plan-file-resume.md`
|
|
117
|
+
- Avoid: Random adjective-noun combinations for story work
|
|
118
|
+
- Exception: Exploratory work without story can use random names
|
|
119
|
+
|
|
120
|
+
**When in doubt → HALT → AskUserQuestion**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devforgeai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "DevForgeAI is a spec-driven development framework designed to enable AI-assisted software development with zero technical debt through automated validation, architectural constraints enforcement, and test-driven development workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"bin/devforgeai.js",
|
|
21
21
|
"lib/",
|
|
22
|
+
"CLAUDE.md",
|
|
22
23
|
"src/cli/",
|
|
23
24
|
"src/claude/agents/",
|
|
24
25
|
"src/claude/commands/",
|
|
@@ -26,6 +27,13 @@
|
|
|
26
27
|
"src/claude/memory/",
|
|
27
28
|
"src/claude/plans/",
|
|
28
29
|
"src/claude/rules/",
|
|
30
|
+
"src/claude/scripts/**/*.py",
|
|
31
|
+
"src/claude/scripts/**/*.sh",
|
|
32
|
+
"src/claude/scripts/**/*.md",
|
|
33
|
+
"src/claude/scripts/**/*.txt",
|
|
34
|
+
"src/claude/scripts/**/*.json",
|
|
35
|
+
"src/claude/scripts/devforgeai-validate",
|
|
36
|
+
"src/claude/scripts/setup.py",
|
|
29
37
|
"src/claude/settings.json",
|
|
30
38
|
"src/claude/skills/",
|
|
31
39
|
"src/scripts/*.sh",
|