Skip to content

Commit c66b21c

Browse files
committed
feat(v-onboard): Operations/Deployment dimension, rebased onto v3.5.1
Rebase of #4 onto v3.5.1 (branch had drifted two /v:onboard rewrites: 3.4.x, 3.5.0). Re-placed against current anchors; addresses review. - scripts/compound-v-onboard.py: detect-ops next to detect-ui in build_parser() + main() dispatch; detect_ops/_ops_category/_OPS_* + 6 selftest rows (165 ok). detect_ops reads only filenames (os.walk), never file contents, so the hardened _open_regular/_read_bounded path does not apply — noted in the docstring. - Reviewer's core ask (accelerator, not verdict): signals_found (not 'present'); CLI prints 'no-signals' not 'no-ops'; GATE surfaces BOTH branches — found -> confirm, no-signals -> open question ('point me at your deployer, e.g. ship.sh'). An empty scan is never a silent skip. - onboarding.md: re-placed DETECT / EXTRACT (5th claim type 'operations') / GATE / WRITE surface / operations.md doc section / INDEX docmap / intro against the 3.5.0 restructure. operations.md registered as a docmap key for .onboard-manifest.json ({"docs": {operations.md: [cited]}}); citations obey the new Tier-1 containment gate. - specs: base-spec table row + conditional-fourth prose; CHANGELOG Unreleased entry; commands/v-onboard.md non-negotiable #7. Gates green locally: --selftest (165 ok), lint-frontmatter, rules-lint, dead-link.
1 parent ce4cb19 commit c66b21c

7 files changed

Lines changed: 714 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66

77
## [Unreleased]
88

9+
### Added
10+
- **`/v:onboard` Operations/Deployment dimension** (#4, @khymerao). New `detect-ops` subcommand
11+
inventories CI/CD + container + deploy signals and produces a cited, gated
12+
`docs/superpowers/architecture/operations.md` — a layer previously dropped from the generated KB.
13+
The detector is a common-case accelerator, never a verdict: an empty scan reports "no signals
14+
found" (`no-signals`) and the HUMAN GATE surfaces it as an open question ("point me at your
15+
deployer"), never a confident "no ops". Rebased onto v3.5.1.
16+
917
## [3.5.1] - 2026-09-04
1018

1119
### Fixed — contributed

commands/v-onboard.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ indexing is [`/v:memory-refresh`](v-memory-refresh.md).
3939
repo, and `rules-lint` must exit 0 before those files are committed. The body grammar allows only
4040
one short H1, blank lines and CITED items/paragraphs — fenced and indented code are refused — so an
4141
uncited sentence cannot ride along. `rules-plan` proposes areas; it never writes a rule.
42+
7. **`operations.md` only when `detect-ops` found ops signals (or the maintainer pointed at a bespoke
43+
deployer), and confirmed at the gate.** An empty scan is an open question, never a "no ops" verdict.
4244

4345
When the pipeline (or refresh) finishes, report what was written, what the doctor recommended
4446
(advisory — including **MCP / external-tool recommendations** via `recommend-mcp`: CLI-over-MCP so a

docs/superpowers/plans/2026-07-17-v-onboard-operations-dimension.md

Lines changed: 359 additions & 0 deletions
Large diffs are not rendered by default.

docs/superpowers/specs/2026-06-30-v-onboard-design.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,18 @@ it in would change that command's character. They stay composable: `/v:init`'s c
4949
| File | Location | When | Verification |
5050
|---|---|---|---|
5151
| `architecture.md`, `business-logic.md`, `tech-context.md` | `docs/superpowers/architecture/` | always | citation hybrid (§7) |
52+
| `operations.md` | `docs/superpowers/architecture/` | ops signals found (or maintainer-pointed), confirmed at gate | citation hybrid (§7) |
5253
| `CONVENTIONS.md` | repo root | code present | derived from real config evidence |
5354
| `DESIGN.md` (Google format) | repo root | UI repo only | `@google/design.md lint` (§8 caveat) |
5455
| `AGENTS.md` (primary, confirmable) + thin `CLAUDE.md` (`@AGENTS.md`) | repo root | always | detect-and-bridge (§6) |
5556
| `.onboard-manifest.json` (cited files + content hashes) | `docs/superpowers/architecture/` | always | machinery — **out of the index** |
5657

57-
The three `architecture/` files follow Cline's Memory Bank model (systemPatterns,
58-
productContext, techContext), trimmed to the durable set. The fast-changing
59-
`progress.md`/`activeContext.md` are **out of v1**.
58+
The three always-on `architecture/` files follow Cline's Memory Bank model (systemPatterns,
59+
productContext, techContext), trimmed to the durable set, plus a **conditional fourth
60+
`operations.md`** — generated only when `detect-ops` finds CI/CD / container / deploy signals (or the
61+
maintainer points at a bespoke deployer) and confirms it at the gate; an empty scan is an open
62+
question, never a "no ops" verdict. The fast-changing `progress.md`/`activeContext.md` are **out of
63+
v1**.
6064

6165
Every generated file carries a **provenance header** ("generated by /v:onboard from cited
6266
evidence on <date>; refresh with /v:onboard --refresh") and a link to the manifest, so durable
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# /v:onboard — Operations / Deployment coverage dimension (design)
2+
3+
> Fixes a coverage blind spot in the `/v:onboard` pipeline: it never documents the
4+
> CI/CD + DevOps layer of a project. Adds an explicit **Operations / Deployment**
5+
> dimension that produces a cited `docs/superpowers/architecture/operations.md`.
6+
> Authority doc: [`skills/compound-v/onboarding.md`](../../../skills/compound-v/onboarding.md).
7+
> Base design of record: [`2026-06-30-v-onboard-design.md`](2026-06-30-v-onboard-design.md).
8+
9+
## 1. Problem
10+
11+
`/v:onboard` builds a citation-verified architecture KB but silently skips the
12+
operations layer. Confirmed against the code:
13+
14+
- **PACK includes the raw material.** `scripts/compound-v-onboard.py` `_exclude_reason`
15+
drops only vendored / generated / binary paths — so `docker/**`, `.github/workflows/*`,
16+
Terraform, and deploy scripts all reach EXTRACT. The material is available, not excluded.
17+
- **DETECT never inventories it.** `onboarding.md` §1 inventories existing instruction
18+
files, stack, git remote, UI presence (`detect-ui`), style configs, cross-tool signal,
19+
and nested instruction files — but **not** CI/CD pipelines, Dockerfiles/compose, or
20+
deploy scripts.
21+
- **EXTRACT has no home for it.** Claim types are `architecture | business-logic |
22+
tech-context | convention`; nothing prompts deployment/infra/CI-CD coverage. The fixed
23+
arch doc set is `architecture.md` / `business-logic.md` / `tech-context.md`.
24+
- **`.github` appears only as untrusted `copilot-instructions` and as a high-impact
25+
taxonomy path** — never as a documentation dimension.
26+
27+
**Net effect:** unless the operator hand-adds an ops step, Docker topology, GitHub Actions
28+
deploy, production domain, and runbooks are silently dropped from the generated KB —
29+
becoming confident partial truth downstream (the exact failure PACK's "silently dropped
30+
relevant file" caveat warns about).
31+
32+
## 2. Scope
33+
34+
- **In:** the `/v:onboard` pipeline only — DETECT, EXTRACT, a new conditional
35+
`operations.md`, the WRITE surface, and the refresh/staleness manifest; a deterministic
36+
`detect-ops` subcommand + selftest; the spec artifacts table.
37+
- **Out:** the brainstorm→execute pre-flights (`code-archaeologist`, `domain-expert`,
38+
`doc-validator`) are a separate subsystem and are **not** touched. No infra
39+
provisioning, no secret extraction into the doc (the existing `scan-output` blocking
40+
gate already refuses credentials in generated files). No `verify-citations` change —
41+
the claim `type` field is free-form data there.
42+
43+
## 3. Decisions (resolved during brainstorm)
44+
45+
1. **Gating = deterministic `detect-ops` subcommand**, mirroring `detect-ui` — not a
46+
prose-only DETECT glob. Consistent with how `detect-ui` gates `DESIGN.md`.
47+
2. **A 5th claim type `operations`** (not a `tech-context` reuse) — operations claims
48+
target `operations.md`. Cleanest `type → doc` mapping; free-form `type` means no
49+
`verify-citations` change.
50+
3. **Onboarding pipeline only** — no new pre-flight agent.
51+
4. **The "include DevOps?" ask lives at the HUMAN GATE (§6)**, not at DETECT.
52+
`operations.md` is generated then presented as its own explicit per-artifact confirm.
53+
A fully autonomous / unattended run (auto-approve / `--permission-mode dontAsk`
54+
today the headless marathon, or any future autonomous onboarding cycle) auto-approves
55+
it, exactly as the gate already handles every other artifact. No separate
56+
autonomous-mode wiring is needed.
57+
58+
## 4. Design
59+
60+
### 4.1 `detect-ops` (deterministic, `scripts/compound-v-onboard.py`)
61+
62+
Mirrors `detect_ui`, but ops has sub-categories, so it returns a small dict rather than a
63+
bare bool:
64+
65+
```
66+
detect_ops(repo) -> {
67+
"signals_found": bool, # true iff >=1 KNOWN signal matched. FALSE = "no signals found",
68+
# NOT "no ops layer" — a bespoke ship.sh matches nothing yet exists.
69+
"ci_cd": [paths...],
70+
"containers": [paths...],
71+
"deploy": [paths...],
72+
}
73+
```
74+
75+
Signal set (documented in-code; matched by walking the filesystem, excluding `VENDOR_DIRS`
76+
not `git ls-files`, so the non-git `--selftest` temp trees also detect. Ops files are effectively
77+
always tracked, so this does not diverge from the git-tracked PACK/scope-gate in practice):
78+
79+
- **CI/CD:** `.github/workflows/*.yml|*.yaml`, `.gitlab-ci.yml`, `.circleci/config.yml`,
80+
`Jenkinsfile`, `azure-pipelines.yml`, `.travis.yml`, `bitbucket-pipelines.yml`.
81+
- **Containers / infra:** `Dockerfile` (+ `Dockerfile.*`, nested `**/Dockerfile`),
82+
`docker-compose*.yml|.yaml`, `compose.yml|.yaml`, `*.tf` / `*.tfvars`, and k8s
83+
heuristics (`k8s/` dir, `kustomization.yaml`, Helm `Chart.yaml`). k8s detection is a
84+
filename/dir heuristic and is documented as such — honest about its limits, like the
85+
DESIGN.md linter caveats.
86+
- **Deploy / PaaS:** `Procfile`, `fly.toml`, `vercel.json`, `netlify.toml`, `render.yaml`,
87+
`serverless.yml`, `app.yaml`, `deploy*.sh`.
88+
89+
CLI wiring (mirrors `detect-ui`):
90+
91+
- `add_parser("detect-ops")` with `--repo` (default `.`) and `--json`.
92+
- `main()`: `detect-ops` prints `ops` / `no-signals` by default (deliberately **not** `no-ops`
93+
the empty case is an open question, not an absence verdict); with `--json`, prints the grouped
94+
inventory dict. Exit 0.
95+
- **Selftest** in the existing selftest block: `detect_ops(...)["signals_found"] is True` on a
96+
fixture containing a `.github/workflows/ci.yml` (or `Dockerfile`); `... is False` **with empty
97+
category lists** on a bare tree (asserting the empty result carries no false verdict) — matching
98+
the shape of the existing `detect_ui` true/false selftests.
99+
100+
### 4.2 `onboarding.md` authority-doc edits
101+
102+
- **§1 DETECT** — add an **Operations / Deployment** bullet: run
103+
`python3 scripts/compound-v-onboard.py detect-ops --repo . --json`; inventory the three
104+
categories. Silent inventory, like `detect-ui` — the inclusion *ask* is at the gate, not
105+
here. This is the deterministic gate for the `operations.md` branch.
106+
- **§3 EXTRACT** — claim `type` enum becomes
107+
`architecture | business-logic | tech-context | convention | operations`. Operations
108+
claims carry `target_doc_section` pointing at `operations.md`. Load-bearing rules still
109+
bite: a deploy-secret path, a production/branch deploy gate, or a fail-closed CI check is
110+
**load-bearing** (`security` / `fail-closed`) and blocks on unsupported per the existing
111+
two-tier gate.
112+
- **New "operations.md" section** (parallel to the CONVENTIONS.md / DESIGN.md section) —
113+
`operations.md` is generated when `detect-ops` found signals (`signals_found: true`) **or** when
114+
the maintainer answers the GATE's open question by naming a bespoke deployer the signal list
115+
missed. It is skipped **only** when `signals_found: false` **and** the human confirmed there is
116+
genuinely nothing — never silently on an empty scan (verify BOTH the found path and the
117+
open-question path on dogfoods). Read-then-cite from real workflow / Docker / deploy files (or the
118+
file the maintainer pointed at). Covers: container topology, CI/CD stages, deploy target +
119+
production domain, runbook pointers. Never extracts a credential — `scan-output` (§7) still refuses.
120+
- **§6 HUMAN GATE** — the detector is an accelerator, never a verdict, so the gate surfaces ops in
121+
**both** branches:
122+
- `signals_found: true``operations.md` as its **own explicit per-artifact confirm**, framed
123+
with the detected inventory: *"DevOps/deployment tooling detected: `<ci_cd / containers / deploy
124+
inventory>` — include `operations.md`?"* Decline → dropped.
125+
- `signals_found: false`**not** a silent skip but an **open question**: *"No explicit ops files
126+
detected — if this project deploys, point me at it (e.g. a hand-rolled `ship.sh`)."* Human names
127+
it → documented; human confirms nothing → skipped. The human, not the heuristic, decides.
128+
129+
Under a fully autonomous / unattended run the gate auto-approves the `signals_found: true` doc
130+
(ops taken into account without asking — no new code path); with `signals_found: false` and no
131+
human, it records "no signals found (not confirmed absent)" rather than asserting no ops layer.
132+
- **§7 WRITE surface** — add `docs/superpowers/architecture/operations.md` to the approved
133+
v1 write set. It is a normal cited architecture doc: provenance header, output secret
134+
gate, commit-before-index all apply unchanged.
135+
- **Refresh / §9 manifest**`operations.md` is a normal cited arch doc, so it rides the
136+
existing `.onboard-manifest.json` cited-evidence staleness machinery with no new gate.
137+
138+
### 4.3 Spec `2026-06-30-v-onboard-design.md`
139+
140+
- Add an artifacts-table row:
141+
`operations.md | docs/superpowers/architecture/ | ops signals found or maintainer-pointed, confirmed | citation hybrid (§7)`.
142+
- Note `operations.md` as the **conditional fourth** architecture doc (the durable set is
143+
three-always + `operations.md`-when-ops), consistent with the Cline Memory Bank framing.
144+
145+
## 5. Files touched
146+
147+
| File | Change |
148+
|---|---|
149+
| `scripts/compound-v-onboard.py` | `detect_ops()` + `detect-ops` CLI parser/output + selftest |
150+
| `skills/compound-v/onboarding.md` | §1 DETECT bullet, §3 EXTRACT type, new operations.md section, §6 gate confirm, §7 write surface, refresh note |
151+
| `docs/superpowers/specs/2026-06-30-v-onboard-design.md` | artifacts-table row + conditional-fourth prose |
152+
153+
No `verify-citations` / claims-schema change. No pre-flight change.
154+
155+
## 6. Verification
156+
157+
- `detect_ops` selftest passes (`signals_found`-true on fixture; `signals_found`-false **with empty
158+
lists** on bare) inside the existing `python3 scripts/compound-v-onboard.py selftest` run; whole
159+
selftest stays green.
160+
- `detect-ops --json` returns the grouped inventory on a real ops repo (e.g. the Laravel+Vue
161+
dogfood with `docker/**` + `.github/workflows/ci.yml`); `no-signals` on a bare tree.
162+
- Manual pipeline read-through, **both** gate branches: an ops repo surfaces the confirm and, on
163+
approval, writes a cited `operations.md`; a signal-less repo surfaces the **open question** (not a
164+
silent skip) — the doc is written if the maintainer points at a bespoke deployer, skipped only if
165+
they confirm none.

0 commit comments

Comments
 (0)