qe-write
Writes the feature tests blind from test-plan.md with the qe-test-writer agent, without the implementation, and passes the qestack lint and trace gates. Use in a qestack repository after qe-plan and before the implementation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- qe-write
- license
- Apache-2.0
- description
- Writes the feature tests blind from test-plan.md with the qe-test-writer agent, without the implementation, and passes the qestack lint and trace gates. Use in a qestack repository after qe-plan and before the implementation.
- argument-hint
- [feature, for example 003-order-discount]
- compatibility
- Needs the qestack engine (Python 3.11+), git and a shell. Full guard only in Claude Code.
03 SKILL.md 正文
qe-write
Output: executable tests for every test case in test-plan.md, written without the implementation, with no hard lint or trace findings.
Steps
- Preflight. Do the preflight of the
qestackskill. The feature is$ARGUMENTS. If it is empty, find it as the preflight says. - Inputs.
test-plan.mdmust exist.<runs_dir>/plan-review.jsonmust have the verdictaccept. If not, tell the user to runqe-planfirst and stop. (The user can override. Then say so in the report.) - Snapshot the production code:
qestack snapshot --feature <feature> - Write. Start
qestack:qe-test-writer(Feature, Mode: write). - Static gates. Run
qestack lint --feature <feature>andqestack trace --feature <feature>. If either fails, start the writer again in write mode with the exact failing lines. At most 3 rounds. - Guard. Run
qestack guard --feature <feature> --source-unchanged.- A VIOLATION
SOURCE_CHANGED_IN_TEST_PHASE: the writer changed production code. Tell the user. Ask the user to undo that change. - A REVIEW
STUB_IN_EXISTING_FILE: the writer added a stub to an existing file. Show the file to the user. The user checks that the change only adds stub members.
- A VIOLATION
- Report to the user: tests written by category and layer, lint and trace results, stubs created, guard items. Next step:
qe-prove.
Rules
- Report the gate results exactly as the engine prints them.
- The writer must not read the implementation. If the implementation already exists (brownfield), tell the user that the red check in
qe-provemay need human exemptions.
04 同仓库更多 Skills
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).
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).
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).
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).
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).
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).