@plainconceptsplatform/agent-harness 3.5.0 → 3.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.
- package/LICENSE +21 -21
- package/README.md +471 -454
- package/cli/commands/join.js +259 -259
- package/cli/commands/migrate.js +310 -310
- package/cli/commands/shared.js +27 -27
- package/cli/commands/single.js +79 -79
- package/cli/commands/update.js +121 -121
- package/cli/commands/wizard.js +134 -134
- package/cli/fragments/archive/az.md +97 -97
- package/cli/fragments/archive/gh.md +96 -96
- package/cli/fragments/archive/gl.md +96 -96
- package/cli/fragments/archive/none.md +75 -75
- package/cli/fragments/guardrails/codegraph.md +5 -5
- package/cli/fragments/guardrails/humanizer.md +4 -4
- package/cli/fragments/guardrails/memory.md +4 -4
- package/cli/fragments/guardrails/rtk.md +3 -3
- package/cli/fragments/guardrails/simple-english.md +4 -4
- package/cli/fragments/ops-backlog/az.md +28 -28
- package/cli/fragments/ops-backlog/gh.md +28 -28
- package/cli/fragments/ops-backlog/jira.md +28 -28
- package/cli/fragments/ops-review/az.md +62 -62
- package/cli/fragments/ops-review/gh.md +51 -51
- package/cli/fragments/ops-review/gl.md +55 -55
- package/cli/fragments/ops-ship/az.md +81 -81
- package/cli/fragments/ops-ship/gh.md +67 -67
- package/cli/fragments/ops-ship/gl.md +84 -84
- package/cli/index.js +116 -116
- package/cli/presets/agents-content.json +34 -34
- package/cli/presets/browser.json +10 -10
- package/cli/presets/clean.json +21 -21
- package/cli/presets/models.json +68 -68
- package/cli/presets/optimization.json +32 -32
- package/cli/presets/platforms.json +76 -76
- package/cli/presets/source.json +23 -23
- package/cli/steps/browser/index.js +48 -48
- package/cli/steps/clean/index.js +120 -120
- package/cli/steps/copy/agents.js +120 -120
- package/cli/steps/copy/commands.js +79 -79
- package/cli/steps/copy/fullstack-engineer.js +89 -89
- package/cli/steps/copy/index.js +88 -88
- package/cli/steps/copy/opencode-json.js +324 -324
- package/cli/steps/copy/skills.js +316 -316
- package/cli/steps/metadata/index.js +115 -115
- package/cli/steps/models/format.js +88 -88
- package/cli/steps/models/index.js +64 -64
- package/cli/steps/models/write.js +38 -38
- package/cli/steps/openspec/index.js +136 -136
- package/cli/steps/optimization/codegraph.js +141 -141
- package/cli/steps/optimization/detect.js +66 -66
- package/cli/steps/optimization/humanizer.js +17 -17
- package/cli/steps/optimization/index.js +158 -158
- package/cli/steps/optimization/memory.js +91 -91
- package/cli/steps/optimization/patch-guardrails.js +111 -111
- package/cli/steps/optimization/simple-english.js +17 -17
- package/cli/steps/optimization/skills-lock.js +30 -30
- package/cli/steps/platform/index.js +109 -109
- package/cli/steps/source/index.js +123 -123
- package/cli/utils/agent-color.js +111 -111
- package/cli/utils/copy.js +134 -134
- package/cli/utils/exec-spinner.js +47 -47
- package/cli/utils/exec.js +134 -134
- package/cli/utils/legacy-check.js +30 -30
- package/cli/utils/models-cache.js +58 -58
- package/cli/utils/models-pricing.js +42 -42
- package/cli/utils/paths.js +81 -81
- package/cli/utils/process.js +3 -3
- package/cli/utils/terminal.js +6 -6
- package/cli/utils/update-manifest.js +75 -75
- package/harness/.opencode/_gitignore +10 -10
- package/harness/.opencode/commands/init.md +5 -5
- package/harness/.opencode/commands/make-architecture.md +5 -5
- package/harness/.opencode/commands/make-design.md +5 -5
- package/harness/.opencode/commands/make-engineer.md +5 -5
- package/harness/.opencode/commands/make-guardrails.md +5 -5
- package/harness/.opencode/commands/make-user-model.md +5 -5
- package/harness/.opencode/commands/ops-backlog.md +10 -10
- package/harness/.opencode/commands/ops-review.md +10 -10
- package/harness/.opencode/commands/ops-ship.md +9 -9
- package/harness/.opencode/commands/plan-apply.md +9 -9
- package/harness/.opencode/commands/plan-archive.md +7 -7
- package/harness/.opencode/commands/plan-explore.md +11 -11
- package/harness/.opencode/commands/plan-goal.md +5 -5
- package/harness/.opencode/commands/plan-propose.md +11 -11
- package/harness/.opencode/commands/plan-quick.md +7 -7
- package/harness/.opencode/commands/plan-story.md +11 -11
- package/harness/.opencode/commands/repo-audit.md +7 -7
- package/harness/.opencode/commands/repo-help.md +5 -5
- package/harness/.opencode/commands/repo-initialize.md +5 -5
- package/harness/.opencode/commands/repo-onboard.md +5 -5
- package/harness/.opencode/commands/repo-verify.md +5 -5
- package/harness/.opencode/package.json +5 -5
- package/harness/.opencode/plugins/pc-commit-coauthor.js +41 -0
- package/harness/.opencode/plugins/pc-subagent-monitor.js +184 -184
- package/harness/.opencode/plugins/pc-subagent-tiers.js +367 -367
- package/harness/.opencode/plugins/pc-system-reminders.js +404 -386
- package/harness/.opencode/scripts/check-diff.mjs +279 -252
- package/harness/.opencode/scripts/code-rules.mjs +288 -288
- package/harness/.opencode/scripts/platform-manifest.mjs +112 -0
- package/harness/AGENTS.md +49 -49
- package/harness/ARCHITECTURE.md +13 -13
- package/harness/DESIGN.md +13 -13
- package/harness/opencode.jsonc +36 -36
- package/harness/openspec/config.yaml +20 -20
- package/harness/skills-lock.json +17 -17
- package/package.json +14 -12
- package/skills/README.md +18 -18
- package/skills/agent-harness-cli/SKILL.md +86 -86
- package/skills/browser-automation/SKILL.md +72 -72
- package/skills/pc-guardrails-generic/SKILL.md +53 -53
- package/skills/pc-guardrails-project/SKILL.md +8 -8
- package/skills/pc-make-architecture/SKILL.md +33 -32
- package/skills/pc-make-architecture/structure-template.md +64 -64
- package/skills/pc-make-design/SKILL.md +45 -45
- package/skills/pc-make-engineer/SKILL.md +59 -59
- package/skills/pc-make-engineer/signal-mapping.md +53 -53
- package/skills/pc-make-engineer/template.md +36 -36
- package/skills/pc-make-guardrails/SKILL.md +44 -44
- package/skills/pc-make-guardrails/category-reference.md +112 -112
- package/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
- package/skills/pc-make-merge-risk-assess/category-reference.md +114 -114
- package/skills/pc-make-user-model/SKILL.md +56 -56
- package/skills/pc-ops-ship/SKILL.md +22 -22
- package/skills/pc-plan-apply/SKILL.md +88 -88
- package/skills/pc-plan-apply/simple-mode.md +21 -21
- package/skills/pc-plan-archive/SKILL.md +66 -66
- package/skills/pc-plan-explore/SKILL.md +21 -21
- package/skills/pc-plan-goal/SKILL.md +91 -91
- package/skills/pc-plan-goal/branching.md +39 -39
- package/skills/pc-plan-goal/failure-policy.md +30 -30
- package/skills/pc-plan-goal/output-mode.md +10 -10
- package/skills/pc-plan-goal/output.md +71 -71
- package/skills/pc-plan-propose/SKILL.md +125 -125
- package/skills/pc-plan-propose/task-annotation.md +39 -39
- package/skills/pc-plan-quick/SKILL.md +46 -46
- package/skills/pc-plan-story/SKILL.md +93 -93
- package/skills/pc-repo-audit/SKILL.md +44 -44
- package/skills/pc-repo-help/SKILL.md +87 -87
- package/skills/pc-repo-initialize/SKILL.md +119 -119
- package/skills/pc-repo-onboard/SKILL.md +32 -32
- package/skills/pc-repo-verify/SKILL.md +150 -150
- package/skills/pc-userstory-az/SKILL.md +71 -71
- package/skills/pc-userstory-browser/SKILL.md +64 -64
- package/skills/pc-userstory-gh/SKILL.md +63 -63
- package/skills/pc-userstory-jira/SKILL.md +74 -74
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-repo-verify
|
|
3
|
-
description: Write the verification plan for the completed change, a journey through the new functionality as a fenced YAML block that the evidence workflow replays in headless Chromium after the pull request merges. Does not run checks, launch a browser, or take screenshots. Invoked by /repo-verify and the plan-goal pipeline.
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Repo Verify
|
|
8
|
-
|
|
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 one screenshot per waypoint.
|
|
10
|
-
|
|
11
|
-
The plan is executed by a machine, not read by one. When the pull request merges, the evidence workflow (`evidence.yml` from `@plainconceptsplatform/workflows`) checks out the pull request head, starts the app, replays every step below in headless Chromium with no model in the loop, and archives one screenshot per waypoint in an `evidence/` folder beside this plan on the default branch, shown in one comment on the pull request. A step it cannot follow is a screenshot of the wrong screen. Write every step so it can be followed literally from a freshly started app.
|
|
12
|
-
|
|
13
|
-
This skill never launches a browser, never takes a screenshot, never starts a server. It only reads the change and writes a plan file.
|
|
14
|
-
|
|
15
|
-
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`. Never create or edit an `evidence/` folder: the workflow writes it beside the archived plan after the merge.
|
|
16
|
-
|
|
17
|
-
## Project environment
|
|
18
|
-
|
|
19
|
-
How this project's app starts, where it answers, how a person signs in locally, and what data a fresh start already has. Read it before writing a journey; it is the project's, and an update keeps it.
|
|
20
|
-
|
|
21
|
-
<!-- PC-PROJECT-ENVIRONMENT-START -->
|
|
22
|
-
- Start: `pnpm run dev` at the repository root brings up the whole stack with mock authentication.
|
|
23
|
-
- URL: `http://localhost:3000`.
|
|
24
|
-
- Sign-in: none recorded yet. Find the local sign-in (a mock account picker, a dev login button) in the source and write its steps into the first waypoint.
|
|
25
|
-
- Seeded data: none recorded yet. Create what the journey needs through the UI.
|
|
26
|
-
<!-- PC-PROJECT-ENVIRONMENT-END -->
|
|
27
|
-
|
|
28
|
-
## Step 1: Read the change
|
|
29
|
-
|
|
30
|
-
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.
|
|
31
|
-
2. Read `.opencode/source-roots.json` when it exists; use its non-empty `roots` array to scope frontend source, otherwise use the repository root.
|
|
32
|
-
3. Inspect `git diff` against the branch base and the working tree for context on what changed.
|
|
33
|
-
|
|
34
|
-
## Step 2: Determine UI impact
|
|
35
|
-
|
|
36
|
-
Decide whether the change is reachable from something a user sees or does in the browser.
|
|
37
|
-
|
|
38
|
-
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.
|
|
39
|
-
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.
|
|
40
|
-
3. **None**: no path reaches the frontend. Write the stub plan (Step 3, `status: not-applicable`) and stop. Do not fabricate a journey.
|
|
41
|
-
|
|
42
|
-
Mixed or unknown counts as affected: be safe.
|
|
43
|
-
|
|
44
|
-
## Step 3: Write the plan
|
|
45
|
-
|
|
46
|
-
Write `verification-plan.md` into the change directory:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
openspec/changes/<change-id>/verification-plan.md
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Prose around the block is for people and is ignored by the replay. The replay reads the first fenced `yaml` block that holds a `journey`:
|
|
53
|
-
|
|
54
|
-
````markdown
|
|
55
|
-
# Verification plan: <change-id>
|
|
56
|
-
|
|
57
|
-
One or two sentences on what the journey proves.
|
|
58
|
-
|
|
59
|
-
```yaml
|
|
60
|
-
url: http://localhost:3000
|
|
61
|
-
journey:
|
|
62
|
-
- capture: home
|
|
63
|
-
expect: signed in, the item list is the home page
|
|
64
|
-
steps:
|
|
65
|
-
- open: /
|
|
66
|
-
- click: { role: button, name: Alice Admin }
|
|
67
|
-
- wait: { role: heading, name: Items }
|
|
68
|
-
|
|
69
|
-
- capture: detail-before
|
|
70
|
-
expect: the detail panel shows the item without a status badge
|
|
71
|
-
steps:
|
|
72
|
-
- click: { text: Seeded item }
|
|
73
|
-
- wait: { load: networkidle }
|
|
74
|
-
|
|
75
|
-
- capture: detail-active
|
|
76
|
-
expect: the status badge reads Active
|
|
77
|
-
steps:
|
|
78
|
-
- click: { role: button, name: Activate }
|
|
79
|
-
- wait: { text: Active }
|
|
80
|
-
```
|
|
81
|
-
````
|
|
82
|
-
|
|
83
|
-
### Keys
|
|
84
|
-
|
|
85
|
-
- `url`: where the app answers once started, from the project environment above. Relative `open:` paths resolve against it.
|
|
86
|
-
- `start` (optional): the command that starts the app, only when it is not the project's default.
|
|
87
|
-
- `viewport` (optional): `1280x800` unless the change is about another size.
|
|
88
|
-
- `journey`: the waypoints, in order, in one browser tab. Each has a `capture` (kebab-case, unique), an `expect` (what is visible in the screenshot), and the `steps` that get there from the previous waypoint.
|
|
89
|
-
|
|
90
|
-
### Steps
|
|
91
|
-
|
|
92
|
-
Each step is a map with exactly one action:
|
|
93
|
-
|
|
94
|
-
| Step | Does |
|
|
95
|
-
|---|---|
|
|
96
|
-
| `open: /path` | navigate (relative to `url`, or a full URL) |
|
|
97
|
-
| `click: <locator>` | click; add `button: right` inside the locator for a context menu |
|
|
98
|
-
| `dblclick: <locator>`, `hover: <locator>`, `check: <locator>`, `uncheck: <locator>` | as named |
|
|
99
|
-
| `fill: { <locator>, value: text }` | replace the field's text |
|
|
100
|
-
| `select: { <locator>, value: option }` | choose an option |
|
|
101
|
-
| `press: Enter` or `press: { <locator>, key: Enter }` | press a key |
|
|
102
|
-
| `wait: <locator>` | until the element is visible |
|
|
103
|
-
| `wait: { text: Saved }` | until the text is visible |
|
|
104
|
-
| `wait: { load: networkidle }` | until the page settles; never a failure on its own |
|
|
105
|
-
| `wait: { url: /items/ }` | until the address contains it |
|
|
106
|
-
| `wait: { ms: 500 }` | a fixed pause, only for an animation with nothing to wait on |
|
|
107
|
-
|
|
108
|
-
A locator is one of `{ role: button, name: Save }`, `{ text: Save }`, `{ label: Name }`, `{ placeholder: Search }`, `{ testid: save }`, `{ alt: Logo }`, `{ title: Close }`, or `{ css: ".row" }`, optionally with `nth: 1` or `last: true`. The first match is used.
|
|
109
|
-
|
|
110
|
-
### Rules
|
|
111
|
-
|
|
112
|
-
1. The first waypoint starts with `open` and signs in, using the sign-in from the project environment. The replay starts from a freshly started app with nothing in the browser.
|
|
113
|
-
2. Everything the journey needs that a fresh start does not have, create through the UI in the steps (a record to open, a setting to change). Never assume data from a developer's machine.
|
|
114
|
-
3. Place waypoints as a pre/post pair around the changed behavior: the state immediately before and immediately after the core change is exercised.
|
|
115
|
-
4. Use the minimum number of waypoints that reproduces and proves the behavior, normally three to six.
|
|
116
|
-
5. Locators name what a person sees: prefer `role` with `name`, then `label`, `text`, `testid`. Copy visible text from the source's default-language strings exactly, not from memory. Use `css` only when nothing semantic exists.
|
|
117
|
-
6. Wait for the state before each capture: end every waypoint's steps with a `wait` on something the screenshot is meant to show.
|
|
118
|
-
7. Only the steps above replay. Network inspection, console reads, and API calls do not; prove those in tests, not here.
|
|
119
|
-
|
|
120
|
-
### When the change is not UI-reachable
|
|
121
|
-
|
|
122
|
-
Write the stub and stop:
|
|
123
|
-
|
|
124
|
-
````markdown
|
|
125
|
-
# Verification plan: <change-id>
|
|
126
|
-
|
|
127
|
-
```yaml
|
|
128
|
-
status: not-applicable
|
|
129
|
-
reason: Backend-only change; no frontend code references the changed contract (<names>).
|
|
130
|
-
```
|
|
131
|
-
````
|
|
132
|
-
|
|
133
|
-
Adapt the reason to the actual change. Do not invent a journey when Step 2 concluded `None`.
|
|
134
|
-
|
|
135
|
-
### Rules for writing
|
|
136
|
-
|
|
137
|
-
- This skill MUST NOT launch a browser, start the app, take screenshots, or run build/test/lint. Those belong elsewhere.
|
|
138
|
-
- Never commit, stage, or push. The caller owns git.
|
|
139
|
-
- The plan file is the only artifact written. Do not modify the change's specs, tasks, or proposal.
|
|
140
|
-
- When the project environment above says `none recorded yet` and you found the real sign-in or start command in the source, say so in the result so a person can record it there.
|
|
141
|
-
|
|
142
|
-
## Step 4: Result
|
|
143
|
-
|
|
144
|
-
Report one of:
|
|
145
|
-
|
|
146
|
-
- `PLAN_WRITTEN <change-id>`: a journey with waypoints was written to `verification-plan.md`.
|
|
147
|
-
- `STUB_WRITTEN <change-id>`: `status: not-applicable` stub written with a reason.
|
|
148
|
-
- `NOT WRITTEN`: hard blocker (unreadable change, missing change directory). Report the blocker and the exact next step.
|
|
149
|
-
|
|
150
|
-
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.
|
|
1
|
+
---
|
|
2
|
+
name: pc-repo-verify
|
|
3
|
+
description: Write the verification plan for the completed change, a journey through the new functionality as a fenced YAML block that the evidence workflow replays in headless Chromium after the pull request merges. Does not run checks, launch a browser, or take screenshots. Invoked by /repo-verify and the plan-goal pipeline.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Repo Verify
|
|
8
|
+
|
|
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 one screenshot per waypoint.
|
|
10
|
+
|
|
11
|
+
The plan is executed by a machine, not read by one. When the pull request merges, the evidence workflow (`evidence.yml` from `@plainconceptsplatform/workflows`) checks out the pull request head, starts the app, replays every step below in headless Chromium with no model in the loop, and archives one screenshot per waypoint in an `evidence/` folder beside this plan on the default branch, shown in one comment on the pull request. A step it cannot follow is a screenshot of the wrong screen. Write every step so it can be followed literally from a freshly started app.
|
|
12
|
+
|
|
13
|
+
This skill never launches a browser, never takes a screenshot, never starts a server. It only reads the change and writes a plan file.
|
|
14
|
+
|
|
15
|
+
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`. Never create or edit an `evidence/` folder: the workflow writes it beside the archived plan after the merge.
|
|
16
|
+
|
|
17
|
+
## Project environment
|
|
18
|
+
|
|
19
|
+
How this project's app starts, where it answers, how a person signs in locally, and what data a fresh start already has. Read it before writing a journey; it is the project's, and an update keeps it.
|
|
20
|
+
|
|
21
|
+
<!-- PC-PROJECT-ENVIRONMENT-START -->
|
|
22
|
+
- Start: `pnpm run dev` at the repository root brings up the whole stack with mock authentication.
|
|
23
|
+
- URL: `http://localhost:3000`.
|
|
24
|
+
- Sign-in: none recorded yet. Find the local sign-in (a mock account picker, a dev login button) in the source and write its steps into the first waypoint.
|
|
25
|
+
- Seeded data: none recorded yet. Create what the journey needs through the UI.
|
|
26
|
+
<!-- PC-PROJECT-ENVIRONMENT-END -->
|
|
27
|
+
|
|
28
|
+
## Step 1: Read the change
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
2. Read `.opencode/source-roots.json` when it exists; use its non-empty `roots` array to scope frontend source, otherwise use the repository root.
|
|
32
|
+
3. Inspect `git diff` against the branch base and the working tree for context on what changed.
|
|
33
|
+
|
|
34
|
+
## Step 2: Determine UI impact
|
|
35
|
+
|
|
36
|
+
Decide whether the change is reachable from something a user sees or does in the browser.
|
|
37
|
+
|
|
38
|
+
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.
|
|
39
|
+
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.
|
|
40
|
+
3. **None**: no path reaches the frontend. Write the stub plan (Step 3, `status: not-applicable`) and stop. Do not fabricate a journey.
|
|
41
|
+
|
|
42
|
+
Mixed or unknown counts as affected: be safe.
|
|
43
|
+
|
|
44
|
+
## Step 3: Write the plan
|
|
45
|
+
|
|
46
|
+
Write `verification-plan.md` into the change directory:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
openspec/changes/<change-id>/verification-plan.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Prose around the block is for people and is ignored by the replay. The replay reads the first fenced `yaml` block that holds a `journey`:
|
|
53
|
+
|
|
54
|
+
````markdown
|
|
55
|
+
# Verification plan: <change-id>
|
|
56
|
+
|
|
57
|
+
One or two sentences on what the journey proves.
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
url: http://localhost:3000
|
|
61
|
+
journey:
|
|
62
|
+
- capture: home
|
|
63
|
+
expect: signed in, the item list is the home page
|
|
64
|
+
steps:
|
|
65
|
+
- open: /
|
|
66
|
+
- click: { role: button, name: Alice Admin }
|
|
67
|
+
- wait: { role: heading, name: Items }
|
|
68
|
+
|
|
69
|
+
- capture: detail-before
|
|
70
|
+
expect: the detail panel shows the item without a status badge
|
|
71
|
+
steps:
|
|
72
|
+
- click: { text: Seeded item }
|
|
73
|
+
- wait: { load: networkidle }
|
|
74
|
+
|
|
75
|
+
- capture: detail-active
|
|
76
|
+
expect: the status badge reads Active
|
|
77
|
+
steps:
|
|
78
|
+
- click: { role: button, name: Activate }
|
|
79
|
+
- wait: { text: Active }
|
|
80
|
+
```
|
|
81
|
+
````
|
|
82
|
+
|
|
83
|
+
### Keys
|
|
84
|
+
|
|
85
|
+
- `url`: where the app answers once started, from the project environment above. Relative `open:` paths resolve against it.
|
|
86
|
+
- `start` (optional): the command that starts the app, only when it is not the project's default.
|
|
87
|
+
- `viewport` (optional): `1280x800` unless the change is about another size.
|
|
88
|
+
- `journey`: the waypoints, in order, in one browser tab. Each has a `capture` (kebab-case, unique), an `expect` (what is visible in the screenshot), and the `steps` that get there from the previous waypoint.
|
|
89
|
+
|
|
90
|
+
### Steps
|
|
91
|
+
|
|
92
|
+
Each step is a map with exactly one action:
|
|
93
|
+
|
|
94
|
+
| Step | Does |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `open: /path` | navigate (relative to `url`, or a full URL) |
|
|
97
|
+
| `click: <locator>` | click; add `button: right` inside the locator for a context menu |
|
|
98
|
+
| `dblclick: <locator>`, `hover: <locator>`, `check: <locator>`, `uncheck: <locator>` | as named |
|
|
99
|
+
| `fill: { <locator>, value: text }` | replace the field's text |
|
|
100
|
+
| `select: { <locator>, value: option }` | choose an option |
|
|
101
|
+
| `press: Enter` or `press: { <locator>, key: Enter }` | press a key |
|
|
102
|
+
| `wait: <locator>` | until the element is visible |
|
|
103
|
+
| `wait: { text: Saved }` | until the text is visible |
|
|
104
|
+
| `wait: { load: networkidle }` | until the page settles; never a failure on its own |
|
|
105
|
+
| `wait: { url: /items/ }` | until the address contains it |
|
|
106
|
+
| `wait: { ms: 500 }` | a fixed pause, only for an animation with nothing to wait on |
|
|
107
|
+
|
|
108
|
+
A locator is one of `{ role: button, name: Save }`, `{ text: Save }`, `{ label: Name }`, `{ placeholder: Search }`, `{ testid: save }`, `{ alt: Logo }`, `{ title: Close }`, or `{ css: ".row" }`, optionally with `nth: 1` or `last: true`. The first match is used.
|
|
109
|
+
|
|
110
|
+
### Rules
|
|
111
|
+
|
|
112
|
+
1. The first waypoint starts with `open` and signs in, using the sign-in from the project environment. The replay starts from a freshly started app with nothing in the browser.
|
|
113
|
+
2. Everything the journey needs that a fresh start does not have, create through the UI in the steps (a record to open, a setting to change). Never assume data from a developer's machine.
|
|
114
|
+
3. Place waypoints as a pre/post pair around the changed behavior: the state immediately before and immediately after the core change is exercised.
|
|
115
|
+
4. Use the minimum number of waypoints that reproduces and proves the behavior, normally three to six.
|
|
116
|
+
5. Locators name what a person sees: prefer `role` with `name`, then `label`, `text`, `testid`. Copy visible text from the source's default-language strings exactly, not from memory. Use `css` only when nothing semantic exists.
|
|
117
|
+
6. Wait for the state before each capture: end every waypoint's steps with a `wait` on something the screenshot is meant to show.
|
|
118
|
+
7. Only the steps above replay. Network inspection, console reads, and API calls do not; prove those in tests, not here.
|
|
119
|
+
|
|
120
|
+
### When the change is not UI-reachable
|
|
121
|
+
|
|
122
|
+
Write the stub and stop:
|
|
123
|
+
|
|
124
|
+
````markdown
|
|
125
|
+
# Verification plan: <change-id>
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
status: not-applicable
|
|
129
|
+
reason: Backend-only change; no frontend code references the changed contract (<names>).
|
|
130
|
+
```
|
|
131
|
+
````
|
|
132
|
+
|
|
133
|
+
Adapt the reason to the actual change. Do not invent a journey when Step 2 concluded `None`.
|
|
134
|
+
|
|
135
|
+
### Rules for writing
|
|
136
|
+
|
|
137
|
+
- This skill MUST NOT launch a browser, start the app, take screenshots, or run build/test/lint. Those belong elsewhere.
|
|
138
|
+
- Never commit, stage, or push. The caller owns git.
|
|
139
|
+
- The plan file is the only artifact written. Do not modify the change's specs, tasks, or proposal.
|
|
140
|
+
- When the project environment above says `none recorded yet` and you found the real sign-in or start command in the source, say so in the result so a person can record it there.
|
|
141
|
+
|
|
142
|
+
## Step 4: Result
|
|
143
|
+
|
|
144
|
+
Report one of:
|
|
145
|
+
|
|
146
|
+
- `PLAN_WRITTEN <change-id>`: a journey with waypoints was written to `verification-plan.md`.
|
|
147
|
+
- `STUB_WRITTEN <change-id>`: `status: not-applicable` stub written with a reason.
|
|
148
|
+
- `NOT WRITTEN`: hard blocker (unreadable change, missing change directory). Report the blocker and the exact next step.
|
|
149
|
+
|
|
150
|
+
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.
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-userstory
|
|
3
|
-
description: Parse Azure DevOps user story URL and create OpenSpec change. Use when user provides an Azure DevOps URL.
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires openspec CLI and Azure CLI.
|
|
6
|
-
metadata:
|
|
7
|
-
author: copilots
|
|
8
|
-
version: "3.1"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Turn an Azure DevOps work item URL into an OpenSpec change, then hand the change to `pc-plan-propose`.
|
|
12
|
-
|
|
13
|
-
## Rules
|
|
14
|
-
|
|
15
|
-
- Work item data comes from `az`, never from a page fetch or a browser (denied by `pc-system-reminders`). An `az` that cannot reach the org is a blocker to report.
|
|
16
|
-
- Never load `pc-plan-apply` until the user has said yes.
|
|
17
|
-
|
|
18
|
-
## Contracts
|
|
19
|
-
|
|
20
|
-
The ID is in the URL: `?workitem=193208` or `/workitems/edit/193208` both give `193208`.
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
az boards work-item show --id 193208
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
That relies on the configured defaults, which is the one piece of setup this skill needs:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
az devops configure --defaults organization=https://dev.azure.com/{org} project={project}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Without them every command needs `--organization`. A PAT with Work Items (Read and Write) and Code (Read and Write) comes from `https://dev.azure.com/{org}/_usersSettings/tokens`.
|
|
33
|
-
|
|
34
|
-
From the JSON take `fields.System.Title`, `fields.System.Description` (often HTML, strip the tags), `fields.System.WorkItemType`, `fields.System.IterationPath`, `fields.System.State` and `fields.System.AcceptanceCriteria` when it is there.
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
openspec new change "us-{id}-{slug}"
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Screenshots live in the change folder, `openspec/changes/{change-name}/images/{name}.png`. Embedding one uses the `_apis/git/repositories` URL, since `_git/` returns HTML: `https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1`
|
|
41
|
-
|
|
42
|
-
Report:
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
## User Story Parsed
|
|
46
|
-
|
|
47
|
-
Work Item: #{id}
|
|
48
|
-
Title: {title}
|
|
49
|
-
Type: User Story
|
|
50
|
-
Iteration: {sprint}
|
|
51
|
-
State: {state}
|
|
52
|
-
|
|
53
|
-
Change Created: us-{id}-{slug}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Then load `pc-plan-propose` (interactive) and, once it returns, ask:
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{
|
|
60
|
-
"questions": [
|
|
61
|
-
{
|
|
62
|
-
"header": "Ready to implement",
|
|
63
|
-
"question": "Ready to implement?",
|
|
64
|
-
"options": [
|
|
65
|
-
{ "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
|
|
66
|
-
{ "label": "no", "description": "Stop here. You can run /plan-apply later." }
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: pc-userstory
|
|
3
|
+
description: Parse Azure DevOps user story URL and create OpenSpec change. Use when user provides an Azure DevOps URL.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI and Azure CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "3.1"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Turn an Azure DevOps work item URL into an OpenSpec change, then hand the change to `pc-plan-propose`.
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
|
|
15
|
+
- Work item data comes from `az`, never from a page fetch or a browser (denied by `pc-system-reminders`). An `az` that cannot reach the org is a blocker to report.
|
|
16
|
+
- Never load `pc-plan-apply` until the user has said yes.
|
|
17
|
+
|
|
18
|
+
## Contracts
|
|
19
|
+
|
|
20
|
+
The ID is in the URL: `?workitem=193208` or `/workitems/edit/193208` both give `193208`.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
az boards work-item show --id 193208
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
That relies on the configured defaults, which is the one piece of setup this skill needs:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
az devops configure --defaults organization=https://dev.azure.com/{org} project={project}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Without them every command needs `--organization`. A PAT with Work Items (Read and Write) and Code (Read and Write) comes from `https://dev.azure.com/{org}/_usersSettings/tokens`.
|
|
33
|
+
|
|
34
|
+
From the JSON take `fields.System.Title`, `fields.System.Description` (often HTML, strip the tags), `fields.System.WorkItemType`, `fields.System.IterationPath`, `fields.System.State` and `fields.System.AcceptanceCriteria` when it is there.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
openspec new change "us-{id}-{slug}"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Screenshots live in the change folder, `openspec/changes/{change-name}/images/{name}.png`. Embedding one uses the `_apis/git/repositories` URL, since `_git/` returns HTML: `https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1`
|
|
41
|
+
|
|
42
|
+
Report:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
## User Story Parsed
|
|
46
|
+
|
|
47
|
+
Work Item: #{id}
|
|
48
|
+
Title: {title}
|
|
49
|
+
Type: User Story
|
|
50
|
+
Iteration: {sprint}
|
|
51
|
+
State: {state}
|
|
52
|
+
|
|
53
|
+
Change Created: us-{id}-{slug}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then load `pc-plan-propose` (interactive) and, once it returns, ask:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"questions": [
|
|
61
|
+
{
|
|
62
|
+
"header": "Ready to implement",
|
|
63
|
+
"question": "Ready to implement?",
|
|
64
|
+
"options": [
|
|
65
|
+
{ "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
|
|
66
|
+
{ "label": "no", "description": "Stop here. You can run /plan-apply later." }
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-userstory
|
|
3
|
-
description: Parse work item from any URL using browser automation. Use when user provides a URL that doesn't match GitHub/Azure/Jira CLI platforms, or when backlog platform is 'browser'.
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires agent-browser CLI installed and openspec CLI.
|
|
6
|
-
metadata:
|
|
7
|
-
author: copilots
|
|
8
|
-
version: "2.0"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Read a work item off its own web page, for a backlog with no CLI, then hand the change to `pc-plan-propose`. This is the fallback: a GitHub, Azure DevOps or Jira URL belongs to the CLI skill for that platform, which is faster and cannot misread a page.
|
|
12
|
-
|
|
13
|
-
Browser is a backlog-only platform. Shipping runs on whichever repo platform the project configured.
|
|
14
|
-
|
|
15
|
-
## Rules
|
|
16
|
-
|
|
17
|
-
- Navigate only to a URL the user gave you. This skill is the one exception to `browser-automation`'s ban on leaving localhost, and it is that narrow on purpose: a work-item page is behind the user's own login, and anything else reachable from it is too.
|
|
18
|
-
- Read only. No clicking, no status changes, nothing written back to the tracker.
|
|
19
|
-
- Always reuse the `backlog` session so the login survives; a login page instead of the work item means the session is not authenticated, and the user has to log in manually in the opened window before a retry.
|
|
20
|
-
|
|
21
|
-
## Contracts
|
|
22
|
-
|
|
23
|
-
`agent-browser` runs its own Chrome, not the user's daily browser, and keeps state per session:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
agent-browser --session backlog --restore open "https://the-url-the-user-provided"
|
|
27
|
-
agent-browser wait --load networkidle
|
|
28
|
-
agent-browser snapshot
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
`agent-browser doctor` verifies the install. The accessibility tree from `snapshot` locates fields more reliably than page text; `agent-browser read` and `agent-browser get text "h1"` fill the gaps, and `agent-browser get url` confirms the page did not navigate away. A single-page app that renders after idle needs a second wait (`--text "<known heading>"` when a stable string exists) and a fresh snapshot, not a sleep.
|
|
32
|
-
|
|
33
|
-
Take the title, description with its acceptance criteria or definition of done, the ID from the URL or the page, and status, assignee, priority and labels when they are visible. Where to look, by tool:
|
|
34
|
-
|
|
35
|
-
| Tool | Work item URL | Title | Description |
|
|
36
|
-
|---|---|---|---|
|
|
37
|
-
| Azure DevOps | `/_workitems/edit/{id}` | header | "Description" and "Acceptance Criteria" sections |
|
|
38
|
-
| Linear | `/{team}/issue/{key}` | issue title | issue body |
|
|
39
|
-
| Jira | `/browse/{key}` | summary | description field |
|
|
40
|
-
| Trello | `/c/{short-id}` | card title | card description |
|
|
41
|
-
| Anything else | as given | `<h1>` or page title | main content area |
|
|
42
|
-
|
|
43
|
-
Then create the change, whose `proposal.md` names the source URL and the work item ID:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
openspec new change "{slug-from-title}"
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Load `pc-plan-propose` (interactive) and, once it returns, ask:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"questions": [
|
|
54
|
-
{
|
|
55
|
-
"header": "Ready to implement",
|
|
56
|
-
"question": "Ready to implement?",
|
|
57
|
-
"options": [
|
|
58
|
-
{ "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
|
|
59
|
-
{ "label": "no", "description": "Stop here. You can run /plan-apply later." }
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: pc-userstory
|
|
3
|
+
description: Parse work item from any URL using browser automation. Use when user provides a URL that doesn't match GitHub/Azure/Jira CLI platforms, or when backlog platform is 'browser'.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires agent-browser CLI installed and openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "2.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Read a work item off its own web page, for a backlog with no CLI, then hand the change to `pc-plan-propose`. This is the fallback: a GitHub, Azure DevOps or Jira URL belongs to the CLI skill for that platform, which is faster and cannot misread a page.
|
|
12
|
+
|
|
13
|
+
Browser is a backlog-only platform. Shipping runs on whichever repo platform the project configured.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
- Navigate only to a URL the user gave you. This skill is the one exception to `browser-automation`'s ban on leaving localhost, and it is that narrow on purpose: a work-item page is behind the user's own login, and anything else reachable from it is too.
|
|
18
|
+
- Read only. No clicking, no status changes, nothing written back to the tracker.
|
|
19
|
+
- Always reuse the `backlog` session so the login survives; a login page instead of the work item means the session is not authenticated, and the user has to log in manually in the opened window before a retry.
|
|
20
|
+
|
|
21
|
+
## Contracts
|
|
22
|
+
|
|
23
|
+
`agent-browser` runs its own Chrome, not the user's daily browser, and keeps state per session:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
agent-browser --session backlog --restore open "https://the-url-the-user-provided"
|
|
27
|
+
agent-browser wait --load networkidle
|
|
28
|
+
agent-browser snapshot
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`agent-browser doctor` verifies the install. The accessibility tree from `snapshot` locates fields more reliably than page text; `agent-browser read` and `agent-browser get text "h1"` fill the gaps, and `agent-browser get url` confirms the page did not navigate away. A single-page app that renders after idle needs a second wait (`--text "<known heading>"` when a stable string exists) and a fresh snapshot, not a sleep.
|
|
32
|
+
|
|
33
|
+
Take the title, description with its acceptance criteria or definition of done, the ID from the URL or the page, and status, assignee, priority and labels when they are visible. Where to look, by tool:
|
|
34
|
+
|
|
35
|
+
| Tool | Work item URL | Title | Description |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| Azure DevOps | `/_workitems/edit/{id}` | header | "Description" and "Acceptance Criteria" sections |
|
|
38
|
+
| Linear | `/{team}/issue/{key}` | issue title | issue body |
|
|
39
|
+
| Jira | `/browse/{key}` | summary | description field |
|
|
40
|
+
| Trello | `/c/{short-id}` | card title | card description |
|
|
41
|
+
| Anything else | as given | `<h1>` or page title | main content area |
|
|
42
|
+
|
|
43
|
+
Then create the change, whose `proposal.md` names the source URL and the work item ID:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
openspec new change "{slug-from-title}"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Load `pc-plan-propose` (interactive) and, once it returns, ask:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"questions": [
|
|
54
|
+
{
|
|
55
|
+
"header": "Ready to implement",
|
|
56
|
+
"question": "Ready to implement?",
|
|
57
|
+
"options": [
|
|
58
|
+
{ "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
|
|
59
|
+
{ "label": "no", "description": "Stop here. You can run /plan-apply later." }
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
```
|