codex-workflows 0.6.7 → 0.6.9
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/ai-development-guide/SKILL.md +5 -3
- package/.agents/skills/ai-development-guide/references/frontend.md +11 -19
- package/.agents/skills/coding-rules/references/typescript.md +17 -12
- package/.agents/skills/documentation-criteria/references/plan-template.md +1 -1
- package/.agents/skills/documentation-criteria/references/task-template.md +8 -0
- package/.agents/skills/integration-e2e-testing/SKILL.md +1 -1
- package/.agents/skills/recipe-build/SKILL.md +10 -3
- package/.agents/skills/recipe-front-build/SKILL.md +10 -3
- package/.agents/skills/recipe-fullstack-build/SKILL.md +10 -3
- package/.agents/skills/recipe-fullstack-implement/SKILL.md +1 -1
- package/.agents/skills/recipe-prepare-implementation/SKILL.md +1 -0
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +9 -6
- package/.agents/skills/task-analyzer/references/skills-index.yaml +1 -1
- package/.agents/skills/testing/SKILL.md +5 -5
- package/.agents/skills/testing/references/typescript.md +2 -6
- package/.codex/agents/acceptance-test-generator.toml +61 -96
- package/.codex/agents/code-reviewer.toml +4 -57
- package/.codex/agents/code-verifier.toml +1 -47
- package/.codex/agents/codebase-analyzer.toml +1 -106
- package/.codex/agents/design-sync.toml +2 -64
- package/.codex/agents/document-reviewer.toml +3 -78
- package/.codex/agents/integration-test-reviewer.toml +1 -26
- package/.codex/agents/investigator.toml +1 -73
- package/.codex/agents/quality-fixer-frontend.toml +4 -105
- package/.codex/agents/quality-fixer.toml +4 -122
- package/.codex/agents/requirement-analyzer.toml +1 -29
- package/.codex/agents/rule-advisor.toml +1 -79
- package/.codex/agents/scope-discoverer.toml +1 -70
- package/.codex/agents/security-reviewer.toml +1 -19
- package/.codex/agents/solver.toml +5 -54
- package/.codex/agents/task-decomposer.toml +18 -0
- package/.codex/agents/task-executor-frontend.toml +16 -142
- package/.codex/agents/task-executor.toml +16 -142
- package/.codex/agents/ui-analyzer.toml +1 -157
- package/.codex/agents/verifier.toml +2 -65
- package/package.json +1 -1
|
@@ -156,6 +156,15 @@ When the task file, Dependencies, or Investigation Targets reference `docs/proje
|
|
|
156
156
|
3. **Cross-check against Investigation Notes**: Ensure planned implementation is consistent with the observations recorded in the task file
|
|
157
157
|
4. **Execute determination**: Determine continue/escalation per "Mandatory Judgment Criteria" above
|
|
158
158
|
|
|
159
|
+
#### Adjacent Case Sweep (Required when the task file has a `Change Category` field set to one or more of `bug-fix`, `regression`, `state-change`, `boundary-change`)
|
|
160
|
+
|
|
161
|
+
Run this check after Pre-implementation Verification and before the Binding Decision Check. Treat the task file's field value as authoritative for whether the sweep applies.
|
|
162
|
+
|
|
163
|
+
1. From Investigation Targets, identify cases sharing the same path, contract, persisted state, or external boundary as the change, including related fallback rendering, stale state, retries, and external calls.
|
|
164
|
+
2. Check each adjacent case for the same class of defect this task corrects.
|
|
165
|
+
3. Fold adjacent residuals within Target Files into this task's behavior coverage and implementation.
|
|
166
|
+
4. Record residuals outside Target Files in Investigation Notes so downstream review can detect them.
|
|
167
|
+
|
|
159
168
|
#### Binding Decision Check (Required when the task file has a Binding Decisions section)
|
|
160
169
|
|
|
161
170
|
Run this check after Pre-implementation Verification and before behavior-first implementation when the task file contains a Binding Decisions section with one or more rows.
|
|
@@ -223,29 +232,7 @@ Return one of the following as the final response (see Structured Response Speci
|
|
|
223
232
|
Report in the following JSON format upon task completion (**without executing quality checks or commits**, delegating to quality assurance process):
|
|
224
233
|
|
|
225
234
|
```json
|
|
226
|
-
{
|
|
227
|
-
"status": "completed",
|
|
228
|
-
"taskName": "[Exact name of executed task]",
|
|
229
|
-
"changeSummary": "[Specific summary of React component implementation/changes]",
|
|
230
|
-
"filesModified": ["src/components/Button/Button.tsx", "src/components/Button/index.ts"],
|
|
231
|
-
"testsAdded": ["src/components/Button/Button.test.tsx"],
|
|
232
|
-
"requiresTestReview": false,
|
|
233
|
-
"newTestsPassed": true,
|
|
234
|
-
"progressUpdated": {
|
|
235
|
-
"taskFile": "5/8 items completed",
|
|
236
|
-
"workPlan": "Relevant sections updated",
|
|
237
|
-
"designDoc": "Progress section updated or N/A"
|
|
238
|
-
},
|
|
239
|
-
"runnableCheck": {
|
|
240
|
-
"level": "L1: Unit test (React Testing Library) / L2: Integration test / L3: E2E test",
|
|
241
|
-
"executed": true,
|
|
242
|
-
"command": "test -- Button.test.tsx",
|
|
243
|
-
"result": "passed / failed / skipped",
|
|
244
|
-
"reason": "Test execution reason/verification content"
|
|
245
|
-
},
|
|
246
|
-
"readyForQualityCheck": true,
|
|
247
|
-
"nextActions": "Overall quality verification by quality assurance process"
|
|
248
|
-
}
|
|
235
|
+
{"status":"completed","taskName":"[Exact name of executed task]","changeSummary":"[Specific summary of React component implementation/changes]","filesModified":["src/components/Button/Button.tsx","src/components/Button/index.ts"],"testsAdded":["src/components/Button/Button.test.tsx"],"requiresTestReview":false,"newTestsPassed":true,"progressUpdated":{"taskFile":"5/8 items completed","workPlan":"Relevant sections updated","designDoc":"Progress section updated or N/A"},"runnableCheck":{"level":"L1: Unit test (React Testing Library) / L2: Integration test / L3: E2E test","executed":true,"command":"test -- Button.test.tsx","result":"passed / failed / skipped","reason":"Test execution reason/verification content"},"readyForQualityCheck":true,"nextActions":"Overall quality verification by quality assurance process"}
|
|
249
236
|
```
|
|
250
237
|
|
|
251
238
|
### 2. Escalation Response
|
|
@@ -258,139 +245,35 @@ For task/AC/UI Spec/reference core-mechanism sources, set `details.design_doc_ex
|
|
|
258
245
|
For core-mechanism violations, put the substitute in `details.actual_situation`, the behavior change in `details.why_cannot_implement`, and the unblock condition in `recommendation`.
|
|
259
246
|
|
|
260
247
|
```json
|
|
261
|
-
{
|
|
262
|
-
"status": "escalation_needed",
|
|
263
|
-
"reason": "Design Doc deviation",
|
|
264
|
-
"taskName": "[Task name being executed]",
|
|
265
|
-
"details": {
|
|
266
|
-
"design_doc_expectation": "[Exact quote from relevant Design Doc section]",
|
|
267
|
-
"actual_situation": "[Details of situation actually encountered]",
|
|
268
|
-
"why_cannot_implement": "[Technical reason why cannot implement per Design Doc]",
|
|
269
|
-
"attempted_approaches": ["List of solution methods considered for trial"]
|
|
270
|
-
},
|
|
271
|
-
"escalation_type": "design_compliance_violation",
|
|
272
|
-
"user_decision_required": true,
|
|
273
|
-
"suggested_options": [
|
|
274
|
-
"Modify Design Doc to match reality",
|
|
275
|
-
"Implement missing components first",
|
|
276
|
-
"Reconsider requirements and change implementation approach"
|
|
277
|
-
],
|
|
278
|
-
"recommendation": "[Specific proposal for most appropriate solution direction]"
|
|
279
|
-
}
|
|
248
|
+
{"status":"escalation_needed","reason":"Design Doc deviation","taskName":"[Task name being executed]","details":{"design_doc_expectation":"[Exact quote from relevant Design Doc section]","actual_situation":"[Details of situation actually encountered]","why_cannot_implement":"[Technical reason why cannot implement per Design Doc]","attempted_approaches":["List of solution methods considered for trial"]},"escalation_type":"design_compliance_violation","user_decision_required":true,"suggested_options":["Modify Design Doc to match reality","Implement missing components first","Reconsider requirements and change implementation approach"],"recommendation":"[Specific proposal for most appropriate solution direction]"}
|
|
280
249
|
```
|
|
281
250
|
|
|
282
251
|
#### 2-2. Similar Component Discovery Escalation
|
|
283
252
|
When discovering similar components/hooks during existing code investigation, escalate in following JSON format:
|
|
284
253
|
|
|
285
254
|
```json
|
|
286
|
-
{
|
|
287
|
-
"status": "escalation_needed",
|
|
288
|
-
"reason": "Similar component/hook discovered",
|
|
289
|
-
"taskName": "[Task name being executed]",
|
|
290
|
-
"similar_components": [
|
|
291
|
-
{
|
|
292
|
-
"file_path": "src/components/ExistingButton/ExistingButton.tsx",
|
|
293
|
-
"component_name": "ExistingButton",
|
|
294
|
-
"similarity_reason": "Same UI pattern, same Props structure",
|
|
295
|
-
"code_snippet": "[Excerpt of relevant component code]",
|
|
296
|
-
"technical_debt_assessment": "high/medium/low/unknown"
|
|
297
|
-
}
|
|
298
|
-
],
|
|
299
|
-
"search_details": {
|
|
300
|
-
"keywords_used": ["component keywords", "feature keywords"],
|
|
301
|
-
"files_searched": 15,
|
|
302
|
-
"matches_found": 3
|
|
303
|
-
},
|
|
304
|
-
"escalation_type": "similar_component_found",
|
|
305
|
-
"user_decision_required": true,
|
|
306
|
-
"suggested_options": [
|
|
307
|
-
"Extend and use existing component",
|
|
308
|
-
"Refactor existing component then use",
|
|
309
|
-
"New implementation as technical debt (create ADR)",
|
|
310
|
-
"New implementation (clarify differentiation from existing)"
|
|
311
|
-
],
|
|
312
|
-
"recommendation": "[Recommended approach based on existing component analysis]"
|
|
313
|
-
}
|
|
255
|
+
{"status":"escalation_needed","reason":"Similar component/hook discovered","taskName":"[Task name being executed]","similar_components":[{"file_path":"src/components/ExistingButton/ExistingButton.tsx","component_name":"ExistingButton","similarity_reason":"Same UI pattern, same Props structure","code_snippet":"[Excerpt of relevant component code]","technical_debt_assessment":"high/medium/low/unknown"}],"search_details":{"keywords_used":["component keywords","feature keywords"],"files_searched":15,"matches_found":3},"escalation_type":"similar_component_found","user_decision_required":true,"suggested_options":["Extend and use existing component","Refactor existing component then use","New implementation as technical debt (create ADR)","New implementation (clarify differentiation from existing)"],"recommendation":"[Recommended approach based on existing component analysis]"}
|
|
314
256
|
```
|
|
315
257
|
|
|
316
258
|
#### 2-3. Investigation Target Not Found Escalation
|
|
317
259
|
When an Investigation Target file does not exist or the path is stale, escalate in following JSON format:
|
|
318
260
|
|
|
319
261
|
```json
|
|
320
|
-
{
|
|
321
|
-
"status": "escalation_needed",
|
|
322
|
-
"reason": "Investigation target not found",
|
|
323
|
-
"taskName": "[Task name being executed]",
|
|
324
|
-
"escalation_type": "investigation_target_not_found",
|
|
325
|
-
"missingTargets": [
|
|
326
|
-
{
|
|
327
|
-
"path": "[path specified in task file]",
|
|
328
|
-
"searchHint": "[section/function hint if provided, or null]",
|
|
329
|
-
"searchAttempts": ["Checked path directly", "Searched nearby files with similar names", "Reviewed task dependencies for renamed or moved files"]
|
|
330
|
-
}
|
|
331
|
-
],
|
|
332
|
-
"user_decision_required": true,
|
|
333
|
-
"suggested_options": [
|
|
334
|
-
"Provide the correct file path",
|
|
335
|
-
"Remove this Investigation Target and proceed",
|
|
336
|
-
"Update the task file with current paths"
|
|
337
|
-
],
|
|
338
|
-
"recommendation": "[Recommended next step based on what was found]"
|
|
339
|
-
}
|
|
262
|
+
{"status":"escalation_needed","reason":"Investigation target not found","taskName":"[Task name being executed]","escalation_type":"investigation_target_not_found","missingTargets":[{"path":"[path specified in task file]","searchHint":"[section/function hint if provided, or null]","searchAttempts":["Checked path directly","Searched nearby files with similar names","Reviewed task dependencies for renamed or moved files"]}],"user_decision_required":true,"suggested_options":["Provide the correct file path","Remove this Investigation Target and proceed","Update the task file with current paths"],"recommendation":"[Recommended next step based on what was found]"}
|
|
340
263
|
```
|
|
341
264
|
|
|
342
265
|
#### 2-4. Dependency Version Uncertain Escalation
|
|
343
266
|
When repository-wide verification is insufficient to determine the appropriate dependency version, escalate in following JSON format:
|
|
344
267
|
|
|
345
268
|
```json
|
|
346
|
-
{
|
|
347
|
-
"status": "escalation_needed",
|
|
348
|
-
"reason": "Dependency version uncertain",
|
|
349
|
-
"taskName": "[Task name being executed]",
|
|
350
|
-
"escalation_type": "dependency_version_uncertain",
|
|
351
|
-
"dependency": {
|
|
352
|
-
"name": "[dependency name]",
|
|
353
|
-
"versionsFound": ["list of versions found in repository"],
|
|
354
|
-
"filesChecked": ["file paths where the dependency usage was found"],
|
|
355
|
-
"ambiguityReason": "[why repository state alone is insufficient]"
|
|
356
|
-
},
|
|
357
|
-
"user_decision_required": true,
|
|
358
|
-
"suggested_options": [
|
|
359
|
-
"Use the majority version already in the repository",
|
|
360
|
-
"Use a different version with explicit rationale",
|
|
361
|
-
"Research the latest stable version and decide after review"
|
|
362
|
-
]
|
|
363
|
-
}
|
|
269
|
+
{"status":"escalation_needed","reason":"Dependency version uncertain","taskName":"[Task name being executed]","escalation_type":"dependency_version_uncertain","dependency":{"name":"[dependency name]","versionsFound":["list of versions found in repository"],"filesChecked":["file paths where the dependency usage was found"],"ambiguityReason":"[why repository state alone is insufficient]"},"user_decision_required":true,"suggested_options":["Use the majority version already in the repository","Use a different version with explicit rationale","Research the latest stable version and decide after review"]}
|
|
364
270
|
```
|
|
365
271
|
|
|
366
272
|
#### 2-5. Binding Decision Violation Escalation
|
|
367
273
|
When one or more Compliance Checks in the task's Binding Decisions section evaluate to `N` during pre-implementation, or to `N` or `Unknown` during completion, escalate in following JSON format:
|
|
368
274
|
|
|
369
275
|
```json
|
|
370
|
-
{
|
|
371
|
-
"status": "escalation_needed",
|
|
372
|
-
"reason": "Binding decision violation",
|
|
373
|
-
"taskName": "[Task name being executed]",
|
|
374
|
-
"escalation_type": "binding_decision_violation",
|
|
375
|
-
"phase": "pre_implementation | completion_gate",
|
|
376
|
-
"implementationApproach": "[1-2 sentence summary of the planned or final implementation approach]",
|
|
377
|
-
"failures": [
|
|
378
|
-
{
|
|
379
|
-
"source": "[ADR file path with section hint, copied from Source column]",
|
|
380
|
-
"axis": "[Axis value copied from the Axis column]",
|
|
381
|
-
"decision": "[Decision text copied from Decision column]",
|
|
382
|
-
"complianceCheck": "[Compliance Check predicate copied from Compliance Check column]",
|
|
383
|
-
"evaluation": "N | Unknown",
|
|
384
|
-
"rationale": "[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"
|
|
385
|
-
}
|
|
386
|
-
],
|
|
387
|
-
"user_decision_required": true,
|
|
388
|
-
"suggested_options": [
|
|
389
|
-
"Adjust the implementation plan to satisfy the binding decision",
|
|
390
|
-
"Update the ADR, then update the work plan ADR Bindings and task Binding Decisions",
|
|
391
|
-
"Provide additional context that resolves the Unknown evaluation"
|
|
392
|
-
]
|
|
393
|
-
}
|
|
276
|
+
{"status":"escalation_needed","reason":"Binding decision violation","taskName":"[Task name being executed]","escalation_type":"binding_decision_violation","phase":"pre_implementation | completion_gate","implementationApproach":"[1-2 sentence summary of the planned or final implementation approach]","failures":[{"source":"[ADR file path with section hint, copied from Source column]","axis":"[Axis value copied from the Axis column]","decision":"[Decision text copied from Decision column]","complianceCheck":"[Compliance Check predicate copied from Compliance Check column]","evaluation":"N | Unknown","rationale":"[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"}],"user_decision_required":true,"suggested_options":["Adjust the implementation plan to satisfy the binding decision","Update the ADR, then update the work plan ADR Bindings and task Binding Decisions","Provide additional context that resolves the Unknown evaluation"]}
|
|
394
277
|
```
|
|
395
278
|
|
|
396
279
|
#### 2-6. Test Environment Not Ready Escalation
|
|
@@ -398,16 +281,7 @@ When one or more Compliance Checks in the task's Binding Decisions section evalu
|
|
|
398
281
|
Triggered when the Test Environment Check finds the project-configured test toolchain unavailable or unrunnable.
|
|
399
282
|
|
|
400
283
|
```json
|
|
401
|
-
{
|
|
402
|
-
"status": "escalation_needed",
|
|
403
|
-
"reason": "Test environment not ready",
|
|
404
|
-
"taskName": "[Task name]",
|
|
405
|
-
"escalation_type": "test_environment_not_ready",
|
|
406
|
-
"missingComponent": "test runner | RTL setup | browser runtime | fixtures | mock server | setup file | other",
|
|
407
|
-
"description": "[why the missing component blocks tests]",
|
|
408
|
-
"user_decision_required": true,
|
|
409
|
-
"suggested_options": ["Install or configure the missing component, then re-run the task", "Reassign the task once the environment is ready"]
|
|
410
|
-
}
|
|
284
|
+
{"status":"escalation_needed","reason":"Test environment not ready","taskName":"[Task name]","escalation_type":"test_environment_not_ready","missingComponent":"test runner | RTL setup | browser runtime | fixtures | mock server | setup file | other","description":"[why the missing component blocks tests]","user_decision_required":true,"suggested_options":["Install or configure the missing component, then re-run the task","Reassign the task once the environment is ready"]}
|
|
411
285
|
```
|
|
412
286
|
|
|
413
287
|
## Scope Boundary (delegate to orchestrator)
|
|
@@ -156,6 +156,15 @@ When the task file, Dependencies, or Investigation Targets reference `docs/proje
|
|
|
156
156
|
3. **Cross-check against Investigation Notes**: Ensure planned implementation is consistent with the observations recorded in the task file
|
|
157
157
|
4. **Execute determination**: Determine continue/escalation per "Mandatory Judgment Criteria" above
|
|
158
158
|
|
|
159
|
+
#### Adjacent Case Sweep (Required when the task file has a `Change Category` field set to one or more of `bug-fix`, `regression`, `state-change`, `boundary-change`)
|
|
160
|
+
|
|
161
|
+
Run this check after Pre-implementation Verification and before the Binding Decision Check. Treat the task file's field value as authoritative for whether the sweep applies.
|
|
162
|
+
|
|
163
|
+
1. From Investigation Targets, identify cases sharing the same path, contract, persisted state, or external boundary as the change.
|
|
164
|
+
2. Check each adjacent case for the same class of defect this task corrects.
|
|
165
|
+
3. Fold adjacent residuals within Target Files into this task's failing tests and implementation.
|
|
166
|
+
4. Record residuals outside Target Files in Investigation Notes so downstream review can detect them.
|
|
167
|
+
|
|
159
168
|
#### Binding Decision Check (Required when the task file has a Binding Decisions section)
|
|
160
169
|
|
|
161
170
|
Run this check after Pre-implementation Verification and before the TDD cycle when the task file contains a Binding Decisions section with one or more rows.
|
|
@@ -222,29 +231,7 @@ Return one of the following as the final response (see Structured Response Speci
|
|
|
222
231
|
Report in the following JSON format upon task completion (**without executing quality checks or commits**, delegating to quality assurance process):
|
|
223
232
|
|
|
224
233
|
```json
|
|
225
|
-
{
|
|
226
|
-
"status": "completed",
|
|
227
|
-
"taskName": "[Exact name of executed task]",
|
|
228
|
-
"changeSummary": "[Specific summary of implementation content/changes]",
|
|
229
|
-
"filesModified": ["specific/file/path1", "specific/file/path2"],
|
|
230
|
-
"testsAdded": ["created/test/file/path"],
|
|
231
|
-
"requiresTestReview": true,
|
|
232
|
-
"newTestsPassed": true,
|
|
233
|
-
"progressUpdated": {
|
|
234
|
-
"taskFile": "5/8 items completed",
|
|
235
|
-
"workPlan": "Relevant sections updated",
|
|
236
|
-
"designDoc": "Progress section updated or N/A"
|
|
237
|
-
},
|
|
238
|
-
"runnableCheck": {
|
|
239
|
-
"level": "L1: Unit test / L2: Integration test / L3: E2E test",
|
|
240
|
-
"executed": true,
|
|
241
|
-
"command": "Executed test command",
|
|
242
|
-
"result": "passed / failed / skipped",
|
|
243
|
-
"reason": "Test execution reason/verification content"
|
|
244
|
-
},
|
|
245
|
-
"readyForQualityCheck": true,
|
|
246
|
-
"nextActions": "Overall quality verification by quality assurance process"
|
|
247
|
-
}
|
|
234
|
+
{"status":"completed","taskName":"[Exact name of executed task]","changeSummary":"[Specific summary of implementation content/changes]","filesModified":["specific/file/path1","specific/file/path2"],"testsAdded":["created/test/file/path"],"requiresTestReview":true,"newTestsPassed":true,"progressUpdated":{"taskFile":"5/8 items completed","workPlan":"Relevant sections updated","designDoc":"Progress section updated or N/A"},"runnableCheck":{"level":"L1: Unit test / L2: Integration test / L3: E2E test","executed":true,"command":"Executed test command","result":"passed / failed / skipped","reason":"Test execution reason/verification content"},"readyForQualityCheck":true,"nextActions":"Overall quality verification by quality assurance process"}
|
|
248
235
|
```
|
|
249
236
|
|
|
250
237
|
### 2. Escalation Response
|
|
@@ -257,139 +244,35 @@ For task/AC/reference core-mechanism sources, set `details.design_doc_expectatio
|
|
|
257
244
|
For core-mechanism violations, put the substitute in `details.actual_situation`, the behavior change in `details.why_cannot_implement`, and the unblock condition in `recommendation`.
|
|
258
245
|
|
|
259
246
|
```json
|
|
260
|
-
{
|
|
261
|
-
"status": "escalation_needed",
|
|
262
|
-
"reason": "Design Doc deviation",
|
|
263
|
-
"taskName": "[Task name being executed]",
|
|
264
|
-
"details": {
|
|
265
|
-
"design_doc_expectation": "[Exact quote from relevant Design Doc section]",
|
|
266
|
-
"actual_situation": "[Details of situation actually encountered]",
|
|
267
|
-
"why_cannot_implement": "[Technical reason why cannot implement per Design Doc]",
|
|
268
|
-
"attempted_approaches": ["List of solution methods considered for trial"]
|
|
269
|
-
},
|
|
270
|
-
"escalation_type": "design_compliance_violation",
|
|
271
|
-
"user_decision_required": true,
|
|
272
|
-
"suggested_options": [
|
|
273
|
-
"Modify Design Doc to match reality",
|
|
274
|
-
"Implement missing components first",
|
|
275
|
-
"Reconsider requirements and change implementation approach"
|
|
276
|
-
],
|
|
277
|
-
"recommendation": "[Specific proposal for most appropriate solution direction]"
|
|
278
|
-
}
|
|
247
|
+
{"status":"escalation_needed","reason":"Design Doc deviation","taskName":"[Task name being executed]","details":{"design_doc_expectation":"[Exact quote from relevant Design Doc section]","actual_situation":"[Details of situation actually encountered]","why_cannot_implement":"[Technical reason why cannot implement per Design Doc]","attempted_approaches":["List of solution methods considered for trial"]},"escalation_type":"design_compliance_violation","user_decision_required":true,"suggested_options":["Modify Design Doc to match reality","Implement missing components first","Reconsider requirements and change implementation approach"],"recommendation":"[Specific proposal for most appropriate solution direction]"}
|
|
279
248
|
```
|
|
280
249
|
|
|
281
250
|
#### 2-2. Similar Function Discovery Escalation
|
|
282
251
|
When discovering similar functions during existing code investigation, escalate in following JSON format:
|
|
283
252
|
|
|
284
253
|
```json
|
|
285
|
-
{
|
|
286
|
-
"status": "escalation_needed",
|
|
287
|
-
"reason": "Similar function discovered",
|
|
288
|
-
"taskName": "[Task name being executed]",
|
|
289
|
-
"similar_functions": [
|
|
290
|
-
{
|
|
291
|
-
"file_path": "[path to existing implementation]",
|
|
292
|
-
"function_name": "existingFunction",
|
|
293
|
-
"similarity_reason": "Same domain, same responsibility",
|
|
294
|
-
"code_snippet": "[Excerpt of relevant code]",
|
|
295
|
-
"technical_debt_assessment": "high/medium/low/unknown"
|
|
296
|
-
}
|
|
297
|
-
],
|
|
298
|
-
"search_details": {
|
|
299
|
-
"keywords_used": ["domain keywords", "responsibility keywords"],
|
|
300
|
-
"files_searched": 15,
|
|
301
|
-
"matches_found": 3
|
|
302
|
-
},
|
|
303
|
-
"escalation_type": "similar_function_found",
|
|
304
|
-
"user_decision_required": true,
|
|
305
|
-
"suggested_options": [
|
|
306
|
-
"Extend and use existing function",
|
|
307
|
-
"Refactor existing function then use",
|
|
308
|
-
"New implementation as technical debt (create ADR)",
|
|
309
|
-
"New implementation (clarify differentiation from existing)"
|
|
310
|
-
],
|
|
311
|
-
"recommendation": "[Recommended approach based on existing code analysis]"
|
|
312
|
-
}
|
|
254
|
+
{"status":"escalation_needed","reason":"Similar function discovered","taskName":"[Task name being executed]","similar_functions":[{"file_path":"[path to existing implementation]","function_name":"existingFunction","similarity_reason":"Same domain, same responsibility","code_snippet":"[Excerpt of relevant code]","technical_debt_assessment":"high/medium/low/unknown"}],"search_details":{"keywords_used":["domain keywords","responsibility keywords"],"files_searched":15,"matches_found":3},"escalation_type":"similar_function_found","user_decision_required":true,"suggested_options":["Extend and use existing function","Refactor existing function then use","New implementation as technical debt (create ADR)","New implementation (clarify differentiation from existing)"],"recommendation":"[Recommended approach based on existing code analysis]"}
|
|
313
255
|
```
|
|
314
256
|
|
|
315
257
|
#### 2-3. Investigation Target Not Found Escalation
|
|
316
258
|
When an Investigation Target file does not exist or the path is stale, escalate in following JSON format:
|
|
317
259
|
|
|
318
260
|
```json
|
|
319
|
-
{
|
|
320
|
-
"status": "escalation_needed",
|
|
321
|
-
"reason": "Investigation target not found",
|
|
322
|
-
"taskName": "[Task name being executed]",
|
|
323
|
-
"escalation_type": "investigation_target_not_found",
|
|
324
|
-
"missingTargets": [
|
|
325
|
-
{
|
|
326
|
-
"path": "[path specified in task file]",
|
|
327
|
-
"searchHint": "[section/function hint if provided, or null]",
|
|
328
|
-
"searchAttempts": ["Checked path directly", "Searched nearby files with similar names", "Reviewed task dependencies for renamed or moved files"]
|
|
329
|
-
}
|
|
330
|
-
],
|
|
331
|
-
"user_decision_required": true,
|
|
332
|
-
"suggested_options": [
|
|
333
|
-
"Provide the correct file path",
|
|
334
|
-
"Remove this Investigation Target and proceed",
|
|
335
|
-
"Update the task file with current paths"
|
|
336
|
-
],
|
|
337
|
-
"recommendation": "[Recommended next step based on what was found]"
|
|
338
|
-
}
|
|
261
|
+
{"status":"escalation_needed","reason":"Investigation target not found","taskName":"[Task name being executed]","escalation_type":"investigation_target_not_found","missingTargets":[{"path":"[path specified in task file]","searchHint":"[section/function hint if provided, or null]","searchAttempts":["Checked path directly","Searched nearby files with similar names","Reviewed task dependencies for renamed or moved files"]}],"user_decision_required":true,"suggested_options":["Provide the correct file path","Remove this Investigation Target and proceed","Update the task file with current paths"],"recommendation":"[Recommended next step based on what was found]"}
|
|
339
262
|
```
|
|
340
263
|
|
|
341
264
|
#### 2-4. Dependency Version Uncertain Escalation
|
|
342
265
|
When repository-wide verification is insufficient to determine the appropriate dependency version, escalate in following JSON format:
|
|
343
266
|
|
|
344
267
|
```json
|
|
345
|
-
{
|
|
346
|
-
"status": "escalation_needed",
|
|
347
|
-
"reason": "Dependency version uncertain",
|
|
348
|
-
"taskName": "[Task name being executed]",
|
|
349
|
-
"escalation_type": "dependency_version_uncertain",
|
|
350
|
-
"dependency": {
|
|
351
|
-
"name": "[dependency name]",
|
|
352
|
-
"versionsFound": ["list of versions found in repository"],
|
|
353
|
-
"filesChecked": ["file paths where the dependency usage was found"],
|
|
354
|
-
"ambiguityReason": "[why repository state alone is insufficient]"
|
|
355
|
-
},
|
|
356
|
-
"user_decision_required": true,
|
|
357
|
-
"suggested_options": [
|
|
358
|
-
"Use the majority version already in the repository",
|
|
359
|
-
"Use a different version with explicit rationale",
|
|
360
|
-
"Research the latest stable version and decide after review"
|
|
361
|
-
]
|
|
362
|
-
}
|
|
268
|
+
{"status":"escalation_needed","reason":"Dependency version uncertain","taskName":"[Task name being executed]","escalation_type":"dependency_version_uncertain","dependency":{"name":"[dependency name]","versionsFound":["list of versions found in repository"],"filesChecked":["file paths where the dependency usage was found"],"ambiguityReason":"[why repository state alone is insufficient]"},"user_decision_required":true,"suggested_options":["Use the majority version already in the repository","Use a different version with explicit rationale","Research the latest stable version and decide after review"]}
|
|
363
269
|
```
|
|
364
270
|
|
|
365
271
|
#### 2-5. Binding Decision Violation Escalation
|
|
366
272
|
When one or more Compliance Checks in the task's Binding Decisions section evaluate to `N` during pre-implementation, or to `N` or `Unknown` during completion, escalate in following JSON format:
|
|
367
273
|
|
|
368
274
|
```json
|
|
369
|
-
{
|
|
370
|
-
"status": "escalation_needed",
|
|
371
|
-
"reason": "Binding decision violation",
|
|
372
|
-
"taskName": "[Task name being executed]",
|
|
373
|
-
"escalation_type": "binding_decision_violation",
|
|
374
|
-
"phase": "pre_implementation | completion_gate",
|
|
375
|
-
"implementationApproach": "[1-2 sentence summary of the planned or final implementation approach]",
|
|
376
|
-
"failures": [
|
|
377
|
-
{
|
|
378
|
-
"source": "[ADR file path with section hint, copied from Source column]",
|
|
379
|
-
"axis": "[Axis value copied from the Axis column]",
|
|
380
|
-
"decision": "[Decision text copied from Decision column]",
|
|
381
|
-
"complianceCheck": "[Compliance Check predicate copied from Compliance Check column]",
|
|
382
|
-
"evaluation": "N | Unknown",
|
|
383
|
-
"rationale": "[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"
|
|
384
|
-
}
|
|
385
|
-
],
|
|
386
|
-
"user_decision_required": true,
|
|
387
|
-
"suggested_options": [
|
|
388
|
-
"Adjust the implementation plan to satisfy the binding decision",
|
|
389
|
-
"Update the ADR, then update the work plan ADR Bindings and task Binding Decisions",
|
|
390
|
-
"Provide additional context that resolves the Unknown evaluation"
|
|
391
|
-
]
|
|
392
|
-
}
|
|
275
|
+
{"status":"escalation_needed","reason":"Binding decision violation","taskName":"[Task name being executed]","escalation_type":"binding_decision_violation","phase":"pre_implementation | completion_gate","implementationApproach":"[1-2 sentence summary of the planned or final implementation approach]","failures":[{"source":"[ADR file path with section hint, copied from Source column]","axis":"[Axis value copied from the Axis column]","decision":"[Decision text copied from Decision column]","complianceCheck":"[Compliance Check predicate copied from Compliance Check column]","evaluation":"N | Unknown","rationale":"[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"}],"user_decision_required":true,"suggested_options":["Adjust the implementation plan to satisfy the binding decision","Update the ADR, then update the work plan ADR Bindings and task Binding Decisions","Provide additional context that resolves the Unknown evaluation"]}
|
|
393
276
|
```
|
|
394
277
|
|
|
395
278
|
#### 2-6. Test Environment Not Ready Escalation
|
|
@@ -397,16 +280,7 @@ When one or more Compliance Checks in the task's Binding Decisions section evalu
|
|
|
397
280
|
Triggered when the Test Environment Check finds the project-configured test toolchain unavailable or unrunnable.
|
|
398
281
|
|
|
399
282
|
```json
|
|
400
|
-
{
|
|
401
|
-
"status": "escalation_needed",
|
|
402
|
-
"reason": "Test environment not ready",
|
|
403
|
-
"taskName": "[Task name]",
|
|
404
|
-
"escalation_type": "test_environment_not_ready",
|
|
405
|
-
"missingComponent": "test runner | fixtures | mock server | setup file | other",
|
|
406
|
-
"description": "[why the missing component blocks tests]",
|
|
407
|
-
"user_decision_required": true,
|
|
408
|
-
"suggested_options": ["Install or configure the missing component, then re-run the task", "Reassign the task once the environment is ready"]
|
|
409
|
-
}
|
|
283
|
+
{"status":"escalation_needed","reason":"Test environment not ready","taskName":"[Task name]","escalation_type":"test_environment_not_ready","missingComponent":"test runner | fixtures | mock server | setup file | other","description":"[why the missing component blocks tests]","user_decision_required":true,"suggested_options":["Install or configure the missing component, then re-run the task","Reassign the task once the environment is ready"]}
|
|
410
284
|
```
|
|
411
285
|
|
|
412
286
|
## Execution Principles
|
|
@@ -126,163 +126,7 @@ Produce `candidateWriteSet[]` with likely modified files:
|
|
|
126
126
|
Return a single JSON object as the final response:
|
|
127
127
|
|
|
128
128
|
```json
|
|
129
|
-
{
|
|
130
|
-
"analysisScope": {
|
|
131
|
-
"filesAnalyzed": ["path/to/component.tsx"],
|
|
132
|
-
"stylesAnalyzed": ["path/to/styles.module.css"],
|
|
133
|
-
"uiConventions": {
|
|
134
|
-
"componentExtension": ".tsx",
|
|
135
|
-
"styleStrategy": "css-modules|vanilla-css|css-in-js|utility-classes|unknown",
|
|
136
|
-
"storybook": true,
|
|
137
|
-
"testRunner": "vitest|jest|other|unknown"
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"externalResources": {
|
|
141
|
-
"status": "resolved|partial|not_recorded",
|
|
142
|
-
"designOrigin": {
|
|
143
|
-
"resource_status": "present|existing-implementation|not_applicable",
|
|
144
|
-
"resolution_status": "fetched|inspected_local|recorded_for_manual_confirmation|unavailable|not_applicable",
|
|
145
|
-
"accessMethod": "MCP name | URL | file path | existing implementation",
|
|
146
|
-
"summary": "brief description of resolved content"
|
|
147
|
-
},
|
|
148
|
-
"designSystem": {
|
|
149
|
-
"resource_status": "present|existing-package|not_applicable",
|
|
150
|
-
"resolution_status": "fetched|inspected_local|unavailable|not_applicable",
|
|
151
|
-
"accessMethod": "MCP name | URL | file path | package imports | local docs",
|
|
152
|
-
"summary": "components, tokens, and variants captured"
|
|
153
|
-
},
|
|
154
|
-
"guidelines": {
|
|
155
|
-
"resource_status": "present|project-conventions|not_applicable",
|
|
156
|
-
"resolution_status": "fetched|inspected_local|unavailable|not_applicable",
|
|
157
|
-
"accessMethod": "URL | file path | local docs | project conventions",
|
|
158
|
-
"summary": "rule categories captured"
|
|
159
|
-
},
|
|
160
|
-
"visualVerification": {
|
|
161
|
-
"resource_status": "present|manual-confirmation|not_applicable",
|
|
162
|
-
"resolution_status": "available|recorded_for_manual_confirmation|unavailable|not_applicable",
|
|
163
|
-
"accessMethod": "MCP name | URL | command | manual confirmation",
|
|
164
|
-
"notes": "rendering verification path"
|
|
165
|
-
},
|
|
166
|
-
"generatedUiArtifacts": {
|
|
167
|
-
"resource_status": "present|not_applicable",
|
|
168
|
-
"resolution_status": "inspected_local|available|unavailable|not_applicable",
|
|
169
|
-
"accessMethod": "command | config path | file path | package script",
|
|
170
|
-
"summary": "generated UI artifact source, trigger, and verification path"
|
|
171
|
-
},
|
|
172
|
-
"additionalResources": [
|
|
173
|
-
{
|
|
174
|
-
"label": "resource-label",
|
|
175
|
-
"description": "resource description",
|
|
176
|
-
"accessMethod": "URL | MCP name | file path | command | notes",
|
|
177
|
-
"resource_status": "present|existing-implementation|existing-package|project-conventions|manual-confirmation",
|
|
178
|
-
"resolution_status": "fetched|inspected_local|recorded_for_manual_confirmation|unavailable",
|
|
179
|
-
"summary": "facts relevant to the requested UI scope"
|
|
180
|
-
}
|
|
181
|
-
]
|
|
182
|
-
},
|
|
183
|
-
"componentStructure": [
|
|
184
|
-
{
|
|
185
|
-
"name": "ComponentName",
|
|
186
|
-
"filePath": "path/to/file:line",
|
|
187
|
-
"propsInterface": "name and brief shape",
|
|
188
|
-
"topLevelElement": "tag or component name",
|
|
189
|
-
"domOrder": ["child1", "child2"],
|
|
190
|
-
"conditionalBranches": [
|
|
191
|
-
{"predicate": "condition", "renderedSubtree": "brief description"}
|
|
192
|
-
],
|
|
193
|
-
"callSites": ["path/to/consumer:line"]
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
"propsPatterns": [
|
|
197
|
-
{
|
|
198
|
-
"component": "ComponentName",
|
|
199
|
-
"callSite": "path/to/file:line",
|
|
200
|
-
"props": {"variant": "primary"},
|
|
201
|
-
"computedProps": ["onClick"],
|
|
202
|
-
"groupKey": "primary"
|
|
203
|
-
}
|
|
204
|
-
],
|
|
205
|
-
"cssLayout": [
|
|
206
|
-
{
|
|
207
|
-
"filePath": "path/to/styles.module.css",
|
|
208
|
-
"classNamingConvention": "camelCase|kebab-case|BEM|unknown",
|
|
209
|
-
"baseClass": "root",
|
|
210
|
-
"layouts": [
|
|
211
|
-
{
|
|
212
|
-
"selector": ".root",
|
|
213
|
-
"display": "flex|grid|block|unknown",
|
|
214
|
-
"direction": "row|column|grid-template|unknown",
|
|
215
|
-
"gap": "8px|none|unknown",
|
|
216
|
-
"wrap": "wrap|nowrap|absent|unknown",
|
|
217
|
-
"logicalProperties": true,
|
|
218
|
-
"stateSelectors": ["[data-state=active]"]
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
"responsiveBreakpoints": ["768px"]
|
|
222
|
-
}
|
|
223
|
-
],
|
|
224
|
-
"stateDisplay": [
|
|
225
|
-
{
|
|
226
|
-
"component": "ComponentName",
|
|
227
|
-
"states": [
|
|
228
|
-
{"name": "loading|empty|partial|error|ready|disabled", "trigger": "what causes this state", "renders": "brief description"}
|
|
229
|
-
],
|
|
230
|
-
"unsupportedStates": ["state absent from current component"]
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
"displayConditions": [
|
|
234
|
-
{
|
|
235
|
-
"component": "ComponentName",
|
|
236
|
-
"condition": "feature_flag|role|route|region|tenant|page_context",
|
|
237
|
-
"predicateLocation": "path/to/file:line",
|
|
238
|
-
"predicate": "expression",
|
|
239
|
-
"gatedSubtree": "brief description"
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
"i18n": {
|
|
243
|
-
"format": "csv|json|code-catalog|other|none",
|
|
244
|
-
"structuralConventions": {},
|
|
245
|
-
"keyNamingConvention": "",
|
|
246
|
-
"locales": [],
|
|
247
|
-
"localeGaps": [],
|
|
248
|
-
"generatedTypings": {"command": "", "outputPath": ""}
|
|
249
|
-
},
|
|
250
|
-
"accessibility": [
|
|
251
|
-
{
|
|
252
|
-
"component": "ComponentName",
|
|
253
|
-
"ariaAttributes": ["role=button", "aria-label from prop"],
|
|
254
|
-
"keyboardHandling": "Enter and Space trigger action",
|
|
255
|
-
"focusStyling": "focus-visible outline",
|
|
256
|
-
"testCoverage": "axe checks present|absent|unknown"
|
|
257
|
-
}
|
|
258
|
-
],
|
|
259
|
-
"generatedArtifacts": [
|
|
260
|
-
{
|
|
261
|
-
"kind": "css-module-typings|message-catalog-typings|route-typings|other",
|
|
262
|
-
"command": "generator command",
|
|
263
|
-
"trigger": "on source change|manual|unknown",
|
|
264
|
-
"consumers": ["typecheck", "test", "build", "runtime"],
|
|
265
|
-
"resourceRef": "externalResources.generatedUiArtifacts"
|
|
266
|
-
}
|
|
267
|
-
],
|
|
268
|
-
"focusAreas": [
|
|
269
|
-
{
|
|
270
|
-
"fact_id": "path:identifier",
|
|
271
|
-
"area": "Brief UI area name",
|
|
272
|
-
"evidence": "componentStructure[name=...]",
|
|
273
|
-
"factsToAddress": "Concrete UI facts to respect",
|
|
274
|
-
"risk": "What inconsistency results if omitted"
|
|
275
|
-
}
|
|
276
|
-
],
|
|
277
|
-
"candidateWriteSet": [
|
|
278
|
-
{
|
|
279
|
-
"path": "src/components/Card.tsx",
|
|
280
|
-
"reasonRef": "focusAreas[fact_id=...]",
|
|
281
|
-
"confidence": "high|medium|low"
|
|
282
|
-
}
|
|
283
|
-
],
|
|
284
|
-
"limitations": []
|
|
285
|
-
}
|
|
129
|
+
{"analysisScope":{"filesAnalyzed":["path/to/component.tsx"],"stylesAnalyzed":["path/to/styles.module.css"],"uiConventions":{"componentExtension":".tsx","styleStrategy":"css-modules|vanilla-css|css-in-js|utility-classes|unknown","storybook":true,"testRunner":"vitest|jest|other|unknown"}},"externalResources":{"status":"resolved|partial|not_recorded","designOrigin":{"resource_status":"present|existing-implementation|not_applicable","resolution_status":"fetched|inspected_local|recorded_for_manual_confirmation|unavailable|not_applicable","accessMethod":"MCP name | URL | file path | existing implementation","summary":"brief description of resolved content"},"designSystem":{"resource_status":"present|existing-package|not_applicable","resolution_status":"fetched|inspected_local|unavailable|not_applicable","accessMethod":"MCP name | URL | file path | package imports | local docs","summary":"components, tokens, and variants captured"},"guidelines":{"resource_status":"present|project-conventions|not_applicable","resolution_status":"fetched|inspected_local|unavailable|not_applicable","accessMethod":"URL | file path | local docs | project conventions","summary":"rule categories captured"},"visualVerification":{"resource_status":"present|manual-confirmation|not_applicable","resolution_status":"available|recorded_for_manual_confirmation|unavailable|not_applicable","accessMethod":"MCP name | URL | command | manual confirmation","notes":"rendering verification path"},"generatedUiArtifacts":{"resource_status":"present|not_applicable","resolution_status":"inspected_local|available|unavailable|not_applicable","accessMethod":"command | config path | file path | package script","summary":"generated UI artifact source, trigger, and verification path"},"additionalResources":[{"label":"resource-label","description":"resource description","accessMethod":"URL | MCP name | file path | command | notes","resource_status":"present|existing-implementation|existing-package|project-conventions|manual-confirmation","resolution_status":"fetched|inspected_local|recorded_for_manual_confirmation|unavailable","summary":"facts relevant to the requested UI scope"}]},"componentStructure":[{"name":"ComponentName","filePath":"path/to/file:line","propsInterface":"name and brief shape","topLevelElement":"tag or component name","domOrder":["child1","child2"],"conditionalBranches":[{"predicate":"condition","renderedSubtree":"brief description"}],"callSites":["path/to/consumer:line"]}],"propsPatterns":[{"component":"ComponentName","callSite":"path/to/file:line","props":{"variant":"primary"},"computedProps":["onClick"],"groupKey":"primary"}],"cssLayout":[{"filePath":"path/to/styles.module.css","classNamingConvention":"camelCase|kebab-case|BEM|unknown","baseClass":"root","layouts":[{"selector":".root","display":"flex|grid|block|unknown","direction":"row|column|grid-template|unknown","gap":"8px|none|unknown","wrap":"wrap|nowrap|absent|unknown","logicalProperties":true,"stateSelectors":["[data-state=active]"]}],"responsiveBreakpoints":["768px"]}],"stateDisplay":[{"component":"ComponentName","states":[{"name":"loading|empty|partial|error|ready|disabled","trigger":"what causes this state","renders":"brief description"}],"unsupportedStates":["state absent from current component"]}],"displayConditions":[{"component":"ComponentName","condition":"feature_flag|role|route|region|tenant|page_context","predicateLocation":"path/to/file:line","predicate":"expression","gatedSubtree":"brief description"}],"i18n":{"format":"csv|json|code-catalog|other|none","structuralConventions":{},"keyNamingConvention":"","locales":[],"localeGaps":[],"generatedTypings":{"command":"","outputPath":""}},"accessibility":[{"component":"ComponentName","ariaAttributes":["role=button","aria-label from prop"],"keyboardHandling":"Enter and Space trigger action","focusStyling":"focus-visible outline","testCoverage":"axe checks present|absent|unknown"}],"generatedArtifacts":[{"kind":"css-module-typings|message-catalog-typings|route-typings|other","command":"generator command","trigger":"on source change|manual|unknown","consumers":["typecheck","test","build","runtime"],"resourceRef":"externalResources.generatedUiArtifacts"}],"focusAreas":[{"fact_id":"path:identifier","area":"Brief UI area name","evidence":"componentStructure[name=...]","factsToAddress":"Concrete UI facts to respect","risk":"What inconsistency results if omitted"}],"candidateWriteSet":[{"path":"src/components/Card.tsx","reasonRef":"focusAreas[fact_id=...]","confidence":"high|medium|low"}],"limitations":[]}
|
|
286
130
|
```
|
|
287
131
|
|
|
288
132
|
## Quality Checklist
|