codex-workflows 0.4.1 → 0.4.2

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.
@@ -49,12 +49,14 @@ Sources: OWASP Top 10:2025, DryRun Agentic Coding Security Report (2026-03)
49
49
  - Endpoints or route handlers defined without authentication middleware
50
50
  - Resource access operations (read, update, delete) without authorization verification
51
51
  - Administrative or destructive operations accessible without elevated permissions
52
- - Recent research indicates this pattern appears at elevated rates in AI-generated code treat as high-priority review target
52
+ - AI-generated code frequently omits authentication middleware and authorization checks; treat every route handler and resource access operation as an explicit verification target during review
53
+ - Detection approach: search for route or endpoint handlers without authentication middleware, and resource operations (read, update, delete) without authorization checks in the call chain
53
54
 
54
55
  ### Mishandling of Exceptional Conditions (OWASP A10:2025)
55
56
  - Error handlers that expose internal system details (stack traces, database errors, file paths) in responses
56
- - Error handlers that fail open (grant access or skip validation on error)
57
+ - Error handlers that grant access, skip authentication, or bypass authorization when an exception occurs
57
58
  - Missing error handling on security-critical operations (authentication, authorization, cryptographic operations)
59
+ - Detection approach: search for catch or error-handler blocks that return stack traces, database errors, or file paths in responses, and for handlers that continue with success-path behavior without re-validating security state
58
60
 
59
61
  ### Software Supply Chain Patterns (OWASP A03:2025)
60
62
  - Dependencies imported without version pinning
@@ -7,13 +7,13 @@
7
7
 
8
8
  ## Comment Writing Rules
9
9
  - **Function Description Focus**: Describe what the code "does"
10
- - **No Historical Information**: Do not record development history
10
+ - **History in Version Control**: Record development history in commits and PRs instead of code comments
11
11
  - **Timeless**: Write only content that remains valid whenever read
12
12
  - **Conciseness**: Keep explanations to necessary minimum
13
13
 
14
14
  ## Type Safety
15
15
 
16
- **Absolute Rule**: any type is completely prohibited. It disables type checking and becomes a source of runtime errors.
16
+ **Absolute Rule**: Use `unknown`, generics, unions, intersections, or validated assertions instead of `any`. `any` disables type checking and becomes a source of runtime errors.
17
17
 
18
18
  **any Type Alternatives (Priority Order)**
19
19
  1. **unknown Type + Type Guards**: Use for validating external input (API responses, localStorage, URL parameters)
@@ -91,7 +91,7 @@ setUsers(users)
91
91
 
92
92
  **Props Design (Props-driven Approach)**
93
93
  - Props are the interface: Define all necessary information as props
94
- - Avoid implicit dependencies: Do not depend on global state or context without necessity
94
+ - Declare dependencies explicitly through props, hooks, or injected modules instead of relying on ambient global state
95
95
  - Type-safe: Always define Props type explicitly
96
96
 
97
97
  **Environment Variables**
@@ -146,7 +146,7 @@ const response = await fetch('/api/data') // Backend handles API key authenticat
146
146
 
147
147
  ## Error Handling
148
148
 
149
- **Absolute Rule**: Error suppression prohibited. All errors must have log output and appropriate handling.
149
+ **Absolute Rule**: Handle every error explicitly with log output, recovery logic, or escalation appropriate to the failure mode.
150
150
 
151
151
  **Fail-Fast Principle**: Fail quickly on errors to prevent continued processing in invalid states
152
152
  ```typescript
@@ -53,23 +53,19 @@ description: "Documentation creation criteria for PRD, ADR, Design Doc, UI Spec,
53
53
 
54
54
  ### PRD (Product Requirements Document)
55
55
  **Purpose**: Define business requirements and user value
56
- **Includes**: Business requirements, success metrics, user stories, MoSCoW prioritization, MVP/Future phase separation, user journey diagram, scope boundary diagram
57
- **Excludes**: Technical implementation details, technical selection rationale, implementation phases, task breakdown
56
+ **Scope**: Business requirements, user value, success metrics, user stories, MoSCoW prioritization, MVP/Future phase separation, user journey diagram, and scope boundary diagram only. Technical implementation details belong in Design Doc, technical decision rationale in ADR, and implementation phases or task breakdown belong in Work Plan.
58
57
 
59
58
  ### ADR (Architecture Decision Record)
60
59
  **Purpose**: Record technical decision rationale and background
61
- **Includes**: Decision, rationale, option comparison (minimum 3 options), architecture impact, principled implementation guidelines
62
- **Excludes**: Implementation schedule, detailed procedures, specific code examples, resource assignments
60
+ **Scope**: Decision, rationale, option comparison (minimum 3 options), architecture impact, and principled implementation guidance only. Implementation procedures and code examples belong in Design Doc, while schedule and resource assignments belong in Work Plan.
63
61
 
64
62
  ### UI Specification
65
63
  **Purpose**: Define UI structure, screen transitions, component decomposition, and interaction design
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 (generated by acceptance-test-generator), implementation schedule
64
+ **Scope**: Screen list and transitions, component state x display matrix, component decomposition, interaction definitions, AC traceability, existing component reuse map, visual acceptance criteria, and accessibility requirements only. Technical implementation and API contracts belong in Design Doc, test implementation belongs in generated test skeletons, and schedule belongs in Work Plan.
68
65
 
69
66
  ### Design Document
70
67
  **Purpose**: Define technical implementation methods in detail
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), detailed test strategy and test case selection (generated by acceptance-test-generator from acceptance criteria)
68
+ **Scope**: Existing codebase analysis, technical approach, dependencies and constraints, interface and contract definitions, data flow, acceptance criteria, change impact map, code inspection evidence, and verification strategy only. Technology selection rationale belongs in ADR, schedule and assignments belong in Work Plan, and detailed test strategy or case selection belongs in generated test skeletons.
73
69
 
74
70
  **Required Structural Elements**:
75
71
  - Existing codebase analysis and code inspection evidence
@@ -85,8 +81,7 @@ description: "Documentation creation criteria for PRD, ADR, Design Doc, UI Spec,
85
81
 
86
82
  ### Work Plan
87
83
  **Purpose**: Implementation task management and progress tracking
88
- **Includes**: Task breakdown, schedule estimates, test skeleton file paths, Verification Strategy summaries from each Design Doc, final Quality Assurance phase (required), progress records
89
- **Excludes**: Technical rationale, design details
84
+ **Scope**: Task breakdown, dependencies, schedule estimates, test skeleton file paths, Verification Strategy summaries from each Design Doc, final Quality Assurance phase, and progress tracking only. Technical rationale belongs in ADR and design details belong in Design Doc.
90
85
 
91
86
  **Phase Division Criteria**:
92
87
 
@@ -103,7 +98,7 @@ description: "Documentation creation criteria for PRD, ADR, Design Doc, UI Spec,
103
98
 
104
99
  **When Hybrid is selected**:
105
100
  - Combine vertical and horizontal phase structures as defined in the Design Doc
106
- - Final phase is always Quality Assurance
101
+ - Final phase is always Quality Assurance with acceptance criteria verification, all tests passing, and quality checks complete
107
102
 
108
103
  ## Creation Process [MANDATORY]
109
104
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Status
4
4
 
5
- [Proposed | Accepted | Deprecated | Superseded]
5
+ [Proposed | Accepted | Deprecated | Superseded | Rejected]
6
6
 
7
7
  ## Context
8
8
 
@@ -54,6 +54,10 @@
54
54
 
55
55
  - [List changes that are neither good nor bad]
56
56
 
57
+ ## Architecture Impact
58
+
59
+ [Describe how this decision affects existing architecture: components changed, dependencies introduced or removed, and new architectural constraints]
60
+
57
61
  ## Implementation Guidance
58
62
 
59
63
  [Principled direction only. Implementation procedures go to Design Doc]
@@ -277,11 +277,16 @@ System Invariants:
277
277
 
278
278
  ### Error Handling
279
279
 
280
- [Types of errors and how to handle them]
280
+ | Error Category | Example | Detection | Recovery Strategy | User Impact |
281
+ |---------------|---------|-----------|-------------------|-------------|
282
+ | [Validation / External / Infrastructure / Business logic] | [Specific error] | [How detected] | [Retry / Fallback / Propagate / Log-and-continue] | [User-facing message or silent handling] |
281
283
 
282
284
  ### Logging and Monitoring
283
285
 
284
- [What to record in logs and how to monitor]
286
+ - **Log events**: [Key events to log: state transitions, external calls, error occurrences, performance thresholds]
287
+ - **Log levels**: [Which events use DEBUG / INFO / WARN / ERROR]
288
+ - **Sensitive data**: [Fields to mask or exclude; align with Security Considerations]
289
+ - **Monitoring**: [Metrics to track, alert thresholds, dashboard requirements]
285
290
 
286
291
  ## Implementation Plan
287
292
 
@@ -301,12 +306,6 @@ System Invariants:
301
306
  - Technical Reason: [Technical necessity to implement after A]
302
307
  - Prerequisites: [Required pre-implementations]
303
308
 
304
- ### Integration Points
305
-
306
- **Integration Point 1: [Name]**
307
- - Components: [Component A] to [Component B]
308
- - Contract: [Interface/API contract between components]
309
-
310
309
  ### Migration Strategy
311
310
 
312
311
  [Technical migration approach, ensuring backward compatibility]
@@ -323,7 +322,9 @@ Mark items as N/A with brief rationale when the feature has no relevant trust bo
323
322
 
324
323
  ## Future Extensibility
325
324
 
326
- [Considerations for future feature additions or changes]
325
+ - **Extension points**: [Interfaces, hooks, or plugin mechanisms designed for future use]
326
+ - **Known future requirements**: [Planned features that influenced current design decisions]
327
+ - **Intentional limitations**: [What was deliberately kept simple and why]
327
328
 
328
329
  ## Alternative Solutions
329
330
 
@@ -64,7 +64,7 @@ All tests MUST be:
64
64
 
65
65
  - **Independent**: No dependencies between tests
66
66
  - **Reproducible**: Same input always produces same output
67
- - **Fast**: Complete test suite runs in reasonable time
67
+ - **Fast**: Complete the full test suite within the project's accepted feedback window and flag suites that materially slow local iteration or CI
68
68
  - **Self-checking**: Clear pass/fail without manual verification
69
69
  - **Timely**: Written close to the code they test
70
70
 
@@ -162,7 +162,7 @@ Test names should clearly describe:
162
162
 
163
163
  - Use setup hooks to prepare test environment
164
164
  - Use teardown hooks to clean up resources
165
- - Keep setup minimal and focused
165
+ - Keep setup scoped to the data, dependencies, and fixtures required for the behavior under test
166
166
  - Ensure teardown runs even if test fails
167
167
 
168
168
  ## Mocking and Test Doubles
@@ -177,7 +177,7 @@ Test names should clearly describe:
177
177
  ### Mocking Principles [MANDATORY]
178
178
 
179
179
  - Mock at boundaries, not internally — use real implementations for internal utilities
180
- - Keep mocks simple and focused
180
+ - Keep each mock limited to the behavior the test needs to control or observe
181
181
  - Verify mock expectations when relevant
182
182
  - Use adapters for external libraries/frameworks you do not control
183
183
 
@@ -345,7 +345,7 @@ Eliminate tests that fail intermittently:
345
345
  - Add test for every bug fix
346
346
  - Maintain comprehensive test suite
347
347
  - Run full suite regularly
348
- - Don't delete tests without good reason
348
+ - Delete a test only when the covered behavior no longer exists or the same behavior is covered by a stronger test at the correct level
349
349
 
350
350
  ### Legacy Code
351
351
 
@@ -242,7 +242,8 @@ These annotations are used when planning and prioritizing test implementation.
242
242
  ## Constraints and Quality Standards
243
243
 
244
244
  **Mandatory Compliance**:
245
- - Output only test skeletons (prohibit implementation code, assertions, mocks)
245
+ - Output test skeletons only: verification points, expected results, and pass criteria
246
+ - Downstream consumers treat these skeletons as design artifacts rather than runnable tests
246
247
  - Clearly state verification points, expected results, and pass criteria for each test
247
248
  - Preserve original AC statements in comments (ensure traceability)
248
249
  - Stay within test budget; report if budget insufficient for critical tests
@@ -273,7 +274,7 @@ These annotations are used when planning and prioritizing test implementation.
273
274
  - Framework/Language: Auto-detect from existing test files
274
275
  - Placement: Identify test directory with project-specific patterns
275
276
  - Naming: Follow existing file naming conventions
276
- - Output: Test skeleton only (exclude implementation code)
277
+ - Output: Test skeletons only (follow Constraints and Quality Standards for the boundary)
277
278
 
278
279
  **File Operations**:
279
280
  - Existing files: Append to end, prevent duplication (check existing tests)
@@ -55,7 +55,7 @@ Scale determination and required document details follow the principles in docum
55
55
  - **Medium**: 3-5 files, spanning multiple components
56
56
  - **Large**: 6+ files, architecture-level changes
57
57
 
58
- ADR conditions (contract system changes, data flow changes, architecture changes, external dependency changes) require ADR regardless of scale
58
+ Note: ADR conditions (contract system changes, data flow changes, architecture changes, external dependency changes) require ADR regardless of scale
59
59
 
60
60
  ### Important: Clear Determination Expressions
61
61
  MUST use the following expressions to show clear determinations:
@@ -162,7 +162,7 @@ Return the JSON result as the final response. See Output Format for the schema.
162
162
  - [ ] Do I understand the user's true purpose?
163
163
  - [ ] Have I properly estimated the impact scope?
164
164
  - [ ] Have I correctly determined ADR necessity?
165
- - [ ] Have I not overlooked technical risks?
165
+ - [ ] Have I identified all technical risks and dependencies?
166
166
  - [ ] Have I listed scopeDependencies for uncertain scale?
167
167
  - [ ] Final response is the JSON output
168
168
 
@@ -162,7 +162,7 @@ Select and execute files with pattern `docs/plans/tasks/*-task-*.md` that have u
162
162
  **Unavailable**: Escalate with `status: "escalation_needed"`, `reason: "test_environment_not_ready"`
163
163
 
164
164
  #### Pre-implementation Verification (Pattern 5 Compliant)
165
- 1. **Read relevant Design Doc sections** and understand accurately
165
+ 1. **Read relevant Design Doc sections** and extract interface contracts, data structures, dependency constraints, and verification expectations
166
166
  2. **Investigate existing implementations**: Search for similar functions in same domain/responsibility
167
167
  3. **Cross-check against Investigation Notes**: Ensure planned implementation is consistent with the observations recorded in the task file
168
168
  4. **Execute determination**: Determine continue/escalation per "Mandatory Judgment Criteria" above
@@ -80,7 +80,7 @@ Must be performed before Design Doc creation:
80
80
  - Search existing code for keywords related to planned component
81
81
  - Look for components with same domain, responsibilities, or UI patterns
82
82
  - Decision and action:
83
- - Similar component found → Use that component (do not create new component)
83
+ - Similar component found → Reuse, compose, or extend that component path and document the reuse decision
84
84
  - Similar component is technical debt → Create ADR improvement proposal before implementation
85
85
  - No similar component → Proceed with new implementation
86
86
 
@@ -97,7 +97,7 @@ Must be performed before Design Doc creation:
97
97
  - Search existing code for keywords related to planned functionality
98
98
  - Look for implementations with same domain, responsibilities, or configuration patterns
99
99
  - Decision and action:
100
- - Similar functionality found → Use that implementation (do not create new implementation)
100
+ - Similar functionality found → Reuse or extend that implementation path and document the reuse decision
101
101
  - Similar functionality is technical debt → Create ADR improvement proposal before implementation
102
102
  - No similar functionality → Proceed with new implementation
103
103
 
@@ -111,7 +111,7 @@ Execute file output immediately. Final approval is managed by the orchestrator r
111
111
  1. **Executable Granularity**: Each task as logical 1-commit unit, clear completion criteria, explicit dependencies
112
112
  2. **Built-in Quality**: Simultaneous test implementation, quality checks in each phase
113
113
  3. **Risk Management**: List risks and countermeasures in advance, define detection methods
114
- 4. **Ensure Flexibility**: Prioritize essential purpose, avoid excessive detail
114
+ 4. **Ensure Flexibility**: Prioritize essential purpose and include only details required for task execution, verification, and dependency management
115
115
  5. **Design Doc Compliance**: All task completion criteria derived from Design Doc specifications
116
116
  6. **Implementation Pattern Consistency**: When including implementation samples, MUST ensure strict compliance with Design Doc implementation approach
117
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflows",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
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",