/enso-method:test-hardeningfrom The Enso Method
Strengthens tests for recently implemented work by verifying acceptance criteria have credible evidence, upgrading mock-reliant tests to real behavior, and adding missing tests while keeping the suite green. Runs after deliverable-review as the final step of implement -> review -> harden chain.
Ships in The Enso Method. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The third step of the standard implementation chain: implement (implement-from-requirements or implement-from-discovery) → deliverable-review → test-hardening.
Deliverable review re-checks the work that was produced. This skill turns to the tests themselves and asks a different question: if this suite passes, do we actually have credible evidence that the acceptance criteria hold? Then it closes whatever gap it finds.
This is an action skill, not an audit. It does not produce a coverage report or a graded findings document as its deliverable — the assessment happens internally, and the output is a stronger test suite. Meaningful improvement beats exhaustive analysis: a session that converts two mock-reliant tests to real integration tests and adds one missing acceptance-criterion test has succeeded, even if it didn't touch everything.
implement-from-requirements or implement-from-discovery (after deliverable review completes)Do NOT use this skill for:
test-auditThe expected path is the same chat that just did the implementation. The implement skills auto-run this pass right after deliverable review, and there is no reason to start over. The fresh-eyes requirement is already satisfied without a new chat: Step 2 delegates the assessment to a sub-agent that reads the requirements, code, and tests from disk with no conversation history. A fresh chat buys nothing the sub-agent doesn't already provide.
It also costs something real. The main agent's accumulated context is what carries the scope boundary — which acceptance criteria were in scope for this phase rather than the whole PRD, what deliverable review already changed, and what was already dismissed as immaterial. A fresh chat has to reconstruct all of that, and reconstructing it wrong is precisely the scope-creep failure this skill exists to prevent.
If the pass does start in a fresh chat, it needs two inputs before any hardening begins — and they carry different bars:
git status / git diff finds it exactly as it would in-session, no pointer needed. If it was committed, an explicit SHA or range is ideal but not required: "the last commit," "what I committed this morning," "the phase-3 commit" are all enough — resolve the pointer with git log, then confirm the resolved commit's files and message actually match the described work before proceeding. Ask only when resolution genuinely fails: several candidate commits fit, or the one found doesn't look like the work described. Being pointed in the right direction is enough; guessing without a pointer, or proceeding unsure you found the right commit, is not.A workable fresh-chat invocation: "Run test-hardening on <path to the phase doc or PRD> — the implementation is in the last commit."
One caveat grows with distance from the implementation. Step 4's triage of a failing test into "regression this work caused" versus "pre-existing debt" assumes the suite's starting state is known. Hardening a commit from days ago, with unrelated work landed in between, makes that call unreliable. Establish the baseline explicitly in that situation — run the suite before changing anything, or check the parent commit — rather than assuming a failure is pre-existing.
This is the rule that keeps the skill from going off the rails, so it comes before everything else.
Every test this pass adds or strengthens must trace to an in-scope acceptance criterion of the phase/PRD being hardened (or, for discovery-driven work, the stated intent of the fix). The acceptance criteria define what "good tests" means here — nothing else does.
The failure mode this prevents is specific and expensive. Hardening looks closely at code, and looking closely surfaces discoveries: adjacent behavior with no tests, pre-existing oddities, edge cases nobody asked about. Writing a test for any of these is scope creep twice over — the test itself is unrequested work, and when it fails it demands fixes to code this session never touched. That chain (found a thing → wrote a test for it → now fixing the thing to make the test pass → which surfaces more things) is the off-the-rails loop this boundary exists to prevent.
How the boundary applies in practice:
implementation-lifecycle has the full treatment, but the rule stands on its own here).implementation-lifecycle defines it ("The Critical Exception": real money moving wrongly, production data lost, production down, a live secret or customer data exposed), is surfaced regardless of scope, as that section says. The boundary is for the immaterial; it is never a reason to unsee something dangerous.Hardening raises the quality of evidence, never the test count for its own sake. The philosophy, stated in full so this skill stands alone:
Anchor the pass on what the session was supposed to deliver:
Superseded by: line; one with Superseded in part by: is in scope for the part still in force (prd-writing-standards, "When Later Work Changes an Earlier Criterion").git diff --stat / git status to see what code changed this session.If invoked standalone and the user has not pointed at the requirements, stop and ask (the hard gate under "Invocation Context: The Same Chat, Not a Fresh One") — a one-line answer is enough.
The implementing agent already judged its own tests adequate once — during implementation. That's the bias this step breaks, the same way deliverable-review uses fresh eyes on the deliverable.
Launch a single general-purpose sub-agent with:
SKILL.md — pass the absolute path of the file this skill was loaded from — and follow the Assessment Checklist sectionPresent the assessment in one short list ("Assessment: AC-3 has no test evidence, the payments client is mocked in the two checkout tests, four assertions are not-null-only. Hardening now."), then fix in priority order:
Every fix in every tier must trace to an in-scope criterion. Work down the list until the improvement is meaningful, not until it's exhaustive — judgment call, biased toward covering everything in tier 1 and 2. If the assessment comes back clean (every criterion has credible evidence, no unjustified mocks, assertions are real), say so in one line and stop — do not manufacture work to justify the pass.
Check what each test you add costs. Run it alone and read its duration from the runner. One slower than most tests around it needs a reason you can name, or is made cheaper (wall-clock-awareness, "What a new test or step costs").
Run the complete suite, not just the new or changed tests. Triage every failure by cause:
After fixes, re-run the tests that failed, alone, until they pass. Run the full suite again only when a fix changed more than the failed tests themselves, or the run stopped before every test ran (engineering-principles, "Which tests to run"). Pre-existing unrelated failures are noted and excluded.
Keep it brief — no FYIs or observation inventories; dismissed discoveries stay dismissed:
The rules that govern where hardened tests are allowed to touch real systems:
engineering-principles, "Production Data"), production may be used strictly read-only: GETs, SELECTs, and production-supported --dry-run planning paths. Write paths on such a service stay verified at the unit level (with the narrow mock allowances above) until a dev environment exists. This is an exception for services without one, not a general option — flag the missing environment in the wrap-up as worth standing up.is_test_data or equivalent) in any real system so it can be identified and cleaned up.This is what the sub-agent follows. Re-read the requirements, the changed code, and the test files from disk before evaluating — do not work from memory. The acceptance criteria provided in the prompt are the scope boundary: findings must concern evidence for those criteria, not adjacent behavior.
For each in-scope acceptance criterion (or the stated intent, for discovery work), identify which test(s) prove it and grade the evidence. The grades answer one question, if this criterion's behavior broke, would the suite notice?, and are the same four test-audit uses:
Grade a criterion by its least-proven required part; it is missing only when nothing exercises any part. This pass runs no red checks, so its grades stop at adequate unless this session saw a test fail with the behavior broken. One test may serve several criteria; a criterion may need several tests. Grade the evidence, not the count.
List every mock, stub, patch, or fake in the tests covering this work. For each: is it within the narrow allowances (destructive operation, expensive/rate-limited third-party API, simulated failure condition)? Everything outside those allowances is a conversion candidate — especially mocks of systems that have a sandbox/dev environment available.
Flag tests whose assertions don't pin down the required behavior: not-null-only checks, count-only checks where content matters, assertions against values computed by the same code under test, and broad assert result patterns.
Which error paths, boundary conditions, or malformed-input cases of the required behavior carry real regression risk and have no test? Every flagged case must name both the failure it would catch and the criterion it belongs to. Do not flag edge cases of behavior outside the criteria, and do not enumerate hypothetical inputs for completeness.
.env, etc.)Return a structured list of findings, ordered: missing evidence first, then unjustified mocks, then weak assertions, then edge cases, then hygiene. For each finding: the criterion or test it concerns, what's wrong, and the smallest fix that would make the evidence credible. Observations outside the criteria are not findings — omit them. Do not fix anything.
This skill is self-contained — the testing philosophy and scope boundary above are the complete rules. It connects to the other skills like this:
| Skill | Relationship |
|---|---|
implement-from-requirements | Auto-runs this skill after deliverable review completes — the third step of its chain. Its test phase builds the initial portfolio; this skill hardens it with fresh eyes. |
implement-from-discovery | Same chain, discovery-triggered work — auto-runs this skill after its deliverable review; the baseline is the criteria its Phase 4 wrote or confirmed, or the stated intent of the fix when it wrote none. |
test-audit | The independent check once a phase or PRD is finished: it grades every criterion's evidence on the same four grades, across all the sessions that built it, and fills the gaps. This skill hardens one session's work; that one audits the finished whole. |
deliverable-review | The preceding step. It verifies the deliverable matches intent; this skill verifies the tests prove the requirements. Run it first — its fixes change code that tests must cover. |
engineering-principles | The testing evidence standard this skill enforces. This skill's rules are a self-contained restatement, deliberately aligned; test tooling and framework conventions come from the house engineering standards the project names, if any. |
implementation-lifecycle | The session discipline — its Materiality Gate and No Loose Ends discipline are the general form of the scope boundary and wrap-up rules stated natively here. |
pre-commit-validation | Runs at the commit boundary after this skill — staging hygiene, secrets scan, diff sanity. |
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (ensodynamics/enso-method) — no native marketplace selected
npx claudepluginhub p/ensodynamics-enso-method27 skills in this plugin
/assumptions-document-feedbackProcess stakeholder feedback on assumptions documents — incorporate corrections, validations, partial answers and pushback (a doubt or question is researched and the assumption restated to meet it, never pasted in as the answer) while keeping the project moving forward. Checks every requested change against the whole initiative as it stood before the feedback, then sorts it into a fix or a new ask; once the PRD's build has started, fixes go into its phase plan and new asks, apart from minor ones, into one follow-on PRD, so a build in progress finishes on the scope it started with. Finishes every change in each PRD it reaches, including each PRD that consumes a changed contract, and gives each amended PRD one fresh check instead of rerunning its refinement. Use for every stakeholder answer to an assumption, however it arrives (a returned review, an email, meeting notes, a ruling given in chat), even one recorded in passing during a build./assumptions-document-writingStandards for writing assumptions documents — every entry sorted by what would settle it (a build choice goes to the technical design, a fact research could not reach is a labelled technical assumption, only what the business wants is a business assumption), specific implementable statements, plain English, confidence levels, and stakeholder validation format. Use to draft a register, add a new entry, re-sort the entries a register already holds, or make a change an agent came up with. A stakeholder's answer to an assumption entry, however it arrives (a returned review, an email, a ruling given in chat), goes through assumptions-document-feedback instead, which applies these format rules./autonomous-design-refinementMulti-pass workflow that refines PRD, Technical Design, and Assumptions documents to implementation-ready state, run after review-technical-design (and the user's own read of the design, when the user wants one) and before phase-split; the design-stage counterpart of autonomous-prd-refinement, which refines a draft PRD before any design exists — small ranked batches, each answer folded into the documents as soon as it is known, progress checkpointed to an on-disk state file so an interrupted run resumes instead of restarting./autonomous-prd-refinementResearch-and-review loop that takes a drafted PRD, with its assumptions and mockups, to a state with no Medium or High finding left, run after prd-writing-standards and before the user's recommended review and the technical design — every open business assumption researched before each full round, full deliverable-review rounds until none finds a High, cheaper delta rounds over each round's fixes until none finds a Medium or High, then a final full round; mockups reviewed as design references, facts verified once, progress checkpointed to an on-disk state file so an interrupted run resumes instead of restarting./build-preflightLast check before a PRD's build starts, while the user is still there — prove the access the whole plan needs and that it will outlive the run, confirm the machine has what it needs to build and test the project, confirm what the design says a person provides first, and find every stop left in the plan. It clears what a command clears (a sign-in refresh, a missing tool) and reports "ready" in one line, or a short numbered list of only what is left for a person. It changes no file. Not a review — it never comments on the requirements, the design, the criteria, scope or cost. Use after phase-split and before the first implement-from-requirements session, when the user asks whether a build is ready to run unattended, or as the first step of an orchestrator's run./continuation-promptProduce the copy-paste prompt that starts the next chat. Line one is a short chat name; then the lineage block (the PRD and phase this chat serves, or an honest "no lineage found"); then the skill to use, the goal, where to work, pointers into the governing documents, and the single first action. Before writing the prompt it moves every fact the repo should own out of the prompt and into the governing document, so the prompt stays a pointer. Use whenever the user asks for "a prompt for a new chat", "the prompt to continue this", "hand this off to a fresh session", or when any skill reaches the point of handing work to a fresh chat (phase-split, implement-from-requirements wrap-up). NOT for a "context package", or anything that passes information back to a chat that is already running. Re-run it to regenerate a prompt that came out wrong. At the end of a track it produces no prompt and says so. Ships a UserPromptSubmit hook that turns that first line into the session title.Other plugins' skills for the same job