Skip to content

feat(roadmap): one pipeline onboards a service repository #3775

Not planned
6 of 7 issues completed
Not planned

Description

@dan-petty

Problem

A person who adds a repository to the roadmap Service finds out what is missing one failure at a time: a job fails, the person reads the log, fixes one thing, and waits for the next failure. The work is spread over many issues, with no order and no single owner of the whole path. This item tracks the path. Its sub-issues deliver the parts.

Expected

One command, devops roadmap onboard [--repo owner/name] [--confirm], takes a repository from "added" to "managed". It checks every prerequisite, does what is safe to do, opens one pull request for the files, and prints each step that only a person can do. A second run changes nothing.

The pipeline, in order

Step What Issue
1. Check One row for each prerequisite, each present, missing or not readable with the reason. Create the missing labels. #1359
2. GitHub files .github/labels.yml and .github/workflows/clear-status.yml, through a pull request when the default branch is protected. #3742
3. GitHub webhook A row for the webhook of the Service router. Printed step only. #3772
4. OpenSpec openspec/config.yaml from a generic template, and openspec/specs/, in the same pull request as step 2. #3770
5. RAG ingestion The repository is in the pass, its points are in both collections under owner/name, and the schedule covers it. The first pass runs for that repository. #3771, with #1389 (the pass) and #1653 (the schedule)
6. Check again Every row reads present, or has a printed step for a person. #1359

devops pr create must also open a pull request in a repository that has no OpenSpec folder yet (#3767), because step 4 starts there.

Steps that stay with a person (the command prints them)

  • Turn on issues, and the rules of the default branch: repository settings.
  • Install the App on the repository: the installation page.
  • Create the webhook and its secret, and devops config set service.webhook_secrets.
  • Add the repository to service.repos in config.yaml, then devops k8s deploy-stack. The command never writes config.yaml.
  • Merge the onboarding pull request.

Acceptance criteria

  • On a scratch repository that has none of the prerequisites, one devops roadmap onboard --confirm ends with every row present or with a printed step for a person. A test runs this with the git and HTTP fakes.
  • A second run sends no write.
  • --dry-run makes no request (it lists the requests that it would make).
  • docs/roadmap/onboard.md describes the whole path in the order above, and names each step that stays with a person.
  • Each sub-issue above is closed.

Existing tool considered

The pipeline is one command that uses the parts above; it adds no scheduler or workflow engine. The openspec CLI is used where it fits (#3770).

Possible duplicates (a person decides; nothing is closed here)

Related

#1359, #3742, #3753, #3767, #3770, #3771, #3772, #1389, #1653, #3589.

Alternatives check of 2026-11-25: in-use.
The repository already uses this tool.
Tool: cli/cli (https://github.com/cli/cli), MIT, last activity 2026-11-24, maintained.
Reason: Searches and repository facts found the gh CLI, which already does the GitHub-side writes of the pipeline, but nothing open runs the ordered prerequisite check, the dry-run plan, the RAG pass and idempotent orchestration in one command.

Covers:

  • Creates the missing labels from a labels file
  • Opens one pull request with the repository files
  • Reads repository settings and webhook state through the API

Lacks:

  • No ordered pipeline with present, missing or not readable rows
  • No request-plan dry run that lists writes and person steps
  • No RAG ingestion into both collections under owner/name
  • No idempotent orchestration across labels, pull request and RAG

Proposed design

Problem statement

A person who adds a repository to the roadmap Service finds each missing prerequisite one failure at a time. The work has no order and no single owner. This change completes the existing devops roadmap onboard command. The command checks every prerequisite, creates the missing labels, opens one pull request with the repository files, runs the first RAG pass, and prints each step that stays with a person. A second run sends no write.

Acceptance criteria

Requirement: Onboarding reports every prerequisite

devops roadmap onboard SHALL print one row for each prerequisite in pipeline order, and each row SHALL read present, missing or not readable with a reason.

Scenario: Missing labels on a scratch repository

  • WHEN the fake repository has no labels and the command runs without --confirm
  • THEN the labels row reads missing, names the absent labels, and the fake records no write request

Requirement: Onboarding creates the missing labels

devops roadmap onboard --confirm SHALL create each missing label of .github/labels.yml through the create-only onboarding path and SHALL NOT patch or delete an existing label.

Scenario: Create labels on a scratch repository

  • WHEN the fake repository has no labels and the command runs with --confirm
  • THEN the fake repository receives the labels of .github/labels.yml and the labels row reads present

Requirement: Onboarding opens one pull request for the repository files

devops roadmap onboard --confirm SHALL open one pull request with devops pr create that adds .github/labels.yml, .github/workflows/clear-status.yml, openspec/config.yaml and a spec under openspec/specs/, and SHALL NOT push to the default branch.

Scenario: Protected default branch with no OpenSpec folder

  • WHEN the fake repository has a protected default branch and no OpenSpec folder, and the command runs with --confirm
  • THEN the fake records one pull request with those four paths and no push to the default branch

Requirement: Onboarding prints the webhook step

devops roadmap onboard SHALL print a person step for the Service webhook and its secret, and SHALL NOT create the webhook.

Scenario: Webhook is absent

  • WHEN the fake repository has no Service webhook and the command runs with --confirm
  • THEN the webhook row reads missing, the output names the webhook secret and devops config set service.webhook_secrets, and the fake records no webhook write

Requirement: Onboarding runs the first RAG pass

devops roadmap onboard --confirm SHALL run the existing devops ai rag ingest pass for the repository when service.repos lists it, and SHALL print the service.repos step when it does not.

Scenario: RAG state is absent and service.repos lists the repository

  • WHEN the fake RAG service holds no entry for the repository, service.repos lists owner/name, and the command runs with --confirm
  • THEN the fake records one ingest run for owner/name, both the code and docs collections hold its points, and the RAG row reads present

Requirement: Onboarding never writes service configuration

devops roadmap onboard SHALL NOT write config.yaml and SHALL print the service.repos edit and the devops k8s deploy-stack step for a person.

Scenario: Repository is absent from service.repos

  • WHEN the fake configuration has no entry for the repository and the command runs with --confirm
  • THEN config.yaml is unchanged and the output prints the service.repos edit and the devops k8s deploy-stack step

Requirement: Onboarding is idempotent

A second devops roadmap onboard --confirm SHALL send no write request.

Scenario: Second run after a successful first run

  • WHEN the command runs with --confirm a second time on the same fake repository
  • THEN the fake records zero write requests

Requirement: Onboarding dry run sends no request

devops roadmap onboard --dry-run SHALL send no request and SHALL list every request that a confirm run would send.

Scenario: Dry run on a scratch repository

  • WHEN the command runs with --dry-run on a fake repository with missing prerequisites
  • THEN the fake records zero requests and the output lists the label, pull request and RAG requests and the person steps of a confirm run

Requirement: Onboarding ends with present rows or person steps

devops roadmap onboard --confirm SHALL end with every row present or with a printed step for a person.

Scenario: Scratch repository with no prerequisites

  • WHEN the command runs with --confirm on a fake repository that has no prerequisites
  • THEN every row reads present or has a printed person step, and no row reads missing or not readable without a printed step

Requirement: Onboarding selects the repository

devops roadmap onboard SHALL use --repo owner/name when given and SHALL default to the repository of the current checkout.

Scenario: Repository override

  • WHEN the command runs with --repo owner/name in a checkout of another repository
  • THEN every request names owner/name and no request names the checkout repository

Requirement: Onboarding prints every person step

devops roadmap onboard SHALL print each step that only a person can do: repository settings, App installation, the Service webhook and its secret, the service.repos edit with devops k8s deploy-stack, and the merge of the onboarding pull request.

Scenario: Person steps on a scratch repository

  • WHEN the fake repository has no prerequisites and the command runs with --confirm
  • THEN the output names each person step and the command changes no repository setting and installs no App

Requirement: Onboarding documentation describes the path

docs/roadmap/onboard.md SHALL describe the onboarding path in pipeline order, SHALL name each step that stays with a person, and SHALL stay linked from docs/index.md.

Scenario: Documentation inventory check

  • WHEN the documentation check runs
  • THEN docs/roadmap/onboard.md lists the rows in order with the person steps and docs/index.md links it

Existing Tool Considered

The open, maintained gh CLI (cli/cli, MIT, last activity 2026-11-07), reached through devops gh, covers the GitHub part of the need: it creates the labels, opens the one pull request with the repository files, and reads repository settings and webhook state through gh api. The open, maintained openspec CLI (Fission-AI/OpenSpec, MIT, last activity 2026-11-07) covers the spec files. The gh CLI lacks one command that runs the pipeline steps in order, one present/missing/not readable row per prerequisite, a request-plan --dry-run that lists the label, pull request and RAG requests plus the person steps, the printed person steps, RAG ingestion into both collections under owner/name, and idempotent orchestration across the label creation, the pull request and the RAG pass. The change composes these tools in a thin command and builds no scheduler or workflow engine. The written cost is about 8,000 tokens to build the command and its tests, about 2,000 tokens for each later fix, about 1,000 tokens a month to keep, and about 2 days elapsed.

Key questions

  • Should devops roadmap onboard write config.yaml when the repository is absent from service.repos?: No. AGENTS.md:12 forbids a change to config.yaml, and docs/roadmap/onboard.md says that the command never edits the file. The command prints the service.repos edit and the devops k8s deploy-stack step. The RAG pass refuses a repository that service.repos does not list, so the RAG step waits for the person's edit. (best practice) [sources: AGENTS.md:12, docs/roadmap/onboard.md, openspec/specs/rag-ingest/spec.md]
    • Chosen: Print the step. The project rule forbids the write, and the command leaves a service setting with the person who owns it.
    • Rejected: Write config.yaml. AGENTS.md:12 forbids the write, and the RAG pass refuses a repository that service.repos does not list.
  • How does the command make a second run send no write?: It reads each prerequisite first and skips a write when the state is present. It reuses an open onboarding pull request in place of a second one. The request plan holds the reads before the writes, so the run and its plan agree. (best practice) [sources: src/devops_cli/roadmap/request_plan.py, src/devops_cli/commands/roadmap.py:1085]
    • Chosen: Read before write. A present state needs no write, so a second run sends none.
    • Rejected: Unconditional sync. It sends writes on every run and breaks the no-write criterion.
  • Which existing path creates the labels that .github/labels.yml declares?: devops gh labels sync creates a missing label, but it also edits a differing label through edit_label, so the onboarding step must not call it as it is. The step reuses apply_onboarding, which posts only the missing labels and keeps a differing label. (best practice) [sources: src/devops_cli/github/labels.py:151, src/devops_cli/github/client.py:767, src/devops_cli/commands/roadmap.py:1085]
    • Chosen: Reuse the create-only onboarding path. apply_onboarding posts only the missing labels and keeps a differing label, which meets the no-patch rule.
    • Rejected: Call devops gh labels sync. It also edits a differing label through edit_label, which the no-patch requirement forbids.
  • Which files does the onboarding pull request add?: One pull request adds .github/labels.yml, .github/workflows/clear-status.yml, openspec/config.yaml and a spec under openspec/specs/. The body puts the GitHub files and the OpenSpec files in one pull request, and the pipeline checks the status workflow as a prerequisite. (best practice) [sources: .github/labels.yml, .github/workflows/clear-status.yml, openspec/config.yaml, docs/roadmap/onboard.md]
    • Chosen: One pull request for the four paths. The body puts the GitHub and OpenSpec files in one pull request, and one change keeps one review.
    • Rejected: One pull request for each step. It adds review load and splits one protected-branch change.
  • How does the command handle the Service webhook?: It prints a person step and does not create the webhook. The step names the secret and devops config set service.webhook_secrets. (best practice) [sources: k8s/README.md, docs/roadmap/onboard.md]
    • Chosen: Print the webhook step. The secret is a person secret, and the command must not set it.
    • Rejected: Create the webhook through the API. The command would need the secret, which a person sets with devops config set service.webhook_secrets.
  • How does the command handle RAG ingestion?: It calls the existing devops ai rag ingest pass for the repository once service.repos lists it. It prints the service.repos edit and the devops k8s deploy-stack step when it does not. The command adds no new indexer and no schedule; the schedule is feat(k8s): Add an Argo workflow to keep the RAG index current #1653. (best practice) [sources: openspec/specs/rag-ingest/spec.md, docs/roadmap/onboard.md]
  • What does --dry-run do?: It sends no request, reads included, and lists every request that a confirm run would send, with the person steps. The command declares the request-plan dry-run class. (best practice) [sources: docs/roadmap/onboard.md, src/devops_cli/roadmap/request_plan.py]
    • Chosen: No request and a list. The body says no request, and the request plan holds each request that a run makes in order.
    • Rejected: Read-only requests. The body says that the dry run makes no request, reads included.
  • Which path opens the one pull request when the repository has no OpenSpec folder?: devops pr create, after fix(pr): pr create fits a repository without openspec #3767 removes the OpenSpec-folder precondition. This item depends on fix(pr): pr create fits a repository without openspec #3767. The change builds no second pull request path. (best practice) [sources: openspec/specs/pull-request-form/spec.md, openspec/config.yaml]
  • Which repository does the command act on?: The owner/name of --repo when given; else the origin of the current checkout, through the _target helper. [sources: src/devops_cli/commands/roadmap.py:93]
  • Does the command loop over service.repos, or act on one repository?: It acts on one repository: --repo owner/name, or the checkout. The Service row of feat(roadmap): onboard a repository that lacks a project dependency #4664 starts the command for each repository in service.repos. (best practice) [sources: src/devops_cli/commands/roadmap.py:93, docs/roadmap/onboard.md]
  • How does the command treat a protected default branch?: It opens the one pull request and never pushes to the default branch. The ruleset and the required checks gate the merge, and a person merges. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md, CONTEXT.md]
    • Chosen: Open a pull request. The ruleset and the required checks gate the merge, and a person merges.
    • Rejected: Push to the default branch. A protected branch rejects the push, and CI is the gate of the project.
  • Does docs/roadmap/onboard.md need an entry in CONST_DOCS_INVENTORY?: No. The page exists, so the change edits it and adds no document. docs/index.md already links it, and an entry is needed only for a document that a pull request adds. [sources: docs/roadmap/onboard.md, docs/index.md, CONTRIBUTING.md:173]
  • Who turns on issues, sets the default-branch rules, and installs the App on the repository?: A person does, in the repository settings and the App installation page. The command prints these steps and changes no setting and installs no App. (a person decides) [sources: docs/roadmap/onboard.md]

Open questions

  • Who turns on issues, sets the default-branch rules, and installs the App on the repository? (a person decides)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#1359, #1389, #1653, #3753, #3767, #3770, #3771, #3772

Sub-issues

Sub-issues

6 of 7 Issues completed
Loading 7 sub-issues

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 6, 2026
  2. dan-petty commented on Nov 6, 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. It is a tracking and coordination issue; the blocking work lives in its sub-issues.
    • Value: High. It removes the one-failure-at-a-time onboarding pain for every new repository added to the roadmap Service.
    • Effort: Medium. The command orchestrates checks, a pull request, and idempotency over parts that sub-issues already deliver.
    • Related: feat(roadmap): onboard writes labels.yml and clear-status.yml from --from #3742, which asks for a different change. Both concern the devops roadmap onboard command; the candidate tracks the full six-step pipeline while #3742 delivers only step 2 (labels and workflow files).
  3. added
    priority/p2-medium
    on Nov 6, 2026
  4. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 72744a9 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

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

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at c56f784 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

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

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The searches found no tool that onboards a repository through this roadmap's six-step path, but the open gh CLI that the issue already reaches through devops gh covers the GitHub part: it reconciles .github/labels.yml, opens the pull request with the GitHub and OpenSpec files, and reaches repository settings and webhook endpoints through gh api. It does not run the roadmap-specific prerequisite check, plan the requests for a dry run, or print the person-owned steps, so it covers only part of the need.

    Tool: cli/cli (https://github.com/cli/cli)

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

    Covers:

    • Reconciles the repository labels against .github/labels.yml (step 1 label creation)
    • Opens the one onboarding pull request with .github/labels.yml, .github/workflows/clear-status.yml, openspec/config.yaml and a spec, without pushing to a protected default branch (steps 2 and 4)
    • Reads repository settings and webhook state through gh api for the checks of steps 1, 3 and 6

    Lacks:

    • No single command that runs the six pipeline steps in order and prints one present/missing/not readable row per prerequisite
    • No request-plan --dry-run that lists the label, pull request and RAG requests plus the person steps
    • No printed person steps for repository settings, App installation, the webhook secret, the service.repos edit with devops k8s deploy-stack, and the merge
    • No RAG ingestion of the repository into the code and docs collections under owner/name
    • No idempotent orchestration across the label sync, the pull request and the RAG pass

    Tools considered:

    Searches run:

    • probot settings app sync repository labels branch protection from settings.yml, results: 5
    • tool to onboard a GitHub repository automatically: labels, workflow files, webhook, settings as code, results: 5
    • probot/settings GitHub App repository settings as code, results: 5
    • terraform-provider-github manage labels branch protection webhooks as code, results: 5
    • Backstage software templates scaffold new repository checklist, results: 5
    • GitHub CLI gh label create repo edit webhook pull request automation, results: 5
    • OpenSpec CLI spec-driven development config.yaml, results: 5
    • repository onboarding CLI check prerequisites create labels open pull request dry-run, results: 5

    Sources:

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

  7. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Scope from the generalization plan (2026-11-11)

    The tracker #4627 adds these changes to the pipeline.

    Acceptance criteria (added)

    Dependencies (added)

    #3753 (the kit) and #4629. #4664 follows this item.

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

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 5c71ad4 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

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

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 9208717 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • Who turns on issues, sets the default-branch rules, and installs the App on the repository? (a person decides)
  10. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: partly, tool https://github.com/cli/cli. A person decides what the new result means for the item.

    Searches (3)

    Tools considered:

    Searches run:

    • CLI tool that checks GitHub repository prerequisites, creates missing labels and opens a pull request, results: 5
    • openspec CLI init config.yaml template for a repository, results: 5
    • repository onboarding golden path tool opens pull request with config files idempotent checklist, results: 5

    Sources:

  11. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    A service repository now onboards to the cluster with one services entry in dan-petty/homelab k8s/services/<name>.yaml (instance dan-petty/homelab#80, schema in dan-petty/infra#10 and dan-petty/infra#11). The onboarding pipeline can open that entry as a homelab pull request. It must not write Argo CD Applications, AppProjects, namespaces, Secret rows, alert rows or dashboard rows into devops-cli.

  12. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor

    Closed as replaced: devops repos onboard (#6773, ADR 0035) replaced devops roadmap onboard.
    The new command checks the prerequisites, creates the labels, opens the template pull request from dan-petty/infra, handles the webhook and service.repos, runs the RAG pass and lists the person steps (docs/repos/onboard.md). The one open sub-issue, #3770 (OpenSpec setup), stays open on its own. The template already adds openspec/config.yaml.

  13. 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-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