create-claude-webapp 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/.claude/agents/acceptance-test-generator.md +256 -0
  2. package/.claude/agents/auth-flow-designer.md +93 -0
  3. package/.claude/agents/code-reviewer.md +193 -0
  4. package/.claude/agents/code-verifier.md +194 -0
  5. package/.claude/agents/deployment-executor.md +90 -0
  6. package/.claude/agents/design-sync.md +226 -0
  7. package/.claude/agents/document-reviewer.md +304 -0
  8. package/.claude/agents/environment-validator.md +100 -0
  9. package/.claude/agents/integration-test-reviewer.md +196 -0
  10. package/.claude/agents/investigator.md +162 -0
  11. package/.claude/agents/prd-creator.md +220 -0
  12. package/.claude/agents/quality-fixer-frontend.md +323 -0
  13. package/.claude/agents/quality-fixer.md +280 -0
  14. package/.claude/agents/requirement-analyzer.md +149 -0
  15. package/.claude/agents/rls-policy-designer.md +86 -0
  16. package/.claude/agents/rule-advisor.md +123 -0
  17. package/.claude/agents/scope-discoverer.md +231 -0
  18. package/.claude/agents/solver.md +173 -0
  19. package/.claude/agents/supabase-migration-generator.md +85 -0
  20. package/.claude/agents/task-decomposer.md +246 -0
  21. package/.claude/agents/task-executor-frontend.md +264 -0
  22. package/.claude/agents/task-executor.md +261 -0
  23. package/.claude/agents/technical-designer-frontend.md +444 -0
  24. package/.claude/agents/technical-designer.md +370 -0
  25. package/.claude/agents/verifier.md +193 -0
  26. package/.claude/agents/work-planner.md +211 -0
  27. package/.claude/commands/add-integration-tests.md +116 -0
  28. package/.claude/commands/build.md +77 -0
  29. package/.claude/commands/db-migrate.md +96 -0
  30. package/.claude/commands/deploy.md +95 -0
  31. package/.claude/commands/design.md +75 -0
  32. package/.claude/commands/diagnose.md +202 -0
  33. package/.claude/commands/front-build.md +116 -0
  34. package/.claude/commands/front-design.md +61 -0
  35. package/.claude/commands/front-plan.md +53 -0
  36. package/.claude/commands/front-reverse-design.md +183 -0
  37. package/.claude/commands/front-review.md +89 -0
  38. package/.claude/commands/implement.md +80 -0
  39. package/.claude/commands/local-dev.md +94 -0
  40. package/.claude/commands/plan.md +61 -0
  41. package/.claude/commands/project-inject.md +76 -0
  42. package/.claude/commands/refine-skill.md +207 -0
  43. package/.claude/commands/reverse-engineer.md +301 -0
  44. package/.claude/commands/review.md +88 -0
  45. package/.claude/commands/setup-auth.md +68 -0
  46. package/.claude/commands/setup-supabase.md +66 -0
  47. package/.claude/commands/setup-vercel.md +71 -0
  48. package/.claude/commands/sync-skills.md +116 -0
  49. package/.claude/commands/task.md +13 -0
  50. package/.claude/skills/coding-standards/SKILL.md +246 -0
  51. package/.claude/skills/documentation-criteria/SKILL.md +184 -0
  52. package/.claude/skills/documentation-criteria/references/adr-template.md +64 -0
  53. package/.claude/skills/documentation-criteria/references/design-template.md +263 -0
  54. package/.claude/skills/documentation-criteria/references/plan-template.md +130 -0
  55. package/.claude/skills/documentation-criteria/references/prd-template.md +109 -0
  56. package/.claude/skills/documentation-criteria/references/task-template.md +38 -0
  57. package/.claude/skills/frontend/technical-spec/SKILL.md +147 -0
  58. package/.claude/skills/frontend/typescript-rules/SKILL.md +136 -0
  59. package/.claude/skills/frontend/typescript-testing/SKILL.md +129 -0
  60. package/.claude/skills/fullstack-integration/SKILL.md +466 -0
  61. package/.claude/skills/implementation-approach/SKILL.md +141 -0
  62. package/.claude/skills/integration-e2e-testing/SKILL.md +146 -0
  63. package/.claude/skills/interview/SKILL.md +345 -0
  64. package/.claude/skills/project-context/SKILL.md +53 -0
  65. package/.claude/skills/stack-auth/SKILL.md +519 -0
  66. package/.claude/skills/subagents-orchestration-guide/SKILL.md +218 -0
  67. package/.claude/skills/supabase/SKILL.md +289 -0
  68. package/.claude/skills/supabase-edge-functions/SKILL.md +386 -0
  69. package/.claude/skills/supabase-local/SKILL.md +328 -0
  70. package/.claude/skills/supabase-testing/SKILL.md +513 -0
  71. package/.claude/skills/task-analyzer/SKILL.md +131 -0
  72. package/.claude/skills/task-analyzer/references/skills-index.yaml +375 -0
  73. package/.claude/skills/technical-spec/SKILL.md +86 -0
  74. package/.claude/skills/typescript-rules/SKILL.md +121 -0
  75. package/.claude/skills/typescript-testing/SKILL.md +155 -0
  76. package/.claude/skills/vercel-deployment/SKILL.md +355 -0
  77. package/.claude/skills/vercel-edge/SKILL.md +407 -0
  78. package/README.md +1 -1
  79. package/package.json +1 -1
@@ -0,0 +1,202 @@
1
+ ---
2
+ description: Investigate problem, verify findings, and derive solutions
3
+ ---
4
+
5
+ **Command Context**: Diagnosis flow to identify root cause and present solutions
6
+
7
+ Target problem: $ARGUMENTS
8
+
9
+ **Role**: Orchestrator
10
+
11
+ **Execution Method**:
12
+ - Investigation → performed by investigator
13
+ - Verification → performed by verifier
14
+ - Solution derivation → performed by solver
15
+
16
+ Orchestrator invokes sub-agents and passes structured JSON between them.
17
+
18
+ **TodoWrite Registration**: Register execution steps in TodoWrite and proceed systematically
19
+
20
+ ## Step 0: Problem Structuring (Before investigator invocation)
21
+
22
+ ### 0.1 Problem Type Determination
23
+
24
+ | Type | Criteria |
25
+ |------|----------|
26
+ | Change Failure | Indicates some change occurred before the problem appeared |
27
+ | New Discovery | No relation to changes is indicated |
28
+
29
+ If uncertain, ask the user whether any changes were made right before the problem occurred.
30
+
31
+ ### 0.2 Information Supplementation for Change Failures
32
+
33
+ If the following are unclear, **ask with AskUserQuestion** before proceeding:
34
+ - What was changed (cause change)
35
+ - What broke (affected area)
36
+ - Relationship between both (shared components, etc.)
37
+
38
+ ### 0.3 Problem Essence Understanding
39
+
40
+ **Invoke rule-advisor via Task tool**:
41
+ ```
42
+ subagent_type: rule-advisor
43
+ prompt: Identify the essence and required rules for this problem: [Problem reported by user]
44
+ ```
45
+
46
+ Confirm from rule-advisor output:
47
+ - `taskAnalysis.mainFocus`: Primary focus of the problem
48
+ - `mandatoryChecks.taskEssence`: Root problem beyond surface symptoms
49
+ - `selectedRules`: Applicable rule sections
50
+ - `warningPatterns`: Patterns to avoid
51
+
52
+ ### 0.4 Reflecting in investigator Prompt
53
+
54
+ **Include the following in investigator prompt**:
55
+ 1. Problem essence (taskEssence)
56
+ 2. Key applicable rules summary (from selectedRules)
57
+ 3. Investigation focus (investigationFocus): Convert warningPatterns to "points prone to confusion or oversight in this investigation"
58
+ 4. **For change failures, additionally include**:
59
+ - Detailed analysis of the change content
60
+ - Commonalities between cause change and affected area
61
+ - Determination of whether the change is a "correct fix" or "new bug" with comparison baseline selection
62
+
63
+ ## Diagnosis Flow Overview
64
+
65
+ ```
66
+ Problem → investigator → verifier → solver ─┐
67
+ ↑ │
68
+ └── confidence < high ─────┘
69
+ (max 2 iterations)
70
+
71
+ confidence=high reached → Report
72
+ ```
73
+
74
+ **Context Separation**: Pass only structured JSON output to each step. Each step starts fresh with the JSON data only.
75
+
76
+ ## Execution Steps
77
+
78
+ Register the following in TodoWrite and execute:
79
+
80
+ ### Step 1: Investigation (investigator)
81
+
82
+ **Task tool invocation**:
83
+ ```
84
+ subagent_type: investigator
85
+ prompt: Comprehensively collect information related to the following phenomenon.
86
+
87
+ Phenomenon: [Problem reported by user]
88
+ ```
89
+
90
+ **Expected output**: Evidence matrix, comparison analysis results, causal tracking results, list of unexplored areas, investigation limitations
91
+
92
+ ### Step 2: Investigation Quality Check
93
+
94
+ Review investigation output:
95
+
96
+ **Quality Check** (verify JSON output contains the following):
97
+ - [ ] comparisonAnalysis
98
+ - [ ] causalChain for each hypothesis (reaching stop condition)
99
+ - [ ] causeCategory for each hypothesis
100
+ - [ ] Investigation covering investigationFocus items (when provided)
101
+
102
+ **If quality insufficient**: Re-run investigator specifying missing items
103
+
104
+ **design_gap Escalation**:
105
+
106
+ When investigator output contains `causeCategory: design_gap` or `recurrenceRisk: high`:
107
+ 1. **Insert user confirmation before verifier execution**
108
+ 2. Use AskUserQuestion:
109
+ "A design-level issue was detected. How should we proceed?"
110
+ - A: Attempt fix within current design
111
+ - B: Include design reconsideration
112
+ 3. If user selects B, pass `includeRedesign: true` to solver
113
+
114
+ Proceed to verifier once quality is satisfied.
115
+
116
+ ### Step 3: Verification (verifier)
117
+
118
+ **Task tool invocation**:
119
+ ```
120
+ subagent_type: verifier
121
+ prompt: Verify the following investigation results.
122
+
123
+ Investigation results: [Investigation JSON output]
124
+ ```
125
+
126
+ **Expected output**: Alternative hypotheses (at least 3), Devil's Advocate evaluation, final conclusion, confidence
127
+
128
+ **Confidence Criteria**:
129
+ - **high**: No uncertainty affecting solution selection or implementation
130
+ - **medium**: Uncertainty exists but resolvable with additional investigation
131
+ - **low**: Fundamental information gap exists
132
+
133
+ ### Step 4: Solution Derivation (solver)
134
+
135
+ **Task tool invocation**:
136
+ ```
137
+ subagent_type: solver
138
+ prompt: Derive solutions based on the following verified conclusion.
139
+
140
+ Causes: [verifier's conclusion.causes]
141
+ Causes relationship: [causesRelationship: independent/dependent/exclusive]
142
+ Confidence: [high/medium/low]
143
+ ```
144
+
145
+ **Expected output**: Multiple solutions (at least 3), tradeoff analysis, recommendation and implementation steps, residual risks
146
+
147
+ **Completion condition**: confidence=high
148
+
149
+ **When not reached**:
150
+ 1. Return to Step 1 with uncertainties identified by solver as investigation targets
151
+ 2. Maximum 2 additional investigation iterations
152
+ 3. After 2 iterations without reaching high, present user with options:
153
+ - Continue additional investigation
154
+ - Execute solution at current confidence level
155
+
156
+ ### Step 5: Final Report Creation
157
+
158
+ **Prerequisite**: confidence=high achieved
159
+
160
+ After diagnosis completion, report to user in the following format:
161
+
162
+ ```
163
+ ## Diagnosis Result Summary
164
+
165
+ ### Identified Causes
166
+ [Cause list from verification results]
167
+ - Causes relationship: [independent/dependent/exclusive]
168
+
169
+ ### Verification Process
170
+ - Investigation scope: [Scope confirmed in investigation]
171
+ - Additional investigation iterations: [0/1/2]
172
+ - Alternative hypotheses count: [Number generated in verification]
173
+
174
+ ### Recommended Solution
175
+ [Solution derivation recommendation]
176
+
177
+ Rationale: [Selection rationale]
178
+
179
+ ### Implementation Steps
180
+ 1. [Step 1]
181
+ 2. [Step 2]
182
+ ...
183
+
184
+ ### Alternatives
185
+ [Alternative description]
186
+
187
+ ### Residual Risks
188
+ [solver's residualRisks]
189
+
190
+ ### Post-Resolution Verification Items
191
+ - [Verification item 1]
192
+ - [Verification item 2]
193
+ ```
194
+
195
+ ## Completion Criteria
196
+
197
+ - [ ] Executed investigator and obtained evidence matrix, comparison analysis, and causal tracking
198
+ - [ ] Performed investigation quality check and re-ran if insufficient
199
+ - [ ] Executed verifier and obtained confidence level
200
+ - [ ] Executed solver
201
+ - [ ] Achieved confidence=high (or obtained user approval after 2 additional iterations)
202
+ - [ ] Presented final report to user
@@ -0,0 +1,116 @@
1
+ ---
2
+ description: Execute frontend implementation in autonomous execution mode
3
+ ---
4
+
5
+ ## Orchestrator Definition
6
+
7
+ **Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
8
+
9
+ **Execution Method**:
10
+ - Task decomposition → performed by task-decomposer
11
+ - Frontend implementation → performed by task-executor-frontend
12
+ - Quality checks and fixes → performed by quality-fixer-frontend
13
+ - Commits → performed by orchestrator (Bash tool)
14
+
15
+ Orchestrator invokes sub-agents and passes structured JSON between them.
16
+
17
+ **CRITICAL**: Run quality-fixer-frontend before every commit. Obtain batch approval before autonomous mode.
18
+
19
+ Work plan: $ARGUMENTS
20
+
21
+ ## Pre-execution Prerequisites
22
+
23
+ ### Task File Existence Check
24
+ ```bash
25
+ # Check work plans
26
+ ! ls -la docs/plans/*.md | grep -v template | tail -5
27
+
28
+ # Check task files
29
+ ! ls docs/plans/tasks/*.md 2>/dev/null || echo "⚠️ No task files found"
30
+ ```
31
+
32
+ ### Task Generation Decision Flow
33
+
34
+ **Think deeply**: Analyze task file existence state and determine the appropriate action:
35
+
36
+ | State | Criteria | Next Action |
37
+ |-------|----------|-------------|
38
+ | Tasks exist | .md files in tasks/ directory | Proceed to autonomous execution |
39
+ | No tasks + plan exists | Plan exists but no task files | Confirm with user → run task-decomposer |
40
+ | Neither exists | No plan or task files | Error: Prerequisites not met |
41
+
42
+ ## Task Decomposition Phase (Conditional)
43
+
44
+ When task files don't exist:
45
+
46
+ ### 1. User Confirmation
47
+ ```
48
+ No task files found.
49
+ Work plan: docs/plans/[plan-name].md
50
+
51
+ Generate tasks from the work plan? (y/n):
52
+ ```
53
+
54
+ ### 2. Task Decomposition (if approved)
55
+ ```
56
+ @task-decomposer Read work plan and decompose into atomic tasks:
57
+ - Input: docs/plans/[plan-name].md
58
+ - Output: Individual task files in docs/plans/tasks/
59
+ - Granularity: 1 task = 1 commit = independently executable
60
+ ```
61
+
62
+ ### 3. Verify Generation
63
+ ```bash
64
+ # Verify generated task files
65
+ ! ls -la docs/plans/tasks/*.md | head -10
66
+ ```
67
+
68
+ ✅ **Flow**: Task generation → Autonomous execution (in this order)
69
+
70
+ ## Task Execution Cycle (4-Step Cycle) - Frontend Specialized
71
+
72
+ **MANDATORY EXECUTION CYCLE**: `task-executor-frontend → escalation check → quality-fixer-frontend → commit`
73
+
74
+ ### Sub-agent Invocation Method
75
+ Use Task tool to invoke sub-agents:
76
+ - `subagent_type`: Agent name
77
+ - `description`: Brief task description (3-5 words)
78
+ - `prompt`: Specific instructions
79
+
80
+ ### Structured Response Specification
81
+ Each sub-agent responds in JSON format:
82
+ - **task-executor-frontend**: status, filesModified, testsAdded, readyForQualityCheck
83
+ - **quality-fixer-frontend**: status, checksPerformed, fixesApplied, approved
84
+
85
+ ### Execution Flow for Each Task
86
+
87
+ For EACH task, YOU MUST:
88
+
89
+ 1. **UPDATE TodoWrite**: Register work steps. Always include: first "Confirm skill constraints", final "Verify skill fidelity"
90
+ 2. **USE task-executor-frontend**: Execute frontend implementation
91
+ - Invocation example: `subagent_type: "task-executor-frontend"`, `description: "Task execution"`, `prompt: "Task file: docs/plans/tasks/[filename].md Execute implementation"`
92
+ 3. **CHECK ESCALATION**: Check task-executor-frontend status → If `status: "escalation_needed"` → STOP and escalate to user
93
+ 4. **PROCESS structured responses**: When `readyForQualityCheck: true` is detected → EXECUTE quality-fixer-frontend IMMEDIATELY
94
+ 5. **USE quality-fixer-frontend**: Execute all quality checks (Biome, TypeScript build, tests)
95
+ - Invocation example: `subagent_type: "quality-fixer-frontend"`, `description: "Quality check"`, `prompt: "Execute all frontend quality checks and fixes"`
96
+ 6. **EXECUTE commit**: After `approved: true` confirmation, execute git commit IMMEDIATELY
97
+
98
+ ### Quality Assurance During Autonomous Execution (Details)
99
+ - task-executor-frontend execution → escalation check → quality-fixer-frontend execution → **orchestrator executes commit** (using Bash tool)
100
+ - After quality-fixer-frontend's `approved: true` confirmation, execute git commit IMMEDIATELY
101
+ - Use `changeSummary` for commit message
102
+
103
+ **CRITICAL**: Monitor ALL structured responses WITHOUT EXCEPTION and ENSURE every quality gate is passed.
104
+
105
+ ! ls -la docs/plans/*.md | head -10
106
+
107
+ Verify approval status before proceeding. Once confirmed, initiate autonomous execution mode. Stop immediately upon detecting any requirement changes.
108
+
109
+ ## Output Example
110
+ Frontend implementation phase completed.
111
+ - Task decomposition: Generated under docs/plans/tasks/
112
+ - Implemented tasks: [number] tasks
113
+ - Quality checks: All passed (Biome, TypeScript build, tests)
114
+ - Commits: [number] commits created
115
+
116
+ **Important**: This command manages the entire autonomous execution flow for frontend implementation from task decomposition to completion. Automatically uses frontend-specialized agents (task-executor-frontend, quality-fixer-frontend).
@@ -0,0 +1,61 @@
1
+ ---
2
+ description: Execute from requirement analysis to frontend design document creation
3
+ ---
4
+
5
+ **Command Context**: This command is dedicated to the frontend design phase.
6
+
7
+ ## Orchestrator Definition
8
+
9
+ **Role**: Orchestrator
10
+
11
+ **Execution Method**:
12
+ - Requirement analysis → performed by requirement-analyzer
13
+ - Design document creation → performed by technical-designer-frontend
14
+ - Document review → performed by document-reviewer
15
+
16
+ Orchestrator invokes sub-agents and passes structured JSON between them.
17
+
18
+ ## Scope Boundaries
19
+
20
+ **Included in this command**:
21
+ - Requirement analysis with requirement-analyzer
22
+ - ADR creation (if architecture changes, new technology, or data flow changes)
23
+ - Design Doc creation with technical-designer-frontend
24
+ - Document review with document-reviewer
25
+
26
+ **Responsibility Boundary**: This command completes with design document approval.
27
+
28
+ Requirements: $ARGUMENTS
29
+
30
+ ## Execution Flow
31
+
32
+ ### 1. Requirement Analysis Phase
33
+ **Think harder**: Considering the deep impact on design, first engage in dialogue to understand the background and purpose of requirements:
34
+ - What problems do you want to solve?
35
+ - Expected outcomes and success criteria
36
+ - Relationship with existing systems
37
+
38
+ Once requirements are moderately clarified:
39
+ - Invoke **requirement-analyzer** using Task tool
40
+ - `subagent_type: "requirement-analyzer"`
41
+ - `description: "Requirement analysis"`
42
+ - `prompt: "Requirements: [user requirements] Execute requirement analysis and scale determination"`
43
+ - **[STOP]**: Review requirement analysis results and address question items
44
+
45
+ ### 2. Design Document Creation Phase
46
+ Create appropriate design documents according to scale determination:
47
+ - Invoke **technical-designer-frontend** using Task tool
48
+ - For ADR: `subagent_type: "technical-designer-frontend"`, `description: "ADR creation"`, `prompt: "Create ADR for [technical decision]"`
49
+ - For Design Doc: `subagent_type: "technical-designer-frontend"`, `description: "Design Doc creation"`, `prompt: "Create Design Doc based on requirements"`
50
+ - Invoke **document-reviewer** to verify consistency
51
+ - `subagent_type: "document-reviewer"`, `description: "Document review"`, `prompt: "Review [document path] for consistency and completeness"`
52
+ - **[STOP]**: Present design alternatives and trade-offs, obtain user approval
53
+
54
+ **Scope**: Up to frontend design document (ADR/Design Doc) approval. Work planning and beyond are outside the scope of this command.
55
+
56
+ ## Output Example
57
+ Frontend design phase completed.
58
+ - Design document: docs/design/[document-name].md or docs/adr/[document-name].md
59
+ - Approval status: User approved
60
+
61
+ **Important**: This command ends with design approval. Does not propose transition to next phase.
@@ -0,0 +1,53 @@
1
+ ---
2
+ description: Create frontend work plan from design document and obtain plan approval
3
+ ---
4
+
5
+ **Command Context**: This command is dedicated to the frontend planning phase.
6
+
7
+ ## Orchestrator Definition
8
+
9
+ **Role**: Orchestrator
10
+
11
+ **Execution Method**:
12
+ - Work plan creation → performed by work-planner
13
+
14
+ Orchestrator invokes sub-agents and passes structured JSON between them.
15
+
16
+ ## Scope Boundaries
17
+
18
+ **Included in this command**:
19
+ - Design document selection
20
+ - Work plan creation with work-planner
21
+ - Plan approval obtainment
22
+
23
+ **Responsibility Boundary**: This command completes with work plan approval.
24
+
25
+ Create frontend work plan with the following process:
26
+
27
+ ## Execution Process
28
+
29
+ ### 1. Design Document Selection
30
+ ! ls -la docs/design/*.md | head -10
31
+ - Check for existence of design documents, notify user if none exist
32
+ - Present options if multiple exist (can be specified with $ARGUMENTS)
33
+
34
+ ### 2. Work Plan Creation
35
+ Invoke **work-planner** using Task tool:
36
+ - `subagent_type: "work-planner"`
37
+ - `description: "Work plan creation"`
38
+ - `prompt: "Create work plan from Design Doc at [path]"`
39
+ - Interact with user to complete plan and obtain approval for plan content
40
+
41
+ **Think deeply** Create a work plan from the selected design document, clarifying specific implementation steps and risks.
42
+
43
+ **Scope**: Up to work plan creation and obtaining approval for plan content.
44
+
45
+ ## Response at Completion
46
+ ✅ **Recommended**: End with the following standard response after plan content approval
47
+ ```
48
+ Frontend planning phase completed.
49
+ - Work plan: docs/plans/[plan-name].md
50
+ - Status: Approved
51
+
52
+ Please provide separate instructions for implementation.
53
+ ```
@@ -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.