claude-code-workflow 7.2.8 → 7.2.10
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 +0 -4
- package/.codex/skills/analyze-with-file/SKILL.md +62 -103
- package/.codex/skills/roadmap-with-file/SKILL.md +11 -17
- package/ccw/dist/core/routes/codexlens-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens-routes.js +4 -1
- package/ccw/dist/core/routes/codexlens-routes.js.map +1 -1
- package/package.json +1 -1
- package/.codex/skills/analyze-with-file/EXECUTE.md +0 -716
package/.claude/CLAUDE.md
CHANGED
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
**Strictly follow the cli-tools.json configuration**
|
|
11
11
|
|
|
12
12
|
Available CLI endpoints are dynamically defined by the config file
|
|
13
|
-
## Tool Execution
|
|
14
|
-
|
|
15
|
-
- **Context Requirements**: @~/.ccw/workflows/context-tools.md
|
|
16
|
-
- **File Modification**: @~/.ccw/workflows/file-modification.md
|
|
17
13
|
|
|
18
14
|
### Agent Calls
|
|
19
15
|
- **Always use `run_in_background: false`** for Agent tool calls: `Agent({ subagent_type: "xxx", prompt: "...", run_in_background: false })` to ensure synchronous execution and immediate result visibility
|
|
@@ -10,14 +10,14 @@ argument-hint: "TOPIC=\"<question or topic>\" [--depth=quick|standard|deep] [--c
|
|
|
10
10
|
|
|
11
11
|
Interactive collaborative analysis workflow with **documented discussion process**. Records understanding evolution, facilitates multi-round Q&A, and uses inline search tools for deep exploration.
|
|
12
12
|
|
|
13
|
-
**Core workflow**: Topic → Explore → Discuss → Document → Refine → Conclude →
|
|
13
|
+
**Core workflow**: Topic → Explore → Discuss → Document → Refine → Conclude → Plan Checklist
|
|
14
14
|
|
|
15
15
|
**Key features**:
|
|
16
16
|
- **Documented discussion timeline**: Captures understanding evolution across all phases
|
|
17
17
|
- **Decision recording at every critical point**: Mandatory recording of key findings, direction changes, and trade-offs
|
|
18
18
|
- **Multi-perspective analysis**: Supports up to 4 analysis perspectives (serial, inline)
|
|
19
19
|
- **Interactive discussion**: Multi-round Q&A with user feedback and direction adjustments
|
|
20
|
-
- **
|
|
20
|
+
- **Plan output**: Generate structured plan checklist for downstream execution (e.g., `$csv-wave-pipeline`)
|
|
21
21
|
|
|
22
22
|
### Decision Recording Protocol
|
|
23
23
|
|
|
@@ -128,17 +128,11 @@ Step 4: Synthesis & Conclusion
|
|
|
128
128
|
├─ Consolidate all insights → conclusions.json (with steps[] per recommendation)
|
|
129
129
|
├─ Update discussion.md with final synthesis
|
|
130
130
|
├─ Interactive Recommendation Review (per-recommendation confirm/modify/reject)
|
|
131
|
-
└─ Offer options:
|
|
132
|
-
|
|
133
|
-
Step 5:
|
|
134
|
-
├─
|
|
135
|
-
└─
|
|
136
|
-
├─ Enrich recommendations → generate .task/TASK-*.json
|
|
137
|
-
├─ Pre-execution analysis (dependencies, file conflicts, execution order)
|
|
138
|
-
├─ User confirmation
|
|
139
|
-
├─ Direct inline execution (Read/Edit/Write/Grep/Glob/Bash)
|
|
140
|
-
├─ Record events → execution-events.md, update execution.md
|
|
141
|
-
└─ Report completion summary
|
|
131
|
+
└─ Offer options: generate plan / create issue / export / done
|
|
132
|
+
|
|
133
|
+
Step 5: Plan Generation (Optional - produces plan only, NO code modifications)
|
|
134
|
+
├─ Generate inline plan checklist → appended to discussion.md
|
|
135
|
+
└─ Remind user to execute via $csv-wave-pipeline
|
|
142
136
|
```
|
|
143
137
|
|
|
144
138
|
## Configuration
|
|
@@ -817,7 +811,7 @@ for (const [index, rec] of sortedRecs.entries()) {
|
|
|
817
811
|
|
|
818
812
|
##### Step 4.4: Post-Completion Options
|
|
819
813
|
|
|
820
|
-
**Complexity Assessment** — determine
|
|
814
|
+
**Complexity Assessment** — determine available options:
|
|
821
815
|
|
|
822
816
|
```javascript
|
|
823
817
|
// Assess recommendation complexity to decide available options
|
|
@@ -833,9 +827,9 @@ function assessComplexity(recs) {
|
|
|
833
827
|
|
|
834
828
|
// Complexity → available options mapping:
|
|
835
829
|
// none: Done | Create Issue | Export Report
|
|
836
|
-
// simple: Done | Create Issue | Export Report
|
|
837
|
-
// moderate:
|
|
838
|
-
// complex:
|
|
830
|
+
// simple: Done | Create Issue | Export Report
|
|
831
|
+
// moderate: Generate Plan | Create Issue | Export Report | Done
|
|
832
|
+
// complex: Generate Plan | Create Issue | Export Report | Done
|
|
839
833
|
```
|
|
840
834
|
|
|
841
835
|
```javascript
|
|
@@ -850,9 +844,9 @@ if (!autoYes) {
|
|
|
850
844
|
}]
|
|
851
845
|
})
|
|
852
846
|
} else {
|
|
853
|
-
// Auto mode: generate
|
|
847
|
+
// Auto mode: generate plan only for moderate/complex, skip for simple/none
|
|
854
848
|
if (complexity === 'complex' || complexity === 'moderate') {
|
|
855
|
-
// → Phase 5
|
|
849
|
+
// → Phase 5 (plan generation only, NO code modifications)
|
|
856
850
|
} else {
|
|
857
851
|
// → Done (conclusions.json is sufficient output)
|
|
858
852
|
}
|
|
@@ -865,14 +859,13 @@ if (!autoYes) {
|
|
|
865
859
|
|------------|-------------------|-----------|
|
|
866
860
|
| `none` | Done, Create Issue, Export Report | No actionable recommendations |
|
|
867
861
|
| `simple` | Done, Create Issue, Export Report | 1-2 low-priority items don't warrant formal task JSON |
|
|
868
|
-
| `moderate` | Generate
|
|
869
|
-
| `complex` |
|
|
862
|
+
| `moderate` | Generate Plan, Create Issue, Export Report, Done | Task structure helpful for downstream execution |
|
|
863
|
+
| `complex` | Generate Plan, Create Issue, Export Report, Done | Full plan generation justified |
|
|
870
864
|
|
|
871
865
|
| Selection | Action |
|
|
872
866
|
|-----------|--------|
|
|
873
|
-
|
|
|
867
|
+
| Generate Plan | Jump to Phase 5 (plan generation only, NO code modifications) |
|
|
874
868
|
| Create Issue | `Skill(skill="issue:new", args="...")` (only reviewed recs) |
|
|
875
|
-
| Generate Task | Jump to Phase 5 Step 5.1-5.2 only (generate .task/*.json, no execution) |
|
|
876
869
|
| Export Report | Copy discussion.md + conclusions.json to user-specified location |
|
|
877
870
|
| Done | Display artifact paths, end |
|
|
878
871
|
|
|
@@ -883,96 +876,64 @@ if (!autoYes) {
|
|
|
883
876
|
- User offered meaningful next step options
|
|
884
877
|
- **Complete decision trail** documented and traceable from initial scoping to final conclusions
|
|
885
878
|
|
|
886
|
-
### Phase 5:
|
|
887
|
-
|
|
888
|
-
**Objective**: Execute analysis recommendations — route by complexity.
|
|
889
|
-
|
|
890
|
-
**Trigger**: User selects "Quick Execute" in Phase 4. In auto mode, triggered only for `moderate`/`complex` recommendations.
|
|
879
|
+
### Phase 5: Plan Generation (Optional — NO code modifications)
|
|
891
880
|
|
|
892
|
-
**
|
|
893
|
-
|
|
894
|
-
```
|
|
895
|
-
complexity assessment (from Phase 4.3)
|
|
896
|
-
├─ simple/moderate (≤2 recommendations, clear changes)
|
|
897
|
-
│ └─ Direct inline execution — no .task/*.json overhead
|
|
898
|
-
└─ complex (≥3 recommendations, or high-priority with dependencies)
|
|
899
|
-
└─ Route to EXECUTE.md — full pipeline (task generation → execution)
|
|
900
|
-
```
|
|
881
|
+
**Objective**: Generate structured plan checklist from analysis recommendations. **This phase produces plans only — it does NOT modify any source code.**
|
|
901
882
|
|
|
902
|
-
|
|
883
|
+
**Trigger**: User selects "Generate Plan" in Phase 4. In auto mode, triggered only for `moderate`/`complex` recommendations.
|
|
903
884
|
|
|
904
885
|
```javascript
|
|
905
886
|
const recs = conclusions.recommendations || []
|
|
906
887
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
```
|
|
888
|
+
// Build plan checklist from all accepted/modified recommendations
|
|
889
|
+
const planChecklist = recs
|
|
890
|
+
.filter(r => r.review_status !== 'rejected')
|
|
891
|
+
.map((rec, index) => {
|
|
892
|
+
const files = rec.evidence_refs
|
|
893
|
+
?.filter(ref => ref.includes(':'))
|
|
894
|
+
.map(ref => ref.split(':')[0]) || []
|
|
915
895
|
|
|
916
|
-
|
|
896
|
+
return `### ${index + 1}. ${rec.action}
|
|
897
|
+
- **Priority**: ${rec.priority}
|
|
898
|
+
- **Rationale**: ${rec.rationale}
|
|
899
|
+
- **Target files**: ${files.join(', ') || 'TBD'}
|
|
900
|
+
- **Evidence**: ${rec.evidence_refs?.join(', ') || 'N/A'}
|
|
901
|
+
- [ ] Ready for execution`
|
|
902
|
+
}).join('\n\n')
|
|
917
903
|
|
|
918
|
-
|
|
904
|
+
// Append plan checklist to discussion.md
|
|
905
|
+
appendToDiscussion(`
|
|
906
|
+
## Plan Checklist
|
|
919
907
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
recs.forEach((rec, index) => {
|
|
923
|
-
// 1. Locate relevant files from evidence_refs or codebase search
|
|
924
|
-
const files = rec.evidence_refs
|
|
925
|
-
?.filter(ref => ref.includes(':'))
|
|
926
|
-
.map(ref => ref.split(':')[0]) || []
|
|
908
|
+
> **This is a plan only — no code was modified.**
|
|
909
|
+
> To execute, use: \`$csv-wave-pipeline "<requirement summary>"\`
|
|
927
910
|
|
|
928
|
-
|
|
929
|
-
|
|
911
|
+
- **Recommendations**: ${recs.length}
|
|
912
|
+
- **Generated**: ${getUtc8ISOString()}
|
|
930
913
|
|
|
931
|
-
|
|
932
|
-
// Use Edit (preferred) for modifications, Write for new files
|
|
914
|
+
${planChecklist}
|
|
933
915
|
|
|
934
|
-
|
|
935
|
-
})
|
|
916
|
+
---
|
|
936
917
|
|
|
937
|
-
|
|
938
|
-
appendToDiscussion(`
|
|
939
|
-
## Quick Execution Summary
|
|
918
|
+
### Next Step: Execute
|
|
940
919
|
|
|
941
|
-
-
|
|
942
|
-
- **Completed**: ${getUtc8ISOString()}
|
|
920
|
+
Run \`$csv-wave-pipeline\` to execute these recommendations as wave-based batch tasks:
|
|
943
921
|
|
|
944
|
-
|
|
945
|
-
-
|
|
946
|
-
|
|
947
|
-
- **Evidence**: ${rec.evidence_refs?.join(', ') || 'N/A'}
|
|
948
|
-
`).join('\n')}
|
|
922
|
+
\`\`\`bash
|
|
923
|
+
$csv-wave-pipeline "${topic}"
|
|
924
|
+
\`\`\`
|
|
949
925
|
`)
|
|
950
926
|
```
|
|
951
927
|
|
|
952
|
-
**
|
|
953
|
-
-
|
|
954
|
-
- No
|
|
955
|
-
-
|
|
956
|
-
- Suitable for 1-2 clear, low-risk recommendations
|
|
957
|
-
|
|
958
|
-
##### Step 5.3: Complex Path — EXECUTE.md Pipeline
|
|
959
|
-
|
|
960
|
-
For complex recommendations, follow the full specification in `EXECUTE.md`:
|
|
961
|
-
|
|
962
|
-
1. **Load context sources**: Reuse in-memory artifacts or read from disk
|
|
963
|
-
2. **Enrich recommendations**: Resolve target files, generate implementation steps, build convergence criteria
|
|
964
|
-
3. **Generate `.task/*.json`**: Individual task files with full execution context
|
|
965
|
-
4. **Pre-execution analysis**: Dependency validation, file conflicts, topological sort
|
|
966
|
-
5. **User confirmation**: Present task list, allow adjustment
|
|
967
|
-
6. **Serial execution**: Execute each task following generated implementation steps
|
|
968
|
-
7. **Finalize**: Update task states, write execution artifacts
|
|
969
|
-
|
|
970
|
-
**Full specification**: `EXECUTE.md`
|
|
928
|
+
**Characteristics**:
|
|
929
|
+
- Plan checklist appended directly to `discussion.md`
|
|
930
|
+
- **No code modifications** — plan output only
|
|
931
|
+
- Reminds user to use `$csv-wave-pipeline` for execution
|
|
971
932
|
|
|
972
933
|
**Success Criteria**:
|
|
973
|
-
-
|
|
974
|
-
-
|
|
975
|
-
-
|
|
934
|
+
- Plan checklist in discussion.md with all accepted recommendations
|
|
935
|
+
- User reminded about `$csv-wave-pipeline` for execution
|
|
936
|
+
- **No source code modified** — strictly plan output
|
|
976
937
|
|
|
977
938
|
## Output Structure
|
|
978
939
|
|
|
@@ -989,11 +950,11 @@ For complex recommendations, follow the full specification in `EXECUTE.md`:
|
|
|
989
950
|
└── conclusions.json # Phase 4: Final synthesis with recommendations
|
|
990
951
|
```
|
|
991
952
|
|
|
992
|
-
> **Phase 5
|
|
953
|
+
> **Phase 5** appends a plan checklist to `discussion.md`. No additional files are generated.
|
|
993
954
|
|
|
994
955
|
| File | Phase | Description |
|
|
995
956
|
|------|-------|-------------|
|
|
996
|
-
| `discussion.md` | 1-
|
|
957
|
+
| `discussion.md` | 1-5 | Session metadata → discussion timeline → conclusions. Plan checklist appended here (simple path). |
|
|
997
958
|
| `exploration-codebase.json` | 2 | Codebase context: relevant files, patterns, constraints |
|
|
998
959
|
| `explorations/*.json` | 2 | Per-perspective exploration results (multi only) |
|
|
999
960
|
| `explorations.json` | 2 | Single perspective aggregated findings |
|
|
@@ -1158,16 +1119,13 @@ Remaining questions or areas for investigation
|
|
|
1158
1119
|
| User timeout in discussion | Save state, show resume command | Use `--continue` to resume |
|
|
1159
1120
|
| Max rounds reached (5) | Force synthesis phase | Highlight remaining questions in conclusions |
|
|
1160
1121
|
| Session folder conflict | Append timestamp suffix | Create unique folder and continue |
|
|
1161
|
-
|
|
|
1162
|
-
| Quick execute: verification fails | Mark as unverified | Note in events, manual check |
|
|
1163
|
-
| Quick execute: no recommendations | Cannot generate .task/*.json | Inform user, suggest lite-plan |
|
|
1164
|
-
| Quick execute: simple recommendations | Complexity too low for .task/*.json | Direct inline execution (no task generation) |
|
|
1122
|
+
| Plan generation: no recommendations | No plan to generate | Inform user, suggest lite-plan |
|
|
1165
1123
|
|
|
1166
1124
|
## Best Practices
|
|
1167
1125
|
|
|
1168
1126
|
### Core Principles
|
|
1169
1127
|
|
|
1170
|
-
1. **
|
|
1128
|
+
1. **No code modifications**: This skill is strictly read-only and plan-only. Phase 5 generates plan checklists in `discussion.md` but does NOT modify source code. Use `$csv-wave-pipeline` for execution.
|
|
1171
1129
|
|
|
1172
1130
|
### Before Starting Analysis
|
|
1173
1131
|
|
|
@@ -1204,10 +1162,11 @@ Remaining questions or areas for investigation
|
|
|
1204
1162
|
- Building shared understanding before implementation
|
|
1205
1163
|
- Want to document how understanding evolved
|
|
1206
1164
|
|
|
1207
|
-
**Use
|
|
1165
|
+
**Use Plan Generation (Phase 5) when:**
|
|
1208
1166
|
- Analysis conclusions contain clear, actionable recommendations
|
|
1209
|
-
- Simple: 1-2
|
|
1210
|
-
- Complex: 3+ recommendations
|
|
1167
|
+
- Simple: 1-2 items → inline plan checklist in discussion.md
|
|
1168
|
+
- Complex: 3+ recommendations → detailed plan checklist
|
|
1169
|
+
- **Then execute via**: `$csv-wave-pipeline` for wave-based batch execution
|
|
1211
1170
|
|
|
1212
1171
|
**Consider alternatives when:**
|
|
1213
1172
|
- Specific bug diagnosis needed → use `debug-with-file`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: roadmap-with-file
|
|
3
|
-
description: Strategic requirement roadmap with iterative decomposition and issue creation. Outputs roadmap.md (human-readable, single source) + issues.jsonl (machine-executable). Handoff to
|
|
3
|
+
description: Strategic requirement roadmap with iterative decomposition and issue creation. Outputs roadmap.md (human-readable, single source) + issues.jsonl (machine-executable). Handoff to csv-wave-pipeline.
|
|
4
4
|
argument-hint: "[-y|--yes] [-c|--continue] [-m progressive|direct|auto] \"requirement description\""
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -101,8 +101,8 @@ close_agent({ id: agentId })
|
|
|
101
101
|
|
|
102
102
|
| Artifact | Purpose | Consumer |
|
|
103
103
|
|----------|---------|----------|
|
|
104
|
-
| `roadmap.md` | ⭐ Human-readable strategic roadmap with all context | Human review,
|
|
105
|
-
| `.workflow/issues/issues.jsonl` | Global issue store (appended) |
|
|
104
|
+
| `roadmap.md` | ⭐ Human-readable strategic roadmap with all context | Human review, csv-wave-pipeline handoff |
|
|
105
|
+
| `.workflow/issues/issues.jsonl` | Global issue store (appended) | csv-wave-pipeline, issue commands |
|
|
106
106
|
|
|
107
107
|
### Why No Separate JSON Files?
|
|
108
108
|
|
|
@@ -145,7 +145,7 @@ Strategic requirement roadmap with **iterative decomposition**. Creates a single
|
|
|
145
145
|
│ │
|
|
146
146
|
│ Phase 4: Handoff │
|
|
147
147
|
│ ├─ Final roadmap.md with Issue ID references │
|
|
148
|
-
│ ├─ Options:
|
|
148
|
+
│ ├─ Options: csv-wave-pipeline | view issues | done │
|
|
149
149
|
│ └─ Issues ready in .workflow/issues/issues.jsonl │
|
|
150
150
|
│ │
|
|
151
151
|
└─────────────────────────────────────────────────────────────────────────┘
|
|
@@ -180,7 +180,7 @@ Strategic requirement roadmap with **iterative decomposition**. Creates a single
|
|
|
180
180
|
|
|
181
181
|
.workflow/issues/issues.jsonl # Global issue store (appended)
|
|
182
182
|
# - One JSON object per line
|
|
183
|
-
# - Consumed by
|
|
183
|
+
# - Consumed by csv-wave-pipeline, issue commands
|
|
184
184
|
```
|
|
185
185
|
|
|
186
186
|
---
|
|
@@ -799,8 +799,7 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
|
|
|
799
799
|
type: "choice",
|
|
800
800
|
prompt: `${issueIds.length} issues ready. Next step:`,
|
|
801
801
|
options: [
|
|
802
|
-
{ value: "
|
|
803
|
-
{ value: "wave1", label: "Execute first wave", description: "Run wave-1 issues only" },
|
|
802
|
+
{ value: "csv-wave", label: "Execute with csv-wave-pipeline (Recommended)", description: `Run all ${issueIds.length} issues via wave-based batch execution` },
|
|
804
803
|
{ value: "view", label: "View issues", description: "Display issue details" },
|
|
805
804
|
{ value: "done", label: "Done", description: "Save and exit" }
|
|
806
805
|
]
|
|
@@ -814,14 +813,9 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
|
|
|
814
813
|
3. **Execute Selection**
|
|
815
814
|
```javascript
|
|
816
815
|
switch (nextStep) {
|
|
817
|
-
case '
|
|
818
|
-
// Launch
|
|
819
|
-
|
|
820
|
-
break
|
|
821
|
-
|
|
822
|
-
case 'wave1':
|
|
823
|
-
// Filter issues by wave-1 tag
|
|
824
|
-
Bash(`ccw skill team-planex --tag wave-1 --session ${sessionId}`)
|
|
816
|
+
case 'csv-wave':
|
|
817
|
+
// Launch csv-wave-pipeline for wave-based batch execution
|
|
818
|
+
console.log(`\nTo execute, run:\n\n $csv-wave-pipeline "${requirement}"\n`)
|
|
825
819
|
break
|
|
826
820
|
|
|
827
821
|
case 'view':
|
|
@@ -836,7 +830,7 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
|
|
|
836
830
|
`Issues created: ${issueIds.length}`,
|
|
837
831
|
'',
|
|
838
832
|
'To execute later:',
|
|
839
|
-
` $
|
|
833
|
+
` $csv-wave-pipeline "${requirement}"`,
|
|
840
834
|
` ccw issue list --session ${sessionId}`
|
|
841
835
|
].join('\n'))
|
|
842
836
|
break
|
|
@@ -872,7 +866,7 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
|
|
|
872
866
|
4. **Testable Convergence**: criteria = assertions, DoD = business language
|
|
873
867
|
5. **Explicit Lifecycle**: Always close_agent after wait completes to free resources
|
|
874
868
|
6. **DO NOT STOP**: Continuous workflow until handoff complete
|
|
875
|
-
7. **Plan-Only Modifications**: Interactive feedback (Phase 3) MUST only update `roadmap.md` and `issues.jsonl`. NEVER modify source code, configuration files, or any project files during interactive rounds. Code changes happen only after handoff (Phase 4) via
|
|
869
|
+
7. **Plan-Only Modifications**: Interactive feedback (Phase 3) MUST only update `roadmap.md` and `issues.jsonl`. NEVER modify source code, configuration files, or any project files during interactive rounds. Code changes happen only after handoff (Phase 4) via `$csv-wave-pipeline` or other execution skills
|
|
876
870
|
|
|
877
871
|
---
|
|
878
872
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codexlens-routes.d.ts","sourceRoot":"","sources":["../../../src/core/routes/codexlens-routes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"codexlens-routes.d.ts","sourceRoot":"","sources":["../../../src/core/routes/codexlens-routes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAgL/C;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CA2M/E"}
|
|
@@ -82,6 +82,7 @@ const CODEXLENS_ENV_DEFAULTS = {
|
|
|
82
82
|
CODEXLENS_RERANKER_BATCH_SIZE: '32',
|
|
83
83
|
CODEXLENS_INDEX_WORKERS: '2',
|
|
84
84
|
CODEXLENS_CODE_AWARE_CHUNKING: 'true',
|
|
85
|
+
CODEXLENS_AST_CHUNKING: 'true',
|
|
85
86
|
CODEXLENS_MAX_FILE_SIZE: '1000000',
|
|
86
87
|
CODEXLENS_HNSW_EF: '150',
|
|
87
88
|
CODEXLENS_HNSW_M: '32',
|
|
@@ -118,9 +119,11 @@ function buildMcpServerConfig(savedEnv) {
|
|
|
118
119
|
filteredEnv.CODEXLENS_EMBED_API_MODEL ??= CODEXLENS_ENV_DEFAULTS.CODEXLENS_EMBED_API_MODEL;
|
|
119
120
|
filteredEnv.CODEXLENS_EMBED_DIM ??= CODEXLENS_ENV_DEFAULTS.CODEXLENS_EMBED_DIM;
|
|
120
121
|
}
|
|
122
|
+
// Always enable AST chunking since [ast] extra is included
|
|
123
|
+
filteredEnv.CODEXLENS_AST_CHUNKING ??= 'true';
|
|
121
124
|
return {
|
|
122
125
|
command: 'uvx',
|
|
123
|
-
args: ['--from', 'codexlens-search[mcp]', 'codexlens-mcp'],
|
|
126
|
+
args: ['--from', 'codexlens-search[mcp,ast]', 'codexlens-mcp'],
|
|
124
127
|
...(Object.keys(filteredEnv).length > 0 ? { env: filteredEnv } : {}),
|
|
125
128
|
};
|
|
126
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codexlens-routes.js","sourceRoot":"","sources":["../../../src/core/routes/codexlens-routes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,E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ACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-workflow",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.10",
|
|
4
4
|
"description": "JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "ccw/dist/index.js",
|
|
@@ -1,716 +0,0 @@
|
|
|
1
|
-
# Analyze Task Generation & Execution Spec
|
|
2
|
-
|
|
3
|
-
> **Purpose**: Quality standards for task generation + execution specification for Phase 5 of `analyze-with-file`.
|
|
4
|
-
> **Consumer**: Phase 5 of `analyze-with-file` workflow.
|
|
5
|
-
> **Scope**: Task generation quality + direct inline execution.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Task Generation Flow
|
|
10
|
-
|
|
11
|
-
> **Entry point**: Routed here from SKILL.md Phase 5 when complexity is `complex` (≥3 recommendations or high-priority with dependencies).
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Step 1: Load context → Step 2: Generate .task/*.json → Step 3: Pre-execution analysis
|
|
15
|
-
→ Step 4: User confirmation → Step 5: Serial execution → Step 6: Finalize
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**Input artifacts** (all from session folder):
|
|
19
|
-
|
|
20
|
-
| Artifact | Required | Provides |
|
|
21
|
-
|----------|----------|----------|
|
|
22
|
-
| `conclusions.json` | Yes | `recommendations[]` with action, rationale, priority, evidence_refs |
|
|
23
|
-
| `exploration-codebase.json` | No | `relevant_files[]`, `patterns[]`, `constraints[]`, `integration_points[]` — primary source for file resolution |
|
|
24
|
-
| `explorations.json` | No | `sources[]`, `key_findings[]` — fallback for file resolution |
|
|
25
|
-
| `perspectives.json` | No | Multi-perspective findings — alternative to explorations.json |
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## File Resolution Algorithm
|
|
30
|
-
|
|
31
|
-
Target files are resolved with a 3-priority fallback chain. Recommendations carry only `evidence_refs` — file resolution is EXECUTE.md's responsibility:
|
|
32
|
-
|
|
33
|
-
```javascript
|
|
34
|
-
function resolveTargetFiles(rec, codebaseContext, explorations) {
|
|
35
|
-
// Priority 1: Extract file paths from evidence_refs (e.g., "src/auth/token.ts:89")
|
|
36
|
-
if (rec.evidence_refs?.length) {
|
|
37
|
-
const filePaths = [...new Set(
|
|
38
|
-
rec.evidence_refs
|
|
39
|
-
.filter(ref => ref.includes('/') || ref.includes('.'))
|
|
40
|
-
.map(ref => ref.split(':')[0])
|
|
41
|
-
)]
|
|
42
|
-
if (filePaths.length) {
|
|
43
|
-
return filePaths.map(path => ({
|
|
44
|
-
path,
|
|
45
|
-
action: 'modify',
|
|
46
|
-
target: null,
|
|
47
|
-
changes: []
|
|
48
|
-
}))
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Priority 2: Match from exploration-codebase.json relevant_files
|
|
53
|
-
if (codebaseContext?.relevant_files?.length) {
|
|
54
|
-
const keywords = extractKeywords(rec.action + ' ' + rec.rationale)
|
|
55
|
-
const matched = codebaseContext.relevant_files.filter(f =>
|
|
56
|
-
keywords.some(kw =>
|
|
57
|
-
f.path.toLowerCase().includes(kw) ||
|
|
58
|
-
f.summary?.toLowerCase().includes(kw) ||
|
|
59
|
-
f.relevance?.toLowerCase().includes(kw)
|
|
60
|
-
)
|
|
61
|
-
)
|
|
62
|
-
if (matched.length) {
|
|
63
|
-
return matched.map(f => ({
|
|
64
|
-
path: f.path,
|
|
65
|
-
action: 'modify',
|
|
66
|
-
target: null,
|
|
67
|
-
changes: rec.changes || []
|
|
68
|
-
}))
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Priority 3: Match from explorations.json sources
|
|
73
|
-
if (explorations?.sources?.length) {
|
|
74
|
-
const actionVerb = rec.action.split(' ')[0].toLowerCase()
|
|
75
|
-
const matched = explorations.sources.filter(s =>
|
|
76
|
-
s.summary?.toLowerCase().includes(actionVerb) ||
|
|
77
|
-
s.file?.includes(actionVerb)
|
|
78
|
-
)
|
|
79
|
-
if (matched.length) {
|
|
80
|
-
return matched.map(s => ({
|
|
81
|
-
path: s.file,
|
|
82
|
-
action: 'modify',
|
|
83
|
-
target: null,
|
|
84
|
-
changes: []
|
|
85
|
-
}))
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Fallback: empty array — task relies on description + implementation for guidance
|
|
90
|
-
return []
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function extractKeywords(text) {
|
|
94
|
-
return text
|
|
95
|
-
.toLowerCase()
|
|
96
|
-
.replace(/[^a-z0-9\u4e00-\u9fa5\s]/g, ' ')
|
|
97
|
-
.split(/\s+/)
|
|
98
|
-
.filter(w => w.length > 2)
|
|
99
|
-
.filter(w => !['the', 'and', 'for', 'with', 'from', 'that', 'this'].includes(w))
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## Task Type Inference
|
|
106
|
-
|
|
107
|
-
| Recommendation Pattern | Inferred Type |
|
|
108
|
-
|------------------------|---------------|
|
|
109
|
-
| fix, resolve, repair, patch, correct | `fix` |
|
|
110
|
-
| refactor, restructure, extract, reorganize, decouple | `refactor` |
|
|
111
|
-
| add, implement, create, build, introduce | `feature` |
|
|
112
|
-
| improve, optimize, enhance, upgrade, streamline | `enhancement` |
|
|
113
|
-
| test, coverage, validate, verify, assert | `testing` |
|
|
114
|
-
|
|
115
|
-
```javascript
|
|
116
|
-
function inferTaskType(rec) {
|
|
117
|
-
const text = (rec.action + ' ' + rec.rationale).toLowerCase()
|
|
118
|
-
const patterns = [
|
|
119
|
-
{ type: 'fix', keywords: ['fix', 'resolve', 'repair', 'patch', 'correct', 'bug'] },
|
|
120
|
-
{ type: 'refactor', keywords: ['refactor', 'restructure', 'extract', 'reorganize', 'decouple'] },
|
|
121
|
-
{ type: 'feature', keywords: ['add', 'implement', 'create', 'build', 'introduce'] },
|
|
122
|
-
{ type: 'enhancement', keywords: ['improve', 'optimize', 'enhance', 'upgrade', 'streamline'] },
|
|
123
|
-
{ type: 'testing', keywords: ['test', 'coverage', 'validate', 'verify', 'assert'] }
|
|
124
|
-
]
|
|
125
|
-
for (const p of patterns) {
|
|
126
|
-
if (p.keywords.some(kw => text.includes(kw))) return p.type
|
|
127
|
-
}
|
|
128
|
-
return 'enhancement' // safe default
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
## Effort Inference
|
|
133
|
-
|
|
134
|
-
| Signal | Effort |
|
|
135
|
-
|--------|--------|
|
|
136
|
-
| priority=high AND files >= 3 | `large` |
|
|
137
|
-
| priority=high OR files=2 | `medium` |
|
|
138
|
-
| priority=medium AND files <= 1 | `medium` |
|
|
139
|
-
| priority=low OR single file | `small` |
|
|
140
|
-
|
|
141
|
-
```javascript
|
|
142
|
-
function inferEffort(rec, targetFiles) {
|
|
143
|
-
const fileCount = targetFiles?.length || 0
|
|
144
|
-
if (rec.priority === 'high' && fileCount >= 3) return 'large'
|
|
145
|
-
if (rec.priority === 'high' || fileCount >= 2) return 'medium'
|
|
146
|
-
if (rec.priority === 'low' || fileCount <= 1) return 'small'
|
|
147
|
-
return 'medium'
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Convergence Quality Validation
|
|
154
|
-
|
|
155
|
-
Every task's `convergence` MUST pass quality gates before writing to disk.
|
|
156
|
-
|
|
157
|
-
### Quality Rules
|
|
158
|
-
|
|
159
|
-
| Field | Requirement | Validation |
|
|
160
|
-
|-------|-------------|------------|
|
|
161
|
-
| `criteria[]` | **Testable** — assertions or concrete manual steps | Reject vague patterns; each criterion must reference observable behavior |
|
|
162
|
-
| `verification` | **Executable** — shell command or explicit step sequence | Must contain a runnable command or step-by-step verification procedure |
|
|
163
|
-
| `definition_of_done` | **Business language** — non-technical stakeholder can judge | Must NOT contain technical commands (jest, tsc, npm, build) |
|
|
164
|
-
|
|
165
|
-
### Vague Pattern Detection
|
|
166
|
-
|
|
167
|
-
```javascript
|
|
168
|
-
const VAGUE_PATTERNS = /正常|正确|好|可以|没问题|works|fine|good|correct|properly|as expected/i
|
|
169
|
-
const TECHNICAL_IN_DOD = /compile|build|lint|npm|npx|jest|tsc|eslint|cargo|pytest|go test/i
|
|
170
|
-
|
|
171
|
-
function validateConvergenceQuality(tasks) {
|
|
172
|
-
const issues = []
|
|
173
|
-
tasks.forEach(task => {
|
|
174
|
-
// Rule 1: No vague criteria
|
|
175
|
-
task.convergence.criteria.forEach((c, i) => {
|
|
176
|
-
if (VAGUE_PATTERNS.test(c) && c.length < 20) {
|
|
177
|
-
issues.push({
|
|
178
|
-
task: task.id, field: `criteria[${i}]`,
|
|
179
|
-
problem: 'Vague criterion', value: c,
|
|
180
|
-
fix: 'Replace with specific observable condition from evidence'
|
|
181
|
-
})
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
// Rule 2: Verification should be executable
|
|
186
|
-
if (task.convergence.verification && task.convergence.verification.length < 5) {
|
|
187
|
-
issues.push({
|
|
188
|
-
task: task.id, field: 'verification',
|
|
189
|
-
problem: 'Too short to be executable', value: task.convergence.verification,
|
|
190
|
-
fix: 'Provide shell command or numbered step sequence'
|
|
191
|
-
})
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// Rule 3: DoD should be business language
|
|
195
|
-
if (TECHNICAL_IN_DOD.test(task.convergence.definition_of_done)) {
|
|
196
|
-
issues.push({
|
|
197
|
-
task: task.id, field: 'definition_of_done',
|
|
198
|
-
problem: 'Contains technical commands', value: task.convergence.definition_of_done,
|
|
199
|
-
fix: 'Rewrite in business language describing user/system outcome'
|
|
200
|
-
})
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Rule 4: files[].changes should not be empty when files exist
|
|
204
|
-
task.files?.forEach((f, i) => {
|
|
205
|
-
if (f.action === 'modify' && (!f.changes || f.changes.length === 0) && !f.change) {
|
|
206
|
-
issues.push({
|
|
207
|
-
task: task.id, field: `files[${i}].changes`,
|
|
208
|
-
problem: 'No change description for modify action', value: f.path,
|
|
209
|
-
fix: 'Describe what specifically changes in this file'
|
|
210
|
-
})
|
|
211
|
-
}
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
// Rule 5: implementation steps should exist
|
|
215
|
-
if (!task.implementation || task.implementation.length === 0) {
|
|
216
|
-
issues.push({
|
|
217
|
-
task: task.id, field: 'implementation',
|
|
218
|
-
problem: 'No implementation steps',
|
|
219
|
-
fix: 'Add at least one step describing how to realize this task'
|
|
220
|
-
})
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
|
|
224
|
-
// Auto-fix where possible, log remaining issues
|
|
225
|
-
issues.forEach(issue => {
|
|
226
|
-
// Attempt auto-fix based on available evidence
|
|
227
|
-
// If unfixable, log warning — task still generated but flagged
|
|
228
|
-
})
|
|
229
|
-
return issues
|
|
230
|
-
}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### Good vs Bad Examples
|
|
234
|
-
|
|
235
|
-
**Criteria**:
|
|
236
|
-
|
|
237
|
-
| Bad | Good |
|
|
238
|
-
|-----|------|
|
|
239
|
-
| `"Code works correctly"` | `"refreshToken() returns a new JWT with >0 expiry when called with expired token"` |
|
|
240
|
-
| `"No errors"` | `"Error handler at auth.ts:45 returns 401 status with { error: 'token_expired' } body"` |
|
|
241
|
-
| `"Performance is good"` | `"API response time < 200ms at p95 for /api/users endpoint under 100 concurrent requests"` |
|
|
242
|
-
|
|
243
|
-
**Verification**:
|
|
244
|
-
|
|
245
|
-
| Bad | Good |
|
|
246
|
-
|-----|------|
|
|
247
|
-
| `"Check it"` | `"jest --testPathPattern=auth.test.ts && npx tsc --noEmit"` |
|
|
248
|
-
| `"Run tests"` | `"1. Run npm test -- --grep 'token refresh' 2. Verify no TypeScript errors with npx tsc --noEmit"` |
|
|
249
|
-
|
|
250
|
-
**Definition of Done**:
|
|
251
|
-
|
|
252
|
-
| Bad | Good |
|
|
253
|
-
|-----|------|
|
|
254
|
-
| `"jest passes"` | `"Users remain logged in across token expiration without manual re-login"` |
|
|
255
|
-
| `"No TypeScript errors"` | `"Authentication flow handles all user-facing error scenarios with clear error messages"` |
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## Required Task Fields (analyze-with-file producer)
|
|
260
|
-
|
|
261
|
-
SKILL.md produces minimal recommendations `{action, rationale, priority, evidence_refs}`. EXECUTE.md enriches these into full task JSON. The final `.task/*.json` MUST populate:
|
|
262
|
-
|
|
263
|
-
| Block | Fields | Required |
|
|
264
|
-
|-------|--------|----------|
|
|
265
|
-
| IDENTITY | `id`, `title`, `description` | Yes |
|
|
266
|
-
| CLASSIFICATION | `type`, `priority`, `effort` | Yes |
|
|
267
|
-
| DEPENDENCIES | `depends_on` | Yes (empty array if none) |
|
|
268
|
-
| CONVERGENCE | `convergence.criteria[]`, `convergence.verification`, `convergence.definition_of_done` | Yes |
|
|
269
|
-
| FILES | `files[].path`, `files[].action`, `files[].changes`/`files[].change` | Yes (if files identified) |
|
|
270
|
-
| IMPLEMENTATION | `implementation[]` with step + description | Yes |
|
|
271
|
-
| CONTEXT | `evidence`, `source.tool`, `source.session_id`, `source.original_id` | Yes |
|
|
272
|
-
|
|
273
|
-
### Task JSON Example
|
|
274
|
-
|
|
275
|
-
```json
|
|
276
|
-
{
|
|
277
|
-
"id": "TASK-001",
|
|
278
|
-
"title": "Fix authentication token refresh",
|
|
279
|
-
"description": "Token refresh fails silently when JWT expires, causing users to be logged out unexpectedly",
|
|
280
|
-
"type": "fix",
|
|
281
|
-
"priority": "high",
|
|
282
|
-
"effort": "medium",
|
|
283
|
-
"files": [
|
|
284
|
-
{
|
|
285
|
-
"path": "src/auth/token.ts",
|
|
286
|
-
"action": "modify",
|
|
287
|
-
"target": "refreshToken",
|
|
288
|
-
"changes": [
|
|
289
|
-
"Add await to refreshToken() call at line 89",
|
|
290
|
-
"Add error propagation for refresh failure"
|
|
291
|
-
],
|
|
292
|
-
"change": "Add await to refreshToken() call and propagate errors"
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"path": "src/middleware/auth.ts",
|
|
296
|
-
"action": "modify",
|
|
297
|
-
"target": "authMiddleware",
|
|
298
|
-
"changes": [
|
|
299
|
-
"Update error handler at line 45 to distinguish refresh failures from auth failures"
|
|
300
|
-
],
|
|
301
|
-
"change": "Update error handler to propagate refresh failures"
|
|
302
|
-
}
|
|
303
|
-
],
|
|
304
|
-
"depends_on": [],
|
|
305
|
-
"convergence": {
|
|
306
|
-
"criteria": [
|
|
307
|
-
"refreshToken() returns new valid JWT when called with expired token",
|
|
308
|
-
"Expired token triggers automatic refresh without user action",
|
|
309
|
-
"Failed refresh returns 401 with { error: 'token_expired' } body"
|
|
310
|
-
],
|
|
311
|
-
"verification": "jest --testPathPattern=token.test.ts && npx tsc --noEmit",
|
|
312
|
-
"definition_of_done": "Users remain logged in across token expiration without manual re-login"
|
|
313
|
-
},
|
|
314
|
-
"implementation": [
|
|
315
|
-
{
|
|
316
|
-
"step": "1",
|
|
317
|
-
"description": "Add await to refreshToken() call in token.ts",
|
|
318
|
-
"actions": ["Read token.ts", "Add await keyword at line 89", "Verify async chain"]
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
"step": "2",
|
|
322
|
-
"description": "Update error handler in auth middleware",
|
|
323
|
-
"actions": ["Read auth.ts", "Modify error handler at line 45", "Add refresh-specific error type"]
|
|
324
|
-
}
|
|
325
|
-
],
|
|
326
|
-
"evidence": ["src/auth/token.ts:89", "src/middleware/auth.ts:45"],
|
|
327
|
-
"source": {
|
|
328
|
-
"tool": "analyze-with-file",
|
|
329
|
-
"session_id": "ANL-auth-token-refresh-2025-01-21",
|
|
330
|
-
"original_id": "TASK-001"
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
---
|
|
336
|
-
|
|
337
|
-
## Step 1: Load All Context Sources
|
|
338
|
-
|
|
339
|
-
Phase 2-4 already loaded and processed these artifacts. If data is still in conversation memory, skip disk reads.
|
|
340
|
-
|
|
341
|
-
```javascript
|
|
342
|
-
// Skip loading if already in memory from Phase 2-4
|
|
343
|
-
// Only read from disk when entering EXECUTE.md from a fresh/resumed session
|
|
344
|
-
|
|
345
|
-
if (!conclusions) {
|
|
346
|
-
conclusions = JSON.parse(Read(`${sessionFolder}/conclusions.json`))
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (!codebaseContext) {
|
|
350
|
-
codebaseContext = file_exists(`${sessionFolder}/exploration-codebase.json`)
|
|
351
|
-
? JSON.parse(Read(`${sessionFolder}/exploration-codebase.json`))
|
|
352
|
-
: null
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
if (!explorations) {
|
|
356
|
-
explorations = file_exists(`${sessionFolder}/explorations.json`)
|
|
357
|
-
? JSON.parse(Read(`${sessionFolder}/explorations.json`))
|
|
358
|
-
: file_exists(`${sessionFolder}/perspectives.json`)
|
|
359
|
-
? JSON.parse(Read(`${sessionFolder}/perspectives.json`))
|
|
360
|
-
: null
|
|
361
|
-
}
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
## Step 2: Enrich Recommendations & Generate .task/*.json
|
|
365
|
-
|
|
366
|
-
SKILL.md Phase 4 produces minimal recommendations: `{action, rationale, priority, evidence_refs}`.
|
|
367
|
-
This step enriches each recommendation with execution-specific details using codebase context, then generates individual task JSON files.
|
|
368
|
-
|
|
369
|
-
**Enrichment pipeline**: `rec (minimal) + codebaseContext + explorations → task JSON (full)`
|
|
370
|
-
|
|
371
|
-
```javascript
|
|
372
|
-
const tasks = conclusions.recommendations.map((rec, index) => {
|
|
373
|
-
const taskId = `TASK-${String(index + 1).padStart(3, '0')}`
|
|
374
|
-
|
|
375
|
-
// 1. ENRICH: Resolve target files from codebase context (not from rec)
|
|
376
|
-
const targetFiles = resolveTargetFiles(rec, codebaseContext, explorations)
|
|
377
|
-
|
|
378
|
-
// 2. ENRICH: Generate implementation steps from action + context
|
|
379
|
-
const implSteps = generateImplementationSteps(rec, targetFiles, codebaseContext)
|
|
380
|
-
|
|
381
|
-
// 3. ENRICH: Derive change descriptions per file
|
|
382
|
-
const enrichedFiles = targetFiles.map(f => ({
|
|
383
|
-
path: f.path,
|
|
384
|
-
action: f.action || 'modify',
|
|
385
|
-
target: f.target || null,
|
|
386
|
-
changes: deriveChanges(rec, f, codebaseContext) || [],
|
|
387
|
-
change: rec.action
|
|
388
|
-
}))
|
|
389
|
-
|
|
390
|
-
return {
|
|
391
|
-
id: taskId,
|
|
392
|
-
title: rec.action,
|
|
393
|
-
description: rec.rationale,
|
|
394
|
-
type: inferTaskType(rec),
|
|
395
|
-
priority: rec.priority,
|
|
396
|
-
effort: inferEffort(rec, targetFiles),
|
|
397
|
-
|
|
398
|
-
files: enrichedFiles,
|
|
399
|
-
depends_on: [],
|
|
400
|
-
|
|
401
|
-
// CONVERGENCE (must pass quality validation)
|
|
402
|
-
convergence: {
|
|
403
|
-
criteria: generateCriteria(rec),
|
|
404
|
-
verification: generateVerification(rec),
|
|
405
|
-
definition_of_done: generateDoD(rec)
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
// IMPLEMENTATION steps (generated here, not from SKILL.md)
|
|
409
|
-
implementation: implSteps,
|
|
410
|
-
|
|
411
|
-
// CONTEXT
|
|
412
|
-
evidence: rec.evidence_refs || [],
|
|
413
|
-
source: {
|
|
414
|
-
tool: 'analyze-with-file',
|
|
415
|
-
session_id: sessionId,
|
|
416
|
-
original_id: taskId
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
})
|
|
420
|
-
|
|
421
|
-
// Quality validation
|
|
422
|
-
validateConvergenceQuality(tasks)
|
|
423
|
-
|
|
424
|
-
// Write each task as individual JSON file
|
|
425
|
-
Bash(`mkdir -p ${sessionFolder}/.task`)
|
|
426
|
-
tasks.forEach(task => {
|
|
427
|
-
Write(`${sessionFolder}/.task/${task.id}.json`, JSON.stringify(task, null, 2))
|
|
428
|
-
})
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
**Enrichment Functions**:
|
|
432
|
-
|
|
433
|
-
```javascript
|
|
434
|
-
// Generate implementation steps from action + resolved files
|
|
435
|
-
function generateImplementationSteps(rec, targetFiles, codebaseContext) {
|
|
436
|
-
// 1. Parse rec.action into atomic steps
|
|
437
|
-
// 2. Map steps to target files
|
|
438
|
-
// 3. Add context from codebaseContext.patterns if applicable
|
|
439
|
-
// Return: [{step: '1', description: '...', actions: [...]}]
|
|
440
|
-
return [{
|
|
441
|
-
step: '1',
|
|
442
|
-
description: rec.action,
|
|
443
|
-
actions: targetFiles.map(f => `Modify ${f.path}`)
|
|
444
|
-
}]
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
// Derive specific change descriptions for a file
|
|
448
|
-
function deriveChanges(rec, file, codebaseContext) {
|
|
449
|
-
// 1. Match rec.action keywords to file content patterns
|
|
450
|
-
// 2. Use codebaseContext.patterns for context-aware change descriptions
|
|
451
|
-
// 3. Use rec.evidence_refs to locate specific modification points
|
|
452
|
-
// Return: ['specific change 1', 'specific change 2']
|
|
453
|
-
return [rec.action]
|
|
454
|
-
}
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
## Step 3-6: Execution Steps
|
|
458
|
-
|
|
459
|
-
After `.task/*.json` generation, validate and execute tasks directly inline.
|
|
460
|
-
|
|
461
|
-
### Step 3: Pre-Execution Analysis
|
|
462
|
-
|
|
463
|
-
```javascript
|
|
464
|
-
const taskFiles = Glob(`${sessionFolder}/.task/*.json`)
|
|
465
|
-
const tasks = taskFiles.map(f => JSON.parse(Read(f)))
|
|
466
|
-
|
|
467
|
-
// 1. Dependency validation
|
|
468
|
-
const taskIds = new Set(tasks.map(t => t.id))
|
|
469
|
-
const errors = []
|
|
470
|
-
tasks.forEach(task => {
|
|
471
|
-
task.depends_on.forEach(dep => {
|
|
472
|
-
if (!taskIds.has(dep)) errors.push(`${task.id}: depends on unknown task ${dep}`)
|
|
473
|
-
})
|
|
474
|
-
})
|
|
475
|
-
|
|
476
|
-
// 2. Circular dependency detection (DFS)
|
|
477
|
-
function detectCycles(tasks) {
|
|
478
|
-
const graph = new Map(tasks.map(t => [t.id, t.depends_on]))
|
|
479
|
-
const visited = new Set(), inStack = new Set(), cycles = []
|
|
480
|
-
function dfs(node, path) {
|
|
481
|
-
if (inStack.has(node)) { cycles.push([...path, node].join(' → ')); return }
|
|
482
|
-
if (visited.has(node)) return
|
|
483
|
-
visited.add(node); inStack.add(node)
|
|
484
|
-
;(graph.get(node) || []).forEach(dep => dfs(dep, [...path, node]))
|
|
485
|
-
inStack.delete(node)
|
|
486
|
-
}
|
|
487
|
-
tasks.forEach(t => { if (!visited.has(t.id)) dfs(t.id, []) })
|
|
488
|
-
return cycles
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
// 3. Topological sort for execution order
|
|
492
|
-
function topoSort(tasks) {
|
|
493
|
-
const inDegree = new Map(tasks.map(t => [t.id, 0]))
|
|
494
|
-
tasks.forEach(t => t.depends_on.forEach(dep => {
|
|
495
|
-
inDegree.set(t.id, inDegree.get(t.id) + 1)
|
|
496
|
-
}))
|
|
497
|
-
const queue = tasks.filter(t => inDegree.get(t.id) === 0).map(t => t.id)
|
|
498
|
-
const order = []
|
|
499
|
-
while (queue.length) {
|
|
500
|
-
const id = queue.shift()
|
|
501
|
-
order.push(id)
|
|
502
|
-
tasks.forEach(t => {
|
|
503
|
-
if (t.depends_on.includes(id)) {
|
|
504
|
-
inDegree.set(t.id, inDegree.get(t.id) - 1)
|
|
505
|
-
if (inDegree.get(t.id) === 0) queue.push(t.id)
|
|
506
|
-
}
|
|
507
|
-
})
|
|
508
|
-
}
|
|
509
|
-
return order
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
// 4. File conflict detection
|
|
513
|
-
const fileTaskMap = new Map()
|
|
514
|
-
tasks.forEach(task => {
|
|
515
|
-
(task.files || []).forEach(f => {
|
|
516
|
-
if (!fileTaskMap.has(f.path)) fileTaskMap.set(f.path, [])
|
|
517
|
-
fileTaskMap.get(f.path).push(task.id)
|
|
518
|
-
})
|
|
519
|
-
})
|
|
520
|
-
const conflicts = []
|
|
521
|
-
fileTaskMap.forEach((taskIds, file) => {
|
|
522
|
-
if (taskIds.length > 1) conflicts.push({ file, tasks: taskIds })
|
|
523
|
-
})
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
### Step 4: Initialize Execution Artifacts
|
|
527
|
-
|
|
528
|
-
```javascript
|
|
529
|
-
// execution.md — overview with task table
|
|
530
|
-
const executionMd = `# Execution Overview
|
|
531
|
-
|
|
532
|
-
## Session Info
|
|
533
|
-
- **Session ID**: ${sessionId}
|
|
534
|
-
- **Plan Source**: .task/*.json (from analysis conclusions)
|
|
535
|
-
- **Started**: ${getUtc8ISOString()}
|
|
536
|
-
- **Total Tasks**: ${tasks.length}
|
|
537
|
-
|
|
538
|
-
## Task Overview
|
|
539
|
-
|
|
540
|
-
| # | ID | Title | Type | Priority | Status |
|
|
541
|
-
|---|-----|-------|------|----------|--------|
|
|
542
|
-
${tasks.map((t, i) => `| ${i+1} | ${t.id} | ${t.title} | ${t.type} | ${t.priority} | pending |`).join('\n')}
|
|
543
|
-
|
|
544
|
-
## Pre-Execution Analysis
|
|
545
|
-
${conflicts.length
|
|
546
|
-
? `### File Conflicts\n${conflicts.map(c => `- **${c.file}**: ${c.tasks.join(', ')}`).join('\n')}`
|
|
547
|
-
: 'No file conflicts detected.'}
|
|
548
|
-
|
|
549
|
-
## Execution Timeline
|
|
550
|
-
> Updated as tasks complete
|
|
551
|
-
`
|
|
552
|
-
Write(`${sessionFolder}/execution.md`, executionMd)
|
|
553
|
-
|
|
554
|
-
// execution-events.md — chronological event log
|
|
555
|
-
Write(`${sessionFolder}/execution-events.md`,
|
|
556
|
-
`# Execution Events\n\n**Session**: ${sessionId}\n**Started**: ${getUtc8ISOString()}\n\n---\n\n`)
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
### Step 5: Task Execution Loop
|
|
560
|
-
|
|
561
|
-
**User Confirmation** before execution:
|
|
562
|
-
|
|
563
|
-
```javascript
|
|
564
|
-
if (!autoYes) {
|
|
565
|
-
const action = AskUserQuestion({
|
|
566
|
-
questions: [{
|
|
567
|
-
question: `Execute ${tasks.length} tasks?\n${tasks.map(t => ` ${t.id}: ${t.title} (${t.priority})`).join('\n')}`,
|
|
568
|
-
header: "Confirm",
|
|
569
|
-
multiSelect: false,
|
|
570
|
-
options: [
|
|
571
|
-
{ label: "Start", description: "Execute all tasks serially" },
|
|
572
|
-
{ label: "Adjust", description: "Modify .task/*.json before execution" },
|
|
573
|
-
{ label: "Skip", description: "Keep .task/*.json, skip execution" }
|
|
574
|
-
]
|
|
575
|
-
}]
|
|
576
|
-
})
|
|
577
|
-
// "Adjust": user edits task files, then resumes
|
|
578
|
-
// "Skip": end — user can execute later separately
|
|
579
|
-
}
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
Execute tasks serially using `task.implementation` steps and `task.files[].changes` as guidance.
|
|
583
|
-
|
|
584
|
-
```
|
|
585
|
-
For each taskId in executionOrder:
|
|
586
|
-
├─ Load task from .task/{taskId}.json
|
|
587
|
-
├─ Check dependencies satisfied
|
|
588
|
-
├─ Record START event → execution-events.md
|
|
589
|
-
├─ Execute using task.implementation + task.files[].changes:
|
|
590
|
-
│ ├─ Read target files listed in task.files[]
|
|
591
|
-
│ ├─ Apply modifications described in files[].changes / files[].change
|
|
592
|
-
│ ├─ Follow implementation[].actions sequence
|
|
593
|
-
│ └─ Use Edit (preferred), Write (new files), Bash (build/test)
|
|
594
|
-
├─ Verify convergence:
|
|
595
|
-
│ ├─ Check each convergence.criteria[] item
|
|
596
|
-
│ ├─ Run convergence.verification (if executable command)
|
|
597
|
-
│ └─ Record verification results
|
|
598
|
-
├─ Record COMPLETE/FAIL event → execution-events.md
|
|
599
|
-
├─ Update execution.md task status
|
|
600
|
-
└─ Continue to next task
|
|
601
|
-
```
|
|
602
|
-
|
|
603
|
-
**Execution Guidance Priority** — what the AI follows when executing each task:
|
|
604
|
-
|
|
605
|
-
| Priority | Source | Example |
|
|
606
|
-
|----------|--------|---------|
|
|
607
|
-
| 1 | `files[].changes` / `files[].change` | "Add await to refreshToken() call at line 89" |
|
|
608
|
-
| 2 | `implementation[].actions` | ["Read token.ts", "Add await keyword at line 89"] |
|
|
609
|
-
| 3 | `implementation[].description` | "Add await to refreshToken() call in token.ts" |
|
|
610
|
-
| 4 | `task.description` | "Token refresh fails silently..." |
|
|
611
|
-
|
|
612
|
-
When `files[].changes` is populated, the AI has concrete instructions. When empty, it falls back to `implementation` steps, then to `description`.
|
|
613
|
-
|
|
614
|
-
### Step 5.1: Failure Handling
|
|
615
|
-
|
|
616
|
-
```javascript
|
|
617
|
-
// On task failure, ask user how to proceed
|
|
618
|
-
if (!autoYes) {
|
|
619
|
-
AskUserQuestion({
|
|
620
|
-
questions: [{
|
|
621
|
-
question: `Task ${task.id} failed: ${errorMessage}\nHow to proceed?`,
|
|
622
|
-
header: "Failure",
|
|
623
|
-
multiSelect: false,
|
|
624
|
-
options: [
|
|
625
|
-
{ label: "Skip & Continue", description: "Skip this task, continue with next" },
|
|
626
|
-
{ label: "Retry", description: "Retry this task" },
|
|
627
|
-
{ label: "Abort", description: "Stop execution, keep progress" }
|
|
628
|
-
]
|
|
629
|
-
}]
|
|
630
|
-
})
|
|
631
|
-
}
|
|
632
|
-
```
|
|
633
|
-
|
|
634
|
-
### Step 6: Finalize
|
|
635
|
-
|
|
636
|
-
After all tasks complete:
|
|
637
|
-
|
|
638
|
-
1. Append execution summary to `execution.md` (statistics, task results table)
|
|
639
|
-
2. Append session footer to `execution-events.md`
|
|
640
|
-
3. Write back `_execution` state to each `.task/*.json`:
|
|
641
|
-
|
|
642
|
-
```javascript
|
|
643
|
-
tasks.forEach(task => {
|
|
644
|
-
const updated = {
|
|
645
|
-
...task,
|
|
646
|
-
status: task._status, // "completed" | "failed" | "skipped"
|
|
647
|
-
executed_at: task._executed_at,
|
|
648
|
-
result: {
|
|
649
|
-
success: task._status === 'completed',
|
|
650
|
-
files_modified: task._result?.files_modified || [],
|
|
651
|
-
summary: task._result?.summary || '',
|
|
652
|
-
error: task._result?.error || null,
|
|
653
|
-
convergence_verified: task._result?.convergence_verified || []
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
Write(`${sessionFolder}/.task/${task.id}.json`, JSON.stringify(updated, null, 2))
|
|
657
|
-
})
|
|
658
|
-
```
|
|
659
|
-
|
|
660
|
-
### Step 6.1: Post-Execution Options
|
|
661
|
-
|
|
662
|
-
```javascript
|
|
663
|
-
if (!autoYes) {
|
|
664
|
-
AskUserQuestion({
|
|
665
|
-
questions: [{
|
|
666
|
-
question: `Execution complete: ${completedTasks.size}/${tasks.length} succeeded. Next:`,
|
|
667
|
-
header: "Post-Execute",
|
|
668
|
-
multiSelect: false,
|
|
669
|
-
options: [
|
|
670
|
-
{ label: "Retry Failed", description: `Re-execute ${failedTasks.size} failed tasks` },
|
|
671
|
-
{ label: "View Events", description: "Display execution-events.md" },
|
|
672
|
-
{ label: "Create Issue", description: "Create issue from failed tasks" },
|
|
673
|
-
{ label: "Done", description: "End workflow" }
|
|
674
|
-
]
|
|
675
|
-
}]
|
|
676
|
-
})
|
|
677
|
-
}
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
---
|
|
681
|
-
|
|
682
|
-
## Output Structure
|
|
683
|
-
|
|
684
|
-
```
|
|
685
|
-
{sessionFolder}/
|
|
686
|
-
├── .task/ # Individual task JSON files (with _execution state after completion)
|
|
687
|
-
│ ├── TASK-001.json
|
|
688
|
-
│ └── ...
|
|
689
|
-
├── execution.md # Execution overview + task table + summary
|
|
690
|
-
└── execution-events.md # Chronological event log
|
|
691
|
-
```
|
|
692
|
-
|
|
693
|
-
## execution-events.md Event Format
|
|
694
|
-
|
|
695
|
-
```markdown
|
|
696
|
-
## {timestamp} — {task.id}: {task.title}
|
|
697
|
-
|
|
698
|
-
**Type**: {task.type} | **Priority**: {task.priority}
|
|
699
|
-
**Status**: IN PROGRESS
|
|
700
|
-
**Files**: {task.files[].path}
|
|
701
|
-
|
|
702
|
-
### Execution Log
|
|
703
|
-
- Read {file} ({lines} lines)
|
|
704
|
-
- Applied: {change description}
|
|
705
|
-
- ...
|
|
706
|
-
|
|
707
|
-
**Status**: COMPLETED / FAILED
|
|
708
|
-
**Files Modified**: {list}
|
|
709
|
-
|
|
710
|
-
#### Convergence Verification
|
|
711
|
-
- [x/] {criterion 1}
|
|
712
|
-
- [x/] {criterion 2}
|
|
713
|
-
- **Verification**: {command} → PASS/FAIL
|
|
714
|
-
|
|
715
|
-
---
|
|
716
|
-
```
|