Repository navigation
Description
Problem
devops pr create refuses to open a pull request in a repository that does not use the devops-cli conventions. On 2026-11-06 an agent worked in dan-petty/homelab, which has no OpenSpec folder, no Closes #N rule and no CI. The command demanded a Closes #N trailer and an OpenSpec Change: line, and --repo did not skip this. The agent then opened both pull requests with devops gh api and marked them ready with devops pr ready --force.
So the rules of one repository block the use of the tool in another, and the way around them is a raw API call and a force flag. That removes the checks that the tool exists to run.
Expected
The body and Closes checks apply only where the repository uses the convention (for example, it has openspec/config.yaml). For another repository the command opens a plain draft pull request with a valid title, and devops pr ready needs no --force when the repository has no required checks.
Acceptance criteria
- In a repository with no
openspec/config.yaml,devops pr createopens a draft pull request without aCloses #Ntrailer or aChange:line. - In a repository with
openspec/config.yaml, the checks stay as they are. -
devops pr readyon a repository with no required checks needs no--force. - A test covers both repository kinds.
Existing tool considered
None applies: the rule is in this repository's command. The cost is about 150,000 tokens and 1 hour.
Related
#3215 (the jobs build pull request text with pull_form), #1359 (onboard a repository).
Proposed design
Problem statement
The devops pr create command applies the OpenSpec and Closes #N rules to every repository. A repository that does not use these conventions cannot open a pull request without a raw API call. The devops pr ready command also needs --force when the repository has no required checks. The change makes both commands follow the target repository's conventions.
Acceptance criteria
Requirement: Draft pull request in a repository without OpenSpec
devops pr create SHALL open a draft pull request without a Closes #N trailer or a Change: line when the target repository has no openspec/config.yaml.
Scenario: Repository without OpenSpec config
- WHEN the target repository, named by
--repoor by the current checkout, has noopenspec/config.yamlat its default branch and the title passes the existing title check - THEN the command creates a draft pull request whose body has no
Closes #Ntrailer and noChange:line
Requirement: Existing checks in a repository with OpenSpec
devops pr create SHALL keep the existing Closes #N and Change: checks when the target repository has openspec/config.yaml.
Scenario: Repository with OpenSpec config
- WHEN the target repository has
openspec/config.yamlat its default branch and the body lacks the requiredCloses #Ntrailer orChange:line - THEN the command refuses to create the pull request with the existing error message
Requirement: Ready without required checks
devops pr ready SHALL mark a draft pull request ready without --force when the target repository has no required checks.
Scenario: Repository without required checks
- WHEN the target repository has no required checks configured in its rulesets and the draft pull request passes draft readiness
- THEN the command marks the pull request ready and exits successfully without
--force
Requirement: Force guard with required checks
devops pr ready SHALL keep the --force guard when the target repository has a required check that has not passed.
Scenario: Repository with a pending required check
- WHEN the target repository has a required check that has not passed and the command runs without
--force - THEN the command refuses to mark the pull request ready
Requirement: Tests for both repository kinds
The test suite SHALL cover pr create and pr ready for a repository with openspec/config.yaml and for one without it.
Scenario: Offline repository fixtures
- WHEN the tests run with a fake GitHub client for each repository kind
- THEN the tests assert the
pr createbody rules and thepr readyforce behavior for both kinds
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need. The rule is in this repository's command. The written cost is about 150,000 tokens and 1 hour.
Key questions
- Which file decides that the OpenSpec rules apply?: The presence of
openspec/config.yamlat the target repository's default branch decides that the OpenSpec rules apply. (best practice) [sources: openspec/config.yaml, AGENTS.md:9]- Chosen: Presence of
openspec/config.yaml. The issue names this file as the marker, and this repository has it. - Rejected: A new
--openspecflag. It adds a manual step and does not fix the default behavior. - Rejected: The local checkout only. It fails when
--reponames another repository.
- Chosen: Presence of
- Which checks stay for a repository without
openspec/config.yaml?: The command keeps the existing title check and the draft pull request creation. It omits only theCloses #Ntrailer and theChange:line. (best practice) [sources: src/devops_cli/commands/pr.py, src/devops_cli/roadmap/pull_form.py, AGENTS.md:9]- Chosen: Keep the title check and omit the OpenSpec body checks. The issue requires a valid title and a plain draft pull request.
- Rejected: Skip all checks. A malformed title would still create a pull request.
- Rejected: Keep all checks. The repository cannot satisfy the OpenSpec body checks.
- How does
devops pr createread the marker for the target repository?: It readsopenspec/config.yamlfrom the target repository's default branch through the GitHub client, so--repoworks outside a local checkout. (best practice) [sources: src/devops_cli/commands/pr.py, src/devops_cli/roadmap/pull_form.py]- Chosen: Read the file through the GitHub client. It works for the current repository and for a repository named by
--repo. - Rejected: Read the local filesystem. It misses a target repository that is not checked out.
- Rejected: Require a local clone of the target repository. It adds a precondition and does not fix
--repo.
- Chosen: Read the file through the GitHub client. It works for the current repository and for a repository named by
- How does
devops pr readyfind the required checks?: It reads the required checks that the repository rulesets configure for the base branch. An empty list means that the command needs no--force. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md, src/devops_cli/commands/pr.py]- Chosen: Read required checks from the repository rulesets. ADR 0004 says the rulesets hold the required checks.
- Rejected: Treat every pending check as required. A repository with no required checks would still need
--force. - Rejected: Always require
--force. The issue reports this as the defect.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-08: none.
Tool: none found.
Activity
dan-petty commentedon Nov 6, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(pr)scope of the title gives the scope.The tool works for its primary use case, but agents must fall back to raw API calls in other repos, which removes the checks the tool exists to run.It extends the tool to any repository, removing the need for raw gh api workarounds.The change needs a convention-detection gate, conditional skip of two checks, a pr ready fix, and tests for both repo kinds.Both change how devops pr create validates the body, but #3314 handles plan PRs inside a convention repo while this candidate skips checks for repos without openspec/config.yaml.devops-cli-service commentedon Nov 7, 2026
Status set to Ready at 72c52c6 (see proposed design in issue body).
devops-cli-service commentedon Nov 8, 2026
Alternatives check: none
Reason: The searches found no open, maintained tool or library that reads a target repository's conventions (openspec/config.yaml, required checks in its rulesets) and gates
pr createbody checks orpr ready's force flag accordingly; the closest option, drivingghdirectly, is exactly the raw-call workaround the issue says drops the checks the tool exists to run. The rule lives in this repository's owndevops pr createanddevops pr readycommands, so the fix is internal to them.Tool: none found
Lacks:
Closes #NandChange:checks applydevops pr readyskip--forcewhen the repository configures no required checksgh/API call covers the create step only by bypassing the title and body checks entirelySearches run:
Checked on 2026-11-08. A person decides what this means for the item. The check changes no label and closes no issue.
fix(roadmap): stage holds an item where openspec is not set up (#4749)
dan-petty commentedon Nov 12, 2026
It occurred again on 2026-11-12 in
dan-petty/homelab(pull request 19).devops gh pr create --repo dan-petty/homelabrefused with "The body has no lineCloses #<issue>" and "The body has no lineChange:". The repository has no OpenSpec folder and no CI. Also,devops gh pr createhas no--headoption, so a pull request of another repository cannot be opened from the devops-cli checkout. The agent opened the draft withdevops gh api -X POST repos/dan-petty/homelab/pulls, anddevops pr ready 19 --repo dan-petty/homelabrefused with "A check runs: no checks reported" (0 check runs, 0 statuses), so it used--force.dan-petty commentedon Nov 12, 2026
New evidence, 2026-11-12: dan-petty/homelab#19 and dan-petty/homelab#20 were opened with a raw
devops gh api -X POST repos/dan-petty/homelab/pulls, becausedevops pr create --repo dan-petty/homelabrequires theCloses #andChange:lines of devops-cli and has no--headoption.devops pr readyrefused the repo with no checks unless--forcewas given.Please add to the scope: a
--headoption fordevops pr create, and the rules of the target repository (no OpenSpec, maybe no CI) in place of the devops-cli rules.The infra-repo tracker #5120 depends on this item: every homelab item (dan-petty/homelab#8, dan-petty/homelab#21, dan-petty/homelab#22, dan-petty/homelab#23) opens a pull request in a repository with no OpenSpec.
dan-petty commentedon Nov 12, 2026
Seen again on 2026-11-12 with dan-petty/homelab#24.
devops pr ready 24 --repo dan-petty/homelabrefused withA check runs: no checks reported.The repository has no CI.--forcethen marked the pull request ready. The pull request was opened withdevops gh api repos/dan-petty/homelab/pulls -X POST, as this issue describes.fix(pr): pr create fits a repository without openspec
devops-cli-service commentedon Nov 12, 2026
Released in v0.120.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.120.1
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 17:00 UTC