Skip to content

chore(roadmap): Rename openspec label, retitle plan PRs after release #6314

Open

Description

@devops-cli-service

Split from #6007.

Problem New plan titles use docs(spec): plan #, but the repository label is still scope/openspec. Open plan pull requests keep the old title. The label rename is one live GitHub PATCH. The retitle of each open plan pull request is another live write. ## Why deferred The live rename must run after the release that ships the new prefix. A rename before the release breaks label sync and the old readers. This issue waits on that release. ## Acceptance criteria - The repository has the label scope/spec and no label scope/openspec. The issues and pull requests that had scope/openspec keep the mark as scope/spec. - Each open plan pull request whose title starts with docs(openspec): plan # has a title that starts with docs(spec): plan #. - uv run devops gh label sync --dry-run reports no drift. ## Steps 1. Run gh api --method PATCH repos/{owner}/{repo}/labels/scope%2Fopenspec -f new_name=scope/spec once. 2. For each open plan pull request, run gh pr edit <n> --title with the same title and the new prefix. 3. Run uv run devops gh label sync.

Proposed design

Problem statement

Do not run the live writes before the release. New plan titles use docs(spec): plan #, but the remote repository label is still scope/openspec, and open plan pull requests keep the old title. After the release that publishes the new prefix, an agent renames the label in place, retitles each open plan pull request, and proves with the live label sync that the repository has no drift.

Acceptance criteria

Requirement: Label renamed in place

The repository MUST hold the label scope/spec and MUST NOT hold the label scope/openspec after the live rename.

Scenario: The old label is gone

  • WHEN An agent runs uv run devops gh api --method PATCH repos/{owner}/{repo}/labels/scope%2Fopenspec -f new_name=scope/spec and then uv run devops gh api repos/{owner}/{repo}/labels/scope%2Fopenspec.
  • THEN The rename exits 0, and the read exits nonzero with Not Found.

Requirement: Label marks kept

Each issue and pull request that carried scope/openspec MUST carry scope/spec after the rename.

Scenario: A marked item keeps its mark

  • WHEN An agent saves the numbers from uv run devops gh api 'repos/{owner}/{repo}/issues?labels=scope%2Fopenspec&state=all&per_page=100' --paginate --jq '.[].number' before the rename and runs the same read with scope%2Fspec after it.
  • THEN The second read exits 0 and its output holds every saved number.

Requirement: Open plan pull requests retitled

Each open pull request whose title starts with docs(openspec): plan # MUST have a title that starts with docs(spec): plan #.

Scenario: No open plan pull request keeps the old prefix

  • WHEN An agent saves the numbers from uv run devops gh api 'repos/{owner}/{repo}/pulls?state=open&per_page=100' --paginate --jq '.[] | select(.title | startswith("docs(openspec): plan #")) | .number' before the retitles, retitles each saved pull request, and runs the same query after the retitles.
  • THEN The second query exits 0, prints no number, and uv run devops gh api repos/{owner}/{repo}/pulls/<n> --jq .title for each saved number prints a title that starts with docs(spec): plan #.

Requirement: Live sync converges

The live uv run devops gh label sync MUST exit 0 on two consecutive runs after the rename and the retitles.

Scenario: The second live sync shows no drift

  • WHEN An agent runs uv run devops gh label sync twice after the rename and the retitles.
  • THEN Both runs exit 0, and the second run reports no label to create and no label to update.

Existing Tool Considered

No alternatives check has run on this issue. The GitHub CLI (gh, cli/cli, MIT) is open and maintained. It covers the in-place label rename, the list of marked items and open plan pull requests, and the pull request title edit. The repository requires devops gh as its wrapper (AGENTS.md rule 7). It lacks one command that renames a label and retitles matching open pull requests in one pass, so the plan composes the existing commands. The plan builds no code, so it pays no build cost.

Key questions

  • Does the repository at this commit declare the scope/spec label and the docs(spec) plan-title prefix?: Yes. .github/labels.yml declares scope/spec and no scope/openspec. STAGING_TYPE at src/devops_cli/roadmap/stage/stage_change.py:114 reads docs(spec). The plan-check job of .github/workflows/pr-title.yml accepts both docs(spec): plan # and docs(openspec): plan #. [sources: .github/labels.yml, src/devops_cli/roadmap/stage/stage_change.py:114, .github/workflows/pr-title.yml]
  • What color and description does scope/spec hold after the rename?: Keep the values that .github/labels.yml declares, and let the live sync set them. scope/spec has color DCDCD6 and description OpenSpec changes, specs and their checks. (best practice) [sources: .github/labels.yml]
    • Chosen: Keep the declared color and description and let the live sync set them. One declaration in .github/labels.yml is the source, and the sync reads it.
    • Rejected: Send the color and the description in the rename PATCH. It repeats values that .github/labels.yml declares, so the two sources can disagree.
    • Rejected: Keep the old description. The remote label then differs from the declaration on every sync.
  • Which command renames the label in place?: uv run devops gh api --method PATCH repos/{owner}/{repo}/labels/scope%2Fopenspec -f new_name=scope/spec. (best practice) [sources: AGENTS.md, tests/github/test_gh_api_agent_guard.py]
    • Chosen: devops gh api --method PATCH with new_name. AGENTS.md rule 7 requires devops gh, and the test shows label writes remain open to agents.
    • Rejected: Bare gh api --method PATCH. AGENTS.md rule 7 forbids bare gh.
    • Rejected: Delete scope/openspec and create scope/spec. The delete removes the mark from each item, so each item needs a second write.
  • Which command lists the open plan pull requests?: uv run devops gh api 'repos/{owner}/{repo}/pulls?state=open&per_page=100' --paginate --jq '.[] | select(.title | startswith("docs(openspec): plan #")) | .number'. (best practice) [sources: AGENTS.md, tests/github/test_gh_api_agent_guard.py]
    • Chosen: devops gh api with a --jq prefix filter. It compares the literal prefix and needs no search syntax.
    • Rejected: The GitHub search API with in:title. The query syntax must quote # and (.
    • Rejected: gh pr list --search. It is bare gh, which AGENTS.md rule 7 forbids.
  • Which command retitles each open plan pull request?: uv run devops gh api --method PATCH repos/{owner}/{repo}/pulls/<n> -f title='<the same title with docs(spec) in place of docs(openspec)>' for each open plan pull request. (best practice) [sources: AGENTS.md, tests/github/test_gh_api_agent_guard.py, openspec/specs/pull-request-form/spec.md]
    • Chosen: devops gh api --method PATCH on the pull request. AGENTS.md rule 7 requires devops gh, and the test shows PATCH pull routes are open to agents.
    • Rejected: gh pr edit <n> --title. It is bare gh, which AGENTS.md rule 7 forbids.
    • Rejected: devops pr edit <n> --title. No source in this issue shows that command.
  • In what order do the live writes run?: Rename the label first, retitle the open plan pull requests second, and run uv run devops gh label sync last. (best practice) [sources: .github/labels.yml, AGENTS.md]
    • Chosen: Rename, retitle, then run the live sync. The sync reads the declaration in .github/labels.yml and is the no-drift proof only after the rename.
    • Rejected: Run the live sync first. The sync is the no-drift proof, so it must run after the rename and the retitles.
  • Who runs the live rename, the retitles and the live sync?: An agent. The agent uses devops gh, never bare gh. (best practice) [sources: AGENTS.md]
    • Chosen: An agent runs the live writes with devops gh. AGENTS.md gives labels and every non-release command to agents.
    • Rejected: A person runs the live writes. AGENTS.md reserves only merges, secrets, repository settings and hardware to a person.

Fit

Fits in one pull request.

Suspected block

the release-please release that publishes the docs(spec) plan-title prefix and the scope/spec label; the repository at this commit already declares both, so only the published release waits

Dependencies

None.

Activity

  1. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor
  2. added
    priority/p2-medium
    type/chore
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 18, 2026
  3. changed the title [-]chore(roadmap): Rename the openspec scope label and retitle open plan pull requests after release[/-] [+]chore(roadmap): Rename openspec label, retitle plan PRs after release[/+] on Nov 18, 2026
  4. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

    The job shortened the title of this item. The summary had 81 characters, and the limit is 60. The type and the scope stay.

    • Before: chore(roadmap): Rename the openspec scope label and retitle open plan pull requests after release
    • After: chore(roadmap): Rename openspec label, retitle plan PRs after release
    • Source of the summary: the background model
  5. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  6. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  7. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

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

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  9. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See the first point of Open questions and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  10. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  11. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

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/lowpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/chorevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions