Skip to content

fix(openspec): new and archive ignore the working repository #7312

Not planned

Description

@dan-petty

Problem

devops openspec new and devops openspec archive work on the devops-cli checkout when a person or an agent runs them from the checkout of another repository with the devcontainer install of devops-cli.

Evidence (2026-11-26, devops-cli 0.222.0, working directory = a git worktree of dan-petty/danielpetty.com, command /workspaces/devops-cli/.venv/bin/devops):

  • devops openspec new 93 --repo dan-petty/danielpetty.com --title "..." printed Created openspec/changes/93-give-the-rule-of-a-user on branch main. The folder was in /workspaces/devops-cli/openspec/changes/, and the worktree of the other repository had no new file. The option --repo did not change the place.
  • devops openspec archive 93-give-the-rule-of-a-user from the same worktree stopped with Change '93-give-the-rule-of-a-user' not found. Available changes: 1327-infra-commands-edge-fakes, ...: it listed the changes of devops-cli.

Effect: the file AGENTS.md that devops repos onboard gives to a repository tells the agent to plan each item as an OpenSpec change and to archive it with devops openspec archive <change>. From the devcontainer, that command cannot do it for the other repository. The scaffold also leaves an untracked folder in the devops-cli checkout.

Workaround used: move the scaffold folder into the other checkout, and run openspec archive <change> --yes and openspec validate --all --strict there with the opt-out environment of devops_cli.openspec.tool.

Expected

The two commands work on the repository of the working directory (its git root), or stop with a message when that repository has no openspec/config.yaml.

Acceptance

  • From a checkout of another repository that has openspec/config.yaml, devops openspec new <issue> writes the folder into that checkout, and devops openspec archive <change> archives it there.

Activity

  1. added
    type/bug
    on Nov 26, 2026
  2. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor
    • Scope: none. The title has the scope openspec, and .github/labels.yml declares no scope/openspec label. Add the label to the file to give the scope to this item.
    • Possible duplicate: fix(openspec): write the change of the checkout in use #7311, which may ask for the same change. The model names devops openspec new and devops openspec archive operate on the working directory's repository instead of the devops-cli checkout as the change that both ask for. Both items ask for the same fix: the two commands must target the working directory's repository rather than the devops-cli checkout. A person closes one of the two if that is so.
  3. added
    source/agent
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 26, 2026
  4. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor

    Duplicate of #7311, which another session filed 13 minutes before this item with the same defect. The evidence of this item is in a comment on #7311.

  5. removed
    status/new
    on Nov 26, 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

    effort/mediumpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions