@haposoft/cafekit 0.3.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.
Files changed (49) hide show
  1. package/README.md +866 -0
  2. package/bin/install.js +773 -0
  3. package/package.json +40 -0
  4. package/src/antigravity/GEMINI.md +162 -0
  5. package/src/antigravity/workflows/code.md +16 -0
  6. package/src/antigravity/workflows/docs-init.md +432 -0
  7. package/src/antigravity/workflows/docs-update.md +245 -0
  8. package/src/antigravity/workflows/review.md +15 -0
  9. package/src/antigravity/workflows/spec-design.md +220 -0
  10. package/src/antigravity/workflows/spec-init.md +78 -0
  11. package/src/antigravity/workflows/spec-requirements.md +122 -0
  12. package/src/antigravity/workflows/spec-status.md +95 -0
  13. package/src/antigravity/workflows/spec-tasks.md +156 -0
  14. package/src/antigravity/workflows/spec-validate.md +106 -0
  15. package/src/antigravity/workflows/test.md +13 -0
  16. package/src/claude/ROUTING.md +101 -0
  17. package/src/claude/agents/code-reviewer.md +131 -0
  18. package/src/claude/agents/debugger.md +137 -0
  19. package/src/claude/agents/fullstack-developer.md +95 -0
  20. package/src/claude/agents/tester.md +105 -0
  21. package/src/claude/commands/code.md +17 -0
  22. package/src/claude/commands/docs.md +609 -0
  23. package/src/claude/commands/review/codebase/parallel.md +122 -0
  24. package/src/claude/commands/review/codebase.md +49 -0
  25. package/src/claude/commands/review.md +16 -0
  26. package/src/claude/commands/spec-design.md +247 -0
  27. package/src/claude/commands/spec-init.md +118 -0
  28. package/src/claude/commands/spec-requirements.md +138 -0
  29. package/src/claude/commands/spec-status.md +98 -0
  30. package/src/claude/commands/spec-tasks.md +173 -0
  31. package/src/claude/commands/spec-validate.md +118 -0
  32. package/src/claude/commands/test.md +8 -0
  33. package/src/claude/migration-manifest.json +39 -0
  34. package/src/common/skills/specs/SKILL.md +101 -0
  35. package/src/common/skills/specs/rules/design-discovery-full.md +93 -0
  36. package/src/common/skills/specs/rules/design-discovery-light.md +49 -0
  37. package/src/common/skills/specs/rules/design-principles.md +182 -0
  38. package/src/common/skills/specs/rules/design-review.md +110 -0
  39. package/src/common/skills/specs/rules/ears-format.md +49 -0
  40. package/src/common/skills/specs/rules/gap-analysis.md +144 -0
  41. package/src/common/skills/specs/rules/steering-principles.md +90 -0
  42. package/src/common/skills/specs/rules/tasks-generation.md +131 -0
  43. package/src/common/skills/specs/rules/tasks-parallel-analysis.md +34 -0
  44. package/src/common/skills/specs/templates/design.md +276 -0
  45. package/src/common/skills/specs/templates/init.json +41 -0
  46. package/src/common/skills/specs/templates/requirements-init.md +9 -0
  47. package/src/common/skills/specs/templates/requirements.md +26 -0
  48. package/src/common/skills/specs/templates/research.md +61 -0
  49. package/src/common/skills/specs/templates/tasks.md +21 -0
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Display current status of a specification.
3
+ ---
4
+
5
+ # /spec-status - View Specification Status
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ ## Purpose
12
+
13
+ Hiển thị trạng thái hiện tại của một spec hoặc liệt kê tất cả specs.
14
+
15
+ ---
16
+
17
+ ## Task
18
+
19
+ ### Execution Steps
20
+
21
+ **If `$ARGUMENTS` is provided:**
22
+
23
+ 1. Read `.specs/$ARGUMENTS/spec.json`
24
+ 2. Display:
25
+ - Feature name
26
+ - Current phase
27
+ - Approval status
28
+ - Discovery mode (if available)
29
+ - Validation status and last validated time (if available)
30
+ - **Backward compatibility fallback (older specs):**
31
+ - If `design_context` is missing, show Discovery mode as `n/a`
32
+ - If `validation` is missing, show Validation as `not-run` and Last validated as `n/a`
33
+ - Created/Updated timestamps
34
+ - Summary of files
35
+
36
+ **If no arguments:**
37
+
38
+ 1. Glob `.specs/*/spec.json`
39
+ 2. List all specs with their status
40
+
41
+ ---
42
+
43
+ ## Output Format
44
+
45
+ ### Single Spec Status
46
+
47
+ ```markdown
48
+ ## 📊 Spec Status: `<feature-name>`
49
+
50
+ | Property | Value |
51
+ |----------|-------|
52
+ | **Phase** | `<phase>` |
53
+ | **Discovery Mode** | `<minimal/light/full or n/a>` |
54
+ | **Validation** | `<completed/pending/n/a>` |
55
+ | **Last Validated** | `<timestamp or n/a>` |
56
+ | **Created** | `<timestamp>` |
57
+ | **Updated** | `<timestamp>` |
58
+
59
+ ### Approvals
60
+ - Requirements: ✅/❌ Generated | ✅/❌ Approved
61
+ - Design: ✅/❌ Generated | ✅/❌ Approved
62
+ - Tasks: ✅/❌ Generated | ✅/❌ Approved
63
+
64
+ ### Files
65
+ - `spec.json` ✅
66
+ - `requirements.md` ✅/❌
67
+ - `research.md` ✅/❌
68
+ - `design.md` ✅/❌
69
+ - `tasks.md` ✅/❌
70
+
71
+ ### Next Action
72
+ - If phase = `requirements-generated`: Run `/spec-design <feature-name>`
73
+ - If phase = `design-generated`: Run `/spec-tasks <feature-name>`
74
+ - If phase = `tasks-generated`: Run `/code <feature-name>`, then `/test`, then `/review`
75
+ ```
76
+
77
+ ### All Specs List
78
+
79
+ ```markdown
80
+ ## 📊 All Specs
81
+
82
+ | Feature | Phase | Last Updated |
83
+ |---------|-------|--------------|
84
+ | `mobile-app` | tasks-generated | 2026-01-21 |
85
+ | `auth-module` | design-generated | 2026-01-20 |
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Usage Examples
91
+
92
+ ```
93
+ /spec-status mobile-app
94
+ /spec-status
95
+ ```
@@ -0,0 +1,156 @@
1
+ ---
2
+ description: Generate implementation tasks for a specification
3
+ allowed-tools: Glob, Grep, Read, Write, Edit, WebSearch, WebFetch
4
+ argument-hint: <feature-name> [-y] [--sequential]
5
+ ---
6
+
7
+ # Implementation Tasks Generator
8
+
9
+ <background_information>
10
+ - **Mission**: Generate detailed, actionable implementation tasks that translate technical design into executable work items
11
+ - **Success Criteria**:
12
+ - All requirements mapped to specific tasks
13
+ - Tasks properly sized (1-3 hours each)
14
+ - Clear task progression with proper hierarchy
15
+ - Natural language descriptions focused on capabilities
16
+ </background_information>
17
+
18
+ <instructions>
19
+ ## Core Task
20
+ Generate implementation tasks for feature **$ARGUMENTS** based on approved requirements and design.
21
+
22
+ ## Execution Steps
23
+
24
+ ### Step 0: Validate Phase State (Plan-Style Gate)
25
+
26
+ - Read `.specs/$ARGUMENTS/spec.json` first
27
+ - If feature directory or `spec.json` is missing: stop and instruct user to run `/spec-init <project-description>`, `/spec-requirements <feature-name>`, and `/spec-design <feature-name>` first
28
+ - If design has not been generated yet (phase before design): stop and instruct user to run `/spec-design $ARGUMENTS`
29
+ - If `phase` is already `tasks-generated`: explain tasks phase already exists and only continue for explicit regeneration/merge intent
30
+
31
+ ### Step 1: Load Context
32
+
33
+ **Read all necessary context**:
34
+ - `.specs/$ARGUMENTS/spec.json`, `requirements.md`, `design.md`
35
+ - `.specs/$ARGUMENTS/tasks.md` (if exists, for merge mode)
36
+ - `.specs/$ARGUMENTS/research.md` (if exists, includes validation log)
37
+ - **Entire `.specs/steering/` directory** for complete project memory (if exists)
38
+ - **Load project docs context (Plan-style quality gate)** when available:
39
+ - `docs/codebase-summary.md`
40
+ - `docs/code-standards.md`
41
+ - `docs/system-architecture.md`
42
+ - `docs/project-overview-pdr.md`
43
+ - If any docs file is missing, continue and mention missing context in execution output (do not block generation)
44
+
45
+ **Validate approvals**:
46
+ - If `-y` flag provided: Auto-approve requirements and design in spec.json
47
+ - Otherwise: Verify both approved (stop if not, see Safety & Fallback)
48
+ - **Backward compatibility fallback (older specs):**
49
+ - If `validation` object is missing, treat validation status as `not-run`
50
+ - If `design_context` object is missing, treat `validation_recommended` as `false`
51
+ - If `spec.json.validation.status == "completed"`, treat validation as satisfied
52
+ - If validation is missing and `design_context.validation_recommended == true`, warn user to run `/spec-validate $ARGUMENTS` before continuing (do not hard-block)
53
+ - Determine sequential mode based on presence of `--sequential`
54
+
55
+ ### Step 2: Generate Implementation Tasks
56
+
57
+ **Load generation rules and template**:
58
+ - Read `{{SKILLS_DIR}}/specs/rules/tasks-generation.md` for principles
59
+ - If `sequential` is **false**: Read `{{SKILLS_DIR}}/specs/rules/tasks-parallel-analysis.md` for parallel judgement criteria
60
+ - Read `{{SKILLS_DIR}}/specs/templates/tasks.md` for format (supports `(P)` markers)
61
+
62
+ **Generate task list following all rules**:
63
+ - Use language specified in spec.json
64
+ - Map all requirements to tasks
65
+ - When documenting requirement coverage, list numeric requirement IDs only (comma-separated) without descriptive suffixes, parentheses, translations, or free-form labels
66
+ - Ensure all design components included
67
+ - Verify task progression is logical and incremental
68
+ - Collapse single-subtask structures by promoting them to major tasks and avoid duplicating details on container-only major tasks (use template patterns accordingly)
69
+ - Apply `(P)` markers to tasks that satisfy parallel criteria (omit markers in sequential mode)
70
+ - Mark optional test coverage subtasks with `- [ ]*` only when they strictly cover acceptance criteria already satisfied by core implementation and can be deferred post-MVP
71
+ - If existing tasks.md found, merge with new content
72
+
73
+ ### Step 3: Finalize
74
+
75
+ **Write and update**:
76
+ - Create/update `.specs/$ARGUMENTS/tasks.md`
77
+ - Update spec.json metadata:
78
+ - Set `phase: "tasks-generated"`
79
+ - Set `approvals.tasks.generated: true, approved: false`
80
+ - Set `approvals.requirements.approved: true`
81
+ - Set `approvals.design.approved: true`
82
+ - Update `updated_at` timestamp
83
+
84
+ ## Critical Constraints
85
+ - **Follow rules strictly**: All principles in tasks-generation.md are mandatory
86
+ - **Natural Language**: Describe what to do, not code structure details
87
+ - **Complete Coverage**: ALL requirements must map to tasks
88
+ - **Maximum 2 Levels**: Major tasks and sub-tasks only (no deeper nesting)
89
+ - **Sequential Numbering**: Major tasks increment (1, 2, 3...), never repeat
90
+ - **Task Integration**: Every task must connect to the system (no orphaned work)
91
+ </instructions>
92
+
93
+ ## Tool Guidance
94
+ - **Read first**: Load all context, rules, and templates before generation
95
+ - **Write last**: Generate tasks.md only after complete analysis and verification
96
+
97
+ ## Output Description
98
+
99
+ Provide brief summary in the language specified in spec.json:
100
+
101
+ 1. **Status**: Confirm tasks generated at `.specs/$ARGUMENTS/tasks.md`
102
+ 2. **Task Summary**:
103
+ - Total: X major tasks, Y sub-tasks
104
+ - All Z requirements covered
105
+ - Average task size: 1-3 hours per sub-task
106
+ 3. **Quality Validation**:
107
+ - ✅ All requirements mapped to tasks
108
+ - ✅ Task dependencies verified
109
+ - ✅ Testing tasks included
110
+ 4. **Next Action**: Review tasks and proceed when ready
111
+
112
+ **Format**: Concise (under 200 words)
113
+
114
+ ## Safety & Fallback
115
+
116
+ ### Error Scenarios
117
+
118
+ **Requirements or Design Not Approved**:
119
+ - **Stop Execution**: Cannot proceed without approved requirements and design
120
+ - **User Message**: "Requirements and design must be approved before task generation"
121
+ - **Suggested Action**: "Run `/spec-tasks $ARGUMENTS -y` to auto-approve both and proceed"
122
+
123
+ **Missing Requirements or Design**:
124
+ - **Stop Execution**: Both documents must exist
125
+ - **User Message**: "Missing requirements.md or design.md at `.specs/$ARGUMENTS/`"
126
+ - **Suggested Action**: "Complete requirements and design phases first"
127
+
128
+ **Incomplete Requirements Coverage**:
129
+ - **Warning**: "Not all requirements mapped to tasks. Review coverage."
130
+ - **User Action Required**: Confirm intentional gaps or regenerate tasks
131
+
132
+ **Template/Rules Missing**:
133
+ - **User Message**: "Template or rules files missing in `{{SKILLS_DIR}}/specs/`"
134
+ - **Fallback**: Use inline basic structure with warning
135
+ - **Suggested Action**: "Check repository setup or restore template files"
136
+
137
+ **Missing Numeric Requirement IDs**:
138
+ - **Stop Execution**: All requirements in requirements.md MUST have numeric IDs. If any requirement lacks a numeric ID, stop and request that requirements.md be fixed before generating tasks.
139
+
140
+ ### Next Phase: Implementation
141
+
142
+ **Before Starting Implementation**:
143
+ - **IMPORTANT**: Clear conversation history and free up context before running `/code`
144
+ - This applies when starting first task OR switching between tasks
145
+ - Fresh context ensures clean state and proper task focus
146
+
147
+ **If Tasks Approved**:
148
+ - Execute coding pass from approved spec tasks: `/code $ARGUMENTS`
149
+ - After coding, run `/test` then `/review`
150
+ - Repeat in small passes and clear context between iterations when needed
151
+
152
+ **If Modifications Needed**:
153
+ - Provide feedback and re-run `/spec-tasks $ARGUMENTS`
154
+ - Existing tasks used as reference (merge mode)
155
+
156
+ **Note**: Continue with `/test` then `/review` after `/code` to complete the workflow.
@@ -0,0 +1,106 @@
1
+ ---
2
+ description: Validate design decisions with interview questions before task generation
3
+ allowed-tools: Read, Write, Edit, Glob, AskUserQuestion
4
+ argument-hint: <feature-name>
5
+ ---
6
+
7
+ # Specification Validation Interview
8
+
9
+ <background_information>
10
+ - **Mission**: Validate critical design decisions, assumptions, and trade-offs before generating implementation tasks.
11
+ - **Success Criteria**:
12
+ - Ask targeted, concrete questions about high-impact decisions
13
+ - Record answers in spec artifacts for future traceability
14
+ - Update spec metadata to reflect validation status
15
+ </background_information>
16
+
17
+ <instructions>
18
+ ## Core Task
19
+ Run a structured interview for feature **$ARGUMENTS** and persist decisions.
20
+
21
+ ## Execution Steps
22
+
23
+ ### Step 0: Resolve & Validate State
24
+ - Require `$ARGUMENTS` as feature name
25
+ - Read `.specs/$ARGUMENTS/spec.json`
26
+ - Stop with guidance if spec does not exist
27
+ - Ensure `requirements.md` and `design.md` exist before validation
28
+
29
+ ### Step 1: Load Validation Context
30
+ Read:
31
+ - `.specs/$ARGUMENTS/spec.json`
32
+ - `.specs/$ARGUMENTS/requirements.md`
33
+ - `.specs/$ARGUMENTS/design.md`
34
+ - `.specs/$ARGUMENTS/research.md` (if exists)
35
+
36
+ Extract decision points around:
37
+ - architecture and boundaries
38
+ - assumptions and defaults
39
+ - integration risks
40
+ - scope and sequencing
41
+ - testing/security/performance trade-offs
42
+
43
+ ### Step 2: Determine Question Budget
44
+ Use injected session validation settings when available (`Validation: mode=X, questions=MIN-MAX`).
45
+ - If unavailable, use 3-6 questions
46
+ - Ask only meaningful questions that can change implementation
47
+ - Each question must have 2-4 concrete options
48
+
49
+ ### Step 3: Interview User
50
+ Use `AskUserQuestion` in batches (max 4 questions per call).
51
+ Rules:
52
+ - Include one recommended option when a safe default exists
53
+ - Keep options mutually exclusive
54
+ - Do not ask redundant questions
55
+
56
+ ### Step 4: Persist Validation Log
57
+ Append to `.specs/$ARGUMENTS/research.md` under `## Validation Log`.
58
+ If section missing, create it.
59
+
60
+ Session format:
61
+ ```markdown
62
+ ## Validation Log
63
+
64
+ ### Session N — YYYY-MM-DD
65
+ - Questions asked: X
66
+
67
+ 1. [Category] Question text
68
+ - Options: A | B | C
69
+ - Answer: ...
70
+ - Rationale: why this decision matters
71
+
72
+ #### Confirmed Decisions
73
+ - ...
74
+
75
+ #### Follow-up Actions
76
+ - [ ] ...
77
+ ```
78
+
79
+ ### Step 5: Update Metadata
80
+ Update `.specs/$ARGUMENTS/spec.json`:
81
+ - `approvals.requirements.approved: true`
82
+ - `approvals.design.approved: true`
83
+ - `validation.last_validated_at: <ISO timestamp>`
84
+ - `validation.questions_asked: <number>`
85
+ - `validation.status: "completed"`
86
+ - increment `validation.session_count` (initialize to 1 if absent)
87
+ - update `updated_at`
88
+
89
+ ## Constraints
90
+ - Keep input/output contract of existing `spec-*` commands unchanged
91
+ - Validation must be traceable and append-only (never overwrite old sessions)
92
+ - Ask fewer questions when artifact is simple; quality over quantity
93
+ </instructions>
94
+
95
+ ## Output Description
96
+ Provide concise summary:
97
+ 1. Validation status and files updated
98
+ 2. Number of questions asked
99
+ 3. Top confirmed decisions
100
+ 4. Recommended next command:
101
+ - `/spec-tasks $ARGUMENTS` when ready
102
+
103
+ ## Safety & Fallback
104
+ - Missing spec/design artifacts: stop and instruct the exact preceding command
105
+ - Empty decision surface: ask only 1-2 high-value confirmation questions
106
+ - Write failure: report exact path and retry guidance
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: Run project tests and report failures concisely.
3
+ allowed-tools: Bash, Read, Grep
4
+ argument-hint: [scope]
5
+ ---
6
+
7
+ # /test
8
+
9
+ Run the project's test command and report:
10
+ - total passed/failed
11
+ - failing test names
12
+ - root cause hints
13
+ - next fix action
@@ -0,0 +1,101 @@
1
+ # CafeKit Routing Guide
2
+
3
+ > Project-specific routing and conventions for CafeKit. Complements Claude Code CLI's built-in agent system.
4
+
5
+ ---
6
+
7
+ ## Quick Agent Selection
8
+
9
+ | Domain | Keywords | Agent File |
10
+ |--------|----------|------------|
11
+ | **Frontend** | ui, component, react, css, layout | `.claude/agents/ui-ux-designer.md` |
12
+ | **Backend** | api, route, server, endpoint | `.claude/agents/fullstack-developer.md` |
13
+ | **Database** | schema, migration, query, table | `.claude/agents/fullstack-developer.md` |
14
+ | **Security** | auth, login, jwt, password | `.claude/agents/code-reviewer.md` |
15
+ | **Mobile** | react native, flutter, ios, android | `.claude/agents/fullstack-developer.md` |
16
+ | **Debug** | error, bug, crash, not working | `.claude/agents/debugger.md` |
17
+ | **Testing** | test, coverage, unit, e2e | `.claude/agents/tester.md` |
18
+ | **DevOps** | deploy, docker, ci/cd | `.claude/agents/fullstack-developer.md` |
19
+ | **Performance** | slow, optimize, cache | `.claude/agents/code-reviewer.md` |
20
+ | **Docs** | documentation, readme | `.claude/agents/docs-manager.md` |
21
+
22
+ **Multi-domain:** Use `fullstack-developer` and coordinate with `tester` + `code-reviewer`.
23
+
24
+ ---
25
+
26
+ ## Project-Specific Rules
27
+
28
+ ### Socratic Gate (Complex Tasks)
29
+
30
+ **MANDATORY:** Use `AskUserQuestion` for:
31
+ - "Build/Create/Make [thing]" without details
32
+ - Complex features or architecture
33
+ - Vague requirements
34
+
35
+ **Protocol:**
36
+ 1. STOP - Do NOT start coding
37
+ 2. INVOKE - Use AskUserQuestion tool
38
+ 3. WAIT - For user answers
39
+ 4. PROCEED - With clarified requirements
40
+
41
+ ### Clean Code Standards
42
+
43
+ | Principle | Rule |
44
+ |-----------|------|
45
+ | **SRP** | One function = one thing |
46
+ | **DRY** | Extract duplicates, reuse |
47
+ | **KISS** | Simplest solution that works |
48
+ | **YAGNI** | Don't build unused features |
49
+
50
+ **Naming:**
51
+ - Variables: `userCount` not `n`
52
+ - Functions: `getUserById()` not `user()`
53
+ - Booleans: `isActive`, `hasPermission`
54
+
55
+ ### Before Editing Files
56
+
57
+ 1. **Check imports:** Who depends on this file?
58
+ 2. **Identify impact:** What else needs updating?
59
+ 3. **Edit together:** File + all dependents in same task
60
+
61
+ ---
62
+
63
+ ## Slash Commands
64
+
65
+ | Command | Purpose | Args |
66
+ |---------|---------|------|
67
+ | `/docs init` | Create docs | `[--focus=dirs]` |
68
+ | `/docs update` | Update docs | `[--focus=dirs]` |
69
+ | `/spec-init` | Init spec | `<description>` |
70
+ | `/spec-requirements` | Requirements | `<feature>` |
71
+ | `/spec-design` | Design doc | `<feature> [-y]` |
72
+ | `/spec-tasks` | Task list | `<feature> [-y]` |
73
+ | `/code` | Implement | `<feature> [task-id]` |
74
+ | `/test` | Validate implementation | `[scope]` |
75
+ | `/review` | Review code quality | `[scope]` |
76
+ | `/spec-status` | View status | `[feature]` |
77
+
78
+ ---
79
+
80
+ ## Core Skills
81
+
82
+ | Skill | Use When | Location |
83
+ |-------|----------|----------|
84
+ | **specs** | New features, specs | `{{SKILLS_DIR}}/specs/` |
85
+
86
+ **All skills:** `{{SKILLS_DIR}}/`
87
+
88
+ ---
89
+
90
+ ## Project Context
91
+
92
+ | File | Purpose | Load When |
93
+ |------|---------|-----------|
94
+ | `CLAUDE.md` | Project overview | Every session |
95
+ | `docs/codebase-summary.md` | Stats, structure | "overview" |
96
+ | `docs/system-architecture.md` | Architecture | "architecture" |
97
+ | `repomix-output.xml` | Full codebase | Deep analysis |
98
+
99
+ ---
100
+
101
+ **Last Updated:** 2026-02-24
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: "Comprehensive code review with scout-based edge case detection. Use after implementing features, before PRs, for quality assessment, security audits, or performance optimization."
4
+ ---
5
+
6
+ Senior software engineer specializing in code quality assessment. Expertise in TypeScript, JavaScript, Dart (Flutter), security, and performance.
7
+
8
+ **IMPORTANT**: Ensure token efficiency. Use `scout` and `code-review` skills for protocols.
9
+
10
+ ## Core Responsibilities
11
+
12
+ 1. **Code Quality** - Standards adherence, readability, maintainability, code smells, edge cases
13
+ 2. **Type Safety & Linting** - TypeScript checking, linter results, pragmatic fixes
14
+ 3. **Build Validation** - Build success, dependencies, env vars (no secrets exposed)
15
+ 4. **Performance** - Bottlenecks, queries, memory, async handling, caching
16
+ 5. **Security** - OWASP Top 10, auth, injection, input validation, data protection
17
+ 6. **Task Completeness** - Verify spec task completion and workflow handoff status
18
+
19
+ ## Review Process
20
+
21
+ ### 1. Edge Case Scouting (NEW - Do First)
22
+
23
+ Before reviewing, scout for edge cases the diff doesn't show:
24
+
25
+ ```bash
26
+ git diff --name-only HEAD~1 # Get changed files
27
+ ```
28
+
29
+ Use `/scout` with edge-case-focused prompt:
30
+ ```
31
+ Scout edge cases for recent changes.
32
+ Changed: {files}
33
+ Find: affected dependents, data flow risks, boundary conditions, async races, state mutations
34
+ ```
35
+
36
+ Document scout findings for inclusion in review.
37
+
38
+ ### 2. Initial Analysis
39
+
40
+ - Read `.specs/<feature>/tasks.md` and related changed files
41
+ - Focus on recently changed files (use `git diff`)
42
+ - For full codebase: use `repomix` to compact, then analyze
43
+ - Wait for scout results before proceeding
44
+
45
+ ### 3. Systematic Review
46
+
47
+ | Area | Focus |
48
+ |------|-------|
49
+ | Structure | Organization, modularity |
50
+ | Logic | Correctness, edge cases from scout |
51
+ | Types | Safety, error handling |
52
+ | Performance | Bottlenecks, inefficiencies |
53
+ | Security | Vulnerabilities, data exposure |
54
+
55
+ ### 4. Prioritization
56
+
57
+ - **Critical**: Security vulnerabilities, data loss, breaking changes
58
+ - **High**: Performance issues, type safety, missing error handling
59
+ - **Medium**: Code smells, maintainability, docs gaps
60
+ - **Low**: Style, minor optimizations
61
+
62
+ ### 5. Recommendations
63
+
64
+ For each issue:
65
+ - Explain problem and impact
66
+ - Provide specific fix example
67
+ - Suggest alternatives if applicable
68
+
69
+ ### 6. Update Spec Task Status
70
+
71
+ Mark reviewed task status and add next steps in workflow handoff.
72
+
73
+ ## Output Format
74
+
75
+ ```markdown
76
+ ## Code Review Summary
77
+
78
+ ### Scope
79
+ - Files: [list]
80
+ - LOC: [count]
81
+ - Focus: [recent/specific/full]
82
+ - Scout findings: [edge cases discovered]
83
+
84
+ ### Overall Assessment
85
+ [Brief quality overview]
86
+
87
+ ### Critical Issues
88
+ [Security, breaking changes]
89
+
90
+ ### High Priority
91
+ [Performance, type safety]
92
+
93
+ ### Medium Priority
94
+ [Code quality, maintainability]
95
+
96
+ ### Low Priority
97
+ [Style, minor opts]
98
+
99
+ ### Edge Cases Found by Scout
100
+ [List issues from scouting phase]
101
+
102
+ ### Positive Observations
103
+ [Good practices noted]
104
+
105
+ ### Recommended Actions
106
+ 1. [Prioritized fixes]
107
+
108
+ ### Metrics
109
+ - Type Coverage: [%]
110
+ - Test Coverage: [%]
111
+ - Linting Issues: [count]
112
+
113
+ ### Unresolved Questions
114
+ [If any]
115
+ ```
116
+
117
+ ## Guidelines
118
+
119
+ - Constructive, pragmatic feedback
120
+ - Acknowledge good practices
121
+ - Respect `./.claude/rules/development-rules.md` and `./docs/code-standards.md`
122
+ - No AI attribution in code/commits
123
+ - Security best practices priority
124
+ - **Verify spec task checklist completion**
125
+ - **Scout edge cases BEFORE reviewing**
126
+
127
+ ## Report Output
128
+
129
+ Use naming pattern from `## Naming` section in hooks.
130
+
131
+ Thorough but pragmatic - focus on issues that matter, skip minor style nitpicks.