codex-workflows 0.2.3 → 0.2.5

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.
@@ -64,16 +64,16 @@ description: "Documentation creation criteria for PRD, ADR, Design Doc, UI Spec,
64
64
  ### UI Specification
65
65
  **Purpose**: Define UI structure, screen transitions, component decomposition, and interaction design
66
66
  **Includes**: Screen list and transitions, component state x display matrix, interaction definitions, AC traceability, existing component reuse map, accessibility requirements
67
- **Excludes**: Technical implementation details, API contracts, test implementation, implementation schedule
67
+ **Excludes**: Technical implementation details, API contracts, test implementation (generated by acceptance-test-generator), implementation schedule
68
68
 
69
69
  ### Design Document
70
70
  **Purpose**: Define technical implementation methods in detail
71
71
  **Includes**: Existing codebase analysis, technical approach, dependencies and constraints, interface/contract definitions, data flow, acceptance criteria, change impact map, code inspection evidence
72
- **Excludes**: Why that technology was chosen (reference ADR), when/who to implement (reference Work Plan)
72
+ **Excludes**: Why that technology was chosen (reference ADR), when/who to implement (reference Work Plan), detailed test strategy and test case selection (generated by acceptance-test-generator from acceptance criteria)
73
73
 
74
74
  ### Work Plan
75
75
  **Purpose**: Implementation task management and progress tracking
76
- **Includes**: Task breakdown, schedule estimates, E2E verification procedures, Phase 4 Quality Assurance Phase (required), progress records
76
+ **Includes**: Task breakdown, schedule estimates, test skeleton file paths, Phase 4 Quality Assurance Phase (required), progress records
77
77
  **Excludes**: Technical rationale, design details
78
78
 
79
79
  **Phase Division Criteria**:
@@ -110,6 +110,11 @@ Each AC is written in EARS (Easy Approach to Requirements Syntax) format.
110
110
  - **Integration Target**: [What to connect with]
111
111
  - **Invocation Method**: [How it will be invoked]
112
112
 
113
+ ### Dependency Verification
114
+ | Dependency | Status | Evidence |
115
+ |------------|--------|----------|
116
+ | [Service / hook / type / table / endpoint] | [verified-existing / requires-new-creation / external-dependency] | [path:line, search evidence, or authoritative external source] |
117
+
113
118
  ### Code Inspection Evidence
114
119
 
115
120
  | File/Function | Relevance |
@@ -259,40 +264,15 @@ System Invariants:
259
264
  - Prerequisites: [Required pre-implementations]
260
265
 
261
266
  ### Integration Points
262
- Each integration point requires E2E verification:
263
267
 
264
268
  **Integration Point 1: [Name]**
265
269
  - Components: [Component A] to [Component B]
266
- - Verification: [How to verify integration works]
270
+ - Contract: [Interface/API contract between components]
267
271
 
268
272
  ### Migration Strategy
269
273
 
270
274
  [Technical migration approach, ensuring backward compatibility]
271
275
 
272
- ## Test Strategy
273
-
274
- ### Basic Test Design Policy
275
-
276
- Automatically derive test cases from acceptance criteria:
277
- - Create at least one test case for each acceptance criterion
278
- - Implement measurable standards from acceptance criteria as assertions
279
-
280
- ### Unit Tests
281
-
282
- [Unit testing policy and coverage goals]
283
-
284
- ### Integration Tests
285
-
286
- [Integration testing policy and important test cases]
287
-
288
- ### E2E Tests
289
-
290
- [E2E testing policy]
291
-
292
- ### Performance Tests
293
-
294
- [Performance testing methods and standards]
295
-
296
276
  ## Security Considerations
297
277
 
298
278
  Evaluate the following for this feature's trust boundaries and data flow:
@@ -48,11 +48,6 @@ Related Issue/PR: #XXX (if any)
48
48
  - [ ] [Functional completion criteria]
49
49
  - [ ] [Quality completion criteria]
50
50
 
51
- #### Operational Verification Procedures
52
- 1. [Operation verification steps]
53
- 2. [Expected result verification]
54
- 3. [Performance verification (when applicable)]
55
-
56
51
  ### Phase 2: [Phase Name] (Estimated commits: X)
57
52
  **Purpose**: [What this phase aims to achieve]
58
53
 
@@ -66,11 +61,6 @@ Related Issue/PR: #XXX (if any)
66
61
  - [ ] [Functional completion criteria]
67
62
  - [ ] [Quality completion criteria]
68
63
 
69
- #### Operational Verification Procedures
70
- 1. [Operation verification steps]
71
- 2. [Expected result verification]
72
- 3. [Performance verification (when applicable)]
73
-
74
64
  ### Phase 3: [Phase Name] (Estimated commits: X)
75
65
  **Purpose**: [What this phase aims to achieve]
76
66
 
@@ -84,9 +74,6 @@ Related Issue/PR: #XXX (if any)
84
74
  - [ ] [Functional completion criteria]
85
75
  - [ ] [Quality completion criteria]
86
76
 
87
- #### Operational Verification Procedures
88
- [Copy relevant integration point operational verification from Design Doc]
89
-
90
77
  ### Final Phase: Quality Assurance (Required) (Estimated commits: 1)
91
78
  **Purpose**: Overall quality assurance and Design Doc consistency verification
92
79
 
@@ -94,13 +81,10 @@ Related Issue/PR: #XXX (if any)
94
81
  - [ ] Verify all Design Doc acceptance criteria achieved
95
82
  - [ ] Security review: Verify security considerations from Design Doc are implemented
96
83
  - [ ] Quality checks (types, lint, format)
97
- - [ ] Execute all tests
84
+ - [ ] Execute all tests (including integration/E2E from test skeletons, when provided)
98
85
  - [ ] Coverage 70%+
99
86
  - [ ] Document updates
100
87
 
101
- #### Operational Verification Procedures
102
- [Copy operational verification procedures from Design Doc]
103
-
104
88
  ### Quality Assurance
105
89
  - [ ] Implement staged quality checks (details: refer to ai-development-guide skill)
106
90
  - [ ] All tests pass
@@ -110,7 +94,8 @@ Related Issue/PR: #XXX (if any)
110
94
 
111
95
  ## Completion Criteria
112
96
  - [ ] All phases completed
113
- - [ ] Each phase's operational verification procedures executed
97
+ - [ ] All integration/E2E tests passing (when test skeletons provided)
98
+ - [ ] Acceptance criteria manually verified (when test skeletons are not provided)
114
99
  - [ ] Design Doc acceptance criteria satisfied
115
100
  - [ ] Staged quality checks completed (zero errors)
116
101
  - [ ] All tests pass
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: recipe-add-integration-tests
3
- description: "Add integration/E2E tests to existing codebase using Design Doc acceptance criteria."
3
+ description: "Add integration/E2E tests to existing codebase using Design Docs."
4
4
  ---
5
5
 
6
6
  ## Required Skills [LOAD BEFORE EXECUTION]
@@ -26,11 +26,11 @@ description: "Add integration/E2E tests to existing codebase using Design Doc ac
26
26
  - Test review -> Spawn integration-test-reviewer agent
27
27
  - Quality checks -> Spawn quality-fixer agent
28
28
 
29
- Design Doc path: $ARGUMENTS
29
+ Document paths: $ARGUMENTS
30
30
 
31
31
  ## Prerequisites
32
32
 
33
- - Design Doc must exist (created manually or via reverse-engineer)
33
+ - At least one Design Doc must exist (created manually or via reverse-engineer)
34
34
  - Existing implementation to test
35
35
 
36
36
  ## Execution Flow
@@ -39,27 +39,59 @@ Design Doc path: $ARGUMENTS
39
39
 
40
40
  Reference documentation-criteria skill for task file template in Step 3.
41
41
 
42
- ### Step 1: Validate Design Doc
42
+ ### Step 1: Discover and Validate Documents
43
43
 
44
- Verify Design Doc exists at $ARGUMENTS or find the most recent in docs/design/.
44
+ ```bash
45
+ # Verify at least one document path was provided
46
+ test -n "$ARGUMENTS" || { echo "ERROR: No document paths provided"; exit 1; }
47
+
48
+ # Verify provided paths exist
49
+ ls $ARGUMENTS
50
+ ```
51
+
52
+ Use only the user-provided paths in `$ARGUMENTS`. Do not auto-discover additional Design Docs or UI Specs.
53
+
54
+ Classify provided documents by path and filename, using first-match-wins:
55
+ - Path matches `docs/ui-spec/*.md` -> **UI Spec**
56
+ - Path matches `docs/design/*-backend-*.md` or `docs/design/*backend*.md` -> **Design Doc (backend)**
57
+ - Path matches `docs/design/*-frontend-*.md` or `docs/design/*frontend*.md` -> **Design Doc (frontend)**
58
+ - Path matches `docs/design/*.md` and none of the above -> **single-layer Design Doc**
59
+
60
+ If a filename appears to match both backend and frontend, halt and ask the user which layer it belongs to.
45
61
 
46
62
  ### Step 2: Skeleton Generation
47
63
 
48
- Spawn acceptance-test-generator agent: "Generate test skeletons from Design Doc at [path from Step 1]."
64
+ Spawn acceptance-test-generator agent with only the documents that exist from Step 1:
65
+ ```text
66
+ Generate test skeletons from the following documents:
67
+ - Design Doc (backend): [path] <- include only if exists
68
+ - Design Doc (frontend): [path] <- include only if exists
69
+ - UI Spec: [path] <- include only if exists
70
+ ```
49
71
 
50
- **Expected output**: `generatedFiles` containing integration and e2e paths
72
+ **Expected output**: `generatedFiles` as a structured object grouped by layer, for example:
73
+ ```json
74
+ {
75
+ "backend": ["path/to/backend.int.test.ts"],
76
+ "frontend": ["path/to/frontend.int.test.ts"],
77
+ "e2e": ["path/to/flow.e2e.test.ts"]
78
+ }
79
+ ```
51
80
 
52
- ### Step 3: Create Task File [GATE]
81
+ ### Step 3: Create Task Files [GATE]
53
82
 
54
83
  **[STOP — BLOCKING]** Present task file content to user for confirmation before proceeding to implementation.
55
84
  **CANNOT proceed until user explicitly confirms.**
56
85
 
57
- Create task file at: `docs/plans/tasks/integration-tests-YYYYMMDD.md`
86
+ Create one task file per layer, using the monorepo-flow.md naming convention for deterministic agent routing:
87
+ - Backend skeletons exist -> `docs/plans/tasks/integration-tests-backend-task-YYYYMMDD.md`
88
+ - Frontend skeletons exist -> `docs/plans/tasks/integration-tests-frontend-task-YYYYMMDD.md`
89
+ - Single-layer (no backend/frontend distinction) -> `docs/plans/tasks/integration-tests-backend-task-YYYYMMDD.md`
58
90
 
59
- **Template**:
91
+ **Template** (per task file):
60
92
  ```markdown
61
93
  ---
62
- name: Implement integration tests for [feature name]
94
+ name: Implement [layer] integration tests for [feature name]
63
95
  type: test-implementation
64
96
  ---
65
97
 
@@ -69,8 +101,8 @@ Implement test cases defined in skeleton files.
69
101
 
70
102
  ## Target Files
71
103
 
72
- - Skeleton: [path from Step 2 generatedFiles]
73
- - Design Doc: [path from Step 1]
104
+ - Skeleton: [layer-specific paths from Step 2 generatedFiles]
105
+ - Design Doc: [layer-specific Design Doc from Step 1]
74
106
 
75
107
  ## Tasks
76
108
 
@@ -85,17 +117,22 @@ Implement test cases defined in skeleton files.
85
117
  - No quality issues
86
118
  ```
87
119
 
88
- **Output**: "Task file created at [path]. Ready for Step 4."
120
+ **Output**: "Task file(s) created at [path(s)]. Ready for Step 4."
89
121
 
90
122
  ### Step 4: Test Implementation
91
123
 
92
- Spawn task-executor agent: "Implement integration tests. Task file: docs/plans/tasks/integration-tests-YYYYMMDD.md. Implement tests following the task file."
124
+ For each task file from Step 3, invoke task-executor routed by filename pattern:
125
+ - `*-backend-task-*` -> Spawn `task-executor`
126
+ - `*-frontend-task-*` -> Spawn `task-executor-frontend`
127
+ - Prompt: "Task file: [task file path from Step 3]. Implement tests following the task file."
128
+
129
+ Execute one task file at a time through Steps 4 -> 5 -> 6 -> 7 before starting the next.
93
130
 
94
131
  **Expected output**: `status`, `testsAdded`
95
132
 
96
133
  ### Step 5: Test Review
97
134
 
98
- Spawn integration-test-reviewer agent: "Review test quality. Test files: [paths from Step 4 testsAdded]. Skeleton files: [paths from Step 2 generatedFiles]."
135
+ Spawn integration-test-reviewer agent: "Review test quality. Test files: [paths from Step 4 testsAdded]. Skeleton files: [layer-specific paths from Step 2 generatedFiles matching current task's layer]."
99
136
 
100
137
  **Expected output**: `status` (approved/needs_revision), `requiredFixes`
101
138
 
@@ -103,11 +140,14 @@ Spawn integration-test-reviewer agent: "Review test quality. Test files: [paths
103
140
 
104
141
  Check Step 5 result:
105
142
  - `status: approved` -> Mark complete, proceed to Step 7
106
- - `status: needs_revision` -> Spawn task-executor agent: "Fix the following issues in test files: [requiredFixes from Step 5]." Then return to Step 5.
143
+ - `status: needs_revision` -> Spawn the layer-appropriate executor with: "Fix the following issues in test files: [requiredFixes from Step 5]." Then return to Step 5. Maximum 2 revision cycles per task file; if still `needs_revision`, escalate to the user.
107
144
 
108
145
  ### Step 7: Quality Check
109
146
 
110
- Spawn quality-fixer agent: "Final quality assurance for test files added in this workflow. Run all tests and verify coverage."
147
+ Spawn quality-fixer routed by task filename pattern:
148
+ - `*-backend-task-*` -> Spawn `quality-fixer`
149
+ - `*-frontend-task-*` -> Spawn `quality-fixer-frontend`
150
+ - Prompt: "Final quality assurance for test files added in this workflow. Run all tests and verify coverage."
111
151
 
112
152
  **Expected output**: `status` (`approved`/`blocked`)
113
153
 
@@ -92,6 +92,7 @@ Verify required elements exist per documentation-criteria skill template. Gate 0
92
92
  For DesignDoc, additionally verify:
93
93
  - [ ] Code inspection evidence recorded (files and functions listed)
94
94
  - [ ] Applicable standards listed with explicit/implicit classification
95
+ - [ ] Dependencies described as existing have verification results or authoritative external source
95
96
  - [ ] Field propagation map present (when fields cross boundaries)
96
97
 
97
98
  #### Gate 1: Quality Assessment (only after Gate 0 passes)
@@ -106,6 +107,7 @@ For DesignDoc, additionally verify:
106
107
  - Technical information verification: When sources exist, verify with web search for latest information and validate claim validity
107
108
  - Failure scenario review: Identify failure scenarios across normal usage, high load, and external failures; specify which design element becomes the bottleneck
108
109
  - Code inspection evidence review: Verify inspected files are relevant to design scope; flag if key related files are missing
110
+ - Dependency realizability check: For each dependency the Design Doc's Existing Codebase Analysis section describes as "existing", verify its definition exists in the codebase using file pattern search and content search. Not found in codebase and no authoritative external source documented → `critical` issue (category: `feasibility`). Found but the definition signature or named contract materially diverges from the Design Doc description → `important` issue (category: `consistency`)
109
111
  - **As-is implementation document review**: When code verification results are provided and the document describes existing implementation (not future requirements), verify that code-observable behaviors are stated as facts; speculative language about deterministic behavior → `important` issue
110
112
  - **Undetermined items review** [MANDATORY]: Every TBD, unknown, or open item MUST include: (1) **owner** — who resolves it, (2) **due** — when it gets resolved (which phase or milestone), (3) **next-phase handling** — how the next phase treats this gap. Missing any of these three → `important` issue
111
113
 
@@ -259,6 +261,7 @@ Include in output when `prior_context_count > 0`:
259
261
  - [ ] Gate 0 structural existence checks pass before quality review
260
262
  - [ ] Design decision rationales verified against identified standards/patterns
261
263
  - [ ] Code inspection evidence covers files relevant to design scope
264
+ - [ ] Dependencies described as existing verified against codebase or authoritative external source
262
265
  - [ ] Field propagation map present when fields cross component boundaries
263
266
 
264
267
  ## Review Criteria (for Comprehensive Mode)
@@ -106,7 +106,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
106
106
  - **Phase Completion Task Auto-generation (Required)**:
107
107
  - Based on "Phase X" notation in work plan, generate after each phase's final task
108
108
  - Filename: `{plan-name}-phase{number}-completion.md`
109
- - Content: Copy E2E verification procedures from Design Doc, all task completion checklist
109
+ - Content: All task completion checklist, list test skeleton file paths for verification
110
110
  - Criteria: Always generate if the plan contains the string "Phase"
111
111
 
112
112
  5. **Task Structuring**
@@ -84,9 +84,17 @@ Must be performed before Design Doc creation:
84
84
  - Similar component is technical debt → Create ADR improvement proposal before implementation
85
85
  - No similar component → Proceed with new implementation
86
86
 
87
- 4. **Include in Design Doc**
87
+ 4. **Dependency Existence Verification**
88
+ - For each component the design assumes already exists, search for its definition in the codebase using file pattern search and content search
89
+ - Typical targets include: components, custom hooks, Context definitions, store/state definitions, API endpoints, type definitions, utility functions
90
+ - If found in codebase: record file path and definition location
91
+ - If found outside codebase (external API, separate repository, generated artifact): record the authoritative source and mark as "external dependency"
92
+ - If not found anywhere: mark as "requires new creation" in the Design Doc and reflect this in implementation order dependencies
93
+
94
+ 5. **Include in Design Doc**
88
95
  - Always include investigation results in "## Existing Codebase Analysis" section
89
96
  - Clearly document similar component search results (found components or "none")
97
+ - Include dependency existence verification results (verified existing / requires new creation / external dependency)
90
98
  - Record adopted decision (use existing/improvement proposal/new implementation) and rationale
91
99
 
92
100
  ### Integration Points【Important】
@@ -338,9 +346,9 @@ function useUserData(userId: string) {
338
346
  - [ ] **Agreement checklist completed** (most important)
339
347
  - [ ] **Prerequisite common ADRs referenced** (required)
340
348
  - [ ] **Change impact map created** (required)
341
- - [ ] **Component verification procedures for each phase** (required)
342
349
  - [ ] Response to requirements and design validity
343
- - [ ] Test strategy (React Testing Library) and error handling (Error Boundary)
350
+ - [ ] Error handling strategy
351
+ - [ ] Acceptance criteria written in testable format: each criterion includes a measurable condition and expected outcome (verifiable by acceptance-test-generator)
344
352
  - [ ] Props change matrix completeness
345
353
  - [ ] Implementation approach selection rationale (vertical/horizontal/hybrid)
346
354
  - [ ] Latest React best practices researched and references cited
@@ -101,12 +101,20 @@ Must be performed before Design Doc creation:
101
101
  - Similar functionality is technical debt → Create ADR improvement proposal before implementation
102
102
  - No similar functionality → Proceed with new implementation
103
103
 
104
- 4. **Include in Design Doc**
104
+ 4. **Dependency Existence Verification**
105
+ - For each dependency the design assumes already exists, search for its definition in the codebase using file pattern search and content search
106
+ - Typical targets include: interfaces, classes, repositories, service methods, API endpoints, DB tables/columns, configuration keys, enum values, type definitions
107
+ - If found in codebase: record file path and definition location
108
+ - If found outside codebase (external API, separate repository, generated artifact): record the authoritative source and mark as "external dependency"
109
+ - If not found anywhere: mark as "requires new creation" in the Design Doc and reflect this in implementation order dependencies
110
+
111
+ 5. **Include in Design Doc**
105
112
  - Always include investigation results in "## Existing Codebase Analysis" section
106
113
  - Clearly document similar functionality search results (found implementations or "none")
114
+ - Include dependency existence verification results (verified existing / requires new creation / external dependency)
107
115
  - Record adopted decision (use existing/improvement proposal/new implementation) and rationale
108
116
 
109
- 5. **Code Inspection Evidence**
117
+ 6. **Code Inspection Evidence**
110
118
  - Record all inspected files and key functions in "Code Inspection Evidence" section of Design Doc
111
119
  - Each entry must state relevance (similar functionality / integration point / pattern reference)
112
120
 
@@ -314,9 +322,9 @@ Implementation sample creation checklist:
314
322
  - [ ] **Agreement checklist completed** (most important)
315
323
  - [ ] **Prerequisite common ADRs referenced** (required)
316
324
  - [ ] **Change impact map created** (required)
317
- - [ ] **E2E verification procedures for each phase** (required)
318
325
  - [ ] Response to requirements and design validity
319
- - [ ] Test strategy and error handling
326
+ - [ ] Error handling strategy
327
+ - [ ] Acceptance criteria written in testable format: each criterion includes a measurable condition and expected outcome (verifiable by acceptance-test-generator)
320
328
  - [ ] Interface change matrix completeness
321
329
  - [ ] Implementation approach selection rationale (vertical/horizontal/hybrid)
322
330
  - [ ] Latest best practices researched and references cited
@@ -40,7 +40,7 @@ Skill Status:
40
40
  2. Clarify task dependencies
41
41
  3. Phase division and prioritization
42
42
  4. Define completion criteria for each task (derived from Design Doc acceptance criteria)
43
- 5. Define operational verification procedures for each phase
43
+ 5. Place test implementation and execution appropriately for each phase
44
44
  6. Concretize risks and countermeasures
45
45
  7. Document in progress-trackable format
46
46
 
@@ -60,7 +60,7 @@ Skill Status:
60
60
  Read the Design Doc(s), UI Spec, PRD, and ADR (if provided). Extract:
61
61
  - Acceptance criteria and implementation approach
62
62
  - Technical dependencies and implementation order
63
- - Integration points requiring E2E verification
63
+ - Integration points and their contracts
64
64
 
65
65
  ### 2. Process Test Design Information (when provided)
66
66
  Read test skeleton files and extract meta information (see Test Design Information Processing section).
@@ -71,7 +71,8 @@ Choose Strategy A (TDD) if test skeletons are provided, Strategy B (implementati
71
71
  ### 4. Compose Phases
72
72
  Structure phases based on technical dependencies from Design Doc:
73
73
  - Place tasks with lowest dependencies in earlier phases
74
- - Include operational verification at integration points
74
+ - When test skeletons are provided, place integration test implementation based on `@dependency` metadata from test skeletons (see Test Design Information Processing > Step 2) and place E2E test execution in the final phase
75
+ - When test skeletons are not provided, include test implementation tasks based on Design Doc acceptance criteria
75
76
  - Include quality assurance in final phase
76
77
 
77
78
  ### 5. Define Tasks with Completion Criteria
@@ -206,8 +207,8 @@ Verification: L1 — [specific verification method]
206
207
  Compose phases based on technical dependencies and implementation approach from Design Doc.
207
208
  Always include quality assurance (all tests passing, acceptance criteria achieved) in final phase.
208
209
 
209
- ### Operational Verification
210
- Place operational verification procedures for each integration point from Design Doc in corresponding phases.
210
+ ### Test Skeleton Integration
211
+ Follow the test skeleton placement rules defined in Step 4 of the Planning Process.
211
212
 
212
213
  ## Diagram Creation (using mermaid notation)
213
214
 
@@ -219,7 +220,7 @@ When creating work plans, **Phase Structure Diagrams** and **Task Dependency Dia
219
220
  - [ ] Phase composition based on technical dependencies
220
221
  - [ ] All requirements converted to tasks
221
222
  - [ ] Quality assurance exists in final phase
222
- - [ ] E2E verification procedures placed at integration points
223
+ - [ ] Test skeleton file paths listed in corresponding phases (when provided)
223
224
  - [ ] Test design information reflected (only when provided)
224
225
  - [ ] Setup tasks placed in first phase
225
226
  - [ ] Risk level-based prioritization applied
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflows",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Task-oriented agentic coding framework for OpenAI Codex CLI — skills, recipes, and subagents for structured development workflows",
5
5
  "license": "MIT",
6
6
  "author": "Shinsuke Kagawa",