Skip to content

feat(roadmap): onboard a repository that lacks a project dependency #4664

Done

Description

@dan-petty

Update 2026-11-26 (infra move): devops repos onboard (ADR 0035) replaced devops roadmap onboard.

The module is src/devops_cli/github/onboard/. The project kit is the Copier template of dan-petty/infra (templates/repository/).


Problem or Motivation

Owner decision 1 (2026-11-11): all Service rows, stage and implement too, run on all 7 repositories, with no row allowlist. A row in a repository that lacks a project-management dependency fails or does wrong work:

devops repos onboard (#6773) finds these, but only when a person runs it. No Service row runs the check, so a missing dependency shows only as a failed job.

Proposed Solution & Architectural Design

Target Subsystem

SDLC, Git & PR Governance (the Service rows and src/devops_cli/github/onboard/).

Existing Tool Considered

Copier (copier copy and copier check-update) gives the files and finds an old kit. The GitHub REST API creates the labels, the issue and the pull request. GitHub template repositories work only when a repository is created, and the Probot Settings app needs a file in each repository first. Cost of the row: about 120 lines and 5 tests, about 400,000 tokens and 4 hours to build, about 10,000 tokens a month to keep.

Acceptance Criteria

  • A test with the git and HTTP fakes: for a repository with no openspec/config.yaml, the row opens 1 onboarding issue and 1 pull request, and a second round sends no write.
  • A test: for a repository where every row is present, the row sends no write.
  • A test: the onboarding issue lists each missing dependency and each step for a person, and no secret.
  • uv run devops roadmap explain <n> --repo <owner/name> names the onboarding issue when the stage holds an item for a missing dependency.
  • After the rollout, each of the 6 other repositories has 1 open onboarding pull request or every row present.

Dependencies

#4629, #4652, #4660, #4648, #3753 (the kit) and #3775 (the onboarding pipeline, with #3770, #3771 and #3772).

Source: #4627

Alternatives check of 2026-11-26: in-use.
The repository already uses this tool.
Tool: copier-org/copier (https://github.com/copier-org/copier), MIT, last activity 2026-11-25, maintained.
Reason: Searches found Copier, the template renderer the issue already names for the kit, with skip_if_exists to keep existing files and check-update to find a stale copy; it covers only the kit render, not the dependency checks or GitHub writes.

Covers:

  • Renders the project kit from a template with detected answers
  • Skips files that already exist via skip_if_exists
  • Finds a missing or stale kit copy

Lacks:

  • Checks for profile, OpenSpec, AGENTS.md, labels, toolchain, webhook, RAG index
  • Creates labels through REST and opens the onboarding issue and pull request
  • Once-only guard, person-step list and the Service row with the explain link

Proposed design

Problem statement

Owner decision 1 runs every Service row on all 7 repositories. Six of the 6 other repositories lack the project files and labels that the rows need. The stage holds their items, implement uses the neutral preset, and the workflow labels are missing. devops repos onboard finds and writes these, but only when a person runs it. The change adds a Service row that runs the read-only onboarding rows for each repository. The row opens one onboarding issue, creates the missing labels and opens one template pull request.

Acceptance criteria

Requirement: Onboard row runs for each managed repository

The Service SHALL run the onboard row once for each repository in service.repos in each round.

Scenario: A round with two managed repositories

  • WHEN the due table runs the onboard row with service.repos set to two repositories and the git and HTTP fakes
  • THEN the row runs once for each repository and the outcome holds one report for each repository.

Requirement: Report names a missing project file

The onboard row SHALL name each missing dependency that the read-only rows of onboard_repository find.

Scenario: A default branch with no openspec/config.yaml

  • WHEN the onboard row runs with the git fake whose default branch lacks openspec/config.yaml and the template holds the file
  • THEN the report names openspec/config.yaml as a missing dependency.

Requirement: Missing dependency opens one onboarding issue

The onboard row SHALL open one onboarding issue in a repository when a read-only row is missing and no open issue holds the onboarding marker.

Scenario: A repository with no open onboarding issue

  • WHEN the row finds a missing row and the HTTP fake returns no open issue with the onboarding marker
  • THEN the fake GitHub gets 1 POST /repos/{repo}/issues.

Requirement: Later round updates the one onboarding issue

The onboard row SHALL update the open onboarding issue when the missing rows change and MUST NOT open a second issue.

Scenario: A second round with a changed missing row

  • WHEN the row runs again and the missing rows differ from the body of the open onboarding issue
  • THEN the fake GitHub gets 1 PATCH /repos/{repo}/issues/{n} and no POST /repos/{repo}/issues.

Requirement: Issue lists dependencies and person steps and no secret

The onboarding issue body MUST list each missing dependency and each step that only a person can do, and MUST hold no secret value.

Scenario: An issue for two missing rows and one person step

  • WHEN the row writes the onboarding issue with the HTTP fake
  • THEN the body names the 2 missing rows and the person step, and holds no token, key or secret value.

Requirement: Write path creates labels and one template pull request

The onboard row SHALL run the write path of onboard_repository with confirm=True, create each missing workflow label through REST and open one draft template pull request.

Scenario: A repository with missing labels and no template pull request

  • WHEN the row runs the write path with the HTTP fake
  • THEN the fake GitHub gets one POST /repos/{repo}/labels for each missing label and 1 POST /repos/{repo}/pulls whose body holds draft: true.

Requirement: Template pull request adds only missing files

The template pull request MUST NOT overwrite a file that the default branch holds with other text.

Scenario: A default branch that holds AGENTS.md with other text

  • WHEN the row opens the template pull request and the default branch holds AGENTS.md with other text
  • THEN the commit on the template branch holds no AGENTS.md path and the report lists AGENTS.md as kept.

Requirement: The row does not poll the template pull request checks

The onboard row MUST NOT read or wait for the check runs of the template pull request.

Scenario: A template pull request with no check answer

  • WHEN the row runs the write path with the HTTP fake and the fake returns no check run for the head
  • THEN the row returns with the draft pull request open and sends no request to the check runs or the commit status of the head.

Requirement: The row changes no repository setting and merges nothing

The onboard row MUST NOT write a repository setting, a ruleset or a merge.

Scenario: A baseline that differs in a setting and in the ruleset

  • WHEN the row runs the write path with the HTTP fake and the baseline differs in a repository setting and in the main ruleset
  • THEN the fake GitHub gets no PATCH /repos/{repo}, no ruleset request and no merge mutation.

Requirement: A complete repository sends no write

The onboard row SHALL send no write when every read-only row is present.

Scenario: A repository where every row is present

  • WHEN the row runs with the HTTP fake and every read-only row is present
  • THEN the fake GitHub gets no POST, PATCH, PUT or DELETE request.

Requirement: Second round with no change sends no write

The onboard row SHALL send no write on a second round when no row changed.

Scenario: A second round with the same rows

  • WHEN the row runs a second time and the missing rows equal the body of the open onboarding issue
  • THEN the fake GitHub gets no POST, PATCH, PUT or DELETE request.

Requirement: explain names the onboarding issue

devops roadmap explain SHALL name the open onboarding issue of the repository when the stage holds an item for a missing dependency.

Scenario: The stage holds an item for a missing openspec/config.yaml

  • WHEN the explain command runs with a fake store that holds a held item and an open onboarding issue
  • THEN the output holds the number of the open onboarding issue.

Requirement: Pending a person after the merge

After the merge, a person MUST merge each onboarding pull request and MUST confirm that each repository in service.repos has every read-only row present or 1 open onboarding pull request.

Scenario: The live rollout check

  • WHEN a person runs uv run devops repos onboard --confirm in a repository of service.repos after the merge
  • THEN the command reports each read-only row present, or the repository holds 1 open onboarding pull request that the person merges.

Existing Tool Considered

Alternatives check of 2026-11-26: in-use. The tool is copier-org/copier (MIT, maintained). The block of the check in the issue body lists what Copier covers and what it lacks. The change builds no renderer: the row runs the copier program through onboard_repository (src/devops_cli/github/onboard/run.py). The row adds the parts that Copier lacks: the read-only dependency checks, the label writes through REST, the one onboarding issue, the one template pull request, the once-only guard and the explain link. Written cost of the row: about 120 lines and 5 tests, about 400,000 tokens and 4 hours to build, and about 10,000 tokens a month to keep.

Key questions

  • Which command already owns the onboarding rows, and does the change add a second onboarding module?: devops repos onboard owns the rows (ADR 0035). onboard_repository in src/devops_cli/github/onboard/run.py runs them with OnboardOptions (src/devops_cli/github/onboard/model.py:95). The change adds no second onboarding module: the onboard Service row calls onboard_repository. The kit is a Copier template of dan-petty/infra, and the command reads its ref at run time. [sources: src/devops_cli/github/onboard/run.py, src/devops_cli/github/onboard/model.py:95, src/devops_cli/github/onboard/service_rows.py, docs/repos/onboard.md]
  • Where does the onboard Service row live?: Add a JobRow named onboard to STATUS_LANE_ROWS in src/devops_cli/roadmap/run.py:1211. The row calls onboard_repository once for each repository in service.repos. (best practice) [sources: src/devops_cli/roadmap/run.py:1211, src/devops_cli/roadmap/run.py:263, src/devops_cli/github/onboard/run.py, docs/repos/onboard.md]
    • Chosen: A JobRow in STATUS_LANE_ROWS that calls onboard_repository. The due table already runs each row for each repository, and onboard_repository is the one code path of the command.
    • Rejected: A second onboarding module under src/devops_cli/roadmap/. It copies the rows of onboard_repository, and the two copies drift.
    • Rejected: A subprocess call of devops repos onboard. The row holds the session and the settings in process, and the call gives the same result with more failure modes.
  • Which writes does the row make, and does it wait for the checks of the pull request?: The label row and the template pull request row only, with confirm=True and no check wait. A person changes a repository setting and merges a pull request (AGENTS.md). (best practice) [sources: AGENTS.md, src/devops_cli/github/onboard/model.py:95, src/devops_cli/github/onboard/template_pr.py, docs/repos/onboard.md]
    • Chosen: The labels and the template pull request, with no check wait. These two writes start the onboarding, and the round never blocks on the checks of the pull request.
    • Rejected: Every row with confirm=True. It writes repository settings and merges a pull request, which only a person does.
    • Rejected: Plan only. It creates no label and no pull request, which the issue requires.
    • Rejected: The labels and the template pull request, with a check wait. The round blocks for each repository, and the lane runs its rows in order.
  • How does the row keep one onboarding issue and one template pull request across rounds?: The issue body holds a fixed hidden marker, and the row updates the one open issue that holds it. The row finds the template pull request by its fixed branch (src/devops_cli/github/onboard/template_pr.py). A round with no change writes nothing. (best practice) [sources: src/devops_cli/github/onboard/template_pr.py, CONTEXT.md, docs/repos/onboard.md]
    • Chosen: A fixed marker in the issue body and the fixed template branch. GitHub state is the first marker of a roadmap step, and the template branch is already the one open pull request of the command.
    • Rejected: A state file in the repository. The repositories lack the project files, and the issue says the status clear needs no file in the repository.
    • Rejected: A Valkey key alone. A due mark has a TTL and is never the only copy of a decision.
  • Which tool renders the project kit, and what keeps a file that exists?: The copier program, run by onboard_repository. The template pull request keeps a file that exists because _file_states compares each rendered file with the default branch and adds only a path that the branch lacks. (best practice) [sources: docs/repos/onboard.md, src/devops_cli/github/onboard/template_pr.py, src/devops_cli/github/onboard/baseline.py]
    • Chosen: The copier program with the _file_states guard. The project already runs the program, and the guard keeps each file that the default branch holds.
    • Rejected: Import the Copier library. The library needs the GPL3 jinja2-ansible-filters, which the project refuses.
    • Rejected: A hand-written renderer. It rebuilds what Copier already does and must track the kit by hand.
    • Rejected: GitHub template repositories. They work only when a repository is created, and the 6 repositories exist.
  • How does devops roadmap explain name the onboarding issue?: explain reads the one open issue of the repository with the onboarding marker through the store and prints its number beside the hold reason. It writes nothing and calls no model. (best practice) [sources: src/devops_cli/roadmap/explain.py, src/devops_cli/commands/roadmap.py, src/devops_cli/roadmap/run.py:1211]
    • Chosen: Read the open onboarding issue by the marker. explain already reads GitHub through the store and writes nothing.
    • Rejected: Print no issue number. The issue requires that explain names the onboarding issue.
  • What does the row do when a read-only row cannot read the baseline, such as a runner with no copier program?: It lists the not readable row and the person step uv tool install copier in the onboarding issue, and sends no write. It does not fail the row. (best practice) [sources: docs/repos/onboard.md, src/devops_cli/github/onboard/model.py:95]
    • Chosen: An issue with the person step and no write. The issue exists because a missing dependency shows only as a failed job, and the read that fails has a step that a person does.
    • Rejected: Fail the row. It repeats the failure that the issue removes, and no issue tells the person what to do.
    • Rejected: Skip the repository with no issue. A person would see nothing about the repository.
  • What does the row do for a missing dependency that no onboarding row writes?: It lists the dependency as a person step in the onboarding issue. The row writes no file to the default branch, because RouteWriter refuses a route that its table does not hold. (best practice) [sources: src/devops_cli/github/onboard/routes.py:4, src/devops_cli/github/onboard/routes.py:401, docs/repos/onboard.md]
    • Chosen: A person step in the onboarding issue. The row sends every write through RouteWriter, and a person adds the file to the template.
    • Rejected: Write the file to the default branch. RouteWriter refuses a route that its table does not hold.
    • Rejected: Ignore the file. The item stays held with no step that ends the hold.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Moved to new items

#7274

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 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. A planned feature from an owner decision that enables automated onboarding, not a blocking defect.
    • Value: High. Prevents failed Service jobs in 6 repositories and automates a multi-step manual process.
    • Effort: Medium. The body estimates about 120 lines, 5 tests, and 4 hours to build.
    • Related: feat(roadmap): onboard sets up openspec in a repository #3770, which asks for a different change. Both add onboard rows for a repository, but #3770 is one row (openspec setup) while the candidate is the Service row that runs all rows and starts the write path.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: Searches for a tool that detects and repairs the missing per-repository dependencies found nothing that does the whole job; the closest is Copier, the maintained MIT project-template tool that the issue itself names and that the existing devops roadmap onboard rows already run (copier check-update). Copier covers rendering the project kit's files and finding an out-of-date copy, but not the other missing dependencies, the GitHub label/issue/PR writes, or the Service row, so the issue still has to be built.

    The item already names this tool.

    Tool: copier-org/copier (https://github.com/copier-org/copier)

    • License: MIT
    • Last activity: 2026-11-06
    • Maintained: yes

    Covers:

    • Renders a project template's files into an existing repository (copier copy), which is the write path the row needs for the project kit
    • Finds a repository whose copy of the template is behind or missing (copier check-update), which the issue lists as an existing read-only row
    • Leaves files that already exist untouched (_skip_if_exists), matching the rule that the pull request never overwrites a file

    Lacks:

    • No check for the other dependencies: the .devops/roadmap.toml preset, openspec/config.yaml, AGENTS.md, the workflow labels, the toolchain preset, the webhook or the RAG index
    • No GitHub writes: it cannot create the missing labels through REST, open or update the single onboarding issue, or open the onboarding pull request
    • No list of the steps that only a person can do, and no once-only guard so that a second round sends no write
    • No Service row that runs the check on each repository in service.repos, and no devops roadmap explain link to the onboarding issue

    Tools considered:

    Searches run:

    • automate repository onoarding missing config files create labels open pull request tool, results: 5
    • Copier project template check-update copier copy tool, results: 5
    • repolinter check missing repository files labels across repositories bot, results: 5
    • copier check-update copier copy project template update python, results: 5
    • copier _skip_if_exists copier.yml documentation, results: 5
    • tool scaffold files into existing repositories and open pull request onboarding checkup, results: 5

    Sources:

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

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

    @devops-cli-service
    Contributor

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

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: src/devops_cli/roadmap/onboard.py, src/devops_cli/roadmap/workflow_labels.py.

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

    @devops-cli-service
    Contributor

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

  8. added
    status/ready
    and removed
    status/new
    on Nov 26, 2026
  9. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.

  10. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 29, 2026
  11. removed
    status/in-review
    on Nov 29, 2026
  12. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-29 16:50 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/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions