claude-code-workflow 7.2.25 → 7.2.26
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/.claude/CLAUDE.md +20 -0
- package/.claude/agents/action-planning-agent.md +6 -0
- package/.claude/agents/cli-explore-agent.md +63 -77
- package/.claude/agents/cli-lite-planning-agent.md +10 -11
- package/.claude/agents/issue-plan-agent.md +7 -2
- package/.claude/commands/workflow/spec/setup.md +1 -1
- package/.claude/skills/review-cycle/phases/review-module.md +4 -4
- package/.claude/skills/review-cycle/phases/review-session.md +4 -4
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +2 -2
- package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +2 -2
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +2 -2
- package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +3 -3
- package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +2 -2
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +2 -2
- package/.codex/AGENTS.md +16 -0
- package/ccw/dist/tools/index.d.ts.map +1 -1
- package/ccw/dist/tools/index.js +2 -0
- package/ccw/dist/tools/index.js.map +1 -1
- package/ccw/dist/tools/json-builder.d.ts +17 -0
- package/ccw/dist/tools/json-builder.d.ts.map +1 -0
- package/ccw/dist/tools/json-builder.js +746 -0
- package/ccw/dist/tools/json-builder.js.map +1 -0
- package/ccw/dist/tools/schema-registry.d.ts +71 -0
- package/ccw/dist/tools/schema-registry.d.ts.map +1 -0
- package/ccw/dist/tools/schema-registry.js +136 -0
- package/ccw/dist/tools/schema-registry.js.map +1 -0
- package/package.json +1 -1
- package/.codex/prompts/prep-cycle.md +0 -416
- package/.codex/prompts/prep-plan.md +0 -371
package/.claude/CLAUDE.md
CHANGED
|
@@ -36,6 +36,26 @@ Available CLI endpoints are dynamically defined by the config file
|
|
|
36
36
|
- **Key scenarios**: Self-repair fails, ambiguous requirements, architecture decisions, pattern uncertainty, critical code paths
|
|
37
37
|
- **Principles**: Default `--mode analysis`, no confirmation needed, wait for completion, flexible rule selection
|
|
38
38
|
|
|
39
|
+
## Workflow Session Awareness
|
|
40
|
+
|
|
41
|
+
### Artifact Locations
|
|
42
|
+
|
|
43
|
+
| Workflow | Directory | Summary File |
|
|
44
|
+
|----------|-----------|-------------|
|
|
45
|
+
| `workflow-plan` | `.workflow/active/WFS-*/` | `workflow-session.json` |
|
|
46
|
+
| `workflow-lite-plan` | `.workflow/.lite-plan/{slug}-{date}/` | `plan.json` |
|
|
47
|
+
| `analyze-with-file` | `.workflow/.analysis/ANL-*/` | `conclusions.json` |
|
|
48
|
+
| `multi-cli-plan` | `.workflow/.multi-cli-plan/*/` | `session-state.json` |
|
|
49
|
+
| `lite-fix` | `.workflow/.lite-fix/*/` | `fix-plan.json` |
|
|
50
|
+
| Other | `.workflow/.debug/`, `.workflow/.scratchpad/`, `.workflow/archives/` | — |
|
|
51
|
+
|
|
52
|
+
### Pre-Task Discovery
|
|
53
|
+
|
|
54
|
+
Before starting any workflow skill, scan recent sessions (7 days) to avoid conflicts and reuse prior work:
|
|
55
|
+
- If overlapping file scope found: warn user, suggest `--continue` or reference prior session
|
|
56
|
+
- If complementary: feed prior findings into new session context
|
|
57
|
+
- `memory/MEMORY.md` for cross-session knowledge; `.workflow/` for session-specific artifacts — reference session IDs, don't duplicate
|
|
58
|
+
|
|
39
59
|
## Code Diagnostics
|
|
40
60
|
|
|
41
61
|
- **Prefer `mcp__ide__getDiagnostics`** for code error checking over shell-based TypeScript compilation
|
|
@@ -829,6 +829,12 @@ Generate at `.workflow/active/{session_id}/plan.json` following `plan-overview-b
|
|
|
829
829
|
|
|
830
830
|
**Generation Timing**: After all `.task/IMPL-*.json` files are generated, aggregate into plan.json.
|
|
831
831
|
|
|
832
|
+
**Validation**: After writing plan.json and task files, validate with json_builder:
|
|
833
|
+
```bash
|
|
834
|
+
ccw tool exec json_builder '{"cmd":"validate","target":"<session>/plan.json","schema":"plan"}'
|
|
835
|
+
ccw tool exec json_builder '{"cmd":"validate","target":"<session>/.task/IMPL-001.json","schema":"task"}'
|
|
836
|
+
```
|
|
837
|
+
|
|
832
838
|
### 2.3 IMPL_PLAN.md Structure
|
|
833
839
|
|
|
834
840
|
**Template-Based Generation**:
|
|
@@ -5,6 +5,7 @@ description: |
|
|
|
5
5
|
Orchestrates 4-phase workflow: Task Understanding → Analysis Execution → Schema Validation → Output Generation.
|
|
6
6
|
Spawned by /explore command orchestrator.
|
|
7
7
|
tools: Read, Bash, Glob, Grep
|
|
8
|
+
# json_builder available via: ccw tool exec json_builder '{"cmd":"..."}' (Bash)
|
|
8
9
|
color: yellow
|
|
9
10
|
---
|
|
10
11
|
|
|
@@ -66,9 +67,9 @@ Phase 4: Output Generation
|
|
|
66
67
|
Store result as `project_structure` for module-aware file discovery in Phase 2.
|
|
67
68
|
|
|
68
69
|
2. **Output Schema Loading** (if output file path specified in prompt):
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
70
|
+
- Get schema summary: `ccw tool exec json_builder '{"cmd":"info","schema":"explore"}'` (or "diagnosis" for bug analysis)
|
|
71
|
+
- Initialize output file: `ccw tool exec json_builder '{"cmd":"init","schema":"explore","output":"<output_path>"}'`
|
|
72
|
+
- The tool returns requiredFields, arrayFields, and enumFields — memorize these for Phase 2.
|
|
72
73
|
|
|
73
74
|
3. **Project Context Loading** (from spec system):
|
|
74
75
|
- Load exploration specs using: `ccw spec load --category exploration`
|
|
@@ -150,55 +151,56 @@ RULES: {from prompt, if template specified} | analysis=READ-ONLY
|
|
|
150
151
|
---
|
|
151
152
|
|
|
152
153
|
<schema_validation>
|
|
153
|
-
## Phase 3:
|
|
154
|
+
## Phase 3: Incremental Build & Validation (via json_builder)
|
|
154
155
|
|
|
155
|
-
|
|
156
|
+
**This phase replaces manual JSON writing + self-validation with tool-assisted construction.**
|
|
156
157
|
|
|
157
|
-
**
|
|
158
|
+
**Step 1: Set text fields** (discovered during Phase 2 analysis)
|
|
159
|
+
```bash
|
|
160
|
+
ccw tool exec json_builder '{"cmd":"set","target":"<output_path>","ops":[
|
|
161
|
+
{"path":"project_structure","value":"..."},
|
|
162
|
+
{"path":"patterns","value":"..."},
|
|
163
|
+
{"path":"dependencies","value":"..."},
|
|
164
|
+
{"path":"integration_points","value":"..."},
|
|
165
|
+
{"path":"constraints","value":"..."}
|
|
166
|
+
]}'
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Step 2: Append file entries** (as discovered — one `set` per batch)
|
|
170
|
+
```bash
|
|
171
|
+
ccw tool exec json_builder '{"cmd":"set","target":"<output_path>","ops":[
|
|
172
|
+
{"path":"relevant_files[+]","value":{"path":"src/auth.ts","relevance":0.9,"rationale":"Contains AuthService.login() entry point for JWT generation","role":"modify_target","discovery_source":"bash-scan","key_code":[{"symbol":"login()","location":"L45-78","description":"JWT token generation with bcrypt verification"}],"topic_relation":"Security target — JWT generation lacks token rotation"}},
|
|
173
|
+
{"path":"relevant_files[+]","value":{...}}
|
|
174
|
+
]}'
|
|
175
|
+
```
|
|
158
176
|
|
|
159
|
-
**
|
|
177
|
+
The tool **automatically validates** each operation:
|
|
178
|
+
- enum values (role, discovery_source) → rejects invalid
|
|
179
|
+
- minLength (rationale >= 10) → rejects too short
|
|
180
|
+
- type checking → rejects wrong types
|
|
181
|
+
|
|
182
|
+
**Step 3: Set metadata**
|
|
183
|
+
```bash
|
|
184
|
+
ccw tool exec json_builder '{"cmd":"set","target":"<output_path>","ops":[
|
|
185
|
+
{"path":"_metadata.timestamp","value":"auto"},
|
|
186
|
+
{"path":"_metadata.task_description","value":"..."},
|
|
187
|
+
{"path":"_metadata.source","value":"cli-explore-agent"},
|
|
188
|
+
{"path":"_metadata.exploration_angle","value":"..."},
|
|
189
|
+
{"path":"_metadata.exploration_index","value":1},
|
|
190
|
+
{"path":"_metadata.total_explorations","value":2}
|
|
191
|
+
]}'
|
|
160
192
|
```
|
|
161
|
-
|
|
193
|
+
|
|
194
|
+
**Step 4: Final validation**
|
|
195
|
+
```bash
|
|
196
|
+
ccw tool exec json_builder '{"cmd":"validate","target":"<output_path>"}'
|
|
162
197
|
```
|
|
198
|
+
Returns `{valid, errors, warnings, stats}`. If errors exist → fix with `set` → re-validate.
|
|
163
199
|
|
|
164
|
-
**
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
2. **Required fields** - List all `"required": [...]` arrays
|
|
169
|
-
3. **Field names EXACTLY** - Copy character-by-character (case-sensitive)
|
|
170
|
-
4. **Enum values** - Copy exact strings (e.g., `"critical"` not `"Critical"`)
|
|
171
|
-
5. **Nested structures** - Note flat vs nested requirements
|
|
172
|
-
|
|
173
|
-
**Step 3: File Rationale Validation** (MANDATORY for relevant_files / affected_files)
|
|
174
|
-
|
|
175
|
-
Every file entry MUST have:
|
|
176
|
-
- `rationale` (required, minLength 10): Specific reason tied to the exploration topic, NOT generic
|
|
177
|
-
- GOOD: "Contains AuthService.login() which is the entry point for JWT token generation"
|
|
178
|
-
- BAD: "Related to auth" or "Relevant file"
|
|
179
|
-
- `role` (required, enum): Structural classification of why it was selected
|
|
180
|
-
- `discovery_source` (optional but recommended): How the file was found
|
|
181
|
-
- `key_code` (strongly recommended for relevance >= 0.7): Array of {symbol, location?, description}
|
|
182
|
-
- GOOD: [{"symbol": "AuthService.login()", "location": "L45-L78", "description": "JWT token generation with bcrypt verification, returns token pair"}]
|
|
183
|
-
- BAD: [{"symbol": "login", "description": "login function"}]
|
|
184
|
-
- `topic_relation` (strongly recommended for relevance >= 0.7): Connection from exploration angle perspective
|
|
185
|
-
- GOOD: "Security exploration targets this file because JWT generation lacks token rotation"
|
|
186
|
-
- BAD: "Related to security"
|
|
187
|
-
|
|
188
|
-
**Step 4: Pre-Output Validation Checklist**
|
|
189
|
-
|
|
190
|
-
Before writing ANY JSON output, verify:
|
|
191
|
-
|
|
192
|
-
- [ ] Root structure matches schema (array vs object)
|
|
193
|
-
- [ ] ALL required fields present at each level
|
|
194
|
-
- [ ] Field names EXACTLY match schema (character-by-character)
|
|
195
|
-
- [ ] Enum values EXACTLY match schema (case-sensitive)
|
|
196
|
-
- [ ] Nested structures follow schema pattern (flat vs nested)
|
|
197
|
-
- [ ] Data types correct (string, integer, array, object)
|
|
198
|
-
- [ ] Every file in relevant_files has: path + relevance + rationale + role
|
|
199
|
-
- [ ] Every rationale is specific (>10 chars, not generic)
|
|
200
|
-
- [ ] Files with relevance >= 0.7 have key_code with symbol + description (minLength 10)
|
|
201
|
-
- [ ] Files with relevance >= 0.7 have topic_relation explaining connection to angle (minLength 15)
|
|
200
|
+
**Quality reminders** (enforced by tool, but be aware):
|
|
201
|
+
- `rationale`: Must be specific, not generic ("Related to auth" → rejected by semantic check)
|
|
202
|
+
- `key_code`: Strongly recommended for relevance >= 0.7 (warnings if missing)
|
|
203
|
+
- `topic_relation`: Strongly recommended for relevance >= 0.7 (warnings if missing)
|
|
202
204
|
</schema_validation>
|
|
203
205
|
|
|
204
206
|
---
|
|
@@ -212,16 +214,12 @@ Brief summary:
|
|
|
212
214
|
- Task completion status
|
|
213
215
|
- Key findings summary
|
|
214
216
|
- Generated file paths (if any)
|
|
217
|
+
- Validation result (from Phase 3 Step 4)
|
|
215
218
|
|
|
216
|
-
### File Output
|
|
217
|
-
|
|
218
|
-
**MANDATORY WORKFLOW**:
|
|
219
|
+
### File Output
|
|
219
220
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
3. Build JSON using ONLY schema field names
|
|
223
|
-
4. Validate against checklist before writing
|
|
224
|
-
5. Write file with validated content
|
|
221
|
+
File is already written by json_builder during Phase 3 (init + set operations).
|
|
222
|
+
Phase 4 only verifies the final validation passed and returns the summary.
|
|
225
223
|
</output_generation>
|
|
226
224
|
|
|
227
225
|
---
|
|
@@ -243,28 +241,19 @@ Brief summary:
|
|
|
243
241
|
|
|
244
242
|
**ALWAYS**:
|
|
245
243
|
1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
246
|
-
2.
|
|
247
|
-
3.
|
|
248
|
-
4.
|
|
249
|
-
5.
|
|
250
|
-
6.
|
|
251
|
-
7. Include ALL required fields at every level
|
|
252
|
-
8. Include file:line references in findings
|
|
253
|
-
9. **Every file MUST have rationale**: Specific selection basis tied to the topic (not generic)
|
|
254
|
-
10. **Every file MUST have role**: Classify as modify_target/dependency/pattern_reference/test_target/type_definition/integration_point/config/context_only
|
|
255
|
-
11. **Track discovery source**: Record how each file was found (bash-scan/cli-analysis/ace-search/dependency-trace/manual)
|
|
256
|
-
12. **Populate key_code for high-relevance files**: relevance >= 0.7 → key_code array with symbol, location, description
|
|
257
|
-
13. **Populate topic_relation for high-relevance files**: relevance >= 0.7 → topic_relation explaining file-to-angle connection
|
|
244
|
+
2. **Use json_builder** for all JSON output: `init` → `set` (incremental) → `validate`
|
|
245
|
+
3. Include file:line references in findings
|
|
246
|
+
4. **Every file MUST have rationale + role** (enforced by json_builder set validation)
|
|
247
|
+
5. **Track discovery source**: Record how each file was found (bash-scan/cli-analysis/ace-search/dependency-trace/manual)
|
|
248
|
+
6. **Populate key_code + topic_relation for high-relevance files** (relevance >= 0.7; json_builder warns if missing)
|
|
258
249
|
|
|
259
250
|
**Bash Tool**:
|
|
260
251
|
- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution
|
|
261
252
|
|
|
262
253
|
**NEVER**:
|
|
263
|
-
1. Modify any files (read-only agent)
|
|
264
|
-
2.
|
|
265
|
-
3.
|
|
266
|
-
4. Assume structure - ALWAYS verify against schema
|
|
267
|
-
5. Omit required fields
|
|
254
|
+
1. Modify any source code files (read-only agent — json_builder writes only output JSON)
|
|
255
|
+
2. Hand-write JSON output — always use json_builder
|
|
256
|
+
3. Skip the `validate` step before returning
|
|
268
257
|
</operational_rules>
|
|
269
258
|
|
|
270
259
|
<output_contract>
|
|
@@ -282,11 +271,8 @@ When exploration is complete, return one of:
|
|
|
282
271
|
|
|
283
272
|
Before returning, verify:
|
|
284
273
|
- [ ] All 4 phases were executed (or skipped with justification)
|
|
285
|
-
- [ ]
|
|
286
|
-
- [ ]
|
|
287
|
-
- [ ] Every file entry has rationale (specific, >10 chars) and role
|
|
288
|
-
- [ ] High-relevance files (>= 0.7) have key_code and topic_relation
|
|
274
|
+
- [ ] json_builder `init` was called at start
|
|
275
|
+
- [ ] json_builder `validate` returned `valid: true` (or all errors were fixed)
|
|
289
276
|
- [ ] Discovery sources are tracked for all findings
|
|
290
|
-
- [ ] No files were modified (read-only agent)
|
|
291
|
-
- [ ] Output format matches schema root structure (array vs object)
|
|
277
|
+
- [ ] No source code files were modified (read-only agent)
|
|
292
278
|
</quality_gate>
|
|
@@ -139,16 +139,15 @@ When `process_docs: true`, generate planning-context.md before sub-plan.json:
|
|
|
139
139
|
|
|
140
140
|
## Schema-Driven Output
|
|
141
141
|
|
|
142
|
-
**CRITICAL**:
|
|
143
|
-
- `plan
|
|
144
|
-
- `plan-
|
|
142
|
+
**CRITICAL**: Get schema info via json_builder to determine output structure:
|
|
143
|
+
- `ccw tool exec json_builder '{"cmd":"info","schema":"plan"}'` → Implementation plan with `approach`, `complexity`
|
|
144
|
+
- `ccw tool exec json_builder '{"cmd":"info","schema":"plan-fix"}'` → Fix plan with `root_cause`, `severity`, `risk_level`
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const planObject = generatePlanFromSchema(schema, context)
|
|
146
|
+
After generating plan.json and .task/*.json, validate:
|
|
147
|
+
```bash
|
|
148
|
+
ccw tool exec json_builder '{"cmd":"validate","target":"<session>/plan.json","schema":"plan"}'
|
|
149
|
+
# For each task file:
|
|
150
|
+
ccw tool exec json_builder '{"cmd":"validate","target":"<session>/.task/TASK-001.json","schema":"task"}'
|
|
152
151
|
```
|
|
153
152
|
|
|
154
153
|
</schema_driven_output>
|
|
@@ -863,7 +862,7 @@ function validateTask(task) {
|
|
|
863
862
|
|
|
864
863
|
**ALWAYS**:
|
|
865
864
|
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
866
|
-
- **
|
|
865
|
+
- **Get schema info via json_builder** to determine output structure
|
|
867
866
|
- Generate task IDs (TASK-001/TASK-002 for plan, FIX-001/FIX-002 for fix-plan)
|
|
868
867
|
- Include depends_on (even if empty [])
|
|
869
868
|
- **Assign cli_execution_id** (`{sessionId}-{taskId}`)
|
|
@@ -981,7 +980,7 @@ Upon completion, return one of:
|
|
|
981
980
|
|
|
982
981
|
Before returning, verify:
|
|
983
982
|
|
|
984
|
-
- [ ] Schema
|
|
983
|
+
- [ ] Schema info was obtained via json_builder and output structure matches schema type (base vs fix)
|
|
985
984
|
- [ ] All tasks have valid IDs (TASK-NNN or FIX-NNN format)
|
|
986
985
|
- [ ] All tasks have 2+ implementation steps
|
|
987
986
|
- [ ] All convergence criteria are quantified and testable (no vague language)
|
|
@@ -348,7 +348,7 @@ Write({ file_path: filePath, content: newContent })
|
|
|
348
348
|
.workflow/issues/solutions/{issue-id}.jsonl
|
|
349
349
|
```
|
|
350
350
|
|
|
351
|
-
Each line is a solution JSON containing tasks. Schema: `
|
|
351
|
+
Each line is a solution JSON containing tasks. Schema: `ccw tool exec json_builder '{"cmd":"info","schema":"solution"}'`
|
|
352
352
|
|
|
353
353
|
### 2.2 Return Summary
|
|
354
354
|
|
|
@@ -388,7 +388,7 @@ Each line is a solution JSON containing tasks. Schema: `cat ~/.ccw/workflows/cli
|
|
|
388
388
|
|
|
389
389
|
**ALWAYS**:
|
|
390
390
|
1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
391
|
-
2.
|
|
391
|
+
2. Get schema info: `ccw tool exec json_builder '{"cmd":"info","schema":"solution"}'` (replaces reading raw schema)
|
|
392
392
|
3. Use ACE semantic search as PRIMARY exploration tool
|
|
393
393
|
4. Fetch issue details via `ccw issue status <id> --json`
|
|
394
394
|
5. **Analyze failure history**: Check `issue.feedback` for type='failure', stage='execute'
|
|
@@ -408,6 +408,11 @@ Each line is a solution JSON containing tasks. Schema: `cat ~/.ccw/workflows/cli
|
|
|
408
408
|
4. **Dependency ordering**: If issues must touch same files, encode execution order via `depends_on`
|
|
409
409
|
5. **Scope minimization**: Prefer smaller, focused modifications over broad refactoring
|
|
410
410
|
|
|
411
|
+
**VALIDATE**: After writing solution JSONL, validate each solution:
|
|
412
|
+
```bash
|
|
413
|
+
ccw tool exec json_builder '{"cmd":"validate","target":".workflow/issues/solutions/<issue-id>.jsonl","schema":"solution"}'
|
|
414
|
+
```
|
|
415
|
+
|
|
411
416
|
**NEVER**:
|
|
412
417
|
1. Execute implementation (return plan only)
|
|
413
418
|
2. Use vague criteria ("works correctly", "good performance")
|
|
@@ -129,7 +129,7 @@ Task(
|
|
|
129
129
|
Analyze project for workflow initialization and generate .workflow/project-tech.json.
|
|
130
130
|
|
|
131
131
|
## MANDATORY FIRST STEPS
|
|
132
|
-
1. Execute:
|
|
132
|
+
1. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"tech"}' (get schema summary)
|
|
133
133
|
2. Execute: ccw tool exec get_modules_by_depth '{}' (get project structure)
|
|
134
134
|
|
|
135
135
|
## Task
|
|
@@ -401,7 +401,7 @@ Task(
|
|
|
401
401
|
1. Read review state: ${reviewStateJsonPath}
|
|
402
402
|
2. Get target files: Read resolved_files from review-state.json
|
|
403
403
|
3. Validate file access: bash(ls -la ${targetFiles.join(' ')})
|
|
404
|
-
4. Execute:
|
|
404
|
+
4. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"review-dim"}' (get output schema summary)
|
|
405
405
|
5. Read: .workflow/project-tech.json (technology stack and architecture context)
|
|
406
406
|
6. Read: .workflow/specs/*.md (user-defined constraints and conventions to validate against)
|
|
407
407
|
|
|
@@ -456,7 +456,7 @@ Task(
|
|
|
456
456
|
${getDimensionGuidance(dimension)}
|
|
457
457
|
|
|
458
458
|
## Success Criteria
|
|
459
|
-
- [ ] Schema obtained via
|
|
459
|
+
- [ ] Schema obtained via json_builder info
|
|
460
460
|
- [ ] All target files analyzed for ${dimension} concerns
|
|
461
461
|
- [ ] All findings include file:line references with code snippets
|
|
462
462
|
- [ ] Severity assessment follows established criteria (see reference)
|
|
@@ -505,7 +505,7 @@ Task(
|
|
|
505
505
|
2. Read affected file: ${file}
|
|
506
506
|
3. Identify related code: bash(grep -r "import.*${basename(file)}" ${projectDir}/src --include="*.ts")
|
|
507
507
|
4. Read test files: bash(find ${projectDir}/tests -name "*${basename(file, '.ts')}*" -type f)
|
|
508
|
-
5. Execute:
|
|
508
|
+
5. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"review-deep"}' (get output schema summary)
|
|
509
509
|
6. Read: .workflow/project-tech.json (technology stack and architecture context)
|
|
510
510
|
7. Read: .workflow/specs/*.md (user-defined constraints for remediation compliance)
|
|
511
511
|
|
|
@@ -538,7 +538,7 @@ Task(
|
|
|
538
538
|
- Impact assessment and rollback strategy
|
|
539
539
|
|
|
540
540
|
## Success Criteria
|
|
541
|
-
- [ ] Schema obtained via
|
|
541
|
+
- [ ] Schema obtained via json_builder info
|
|
542
542
|
- [ ] Root cause clearly identified with supporting evidence
|
|
543
543
|
- [ ] Remediation plan is step-by-step actionable with exact file:line references
|
|
544
544
|
- [ ] Each step includes specific commands and validation tests
|
|
@@ -412,7 +412,7 @@ Task(
|
|
|
412
412
|
2. Read completed task summaries: bash(find ${summariesDir} -name "IMPL-*.md" -type f)
|
|
413
413
|
3. Get changed files: bash(cd ${workflowDir} && git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u)
|
|
414
414
|
4. Read review state: ${reviewStateJsonPath}
|
|
415
|
-
5. Execute:
|
|
415
|
+
5. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"review-dim"}' (get output schema summary)
|
|
416
416
|
6. Read: .workflow/project-tech.json (technology stack and architecture context)
|
|
417
417
|
7. Read: .workflow/specs/*.md (user-defined constraints and conventions to validate against)
|
|
418
418
|
|
|
@@ -467,7 +467,7 @@ Task(
|
|
|
467
467
|
${getDimensionGuidance(dimension)}
|
|
468
468
|
|
|
469
469
|
## Success Criteria
|
|
470
|
-
- [ ] Schema obtained via
|
|
470
|
+
- [ ] Schema obtained via json_builder info
|
|
471
471
|
- [ ] All changed files analyzed for ${dimension} concerns
|
|
472
472
|
- [ ] All findings include file:line references with code snippets
|
|
473
473
|
- [ ] Severity assessment follows established criteria (see reference)
|
|
@@ -516,7 +516,7 @@ Task(
|
|
|
516
516
|
2. Read affected file: ${file}
|
|
517
517
|
3. Identify related code: bash(grep -r "import.*${basename(file)}" ${workflowDir}/src --include="*.ts")
|
|
518
518
|
4. Read test files: bash(find ${workflowDir}/tests -name "*${basename(file, '.ts')}*" -type f)
|
|
519
|
-
5. Execute:
|
|
519
|
+
5. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"review-deep"}' (get output schema summary)
|
|
520
520
|
6. Read: .workflow/project-tech.json (technology stack and architecture context)
|
|
521
521
|
7. Read: .workflow/specs/*.md (user-defined constraints for remediation compliance)
|
|
522
522
|
|
|
@@ -550,7 +550,7 @@ Task(
|
|
|
550
550
|
- Impact assessment and rollback strategy
|
|
551
551
|
|
|
552
552
|
## Success Criteria
|
|
553
|
-
- [ ] Schema obtained via
|
|
553
|
+
- [ ] Schema obtained via json_builder info
|
|
554
554
|
- [ ] Root cause clearly identified with supporting evidence
|
|
555
555
|
- [ ] Remediation plan is step-by-step actionable with exact file:line references
|
|
556
556
|
- [ ] Each step includes specific commands and validation tests
|
|
@@ -246,8 +246,8 @@ Agent({
|
|
|
246
246
|
description: "Generate implementation plan",
|
|
247
247
|
prompt: `
|
|
248
248
|
## Schema Reference
|
|
249
|
-
Execute:
|
|
250
|
-
Execute:
|
|
249
|
+
Execute: ccw tool exec json_builder '{"cmd":"info","schema":"plan"}'
|
|
250
|
+
Execute: ccw tool exec json_builder '{"cmd":"info","schema":"task"}'
|
|
251
251
|
|
|
252
252
|
## Output Format: Two-Layer Structure
|
|
253
253
|
- plan.json: Overview with task_ids[] referencing .task/ files (NO tasks[] array)
|
|
@@ -70,7 +70,7 @@ Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=`
|
|
|
70
70
|
## Analysis Steps
|
|
71
71
|
|
|
72
72
|
### 0. Load Output Schema (MANDATORY)
|
|
73
|
-
Execute:
|
|
73
|
+
Execute: ccw tool exec json_builder '{"cmd":"info","schema":"conflict"}' (get schema summary)
|
|
74
74
|
|
|
75
75
|
### 1. Load Context
|
|
76
76
|
- Read existing files from conflict_detection.existing_files
|
|
@@ -119,7 +119,7 @@ Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=`
|
|
|
119
119
|
|
|
120
120
|
Output to conflict-resolution.json (generated in Phase 4)
|
|
121
121
|
|
|
122
|
-
**Schema Reference**: Execute
|
|
122
|
+
**Schema Reference**: Execute ccw tool exec json_builder '{"cmd":"info","schema":"conflict"}' to get schema summary
|
|
123
123
|
|
|
124
124
|
Return JSON following the schema. Key requirements:
|
|
125
125
|
- Minimum 2 strategies per conflict, max 4
|
|
@@ -195,8 +195,8 @@ Task(
|
|
|
195
195
|
## Plan Verification Task
|
|
196
196
|
|
|
197
197
|
### MANDATORY FIRST STEPS
|
|
198
|
-
1.
|
|
199
|
-
2.
|
|
198
|
+
1. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"plan-verify"}' (dimensions & rules)
|
|
199
|
+
2. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"verify"}' (output schema)
|
|
200
200
|
3. Read: ${session_file} (user intent)
|
|
201
201
|
4. Read: ${PLANNING_NOTES} (constraints & N+1 context)
|
|
202
202
|
5. Read: ${IMPL_PLAN} (implementation plan)
|
|
@@ -99,7 +99,7 @@ Execute **${angle}** exploration for TDD task planning context. Analyze codebase
|
|
|
99
99
|
## MANDATORY FIRST STEPS (Execute by Agent)
|
|
100
100
|
1. Run: ccw tool exec get_modules_by_depth '{}' (project structure)
|
|
101
101
|
2. Run: rg -l "{keyword_from_task}" --type ts (locate relevant files)
|
|
102
|
-
3. Execute:
|
|
102
|
+
3. Execute: ccw tool exec json_builder '{"cmd":"init","schema":"explore","output":"${sessionFolder}/exploration-${angle}.json"}' (init output + get schema info)
|
|
103
103
|
|
|
104
104
|
## Exploration Strategy (${angle} focus)
|
|
105
105
|
|
|
@@ -121,7 +121,7 @@ Execute **${angle}** exploration for TDD task planning context. Analyze codebase
|
|
|
121
121
|
|
|
122
122
|
**File**: ${sessionFolder}/exploration-${angle}.json
|
|
123
123
|
|
|
124
|
-
**Schema Reference**:
|
|
124
|
+
**Schema Reference**: Skeleton initialized via json_builder in step 3. Use `set` to populate fields, `validate` before returning.
|
|
125
125
|
|
|
126
126
|
**Required Fields** (all ${angle} focused):
|
|
127
127
|
- project_structure: Modules/architecture relevant to ${angle}
|
|
@@ -141,7 +141,7 @@ Execute **${angle}** exploration for TDD task planning context. Analyze codebase
|
|
|
141
141
|
- _metadata.exploration_angle: "${angle}"
|
|
142
142
|
|
|
143
143
|
## Success Criteria
|
|
144
|
-
- [ ] Schema
|
|
144
|
+
- [ ] Schema initialized via json_builder init
|
|
145
145
|
- [ ] get_modules_by_depth.sh executed
|
|
146
146
|
- [ ] At least 3 relevant files identified with ${angle} rationale
|
|
147
147
|
- [ ] Patterns are actionable (code examples, not generic advice)
|
|
@@ -70,7 +70,7 @@ Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=`
|
|
|
70
70
|
## Analysis Steps
|
|
71
71
|
|
|
72
72
|
### 0. Load Output Schema (MANDATORY)
|
|
73
|
-
Execute:
|
|
73
|
+
Execute: ccw tool exec json_builder '{"cmd":"info","schema":"conflict"}'
|
|
74
74
|
|
|
75
75
|
### 1. Load Context
|
|
76
76
|
- Read existing files from conflict_detection.existing_files
|
|
@@ -119,7 +119,7 @@ Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=`
|
|
|
119
119
|
|
|
120
120
|
Output to conflict-resolution.json (generated in Phase 4)
|
|
121
121
|
|
|
122
|
-
**Schema Reference**: Execute
|
|
122
|
+
**Schema Reference**: Execute ccw tool exec json_builder '{"cmd":"info","schema":"conflict"}' to get schema summary
|
|
123
123
|
|
|
124
124
|
Return JSON following the schema. Key requirements:
|
|
125
125
|
- Minimum 2 strategies per conflict, max 4
|
|
@@ -223,7 +223,7 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
|
|
|
223
223
|
## MANDATORY FIRST STEPS (Execute by Agent)
|
|
224
224
|
1. Run: ccw tool exec get_modules_by_depth '{}' (project structure)
|
|
225
225
|
2. Run: rg -l "{keyword_from_task}" --type ts (locate relevant files)
|
|
226
|
-
3. Execute:
|
|
226
|
+
3. Execute: ccw tool exec json_builder '{"cmd":"init","schema":"explore","output":"${sessionFolder}/exploration-${angle}.json"}' (init output + get schema info)
|
|
227
227
|
|
|
228
228
|
## Exploration Strategy (${angle} focus)
|
|
229
229
|
|
|
@@ -265,7 +265,7 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
|
|
|
265
265
|
- _metadata.exploration_angle: "${angle}"
|
|
266
266
|
|
|
267
267
|
## Success Criteria
|
|
268
|
-
- [ ] Schema
|
|
268
|
+
- [ ] Schema initialized via json_builder init
|
|
269
269
|
- [ ] get_modules_by_depth.sh executed
|
|
270
270
|
- [ ] At least 3 relevant files identified with ${angle} rationale
|
|
271
271
|
- [ ] Patterns are actionable (code examples, not generic advice)
|
package/.codex/AGENTS.md
CHANGED
|
@@ -105,6 +105,22 @@ ACE search_context (semantic) → smart_search (structured) → read_file (batch
|
|
|
105
105
|
|
|
106
106
|
**NEVER** use shell commands (`cat`, `find`, `grep`) when MCP tools are available.
|
|
107
107
|
|
|
108
|
+
## Workflow Session Awareness
|
|
109
|
+
|
|
110
|
+
| Workflow | Directory | Summary File |
|
|
111
|
+
|----------|-----------|-------------|
|
|
112
|
+
| `workflow-plan` | `.workflow/active/WFS-*/` | `workflow-session.json` |
|
|
113
|
+
| `workflow-lite-plan` | `.workflow/.lite-plan/{slug}-{date}/` | `plan.json` |
|
|
114
|
+
| `analyze-with-file` | `.workflow/.analysis/ANL-*/` | `conclusions.json` |
|
|
115
|
+
| `multi-cli-plan` | `.workflow/.multi-cli-plan/*/` | `session-state.json` |
|
|
116
|
+
| `lite-fix` | `.workflow/.lite-fix/*/` | `fix-plan.json` |
|
|
117
|
+
| Other | `.workflow/.debug/`, `.workflow/.scratchpad/`, `.workflow/archives/` | — |
|
|
118
|
+
|
|
119
|
+
Before starting work, scan recent sessions (7 days) to avoid conflicts and reuse prior work:
|
|
120
|
+
- Overlapping file scope → warn, suggest referencing prior session
|
|
121
|
+
- Complementary findings → feed into current task context
|
|
122
|
+
|
|
123
|
+
|
|
108
124
|
## Execution Checklist
|
|
109
125
|
|
|
110
126
|
**Before**:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,kBAAkB,CAAC;AAgC/D,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE;AA8DD;;GAEG;AACH,iBAAS,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAK5C;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAM9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAEvD;AA6CD;;GAEG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC;IAC7F,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAsDD;AA+BD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAa7D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,EAAE,CAEhD;AAgCD,OAAO,EAAE,YAAY,EAAE,CAAC;AAGxB,YAAY,EAAE,UAAU,EAAE,CAAC;AAG3B,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnH,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
package/ccw/dist/tools/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import * as contextCacheMod from './context-cache.js';
|
|
|
24
24
|
import * as skillContextLoaderMod from './skill-context-loader.js';
|
|
25
25
|
import * as askQuestionMod from './ask-question.js';
|
|
26
26
|
import * as teamMsgMod from './team-msg.js';
|
|
27
|
+
import * as jsonBuilderMod from './json-builder.js';
|
|
27
28
|
// Import legacy JS tools
|
|
28
29
|
import { uiGeneratePreviewTool } from './ui-generate-preview.js';
|
|
29
30
|
import { uiInstantiatePrototypesTool } from './ui-instantiate-prototypes.js';
|
|
@@ -266,6 +267,7 @@ registerTool(toLegacyTool(contextCacheMod));
|
|
|
266
267
|
registerTool(toLegacyTool(skillContextLoaderMod));
|
|
267
268
|
registerTool(toLegacyTool(askQuestionMod));
|
|
268
269
|
registerTool(toLegacyTool(teamMsgMod));
|
|
270
|
+
registerTool(toLegacyTool(jsonBuilderMod));
|
|
269
271
|
// Register legacy JS tools
|
|
270
272
|
registerTool(uiGeneratePreviewTool);
|
|
271
273
|
registerTool(uiInstantiatePrototypesTool);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,sDAAsD;AACtD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,uBAAuB,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,sBAAsB,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,qBAAqB,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,uEAAuE;AACvE,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK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-compliant JSON skeleton
|
|
6
|
+
* set — Set/append fields with instant validation
|
|
7
|
+
* validate — Full schema + semantic validation
|
|
8
|
+
* merge — Merge multiple same-schema JSONs
|
|
9
|
+
* info — Get schema summary (replaces agent reading raw schema)
|
|
10
|
+
*
|
|
11
|
+
* Replaces agent hand-writing JSON + self-validation with tool-assisted
|
|
12
|
+
* incremental build + automatic validation.
|
|
13
|
+
*/
|
|
14
|
+
import type { ToolSchema, ToolResult } from '../types/tool.js';
|
|
15
|
+
export declare const schema: ToolSchema;
|
|
16
|
+
export declare function handler(params: Record<string, unknown>): Promise<ToolResult>;
|
|
17
|
+
//# sourceMappingURL=json-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-builder.d.ts","sourceRoot":"","sources":["../../src/tools/json-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAiC/D,eAAO,MAAM,MAAM,EAAE,UAwBpB,CAAC;AAIF,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAoBlF"}
|