feat(lanes): give every pipeline node its own driver command

A pipeline template named ONE command for the whole run (`skill`), so the
only way to know what actually moves a given node was to read that node's
`detect` regexes. Each node now carries its own `command`: a slash command
(`/superpowers:writing-plans`) or a shell one (`ccam lanes hook ci-gate`),
whichever its detect rules already watch for.

The values are derived from each node's own detect rules, not invented —
every `ccam …` string was checked against bin/ccam.js and every
`/superpowers:*` against the installed plugin. Nodes reaching which is a
declaration rather than an action (`done`, `merged`, `reported`,
`e2e-feature-passed`, `qc-plan`) are deliberately left empty.

`pipelines.js` normalizes a missing or non-string value to "", so a
custom template written before this field keeps loading rather than
rendering "undefined". `nodeStates()` and GET /api/lanes/pipeline-stats
pass it through. Never executed by the dashboard — display text, the same
contract `skill` already had.

Surfaced where each view has room for it: the Workflows pass-rate panel
shows it under the node label and copies it on click; PipelineMap folds
it into the node tooltip, because a 16-node pipeline has to fit across
one card and there is no width for a second line.

`command?: string` is optional in the client type only to spare four
unrelated test fixtures — the server always sends the key, and the UI has
to branch on the empty string regardless.

Verified: npm run test:server (1373, +3), npm run test:client (459, +2),
tsc --noEmit, prettier and check-headers clean. docs/LANES.md § Custom
template format documents the field. openapi.yaml needs no change: the
lane payload and pipeline-stats were never schematized there.
This commit is contained in:
2026-09-04 11:43:43 +07:00
parent 677cdf007b
commit 6df69d8811
12 changed files with 177 additions and 15 deletions
+6
View File
@@ -25,6 +25,7 @@
"label": "Plan",
"icon": "🧭",
"gate": false,
"command": "/superpowers:writing-plans",
"aliases": [
"planning",
"brainstorm",
@@ -53,6 +54,7 @@
"label": "Implement",
"icon": "🛠",
"gate": false,
"command": "/superpowers:test-driven-development",
"aliases": [
"implementing",
"coding",
@@ -77,6 +79,7 @@
"label": "Tests",
"icon": "🧪",
"gate": true,
"command": "npm test",
"aliases": [
"testing",
"unit",
@@ -99,6 +102,7 @@
"label": "Review",
"icon": "👀",
"gate": true,
"command": "/superpowers:requesting-code-review",
"aliases": [
"reviewing",
"code-review",
@@ -124,6 +128,7 @@
"label": "Gate",
"icon": "🚦",
"gate": true,
"command": "/superpowers:verification-before-completion",
"aliases": [
"verify",
"verification",
@@ -146,6 +151,7 @@
"label": "Ship",
"icon": "🔀",
"gate": false,
"command": "/superpowers:finishing-a-development-branch",
"aliases": [
"pr",
"pr-open",
+11
View File
@@ -8,6 +8,7 @@
"label": "Intake",
"icon": "📝",
"gate": false,
"command": "/superpowers:brainstorming",
"aliases": [
"assigned",
"claimed",
@@ -34,6 +35,7 @@
"label": "Plan",
"icon": "🧭",
"gate": false,
"command": "/superpowers:writing-plans",
"aliases": [
"planning",
"brainstorm",
@@ -62,6 +64,7 @@
"label": "Implement (TDD)",
"icon": "🛠",
"gate": false,
"command": "/superpowers:test-driven-development",
"aliases": [
"implement",
"coding",
@@ -87,6 +90,7 @@
"label": "CI gates + preflight",
"icon": "🧪",
"gate": true,
"command": "ccam lanes hook ci-gate",
"aliases": [
"pre-push-gate",
"tests",
@@ -109,6 +113,7 @@
"label": "E2e on feature branch",
"icon": "🧪",
"gate": false,
"command": "ccam lanes up --qc",
"aliases": [
"e2e",
"e2e-scoped",
@@ -136,6 +141,7 @@
"label": "Code review",
"icon": "👀",
"gate": true,
"command": "/superpowers:requesting-code-review",
"aliases": [
"reviewing",
"code-review",
@@ -164,6 +170,7 @@
"label": "Browser QC",
"icon": "🔍",
"gate": true,
"command": "ccam lanes proof-link",
"aliases": [],
"detect": [
{
@@ -181,6 +188,7 @@
"label": "Senior GO/NO-GO gate",
"icon": "🚦",
"gate": true,
"command": "/superpowers:verification-before-completion",
"aliases": [
"sr-gate",
"verify",
@@ -203,6 +211,7 @@
"label": "Publish PR",
"icon": "🔀",
"gate": false,
"command": "/superpowers:finishing-a-development-branch",
"aliases": [
"push"
],
@@ -222,6 +231,7 @@
"label": "PR open",
"icon": "🔀",
"gate": false,
"command": "gh pr create --base development",
"aliases": [
"ship",
"pr",
@@ -247,6 +257,7 @@
"label": "Watching PR",
"icon": "👁",
"gate": false,
"command": "ccam lanes ci status",
"aliases": [
"pr-comment-fix"
],