@plainconceptsplatform/agent-harness 2.5.2 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,133 +1,131 @@
1
- ---
2
- name: pc-ops-evidence
3
- description: Writes a capturePlan in evidence.json for the Visual Evidence CI workflow to execute on a runner with Docker and Chrome access. Load after a change is implemented. Invoked by /ops-evidence.
4
- license: MIT
5
- ---
6
-
7
- # Ops Evidence
8
-
9
- Write a capture plan so the Visual Evidence CI workflow can capture screenshots on a runner with full Docker and Chrome access.
10
-
11
- The agent runs inside the awf sandbox where Docker-in-Docker is unsupported and headless Chromium's sandbox is blocked by the container security policy. The agent cannot capture screenshots itself. Instead, it analyzes the diff and writes a `capturePlan` in `evidence.json`. A separate CI workflow executes the plan.
12
-
13
- ## Convention
14
-
15
- Every platform project has `pnpm run dev` at root that starts the **full stack** (database + API + web). The app runs with mock auth in development mode (no real authentication needed). This is the only contract — no per-project evidence harness, fixture apps, or scenario registries.
16
-
17
- ## Input
18
-
19
- The caller provides (all optional):
20
- - change id: locates `openspec/changes/{change-id}/` (or the archived `archive/*{change-id}/`).
21
- - issue / work-item ref and PR number: where to publish.
22
- - output mode (`default` / `push` / `pr`): whether the branch was pushed.
23
- - operation: `capture` (default), `publish`, or `both`.
24
-
25
- ## Part 1: Capture (operation: capture / both)
26
-
27
- **Step 1: Decide whether evidence is required.** Inspect the change's diff:
28
- - Required when changed files include user-visible UI: `*.tsx/jsx/vue/svelte`, `*.css/scss/less`, pages, layouts, components, navigation.
29
- - Skipped when docs-only, internal refactor, dependency-only, test-only, backend-only.
30
- - Mixed or unknown: required (be safe).
31
-
32
- If skipped: write `evidence.json` with `status: "skipped"` and reason. Done.
33
-
34
- **Step 2: Discover routes from git diff.** Parse changed files to determine which routes to screenshot:
35
- - `pages/**/*.tsx` or `app/**/page.tsx` → extract the route path
36
- - `features/**/*.tsx` or `components/**/*.tsx` → screenshot the homepage and any routes that import the changed component
37
- - If no routes found → screenshot `/` only
38
- - Always include `/` (homepage) as a baseline
39
-
40
- **Step 3: Write `evidence.json` with `capturePlan`.** The agent never attempts to start the app stack or launch a browser — those always fail inside the awf sandbox. Instead, write a `capturePlan` immediately.
41
-
42
- ### The `capturePlan` schema
43
-
44
- ```
45
- capturePlan:
46
- routes: # Array of route objects to screenshot (at minimum [{ path: "/" }])
47
- - path: string # URL path, e.g. "/items/:id"
48
- sampleId: # string | "first" | "any" — how to resolve dynamic segments
49
- caption: # string — human-readable description of what this screenshot shows
50
- viewports: # Array of viewport objects
51
- - width: number
52
- height: number
53
- label: string # "desktop" | "mobile" | custom
54
- requireApi: # boolean — true when the route needs the backend API running
55
- requireLogin: # boolean — true when the route needs authentication
56
- loginMethod: # string — "mock-sso" | "none" | custom method identifier
57
- reason: # string — why evidence was blocked and what the screenshots should show
58
- ```
59
-
60
- ### Rules for writing capturePlan
61
-
62
- 1. `routes` MUST always include `{ path: "/", caption: "Homepage" }` as the first entry.
63
- 2. Every additional route discovered from the diff goes after the homepage entry.
64
- 3. `sampleId: "first"` means the CI workflow should use the first record returned by the API. `sampleId: "any"` means any valid ID.
65
- 4. `requireApi` is `true` when any route needs the backend to return data. It is `false` only for purely static pages (login, not-found).
66
- 5. `requireLogin` is `true` when any route needs authentication. For dev mode with mock auth, `loginMethod` is `"mock-sso"`.
67
- 6. `reason` should explain both WHY capture was blocked and WHAT the screenshots should show once captured.
68
-
69
- ### Example `evidence.json`
70
-
71
- Adapt the routes and captions to this repository. Edits between the
72
- `PC-PROJECT-EXAMPLE` markers are carried over when the harness updates;
73
- anything outside them is replaced by the shipped version.
74
-
75
- <!-- PC-PROJECT-EXAMPLE-START -->
76
- ```json
77
- {
78
- "version": 1,
79
- "changeId": "status-badge-in-detail-panel",
80
- "required": true,
81
- "status": "blocked",
82
- "assets": [],
83
- "capturePlan": {
84
- "routes": [
85
- { "path": "/", "sampleId": "any", "caption": "Homepage" },
86
- { "path": "/items/:id", "sampleId": "first", "caption": "Item detail with the new status badge" }
87
- ],
88
- "viewports": [
89
- { "width": 1280, "height": 720, "label": "desktop" },
90
- { "width": 375, "height": 667, "label": "mobile" }
91
- ],
92
- "requireApi": true,
93
- "requireLogin": true,
94
- "loginMethod": "mock-sso",
95
- "reason": "Status badge added to the item detail panel; visual change on the detail page."
96
- },
97
- "reason": "Visual evidence cannot be captured inside the awf sandbox (Docker-in-Docker unsupported, headless Chromium sandbox blocked). A capturePlan has been written for the Visual Evidence CI workflow.",
98
- "prMarkdown": "## Evidence\n\nVisual evidence for this change is **blocked** in this agent run. A `capturePlan` has been written to `evidence.json` — the Visual Evidence CI workflow will execute it on a runner with full Docker and Chrome access.\n\nAutomated verification that did run:\n- Lint: clean\n- Tests: all pass\n- Build: success"
99
- }
100
- ```
101
- <!-- PC-PROJECT-EXAMPLE-END -->
102
-
103
- ### When evidence is not required
104
-
105
- If evidence is skipped (no UI files changed), write without a `capturePlan`:
106
-
107
- ```json
108
- {
109
- "version": 1,
110
- "changeId": "{change-id}",
111
- "required": false,
112
- "status": "skipped",
113
- "assets": [],
114
- "reason": "No user-visible UI files changed in this PR.",
115
- "prMarkdown": "## Evidence\n\nSkipped: no user-visible UI changes."
116
- }
117
- ```
118
-
119
- Capture never commits, stages, or pushes. The caller owns git.
120
-
121
- ## Part 2: Publish (operation: publish / both)
122
-
123
- Preconditions:
124
- - An issue/PR number was provided. Else skip.
125
- - Image URLs resolve only if the branch was pushed (`pr`/`push` modes).
126
- - Backlog platform from `.opencode/harness.json`; `none` means skip.
127
-
128
- <!-- PC-PLATFORM-EVIDENCE-START -->
129
- <!-- PC-PLATFORM-EVIDENCE-END -->
130
-
131
- ## Report
132
-
133
- One block: the `status` (passed/skipped/failed/blocked) and why; capturePlan written or why not. Never present a blocked capture as passed.
1
+ ---
2
+ name: pc-ops-evidence
3
+ description: Writes a capturePlan in evidence.json for the Visual Evidence CI workflow to execute on a runner with Docker and Chrome access. Load after a change is implemented. Invoked by /ops-evidence.
4
+ license: MIT
5
+ ---
6
+
7
+ # Ops Evidence
8
+
9
+ Write a capture plan so the Visual Evidence CI workflow can capture screenshots on a runner with full Docker and Chrome access.
10
+
11
+ The agent runs inside the awf sandbox where Docker-in-Docker is unsupported and headless Chromium's sandbox is blocked by the container security policy. The agent cannot capture screenshots itself. Instead, it analyzes the diff and writes a `capturePlan` in `evidence.json`. A separate CI workflow executes the plan.
12
+
13
+ ## Convention
14
+
15
+ Every platform project has `pnpm run dev` at root that starts the **full stack** (database + API + web). The app runs with mock auth in development mode (no real authentication needed). This is the only contract — no per-project evidence harness, fixture apps, or scenario registries.
16
+
17
+ ## Input
18
+
19
+ The caller provides (all optional):
20
+ - change id: locates `openspec/changes/{change-id}/` (or the archived `archive/*{change-id}/`).
21
+ - issue / work-item ref and PR number: where to publish.
22
+ - output mode (`default` / `push` / `pr`): whether the branch was pushed.
23
+ - operation: `capture` (default), `publish`, or `both`.
24
+
25
+ ## Part 1: Capture (operation: capture / both)
26
+
27
+ **Step 1: Decide whether evidence is required.** Inspect the change's diff:
28
+ - Required when changed files include user-visible UI: `*.tsx/jsx/vue/svelte`, `*.css/scss/less`, pages, layouts, components, navigation.
29
+ - Skipped when docs-only, internal refactor, dependency-only, test-only, backend-only.
30
+ - Mixed or unknown: required (be safe).
31
+
32
+ If skipped: write `evidence.json` with `status: "skipped"` and reason. Done.
33
+
34
+ **Step 2: Discover routes from git diff.** Parse changed files to determine which routes to screenshot:
35
+ - `pages/**/*.tsx` or `app/**/page.tsx` → extract the route path
36
+ - `features/**/*.tsx` or `components/**/*.tsx` → screenshot the homepage and any routes that import the changed component
37
+ - If no routes found → screenshot `/` only
38
+ - Always include `/` (homepage) as a baseline
39
+
40
+ **Step 3: Write `evidence.json` with `capturePlan`.** The agent never attempts to start the app stack or launch a browser — those always fail inside the awf sandbox. Instead, write a `capturePlan` immediately.
41
+
42
+ ### The `capturePlan` schema
43
+
44
+ ```
45
+ capturePlan:
46
+ routes: # Array of route objects to screenshot (at minimum [{ path: "/" }])
47
+ - path: string # URL path, e.g. "/items/:id"
48
+ sampleId: # string | "first" | "any" — how to resolve dynamic segments
49
+ caption: # string — human-readable description of what this screenshot shows
50
+ viewports: # Array of viewport objects
51
+ - width: number
52
+ height: number
53
+ label: string # "desktop" | "mobile" | custom
54
+ requireApi: # boolean — true when the route needs the backend API running
55
+ requireLogin: # boolean — true when the route needs authentication
56
+ loginMethod: # string — "mock-sso" | "none" | custom method identifier
57
+ reason: # string — why evidence was blocked and what the screenshots should show
58
+ ```
59
+
60
+ ### Rules for writing capturePlan
61
+
62
+ 1. `routes` MUST always include `{ path: "/", caption: "Homepage" }` as the first entry.
63
+ 2. Every additional route discovered from the diff goes after the homepage entry.
64
+ 3. `sampleId: "first"` means the CI workflow should use the first record returned by the API. `sampleId: "any"` means any valid ID.
65
+ 4. `requireApi` is `true` when any route needs the backend to return data. It is `false` only for purely static pages (login, not-found).
66
+ 5. `requireLogin` is `true` when any route needs authentication. For dev mode with mock auth, `loginMethod` is `"mock-sso"`.
67
+ 6. `reason` should explain both WHY capture was blocked and WHAT the screenshots should show once captured.
68
+
69
+ ### Example `evidence.json`
70
+
71
+ Adapt the routes and captions to this repository. Edits between the `PC-PROJECT-EXAMPLE` markers are carried over when the harness updates; anything outside them is replaced by the shipped version.
72
+
73
+ <!-- PC-PROJECT-EXAMPLE-START -->
74
+ ```json
75
+ {
76
+ "version": 1,
77
+ "changeId": "status-badge-in-detail-panel",
78
+ "required": true,
79
+ "status": "blocked",
80
+ "assets": [],
81
+ "capturePlan": {
82
+ "routes": [
83
+ { "path": "/", "sampleId": "any", "caption": "Homepage" },
84
+ { "path": "/items/:id", "sampleId": "first", "caption": "Item detail with the new status badge" }
85
+ ],
86
+ "viewports": [
87
+ { "width": 1280, "height": 720, "label": "desktop" },
88
+ { "width": 375, "height": 667, "label": "mobile" }
89
+ ],
90
+ "requireApi": true,
91
+ "requireLogin": true,
92
+ "loginMethod": "mock-sso",
93
+ "reason": "Status badge added to the item detail panel; visual change on the detail page."
94
+ },
95
+ "reason": "Visual evidence cannot be captured inside the awf sandbox (Docker-in-Docker unsupported, headless Chromium sandbox blocked). A capturePlan has been written for the Visual Evidence CI workflow.",
96
+ "prMarkdown": "## Evidence\n\nVisual evidence for this change is **blocked** in this agent run. A `capturePlan` has been written to `evidence.json` — the Visual Evidence CI workflow will execute it on a runner with full Docker and Chrome access.\n\nAutomated verification that did run:\n- Lint: clean\n- Tests: all pass\n- Build: success"
97
+ }
98
+ ```
99
+ <!-- PC-PROJECT-EXAMPLE-END -->
100
+
101
+ ### When evidence is not required
102
+
103
+ If evidence is skipped (no UI files changed), write without a `capturePlan`:
104
+
105
+ ```json
106
+ {
107
+ "version": 1,
108
+ "changeId": "{change-id}",
109
+ "required": false,
110
+ "status": "skipped",
111
+ "assets": [],
112
+ "reason": "No user-visible UI files changed in this PR.",
113
+ "prMarkdown": "## Evidence\n\nSkipped: no user-visible UI changes."
114
+ }
115
+ ```
116
+
117
+ Capture never commits, stages, or pushes. The caller owns git.
118
+
119
+ ## Part 2: Publish (operation: publish / both)
120
+
121
+ Preconditions:
122
+ - An issue/PR number was provided. Else skip.
123
+ - Image URLs resolve only if the branch was pushed (`pr`/`push` modes).
124
+ - Backlog platform from `.opencode/harness.json`; `none` means skip.
125
+
126
+ <!-- PC-PLATFORM-EVIDENCE-START -->
127
+ <!-- PC-PLATFORM-EVIDENCE-END -->
128
+
129
+ ## Report
130
+
131
+ One block: the `status` (passed/skipped/failed/blocked) and why; capturePlan written or why not. Never present a blocked capture as passed.
@@ -25,15 +25,9 @@ The caller provides (all optional):
25
25
 
26
26
  ## OpenSpec mode: parallel subagent waves
27
27
 
28
- Load `@openspec-apply-change` for change selection, status, and closing. Its
29
- own implement step does not apply here: annotated tasks are implemented only by
30
- spawning the annotated tier worker, and the lead never implements. Take that
31
- step from the protocol below instead.
32
-
33
- Referring to it by number would break silently. `@openspec-apply-change` is
34
- installed by `openspec init --force` with no version pinned, so an inserted step
35
- upstream renumbers the one being replaced, and the sequential default would then
36
- run alongside these waves.
28
+ Load `@openspec-apply-change` for change selection, status, and closing. Its own implement step does not apply here: annotated tasks are implemented only by spawning the annotated tier worker, and the lead never implements. Take that step from the protocol below instead.
29
+
30
+ Referring to it by number would break silently. `@openspec-apply-change` is installed by `openspec init --force` with no version pinned, so an inserted step upstream renumbers the one being replaced, and the sequential default would then run alongside these waves.
37
31
 
38
32
  **Implement via native subagent waves.**
39
33
 
@@ -4,26 +4,18 @@ description: Explore an idea or requirement before planning. Invoked by the /pla
4
4
  license: MIT
5
5
  ---
6
6
 
7
- Explore, then hand back what you learned. `@openspec-explore` supplies the
8
- stance; this skill adds one prohibition and one handoff.
7
+ Explore, then hand back what you learned. `@openspec-explore` supplies the stance; this skill adds one prohibition and one handoff.
9
8
 
10
9
  ## Rules
11
10
 
12
- - Never write, edit, or create a file while this skill is loaded, OpenSpec
13
- artifacts included. This overrides `@openspec-explore`, which says creating
14
- them is "fine". Reading, searching, and discussing are the whole job.
15
- - If the conversation turns toward implementation, say explore mode is active
16
- and point at `/plan-apply`.
11
+ - Never write, edit, or create a file while this skill is loaded, OpenSpec artifacts included. This overrides `@openspec-explore`, which says creating them is "fine". Reading, searching, and discussing are the whole job.
12
+ - If the conversation turns toward implementation, say explore mode is active and point at `/plan-apply`.
17
13
 
18
14
  Load `@openspec-explore` for the approach.
19
15
 
20
16
  ## Autonomous handoff
21
17
 
22
- When a caller loads this skill in autonomous mode, return `EXPLORATION_BRIEF`
23
- in memory rather than writing a file. It holds: the problem in one or two
24
- sentences, the affected paths, the approach chosen, the risks worth knowing,
25
- and anything deliberately out of scope. `pc-plan-goal` requires it before its
26
- propose phase.
18
+ When a caller loads this skill in autonomous mode, return `EXPLORATION_BRIEF` in memory rather than writing a file. It holds: the problem in one or two sentences, the affected paths, the approach chosen, the risks worth knowing, and anything deliberately out of scope. `pc-plan-goal` requires it before its propose phase.
27
19
 
28
20
  <!-- PC-OPTIMIZATION-MEMORY-START -->
29
21
  <!-- PC-OPTIMIZATION-MEMORY-END -->
@@ -64,7 +64,7 @@ Tick `propose` when the proposal commit exists.
64
64
 
65
65
  Load `pc-plan-apply` in autonomous mode with `start_from: load-plan`. It owns worker resolution, subagent waves, commits, verification, and re-waves.
66
66
 
67
- Require it to return every task complete and `VERIFIED`, then load `pc-repo-verify`. Tick `apply` and `verify` only when both phases return `VERIFIED`.
67
+ Require it to return every task complete and `VERIFIED`, then load `pc-repo-verify`. Tick `apply` when apply returns `VERIFIED`; tick `verify` when `pc-repo-verify` returns `PLAN_WRITTEN` or `STUB_WRITTEN`.
68
68
 
69
69
  ## Phase 5: Archive
70
70
 
@@ -21,8 +21,7 @@ The caller provides:
21
21
 
22
22
  ## Step 0.a: Check for unarchived changes (stop)
23
23
 
24
- Before proposing a new change, inspect `openspec/changes/` (ignore `openspec/changes/archive`).
25
- If any change folder exists in `openspec/changes/` (names vary by platform: `gh-*`, `us-*`, or a plain slug), list them in the question text, then call the `question` tool:
24
+ Before proposing a new change, inspect `openspec/changes/` (ignore `openspec/changes/archive`). If any change folder exists in `openspec/changes/` (names vary by platform: `gh-*`, `us-*`, or a plain slug), list them in the question text, then call the `question` tool:
26
25
 
27
26
  ```json
28
27
  {
@@ -57,6 +56,7 @@ Load `@openspec-propose` skill and follow its instructions to generate proposal.
57
56
  1. List every `*-engineer.md` file in `.opencode/agents/`. For each file read:
58
57
  - `description:` from the YAML frontmatter: the engineer's specialization summary
59
58
  - `## Abilities` section: the skills listed under Development, Testing, Infrastructure (e.g. `@nodejs-backend`, `@secure-nextjs-api-routes`)
59
+
60
60
  Build a map of `agent-name -> { description, abilities }`.
61
61
  2. For each task, compare the task text and domain against every engineer's description AND abilities. Pick the engineer whose combined profile most closely matches. `fullstack-engineer` is the fallback worker and the body behind `build` and `plan`; prefer a real specialist over it, and never annotate a task with `build` or `plan`, which are the user's own primaries. If no specialist matches a task, leave the agent field blank and record the missing specialization in the proposal. An annotated OpenSpec task needs a real subagent; never substitute the lead or an obsolete generic agent name.
62
62
  3. Pick a tier, derive `depends_on`, derive `touches`, and annotate each task line. Follow the [task annotation](task-annotation.md) reference for the full tier selection guide, dependency derivation, touches derivation, and annotation format with examples.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pc-plan-story
3
- description: Write a detailed, repo-aware user story from a feature idea or need. Loads the @user-story skill for Mike Cohn format + Gherkin acceptance criteria, analyzes the codebase for concrete context, and produces a development-ready story. Use when the user wants to write a user story, create a story from a feature idea, or turn a need into a structured story with acceptance criteria. Invoked by the /plan-story command.
3
+ description: Write a detailed, repo-aware user story from a feature idea or need, then wrap it in the repository's issue form and append a structured implementation plan. Loads the @user-story skill for Mike Cohn format + Gherkin acceptance criteria, analyzes the codebase for concrete context, and produces a development-ready story with a plan. Use when the user wants to write a user story, create a story from a feature idea, or turn a need into a structured story with acceptance criteria. Invoked by the /plan-story command.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -10,24 +10,69 @@ Write a user story grounded in this repository. `@user-story` owns the format an
10
10
 
11
11
  A feature description, need, or rough idea, possibly with exploration findings and diagrams to align the scope with. If `$ARGUMENTS` is empty, ask what the user wants to capture.
12
12
 
13
+ The caller may pass exploration findings from a prior `/plan-explore` session. Treat them as the primary source for the codebase inventory; read files only to fill gaps the findings do not cover.
14
+
13
15
  <!-- PC-OPTIMIZATION-MEMORY-START -->
14
16
  <!-- PC-OPTIMIZATION-MEMORY-END -->
15
17
 
16
18
  ## Rules
17
19
 
18
- - Never write, edit, or create a file, and never start the work or invoke `/plan-propose` or `/plan-quick`. The only artefacts are the story and one question.
20
+ - Never write, edit, or create a file, and never start the work or invoke `/plan-propose` or `/plan-quick`. The only artefacts are the story (with its issue form and plan), and one question.
19
21
  - Never write `As a user`. The persona comes from the repo's own roles: auth middleware, route guards, user models. A story that could have been written without opening the repo is not worth reviewing.
20
22
  - Never show the user a story that fails the `@user-story` checks. Fix it first.
21
23
  - Every `Given`, `When` and `Then` names something real, and every `Then` is testable: a file, endpoint, model or field somebody can point at.
24
+ - Never read outside this repository root. The entire inventory and plan must come from files inside this repo.
25
+ - Adhere to `${{ env.REPO_RULES }}` and repository documentation (AGENTS.md, ARCHITECTURE.md, DESIGN.md, existing patterns) before finalizing the story.
26
+ - Reserve the very top of the body — above the form's first heading — for machine-readable lines that later workflow steps add (split markers, estimate lines). Never place story or plan content there; the workflow reads those lines regardless of the form's shape.
22
27
 
23
28
  ## Flow
24
29
 
25
30
  1. Load `@user-story`.
26
- 2. Read the codebase for what the feature touches: who the users are (auth, roles, user models, guards), what exists now (components, endpoints, models, types), where the change lands (paths, module boundaries), and what rules already govern it (validation, existing flows). Incorporate any exploration findings, including their out-of-scope decisions.
27
- 3. Draft the story against that inventory, with two or three edge cases taken from what the code does today: a violated constraint, an empty or half-migrated state, a permission boundary.
28
- 4. Load `@humanizer` and run it over the prose. It cleans prose, not structure: paths, component names and Gherkin stay exact.
29
- 5. Add a Mermaid diagram only for a multi-step flow, a state transition, or a component interaction, and only the happy path. A single-resource CRUD story does not need one. If the input carried an exploration diagram, extend it rather than redrawing.
30
- 6. Show the story with the artefacts it is grounded in, then ask what is next.
31
+
32
+ 2. **Coverage gate.** List every work unit from the input. For each, confirm it has exploration findings concrete enough to write an acceptance scenario: the files it touches, the models or endpoints it changes, the constraints it must respect. If any work unit is missing findings, go back and explore it now by reading the codebase. Do not draft the story until every work unit is covered. This skill's own requirement is coverage: several work units become one story that covers all of them, with at least one acceptance scenario per unit.
33
+
34
+ 3. Read the codebase for what the feature touches: who the users are (auth, roles, user models, guards), what exists now (components, endpoints, models, types), where the change lands (paths, module boundaries), and what rules already govern it (validation, existing flows). Incorporate any exploration findings, including their out-of-scope decisions.
35
+
36
+ 4. Draft the story against that inventory. Each work unit gets at least one acceptance scenario. Pull two or three edge cases from what the code does today: a violated constraint, an empty or half-migrated state, a permission boundary.
37
+
38
+ 5. Apply repository documentation and established conventions. Read AGENTS.md, ARCHITECTURE.md, DESIGN.md and any existing patterns that govern the area being changed. Adjust the story to respect them.
39
+
40
+ 6. Load `@humanizer` and run it over the prose. It cleans prose, not structure: paths, component names and Gherkin stay exact.
41
+
42
+ 7. Add a Mermaid diagram only for a multi-step flow, a state transition, or a component interaction, and only the happy path. A single-resource CRUD story does not need one. If the input carried an exploration diagram, extend it rather than redrawing.
43
+
44
+ 8. **Issue form: discover, select, fill.**
45
+
46
+ *Discover:* List the YAML and Markdown forms under `.github/ISSUE_TEMPLATE/`, plus a legacy `.github/issue_template.md` or a root `template.yml`. `config.yml` there only declares contact links, which are not forms: ignore it.
47
+
48
+ *Select:* When a form filters by labels and the issue carries one of those labels, that form wins. Otherwise use the repository's default form. When the repository has no form at all, keep the free-form story shape from step 4: there is nothing to wrap around.
49
+
50
+ *Fill:* Draw every field's content from your exploration findings. Required fields always get real content; optional fields only when you genuinely have something for them. The story narrative lands in the field that asks for it — proposal, description, or what-happened, depending on the form. The Given/When/Then scenarios go into the form's acceptance-criteria field when it has one; otherwise they stay a section of their own. The Mermaid diagram goes where it reads best inside the filled form.
51
+
52
+ 9. **Plan section.** Using the codebase investigation from step 3, produce a structured implementation plan that goes after the story inside the issue form body. Format it as follows:
53
+
54
+ Start with a one-line scope summary, then a context paragraph describing what areas the plan touches, how many changes it breaks into, and whether the changes are independent.
55
+
56
+ Then break the feature into numbered changes. Each change:
57
+
58
+ - **Title** — what the change does.
59
+ - **Problem** — what is wrong or what needs to change and why. Name the file, method, or endpoint.
60
+ - **Fix** — bullet steps describing the implementation approach. Each step names a concrete file, method, or field.
61
+ - **Affected files** — a bullet list of paths with a short note on what changes in each.
62
+
63
+ After all changes, add a summary table:
64
+
65
+ ```markdown
66
+ | Change | Files | Layer |
67
+ |---|---|---|
68
+ | 1. <title> | <file list> | <Backend | Frontend | Fullstack | Infra | Tests> |
69
+ ```
70
+
71
+ Then list exclusions — what is explicitly out of scope and why.
72
+
73
+ Do not write any files. The plan is part of the story output, read-only. It tells the implementer what to touch and why, so they can start without re-investigating.
74
+
75
+ 10. Show the story with the issue form wrapping, the plan, and the artefacts it is grounded in, then ask what is next. If the plan has an open clarification — a wording choice, a missing constraint, an unknown API — ask it before the contracts question.
31
76
 
32
77
  ## Contracts
33
78
 
@@ -1,89 +1,89 @@
1
- ---
2
- name: pc-repo-help
3
- description: The full command reference for this project - every /command with when to use it and the typical workflows. Load when the user asks for help, the command list, or at the end of repo initialization. Invoked by the /repo-help command and the repo-initialize flow.
4
- license: MIT
5
- ---
6
-
7
- # Repo Help
8
-
9
- Display the following reference to the user exactly as written. Do not summarize.
10
-
11
- ## Commands
12
-
13
- ### Not sure where to start?
14
-
15
- **`/init`** (alias: `/repo-initialize`): Initialize the project. Presents a single form with all setup questions (project type, history, architecture, design, evidence), then executes the selected steps.
16
-
17
- **`/repo-onboard`**: Guided tour of the project and its agentic infrastructure. Explains agents, commands, skills, OpenSpec workflow, and configuration. Read-only: no files modified.
18
-
19
- **`/repo-audit`**: Read-only health audit of every configured source root. Loads the fullstack engineer's abilities, checks guardrails, architecture, tooling, dependencies, lockfiles, tests, and CI, then reports prioritized findings.
20
-
21
- **`/plan-explore`**: Your backlog is unclear, you have a half-formed idea, or you need to think through a problem before committing to a plan. This is a thinking partner, not an executor.
22
-
23
- **`/plan-story <feature or need>`**: Write a detailed, repo-aware user story from a feature idea. Loads the `@user-story` skill (Mike Cohn format + Gherkin acceptance criteria), analyzes your codebase for concrete context, and produces a development-ready story with specific personas, real outcomes, and testable criteria grounded in your actual file paths, component names, and data models. No files written — just the story.
24
-
25
- **`/plan-propose <url or idea>`**: You have a work item URL, or a clear idea and you want to turn it into a structured plan (proposal, specs, tasks). Enriches each task with the best matching agent and model before showing you the plan. Nothing is implemented until you confirm.
26
-
27
- ---
28
-
29
- ### Ready to implement?
30
-
31
- **`/plan-quick <task>`**: Quick plan for focused changes. Reads the codebase, creates a task checklist in the Todo pane. No files, no OpenSpec. Then you decide: `/plan-apply` to implement, or `/plan-propose` for a full OpenSpec plan.
32
-
33
- **`/plan-apply`**: Implement a plan. Detects the source automatically: OpenSpec-annotated tasks (from `/plan-propose`) run as parallel subagent waves; Todo pane tasks (from `/plan-quick`) run sequentially in-session.
34
-
35
- **`/plan-goal <feature or URL>`**: Fully autonomous, no confirmations. Branches off `main`, then runs propose → apply → archive on that branch (each phase its own commit). Default: merges to `main` and deletes the branch. Add `push` keyword to push the branch only. Add `pr` keyword to push + create a PR. Built for loop-engineering / unattended runs. Stops only on a hard failure, leaving the branch unmerged.
36
-
37
- ---
38
-
39
- ### Done implementing?
40
-
41
- **`/ops-ship`**: Create a PR for the current feature branch with screenshots if UI changed.
42
-
43
- **`/ops-review`**: Read and triage PR review feedback. If you share a PR URL or say "I've added comments to the PR", it reads and classifies the review comments so you know what to fix. Fixing is done via `/plan-apply`.
44
-
45
- **`/ops-backlog`**: Create an issue in the backlog platform (GitHub, Azure DevOps, Jira) from a description.
46
-
47
- **`/ops-evidence`**: Produce evidence a completed change works and publish it to the originating issue/PR. Uses `playwright-cli` (headless) and `pnpm run dev` to capture screenshots at desktop and mobile viewports, writes `evidence/evidence.json` (passed/skipped/failed/blocked), and upserts an idempotent verified comment. Best-effort. Run it yourself after a change lands; `/plan-goal` does not run it. Works inside CI containers.
48
-
49
- **`/plan-archive`**: Mark a completed change as archived in OpenSpec. Run this after the PR is merged.
50
-
51
- ---
52
-
53
- ### Maintaining the project?
54
-
55
- **`/make-engineer`**: Add a custom specialist engineer to the team. Interactive persona-driven form: pick a persona, then confirm an inspected-and-recommended set of skills (architecture/patterns like FSD or design patterns, framework, testing, infra) before anything installs. Future `/plan-apply` runs will prefer it when its domain matches.
56
-
57
- **`/make-architecture`**: Regenerate `ARCHITECTURE.md` from the current codebase. Safe to rerun any time the architecture evolves.
58
-
59
- **`/make-design`**: Regenerate `DESIGN.md` from the design system (Tailwind, CSS vars, tokens, etc.).
60
-
61
- **`/make-guardrails`**: Generate a `pc-guardrails-project` skill from `ARCHITECTURE.md` and project config files. Extracts concrete rules (architecture boundaries, naming, code style, testing, git workflow) that all agents must follow. Updates every `*-engineer.md` to load the skill.
62
-
63
- **`/repo-verify`**: Verify the current branch against applicable guardrails and project checks. Runs immutable dependency installs/restores, configured builds, and tests for every discovered project, repairs relevant failures, checks dependency/lockfile consistency, and reports `VERIFIED` only when every required check passes. It runs automatically in `/plan-goal`.
64
-
65
- **`/make-user-model <tier> <model>`**: Set the model for a tier (`plan`, `build`, or `fast`). Writes to `.opencode/harness.json` (`models`). Use `user` prefix for a personal override: `/make-user-model user fast opencode/big-pickle`. Use a model id or `current` for the active session model. Restart opencode for the `pc-subagent-tiers` plugin to rebuild tier agents.
66
-
67
- ---
68
-
69
- ### Typical workflows
70
-
71
- **Complex change:**
72
- ```
73
- /plan-explore ← optional: think it through first
74
- /plan-propose ← create the plan
75
- /plan-apply ← implement with the team
76
- /ops-ship ← ship
77
- /plan-archive ← close out
78
- ```
79
-
80
- **Quick change:**
81
- ```
82
- /plan-quick ← create a focused task list
83
- /plan-apply ← implement
84
- ```
85
-
86
- **Unattended / loop-engineering:**
87
- ```
88
- /plan-goal <description> ← full pipeline, no interaction
89
- ```
1
+ ---
2
+ name: pc-repo-help
3
+ description: The full command reference for this project - every /command with when to use it and the typical workflows. Load when the user asks for help, the command list, or at the end of repo initialization. Invoked by the /repo-help command and the repo-initialize flow.
4
+ license: MIT
5
+ ---
6
+
7
+ # Repo Help
8
+
9
+ Display the following reference to the user exactly as written. Do not summarize.
10
+
11
+ ## Commands
12
+
13
+ ### Not sure where to start?
14
+
15
+ **`/init`** (alias: `/repo-initialize`): Initialize the project. Presents a single form with all setup questions (project type, history, architecture, design, evidence), then executes the selected steps.
16
+
17
+ **`/repo-onboard`**: Guided tour of the project and its agentic infrastructure. Explains agents, commands, skills, OpenSpec workflow, and configuration. Read-only: no files modified.
18
+
19
+ **`/repo-audit`**: Read-only health audit of every configured source root. Loads the fullstack engineer's abilities, checks guardrails, architecture, tooling, dependencies, lockfiles, tests, and CI, then reports prioritized findings.
20
+
21
+ **`/plan-explore`**: Your backlog is unclear, you have a half-formed idea, or you need to think through a problem before committing to a plan. This is a thinking partner, not an executor.
22
+
23
+ **`/plan-story <feature or need>`**: Write a detailed, repo-aware user story from a feature idea. Loads the `@user-story` skill (Mike Cohn format + Gherkin acceptance criteria), analyzes your codebase for concrete context, and produces a development-ready story with specific personas, real outcomes, and testable criteria grounded in your actual file paths, component names, and data models. No files written — just the story.
24
+
25
+ **`/plan-propose <url or idea>`**: You have a work item URL, or a clear idea and you want to turn it into a structured plan (proposal, specs, tasks). Enriches each task with the best matching agent and model before showing you the plan. Nothing is implemented until you confirm.
26
+
27
+ ---
28
+
29
+ ### Ready to implement?
30
+
31
+ **`/plan-quick <task>`**: Quick plan for focused changes. Reads the codebase, creates a task checklist in the Todo pane. No files, no OpenSpec. Then you decide: `/plan-apply` to implement, or `/plan-propose` for a full OpenSpec plan.
32
+
33
+ **`/plan-apply`**: Implement a plan. Detects the source automatically: OpenSpec-annotated tasks (from `/plan-propose`) run as parallel subagent waves; Todo pane tasks (from `/plan-quick`) run sequentially in-session.
34
+
35
+ **`/plan-goal <feature or URL>`**: Fully autonomous, no confirmations. Branches off `main`, then runs propose → apply → archive on that branch (each phase its own commit). Default: merges to `main` and deletes the branch. Add `push` keyword to push the branch only. Add `pr` keyword to push + create a PR. Built for loop-engineering / unattended runs. Stops only on a hard failure, leaving the branch unmerged.
36
+
37
+ ---
38
+
39
+ ### Done implementing?
40
+
41
+ **`/ops-ship`**: Create a PR for the current feature branch with screenshots if UI changed.
42
+
43
+ **`/ops-review`**: Read and triage PR review feedback. If you share a PR URL or say "I've added comments to the PR", it reads and classifies the review comments so you know what to fix. Fixing is done via `/plan-apply`.
44
+
45
+ **`/ops-backlog`**: Create an issue in the backlog platform (GitHub, Azure DevOps, Jira) from a description.
46
+
47
+ **`/ops-evidence`**: Produce evidence a completed change works and publish it to the originating issue/PR. Uses `playwright-cli` (headless) and `pnpm run dev` to capture screenshots at desktop and mobile viewports, writes `evidence/evidence.json` (passed/skipped/failed/blocked), and upserts an idempotent verified comment. Best-effort. Run it yourself after a change lands; `/plan-goal` does not run it. Works inside CI containers.
48
+
49
+ **`/plan-archive`**: Mark a completed change as archived in OpenSpec. Run this after the PR is merged.
50
+
51
+ ---
52
+
53
+ ### Maintaining the project?
54
+
55
+ **`/make-engineer`**: Add a custom specialist engineer to the team. Interactive persona-driven form: pick a persona, then confirm an inspected-and-recommended set of skills (architecture/patterns like FSD or design patterns, framework, testing, infra) before anything installs. Future `/plan-apply` runs will prefer it when its domain matches.
56
+
57
+ **`/make-architecture`**: Regenerate `ARCHITECTURE.md` from the current codebase. Safe to rerun any time the architecture evolves.
58
+
59
+ **`/make-design`**: Regenerate `DESIGN.md` from the design system (Tailwind, CSS vars, tokens, etc.).
60
+
61
+ **`/make-guardrails`**: Generate a `pc-guardrails-project` skill from `ARCHITECTURE.md` and project config files. Extracts concrete rules (architecture boundaries, naming, code style, testing, git workflow) that all agents must follow. Updates every `*-engineer.md` to load the skill.
62
+
63
+ **`/repo-verify`**: Write a reproduction plan for the current branch's change as a journey of agent-browser waypoints stored with the change in `verification-plan.md`. Traces backend-only changes through to the frontend when the changed contract is consumed there; writes a `not-applicable` stub when no UI surface is reachable. Does not run checks, launch a browser, or take screenshots — the checks gate lives in `pc-plan-apply` step 10, and the plan is executed later by a separate agent-browser skill. It runs automatically in `/plan-goal`.
64
+
65
+ **`/make-user-model <tier> <model>`**: Set the model for a tier (`plan`, `build`, or `fast`). Writes to `.opencode/harness.json` (`models`). Use `user` prefix for a personal override: `/make-user-model user fast opencode/big-pickle`. Use a model id or `current` for the active session model. Restart opencode for the `pc-subagent-tiers` plugin to rebuild tier agents.
66
+
67
+ ---
68
+
69
+ ### Typical workflows
70
+
71
+ **Complex change:**
72
+ ```
73
+ /plan-explore ← optional: think it through first
74
+ /plan-propose ← create the plan
75
+ /plan-apply ← implement with the team
76
+ /ops-ship ← ship
77
+ /plan-archive ← close out
78
+ ```
79
+
80
+ **Quick change:**
81
+ ```
82
+ /plan-quick ← create a focused task list
83
+ /plan-apply ← implement
84
+ ```
85
+
86
+ **Unattended / loop-engineering:**
87
+ ```
88
+ /plan-goal <description> ← full pipeline, no interaction
89
+ ```