codex-workflows 0.2.1 → 0.2.3
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.
- package/.agents/skills/recipe-add-integration-tests/SKILL.md +2 -2
- package/.agents/skills/recipe-build/SKILL.md +1 -1
- package/.agents/skills/recipe-diagnose/SKILL.md +20 -4
- package/.agents/skills/recipe-front-build/SKILL.md +2 -2
- package/.agents/skills/recipe-fullstack-build/SKILL.md +1 -1
- package/.agents/skills/recipe-fullstack-implement/SKILL.md +1 -1
- package/.agents/skills/recipe-implement/SKILL.md +1 -1
- package/.agents/skills/recipe-reverse-engineer/SKILL.md +56 -12
- package/.agents/skills/recipe-update-doc/SKILL.md +10 -5
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +3 -3
- package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +2 -2
- package/.codex/agents/code-reviewer.toml +11 -1
- package/.codex/agents/code-verifier.toml +58 -21
- package/.codex/agents/document-reviewer.toml +4 -2
- package/.codex/agents/integration-test-reviewer.toml +4 -0
- package/.codex/agents/investigator.toml +20 -17
- package/.codex/agents/prd-creator.toml +39 -24
- package/.codex/agents/quality-fixer-frontend.toml +15 -7
- package/.codex/agents/quality-fixer.toml +15 -7
- package/.codex/agents/requirement-analyzer.toml +4 -0
- package/.codex/agents/rule-advisor.toml +9 -0
- package/.codex/agents/scope-discoverer.toml +67 -29
- package/.codex/agents/security-reviewer.toml +4 -0
- package/.codex/agents/solver.toml +6 -2
- package/.codex/agents/task-executor-frontend.toml +9 -0
- package/.codex/agents/task-executor.toml +9 -0
- package/.codex/agents/technical-designer-frontend.toml +68 -115
- package/.codex/agents/technical-designer.toml +70 -114
- package/.codex/agents/verifier.toml +11 -13
- package/README.md +2 -2
- package/package.json +1 -1
|
@@ -89,28 +89,24 @@ Must be performed before Design Doc creation:
|
|
|
89
89
|
- Clearly document similar component search results (found components or "none")
|
|
90
90
|
- Record adopted decision (use existing/improvement proposal/new implementation) and rationale
|
|
91
91
|
|
|
92
|
-
### Integration
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
3. **Reflection in Design Doc**
|
|
111
|
-
- Create "## Integration Point Map" section
|
|
112
|
-
- Clarify responsibilities and boundaries at each integration point
|
|
113
|
-
- Define error behavior and loading states at design phase
|
|
92
|
+
### Integration Points【Important】
|
|
93
|
+
Document all integration points with existing components in a "## Integration Point Map" section.
|
|
94
|
+
|
|
95
|
+
For each integration point, record:
|
|
96
|
+
- Existing component or hook
|
|
97
|
+
- Integration method
|
|
98
|
+
- Impact level
|
|
99
|
+
- Required test coverage
|
|
100
|
+
|
|
101
|
+
Impact level criteria:
|
|
102
|
+
- High: modifies or extends existing state flow or interaction flow
|
|
103
|
+
- Medium: reuses or updates existing props, context, or API contracts
|
|
104
|
+
- Low: read-only rendering, observation, or non-invasive composition
|
|
105
|
+
|
|
106
|
+
For each integration boundary, define:
|
|
107
|
+
- Input props or consumed context
|
|
108
|
+
- Output events or effects
|
|
109
|
+
- On Error behavior
|
|
114
110
|
|
|
115
111
|
### Agreement Checklist【Most Important】
|
|
116
112
|
Must be performed at the beginning of Design Doc creation:
|
|
@@ -173,32 +169,13 @@ Perform before Design Doc creation:
|
|
|
173
169
|
|
|
174
170
|
Common ADR needed when: Technical decisions common to multiple components
|
|
175
171
|
|
|
176
|
-
### Integration Point Specification
|
|
177
|
-
Document integration points with existing components (location, old Props, new Props, switching method).
|
|
178
|
-
|
|
179
172
|
### Data Contracts
|
|
180
173
|
Define Props types and state management contracts between components (types, preconditions, guarantees, error behavior).
|
|
181
174
|
|
|
182
175
|
### State Transitions (When Applicable)
|
|
183
176
|
Document state definitions and transitions for stateful components (loading, error, success states).
|
|
184
177
|
|
|
185
|
-
|
|
186
|
-
Define Props types, event handlers, and error handling at component boundaries.
|
|
187
|
-
|
|
188
|
-
```yaml
|
|
189
|
-
Boundary Name: [Component Integration Point]
|
|
190
|
-
Input (Props): [Props type definition]
|
|
191
|
-
Output (Events): [Event handler signatures]
|
|
192
|
-
On Error: [How to handle errors (Error Boundary, error state, etc.)]
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**Integration Boundaries:**
|
|
196
|
-
- React → DOM: Component rendering to browser DOM
|
|
197
|
-
- Build Tool → Browser: Build output to static files served by browser
|
|
198
|
-
- API → Frontend: External API responses handled by frontend
|
|
199
|
-
- Context → Component: Context values consumed by components
|
|
200
|
-
|
|
201
|
-
Confirm and document conflicts with existing components (naming conventions, Props patterns, etc.) to prevent integration inconsistencies.
|
|
178
|
+
Confirm and document conflicts with existing components at each integration point to prevent inconsistencies.
|
|
202
179
|
|
|
203
180
|
## UI Spec Integration
|
|
204
181
|
|
|
@@ -215,6 +192,7 @@ When a UI Spec exists for the feature (`docs/ui-spec/{feature-name}-ui-spec.md`)
|
|
|
215
192
|
- **Operation Mode**:
|
|
216
193
|
- `create`: New creation (default)
|
|
217
194
|
- `update`: Update existing document
|
|
195
|
+
- `reverse-engineer`: Document existing frontend architecture as-is
|
|
218
196
|
|
|
219
197
|
- **Requirements Analysis Results**: Requirements analysis results (scale determination, technical requirements, etc.)
|
|
220
198
|
- **PRD**: PRD document (if exists)
|
|
@@ -234,41 +212,15 @@ When a UI Spec exists for the feature (`docs/ui-spec/{feature-name}-ui-spec.md`)
|
|
|
234
212
|
- Reason for changes
|
|
235
213
|
- Sections needing updates
|
|
236
214
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
```markdown
|
|
243
|
-
# ADR-XXXX: [Title]
|
|
244
|
-
Status: Proposed
|
|
245
|
-
|
|
246
|
-
## Background
|
|
247
|
-
[Frontend technical challenges and constraints in 1-2 sentences]
|
|
215
|
+
- **Reverse-Engineer Context** (reverse-engineer mode only):
|
|
216
|
+
- Primary Files
|
|
217
|
+
- Public Interfaces
|
|
218
|
+
- Dependencies
|
|
219
|
+
- Unit Inventory (routes, test files, public exports)
|
|
248
220
|
|
|
249
|
-
##
|
|
250
|
-
### Option A: [Approach Name]
|
|
251
|
-
- Overview: [Explain in one sentence]
|
|
252
|
-
- Benefits: [2-3 items]
|
|
253
|
-
- Drawbacks: [2-3 items]
|
|
254
|
-
- Effort: X days
|
|
255
|
-
|
|
256
|
-
### Option B/C: [Document similarly]
|
|
257
|
-
|
|
258
|
-
## Comparison
|
|
259
|
-
| Evaluation Axis | Option A | Option B | Option C |
|
|
260
|
-
|-----------------|----------|----------|----------|
|
|
261
|
-
| Implementation Effort | 3 days | 5 days | 2 days |
|
|
262
|
-
| Maintainability | High | Medium | Low |
|
|
263
|
-
| Performance Impact | Low | High | Medium |
|
|
264
|
-
|
|
265
|
-
## Decision
|
|
266
|
-
Option [X] selected. Reason: [2-3 sentences including trade-offs]
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
See ADR template in documentation-criteria skill for details.
|
|
221
|
+
## Document Output Format
|
|
270
222
|
|
|
271
|
-
###
|
|
223
|
+
### Document Creation
|
|
272
224
|
- **ADR**: `docs/adr/ADR-[4-digit number]-[title].md` (e.g., ADR-0001)
|
|
273
225
|
- **Design Doc**: `docs/design/[feature-name]-design.md`
|
|
274
226
|
- Follow respective templates (see documentation-criteria skill: design-template.md, adr-template.md, ui-spec-template.md)
|
|
@@ -376,21 +328,30 @@ function useUserData(userId: string) {
|
|
|
376
328
|
- [ ] Comparison matrix completeness (including performance impact)
|
|
377
329
|
|
|
378
330
|
### Design Doc Checklist
|
|
331
|
+
**All modes**:
|
|
332
|
+
- [ ] **Code inspection evidence recorded** (required)
|
|
333
|
+
- [ ] **Integration points enumerated with contracts** (required)
|
|
334
|
+
- [ ] **Props and state contracts clarified** (required)
|
|
335
|
+
- [ ] Component hierarchy and data flow clearly expressed in diagrams
|
|
336
|
+
|
|
337
|
+
**Create/update mode only**:
|
|
379
338
|
- [ ] **Agreement checklist completed** (most important)
|
|
380
339
|
- [ ] **Prerequisite common ADRs referenced** (required)
|
|
381
340
|
- [ ] **Change impact map created** (required)
|
|
382
|
-
- [ ] **Integration boundary contracts defined** (required)
|
|
383
|
-
- [ ] **Integration points completely enumerated** (required)
|
|
384
|
-
- [ ] **Props type contracts clarified** (required)
|
|
385
341
|
- [ ] **Component verification procedures for each phase** (required)
|
|
386
342
|
- [ ] Response to requirements and design validity
|
|
387
343
|
- [ ] Test strategy (React Testing Library) and error handling (Error Boundary)
|
|
388
|
-
- [ ] Component hierarchy and data flow clearly expressed in diagrams
|
|
389
344
|
- [ ] Props change matrix completeness
|
|
390
345
|
- [ ] Implementation approach selection rationale (vertical/horizontal/hybrid)
|
|
391
346
|
- [ ] Latest React best practices researched and references cited
|
|
392
347
|
- [ ] **Complexity assessment**: complexity_level set; if medium/high, complexity_rationale specifies (1) requirements/ACs, (2) constraints/risks
|
|
393
348
|
|
|
349
|
+
**Reverse-engineer mode only**:
|
|
350
|
+
- [ ] Every architectural claim cites file:line evidence
|
|
351
|
+
- [ ] Identifiers are transcribed exactly from code
|
|
352
|
+
- [ ] Test existence is confirmed by enumeration
|
|
353
|
+
- [ ] All provided Unit Inventory items are accounted for
|
|
354
|
+
|
|
394
355
|
## Acceptance Criteria Creation Guidelines
|
|
395
356
|
|
|
396
357
|
**Principle**: Set specific, verifiable conditions in browser environment. Avoid ambiguous expressions, document in format convertible to React Testing Library test cases.
|
|
@@ -419,49 +380,41 @@ function useUserData(userId: string) {
|
|
|
419
380
|
|
|
420
381
|
**Principle**: AC = User-observable behavior in browser verifiable in isolated CI environment
|
|
421
382
|
|
|
422
|
-
## Latest Information Research
|
|
423
|
-
|
|
424
|
-
### Research Timing
|
|
425
|
-
1. **Mandatory Research**:
|
|
426
|
-
- When considering new React library/UI framework introduction
|
|
427
|
-
- When designing performance optimization (code splitting, lazy loading)
|
|
428
|
-
- When designing accessibility implementation (WCAG compliance)
|
|
429
|
-
- When React major version upgrades (e.g., React 18 → 19)
|
|
430
|
-
|
|
431
|
-
2. **Recommended Research**:
|
|
432
|
-
- Before implementing complex custom hooks
|
|
433
|
-
- When considering improvements to existing component patterns
|
|
383
|
+
## Latest Information Research
|
|
434
384
|
|
|
435
|
-
|
|
385
|
+
Use current-year queries and cite sources in a `## References` section for create/update mode.
|
|
436
386
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
**Specific Search Pattern Examples**:
|
|
440
|
-
- `React new features best practices 2025` (new feature research)
|
|
441
|
-
- `Zustand vs Redux Toolkit comparison 2025` (state management selection)
|
|
442
|
-
- `React Server Components patterns` (design patterns)
|
|
443
|
-
- `React breaking changes migration guide` (version upgrade)
|
|
444
|
-
- `Tailwind CSS accessibility best practices` (accessibility research)
|
|
445
|
-
- `[library name] official documentation` (official information)
|
|
446
|
-
|
|
447
|
-
**Citation**: Add "## References" section at end of ADR/Design Doc with URLs and descriptions
|
|
448
|
-
|
|
449
|
-
### Citation Format
|
|
450
|
-
|
|
451
|
-
Add at the end of ADR/Design Doc in the following format:
|
|
452
|
-
|
|
453
|
-
```markdown
|
|
454
|
-
## References
|
|
455
|
-
|
|
456
|
-
- [Title](URL) - Brief description of referenced content
|
|
457
|
-
- [React Official Documentation](URL) - Related design principles and features
|
|
458
|
-
- [Frontend Blog Article](URL) - Implementation patterns and best practices
|
|
459
|
-
```
|
|
387
|
+
Reverse-engineer mode skips latest-information research because it documents the existing frontend.
|
|
460
388
|
|
|
461
389
|
## Update Mode Operation
|
|
462
390
|
- **ADR**: Update existing file for minor changes, create new file for major changes
|
|
463
391
|
- **Design Doc**: Add revision section and record change history
|
|
464
392
|
|
|
393
|
+
## Reverse-Engineer Mode (As-Is Documentation)
|
|
394
|
+
|
|
395
|
+
Use this mode when documenting existing frontend architecture rather than proposing changes.
|
|
396
|
+
|
|
397
|
+
What to skip:
|
|
398
|
+
- ADR creation
|
|
399
|
+
- Option comparison
|
|
400
|
+
- Change Impact Map
|
|
401
|
+
- Implementation Approach Decision
|
|
402
|
+
- Latest Information Research
|
|
403
|
+
|
|
404
|
+
Execution steps:
|
|
405
|
+
1. Enumerate public components, hooks, routes, and other entry points from Primary Files and Unit Inventory. Record each with file:line evidence
|
|
406
|
+
2. Trace actual props flow, state flow, context usage, and API interaction paths through directly connected code. Record observed behavior with file:line evidence
|
|
407
|
+
3. Record contracts exactly as implemented:
|
|
408
|
+
- props and consumed context
|
|
409
|
+
- emitted events and side effects
|
|
410
|
+
- rendered states, loading states, and error states
|
|
411
|
+
4. Read types, defaults, variants, constants, and enums referenced by the traced flow. Record names and values exactly as written in code
|
|
412
|
+
5. Enumerate tests for the unit and map each test file to the components, hooks, or flows it covers. Record uncovered Unit Inventory items explicitly
|
|
413
|
+
|
|
414
|
+
Completion rule for reverse-engineer mode:
|
|
415
|
+
- Every Unit Inventory route or public export is accounted for in the Design Doc
|
|
416
|
+
- Every claim about component structure, props flow, state flow, API interaction, or error handling cites file:line evidence
|
|
417
|
+
|
|
465
418
|
## Completion Gate [BLOCKING]
|
|
466
419
|
|
|
467
420
|
☐ All completion criteria met with evidence
|
|
@@ -123,28 +123,24 @@ When the design introduces or significantly modifies data structures:
|
|
|
123
123
|
- 3+ criteria fail → New structure justified
|
|
124
124
|
- Record decision and rationale in Design Doc
|
|
125
125
|
|
|
126
|
-
### Integration
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
3. **Reflection in Design Doc**
|
|
145
|
-
- Create "## Integration Point Map" section
|
|
146
|
-
- Clarify responsibilities and boundaries at each integration point
|
|
147
|
-
- Define error behavior at design phase
|
|
126
|
+
### Integration Points【Important】
|
|
127
|
+
Document all integration points with existing systems in a "## Integration Point Map" section.
|
|
128
|
+
|
|
129
|
+
For each integration point, record:
|
|
130
|
+
- Existing component and method
|
|
131
|
+
- Integration method
|
|
132
|
+
- Impact level
|
|
133
|
+
- Required test coverage
|
|
134
|
+
|
|
135
|
+
Impact level criteria:
|
|
136
|
+
- High: modifies or extends an existing process flow
|
|
137
|
+
- Medium: reuses or updates existing data or contracts
|
|
138
|
+
- Low: read-only interaction, observation, or non-invasive integration
|
|
139
|
+
|
|
140
|
+
For each integration boundary, define:
|
|
141
|
+
- Input
|
|
142
|
+
- Output
|
|
143
|
+
- On Error
|
|
148
144
|
|
|
149
145
|
### Agreement Checklist【Most Important】
|
|
150
146
|
Must be performed at the beginning of Design Doc creation:
|
|
@@ -213,32 +209,20 @@ Perform before Design Doc creation:
|
|
|
213
209
|
|
|
214
210
|
Common ADR needed when: Technical decisions common to multiple components
|
|
215
211
|
|
|
216
|
-
### Integration Point Specification
|
|
217
|
-
Document integration points with existing system (location, old implementation, new implementation, switching method).
|
|
218
|
-
|
|
219
212
|
### Data Contracts
|
|
220
213
|
Define input/output between components (types, preconditions, guarantees, error behavior).
|
|
221
214
|
|
|
222
215
|
### State Transitions (When Applicable)
|
|
223
216
|
Document state definitions and transitions for stateful components.
|
|
224
217
|
|
|
225
|
-
|
|
226
|
-
Define input/output, sync/async, and error handling at component boundaries in language-agnostic manner.
|
|
227
|
-
|
|
228
|
-
```yaml
|
|
229
|
-
Boundary Name: [Connection Point]
|
|
230
|
-
Input: [What is received]
|
|
231
|
-
Output: [What is returned (specify sync/async)]
|
|
232
|
-
On Error: [How to handle]
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Confirm and document conflicts with existing systems (priority, naming conventions, etc.) to prevent integration inconsistencies.
|
|
218
|
+
Confirm and document conflicts with existing systems at each integration point to prevent inconsistencies.
|
|
236
219
|
|
|
237
220
|
## Required Information
|
|
238
221
|
|
|
239
222
|
- **Operation Mode**:
|
|
240
223
|
- `create`: New creation (default)
|
|
241
224
|
- `update`: Update existing document
|
|
225
|
+
- `reverse-engineer`: Document existing architecture as-is
|
|
242
226
|
|
|
243
227
|
- **Requirements Analysis Results**: Requirements analysis results (scale determination, technical requirements, etc.)
|
|
244
228
|
- **PRD**: PRD document (if exists)
|
|
@@ -257,40 +241,15 @@ Confirm and document conflicts with existing systems (priority, naming conventio
|
|
|
257
241
|
- Reason for changes
|
|
258
242
|
- Sections needing updates
|
|
259
243
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
244
|
+
- **Reverse-Engineer Context** (reverse-engineer mode only):
|
|
245
|
+
- Primary Files
|
|
246
|
+
- Public Interfaces
|
|
247
|
+
- Dependencies
|
|
248
|
+
- Unit Inventory (routes, test files, public exports)
|
|
263
249
|
|
|
264
|
-
|
|
265
|
-
```markdown
|
|
266
|
-
# ADR-XXXX: [Title]
|
|
267
|
-
Status: Proposed
|
|
268
|
-
|
|
269
|
-
## Background
|
|
270
|
-
[Technical challenges and constraints in 1-2 sentences]
|
|
271
|
-
|
|
272
|
-
## Options
|
|
273
|
-
### Option A: [Approach Name]
|
|
274
|
-
- Overview: [Explain in one sentence]
|
|
275
|
-
- Benefits: [2-3 items]
|
|
276
|
-
- Drawbacks: [2-3 items]
|
|
277
|
-
- Effort: X days
|
|
278
|
-
|
|
279
|
-
### Option B/C: [Document similarly]
|
|
280
|
-
|
|
281
|
-
## Comparison
|
|
282
|
-
| Evaluation Axis | Option A | Option B | Option C |
|
|
283
|
-
|-----------------|----------|----------|----------|
|
|
284
|
-
| Implementation Effort | 3 days | 5 days | 2 days |
|
|
285
|
-
| Maintainability | High | Medium | Low |
|
|
286
|
-
|
|
287
|
-
## Decision
|
|
288
|
-
Option [X] selected. Reason: [2-3 sentences including trade-offs]
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
See ADR template in documentation-criteria skill for details.
|
|
250
|
+
## Document Output Format
|
|
292
251
|
|
|
293
|
-
###
|
|
252
|
+
### Document Creation
|
|
294
253
|
- **ADR**: `docs/adr/ADR-[4-digit number]-[title].md` (e.g., ADR-0001)
|
|
295
254
|
- **Design Doc**: `docs/design/[feature-name]-design.md`
|
|
296
255
|
- Follow respective templates (`template.md`)
|
|
@@ -344,25 +303,33 @@ Implementation sample creation checklist:
|
|
|
344
303
|
- [ ] Comparison matrix completeness
|
|
345
304
|
|
|
346
305
|
### Design Doc Checklist
|
|
306
|
+
**All modes**:
|
|
307
|
+
- [ ] **Standards identification gate completed** (required)
|
|
308
|
+
- [ ] **Code inspection evidence recorded** (required)
|
|
309
|
+
- [ ] **Integration points enumerated with contracts** (required)
|
|
310
|
+
- [ ] **Data contracts clarified** (required)
|
|
311
|
+
- [ ] Architecture and data flow clearly expressed in diagrams
|
|
312
|
+
|
|
313
|
+
**Create/update mode only**:
|
|
347
314
|
- [ ] **Agreement checklist completed** (most important)
|
|
348
315
|
- [ ] **Prerequisite common ADRs referenced** (required)
|
|
349
316
|
- [ ] **Change impact map created** (required)
|
|
350
|
-
- [ ] **Integration boundary contracts defined** (required)
|
|
351
|
-
- [ ] **Integration points completely enumerated** (required)
|
|
352
|
-
- [ ] **Data contracts clarified** (required)
|
|
353
317
|
- [ ] **E2E verification procedures for each phase** (required)
|
|
354
318
|
- [ ] Response to requirements and design validity
|
|
355
319
|
- [ ] Test strategy and error handling
|
|
356
|
-
- [ ] Architecture and data flow clearly expressed in diagrams
|
|
357
320
|
- [ ] Interface change matrix completeness
|
|
358
321
|
- [ ] Implementation approach selection rationale (vertical/horizontal/hybrid)
|
|
359
322
|
- [ ] Latest best practices researched and references cited
|
|
360
323
|
- [ ] **Complexity assessment**: complexity_level set; if medium/high, complexity_rationale specifies (1) requirements/ACs, (2) constraints/risks
|
|
361
|
-
- [ ] **Standards identification gate completed** (required)
|
|
362
|
-
- [ ] **Code inspection evidence recorded** (required)
|
|
363
324
|
- [ ] **Data representation decision documented** (when new structures introduced)
|
|
364
325
|
- [ ] **Field propagation map included** (when fields cross boundaries)
|
|
365
326
|
|
|
327
|
+
**Reverse-engineer mode only**:
|
|
328
|
+
- [ ] Every architectural claim cites file:line evidence
|
|
329
|
+
- [ ] Identifiers are transcribed exactly from code
|
|
330
|
+
- [ ] Test existence is confirmed by enumeration
|
|
331
|
+
- [ ] All provided Unit Inventory items are accounted for
|
|
332
|
+
|
|
366
333
|
|
|
367
334
|
## Acceptance Criteria Creation Guidelines
|
|
368
335
|
|
|
@@ -397,53 +364,42 @@ Implementation sample creation checklist:
|
|
|
397
364
|
|
|
398
365
|
*Note: Non-functional requirements (performance, reliability, etc.) are defined in the "Non-functional Requirements" section and automatically verified by quality check tools
|
|
399
366
|
|
|
400
|
-
## Latest Information Research
|
|
401
|
-
|
|
402
|
-
### Research Timing
|
|
403
|
-
1. **Mandatory Research**:
|
|
404
|
-
- When considering new technology/library introduction
|
|
405
|
-
- When designing performance optimization
|
|
406
|
-
- When designing security-related implementation
|
|
407
|
-
- When major version upgrades of existing technology
|
|
408
|
-
|
|
409
|
-
2. **Recommended Research**:
|
|
410
|
-
- Before implementing complex algorithms
|
|
411
|
-
- When considering improvements to existing patterns
|
|
367
|
+
## Latest Information Research
|
|
412
368
|
|
|
413
|
-
|
|
369
|
+
Use current-year queries and cite sources in a `## References` section for create/update mode.
|
|
414
370
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
**Specific Search Pattern Examples**:
|
|
418
|
-
To get latest information, always check current year before searching:
|
|
419
|
-
```bash
|
|
420
|
-
date +%Y # e.g., 2025
|
|
421
|
-
```
|
|
422
|
-
Include this year in search queries:
|
|
423
|
-
- `[technology] [feature] best practices {current_year}` (new feature research)
|
|
424
|
-
- `[tech A] vs [tech B] performance comparison {current_year}` (technology selection)
|
|
425
|
-
- `[architecture pattern] [concern] patterns` (design patterns)
|
|
426
|
-
- `[framework] v[X] breaking changes migration guide` (version upgrade)
|
|
427
|
-
- `[framework name] official documentation` (official docs don't need year)
|
|
428
|
-
|
|
429
|
-
**Citation**: Add "## References" section at end of ADR/Design Doc with URLs and descriptions
|
|
430
|
-
|
|
431
|
-
### Citation Format
|
|
432
|
-
|
|
433
|
-
Add at the end of ADR/Design Doc in the following format:
|
|
434
|
-
|
|
435
|
-
```markdown
|
|
436
|
-
## References
|
|
437
|
-
|
|
438
|
-
- [Title](URL) - Brief description of referenced content
|
|
439
|
-
- [Framework Official Documentation](URL) - Related design principles and features
|
|
440
|
-
- [Technical Blog Article](URL) - Implementation patterns and best practices
|
|
441
|
-
```
|
|
371
|
+
Reverse-engineer mode skips latest-information research because it documents what exists.
|
|
442
372
|
|
|
443
373
|
## Update Mode Operation
|
|
444
374
|
- **ADR**: Update existing file for minor changes, create new file for major changes
|
|
445
375
|
- **Design Doc**: Add revision section and record change history
|
|
446
376
|
|
|
377
|
+
## Reverse-Engineer Mode (As-Is Documentation)
|
|
378
|
+
|
|
379
|
+
Use this mode when documenting existing architecture rather than proposing changes.
|
|
380
|
+
|
|
381
|
+
What to skip:
|
|
382
|
+
- ADR creation
|
|
383
|
+
- Option comparison
|
|
384
|
+
- Change Impact Map
|
|
385
|
+
- Field Propagation Map
|
|
386
|
+
- Implementation Approach Decision
|
|
387
|
+
- Latest Information Research
|
|
388
|
+
|
|
389
|
+
Execution steps:
|
|
390
|
+
1. Enumerate entry points from Primary Files and Unit Inventory. Record each public handler, command, or exported interface with file:line evidence
|
|
391
|
+
2. Trace each entry point through directly called services, helpers, and data-access code. Record actual data flow and error handling with file:line evidence
|
|
392
|
+
3. Record contracts exactly as implemented:
|
|
393
|
+
- inputs and parameters
|
|
394
|
+
- outputs and response shapes
|
|
395
|
+
- middleware, guards, and integration boundaries
|
|
396
|
+
4. Read schemas, types, defaults, constants, and enums referenced by the traced flow. Record names and values exactly as written in code
|
|
397
|
+
5. Enumerate tests for the unit and map each test file to the interfaces or flows it covers. Record uncovered Unit Inventory items explicitly
|
|
398
|
+
|
|
399
|
+
Completion rule for reverse-engineer mode:
|
|
400
|
+
- Every Unit Inventory route or public export is accounted for in the Design Doc
|
|
401
|
+
- Every claim about architecture, data flow, public contracts, integrations, or error handling cites file:line evidence
|
|
402
|
+
|
|
447
403
|
## Completion Gate [BLOCKING]
|
|
448
404
|
|
|
449
405
|
☐ All completion criteria met with evidence
|
|
@@ -46,13 +46,6 @@ Skill Status:
|
|
|
46
46
|
This agent outputs **investigation result verification and conclusion derivation only**.
|
|
47
47
|
Solution derivation is out of scope for this agent.
|
|
48
48
|
|
|
49
|
-
## Core Responsibilities
|
|
50
|
-
|
|
51
|
-
1. **Triangulation Supplementation** - Explore information sources not covered in the investigation to supplement results
|
|
52
|
-
2. **ACH (Analysis of Competing Hypotheses)** - Generate alternative hypotheses beyond those listed in the investigation and evaluate consistency with evidence
|
|
53
|
-
3. **Devil's Advocate** - Assume "the investigation results are wrong" and actively seek refutation
|
|
54
|
-
4. **Conclusion Derivation** - Adopt unrefuted hypotheses as causes and determine relationship when multiple
|
|
55
|
-
|
|
56
49
|
## Execution Steps
|
|
57
50
|
|
|
58
51
|
### Step 1: Investigation Results Verification Preparation
|
|
@@ -71,11 +64,11 @@ Solution derivation is out of scope for this agent.
|
|
|
71
64
|
- Verify logical validity of impactAnalysis (without additional searches)
|
|
72
65
|
|
|
73
66
|
### Step 2: Triangulation Supplementation
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
Identify which source types are missing from `investigationSources`, then investigate at least one uncovered source type.
|
|
68
|
+
|
|
69
|
+
If all source types were already covered, investigate a different code area or configuration path than the original investigation.
|
|
70
|
+
|
|
71
|
+
Record each supplementary finding and its impact on the existing hypotheses.
|
|
79
72
|
|
|
80
73
|
### Step 3: External Information Reinforcement (web search)
|
|
81
74
|
- Official information about hypotheses found in investigation
|
|
@@ -116,7 +109,11 @@ Classify each hypothesis by the following levels:
|
|
|
116
109
|
- Example: "The implementation is wrong" → Was design_gap considered?
|
|
117
110
|
- If inconsistent, explicitly note "Investigation focus may be misaligned with user report"
|
|
118
111
|
|
|
119
|
-
**Conclusion**: Adopt unrefuted hypotheses as causes. When multiple causes exist, determine their relationship (independent/dependent/exclusive)
|
|
112
|
+
**Conclusion**: Adopt unrefuted hypotheses as causes. When multiple causes exist, determine their relationship (independent/dependent/exclusive)
|
|
113
|
+
|
|
114
|
+
### Step 7: Return JSON Result
|
|
115
|
+
|
|
116
|
+
Return the JSON result as the final response. See Output Format for the schema.
|
|
120
117
|
|
|
121
118
|
## Confidence Determination Criteria
|
|
122
119
|
|
|
@@ -205,6 +202,7 @@ Classify each hypothesis by the following levels:
|
|
|
205
202
|
- [ ] Verified consistency with user report
|
|
206
203
|
- [ ] Determined verification level for each hypothesis
|
|
207
204
|
- [ ] Adopted unrefuted hypotheses as causes and determined relationship when multiple
|
|
205
|
+
- [ ] Final response is the JSON output
|
|
208
206
|
|
|
209
207
|
## Output Self-Check
|
|
210
208
|
- [ ] Confidence levels reflect all discovered evidence, including official documentation
|
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ Problem → investigator → verifier (ACH + Devil's Advocate) → solver → Ac
|
|
|
88
88
|
### Reverse Engineering
|
|
89
89
|
|
|
90
90
|
```
|
|
91
|
-
Existing code → scope-discoverer → prd-creator → code-verifier → document-reviewer → Design Docs
|
|
91
|
+
Existing code → scope-discoverer (discoveredUnits + prdUnits) → prd-creator → code-verifier → document-reviewer → Design Docs
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
---
|
|
@@ -246,7 +246,7 @@ Codex spawns these as needed during recipe execution. Each agent runs in its own
|
|
|
246
246
|
| `code-verifier` | Document-code consistency verification |
|
|
247
247
|
| `security-reviewer` | Security compliance review after implementation |
|
|
248
248
|
| `rule-advisor` | Skill selection via metacognitive analysis |
|
|
249
|
-
| `scope-discoverer` | Codebase scope discovery for reverse docs |
|
|
249
|
+
| `scope-discoverer` | Codebase scope discovery for reverse docs, including PRD unit grouping |
|
|
250
250
|
|
|
251
251
|
### Diagnosis Agents
|
|
252
252
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-workflows",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
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",
|