create-ai-project 1.22.1 → 1.23.0
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-reviewer.md +3 -39
- package/.claude/agents-en/code-verifier.md +3 -22
- package/.claude/agents-en/document-reviewer.md +14 -69
- package/.claude/agents-en/task-decomposer.md +31 -0
- package/.claude/agents-en/task-executor-frontend.md +15 -1
- package/.claude/agents-en/task-executor.md +15 -1
- package/.claude/agents-en/technical-designer-frontend.md +32 -9
- package/.claude/agents-en/technical-designer.md +0 -9
- package/.claude/agents-en/ui-analyzer.md +313 -0
- package/.claude/agents-en/ui-spec-designer.md +3 -1
- package/.claude/agents-en/work-planner.md +26 -1
- package/.claude/agents-ja/code-reviewer.md +3 -39
- package/.claude/agents-ja/code-verifier.md +3 -22
- package/.claude/agents-ja/document-reviewer.md +14 -69
- package/.claude/agents-ja/task-decomposer.md +31 -0
- package/.claude/agents-ja/task-executor-frontend.md +15 -1
- package/.claude/agents-ja/task-executor.md +15 -1
- package/.claude/agents-ja/technical-designer-frontend.md +32 -9
- package/.claude/agents-ja/technical-designer.md +0 -9
- package/.claude/agents-ja/ui-analyzer.md +313 -0
- package/.claude/agents-ja/ui-spec-designer.md +3 -1
- package/.claude/agents-ja/work-planner.md +26 -1
- package/.claude/commands-en/build.md +9 -7
- package/.claude/commands-en/design.md +70 -44
- package/.claude/commands-en/front-build.md +9 -7
- package/.claude/commands-en/front-design.md +87 -58
- package/.claude/commands-ja/build.md +9 -7
- package/.claude/commands-ja/design.md +69 -43
- package/.claude/commands-ja/front-build.md +9 -7
- package/.claude/commands-ja/front-design.md +95 -64
- package/.claude/skills-en/documentation-criteria/references/design-template.md +1 -1
- package/.claude/skills-en/documentation-criteria/references/plan-template.md +16 -4
- package/.claude/skills-en/documentation-criteria/references/task-template.md +11 -1
- package/.claude/skills-en/subagents-orchestration-guide/SKILL.md +3 -1
- package/.claude/skills-ja/documentation-criteria/references/design-template.md +1 -1
- package/.claude/skills-ja/documentation-criteria/references/plan-template.md +16 -4
- package/.claude/skills-ja/documentation-criteria/references/task-template.md +11 -1
- package/.claude/skills-ja/subagents-orchestration-guide/SKILL.md +3 -1
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Execute from
|
|
2
|
+
description: Execute from codebase analysis to design document creation
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
**Command Context**: This command is dedicated to the design phase.
|
|
@@ -9,46 +9,36 @@ description: Execute from requirement analysis to design document creation
|
|
|
9
9
|
**Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
|
|
10
10
|
|
|
11
11
|
**Execution Protocol**:
|
|
12
|
-
1. **Delegate all work through Agent tool** — invoke sub-agents, pass data between them, and report results (permitted tools: see subagents-orchestration-guide "Orchestrator's Permitted Tools")
|
|
13
|
-
2. **
|
|
14
|
-
- Execute:
|
|
15
|
-
-
|
|
12
|
+
1. **Delegate all work through Agent tool** — invoke sub-agents, pass data between them, and report results (permitted tools: see subagents-orchestration-guide "Orchestrator's Permitted Tools"). The one exception is the Step 1 scope bootstrap, a recipe-local orchestrator task limited to locating seed files.
|
|
13
|
+
2. **Run the design flow below in order** — a fixed linear sequence, no branches:
|
|
14
|
+
- Execute: scope bootstrap → codebase-analyzer → [Stop: Scope confirmation] → technical-designer → code-verifier → document-reviewer → design-sync
|
|
15
|
+
- technical-designer creates a prerequisite ADR when the design involves an architecture decision (per documentation-criteria); the ADR never replaces the Design Doc — the flow always continues through Design Doc creation and the full verification chain
|
|
16
16
|
- **Stop at every `[Stop: ...]` marker** → Wait for user approval before proceeding
|
|
17
17
|
3. **Scope**: Complete when design documents receive approval
|
|
18
18
|
|
|
19
|
-
**
|
|
19
|
+
**subagents-orchestration-guide usage**: Reference the guide for orchestration principles (Delegation Boundary, Decision precedence, permitted tools) and the Scale Determination table. This command defines its own start order; the guide's requirement-analyzer-origin flow does not apply here.
|
|
20
|
+
|
|
21
|
+
**CRITICAL**: NEVER skip document-reviewer, design-sync (for Design Docs), or stopping points — each serves as a quality gate.
|
|
20
22
|
|
|
21
23
|
## Workflow Overview
|
|
22
24
|
|
|
23
25
|
```
|
|
24
|
-
Requirements →
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
Requirements → scope bootstrap → codebase-analyzer → [Stop: Scope confirmation]
|
|
27
|
+
↓
|
|
28
|
+
technical-designer
|
|
29
|
+
↓
|
|
30
|
+
code-verifier → document-reviewer
|
|
31
|
+
↓
|
|
32
|
+
design-sync → [Stop: Design approval]
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
Requirements: $ARGUMENTS
|
|
34
|
-
|
|
35
|
-
Considering the deep impact on design, first engage in dialogue to understand the background and purpose of requirements:
|
|
36
|
-
- What problems do you want to solve?
|
|
37
|
-
- Expected outcomes and success criteria
|
|
38
|
-
- Relationship with existing systems
|
|
39
|
-
|
|
40
|
-
Once requirements are moderately clarified, analyze with requirement-analyzer and create appropriate design documents according to scale.
|
|
41
|
-
|
|
42
|
-
Clearly present design alternatives and trade-offs.
|
|
43
|
-
|
|
44
|
-
Execute the process below within design scope. Follow subagents-orchestration-guide Call Examples for codebase-analyzer and code-verifier invocations.
|
|
45
|
-
|
|
46
35
|
## Scope Boundaries
|
|
47
36
|
|
|
48
37
|
**Included in this command**:
|
|
49
|
-
-
|
|
50
|
-
- Codebase analysis with codebase-analyzer (
|
|
51
|
-
-
|
|
38
|
+
- Scope bootstrap: locating seed files so codebase-analyzer receives a populated input
|
|
39
|
+
- Codebase analysis with codebase-analyzer (entry point of the design phase)
|
|
40
|
+
- Scope confirmation with the user, grounded in codebase-analyzer findings
|
|
41
|
+
- ADR creation as a prerequisite to the Design Doc, when architecture changes, new technology, or data flow changes are involved
|
|
52
42
|
- Design Doc creation with technical-designer
|
|
53
43
|
- Design Doc verification with code-verifier (before document review)
|
|
54
44
|
- Document review with document-reviewer
|
|
@@ -58,29 +48,65 @@ Execute the process below within design scope. Follow subagents-orchestration-gu
|
|
|
58
48
|
|
|
59
49
|
## Execution Flow
|
|
60
50
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
Requirements: $ARGUMENTS
|
|
52
|
+
|
|
53
|
+
### Step 1: Scope Bootstrap
|
|
54
|
+
codebase-analyzer requires a populated `requirement_analysis.affectedFiles`. Build that seed with a lightweight, orchestrator-local pass — locating files only, with no deep reading and no design decisions:
|
|
55
|
+
|
|
56
|
+
1. Extract candidate keywords from the user requirements (feature names, domain nouns, identifiers).
|
|
57
|
+
2. Search the repository with Bash (`rg`, or `grep` when `rg` is unavailable) for files matching those keywords.
|
|
58
|
+
3. Collect the matched file paths as the seed `affectedFiles`.
|
|
59
|
+
4. **When the search returns no files**: ask the user which files or modules the design targets (AskUserQuestion), and use that answer as `affectedFiles`. If the user confirms no related code exists, report that codebase-grounded design does not apply and confirm with the user how to proceed.
|
|
60
|
+
5. **When the search returns more than ~20 files**: the keywords are too broad. Present the most relevant candidates to the user (AskUserQuestion) and confirm the seed `affectedFiles` before proceeding.
|
|
61
|
+
|
|
62
|
+
This step locates seed files only. Reading files in full, tracing dependencies, and analysis remain codebase-analyzer's responsibility.
|
|
63
|
+
|
|
64
|
+
### Step 2: Codebase Analysis
|
|
65
|
+
- Invoke **codebase-analyzer** using Agent tool
|
|
66
|
+
- `subagent_type: "codebase-analyzer"`, `description: "Codebase analysis"`
|
|
67
|
+
- `prompt`: include `requirements` (the user requirements verbatim) and `requirement_analysis` — a JSON object with `affectedFiles` (Step 1 seed), `purpose` (the user requirements), `scale` (provisional value from the Scale Determination table applied to the seed file count), `technicalConsiderations` (`{ constraints: [], risks: [], dependencies: [] }`)
|
|
68
|
+
|
|
69
|
+
### Step 3: Scope Confirmation
|
|
70
|
+
After codebase-analyzer returns, confirm the design scope with the user before any design work. Use AskUserQuestion.
|
|
71
|
+
|
|
72
|
+
Present, sourced from the codebase-analyzer JSON:
|
|
73
|
+
- **Target files/modules**: `analysisScope.filesAnalyzed` and the modules they belong to
|
|
74
|
+
- **Affected layers**: layers touched, derived from `analysisScope.categoriesDetected` and `focusAreas`
|
|
75
|
+
- **Unknowns/assumptions**: `limitations` plus any assumptions codebase-analyzer recorded
|
|
76
|
+
- **Questions before design**: open points that need a user answer before design proceeds
|
|
77
|
+
|
|
78
|
+
Ask the user to choose one:
|
|
79
|
+
- **Proceed to design with this scope** — continue to Step 4
|
|
80
|
+
- **Correct the scope and re-run** — return to Step 1 with the corrected scope; when the user names the corrected files or modules, use those directly as the Step 1 seed
|
|
81
|
+
- **Hold additional hearing, then proceed** — gather the missing answers, then continue to Step 4
|
|
82
|
+
|
|
83
|
+
After the user confirms the scope, count the confirmed target files and set the scale from the Scale Determination table. This confirmed scale supersedes the Step 2 provisional value.
|
|
84
|
+
|
|
85
|
+
**[STOP]**: Wait for the user's choice before proceeding.
|
|
86
|
+
|
|
87
|
+
### Step 4: Design Document Creation
|
|
88
|
+
1. **technical-designer** → create the design documentation. Pass the user requirements (verbatim), the codebase-analyzer JSON, and the confirmed scope. Per documentation-criteria this is a Design Doc, preceded by a prerequisite ADR when the design involves an architecture decision. Present at least two design alternatives with trade-offs for each.
|
|
89
|
+
2. **code-verifier** → Verify the Design Doc against existing code.
|
|
90
|
+
3. **document-reviewer** → Quality check of each document technical-designer produced. For the Design Doc: `doc_type: DesignDoc`, pass `codebase_analysis` (the codebase-analyzer JSON) and the code-verifier results. For the ADR (when one was created): `doc_type: ADR`, pass `codebase_analysis`; code-verifier results apply to the Design Doc only. When the ADR review requires changes, technical-designer(update) revises the ADR **and** re-aligns the Design Doc with the corrected ADR — the Design Doc must not stand on an unreviewed or superseded ADR. When this re-alignment changes the Design Doc, re-run code-verifier and the Design Doc document-reviewer on the updated Design Doc so its verification reflects the final content.
|
|
91
|
+
4. **design-sync** → Design Doc consistency verification.
|
|
68
92
|
- IF conflicts found → Report to user → Wait for fix instructions → Fix with technical-designer(update)
|
|
69
|
-
- IF no conflicts →
|
|
93
|
+
- IF no conflicts → proceed
|
|
94
|
+
5. User approval — present the Design Doc together with the design-sync results, and WAIT for approval.
|
|
70
95
|
|
|
71
96
|
## Completion Criteria
|
|
72
97
|
|
|
73
|
-
- [ ]
|
|
74
|
-
- [ ] Executed codebase-analyzer
|
|
75
|
-
- [ ]
|
|
76
|
-
- [ ]
|
|
77
|
-
- [ ] Executed
|
|
98
|
+
- [ ] Built the Step 1 scope bootstrap seed (or obtained target files from the user when the search returned none)
|
|
99
|
+
- [ ] Executed codebase-analyzer with a populated `requirement_analysis`
|
|
100
|
+
- [ ] Confirmed the design scope with the user and set the scale from the confirmed target files
|
|
101
|
+
- [ ] Created the Design Doc with technical-designer, preceded by a prerequisite ADR when the design involved an architecture decision
|
|
102
|
+
- [ ] Executed code-verifier on the Design Doc and passed results to document-reviewer
|
|
103
|
+
- [ ] Executed document-reviewer on each produced document (Design Doc, and ADR when created) and addressed feedback
|
|
78
104
|
- [ ] Executed design-sync for consistency verification
|
|
79
|
-
- [ ] Obtained user approval for design document
|
|
105
|
+
- [ ] Obtained user approval for the design document
|
|
80
106
|
|
|
81
107
|
## Output Example
|
|
82
108
|
Design phase completed.
|
|
83
109
|
- Design document: docs/design/[document-name].md
|
|
84
110
|
- Consistency: No conflicts with other Design Docs (or fixes completed)
|
|
85
111
|
|
|
86
|
-
**Responsibility Boundary**: This command ends with design approval + consistency verification. Work planning and beyond are outside scope.
|
|
112
|
+
**Responsibility Boundary**: This command ends with design approval + consistency verification. Work planning and beyond are outside scope.
|
|
@@ -160,10 +160,12 @@ Before the completion report, delete the implementation task files this recipe c
|
|
|
160
160
|
|
|
161
161
|
If task files cannot be deleted (filesystem error), report the failure but do not block the completion report.
|
|
162
162
|
|
|
163
|
-
##
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
163
|
+
## Completion Report Contract
|
|
164
|
+
|
|
165
|
+
Final report must include:
|
|
166
|
+
- Task decomposition status
|
|
167
|
+
- Implemented task count
|
|
168
|
+
- Quality check result
|
|
169
|
+
- Commit count
|
|
170
|
+
- Cleanup result
|
|
171
|
+
- Escalation or blocking summary, if any
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Execute from
|
|
2
|
+
description: Execute from codebase analysis to frontend design document creation
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
**Command Context**: This command is dedicated to the frontend design phase.
|
|
@@ -9,35 +9,42 @@ description: Execute from requirement analysis to frontend design document creat
|
|
|
9
9
|
**Core Identity**: "I am an orchestrator." (see subagents-orchestration-guide skill)
|
|
10
10
|
|
|
11
11
|
**Execution Protocol**:
|
|
12
|
-
1. **Delegate all work** to sub-agents — your role is to invoke sub-agents, pass data between them, and report results
|
|
13
|
-
2. **
|
|
14
|
-
- Execute:
|
|
12
|
+
1. **Delegate all work** to sub-agents — your role is to invoke sub-agents, pass data between them, and report results. The one exception is the Step 1 scope bootstrap, a recipe-local orchestrator task limited to locating seed files.
|
|
13
|
+
2. **Run the frontend design flow below in order** (this command covers medium/large frontend) — a fixed linear sequence, no branches:
|
|
14
|
+
- Execute: scope bootstrap → codebase-analyzer → [Stop: Scope confirmation] → ui-analyzer → ui-spec-designer → technical-designer-frontend → code-verifier → document-reviewer → design-sync
|
|
15
|
+
- technical-designer-frontend creates a prerequisite ADR when the design involves an architecture decision (per documentation-criteria); the ADR never replaces the Design Doc — the flow always continues through Design Doc creation and the full verification chain
|
|
15
16
|
- **Stop at every `[Stop: ...]` marker** → Wait for user approval before proceeding
|
|
16
17
|
3. **Scope**: Complete when design documents receive approval
|
|
17
18
|
|
|
18
|
-
**
|
|
19
|
+
**subagents-orchestration-guide usage**: Reference the guide for orchestration principles and the Scale Determination table. This command defines its own start order; the guide's requirement-analyzer-origin flow does not apply here.
|
|
20
|
+
|
|
21
|
+
**CRITICAL**: Execute document-reviewer, design-sync (for Design Docs), and all stopping points — each serves as a quality gate. Skipping any step risks undetected inconsistencies.
|
|
19
22
|
|
|
20
23
|
## Workflow Overview
|
|
21
24
|
|
|
22
25
|
```
|
|
23
|
-
Requirements →
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
Requirements → scope bootstrap → codebase-analyzer → [Stop: Scope confirmation]
|
|
27
|
+
↓
|
|
28
|
+
ui-analyzer
|
|
29
|
+
↓
|
|
30
|
+
ui-spec-designer → [Stop: UI Spec approval]
|
|
31
|
+
↓
|
|
32
|
+
technical-designer-frontend
|
|
33
|
+
↓
|
|
34
|
+
code-verifier → document-reviewer
|
|
35
|
+
↓
|
|
36
|
+
design-sync → [Stop: Design approval]
|
|
32
37
|
```
|
|
33
38
|
|
|
34
39
|
## Scope Boundaries
|
|
35
40
|
|
|
36
41
|
**Included in this command**:
|
|
37
|
-
-
|
|
38
|
-
- Codebase analysis with codebase-analyzer (
|
|
42
|
+
- Scope bootstrap: locating seed files so codebase-analyzer receives a populated input
|
|
43
|
+
- Codebase analysis with codebase-analyzer (entry point of the frontend design phase)
|
|
44
|
+
- Scope confirmation with the user, grounded in codebase-analyzer findings
|
|
45
|
+
- UI fact gathering with ui-analyzer
|
|
39
46
|
- UI Specification creation with ui-spec-designer (prototype code inquiry included)
|
|
40
|
-
- ADR creation
|
|
47
|
+
- ADR creation as a prerequisite to the Design Doc, when architecture changes, new technology, or data flow changes are involved
|
|
41
48
|
- Design Doc creation with technical-designer-frontend
|
|
42
49
|
- Design Doc verification with code-verifier (before document review)
|
|
43
50
|
- Document review with document-reviewer
|
|
@@ -45,26 +52,53 @@ Requirements → requirement-analyzer → [Stop: Scale determination]
|
|
|
45
52
|
|
|
46
53
|
**Responsibility Boundary**: This command completes with frontend design document (UI Spec/ADR/Design Doc) approval. Work planning and beyond are outside scope.
|
|
47
54
|
|
|
55
|
+
## Execution Flow
|
|
56
|
+
|
|
48
57
|
Requirements: $ARGUMENTS
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
### Step 1: Scope Bootstrap
|
|
60
|
+
codebase-analyzer requires a populated `requirement_analysis.affectedFiles`. Build that seed with a lightweight, orchestrator-local pass — locating files only, with no deep reading and no design decisions:
|
|
61
|
+
|
|
62
|
+
1. Extract candidate keywords from the user requirements (feature names, domain nouns, identifiers).
|
|
63
|
+
2. Search the repository with Bash (`rg`, or `grep` when `rg` is unavailable) for files matching those keywords.
|
|
64
|
+
3. Collect the matched file paths as the seed `affectedFiles`.
|
|
65
|
+
4. **When the search returns no files**: ask the user which files or modules the design targets (AskUserQuestion), and use that answer as `affectedFiles`. If the user confirms no related code exists, report that codebase-grounded design does not apply and confirm with the user how to proceed.
|
|
66
|
+
5. **When the search returns more than ~20 files**: the keywords are too broad. Present the most relevant candidates to the user (AskUserQuestion) and confirm the seed `affectedFiles` before proceeding.
|
|
67
|
+
|
|
68
|
+
This step locates seed files only. Reading files in full, tracing dependencies, and analysis remain codebase-analyzer's responsibility.
|
|
69
|
+
|
|
70
|
+
### Step 2: Codebase Analysis
|
|
71
|
+
- Invoke **codebase-analyzer** using Agent tool
|
|
72
|
+
- `subagent_type: "codebase-analyzer"`, `description: "Codebase analysis"`
|
|
73
|
+
- `prompt`: include `requirements` (the user requirements verbatim) and `requirement_analysis` — a JSON object with `affectedFiles` (Step 1 seed), `purpose` (the user requirements), `scale` (provisional value from the Scale Determination table applied to the seed file count), `technicalConsiderations` (`{ constraints: [], risks: [], dependencies: [] }`). Analyze the existing codebase for frontend design guidance.
|
|
74
|
+
|
|
75
|
+
### Step 3: Scope Confirmation
|
|
76
|
+
After codebase-analyzer returns, confirm the design scope with the user before any design work. Use AskUserQuestion.
|
|
77
|
+
|
|
78
|
+
Present, sourced from the codebase-analyzer JSON:
|
|
79
|
+
- **Target files/modules**: `analysisScope.filesAnalyzed` and the modules they belong to
|
|
80
|
+
- **Affected layers**: layers touched, derived from `analysisScope.categoriesDetected` and `focusAreas`
|
|
81
|
+
- **Unknowns/assumptions**: `limitations` plus any assumptions codebase-analyzer recorded
|
|
82
|
+
- **Questions before design**: open points that need a user answer before design proceeds
|
|
83
|
+
|
|
84
|
+
Ask the user to choose one:
|
|
85
|
+
- **Proceed to design with this scope** — continue to Step 4
|
|
86
|
+
- **Correct the scope and re-run** — return to Step 1 with the corrected scope; when the user names the corrected files or modules, use those directly as the Step 1 seed
|
|
87
|
+
- **Hold additional hearing, then proceed** — gather the missing answers, then continue to Step 4
|
|
51
88
|
|
|
52
|
-
|
|
53
|
-
Considering the deep impact on design, first engage in dialogue to understand the background and purpose of requirements:
|
|
54
|
-
- What problems do you want to solve?
|
|
55
|
-
- Expected outcomes and success criteria
|
|
56
|
-
- Relationship with existing systems
|
|
89
|
+
After the user confirms the scope, count the confirmed target files and set the scale from the Scale Determination table. This confirmed scale supersedes the Step 2 provisional value.
|
|
57
90
|
|
|
58
|
-
|
|
91
|
+
**[STOP]**: Wait for the user's choice before proceeding.
|
|
59
92
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- `description: "
|
|
63
|
-
- `prompt
|
|
64
|
-
- **[STOP]**: Review requirement analysis results and address question items
|
|
93
|
+
### Step 4: UI Fact Gathering
|
|
94
|
+
- Invoke **ui-analyzer** using Agent tool
|
|
95
|
+
- `subagent_type: "ui-analyzer"`, `description: "UI fact gathering"`
|
|
96
|
+
- `prompt`: include `requirements` (the user requirements) and `requirement_analysis` — a JSON object with `affectedFiles` (the union of `analysisScope.filesAnalyzed`, `analysisScope.tracedDependencies`, and the `focusAreas[].relatedFiles` paths from the Step 2 codebase-analyzer output), `purpose` (the user requirements), `scale` (the Step 3 confirmed scale), `technicalConsiderations` (`{ constraints: [], risks: [], dependencies: [] }`). ui-analyzer reads the project-context External Resources section, fetches external UI sources via the declared access methods, and analyzes the existing UI codebase.
|
|
65
97
|
|
|
66
|
-
|
|
67
|
-
|
|
98
|
+
The codebase-analyzer JSON (Step 2) and the ui-analyzer JSON (Step 4) are reused by ui-spec-designer and technical-designer-frontend.
|
|
99
|
+
|
|
100
|
+
### Step 5: UI Specification Phase
|
|
101
|
+
Ask the user about prototype code.
|
|
68
102
|
|
|
69
103
|
**Ask the user**: "Do you have prototype code for this feature? If so, please provide the path to the code. The prototype will be placed in `docs/ui-spec/assets/` as reference material for the UI Spec."
|
|
70
104
|
|
|
@@ -72,44 +106,39 @@ After requirement analysis approval, ask the user about prototype code:
|
|
|
72
106
|
|
|
73
107
|
Then create the UI Specification:
|
|
74
108
|
- Invoke **ui-spec-designer** using Agent tool
|
|
75
|
-
- `subagent_type: "ui-spec-designer"`
|
|
76
|
-
-
|
|
77
|
-
- If PRD exists and prototype provided: `prompt: "Create UI Spec from PRD at [path]. Prototype code is at [user-provided path]. Place prototype in docs/ui-spec/assets/{feature-name}/"`
|
|
78
|
-
- If PRD exists and no prototype: `prompt: "Create UI Spec from PRD at [path]. No prototype code available."`
|
|
79
|
-
- If no PRD (medium scale): `prompt: "Create UI Spec based on the following requirements: [pass requirement-analyzer output]. No PRD available."` (add prototype path if provided)
|
|
109
|
+
- `subagent_type: "ui-spec-designer"`, `description: "UI Spec creation"`
|
|
110
|
+
- Build the prompt by including: the source (an existing PRD in `docs/prd/` when one exists for this feature; otherwise the user requirements with the Step 2 codebase-analyzer JSON and the Step 3 confirmed scope), `ui_analysis` (ui-analyzer JSON from Step 4), and the prototype path when provided. Place prototype in `docs/ui-spec/assets/{feature-name}/`.
|
|
80
111
|
- Invoke **document-reviewer** to verify UI Spec
|
|
81
112
|
- `subagent_type: "document-reviewer"`, `description: "UI Spec review"`, `prompt: "doc_type: UISpec target: [ui-spec path] Review for consistency and completeness"`
|
|
82
113
|
- **[STOP]**: Present UI Spec for user approval
|
|
83
114
|
|
|
84
|
-
### Step
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Create appropriate design documents according to scale determination. technical-designer-frontend presents at least two architecture alternatives (technology selection, data flow design) with trade-offs for each:
|
|
90
|
-
- Invoke **technical-designer-frontend** using Agent tool
|
|
91
|
-
- For ADR: `subagent_type: "technical-designer-frontend"`, `description: "ADR creation"`, `prompt: "Create ADR for [technical decision]. Present at least two alternatives with trade-offs."`
|
|
92
|
-
- For Design Doc: `subagent_type: "technical-designer-frontend"`, `description: "Design Doc creation"`, `prompt: "Create Design Doc based on requirements. Codebase analysis: [JSON from codebase-analyzer]. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec. Present at least two architecture alternatives with trade-offs."`
|
|
93
|
-
- **(Design Doc only)** Invoke **code-verifier** to verify Design Doc against existing code. Skip for ADR.
|
|
115
|
+
### Step 6: Design Document Creation Phase
|
|
116
|
+
- Invoke **technical-designer-frontend** using Agent tool to create the design documentation. Per documentation-criteria it produces a Design Doc; when the design involves an architecture decision (architecture change, new technology, or data flow change) it first creates the prerequisite ADR.
|
|
117
|
+
- `subagent_type: "technical-designer-frontend"`, `description: "Design documentation creation"`, `prompt: "Create the design documentation for this requirement. Per documentation-criteria, produce a Design Doc; when the design involves an architecture decision, first create the prerequisite ADR. Requirements: [user requirements verbatim]. Codebase analysis: [codebase-analyzer JSON from Step 2]. UI analysis: [ui-analyzer JSON from Step 4]. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec. Present at least two architecture alternatives with trade-offs."`
|
|
118
|
+
- Invoke **code-verifier** to verify the Design Doc against existing code.
|
|
94
119
|
- `subagent_type: "code-verifier"`, `description: "Design Doc verification"`, `prompt: "doc_type: design-doc document_path: [Design Doc path] mode: pre-implementation (code_paths omitted — verifier discovers scope from document). Verify Design Doc against existing code."`
|
|
95
|
-
- Invoke **document-reviewer**
|
|
96
|
-
- `subagent_type: "document-reviewer"`, `description: "Document review"`, `prompt: "doc_type: DesignDoc target: [
|
|
120
|
+
- Invoke **document-reviewer** for each document technical-designer-frontend produced — the Design Doc, and the ADR when one was created.
|
|
121
|
+
- Design Doc: `subagent_type: "document-reviewer"`, `description: "Document review"`, `prompt: "doc_type: DesignDoc target: [Design Doc path] mode: composite codebase_analysis: [codebase-analyzer JSON from Step 2] code_verification: [JSON from code-verifier]. Review for consistency and completeness."`
|
|
122
|
+
- ADR (when created): `subagent_type: "document-reviewer"`, `description: "ADR review"`, `prompt: "doc_type: ADR target: [ADR path] mode: composite. Review for consistency and completeness."`
|
|
123
|
+
- When the ADR review requires changes, technical-designer-frontend(update) revises the ADR and re-aligns the Design Doc with the corrected ADR — the Design Doc must not stand on an unreviewed or superseded ADR. When this re-alignment changes the Design Doc, re-run code-verifier and the Design Doc document-reviewer on the updated Design Doc so its verification reflects the final content.
|
|
97
124
|
|
|
98
|
-
### Step
|
|
99
|
-
- Invoke **design-sync** using Agent tool
|
|
125
|
+
### Step 7: Design Consistency Verification
|
|
126
|
+
- Invoke **design-sync** using Agent tool.
|
|
100
127
|
- `subagent_type: "design-sync"`, `description: "Design consistency check"`, `prompt: "Check consistency across all Design Docs in docs/design/. Report conflicts and overlaps."`
|
|
101
|
-
- **[STOP]**: Present design
|
|
128
|
+
- **[STOP]**: Present the design document, plus design-sync results for a Design Doc, and obtain user approval
|
|
102
129
|
|
|
103
130
|
## Completion Criteria
|
|
104
131
|
|
|
105
|
-
- [ ]
|
|
106
|
-
- [ ] Executed codebase-analyzer
|
|
107
|
-
- [ ]
|
|
108
|
-
- [ ]
|
|
109
|
-
- [ ]
|
|
110
|
-
- [ ]
|
|
132
|
+
- [ ] Built the Step 1 scope bootstrap seed (or obtained target files from the user when the search returned none)
|
|
133
|
+
- [ ] Executed codebase-analyzer with a populated `requirement_analysis`
|
|
134
|
+
- [ ] Confirmed the design scope with the user and set the scale from the confirmed target files
|
|
135
|
+
- [ ] Executed ui-analyzer; codebase-analyzer (Step 2) and ui-analyzer (Step 4) outputs reused by ui-spec-designer and technical-designer-frontend
|
|
136
|
+
- [ ] Created the UI Specification with ui-spec-designer
|
|
137
|
+
- [ ] Created the Design Doc with technical-designer-frontend, preceded by a prerequisite ADR when the design involved an architecture decision
|
|
138
|
+
- [ ] Executed code-verifier on the Design Doc and passed results to document-reviewer
|
|
139
|
+
- [ ] Executed document-reviewer on each produced document (Design Doc, and ADR when created) and addressed feedback
|
|
111
140
|
- [ ] Executed design-sync for consistency verification
|
|
112
|
-
- [ ] Obtained user approval for design document
|
|
141
|
+
- [ ] Obtained user approval for the design document
|
|
113
142
|
|
|
114
143
|
## Output Example
|
|
115
144
|
Frontend design phase completed.
|
|
@@ -179,13 +179,15 @@ Escalate when the required fix or investigation falls outside that scope.
|
|
|
179
179
|
|
|
180
180
|
タスクファイルを削除できない場合(ファイルシステムエラー)、失敗を報告するが完了レポートをブロックしない。
|
|
181
181
|
|
|
182
|
-
##
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
182
|
+
## 完了レポートコントラクト
|
|
183
|
+
|
|
184
|
+
最終レポートには以下を含めること:
|
|
185
|
+
- タスク分解のステータス
|
|
186
|
+
- 実装したタスク数
|
|
187
|
+
- 品質チェック結果
|
|
188
|
+
- コミット数
|
|
189
|
+
- クリーンアップ結果
|
|
190
|
+
- エスカレーションまたはブロッキングの要約(あれば)
|
|
189
191
|
|
|
190
192
|
**責務境界**:
|
|
191
193
|
- スコープ内: タスク分解から実装完了まで
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: コードベース分析から設計書作成まで実行
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
**コマンドコンテキスト**: このコマンドは設計フェーズ専用です。
|
|
@@ -9,46 +9,36 @@ description: 要件分析から設計書作成まで実行
|
|
|
9
9
|
**コアアイデンティティ**: 「私は作業者ではない。オーケストレーターである。」(subagents-orchestration-guideスキル参照)
|
|
10
10
|
|
|
11
11
|
**実行プロトコル**:
|
|
12
|
-
1. **全作業をAgentツールでサブエージェントに委譲** — サブエージェントの呼び出し、データの受け渡し、結果の報告(許可ツール: subagents-orchestration-guide
|
|
13
|
-
2.
|
|
14
|
-
- 実行:
|
|
15
|
-
-
|
|
12
|
+
1. **全作業をAgentツールでサブエージェントに委譲** — サブエージェントの呼び出し、データの受け渡し、結果の報告(許可ツール: subagents-orchestration-guideスキル「オーケストレーターの許可ツール」参照)。唯一の例外はStep 1のスコープブートストラップで、シードファイルの特定に限定したレシピ内オーケストレータータスク。
|
|
13
|
+
2. **以下の設計フローを順に実行** — 分岐のない固定の線形シーケンス:
|
|
14
|
+
- 実行: スコープブートストラップ → codebase-analyzer → [停止: スコープ確認] → technical-designer → code-verifier → document-reviewer → design-sync
|
|
15
|
+
- technical-designerは、設計にアーキテクチャ決定が伴う場合(documentation-criteriaに従う)に前提となるADRを作成する。ADRはDesign Docを置き換えない — フローは常にDesign Doc作成と検証チェーン全体を通過する
|
|
16
16
|
- **`[停止: ...]`マーカーで必ず停止** → 次に進む前にユーザー承認を待つ
|
|
17
17
|
3. **スコープ**: 設計書が承認されたら完了
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
**subagents-orchestration-guideの利用**: オーケストレーション原則(Delegation Boundary、Decision precedence、許可ツール)とScale Determination表を参照する。このコマンドは独自の開始順序を定義する — ガイドのrequirement-analyzer起点フローはここでは適用しない。
|
|
20
|
+
|
|
21
|
+
**重要**: document-reviewer、design-sync(Design Docの場合)、停止ポイントは決してスキップしない — 各々が品質ゲートとして機能する。
|
|
20
22
|
|
|
21
23
|
## ワークフロー概要
|
|
22
24
|
|
|
23
25
|
```
|
|
24
|
-
要件 →
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
要件 → スコープブートストラップ → codebase-analyzer → [停止: スコープ確認]
|
|
27
|
+
↓
|
|
28
|
+
technical-designer
|
|
29
|
+
↓
|
|
30
|
+
code-verifier → document-reviewer
|
|
31
|
+
↓
|
|
32
|
+
design-sync → [停止: 設計承認]
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
要件: $ARGUMENTS
|
|
34
|
-
|
|
35
|
-
設計への影響を深く考慮し、まず要件の背景と目的を理解するため対話を行い:
|
|
36
|
-
- どのような問題を解決したいか
|
|
37
|
-
- 期待される成果と成功基準
|
|
38
|
-
- 既存システムとの関係性
|
|
39
|
-
|
|
40
|
-
適度に要件が明確になったら、requirement-analyzerで分析し、規模に応じた適切な設計書を作成します。
|
|
41
|
-
|
|
42
|
-
設計の代替案とトレードオフを明確に提示します。
|
|
43
|
-
|
|
44
|
-
subagents-orchestration-guideのCall Examplesに従い、codebase-analyzerとcode-verifierを呼び出す。
|
|
45
|
-
|
|
46
35
|
## スコープ境界
|
|
47
36
|
|
|
48
37
|
**実行内容**:
|
|
49
|
-
-
|
|
50
|
-
- codebase-analyzer
|
|
51
|
-
-
|
|
38
|
+
- スコープブートストラップ: codebase-analyzerが値の入った入力を得られるようシードファイルを特定する
|
|
39
|
+
- codebase-analyzerによるコードベース分析(設計フェーズの入口)
|
|
40
|
+
- codebase-analyzerの所見に基づくユーザーとのスコープ確認
|
|
41
|
+
- ADR作成(アーキテクチャ変更、新技術、データフロー変更が伴う場合、Design Docの前提として)
|
|
52
42
|
- technical-designerによるDesign Doc作成
|
|
53
43
|
- code-verifierによるDesign Doc検証(ドキュメントレビューの前に実施)
|
|
54
44
|
- document-reviewerによるドキュメントレビュー
|
|
@@ -58,25 +48,61 @@ subagents-orchestration-guideのCall Examplesに従い、codebase-analyzerとcod
|
|
|
58
48
|
|
|
59
49
|
## 実行フロー
|
|
60
50
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
要件: $ARGUMENTS
|
|
52
|
+
|
|
53
|
+
### Step 1: スコープブートストラップ
|
|
54
|
+
codebase-analyzerは値の入った`requirement_analysis.affectedFiles`を必要とする。そのシードを、軽量なオーケストレーター内タスクで構築する — ファイルの特定のみで、深い読み込みや設計判断は行わない:
|
|
55
|
+
|
|
56
|
+
1. ユーザー要件から候補キーワード(機能名、ドメイン名詞、識別子)を抽出する。
|
|
57
|
+
2. Bash(`rg`、`rg`が使えない場合は`grep`)で、それらのキーワードに一致するファイルをリポジトリ内で検索する。
|
|
58
|
+
3. 一致したファイルパスをシード`affectedFiles`として収集する。
|
|
59
|
+
4. **検索結果が0件の場合**: 設計対象のファイルまたはモジュールをユーザーに確認し(AskUserQuestion)、その回答を`affectedFiles`とする。関連コードが存在しないとユーザーが確認した場合は、コードベース起点の設計が適用できない旨を報告し、進め方をユーザーと確認する。
|
|
60
|
+
5. **検索結果が約20件を超える場合**: キーワードが広すぎる。最も関連性の高い候補をユーザーに提示し(AskUserQuestion)、シード`affectedFiles`を確認してから進む。
|
|
61
|
+
|
|
62
|
+
このステップはシードファイルの特定のみを行う。ファイルの全文読み込み、依存関係の追跡、分析はcodebase-analyzerの責務である。
|
|
63
|
+
|
|
64
|
+
### Step 2: コードベース分析
|
|
65
|
+
- Agentツールで**codebase-analyzer**を呼び出す
|
|
66
|
+
- `subagent_type: "codebase-analyzer"`, `description: "コードベース分析"`
|
|
67
|
+
- `prompt`: `requirements`(ユーザー要件の原文)と`requirement_analysis`(`affectedFiles`(Step 1のシード)、`purpose`(ユーザー要件)、`scale`(シードファイル数にScale Determination表を当てた暫定値)、`technicalConsiderations`(`{ constraints: [], risks: [], dependencies: [] }`)を含むJSONオブジェクト)を含める
|
|
68
|
+
|
|
69
|
+
### Step 3: スコープ確認
|
|
70
|
+
codebase-analyzerが返ったら、設計作業の前にユーザーとスコープを確認する。AskUserQuestionを使う。
|
|
71
|
+
|
|
72
|
+
codebase-analyzerのJSONを出典として以下を提示する:
|
|
73
|
+
- **対象ファイル/モジュール**: `analysisScope.filesAnalyzed`と、それらが属するモジュール
|
|
74
|
+
- **影響を受けるレイヤー**: `analysisScope.categoriesDetected`と`focusAreas`から導出される、影響を受けるレイヤー
|
|
75
|
+
- **不明点/前提**: `limitations`と、codebase-analyzerが記録した前提
|
|
76
|
+
- **設計前の質問事項**: 設計を進める前にユーザーの回答が必要な未解決点
|
|
77
|
+
|
|
78
|
+
ユーザーに以下から1つを選んでもらう:
|
|
79
|
+
- **このスコープで設計を進める** — Step 4へ進む
|
|
80
|
+
- **スコープを修正して再実行** — 修正したスコープでStep 1に戻る。ユーザーが修正後のファイルまたはモジュールを指定した場合は、検索で導出し直さず、それをStep 1のシードとして直接使う
|
|
81
|
+
- **追加ヒアリングののち進める** — 不足している回答を集めてからStep 4へ進む
|
|
82
|
+
|
|
83
|
+
ユーザーがスコープを確認したら、確認済みの対象ファイル数を数え、Scale Determination表から規模を設定する。この確認済みの規模はStep 2の暫定値に優先する。
|
|
84
|
+
|
|
85
|
+
**[停止]**: ユーザーの選択を待ってから進む。
|
|
86
|
+
|
|
87
|
+
### Step 4: 設計書作成
|
|
88
|
+
1. **technical-designer** → 設計書を作成する。ユーザー要件(原文)、codebase-analyzerのJSON、確認済みスコープを渡す。documentation-criteriaに従い、これはDesign Docであり、設計にアーキテクチャ決定が伴う場合は前提となるADRを先に作成する。少なくとも2つの設計選択肢をトレードオフとともに提示する。
|
|
89
|
+
2. **code-verifier** → Design Docを既存コードに対して検証する。
|
|
90
|
+
3. **document-reviewer** → technical-designerが作成した各ドキュメントの品質チェック。Design Docの場合: `doc_type: DesignDoc`、`codebase_analysis`(codebase-analyzerのJSON)とcode-verifier結果を渡す。ADR(作成された場合)の場合: `doc_type: ADR`、`codebase_analysis`を渡す。code-verifier結果はDesign Docにのみ適用する。ADRレビューで修正が必要になった場合、technical-designer(update)がADRを修正し、**かつ**修正後のADRに合わせてDesign Docを再整合させる — Design Docは未レビューまたは古いADRの上に立ってはならない。この再整合でDesign Docが変わった場合は、更新後のDesign Docに対してcode-verifierとDesign Docのdocument-reviewerを再実行し、検証が最終内容を反映するようにする。
|
|
91
|
+
4. **design-sync** → Design Doc間整合性検証。
|
|
68
92
|
- 矛盾あり → ユーザーに報告 → 修正指示待ち → technical-designer(update)で修正
|
|
69
|
-
- 矛盾なし →
|
|
93
|
+
- 矛盾なし → 次へ進む
|
|
94
|
+
5. ユーザー承認 — Design Doc を design-sync の結果とともに提示し、承認を待つ。
|
|
70
95
|
|
|
71
96
|
## 完了条件
|
|
72
97
|
|
|
73
|
-
- [ ]
|
|
74
|
-
- [ ] codebase-analyzer
|
|
75
|
-
- [ ]
|
|
76
|
-
- [ ]
|
|
77
|
-
- [ ] document-reviewer
|
|
98
|
+
- [ ] Step 1のスコープブートストラップのシードを構築した(または検索結果が0件のときユーザーから対象ファイルを取得した)
|
|
99
|
+
- [ ] 値の入った`requirement_analysis`でcodebase-analyzerを実行した
|
|
100
|
+
- [ ] ユーザーと設計スコープを確認し、確認済みの対象ファイルから規模を設定した
|
|
101
|
+
- [ ] technical-designerでDesign Docを作成した。設計にアーキテクチャ決定が伴う場合は前提となるADRを先に作成した
|
|
102
|
+
- [ ] Design Docに対してcode-verifierを実行し、結果をdocument-reviewerに渡した
|
|
103
|
+
- [ ] 作成した各ドキュメント(Design Doc、および作成された場合のADR)に対してdocument-reviewerを実行し、フィードバックに対応した
|
|
78
104
|
- [ ] design-syncで整合性検証を実行した
|
|
79
|
-
- [ ]
|
|
105
|
+
- [ ] 設計書のユーザー承認を取得した
|
|
80
106
|
|
|
81
107
|
## 出力例
|
|
82
108
|
設計フェーズが完了しました。
|
|
@@ -160,10 +160,12 @@ Escalate when the required fix or investigation falls outside that scope.
|
|
|
160
160
|
|
|
161
161
|
タスクファイルを削除できない場合(ファイルシステムエラー)、失敗を報告するが完了レポートをブロックしない。
|
|
162
162
|
|
|
163
|
-
##
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
163
|
+
## 完了レポートコントラクト
|
|
164
|
+
|
|
165
|
+
最終レポートには以下を含めること:
|
|
166
|
+
- タスク分解のステータス
|
|
167
|
+
- 実装したタスク数
|
|
168
|
+
- 品質チェック結果
|
|
169
|
+
- コミット数
|
|
170
|
+
- クリーンアップ結果
|
|
171
|
+
- エスカレーションまたはブロッキングの要約(あれば)
|