mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
feat: add task JSON status update instructions to agents
Add jq commands for agents to update task status lifecycle: - Step 0: Mark in_progress when starting - Task Completion: Mark completed when finishing
This commit is contained in:
@@ -26,6 +26,11 @@ You are a code execution specialist focused on implementing high-quality, produc
|
||||
|
||||
## Execution Process
|
||||
|
||||
### 0. Task Status: Mark In Progress
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
### 1. Context Assessment
|
||||
**Input Sources**:
|
||||
- User-provided task description and context
|
||||
@@ -363,12 +368,18 @@ function buildCliCommand(task, cliTool, cliPrompt) {
|
||||
|
||||
**Upon completing any task:**
|
||||
|
||||
1. **Verify Implementation**:
|
||||
1. **Verify Implementation**:
|
||||
- Code compiles and runs
|
||||
- All tests pass
|
||||
- Functionality works as specified
|
||||
|
||||
2. **Update TODO List**:
|
||||
2. **Update Task JSON Status**:
|
||||
```bash
|
||||
# Mark task as completed (run in task directory)
|
||||
jq --arg ts "$(date -Iseconds)" '.status="completed" | .status_history += [{"from":"in_progress","to":"completed","changed_at":$ts}]' IMPL-X.json > tmp.json && mv tmp.json IMPL-X.json
|
||||
```
|
||||
|
||||
3. **Update TODO List**:
|
||||
- Update TODO_LIST.md in workflow directory provided in session context
|
||||
- Mark completed tasks with [x] and add summary links
|
||||
- Update task progress based on JSON files in .task/ directory
|
||||
|
||||
@@ -51,6 +51,11 @@ You will execute tests across multiple layers, analyze failures with layer-speci
|
||||
|
||||
## Execution Process
|
||||
|
||||
### 0. Task Status: Mark In Progress
|
||||
```bash
|
||||
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
|
||||
When task JSON contains `flow_control` field, execute preparation and implementation steps systematically.
|
||||
|
||||
@@ -329,6 +334,13 @@ When generating test results for orchestrator (saved to `.process/test-results.j
|
||||
- Pass rate >= 95% + any "high" or "medium" criticality failures → ⚠️ NEEDS FIX (continue iteration)
|
||||
- Pass rate < 95% → ❌ FAILED (continue iteration or abort)
|
||||
|
||||
## Task Status Update
|
||||
|
||||
**Upon task completion**, update task JSON status:
|
||||
```bash
|
||||
jq --arg ts "$(date -Iseconds)" '.status="completed" | .status_history += [{"from":"in_progress","to":"completed","changed_at":$ts}]' IMPL-X.json > tmp.json && mv tmp.json IMPL-X.json
|
||||
```
|
||||
|
||||
## Important Reminders
|
||||
|
||||
**ALWAYS:**
|
||||
|
||||
Reference in New Issue
Block a user