claude-code-workflow 7.2.29 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json +2 -2
- package/.ccw/workflows/cli-templates/schemas/task-schema.json +14 -7
- package/.claude/agents/action-planning-agent.md +7 -4
- package/.claude/agents/cli-explore-agent.md +77 -63
- package/.claude/agents/cli-lite-planning-agent.md +11 -10
- package/.claude/agents/issue-plan-agent.md +421 -426
- package/.claude/commands/workflow/spec/setup.md +1 -1
- package/.claude/commands/workflow-skill.md +130 -0
- package/.claude/skills/ccw-chain/SKILL.md +92 -0
- package/.claude/skills/ccw-chain/chains/ccw-cycle.json +31 -0
- package/.claude/skills/ccw-chain/chains/ccw-exploration.json +58 -0
- package/.claude/skills/ccw-chain/chains/ccw-issue.json +44 -0
- package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +71 -0
- package/.claude/skills/ccw-chain/chains/ccw-main.json +65 -0
- package/.claude/skills/ccw-chain/chains/ccw-standard.json +51 -0
- package/.claude/skills/ccw-chain/chains/ccw-team.json +15 -0
- package/.claude/skills/ccw-chain/chains/ccw-with-file.json +47 -0
- package/.claude/skills/ccw-chain/specs/auto-mode.md +47 -0
- package/.claude/skills/chain-loader/SKILL.md +78 -0
- package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -0
- package/.claude/skills/chain-loader/phases/02-design-graph.md +73 -0
- package/.claude/skills/chain-loader/phases/03-generate-validate.md +75 -0
- package/.claude/skills/chain-loader/specs/chain-schema.md +126 -0
- package/.claude/skills/chain-loader/specs/design-patterns.md +99 -0
- package/.claude/skills/chain-loader/templates/chain-json.md +63 -0
- package/.claude/skills/review-cycle/phases/review-module.md +764 -764
- package/.claude/skills/review-cycle/phases/review-session.md +775 -775
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +2 -2
- package/.claude/skills/workflow-plan/SKILL.md +1 -0
- package/.claude/skills/workflow-plan/phases/01-session-discovery.md +19 -2
- package/.claude/skills/workflow-plan/phases/02-context-gathering.md +2 -2
- package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -422
- package/.claude/skills/workflow-plan/phases/04-task-generation.md +9 -1
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +395 -395
- package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +407 -407
- package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -426
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +493 -493
- package/.codex/skills/analyze-with-file/SKILL.md +383 -134
- package/.codex/skills/brainstorm/SKILL.md +3 -3
- package/.codex/skills/brainstorm-with-file/SKILL.md +208 -88
- package/.codex/skills/clean/SKILL.md +1 -1
- package/.codex/skills/csv-wave-pipeline/SKILL.md +2 -2
- package/.codex/skills/investigate/orchestrator.md +24 -0
- package/.codex/skills/issue-discover/SKILL.md +374 -361
- package/.codex/skills/issue-discover/phases/01-issue-new.md +1 -1
- package/.codex/skills/issue-discover/phases/02-discover.md +2 -2
- package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +1 -1
- package/.codex/skills/issue-discover/phases/04-quick-execute.md +2 -2
- package/.codex/skills/parallel-dev-cycle/SKILL.md +44 -37
- package/.codex/skills/project-documentation-workflow/SKILL.md +1 -1
- package/.codex/skills/review-cycle/SKILL.md +31 -12
- package/.codex/skills/roadmap-with-file/SKILL.md +141 -133
- package/.codex/skills/security-audit/orchestrator.md +29 -0
- package/.codex/skills/session-sync/SKILL.md +1 -1
- package/.codex/skills/ship/orchestrator.md +24 -0
- package/.codex/skills/spec-add/SKILL.md +5 -5
- package/.codex/skills/spec-generator/SKILL.md +33 -2
- package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +3 -3
- package/.codex/skills/spec-generator/phases/01-discovery.md +1 -1
- package/.codex/skills/spec-generator/phases/02-product-brief.md +1 -1
- package/.codex/skills/spec-generator/phases/03-requirements.md +1 -1
- package/.codex/skills/spec-generator/phases/04-architecture.md +1 -1
- package/.codex/skills/spec-generator/phases/05-epics-stories.md +1 -1
- package/.codex/skills/spec-generator/phases/06-readiness-check.md +1 -1
- package/.codex/skills/spec-generator/phases/07-issue-export.md +1 -1
- package/.codex/skills/spec-setup/SKILL.md +669 -669
- package/.codex/skills/team-arch-opt/specs/team-config.json +1 -1
- package/.codex/skills/team-brainstorm/SKILL.md +259 -259
- package/.codex/skills/team-coordinate/SKILL.md +359 -359
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-designer/SKILL.md +27 -1
- package/.codex/skills/team-designer/phases/01-requirements-analysis.md +2 -2
- package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
- package/.codex/skills/team-designer/phases/04-validation.md +1 -1
- package/.codex/skills/team-executor/SKILL.md +218 -218
- package/.codex/skills/team-frontend/SKILL.md +227 -227
- package/.codex/skills/team-frontend-debug/SKILL.md +278 -278
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +2 -2
- package/.codex/skills/team-interactive-craft/SKILL.md +220 -220
- package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -209
- package/.codex/skills/team-issue/SKILL.md +269 -269
- package/.codex/skills/team-issue/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -305
- package/.codex/skills/team-motion-design/SKILL.md +222 -222
- package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -210
- package/.codex/skills/team-perf-opt/SKILL.md +258 -258
- package/.codex/skills/team-perf-opt/specs/team-config.json +1 -1
- package/.codex/skills/team-planex/SKILL.md +216 -216
- package/.codex/skills/team-quality-assurance/SKILL.md +229 -229
- package/.codex/skills/team-review/SKILL.md +227 -227
- package/.codex/skills/team-roadmap-dev/SKILL.md +238 -238
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +5 -5
- package/.codex/skills/team-tech-debt/SKILL.md +206 -206
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-testing/SKILL.md +237 -237
- package/.codex/skills/team-ui-polish/SKILL.md +218 -218
- package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -213
- package/.codex/skills/team-uidesign/SKILL.md +219 -219
- package/.codex/skills/team-uidesign/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-ultra-analyze/SKILL.md +260 -260
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-ux-improve/SKILL.md +227 -227
- package/.codex/skills/team-ux-improve/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-ux-improve/specs/team-config.json +1 -1
- package/.codex/skills/team-visual-a11y/SKILL.md +319 -319
- package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -213
- package/.codex/skills/workflow-execute/SKILL.md +5 -5
- package/.codex/skills/workflow-lite-planex/SKILL.md +3 -3
- package/.codex/skills/workflow-plan/SKILL.md +3 -3
- package/.codex/skills/workflow-tdd-plan/SKILL.md +4 -4
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +403 -402
- package/README.md +14 -0
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +16 -0
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/chain-loader.d.ts +2 -0
- package/ccw/dist/commands/chain-loader.d.ts.map +1 -0
- package/ccw/dist/commands/chain-loader.js +11 -0
- package/ccw/dist/commands/chain-loader.js.map +1 -0
- package/ccw/dist/commands/install.d.ts.map +1 -1
- package/ccw/dist/commands/install.js +52 -1
- package/ccw/dist/commands/install.js.map +1 -1
- package/ccw/dist/commands/launcher.d.ts +2 -0
- package/ccw/dist/commands/launcher.d.ts.map +1 -0
- package/ccw/dist/commands/launcher.js +434 -0
- package/ccw/dist/commands/launcher.js.map +1 -0
- package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/litellm-api-routes.js +0 -23
- package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
- package/ccw/dist/tools/chain-loader.d.ts +10 -0
- package/ccw/dist/tools/chain-loader.d.ts.map +1 -0
- package/ccw/dist/tools/chain-loader.js +1054 -0
- package/ccw/dist/tools/chain-loader.js.map +1 -0
- package/ccw/dist/tools/index.d.ts.map +1 -1
- package/ccw/dist/tools/index.js +2 -0
- package/ccw/dist/tools/index.js.map +1 -1
- package/ccw/dist/tools/json-builder.js +20 -0
- package/ccw/dist/tools/json-builder.js.map +1 -1
- package/ccw/dist/tools/skill-context-loader.d.ts.map +1 -1
- package/ccw/dist/tools/skill-context-loader.js +12 -26
- package/ccw/dist/tools/skill-context-loader.js.map +1 -1
- package/ccw/dist/types/chain-types.d.ts +112 -0
- package/ccw/dist/types/chain-types.d.ts.map +1 -0
- package/ccw/dist/types/chain-types.js +5 -0
- package/ccw/dist/types/chain-types.js.map +1 -0
- package/ccw/dist/utils/chain-visualizer.d.ts +13 -0
- package/ccw/dist/utils/chain-visualizer.d.ts.map +1 -0
- package/ccw/dist/utils/chain-visualizer.js +164 -0
- package/ccw/dist/utils/chain-visualizer.js.map +1 -0
- package/ccw/scripts/prepublish-clean.mjs +0 -1
- package/package.json +1 -3
- package/.claude/commands/cli/cli-init.md +0 -441
- package/.claude/commands/cli/codex-review.md +0 -361
- package/.claude/commands/flow-create.md +0 -663
- package/.claude/skills/team-edict.zip +0 -0
- package/ccw-litellm/README.md +0 -180
- package/ccw-litellm/pyproject.toml +0 -35
- package/ccw-litellm/src/ccw_litellm/__init__.py +0 -47
- package/ccw-litellm/src/ccw_litellm/cli.py +0 -108
- package/ccw-litellm/src/ccw_litellm/clients/__init__.py +0 -12
- package/ccw-litellm/src/ccw_litellm/clients/litellm_embedder.py +0 -270
- package/ccw-litellm/src/ccw_litellm/clients/litellm_llm.py +0 -198
- package/ccw-litellm/src/ccw_litellm/config/__init__.py +0 -22
- package/ccw-litellm/src/ccw_litellm/config/loader.py +0 -343
- package/ccw-litellm/src/ccw_litellm/config/models.py +0 -162
- package/ccw-litellm/src/ccw_litellm/interfaces/__init__.py +0 -14
- package/ccw-litellm/src/ccw_litellm/interfaces/embedder.py +0 -52
- package/ccw-litellm/src/ccw_litellm/interfaces/llm.py +0 -45
|
@@ -233,7 +233,7 @@ All tasks completed (no pending, no in_progress)
|
|
|
233
233
|
+- Read session.completion_action:
|
|
234
234
|
|
|
|
235
235
|
+- "interactive":
|
|
236
|
-
| request_user_input({
|
|
236
|
+
| functions.request_user_input({
|
|
237
237
|
| questions: [{
|
|
238
238
|
| question: "Team pipeline complete. What would you like to do?",
|
|
239
239
|
| header: "Completion",
|
|
@@ -39,6 +39,9 @@ Generate complete team skills following the team-lifecycle-v4 architecture: SKIL
|
|
|
39
39
|
## Execution Flow
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
+
Progress Tracking Initialization:
|
|
43
|
+
└─ functions.update_plan([all 4 phases, Phase 1 as in_progress])
|
|
44
|
+
|
|
42
45
|
Input Parsing:
|
|
43
46
|
└─ Parse user requirements (skill name, roles, pipelines, domain)
|
|
44
47
|
|
|
@@ -46,20 +49,24 @@ Phase 1: Requirements Analysis
|
|
|
46
49
|
└─ Ref: phases/01-requirements-analysis.md
|
|
47
50
|
├─ Tasks: Detect input → Gather roles → Define pipelines → Build teamConfig
|
|
48
51
|
└─ Output: teamConfig
|
|
52
|
+
└─ Progress: mark phase-1 completed, phase-2 in_progress
|
|
49
53
|
|
|
50
54
|
Phase 2: Scaffold Generation
|
|
51
55
|
└─ Ref: phases/02-scaffold-generation.md
|
|
52
56
|
├─ Tasks: Create dirs → Generate SKILL.md router → Verify
|
|
53
57
|
└─ Output: SKILL.md + directory structure
|
|
58
|
+
└─ Progress: mark phase-2 completed, phase-3 in_progress
|
|
54
59
|
|
|
55
60
|
Phase 3: Content Generation
|
|
56
61
|
└─ Ref: phases/03-content-generation.md
|
|
57
62
|
├─ Tasks: Coordinator → Workers → Specs → Templates
|
|
58
63
|
└─ Output: roles/**/*.md, specs/*.md, templates/*.md
|
|
64
|
+
└─ Progress: mark phase-3 completed, phase-4 in_progress
|
|
59
65
|
|
|
60
66
|
Phase 4: Validation
|
|
61
67
|
└─ Ref: phases/04-validation.md
|
|
62
68
|
└─ Output: Validation report (PASS/REVIEW/FAIL)
|
|
69
|
+
└─ Progress: mark phase-4 completed
|
|
63
70
|
|
|
64
71
|
Return:
|
|
65
72
|
└─ Summary with skill location and usage instructions
|
|
@@ -101,6 +108,25 @@ Generated skills follow the architecture of `~ or <project>/.claude/skills/team
|
|
|
101
108
|
└── templates/ # Optional document templates
|
|
102
109
|
```
|
|
103
110
|
|
|
111
|
+
## Progress Tracking
|
|
112
|
+
|
|
113
|
+
Initialize progress tracking before Phase 1 execution:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
functions.update_plan([
|
|
117
|
+
{ id: "phase-1", title: "Phase 1: Requirements Analysis", status: "in_progress" },
|
|
118
|
+
{ id: "phase-2", title: "Phase 2: Scaffold Generation", status: "pending" },
|
|
119
|
+
{ id: "phase-3", title: "Phase 3: Content Generation", status: "pending" },
|
|
120
|
+
{ id: "phase-4", title: "Phase 4: Validation", status: "pending" }
|
|
121
|
+
])
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
At each phase transition:
|
|
125
|
+
- **Phase 1 complete**: `functions.update_plan([{id: "phase-1", status: "completed"}, {id: "phase-2", status: "in_progress"}])`
|
|
126
|
+
- **Phase 2 complete**: `functions.update_plan([{id: "phase-2", status: "completed"}, {id: "phase-3", status: "in_progress"}])`
|
|
127
|
+
- **Phase 3 complete**: `functions.update_plan([{id: "phase-3", status: "completed"}, {id: "phase-4", status: "in_progress"}])`
|
|
128
|
+
- **Phase 4 complete**: `functions.update_plan([{id: "phase-4", status: "completed"}])`
|
|
129
|
+
|
|
104
130
|
## Data Flow
|
|
105
131
|
|
|
106
132
|
```
|
|
@@ -126,7 +152,7 @@ Return summary to user
|
|
|
126
152
|
|
|
127
153
|
## Core Rules
|
|
128
154
|
|
|
129
|
-
1. **Start Immediately**: First action is Phase 1 execution
|
|
155
|
+
1. **Start Immediately**: First action is progress tracking initialization, second action is Phase 1 execution
|
|
130
156
|
2. **Parse Every Output**: Extract teamConfig from Phase 1 for subsequent phases
|
|
131
157
|
3. **Auto-Continue**: After each phase, automatically execute next phase
|
|
132
158
|
4. **Progressive Phase Loading**: Read phase docs ONLY when that phase is about to execute
|
|
@@ -34,11 +34,11 @@ function detectInputSource(userInput) {
|
|
|
34
34
|
## Step 1.2: Gather Core Identity
|
|
35
35
|
|
|
36
36
|
```javascript
|
|
37
|
-
const skillNameResponse = request_user_input({
|
|
37
|
+
const skillNameResponse = functions.request_user_input({
|
|
38
38
|
prompt: `团队技能名称?(kebab-case, e.g., team-code-review)\n\nSuggested: ${suggestedName}\nOr enter a custom name.`
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
const prefixResponse = request_user_input({
|
|
41
|
+
const prefixResponse = functions.request_user_input({
|
|
42
42
|
prompt: `会话前缀?(3-4字符用于任务ID, e.g., TCR)\n\nSuggested: ${suggestedPrefix}\nOr enter a custom prefix.`
|
|
43
43
|
});
|
|
44
44
|
```
|
|
@@ -158,7 +158,7 @@ Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5
|
|
|
158
158
|
When pipeline completes, coordinator presents:
|
|
159
159
|
|
|
160
160
|
\```
|
|
161
|
-
request_user_input({
|
|
161
|
+
functions.request_user_input({
|
|
162
162
|
prompt: "Pipeline complete. What would you like to do?\n\nOptions:\n1. Archive & Clean (Recommended) - Archive session, clean up team\n2. Keep Active - Keep session for follow-up work\n3. Export Results - Export deliverables to target directory"
|
|
163
163
|
})
|
|
164
164
|
\```
|
|
@@ -296,7 +296,7 @@ Usage:
|
|
|
296
296
|
|
|
297
297
|
```javascript
|
|
298
298
|
if (report.gate === 'FAIL') {
|
|
299
|
-
const recovery = request_user_input({
|
|
299
|
+
const recovery = functions.request_user_input({
|
|
300
300
|
prompt: `Validation found ${report.errors.length} errors. How to proceed?\n\nOptions:\n1. Auto-fix - Attempt automatic fixes (missing files, frontmatter)\n2. Regenerate - Re-run Phase 3 with fixes\n3. Accept as-is - Manual fix later`
|
|
301
301
|
});
|
|
302
302
|
}
|
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: team-executor
|
|
3
|
-
description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via team-worker agents. No analysis, no role generation -- only loads and executes. Session path required. Triggers on "Team Executor".
|
|
4
|
-
allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Team Executor
|
|
8
|
-
|
|
9
|
-
Lightweight session execution skill: load session -> reconcile state -> spawn team-worker agents -> execute -> deliver. **No analysis, no role generation** -- only executes existing team-coordinate sessions.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Architecture
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
+---------------------------------------------------+
|
|
16
|
-
| Skill(skill="team-executor") |
|
|
17
|
-
| args="--session=<path>" [REQUIRED] |
|
|
18
|
-
+-------------------+-------------------------------+
|
|
19
|
-
| Session Validation
|
|
20
|
-
+---- --session valid? ----+
|
|
21
|
-
| NO | YES
|
|
22
|
-
v v
|
|
23
|
-
Error immediately Orchestration Mode
|
|
24
|
-
(no session) -> executor
|
|
25
|
-
|
|
|
26
|
-
+-------+-------+-------+
|
|
27
|
-
v v v v
|
|
28
|
-
[team-worker agents loaded from session role-specs]
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Session Validation (BEFORE routing)
|
|
34
|
-
|
|
35
|
-
**CRITICAL**: Session validation MUST occur before any execution.
|
|
36
|
-
|
|
37
|
-
### Parse Arguments
|
|
38
|
-
|
|
39
|
-
Extract from `$ARGUMENTS`:
|
|
40
|
-
- `--session=<path>`: Path to team-coordinate session folder (REQUIRED)
|
|
41
|
-
|
|
42
|
-
### Validation Steps
|
|
43
|
-
|
|
44
|
-
1. **Check `--session` provided**:
|
|
45
|
-
- If missing -> **ERROR**: "Session required. Usage: --session=<path-to-TC-folder>"
|
|
46
|
-
|
|
47
|
-
2. **Validate session structure** (see specs/session-schema.md):
|
|
48
|
-
- Directory exists at path
|
|
49
|
-
- `team-session.json` exists and valid JSON
|
|
50
|
-
- `task-analysis.json` exists and valid JSON
|
|
51
|
-
- `role-specs/` directory has at least one `.md` file
|
|
52
|
-
- Each role in `team-session.json#roles` has corresponding `.md` file in `role-specs/`
|
|
53
|
-
|
|
54
|
-
3. **Validation failure**:
|
|
55
|
-
- Report specific missing component
|
|
56
|
-
- Suggest re-running team-coordinate or checking path
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Role Router
|
|
61
|
-
|
|
62
|
-
This skill is **executor-only**. Workers do NOT invoke this skill -- they are spawned as `team-worker` agents directly.
|
|
63
|
-
|
|
64
|
-
### Dispatch Logic
|
|
65
|
-
|
|
66
|
-
| Scenario | Action |
|
|
67
|
-
|----------|--------|
|
|
68
|
-
| No `--session` | **ERROR** immediately |
|
|
69
|
-
| `--session` invalid | **ERROR** with specific reason |
|
|
70
|
-
| Valid session | Orchestration Mode -> executor |
|
|
71
|
-
|
|
72
|
-
### Orchestration Mode
|
|
73
|
-
|
|
74
|
-
**Invocation**: `Skill(skill="team-executor", args="--session=<session-folder>")`
|
|
75
|
-
|
|
76
|
-
**Lifecycle**:
|
|
77
|
-
```
|
|
78
|
-
Validate session
|
|
79
|
-
-> executor Phase 0: Reconcile state (reset interrupted, detect orphans)
|
|
80
|
-
-> executor Phase 1: Spawn first batch team-worker agents (background) -> STOP
|
|
81
|
-
-> Worker executes -> callback -> executor advances next step
|
|
82
|
-
-> Loop until pipeline complete -> Phase 2 report + completion action
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**User Commands** (wake paused executor):
|
|
86
|
-
|
|
87
|
-
| Command | Action |
|
|
88
|
-
|---------|--------|
|
|
89
|
-
| `check` / `status` | Output execution status graph, no advancement |
|
|
90
|
-
| `resume` / `continue` | Check worker states, advance next step |
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Role Registry
|
|
95
|
-
|
|
96
|
-
| Role | File | Type |
|
|
97
|
-
|------|------|------|
|
|
98
|
-
| executor | [roles/executor/role.md](roles/executor/role.md) | built-in orchestrator |
|
|
99
|
-
| (dynamic) | `<session>/role-specs/<role-name>.md` | loaded from session |
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Executor Spawn Template
|
|
104
|
-
|
|
105
|
-
### v2 Worker Spawn (all roles)
|
|
106
|
-
|
|
107
|
-
When executor spawns workers, use `team-worker` agent with role-spec path:
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
spawn_agent({
|
|
111
|
-
agent_type: "team_worker",
|
|
112
|
-
task_name: "<task-id>",
|
|
113
|
-
fork_context: false,
|
|
114
|
-
items: [
|
|
115
|
-
{ type: "text", text: `## Role Assignment
|
|
116
|
-
role: <role>
|
|
117
|
-
role_spec: <session-folder>/role-specs/<role>.md
|
|
118
|
-
session: <session-folder>
|
|
119
|
-
session_id: <session-id>
|
|
120
|
-
requirement: <task-description>
|
|
121
|
-
inner_loop: <true|false>
|
|
122
|
-
|
|
123
|
-
Read role_spec file to load Phase 2-4 domain instructions.` },
|
|
124
|
-
|
|
125
|
-
{ type: "text", text: `## Task Context
|
|
126
|
-
task_id: <task-id>
|
|
127
|
-
title: <task-title>
|
|
128
|
-
description: <task-description>
|
|
129
|
-
pipeline_phase: <pipeline-phase>` },
|
|
130
|
-
|
|
131
|
-
{ type: "text", text: `## Upstream Context
|
|
132
|
-
<prev_context>` }
|
|
133
|
-
]
|
|
134
|
-
})
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
### Model Selection Guide
|
|
143
|
-
|
|
144
|
-
team-executor loads roles dynamically from session role-specs. Use reasoning_effort based on the role type defined in the session:
|
|
145
|
-
- Implementation/fix roles: `reasoning_effort: "high"`
|
|
146
|
-
- Verification/test roles: `reasoning_effort: "medium"`
|
|
147
|
-
- Default when role type is unclear: `reasoning_effort: "high"`
|
|
148
|
-
|
|
149
|
-
## v4 Agent Coordination
|
|
150
|
-
|
|
151
|
-
### State Reconciliation
|
|
152
|
-
|
|
153
|
-
On resume, executor reconciles session state with actual running agents:
|
|
154
|
-
```
|
|
155
|
-
const running = list_agents({})
|
|
156
|
-
// Compare with session's task-analysis.json active tasks
|
|
157
|
-
// Reset orphaned tasks (in_progress but agent gone) to pending
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Worker Communication
|
|
161
|
-
|
|
162
|
-
- `send_message({ target: "<task-id>", items: [...] })` -- queue supplementary context
|
|
163
|
-
- `assign_task({ target: "<task-id>", items: [...] })` -- assign new work to inner_loop worker
|
|
164
|
-
- `close_agent({ target: "<task-id>" })` -- cleanup completed worker
|
|
165
|
-
|
|
166
|
-
## Completion Action
|
|
167
|
-
|
|
168
|
-
When pipeline completes (all tasks done), executor presents an interactive choice:
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
request_user_input({
|
|
172
|
-
questions: [{
|
|
173
|
-
question: "Team pipeline complete. What would you like to do?",
|
|
174
|
-
header: "Completion",
|
|
175
|
-
multiSelect: false,
|
|
176
|
-
options: [
|
|
177
|
-
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
|
|
178
|
-
{ label: "Keep Active", description: "Keep session for follow-up work" },
|
|
179
|
-
{ label: "Export Results", description: "Export deliverables to target directory, then clean" }
|
|
180
|
-
]
|
|
181
|
-
}]
|
|
182
|
-
})
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Action Handlers
|
|
186
|
-
|
|
187
|
-
| Choice | Steps |
|
|
188
|
-
|--------|-------|
|
|
189
|
-
| Archive & Clean | Update session status="completed" -> output final summary with artifact paths |
|
|
190
|
-
| Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-executor', args='--session=<path>')" |
|
|
191
|
-
| Export Results | request_user_input(target path) -> copy artifacts to target -> Archive & Clean |
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Integration with team-coordinate
|
|
196
|
-
|
|
197
|
-
| Scenario | Skill |
|
|
198
|
-
|----------|-------|
|
|
199
|
-
| New task, no session | team-coordinate |
|
|
200
|
-
| Existing session, resume execution | **team-executor** |
|
|
201
|
-
| Session needs new roles | team-coordinate (with resume) |
|
|
202
|
-
| Pure execution, no analysis | **team-executor** |
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## Error Handling
|
|
207
|
-
|
|
208
|
-
| Scenario | Resolution |
|
|
209
|
-
|----------|------------|
|
|
210
|
-
| No --session provided | ERROR immediately with usage message |
|
|
211
|
-
| Session directory not found | ERROR with path, suggest checking path |
|
|
212
|
-
| team-session.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
|
|
213
|
-
| task-analysis.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
|
|
214
|
-
| No role-specs in session | ERROR, session incomplete, suggest re-run team-coordinate |
|
|
215
|
-
| Role-spec file not found | ERROR with expected path |
|
|
216
|
-
| capability_gap reported | Warn only, cannot generate new role-specs |
|
|
217
|
-
| Fast-advance spawns wrong task | Executor reconciles on next callback |
|
|
218
|
-
| Completion action fails | Default to Keep Active, log warning |
|
|
1
|
+
---
|
|
2
|
+
name: team-executor
|
|
3
|
+
description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via team-worker agents. No analysis, no role generation -- only loads and executes. Session path required. Triggers on "Team Executor".
|
|
4
|
+
allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Team Executor
|
|
8
|
+
|
|
9
|
+
Lightweight session execution skill: load session -> reconcile state -> spawn team-worker agents -> execute -> deliver. **No analysis, no role generation** -- only executes existing team-coordinate sessions.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Architecture
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
+---------------------------------------------------+
|
|
16
|
+
| Skill(skill="team-executor") |
|
|
17
|
+
| args="--session=<path>" [REQUIRED] |
|
|
18
|
+
+-------------------+-------------------------------+
|
|
19
|
+
| Session Validation
|
|
20
|
+
+---- --session valid? ----+
|
|
21
|
+
| NO | YES
|
|
22
|
+
v v
|
|
23
|
+
Error immediately Orchestration Mode
|
|
24
|
+
(no session) -> executor
|
|
25
|
+
|
|
|
26
|
+
+-------+-------+-------+
|
|
27
|
+
v v v v
|
|
28
|
+
[team-worker agents loaded from session role-specs]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Session Validation (BEFORE routing)
|
|
34
|
+
|
|
35
|
+
**CRITICAL**: Session validation MUST occur before any execution.
|
|
36
|
+
|
|
37
|
+
### Parse Arguments
|
|
38
|
+
|
|
39
|
+
Extract from `$ARGUMENTS`:
|
|
40
|
+
- `--session=<path>`: Path to team-coordinate session folder (REQUIRED)
|
|
41
|
+
|
|
42
|
+
### Validation Steps
|
|
43
|
+
|
|
44
|
+
1. **Check `--session` provided**:
|
|
45
|
+
- If missing -> **ERROR**: "Session required. Usage: --session=<path-to-TC-folder>"
|
|
46
|
+
|
|
47
|
+
2. **Validate session structure** (see specs/session-schema.md):
|
|
48
|
+
- Directory exists at path
|
|
49
|
+
- `team-session.json` exists and valid JSON
|
|
50
|
+
- `task-analysis.json` exists and valid JSON
|
|
51
|
+
- `role-specs/` directory has at least one `.md` file
|
|
52
|
+
- Each role in `team-session.json#roles` has corresponding `.md` file in `role-specs/`
|
|
53
|
+
|
|
54
|
+
3. **Validation failure**:
|
|
55
|
+
- Report specific missing component
|
|
56
|
+
- Suggest re-running team-coordinate or checking path
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Role Router
|
|
61
|
+
|
|
62
|
+
This skill is **executor-only**. Workers do NOT invoke this skill -- they are spawned as `team-worker` agents directly.
|
|
63
|
+
|
|
64
|
+
### Dispatch Logic
|
|
65
|
+
|
|
66
|
+
| Scenario | Action |
|
|
67
|
+
|----------|--------|
|
|
68
|
+
| No `--session` | **ERROR** immediately |
|
|
69
|
+
| `--session` invalid | **ERROR** with specific reason |
|
|
70
|
+
| Valid session | Orchestration Mode -> executor |
|
|
71
|
+
|
|
72
|
+
### Orchestration Mode
|
|
73
|
+
|
|
74
|
+
**Invocation**: `Skill(skill="team-executor", args="--session=<session-folder>")`
|
|
75
|
+
|
|
76
|
+
**Lifecycle**:
|
|
77
|
+
```
|
|
78
|
+
Validate session
|
|
79
|
+
-> executor Phase 0: Reconcile state (reset interrupted, detect orphans)
|
|
80
|
+
-> executor Phase 1: Spawn first batch team-worker agents (background) -> STOP
|
|
81
|
+
-> Worker executes -> callback -> executor advances next step
|
|
82
|
+
-> Loop until pipeline complete -> Phase 2 report + completion action
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**User Commands** (wake paused executor):
|
|
86
|
+
|
|
87
|
+
| Command | Action |
|
|
88
|
+
|---------|--------|
|
|
89
|
+
| `check` / `status` | Output execution status graph, no advancement |
|
|
90
|
+
| `resume` / `continue` | Check worker states, advance next step |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Role Registry
|
|
95
|
+
|
|
96
|
+
| Role | File | Type |
|
|
97
|
+
|------|------|------|
|
|
98
|
+
| executor | [roles/executor/role.md](roles/executor/role.md) | built-in orchestrator |
|
|
99
|
+
| (dynamic) | `<session>/role-specs/<role-name>.md` | loaded from session |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Executor Spawn Template
|
|
104
|
+
|
|
105
|
+
### v2 Worker Spawn (all roles)
|
|
106
|
+
|
|
107
|
+
When executor spawns workers, use `team-worker` agent with role-spec path:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
spawn_agent({
|
|
111
|
+
agent_type: "team_worker",
|
|
112
|
+
task_name: "<task-id>",
|
|
113
|
+
fork_context: false,
|
|
114
|
+
items: [
|
|
115
|
+
{ type: "text", text: `## Role Assignment
|
|
116
|
+
role: <role>
|
|
117
|
+
role_spec: <session-folder>/role-specs/<role>.md
|
|
118
|
+
session: <session-folder>
|
|
119
|
+
session_id: <session-id>
|
|
120
|
+
requirement: <task-description>
|
|
121
|
+
inner_loop: <true|false>
|
|
122
|
+
|
|
123
|
+
Read role_spec file to load Phase 2-4 domain instructions.` },
|
|
124
|
+
|
|
125
|
+
{ type: "text", text: `## Task Context
|
|
126
|
+
task_id: <task-id>
|
|
127
|
+
title: <task-title>
|
|
128
|
+
description: <task-description>
|
|
129
|
+
pipeline_phase: <pipeline-phase>` },
|
|
130
|
+
|
|
131
|
+
{ type: "text", text: `## Upstream Context
|
|
132
|
+
<prev_context>` }
|
|
133
|
+
]
|
|
134
|
+
})
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Model Selection Guide
|
|
143
|
+
|
|
144
|
+
team-executor loads roles dynamically from session role-specs. Use reasoning_effort based on the role type defined in the session:
|
|
145
|
+
- Implementation/fix roles: `reasoning_effort: "high"`
|
|
146
|
+
- Verification/test roles: `reasoning_effort: "medium"`
|
|
147
|
+
- Default when role type is unclear: `reasoning_effort: "high"`
|
|
148
|
+
|
|
149
|
+
## v4 Agent Coordination
|
|
150
|
+
|
|
151
|
+
### State Reconciliation
|
|
152
|
+
|
|
153
|
+
On resume, executor reconciles session state with actual running agents:
|
|
154
|
+
```
|
|
155
|
+
const running = list_agents({})
|
|
156
|
+
// Compare with session's task-analysis.json active tasks
|
|
157
|
+
// Reset orphaned tasks (in_progress but agent gone) to pending
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Worker Communication
|
|
161
|
+
|
|
162
|
+
- `send_message({ target: "<task-id>", items: [...] })` -- queue supplementary context
|
|
163
|
+
- `assign_task({ target: "<task-id>", items: [...] })` -- assign new work to inner_loop worker
|
|
164
|
+
- `close_agent({ target: "<task-id>" })` -- cleanup completed worker
|
|
165
|
+
|
|
166
|
+
## Completion Action
|
|
167
|
+
|
|
168
|
+
When pipeline completes (all tasks done), executor presents an interactive choice:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
functions.request_user_input({
|
|
172
|
+
questions: [{
|
|
173
|
+
question: "Team pipeline complete. What would you like to do?",
|
|
174
|
+
header: "Completion",
|
|
175
|
+
multiSelect: false,
|
|
176
|
+
options: [
|
|
177
|
+
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
|
|
178
|
+
{ label: "Keep Active", description: "Keep session for follow-up work" },
|
|
179
|
+
{ label: "Export Results", description: "Export deliverables to target directory, then clean" }
|
|
180
|
+
]
|
|
181
|
+
}]
|
|
182
|
+
})
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Action Handlers
|
|
186
|
+
|
|
187
|
+
| Choice | Steps |
|
|
188
|
+
|--------|-------|
|
|
189
|
+
| Archive & Clean | Update session status="completed" -> output final summary with artifact paths |
|
|
190
|
+
| Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-executor', args='--session=<path>')" |
|
|
191
|
+
| Export Results | functions.request_user_input(target path) -> copy artifacts to target -> Archive & Clean |
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Integration with team-coordinate
|
|
196
|
+
|
|
197
|
+
| Scenario | Skill |
|
|
198
|
+
|----------|-------|
|
|
199
|
+
| New task, no session | team-coordinate |
|
|
200
|
+
| Existing session, resume execution | **team-executor** |
|
|
201
|
+
| Session needs new roles | team-coordinate (with resume) |
|
|
202
|
+
| Pure execution, no analysis | **team-executor** |
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Error Handling
|
|
207
|
+
|
|
208
|
+
| Scenario | Resolution |
|
|
209
|
+
|----------|------------|
|
|
210
|
+
| No --session provided | ERROR immediately with usage message |
|
|
211
|
+
| Session directory not found | ERROR with path, suggest checking path |
|
|
212
|
+
| team-session.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
|
|
213
|
+
| task-analysis.json missing | ERROR, session incomplete, suggest re-run team-coordinate |
|
|
214
|
+
| No role-specs in session | ERROR, session incomplete, suggest re-run team-coordinate |
|
|
215
|
+
| Role-spec file not found | ERROR with expected path |
|
|
216
|
+
| capability_gap reported | Warn only, cannot generate new role-specs |
|
|
217
|
+
| Fast-advance spawns wrong task | Executor reconciles on next callback |
|
|
218
|
+
| Completion action fails | Default to Keep Active, log warning |
|