codex-workflows 0.1.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 (85) hide show
  1. package/.agents/skills/ai-development-guide/SKILL.md +283 -0
  2. package/.agents/skills/ai-development-guide/agents/openai.yaml +7 -0
  3. package/.agents/skills/ai-development-guide/references/frontend.md +135 -0
  4. package/.agents/skills/coding-rules/SKILL.md +98 -0
  5. package/.agents/skills/coding-rules/agents/openai.yaml +7 -0
  6. package/.agents/skills/coding-rules/references/typescript.md +220 -0
  7. package/.agents/skills/documentation-criteria/SKILL.md +127 -0
  8. package/.agents/skills/documentation-criteria/agents/openai.yaml +7 -0
  9. package/.agents/skills/documentation-criteria/references/adr-template.md +64 -0
  10. package/.agents/skills/documentation-criteria/references/design-template.md +327 -0
  11. package/.agents/skills/documentation-criteria/references/plan-template.md +131 -0
  12. package/.agents/skills/documentation-criteria/references/prd-template.md +119 -0
  13. package/.agents/skills/documentation-criteria/references/task-template.md +38 -0
  14. package/.agents/skills/documentation-criteria/references/ui-spec-template.md +145 -0
  15. package/.agents/skills/implementation-approach/SKILL.md +145 -0
  16. package/.agents/skills/implementation-approach/agents/openai.yaml +7 -0
  17. package/.agents/skills/integration-e2e-testing/SKILL.md +125 -0
  18. package/.agents/skills/integration-e2e-testing/agents/openai.yaml +7 -0
  19. package/.agents/skills/integration-e2e-testing/references/e2e-design.md +86 -0
  20. package/.agents/skills/recipe-add-integration-tests/SKILL.md +128 -0
  21. package/.agents/skills/recipe-add-integration-tests/agents/openai.yaml +7 -0
  22. package/.agents/skills/recipe-build/SKILL.md +119 -0
  23. package/.agents/skills/recipe-build/agents/openai.yaml +7 -0
  24. package/.agents/skills/recipe-design/SKILL.md +90 -0
  25. package/.agents/skills/recipe-design/agents/openai.yaml +7 -0
  26. package/.agents/skills/recipe-diagnose/SKILL.md +187 -0
  27. package/.agents/skills/recipe-diagnose/agents/openai.yaml +7 -0
  28. package/.agents/skills/recipe-front-build/SKILL.md +127 -0
  29. package/.agents/skills/recipe-front-build/agents/openai.yaml +7 -0
  30. package/.agents/skills/recipe-front-design/SKILL.md +90 -0
  31. package/.agents/skills/recipe-front-design/agents/openai.yaml +7 -0
  32. package/.agents/skills/recipe-front-plan/SKILL.md +68 -0
  33. package/.agents/skills/recipe-front-plan/agents/openai.yaml +7 -0
  34. package/.agents/skills/recipe-front-review/SKILL.md +101 -0
  35. package/.agents/skills/recipe-front-review/agents/openai.yaml +7 -0
  36. package/.agents/skills/recipe-fullstack-build/SKILL.md +139 -0
  37. package/.agents/skills/recipe-fullstack-build/agents/openai.yaml +7 -0
  38. package/.agents/skills/recipe-fullstack-implement/SKILL.md +151 -0
  39. package/.agents/skills/recipe-fullstack-implement/agents/openai.yaml +7 -0
  40. package/.agents/skills/recipe-implement/SKILL.md +125 -0
  41. package/.agents/skills/recipe-implement/agents/openai.yaml +7 -0
  42. package/.agents/skills/recipe-plan/SKILL.md +73 -0
  43. package/.agents/skills/recipe-plan/agents/openai.yaml +7 -0
  44. package/.agents/skills/recipe-reverse-engineer/SKILL.md +212 -0
  45. package/.agents/skills/recipe-reverse-engineer/agents/openai.yaml +7 -0
  46. package/.agents/skills/recipe-review/SKILL.md +115 -0
  47. package/.agents/skills/recipe-review/agents/openai.yaml +7 -0
  48. package/.agents/skills/recipe-task/SKILL.md +74 -0
  49. package/.agents/skills/recipe-task/agents/openai.yaml +7 -0
  50. package/.agents/skills/recipe-update-doc/SKILL.md +156 -0
  51. package/.agents/skills/recipe-update-doc/agents/openai.yaml +7 -0
  52. package/.agents/skills/subagents-orchestration-guide/SKILL.md +354 -0
  53. package/.agents/skills/subagents-orchestration-guide/agents/openai.yaml +7 -0
  54. package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +124 -0
  55. package/.agents/skills/task-analyzer/SKILL.md +142 -0
  56. package/.agents/skills/task-analyzer/agents/openai.yaml +7 -0
  57. package/.agents/skills/task-analyzer/references/skills-index.yaml +162 -0
  58. package/.agents/skills/testing/SKILL.md +324 -0
  59. package/.agents/skills/testing/agents/openai.yaml +7 -0
  60. package/.agents/skills/testing/references/typescript.md +224 -0
  61. package/.codex/agents/acceptance-test-generator.toml +310 -0
  62. package/.codex/agents/code-reviewer.toml +228 -0
  63. package/.codex/agents/code-verifier.toml +231 -0
  64. package/.codex/agents/design-sync.toml +265 -0
  65. package/.codex/agents/document-reviewer.toml +367 -0
  66. package/.codex/agents/integration-test-reviewer.toml +178 -0
  67. package/.codex/agents/investigator.toml +197 -0
  68. package/.codex/agents/prd-creator.toml +250 -0
  69. package/.codex/agents/quality-fixer-frontend.toml +356 -0
  70. package/.codex/agents/quality-fixer.toml +249 -0
  71. package/.codex/agents/requirement-analyzer.toml +172 -0
  72. package/.codex/agents/rule-advisor.toml +186 -0
  73. package/.codex/agents/scope-discoverer.toml +248 -0
  74. package/.codex/agents/solver.toml +212 -0
  75. package/.codex/agents/task-decomposer.toml +262 -0
  76. package/.codex/agents/task-executor-frontend.toml +312 -0
  77. package/.codex/agents/task-executor.toml +314 -0
  78. package/.codex/agents/technical-designer-frontend.toml +492 -0
  79. package/.codex/agents/technical-designer.toml +474 -0
  80. package/.codex/agents/ui-spec-designer.toml +150 -0
  81. package/.codex/agents/verifier.toml +228 -0
  82. package/.codex/agents/work-planner.toml +251 -0
  83. package/README.md +365 -0
  84. package/bin/cli.js +249 -0
  85. package/package.json +35 -0
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: recipe-plan
3
+ description: "Create work plan from design document with optional test skeleton generation."
4
+ ---
5
+
6
+ ## Required Skills [LOAD BEFORE EXECUTION]
7
+
8
+ 1. [LOAD IF NOT ACTIVE] `documentation-criteria` — document creation rules and templates
9
+ 2. [LOAD IF NOT ACTIVE] `implementation-approach` — implementation strategy
10
+ 3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
11
+
12
+ **Context**: Dedicated to the planning phase.
13
+
14
+ ## Orchestrator Definition
15
+
16
+ **Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
17
+
18
+ **Execution Protocol**:
19
+ 1. **Spawn agents for all work** -- your role is to invoke sub-agents, pass data between them, and report results
20
+ 2. **Follow subagents-orchestration-guide skill planning flow exactly**:
21
+ - Execute steps defined below
22
+ - **[STOP — BLOCKING]** Present plan content to user for approval. **CANNOT proceed until user explicitly confirms.**
23
+ 3. **Scope**: Complete when work plan receives approval
24
+
25
+ **CRITICAL**: When the user requests test generation, MUST spawn acceptance-test-generator agent first -- it provides the test skeleton that work-planner depends on.
26
+ ENFORCEMENT: Work-planner spawned without test skeleton data (when tests were requested) produces incomplete plans.
27
+
28
+ ## Scope Boundaries
29
+
30
+ **Included in this skill**:
31
+ - Design document selection
32
+ - Test skeleton generation with acceptance-test-generator
33
+ - Work plan creation with work-planner
34
+ - Plan approval obtainment
35
+
36
+ **Responsibility Boundary**: This skill completes with work plan approval.
37
+
38
+ Follow the planning process below:
39
+
40
+ ## Execution Process
41
+
42
+ ### Step 1: Design Document Selection
43
+ Check for existence of design documents in docs/design/, notify user if none exist.
44
+ Present options if multiple exist (can be specified with $ARGUMENTS).
45
+
46
+ ### Step 2: E2E Test Skeleton Generation Confirmation
47
+ - Confirm with user whether to generate E2E test skeleton first
48
+ - If user wants generation: Spawn acceptance-test-generator agent: "Generate test skeletons from Design Doc at [design-doc-path]"
49
+ - Pass generation results to next process according to subagents-orchestration-guide skill coordination specification
50
+
51
+ ### Step 3: Work Plan Creation
52
+ - Spawn work-planner agent: "Create work plan from design document at [design-doc-path]. Include deliverables from previous process according to subagents-orchestration-guide skill coordination specification."
53
+ - Interact with user to complete plan and obtain approval for plan content
54
+ - Clarify specific implementation steps and risks
55
+
56
+ **Scope**: Up to work plan creation and obtaining approval for plan content.
57
+
58
+ ## Completion Criteria
59
+
60
+ - [ ] Design document identified and selected
61
+ - [ ] E2E test skeleton generation confirmed with user (generated if requested)
62
+ - [ ] Work plan created via work-planner
63
+ - [ ] Plan content approved by user
64
+ - [ ] All stopping points honored with user confirmation
65
+
66
+ ## Response at Completion
67
+ ```
68
+ Planning phase completed.
69
+ - Work plan: docs/plans/[plan-name].md
70
+ - Status: Approved
71
+
72
+ Please provide separate instructions for implementation.
73
+ ```
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "recipe-plan"
3
+ short_description: "Design document to work plan creation"
4
+ default_prompt: "Use $recipe-plan to start planning: "
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,212 @@
1
+ ---
2
+ name: recipe-reverse-engineer
3
+ description: "Generate PRD and Design Docs from existing codebase through discovery, generation, verification, and review."
4
+ ---
5
+
6
+ ## Required Skills [LOAD BEFORE EXECUTION]
7
+
8
+ 1. [LOAD IF NOT ACTIVE] `documentation-criteria` — document creation rules and templates
9
+ 2. [LOAD IF NOT ACTIVE] `ai-development-guide` — AI development patterns
10
+ 3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
11
+
12
+ **Context**: Reverse engineering workflow to create documentation from existing code
13
+
14
+ Target: $ARGUMENTS
15
+
16
+ ## Orchestrator Definition
17
+
18
+ **Core Identity**: "I am not a worker. I am an orchestrator."
19
+
20
+ **Execution Protocol**:
21
+ 1. **Spawn agents for all work** -- your role is to invoke sub-agents, pass data between them, and report results
22
+ 2. **Process one step at a time**: Execute steps sequentially within each unit (2 -> 3 -> 4 -> 5). Each step's output is the required input for the next step. Complete all steps for one unit before starting the next
23
+ 3. **Pass `$STEP_N_OUTPUT` as-is** to sub-agents -- the orchestrator bridges data without processing or filtering it
24
+
25
+ **Task Registration**: Register phases first, then steps within each phase as you enter it. Track status for each step.
26
+
27
+ ## Step 0: Initial Configuration
28
+
29
+ ### 0.1 Scope Confirmation
30
+
31
+ Ask the user to confirm:
32
+ 1. **Target path**: Which directory/module to document
33
+ 2. **Depth**: PRD only, or PRD + Design Docs
34
+ 3. **Reference Architecture**: layered / mvc / clean / hexagonal / none
35
+ 4. **Human review**: Yes (recommended) / No (fully autonomous)
36
+
37
+ ### 0.2 Output Configuration
38
+
39
+ - PRD output: `docs/prd/` or existing PRD directory
40
+ - Design Doc output: `docs/design/` or existing design directory
41
+ - Verify directories exist, create if needed
42
+
43
+ ## Workflow Overview
44
+
45
+ ```
46
+ Phase 1: PRD Generation
47
+ Step 1: Scope Discovery (unified, single pass)
48
+ Step 2-5: Per-unit loop (Generation -> Verification -> Review -> Revision)
49
+
50
+ Phase 2: Design Doc Generation (if requested)
51
+ Step 6: Design Doc Scope Mapping (reuse Step 1 results, no re-discovery)
52
+ Step 7-10: Per-unit loop (Generation -> Verification -> Review -> Revision)
53
+ ```
54
+
55
+ ## Phase 1: PRD Generation
56
+
57
+ **Register tasks**:
58
+ - Step 1: PRD Scope Discovery
59
+ - Per-unit processing (Steps 2-5 for each unit)
60
+
61
+ ### Step 1: PRD Scope Discovery
62
+
63
+ Spawn scope-discoverer agent: "Discover functional scope targets in the codebase. target_path: $USER_TARGET_PATH. reference_architecture: $USER_RA_CHOICE. focus_area: $USER_FOCUS_AREA (if specified)."
64
+
65
+ **Store output as**: `$STEP_1_OUTPUT`
66
+
67
+ **Quality Gate**:
68
+ - At least one unit discovered -> proceed
69
+ - No units discovered -> ask user for hints
70
+
71
+ **[STOP — BLOCKING]** If human review enabled: Present discovered units to user for confirmation.
72
+ **CANNOT proceed until user explicitly confirms.**
73
+
74
+ ### Step 2-5: Per-Unit Processing
75
+
76
+ **FOR** each unit in `$STEP_1_OUTPUT.discoveredUnits` **(sequential, one unit at a time)**:
77
+
78
+ #### Step 2: PRD Generation
79
+
80
+ Spawn prd-creator agent: "Create reverse-engineered PRD for the following feature. Operation Mode: reverse-engineer. External Scope Provided: true. Feature: $UNIT_NAME. Description: $UNIT_DESCRIPTION. Related Files: $UNIT_RELATED_FILES. Entry Points: $UNIT_ENTRY_POINTS. Skip independent scope discovery. Use provided scope data. Create final version PRD based on code investigation within specified scope."
81
+
82
+ **Store output as**: `$STEP_2_OUTPUT` (PRD path)
83
+
84
+ #### Step 3: Code Verification
85
+
86
+ **Prerequisite**: $STEP_2_OUTPUT (PRD path from Step 2)
87
+
88
+ Spawn code-verifier agent: "Verify consistency between PRD and code implementation. doc_type: prd. document_path: $STEP_2_OUTPUT. code_paths: $UNIT_RELATED_FILES. verbose: false."
89
+
90
+ **Store output as**: `$STEP_3_OUTPUT`
91
+
92
+ **Quality Gate**:
93
+ - consistencyScore >= 70 -> proceed to review
94
+ - consistencyScore < 70 -> flag for detailed review
95
+
96
+ #### Step 4: Review
97
+
98
+ **Required Input**: $STEP_3_OUTPUT (verification data from Step 3)
99
+
100
+ Spawn document-reviewer agent: "Review the following PRD considering code verification findings. doc_type: PRD. target: $STEP_2_OUTPUT. mode: composite. Code Verification Results: $STEP_3_OUTPUT. Additional Review Focus: Alignment between PRD claims and verification evidence, resolution recommendations for each discrepancy, completeness of undocumented feature coverage."
101
+
102
+ **Store output as**: `$STEP_4_OUTPUT`
103
+
104
+ #### Step 5: Revision (conditional)
105
+
106
+ **Trigger Conditions** (any one of the following):
107
+ - Review status is "Needs Revision" or "Rejected"
108
+ - Critical discrepancies exist in `$STEP_3_OUTPUT`
109
+ - consistencyScore < 70
110
+
111
+ Spawn prd-creator agent: "Update PRD based on review feedback and code verification results. Operation Mode: update. Existing PRD: $STEP_2_OUTPUT. Review Feedback: $STEP_4_OUTPUT. Code Verification Results: $STEP_3_OUTPUT. Address discrepancies by severity. Critical and major items require correction. Minor items: correct if straightforward, otherwise leave as-is with rationale."
112
+
113
+ **Loop Control**: Maximum 2 revision cycles. After 2 cycles, flag for human review regardless of status.
114
+ ENFORCEMENT: Exceeding 2 revision cycles without flagging produces unreviewed output.
115
+
116
+ #### Unit Completion
117
+
118
+ - [ ] Review status is "Approved" or "Approved with Conditions"
119
+ - [ ] Human review passed (if enabled in Step 0)
120
+
121
+ **Next**: Proceed to next unit. After all units -> Phase 2.
122
+
123
+ ## Phase 2: Design Doc Generation
124
+
125
+ *Execute only if Design Docs were requested in Step 0*
126
+
127
+ **Register tasks**:
128
+ - Step 6: Design Doc Scope Mapping
129
+ - Per-unit processing (Steps 7-10 for each unit)
130
+
131
+ ### Step 6: Design Doc Scope Mapping
132
+
133
+ **No additional discovery required.** Use `$STEP_1_OUTPUT` (scope discovery results) directly.
134
+
135
+ Each PRD unit from Phase 1 maps to one Design Doc unit (using technical-designer).
136
+
137
+ Map `$STEP_1_OUTPUT` units to Design Doc generation targets, carrying forward:
138
+ - `technicalProfile.primaryModules` -> Primary Files
139
+ - `technicalProfile.publicInterfaces` -> Public Interfaces
140
+ - `dependencies` -> Dependencies
141
+ - `relatedFiles` -> Scope boundary
142
+
143
+ **Store output as**: `$STEP_6_OUTPUT`
144
+
145
+ ### Step 7-10: Per-Unit Processing
146
+
147
+ **FOR** each unit in `$STEP_6_OUTPUT` **(sequential, one unit at a time)**:
148
+
149
+ #### Step 7: Design Doc Generation
150
+
151
+ **Scope**: Document current architecture as-is. This is a documentation task, not a design improvement task.
152
+
153
+ Spawn technical-designer agent: "Create Design Doc for the following feature based on existing code. Operation Mode: create. Feature: $UNIT_NAME. Description: $UNIT_DESCRIPTION. Primary Files: $UNIT_PRIMARY_MODULES. Public Interfaces: $UNIT_PUBLIC_INTERFACES. Dependencies: $UNIT_DEPENDENCIES. Parent PRD: $APPROVED_PRD_PATH. Document current architecture as-is."
154
+
155
+ **Store output as**: `$STEP_7_OUTPUT`
156
+
157
+ #### Step 8: Code Verification
158
+
159
+ Spawn code-verifier agent: "Verify consistency between Design Doc and code implementation. doc_type: design-doc. document_path: $STEP_7_OUTPUT. code_paths: $UNIT_PRIMARY_MODULES. verbose: false."
160
+
161
+ **Store output as**: `$STEP_8_OUTPUT`
162
+
163
+ #### Step 9: Review
164
+
165
+ **Required Input**: $STEP_8_OUTPUT (verification data from Step 8)
166
+
167
+ Spawn document-reviewer agent: "Review the following Design Doc considering code verification findings. doc_type: DesignDoc. target: $STEP_7_OUTPUT. mode: composite. Code Verification Results: $STEP_8_OUTPUT. Parent PRD: $APPROVED_PRD_PATH. Additional Review Focus: Technical accuracy of documented interfaces, consistency with parent PRD scope, completeness of unit boundary definitions."
168
+
169
+ **Store output as**: `$STEP_9_OUTPUT`
170
+
171
+ #### Step 10: Revision (conditional)
172
+
173
+ **Trigger Conditions** (same as Step 5):
174
+ - Review status is "Needs Revision" or "Rejected"
175
+ - Critical discrepancies exist in `$STEP_8_OUTPUT`
176
+ - consistencyScore < 70
177
+
178
+ Spawn technical-designer agent: "Update Design Doc based on review feedback and code verification results. Operation Mode: update. Existing Design Doc: $STEP_7_OUTPUT. Review Feedback: $STEP_9_OUTPUT. Code Verification Results: $STEP_8_OUTPUT. Address discrepancies by severity. Critical and major items require correction. Minor items: correct if straightforward, otherwise leave as-is with rationale."
179
+
180
+ **Loop Control**: Maximum 2 revision cycles. After 2 cycles, flag for human review regardless of status.
181
+
182
+ #### Unit Completion
183
+
184
+ - [ ] Review status is "Approved" or "Approved with Conditions"
185
+ - [ ] Human review passed (if enabled in Step 0)
186
+
187
+ **Next**: Proceed to next unit. After all units -> Final Report.
188
+
189
+ ## Final Report
190
+
191
+ Output summary including:
192
+ - Generated documents table (Type, Name, Consistency Score, Review Status)
193
+ - Action items (critical discrepancies, undocumented features, flagged items)
194
+ - Next steps checklist
195
+
196
+ ## Error Handling
197
+
198
+ | Error | Action |
199
+ |-------|--------|
200
+ | Discovery finds nothing | Ask user for project structure hints |
201
+ | Generation fails | Log failure, continue with other units, report in summary |
202
+ | consistencyScore < 50 | **[STOP — BLOCKING]** Flag for mandatory human review. **CANNOT proceed until user explicitly confirms.** |
203
+ | Review rejects after 2 revisions | Stop loop, flag for human intervention |
204
+
205
+ ## Completion Criteria
206
+
207
+ - [ ] Scope confirmed with user (target path, depth, architecture, human review preference)
208
+ - [ ] Output directories verified/created
209
+ - [ ] Phase 1: All PRD units discovered and processed (generation -> verification -> review -> revision)
210
+ - [ ] Phase 2: All Design Doc units processed (if requested)
211
+ - [ ] All human review points honored (if enabled)
212
+ - [ ] Final report presented with document table, action items, and next steps
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "recipe-reverse-engineer"
3
+ short_description: "Generate documentation from existing codebase"
4
+ default_prompt: "Use $recipe-reverse-engineer to document: "
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: recipe-review
3
+ description: "Design Doc compliance validation with optional auto-fixes."
4
+ ---
5
+
6
+ ## Required Skills [LOAD BEFORE EXECUTION]
7
+
8
+ 1. [LOAD IF NOT ACTIVE] `coding-rules` — coding standards
9
+ 2. [LOAD IF NOT ACTIVE] `testing` — test strategy and quality gates
10
+ 3. [LOAD IF NOT ACTIVE] `ai-development-guide` — AI development patterns
11
+
12
+ **Context**: Post-implementation quality assurance
13
+
14
+ ## Orchestrator Definition
15
+
16
+ **Core Identity**: "I am not a worker. I am an orchestrator."
17
+
18
+ **First Action**: Register Steps 1-9 before any execution.
19
+
20
+ ## Execution Method
21
+
22
+ - Compliance validation -> Spawn code-reviewer agent
23
+ - Fix implementation -> Spawn task-executor agent
24
+ - Quality checks -> Spawn quality-fixer agent
25
+ - Re-validation -> Spawn code-reviewer agent
26
+
27
+ Orchestrator spawns sub-agents and passes structured data between them.
28
+
29
+ Design Doc (uses most recent if omitted): $ARGUMENTS
30
+
31
+ ## Execution Flow
32
+
33
+ ### Step 1: Prerequisite Check
34
+ Identify Design Doc in docs/design/ and check implementation files via git diff.
35
+
36
+ ### Step 2: Execute code-reviewer
37
+ Spawn code-reviewer agent: "Validate Design Doc compliance for the implementation. Check acceptance criteria fulfillment, code quality, and implementation completeness. Design Doc path: [path]"
38
+
39
+ **Store output as**: `$STEP_2_OUTPUT`
40
+
41
+ ### Step 3: Verdict and Response
42
+
43
+ **Criteria (considering project stage)**:
44
+ - Prototype: Pass at 70%+
45
+ - Production: 90%+ REQUIRED
46
+ - Critical items (security, etc.): REQUIRED regardless of rate
47
+
48
+ **Compliance-based response**:
49
+
50
+ For low compliance (production <90%):
51
+ ```
52
+ Validation Result: [X]% compliance
53
+ Unfulfilled items:
54
+ - [item list]
55
+
56
+ Execute fixes? (y/n):
57
+ ```
58
+
59
+ **[STOP — BLOCKING]** Present compliance results to user for confirmation.
60
+ **CANNOT proceed until user explicitly confirms.**
61
+
62
+ ### Step 4: Prepare Fix Context
63
+
64
+ If user selects `n` or compliance sufficient: Skip Steps 4-8, proceed to Step 9.
65
+
66
+ Reference documentation-criteria skill for task file template.
67
+
68
+ ### Step 5: Create Task File
69
+
70
+ Create task file at `docs/plans/tasks/review-fixes-YYYYMMDD.md`
71
+
72
+ ### Step 6: Execute Fixes
73
+
74
+ Spawn task-executor agent: "Execute review fixes. Task file: docs/plans/tasks/review-fixes-YYYYMMDD.md. Apply staged fixes (stops at 5 files)."
75
+
76
+ ### Step 7: Quality Check
77
+
78
+ Spawn quality-fixer agent: "Confirm quality gate passage for fixed files."
79
+
80
+ ### Step 8: Re-validate
81
+
82
+ Spawn code-reviewer agent: "Re-validate Design Doc compliance after fixes. Prior compliance issues: $STEP_2_OUTPUT. Verify each prior issue is resolved."
83
+
84
+ ### Step 9: Final Report
85
+
86
+ ```
87
+ Initial compliance: [X]%
88
+ Final compliance: [Y]% (if fixes executed)
89
+ Improvement: [Y-X]%
90
+
91
+ Remaining issues:
92
+ - [items requiring manual intervention]
93
+ ```
94
+
95
+ ## Auto-fixable Items
96
+ - Simple unimplemented acceptance criteria
97
+ - Error handling additions
98
+ - Contract definition fixes
99
+ - Function splitting (length/complexity improvements)
100
+
101
+ ## Non-fixable Items
102
+ - Fundamental business logic changes
103
+ - Architecture-level modifications
104
+ - Design Doc deficiencies
105
+
106
+ ## Completion Criteria
107
+
108
+ - [ ] Design Doc identified and implementation files checked
109
+ - [ ] code-reviewer spawned and compliance validated
110
+ - [ ] Compliance results presented to user
111
+ - [ ] Fixes executed if user approved (with quality-fixer gate)
112
+ - [ ] Re-validation completed after fixes
113
+ - [ ] Final report presented to user
114
+
115
+ **Scope**: Design Doc compliance validation and auto-fixes.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "recipe-review"
3
+ short_description: "Design Doc compliance validation with auto-fixes"
4
+ default_prompt: "Use $recipe-review to validate: "
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: recipe-task
3
+ description: "Execute tasks with metacognitive analysis and appropriate rule selection."
4
+ ---
5
+
6
+ ## Required Skills [LOAD BEFORE EXECUTION]
7
+
8
+ 1. [LOAD IF NOT ACTIVE] `task-analyzer` — task analysis and skill selection (rule-advisor handles remaining skill selection)
9
+
10
+ # Task Execution with Metacognitive Analysis
11
+
12
+ Task: $ARGUMENTS
13
+
14
+ ## Mandatory Execution Process
15
+
16
+ **Step 1: Rule Selection via rule-advisor (REQUIRED)**
17
+
18
+ Spawn rule-advisor agent: "Analyze the task and select appropriate rules for: $ARGUMENTS. Provide context about current situation and prerequisites."
19
+
20
+ ENFORCEMENT: Skipping rule-advisor produces unguided execution with high failure risk.
21
+
22
+ **Step 2: Utilize rule-advisor Output**
23
+
24
+ After receiving rule-advisor's response, proceed with:
25
+
26
+ 1. **Understand Task Essence** (from `metaCognitiveGuidance.taskEssence`)
27
+ - Focus on fundamental purpose, not surface-level work
28
+ - Distinguish between "quick fix" vs "proper solution"
29
+
30
+ 2. **Follow Selected Rules** (from `selectedRules`)
31
+ - Review each selected rule section
32
+ - Apply concrete procedures and guidelines
33
+
34
+ 3. **Recognize Past Failures** (from `metaCognitiveGuidance.pastFailures`)
35
+ - Apply countermeasures for known failure patterns
36
+ - Use suggested alternative approaches
37
+
38
+ 4. **Execute First Action** (from `metaCognitiveGuidance.firstStep`)
39
+ - Start with recommended action and rationale
40
+ - Use suggested tools first
41
+
42
+ **Step 3: Create Task List**
43
+
44
+ Register work steps. Always include: first "Confirm skill constraints", final "Verify skill fidelity".
45
+
46
+ Break down the task based on rule-advisor's guidance:
47
+ - Reflect `metaCognitiveGuidance.taskEssence` in task descriptions
48
+ - Apply `metaCognitiveGuidance.firstStep` to first task
49
+ - Restructure tasks considering `warningPatterns`
50
+ - Set appropriate priorities
51
+
52
+ **Step 4: Execute Implementation**
53
+
54
+ Proceed with task execution following:
55
+ - Selected rules from rule-advisor
56
+ - Task structure
57
+ - Quality standards from applicable rules
58
+
59
+ ## Important Notes
60
+
61
+ - **Spawn rule-advisor first**: MUST complete metacognitive step before implementation
62
+ - **Update tasks after rule-advisor**: MUST reflect insights in task structure
63
+ - **Follow metaCognitiveGuidance.firstStep**: MUST start with the recommended action
64
+ - **Monitor warningPatterns**: MUST watch for failure patterns throughout execution
65
+
66
+ ## Completion Criteria
67
+
68
+ - [ ] rule-advisor spawned and output received
69
+ - [ ] Task essence understood from `metaCognitiveGuidance.taskEssence`
70
+ - [ ] Selected rules reviewed and applied
71
+ - [ ] Past failure patterns recognized and countermeasures applied
72
+ - [ ] Task list created with skill constraint confirmation and fidelity verification
73
+ - [ ] Implementation executed following rule-advisor guidance
74
+ - [ ] Warning patterns monitored throughout execution
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "recipe-task"
3
+ short_description: "Metacognitive task execution with rule selection"
4
+ default_prompt: "Use $recipe-task to execute: "
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: recipe-update-doc
3
+ description: "Update existing design documents (Design Doc / PRD / ADR) with review and consistency verification."
4
+ ---
5
+
6
+ ## Required Skills [LOAD BEFORE EXECUTION]
7
+
8
+ 1. [LOAD IF NOT ACTIVE] `documentation-criteria` — document creation rules and templates
9
+ 2. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
10
+
11
+ **Context**: Dedicated to updating existing design documents.
12
+
13
+ ## Orchestrator Definition
14
+
15
+ **Core Identity**: "I am not a worker. I am an orchestrator." (see subagents-orchestration-guide skill)
16
+
17
+ **First Action**: Register Steps 1-6 before any execution.
18
+
19
+ **Execution Protocol**:
20
+ 1. **Spawn agents for all work** -- your role is to invoke sub-agents, pass data between them, and report results
21
+ 2. **Execute update flow**:
22
+ - Identify target -> Clarify changes -> Update document -> Review -> Consistency check
23
+ - **[STOP — BLOCKING]** At every `[Stop: ...]` marker -> Present status to user for confirmation. **CANNOT proceed until user explicitly confirms.**
24
+ 3. **Scope**: Complete when updated document receives approval
25
+
26
+ **CRITICAL**: MUST execute document-reviewer and all stopping points -- each serves as a quality gate for document accuracy.
27
+ ENFORCEMENT: Skipping document-reviewer risks propagating inconsistencies to downstream workflows.
28
+
29
+ ## Workflow Overview
30
+
31
+ ```
32
+ Target document -> [Stop: Confirm changes]
33
+ |
34
+ technical-designer / prd-creator (update mode)
35
+ |
36
+ document-reviewer -> [Stop: Review approval]
37
+ | (Design Doc only)
38
+ design-sync -> [Stop: Final approval]
39
+ ```
40
+
41
+ ## Scope Boundaries
42
+
43
+ **Included in this skill**:
44
+ - Existing document identification and selection
45
+ - Change content clarification with user
46
+ - Document update with appropriate agent (update mode)
47
+ - Document review with document-reviewer
48
+ - Consistency verification with design-sync (Design Doc only)
49
+
50
+ **Out of scope** (redirect to appropriate skills):
51
+ - New requirement analysis -> $recipe-design
52
+ - Work planning or implementation -> $recipe-plan or $recipe-task
53
+
54
+ **Responsibility Boundary**: This skill completes with updated document approval.
55
+
56
+ Target document: $ARGUMENTS
57
+
58
+ ## Execution Flow
59
+
60
+ ### Step 1: Target Document Identification
61
+
62
+ Check for existing documents in docs/design/, docs/prd/, docs/adr/.
63
+
64
+ **Decision flow**:
65
+
66
+ | Situation | Action |
67
+ |-----------|--------|
68
+ | $ARGUMENTS specifies a path | Use specified document |
69
+ | $ARGUMENTS describes a topic | Search documents matching the topic |
70
+ | Multiple candidates found | Present options to user |
71
+ | No documents found | Report and end (suggest $recipe-design instead) |
72
+
73
+ ### Step 2: Document Type Determination
74
+
75
+ Determine type from document path:
76
+
77
+ | Path Pattern | Type | Update Agent | Notes |
78
+ |-------------|------|--------------|-------|
79
+ | `docs/design/*.md` | Design Doc | technical-designer | - |
80
+ | `docs/prd/*.md` | PRD | prd-creator | - |
81
+ | `docs/adr/*.md` | ADR | technical-designer | Minor changes: update existing file; Major changes: create new ADR file |
82
+
83
+ **ADR Update Guidance**:
84
+ - **Minor changes** (clarification, typo fix, small scope adjustment): Update the existing ADR file
85
+ - **Major changes** (decision reversal, significant scope change): Create a new ADR that supersedes the original
86
+
87
+ ### Step 3: Change Content Clarification [Stop]
88
+
89
+ **[STOP — BLOCKING]** Present change summary to user for confirmation.
90
+ **CANNOT proceed until user explicitly confirms.**
91
+
92
+ Ask the user to clarify what changes are needed:
93
+ - What sections need updating
94
+ - Reason for the change (bug fix findings, spec change, review feedback, etc.)
95
+ - Expected outcome after the update
96
+
97
+ Confirm understanding of changes with user before proceeding.
98
+
99
+ ### Step 4: Document Update
100
+
101
+ Spawn [Update Agent from Step 2] agent: "Operation Mode: update. Existing Document: [path from Step 1]. Changes Required: [Changes clarified in Step 3]. Update the document to reflect the specified changes. Add change history entry."
102
+
103
+ ### Step 5: Document Review [Stop]
104
+
105
+ **[STOP — BLOCKING]** Present review results to user for approval.
106
+ **CANNOT proceed until user explicitly confirms.**
107
+
108
+ Spawn document-reviewer agent: "Review the following updated document. doc_type: [Design Doc / PRD / ADR]. target: [path from Step 1]. mode: standard. Focus on: Consistency of updated sections with rest of document, no contradictions introduced by changes, completeness of change history."
109
+
110
+ **Store output as**: `$STEP_5_OUTPUT`
111
+
112
+ **On review result**:
113
+ - Approved -> Proceed to Step 6
114
+ - Needs revision -> Return to Step 4 with review feedback (max 2 iterations):
115
+ Spawn [Update Agent from Step 2] agent: "Operation Mode: update. Existing Document: [path from Step 1]. Review Feedback to Address: $STEP_5_OUTPUT. Address each issue raised in the review feedback."
116
+ - **After 2 rejections** -> Flag for human review, present accumulated feedback to user and end
117
+
118
+ Present review result to user for approval.
119
+
120
+ ### Step 6: Consistency Verification (Design Doc only) [Stop]
121
+
122
+ **[STOP — BLOCKING]** Present consistency verification results to user for final approval.
123
+ **CANNOT proceed until user explicitly confirms.**
124
+
125
+ **Skip condition**: Document type is PRD or ADR -> Proceed to completion.
126
+
127
+ For Design Doc, spawn design-sync agent: "Verify consistency of the updated Design Doc with other design documents. Updated document: [path from Step 1]"
128
+
129
+ **On consistency result**:
130
+ - No conflicts -> Present result to user for final approval
131
+ - Conflicts detected -> Present conflicts to user:
132
+ - A: Return to Step 4 to resolve conflicts in this document
133
+ - B: End and address conflicts separately
134
+
135
+ ## Error Handling
136
+
137
+ | Error | Action |
138
+ |-------|--------|
139
+ | Target document not found | Report and end (suggest $recipe-design instead) |
140
+ | Sub-agent update fails | Log failure, present error to user, retry once |
141
+ | Review rejects after 2 revisions | Stop loop, flag for human intervention |
142
+ | design-sync detects conflicts | Present to user for resolution decision |
143
+
144
+ ## Completion Criteria
145
+
146
+ - [ ] Identified target document
147
+ - [ ] Clarified change content with user
148
+ - [ ] Updated document via appropriate agent (update mode)
149
+ - [ ] Spawned document-reviewer and addressed feedback
150
+ - [ ] Spawned design-sync for consistency verification (Design Doc only)
151
+ - [ ] Obtained user approval for updated document
152
+
153
+ ## Output Example
154
+ Document update completed.
155
+ - Updated document: docs/design/[document-name].md
156
+ - Approval status: User approved
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "recipe-update-doc"
3
+ short_description: "Update design documents with review verification"
4
+ default_prompt: "Use $recipe-update-doc to update: "
5
+
6
+ policy:
7
+ allow_implicit_invocation: false