Skip to content

feat(roadmap): consolidate has an MCP mirror and a weekly row #3745

Closed

Description

@dan-petty

Split from #1127 (part 4 of 4). It needs the command of part 2.

Problem

The consolidation command (part 2) is run by hand only. An agent has no read-only tool for it, and the roadmap Service does not run it.

Expected

An MCP tool roadmap_consolidate mirrors the read-only run. The roadmap Service runs the job weekly after refinement, because it only writes a plan.

Acceptance criteria

  • The MCP tool roadmap_consolidate builds an argv that never holds --apply or --confirm. tests/test_fastmcp_contracts.py checks the argv.
  • The due table of the run (feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981) has a row that makes the consolidation job due weekly, in the fixed order after refinement. A test in tests/test_roadmap_run.py covers the row and its order.
  • The weekly run writes only the plan file, and no GitHub change.
  • The documents that list the jobs and the MCP tools name the new job, and uv run devops docs generate --sync-readme leaves no diff.
  • uv run devops ci passes.
  • Pending a person: uv run devops roadmap consolidate --dry-run on the live board reports the six groups applied on 2026-10-03 as already linked, and two runs print the same plan. test(roadmap): verify the consolidation dry run on the live board #3635 holds this check.

Existing tool considered

The MCP mirror and the run table are existing project mechanisms. No new dependency.

Related

#1127 (shortlists), part 2 (command and plan), part 3 (apply), #981, #3635.

Alternatives check of 2026-11-08: partly.
Tool: PrefectHQ/fastmcp (https://github.com/PrefectHQ/fastmcp), Apache-2.0, last activity 2026-11-08, maintained.

Proposed design

Problem statement

The consolidation command devops roadmap consolidate exists and runs by hand only. An agent has no read-only MCP tool for it. The roadmap Service never runs it. This item adds the MCP tool roadmap_consolidate and a weekly row in the due table. Both run the plan path only, and the plan path writes one local plan file and nothing on GitHub. The live-board check of the six groups of 2026-10-03 stays in #3635.

Acceptance criteria

Requirement: Read-only argv of the MCP tool

The MCP tool roadmap_consolidate SHALL publish no confirm and no decline option and SHALL build an argv that holds neither --confirm nor --decline.

Scenario: Argv of a tool call

  • WHEN A client calls the tool roadmap_consolidate with every option that its schema publishes.
  • THEN The schema names neither confirm nor decline, the argv holds neither flag, and tests/ai/mcp/test_mcp_roadmap_tools.py and tests/ai/mcp/test_mcp_exposure_table.py pass.

Requirement: Weekly due row after refinement

The due table of the run SHALL hold a consolidate row in the model lane directly after refine, due every DEFAULT_ROADMAP_CONSOLIDATE_INTERVAL_MINUTES (10079) minutes and on a first run.

Scenario: Row and order in the due table

  • WHEN The test tests/roadmap/test_roadmap_run_due_table.py reads DEFAULT_DUE_TABLE.
  • THEN The test finds consolidate directly after refine with that interval and first_run_due, and tests/roadmap/test_roadmap_intervals.py counts 11 interval constants and finds the new one prime and not a multiple of 5.

Requirement: Weekly run writes only the plan

The weekly run SHALL write only the plan file and MUST make no GitHub change.

Scenario: Run with a recording store

  • WHEN The Service runs the consolidation row from its due row with a recording store.
  • THEN The run writes the plan file and the recording store holds no write.

Requirement: Documents name the job and the tool

The generated documents that list the roadmap jobs and the MCP tools SHALL name the consolidation job and the tool roadmap_consolidate.

Scenario: Documentation generation

  • WHEN A developer runs uv run devops docs generate --sync-readme after the change.
  • THEN The command leaves no diff, and docs/MCP_TOOLS.md names the tool and the help text of devops roadmap run names the job.

Requirement: Tool listing snapshot

The tool listing snapshot SHALL include the tool roadmap_consolidate with readOnlyHint set to true.

Scenario: Snapshot test

  • WHEN The test tests/ai/mcp/test_mcp_tool_listing.py compares the tool listing with its snapshot.
  • THEN The snapshot holds the new tool and the test passes.

Requirement: CI gate

The change MUST pass uv run devops ci.

Scenario: Full CI run

  • WHEN A developer runs uv run devops ci on the change.
  • THEN The command exits with status 0.

Existing Tool Considered

FastMCP 4.1.2 (https://github.com/PrefectHQ/fastmcp, Apache-2.0, maintained) is the MCP server that the project already pins in pyproject.toml. It covers tool registration and the parameter schema. It lacks the project argv translation, the read-only option policy and the roadmap due table. The project code for these exists: _build_command_argv and _PATH_PARAM_RESTRICTIONS in src/devops_cli/ai/mcp/generator.py, CONST_MCP_EXPOSURE_TABLE in src/devops_cli/config/constants.py and DEFAULT_DUE_TABLE in src/devops_cli/roadmap/run.py. The change adds no dependency and no new library. It adds one exposure row, one restriction entry, one due-table row and one interval constant. That is about 30 lines of production code, plus tests, and one short build session.

Key questions

  • Which code builds the argv of the MCP tool roadmap_consolidate, and how does it keep write options out?: The MCP generator builds the argv. Add a ('roadmap', 'consolidate') row to CONST_MCP_EXPOSURE_TABLE with read_only true, and a ('roadmap', 'consolidate') entry to _PATH_PARAM_RESTRICTIONS that allows only repo, ref, limit and dry_run. The options confirm and decline are then never published and never bound, so the argv cannot hold them. The command has no --apply option, because the apply path is another command. (best practice) [sources: src/devops_cli/ai/mcp/generator.py, src/devops_cli/config/constants.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 6, 2026
  2. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It is part 4 of 4 and depends on the still-open part 2 (#3740), so it cannot land first, but it completes a user-facing automation.
    • Value: Medium. It removes a manual step and gives agents a read-only consolidation tool, but the core command already lands in part 2.
    • Effort: Medium. It adds one MCP tool with argv tests, one due-table row with order tests, a docs update, and a CI pass, all following existing patterns.
    • Related: feat(roadmap): the Service runs the alternatives job once a day, and refine reads the recorded tool verdict #2652, which asks for a different change. Both add a due-table row so the Service runs a job on a schedule, but #2652 covers the alternatives job daily while the candidate covers the consolidate job weekly and also adds an MCP mirror.
  3. added
    priority/p2-medium
    on Nov 6, 2026
  4. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 72c52c6 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  5. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The web searches returned no relevant results (only generic MDN pages), so only the PyPI and GitHub facts of FastMCP were usable. FastMCP, which the issue itself names as the MCP server the project already pins, covers the MCP tool registration and parameter-schema half of the need, but it does not supply the project's argv restriction, the due-table row with its weekly interval and order, or the plan-only weekly run, so the issue's work stays largely project-internal.

    Tool: PrefectHQ/fastmcp (https://github.com/PrefectHQ/fastmcp)

    • License: Apache-2.0
    • Last activity: 2026-11-08
    • Maintained: yes

    Covers:

    • MCP server framework that registers tools and publishes their parameter schema, which the new roadmap_consolidate tool needs
    • Maintained Apache-2.0 Python package already pinned as a project dependency, so the MCP mirror needs no new dependency

    Lacks:

    • The project's argv translation from the Click command options (_build_command_argv) and the read-only exposure policy (_PATH_PARAM_RESTRICTIONS) that keep --apply and --confirm out of the argv
    • The roadmap due-table row after refine, its weekly interval constant and the first-run-due order
    • The weekly run that writes only the plan file and makes no GitHub change, plus the docs generation that must leave no diff

    Tools considered:

    Searches run:

    • FastMCP Python MCP server framework register tools schema, results: 5
    • expose CLI commands as MCP tools server bridge, results: 5
    • mcp server wrap command line tool argv safe allowlist, results: 5
    • "FastMCP" Model Context Protocol Python, results: 5
    • "mcp" python framework tool schema generation "FastMCP" github, results: 5
    • cli-mcp-server github expose shell commands as MCP tools, results: 5

    Sources:

    Checked on 2026-11-08. A person decides what this means for the item. The check changes no label and closes no issue.

  6. added
    status/ready
    and removed
    status/new
    on Nov 10, 2026
  7. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 699026e (see proposed design in issue body).

  8. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Scope from the project brain plan (2026-11-11)

    This item is child 13 of the project brain plan #4624.

    Problem: this item adds a weekly consolidate row to the due table of the Service run. ADR 0021 moves rows out of the Service pod, and the owner rule of 2026-11-11 forbids a loop in a Service pod. The consolidate step of brain-daily (#4687) runs the judge daily, at most 10 shortlists a run, so the weekly row is obsolete.

    New scope:

    • Keep only the MCP tool roadmap_consolidate. Its argv never holds --apply or --confirm.
    • Remove the weekly row and its acceptance criteria.
    • New title: feat(roadmap): consolidate has a read-only MCP mirror.

    New acceptance criteria:

    • This item names no Service row.
    • Its MCP contract test stays its acceptance.
    • The brain-daily item names this item as related.

    Dependencies: none.

  9. added
    owner/agent
    status/in-progress
    and removed
    status/ready
    on Nov 11, 2026
  10. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  11. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 22:57 UTC

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

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions