Skip to content

Commit b0fb899

Browse files
author
catlog22
committed
feat(dispatch): enhance task description structure with detailed fields and context
1 parent 0a49dc0 commit b0fb899

2 files changed

Lines changed: 74 additions & 6 deletions

File tree

.claude/skills/team-coordinate-v2/roles/coordinator/commands/analyze-task.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,27 @@ Each capability produces default output artifacts:
5858
| tester | Test results | `<session>/artifacts/test-report.md` |
5959
| planner | Execution plan | `<session>/artifacts/execution-plan.md` |
6060

61+
### Step 2.5: Key File Inference
62+
63+
For each task, infer relevant files based on capability type and task keywords:
64+
65+
| Capability | File Inference Strategy |
66+
|------------|------------------------|
67+
| researcher | Extract domain keywords → map to likely directories (e.g., "auth" → `src/auth/**`, `middleware/auth.ts`) |
68+
| developer | Extract feature/module keywords → map to source files (e.g., "payment" → `src/payments/**`, `types/payment.ts`) |
69+
| designer | Look for architecture/config keywords → map to config/schema files |
70+
| analyst | Extract target keywords → map to files under analysis |
71+
| tester | Extract test target keywords → map to source + test files |
72+
| writer | Extract documentation target → map to relevant source files for context |
73+
| planner | No specific files (planning is abstract) |
74+
75+
**Inference rules:**
76+
- Extract nouns and verbs from task description
77+
- Match against common directory patterns (src/, lib/, components/, services/, utils/)
78+
- Include related type definition files (types/, *.d.ts)
79+
- For "fix bug" tasks, include error-prone areas (error handlers, validation)
80+
- For "implement feature" tasks, include similar existing features as reference
81+
6182
### Step 3: Dependency Graph Construction
6283

6384
Build a DAG of work streams using natural ordering tiers:
@@ -123,7 +144,22 @@ Write `<session-folder>/task-analysis.json`:
123144
"prefix": "RESEARCH",
124145
"responsibility_type": "orchestration",
125146
"tasks": [
126-
{ "id": "RESEARCH-001", "description": "..." }
147+
{
148+
"id": "RESEARCH-001",
149+
"goal": "What this task achieves and why",
150+
"steps": [
151+
"step 1: specific action with clear verb",
152+
"step 2: specific action with clear verb",
153+
"step 3: specific action with clear verb"
154+
],
155+
"key_files": [
156+
"src/path/to/relevant.ts",
157+
"src/path/to/other.ts"
158+
],
159+
"upstream_artifacts": [],
160+
"success_criteria": "Measurable completion condition",
161+
"constraints": "Scope limits, focus areas"
162+
}
127163
],
128164
"artifacts": ["research-findings.md"]
129165
}

.claude/skills/team-coordinate-v2/roles/coordinator/commands/dispatch.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,21 @@ Create task chains from dynamic dependency graphs. Builds pipelines from the tas
2626
TaskCreate({
2727
subject: "<PREFIX>-<NNN>",
2828
owner: "<role-name>",
29-
description: "<task description from task-analysis>\nSession: <session-folder>\nScope: <scope>\nInnerLoop: <true|false>\nRoleSpec: <session-folder>/role-specs/<role-name>.md",
29+
description: "PURPOSE: <goal> | Success: <success_criteria>
30+
TASK:
31+
- <step 1>
32+
- <step 2>
33+
- <step 3>
34+
CONTEXT:
35+
- Session: <session-folder>
36+
- Upstream artifacts: <artifact-1.md>, <artifact-2.md>
37+
- Key files: <file1>, <file2>
38+
- Shared memory: <session>/shared-memory.json
39+
EXPECTED: <deliverable path> + <quality criteria>
40+
CONSTRAINTS: <scope limits>
41+
---
42+
InnerLoop: <true|false>
43+
RoleSpec: <session-folder>/role-specs/<role-name>.md",
3044
blockedBy: [<dependency-list from graph>],
3145
status: "pending"
3246
})
@@ -37,16 +51,34 @@ TaskCreate({
3751

3852
### Task Description Template
3953

40-
Every task description includes session path, inner loop flag, and role-spec path:
54+
Every task description includes structured fields for clarity:
4155

4256
```
43-
<task description>
44-
Session: <session-folder>
45-
Scope: <scope>
57+
PURPOSE: <goal from task-analysis.json#tasks[].goal> | Success: <success_criteria from task-analysis.json#tasks[].success_criteria>
58+
TASK:
59+
- <step 1 from task-analysis.json#tasks[].steps[]>
60+
- <step 2 from task-analysis.json#tasks[].steps[]>
61+
- <step 3 from task-analysis.json#tasks[].steps[]>
62+
CONTEXT:
63+
- Session: <session-folder>
64+
- Upstream artifacts: <comma-separated list from task-analysis.json#tasks[].upstream_artifacts[]>
65+
- Key files: <comma-separated list from task-analysis.json#tasks[].key_files[]>
66+
- Shared memory: <session>/shared-memory.json
67+
EXPECTED: <artifact path from task-analysis.json#capabilities[].artifacts[]> + <quality criteria based on capability type>
68+
CONSTRAINTS: <constraints from task-analysis.json#tasks[].constraints>
69+
---
4670
InnerLoop: <true|false>
4771
RoleSpec: <session-folder>/role-specs/<role-name>.md
4872
```
4973

74+
**Field Mapping**:
75+
- `PURPOSE`: From `task-analysis.json#capabilities[].tasks[].goal` + `success_criteria`
76+
- `TASK`: From `task-analysis.json#capabilities[].tasks[].steps[]`
77+
- `CONTEXT.Upstream artifacts`: From `task-analysis.json#capabilities[].tasks[].upstream_artifacts[]`
78+
- `CONTEXT.Key files`: From `task-analysis.json#capabilities[].tasks[].key_files[]`
79+
- `EXPECTED`: From `task-analysis.json#capabilities[].artifacts[]` + quality criteria
80+
- `CONSTRAINTS`: From `task-analysis.json#capabilities[].tasks[].constraints`
81+
5082
### InnerLoop Flag Rules
5183

5284
| Condition | InnerLoop |

0 commit comments

Comments
 (0)