mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-14 02:42:04 +08:00
fix: resolve data flow inconsistencies found in post-migration review
- test-fix-agent: remove flow_control references, use pre_analysis and convergence.criteria - code-developer: shared_context reads from plan.json instead of task meta
This commit is contained in:
@@ -53,9 +53,6 @@ Task JSON Fields (unified flat structure):
|
|||||||
├── description → What to implement (goal + requirements)
|
├── description → What to implement (goal + requirements)
|
||||||
├── convergence.criteria[] → How to verify (validation commands)
|
├── convergence.criteria[] → How to verify (validation commands)
|
||||||
├── focus_paths[] → Where to focus (directories/files)
|
├── focus_paths[] → Where to focus (directories/files)
|
||||||
├── meta.shared_context → Tech stack and conventions (if present)
|
|
||||||
│ ├── tech_stack[] → Technologies used (skip auto-detection if present)
|
|
||||||
│ └── conventions[] → Coding conventions to follow
|
|
||||||
├── artifacts[] → Additional context sources
|
├── artifacts[] → Additional context sources
|
||||||
├── pre_analysis[] → Context gathering steps (execute first)
|
├── pre_analysis[] → Context gathering steps (execute first)
|
||||||
├── implementation[] → Implementation steps (execute sequentially)
|
├── implementation[] → Implementation steps (execute sequentially)
|
||||||
@@ -66,7 +63,7 @@ Task JSON Fields (unified flat structure):
|
|||||||
1. Read task JSON from provided path
|
1. Read task JSON from provided path
|
||||||
2. Extract `description` as implementation goals
|
2. Extract `description` as implementation goals
|
||||||
3. Extract `convergence.criteria` as verification criteria
|
3. Extract `convergence.criteria` as verification criteria
|
||||||
4. If `meta.shared_context.tech_stack` exists → skip auto-detection, use provided stack
|
4. Read plan.json from session dir → extract `shared_context.tech_stack` and `shared_context.conventions` (skip auto-detection if present)
|
||||||
5. Process `pre_analysis` and `implementation` if present
|
5. Process `pre_analysis` and `implementation` if present
|
||||||
|
|
||||||
**Pre-Analysis: Smart Tech Stack Loading**:
|
**Pre-Analysis: Smart Tech Stack Loading**:
|
||||||
@@ -105,8 +102,8 @@ STEP 1: Parse Task JSON (if path provided)
|
|||||||
→ Extract and store in memory:
|
→ Extract and store in memory:
|
||||||
• [requirements] ← description
|
• [requirements] ← description
|
||||||
• [acceptance_criteria] ← convergence.criteria[]
|
• [acceptance_criteria] ← convergence.criteria[]
|
||||||
• [tech_stack] ← meta.shared_context.tech_stack[] (skip auto-detection if present)
|
• [tech_stack] ← plan.json shared_context.tech_stack[] (skip auto-detection if present)
|
||||||
• [conventions] ← meta.shared_context.conventions[]
|
• [conventions] ← plan.json shared_context.conventions[]
|
||||||
• [focus_paths] ← focus_paths[]
|
• [focus_paths] ← focus_paths[]
|
||||||
|
|
||||||
STEP 2: Execute Pre-Analysis (if pre_analysis exists in Task JSON)
|
STEP 2: Execute Pre-Analysis (if pre_analysis exists in Task JSON)
|
||||||
@@ -241,7 +238,7 @@ function buildCliHandoffPrompt(preAnalysisResults, task, taskJsonPath) {
|
|||||||
.map(([key, value]) => `### ${key}\n${value}`)
|
.map(([key, value]) => `### ${key}\n${value}`)
|
||||||
.join('\n\n');
|
.join('\n\n');
|
||||||
|
|
||||||
const conventions = task.meta?.shared_context?.conventions?.join(' | ') || '';
|
const conventions = plan?.shared_context?.conventions?.join(' | ') || '';
|
||||||
const constraints = `Follow existing patterns | No breaking changes${conventions ? ' | ' + conventions : ''}`;
|
const constraints = `Follow existing patterns | No breaking changes${conventions ? ' | ' + conventions : ''}`;
|
||||||
|
|
||||||
return `
|
return `
|
||||||
@@ -252,7 +249,7 @@ Complete implementation based on pre-analyzed context and task JSON.
|
|||||||
Read full task definition: ${taskJsonPath}
|
Read full task definition: ${taskJsonPath}
|
||||||
|
|
||||||
## TECH STACK
|
## TECH STACK
|
||||||
${task.meta?.shared_context?.tech_stack?.map(t => `- ${t}`).join('\n') || 'Auto-detect from project files'}
|
${plan?.shared_context?.tech_stack?.map(t => `- ${t}`).join('\n') || 'Auto-detect from project files'}
|
||||||
|
|
||||||
## PRE-ANALYSIS CONTEXT
|
## PRE-ANALYSIS CONTEXT
|
||||||
${contextSection}
|
${contextSection}
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ You will execute tests across multiple layers, analyze failures with layer-speci
|
|||||||
jq --arg ts "$(date -Iseconds)" '.status="in_progress" | .status_history += [{"from":.status,"to":"in_progress","changed_at":$ts}]' IMPL-X.json > tmp.json && mv tmp.json IMPL-X.json
|
jq --arg ts "$(date -Iseconds)" '.status="in_progress" | .status_history += [{"from":.status,"to":"in_progress","changed_at":$ts}]' IMPL-X.json > tmp.json && mv tmp.json IMPL-X.json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Flow Control Execution
|
### Task Execution Flow
|
||||||
When task JSON contains `flow_control` field, execute preparation and implementation steps systematically.
|
When task JSON contains `pre_analysis` and `implementation` fields, execute preparation and implementation steps systematically.
|
||||||
|
|
||||||
**Pre-Analysis Steps** (`pre_analysis`):
|
**Pre-Analysis Steps** (`pre_analysis`):
|
||||||
1. **Sequential Processing**: Execute steps in order, accumulating context
|
1. **Sequential Processing**: Execute steps in order, accumulating context
|
||||||
@@ -91,7 +91,7 @@ When task JSON contains implementation_approach array:
|
|||||||
- `"agent"` (default) → Agent direct execution:
|
- `"agent"` (default) → Agent direct execution:
|
||||||
- Parse `modification_points` as files to modify
|
- Parse `modification_points` as files to modify
|
||||||
- Follow `logic_flow` for test-fix iteration
|
- Follow `logic_flow` for test-fix iteration
|
||||||
- Use test_commands from flow_control for test execution
|
- Use test_commands from convergence.criteria for test execution
|
||||||
|
|
||||||
|
|
||||||
### 1. Context Assessment & Test Discovery
|
### 1. Context Assessment & Test Discovery
|
||||||
|
|||||||
Reference in New Issue
Block a user