Skip to content

hera skill: correct plan-DAG gating docs, fan-in footgun, short-id naming, load-before-planning front-matter#813

Merged
anutron merged 3 commits into
masterfrom
argus/hera-skill-plan-dag-docs
Jun 25, 2026
Merged

hera skill: correct plan-DAG gating docs, fan-in footgun, short-id naming, load-before-planning front-matter#813
anutron merged 3 commits into
masterfrom
argus/hera-skill-plan-dag-docs

Conversation

@anutron

@anutron anutron commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Why

A hera coordinator handed a multi-stage feature build authored a plan-DAG straight from the hera_* MCP tool schemas and improvised an incorrect mental model of how the plan-DAG works. Its self-reported reasoning made two factual claims that are wrong, verified against internal/heragater/heragater.go:

  • "Planned nodes auto-spawn when a blocker goes idle." Actually the gater materializes a node only when every blocker reaches hera role-status done (the worker's explicit finish, which rolls its task to in_review). Idle-without-done keeps the node planned; a blocker whose session ended without done holds the dependent and pings the coordinator. It never spawns on mere idle.
  • "Nodes land on the project default branch." Actually non-root nodes stack on the most-recently-done blocker's branch (resolveBaseBranch); only root nodes fall back to the project default.

Both were already documented correctly in the skill body — the coordinator simply never loaded it, because skills are progressively disclosed (only the front-matter description is in context until the Skill tool loads the body) and the old description neither directed the agent to load the body before planning nor hinted that the plan-DAG mechanics are non-obvious.

What changed (docs only — .claude/skills/hera/SKILL.md)

  • Front-matter now directs: LOAD AND READ THIS SKILL IN FULL before authoring or driving any multi-stage / multi-worker plan, and names what is non-obvious (gating on role-status done, branch-stacking, short-id naming, living reconciliation) so the agent doesn't improvise from the tool schemas.
  • Fan-in branch footgun: a node with multiple blockers bases off the single most-recently-done blocker's branch — it does not merge the others. Documented in §3, the worked example, and as a gotcha.
  • done ≠ merged/integrated: the gater materializes a dependent the instant its blocker reports done, ahead of the coordinator's review/merge.
  • Self-rebase + self-guard prompt patterns documented as the standard mitigation for stacked-integration and contract-discovery work.
  • <stage><member> short-id naming elevated from a buried parameter note to a rationale-bearing rule: descriptive node names blow the rail/DAG boxes wide and wreck legibility at scale; 1a/2a ids keep it tight.

Scope / risk

Documentation only. No Go code, no CI wiring, no spec deltas — make pre-pr is unaffected. The branch carries exactly the two skill commits, cut clean off master (not the broader bug-bash branch they originated on).

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

anutron and others added 3 commits June 25, 2026 01:03
…aming

Field retrospective from a coordinator that avoided hera_plan surfaced real gaps. Verified its claims against internal/heragater: two were wrong (materializes on role-status done, NOT idle; non-root nodes stack on the blocker's branch, NOT project default) and already correct in the skill. Closed the genuine gaps:

- Fan-in stacks on ONE (latest-done) blocker's branch, not a merge of all — diamond nodes silently miss a sibling's work.

- done gates materialization but != merged/integrated; the gater spawns the dependent ahead of the coordinator's merge.

- Documented the self-rebase + self-guard prompt patterns as the standard mitigation for stacked-integration and contract-discovery work.

- Elevated the <stage><member> short-id naming convention with its rationale (descriptive names blow the DAG boxes wide and wreck legibility at scale).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…planning

Root cause of a coordinator improvising a wrong plan-DAG model: skills are progressively disclosed — only the description front-matter is in context until the Skill tool loads the body. The old description triggered on 'multi-session project' but never said to load the body, and gave no hint the plan-DAG mechanics are non-obvious, so a coordinator could author a DAG straight from the MCP tool schemas (which carry none of the gating/branch/naming logic). New description directs LOAD AND READ IN FULL before authoring/driving any multi-stage plan and names what's non-obvious.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Feedback: the load-before-planning front-matter from the prior commit was too strong — it read as 'use the plan-DAG for any multi-stage plan', discouraging in-process Claude sub-agents for in-session work. Restructure instead:

- New .claude/skills/hera-plan/SKILL.md (on-demand): the whole plan-DAG surface — authoring/mutation verbs, gating-on-done, branch-stacking + fan-in footgun, short-id naming, subcoord nodes, self-guard prompt patterns, worked example. This is where the body fixes from the prior commits now live.

- Base hera/SKILL.md slimmed: plan-DAG detail replaced by a pointer to hera-plan; front-matter softened to role/multi-session triggers (no 'any plan' over-reach); new §4 decision triad — in-session sub-agents vs hera workers vs plan-DAG, auto-deciding the plan-DAG when the multi-session units have dependencies, asking the human only when multi-session-ness itself is ambiguous.

- claude/snippets/hera.md (always-loaded): role-aware loader ('spawned as a worker / hold-or-creating a coordinator binding → load the hera skill') + the same decision triad + dependency trigger.

- README Agent-facing skills + bundled-skills list mention hera-plan (installer enumerates .claude/skills/* dynamically, so it auto-installs).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@anutron

anutron commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

Recast: this PR now delivers a two-skill split (3rd commit 70cd95c), superseding the original single-file scope.

The earlier "load before any multi-stage plan" front-matter was too strong — it read as "use the plan-DAG for any multi-stage plan" and discouraged in-process Claude sub-agents for in-session work. Restructured instead:

  • New .claude/skills/hera-plan/SKILL.md (on-demand): the full plan-DAG surface — authoring/mutation verbs, gating-on-done, branch-stacking + fan-in footgun, short-id naming, sub-coordinator nodes, self-guard prompt patterns, worked example. The body fixes from the first two commits live here.
  • Base hera/SKILL.md slimmed: plan-DAG detail → a pointer to hera-plan; front-matter softened to role / multi-session triggers (no "any plan" over-reach); new §4 decision triad — in-session sub-agents → hera workers → plan-DAG, auto-deciding the plan-DAG when the multi-session units have dependencies among them, asking the human only when multi-session-ness itself is ambiguous.
  • claude/snippets/hera.md (always-loaded): role-aware loader ("spawned as a worker / hold-or-creating a coordinator binding → load the hera skill") + the same triad + dependency trigger. This is the reliable always-in-context lever; a skill can't self-load.
  • README mentions hera-plan (the installer enumerates .claude/skills/* dynamically, so it auto-installs).

Docs-only; make pre-pr unaffected. The PR title is now slightly narrow — happy to retitle to "Split hera skill into base + hera-plan" if preferred.

@anutron anutron merged commit b1a0af8 into master Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant