@plainconceptsplatform/agent-harness 2.5.2 → 2.6.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,36 +1,123 @@
1
1
  ---
2
2
  name: pc-repo-verify
3
- description: Verify and repair current-branch changes using applicable fullstack engineer abilities, project checks, and dependency rules. Invoked by /repo-verify and the plan-goal pipeline.
3
+ description: Write a reproduction plan for the completed change as a journey of agent-browser waypoints stored with the change. Does not run checks, launch a browser, or take screenshots. Invoked by /repo-verify and the plan-goal pipeline.
4
4
  license: MIT
5
5
  ---
6
6
 
7
7
  # Repo Verify
8
8
 
9
- Verify the current branch before it is archived, shipped, or handed to an external automation gate. Work only on the current branch: do not switch branches, push, create pull requests or backlog items, or contact external platforms.
9
+ Write the verification plan for the current branch's change. The checks gate lives in `pc-plan-apply` step 10 (lint, typecheck, test, build). This skill produces the reproduction plan instead: a journey through the new functionality with observation waypoints, written so a later agent-browser executor skill can follow it verbatim.
10
10
 
11
- ## Step 1: Load verification rules
11
+ This skill never launches a browser, never takes a screenshot, never starts a server. It only reads the change and writes a plan file. It is the agent-executed counterpart to `pc-ops-evidence`, whose `capturePlan` stays the CI-side screenshot workflow.
12
12
 
13
- 1. Read `.opencode/agents/fullstack-engineer.md`.
14
- 2. Parse every `@skill-name` in its `## Abilities` section.
15
- 3. Load every listed skill, guardrails first. A missing referenced skill is a verification failure; report it and do not claim `VERIFIED`.
13
+ Work only on the current branch: do not switch branches, push, create pull requests, or contact external platforms. Write the plan into the change directory; it is carried into the archive by `pc-plan-archive`.
16
14
 
17
- ## Step 2: Determine changed scope
15
+ ## Step 1: Read the change
18
16
 
19
- 1. Read `.opencode/source-roots.json` when it exists. Use its non-empty `roots` array; otherwise use the repository root.
20
- 2. Inspect `git diff` against the branch base and the working tree. Map every changed path to a configured root and discovered project.
21
- 3. Discover every project in every configured source root. Read each project's manifest, scripts, test configuration, CI configuration, and applicable guardrail instructions.
22
- 4. Build a check matrix. Include every discovered project's repository-defined immutable dependency install or restore command, build command, and test command, even when that project is untouched. Add changed-scope lint, typecheck, migration, generated-artifact, documentation, evidence, and required repository-wide checks from loaded guardrails.
17
+ 1. Resolve the change id from the caller (autonomous mode) or from the current branch's unarchived change under `openspec/changes/<change-id>/`. Read `proposal.md`, `tasks.md`, and `design.md` when present.
18
+ 2. Read `.opencode/source-roots.json` when it exists; use its non-empty `roots` array to scope frontend source, otherwise use the repository root.
19
+ 3. Inspect `git diff` against the branch base and the working tree for context on what changed.
23
20
 
24
- ## Step 3: Verify and repair
21
+ ## Step 2: Determine UI impact
25
22
 
26
- Run every discovered project's repository-defined immutable dependency install or restore command, build command, and test command. Run the changed-scope lint, typecheck, migration, generated-artifact, documentation, and evidence checks. A project without one of those commands is the only allowed skip, and the report must name the missing command.
23
+ Decide whether the change is reachable from something a user sees or does in the browser.
27
24
 
28
- When a dependency manifest changes, require its ecosystem lockfile to change when the package manager uses one. The dependency install or restore command must validate that lockfile without mutating it.
25
+ 1. **Direct** — changed files include user-visible UI: `*.tsx`/`jsx`/`vue`/`svelte`, `*.css`/`scss`/`less`, pages, layouts, components, navigation, routes. The affected surfaces are the routes/components the diff touches.
26
+ 2. **Indirect (backend-only diff, frontend-affected)** — the diff touches only API/backend code, but the changed contract is consumed by the frontend. Trace it: for every changed endpoint, route, handler, query, or exported function, search the frontend source roots for references to that name or path. If any reference exists, the frontend **is** affected. Map the surfaces (the routes/components that import or call the changed contract) and build the journey through them, treating the API change as an indirect UI change.
27
+ 3. **None** — no path reaches the frontend. Write the stub plan (Step 3, `status: not-applicable`) and stop. Do not fabricate a journey.
29
28
 
30
- When a check fails, repair only the current branch's relevant files and rerun the failed check. Continue until every applicable check passes or a hard blocker prevents progress. Never hide a failure by deleting tests, weakening checks, or reverting requested work.
29
+ Mixed or unknown counts as affected: be safe.
31
30
 
32
- Once every check passes, run the project's lint fix command over the files you changed (`pnpm lint:fix`, `pnpm exec biome check --write <changed-files>`, or its equivalent). Formatting is not a review comment worth anybody's turn, and a branch that fails lint on arrival gets sent back for it. Where no fix command exists, run lint and correct what it reports.
31
+ ## Step 3: Write the plan
32
+
33
+ Write `verification-plan.md` into the change directory:
34
+
35
+ ```
36
+ openspec/changes/<change-id>/verification-plan.md
37
+ ```
38
+
39
+ The plan is written in agent-browser idiom so a future executor skill can follow it verbatim. Format:
40
+
41
+ ```markdown
42
+ # verification-plan.md — <change-id>
43
+
44
+ environment:
45
+ start: pnpm run dev
46
+ url: http://localhost:3000
47
+ login: mock-sso
48
+ data: |
49
+ <seed/data preconditions, or "none">
50
+
51
+ journey:
52
+ - id: 1
53
+ arrive:
54
+ - agent-browser open http://localhost:3000/
55
+ - agent-browser wait --load networkidle
56
+ waypoint: wp-1-home
57
+ capture: home
58
+ expect: homepage renders; nav is visible
59
+
60
+ - id: 2
61
+ arrive:
62
+ - agent-browser find text "Items" click
63
+ waypoint: wp-2-items-list
64
+ capture: items-list
65
+ expect: the items list shows the seeded rows
66
+
67
+ - id: 3
68
+ arrive:
69
+ - agent-browser find first ".item-row" click
70
+ - agent-browser wait --load networkidle
71
+ waypoint: wp-3-detail-before
72
+ capture: detail-before
73
+ expect: the item detail panel is open and shows the record
74
+
75
+ - id: 4
76
+ arrive:
77
+ - agent-browser find role button click --name "Status"
78
+ waypoint: wp-4-detail-active
79
+ capture: detail-active
80
+ expect: the status badge now reads "Active"
81
+ ```
82
+
83
+ Replace the example routes, captions, locators, and expectations with the actual change. Locators must be agent-browser-native and stable: prefer `find role`, `find text`, `find label`, `find testid`; use CSS selectors only when no semantic locator exists. Use `wait --load networkidle` (or `wait <selector>` / `wait --text "<known>"`) so the executor reaches the state before observing.
84
+
85
+ ### Waypoint rules
86
+
87
+ 1. The first waypoint is always the baseline at `/`: `wp-1-home`, `capture: home`.
88
+ 2. Place waypoints as a pre/post pair around the changed behavior — the state immediately before and immediately after the core change is exercised.
89
+ 3. Every waypoint has a `waypoint:` id (`wp-<n>-<slug>`), a `capture:` id (kebab-case, unique), and an `expect:` line stating what must be observable there.
90
+ 4. Dynamic data uses `sampleId: first` or `sampleId: any` in the `data:` block; locators that target a record resolve through it.
91
+ 5. The number of waypoints is the minimum that reproduces and proves the behavior — not every screenshottable moment, just the meaningful observation points.
92
+
93
+ ### When the change is not UI-reachable
94
+
95
+ Write the stub and stop:
96
+
97
+ ```markdown
98
+ # verification-plan.md — <change-id>
99
+
100
+ status: not-applicable
101
+ reason: |
102
+ Change is backend-only and no frontend code references the changed contract
103
+ (<names>). No user-visible journey exists; the executor skill should skip.
104
+ ```
105
+
106
+ Adapt the reason to the actual change. Do not invent a journey when Step 2 concluded `None`.
107
+
108
+ ### Rules for writing
109
+
110
+ - This skill MUST NOT launch a browser, start the app, take screenshots, or run build/test/lint. Those belong elsewhere.
111
+ - Never commit, stage, or push verifications. The caller owns git.
112
+ - The plan file is the only artifact written. Do not modify the change's specs, tasks, or proposal.
113
+ - Keep locators stable and observable: prefer semantic locators over brittle CSS paths.
33
114
 
34
115
  ## Step 4: Result
35
116
 
36
- Report a check matrix with command, affected project, result, and skip reason where applicable. Report `VERIFIED` only when every applicable check passed, every dependency change has consistent lockfiles, and no required ability is missing. Otherwise report `NOT VERIFIED`, the blockers, and the exact next command.
117
+ Report one of:
118
+
119
+ - `PLAN_WRITTEN <change-id>` — a journey with waypoints was written to `verification-plan.md`.
120
+ - `STUB_WRITTEN <change-id>` — `status: not-applicable` stub written with a reason.
121
+ - `NOT WRITTEN` — hard blocker (unreadable change, missing change directory). Report the blocker and the exact next step.
122
+
123
+ A correct plan file written to the change directory is the success condition. Write a stub for non-UI changes; never skip writing the file.
@@ -2,8 +2,7 @@
2
2
  >
3
3
  > This file has not been populated yet. It is intentionally empty.
4
4
  >
5
- > **If this is a greenfield project** (no codebase exists yet): skip this for now.
6
- > Come back and run `/make-architecture` once you have meaningful code, structure, or infrastructure in place.
5
+ > **If this is a greenfield project** (no codebase exists yet): skip this for now. Come back and run `/make-architecture` once you have meaningful code, structure, or infrastructure in place.
7
6
  >
8
7
  > **If this is a brownfield project** (existing codebase): run this command now to generate the architecture documentation:
9
8
  >
@@ -11,6 +10,4 @@
11
10
  > /make-architecture
12
11
  > ```
13
12
  >
14
- > This command analyzes your folder structure, config files, routes, data models, integrations, and build setup,
15
- > then writes a complete ARCHITECTURE.md covering components, data flow, tech stack, deployment, and more.
16
- > It is safe to rerun any time the architecture changes significantly.
13
+ > This command analyzes your folder structure, config files, routes, data models, integrations, and build setup, then writes a complete ARCHITECTURE.md covering components, data flow, tech stack, deployment, and more. It is safe to rerun any time the architecture changes significantly.
package/harness/DESIGN.md CHANGED
@@ -2,8 +2,7 @@
2
2
  >
3
3
  > This file has not been populated yet. It is intentionally empty.
4
4
  >
5
- > **If this is a greenfield project** (no UI exists yet): skip this for now.
6
- > Come back and run `/make-design` once you have a design system, UI components, or styles in place.
5
+ > **If this is a greenfield project** (no UI exists yet): skip this for now. Come back and run `/make-design` once you have a design system, UI components, or styles in place.
7
6
  >
8
7
  > **If this is a brownfield project** (existing UI/styles): run this command now to generate the design documentation:
9
8
  >
@@ -11,6 +10,4 @@
11
10
  > /make-design
12
11
  > ```
13
12
  >
14
- > This command analyzes your CSS, Tailwind config, component files, and design tokens,
15
- > then writes a complete DESIGN.md with structured YAML tokens and written design intent.
16
- > It is safe to rerun any time your design system changes.
13
+ > This command analyzes your CSS, Tailwind config, component files, and design tokens, then writes a complete DESIGN.md with structured YAML tokens and written design intent. It is safe to rerun any time your design system changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/agent-harness",
3
- "version": "2.5.2",
3
+ "version": "2.6.0",
4
4
  "description": "Installs the Plain Concepts Platform Harness into any codebase, and keeps it up to date. Wires OpenCode, OpenSpec, codegraph, and agentmemory into a multi-agent workflow that runs on native parallel subagents.",
5
5
  "keywords": [
6
6
  "opencode",
@@ -52,6 +52,7 @@
52
52
  "@eslint/js": "^9.0.0",
53
53
  "eslint": "^9.0.0",
54
54
  "globals": "^15.0.0",
55
+ "markdownlint-cli2": "0.23.2",
55
56
  "vitest": "^4.1.5"
56
57
  },
57
58
  "vitest": {
@@ -60,6 +61,8 @@
60
61
  "scripts": {
61
62
  "lint": "eslint .",
62
63
  "lint:fix": "eslint . --fix",
64
+ "lint:md": "markdownlint-cli2 \"**/*.md\"",
65
+ "lint:md:fix": "markdownlint-cli2 --fix \"**/*.md\"",
63
66
  "test": "vitest run",
64
67
  "test:watch": "vitest",
65
68
  "release:dry": "pnpm publish --dry-run --no-git-checks --access public",