mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 15:03:57 +08:00
feat(dispatch): enhance task description structure with detailed fields and context
This commit is contained in:
@@ -58,6 +58,27 @@ Each capability produces default output artifacts:
|
||||
| tester | Test results | `<session>/artifacts/test-report.md` |
|
||||
| planner | Execution plan | `<session>/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 `<session-folder>/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"]
|
||||
}
|
||||
|
||||
@@ -26,7 +26,21 @@ Create task chains from dynamic dependency graphs. Builds pipelines from the tas
|
||||
TaskCreate({
|
||||
subject: "<PREFIX>-<NNN>",
|
||||
owner: "<role-name>",
|
||||
description: "<task description from task-analysis>\nSession: <session-folder>\nScope: <scope>\nInnerLoop: <true|false>\nRoleSpec: <session-folder>/role-specs/<role-name>.md",
|
||||
description: "PURPOSE: <goal> | Success: <success_criteria>
|
||||
TASK:
|
||||
- <step 1>
|
||||
- <step 2>
|
||||
- <step 3>
|
||||
CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Upstream artifacts: <artifact-1.md>, <artifact-2.md>
|
||||
- Key files: <file1>, <file2>
|
||||
- Shared memory: <session>/shared-memory.json
|
||||
EXPECTED: <deliverable path> + <quality criteria>
|
||||
CONSTRAINTS: <scope limits>
|
||||
---
|
||||
InnerLoop: <true|false>
|
||||
RoleSpec: <session-folder>/role-specs/<role-name>.md",
|
||||
blockedBy: [<dependency-list from graph>],
|
||||
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:
|
||||
|
||||
```
|
||||
<task description>
|
||||
Session: <session-folder>
|
||||
Scope: <scope>
|
||||
PURPOSE: <goal from task-analysis.json#tasks[].goal> | Success: <success_criteria from task-analysis.json#tasks[].success_criteria>
|
||||
TASK:
|
||||
- <step 1 from task-analysis.json#tasks[].steps[]>
|
||||
- <step 2 from task-analysis.json#tasks[].steps[]>
|
||||
- <step 3 from task-analysis.json#tasks[].steps[]>
|
||||
CONTEXT:
|
||||
- Session: <session-folder>
|
||||
- Upstream artifacts: <comma-separated list from task-analysis.json#tasks[].upstream_artifacts[]>
|
||||
- Key files: <comma-separated list from task-analysis.json#tasks[].key_files[]>
|
||||
- Shared memory: <session>/shared-memory.json
|
||||
EXPECTED: <artifact path from task-analysis.json#capabilities[].artifacts[]> + <quality criteria based on capability type>
|
||||
CONSTRAINTS: <constraints from task-analysis.json#tasks[].constraints>
|
||||
---
|
||||
InnerLoop: <true|false>
|
||||
RoleSpec: <session-folder>/role-specs/<role-name>.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 |
|
||||
|
||||
Reference in New Issue
Block a user