Skip to content

Generated roadmap: docs/ROADMAP.md rendered from GitHub state, regenerated per merge (#175) - #198

Merged
robercano-ghbot merged 3 commits into
mainfrom
feat/issue-175-roadmap-generator
Jul 29, 2026
Merged

Generated roadmap: docs/ROADMAP.md rendered from GitHub state, regenerated per merge (#175)#198
robercano-ghbot merged 3 commits into
mainfrom
feat/issue-175-roadmap-generator

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

Closes #175

What

Adds a generated docs/ROADMAP.md rendered from GitHub metadata (milestones / labels / blocked-by edges) so owner-visible roadmap state cannot drift from the single source of truth. The doc is never hand-edited.

Changes

  • .claude/scripts/roadmap.sh (new) — REST-only, gh 2.4.0-safe generator. Renders open milestones in natural version order; per issue a priority chip + state (open / in_flight / PR#N open / closed, mirroring loop-census.sh); Blocked-by edges as a Mermaid graph by reusing cockpit.sh --parse-blocking (not reimplemented); a "Feedback inbox" of open feedback-labeled issues with no milestone; a footer timestamp + generating commit. --write persists docs/ROADMAP.md; default is stdout preview. Output is marked GENERATED / do-not-hand-edit. All gh via bot-gh.sh.
  • .claude/scripts/merge-ready.sh — after each successful merge, regenerates + commits docs/ROADMAP.md to base, best-effort/non-fatal (a roadmap failure can never abort a merge). Commit gated on the same clean-tree + in-sync-with-origin preconditions as local_sync; rolls back (git reset --hard origin/$base) on push failure; restores the working copy on every non-committing path so the base checkout is never left dirty. Change-detection ignores the volatile footer to avoid no-op commit spam.
  • docs/USAGE.md — documents that docs/ROADMAP.md is generated and read-only (source of truth is GitHub metadata).
  • Testsroadmap.test.sh (27 checks: milestone ordering, all four state derivations, Mermaid edges, feedback-inbox include/exclude, degrade path) and extended merge-ready.test.sh (62 checks incl. hermetic bare-origin scenarios for real commit+push, footer-only "no changes", diverged not-in-sync, and rejected-push rollback).

Notes

  • Optional live cockpit panel: intentionally deferred (out of core scope, no requirement beyond "optional; skip if any risk").
  • Reviewed through correctness (opus) + tests (sonnet) lenses; both approve. Gates (self-adapter): build / lint / test all green.

🤖 Generated with Claude Code

robercano and others added 3 commits July 29, 2026 09:15
)

Add roadmap.sh, a gh-2.4.0-safe REST-only generator that renders
docs/ROADMAP.md from live GitHub metadata: open milestones in natural
version order, each with its issues (priority chip, derived
open/in_flight/PR#N-open/closed state mirroring loop-census.sh's own
ADVANCE logic, and a Mermaid "Blocked by" graph reusing cockpit.sh's
--parse-blocking parser), plus a Feedback inbox of unmilestoned open
feedback-labeled issues and a generated timestamp/commit-sha footer.

Wire merge-ready.sh to regenerate docs/ROADMAP.md best-effort after
every successful merge, strictly non-fatal on generator failure, with
commit+push only when the local checkout is cleanly on the base
branch. Extend merge-ready.test.sh to prove regen invocation, its
non-fatal failure path, and that it never fires on a skip-only (no
merge) run. Document docs/ROADMAP.md as generated/read-only in
docs/USAGE.md.
…l back on push failure (issue #175)

Both review lenses rejected the tip for a real correctness bug: the
post-merge docs/ROADMAP.md commit/push could wedge the owner's local main
forever -- it committed without verifying the whole tree was clean and
$base was in sync with origin, and left a dangling local commit on any
push failure (offline/branch-protection), which local_sync's ff-only merge
can then never reconcile.

- merge-ready.sh: gate the commit on local_sync's own success flag
  (checkout on $base, whole tree clean, origin/$base fast-forwarded) instead
  of a docs/ROADMAP.md-only diff; on push failure, `git reset --hard
  origin/$base` so main is never left diverged. Change-detection now ignores
  roadmap.sh's volatile footer line (timestamp/commit) so a semantically
  identical regen is never committed as no-op spam. Added a comment
  clarifying the plain-git (owner-auth) commit choice is deliberate, not an
  oversight.
- merge-ready.test.sh: new scenarios K/L/M drive the real commit/push path
  against a hermetic local bare-origin remote (same pattern as
  worktree.test.sh/release.test.sh/worktree-cleanup.test.sh/
  loop-census.test.sh), asserting the real push lands, the footer-only diff
  is skipped, and a rejected push rolls local main back in sync with origin.
- roadmap.sh: soften the header's census-parity claim -- its in_flight
  branch detection lacks census's stale-merged-remote refinement; documented
  as a known, low-risk simplification rather than an unstated mismatch.
- roadmap.test.sh: note the gh-unavailable scenario's one real (read-only)
  git branch listing call instead of leaving it unexplained.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…hs (issue #175)

roadmap.sh --write unconditionally rewrites docs/ROADMAP.md's footer
(timestamp + commit SHA) every run, even on paths that don't commit
it: "no changes" (semantically identical content) and "not in sync"
(local_sync_ok=0). Both previously exited without restoring the file,
leaving the owner's real checkout dirty and, worse, wedging
local_sync's own clean-tree precondition on the NEXT run.

Restore docs/ROADMAP.md via `git checkout --` on both non-committing
paths so the tree always ends up clean unless the commit+push path
actually lands. The push-failure rollback path was already safe via
its existing `git reset --hard origin/$base`.

Adds a clean-tree assertion to scenario L (no-changes path) and a new
scenario N exercising the not-in-sync path with a real diverged git
repo, both asserting docs/ROADMAP.md is restored to clean afterward.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@robercano-ghbot robercano-ghbot added the needs-human Loop escalated: attempt budget exhausted, manual triage required label Jul 29, 2026
@robercano-ghbot

Copy link
Copy Markdown
Collaborator Author

Generated roadmap: docs/ROADMAP.md rendered from GitHub state, regenerated per merge (#175) (not yet reviewed)

@robercano-ghbot robercano-ghbot removed the needs-human Loop escalated: attempt budget exhausted, manual triage required label Jul 29, 2026
@robercano-ghbot
robercano-ghbot merged commit 9ec2b27 into main Jul 29, 2026
9 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-175-roadmap-generator branch July 29, 2026 09:33
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.

Generated roadmap: docs/ROADMAP.md rendered from GitHub state, regenerated per merge

2 participants