Skip to content

feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate, render) #739

Closed

Description

@dan-petty

Context & Rationale

Work keeps joining the current release, and the roadmap's source is a hand-edited file that no code enforces.

What the migration starts from. These are read-only checks made on 2026-10-01.

Scope & Deliverables

  • Deliverable: a devops roadmap command group (commands/roadmap.py) with migrate and render, and their MCP mirrors. It also removes every path that pushes docs/ROADMAP.md to GitHub.
    • Config. .github/roadmap.toml, parsed with tomllib into a pydantic model that rejects unknown keys:

      • board, required, with no default;
      • release_cap = 12, discovery_threshold = 24, planning_horizon = 2, stall_days = 14.

      Every runner reads the file through the GitHub contents API at --ref, which defaults to the repo's default branch. A failed read stops the command. This repo's file sets board = 2.

    • Writes.

      • migrate writes to GitHub only with --confirm. Without --confirm, or with --dry-run, it prints its plan and writes nothing.
      • render writes only docs/ROADMAP.md. With --dry-run it prints the file to stdout instead.
    • Store additions. refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768 delivers Items (field values and release) and Releases (find, create, edit and close). Migrate also needs these operations, which this PR adds to the store, in both adapters and under refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768's contract suite:

      • create a board from the template;
      • replace a single-select field's options, sending every kept option with its current id, color and description;
      • delete a field;
      • remove a card from the board;
      • create an issue, and close an issue with a reason and a comment;
      • delete a milestone;
      • list the board's workflows.

      If refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768 already provides one of these, this PR uses it.

    • Board template (.github/project-template.json):

      • The Status options are New, Ready, In Progress, In Review, Done and Blocked.
      • Category and the Milestone text field are removed. The Roadmap Timeline view drops Category from its visible fields, and the Value vs Effort view groups by Value. Priority, Value and Effort stay, still High/Medium/Low for Value and Effort.
      • Blocked means waiting on something outside the roadmap: hardware, an upstream release or a person's decision. Waiting on another item is a dependency, recorded as a GitHub blocked-by link.
      • Code that follows the template:
        • In github/projects.py, the default Status (:1024) and the status/backlog mapping (:1012) become New.
        • plan_item_changes (:1077) stops planning the Milestone field.
        • project sync creates missing fields but never edits an existing field's options. _sync_single_select_field_options and _format_remote_options are removed. Migrate is the only command that changes the board's options.
        • In CONST_PROJECT_WORKFLOW_EXPECTATIONS, add and reopen expect New (config/constants.py:2264, :2266), and the auto-add entry (:2270) is removed.
    • migrate. Every write goes through the roadmap store (refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768) and is recorded as the value a job last set (ADR 0002), so later jobs may change it. Its steps:

      • Board. If board names no board, migrate creates one from the template and prints its number. Otherwise it brings the board in line with the template:

        • rename Backlog to New, keeping the option id so items keep their value;
        • move Todo items to New, then remove Todo;
        • add Blocked;
        • delete Category.

        Each option change sends every kept option with its id.

      • Fields on open issues. Migrate fills only unset fields, by the label rules project sync already uses. An unset Status gets the status of a status/* label, else New (_initial_status, projects.py:1051). An unset Priority gets the value of the issue's priority/pN label (_declared_priority, :1060). Closed issues and PR cards are left alone.

      • Epics. Close every open type/epic issue as not planned, with a comment that points to ADR 0001. Remove every type/epic issue from the board.

      • Releases. Keep the current release (the lowest-version open milestone) and the next planning_horizon open milestones by version. Open issues in later open milestones move to the backlog: their milestone is cleared. Those milestones are then deleted. Closed (shipped) milestones are left alone.

      • Matrix. For each open matrix row whose Feature / Focus equals a linked item's title (using the same normalization as linking), set the item's Value and Effort when the board field is unset. A value that is set and differs is listed in the report and left alone.

      • Not planned. Each row marked "❌ Rejected", and the not-building entry, becomes an issue closed as not planned. The issue carries the row's text, so intake (feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742) finds it as a duplicate. There are three such rows at ef21785.

      • ROADMAP import.

        • Read docs/ROADMAP.md through the contents API at --ref, like the config.
        • Parse every heading, including range headings and #### headings. Entries after the v0.5.x themes, which sit under no release heading, are backlog entries.
        • An entry is linked when its heading names its issue (Issue #N, or Issues #N, #M), or when exactly one issue title equals the entry title. For that comparison, strip the conventional-commit prefix and fold case and whitespace.
        • Migrate edits no issue body.
        • The import is skipped when the file carries render's marker line.
      • Report, printed as Markdown, with four sections:

        1. The 17 aspirational P0 feature entries (ROADMAP.md:1142-1282), listed as P0-feature candidates for a later release (D9). Where an entry matches an issue (feat(ai): syntopical dialectical synthesis engine (devops ai research syntopical) #273, feat(ai): agentic information foraging & scent tracker (devops ai research forage) #274), the report says so. Where an entry overlaps a roadmap job (the six devops gh pm entries), the report names the item it overlaps. It gives no verdict on any candidate.
        2. Every other open entry that has no issue, with its line, section and priority.
        3. Open entries whose issue is closed.
        4. Every planned write, with its old and new value, and any enabled auto-add workflow.
    • docs/ROADMAP.md before migration. This PR makes two edits to the file:

      Everything else in the file stays until render replaces it.

    • render. Writes docs/ROADMAP.md from GitHub, through the store.

      • The file starts with a marker line saying that devops roadmap render generated it.
      • Sections, in order: the current release, then the planning_horizon planned releases, then the backlog. The backlog is sorted by Priority (unset last), then by issue number.
      • Each item is one line: issue number, title, Status, Priority, Value and Effort. Closed items in a release are checked.
      • Two runs on the same state produce identical bytes. A failed read writes nothing and exits non-zero.
      • Render runs in the release PR at the cut. A person runs it until feat(release): item closure summaries, generated changelog and automatic release cut (devops roadmap close) #743 automates the cut. CI never compares the file with live GitHub state.
    • docs/VISION.md, written by hand. It holds the 16 principles (ROADMAP.md:5-22), the themes of the v0.3.x sections and the v0.4.x/v0.5.x themes (:1304-1317). The text moves as it is, without release numbers.

    • MCP.

      • roadmap_render(repo, ref, dry_run=True).
      • roadmap_migrate(repo, ref), which only previews: it has no confirm parameter.
      • roadmap joins CONST_MCP_LAZY_DOMAINS (config/constants.py:66), the prefix map in ai/mcp/dispatcher.py:37, and the domain list in the hydrate_tool_domain docstring (ai/mcp/server.py:3034).
    • Removed, with no shims:

      • gh issues sync-roadmap, gh issues reconcile-roadmap and github/roadmap_sync.py;
      • gh milestones sync, extract_roadmap_milestones and sync_repository_milestones (github/milestones.py:91, :215), the models and helpers only they use, and their exports in github/__init__.py, along with --create-release-epics;
      • devops release epic and github/release_epics.py;
      • CONST_ROADMAP_PRIORITY_LABELS (config/constants.py:1797), CONST_ROADMAP_SCOPE_KEYWORDS (:1750) and any other constant that only these modules use;
      • the MCP tools gh_sync_roadmap, gh_issue_reconcile_roadmap, gh_milestone_sync and release_epic_sync, and their exports in ai/mcp/__init__.py;
      • their tests: tests/test_github_roadmap_sync.py, tests/test_release_epics.py, the roadmap parts of tests/test_gh_issues_milestones.py and tests/test_github_milestones.py, the milestones sync test in tests/test_gh_cmd.py:61, and their entries in tests/test_all_commands_help_dryrun.py and tests/test_fastmcp_contracts.py;
      • their help strings (lang/en/help.py:805, :849);
      • the mentions in AGENTS.md:332, AGENTS.md:371, README.md:349, docs/ROUTINE_TASKS.md:239, docs/SDLC.md:272 and ai/knowledge_base/devops_cli/tasks/github_project_management.md (:20, :121, :194).

      The generated reference docs are regenerated.

    • Split off to separate items:

      • task files dropping their status lines;
      • the board's Priority field becoming the only priority source, with the label merges;
      • removing docs/RELEASE_NOTES.md and devops docs compact.
  • Acceptance criteria:
    • uv run devops roadmap --help lists migrate and render. Both are covered in tests/test_all_commands_help_dryrun.py.
    • Config tests parse TOML text, with no network:
      • a missing board fails, and the error names the key;
      • an unknown key fails;
      • omitted keys take the values 12, 24, 2 and 14.
    • tests/test_roadmap_migrate.py runs migrate against refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768's in-memory adapter.
      • Fixture. A ROADMAP excerpt with:

        • a range heading and a #### heading;
        • one entry linked by its heading and one linked by exact title;
        • one unlinked P0 entry;
        • one entry whose issue is closed;
        • one row marked "❌ Rejected" and one matrix row with Value and Effort.

        A board with Todo, Backlog and Category; one open issue with a status/ready label and no Status; two epics; and milestones for the current release, two planned releases and one later release.

      • Without writing. With --dry-run, and with neither flag, the adapter's state is unchanged, and the plan lists every create, edit, close, move and delete.

      • With --confirm:

        • Backlog is renamed New with the same option id. Todo items are New, and Todo is gone. Blocked exists, and Category is gone. Every card keeps the Status it had, with Todo read as New.
        • Unset Priority and Status values are filled. The status/ready issue is Ready.
        • The epics are closed as not planned and are off the board.
        • The later release's issues are in the backlog, and its milestone is deleted.
        • The rejected row is an issue closed as not planned.
        • Value and Effort are set only where they were unset.
        • No issue body changed.
        • Every write is in the store's last-set record.
      • Idempotence. A second run with --confirm plans nothing.

      • Report. The first section lists the P0 entry, the second lists the other unlinked entries, the third lists the entry whose issue is closed, and the fourth lists the planned writes.

      • Marker. A file carrying render's marker is not imported.

    • A test builds the GitHub adapter's option-update request, with no network. The field has Todo, Backlog, Ready, In Progress, In Review and Done; the target renames Backlog to New and adds Blocked. Every kept option carries its current id, color and description, and Backlog's id carries the name New.
    • A project sync test with a template whose Status options differ from the board's shows that no option-update request is sent.
    • tests/test_roadmap_render.py, using the in-memory adapter:
      • the file starts with the marker line;
      • the sections come out in order, and the backlog is sorted by priority;
      • each item line holds the issue number, title, Status, Priority, Value and Effort, and a closed item in a release is checked;
      • two runs produce byte-identical files;
      • when the adapter fails a read, the file is untouched and the command exits non-zero.
    • A test pins the template's Status options to exactly New, Ready, In Progress, In Review, Done and Blocked. It checks that there is no Category or Milestone field and that no view names Category.
    • A test checks that CONST_PROJECT_WORKFLOW_EXPECTATIONS expects New on add and reopen and has no auto-add entry.
    • tests/test_github_projects.py no longer uses Category in its fixtures, and config/constants.py still holds ("category", "Category") in CONST_FINDING_DETAIL_HEADER_FIELDS.
    • The MCP tests show that roadmap_render and roadmap_migrate are registered, that roadmap_migrate has no confirm parameter, that both resolve to the roadmap domain, and that the contract tests pass.
    • rg -n 'sync-roadmap|reconcile-roadmap|sync_roadmap|reconcile_roadmap|roadmap_sync|release_epic|devops release epic|release tracking epics|create-release-epics|gh milestones sync|gh_milestone_sync|extract_roadmap_milestones|sync_repository_milestones|CONST_ROADMAP_PRIORITY_LABELS|CONST_ROADMAP_SCOPE_KEYWORDS|_sync_single_select_field_options|_format_remote_options' src tests docs README.md AGENTS.md -g '!docs/adr/**' -g '!docs/agent/**' -g '!docs/ROADMAP.md' prints nothing.
    • uv run devops release epic --help, uv run devops gh milestones sync --help, uv run devops gh issues sync-roadmap --help and uv run devops gh issues reconcile-roadmap --help each exit non-zero.
    • docs/VISION.md exists, and docs/ROADMAP.md carries the banner. A reviewer checks both by reading them.
    • Every new test runs offline in under 1 s. uv run devops ci passes within its 5-minute budget.
    • Checks a person runs after merge. These use the owner's gh login, which needs the project scope (gh auth status). The figures are from ef21785 and will drift.
      1. uv run devops roadmap migrate --repo dan-petty/devops-cli --ref release/v0.2.25 --dry-run. Expected output:
        • The plan keeps v0.2.25, v0.2.26 and v0.3.0, and deletes v0.3.1-v0.3.5. If it keeps v0.2.24, close that shipped milestone first.
        • The report lists the 17 P0 candidates and no entry that D9 names as filed.
        • The plan shows the board changes, about 149 Priority fills and 148 Status fills, the open epics being closed, about 35 Value and Effort fills, and 3 not-planned issues.
      2. The same command with --confirm instead of --dry-run.
      3. The --dry-run command again. It plans nothing.
      4. gh project field-list 2 --owner dan-petty --format json shows the six Status options and no Category. gh project item-list 2 --owner dan-petty --limit 1000 --format json shows a Status on every open issue.
      5. In the board's Workflows page, a person turns off "Auto-add sub-issues to project" and turns on "Item closed" (Set Status to Done), which closure (feat(release): item closure summaries, generated changelog and automatic release cut (devops roadmap close) #743) relies on. Then gh api graphql -f query='{user(login:"dan-petty"){projectV2(number:2){workflows(first:20){nodes{name enabled}}}}}' shows no enabled auto-add workflow and "Item closed" enabled.
      6. At the v0.2.25 cut, uv run devops roadmap render --repo dan-petty/devops-cli --ref release/v0.2.25 writes docs/ROADMAP.md in the release PR.
  • Key questions:
  • Constraint:

Strategic Alignment

Owner decisions (2026-10-01)

From the agentic quality assessment (https://claude.ai/artifact/K7S7AkKJymFydhjwexigiN), decided by the owner. These replace any matching proposed answer above.

Board workflow settings (2026-10-01)

The owner configured board 2's built-in workflows by hand on 2026-10-01. This PR makes CONST_PROJECT_WORKFLOW_EXPECTATIONS match them, alongside the New-on-add and New-on-reopen changes above:

Acceptance criterion: a test pins the expectations above.

Activity

  1. added this to the v0.2.25 milestone on Sep 30, 2026
  2. added
    type/feature
    scope/github
    priority/p1-high
    on Sep 30, 2026
  3. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Closed by #928, merged into release/v0.2.25.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  4. added a commit that references this issue on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/githubtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions