Skip to content

Commit ebadd79

Browse files
release: heavy-coder 0.3.0 - strategic coordinator skills
1 parent 72709c3 commit ebadd79

19 files changed

Lines changed: 721 additions & 49 deletions

File tree

.hermes.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
Hermes loads this file for the installed profile. It states **default behavior for the coordinator agent**, not a hard runtime lock inside Hermes.
44

5+
## Every turn
6+
7+
- Load **`heavy-scope-router`** first to classify read-only vs swarm vs single vs GitHub work.
8+
- Load phase skills from **`heavy-team-default`** companion table only when relevant (`heavy-context-budget` during explore/enrich).
9+
510
## Default for coding work
611

7-
- Prefer the adaptive candidate pattern: width **3** (default) or **5** for larger or riskier tasks.
8-
- Use `delegate_task` with independent leaf workers (`delegation.max_spawn_depth` is 1: candidates do not nest further delegation).
9-
- After candidates finish: blind comparison, synthesis, then verification with real test commands.
10-
- If the user explicitly asks for **single mode**, **composer only**, or **no team**, follow that request.
12+
- Non-trivial implementation: **council width 8** by default (`heavy_coder.council_width`, `min_delegate_tasks: 8`) with `delegate_task` in **one** batch (`heavy-swarm-dispatch`).
13+
- Adaptive widths **3** and **5** apply when `heavy_council_always: false` or triage escalates risk; widths **8** and **16** are configured in `candidate_widths`.
14+
- After candidates finish: blind comparison, synthesis (`heavy-synthesize-winner`), then verification (`heavy-ship-gate`) with real test commands.
15+
- If the user explicitly asks for **single mode**, **composer only**, or **no team**, follow **`heavy-single-mode`**.
1116

1217
## Config alignment
1318

14-
`config.yaml` sets `heavy_coder.team_enforced`, `candidate_widths: [3, 5]`, and `single_mode_requires_explicit`. The script `scripts/bootstrap_heavy_team.py` reads those flags for diagnostics; it does not auto-run on every Hermes turn unless you invoke it (for example via `doctor.py`).
19+
`config.yaml` sets `heavy_coder.team_enforced`, `candidate_widths: [3, 5, 8, 16]`, `council_width: 8`, `heavy_council_always: true`, and `single_mode_requires_explicit`. The script `scripts/bootstrap_heavy_team.py` reads those flags for diagnostics; it does not auto-run on every Hermes turn unless you invoke it (for example via `doctor.py`).
1520

1621
## Skills
1722

18-
Load `heavy-team-default` for coding and repository tasks. It points to companion skills by phase:
19-
20-
- `heavy-explore-first` - repo ground truth before planning
21-
- `heavy-leaf-brief` - pack `delegate_task` context for leaves
22-
- `heavy-synthesize-winner` - merge after swarm returns
23-
- `heavy-ship-gate` - run verification before claiming done
23+
Load **`heavy-team-default`** for coding and repository tasks. It maps companion skills by phase (router, enrich, dispatch, hook phases, candidate JSON, synthesis, repair wave, ship gate).
2424

25-
Use `heavy-issue-to-merge` for GitHub issue and PR workflows (scaffolded scripts only today).
25+
Use **`heavy-issue-to-merge`** for GitHub issue and PR workflows (scaffolded scripts only today).
2626

2727
## Output
2828

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 0.3.0
4+
5+
- **Coordinator skills:** add eight strategic skills for routing, dispatch discipline, pre-dispatch enrich, candidate JSON, hook phases, repair waves, context budget, and single mode: `heavy-scope-router`, `heavy-swarm-dispatch`, `heavy-pre-dispatch-enrich`, `heavy-leaf-candidate-output`, `heavy-hook-phases`, `heavy-repair-wave`, `heavy-context-budget`, `heavy-single-mode`.
6+
- **`heavy-team-default` v0.6.0:** phase-based companion table wiring all swarm skills.
7+
- **Profile docs:** `.hermes.md` and `SOUL.md` - load `heavy-scope-router` each task; align council width **8** with `config.yaml`.
8+
- **Docs:** `enforcement-model.md` - delegate minimum and skills section for 0.3.0.
9+
310
## 0.2.23
411

512
- **IDE TUI bootstrap:** `display.auto_ide_skin` (default true) selects **`heavy-coder-ide`** in Cursor / VS Code / Windsurf and **`heavy-coder-light`** when `HERMES_TUI_THEME=light` (`profile_bootstrap.py`, shipped `config.yaml`).

RELEASE_NOTES.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
## heavy-coder 0.2.23
1+
## heavy-coder 0.3.0
22

33
### Highlights
4-
- **IDE auto-skin:** `display.auto_ide_skin: true` (default) picks **`heavy-coder-ide`** in Cursor/VS Code/Windsurf on session bootstrap; **`heavy-coder-light`** when `HERMES_TUI_THEME=light`.
5-
- **heavy-coder-ide:** compact banner (logo only), brighter secondary/status text, clearer welcome for composer bleed mitigations.
6-
- **Docs:** `Iky`-style composer junk example in [ide-terminal-composer.md](docs/ide-terminal-composer.md).
4+
5+
- **Strategic coordinator skills (8 new):** route tasks before spending swarm tokens (`heavy-scope-router`), dispatch full-width batches once (`heavy-swarm-dispatch`), enrich slim hook context (`heavy-pre-dispatch-enrich`), require candidate-result JSON (`heavy-leaf-candidate-output`), obey hook phases (`heavy-hook-phases`), narrow repair waves (`heavy-repair-wave`), token discipline (`heavy-context-budget`), explicit single mode (`heavy-single-mode`).
6+
- **`heavy-team-default` v0.6.0:** single phase table linking explore → enrich → dispatch → synthesize → ship gate.
7+
- **Profile alignment:** `.hermes.md` / `SOUL.md` updated for default council width **8** and per-turn routing.
78

89
### Install / update (local tree or GitHub)
910

@@ -12,22 +13,13 @@ hermes profile install github.com/codegraphtheory/heavy-coder --name heavy-coder
1213
heavy-coder chat
1314
```
1415

15-
Restart chat (`/new`) from the **IDE integrated terminal** so bootstrap can set the IDE skin.
16-
17-
**Best composer fix in Cursor** (short prompt prefix):
18-
19-
```bash
20-
hermes profile install github.com/codegraphtheory/heavy-coder --name hc --alias --force --yes
21-
hc chat
22-
```
23-
2416
Pin a tagged checkout:
2517

2618
```bash
27-
git checkout v0.2.23
19+
git checkout v0.3.0
2820
hermes profile install . --name heavy-coder --alias --force --yes
2921
```
3022

3123
Hermes install URLs do not support `@tag` suffixes; use a local checkout to pin.
3224

33-
Full changelog: [CHANGELOG.md](https://github.com/codegraphtheory/heavy-coder/blob/v0.2.23/CHANGELOG.md)
25+
Full changelog: [CHANGELOG.md](https://github.com/codegraphtheory/heavy-coder/blob/v0.3.0/CHANGELOG.md)

SOUL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Help maintainers move from a GitHub issue or terminal request to a tested, revie
1616

1717
Read [docs/composer-hermes-swarms.md](docs/composer-hermes-swarms.md) when the user asks how swarms work.
1818

19+
## Skills (coordinator)
20+
21+
On each task: **`heavy-scope-router`** → phase skills from **`heavy-team-default`** (enrich, dispatch, synthesize, ship gate). Load only what the current phase needs.
22+
1923
## Operating principles
2024

2125
1. Security and correctness come before speed.

distribution.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: heavy-coder
2-
version: 0.2.23
2+
version: 0.3.0
33
description: "Hermes profile with shell-hook enforced multi-candidate coding teams (Plan 1A)."
44
hermes_requires: ">=0.12.0"
55
author: "CodeGraphTheory"

docs/adr/0003-adaptive-agent-width.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Parallel independent candidates can reveal different fixes and reduce early-assu
88

99
## Decision
1010

11-
Use adaptive width 3 or 5 in the installed profile (`candidate_widths: [3, 5]`, `default_width: 3`). Escalate from 3 to 5 when tests fail, candidates disagree, or confidence is low. Single-agent mode is opt-in only (`single_mode_requires_explicit`).
11+
Use adaptive width 3 or 5 when `heavy_council_always` is false (`candidate_widths` includes 3 and 5). Escalate from 3 to 5 when tests fail, candidates disagree, or confidence is low. Single-agent mode is opt-in only (`single_mode_requires_explicit`).
12+
13+
As of profile **0.3.0**, shipped `config.yaml` sets `heavy_council_always: true` and `council_width: 8` for default Composer swarms; widths 8 and 16 are first-class in `candidate_widths`. This ADR still governs adaptive 3/5 when council-always is disabled.
1214

1315
## Consequences
1416

docs/enforcement-model.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Heavy Coder combines **coordinator instructions**, **deterministic scripts**, an
66

77
| Step | Mechanism |
88
|------|-----------|
9-
| Triage width 3/5 | `src/heavy_coder/triage.py`, `scripts/team_coordinator.py` |
9+
| Triage / council width | `src/heavy_coder/triage.py`, `scripts/team_coordinator.py` (default **8** when `heavy_council_always`; adaptive 3/5 when off) |
1010
| Emit delegate specs | `team_coordinator.py` JSON field `delegate_tasks` |
1111
| One-shot flow | `scripts/heavy_coding_flow.py` (doctor + plan + worktree plan) |
1212
| Worktree isolation | `worktrees.py create --execute` (refuses dirty repos) |
@@ -17,7 +17,9 @@ Heavy Coder combines **coordinator instructions**, **deterministic scripts**, an
1717

1818
The Hermes coordinator must still call `delegate_task`; scripts do not spawn agents themselves.
1919

20-
**Plan 1A (0.2.0+):** Profile `config.yaml` registers **shell hooks** that inject the team plan, block solo `patch`/`write_file` before delegation, require `delegate_task` width 3+, and capture `subagent_stop` evidence. See `docs/plan-1a-shell-hooks.md`.
20+
**Plan 1A (0.2.0+):** Profile `config.yaml` registers **shell hooks** that inject the team plan, block solo `patch`/`write_file` before delegation, require `delegate_task` at least `delegate_minimum()` (default **8**), and capture `subagent_stop` evidence. See `docs/plan-1a-shell-hooks.md`.
21+
22+
**Skills (0.3.0+):** Coordinator skills (`heavy-scope-router`, `heavy-swarm-dispatch`, `heavy-pre-dispatch-enrich`, etc.) document routing, dispatch discipline, and evidence gates-see `skills/heavy-team-default/SKILL.md`.
2123

2224
## Instruction layers
2325

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
name: heavy-context-budget
3+
description: Keep coordinator and leaf context lean-batch reads, cap logs, use execute_code to filter-so swarms stay fast and within token limits.
4+
version: 0.1.0
5+
author: CodeGraphTheory
6+
license: MIT
7+
metadata:
8+
hermes:
9+
tags: [heavy-coder, performance, context, coordinator]
10+
related_skills:
11+
- heavy-explore-first
12+
- heavy-pre-dispatch-enrich
13+
- heavy-leaf-brief
14+
---
15+
16+
# Heavy context budget
17+
18+
## Overview
19+
20+
Heavy Coder optimizes swarm **breadth** (parallel leaves). Coordinator and leaf **depth** (megabyte pastes) destroys latency and blows injection caps (`heavy_coder.max_injected_plan_chars`). This skill is the token discipline for coordinators and for text placed in `delegate_task` context.
21+
22+
## When to Use
23+
24+
- Every explore and pre-dispatch enrich turn
25+
- Before pasting CI logs, stack traces, or `read_file` output into chat or leaf context
26+
- Large monorepos or many candidate summaries at synthesis
27+
28+
## Coordinator rules
29+
30+
### Batch independent I/O
31+
32+
- Multiple `read_file` / `search_files` / read-only `terminal` in **one turn** when inputs do not depend on each other.
33+
- Do not read file A, wait, read file B, wait-batch.
34+
35+
### Cap pasted material
36+
37+
| Material | Max in context/chat |
38+
|----------|---------------------|
39+
| Stack trace / test failure | ~80 lines or 4 KB |
40+
| Full file body | Use `offset`/`limit`; cite `path:line` |
41+
| Directory listings | `search_files` with `limit` |
42+
| Candidate summaries at synthesis | Bullets: files, commands, exit codes |
43+
44+
### Filter before paste
45+
46+
Use `execute_code` when you need to:
47+
48+
- Ripgrep and return only matching lines + numbers
49+
- Parse JSON test output for failures only
50+
- Count/dedupe paths across candidates
51+
52+
### Skills loading
53+
54+
- Load **only** skills for the current phase (router → enrich → dispatch → synthesize → ship).
55+
- Do not load the full heavy skill catalog every turn.
56+
57+
### Leaf context
58+
59+
- Profile default `leaf_toolsets: [terminal, file]`-no `web` unless needed.
60+
- Point to plan file path instead of duplicating full user essay in eight contexts.
61+
62+
## Slim injection alignment
63+
64+
Hooks use `slim_delegate_context` and compact chat injection. Coordinator enrich (`heavy-pre-dispatch-enrich`) adds **high-signal** bytes only-touch map, repro excerpt, evidence bar-not narrative repetition.
65+
66+
## Done when
67+
68+
- No leaf `context` contains a full-file dump unless that file is the entire task scope (<200 lines)
69+
- Chat responses use references (`path:line`) instead of reproducing whole modules
70+
- Logs in context are truncated with note "truncated; run X for full"
71+
72+
## Anti-patterns
73+
74+
| Symptom | Fix |
75+
|---------|-----|
76+
| Injection truncated by hooks | Shorter enrich block; move detail to disk plan |
77+
| Eight copies of same 2 KB task | Shared enrich block once per leaf |
78+
| Coordinator summarizes without reading | Batch read touch map first |
79+
80+
## Docs
81+
82+
- [composer-hermes-swarms.md](../../docs/composer-hermes-swarms.md)

skills/heavy-explore-first/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license: MIT
77
metadata:
88
hermes:
99
tags: [heavy-coder, discovery, context, software-development]
10-
related_skills: [heavy-leaf-brief, heavy-team-default, plan]
10+
related_skills: [heavy-leaf-brief, heavy-team-default, plan, heavy-scope-router]
1111
---
1212

1313
# Heavy explore first

skills/heavy-hook-phases/SKILL.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
name: heavy-hook-phases
3+
description: Obey Plan 1A hook session phases so mutating tools, delegate_task sizing, and re-planning do not waste turns or trigger blocks.
4+
version: 0.1.0
5+
author: CodeGraphTheory
6+
license: MIT
7+
metadata:
8+
hermes:
9+
tags: [heavy-coder, hooks, coordinator, performance]
10+
related_skills:
11+
- heavy-swarm-dispatch
12+
- heavy-synthesize-winner
13+
- heavy-single-mode
14+
---
15+
16+
# Heavy hook phases
17+
18+
## Overview
19+
20+
Shell hooks track a **session phase** per coordinator session. Ignoring phases causes blocked `patch` calls, duplicate council plans, and confused users. This skill is the operational cheatsheet aligned with `agent-hooks/*.py`.
21+
22+
## When to Use
23+
24+
- Before any `patch`, `write_file`, `delegate_task`, or write-like `terminal`
25+
- User asks why Heavy Coder blocked a tool
26+
- After `ASYNC DELEGATION BATCH COMPLETE` or mid-swarm
27+
28+
## Phase model
29+
30+
| Phase | Typical trigger | Coordinator may | Coordinator must not |
31+
|-------|-----------------|-----------------|----------------------|
32+
| `IDLE` | Session start, trivial chat | Read-only tools | Assume swarm already ran |
33+
| `AWAITING_DELEGATE` | `pre_llm_heavy_team` injected plan | Full-width `delegate_task`; read/todo | Repo writes; undersized delegate |
34+
| `AWAITING_SYNTHESIS` | `post_delegate_task` after dispatch | Synthesis reads; then writes after merge plan | New full council for **same** task |
35+
| (implicit complete) | After ship gate / user new task | Normal tools for **new** task | Re-use old width state blindly |
36+
37+
Single mode (from task excerpt) relaxes delegate minimum and write blocks-see `heavy-single-mode`.
38+
39+
## Tool-specific rules
40+
41+
### `delegate_task`
42+
43+
- Count must be ≥ `profile_cfg.delegate_minimum(width)` (default **8** when `council_width` and `min_delegate_tasks` are 8).
44+
- One batch with all plan entries (`heavy-swarm-dispatch`).
45+
46+
### `patch` / `write_file`
47+
48+
- Blocked in `AWAITING_DELEGATE` unless single mode.
49+
- After synthesis, apply **one coherent** patch set (`heavy-synthesize-winner`).
50+
51+
### `terminal`
52+
53+
- Write-like commands (redirect to file, `sed -i`, destructive git) blocked before delegation.
54+
- Verification commands run after synthesis (`heavy-ship-gate`).
55+
56+
### `pre_llm_call` re-injection
57+
58+
- Skipped when phase is `AWAITING_SYNTHESIS` or message contains batch complete marker.
59+
- Do not change the user task wording to force a new plan mid-synthesis.
60+
61+
## Artifacts
62+
63+
| Path | Purpose |
64+
|------|---------|
65+
| `.heavy-coder/plans/<session>.json` | Full plan + `delegate_tasks` |
66+
| `.heavy-coder/evidence/<child>.json` | Leaf evidence from `subagent_stop` |
67+
| `.heavy-coder/swarm-progress.json` | Live dashboard for `swarm_watch.py` |
68+
69+
## User communication
70+
71+
When blocked, explain in one sentence: phase, required next step (`delegate_task` with N tasks), or single-mode opt-out.
72+
73+
**Done when:** next tool call matches the phase column above.
74+
75+
## Docs
76+
77+
- [plan-1a-shell-hooks.md](../../docs/plan-1a-shell-hooks.md)

0 commit comments

Comments
 (0)