create-ai-project 1.14.7 → 1.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents-en/code-verifier.md +2 -0
- package/.claude/agents-en/investigator.md +2 -0
- package/.claude/agents-en/scope-discoverer.md +2 -0
- package/.claude/agents-en/task-decomposer.md +1 -40
- package/.claude/agents-en/verifier.md +2 -0
- package/.claude/agents-ja/code-verifier.md +2 -0
- package/.claude/agents-ja/investigator.md +2 -0
- package/.claude/agents-ja/scope-discoverer.md +2 -0
- package/.claude/agents-ja/task-decomposer.md +1 -40
- package/.claude/agents-ja/verifier.md +2 -0
- package/.claude/commands-en/add-integration-tests.md +74 -0
- package/.claude/commands-en/front-reverse-design.md +183 -0
- package/.claude/commands-en/front-review.md +89 -0
- package/.claude/commands-en/review.md +1 -1
- package/.claude/commands-ja/add-integration-tests.md +74 -0
- package/.claude/commands-ja/front-reverse-design.md +183 -0
- package/.claude/commands-ja/front-review.md +89 -0
- package/.claude/commands-ja/reverse-engineer.md +1 -1
- package/.claude/commands-ja/review.md +1 -1
- package/.claude/skills-en/documentation-criteria/SKILL.md +2 -0
- package/.claude/skills-en/documentation-criteria/references/task-template.md +38 -0
- package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +14 -30
- package/.claude/skills-ja/documentation-criteria/SKILL.md +2 -0
- package/.claude/skills-ja/documentation-criteria/references/task-template.md +38 -0
- package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +15 -27
- package/README.ja.md +5 -2
- package/README.md +5 -2
- package/package.json +1 -1
|
@@ -101,46 +101,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
|
|
|
101
101
|
|
|
102
102
|
## Task File Template
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
# Task: [Task Name]
|
|
106
|
-
|
|
107
|
-
Metadata:
|
|
108
|
-
- Dependencies: task-01 → Deliverable: docs/plans/analysis/research-results.md
|
|
109
|
-
- Provides: docs/plans/analysis/api-spec.md (for research/design tasks)
|
|
110
|
-
- Size: Small (1-2 files)
|
|
111
|
-
|
|
112
|
-
## Implementation Content
|
|
113
|
-
[What this task will achieve]
|
|
114
|
-
*Reference dependency deliverables if applicable
|
|
115
|
-
|
|
116
|
-
## Target Files
|
|
117
|
-
- [ ] [Implementation file path]
|
|
118
|
-
- [ ] [Test file path]
|
|
119
|
-
|
|
120
|
-
## Implementation Steps (TDD: Red-Green-Refactor)
|
|
121
|
-
### 1. Red Phase
|
|
122
|
-
- [ ] Review dependency deliverables (if any)
|
|
123
|
-
- [ ] Verify/create type definitions
|
|
124
|
-
- [ ] Write failing tests
|
|
125
|
-
- [ ] Run tests and confirm failure
|
|
126
|
-
|
|
127
|
-
### 2. Green Phase
|
|
128
|
-
- [ ] Add minimal implementation to pass tests
|
|
129
|
-
- [ ] Run only added tests and confirm they pass
|
|
130
|
-
|
|
131
|
-
### 3. Refactor Phase
|
|
132
|
-
- [ ] Improve code (maintain passing tests)
|
|
133
|
-
- [ ] Confirm added tests still pass
|
|
134
|
-
|
|
135
|
-
## Completion Criteria
|
|
136
|
-
- [ ] All added tests pass
|
|
137
|
-
- [ ] Operation verified (select L1/L2/L3, per implementation-approach.md)
|
|
138
|
-
- [ ] Deliverables created (for research/design tasks)
|
|
139
|
-
|
|
140
|
-
## Notes
|
|
141
|
-
- Impact scope: [Areas where changes may propagate]
|
|
142
|
-
- Constraints: [Areas not to be modified]
|
|
143
|
-
```
|
|
104
|
+
See task template in documentation-criteria skill for details.
|
|
144
105
|
|
|
145
106
|
## Overall Design Document Template
|
|
146
107
|
|
|
@@ -101,46 +101,7 @@ implementation-approachスキルで決定された実装戦略パターンに基
|
|
|
101
101
|
|
|
102
102
|
## タスクファイルテンプレート
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
# タスク: [タスク名]
|
|
106
|
-
|
|
107
|
-
メタ情報:
|
|
108
|
-
- 依存: task-01 → 成果物: docs/plans/analysis/調査結果.md
|
|
109
|
-
- 提供: docs/plans/analysis/api-spec.md(調査・設計タスクの場合)
|
|
110
|
-
- サイズ: 小規模(1-2ファイル)
|
|
111
|
-
|
|
112
|
-
## 実装内容
|
|
113
|
-
[このタスクで実現すること]
|
|
114
|
-
※依存成果物がある場合、その内容を参照して実装
|
|
115
|
-
|
|
116
|
-
## 対象ファイル
|
|
117
|
-
- [ ] [実装ファイルパス]
|
|
118
|
-
- [ ] [テストファイルパス]
|
|
119
|
-
|
|
120
|
-
## 実装手順(TDD: Red-Green-Refactor)
|
|
121
|
-
### 1. Red Phase
|
|
122
|
-
- [ ] 依存成果物の確認(ある場合)
|
|
123
|
-
- [ ] 型定義の確認/作成
|
|
124
|
-
- [ ] 失敗するテストを作成
|
|
125
|
-
- [ ] テスト実行して失敗を確認
|
|
126
|
-
|
|
127
|
-
### 2. Green Phase
|
|
128
|
-
- [ ] テストが通る最小限の実装
|
|
129
|
-
- [ ] 追加したテストのみ実行して通ることを確認
|
|
130
|
-
|
|
131
|
-
### 3. Refactor Phase
|
|
132
|
-
- [ ] コード改善(テストが通る状態を維持)
|
|
133
|
-
- [ ] 追加したテストが引き続き通ることを確認
|
|
134
|
-
|
|
135
|
-
## 完了条件
|
|
136
|
-
- [ ] 追加したテストが全てパス
|
|
137
|
-
- [ ] 動作確認完了(L1/L2/L3から選択、implementation-approach.md準拠)
|
|
138
|
-
- [ ] 成果物作成完了(調査・設計タスクの場合)
|
|
139
|
-
|
|
140
|
-
## 注意事項
|
|
141
|
-
- 影響範囲: [変更が波及する箇所]
|
|
142
|
-
- 制約: [変更禁止箇所]
|
|
143
|
-
```
|
|
104
|
+
詳細はdocumentation-criteriaスキルのタスクテンプレートを参照。
|
|
144
105
|
|
|
145
106
|
## 全体設計書テンプレート
|
|
146
107
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: add-integration-tests
|
|
3
|
+
description: Add integration/E2E tests to existing backend codebase using Design Doc
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**Command Context**: Test addition workflow for existing backend implementations
|
|
7
|
+
|
|
8
|
+
**Scope**: Backend only (acceptance-test-generator supports backend only)
|
|
9
|
+
|
|
10
|
+
## Execution Method
|
|
11
|
+
|
|
12
|
+
- Skeleton generation -> performed by acceptance-test-generator
|
|
13
|
+
- Task file creation -> following task template (see documentation-criteria skill)
|
|
14
|
+
- Test implementation -> performed by task-executor
|
|
15
|
+
- Test review -> performed by integration-test-reviewer
|
|
16
|
+
- Quality checks -> performed by quality-fixer
|
|
17
|
+
|
|
18
|
+
Orchestrator invokes sub-agents and passes structured JSON between them.
|
|
19
|
+
|
|
20
|
+
Design Doc path: $ARGUMENTS
|
|
21
|
+
|
|
22
|
+
**Think deeply** Understand the essence of test addition and execute:
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
- Design Doc must exist (created manually or via reverse-engineer)
|
|
26
|
+
- Existing implementation to test
|
|
27
|
+
|
|
28
|
+
## Execution Flow
|
|
29
|
+
|
|
30
|
+
### 1. Validate Design Doc
|
|
31
|
+
```bash
|
|
32
|
+
# Verify Design Doc exists
|
|
33
|
+
ls $ARGUMENTS || ls docs/design/*.md | grep -v template | tail -1
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. Execute acceptance-test-generator
|
|
37
|
+
Generate test skeletons from Design Doc:
|
|
38
|
+
- Extract Acceptance Criteria (AC)
|
|
39
|
+
- Generate integration test skeletons (`*.int.test.ts`)
|
|
40
|
+
- Generate E2E test skeletons if applicable (`*.e2e.test.ts`)
|
|
41
|
+
|
|
42
|
+
### 3. Create Task File
|
|
43
|
+
Create task file following task template (see documentation-criteria skill):
|
|
44
|
+
- Path: `docs/plans/tasks/integration-tests-YYYYMMDD.md`
|
|
45
|
+
- Content: Test implementation tasks based on generated skeletons
|
|
46
|
+
- Include skeleton file paths in Target Files section
|
|
47
|
+
|
|
48
|
+
### 4. Execute task-executor
|
|
49
|
+
Implement tests following the task file:
|
|
50
|
+
- Follow TDD principles (Red-Green-Refactor)
|
|
51
|
+
- Implement each skeleton test case
|
|
52
|
+
- Run tests and verify they pass
|
|
53
|
+
|
|
54
|
+
### 5. Execute integration-test-reviewer
|
|
55
|
+
Review test quality:
|
|
56
|
+
- Verify skeleton compliance
|
|
57
|
+
- Check test coverage
|
|
58
|
+
- If `needs_revision` -> Return to step 4 with `requiredFixes`
|
|
59
|
+
- If `approved` -> Proceed to quality check
|
|
60
|
+
|
|
61
|
+
### 6. Execute quality-fixer
|
|
62
|
+
Final quality assurance:
|
|
63
|
+
- Run all tests
|
|
64
|
+
- Verify coverage meets requirements
|
|
65
|
+
- Fix any quality issues
|
|
66
|
+
|
|
67
|
+
### 7. Commit
|
|
68
|
+
Commit test files with appropriate message.
|
|
69
|
+
|
|
70
|
+
## Delegation
|
|
71
|
+
- acceptance-test-generator: Skeleton generation
|
|
72
|
+
- task-executor: Test implementation
|
|
73
|
+
- integration-test-reviewer: Test quality review
|
|
74
|
+
- quality-fixer: Final quality check
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: front-reverse-design
|
|
3
|
+
description: Generate frontend Design Docs from existing codebase using existing PRD
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**Command Context**: Reverse engineering workflow to create frontend Design Docs from existing code
|
|
7
|
+
|
|
8
|
+
**Prerequisites**: PRD must exist (created via reverse-engineer or manually)
|
|
9
|
+
|
|
10
|
+
Target PRD: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
**TodoWrite**: Register phases first, then steps within each phase as you enter it.
|
|
13
|
+
|
|
14
|
+
## Step 0: Initial Configuration
|
|
15
|
+
|
|
16
|
+
### 0.1 Scope Confirmation
|
|
17
|
+
|
|
18
|
+
Use AskUserQuestion to confirm:
|
|
19
|
+
1. **PRD path**: Which PRD to use as basis
|
|
20
|
+
2. **Target path**: Which frontend directory/module to document
|
|
21
|
+
3. **Human review**: Yes (recommended) / No (fully autonomous)
|
|
22
|
+
|
|
23
|
+
### 0.2 Output Configuration
|
|
24
|
+
|
|
25
|
+
- Design Doc output: `docs/design/` or existing design directory
|
|
26
|
+
- Verify directories exist, create if needed
|
|
27
|
+
|
|
28
|
+
## Workflow Overview
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Step 1: Scope Discovery (all frontend components per PRD)
|
|
32
|
+
Step 2-5: Per-component loop (Generation -> Verification -> Review -> Revision)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Context Passing**: Pass structured JSON output between steps. Use `$STEP_N_OUTPUT` placeholder notation.
|
|
36
|
+
|
|
37
|
+
## Step 1: Design Doc Scope Discovery
|
|
38
|
+
|
|
39
|
+
**Task invocation**:
|
|
40
|
+
```
|
|
41
|
+
subagent_type: scope-discoverer
|
|
42
|
+
prompt: |
|
|
43
|
+
Discover frontend Design Doc targets within PRD scope.
|
|
44
|
+
|
|
45
|
+
scope_type: design-doc
|
|
46
|
+
existing_prd: $USER_PRD_PATH
|
|
47
|
+
target_path: $USER_TARGET_PATH
|
|
48
|
+
focus: frontend (React/TypeScript components, hooks, state management)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Store output as**: `$STEP_1_OUTPUT`
|
|
52
|
+
|
|
53
|
+
**Quality Gate**:
|
|
54
|
+
- At least one component discovered -> proceed
|
|
55
|
+
- No components -> ask user for hints
|
|
56
|
+
|
|
57
|
+
**Human Review Point** (if enabled): Present discovered components for confirmation.
|
|
58
|
+
|
|
59
|
+
## Step 2-5: Per-Component Processing
|
|
60
|
+
|
|
61
|
+
**Complete Steps 2->3->4->5 for each component before proceeding to the next component.**
|
|
62
|
+
|
|
63
|
+
### Step 2: Design Doc Generation
|
|
64
|
+
|
|
65
|
+
**Task invocation**:
|
|
66
|
+
```
|
|
67
|
+
subagent_type: technical-designer-frontend
|
|
68
|
+
prompt: |
|
|
69
|
+
Create Design Doc for the following frontend component based on existing code.
|
|
70
|
+
|
|
71
|
+
Operation Mode: create
|
|
72
|
+
|
|
73
|
+
Component: $COMPONENT_NAME (from $STEP_1_OUTPUT)
|
|
74
|
+
Responsibility: $COMPONENT_RESPONSIBILITY
|
|
75
|
+
Primary Files: $COMPONENT_PRIMARY_FILES
|
|
76
|
+
Public Interfaces: $COMPONENT_PUBLIC_INTERFACES
|
|
77
|
+
Dependencies: $COMPONENT_DEPENDENCIES
|
|
78
|
+
|
|
79
|
+
Parent PRD: $USER_PRD_PATH
|
|
80
|
+
|
|
81
|
+
Document current architecture. Do not propose changes.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Store output as**: `$STEP_2_OUTPUT`
|
|
85
|
+
|
|
86
|
+
### Step 3: Code Verification
|
|
87
|
+
|
|
88
|
+
**Task invocation**:
|
|
89
|
+
```
|
|
90
|
+
subagent_type: code-verifier
|
|
91
|
+
prompt: |
|
|
92
|
+
Verify consistency between Design Doc and code implementation.
|
|
93
|
+
|
|
94
|
+
doc_type: design-doc
|
|
95
|
+
document_path: $STEP_2_OUTPUT
|
|
96
|
+
code_paths: $COMPONENT_PRIMARY_FILES
|
|
97
|
+
verbose: false
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Store output as**: `$STEP_3_OUTPUT`
|
|
101
|
+
|
|
102
|
+
**Quality Gate**:
|
|
103
|
+
- consistencyScore >= 70 -> proceed to review
|
|
104
|
+
- consistencyScore < 70 -> flag for detailed review
|
|
105
|
+
|
|
106
|
+
### Step 4: Review
|
|
107
|
+
|
|
108
|
+
**Required Input**: $STEP_3_OUTPUT (verification JSON from Step 3)
|
|
109
|
+
|
|
110
|
+
**Task invocation**:
|
|
111
|
+
```
|
|
112
|
+
subagent_type: document-reviewer
|
|
113
|
+
prompt: |
|
|
114
|
+
Review the following Design Doc considering code verification findings.
|
|
115
|
+
|
|
116
|
+
doc_type: DesignDoc
|
|
117
|
+
target: $STEP_2_OUTPUT
|
|
118
|
+
mode: composite
|
|
119
|
+
|
|
120
|
+
## Code Verification Results
|
|
121
|
+
$STEP_3_OUTPUT
|
|
122
|
+
|
|
123
|
+
## Parent PRD
|
|
124
|
+
$USER_PRD_PATH
|
|
125
|
+
|
|
126
|
+
## Additional Review Focus
|
|
127
|
+
- Technical accuracy of documented interfaces
|
|
128
|
+
- Consistency with parent PRD scope
|
|
129
|
+
- Completeness of component boundary definitions
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Store output as**: `$STEP_4_OUTPUT`
|
|
133
|
+
|
|
134
|
+
### Step 5: Revision (conditional)
|
|
135
|
+
|
|
136
|
+
**Trigger Conditions** (any one of the following):
|
|
137
|
+
- Review status is "Needs Revision" or "Rejected"
|
|
138
|
+
- Critical discrepancies exist in `$STEP_3_OUTPUT`
|
|
139
|
+
- consistencyScore < 70
|
|
140
|
+
|
|
141
|
+
**Task invocation**:
|
|
142
|
+
```
|
|
143
|
+
subagent_type: technical-designer-frontend
|
|
144
|
+
prompt: |
|
|
145
|
+
Update Design Doc based on review feedback.
|
|
146
|
+
|
|
147
|
+
Operation Mode: update
|
|
148
|
+
Existing Design Doc: $STEP_2_OUTPUT
|
|
149
|
+
|
|
150
|
+
## Review Feedback
|
|
151
|
+
$STEP_4_OUTPUT
|
|
152
|
+
|
|
153
|
+
## Discrepancies to Address
|
|
154
|
+
(Extract critical and major discrepancies from $STEP_3_OUTPUT)
|
|
155
|
+
|
|
156
|
+
Apply corrections and improvements.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Loop Control**: Maximum 2 revision cycles. After 2 cycles, flag for human review regardless of status.
|
|
160
|
+
|
|
161
|
+
### Component Completion
|
|
162
|
+
|
|
163
|
+
- [ ] Review status is "Approved" or "Approved with Conditions"
|
|
164
|
+
- [ ] Human review passed (if enabled in Step 0)
|
|
165
|
+
|
|
166
|
+
**Next**: Proceed to next component. After all components -> Final Report.
|
|
167
|
+
|
|
168
|
+
## Final Report
|
|
169
|
+
|
|
170
|
+
Output summary including:
|
|
171
|
+
- Generated documents table (Component, Design Doc Path, Consistency Score, Review Status)
|
|
172
|
+
- Action items (critical discrepancies, undocumented features, flagged items)
|
|
173
|
+
- Next steps checklist
|
|
174
|
+
|
|
175
|
+
## Error Handling
|
|
176
|
+
|
|
177
|
+
| Error | Action |
|
|
178
|
+
|-------|--------|
|
|
179
|
+
| PRD not found | Ask user for correct PRD path |
|
|
180
|
+
| Discovery finds nothing | Ask user for project structure hints |
|
|
181
|
+
| Generation fails | Log failure, continue with other components, report in summary |
|
|
182
|
+
| consistencyScore < 50 | Flag for mandatory human review, do not auto-approve |
|
|
183
|
+
| Review rejects after 2 revisions | Stop loop, flag for human intervention |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: front-review
|
|
3
|
+
description: Design Doc compliance validation with optional auto-fixes
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**Command Context**: Post-implementation quality assurance command for React/TypeScript frontend
|
|
7
|
+
|
|
8
|
+
## Execution Method
|
|
9
|
+
|
|
10
|
+
- Compliance validation -> performed by code-reviewer
|
|
11
|
+
- Rule analysis -> performed by rule-advisor
|
|
12
|
+
- Fix implementation -> performed by task-executor-frontend
|
|
13
|
+
- Quality checks -> performed by quality-fixer-frontend
|
|
14
|
+
- Re-validation -> performed by code-reviewer
|
|
15
|
+
|
|
16
|
+
Orchestrator invokes sub-agents and passes structured JSON between them.
|
|
17
|
+
|
|
18
|
+
Design Doc (uses most recent if omitted): $ARGUMENTS
|
|
19
|
+
|
|
20
|
+
**Think deeply** Understand the essence of compliance validation and execute:
|
|
21
|
+
|
|
22
|
+
## Execution Flow
|
|
23
|
+
|
|
24
|
+
### 1. Prerequisite Check
|
|
25
|
+
```bash
|
|
26
|
+
# Identify Design Doc
|
|
27
|
+
ls docs/design/*.md | grep -v template | tail -1
|
|
28
|
+
|
|
29
|
+
# Check implementation files
|
|
30
|
+
git diff --name-only main...HEAD
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Execute code-reviewer
|
|
34
|
+
Validate Design Doc compliance:
|
|
35
|
+
- Acceptance criteria fulfillment
|
|
36
|
+
- Code quality check
|
|
37
|
+
- Implementation completeness assessment
|
|
38
|
+
|
|
39
|
+
### 3. Verdict and Response
|
|
40
|
+
|
|
41
|
+
**Criteria (considering project stage)**:
|
|
42
|
+
- Prototype: Pass at 70%+
|
|
43
|
+
- Production: 90%+ recommended
|
|
44
|
+
- Critical items (security, etc.): Required regardless of rate
|
|
45
|
+
|
|
46
|
+
**Compliance-based response**:
|
|
47
|
+
|
|
48
|
+
For low compliance (production <90%):
|
|
49
|
+
```
|
|
50
|
+
Validation Result: [X]% compliance
|
|
51
|
+
Unfulfilled items:
|
|
52
|
+
- [item list]
|
|
53
|
+
|
|
54
|
+
Execute fixes? (y/n):
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If user selects `y`:
|
|
58
|
+
|
|
59
|
+
## Pre-fix Metacognition
|
|
60
|
+
**Required**: `rule-advisor -> TodoWrite -> task-executor-frontend -> quality-fixer-frontend`
|
|
61
|
+
|
|
62
|
+
1. **Execute rule-advisor**: Understand fix essence (symptomatic treatment vs root solution)
|
|
63
|
+
2. **Update TodoWrite**: Register work steps. Always include: first "Confirm skill constraints", final "Verify skill fidelity". Create task file following task template (see documentation-criteria skill) -> `docs/plans/tasks/review-fixes-YYYYMMDD.md`
|
|
64
|
+
3. **Execute task-executor-frontend**: Staged auto-fixes (stops at 5 files)
|
|
65
|
+
4. **Execute quality-fixer-frontend**: Confirm quality gate passage
|
|
66
|
+
5. **Re-validate**: Measure improvement with code-reviewer
|
|
67
|
+
|
|
68
|
+
### 4. Final Report
|
|
69
|
+
```
|
|
70
|
+
Initial compliance: [X]%
|
|
71
|
+
Final compliance: [Y]% (if fixes executed)
|
|
72
|
+
Improvement: [Y-X]%
|
|
73
|
+
|
|
74
|
+
Remaining issues:
|
|
75
|
+
- [items requiring manual intervention]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Auto-fixable Items
|
|
79
|
+
- Simple unimplemented acceptance criteria
|
|
80
|
+
- Error handling additions
|
|
81
|
+
- Contract definition fixes
|
|
82
|
+
- Function splitting (length/complexity improvements)
|
|
83
|
+
|
|
84
|
+
## Non-fixable Items
|
|
85
|
+
- Fundamental business logic changes
|
|
86
|
+
- Architecture-level modifications
|
|
87
|
+
- Design Doc deficiencies
|
|
88
|
+
|
|
89
|
+
**Scope**: Design Doc compliance validation and auto-fixes.
|
|
@@ -59,7 +59,7 @@ If user selects `y`:
|
|
|
59
59
|
**Required**: `rule-advisor → TodoWrite → task-executor → quality-fixer`
|
|
60
60
|
|
|
61
61
|
1. **Execute rule-advisor**: Understand fix essence (symptomatic treatment vs root solution)
|
|
62
|
-
2. **Update TodoWrite**: Register work steps. Always include: first "Confirm skill constraints", final "Verify skill fidelity".
|
|
62
|
+
2. **Update TodoWrite**: Register work steps. Always include: first "Confirm skill constraints", final "Verify skill fidelity". Create task file following task template (see documentation-criteria skill) -> `docs/plans/tasks/review-fixes-YYYYMMDD.md`
|
|
63
63
|
3. **Execute task-executor**: Staged auto-fixes (stops at 5 files)
|
|
64
64
|
4. **Execute quality-fixer**: Confirm quality gate passage
|
|
65
65
|
5. **Re-validate**: Measure improvement with code-reviewer
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: add-integration-tests
|
|
3
|
+
description: Design Docを使用して既存バックエンドコードベースに統合/E2Eテストを追加
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**コマンドコンテキスト**: 既存バックエンド実装へのテスト追加ワークフロー
|
|
7
|
+
|
|
8
|
+
**スコープ**: バックエンドのみ(acceptance-test-generatorはバックエンドのみ対応)
|
|
9
|
+
|
|
10
|
+
## 実行方法
|
|
11
|
+
|
|
12
|
+
- スケルトン生成 → acceptance-test-generatorが実行
|
|
13
|
+
- タスクファイル作成 → タスクテンプレートに従う(documentation-criteriaスキル参照)
|
|
14
|
+
- テスト実装 → task-executorが実行
|
|
15
|
+
- テストレビュー → integration-test-reviewerが実行
|
|
16
|
+
- 品質チェック → quality-fixerが実行
|
|
17
|
+
|
|
18
|
+
オーケストレーターがサブエージェントを呼び出し、構造化JSONを受け渡す。
|
|
19
|
+
|
|
20
|
+
Design Docパス: $ARGUMENTS
|
|
21
|
+
|
|
22
|
+
**Think deeply** テスト追加の本質を理解して実行:
|
|
23
|
+
|
|
24
|
+
## 前提条件
|
|
25
|
+
- Design Docが存在すること(手動またはreverse-engineerで作成)
|
|
26
|
+
- テスト対象の既存実装があること
|
|
27
|
+
|
|
28
|
+
## 実行フロー
|
|
29
|
+
|
|
30
|
+
### 1. Design Doc検証
|
|
31
|
+
```bash
|
|
32
|
+
# Design Docの存在確認
|
|
33
|
+
ls $ARGUMENTS || ls docs/design/*.md | grep -v template | tail -1
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. acceptance-test-generator実行
|
|
37
|
+
Design Docからテストスケルトンを生成:
|
|
38
|
+
- 受入条件(AC)を抽出
|
|
39
|
+
- 統合テストスケルトン生成(`*.int.test.ts`)
|
|
40
|
+
- 該当する場合はE2Eテストスケルトン生成(`*.e2e.test.ts`)
|
|
41
|
+
|
|
42
|
+
### 3. タスクファイル作成
|
|
43
|
+
タスクテンプレートに従ってタスクファイルを作成(documentation-criteriaスキル参照):
|
|
44
|
+
- パス: `docs/plans/tasks/integration-tests-YYYYMMDD.md`
|
|
45
|
+
- 内容: 生成されたスケルトンに基づくテスト実装タスク
|
|
46
|
+
- 対象ファイルセクションにスケルトンファイルパスを含める
|
|
47
|
+
|
|
48
|
+
### 4. task-executor実行
|
|
49
|
+
タスクファイルに従ってテストを実装:
|
|
50
|
+
- TDD原則に従う(Red-Green-Refactor)
|
|
51
|
+
- 各スケルトンテストケースを実装
|
|
52
|
+
- テストを実行してパスを確認
|
|
53
|
+
|
|
54
|
+
### 5. integration-test-reviewer実行
|
|
55
|
+
テスト品質をレビュー:
|
|
56
|
+
- スケルトン準拠を確認
|
|
57
|
+
- テストカバレッジをチェック
|
|
58
|
+
- `needs_revision`の場合 → `requiredFixes`と共にステップ4に戻る
|
|
59
|
+
- `approved`の場合 → 品質チェックに進む
|
|
60
|
+
|
|
61
|
+
### 6. quality-fixer実行
|
|
62
|
+
最終品質保証:
|
|
63
|
+
- 全テストを実行
|
|
64
|
+
- カバレッジが要件を満たすことを確認
|
|
65
|
+
- 品質問題を修正
|
|
66
|
+
|
|
67
|
+
### 7. コミット
|
|
68
|
+
適切なメッセージでテストファイルをコミット。
|
|
69
|
+
|
|
70
|
+
## 委譲先
|
|
71
|
+
- acceptance-test-generator: スケルトン生成
|
|
72
|
+
- task-executor: テスト実装
|
|
73
|
+
- integration-test-reviewer: テスト品質レビュー
|
|
74
|
+
- quality-fixer: 最終品質チェック
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: front-reverse-design
|
|
3
|
+
description: 既存PRDを使用して既存コードベースからフロントエンドDesign Docを生成
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**コマンドコンテキスト**: 既存コードからフロントエンドDesign Docを作成するリバースエンジニアリングワークフロー
|
|
7
|
+
|
|
8
|
+
**前提条件**: PRDが存在すること(reverse-engineerまたは手動で作成)
|
|
9
|
+
|
|
10
|
+
対象PRD: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
**TodoWrite登録**: まずフェーズを登録し、各フェーズ開始時にステップを登録。
|
|
13
|
+
|
|
14
|
+
## ステップ0: 初期設定
|
|
15
|
+
|
|
16
|
+
### 0.1 スコープ確認
|
|
17
|
+
|
|
18
|
+
AskUserQuestionを使用して確認:
|
|
19
|
+
1. **PRDパス**: どのPRDを基準にするか
|
|
20
|
+
2. **対象パス**: どのフロントエンドディレクトリ/モジュールをドキュメント化するか
|
|
21
|
+
3. **人間レビュー**: Yes(推奨)/ No(完全自律)
|
|
22
|
+
|
|
23
|
+
### 0.2 出力設定
|
|
24
|
+
|
|
25
|
+
- Design Doc出力先: `docs/design/` または既存の設計ディレクトリ
|
|
26
|
+
- ディレクトリの存在確認、必要に応じて作成
|
|
27
|
+
|
|
28
|
+
## ワークフロー概要
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
ステップ1: スコープ発見(PRDに基づく全フロントエンドコンポーネント)
|
|
32
|
+
ステップ2-5: コンポーネントごとのループ(生成 → 検証 → レビュー → 修正)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**コンテキスト伝達**: ステップ間で構造化JSON出力を受け渡す。`$STEP_N_OUTPUT`プレースホルダー記法を使用。
|
|
36
|
+
|
|
37
|
+
## ステップ1: Design Docスコープ発見
|
|
38
|
+
|
|
39
|
+
**Task呼び出し**:
|
|
40
|
+
```
|
|
41
|
+
subagent_type: scope-discoverer
|
|
42
|
+
prompt: |
|
|
43
|
+
PRDスコープ内のフロントエンドDesign Doc対象を発見。
|
|
44
|
+
|
|
45
|
+
scope_type: design-doc
|
|
46
|
+
existing_prd: $USER_PRD_PATH
|
|
47
|
+
target_path: $USER_TARGET_PATH
|
|
48
|
+
focus: frontend (React/TypeScriptコンポーネント、フック、状態管理)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**出力を保存**: `$STEP_1_OUTPUT`
|
|
52
|
+
|
|
53
|
+
**品質ゲート**:
|
|
54
|
+
- 少なくとも1つのコンポーネントが発見された → 続行
|
|
55
|
+
- コンポーネントなし → ユーザーにヒントを求める
|
|
56
|
+
|
|
57
|
+
**人間レビューポイント**(ステップ0.1でYesの場合): 発見されたコンポーネントを確認用に提示。
|
|
58
|
+
|
|
59
|
+
## ステップ2-5: コンポーネントごとの処理
|
|
60
|
+
|
|
61
|
+
**次のコンポーネントに進む前に、各コンポーネントでステップ2→3→4→5を完了する。**
|
|
62
|
+
|
|
63
|
+
### ステップ2: Design Doc生成
|
|
64
|
+
|
|
65
|
+
**Task呼び出し**:
|
|
66
|
+
```
|
|
67
|
+
subagent_type: technical-designer-frontend
|
|
68
|
+
prompt: |
|
|
69
|
+
既存コードに基づいて以下のフロントエンドコンポーネントのDesign Docを作成。
|
|
70
|
+
|
|
71
|
+
Operation Mode: create
|
|
72
|
+
|
|
73
|
+
Component: $COMPONENT_NAME (from $STEP_1_OUTPUT)
|
|
74
|
+
Responsibility: $COMPONENT_RESPONSIBILITY
|
|
75
|
+
Primary Files: $COMPONENT_PRIMARY_FILES
|
|
76
|
+
Public Interfaces: $COMPONENT_PUBLIC_INTERFACES
|
|
77
|
+
Dependencies: $COMPONENT_DEPENDENCIES
|
|
78
|
+
|
|
79
|
+
Parent PRD: $USER_PRD_PATH
|
|
80
|
+
|
|
81
|
+
現在のアーキテクチャをドキュメント化。変更提案は不要。
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**出力を保存**: `$STEP_2_OUTPUT`
|
|
85
|
+
|
|
86
|
+
### ステップ3: コード検証
|
|
87
|
+
|
|
88
|
+
**Task呼び出し**:
|
|
89
|
+
```
|
|
90
|
+
subagent_type: code-verifier
|
|
91
|
+
prompt: |
|
|
92
|
+
Design Docとコード実装間の整合性を検証。
|
|
93
|
+
|
|
94
|
+
doc_type: design-doc
|
|
95
|
+
document_path: $STEP_2_OUTPUT
|
|
96
|
+
code_paths: $COMPONENT_PRIMARY_FILES
|
|
97
|
+
verbose: false
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**出力を保存**: `$STEP_3_OUTPUT`
|
|
101
|
+
|
|
102
|
+
**品質ゲート**:
|
|
103
|
+
- consistencyScore >= 70 → レビューに進む
|
|
104
|
+
- consistencyScore < 70 → 詳細レビュー対象としてフラグ
|
|
105
|
+
|
|
106
|
+
### ステップ4: レビュー
|
|
107
|
+
|
|
108
|
+
**必須入力**: $STEP_3_OUTPUT(ステップ3の検証JSON)
|
|
109
|
+
|
|
110
|
+
**Task呼び出し**:
|
|
111
|
+
```
|
|
112
|
+
subagent_type: document-reviewer
|
|
113
|
+
prompt: |
|
|
114
|
+
コード検証結果を考慮して以下のDesign Docをレビュー。
|
|
115
|
+
|
|
116
|
+
doc_type: DesignDoc
|
|
117
|
+
target: $STEP_2_OUTPUT
|
|
118
|
+
mode: composite
|
|
119
|
+
|
|
120
|
+
## コード検証結果
|
|
121
|
+
$STEP_3_OUTPUT
|
|
122
|
+
|
|
123
|
+
## 親PRD
|
|
124
|
+
$USER_PRD_PATH
|
|
125
|
+
|
|
126
|
+
## 追加レビュー重点
|
|
127
|
+
- ドキュメント化されたインターフェースの技術的正確性
|
|
128
|
+
- 親PRDスコープとの整合性
|
|
129
|
+
- コンポーネント境界定義の完全性
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**出力を保存**: `$STEP_4_OUTPUT`
|
|
133
|
+
|
|
134
|
+
### ステップ5: 修正(条件付き)
|
|
135
|
+
|
|
136
|
+
**トリガー条件**(いずれか1つ):
|
|
137
|
+
- レビューステータスが「Needs Revision」または「Rejected」
|
|
138
|
+
- `$STEP_3_OUTPUT`に重大な不整合が存在
|
|
139
|
+
- consistencyScore < 70
|
|
140
|
+
|
|
141
|
+
**Task呼び出し**:
|
|
142
|
+
```
|
|
143
|
+
subagent_type: technical-designer-frontend
|
|
144
|
+
prompt: |
|
|
145
|
+
レビューフィードバックに基づいてDesign Docを更新。
|
|
146
|
+
|
|
147
|
+
Operation Mode: update
|
|
148
|
+
Existing Design Doc: $STEP_2_OUTPUT
|
|
149
|
+
|
|
150
|
+
## レビューフィードバック
|
|
151
|
+
$STEP_4_OUTPUT
|
|
152
|
+
|
|
153
|
+
## 対処すべき不整合
|
|
154
|
+
($STEP_3_OUTPUTから重大・主要な不整合を抽出)
|
|
155
|
+
|
|
156
|
+
修正と改善を適用。
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**ループ制御**: 最大2回の修正サイクル。2サイクル後、ステータスに関わらず人間レビュー対象としてフラグ。
|
|
160
|
+
|
|
161
|
+
### コンポーネント完了
|
|
162
|
+
|
|
163
|
+
- [ ] レビューステータスが「Approved」または「Approved with Conditions」
|
|
164
|
+
- [ ] 人間レビュー通過(ステップ0で有効な場合)
|
|
165
|
+
|
|
166
|
+
**次へ**: 次のコンポーネントに進む。全コンポーネント完了後 → 最終レポート。
|
|
167
|
+
|
|
168
|
+
## 最終レポート
|
|
169
|
+
|
|
170
|
+
以下を含むサマリーを出力:
|
|
171
|
+
- 生成ドキュメント表(コンポーネント、Design Docパス、整合性スコア、レビューステータス)
|
|
172
|
+
- アクション項目(重大な不整合、未ドキュメント化機能、フラグ項目)
|
|
173
|
+
- 次ステップチェックリスト
|
|
174
|
+
|
|
175
|
+
## エラーハンドリング
|
|
176
|
+
|
|
177
|
+
| エラー | アクション |
|
|
178
|
+
|-------|---------|
|
|
179
|
+
| PRDが見つからない | ユーザーに正しいPRDパスを確認 |
|
|
180
|
+
| 発見で何も見つからない | ユーザーにプロジェクト構造のヒントを確認 |
|
|
181
|
+
| 生成失敗 | 失敗をログ、他コンポーネントで続行、サマリーで報告 |
|
|
182
|
+
| consistencyScore < 50 | 必須人間レビュー対象としてフラグ、自動承認不可 |
|
|
183
|
+
| 2回修正後もレビュー却下 | ループ停止、人間介入対象としてフラグ |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: front-review
|
|
3
|
+
description: Design Doc準拠検証と必要に応じた自動修正
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**コマンドコンテキスト**: React/TypeScriptフロントエンド向け実装後品質保証コマンド
|
|
7
|
+
|
|
8
|
+
## 実行方法
|
|
9
|
+
|
|
10
|
+
- 準拠検証 → code-reviewerが実行
|
|
11
|
+
- ルール分析 → rule-advisorが実行
|
|
12
|
+
- 修正実装 → task-executor-frontendが実行
|
|
13
|
+
- 品質チェック → quality-fixer-frontendが実行
|
|
14
|
+
- 再検証 → code-reviewerが実行
|
|
15
|
+
|
|
16
|
+
オーケストレーターがサブエージェントを呼び出し、構造化JSONを受け渡す。
|
|
17
|
+
|
|
18
|
+
Design Doc(省略時は直近のもの): $ARGUMENTS
|
|
19
|
+
|
|
20
|
+
**Think deeply** 準拠検証の本質を理解し、以下のステップで実行:
|
|
21
|
+
|
|
22
|
+
## 実行フロー
|
|
23
|
+
|
|
24
|
+
### 1. 前提条件チェック
|
|
25
|
+
```bash
|
|
26
|
+
# Design Docを特定
|
|
27
|
+
ls docs/design/*.md | grep -v template | tail -1
|
|
28
|
+
|
|
29
|
+
# 実装ファイルをチェック
|
|
30
|
+
git diff --name-only main...HEAD
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. code-reviewer実行
|
|
34
|
+
Design Doc準拠を検証:
|
|
35
|
+
- 受入条件の充足確認
|
|
36
|
+
- コード品質チェック
|
|
37
|
+
- 実装完全性の評価
|
|
38
|
+
|
|
39
|
+
### 3. 判定と対応
|
|
40
|
+
|
|
41
|
+
**基準(プロジェクト段階を考慮)**:
|
|
42
|
+
- プロトタイプ: 70%以上で合格
|
|
43
|
+
- 本番: 90%以上推奨
|
|
44
|
+
- 重要項目(セキュリティ等): 率に関わらず必須
|
|
45
|
+
|
|
46
|
+
**準拠率に基づく対応**:
|
|
47
|
+
|
|
48
|
+
準拠率が低い場合(本番で90%未満):
|
|
49
|
+
```
|
|
50
|
+
検証結果: 準拠率 [X]%
|
|
51
|
+
未充足項目:
|
|
52
|
+
- [項目リスト]
|
|
53
|
+
|
|
54
|
+
修正を実行しますか? (y/n):
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
ユーザーが`y`を選択した場合:
|
|
58
|
+
|
|
59
|
+
## 修正実行前のメタ認知
|
|
60
|
+
**必須**: `rule-advisor → TodoWrite → task-executor-frontend → quality-fixer-frontend`
|
|
61
|
+
|
|
62
|
+
1. **rule-advisor実行**: 修正の本質を理解(表面的な対症療法 vs 根本解決)
|
|
63
|
+
2. **TodoWrite更新**: 作業ステップを登録。必ず含める: 最初に「スキル制約の確認」、最後に「スキル忠実度の検証」。タスクテンプレートに従ってタスクファイル作成(documentation-criteriaスキル参照) → `docs/plans/tasks/review-fixes-YYYYMMDD.md`
|
|
64
|
+
3. **task-executor-frontend実行**: 段階的自動修正(5ファイルで停止)
|
|
65
|
+
4. **quality-fixer-frontend実行**: 品質ゲート通過を確認
|
|
66
|
+
5. **再検証**: code-reviewerで改善を測定
|
|
67
|
+
|
|
68
|
+
### 4. 最終レポート
|
|
69
|
+
```
|
|
70
|
+
初期準拠率: [X]%
|
|
71
|
+
最終準拠率: [Y]%(修正実行時)
|
|
72
|
+
改善: [Y-X]%
|
|
73
|
+
|
|
74
|
+
残存課題:
|
|
75
|
+
- [手動対応が必要な項目]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 自動修正可能な項目
|
|
79
|
+
- 単純な未実装受入条件
|
|
80
|
+
- エラーハンドリング追加
|
|
81
|
+
- 契約定義の修正
|
|
82
|
+
- 関数分割(長さ/複雑性改善)
|
|
83
|
+
|
|
84
|
+
## 自動修正不可な項目
|
|
85
|
+
- 根本的なビジネスロジック変更
|
|
86
|
+
- アーキテクチャレベルの修正
|
|
87
|
+
- Design Doc自体の不備
|
|
88
|
+
|
|
89
|
+
**スコープ**: Design Doc準拠検証と自動修正。
|
|
@@ -60,7 +60,7 @@ Design Doc準拠率を検証:
|
|
|
60
60
|
**必須**: `rule-advisor → TodoWrite → task-executor → quality-fixer`
|
|
61
61
|
|
|
62
62
|
1. **rule-advisor実行**: 修正の本質を理解(表面的な対症療法 vs 根本解決)
|
|
63
|
-
2. **TodoWrite更新**: 作業ステップを登録。必ず含める:
|
|
63
|
+
2. **TodoWrite更新**: 作業ステップを登録。必ず含める: 最初に「スキル制約の確認」、最後に「スキル忠実度の検証」。タスクテンプレート(documentation-criteriaスキル参照)に従いタスクファイル作成 → `docs/plans/tasks/review-fixes-YYYYMMDD.md`
|
|
64
64
|
3. **task-executor実行**: 自動修正を段階的実行(5ファイル超過で停止)
|
|
65
65
|
4. **quality-fixer実行**: 品質ゲート通過を確認
|
|
66
66
|
5. **再検証**: code-reviewerで改善度を測定
|
|
@@ -145,6 +145,7 @@ description: Guides PRD, ADR, Design Doc, and Work Plan creation with templates
|
|
|
145
145
|
| ADR | `docs/adr/` | `ADR-[4-digits]-[title].md` | See adr-template.md |
|
|
146
146
|
| Design Doc | `docs/design/` | `[feature-name]-design.md` | See design-template.md |
|
|
147
147
|
| Work Plan | `docs/plans/` | `YYYYMMDD-{type}-{description}.md` | See plan-template.md |
|
|
148
|
+
| Task File | `docs/plans/tasks/` | `{plan-name}-task-{number}.md` | See task-template.md |
|
|
148
149
|
|
|
149
150
|
*Note: Work plans are excluded by `.gitignore`
|
|
150
151
|
|
|
@@ -180,3 +181,4 @@ Templates are available in the `references/` directory:
|
|
|
180
181
|
- [Product Requirements Document template](references/prd-template.md)
|
|
181
182
|
- [Work Plan template](references/plan-template.md)
|
|
182
183
|
- [Architecture Decision Record template](references/adr-template.md)
|
|
184
|
+
- [Task File template](references/task-template.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Task: [Task Name]
|
|
2
|
+
|
|
3
|
+
Metadata:
|
|
4
|
+
- Dependencies: task-01 -> Deliverable: docs/plans/analysis/research-results.md
|
|
5
|
+
- Provides: docs/plans/analysis/api-spec.md (for research/design tasks)
|
|
6
|
+
- Size: Small (1-2 files)
|
|
7
|
+
|
|
8
|
+
## Implementation Content
|
|
9
|
+
[What this task will achieve]
|
|
10
|
+
*Reference dependency deliverables if applicable
|
|
11
|
+
|
|
12
|
+
## Target Files
|
|
13
|
+
- [ ] [Implementation file path]
|
|
14
|
+
- [ ] [Test file path]
|
|
15
|
+
|
|
16
|
+
## Implementation Steps (TDD: Red-Green-Refactor)
|
|
17
|
+
### 1. Red Phase
|
|
18
|
+
- [ ] Review dependency deliverables (if any)
|
|
19
|
+
- [ ] Verify/create contract definitions
|
|
20
|
+
- [ ] Write failing tests
|
|
21
|
+
- [ ] Run tests and confirm failure
|
|
22
|
+
|
|
23
|
+
### 2. Green Phase
|
|
24
|
+
- [ ] Add minimal implementation to pass tests
|
|
25
|
+
- [ ] Run only added tests and confirm they pass
|
|
26
|
+
|
|
27
|
+
### 3. Refactor Phase
|
|
28
|
+
- [ ] Improve code (maintain passing tests)
|
|
29
|
+
- [ ] Confirm added tests still pass
|
|
30
|
+
|
|
31
|
+
## Completion Criteria
|
|
32
|
+
- [ ] All added tests pass
|
|
33
|
+
- [ ] Operation verified (select L1/L2/L3, per implementation-approach skill)
|
|
34
|
+
- [ ] Deliverables created (for research/design tasks)
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
- Impact scope: [Areas where changes may propagate]
|
|
38
|
+
- Constraints: [Areas not to be modified]
|
|
@@ -100,6 +100,15 @@ I repeat this cycle for each task to ensure quality.
|
|
|
100
100
|
[^2]: Required when: architecture changes, new technology introduction, OR data flow changes
|
|
101
101
|
[^3]: Create new PRD, update existing PRD, or create reverse PRD (when no existing PRD)
|
|
102
102
|
|
|
103
|
+
## Structured Response Specifications
|
|
104
|
+
|
|
105
|
+
Each subagent responds in JSON format:
|
|
106
|
+
- **task-executor**: status, filesModified, testsAdded, readyForQualityCheck
|
|
107
|
+
- **integration-test-reviewer**: status, verdict (approved/needs_revision), requiredFixes
|
|
108
|
+
- **quality-fixer**: status, checksPerformed, fixesApplied, approved
|
|
109
|
+
- **document-reviewer**: status, reviewsPerformed, issues, recommendations, approvalReady
|
|
110
|
+
- **design-sync**: sync_status, total_conflicts, conflicts (severity, type, source_file, target_file)
|
|
111
|
+
|
|
103
112
|
## My Basic Flow for Work Planning
|
|
104
113
|
|
|
105
114
|
When receiving new features or change requests, I first request requirement analysis from requirement-analyzer.
|
|
@@ -136,31 +145,11 @@ According to scale determination:
|
|
|
136
145
|
- task-executor: Implementation authority (can use Edit/Write)
|
|
137
146
|
- quality-fixer: Fix authority (automatic quality error fixes)
|
|
138
147
|
|
|
139
|
-
###
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
START[Batch approval for entire implementation phase] --> AUTO[Start autonomous execution mode]
|
|
145
|
-
AUTO --> TD[task-decomposer: Task decomposition]
|
|
146
|
-
TD --> PHASE[Register phase management Todo]
|
|
147
|
-
PHASE --> PSTART[Phase start: Expand task Todo]
|
|
148
|
-
PSTART --> TE[task-executor: Implementation]
|
|
149
|
-
TE --> ESC{Escalation judgment}
|
|
150
|
-
ESC -->|No issue| FOLLOW[Follow-up processing]
|
|
151
|
-
ESC -->|Issue found| STOP[Escalate to user]
|
|
152
|
-
FOLLOW --> QF[quality-fixer: Quality check and fixes]
|
|
153
|
-
QF --> COMMIT[Execute git commit]
|
|
154
|
-
COMMIT --> TCHECK{Tasks remaining?}
|
|
155
|
-
TCHECK -->|Yes| TE
|
|
156
|
-
TCHECK -->|No| PCHECK{Phases remaining?}
|
|
157
|
-
PCHECK -->|Yes| PSTART
|
|
158
|
-
PCHECK -->|No| REPORT[Completion report]
|
|
159
|
-
|
|
160
|
-
TE --> INTERRUPT{User input?}
|
|
161
|
-
INTERRUPT -->|Requirement change| STOP2[Stop autonomous execution]
|
|
162
|
-
STOP2 --> RA[Re-analyze with requirement-analyzer]
|
|
163
|
-
```
|
|
148
|
+
### Step 2 Execution Details
|
|
149
|
+
- `status: escalation_needed` or `status: blocked` -> Escalate to user
|
|
150
|
+
- `testsAdded` contains `*.int.test.ts` or `*.e2e.test.ts` -> Execute **integration-test-reviewer**
|
|
151
|
+
- If verdict is `needs_revision` -> Return to task-executor with `requiredFixes`
|
|
152
|
+
- If verdict is `approved` -> Proceed to quality-fixer
|
|
164
153
|
|
|
165
154
|
### Conditions for Stopping Autonomous Execution
|
|
166
155
|
Stop autonomous execution and escalate to user in the following cases:
|
|
@@ -217,8 +206,3 @@ Stop autonomous execution and escalate to user in the following cases:
|
|
|
217
206
|
- On user rejection: Main AI (me) updates Status to Rejected
|
|
218
207
|
- **After Design Doc creation -> document-reviewer execution**: Confirm design content and consistency
|
|
219
208
|
- **After work plan creation**: Batch approval for entire implementation phase (confirm with plan summary)
|
|
220
|
-
|
|
221
|
-
### Stop Points During Autonomous Execution
|
|
222
|
-
- **When requirement change detected**: Match in requirement change checklist -> Return to requirement-analyzer
|
|
223
|
-
- **When critical error occurs**: Report error content -> Wait for response instructions
|
|
224
|
-
- **When user interrupts**: Explicit stop instruction -> Confirm situation
|
|
@@ -156,6 +156,7 @@ description: PRD、ADR、Design Doc、作業計画書の作成を支援。テン
|
|
|
156
156
|
| ADR | `docs/adr/` | `ADR-[4桁]-[タイトル].md` | `adr-template.md` |
|
|
157
157
|
| Design Doc | `docs/design/` | `[機能名]-design.md` | `design-template.md` |
|
|
158
158
|
| 作業計画書 | `docs/plans/` | `YYYYMMDD-{type}-{description}.md` | `plan-template.md` |
|
|
159
|
+
| タスクファイル | `docs/plans/tasks/` | `{plan-name}-task-{number}.md` | `task-template.md` |
|
|
159
160
|
|
|
160
161
|
※作業計画書は`.gitignore`で除外
|
|
161
162
|
|
|
@@ -191,3 +192,4 @@ description: PRD、ADR、Design Doc、作業計画書の作成を支援。テン
|
|
|
191
192
|
- [PRDテンプレート](references/prd-template.md)
|
|
192
193
|
- [作業計画書テンプレート](references/plan-template.md)
|
|
193
194
|
- [ADRテンプレート](references/adr-template.md)
|
|
195
|
+
- [タスクファイルテンプレート](references/task-template.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# タスク: [タスク名]
|
|
2
|
+
|
|
3
|
+
メタデータ:
|
|
4
|
+
- 依存関係: task-01 → 成果物: docs/plans/analysis/research-results.md
|
|
5
|
+
- 提供物: docs/plans/analysis/api-spec.md(調査・設計タスクの場合)
|
|
6
|
+
- サイズ: 小規模(1-2ファイル)
|
|
7
|
+
|
|
8
|
+
## 実装内容
|
|
9
|
+
[このタスクで達成すること]
|
|
10
|
+
*依存関係の成果物を参照する場合は明記
|
|
11
|
+
|
|
12
|
+
## 対象ファイル
|
|
13
|
+
- [ ] [実装ファイルパス]
|
|
14
|
+
- [ ] [テストファイルパス]
|
|
15
|
+
|
|
16
|
+
## 実装ステップ(TDD: Red-Green-Refactor)
|
|
17
|
+
### 1. Redフェーズ
|
|
18
|
+
- [ ] 依存関係の成果物を確認(ある場合)
|
|
19
|
+
- [ ] 契約定義を確認・作成
|
|
20
|
+
- [ ] 失敗するテストを書く
|
|
21
|
+
- [ ] テストを実行し失敗を確認
|
|
22
|
+
|
|
23
|
+
### 2. Greenフェーズ
|
|
24
|
+
- [ ] テストをパスする最小限の実装を追加
|
|
25
|
+
- [ ] 追加したテストのみ実行しパスを確認
|
|
26
|
+
|
|
27
|
+
### 3. Refactorフェーズ
|
|
28
|
+
- [ ] コードを改善(テストはパス状態を維持)
|
|
29
|
+
- [ ] 追加したテストが引き続きパスすることを確認
|
|
30
|
+
|
|
31
|
+
## 完了条件
|
|
32
|
+
- [ ] 追加した全テストがパス
|
|
33
|
+
- [ ] 動作確認完了(L1/L2/L3を選択、implementation-approachスキル参照)
|
|
34
|
+
- [ ] 成果物作成完了(調査・設計タスクの場合)
|
|
35
|
+
|
|
36
|
+
## 備考
|
|
37
|
+
- 影響範囲: [変更が波及する可能性のある領域]
|
|
38
|
+
- 制約: [変更してはいけない領域]
|
|
@@ -108,18 +108,20 @@ graph TD
|
|
|
108
108
|
## 作業計画時の基本フロー
|
|
109
109
|
|
|
110
110
|
### 大規模(6ファイル以上)
|
|
111
|
-
1. requirement-analyzer → 要件分析 **[停止:
|
|
111
|
+
1. requirement-analyzer → 要件分析 + 既存PRD確認 **[停止: 要件確認/質問対応]**
|
|
112
112
|
2. prd-creator → PRD作成 → document-reviewer **[停止: 要件確認]**
|
|
113
113
|
3. technical-designer → ADR作成(必要な場合) → document-reviewer **[停止: 技術方針決定]**
|
|
114
114
|
4. technical-designer → Design Doc作成 → document-reviewer → design-sync **[停止: 設計内容確認]**
|
|
115
115
|
5. acceptance-test-generator → テストスケルトン生成
|
|
116
|
+
→ メインAI: 生成を検証し、work-plannerに情報を渡す
|
|
116
117
|
6. work-planner → 作業計画書作成 **[停止: 実装フェーズ全体の一括承認]**
|
|
117
118
|
7. **自律実行モード開始**: task-decomposer → 全タスク実行 → 完了報告
|
|
118
119
|
|
|
119
120
|
### 中規模(3-5ファイル)
|
|
120
|
-
1. requirement-analyzer → 要件分析 **[停止:
|
|
121
|
+
1. requirement-analyzer → 要件分析 **[停止: 要件確認/質問対応]**
|
|
121
122
|
2. technical-designer → Design Doc作成 → document-reviewer → design-sync **[停止: 技術方針決定]**
|
|
122
123
|
3. acceptance-test-generator → テストスケルトン生成
|
|
124
|
+
→ メインAI: 生成を検証し、work-plannerに情報を渡す
|
|
123
125
|
4. work-planner → 作業計画書作成 **[停止: 実装フェーズ全体の一括承認]**
|
|
124
126
|
5. **自律実行モード開始**: task-decomposer → 全タスク実行 → 完了報告
|
|
125
127
|
|
|
@@ -136,6 +138,12 @@ graph TD
|
|
|
136
138
|
- task-executor:実装権限(Edit/Write使用可)
|
|
137
139
|
- quality-fixer:修正権限(品質エラー自動修正)
|
|
138
140
|
|
|
141
|
+
### Step 2 実行詳細
|
|
142
|
+
- `status: escalation_needed` または `status: blocked` → ユーザーにエスカレーション
|
|
143
|
+
- `testsAdded` に `*.int.test.ts` または `*.e2e.test.ts` が含まれる → **integration-test-reviewer** を実行
|
|
144
|
+
- verdict が `needs_revision` → `requiredFixes` と共に task-executor に戻る
|
|
145
|
+
- verdict が `approved` → quality-fixer へ進む
|
|
146
|
+
|
|
139
147
|
### 自律実行の停止条件
|
|
140
148
|
|
|
141
149
|
以下の場合に自律実行を停止し、ユーザーにエスカレーション:
|
|
@@ -155,35 +163,15 @@ graph TD
|
|
|
155
163
|
4. **ユーザー明示停止時**
|
|
156
164
|
- 直接的な停止指示や割り込み
|
|
157
165
|
|
|
158
|
-
### 自律実行中のタスク管理
|
|
159
|
-
|
|
160
|
-
**2段階のTodoWrite管理**
|
|
161
|
-
|
|
162
|
-
#### Step1: task-decomposer完了後
|
|
163
|
-
フェーズ管理Todoを登録:
|
|
164
|
-
```
|
|
165
|
-
[in_progress] 実装フェーズ管理: Phase1開始
|
|
166
|
-
[pending] 実装フェーズ管理: Phase2開始
|
|
167
|
-
[pending] 実装フェーズ管理: Phase3開始
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
#### Step2: フェーズ開始時
|
|
171
|
-
該当フェーズのタスクを4ステップで展開:
|
|
172
|
-
```
|
|
173
|
-
[completed] 実装フェーズ管理: Phase1開始
|
|
174
|
-
[pending] 実装フェーズ管理: Phase2開始
|
|
175
|
-
[in_progress] Phase1-Task01: task-executor実行
|
|
176
|
-
[pending] Phase1-Task01: エスカレーション判定・フォローアップ
|
|
177
|
-
[pending] Phase1-Task01: quality-fixer実行
|
|
178
|
-
[pending] Phase1-Task01: git commit
|
|
179
|
-
... (同パターンで繰り返し)
|
|
180
|
-
[pending] Phase1: 完了チェック
|
|
181
|
-
```
|
|
182
|
-
|
|
183
166
|
## オーケストレーターの主な役割
|
|
184
167
|
|
|
185
168
|
1. **状態管理**: 現在のフェーズ、各サブエージェントの状態、次のアクションを把握
|
|
186
169
|
2. **情報の橋渡し**: サブエージェント間のデータ変換と伝達
|
|
170
|
+
- 各サブエージェントの出力を次のサブエージェントの入力形式に変換
|
|
171
|
+
- **前工程の成果物は必ず次のエージェントに渡す**
|
|
172
|
+
- 構造化レスポンスから必要な情報を抽出
|
|
173
|
+
- changeSummaryからコミットメッセージを作成 → **Bashでgit commit実行**
|
|
174
|
+
- 要件変更時は初期要件と追加要件を明示的に統合
|
|
187
175
|
3. **品質保証とコミット実行**: approved=true確認後、即座にgit commit実行
|
|
188
176
|
4. **自律実行モード管理**: 承認後の自律実行開始・停止・エスカレーション判断
|
|
189
177
|
5. **ADRステータス管理**: ユーザー判断後のADRステータス更新(Accepted/Rejected)
|
package/README.ja.md
CHANGED
|
@@ -123,12 +123,15 @@ Claude Codeで利用できる主要なコマンド:
|
|
|
123
123
|
| `/design` | 設計書の作成 | アーキテクチャの計画時(Backend) |
|
|
124
124
|
| `/plan` | 設計書から作業計画書を作成 | 設計承認後(Backend) |
|
|
125
125
|
| `/build` | 既存の計画から実行 | 作業の再開時(Backend) |
|
|
126
|
-
| `/review` | コードの準拠性確認 |
|
|
126
|
+
| `/review` | コードの準拠性確認 | 実装完了後(Backend) |
|
|
127
127
|
| `/front-design` | フロントエンド設計書の作成 | React/Viteアーキテクチャ計画時 |
|
|
128
128
|
| `/front-plan` | フロントエンド作業計画書を作成 | フロントエンド設計承認後 |
|
|
129
129
|
| `/front-build` | フロントエンド実装の実行 | Reactコンポーネント開発 |
|
|
130
|
+
| `/front-review` | フロントエンドコードの準拠性確認 | 実装完了後(Frontend) |
|
|
130
131
|
| `/diagnose` | 根本原因分析ワークフロー | デバッグ、トラブルシューティング |
|
|
131
|
-
| `/reverse-engineer` | コードからPRD/Design Docを生成 |
|
|
132
|
+
| `/reverse-engineer` | コードからPRD/Design Docを生成 | 既存システムのドキュメント化(Backend) |
|
|
133
|
+
| `/front-reverse-design` | フロントエンドDesign Docを生成 | 既存フロントエンドコードのドキュメント化 |
|
|
134
|
+
| `/add-integration-tests` | 統合/E2Eテストの追加 | Design Doc存在時のテスト追加 |
|
|
132
135
|
|
|
133
136
|
[コマンドの詳細はこちら →](docs/guides/ja/use-cases.md)
|
|
134
137
|
|
package/README.md
CHANGED
|
@@ -129,12 +129,15 @@ Essential commands for Claude Code:
|
|
|
129
129
|
| `/design` | Create design docs only | Architecture planning (Backend) |
|
|
130
130
|
| `/plan` | Create work plan from design | After design approval (Backend) |
|
|
131
131
|
| `/build` | Execute from existing plan | Resume work (Backend) |
|
|
132
|
-
| `/review` | Check code compliance | Post-implementation |
|
|
132
|
+
| `/review` | Check code compliance | Post-implementation (Backend) |
|
|
133
133
|
| `/front-design` | Create frontend design docs | React/Vite architecture planning |
|
|
134
134
|
| `/front-plan` | Create frontend work plan | After frontend design approval |
|
|
135
135
|
| `/front-build` | Execute frontend implementation | React component development |
|
|
136
|
+
| `/front-review` | Check frontend code compliance | Post-implementation (Frontend) |
|
|
136
137
|
| `/diagnose` | Root cause analysis workflow | Debugging, troubleshooting |
|
|
137
|
-
| `/reverse-engineer` | Generate PRD/Design Docs from code | Legacy system documentation |
|
|
138
|
+
| `/reverse-engineer` | Generate PRD/Design Docs from code | Legacy system documentation (Backend) |
|
|
139
|
+
| `/front-reverse-design` | Generate frontend Design Docs | Existing frontend code documentation |
|
|
140
|
+
| `/add-integration-tests` | Add integration/E2E tests | When Design Doc exists but tests missing |
|
|
138
141
|
|
|
139
142
|
[Full command reference →](docs/guides/en/use-cases.md)
|
|
140
143
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ai-project",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.9",
|
|
4
4
|
"packageManager": "npm@10.8.2",
|
|
5
5
|
"description": "TypeScript boilerplate with skills and sub-agents for Claude Code. Prevents context exhaustion through role-based task splitting.",
|
|
6
6
|
"keywords": [
|