Skip to content

Commit 5548eb9

Browse files
release: heavy-coder 0.2.4 — README, GitHub metadata, Grok Heavy council width 16
- Restructure README: use case, Hermes install, Grok OAuth callout - github-repo-metadata.yaml + apply/validate scripts - heavy council width 16, --heavy-council, max_concurrent_children 16 - docs: grok-heavy-council, quickstart-heavy-team, github-discovery
1 parent 29940ed commit 5548eb9

19 files changed

Lines changed: 675 additions & 111 deletions

CHANGELOG.md

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

3+
## 0.2.4
4+
5+
- Add Grok Heavy-style **heavy council** width 16: triage triggers, `--heavy-council`, `candidate_widths` and `delegation.max_concurrent_children` 16, docs `grok-heavy-council.md`.
6+
7+
## 0.2.3
8+
9+
- Restructure README: Grok Heavy-style team use case first, Hermes install, profile install, and Grok OAuth with X Premium / SuperGrok callout.
10+
11+
## 0.2.2
12+
13+
- Add version-controlled GitHub discovery metadata (`github-repo-metadata.yaml`) with validators, apply script, and docs.
14+
- Sync remote description and topics from the canonical file via `apply_github_repo_metadata.py`.
15+
316
## 0.2.1
417

518
- Fix `build_team_plan` width override emitting fewer `delegate_tasks` than `width`.

README.md

Lines changed: 149 additions & 94 deletions
Large diffs are not rendered by default.

config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ security:
2020
approvals:
2121
mode: manual
2222
delegation:
23-
max_concurrent_children: 5
23+
max_concurrent_children: 16
2424
max_spawn_depth: 1
2525
# Shell hooks (Plan 1A): require profile installed as ~/.hermes/profiles/heavy-coder
2626
# or run: python scripts/sync_profile_hooks.py --profile <name>
@@ -45,7 +45,8 @@ hooks:
4545
timeout: 30
4646
heavy_coder:
4747
status: scaffolded
48-
candidate_widths: [3, 5]
48+
candidate_widths: [3, 5, 16]
49+
heavy_council_width: 16
4950
default_width: 3
5051
team_enforced: true
5152
single_mode_requires_explicit: true

distribution.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: heavy-coder
2-
version: 0.2.1
2+
version: 0.2.4
33
description: "Hermes profile with shell-hook enforced multi-candidate coding teams (Plan 1A)."
44
hermes_requires: ">=0.12.0"
55
author: "CodeGraphTheory"
@@ -23,5 +23,6 @@ distribution_owned:
2323
- AGENTS.md
2424
- .env.EXAMPLE
2525
- .hermes.md
26+
- github-repo-metadata.yaml
2627
- agent-hooks
2728
source: github.com/codegraphtheory/heavy-coder

docs/github-discovery.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# GitHub discovery metadata
2+
3+
Repository search and topic pages use the GitHub **description** and **topics** on the repository settings page. Heavy Coder keeps a version-controlled source of truth in `github-repo-metadata.yaml` at the repository root.
4+
5+
## Description (SEO)
6+
7+
The description is written for developers searching for Hermes profiles, multi-agent coding workflows, and GitHub issue automation:
8+
9+
- Names **Hermes Agent** and **profile distribution** explicitly.
10+
- Highlights **multi-candidate teams**, **issue-to-PR scaffolding**, and **fail-closed merge policy** without claiming live unattended merge (see `AGENTS.md`).
11+
- Includes the install path phrase `hermes profile install` for query overlap.
12+
13+
GitHub enforces a short description length (validate with `scripts/validate_github_repo_metadata.py`; limit is 350 characters in code).
14+
15+
## Topics
16+
17+
Topics follow [GitHub rules](https://docs.github.com/articles/classifying-your-repository-with-topics):
18+
19+
- Lowercase letters, numbers, and hyphens only.
20+
- At most **20** topics, each at most **50** characters.
21+
22+
The bundled set spans Hermes, agentic coding, Python tooling, CI, and open source discovery terms.
23+
24+
The apply script removes topics on GitHub that are not listed in `github-repo-metadata.yaml`, then adds the canonical set.
25+
26+
## Apply and verify
27+
28+
```bash
29+
python scripts/validate_github_repo_metadata.py .
30+
python scripts/apply_github_repo_metadata.py . # dry-run JSON
31+
python scripts/apply_github_repo_metadata.py . --execute
32+
gh repo view --json description,repositoryTopics
33+
```
34+
35+
Requires `gh auth` with permission to edit `codegraphtheory/heavy-coder`.

docs/grok-heavy-council.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Grok Heavy vs Heavy Coder (16-agent council)
2+
3+
Heavy Coder can run the **same orchestration plan** as Grok Heavy at a high level. It cannot replicate xAI's closed-box multi-agent runtime **exactly**.
4+
5+
## Same plan (yes)
6+
7+
Both follow inference-time scaling:
8+
9+
```text
10+
Task -> N parallel agents -> cross-check / critique -> leader synthesis -> answer
11+
```
12+
13+
Heavy Coder mapping:
14+
15+
| Step | Grok Heavy (xAI) | Heavy Coder (Hermes) |
16+
|------|------------------|----------------------|
17+
| Parallel workers | Many Grok agents (up to ~16 in Heavy tiers) | `delegate_task(tasks=[...])` with **width 16** |
18+
| Isolation | Shared context + internal debate (opaque) | **Blind** leaf workers (no peer proposals pre-critique) |
19+
| Cross-check | Internal agent interaction | `critique_candidates.py` + coordinator rubric |
20+
| Synthesis | Leader agent | Coordinator session merges winning patch set |
21+
| Model | Grok 4.x / Heavy stack on Colossus | `composer-2.5` via `xai-oauth` (configurable) |
22+
23+
Enable council width:
24+
25+
```bash
26+
python scripts/team_coordinator.py "your task" --repo . --heavy-council
27+
# or include triggers in the task: "Grok Heavy", "heavy council", "width 16"
28+
python scripts/heavy_coding_flow.py "emulate Grok Heavy: ..." --repo .
29+
```
30+
31+
Then:
32+
33+
```text
34+
delegate_task(tasks=team_plan.delegate_tasks) # 16 entries when width=16
35+
```
36+
37+
Profile settings (`config.yaml`):
38+
39+
- `heavy_coder.candidate_widths: [3, 5, 16]`
40+
- `heavy_coder.heavy_council_width: 16`
41+
- `delegation.max_concurrent_children: 16` (Hermes has no hard ceiling; cost scales linearly)
42+
43+
Re-install or sync the profile after changing `config.yaml` so your Hermes session picks up delegation limits.
44+
45+
## Not exact (honest gaps)
46+
47+
| Grok Heavy | Heavy Coder today |
48+
|------------|-------------------|
49+
| Mid-run agent debate on shared state | Workers run **once** in isolation; debate happens **after** via critic/coordinator |
50+
| xAI-chosen domain specialists (marketing lists of 16 named roles) | Rotating implementation **roles** (`minimal-fix`, `test-first`, ...) not domain personas |
51+
| Single product button on grok.com | You orchestrate Hermes + OAuth + hooks |
52+
| Consumer Heavy subscription | Your `xai-oauth` / SuperGrok entitlements (see README callout) |
53+
54+
The public Grok Heavy idea that matches us best: **many parallel hypotheses, then compare at the end** (see xAI multi-agent docs and community summaries). Heavy Coder implements that shape; it does not clone proprietary leader logic or Colossus scheduling.
55+
56+
## When to use width 16
57+
58+
- Research-grade or high-ambiguity coding tasks where diversity beats latency.
59+
- Demos and evaluations (`skills/heavy-coding-eval/`).
60+
- **Not** daily small fixes (use width 3).
61+
62+
Expect **~16x** subagent token cost versus one candidate, plus coordinator critique/synthesis.
63+
64+
## Worktrees
65+
66+
For git-changing council runs:
67+
68+
```bash
69+
python skills/heavy-issue-to-merge/scripts/worktrees.py plan --width 16 --repo .
70+
```
71+
72+
Use `--execute` only on a clean tree.

docs/quickstart-heavy-team.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Quickstart: Heavy team coding
2+
3+
## 1. Coordinator
4+
5+
```bash
6+
hermes -p heavy-coder chat
7+
```
8+
9+
Use `hermes auth add xai-oauth` once if Grok is not configured.
10+
11+
## 2. Plan (doctor + team JSON)
12+
13+
From the **target repo** root (point at your heavy-coder checkout):
14+
15+
```bash
16+
python /path/to/heavy-coder/scripts/heavy_coding_flow.py "your task here" --repo .
17+
```
18+
19+
Output includes `team_plan.delegate_tasks`, `width`, and `verification_commands`. Plan-only alternative:
20+
21+
```bash
22+
python scripts/team_coordinator.py "your task here" --repo .
23+
```
24+
25+
## 3. `delegate_task`
26+
27+
In chat, call **`delegate_task`** with the full `delegate_tasks` array from the plan (one batch; width 3+, or **16** for heavy council when `team_plan.width` is 16).
28+
29+
Force council width when planning:
30+
31+
```bash
32+
python scripts/team_coordinator.py "TASK" --repo . --heavy-council
33+
```
34+
35+
## 4. Synthesize and verify
36+
37+
Collect candidate evidence, critique, merge the winning approach, then run `verification_commands` from the plan.
38+
39+
Details: `skills/heavy-team-default/SKILL.md`.

github-repo-metadata.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Canonical GitHub repository discovery fields for codegraphtheory/heavy-coder.
2+
# Apply with: python scripts/apply_github_repo_metadata.py --execute
3+
# Validate with: python scripts/validate_github_repo_metadata.py .
4+
5+
description: >-
6+
Hermes Agent profile for adaptive multi-candidate coding teams: GitHub
7+
issue-to-PR scaffolding, blind critique and synthesis, and fail-closed
8+
unattended merge policy. Python contracts, schemas, and CI. Install via
9+
hermes profile install.
10+
11+
topics:
12+
- hermes-agent
13+
- hermes-profile
14+
- coding-agent
15+
- ai-agents
16+
- multi-agent
17+
- agentic-coding
18+
- issue-to-pr
19+
- python
20+
- developer-tools
21+
- terminal
22+
- software-engineering
23+
- nous-research
24+
- code-review
25+
- ci-cd
26+
- github-cli
27+
- automation
28+
- open-source
29+
- llm
30+
- json-schema
31+
- profile-distribution

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ strict = true
4141
mypy_path = "src"
4242

4343
[[tool.mypy.overrides]]
44-
module = ["jsonschema"]
44+
module = ["jsonschema", "yaml"]
4545
ignore_missing_imports = true
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
#!/usr/bin/env python3
2+
from __future__ import annotations
3+
4+
import argparse
5+
import json
6+
import subprocess
7+
import sys
8+
from pathlib import Path
9+
10+
ROOT_SRC = Path(__file__).resolve().parents[1] / "src"
11+
sys.path.insert(0, str(ROOT_SRC))
12+
13+
from heavy_coder.github_repo_metadata import load_and_validate # noqa: E402
14+
15+
16+
def current_topics(repo: str | None) -> list[str]:
17+
view_cmd = ["gh", "repo", "view", "--json", "repositoryTopics"]
18+
if repo:
19+
view_cmd.insert(3, repo)
20+
completed = subprocess.run(
21+
view_cmd, check=True, capture_output=True, text=True
22+
)
23+
payload = json.loads(completed.stdout)
24+
raw = payload.get("repositoryTopics") or []
25+
return sorted(
26+
str(item["name"]) for item in raw if isinstance(item, dict) and item.get("name")
27+
)
28+
29+
30+
def build_gh_command(
31+
repo: str | None,
32+
description: str,
33+
topics: list[str],
34+
*,
35+
remove_topics: list[str] | None = None,
36+
) -> list[str]:
37+
cmd = ["gh", "repo", "edit"]
38+
if repo:
39+
cmd.append(repo)
40+
cmd.extend(["-d", description])
41+
for topic in remove_topics or []:
42+
cmd.extend(["--remove-topic", topic])
43+
for topic in topics:
44+
cmd.extend(["--add-topic", topic])
45+
return cmd
46+
47+
48+
def main() -> int:
49+
parser = argparse.ArgumentParser(
50+
description="Apply github-repo-metadata.yaml to GitHub via gh repo edit."
51+
)
52+
parser.add_argument("root", nargs="?", default=".")
53+
parser.add_argument(
54+
"--repo",
55+
default=None,
56+
help="Optional OWNER/REPO; defaults to current directory remote.",
57+
)
58+
parser.add_argument(
59+
"--execute",
60+
action="store_true",
61+
help="Run gh; default is dry-run (print planned command).",
62+
)
63+
args = parser.parse_args()
64+
root = Path(args.root).resolve()
65+
payload, errors = load_and_validate(root)
66+
if errors:
67+
print(json.dumps({"ok": False, "errors": errors}, indent=2, sort_keys=True))
68+
return 1
69+
70+
description = str(payload["description"]).strip()
71+
topics = [str(t) for t in payload["topics"]]
72+
desired = set(topics)
73+
remove_topics: list[str] = []
74+
try:
75+
existing = current_topics(args.repo)
76+
remove_topics = sorted(t for t in existing if t not in desired)
77+
except (subprocess.CalledProcessError, FileNotFoundError, json.JSONDecodeError):
78+
existing = []
79+
cmd = build_gh_command(
80+
args.repo, description, topics, remove_topics=remove_topics
81+
)
82+
83+
if not args.execute:
84+
print(
85+
json.dumps(
86+
{
87+
"ok": True,
88+
"dry_run": True,
89+
"command": cmd,
90+
"description_length": len(description),
91+
"topic_count": len(topics),
92+
"remove_topic_count": len(remove_topics),
93+
"existing_topics": existing,
94+
},
95+
indent=2,
96+
sort_keys=True,
97+
)
98+
)
99+
return 0
100+
101+
try:
102+
subprocess.run(cmd, check=True, capture_output=True, text=True)
103+
except FileNotFoundError:
104+
print(json.dumps({"ok": False, "errors": ["gh CLI not found"]}, indent=2))
105+
return 1
106+
except subprocess.CalledProcessError as exc:
107+
detail = (exc.stderr or exc.stdout or str(exc)).strip()
108+
print(
109+
json.dumps(
110+
{"ok": False, "errors": [f"gh failed: {detail}"]},
111+
indent=2,
112+
sort_keys=True,
113+
)
114+
)
115+
return 1
116+
117+
print(json.dumps({"ok": True, "applied": True, "topic_count": len(topics)}, indent=2))
118+
return 0
119+
120+
121+
if __name__ == "__main__":
122+
sys.exit(main())

0 commit comments

Comments
 (0)