codex-workflows 0.4.3 → 0.4.4

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.
@@ -241,6 +241,15 @@ Self-evident: internal-only refactoring with identical observable inputs and out
241
241
  - **Success criteria**: [Observable outcome that proves correctness]
242
242
  - **Failure response**: [What to do if early verification fails]
243
243
 
244
+ ### Output Comparison (When Changing Existing Observable Behavior, an External Contract, or a Persisted Data Shape)
245
+
246
+ - **Comparison input**: [Identical input used for both the current and new implementation]
247
+ - **Expected output fields**: [Specific fields, columns, or output format to compare]
248
+ - **Diff method**: [How the outputs are compared, such as field-by-field diff, file diff, or snapshot comparison]
249
+ - **Transformation pipeline coverage**: [Map each listed step from codebase analysis `dataTransformationPipelines` to the comparison that verifies its output. If a step passes data through unchanged, mark it excluded with rationale]
250
+
251
+ Mark as `N/A` with a brief rationale only when the change does not alter existing observable behavior, an external contract, or a persisted data shape.
252
+
244
253
  ### State Transitions and Invariants (When Applicable)
245
254
 
246
255
  ```yaml
@@ -252,7 +252,7 @@ When receiving new features or change requests, start with requirement-analyzer.
252
252
  ### Design Flow Data Passing
253
253
 
254
254
  - Pass requirement-analyzer output and original requirements to codebase-analyzer
255
- - Pass codebase-analyzer JSON to technical-designer or technical-designer-frontend as `Codebase Analysis`
255
+ - Pass codebase-analyzer JSON to technical-designer or technical-designer-frontend as `Codebase Analysis`, including `dataTransformationPipelines` when present
256
256
  - Pass Design Doc path to code-verifier
257
257
  - Pass code-verifier JSON to document-reviewer as `code_verification`
258
258
 
@@ -373,6 +373,7 @@ When a Design Doc contains a Verification Strategy section, the orchestrator mus
373
373
  - Early verification point (first target, success criteria, failure response)
374
374
 
375
375
  The resulting work plan must include this summary in its header so the plan remains self-sufficient for downstream task generation and execution planning.
376
+ When the Design Doc includes an `Output Comparison` section, carry forward the comparison input, expected output fields or format, diff method, and transformation pipeline coverage as part of that summary.
376
377
 
377
378
  ## Important Constraints [MANDATORY]
378
379
 
@@ -70,14 +70,29 @@ Identify what exists, what appears missing, and what deserves close attention in
70
70
  ### Step 2: Existing Code Element Discovery
71
71
 
72
72
  For each affected file or inferred target file in the selected scope:
73
- 1. Read the file and record public interfaces, key functions, classes, types, constants, and configuration use
74
- 2. Trace one level of direct dependencies through imports or equivalent declarations
75
- 3. Search for patterns related to:
73
+ 1. Read the file in full and record:
74
+ - public and private/internal interfaces, key functions, methods, classes, types, constants, and configuration use
75
+ - exact names, visibility, and signatures where directly observable
76
+ 2. Trace call chains with these scope rules:
77
+ - same module or file: follow internal function and method calls recursively until the chain terminates, delegates externally, or reaches a leaf
78
+ - external dependencies through imports or equivalent declarations: record them as integration points with public interface or contract details only
79
+ 3. Enumerate all entry points discovered in the traced scope that receive input from outside the module or file
80
+ 4. Mark each entry point as `change-relevant` or `non-relevant` based on requirement scope, affected files, and user-visible behavior
81
+ 5. For each `change-relevant` entry point, trace the data transformation pipeline step by step:
82
+ - record how the input changes at each step
83
+ - record intermediate representations or formats when they differ from the final output
84
+ - record external lookups that modify values, including configuration, constants, mapping tables, and reference data
85
+ 6. For each `non-relevant` entry point, record at minimum:
86
+ - entry point name and file:line
87
+ - input shape
88
+ - output shape
89
+ 7. If additional entry points share the same output path or transformation logic as a `change-relevant` entry point, reclassify them as `change-relevant` and trace them step by step
90
+ 8. Search for patterns related to:
76
91
  - data access: repository usage, ORM calls, query builders, raw SQL, migration references
77
92
  - external service calls: HTTP clients, SDK clients, queue producers or consumers, webhook handlers
78
93
  - validation logic: validator functions, schema parsers, assertions, guard clauses, constraint checks
79
94
  - user-visible state handling: state stores, reducers, hooks, loading or error states, view-model shaping
80
- 4. Record each discovered element with exact file path and line number
95
+ 9. Record each discovered element with exact file path and line number
81
96
 
82
97
  ### Step 3: Data Model Discovery
83
98
 
@@ -149,6 +164,31 @@ Return the JSON result as the final response.
149
164
  ],
150
165
  "migrationFiles": ["path/to/migration"]
151
166
  },
167
+ "dataTransformationPipelines": [
168
+ {
169
+ "entryPoint": "functionOrMethodName (path/to/file:line)",
170
+ "steps": [
171
+ {
172
+ "order": 1,
173
+ "method": "functionOrMethodName (path/to/file:line)",
174
+ "input": "Input data or format at this step",
175
+ "output": "Output data or format at this step",
176
+ "externalLookups": ["Config.KEY lookup", "Reference table mapping"],
177
+ "transformation": "What changed and why it matters"
178
+ }
179
+ ],
180
+ "intermediateFormats": ["Intermediate representation if applicable"],
181
+ "finalOutput": "Final output shape or observable value"
182
+ }
183
+ ],
184
+ "entryPointInventory": [
185
+ {
186
+ "entryPoint": "functionOrMethodName (path/to/file:line)",
187
+ "classification": "change-relevant|non-relevant",
188
+ "inputShape": "Input type or shape",
189
+ "outputShape": "Output type or shape"
190
+ }
191
+ ],
152
192
  "constraints": [
153
193
  {
154
194
  "type": "validation|business_rule|configuration|assumption",
@@ -176,11 +216,18 @@ Return the JSON result as the final response.
176
216
  ## Completion Criteria
177
217
 
178
218
  - [ ] Parsed requirement context and identified analysis categories
179
- - [ ] Read affected files and traced direct dependencies
180
- - [ ] Recorded key interfaces and implementation elements with file:line evidence
219
+ - [ ] Read affected files in full and recorded public and private implementation elements with file:line evidence, or documented scope limits in `limitations`
220
+ - [ ] Traced call chains according to the scope rules, or documented incomplete traces in `limitations`
221
+ - [ ] Enumerated all entry points in the traced scope and marked each as `change-relevant` or `non-relevant`
222
+ - [ ] Traced data transformation pipelines step by step for all `change-relevant` entry points that transform incoming data
223
+ - [ ] Recorded at minimum entry point name, input shape, and output shape for all `non-relevant` entry points
224
+ - [ ] Reclassified and traced entry points that share the same output path or transformation logic as a `change-relevant` entry point
225
+ - [ ] Recorded external lookups that modify output values, including configuration, constants, and mapping data
181
226
  - [ ] Performed data model discovery when data access patterns were present
182
227
  - [ ] Extracted constraints and focus areas with concrete risks
183
228
  - [ ] Checked existing tests for coverage signals
229
+ - [ ] Populated `dataTransformationPipelines` for all traced pipelines
230
+ - [ ] Populated `entryPointInventory` for all discovered entry points in the traced scope
184
231
  - [ ] Returned valid JSON
185
232
  """
186
233
 
@@ -98,6 +98,7 @@ For DesignDoc, additionally verify:
98
98
  - [ ] Field propagation map present (when fields cross boundaries)
99
99
  - [ ] Data-oriented designs contain concrete data design or Test Boundaries content, or an explicit N/A rationale
100
100
  - [ ] Verification Strategy section present with correctness definition, target comparison, verification method, observable success indicator, normalized verification timing, and early verification point
101
+ - [ ] Output Comparison section present when the design changes existing observable behavior, an external contract, or a persisted data shape
101
102
 
102
103
  #### Gate 1: Quality Assessment (only after Gate 0 passes)
103
104
 
@@ -116,6 +117,7 @@ For DesignDoc, additionally verify:
116
117
  - **Data design completeness check**: When the document references persistence, storage, database, repository, query, ORM, migration, table, schema, or column concepts, verify that the Design Doc includes concrete data design content or an explicit N/A rationale. Useful evidence includes schema references, data model notes, or Test Boundaries with data layer strategy
117
118
  - **Code-verifier evidence integration**: When `code_verification` is provided, reconcile major or critical discrepancies and undocumented data operations as part of Gate 1 completeness and consistency review
118
119
  - **Verification Strategy quality check**: When the Verification Strategy section exists, verify that: (1) correctness definition is specific and measurable, (2) target comparison and observable success indicator are concrete when the change modifies observable behavior, external contracts, integrations, or data flow, (3) internal-only refactoring with identical observable inputs and outputs may use the minimal form, (4) verification method can detect the change's primary risk, (5) verification timing uses the normalized vocabulary or an explicit `N/A` rationale for minimal form, and (6) vertical-slice designs do not defer all verification to the final phase
120
+ - **Output comparison check**: When the Design Doc changes existing observable behavior, an external contract, or a persisted data shape, verify that a concrete output comparison method is defined with identical input, expected output fields or format, and diff method. When upstream analysis includes `dataTransformationPipelines`, each listed step must be mapped to the comparison that verifies it; steps excluded because data passes through unchanged must include rationale. Missing mappings or rationale → `important` issue (category: `completeness`)
119
121
  - **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
120
122
 
121
123
  **Perspective-specific Mode**:
@@ -258,6 +260,7 @@ Include in output when `prior_context_count > 0`:
258
260
  - [ ] Match of requirements, terminology, numbers between documents
259
261
  - [ ] Completeness of required elements in each document
260
262
  - [ ] Verification Strategy present with a concrete correctness definition and early verification point
263
+ - [ ] Output Comparison defined when the design changes existing observable behavior, an external contract, or a persisted data shape
261
264
  - [ ] Verification Strategy aligns with design type and implementation approach
262
265
  - [ ] Compliance with project rules
263
266
  - [ ] Technical feasibility and reasonableness of estimates
@@ -90,7 +90,7 @@ Must be performed before Design Doc creation:
90
90
  - Record and distinguish between existing implementation locations and planned new locations
91
91
 
92
92
  2. **Existing Interface Investigation** (Only when changing existing features)
93
- - List major public methods of target service (about 5 important ones if over 10)
93
+ - List every public method of the target service with full signatures
94
94
  - Identify call sites using content search with appropriate search patterns
95
95
 
96
96
  3. **Similar Functionality Search and Decision** (Pattern 5 prevention from ai-development-guide skill)
@@ -189,7 +189,9 @@ Must be performed when creating Design Doc:
189
189
  - For new features, specify acceptance-criteria verification beyond unit tests
190
190
  - For extensions, specify regression verification that proves existing behavior is preserved
191
191
  - For refactors or rewrites, specify behavioral equivalence verification against the current implementation when applicable
192
- - Define an early verification point: the first target to validate before scaling the approach
192
+ - When the design changes existing observable behavior, an external contract, or a persisted data shape, define a concrete `Output Comparison` method: identical input, expected output fields or format, diff method, and a mapping from each listed pipeline step to the comparison that verifies it
193
+ - When `Codebase Analysis` provides `dataTransformationPipelines`, use them to populate the `Output Comparison` section. Steps that pass data through unchanged may be excluded only with explicit rationale
194
+ - Define an early verification point: the first target to validate before scaling the approach. For changes to existing observable behavior, external contracts, or persisted data shapes, this must be an output comparison of at least one representative case
193
195
 
194
196
  ### Change Impact Map【Required】
195
197
  Must be included when creating Design Doc:
@@ -252,6 +254,7 @@ Confirm and document conflicts with existing systems at each integration point t
252
254
  - `dataModel` informs schema references, data contracts, and persistence design
253
255
  - `focusAreas` indicate areas requiring deeper design attention
254
256
  - `constraints` inform design constraints, assumptions, and risk handling
257
+ - `dataTransformationPipelines` informs the `Output Comparison` section in Verification Strategy
255
258
  - Additional investigation should focus on gaps or limitations that the analysis calls out
256
259
  - **PRD**: PRD document (if exists)
257
260
  - **Documents to Create**: ADR, Design Doc, or both
@@ -352,6 +355,7 @@ Implementation sample creation checklist:
352
355
  - [ ] **Data representation decision documented** (when new structures introduced)
353
356
  - [ ] **Field propagation map included** (when fields cross boundaries)
354
357
  - [ ] **Verification Strategy defined** (correctness definition, target comparison, verification method, observable success indicator, timing, early verification point)
358
+ - [ ] **Output Comparison defined** when changing existing observable behavior, an external contract, or a persisted data shape (comparison input, expected output fields, diff method, and transformation pipeline coverage)
355
359
 
356
360
  **Reverse-engineer mode only**:
357
361
  - [ ] Every architectural claim cites file:line evidence
package/README.md CHANGED
@@ -337,6 +337,14 @@ your-project/
337
337
 
338
338
  ---
339
339
 
340
+ ## Works With
341
+
342
+ If your requirements already live in Linear or an existing PRD, [linear-prism](https://github.com/shinpr/linear-prism) can decompose them into implementation-ready tasks by reading the codebase, making dependencies explicit, and preserving Design Doc boundaries.
343
+
344
+ Those tasks can then be passed into `$recipe-design` to enter the design phase with clearer scope and better task visibility.
345
+
346
+ ---
347
+
340
348
  ## FAQ
341
349
 
342
350
  **Q: What models does this work with?**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflows",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
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",