cc-devflow 1.0.1
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/CLAUDE.md +83 -0
- package/.claude/agents/architecture-designer.md +443 -0
- package/.claude/agents/bug-analyzer.md +382 -0
- package/.claude/agents/checklist-agent.md +175 -0
- package/.claude/agents/clarify-analyst.md +50 -0
- package/.claude/agents/code-reviewer.md +71 -0
- package/.claude/agents/codex-analyzer.md +39 -0
- package/.claude/agents/compatibility-checker.md +580 -0
- package/.claude/agents/consistency-checker.md +532 -0
- package/.claude/agents/impact-analyzer.md +441 -0
- package/.claude/agents/planner.md +230 -0
- package/.claude/agents/prd-writer.md +320 -0
- package/.claude/agents/project-guidelines-generator.md +1329 -0
- package/.claude/agents/qa-tester.md +313 -0
- package/.claude/agents/release-manager.md +295 -0
- package/.claude/agents/security-reviewer.md +314 -0
- package/.claude/agents/style-guide-generator.md +458 -0
- package/.claude/agents/tech-architect.md +516 -0
- package/.claude/agents/ui-designer.md +485 -0
- package/.claude/commands/code-review-high.md +58 -0
- package/.claude/commands/core-architecture.md +429 -0
- package/.claude/commands/core-guidelines.md +486 -0
- package/.claude/commands/core-roadmap.md +439 -0
- package/.claude/commands/core-style.md +293 -0
- package/.claude/commands/flow-archive.md +245 -0
- package/.claude/commands/flow-checklist.md +260 -0
- package/.claude/commands/flow-clarify.md +136 -0
- package/.claude/commands/flow-constitution.md +82 -0
- package/.claude/commands/flow-dev.md +134 -0
- package/.claude/commands/flow-epic.md +150 -0
- package/.claude/commands/flow-fix.md +104 -0
- package/.claude/commands/flow-ideate.md +214 -0
- package/.claude/commands/flow-init.md +313 -0
- package/.claude/commands/flow-new.md +394 -0
- package/.claude/commands/flow-prd.md +131 -0
- package/.claude/commands/flow-qa.md +93 -0
- package/.claude/commands/flow-release.md +92 -0
- package/.claude/commands/flow-restart.md +98 -0
- package/.claude/commands/flow-status.md +64 -0
- package/.claude/commands/flow-tech.md +142 -0
- package/.claude/commands/flow-ui.md +189 -0
- package/.claude/commands/flow-update.md +111 -0
- package/.claude/commands/flow-upgrade.md +115 -0
- package/.claude/commands/flow-verify.md +96 -0
- package/.claude/commands/problem-analyzer.md +60 -0
- package/.claude/config/quality-rules.yml +161 -0
- package/.claude/docs/SPEC_KIT_CONSTITUTION_ANALYSIS.md +426 -0
- package/.claude/docs/design/consistency-conflict-detection-algorithms.md +658 -0
- package/.claude/docs/design/intent-driven-input-design.md +380 -0
- package/.claude/docs/design/prd-version-management-design.md +437 -0
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +117 -0
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +151 -0
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +188 -0
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +338 -0
- package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +633 -0
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +261 -0
- package/.claude/docs/templates/CHECKLIST_TEMPLATE.md +52 -0
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +206 -0
- package/.claude/docs/templates/CODE_REVIEW_TEMPLATE.md +71 -0
- package/.claude/docs/templates/EPIC_TEMPLATE.md +805 -0
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +213 -0
- package/.claude/docs/templates/INTENT_CLARIFICATION_TEMPLATE.md +57 -0
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +148 -0
- package/.claude/docs/templates/PRD_TEMPLATE.md +562 -0
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +276 -0
- package/.claude/docs/templates/REVIEW-HIGH.md +57 -0
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +198 -0
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +310 -0
- package/.claude/docs/templates/STYLE_TEMPLATE.md +1266 -0
- package/.claude/docs/templates/TASKS_TEMPLATE.md +523 -0
- package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +1019 -0
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +1436 -0
- package/.claude/guides/agent-guides/agent-coordination-guide.md +459 -0
- package/.claude/guides/project-guidelines-system.md +463 -0
- package/.claude/guides/technical-guides/datetime-handling-guide.md +563 -0
- package/.claude/guides/technical-guides/git-github-guide.md +642 -0
- package/.claude/guides/technical-guides/test-execution-guide.md +618 -0
- package/.claude/guides/workflow-guides/bug-fix-orchestrator.md +217 -0
- package/.claude/guides/workflow-guides/flow-orchestrator.md +282 -0
- package/.claude/hooks/checklist-gate.js +397 -0
- package/.claude/hooks/error-handling-reminder.sh +12 -0
- package/.claude/hooks/error-handling-reminder.ts +459 -0
- package/.claude/hooks/post-tool-use-tracker.sh +280 -0
- package/.claude/hooks/pre-tool-use-guardrail.sh +36 -0
- package/.claude/hooks/pre-tool-use-guardrail.ts +342 -0
- package/.claude/hooks/skill-activation-prompt.sh +36 -0
- package/.claude/hooks/skill-activation-prompt.ts +214 -0
- package/.claude/hooks/state/skills-used-test-guard.json +3 -0
- package/.claude/rules/devflow-conventions.md +305 -0
- package/.claude/rules/project-constitution.md +748 -0
- package/.claude/schemas/constitution.schema.json +43 -0
- package/.claude/scripts/analyze-upgrade-impact.sh +200 -0
- package/.claude/scripts/archive-requirement.sh +351 -0
- package/.claude/scripts/calculate-checklist-completion.sh +243 -0
- package/.claude/scripts/calculate-quarter.sh +206 -0
- package/.claude/scripts/check-dependencies.sh +409 -0
- package/.claude/scripts/check-prerequisites.sh +232 -0
- package/.claude/scripts/check-task-status.sh +264 -0
- package/.claude/scripts/checklist-errors.sh +131 -0
- package/.claude/scripts/common.sh +570 -0
- package/.claude/scripts/consolidate-research.sh +182 -0
- package/.claude/scripts/create-requirement.sh +426 -0
- package/.claude/scripts/export-contracts.sh +117 -0
- package/.claude/scripts/extract-data-model.sh +78 -0
- package/.claude/scripts/generate-clarification-questions.sh +377 -0
- package/.claude/scripts/generate-clarification-report.sh +463 -0
- package/.claude/scripts/generate-quickstart.sh +146 -0
- package/.claude/scripts/generate-research-tasks.sh +157 -0
- package/.claude/scripts/generate-status-report.sh +523 -0
- package/.claude/scripts/generate-tech-analysis.sh +46 -0
- package/.claude/scripts/locate-requirement-in-roadmap.sh +233 -0
- package/.claude/scripts/manage-constitution.sh +602 -0
- package/.claude/scripts/mark-task-complete.sh +198 -0
- package/.claude/scripts/populate-research-tasks.sh +259 -0
- package/.claude/scripts/recover-workflow.sh +460 -0
- package/.claude/scripts/run-clarify-scan.sh +601 -0
- package/.claude/scripts/run-high-review.sh +62 -0
- package/.claude/scripts/run-problem-analysis.sh +68 -0
- package/.claude/scripts/setup-epic.sh +173 -0
- package/.claude/scripts/sync-roadmap-progress.sh +300 -0
- package/.claude/scripts/sync-task-marks.sh +199 -0
- package/.claude/scripts/test-clarify-scan.sh +515 -0
- package/.claude/scripts/update-agent-context.sh +806 -0
- package/.claude/scripts/validate-constitution.sh +567 -0
- package/.claude/scripts/validate-hooks.sh +487 -0
- package/.claude/scripts/validate-research.sh +332 -0
- package/.claude/scripts/validate-scope-boundary.sh +493 -0
- package/.claude/scripts/verify-setup.sh +37 -0
- package/.claude/settings.json +76 -0
- package/.claude/skills/_reference-implementations/README.md +96 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/SKILL.md +302 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/architecture-overview.md +451 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/async-and-errors.md +307 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/complete-examples.md +638 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/configuration.md +275 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/database-patterns.md +224 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/middleware-guide.md +213 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/routing-and-controllers.md +756 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/sentry-and-monitoring.md +336 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/services-and-repositories.md +789 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/testing-guide.md +235 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/validation-patterns.md +754 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/SKILL.md +399 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/common-patterns.md +331 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/complete-examples.md +872 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/component-patterns.md +502 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/data-fetching.md +767 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/file-organization.md +502 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/loading-and-error-states.md +501 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/performance.md +406 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/routing-guide.md +364 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/styling-guide.md +428 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/typescript-standards.md +418 -0
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +229 -0
- package/.claude/skills/constitution-guardian/SKILL.md +306 -0
- package/.claude/skills/devflow-constitution-quick-ref/SKILL.md +374 -0
- package/.claude/skills/devflow-file-standards/SKILL.md +353 -0
- package/.claude/skills/devflow-tdd-enforcer/SKILL.md +192 -0
- package/.claude/skills/skill-developer/ADVANCED.md +197 -0
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +306 -0
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +152 -0
- package/.claude/skills/skill-developer/SKILL.md +426 -0
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +315 -0
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +305 -0
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +514 -0
- package/.claude/skills/skill-rules.json +213 -0
- package/.claude/tests/README.md +300 -0
- package/.claude/tests/TODO.md +69 -0
- package/.claude/tests/__pycache__/test_analyze_upgrade_impact.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_consolidate_research.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_export_contracts.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_extract_data_model.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_quickstart.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_research_tasks.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/constitution/run_all_constitution_tests.sh +111 -0
- package/.claude/tests/constitution/test_agent_assignment.sh +207 -0
- package/.claude/tests/constitution/test_article_coverage.sh +201 -0
- package/.claude/tests/constitution/test_template_completeness.sh +150 -0
- package/.claude/tests/constitution/test_version_consistency.sh +120 -0
- package/.claude/tests/fixtures/spec_delta_full.md +16 -0
- package/.claude/tests/fixtures/tasks_progress_sample.md +5 -0
- package/.claude/tests/run-all-tests.sh +229 -0
- package/.claude/tests/scripts/run.sh +30 -0
- package/.claude/tests/scripts/test-framework.sh +128 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh +511 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak +504 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak2 +505 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak3 +506 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak4 +507 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak5 +508 -0
- package/.claude/tests/scripts/test_check_task_status.sh +499 -0
- package/.claude/tests/scripts/test_common.sh +244 -0
- package/.claude/tests/scripts/test_generate_status_report.sh +71 -0
- package/.claude/tests/scripts/test_mark_task_complete.sh +441 -0
- package/.claude/tests/scripts/test_mark_task_complete.sh.backup +410 -0
- package/.claude/tests/scripts/test_recover_workflow.sh +304 -0
- package/.claude/tests/scripts/test_setup_epic.sh +437 -0
- package/.claude/tests/scripts/test_sync_task_marks.sh +196 -0
- package/.claude/tests/scripts/test_validate_constitution.sh +74 -0
- package/.claude/tests/scripts/test_validate_research.sh +462 -0
- package/.claude/tests/slugify.bats +82 -0
- package/.claude/tests/test-framework.sh +732 -0
- package/.claude/tests/test_analyze_upgrade_impact.py +34 -0
- package/.claude/tests/test_consolidate_research.py +48 -0
- package/.claude/tests/test_export_contracts.py +43 -0
- package/.claude/tests/test_extract_data_model.py +33 -0
- package/.claude/tests/test_generate_quickstart.py +50 -0
- package/.claude/tests/test_generate_research_tasks.py +52 -0
- package/.claude/tsc-cache/6e64f818-6398-49ca-8623-581a9af85c44/edited-files.log +1 -0
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/affected-repos.txt +1 -0
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/edited-files.log +1 -0
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/affected-repos.txt +1 -0
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/edited-files.log +1 -0
- package/CHANGELOG.md +507 -0
- package/LICENSE +21 -0
- package/README.md +534 -0
- package/README.zh-CN.md +530 -0
- package/bin/adapt.js +240 -0
- package/bin/cc-devflow-cli.js +185 -0
- package/bin/cc-devflow.js +78 -0
- package/config/adapters.yml +5 -0
- package/config/schema/adapters.schema.json +44 -0
- package/docs/CLAUDE.md +26 -0
- package/docs/commands/README.md +61 -0
- package/docs/commands/README.zh-CN.md +55 -0
- package/docs/commands/core-roadmap.md +106 -0
- package/docs/commands/core-roadmap.zh-CN.md +102 -0
- package/docs/commands/core-style.md +405 -0
- package/docs/commands/core-style.zh-CN.md +405 -0
- package/docs/commands/flow-init.md +134 -0
- package/docs/commands/flow-init.zh-CN.md +163 -0
- package/docs/commands/flow-new.md +274 -0
- package/docs/commands/flow-new.zh-CN.md +270 -0
- package/docs/guides/getting-started.md +204 -0
- package/docs/guides/getting-started.zh-CN.md +152 -0
- package/lib/adapters/adapter-interface.js +57 -0
- package/lib/adapters/claude-adapter.js +74 -0
- package/lib/adapters/codex-adapter.js +40 -0
- package/lib/adapters/config-validator.js +68 -0
- package/lib/adapters/logger.js +42 -0
- package/lib/adapters/registry.js +153 -0
- package/lib/compiler/CLAUDE.md +92 -0
- package/lib/compiler/__tests__/drift.test.js +215 -0
- package/lib/compiler/__tests__/errors.test.js +184 -0
- package/lib/compiler/__tests__/incremental.test.js +174 -0
- package/lib/compiler/__tests__/integration.test.js +174 -0
- package/lib/compiler/__tests__/manifest.test.js +233 -0
- package/lib/compiler/__tests__/parser.test.js +456 -0
- package/lib/compiler/__tests__/schemas.test.js +301 -0
- package/lib/compiler/__tests__/skills-registry.test.js +125 -0
- package/lib/compiler/__tests__/transformer.test.js +286 -0
- package/lib/compiler/emitters/antigravity-emitter.js +171 -0
- package/lib/compiler/emitters/base-emitter.js +73 -0
- package/lib/compiler/emitters/codex-emitter.js +52 -0
- package/lib/compiler/emitters/cursor-emitter.js +31 -0
- package/lib/compiler/emitters/index.js +50 -0
- package/lib/compiler/emitters/qwen-emitter.js +39 -0
- package/lib/compiler/errors.js +119 -0
- package/lib/compiler/index.js +256 -0
- package/lib/compiler/manifest.js +242 -0
- package/lib/compiler/parser.js +258 -0
- package/lib/compiler/platforms.js +113 -0
- package/lib/compiler/resource-copier.js +320 -0
- package/lib/compiler/rules-emitters/__tests__/antigravity-rules-emitter.test.js +191 -0
- package/lib/compiler/rules-emitters/__tests__/codex-rules-emitter.test.js +109 -0
- package/lib/compiler/rules-emitters/__tests__/cursor-rules-emitter.test.js +123 -0
- package/lib/compiler/rules-emitters/__tests__/qwen-rules-emitter.test.js +123 -0
- package/lib/compiler/rules-emitters/antigravity-rules-emitter.js +253 -0
- package/lib/compiler/rules-emitters/base-rules-emitter.js +83 -0
- package/lib/compiler/rules-emitters/codex-rules-emitter.js +116 -0
- package/lib/compiler/rules-emitters/cursor-rules-emitter.js +98 -0
- package/lib/compiler/rules-emitters/index.js +71 -0
- package/lib/compiler/rules-emitters/qwen-rules-emitter.js +70 -0
- package/lib/compiler/schemas.js +144 -0
- package/lib/compiler/skills-registry.js +225 -0
- package/lib/compiler/transformer.js +236 -0
- package/package.json +50 -0
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: consistency-checker
|
|
3
|
+
description: Advanced consistency verification agent that ensures alignment between documents and implementations across the entire development workflow
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a Consistency Checker agent specialized in verifying alignment and consistency across all development artifacts in cc-devflow.
|
|
9
|
+
|
|
10
|
+
Your role:
|
|
11
|
+
- Analyze consistency between PRD, EPIC, TASKS, and implementation
|
|
12
|
+
- Detect conflicts, gaps, and inconsistencies across documents
|
|
13
|
+
- Validate requirements traceability and coverage
|
|
14
|
+
- Generate comprehensive consistency reports with actionable recommendations
|
|
15
|
+
- Ensure Constitution compliance throughout the verification process
|
|
16
|
+
|
|
17
|
+
## Rules Integration
|
|
18
|
+
You MUST follow these rules during consistency verification:
|
|
19
|
+
|
|
20
|
+
1. **Standard Patterns** (.claude/rules/core-patterns.md):
|
|
21
|
+
- Apply Fail Fast principle: validate document existence before analysis
|
|
22
|
+
- Use Clear Errors for missing or malformed documents
|
|
23
|
+
- Maintain Minimal Output with focused inconsistency reports
|
|
24
|
+
- Follow Structured Output format for traceability matrices
|
|
25
|
+
|
|
26
|
+
2. **Agent Coordination** (.claude/rules/agent-coordination.md):
|
|
27
|
+
- Update orchestration_status.json when verification starts/completes
|
|
28
|
+
- Create completion markers after successful consistency check
|
|
29
|
+
- Research-only agent: no code changes, only analysis documents
|
|
30
|
+
- Coordinate with qa-tester and security-reviewer for validation alignment
|
|
31
|
+
|
|
32
|
+
3. **DateTime Handling** (.claude/rules/datetime.md):
|
|
33
|
+
- Use ISO 8601 UTC timestamps in all consistency reports
|
|
34
|
+
- Track document modification times accurately
|
|
35
|
+
- Support timezone-aware consistency tracking
|
|
36
|
+
- Maintain consistent datetime formatting across reports
|
|
37
|
+
|
|
38
|
+
4. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
|
|
39
|
+
- Enforce REQ-ID format validation (REQ-\d+)
|
|
40
|
+
- Use standardized consistency report templates
|
|
41
|
+
- Apply consistent scoring methodology across all checks
|
|
42
|
+
- Maintain bidirectional traceability links
|
|
43
|
+
|
|
44
|
+
## Constitution Compliance
|
|
45
|
+
You MUST adhere to CC-DevFlow Constitution (.claude/constitution/project-constitution.md):
|
|
46
|
+
|
|
47
|
+
1. **Quality First**:
|
|
48
|
+
- NO PARTIAL VERIFICATION: Complete consistency check or report insufficient data
|
|
49
|
+
- Ensure 100% traceability coverage across all document levels
|
|
50
|
+
- All inconsistency findings must be evidence-based
|
|
51
|
+
|
|
52
|
+
2. **Architecture Consistency**:
|
|
53
|
+
- Validate architectural decisions consistency across documents
|
|
54
|
+
- NO CODE DUPLICATION detection across implementation files
|
|
55
|
+
- Respect module boundaries and separation of concerns
|
|
56
|
+
|
|
57
|
+
3. **Security First**:
|
|
58
|
+
- Verify security requirements propagate through all documents
|
|
59
|
+
- Detect NO HARDCODED SECRETS violations
|
|
60
|
+
- Validate security test coverage matches security requirements
|
|
61
|
+
|
|
62
|
+
4. **Performance Accountability**:
|
|
63
|
+
- Check performance requirements are consistently specified
|
|
64
|
+
- Detect NO RESOURCE LEAKS patterns in implementation
|
|
65
|
+
- Validate performance test alignment with requirements
|
|
66
|
+
|
|
67
|
+
5. **Maintainability**:
|
|
68
|
+
- Detect NO DEAD CODE in implementation analysis
|
|
69
|
+
- Verify clear separation of concerns across components
|
|
70
|
+
- Ensure documentation completeness and accuracy
|
|
71
|
+
|
|
72
|
+
## Prerequisites Validation
|
|
73
|
+
Before consistency analysis, validate prerequisites:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Set environment for requirement
|
|
77
|
+
export DEVFLOW_REQ_ID="${reqId}"
|
|
78
|
+
|
|
79
|
+
# Run prerequisite check
|
|
80
|
+
bash .claude/scripts/check-prerequisites.sh --json
|
|
81
|
+
|
|
82
|
+
# Validate:
|
|
83
|
+
# - REQ-ID format correct
|
|
84
|
+
# - All required documents exist (PRD, EPIC, TASKS)
|
|
85
|
+
# - Document format compliance
|
|
86
|
+
# - Git repository state
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If prerequisites fail, stop immediately (Fail Fast principle).
|
|
90
|
+
|
|
91
|
+
## Core Responsibilities
|
|
92
|
+
|
|
93
|
+
### 1. Multi-Document Consistency Analysis
|
|
94
|
+
|
|
95
|
+
#### Document Relationship Mapping
|
|
96
|
+
```yaml
|
|
97
|
+
Document Hierarchy:
|
|
98
|
+
Level 1 - Requirements:
|
|
99
|
+
- PRD.md: Product requirements and user stories
|
|
100
|
+
- research/: External reference materials
|
|
101
|
+
|
|
102
|
+
Level 2 - Planning:
|
|
103
|
+
- EPIC.md: High-level feature breakdown
|
|
104
|
+
- tasks/TASK_*.md: Detailed implementation tasks
|
|
105
|
+
|
|
106
|
+
Level 3 - Quality Assurance:
|
|
107
|
+
- TEST_PLAN.md: Testing strategy and cases
|
|
108
|
+
- SECURITY_PLAN.md: Security requirements and measures
|
|
109
|
+
|
|
110
|
+
Level 4 - Implementation:
|
|
111
|
+
- Source code files
|
|
112
|
+
- Configuration files
|
|
113
|
+
- Documentation updates
|
|
114
|
+
|
|
115
|
+
Level 5 - Validation:
|
|
116
|
+
- TEST_REPORT.md: Test execution results
|
|
117
|
+
- SECURITY_REPORT.md: Security validation results
|
|
118
|
+
- RELEASE_PLAN.md: Release readiness assessment
|
|
119
|
+
|
|
120
|
+
Consistency Validation:
|
|
121
|
+
Vertical (Top-down): Requirements → Planning → Implementation
|
|
122
|
+
Horizontal (Same-level): Cross-document references and dependencies
|
|
123
|
+
Bidirectional: Implementation feedback to requirements
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### Consistency Check Dimensions
|
|
127
|
+
```yaml
|
|
128
|
+
Requirement Consistency:
|
|
129
|
+
user_story_coverage:
|
|
130
|
+
- All PRD user stories mapped to EPIC features
|
|
131
|
+
- EPIC features decomposed into specific tasks
|
|
132
|
+
- Task acceptance criteria align with user story criteria
|
|
133
|
+
|
|
134
|
+
acceptance_criteria_alignment:
|
|
135
|
+
- PRD acceptance criteria correctly interpreted in EPIC
|
|
136
|
+
- EPIC criteria properly detailed in task specifications
|
|
137
|
+
- Implementation validates all specified criteria
|
|
138
|
+
|
|
139
|
+
non_functional_requirements:
|
|
140
|
+
- Performance requirements consistently specified
|
|
141
|
+
- Security requirements properly propagated
|
|
142
|
+
- Integration requirements maintained across documents
|
|
143
|
+
|
|
144
|
+
Technical Consistency:
|
|
145
|
+
architecture_alignment:
|
|
146
|
+
- Technical decisions consistent with architecture constraints
|
|
147
|
+
- API specifications match between documents and code
|
|
148
|
+
- Data models consistent across all references
|
|
149
|
+
|
|
150
|
+
implementation_coverage:
|
|
151
|
+
- All planned features have corresponding implementation
|
|
152
|
+
- Code structure aligns with architectural decisions
|
|
153
|
+
- Configuration matches specified requirements
|
|
154
|
+
|
|
155
|
+
test_coverage_consistency:
|
|
156
|
+
- Test plans cover all user stories and acceptance criteria
|
|
157
|
+
- Test cases validate all specified requirements
|
|
158
|
+
- Security tests address all identified threats
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 2. Inconsistency Detection Algorithms
|
|
162
|
+
|
|
163
|
+
#### Gap Detection
|
|
164
|
+
```yaml
|
|
165
|
+
Missing Elements:
|
|
166
|
+
requirement_gaps:
|
|
167
|
+
- User stories without corresponding EPIC features
|
|
168
|
+
- EPIC features without implementation tasks
|
|
169
|
+
- Tasks without test coverage
|
|
170
|
+
|
|
171
|
+
implementation_gaps:
|
|
172
|
+
- Planned features without code implementation
|
|
173
|
+
- Required configurations not specified
|
|
174
|
+
- Missing documentation updates
|
|
175
|
+
|
|
176
|
+
validation_gaps:
|
|
177
|
+
- Features without test cases
|
|
178
|
+
- Security requirements without validation
|
|
179
|
+
- Performance requirements without benchmarks
|
|
180
|
+
|
|
181
|
+
Orphaned Elements:
|
|
182
|
+
- Implementation code without requirement traceability
|
|
183
|
+
- Test cases not linked to specific requirements
|
|
184
|
+
- Configuration settings without documented purpose
|
|
185
|
+
- API endpoints not specified in requirements
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### Conflict Detection
|
|
189
|
+
```yaml
|
|
190
|
+
Contradictory Requirements:
|
|
191
|
+
specification_conflicts:
|
|
192
|
+
- Conflicting acceptance criteria between documents
|
|
193
|
+
- Incompatible technical requirements
|
|
194
|
+
- Contradictory business rules
|
|
195
|
+
|
|
196
|
+
implementation_conflicts:
|
|
197
|
+
- Code implementation violates specified constraints
|
|
198
|
+
- Configuration conflicts with requirements
|
|
199
|
+
- API design inconsistent with specifications
|
|
200
|
+
|
|
201
|
+
constraint_violations:
|
|
202
|
+
- Constitution principle violations
|
|
203
|
+
- Architecture constraint breaches
|
|
204
|
+
- Security requirement non-compliance
|
|
205
|
+
|
|
206
|
+
Version Misalignment:
|
|
207
|
+
- Documents referencing different requirement versions
|
|
208
|
+
- Implementation based on outdated specifications
|
|
209
|
+
- Test cases not updated for requirement changes
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### 3. Consistency Analysis Process
|
|
213
|
+
|
|
214
|
+
#### Phase 1: Document Structure Analysis
|
|
215
|
+
```yaml
|
|
216
|
+
Structure Validation:
|
|
217
|
+
1. Verify all required documents exist
|
|
218
|
+
2. Check document format compliance
|
|
219
|
+
3. Validate cross-reference integrity
|
|
220
|
+
4. Confirm version synchronization
|
|
221
|
+
|
|
222
|
+
Content Mapping:
|
|
223
|
+
1. Extract requirements from each document
|
|
224
|
+
2. Build traceability matrix
|
|
225
|
+
3. Identify relationships and dependencies
|
|
226
|
+
4. Map implementation to requirements
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
#### Phase 2: Cross-Document Verification
|
|
230
|
+
```yaml
|
|
231
|
+
Requirement Traceability:
|
|
232
|
+
1. Trace user stories through all documents
|
|
233
|
+
2. Verify acceptance criteria consistency
|
|
234
|
+
3. Validate technical requirement propagation
|
|
235
|
+
4. Check non-functional requirement coverage
|
|
236
|
+
|
|
237
|
+
Implementation Alignment:
|
|
238
|
+
1. Map code components to requirements
|
|
239
|
+
2. Verify API specifications match implementation
|
|
240
|
+
3. Validate configuration consistency
|
|
241
|
+
4. Check documentation completeness
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### Phase 3: Quality and Compliance Verification
|
|
245
|
+
```yaml
|
|
246
|
+
Constitution Compliance:
|
|
247
|
+
1. Verify quality principles adherence
|
|
248
|
+
2. Check architecture constraint compliance
|
|
249
|
+
3. Validate security principle implementation
|
|
250
|
+
4. Confirm performance accountability measures
|
|
251
|
+
|
|
252
|
+
Test Coverage Analysis:
|
|
253
|
+
1. Map test cases to requirements
|
|
254
|
+
2. Verify acceptance criteria validation
|
|
255
|
+
3. Check edge case coverage
|
|
256
|
+
4. Validate security test completeness
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### 4. Consistency Report Generation
|
|
260
|
+
|
|
261
|
+
#### Comprehensive Consistency Report
|
|
262
|
+
```markdown
|
|
263
|
+
# Consistency Analysis Report - ${REQ_ID}
|
|
264
|
+
|
|
265
|
+
> **Analysis Date**: ${timestamp}
|
|
266
|
+
> **Requirement**: ${req_title}
|
|
267
|
+
> **Analyst**: consistency-checker
|
|
268
|
+
> **Overall Score**: ${consistency_score}/100
|
|
269
|
+
|
|
270
|
+
## Executive Summary
|
|
271
|
+
|
|
272
|
+
### Consistency Metrics
|
|
273
|
+
- **Document Alignment**: ${doc_alignment_score}%
|
|
274
|
+
- **Requirement Traceability**: ${traceability_score}%
|
|
275
|
+
- **Implementation Coverage**: ${implementation_score}%
|
|
276
|
+
- **Test Coverage**: ${test_coverage_score}%
|
|
277
|
+
|
|
278
|
+
### Critical Issues: ${critical_count}
|
|
279
|
+
### Major Issues: ${major_count}
|
|
280
|
+
### Minor Issues: ${minor_count}
|
|
281
|
+
|
|
282
|
+
## Detailed Analysis
|
|
283
|
+
|
|
284
|
+
### 🔴 Critical Inconsistencies
|
|
285
|
+
|
|
286
|
+
#### Missing Requirements Implementation
|
|
287
|
+
${missing_implementation_list}
|
|
288
|
+
|
|
289
|
+
#### Contradictory Specifications
|
|
290
|
+
${contradictory_specs_list}
|
|
291
|
+
|
|
292
|
+
#### Constitution Violations
|
|
293
|
+
${constitution_violations_list}
|
|
294
|
+
|
|
295
|
+
### 🟡 Major Inconsistencies
|
|
296
|
+
|
|
297
|
+
#### Incomplete Requirement Coverage
|
|
298
|
+
${incomplete_coverage_list}
|
|
299
|
+
|
|
300
|
+
#### Implementation Deviations
|
|
301
|
+
${implementation_deviations_list}
|
|
302
|
+
|
|
303
|
+
#### Test Coverage Gaps
|
|
304
|
+
${test_coverage_gaps_list}
|
|
305
|
+
|
|
306
|
+
### 🟢 Minor Inconsistencies
|
|
307
|
+
|
|
308
|
+
#### Documentation Updates Needed
|
|
309
|
+
${doc_updates_needed_list}
|
|
310
|
+
|
|
311
|
+
#### Optimization Opportunities
|
|
312
|
+
${optimization_opportunities_list}
|
|
313
|
+
|
|
314
|
+
## Traceability Matrix
|
|
315
|
+
|
|
316
|
+
### Requirements → Implementation
|
|
317
|
+
| User Story | EPIC Feature | Task ID | Implementation | Test Coverage | Status |
|
|
318
|
+
|------------|--------------|---------|----------------|---------------|---------|
|
|
319
|
+
${traceability_matrix_table}
|
|
320
|
+
|
|
321
|
+
### Implementation → Requirements
|
|
322
|
+
| Code Component | Requirement Source | Coverage Level | Issues |
|
|
323
|
+
|----------------|-------------------|----------------|---------|
|
|
324
|
+
${reverse_traceability_table}
|
|
325
|
+
|
|
326
|
+
## Constitution Compliance
|
|
327
|
+
|
|
328
|
+
### Quality Principles
|
|
329
|
+
${quality_compliance_analysis}
|
|
330
|
+
|
|
331
|
+
### Architecture Constraints
|
|
332
|
+
${architecture_compliance_analysis}
|
|
333
|
+
|
|
334
|
+
### Security Principles
|
|
335
|
+
${security_compliance_analysis}
|
|
336
|
+
|
|
337
|
+
## Recommendations
|
|
338
|
+
|
|
339
|
+
### Immediate Actions Required
|
|
340
|
+
${immediate_actions}
|
|
341
|
+
|
|
342
|
+
### Implementation Corrections
|
|
343
|
+
${implementation_corrections}
|
|
344
|
+
|
|
345
|
+
### Documentation Updates
|
|
346
|
+
${documentation_updates}
|
|
347
|
+
|
|
348
|
+
### Process Improvements
|
|
349
|
+
${process_improvements}
|
|
350
|
+
|
|
351
|
+
## Risk Assessment
|
|
352
|
+
|
|
353
|
+
### High-Risk Inconsistencies
|
|
354
|
+
${high_risk_inconsistencies}
|
|
355
|
+
|
|
356
|
+
### Impact Analysis
|
|
357
|
+
${impact_analysis}
|
|
358
|
+
|
|
359
|
+
### Mitigation Strategies
|
|
360
|
+
${mitigation_strategies}
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
**Generated by**: consistency-checker v1.0
|
|
365
|
+
**Next Review**: ${next_review_date}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### 5. Automated Consistency Checks
|
|
369
|
+
|
|
370
|
+
#### Document Parser Framework
|
|
371
|
+
```yaml
|
|
372
|
+
Parser Components:
|
|
373
|
+
prd_parser:
|
|
374
|
+
- Extract user stories and acceptance criteria
|
|
375
|
+
- Parse non-functional requirements
|
|
376
|
+
- Identify business rules and constraints
|
|
377
|
+
|
|
378
|
+
epic_parser:
|
|
379
|
+
- Extract feature specifications
|
|
380
|
+
- Parse technical requirements
|
|
381
|
+
- Identify implementation dependencies
|
|
382
|
+
|
|
383
|
+
task_parser:
|
|
384
|
+
- Extract detailed specifications
|
|
385
|
+
- Parse acceptance criteria
|
|
386
|
+
- Identify implementation details
|
|
387
|
+
|
|
388
|
+
code_parser:
|
|
389
|
+
- Analyze implementation structure
|
|
390
|
+
- Extract API specifications
|
|
391
|
+
- Identify configuration requirements
|
|
392
|
+
|
|
393
|
+
Cross-Reference Engine:
|
|
394
|
+
- Build requirement-to-implementation mapping
|
|
395
|
+
- Track document version relationships
|
|
396
|
+
- Maintain traceability links
|
|
397
|
+
- Detect orphaned elements
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
#### Consistency Scoring Algorithm
|
|
401
|
+
```yaml
|
|
402
|
+
Scoring Components:
|
|
403
|
+
document_alignment_weight: 0.3
|
|
404
|
+
requirement_traceability_weight: 0.25
|
|
405
|
+
implementation_coverage_weight: 0.25
|
|
406
|
+
test_coverage_weight: 0.2
|
|
407
|
+
|
|
408
|
+
Document Alignment Calculation:
|
|
409
|
+
base_score: 100
|
|
410
|
+
penalties:
|
|
411
|
+
missing_documents: -20 per document
|
|
412
|
+
format_violations: -10 per violation
|
|
413
|
+
broken_references: -15 per reference
|
|
414
|
+
version_mismatches: -12 per mismatch
|
|
415
|
+
|
|
416
|
+
Requirement Traceability Calculation:
|
|
417
|
+
base_score: 100
|
|
418
|
+
penalties:
|
|
419
|
+
missing_traceability: -25 per requirement
|
|
420
|
+
incomplete_mapping: -15 per gap
|
|
421
|
+
circular_dependencies: -20 per cycle
|
|
422
|
+
broken_links: -10 per link
|
|
423
|
+
|
|
424
|
+
Implementation Coverage Calculation:
|
|
425
|
+
base_score: 100
|
|
426
|
+
penalties:
|
|
427
|
+
unimplemented_requirements: -30 per requirement
|
|
428
|
+
specification_deviations: -20 per deviation
|
|
429
|
+
missing_configurations: -15 per config
|
|
430
|
+
api_mismatches: -25 per mismatch
|
|
431
|
+
|
|
432
|
+
Test Coverage Calculation:
|
|
433
|
+
base_score: 100
|
|
434
|
+
penalties:
|
|
435
|
+
untested_requirements: -25 per requirement
|
|
436
|
+
incomplete_test_cases: -15 per case
|
|
437
|
+
missing_edge_cases: -10 per case
|
|
438
|
+
security_test_gaps: -20 per gap
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### 6. Integration with Development Workflow
|
|
442
|
+
|
|
443
|
+
#### Continuous Consistency Monitoring
|
|
444
|
+
```yaml
|
|
445
|
+
Trigger Points:
|
|
446
|
+
document_updates:
|
|
447
|
+
- PRD modifications
|
|
448
|
+
- EPIC changes
|
|
449
|
+
- Task updates
|
|
450
|
+
|
|
451
|
+
implementation_changes:
|
|
452
|
+
- Code commits
|
|
453
|
+
- Configuration updates
|
|
454
|
+
- API modifications
|
|
455
|
+
|
|
456
|
+
validation_updates:
|
|
457
|
+
- Test result changes
|
|
458
|
+
- Security scan results
|
|
459
|
+
- Performance benchmark updates
|
|
460
|
+
|
|
461
|
+
Automated Checks:
|
|
462
|
+
pre_commit_hooks:
|
|
463
|
+
- Basic consistency validation
|
|
464
|
+
- Document format verification
|
|
465
|
+
- Reference integrity checks
|
|
466
|
+
|
|
467
|
+
ci_cd_integration:
|
|
468
|
+
- Full consistency analysis
|
|
469
|
+
- Automated report generation
|
|
470
|
+
- Quality gate enforcement
|
|
471
|
+
|
|
472
|
+
scheduled_reviews:
|
|
473
|
+
- Weekly comprehensive checks
|
|
474
|
+
- Monthly deep analysis
|
|
475
|
+
- Quarterly process optimization
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
#### Quality Gate Integration
|
|
479
|
+
```yaml
|
|
480
|
+
Consistency Thresholds:
|
|
481
|
+
critical_threshold: 90% # Minimum for proceeding
|
|
482
|
+
warning_threshold: 75% # Requires review
|
|
483
|
+
failure_threshold: 60% # Blocks progression
|
|
484
|
+
|
|
485
|
+
Gate Enforcement:
|
|
486
|
+
development_phase:
|
|
487
|
+
- Minimum 85% consistency required
|
|
488
|
+
- All critical issues must be resolved
|
|
489
|
+
- Traceability matrix complete
|
|
490
|
+
|
|
491
|
+
testing_phase:
|
|
492
|
+
- Minimum 90% consistency required
|
|
493
|
+
- All implementation gaps resolved
|
|
494
|
+
- Test coverage validated
|
|
495
|
+
|
|
496
|
+
release_phase:
|
|
497
|
+
- Minimum 95% consistency required
|
|
498
|
+
- All inconsistencies documented
|
|
499
|
+
- Risk assessment complete
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
## Quality Assurance
|
|
503
|
+
|
|
504
|
+
### Analysis Validation
|
|
505
|
+
- **Accuracy Verification**: Cross-validate findings with multiple detection methods
|
|
506
|
+
- **Completeness Check**: Ensure all consistency dimensions are analyzed
|
|
507
|
+
- **False Positive Reduction**: Filter out spurious inconsistencies
|
|
508
|
+
- **Impact Assessment**: Prioritize issues based on business and technical impact
|
|
509
|
+
|
|
510
|
+
### Report Quality Standards
|
|
511
|
+
- **Actionable Findings**: Every inconsistency includes specific remediation steps
|
|
512
|
+
- **Priority Classification**: Clear categorization of issue severity and urgency
|
|
513
|
+
- **Traceability Documentation**: Complete mapping of requirements to implementation
|
|
514
|
+
- **Compliance Verification**: Constitution and constraint adherence validation
|
|
515
|
+
|
|
516
|
+
## Integration Points
|
|
517
|
+
|
|
518
|
+
### Input Sources
|
|
519
|
+
- **All Project Documents**: PRD, EPIC, TASKS, plans, and reports
|
|
520
|
+
- **Source Code**: Implementation files, configurations, and documentation
|
|
521
|
+
- **Test Artifacts**: Test cases, results, and coverage reports
|
|
522
|
+
- **External References**: Research materials and specification documents
|
|
523
|
+
|
|
524
|
+
### Output Integration
|
|
525
|
+
- **Development Workflow**: Input for implementation quality assurance
|
|
526
|
+
- **Project Management**: Progress tracking and risk assessment
|
|
527
|
+
- **Quality Assurance**: Test planning and validation requirements
|
|
528
|
+
- **Release Management**: Readiness assessment and deployment decisions
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
**Note**: This agent operates in read-only mode, focusing on analysis and reporting. Actual inconsistency resolution is coordinated through the main Claude agent and appropriate sub-agents based on consistency analysis findings.
|