cc-devflow 1.0.1 → 1.0.3

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.
Files changed (37) hide show
  1. package/.claude/agents/architecture-designer.md +7 -7
  2. package/.claude/agents/bug-analyzer.md +7 -7
  3. package/.claude/agents/code-reviewer.md +5 -5
  4. package/.claude/agents/compatibility-checker.md +7 -7
  5. package/.claude/agents/consistency-checker.md +6 -6
  6. package/.claude/agents/impact-analyzer.md +7 -7
  7. package/.claude/agents/planner.md +7 -7
  8. package/.claude/agents/prd-writer.md +15 -15
  9. package/.claude/agents/project-guidelines-generator.md +13 -13
  10. package/.claude/agents/qa-tester.md +11 -11
  11. package/.claude/agents/release-manager.md +14 -14
  12. package/.claude/agents/security-reviewer.md +12 -12
  13. package/.claude/agents/style-guide-generator.md +1 -1
  14. package/.claude/agents/tech-architect.md +10 -10
  15. package/.claude/agents/ui-designer.md +12 -12
  16. package/.claude/commands/flow-constitution.md +1 -1
  17. package/.claude/docs/SPEC_KIT_CONSTITUTION_ANALYSIS.md +1 -1
  18. package/.claude/docs/templates/EPIC_TEMPLATE.md +3 -3
  19. package/.claude/docs/templates/PRD_TEMPLATE.md +1 -1
  20. package/.claude/docs/templates/TASKS_TEMPLATE.md +4 -4
  21. package/.claude/guides/workflow-guides/flow-orchestrator.md +10 -10
  22. package/.claude/scripts/check-task-status.sh +33 -9
  23. package/.claude/scripts/manage-constitution.sh +2 -2
  24. package/.claude/scripts/validate-constitution.sh +1 -1
  25. package/.claude/skills/cc-devflow-orchestrator/SKILL.md +1 -1
  26. package/.claude/skills/constitution-guardian/SKILL.md +3 -3
  27. package/.claude/skills/devflow-constitution-quick-ref/SKILL.md +11 -11
  28. package/.claude/skills/skill-rules.json +1 -1
  29. package/.claude/tests/constitution/test_agent_assignment.sh +1 -1
  30. package/.claude/tests/constitution/test_article_coverage.sh +1 -1
  31. package/.claude/tests/constitution/test_template_completeness.sh +4 -4
  32. package/.claude/tests/constitution/test_version_consistency.sh +3 -3
  33. package/.claude/tsc-cache/777aa1de-497e-411b-a40f-13b74efcec58/affected-repos.txt +1 -0
  34. package/.claude/tsc-cache/777aa1de-497e-411b-a40f-13b74efcec58/edited-files.log +2 -0
  35. package/README.md +27 -6
  36. package/README.zh-CN.md +27 -6
  37. package/package.json +2 -2
@@ -24,7 +24,7 @@ You are a **RESEARCH-TYPE AGENT**. You do NOT engage in dialogue with users. You
24
24
  - `devflow/ROADMAP.md`: Extract RM-IDs, dependencies, milestones
25
25
  - `devflow/requirements/REQ-*/TECH_DESIGN.md`: Analyze tech stack, modules
26
26
  - `devflow/project.md`: Extract tech stack information
27
- - `src/`, `.claude/`, `devflow/` directories: Analyze code structure
27
+ - `src/`, `${DEVFLOW_CLAUDE_DIR:-.claude}/`, `devflow/` directories: Analyze code structure
28
28
 
29
29
  - **Output**: One complete document:
30
30
  - `devflow/ARCHITECTURE.md`: Architecture document with:
@@ -58,7 +58,7 @@ You are a **RESEARCH-TYPE AGENT**. You do NOT engage in dialogue with users. You
58
58
  - Build comprehensive tech stack inventory
59
59
 
60
60
  4. **Scan codebase structure**:
61
- - List all top-level directories (src/, .claude/, devflow/, etc.)
61
+ - List all top-level directories (src/, ${DEVFLOW_CLAUDE_DIR:-.claude}/, devflow/, etc.)
62
62
  - Identify key subdirectories
63
63
  - Build directory tree for Module Structure diagram
64
64
 
@@ -69,7 +69,7 @@ You are a **RESEARCH-TYPE AGENT**. You do NOT engage in dialogue with users. You
69
69
 
70
70
  ### Phase 2: Load Template
71
71
 
72
- 1. Read `.claude/docs/templates/ARCHITECTURE_TEMPLATE.md`
72
+ 1. Read `${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/ARCHITECTURE_TEMPLATE.md`
73
73
  2. Verify template loaded successfully
74
74
  3. Parse Execution Flow instructions (12 steps)
75
75
 
@@ -177,7 +177,7 @@ Follow the Execution Flow in ARCHITECTURE_TEMPLATE.md EXACTLY (12 steps):
177
177
 
178
178
  #### Step 7: Generate Diagram 3 - Module Structure (模块划分图)
179
179
  - Scan actual codebase structure:
180
- - List `src/`, `.claude/`, `devflow/`, and other top-level directories
180
+ - List `src/`, `${DEVFLOW_CLAUDE_DIR:-.claude}/`, `devflow/`, and other top-level directories
181
181
  - Identify key subdirectories
182
182
  - Generate Mermaid graph syntax:
183
183
  ```mermaid
@@ -189,7 +189,7 @@ Follow the Execution Flow in ARCHITECTURE_TEMPLATE.md EXACTLY (12 steps):
189
189
  Utils[utils/]
190
190
  end
191
191
 
192
- subgraph ".claude/"
192
+ subgraph "${DEVFLOW_CLAUDE_DIR:-.claude}/"
193
193
  Agents[agents/]
194
194
  Cmds[commands/]
195
195
  Scripts[scripts/]
@@ -350,7 +350,7 @@ Next Steps:
350
350
  ## Rules Integration
351
351
 
352
352
  1. **Script Integration**:
353
- - Source `.claude/scripts/common.sh` for utility functions
353
+ - Source `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/common.sh` for utility functions
354
354
  - Use `get_beijing_time_iso()` for timestamps
355
355
  - Log events to execution log if called by command
356
356
 
@@ -361,7 +361,7 @@ Next Steps:
361
361
 
362
362
  3. **DevFlow Conventions**:
363
363
  - Validate REQ-ID and RM-ID formats
364
- - Use standardized templates from `.claude/docs/templates/`
364
+ - Use standardized templates from `${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/`
365
365
  - Maintain traceability to ROADMAP.md
366
366
 
367
367
  4. **Constitution Compliance**:
@@ -16,32 +16,32 @@ Your role:
16
16
  ## Rules Integration
17
17
  You MUST follow these rules during BUG analysis:
18
18
 
19
- 1. **Standard Patterns** (.claude/rules/core-patterns.md):
19
+ 1. **Standard Patterns**:
20
20
  - Apply Fail Fast principle: validate BUG description completeness immediately
21
21
  - Use Clear Errors when BUG symptoms are unclear or non-reproducible
22
22
  - Maintain Minimal Output with focused, technical analysis
23
23
  - Follow Structured Output format for consistent analysis sections
24
24
 
25
- 2. **Agent Coordination** (.claude/rules/agent-coordination.md):
25
+ 2. **Agent Coordination**:
26
26
  - Update status in orchestration_status.json when analysis begins and completes
27
27
  - Implement proper error handling for unclear BUG symptoms
28
28
  - Create analysis completion markers (.completed files)
29
29
  - Avoid file locks (read-only agent - only generate documents)
30
30
 
31
- 3. **DateTime Handling** (.claude/rules/datetime.md):
31
+ 3. **DateTime Handling**:
32
32
  - Include ISO 8601 UTC timestamps in YAML frontmatter
33
33
  - Use real system time for analysis metadata
34
34
  - Handle timezone-aware incident timelines correctly
35
35
  - Support cross-platform datetime operations in analysis
36
36
 
37
- 4. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
37
+ 4. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
38
38
  - Enforce BUG-ID format validation in metadata (BUG-\d+)
39
- - Use standardized analysis template structure from .claude/docs/templates/
39
+ - Use standardized analysis template structure from ${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/
40
40
  - Apply consistent technical analysis formatting
41
41
  - Maintain traceability links to related code and issues
42
42
 
43
43
  ## Constitution Compliance
44
- You MUST adhere to CC-DevFlow Constitution (.claude/constitution/project-constitution.md):
44
+ You MUST adhere to CC-DevFlow Constitution (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md):
45
45
 
46
46
  1. **Quality First**:
47
47
  - NO PARTIAL ANALYSIS: Complete root cause investigation or report insufficient data
@@ -82,7 +82,7 @@ Before starting analysis, validate prerequisites using check-prerequisites.sh:
82
82
  export DEVFLOW_REQ_ID="${bugId}"
83
83
 
84
84
  # Run prerequisite check
85
- bash .claude/scripts/check-prerequisites.sh --json
85
+ bash ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json
86
86
 
87
87
  # Expected validations:
88
88
  # - BUG ID format (BUG-\d+)
@@ -11,7 +11,7 @@ Your mission: deliver a precise, actionable code review using the `/code-review-
11
11
 
12
12
  ## Operating Principles
13
13
  1. **Phase-Scoped**: Review only the commits, files, and tasks completed within the just-finished phase. Do not drift into work from other phases.
14
- 2. **High Leverage**: Prioritize correctness, security, performance regressions, integration risks, test sufficiency, and maintainability—exactly as defined in `.claude/commands/code-review-high.md`.
14
+ 2. **High Leverage**: Prioritize correctness, security, performance regressions, integration risks, test sufficiency, and maintainability—exactly as defined in `${DEVFLOW_CLAUDE_DIR:-.claude}/commands/code-review-high.md`.
15
15
  3. **No Implementation**: You never modify code. You analyze, diagnose, and recommend.
16
16
  4. **Traceability**: Every finding must reference concrete file paths and line spans. Maintain REQ/BUG IDs in filenames and report headers.
17
17
 
@@ -28,12 +28,12 @@ The main agent must supply:
28
28
  - `phaseSlug`: lowercase kebab-case of phase name (e.g., `phase-2-foundational`)
29
29
  - Include YAML frontmatter with:
30
30
  - `reqId`, `phase`, `completedTasks`, ISO 8601 `generatedAt`, `phaseStatus`, `decision`
31
- - Render body using `.claude/docs/templates/CODE_REVIEW_TEMPLATE.md`
31
+ - Render body using `${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/CODE_REVIEW_TEMPLATE.md`
32
32
  - Conclude with explicit **Next Actions for Main Agent** section; must state是否通过本阶段审查(Pass/Fail)。
33
33
 
34
34
  ## Execution Flow
35
35
  1. **Validate Context**
36
- - Run `.claude/scripts/check-prerequisites.sh --json --require-epic --require-tasks`
36
+ - Run `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json --require-epic --require-tasks`
37
37
  - Confirm `TASKS.md` exists, `PRD.md`、`EPIC.md` 可读。
38
38
  - Verify supplied `phaseId` is marked complete (all `[x]`).
39
39
  2. **Load Scope Sources**
@@ -43,7 +43,7 @@ The main agent must supply:
43
43
  - If `artifactPaths` provided → read only这些文件;否则依据上一阶段 review frontmatter 的 `gitRef` / 当前 `phaseTasks` 推导 `git diff`.
44
44
  - NEVER include unrelated files; flag任何超出 PRD/EPIC 的新增功能。
45
45
  4. **Invoke High-Signal Review**
46
- - Load `.claude/commands/code-review-high.md` 与 `.claude/docs/templates/CODE_REVIEW_TEMPLATE.md`.
46
+ - Load `${DEVFLOW_CLAUDE_DIR:-.claude}/commands/code-review-high.md` 与 `${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/CODE_REVIEW_TEMPLATE.md`.
47
47
  - Compose prompt:包含 phase 摘要、任务列表、PRD/EPIC 摘要、既往整改状态、相关代码 snippet(≤8k tokens)。
48
48
  - Execute `/code-review-high` 生成原始审查。
49
49
  5. **Normalize & Persist**
@@ -54,7 +54,7 @@ The main agent must supply:
54
54
  - Append entry to `devflow/requirements/${reqId}/EXECUTION_LOG.md`: `"${phaseId} code review completed - ${decision}"`.
55
55
 
56
56
  ## Coordination Rules
57
- - Respect `.claude/rules/agent-coordination.md` for logging and concurrency.
57
+ - Respect Agent Coordination rules for logging and concurrency.
58
58
  - Honor Constitution gates—if violations appear, they must be highlighted in findings.
59
59
  - Compare implementation against PRD and EPIC requirements
60
60
  - Note any scope divergence or architectural concerns
@@ -17,32 +17,32 @@ Your role:
17
17
  ## Rules Integration
18
18
  You MUST follow these rules during compatibility analysis:
19
19
 
20
- 1. **Standard Patterns** (.claude/rules/core-patterns.md):
20
+ 1. **Standard Patterns**:
21
21
  - Apply Fail Fast principle: validate version inputs immediately
22
22
  - Use Clear Errors for incompatible version comparisons
23
23
  - Maintain Minimal Output with focused compatibility metrics
24
24
  - Follow Structured Output format for consistent reports
25
25
 
26
- 2. **Agent Coordination** (.claude/rules/agent-coordination.md):
26
+ 2. **Agent Coordination**:
27
27
  - Update orchestration_status.json when analysis begins/completes
28
28
  - Create completion markers (.completed files) after successful analysis
29
29
  - Coordinate with impact-analyzer for change assessment
30
30
  - Research-only agent: no file modifications, only document generation
31
31
 
32
- 3. **DateTime Handling** (.claude/rules/datetime.md):
32
+ 3. **DateTime Handling**:
33
33
  - Use ISO 8601 UTC timestamps in all reports
34
34
  - Track version timestamps accurately
35
35
  - Support timezone-aware compatibility analysis
36
36
  - Maintain consistent datetime formatting
37
37
 
38
- 4. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
38
+ 4. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
39
39
  - Enforce REQ-ID format validation (REQ-\d+)
40
- - Use standardized report templates from .claude/docs/templates/
40
+ - Use standardized report templates from ${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/
41
41
  - Apply consistent compatibility scoring methodology
42
42
  - Maintain version traceability links
43
43
 
44
44
  ## Constitution Compliance
45
- You MUST adhere to CC-DevFlow Constitution (.claude/constitution/project-constitution.md):
45
+ You MUST adhere to CC-DevFlow Constitution (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md):
46
46
 
47
47
  1. **Quality First**:
48
48
  - NO PARTIAL ANALYSIS: Complete compatibility assessment or report insufficient data
@@ -77,7 +77,7 @@ Before compatibility analysis, validate prerequisites:
77
77
  export DEVFLOW_REQ_ID="${reqId}"
78
78
 
79
79
  # Run prerequisite check
80
- bash .claude/scripts/check-prerequisites.sh --json
80
+ bash ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json
81
81
 
82
82
  # Validate:
83
83
  # - REQ-ID format correct
@@ -17,32 +17,32 @@ Your role:
17
17
  ## Rules Integration
18
18
  You MUST follow these rules during consistency verification:
19
19
 
20
- 1. **Standard Patterns** (.claude/rules/core-patterns.md):
20
+ 1. **Standard Patterns**:
21
21
  - Apply Fail Fast principle: validate document existence before analysis
22
22
  - Use Clear Errors for missing or malformed documents
23
23
  - Maintain Minimal Output with focused inconsistency reports
24
24
  - Follow Structured Output format for traceability matrices
25
25
 
26
- 2. **Agent Coordination** (.claude/rules/agent-coordination.md):
26
+ 2. **Agent Coordination**:
27
27
  - Update orchestration_status.json when verification starts/completes
28
28
  - Create completion markers after successful consistency check
29
29
  - Research-only agent: no code changes, only analysis documents
30
30
  - Coordinate with qa-tester and security-reviewer for validation alignment
31
31
 
32
- 3. **DateTime Handling** (.claude/rules/datetime.md):
32
+ 3. **DateTime Handling**:
33
33
  - Use ISO 8601 UTC timestamps in all consistency reports
34
34
  - Track document modification times accurately
35
35
  - Support timezone-aware consistency tracking
36
36
  - Maintain consistent datetime formatting across reports
37
37
 
38
- 4. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
38
+ 4. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
39
39
  - Enforce REQ-ID format validation (REQ-\d+)
40
40
  - Use standardized consistency report templates
41
41
  - Apply consistent scoring methodology across all checks
42
42
  - Maintain bidirectional traceability links
43
43
 
44
44
  ## Constitution Compliance
45
- You MUST adhere to CC-DevFlow Constitution (.claude/constitution/project-constitution.md):
45
+ You MUST adhere to CC-DevFlow Constitution (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md):
46
46
 
47
47
  1. **Quality First**:
48
48
  - NO PARTIAL VERIFICATION: Complete consistency check or report insufficient data
@@ -77,7 +77,7 @@ Before consistency analysis, validate prerequisites:
77
77
  export DEVFLOW_REQ_ID="${reqId}"
78
78
 
79
79
  # Run prerequisite check
80
- bash .claude/scripts/check-prerequisites.sh --json
80
+ bash ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json
81
81
 
82
82
  # Validate:
83
83
  # - REQ-ID format correct
@@ -16,32 +16,32 @@ Your role:
16
16
  ## Rules Integration
17
17
  You MUST follow these rules during impact analysis:
18
18
 
19
- 1. **Standard Patterns** (.claude/rules/core-patterns.md):
19
+ 1. **Standard Patterns**:
20
20
  - Apply Fail Fast principle: validate version inputs immediately
21
21
  - Use Clear Errors for missing versions or invalid comparisons
22
22
  - Maintain Minimal Output with focused impact metrics
23
23
  - Follow Structured Output format for consistent impact reports
24
24
 
25
- 2. **Agent Coordination** (.claude/rules/agent-coordination.md):
25
+ 2. **Agent Coordination**:
26
26
  - Update orchestration_status.json when analysis begins/completes
27
27
  - Create completion markers (.completed files) after analysis
28
28
  - Research-only agent: no code modifications, only analysis documents
29
29
  - Coordinate with compatibility-checker for version management
30
30
 
31
- 3. **DateTime Handling** (.claude/rules/datetime.md):
31
+ 3. **DateTime Handling**:
32
32
  - Use ISO 8601 UTC timestamps in all impact reports
33
33
  - Track version timestamps accurately
34
34
  - Support timezone-aware impact tracking
35
35
  - Maintain consistent datetime formatting
36
36
 
37
- 4. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
37
+ 4. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
38
38
  - Enforce REQ-ID format validation (REQ-\d+)
39
- - Use standardized impact report templates from .claude/docs/templates/
39
+ - Use standardized impact report templates from ${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/
40
40
  - Apply consistent impact scoring methodology
41
41
  - Maintain version traceability links
42
42
 
43
43
  ## Constitution Compliance
44
- You MUST adhere to CC-DevFlow Constitution (.claude/constitution/project-constitution.md):
44
+ You MUST adhere to CC-DevFlow Constitution (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md):
45
45
 
46
46
  1. **Quality First**:
47
47
  - NO PARTIAL ANALYSIS: Complete impact assessment or report insufficient data
@@ -76,7 +76,7 @@ Before impact analysis, validate prerequisites:
76
76
  export DEVFLOW_REQ_ID="${reqId}"
77
77
 
78
78
  # Run prerequisite check
79
- bash .claude/scripts/check-prerequisites.sh --json
79
+ bash ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json
80
80
 
81
81
  # Validate:
82
82
  # - REQ-ID format correct
@@ -31,27 +31,27 @@ Before ANY technical design, you MUST execute Phase -1 Constitutional Gates from
31
31
  ## Rules Integration
32
32
  You MUST follow these rules during planning:
33
33
 
34
- 1. **Standard Patterns** (.claude/rules/core-patterns.md):
34
+ 1. **Standard Patterns**:
35
35
  - Apply Fail Fast principle: validate PRD completeness before planning
36
36
  - Use Clear Errors when task dependencies create circular references
37
37
  - Maintain Minimal Output with focused, atomic task breakdowns
38
38
  - Follow Structured Output format for consistent task documentation
39
39
 
40
- 2. **Agent Coordination** (.claude/rules/agent-coordination.md):
40
+ 2. **Agent Coordination**:
41
41
  - Update status in LOG.md when planning begins and completes
42
42
  - Implement proper error propagation for invalid task dependencies
43
43
  - Coordinate with flow-orchestrator for scope validation
44
44
  - Use file locks to prevent concurrent planning modifications
45
45
 
46
- 3. **DateTime Handling** (.claude/rules/datetime.md):
46
+ 3. **DateTime Handling**:
47
47
  - Include ISO 8601 UTC timestamps in all task metadata
48
48
  - Use real system time for planning and estimation timestamps
49
49
  - Handle timezone-aware deadline calculations correctly
50
50
  - Support cross-platform datetime operations in sprint planning
51
51
 
52
- 4. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
52
+ 4. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
53
53
  - Enforce ID format validation in all task metadata (REQ-XXX or BUG-XXX)
54
- - Use standardized task template structure from .claude/docs/templates/
54
+ - Use standardized task template structure from ${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/
55
55
  - Apply consistent task naming:
56
56
  - Requirements: TASK_${reqId}_${sequence}
57
57
  - BUG Fixes: TASK_${bugId}_${sequence}
@@ -134,7 +134,7 @@ DoD mapping:
134
134
  Process:
135
135
 
136
136
  **For Requirements**:
137
- 1. Run `.claude/scripts/setup-epic.sh --json` to get paths and setup EPIC/TASKS structure
137
+ 1. Run `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/setup-epic.sh --json` to get paths and setup EPIC/TASKS structure
138
138
  2. **Read TECH_DESIGN.md** (CRITICAL INPUT):
139
139
  - Load: devflow/requirements/${reqId}/TECH_DESIGN.md
140
140
  - Extract: System architecture, technology stack, data models, API contracts
@@ -186,7 +186,7 @@ Process:
186
186
  9. Validate completeness using Validation Checklist in template
187
187
 
188
188
  **For BUG Fixes**:
189
- 1. Run `.claude/scripts/setup-epic.sh --json` to get paths (adapts for BUG type)
189
+ 1. Run `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/setup-epic.sh --json` to get paths (adapts for BUG type)
190
190
  2. Read ANALYSIS.md and understand BUG details, root cause, impact
191
191
  3. Define fix strategy in PLAN.md with risk assessment
192
192
  4. Generate TASKS.md following TDD order for bug fixes:
@@ -34,37 +34,37 @@ Your role is **NOT** to create comprehensive PRDs with every possible feature. Y
34
34
  ## Rules Integration
35
35
  You MUST follow these rules during PRD writing:
36
36
 
37
- 1. **Standard Patterns** (.claude/rules/core-patterns.md):
37
+ 1. **Standard Patterns**:
38
38
  - Apply Fail Fast principle: validate input requirements immediately
39
39
  - Use Clear Errors when requirements are ambiguous or incomplete
40
40
  - Maintain Minimal Output with concise, actionable acceptance criteria
41
41
  - Follow Structured Output format for consistent PRD sections
42
42
 
43
- 2. **Agent Coordination** (.claude/rules/agent-coordination.md):
43
+ 2. **Agent Coordination**:
44
44
  - Update status in LOG.md when PRD writing begins and completes
45
45
  - Implement proper error handling for missing or invalid plan sources
46
46
  - Coordinate with flow-orchestrator for requirement validation
47
47
  - Use file locks to prevent concurrent PRD modifications
48
48
 
49
- 3. **DateTime Handling** (.claude/rules/datetime.md):
49
+ 3. **DateTime Handling**:
50
50
  - Include ISO 8601 UTC timestamps in YAML frontmatter
51
51
  - Use real system time for created/updated metadata
52
52
  - Handle timezone-aware deadline specifications correctly
53
53
  - Support cross-platform datetime operations in requirements
54
54
 
55
- 4. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
55
+ 4. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
56
56
  - Enforce REQ-ID format validation in metadata (REQ-\d+)
57
- - Use standardized PRD template structure from .claude/docs/templates/
57
+ - Use standardized PRD template structure from ${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/
58
58
  - Apply consistent user story formatting with Given-When-Then criteria
59
59
  - Maintain traceability links to plan sources and external references
60
60
 
61
- 5. **MCP Integration** (.claude/rules/mcp-integration.md):
61
+ 5. **MCP Integration**:
62
62
  - Use WebFetch tool for retrieving external requirement sources
63
63
  - Apply URL validation rules before fetching content
64
64
  - Implement retry logic for failed content retrieval
65
65
  - Cache fetched content to reduce redundant API calls
66
66
 
67
- 6. **Constitution** (.claude/constitution/):
67
+ 6. **Constitution** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md):
68
68
  - **Quality First**: Ensure PRD completeness, no partial requirements
69
69
  - **Security First**: Identify and document security requirements
70
70
  - **Architecture Consistency**: Align with existing system architecture
@@ -75,7 +75,7 @@ You MUST use the unified script infrastructure for all path and setup operations
75
75
  1. **Get Requirement Paths**: Use `check-prerequisites.sh` to retrieve all paths
76
76
  ```bash
77
77
  # Get paths in JSON format for parsing
78
- .claude/scripts/check-prerequisites.sh --json --paths-only
78
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json --paths-only
79
79
 
80
80
  # Expected output:
81
81
  # {"REQ_ID":"REQ-123","REQ_DIR":"/path/to/req","AVAILABLE_DOCS":["research/"]}
@@ -84,7 +84,7 @@ You MUST use the unified script infrastructure for all path and setup operations
84
84
  2. **Validate Prerequisites**: Check available context before PRD generation
85
85
  ```bash
86
86
  # Check what documents are available
87
- .claude/scripts/check-prerequisites.sh
87
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh
88
88
 
89
89
  # This returns information about research materials, existing docs, etc.
90
90
  ```
@@ -92,7 +92,7 @@ You MUST use the unified script infrastructure for all path and setup operations
92
92
  3. **Log Events**: Use common.sh logging for all significant actions
93
93
  ```bash
94
94
  # Log PRD generation start/complete
95
- source .claude/scripts/common.sh
95
+ source ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/common.sh
96
96
  log_event "$REQ_ID" "PRD generation started"
97
97
  log_event "$REQ_ID" "PRD generation completed"
98
98
  ```
@@ -103,7 +103,7 @@ You MUST use the unified script infrastructure for all path and setup operations
103
103
  - 在 PRD 中确保需求可追溯性和一致性
104
104
 
105
105
  ## Template Usage
106
- MUST use the **self-executable PRD_TEMPLATE.md** from `.claude/docs/templates/`:
106
+ MUST use the **self-executable PRD_TEMPLATE.md** from `${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/`:
107
107
 
108
108
  1. **Load Template**: Read PRD_TEMPLATE.md to understand the Execution Flow and **CRITICAL ANTI-EXPANSION RULES**
109
109
 
@@ -169,9 +169,9 @@ devflow/requirements/${reqId}/
169
169
  ## Enhanced Process for Intent-driven Inputs
170
170
 
171
171
  ### Standard Process (Structured Inputs):
172
- 1. **Run Prerequisites Check**: `.claude/scripts/check-prerequisites.sh --json --paths-only`
172
+ 1. **Run Prerequisites Check**: `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json --paths-only`
173
173
  2. **Read Research Materials**: Load all context from `research/` directory
174
- 3. **Load PRD Template**: Read `.claude/docs/templates/PRD_TEMPLATE.md`
174
+ 3. **Load PRD Template**: Read `${DEVFLOW_CLAUDE_DIR:-.claude}/docs/templates/PRD_TEMPLATE.md`
175
175
  4. **Follow Execution Flow**: Execute template's step-by-step Execution Flow
176
176
  5. **Extract Requirements**: Identify key requirements and constraints
177
177
  6. **Structure User Stories**: Create INVEST-compliant stories with Given-When-Then criteria
@@ -181,7 +181,7 @@ devflow/requirements/${reqId}/
181
181
  - **Article X - Requirement Boundary**: No speculative features? All unclear marked?
182
182
  - **Article III - Security First**: Secret management defined? No hardcoded secrets?
183
183
  - **Article II - Architectural Consistency**: Can leverage existing systems?
184
- - See `.claude/constitution/project-constitution.md` for all 10 Articles
184
+ - See `${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md` for all 10 Articles
185
185
  9. **Validate Completeness**: Use Validation Checklist from template
186
186
  10. **Write Complete PRD**: Output PRD.md with all sections filled, no placeholders
187
187
  11. **Log Event**: `log_event "$REQ_ID" "PRD generation completed"`
@@ -300,7 +300,7 @@ PRD must meet these standards before completion:
300
300
 
301
301
  ### Constitution Compliance
302
302
 
303
- **Reference**: `.claude/constitution/project-constitution.md` (v2.0.0)
303
+ **Reference**: `${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md` (v2.0.0)
304
304
 
305
305
  - [ ] **Article I - Quality First**: All requirements fully defined, no partial specs
306
306
  - [ ] **Article X - Requirement Boundary**: No speculative features, all unclear marked with [NEEDS CLARIFICATION]
@@ -115,7 +115,7 @@ interface ArchitectureData {
115
115
  };
116
116
  };
117
117
  module_structure: {
118
- directories: string[]; // ["src/", "backend/", ".claude/"]
118
+ directories: string[]; // ["src/", "backend/", "${DEVFLOW_CLAUDE_DIR:-.claude}/"]
119
119
  tree: Record<string, string[]>; // {"src/": ["components/", "services/"]}
120
120
  };
121
121
  architecture_decisions: ADRRecord[];
@@ -351,8 +351,8 @@ if (archData.warnings.length > 0) {
351
351
  ```typescript
352
352
  // Determine reference directory
353
353
  const referenceDir = target_skill === 'frontend-guidelines'
354
- ? '.claude/skills/_reference-implementations/frontend-react-mui/'
355
- : '.claude/skills/_reference-implementations/backend-express-prisma/';
354
+ ? '${DEVFLOW_CLAUDE_DIR:-.claude}/skills/_reference-implementations/frontend-react-mui/'
355
+ : '${DEVFLOW_CLAUDE_DIR:-.claude}/skills/_reference-implementations/backend-express-prisma/';
356
356
 
357
357
  // Read reference SKILL.md
358
358
  const referenceSkill = await Read(`${referenceDir}SKILL.md`);
@@ -667,7 +667,7 @@ if (scope === 'backend-only') {
667
667
  **Objective**: Write generated content to correct locations.
668
668
 
669
669
  ```typescript
670
- const outputDir = `.claude/skills/${target_skill}/`;
670
+ const outputDir = `${DEVFLOW_CLAUDE_DIR:-.claude}/skills/${target_skill}/`;
671
671
 
672
672
  // Create directory if doesn't exist
673
673
  await Bash(`mkdir -p ${outputDir}resources/`);
@@ -711,7 +711,7 @@ for (const pattern of hardcodedPaths) {
711
711
 
712
712
  ```typescript
713
713
  // Read existing skill-rules.json
714
- const rulesPath = '.claude/skills/skill-rules.json';
714
+ const rulesPath = '${DEVFLOW_CLAUDE_DIR:-.claude}/skills/skill-rules.json';
715
715
  const rules = JSON.parse(await Read(rulesPath));
716
716
 
717
717
  // Generate path patterns based on project structure
@@ -960,13 +960,13 @@ function generateKeywords({ target_skill, tech_stack, archData }) {
960
960
  "data_fetching": "TanStack Query"
961
961
  },
962
962
  "files_created": [
963
- ".claude/skills/frontend-guidelines/SKILL.md",
964
- ".claude/skills/frontend-guidelines/resources/component-patterns.md",
965
- ".claude/skills/frontend-guidelines/resources/data-fetching.md",
966
- ".claude/skills/frontend-guidelines/resources/styling-guide.md",
967
- ".claude/skills/frontend-guidelines/resources/routing-guide.md",
968
- ".claude/skills/frontend-guidelines/resources/performance.md",
969
- ".claude/skills/frontend-guidelines/resources/typescript-standards.md"
963
+ "${DEVFLOW_CLAUDE_DIR:-.claude}/skills/frontend-guidelines/SKILL.md",
964
+ "${DEVFLOW_CLAUDE_DIR:-.claude}/skills/frontend-guidelines/resources/component-patterns.md",
965
+ "${DEVFLOW_CLAUDE_DIR:-.claude}/skills/frontend-guidelines/resources/data-fetching.md",
966
+ "${DEVFLOW_CLAUDE_DIR:-.claude}/skills/frontend-guidelines/resources/styling-guide.md",
967
+ "${DEVFLOW_CLAUDE_DIR:-.claude}/skills/frontend-guidelines/resources/routing-guide.md",
968
+ "${DEVFLOW_CLAUDE_DIR:-.claude}/skills/frontend-guidelines/resources/performance.md",
969
+ "${DEVFLOW_CLAUDE_DIR:-.claude}/skills/frontend-guidelines/resources/typescript-standards.md"
970
970
  ],
971
971
  "skill_rules_updated": true,
972
972
  "triggers": {
@@ -1322,7 +1322,7 @@ async function parseTechStackSection(content, target_skill) {
1322
1322
  - ❌ Ask user questions
1323
1323
  - ❌ Make assumptions (all info in prompt)
1324
1324
  - ❌ Generate both frontend and backend in one call
1325
- - ❌ Modify files outside .claude/skills/
1325
+ - ❌ Modify files outside ${DEVFLOW_CLAUDE_DIR:-.claude}/skills/
1326
1326
 
1327
1327
  ---
1328
1328
 
@@ -34,31 +34,31 @@ Called by main agent AFTER code implementation with prompt containing "test repo
34
34
  ## Rules Integration
35
35
  You MUST follow these rules during testing:
36
36
 
37
- 1. **Standard Patterns** (.claude/rules/core-patterns.md):
37
+ 1. **Standard Patterns**:
38
38
  - Apply Fail Fast principle: validate test requirements before execution
39
39
  - Use Clear Errors when tests fail with detailed failure descriptions
40
40
  - Maintain Minimal Output with concise test reports and coverage metrics
41
41
  - Follow Trust System principle for existing test infrastructure
42
42
 
43
- 2. **Agent Coordination** (.claude/rules/agent-coordination.md):
43
+ 2. **Agent Coordination**:
44
44
  - Update status in LOG.md when testing begins and completes
45
45
  - Implement proper error propagation back to main agent
46
46
  - Coordinate with flow-orchestrator for quality gate enforcement
47
47
  - Use file locks to prevent concurrent test execution conflicts
48
48
 
49
- 3. **Test Execution** (.claude/rules/test-execution.md):
49
+ 3. **Test Execution**:
50
50
  - Never mock external services in integration tests
51
51
  - Capture verbose test output for comprehensive audit trails
52
52
  - Enforce minimum coverage thresholds as defined in QUALITY.md
53
53
  - Run tests in isolated environments to prevent interference
54
54
 
55
- 4. **DateTime Handling** (.claude/rules/datetime.md):
55
+ 4. **DateTime Handling**:
56
56
  - Include ISO 8601 UTC timestamps in test reports and logs
57
57
  - Use real system time for test execution timing metrics
58
58
  - Handle timezone-aware testing scenarios correctly
59
59
  - Support cross-platform datetime operations in test data
60
60
 
61
- 5. **DevFlow Patterns** (.claude/rules/devflow-conventions.md):
61
+ 5. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
62
62
  - Enforce REQ-ID format in test documentation and reports
63
63
  - Use standardized test report structure from templates
64
64
  - Apply consistent test naming conventions and organization
@@ -70,7 +70,7 @@ You MUST use the unified script infrastructure for all operations:
70
70
  1. **Get Requirement Paths**: Use `check-prerequisites.sh` to retrieve paths
71
71
  ```bash
72
72
  # Get paths in JSON format
73
- .claude/scripts/check-prerequisites.sh --json --require-epic --require-tasks
73
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json --require-epic --require-tasks
74
74
 
75
75
  # Expected output includes REQ_ID, REQ_DIR, and all available documents
76
76
  ```
@@ -78,7 +78,7 @@ You MUST use the unified script infrastructure for all operations:
78
78
  2. **Validate Prerequisites**: Check available context before test planning
79
79
  ```bash
80
80
  # Check what documents are available for testing
81
- .claude/scripts/check-prerequisites.sh --include-tasks
81
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --include-tasks
82
82
 
83
83
  # Verify PRD, EPIC, and TASKS exist before creating test plan
84
84
  ```
@@ -86,7 +86,7 @@ You MUST use the unified script infrastructure for all operations:
86
86
  3. **Log Events**: Use common.sh logging for all significant actions
87
87
  ```bash
88
88
  # Log test plan generation and analysis
89
- source .claude/scripts/common.sh
89
+ source ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/common.sh
90
90
  log_event "$REQ_ID" "Test plan generation started"
91
91
  log_event "$REQ_ID" "Test report analysis completed"
92
92
  ```
@@ -94,7 +94,7 @@ You MUST use the unified script infrastructure for all operations:
94
94
  4. **Check Task Status**: Use check-task-status.sh to understand progress
95
95
  ```bash
96
96
  # Get current task status
97
- .claude/scripts/check-task-status.sh --json
97
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-task-status.sh --json
98
98
 
99
99
  # Use this to understand which tasks need testing
100
100
  ```
@@ -135,7 +135,7 @@ When called by main agent with "test report" in prompt, you will receive:
135
135
  - **MUST OUTPUT**: `devflow/bugs/${bugId}/TEST_REPORT.md`
136
136
 
137
137
  ## Phase 1: Test Planning Process (Pre-Implementation)
138
- 1. **Run Prerequisites Check**: `.claude/scripts/check-prerequisites.sh --json --require-epic --require-tasks`
138
+ 1. **Run Prerequisites Check**: `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json --require-epic --require-tasks`
139
139
  2. **Read Documents**: Load PRD.md, EPIC.md, and TASKS.md from requirement directory
140
140
  3. **Analyze TDD Structure**: Verify Phase 2 (Tests First) exists and understand test requirements
141
141
  4. **Extract Acceptance Criteria**: Parse user stories and Given-When-Then criteria
@@ -148,7 +148,7 @@ When called by main agent with "test report" in prompt, you will receive:
148
148
  11. **Log Event**: `log_event "$REQ_ID" "Test plan generation completed"`
149
149
 
150
150
  ## Phase 2: Test Analysis Process (Post-Implementation)
151
- 1. **Run Prerequisites Check**: `.claude/scripts/check-prerequisites.sh --json`
151
+ 1. **Run Prerequisites Check**: `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json`
152
152
  2. **Read Implementation**: Analyze all implemented code files provided
153
153
  3. **Review Test Results**: Parse test execution output and coverage reports
154
154
  4. **Evaluate TDD Compliance**: Verify Phase 2 tests were written before Phase 3 implementation