Skip to content

feat(qstack): build v1 QA playbooks, skills, principles, and host tools - #1

Merged
dotts-h merged 4 commits into
mainfrom
feat/qstack-p1-core
Oct 19, 2026
Merged

dotts-h merged 4 commits into
mainfrom
feat/qstack-p1-core

Conversation

@dotts-h

@dotts-h dotts-h commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Why

QA workflows in Cursor need a dedicated router, two-run reproduction rules, and fail-closed verdict checks instead of developer playbooks that author code and merge pull requests. This change builds the Part 1 (qstack v1) components adapted from pstack.

What changed

  • Add skills/qstack-mode/SKILL.md with 6 core QA playbooks and 7 specialist playbooks under skills/qstack-mode/playbooks/.
  • Add 10 QA skills (reproduce-issue, triage-defect, in-your-own-words, how, why, blast-radius, create-verification-skill, maintain-verification-skill, regression-pin, unslop), setup-qstack, and 10 principle-* skills under skills/.
  • Add agents/qstack-agent.md, scripts/log.mjs, and scripts/check-verdict.mjs, and document the v1 catalog in README.md.

Scope

  • Covers the Part 1 components listed in README.md across playbooks, skills, principles, and host tools.
  • Leaves out Phase 2 multi-agent fleet skills (swarm, interrogate, show-me-your-work, hillclimb) and cuts all dev-only coding and PR-merge playbooks.

Tradeoffs

  • Consolidated 10 pstack verification playbooks into 6 primary QA entry routes while keeping the 7 focused forensic and gate playbooks as linked leaves so common QA tasks have a six-way choice.

Blast Radius

  • Adds new plugin files under skills/, agents/, and scripts/ and updates README.md. Existing .cursor-plugin/plugin.json metadata is unchanged.

Verification

  • Ran structural frontmatter, cross-link, and punctuation checks across the markdown files. Two links to principle-guard-the-context-window, which qstack does not ship, still dangle. fix(qstack-mode): drop links to a principle qstack does not ship #2 removes them.
  • Ran node scripts/log.mjs and verified TSV header creation, row append, and spreadsheet formula escaping ('=cmd(), '+artifact).
  • Ran node scripts/check-verdict.mjs against passing and failing fixtures (0 problems on valid two-run verdict, exit code 1 with 3 flagged lines on single-run long-dash fixture).

dotts-h and others added 4 commits October 18, 2026 22:03
Add scripts/log.mjs for formula-safe TSV decision logs and scripts/check-verdict.mjs to enforce verdict sections and two-run evidence. Add agents/qstack-agent.md and skills/setup-qstack/SKILL.md.

Co-authored-by: Cursor <[email protected]>
Port the 10 QA verification and execution principles from pstack and resolve all cross-links within qstack v1.

Co-authored-by: Cursor <[email protected]>
Promote reproduce-issue and triage-defect into standalone QA skills and add how, why, in-your-own-words, blast-radius, create-verification-skill, maintain-verification-skill, regression-pin, and unslop.

Co-authored-by: Cursor <[email protected]>
Add skills/qstack-mode/SKILL.md with 6 core and 7 specialist QA playbooks and document the full v1 layout in README.md.

Co-authored-by: Cursor <[email protected]>
@dotts-h

dotts-h commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

PASS+NOTES

I verified this PR independently under step 1 of the shipping playbook, and I did not write this change. This verdict covers base c3e89f61aa62cc8ea3165e0fb3d82e815bb3837c and head 36540f5ac010b847cd864d817e9169389b67ae38, each checked out in its own detached worktree.

The plugin loads in Cursor, both scripts behave as the PR body says, and every relative markdown link resolves at head. The notes are contradictions between skill files, and between the skills and scripts/check-verdict.mjs. Notes 1 to 3 mean an agent that follows reproduce-issue to the letter writes a verdict that check-verdict.mjs rejects. An agent can recover from each note through the checker's messages, the playbook's own tokens, or a fail-closed Blocked, so none of them blocks landing. Notes 1 to 5 are worth fixing before testers rely on verdict files.

Commands and results

  1. node --test from the plugin root on Node 22.11.0. Base and head both exit 0 with # tests 0. Neither SHA has a test file, so this proves nothing about the new scripts.
  2. node scripts/log.mjs and node scripts/check-verdict.mjs at base. Every call exits 1 with Cannot find module, because base ships neither script.
  3. node scripts/log.mjs <tmp>/nested/dir/run.tsv charter "=cmd()" "+artifact" "-rm -rf" "@SUM(A1)" at head. Exit 0. It created the missing folders, wrote the header ts phase decision why evidence result, and wrote the row 2026-10-19T09:21:47Z charter '=cmd() '+artifact '-rm -rf '@SUM(A1).
  4. A second log.mjs call on that file with a tab, a \n, and a \r\n inside fields. Exit 0. The file has one header and three lines of six columns each, and each tab or newline became a space.
  5. log.mjs with three fields. Exit 1 with the usage line, and the file did not change.
  6. Eight concurrent log.mjs writers on a fresh file. All exit 0, and the file has one header and eight rows.
  7. check-verdict.mjs on a valid two-run verdict. Exit 0 with verdict=Reproduced problems=0. It ignored a long dash inside a fenced block.
  8. check-verdict.mjs on a single-run fixture with one em dash and one en dash. Exit 1 with problems=3. It flagged lines 5 and 10 for long dashes and line 12 for fewer than two runs, which matches the PR body.
  9. check-verdict.mjs edge cases. A Blocked verdict with no run count exits 0, as intended. Sections out of order exit 1 with "## Evidence" is out of order. No argument exits 2 with the usage line.
  10. The shared validator qstack-validate-md.mjs from the plugin root. Base reports checked 1 markdown files, 1 problems, a backticked SKILL.md in the old README. Head reports checked 58 markdown files, 2 problems, and both are the known ../principle-guard-the-context-window/SKILL.md paths in diagnose-live.md:10 and diagnose-trace.md:11.
  11. A stricter link check of the 58 markdown files this PR adds or modifies. It covers inline, angle-bracket, and reference links, plus anchors. All 69 relative links resolve. It also resolved the 32 backticked .md paths in the playbooks from the base each playbook declares, and 5 failed. Those are the 2 known paths and the 3 in note 9.
  12. Plugin load. This Cursor session runs a local qstack install at 6daa771, which descends from this head and has the same .cursor-plugin/plugin.json and agents/qstack-agent.md. Cursor registered qstack-agent with this head's description and listed qstack-mode and setup-qstack, so the default-folder layout loads. All 22 SKILL.md name fields match their folders.
  13. git diff --stat outside skills/. It lists only README.md, agents/qstack-agent.md, and the two scripts. plugin.json is unchanged, which matches the Blast Radius section.

PR body claims

  • The inventory holds. Head has 13 playbooks (6 core, 7 focused), the 10 named QA skills, setup-qstack, 10 principles, the agent, and both scripts. Each of the 7 focused playbooks is linked from a core playbook, as Tradeoffs says.
  • swarm, interrogate, show-me-your-work, and hillclimb do not ship, and no file mentions them.
  • The log.mjs and check-verdict.mjs lines under Verification reproduce exactly, in commands 3 to 8.
  • "All 64 markdown files (0 errors)" does not reproduce. Head has 58 markdown files, and the shared validator reports 2 problems.
  • "All 35 Part 1 components" cannot be checked from the repo. The README catalog has 38 entries (13 playbooks, 12 skills, 10 principles, 3 host tools). The count is 35 only if the router, setup-qstack, and the agent are left out.

Notes

  1. Fix verification has two outcome vocabularies. reproduce-issue/SKILL.md:125 and verify-existing-fix.md:71,80 say the outcome is Verified existing fix or Existing fix insufficient. verify-fix-and-retest.md:15 and check-verdict.mjs:9-10 use Confirmed and Insufficient fix. verify-existing-fix.md uses both, with Confirmed in its headings and Verified existing fix in its bullets. A verdict that uses the reference's token fails with Verdict lacks an allowed token, and that message does not list the allowed tokens (measured). Use one vocabulary in all four places.
  2. No skill documents the verdict file that check-verdict.mjs requires. It wants an H1, then ## Verdict, ## Expected and broken state, ## Surface and runs, and ## Evidence in that order, with specific words in each. The only shape any skill documents is the Outcome: and Surface: block in reproduce-issue/SKILL.md section 7. A verdict file in that shape fails with 5 problems (measured). Today an agent finds the real shape by trial and error from "Fix every line it prints". Document the sections and the words each check looks for in reproduce-and-triage.md step 9 or in reproduce-issue section 7.
  3. The checker's word lists are narrower than the playbooks. Every playbook says "the real UI, CLI, or service", but SURFACE at check-verdict.mjs:26 has no service. reproduce-and-triage.md:16 says "both independent runs", but TWO_RUNS at line 27 has no both runs. A correct reproduction against a service that says "both runs" fails twice, with names no surface and confirms fewer than two runs (measured).
  4. regression-pin/SKILL.md:19 says to "make the smallest production change" when the run lands the fix. That contradicts qstack-mode/SKILL.md:14, which says a QA run never patches product source. It also contradicts qstack-agent.md:15 ("Never edit product source code") and the Why section of this PR. Drop that branch or hand it to the operator.
  5. setup-qstack writes seven role lines that no skill reads. Those are reproduce-and-triage, verify-fix-and-retest, regression-and-parity, release-gate, judgment and prose, hardest tasks, and verification workers. Only the four how and why lines have a reader. setup-qstack/SKILL.md:39 says to use "the same labels qstack-mode uses", but qstack-mode/SKILL.md names no roles (grep across head). A tester who changes those seven lines changes nothing.
  6. how/SKILL.md:11 and why/SKILL.md:11 set reasoning level and speed "per the Subagents section of the poteto-mode skill", and qstack does not ship poteto-mode. The port renamed pstack-models.mdc to qstack-models.mdc on those same lines, so this looks like a missed rename (from a diff against pstack 0.15.28). principle-attack-the-premise and principle-build-the-lever also still cite the Laziness Protocol, which qstack does not ship, as plain text.
  7. The adapter settings have no home. Skills read control.skill_name, control.feature_map_path, routing.map_path, slack.operations_channel_id, "the configured temporary directory", and "the configured repro budget". No file says where those values live, and no setup step writes them. Until the operator supplies them in chat, reproduce-and-triage step 3 can only end in Blocked (inferred from reading every file). Failing closed is safe and documented, but a tester has no documented way to turn on the main reproduction path.
  8. There are two feature-map formats and nothing connects them. create-verification-skill/SKILL.md:36 writes .cursor/skills/verify-<app>/features/, with a README index and four H2s per feature. reproduce-issue wants one file at control.feature_map_path in the feature-map.example.md shape. Its adapter contract also needs a recording capability (control-adapter.md:99) that the generated skill is never asked to provide. Yet setup-qstack/SKILL.md:66 offers create-verification-skill as the way to let agents drive the app.
  9. Some playbook paths do not resolve from the base the playbook declares. Each playbook says bundled skill paths are relative to skills/qstack-mode/SKILL.md. Under that rule, the ../SKILL.md in release-gate.md:9 is skills/SKILL.md, which does not exist. It means the router only when read from the playbook's folder. verify-fix-and-retest.md:12 names diagnose-live.md and diagnose-trace.md without the "Playbooks named below sit in this folder" line that release-gate.md and regression-and-parity.md have. The shared validator misses all three because it tries four bases.
  10. The two-run gate checks wording, not runs. "The second run crashed, so the path did not run twice" passes as verdict=Reproduced problems=0 (measured). The PR calls these fail-closed checks. They fail closed on missing words, so either say so or parse a run count.
  11. A UTF-8 BOM breaks the H1 check. PowerShell 5.1 Set-Content -Encoding UTF8 writes EF BB BF, and the valid fixture saved that way fails with 1: no H1 title (measured). The README gives the Windows path first, so this will hit agents that write verdicts from that shell. Strip a leading \uFEFF before splitting lines.
  12. On a missing file, check-verdict.mjs exits 1 with an uncaught ENOENT stack trace (measured). Exit 1 also means the verdict has problems, so a caller cannot tell the two cases apart.
  13. No tests ship for either script, so node --test covers nothing. The fixtures behind commands 3 to 9 could become a small scripts/*.test.mjs.
  14. Smaller items. qstack-mode/SKILL.md:14 says a QA run "never patches product source code or merges pull requests unless the operator explicitly asks for a test harness file", which makes the merge ban conditional, while line 58 says "Never merge pull requests". The router says "Focused" where the README and the PR body say "Specialist". qstack-agent.md:11 says the catalog hides qstack-mode, but qstack-mode has no disable-model-invocation and is listed. The router runs log.mjs "from the plugin root" (line 34), so a relative <logfile> lands inside the plugin install folder, and no playbook names a log location.
  15. This is the known issue. diagnose-live.md:10 and diagnose-trace.md:11 point at ../principle-guard-the-context-window/SKILL.md, which qstack does not ship. fix(qstack-mode): drop links to a principle qstack does not ship #2 removes both. This verdict does not assume it lands.

#3 and #4 change check-verdict.mjs and the reproduce-issue settings, which may touch notes 7 and 10. This verdict does not assume either lands, and each needs its own verdict. The fixtures and both runners (run-scripts.mjs, check-links.mjs, and verdicts/*.md) are on the verifier's machine under %TEMP%\qstack-verify\pr1\fixtures\.

@dotts-h
dotts-h merged commit ada05ed into main Oct 19, 2026
dotts-h added a commit that referenced this pull request Oct 19, 2026
* fix(check-verdict): report each problem once, with its real cause

A malformed count no longer also reports a missing line, and a missing
evidence file no longer also reports an uncited section. A lone space
or a bare `:12` is not a citation. Bold labels count, an evidence path
may hold a space, and the token message lists the allowed tokens.

Co-authored-by: Cursor <[email protected]>

* fix(check-verdict): report an unreadable or UTF-16 verdict in one line

A missing path or a folder used to crash with a stack trace and exit 1,
the code for "problems found". It now prints one line and exits 2.
A UTF-16 file, which Windows PowerShell 5.1 writes with `>`, used to
fail with five misleading problems. It is now one problem that names
the encoding.

Co-authored-by: Cursor <[email protected]>

* fix(check-verdict): accept a service surface

The router and the playbooks tell agents to drive the real UI, CLI, or
service, but the checker rejected a service surface.

Co-authored-by: Cursor <[email protected]>

* fix(check-verdict): accept a commit SHA as the fix artifact

reproduce-issue counts a commit or a pull request as a fix artifact,
but a commit that exists only locally has no URL. The checker accepted
only a URL, so such a commit needed an undocumented file:// URL.

Co-authored-by: Cursor <[email protected]>

* fix(check-verdict): count a .trace file only beside its screencast frames

playwright-cli tracing writes a .trace file and keeps the frames in a
screencast folder next to it, so a .trace file alone shows no screen.
A frameless trace now gets its own message when it was the only
recording.

Co-authored-by: Cursor <[email protected]>

* fix(check-settings): reject a folder map, a prototype use name, and UTF-16

A feature map or routing map path that named a folder passed. The use
name `constructor` crashed with a TypeError instead of printing usage.
A UTF-16 file failed as invalid JSON without naming the encoding.

Co-authored-by: Cursor <[email protected]>

* test(log): cover the phase log writer

log.mjs was the only script without tests. The tests drive it through
its command line and read the file back.

Co-authored-by: Cursor <[email protected]>

* fix(check-markdown): resolve paths from the base a file declares

Playbooks say "paths are relative to `skills/qstack-mode/SKILL.md`",
but the checker also tried each file's own folder, so four paths that
resolve only from the playbook folder passed. A bare playbook name now
resolves from the playbook folder only in a file that says playbooks
sit in that folder. The four paths are fixed, one of them added by the
visual-parity fix in PR #5.

Co-authored-by: Cursor <[email protected]>

* fix(setup-qstack): drop the seven role lines no skill reads

Only the how and why skills read a line from qstack-models.mdc, and
they read four. A re-run drops the retired lines from an existing rule
and lists them, per step 2.

Co-authored-by: Cursor <[email protected]>

* fix(qstack): drop pointers to poteto-mode and the Laziness Protocol

qstack ships neither. The how and why role lines already carry each
subagent's reasoning level in the model slug.

Co-authored-by: Cursor <[email protected]>

* fix(principle-never-block-on-the-human): drop the production blast radius call

No qstack text defines a production blast radius that a person sets.
The blast-radius skill is work an agent does, so an agent could read the
item as a reason to wait.

Co-authored-by: Cursor <[email protected]>

* fix(qstack-mode): state the merge ban once and keep the log out of the plugin folder

The read-only rule made the merge ban read as conditional on a harness
request. Autonomy already bans merging outright. A relative log path
resolved from the plugin root, inside the install folder. The README
now names the focused playbooks as the router does.

Co-authored-by: Cursor <[email protected]>

* fix(qstack-agent): drop the claim that the catalog hides qstack-mode

qstack-mode does not set disable-model-invocation, so the skill catalog
lists it. The sentence came from an agent whose skill is hidden.

Co-authored-by: Cursor <[email protected]>

* fix(regression-pin): select an existing fix instead of writing one

Step 5 told the agent to make a production change, against the router's
read-only rule and qstack-agent's "Never edit product source code".
Without a fix artifact, the run now stops at the failing check and gives
it to the operator.

Co-authored-by: Cursor <[email protected]>

* fix(automate-check): ask for a buggy-revision run only for a known bug

maintain-verification-skill step 5 requires that run only when the
repaired check guards a known bug, but the reply asked for it on every
repair.

Co-authored-by: Cursor <[email protected]>

* fix(verify-fix-and-retest): check the settings before driving

The reproduce path runs check-settings.mjs and blocks on a problem. The
verify playbook went straight to the control adapter without it.
reproduce-issue already checks the settings in section 2, before its
verify mode.

Co-authored-by: Cursor <[email protected]>

* fix(verify-existing-fix): call a clean but short patched run Inconclusive

When every patched run passed but too few ran to meet the patched run
rule, neither Confirmed nor Insufficient fix applied, and no outcome
named the case. The verify playbook says the same, and a test pins
that the checker accepts it.

Co-authored-by: Cursor <[email protected]>

* fix(control-adapter): run playwright-cli from the artifact directory

Unless a config sets outputDir, playwright-cli writes its output to a
.playwright-cli folder in its working directory. Run from the workspace
root, that left captures in the repository, which the contract forbids.
The CLI's own installer adds the folder to .gitignore because it may
hold credentials.

Co-authored-by: Cursor <[email protected]>

* fix(reproduce-issue): drop the repro budget no setting defines

settings.md lists every key qstack reads, and none is a repro budget.
A budget below two runs would also have contradicted the K of N rule
that follows it.

Co-authored-by: Cursor <[email protected]>

* fix(control-adapter): accept a verification skill and its feature map

create-verification-skill answers "make a control skill for this repo",
and its launch, drive, evidence, and cleanup sections match the
contract. But it wrote a features/ map that the contract did not
accept and never asked for a recording, so setup-qstack copied a second
map in another format. The generated skill now includes a recording
recipe, the contract reads its features/README.md, and setup-qstack
suggests it when it meets the contract. A web app control skill still
drives the page through playwright-cli.

Co-authored-by: Cursor <[email protected]>

* fix(check-settings): report a settings path that is a folder

A folder at the settings path crashed the checker with an EISDIR stack
trace and no summary line. The UTF-16 check had moved the read out of
the JSON error handling, which used to report the same path as invalid
JSON. The checker now reports the folder in one line, as it reports a
missing file.

Co-authored-by: Cursor <[email protected]>

* test(check-verdict): reject a placeholder Timing line

The Timing test used only "none", so dropping the placeholder half of
the rule passed every test. It now also writes "n/a" and "-", and each
must fail with the clock message.

Co-authored-by: Cursor <[email protected]>

* test(check-markdown): skip paths inside fenced code

No test held a fenced block, so checking fenced code passed every test.
The new test puts a broken link, a missing path, and a long dash inside
a backtick fence and a tilde fence, then the same path after them. Only
the line after the fences is reported.

Co-authored-by: Cursor <[email protected]>

* fix(check-verdict): accept a fix artifact in backticks or a markdown link

A Confirmed verdict whose Fix artifact held the pull request URL in
backticks, or as a markdown link, failed with "write a URL, a commit
SHA, or none". The checker now reads the URL or the SHA inside one pair
of backticks, or the target of a leading link. A backticked name, or a
link whose target is not a URL, still fails.

Co-authored-by: Cursor <[email protected]>

* fix(control-adapter): add control.recording, with traces as the Windows default

An agent could not tell whether its playwright-cli build hides the
ffmpeg window on Windows, and a probe that guessed wrong would open one
on the user's desktop. The operator now states the recording in
control.recording, and the settings checker accepts only "video" or
"trace". Without it, a run records a trace on Windows and a video
elsewhere.

A run that must not capture page scripts, on a trace, now records
nothing. A timing verdict cites its exported performance entries, which
the verdict format already accepts in place of a recording. Any other
run is Blocked, with the recording named in Missing. The setup check
skips its recording step for that run, and docs that said video where
any recording counts now say recording.

Co-authored-by: Cursor <[email protected]>

* fix(reproduce-issue): let a missing feature map send the run to explore

On a product that is its own only spec, the settings check failed on
the missing feature map, and both entry points emitted Blocked before
an agent reached the explore-first paragraph at the end of the control
adapter. Section 2 now runs the check, treats a missing map as the one
problem that sends the run to explore, and has the agent write the map
and run the check again. Reproduce-and-triage step 3 points there, and
the intro no longer stops on a missing map.

Co-authored-by: Cursor <[email protected]>

* fix(visual-parity): say how a delta in one capture counts in Runs

Visual parity never said what Runs counts, and a real drive wrote
"1 of 2" for a delta that only one capture showed. Step 5 already says
such a delta is not a change, but on a Pass the checker rejects any
failing run. Step 8 now counts the change side's capture passes that
show a visual change no person accepted, so that delta adds nothing.
The README line now says the playbook routes visual changes to a person
and sends behavior changes to reproduce and triage.

Co-authored-by: Cursor <[email protected]>

* fix(control-adapter): drop Cursor's built-in browser for exploring

The control adapter let Cursor's built-in browser explore a page, while
qstack-mode says to run browsers headless. The built-in browser is not
headless, so the adapter now rules it out for exploring too. It keeps
the measured reasons the browser must not drive a run.

Co-authored-by: Cursor <[email protected]>

* fix(diagnose): skip the source mapping step in a black-box run

Diagnose-live step 6 and diagnose-trace step 7 map a finding to a source
file with no black-box pointer. qstack-mode's blanket rule already skips
every step that needs the source, so each step now says so, as
reproduce-and-triage step 7 does.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
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