From b0fb8996751099f0fa740dacca17921b93d6b348 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sat, 28 Feb 2026 23:45:20 +0800 Subject: [PATCH] feat(dispatch): enhance task description structure with detailed fields and context --- .../coordinator/commands/analyze-task.md | 38 ++++++++++++++++- .../roles/coordinator/commands/dispatch.md | 42 ++++++++++++++++--- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/.claude/skills/team-coordinate-v2/roles/coordinator/commands/analyze-task.md b/.claude/skills/team-coordinate-v2/roles/coordinator/commands/analyze-task.md index fb432869..af7b6d3a 100644 --- a/.claude/skills/team-coordinate-v2/roles/coordinator/commands/analyze-task.md +++ b/.claude/skills/team-coordinate-v2/roles/coordinator/commands/analyze-task.md @@ -58,6 +58,27 @@ Each capability produces default output artifacts: | tester | Test results | `/artifacts/test-report.md` | | planner | Execution plan | `/artifacts/execution-plan.md` | +### Step 2.5: Key File Inference + +For each task, infer relevant files based on capability type and task keywords: + +| Capability | File Inference Strategy | +|------------|------------------------| +| researcher | Extract domain keywords → map to likely directories (e.g., "auth" → `src/auth/**`, `middleware/auth.ts`) | +| developer | Extract feature/module keywords → map to source files (e.g., "payment" → `src/payments/**`, `types/payment.ts`) | +| designer | Look for architecture/config keywords → map to config/schema files | +| analyst | Extract target keywords → map to files under analysis | +| tester | Extract test target keywords → map to source + test files | +| writer | Extract documentation target → map to relevant source files for context | +| planner | No specific files (planning is abstract) | + +**Inference rules:** +- Extract nouns and verbs from task description +- Match against common directory patterns (src/, lib/, components/, services/, utils/) +- Include related type definition files (types/, *.d.ts) +- For "fix bug" tasks, include error-prone areas (error handlers, validation) +- For "implement feature" tasks, include similar existing features as reference + ### Step 3: Dependency Graph Construction Build a DAG of work streams using natural ordering tiers: @@ -123,7 +144,22 @@ Write `/task-analysis.json`: "prefix": "RESEARCH", "responsibility_type": "orchestration", "tasks": [ - { "id": "RESEARCH-001", "description": "..." } + { + "id": "RESEARCH-001", + "goal": "What this task achieves and why", + "steps": [ + "step 1: specific action with clear verb", + "step 2: specific action with clear verb", + "step 3: specific action with clear verb" + ], + "key_files": [ + "src/path/to/relevant.ts", + "src/path/to/other.ts" + ], + "upstream_artifacts": [], + "success_criteria": "Measurable completion condition", + "constraints": "Scope limits, focus areas" + } ], "artifacts": ["research-findings.md"] } diff --git a/.claude/skills/team-coordinate-v2/roles/coordinator/commands/dispatch.md b/.claude/skills/team-coordinate-v2/roles/coordinator/commands/dispatch.md index 986d6ba5..139f0cc0 100644 --- a/.claude/skills/team-coordinate-v2/roles/coordinator/commands/dispatch.md +++ b/.claude/skills/team-coordinate-v2/roles/coordinator/commands/dispatch.md @@ -26,7 +26,21 @@ Create task chains from dynamic dependency graphs. Builds pipelines from the tas TaskCreate({ subject: "-", owner: "", - description: "\nSession: \nScope: \nInnerLoop: \nRoleSpec: /role-specs/.md", + description: "PURPOSE: | Success: +TASK: + - + - + - +CONTEXT: + - Session: + - Upstream artifacts: , + - Key files: , + - Shared memory: /shared-memory.json +EXPECTED: + +CONSTRAINTS: +--- +InnerLoop: +RoleSpec: /role-specs/.md", blockedBy: [], status: "pending" }) @@ -37,16 +51,34 @@ TaskCreate({ ### Task Description Template -Every task description includes session path, inner loop flag, and role-spec path: +Every task description includes structured fields for clarity: ``` - -Session: -Scope: +PURPOSE: | Success: +TASK: + - + - + - +CONTEXT: + - Session: + - Upstream artifacts: + - Key files: + - Shared memory: /shared-memory.json +EXPECTED: + +CONSTRAINTS: +--- InnerLoop: RoleSpec: /role-specs/.md ``` +**Field Mapping**: +- `PURPOSE`: From `task-analysis.json#capabilities[].tasks[].goal` + `success_criteria` +- `TASK`: From `task-analysis.json#capabilities[].tasks[].steps[]` +- `CONTEXT.Upstream artifacts`: From `task-analysis.json#capabilities[].tasks[].upstream_artifacts[]` +- `CONTEXT.Key files`: From `task-analysis.json#capabilities[].tasks[].key_files[]` +- `EXPECTED`: From `task-analysis.json#capabilities[].artifacts[]` + quality criteria +- `CONSTRAINTS`: From `task-analysis.json#capabilities[].tasks[].constraints` + ### InnerLoop Flag Rules | Condition | InnerLoop |