Skip to content

feat(skills): automate milestone merge readiness#78

Merged
Mathews-Tom merged 2 commits into
mainfrom
feat/autonomous-milestone-merges
Jul 7, 2026
Merged

feat(skills): automate milestone merge readiness#78
Mathews-Tom merged 2 commits into
mainfrom
feat/autonomous-milestone-merges

Conversation

@Mathews-Tom

Copy link
Copy Markdown
Owner

Summary

This PR updates the plan-prompts and milestone-runner skills so milestone execution can run autonomously through merge when all gates are clear.

The prior contract stopped milestone runs at "PR stack open, checks green, reviewed, ready for human review" unless the user separately authorized a merge. That made the runner safe, but it prevented the intended unattended flow where each milestone stack reaches a clear merge decision and the orchestrator continues after verifying the result.

This branch changes the contract to a structured GO/NO-GO handoff:

  • plan-prompts now requires every generated milestone /goal block to end with a final GO or NO-GO verdict plus evidence.
  • milestone-runner now treats that verdict as a required gate before advancing.
  • A GO verdict plus independently verified external gates authorizes automatic root-to-leaf stack merge and branch cleanup.
  • NO-GO, missing/ambiguous verdicts, pending/failing checks, failed verification, wrong branch topology, explicit no-merge requests, or a HUMAN REVIEW GATE stop the sequence.

Scope

skills/milestone-runner

  • Replaces the default human-review stop point with autonomous merge-and-continue after GO plus external gate verification.
  • Adds a required Stack verdict gate: the final milestone output must contain GO with evidence before merge, while NO-GO, missing verdicts, or ambiguous verdicts stop the sequence.
  • Keeps external verification authoritative. The runner still verifies PR existence, PR bases, CI/check status, milestone verification commands, review completion, and clean worktree state before any merge.
  • Routes merge execution through stacked-PR discipline: merge root-to-leaf, update local state, retarget/rebase children, re-run checks before each child merge, clean only merged branches, and re-run milestone verification on merged main.
  • Preserves safety stops for explicit no-merge instructions and HUMAN REVIEW GATE milestones.
  • Updates milestone-runner eval coverage so the sequential execution case expects automatic merge-and-clean after GO, and explicit merge requests are treated as GO candidates only when gates are green.

skills/plan-prompts

  • Updates the generated global execution rules so DONE includes a final GO/NO-GO merge verdict with evidence.
  • Adds a FINAL VERDICT section to every generated milestone /goal template.
  • Defines GO narrowly: every PR open, correctly based, reviewed, green, locally verified, and the whole stack satisfies every milestone acceptance row.
  • Defines NO-GO for failing/pending checks, incomplete review, wrong topology, missing verification, scope leakage, remaining human/manual gates, or ambiguous merge readiness.
  • Requires evidence for the verdict: PR URLs, branch bases, CI/check status per PR, verification command output, review completion, residual risks, and manual gates.
  • Updates plan-prompts eval coverage to require generated execution prompts to include GO/NO-GO merge-readiness language.

Skill Evaluator Results

Package: milestone-runner (skill)
  D1 Frontmatter Quality:            20/20
  D2 Trigger Coverage:               18/18
  D3 Structural Completeness:        16/20
  D4 Content Depth:                  18/22
  D5 Consistency:                    12/12
  D6 Compliance:                       8/8
  Overall:                          92/100 (92%)
  Status: PASS

Package: plan-prompts (skill)
  D1 Frontmatter Quality:            20/20
  D2 Trigger Coverage:               18/18
  D3 Structural Completeness:        16/20
  D4 Content Depth:                  18/22
  D5 Consistency:                    12/12
  D6 Compliance:                       8/8
  Overall:                          92/100 (92%)
  Status: PASS

Verification

uv run python scripts/validate_evals.py
uv run python scripts/validate_frontmatter.py
uv run python scripts/validate_references.py
uv run python scripts/generate_manifest.py
uv run python scripts/evaluate_package.py --path skills/milestone-runner
uv run python scripts/evaluate_package.py --path skills/plan-prompts
git diff --check

Observed results:

Validated 72 skills, 17 agents, 9 hooks, 6 rules, 7 commands, 3 utilities, 11 presets — all passed
Validated 135 packages across 7 types — all passed
Validated 135 packages — all references intact
Generated manifest.yaml with 80 skills, 17 agents, 9 hooks, 6 rules, 7 commands, 3 utilities, 13 presets
milestone-runner evaluator: 92/100 PASS
plan-prompts evaluator: 92/100 PASS
git diff --check: no output

Checklist

  • SKILL.md has valid YAML frontmatter with name and description
  • Skill name is kebab-case, under 64 characters
  • Description is 200-1024 characters with trigger phrases and "Use when" clause
  • No angle brackets or pushy language in description
  • No secrets, credentials, or internal URLs in any file
  • Tested locally with Claude Code
  • All file references in SKILL.md resolve to existing files
  • Skill evaluator score is 70% or above
  • No CRITICAL or HIGH findings from skill evaluator

@Mathews-Tom Mathews-Tom merged commit db557a9 into main Jul 7, 2026
3 checks passed
@Mathews-Tom Mathews-Tom deleted the feat/autonomous-milestone-merges branch July 7, 2026 22:04
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