Skip to content

pstack: add create-verification-skill and maintain-verification-skill#150

Merged
poteto merged 3 commits into
mainfrom
pstack/verification-skills
Jul 12, 2026
Merged

pstack: add create-verification-skill and maintain-verification-skill#150
poteto merged 3 commits into
mainfrom
pstack/verification-skills

Conversation

@poteto

@poteto poteto commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • /create-verification-skill: generates a project-local verify-<app> skill for any language/framework/platform — interviews the repo (surface, run, drive, observe, isolate), writes launch/doctor/drive/evidence/cleanup sections with real selectors, seeds a user-POV feature map, and must prove its own output by executing it once. Generalizes control-skill ideas: the feature map as the maintained verification source, a doctor command, real-user-path proof standards, harness-first reuse.
  • /maintain-verification-skill: the upkeep loop — index hygiene, a read-only source wave per feature file, one coordinator-owned live pass driving every feature, drift/harness-gap/product-gap triage, clean/changed/blocked outcomes, at most one PR.
  • setup-pstack step 7 (optional): offers the generator when the project has no verification path.
  • README rows for both; version 0.11.0.

Eval (4 cloud agents, real repos, isolated VMs)

gum (go TUI), np (interactive node CLI), fastify-example-twitter (HTTP + mongo/redis), Reactive-Resume (react/hono/postgres). All four generated skills passed their own proof runs — fastify drove 9 real HTTP actions and verified evidence in both stores; resume brought up isolated postgres + chromium and proved an autosave round-trip. Two agents caught real upstream drift in their targets (gum's README submit key; np's misleading dry-run output). Their friction reports drove 6 revisions now in the skill: finite-CLI launch framing, seed-3-5-prove-ONE made explicit, evidence survives cleanup, dry-run hermeticity must be observed not assumed, marked scaffolding allowed for irrelevant blockers, helpers ship executable with documented invocation.

Test plan

  • 4/4 generated skills executed successfully end to end on their target repos
  • Leak check clean on both skills
  • Human pass on the maintain skill (drafted from the same eval's structure but not itself exercised — flagging honestly)

Note

Low Risk
Documentation and agent skill definitions only; no runtime product code or auth/data paths change.

Overview
Adds agent playbooks for project-local “drive the real app and prove it” verification, plus wiring so setup can surface them.

/create-verification-skill interviews the repo (surface, run, drive, observe, isolate), writes a .cursor/skills/verify-<app>/ skill with launch/doctor/drive/evidence/cleanup/helpers grounded in real harnesses, seeds a user-POV feature map, and must execute the generated skill once (one mapped feature, evidence survives cleanup) before delivery.

/maintain-verification-skill is the upkeep loop: index hygiene, parallel read-only source pass per feature file, coordinator-owned live pass over every feature, triage into doc/harness/product gaps, and outcomes clean / changed (at most one PR of proven fixes) / blocked — edits stay inside the verify skill directory only.

README documents both skills; setup-pstack gains an optional step 7 that offers generation when no verify-* skill or harness exists. Plugin version 0.11.0.

Reviewed by Cursor Bugbot for commit 45f6601. Bugbot is set up for automated code reviews on this repo. Configure here.

Generalizes the control-glass approach (feature map, doctor, proof
standards, harness-first) for any language or platform. The generator
interviews the repo, writes a project-local verify skill + seeded
feature map, and must prove its own output by running it once. The
maintainer is the upkeep loop: source wave per feature, one live pass,
at most one PR. setup-pstack gains an optional final step offering the
generator. Validated by 4 cloud agents generating against real repos
(go TUI, node CLI, HTTP service, full-stack web app) - all four proof
runs passed, and their friction reports drove 6 revisions.
Comment thread pstack/skills/setup-pstack/SKILL.md Outdated

### 7. Offer a verification skill (optional)

Check whether the project has a way to drive the real app for proof (a `verify-*` skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /create-verification-skill." On yes, read and follow `create-verification-skill`. On no, move on without pushing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harness check skips verify offer

Medium Severity · Logic Bug

Step 7's logic for offering a project-local verification skill is overbroad. It incorrectly interprets existing e2e tooling or non-app-driving verify-* skills (like verify-this) as fulfilling the need for a new, app-driving skill with a feature map. This prevents the offer from appearing for projects that could benefit, and the detection also omits common skill paths.

Fix in Cursor Fix in Web

Triggered by learned rule: Skill detection must cover all installation paths

Reviewed by Cursor Bugbot for commit e12d7ee. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismissing: step 7 is a deliberate judgment call, not a detection algorithm. Enumerating skill paths and disambiguating verify-this-style names in the skill body trades a one-line offer for a brittle checklist; a wrong guess costs one extra question to the user. The offer text already scopes it to 'a way to drive the real app for proof'.

Comment thread pstack/skills/maintain-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/maintain-verification-skill/SKILL.md
Comment thread pstack/skills/create-verification-skill/SKILL.md

1. **Index hygiene.** Read the feature map README and glob its sibling files. Fix missing, extra, duplicate, or dead entries. Lightweight; no generated inventory.

2. **Source wave.** One read-only subagent per feature file, launched concurrently. Each explains "how does this user-facing feature work?" from source, flags likely doc drift with citations, and returns one concise live-verification recipe. Children never drive the app and never edit files. Return shape: feature summary / source entry points / likely drift or none / one recipe.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source wave not actually readonly

Medium Severity · Logic Bug

The "Source wave" step intends for subagents to be read-only and not edit files or drive the app. However, readonly: true isn't set, allowing these concurrent subagents to mutate the verification skill's files or run harness commands, which could race the coordinator's later triage.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e12d7ee. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismissing: the skill's contract is behavioral ('children never drive the app and never edit files') and runner-agnostic — pstack skills don't prescribe Task-parameter details because runners differ. The coordinator owns all writes either way.

Comment thread pstack/skills/maintain-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/create-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/setup-pstack/SKILL.md Outdated
Comment thread pstack/skills/maintain-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/create-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/maintain-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/maintain-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/maintain-verification-skill/SKILL.md Outdated
Comment thread pstack/skills/maintain-verification-skill/SKILL.md Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.

There are 6 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

Bugbot Autofix prepared fixes for all 4 issues found in the latest run.

  • ✅ Fixed: Mid-pass cleanup vs long-lived drives
    • Failed long-lived drives now trigger cleanup followed by relaunch and doctor before serial coverage continues.
  • ✅ Fixed: Doctor retry skips prior cleanup
    • Doctor-drift recovery now cleans the failed attempt and retries the full Launch-Doctor sequence once.
  • ✅ Fixed: Evidence never checked after cleanup
    • Every cleanup now requires confirming all captured evidence still exists, with missing evidence invalidating the proof.
  • ✅ Fixed: No re-doctor after failed drive
    • A failed drive now requires a fresh session or a relaunched long-lived instance that passes doctor before further driving.

Create PR

Or push these changes by commenting:

@cursor push 94dc37953a
Preview (94dc37953a)
diff --git a/pstack/skills/maintain-verification-skill/SKILL.md b/pstack/skills/maintain-verification-skill/SKILL.md
--- a/pstack/skills/maintain-verification-skill/SKILL.md
+++ b/pstack/skills/maintain-verification-skill/SKILL.md
@@ -30,7 +30,7 @@
 
 3. **Reconcile.** Every feature file has a returned summary. Merge overlapping recipes into as few app states as practical. Spot-check cited drift; don't re-prove clean claims. Sweep recent churn for user-facing surfaces missing from the map — require a concrete source path before calling one missing.
 
-4. **Live pass.** Required even when source looks clean. The coordinator owns all driving; follow the verification skill's own launch model — one long-lived instance driven serially for servers and UIs, or a fresh isolated session per drive for short-lived CLIs (the skill's Launch section decides, not this one). Health-check at the skill's own granularity: doctor before driving a long-lived instance, and per session where sessions are the unit. Never drive past a failing doctor — but a doctor that fails because the *skill* drifted is itself drift: fix it under edit scope, retry once, and only then call the pass `blocked`. Exercise every feature at least once, cleaning up any failed drive immediately so a stuck session can't poison the rest of the pass. A feature that can't be reached is `verified-unreachable` only with the concrete prerequisite (auth, entitlement, OS, external state) and the route attempted; if the map omits that prerequisite, that's drift. Any harness fix from triage gets re-driven live before it ships. Final teardown happens after the last drive of the run — including those re-proofs — so nothing outlives the run (evidence stays, per the skill).
+4. **Live pass.** Required even when source looks clean. The coordinator owns all driving; follow the verification skill's own launch model — one long-lived instance at a time driven serially for servers and UIs, or a fresh isolated session per drive for short-lived CLIs (the skill's Launch section decides, not this one). Health-check at the skill's own granularity: doctor before driving a long-lived instance, and per session where sessions are the unit. Never drive past a failing doctor — but a doctor that fails because the *skill* drifted is itself drift: run Cleanup for anything the failed attempt started, fix it under edit scope, retry the Launch-Doctor sequence once, and only then call the pass `blocked`. Exercise every feature at least once. After a failed drive, run Cleanup immediately; before continuing, start and doctor a fresh isolated CLI session or relaunch and doctor the long-lived server/UI instance. A feature that can't be reached is `verified-unreachable` only with the concrete prerequisite (auth, entitlement, OS, external state) and the route attempted; if the map omits that prerequisite, that's drift. Any harness fix from triage gets re-driven live before it ships. Final teardown happens after the last drive of the run — including those re-proofs — so nothing outlives the run. After every Cleanup — failed doctor attempt, failed drive, or final teardown — confirm that all evidence captured so far still exists at the skill's named location; missing evidence fails the affected proof.
 
 5. **Triage.** Wrong or missing user-POV description → doc drift, fix it. Working behavior the harness can't drive → harness gap, fix it; a harness fix follows the same helpers rule as generation (scripts executable, invocation documented in the skill body). App behavior that's actually broken → product gap; record it for the user, keep it out of this PR.

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 45f6601. Configure here.


3. **Reconcile.** Every feature file has a returned summary. Merge overlapping recipes into as few app states as practical. Spot-check cited drift; don't re-prove clean claims. Sweep recent churn for user-facing surfaces missing from the map — require a concrete source path before calling one missing.

4. **Live pass.** Required even when source looks clean. The coordinator owns all driving; follow the verification skill's own launch model — one long-lived instance driven serially for servers and UIs, or a fresh isolated session per drive for short-lived CLIs (the skill's Launch section decides, not this one). Health-check at the skill's own granularity: doctor before driving a long-lived instance, and per session where sessions are the unit. Never drive past a failing doctor — but a doctor that fails because the *skill* drifted is itself drift: fix it under edit scope, retry once, and only then call the pass `blocked`. Exercise every feature at least once, cleaning up any failed drive immediately so a stuck session can't poison the rest of the pass. A feature that can't be reached is `verified-unreachable` only with the concrete prerequisite (auth, entitlement, OS, external state) and the route attempted; if the map omits that prerequisite, that's drift. Any harness fix from triage gets re-driven live before it ships. Final teardown happens after the last drive of the run — including those re-proofs — so nothing outlives the run (evidence stays, per the skill).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mid-pass cleanup vs long-lived drives

Medium Severity · Logic Bug

The live pass maintains a single long-lived instance for serial server/UI drives. The instruction to immediately clean up failed drives causes the skill's Cleanup to tear down this shared instance mid-pass, preventing subsequent features from being driven and breaking serial coverage.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 45f6601. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid — fixed in follow-up #151: cleanup now happens at the granularity of what failed; a shared long-lived instance is never torn down mid-pass.


3. **Reconcile.** Every feature file has a returned summary. Merge overlapping recipes into as few app states as practical. Spot-check cited drift; don't re-prove clean claims. Sweep recent churn for user-facing surfaces missing from the map — require a concrete source path before calling one missing.

4. **Live pass.** Required even when source looks clean. The coordinator owns all driving; follow the verification skill's own launch model — one long-lived instance driven serially for servers and UIs, or a fresh isolated session per drive for short-lived CLIs (the skill's Launch section decides, not this one). Health-check at the skill's own granularity: doctor before driving a long-lived instance, and per session where sessions are the unit. Never drive past a failing doctor — but a doctor that fails because the *skill* drifted is itself drift: fix it under edit scope, retry once, and only then call the pass `blocked`. Exercise every feature at least once, cleaning up any failed drive immediately so a stuck session can't poison the rest of the pass. A feature that can't be reached is `verified-unreachable` only with the concrete prerequisite (auth, entitlement, OS, external state) and the route attempted; if the map omits that prerequisite, that's drift. Any harness fix from triage gets re-driven live before it ships. Final teardown happens after the last drive of the run — including those re-proofs — so nothing outlives the run (evidence stays, per the skill).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doctor retry skips prior cleanup

Medium Severity · Logic Bug

The new skill-drift retry path doesn't include a Cleanup or relaunch before retrying doctor. If Launch or Doctor itself drifted, this can leave half-started instances or stranded processes, causing the retry to fail and the pass to block unnecessarily.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 45f6601. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid — fixed in follow-up #151: the drift retry path now cleans up and relaunches before retrying doctor.


3. **Reconcile.** Every feature file has a returned summary. Merge overlapping recipes into as few app states as practical. Spot-check cited drift; don't re-prove clean claims. Sweep recent churn for user-facing surfaces missing from the map — require a concrete source path before calling one missing.

4. **Live pass.** Required even when source looks clean. The coordinator owns all driving; follow the verification skill's own launch model — one long-lived instance driven serially for servers and UIs, or a fresh isolated session per drive for short-lived CLIs (the skill's Launch section decides, not this one). Health-check at the skill's own granularity: doctor before driving a long-lived instance, and per session where sessions are the unit. Never drive past a failing doctor — but a doctor that fails because the *skill* drifted is itself drift: fix it under edit scope, retry once, and only then call the pass `blocked`. Exercise every feature at least once, cleaning up any failed drive immediately so a stuck session can't poison the rest of the pass. A feature that can't be reached is `verified-unreachable` only with the concrete prerequisite (auth, entitlement, OS, external state) and the route attempted; if the map omits that prerequisite, that's drift. Any harness fix from triage gets re-driven live before it ships. Final teardown happens after the last drive of the run — including those re-proofs — so nothing outlives the run (evidence stays, per the skill).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evidence never checked after cleanup

Medium Severity · Logic Bug

The live pass newly cleans up after failed drives and again at final teardown, but only states that evidence stays. Unlike the generator's prove loop, it never requires confirming proof artifacts still exist after those cleanups, so a cleanup that deletes evidence can still leave the run treating features as proven.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 45f6601. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid — fixed in follow-up #151: every cleanup is followed by an evidence-survival check, mirroring the generator's proof rule.


3. **Reconcile.** Every feature file has a returned summary. Merge overlapping recipes into as few app states as practical. Spot-check cited drift; don't re-prove clean claims. Sweep recent churn for user-facing surfaces missing from the map — require a concrete source path before calling one missing.

4. **Live pass.** Required even when source looks clean. The coordinator owns all driving; follow the verification skill's own launch model — one long-lived instance driven serially for servers and UIs, or a fresh isolated session per drive for short-lived CLIs (the skill's Launch section decides, not this one). Health-check at the skill's own granularity: doctor before driving a long-lived instance, and per session where sessions are the unit. Never drive past a failing doctor — but a doctor that fails because the *skill* drifted is itself drift: fix it under edit scope, retry once, and only then call the pass `blocked`. Exercise every feature at least once, cleaning up any failed drive immediately so a stuck session can't poison the rest of the pass. A feature that can't be reached is `verified-unreachable` only with the concrete prerequisite (auth, entitlement, OS, external state) and the route attempted; if the map omits that prerequisite, that's drift. Any harness fix from triage gets re-driven live before it ships. Final teardown happens after the last drive of the run — including those re-proofs — so nothing outlives the run (evidence stays, per the skill).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No re-doctor after failed drive

Medium Severity · Logic Bug

For long-lived apps, doctor runs once before driving, then the pass continues after cleaning up a failed drive. There is no health re-check before the next feature, so a drive that left the shared instance hung, crashed, or corrupted can keep being driven and mislabeled as map, harness, or product issues.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 45f6601. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid — fixed in follow-up #151: a failed drive on a long-lived instance triggers re-doctor before the next feature.

@poteto poteto merged commit e42d29f into main Jul 12, 2026
3 checks passed
poteto added a commit that referenced this pull request Jul 12, 2026
… checks (#151)

* maintain-verification-skill: cleanup granularity, re-doctor, evidence checks

Follow-up to the four bugbot comments that landed on #150 seconds
before merge: failed-drive cleanup now matches the granularity of what
failed (never tearing down a shared instance mid-pass), a failed drive
on a long-lived instance triggers re-doctor before the next feature,
the doctor-drift retry includes cleanup and relaunch, and every cleanup
is followed by an evidence-survival check.

* State the live-pass recovery rules as invariants, not enumerated procedures

* Restore the per-session doctor check inside invariant 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant