mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
refactor(lite-execute): unify task prompt builder with scope+modification_points
- Consolidate Agent and CLI prompt builders into single buildExecutionPrompt() - Replace file-based task format with scope + modification_points structure - Simplify to 4-part task template: Modification Points → How → Reference → Done - Remove duplicate formatTaskForCLI and buildCLIPrompt functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,22 +63,29 @@ For current task, perform:
|
||||
```markdown
|
||||
## Executing: [task.title]
|
||||
|
||||
**Target**: `[task.file]`
|
||||
**Scope**: `[task.scope]` (module/feature level)
|
||||
**Action**: [task.action]
|
||||
|
||||
### Modification Points
|
||||
For each point in task.modification_points:
|
||||
- **File**: [point.file]
|
||||
- **Target**: [point.target] (function/class/line range)
|
||||
- **Change**: [point.change]
|
||||
|
||||
### Implementation
|
||||
[Follow task.implementation steps]
|
||||
|
||||
### Reference Pattern
|
||||
- Pattern: [task.reference.pattern]
|
||||
- Examples: [task.reference.files]
|
||||
- Files: [task.reference.files]
|
||||
- Examples: [task.reference.examples]
|
||||
|
||||
### Acceptance Criteria
|
||||
- [ ] [criterion 1]
|
||||
- [ ] [criterion 2]
|
||||
```
|
||||
|
||||
**Execute all implementation steps. Verify all acceptance criteria.**
|
||||
**Execute all modification points. Verify all acceptance criteria.**
|
||||
|
||||
### Step 4: Mark Completed
|
||||
|
||||
@@ -104,22 +111,40 @@ Output progress:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "task-1",
|
||||
"title": "Task Title",
|
||||
"file": "path/to/file.ts",
|
||||
"action": "create|modify|refactor",
|
||||
"description": "What to do",
|
||||
"implementation": ["step 1", "step 2"],
|
||||
"id": "T1",
|
||||
"title": "Implement auth validation",
|
||||
"scope": "src/auth/",
|
||||
"action": "Create|Update|Implement|Refactor|Add|Delete|Configure|Test|Fix",
|
||||
"description": "What to implement (1-2 sentences)",
|
||||
"modification_points": [
|
||||
{
|
||||
"file": "src/auth/validator.ts",
|
||||
"target": "validateToken:45-60",
|
||||
"change": "Add expiry check"
|
||||
},
|
||||
{
|
||||
"file": "src/auth/middleware.ts",
|
||||
"target": "authMiddleware",
|
||||
"change": "Call new validator"
|
||||
}
|
||||
],
|
||||
"implementation": ["step 1", "step 2", "...max 7 steps"],
|
||||
"reference": {
|
||||
"pattern": "pattern name",
|
||||
"files": ["example1.ts", "example2.ts"]
|
||||
"files": ["example1.ts"],
|
||||
"examples": "specific guidance"
|
||||
},
|
||||
"acceptance": ["criterion 1", "criterion 2"],
|
||||
"depends_on": ["task-0"],
|
||||
"depends_on": ["T0"],
|
||||
"status": "pending|completed"
|
||||
}
|
||||
```
|
||||
|
||||
**Key Fields**:
|
||||
- `scope`: Module/feature level path (prefer over single file)
|
||||
- `modification_points[]`: All files to modify with precise targets
|
||||
- `target`: Function/class/line range (e.g., `validateToken:45-60`)
|
||||
|
||||
## Execution Rules
|
||||
|
||||
1. **Never stop mid-workflow** - Continue until all tasks complete
|
||||
|
||||
Reference in New Issue
Block a user