Skip to content

Commit 0a7c145

Browse files
author
catlog22
committed
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
1 parent 4a84819 commit 0a7c145

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.claude/agents/code-developer.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ You are a code execution specialist focused on implementing high-quality, produc
2626

2727
## Execution Process
2828

29+
### 0. Task Status: Mark In Progress
30+
```bash
31+
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
32+
```
33+
2934
### 1. Context Assessment
3035
**Input Sources**:
3136
- User-provided task description and context
@@ -363,12 +368,18 @@ function buildCliCommand(task, cliTool, cliPrompt) {
363368
364369
**Upon completing any task:**
365370
366-
1. **Verify Implementation**:
371+
1. **Verify Implementation**:
367372
- Code compiles and runs
368373
- All tests pass
369374
- Functionality works as specified
370375
371-
2. **Update TODO List**:
376+
2. **Update Task JSON Status**:
377+
```bash
378+
# Mark task as completed (run in task directory)
379+
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
380+
```
381+
382+
3. **Update TODO List**:
372383
- Update TODO_LIST.md in workflow directory provided in session context
373384
- Mark completed tasks with [x] and add summary links
374385
- Update task progress based on JSON files in .task/ directory

.claude/agents/test-fix-agent.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ You will execute tests across multiple layers, analyze failures with layer-speci
5151

5252
## Execution Process
5353

54+
### 0. Task Status: Mark In Progress
55+
```bash
56+
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
57+
```
58+
5459
### Flow Control Execution
5560
When task JSON contains `flow_control` field, execute preparation and implementation steps systematically.
5661

@@ -329,6 +334,13 @@ When generating test results for orchestrator (saved to `.process/test-results.j
329334
- Pass rate >= 95% + any "high" or "medium" criticality failures → ⚠️ NEEDS FIX (continue iteration)
330335
- Pass rate < 95% → ❌ FAILED (continue iteration or abort)
331336

337+
## Task Status Update
338+
339+
**Upon task completion**, update task JSON status:
340+
```bash
341+
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
342+
```
343+
332344
## Important Reminders
333345

334346
**ALWAYS:**

0 commit comments

Comments
 (0)