AGENT SKILL

qestack

Explains the qestack gated workflow that proves AI-written tests catch bugs, and routes to the right qe-* skill. Use when the user names qestack or a qe-* skill, or asks which qestack step comes next in a repository with .qestack/.

License 许可
Apache-2.0
所属仓库
quark-sri/qestack
最近更新
2026-11-14
Stars
★ 1
Forks
0

01 前言 Front Matter

name
qestack
license
Apache-2.0
description
Explains the qestack gated workflow that proves AI-written tests catch bugs, and routes to the right qe-* skill. Use when the user names qestack or a qe-* skill, or asks which qestack step comes next in a repository with .qestack/.
compatibility
Needs the qestack engine (Python 3.11+), git and a shell. Full guard only in Claude Code.

03 SKILL.md 正文

qestack

qestack proves that AI-written tests catch bugs. It does not trust "all green" or coverage. It uses evidence: traceability to requirements, red-before-green, test locks, mutation score, hidden faults and an independent judge.

This skill and the qe-* skills are the gated workflow. They need the qestack engine. The other skills of the plugin are the QA library. They need no engine. For QA work outside the gated workflow, use qa-navigator.

Preflight (every qestack skill)

  1. Run qestack --version. If the command is not found, tell the user to install the engine and stop: pipx install "git+https://github.com/quark-sri/qestack#subdirectory=engine"
  2. The engine version must have the same major and minor number as this plugin (0.1.x). If not, tell the user to install the matching engine and stop.
  3. Check that .qestack/project.toml exists. If not, use the qe-setup skill first.
  4. Find the feature: the folder name under specs/, for example 003-order-discount. If the user did not give it and the branch name does not show it, ask the user. Pass it as --feature to every qestack command and to every agent.

How to start a qestack agent

Use the Agent tool. The plugin agents have the prefix qestack:, for example subagent_type: qestack:qe-test-writer. Put these lines at the start of the prompt. Leave out the lines that do not apply.

Feature: <feature folder name>
Mode: <mode of the agent>
Phase: prove | harden          (qe-test-writer in improve mode only)
Iteration: <n>                 (qe-test-judge in test-review mode only)
Feedback: <path>               (qe-test-writer in improve mode only)

If the host cannot start qestack: agents

Some hosts cannot start the plugin agents, for example an agent other than Claude Code, or Claude Code without the plugin. Then do not do the role yourself. A new session has no memory of this session, so the role stays independent.

  1. Stop at the step that starts the agent.
  2. Find the agent text: references/agents/<agent>.md of this skill, for example references/agents/qe-test-judge.md. If that folder does not exist, use the agent file of the plugin, plugins/qestack/agents/<agent>.md.
  3. Tell the user to start a new session of their agent in the same repository. Give the user the text to paste into it: "Act as the agent in <path of the agent text>. Follow it exactly." and the start lines above.
  4. Wait until the user says that the role is done. Then continue with the next step. Read only the files that the role writes, for example plan-review.json. Do not read the fault details.
  5. Use one new session for each role and each start. Never use the session of one role for another role.

Never do the writer, the judge or the fault seeder role in this session. This session saw the plan, the tests, the code or the faults. The designer reads only the spec. You can do the designer role in this session only if this session did not read the implementation. Then say "Independent: no" in the report.

Run the long commands in the background

qestack gate, qestack flaky, qestack mutation and qestack seed can run longer than the time limit of one shell command. Run them with run_in_background: true and wait for the completion notice. Do not poll. If a run stops early, run it again: the engine reverts a fault that a stopped seed run left in the code.

Choose the skill

The user wants to Skill When
Set up qestack in a repository qe-setup Once per repository, or when the stack changes
Check that a spec is testable qe-grill-spec Before test design
Design tests from a spec qe-plan Before code exists
Write tests from the plan qe-write After qe-plan, before implementation
Prove the tests fail first, then lock them qe-prove After qe-write, before implementation
Improve the tests until they meet the bar qe-harden After implementation
Get an independent verdict on one feature qe-judge Any time
Measure an existing test suite qe-audit Any time, read-only
Check the judge against human verdicts qe-calibrate Each sprint

With the plugin, the full skill names have the prefix qestack:, for example /qestack:qe-plan.

Standard flow for a new feature

qe-grill-spec -> qe-plan -> qe-write -> qe-prove -> (implement the feature) -> qe-harden

With speckit: qestack init --speckit adds /speckit.testplan, /speckit.testwrite and /speckit.testquality. They run the same skills.

Rules for all qestack work

  • Read the guardrails: qestack show guardrails.
  • Report numbers from the engine. Do not give opinions without evidence.
  • Never weaken a test to pass a gate. Never change thresholds or protected files.
  • Do not edit qestack result files (gate JSON files, feedback-<n>.md, quality-report.md, faults/). Run the command again. The hook blocks these edits.
  • Without the hook (any host other than Claude Code with the plugin or qestack init --hook), nothing blocks these edits in the session. Then the CI guard is the authority: run qestack guard --feature <feature> before each commit, and in CI.
  • A correct test that fails shows a product bug. Report it as a finding.

04 同仓库更多 Skills

quark-sri
quark-sri/qestack

unit-testing

Writes, fixes or improves unit tests for rules, calculations, validation and state logic: arrange-act-assert, exact oracles, boundary sets, doubles only at boundaries, controlled clock and randomness. Use when the user says 'write unit tests', 'TDD this' or 'mock this dependency'. Not for HTTP endpoints (use api-testing).

★ 1
quark-sri
quark-sri/qestack

ui-automation

Writes, fixes or structures browser end-to-end tests for critical journeys: role, label or test ID locators, auto-waiting assertions, API data setup, page objects, auth reuse and traces. Use when the user says 'UI test', 'end-to-end test' or 'our UI tests are brittle'. Not for business rules (use unit-testing).

★ 1
quark-sri
quark-sri/qestack

testcase-reviewer

Reviews automated tests or manual test cases like a senior test architect: scores fidelity, oracles, assertion depth, edge cases and determinism, and finds tests that pass on wrong code. Use when the user says 'review my tests', 'test smells' or 'review AI-written tests'. Not for fault injection (use mutation-probe).

★ 1
quark-sri
quark-sri/qestack

testability-review

Scores how testable a feature, module or design is before tests exist (seams for clock, randomness and network, hidden state, observability) and gives the smallest production change per blocker. Use when the user asks 'is this testable' or 'why is this hard to test'. Not for writing the tests (use unit-testing).

★ 1
quark-sri
quark-sri/qestack

test-strategy

Writes a test strategy for a product, system or team: quality goals, test levels and their share, environments, data, automation scope, non-functional testing, metrics and a roadmap. Use when the user says 'test strategy' or 'QA strategy'. Not for one sprint or release plan (use test-planning).

★ 1
quark-sri
quark-sri/qestack

test-runner

Finds how a project runs its tests, runs the right subset, and triages each failure as product bug, test defect, environment problem or flaky test, with evidence. Use when the user says 'run the tests' or asks 'which tests fail and why'. Not for pipeline design (use ci-cd-integration).

★ 1