You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**task-planner** (`skills/task-planner/SKILL.md`): Legacy planning skill, retained for reference/backward compatibility. The core planning logic (complexity scoring, tier classification, agent assignment, wave scheduling, task creation) has been absorbed into `system-prompts/workflow_orchestrator.md` and now executes as native plan mode (EnterPlanMode/ExitPlanMode) directly in the main agent context rather than a forked skill context.
Agent selection uses keyword matching (≥2 matches threshold, highest count wins). Falls back to general-purpose if 0-1 matches. See `system-prompts/workflow_orchestrator.md` for keyword lists.
193
193
194
-
Agent config format: YAML frontmatter (`name`, `description`, optional `tools`/`model`/`color`) + markdown system prompt body. All agents enforce `DONE|{output_file}` return format.
Copy file name to clipboardExpand all lines: README.md
+17-22Lines changed: 17 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,14 +252,14 @@ The `plugin-hooks.json` configures the delegation enforcement hooks using cross-
252
252
253
253
**Note:** All hooks use `uv run --no-project --script` for cross-platform compatibility (Windows, macOS, Linux). The `--no-project` flag allows execution without requiring a pyproject.toml, and `--script` directly runs Python scripts using uv's managed interpreter.
@@ -268,22 +268,10 @@ The `plugin-hooks.json` configures the delegation enforcement hooks using cross-
268
268
Multi-step workflow orchestration requires the workflow_orchestrator system prompt to be appended:
269
269
270
270
**Automatic (via SessionStart hook):**
271
-
```json
272
-
{
273
-
"hooks": {
274
-
"SessionStart": [
275
-
{
276
-
"hooks": [
277
-
{
278
-
"type": "append_system_prompt",
279
-
"path": "system-prompts/workflow_orchestrator.md"
280
-
}
281
-
]
282
-
}
283
-
]
284
-
}
285
-
}
286
-
```
271
+
272
+
The `inject_workflow_orchestrator.py` hook uses conditional injection:
273
+
-**On startup/resume:** Injects a lightweight stub that registers `/delegate` and `/bypass` commands without loading the full orchestrator prompt, keeping baseline token overhead minimal.
274
+
-**On `/delegate` invocation:** The full `workflow_orchestrator.md` system prompt is loaded on-demand, providing the complete planning and execution logic only when needed.
287
275
288
276
**What this enables:**
289
277
- Multi-step task detection via pattern matching
@@ -415,7 +403,7 @@ No other configuration is required. Plan mode automatically evaluates whether a
415
403
416
404
### How Mode Selection Works
417
405
418
-
During planning, plan mode calculates a `team_mode_score` based on task characteristics:
406
+
During planning, plan mode checks if the TeamCreate tool is available (indicator that Agent Teams are enabled). If available, it calculates a `team_mode_score` based on task characteristics:
@@ -428,7 +416,7 @@ During planning, plan mode calculates a `team_mode_score` based on task characte
428
416
| Breadth task | -5 | Simple exploration is better as subagents |
429
417
| Phase count <= 3 | -3 | Small workflows don't need team overhead |
430
418
431
-
A score of **5 or higher** (with `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`) triggers team mode. Otherwise, subagent mode is used.
419
+
Default to team mode when Agent Teams available (TeamCreate in tools). Falls back to subagent only when `team_mode_score <= -3` (breadth-only tasks). If TeamCreate tool is not available (env var not set), subagent mode is always selected.
432
420
433
421
### Subagent Mode vs Team Mode
434
422
@@ -503,7 +491,7 @@ Team mode creates two additional state files (automatically cleaned up on comple
503
491
504
492
The framework minimizes command output to reduce context consumption and preserve tokens for meaningful work. Token efficiency is enabled by default (`CLAUDE_TOKEN_EFFICIENCY=1`).
505
493
506
-
### Two-Layer Approach
494
+
### Multi-Layer Approach
507
495
508
496
1.**Behavioral Guidance** — The `token_efficient_cli.md` system prompt (injected via SessionStart) teaches compact flag usage:
509
497
-`git status -sb` (short branch format)
@@ -515,6 +503,13 @@ The framework minimizes command output to reduce context consumption and preserv
515
503
- Git: `push`, `pull`, `commit`, `merge`, `rebase`, `status`, etc.
516
504
- Test runners: `pytest`, `cargo test`, `npm/pnpm/yarn/bun test`, `vitest`, `jest`, `mocha`, etc.
Copy file name to clipboardExpand all lines: agents/code-cleanup-optimizer.md
+8-42Lines changed: 8 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,10 @@ name: code-cleanup-optimizer
3
3
description: Remove technical debt, improve quality, eliminate redundancy after implementation is verified. Never use before functionality works correctly.
4
4
---
5
5
6
-
## RETURN FORMAT (CRITICAL - READ FIRST)
6
+
## RETURN FORMAT (CRITICAL)
7
7
8
-
**Your response to the main agent must be EXACTLY:**
All findings go in the output file. No summaries, explanations, or text beyond `DONE|{path}` in return value.
23
10
24
11
---
25
12
@@ -42,32 +29,11 @@ Explain why changes improve the code. Distinguish critical improvements from nic
42
29
43
30
## COMMUNICATION MODE
44
31
45
-
**If operating as a teammate in an Agent Team** (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1):
46
-
- Write detailed output to the output_file path as usual
47
-
- Send a brief completion message to the team: "Completed: {subject}. Output at {output_file}."
48
-
- If you need clarification from another teammate, message them directly
49
-
- If you discover issues that affect another teammate's work, message them proactively
50
-
- NEVER call TeamCreate -- only the lead agent creates teams (no nested teams)
51
-
- Before writing to a file another teammate might also modify, coordinate via SendMessage first
52
-
53
-
**If operating as a subagent (Agent tool):**
54
-
- Return EXACTLY: `DONE|{output_file_path}`
55
-
- No summaries, no explanations -- only the path
32
+
**Teammate mode** (Agent Teams): Write output to file, send brief completion message via SendMessage. Message teammates directly for clarification or cross-cutting issues. Never call TeamCreate.
All findings go in the output file. No summaries, explanations, or text beyond `DONE|{path}` in return value.
26
13
27
14
---
28
15
@@ -38,30 +25,11 @@ Provide specific, actionable feedback explaining the 'why' behind recommendation
38
25
39
26
## COMMUNICATION MODE
40
27
41
-
**If operating as a teammate in an Agent Team** (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1):
42
-
- Write detailed output to the output_file path as usual
43
-
- Send a brief completion message to the team: "Completed: {subject}. Output at {output_file}."
44
-
- If you need clarification from another teammate, message them directly
45
-
- If you discover issues that affect another teammate's work, message them proactively
46
-
- NEVER call TeamCreate -- only the lead agent creates teams (no nested teams)
47
-
- Before writing to a file another teammate might also modify, coordinate via SendMessage first
28
+
**Teammate mode** (Agent Teams): Write output to file, send brief completion message via SendMessage. Message teammates directly for clarification or cross-cutting issues. Never call TeamCreate.
0 commit comments