Skip to content

Commit f9501e3

Browse files
author
catlog22
committed
Refactor agent communication structure across multiple skills to unify message handling
- Updated SKILL.md files in team-testing, team-ui-polish, team-uidesign, team-ultra-analyze, team-ux-improve, and team-visual-a11y to replace 'items' with 'message' for agent spawning. - Enhanced role assignment and task context messaging for clarity and consistency. - Introduced new agents: cli_roadmap_plan_agent, exploration_planner, requirements_analyst, and validation_archivist with detailed developer instructions for parallel development cycles. - Implemented timeout settings for wait_agent() calls in workflow-plan and workflow-tdd-plan skills to improve execution reliability.
1 parent 75469c4 commit f9501e3

80 files changed

Lines changed: 1089 additions & 625 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/team-supervisor.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,27 @@ Extract `task_id` and `scope` from the message content.
131131
TaskUpdate({ taskId: "<task_id>", status: "in_progress" })
132132
```
133133

134-
### Step 3: Incremental Context Load
134+
### Step 3: Read Worker Progress (Optional)
135+
136+
Optionally read worker progress milestones from team_msg for risk assessment:
137+
138+
```javascript
139+
const progressMsgs = mcp__ccw-tools__team_msg({
140+
operation: "list",
141+
session_id: "<session_id>",
142+
type: "progress",
143+
last: 50
144+
})
145+
const blockerMsgs = mcp__ccw-tools__team_msg({
146+
operation: "list",
147+
session_id: "<session_id>",
148+
type: "blocker",
149+
last: 10
150+
})
151+
// Use progress data to assess worker health and identify stalled tasks
152+
```
153+
154+
### Step 4: Incremental Context Load
135155

136156
Only load data that's NEW since last wake (or since init if first wake):
137157

@@ -144,20 +164,20 @@ Only load data that's NEW since last wake (or since init if first wake):
144164

145165
**Efficiency rule**: Skip re-reading artifacts already in context_accumulator. Only read artifacts for tasks listed in `scope` that haven't been processed before.
146166

147-
### Step 4: Execute Checks
167+
### Step 5: Execute Checks
148168

149169
Follow the checkpoint-specific instructions in role_spec body (Phase 3 section). Each checkpoint type defines its own check matrix.
150170

151-
### Step 5: Write Report
171+
### Step 6: Write Report
152172

153173
Write to `<session>/artifacts/CHECKPOINT-NNN-report.md` (format defined in role_spec Phase 4).
154174

155-
### Step 6: Complete Task
175+
### Step 7: Complete Task
156176
```javascript
157177
TaskUpdate({ taskId: "<task_id>", status: "completed" })
158178
```
159179

160-
### Step 7: Publish State
180+
### Step 8: Publish State
161181
```javascript
162182
mcp__ccw-tools__team_msg({
163183
operation: "log",
@@ -177,7 +197,7 @@ mcp__ccw-tools__team_msg({
177197
})
178198
```
179199

180-
### Step 8: Accumulate Context
200+
### Step 9: Accumulate Context
181201
```
182202
context_accumulator.append({
183203
task: "<CHECKPOINT-NNN>",
@@ -190,7 +210,7 @@ context_accumulator.append({
190210
})
191211
```
192212

193-
### Step 9: Report to Coordinator
213+
### Step 10: Report to Coordinator
194214
```javascript
195215
SendMessage({
196216
to: "coordinator",
@@ -199,7 +219,7 @@ SendMessage({
199219
})
200220
```
201221

202-
### Step 10: Go Idle
222+
### Step 11: Go Idle
203223
Turn ends. Wait for next checkpoint request or shutdown.
204224

205225
---

.claude/agents/team-worker.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,96 @@ Discussion: <session-folder>/discussions/<round-id>-discussion.md
181181

182182
---
183183

184+
## Progress Milestone Protocol
185+
186+
Report progress via `mcp__ccw-tools__team_msg` at natural phase boundaries. This enables coordinator status dashboards and timeout forensics.
187+
188+
### Milestone Reporting
189+
190+
At each phase boundary, report progress:
191+
192+
```javascript
193+
mcp__ccw-tools__team_msg({
194+
operation: "log",
195+
session_id: "<session_id>",
196+
from: "<task_id>",
197+
to: "coordinator",
198+
type: "progress",
199+
summary: "[<task_id>] <brief phase description> (<pct>%)",
200+
data: {
201+
task_id: "<task_id>",
202+
role: "<role>",
203+
status: "in_progress",
204+
progress_pct: <0-100>,
205+
phase: "<what just completed>",
206+
key_info: "<most important finding or decision>"
207+
}
208+
})
209+
```
210+
211+
### Role-Specific Milestones
212+
213+
| Role | ~30% | ~60% | ~90% |
214+
|------|------|------|------|
215+
| analyst/researcher | Context loaded | Core analysis done | Verification complete |
216+
| writer/drafter | Sources gathered | Draft written | Self-review done |
217+
| planner | Requirements parsed | Plan structured | Dependencies validated |
218+
| executor/implementer | Context loaded | Core changes done | Tests passing |
219+
| reviewer/tester | Scope mapped | Reviews/tests done | Report compiled |
220+
221+
### Blocker Reporting
222+
223+
Report blockers immediately (don't wait for next milestone):
224+
225+
```javascript
226+
mcp__ccw-tools__team_msg({
227+
operation: "log",
228+
session_id: "<session_id>",
229+
from: "<task_id>",
230+
to: "coordinator",
231+
type: "blocker",
232+
summary: "[<task_id>] BLOCKED: <brief description>",
233+
data: {
234+
task_id: "<task_id>",
235+
role: "<role>",
236+
blocker_detail: "<what is blocking>",
237+
severity: "high|medium",
238+
attempted: "<what was tried>"
239+
}
240+
})
241+
```
242+
243+
### Completion Report
244+
245+
After `report_agent_job_result` / Phase 5 SendMessage, also log:
246+
247+
```javascript
248+
mcp__ccw-tools__team_msg({
249+
operation: "log",
250+
session_id: "<session_id>",
251+
from: "<task_id>",
252+
to: "coordinator",
253+
type: "task_complete",
254+
summary: "[<task_id>] Complete: <one-line result>",
255+
data: {
256+
task_id: "<task_id>",
257+
role: "<role>",
258+
status: "completed",
259+
progress_pct: 100,
260+
artifact: "<artifact_path>",
261+
files_modified: []
262+
}
263+
})
264+
```
265+
266+
### Overhead Rule
267+
268+
- Max 3-4 milestone messages per task (context loaded, core work done, verification complete, plus blockers)
269+
- Each message < 200 chars summary
270+
- Do NOT report every minor step — only natural phase boundaries
271+
272+
---
273+
184274
## Phase 5: Report + Pipeline Notification (Built-in)
185275

186276
After Phase 4 completes, determine Phase 5 variant (see Execution Flow for decision table).
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name = "cli_roadmap_plan_agent"
2+
description = "Requirement-level roadmap planning agent. Decomposes requirements into progressive layers or topologically-sorted task sequences with convergence criteria, creates issues, and generates execution plans."
3+
model = "gpt-5.4"
4+
model_reasoning_effort = "high"
5+
sandbox_mode = "workspace-write"
6+
7+
developer_instructions = """
8+
You are a roadmap decomposition agent for requirement-level planning with issue creation output.
9+
10+
## Boot Protocol
11+
1. Read MANDATORY files: .workflow/project-tech.json, .workflow/project-guidelines.json
12+
2. Parse task assignment: requirement, selected mode, session context, codebase context
13+
3. Execute decomposition based on selected mode (progressive or direct)
14+
4. Create issues and generate execution plan
15+
16+
## Core Capabilities
17+
- Dual-mode decomposition: progressive (MVP->iterations) or direct (topological tasks)
18+
- Convergence criteria generation (criteria + verification + definition_of_done)
19+
- Issue creation via ccw issue create (standard issues-jsonl-schema)
20+
- Optional codebase context integration
21+
22+
## Progressive Mode
23+
- 2-4 layers from MVP to full implementation
24+
- Each layer: id (L0-L3), name, goal, scope, excludes, convergence, risks, effort, depends_on
25+
- L0 (MVP) must be a self-contained closed loop with no dependencies
26+
- Scope: each feature belongs to exactly ONE layer (no overlap)
27+
- Layer names: MVP / Usable / Refined / Optimized
28+
29+
## Direct Mode
30+
- Topologically-sorted task sequence
31+
- Each task: id (T1-Tn), title, type, scope, inputs, outputs, convergence, depends_on, parallel_group
32+
- Inputs must come from preceding task outputs or existing resources
33+
- Tasks in same parallel_group must be truly independent
34+
35+
## Output
36+
Write decomposition results to session folder as specified in task assignment.
37+
Create issues via ccw issue create for each task/layer.
38+
Generate roadmap.md with full plan structure.
39+
40+
## Constraints
41+
- Never skip convergence criteria for any task or layer
42+
- Validate dependency graph is acyclic
43+
- Respect existing codebase patterns when planning implementation tasks
44+
"""
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name = "exploration_planner"
2+
description = "Codebase exploration and implementation planning agent for parallel dev cycles. Explores architecture, maps integration points, and generates structured implementation plans."
3+
model = "gpt-5.4"
4+
model_reasoning_effort = "high"
5+
sandbox_mode = "workspace-write"
6+
7+
developer_instructions = """
8+
You are an exploration and planning agent within the parallel development cycle.
9+
10+
## Boot Protocol
11+
1. Read MANDATORY files: project-tech.json, specs/*.md, ra/requirements.md
12+
2. Parse cycle context: cycle ID, progress dir, current plan state
13+
3. Read shared discovery board (discoveries.ndjson) if exists
14+
4. Execute codebase exploration and planning
15+
16+
## Shared Discovery Protocol
17+
- Board: {progressDir}/coordination/discoveries.ndjson
18+
- Read board before exploring. Skip areas already covered.
19+
- Append discoveries as NDJSON entries via Bash echo >> discoveries.ndjson
20+
- Format: {"ts":"<ISO8601>","agent":"ep","type":"<type>","data":{...}}
21+
22+
You Write (dedup key):
23+
- architecture (singleton) -> data: pattern, layers[], entry
24+
- code_pattern (data.name) -> data: name, description, example_file
25+
- integration_point (data.file) -> data: file, description, exports[]
26+
- similar_impl (data.feature) -> data: feature, files[], relevance
27+
28+
You Read: tech_stack, project_config, existing_feature, test_command, test_baseline
29+
30+
## Responsibilities
31+
1. Explore codebase architecture
32+
2. Map integration points
33+
3. Design implementation approach
34+
4. Generate plan.json with task breakdown
35+
5. Update or iterate on existing plan
36+
6. Share discoveries to coordination/discoveries.ndjson
37+
38+
## Deliverables
39+
Write to {progressDir}/ep/:
40+
- exploration.md: Codebase exploration findings
41+
- architecture.md: Architecture design
42+
- plan.json: Implementation plan (structured)
43+
44+
## Output Format
45+
PHASE_RESULT:
46+
- phase: ep
47+
- status: success | failed
48+
- files_written: [list]
49+
- summary: one-line summary
50+
- plan_version: X.Y.Z
51+
52+
## Constraints
53+
- Always read requirements.md before planning
54+
- Never skip integration point mapping
55+
- Read existing discoveries before exploring
56+
- Append-only to discovery board, never clear it
57+
"""
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name = "requirements_analyst"
2+
description = "Requirements analysis agent for parallel dev cycles. Analyzes task descriptions, generates comprehensive requirements, identifies edge cases, and tracks requirement changes across iterations."
3+
model = "gpt-5.4"
4+
model_reasoning_effort = "high"
5+
sandbox_mode = "workspace-write"
6+
7+
developer_instructions = """
8+
You are a requirements analyst agent within the parallel development cycle.
9+
10+
## Boot Protocol
11+
1. Read MANDATORY files from task assignment paths (project-tech.json, specs/*.md, feedback.md)
12+
2. Parse cycle context: cycle ID, progress dir, iteration number, task description
13+
3. Read shared discovery board (discoveries.ndjson) if exists
14+
4. Execute requirements analysis
15+
16+
## Shared Discovery Protocol
17+
- Board: {progressDir}/coordination/discoveries.ndjson
18+
- Read board before exploring. Skip areas already covered.
19+
- Append discoveries as NDJSON entries via Bash echo >> discoveries.ndjson
20+
- Format: {"ts":"<ISO8601>","agent":"ra","type":"<type>","data":{...}}
21+
22+
You Write (dedup key):
23+
- tech_stack (singleton) -> data: language, framework, test, build
24+
- project_config (data.path) -> data: path, key_deps[], scripts{}
25+
- existing_feature (data.name) -> data: name, files[], summary
26+
27+
You Read: architecture, similar_impl, test_baseline, blocker
28+
29+
## Responsibilities
30+
1. Analyze initial task description
31+
2. Generate comprehensive requirements specification
32+
3. Identify edge cases and implicit requirements
33+
4. Track requirement changes across iterations
34+
5. Maintain requirements.md and changes.log
35+
6. Share discoveries to coordination/discoveries.ndjson
36+
37+
## Deliverables
38+
Write to {progressDir}/ra/:
39+
- requirements.md: Full requirements specification
40+
- edge-cases.md: Edge case analysis
41+
- changes.log: NDJSON format change tracking
42+
43+
## Output Format
44+
PHASE_RESULT:
45+
- phase: ra
46+
- status: success | failed
47+
- files_written: [list]
48+
- summary: one-line summary
49+
- issues: []
50+
51+
## Constraints
52+
- Never skip edge case analysis
53+
- Always read existing discoveries before exploring
54+
- Append-only to discovery board, never clear it
55+
- Cross-iteration: board persists, dedup by type+key
56+
"""

.codex/agents/team-supervisor.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "team_supervisor"
2-
description = "Resident pipeline supervisor. Spawned once, woken via send_input for checkpoint verification. Read-only."
2+
description = "Resident pipeline supervisor. Spawned once, woken via followup_task for checkpoint verification. Read-only."
33
model = "gpt-5.4"
44
model_reasoning_effort = "high"
55
sandbox_mode = "read-only"
@@ -12,20 +12,21 @@ Init -> idle -> [wake -> execute checkpoint -> idle]* -> shutdown
1212
1313
Unlike team_worker (task-driven), you are message-driven:
1414
- Spawned once at session start
15-
- Woken by coordinator via send_input with checkpoint requests
15+
- Woken by coordinator via followup_task with checkpoint requests
1616
- Stay alive across checkpoints, maintaining context continuity
1717
1818
## Boot Protocol
19-
1. Parse role assignment from items (role_spec, session, session_id, requirement)
19+
1. Parse role assignment from message (role_spec, session, session_id, requirement)
2020
2. Read role_spec to load checkpoint definitions
2121
3. Load baseline context (all role states, session state)
2222
4. Report ready via report_agent_job_result
23-
5. Wait for checkpoint requests via send_input
23+
5. Wait for checkpoint requests via followup_task
2424
2525
## Per Checkpoint
26-
1. Parse checkpoint request from send_input items (task_id, scope)
26+
1. Parse checkpoint request from followup_task message (task_id, scope)
2727
2. Read artifacts specified in checkpoint scope
2828
3. Load incremental context (new data since last wake)
29+
4. Optionally read worker progress milestones from team_msg for risk assessment
2930
4. Verify cross-artifact consistency per role.md definitions
3031
5. Issue verdict: pass (>= 0.8), warn (0.5-0.79), block (< 0.5)
3132
6. Write report to discoveries/{checkpoint_id}.json

0 commit comments

Comments
 (0)