Skip to content

feat(openspec): openspec validate, list and show run openspec #5227

Open

Description

@dan-petty

Update 2026-11-26 (infra move): The OpenSpec pin moved to the root package.json.

src/devops_cli/tools_lock/ and tools.lock are gone. The pin is now 2.2.0, not 1.17.0, so record the verb flags again for that version.


Problem or Motivation

The owner asked on 2026-11-12 that a devops command that runs a CLI tool take the names of the tool and pass its arguments through (#5223, ADR 0026). Agents type the verbs of the upstream openspec CLI under devops openspec:

devops has these commands (commands/openspec.py):

  • check: a gate of several runs.
  • archive.
  • regenerate: it runs openspec update --force.
  • new: the project scaffold.

A bare openspec run can send telemetry to edge.openspec.dev, so agents must run it through devops (ADR 0010, openspec/tool.py).

Proposed Solution & Architectural Design

  • devops openspec validate, list, show, status and instructions become read entries of the registry of feat(cli): tool commands pass unknown arguments to the tool #5223. The runner is OpenSpecTool.run (openspec/tool.py), with the isolated XDG_CONFIG_HOME and the telemetry opt-outs. No request goes out.
  • regenerate becomes update. It keeps the set-up of the custom profile and gives the other upstream update arguments to openspec. An OpenSpec version bump uses devops openspec update.
  • archive gives the upstream flags (--skip-specs, --json) to openspec. It keeps --yes. It refuses --no-validate with exit 2, because it validates after the archive.
  • new <issue> stays the project scaffold. Upstream openspec new change <name> has another form, and ADR 0026 lists it as an exception.
  • check stays, because it is a gate of several runs.
  • Use the verbs of the pinned version (the @fission-ai/openspec pin of the root package.json). The premise check runs openspec <verb> --help for each verb through the recording of tests/support/openspec_recording.py and records the flags. build(openspec): move OpenSpec to 2.0.0 and its skill layout #5078 records them again when it moves the pin to 2.0.0.
  • Add the read-only MCP rows openspec validate and openspec list.
  • Add the hint row openspec regenerate to the table of feat(cli): usage errors show a hint for known wrong commands #4860, with the target devops openspec update. Remove the rows openspec validate|list.

Target Subsystem

OpenSpec (devops openspec, src/devops_cli/openspec/).

Existing Tool Considered

The upstream openspec CLI and its verbs. devops adds only the isolated config and the opt-outs. Nothing new is built.

Acceptance Criteria

  • devops openspec validate --all --strict exits with the exit code of openspec. The process stub shows the isolated XDG_CONFIG_HOME and the opt-out variables.
  • devops openspec list --json prints the JSON of openspec.
  • devops openspec update writes the same skills that regenerate wrote. devops openspec regenerate exits 2 with the hint line.
  • devops openspec archive <change> --skip-specs --dry-run prints both argvs and runs none.
  • A test with sockets blocked runs devops openspec validate, and no connection opens.

Dependencies

Merge first: #5223. #5078 is not a dependency: the pinned 1.17.0 has these verbs, and the flags come from the recording. Open the pull request after the pull request of #4855 merges, because both change the generated command reference.

Source: #4833

Alternatives check of 2026-11-29: in-use.
The repository already uses this tool.
Tool: Fission-AI/OpenSpec (https://github.com/Fission-AI/OpenSpec), MIT, last activity 2026-11-29, maintained.
Reason: Searches found no alternative; the already pinned upstream OpenSpec CLI (2.2.0) itself supplies the validate, list, show, status, instructions, update and archive verbs, so devops only needs to pass arguments through its existing runner.

Covers:

  • Upstream read verbs validate, list, show, status and instructions
  • Upstream update and archive verbs with their own flags
  • Init, config profile and update for skill generation
  • JSON output for list and archive

Lacks:

  • No isolated XDG_CONFIG_HOME; devops must set it
  • Telemetry opt-out variables are not built in
  • No read-only MCP rows or hint table entries
  • No gate over all open changes, which devops check keeps

Proposed design

Problem statement

Agents type upstream openspec verbs under devops openspec. The read verbs validate, list, show, status and instructions fail because devops exposes only check, archive, regenerate and new. The change adds pass-through read entries, replaces regenerate with update, passes archive flags, and adds the MCP and hint rows. It keeps the isolated config and telemetry opt-outs.

Acceptance criteria

Requirement: Validate passes through

devops openspec validate SHALL run the pinned openspec CLI with the given arguments through OpenSpecTool.run.

Scenario: Validate passes arguments

  • WHEN A test runs devops openspec validate --all --strict with a process stub.
  • THEN The stub records openspec validate --all --strict and the command exits with the stub's exit code.

Requirement: List prints JSON

devops openspec list --json SHALL print the standard output of openspec unchanged.

Scenario: List returns JSON

  • WHEN A test runs devops openspec list --json with a process stub that returns known JSON.
  • THEN The command prints that JSON and exits 0.

Requirement: Other read verbs pass through

devops openspec show, status and instructions SHALL run the pinned openspec CLI with the given arguments through OpenSpecTool.run.

Scenario: Read verbs pass arguments

  • WHEN A test runs devops openspec show <change>, devops openspec status --change <change> and devops openspec instructions apply --change <change> with a process stub.
  • THEN The stub records each matching openspec argv and each command exits with the stub's exit code.

Requirement: Read entries isolate config

Each read entry SHALL run openspec with an isolated XDG_CONFIG_HOME and the telemetry opt-out variables.

Scenario: Read entries use isolated environment

  • WHEN A test runs devops openspec list --json and devops openspec validate with a process stub.
  • THEN The stub records a temporary XDG_CONFIG_HOME and each telemetry opt-out variable for each run.

Requirement: Update runs openspec

devops openspec update SHALL run openspec update --force after the isolated custom profile set-up and pass the other arguments to openspec update.

Scenario: Update runs upstream update

  • WHEN A test runs devops openspec update --json with a process stub.
  • THEN The stub records openspec update --force --json after the custom profile set-up and the command exits with the stub's exit code.

Requirement: Regenerate is refused

devops openspec regenerate SHALL exit 2 with a hint that names devops openspec update.

Scenario: Regenerate is refused

  • WHEN A test runs devops openspec regenerate.
  • THEN The command exits 2, prints devops openspec update in the hint and records no process.

Requirement: Archive passes flags

devops openspec archive SHALL pass --skip-specs and --json to openspec and keep --yes.

Scenario: Archive passes flags

  • WHEN A test runs devops openspec archive <change> --skip-specs --json with a process stub.
  • THEN The stub records an archive argv that holds <change>, --skip-specs, --json and --yes, and the command exits with the stub's exit code.

Requirement: Archive dry-run shows both argvs

devops openspec archive --dry-run SHALL print the archive argv and the validation argv and MUST run no process.

Scenario: Archive dry-run

  • WHEN A test runs devops openspec archive <change> --skip-specs --dry-run with a process stub.
  • THEN The command prints the archive argv and the validation argv, and the stub records no process.

Requirement: Archive refuses no-validate

devops openspec archive SHALL refuse --no-validate with exit 2.

Scenario: No-validate refused

  • WHEN A test runs devops openspec archive <change> --no-validate.
  • THEN The command exits 2 and the process stub records no process.

Requirement: Read entry opens no socket

A read entry SHALL make no network connection.

Scenario: Sockets blocked

  • WHEN A test with sockets blocked runs devops openspec validate with a process stub.
  • THEN No connection opens and the command exits with the stub's exit code.

Requirement: MCP read rows

The MCP server SHALL expose openspec validate and openspec list as read-only tools.

Scenario: MCP rows are read-only

  • WHEN A test lists the MCP tools.
  • THEN The tools include openspec validate and openspec list, each marked read-only.

Requirement: Hint table updated

The hint table of #4860 SHALL hold the row openspec regenerate -> devops openspec update and no row for openspec validate or openspec list.

Scenario: Hint table updated

Requirement: New remains scaffold

devops openspec new <issue> SHALL remain the project scaffold.

Scenario: New stays scaffold

  • WHEN A test runs devops openspec new <issue> with a process stub.
  • THEN The command runs the project scaffold and records no openspec new change process.

Requirement: Check remains gate

devops openspec check SHALL remain the gate over all open changes.

Scenario: Check stays gate

  • WHEN A test runs devops openspec check with a process stub.
  • THEN The stub records the gate runs over the open changes and the command exits with the gate result.

Existing Tool Considered

The alternatives check of 2026-11-19 in the issue body records in-use for Fission-AI/OpenSpec (MIT, maintained, https://github.com/Fission-AI/OpenSpec). The proposal runs that pinned CLI and supplies what the block says the tool lacks: isolated XDG_CONFIG_HOME, telemetry opt-outs, read-only MCP rows, hint rows and the gate over all open changes.

Key questions

  • Which OpenSpec version does the repository pin?: The root package.json pins @fission-ai/openspec at 2.2.0. The old tools.lock and src/devops_cli/tools_lock/ are gone, so the pin is 2.2.0, not 1.17.0. [sources: package.json]
  • Is build(openspec): move OpenSpec to 2.0.0 and its skill layout #5078 a dependency of this item?: No. The root package.json already pins 2.2.0. The premise of build(openspec): move OpenSpec to 2.0.0 and its skill layout #5078, a move to 2.0.0, is stale. Record the flags of 2.2.0 in this item. [sources: package.json]
  • Does the pinned OpenSpec CLI have the read and update verbs?: The committed skill file names validate, list, show, status, instructions, archive and update. The recording helper records each openspec run. The premise check records the flags of 2.2.0. [sources: .agents/skills/openspec-apply-change/SKILL.md, tests/support/openspec_recording.py, src/devops_cli/openspec/tool.py]
  • How should devops expose the upstream read verbs?: Add them as read entries of the registry of feat(cli): tool commands pass unknown arguments to the tool #5223. Each entry calls OpenSpecTool.run with the given arguments. Do not implement the verbs in devops. (best practice) [sources: src/devops_cli/commands/openspec.py, src/devops_cli/openspec/tool.py, AGENTS.md]
  • Should regenerate stay as an alias of update?: No. Replace regenerate with update. regenerate exits 2 with a hint that names devops openspec update. (best practice) [sources: src/devops_cli/commands/openspec.py, src/devops_cli/openspec/skills.py]
    • Chosen: Replace regenerate with update. It matches the upstream verb and keeps one name for one action.
    • Rejected: Keep regenerate as an alias. It keeps two names for one upstream verb.
  • Should devops openspec archive pass upstream flags?: Yes. Pass --skip-specs and --json to openspec. Keep --yes in the archive argv. (best practice) [sources: src/devops_cli/openspec/archive.py, src/devops_cli/commands/openspec.py]
    • Chosen: Pass upstream flags through. It gives the upstream flags to openspec and keeps the archive wrapper.
    • Rejected: Keep the fixed archive argv. It blocks --skip-specs and --json.
  • Should devops openspec archive refuse --no-validate?: Yes. archive validates after the archive. It refuses --no-validate with exit 2. (best practice) [sources: src/devops_cli/commands/openspec.py, src/devops_cli/openspec/archive.py]
    • Chosen: Refuse --no-validate with exit 2. It keeps the post-archive validation and gives a clear error.
    • Rejected: Pass --no-validate through. It turns off the validation that devops runs after the archive.
  • Should devops openspec new <issue> stay the project scaffold?: Yes. Keep new <issue> as the project scaffold. Upstream openspec new change <name> has another form. (best practice) [sources: src/devops_cli/commands/openspec.py, src/devops_cli/openspec/scaffold.py]
    • Chosen: Keep new as scaffold. It keeps the project form and the upstream new change form apart.
    • Rejected: Map new to upstream openspec new change. It changes the scaffold form and breaks the existing command.
  • Should devops openspec check stay as a separate command?: Yes. check runs a gate of several runs. It is not one upstream verb. (best practice) [sources: src/devops_cli/commands/openspec.py, src/devops_cli/openspec/gate.py]
    • Chosen: Keep check as a gate. It keeps the gate over all open changes.
    • Rejected: Replace check with a pass-through read entry. It would remove the gate over all open changes.
  • Should the MCP rows for openspec validate and openspec list be read-only?: Yes. Both commands only read. Add both rows as read-only MCP tools. (best practice) [sources: src/devops_cli/commands/openspec.py, tests/ai/mcp/test_mcp_read_only_write_options.py]
    • Chosen: Mark both rows read-only. Both commands only read and must not write.
    • Rejected: Expose the rows as write tools. It gives write permission to a read-only command.
  • Should the read entries and update use the isolated environment?: Yes. Every run uses isolated_openspec and OpenSpecTool.run. They set the telemetry opt-outs and a temporary XDG_CONFIG_HOME. (best practice) [sources: src/devops_cli/openspec/tool.py, src/devops_cli/commands/openspec.py]
    • Chosen: Use the isolated environment. It keeps telemetry off and keeps a developer profile out of the run.
    • Rejected: Run openspec with the caller environment. It can send telemetry and use the developer profile.

Fit

Fits in one pull request.

Suspected block

None.
The item is in a dependency cycle: #5227 → #5232 → #5228 → #5227. A person removes one edge of the cycle, so that its items no longer wait on each other.

Dependencies

#5223, #4855

Activity

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

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    New evidence of 2026-11-13 (review of failing CLI calls). The failure is a quality risk, not only a cost: half of the agents do not run the plan check after the error.

    • Claude Code transcripts, 2026-10-24 to 2026-11-12: openspec validate 60 errors in 60 agents and 18 sessions, openspec list 19, openspec check <change> with an extra argument 9 (88 errors, 20 sessions).
    • Only 26 of 52 Claude Code validate errors had a retry in the same group within 3 calls. The other agents left the devops path or did not run the check.
    • Help requests: openspec --help 446, openspec new --help 126 since 2026-11-08.
    • Local usage-error ledger, 28 hours to 2026-11-13: openspec validate 3, with no Click suggestion.
    • The implement runner: openspec --version was refused, because openspec is not a program of the step shell.

    Scope point: agents give a change name to devops openspec check, because upstream openspec validate <change> takes one. check() takes no argument (src/devops_cli/commands/openspec.py, line 29). I propose that openspec check takes an optional change name and checks only that change. If the item does not add it, the error says "check takes no change name; it checks all open changes".

    Interim step: until this item merges, the hint table of #4860 maps openspec validate to devops openspec check.

    Measure: unknown_command records for openspec validate and openspec list go to 0 in the 7 days after the release, and the share of agents that run a passing openspec check after the first try goes up.

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

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 90a3d2a 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.

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

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (7)

    Tools considered:

    Searches run:

    • openspec validate list show archive commands CLI documentation, results: 5
    • openspec CLI spec-driven development GitHub repository, results: 5
    • "openspec" npm package Fission-AI spec-driven, results: 5
    • openspec.dev CLI tool for spec changes validate --strict, results: 5
    • Fission-AI OpenSpec github npm openspec CLI, results: 5
    • OpenSpec Fission-AI slash commands validate archive change proposal, results: 5
    • edge.openspec.dev telemetry opt out environment variable, results: 5

    Sources:

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

    @devops-cli-service
    Contributor

    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/mediumpriority/p2-mediumscope/openspecsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions