Rebind Roadbook
Rebind an older plan as a roadbook (goblin-scout's dependency graph of waypoints, which are tasks): move a 2.x roadmap plugin's .claude/roadmaps.json to .claude/roadbook.json now, on request move its
Files1
View on GitHubSKILL.mdmarketplace/goblin-scout/skills/rebind-roadbook/SKILL.md
GitHubBring an older plan onto goblin-scout's roadbook. Three jobs, picked by what the project holds and what the user asked for:
| The project holds | Job |
|---|---|
a phase-array .claude/roadmaps.json from the 2.x roadmap plugin |
A. Move the file (the first write does this anyway; this does it now) |
a phase-array roadbook, and the user asked for the outputs to take the new names (outputs in $ARGUMENTS, or said so) |
B. Move the outputs |
| an old single-Markdown roadmap | C. Convert the old format |
Each is user-initiated only (never model-triggered).
Shared conventions: ${CLAUDE_PLUGIN_ROOT}/references/roadbook-conventions.md. The CLI is python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py.
0. Locate and detect
Resolve the roadbook: $ARGUMENTS path/name, else .claude/roadbook.json, else .claude/roadmaps.json, else a docs/roadmaps/ scan. Run python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py detect:
- Exit 3: old single-Markdown format; go to C.
- Exit 0: phase-array format. If the file is
roadmaps.json, or the user asked for the outputs, go to A or B; otherwise tell the user there is nothing to rebind and stop. - Exit 2: could not locate; ask for the path.
Show git status and advise the user to commit or stash first: every job here rewrites or moves tracked files. Do not proceed with a dirty tree unless the user says so.
A. Move the file
Run python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py rebind --dry-run and show the user the move. On their go-ahead run it without --dry-run. It does what goblin-scout 3.0.0's first write would: moves .claude/roadmaps.json (and roadmaps.local.json beside it) to the roadbook names, rewrites no value, pins each phase's chart to the path a 2.x plugin rendered it to, and stamps the live phase so a 2.x plugin refuses the file. Relay its notice line, and any note that a moved local file is no longer ignored by git.
Commit the move on its own, staging the two committed paths by name: git add .claude/roadmaps.json .claude/roadbook.json and git commit -m "chore(roadbook): move roadmaps.json to roadbook.json". Never stage the whole .claude folder: roadbook.local.json is a tracker mirror kept out of git, and when the CLI notes it is no longer ignored, ask the user to add .claude/roadbook.local.json to .gitignore (beside the old name) before committing. If the user also wants the outputs moved, carry on into B before committing, so the whole rebind is one commit.
B. Move the outputs (on request only)
A 2.x project keeps its chart, projections and overview where they were: the migration pins them. This job moves them to the names a new roadbook gets, only when the user asks:
| Output | 2.x default | Roadbook default |
|---|---|---|
| the chart | docs/artefacts/roadmap-{slug}.html |
docs/artefacts/chart-{slug}.html |
| a phase's projection | docs/roadmaps/{PHASE}.md |
docs/roadbook/{PHASE}.md |
| the prose overview | docs/reports/ROADMAP_OVERVIEW.md |
docs/reports/ROADBOOK_OVERVIEW.md |
- Run
python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py rebind --outputs --dry-runand show the user every move it lists; it plans the committed file and the local one beside it, each with its own outputs, and what it lists is exactly what runs. If it refuses because a file is not in canonical form, say that a rebind would reformat the whole file and add--reformatto both runs solely when the user agrees. A path the project chose for itself (anartefactorpathoutside those defaults) is left alone and does not appear. If a target already exists the CLI refuses before moving anything; relay that and stop. A line ending(in the roadbook; not on disk yet)changes only the path the roadbook records, since that output has not been written yet; the next render or projection writes it at the new name. A line saying a 2.x chartis staleis a chart left beside the one that replaced it (a local phase whose chart moved after the first write): rebind leaves it, so relay the line and let the user delete the old file. - On the user's go-ahead run it without
--dry-run. It moves the roadbook file too when it is stillroadmaps.json, clears the pinnedartefactso the chart takes the new default, rewrites each defaultpath, and moves the files withgit mvwhere git tracks them. - Search the project for links to the old paths (
grep -rn "docs/roadmaps/\|ROADMAP_OVERVIEW\|artefacts/roadmap-", skipping.git) and show the user each hit. Update a link only where the user agrees; a dated record (a changelog entry, an old report) keeps its words. - Commit everything in one commit. The moves of tracked outputs are already staged (
git mv); stage the roadbook files by name,git add .claude/roadmaps.json .claude/roadbook.json(leaveroadbook.local.jsonout, as in A), any output the CLI moved that git did not yet track, and any link the user agreed to update, thengit commit -m "chore(roadbook): move the chart, projections and overview to the roadbook's names".
C. Convert the old format
An old simple-format roadmap becomes the rich phase-array format the other goblin-scout skills expect. This is a one-way structural rewrite of the source of truth; the other skills detect the old format and point the user here.
Old (simple) format: a single docs/roadmaps/{name}.md is the source of truth, with <a name="m{N}"> anchors, four sections (In Progress / To Do / Blocked / Completed), - [ ]/- [x] checkboxes, prose **depends on {IDs}** clauses, a graph TD diagram; .claude/roadmaps.json is a {"roadmaps":[{name,path}]} pointer registry.
Rich format: .claude/roadbook.json is the source of truth: an array of phase objects {name, path, archived?, externalGates, milestones} with six statuses (todo, blocked, paused, deferred, done, out_of_scope), external gates, milestone and gate dependencies and a mechanical status recompute. The phase's projection (its path) and docs/reports/ROADBOOK_OVERVIEW.md are projections.
C1. Parse the old Markdown
Read the .md. For each <a name="m{N}"> milestone block, capture:
- Milestone number and name; the goal (
> **Goal:**/> [!IMPORTANT]block). - Waypoints in each section (
m{N}-doing,m{N}-todo,m{N}-blocked,m{N}-done): the ID, the description and any**depends on {IDs}**clause. Note which section each came from (doing/todo/blocked/done).
Also parse the aggregated graph TD diagram for {A} --> {B} edges; merge these into each waypoint's dependency set, so a dependency drawn only in the diagram (never written in prose) is kept.
C2. Derive milestones, waypoints and dependencies
Build milestone objects {id: "M{N}", name, goal, tasks:[…]}. Each waypoint: {id, description, dependsOn:[…]} with dependsOn the union of its prose depends-clause and its incoming Mermaid edges. The old format has no external gates, so externalGates: []. Preserve any - Note: sub-bullets as a waypoint's notes field.
C3. Assign statuses (seed, then recompute)
Seed each waypoint's status from its old section, then let the recompute derive the rest:
- Completed (
- [x]):done(terminal seed, kept). - In Progress: in the rich format, in progress is a trail (a
starteddate), never a status, and the old format never said which scout or since when. Seed astodo(the recompute promotes it toblockedif it has dependencies that are notdone). Record every waypoint remapped this way for the report: the user may want to re-seed one deliberately (paused, say). - To Do / Blocked: leave unseeded; the recompute sets
todo(no dependencies, or all done) orblocked(any dependency not done).
Write the seeded JSON, then run python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py recompute so every non-terminal status is derived. This guarantees the converted file passes validation immediately.
C4. Write the phase-array roadbook.json
Write .claude/roadbook.json as a single phase object in an array (or, if converting one roadmap among several pointer-registry entries, append this phase and mark the others as needed). Structure, tabs, field order and British spelling exactly as goblin-scout:start-roadbook Step 6. Set the phase name from the old roadmap's name (or $ARGUMENTS), path to the .md it will regenerate (reuse the old path so existing links hold), archived: false, externalGates: []. Remove the old pointer-registry .claude/roadmaps.json once the new file is written.
C5. Regenerate the .md as a rich projection
Overwrite the old .md at the same path with the rich layout (see goblin-scout:start-roadbook Step 7): milestone headings, - [ ] **{ID}**: {description} lines with status annotations, and a generated graph LR diagram; no <a name> anchors, no four-section structure, no graph TD. The diagram is the verbatim output of python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py graph --mermaid --direction LR (terminal milestone edges, canonical colours, correct classDef placement; nothing hand-computed).
C6. Generate ROADBOOK_OVERVIEW.md
The old format had no prose overview. Synthesise a minimal one at docs/reports/ROADBOOK_OVERVIEW.md (see goblin-scout:start-roadbook Step 8) from the milestone goals, with the header count from python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py stats. Flag the narrative sections as stubs for the user to flesh out; invent no decision or rationale the source did not hold.
C7. Validate and report
Run python3 "${CLAUDE_PLUGIN_ROOT}"/scripts/roadbook.py validate: it must report clean; fix any discrepancy. Then report:
- Milestones and waypoints converted; the status distribution (
roadbook.py stats). - In-progress remaps: every waypoint that lost its in-progress state, so the user can start a trail on any still under way (
roadbook.py claim <ID> --assignee <name>, asking which scout) or re-seed one deliberately. - Any dependency edges recovered only from the Mermaid diagram (never written in prose); worth a glance in case the diagram was stale.
- The three paths written, and a note that
ROADBOOK_OVERVIEW.md's narrative is a stub.
Notes
- C is one-way: the old single-file model cannot be rebuilt from the rich format, hence the git-checkpoint advice. A and B are moves, so
git revertundoes either. - B runs only when the user asks. The collision a roadbook escapes is in shared repositories, where moving a chart or a projection breaks links other people hold; that is their call, never a default.
- Statuses end up derived: the recompute is the source of truth for everything except
done/out_of_scopeseeds. - Tabs not spaces; British spelling throughout. Afterwards the roadbook is tended by
goblin-scout:tend-roadbook, extended bygoblin-scout:add-waypointsand its chart drawn bygoblin-scout:unroll-chart.