Skip to content
Development
Skill

/derive-tests

Use only after the lock (gate 2b) is on record for the slice portion, to derive the fidelity ledger and acceptance scenarios from the locked prototype. Triggers when a portion is newly locked or re-locked. Never use before the lock, and never use it to hand-author

From plugin
x2
1513 skills

Claude Code

$ npx -y skills add teklabsdigital/x2-method --skill derive-tests --agent claude-code

SKILL.md

derive-tests.SKILL.md
name: derive-tests
description: Use only after the lock (gate 2b) is on record for the slice portion, to derive the fidelity ledger and acceptance scenarios from the locked prototype. Triggers when a portion is newly locked or re-locked. Never use before the lock, and never use it to hand-author prototype-fidelity test cases from prose.

X2 Derive Tests

Turn the locked portion into its tests. Nothing here is authored from imagination: the locked prototype is the acceptance contract, and the tests are projections of it.

What derives from the lock

  • **The per-slice fidelity record**, derived mechanically: a deterministic exporter reads the

locked artifact on disk into a computed record, and the built screens are compared against that record computationally, in both directions (everything in the record renders; nothing renders beyond it). Never hand-derive fidelity: a hand-typed summary standing in for the artifact produces drift as its designed output, because the artifact is never read again after the lock. The third project exited two slices with drifted screens that way, then built the mechanical route mid-project and drift stopped (record: PC-30). The ledger file (`design/ledger/slice-NNN.md`) keeps only what cannot be computed: acceptance scenarios and owner rulings, including licensed divergences.

  • **The portion is declared, never assumed.** A locked portion smaller than a whole screen is

declared as excluded subtrees, each citing its ruling, held in the same extent guard as the comparison. And coverage is per drawn state, not per screen: a built state that ships never-compared is the gap an extent guard that only sees screens cannot see.

  • **Chrome is contract; sample content is illustration.** The locked artifact says which parts of

a screen are specification and which are sample data; compare the specification. Fixtures for comparisons come from the wire types, values the product can actually emit, and an artifact-versus-product disagreement is a finding for the record, never smoothed over locally.

  • **A rule the storage engine happens to enforce proves nothing.** Where a product rule is also

enforced by the engine as a side effect (a collation, a constraint), the falsifying test must run on a tier the engine does not cover, or the test can never fail.

  • **The acceptance scenarios** on the e2e floor: the flows the locked portion shows, driven through

the real client services against a running server.

The scoping of "no hand-authored test cases"

The ban is precise, per the record's wording fix:

  • **Banned**: authoring prototype-fidelity tests ahead of the lock. They derive from it.
  • **Not banned**: claim-driven tests: harness scenarios, gate tests, guard tests. These keep the

write-it-first, watch-it-fail shape, and they did the most catching in the pilot.

Coverage expectations the exit report will check

Derivation should leave these satisfiable, because slice-exit reports them:

  • Every public method of every client data service has at least one harness scenario through the

real transport, and when the product owns identity, the harness exercises the real sign-in path at least once; minting around auth is setup for other scenarios, never a substitute (INV-10, ruled: the gated harness profile makes this achievable).

  • A composed-app smoke exists per primary flow: the actual entrypoint, at least one real request

(INV-07).

  • A service method with no surface in the locked portion is a sanctioned UI-unsurfaced state when

it is e2e-covered and its boundary is documented (CONF-03). It is never resolved by inventing UI the prototype does not contain; the fidelity tests would fail that fabrication, and they should.

One discipline line

Prove a derived suite can fail: write one assertion wrong, watch it fail, fix it. A suite that cannot fail is not evidence.

Human-turn contract

  • No gate of its own. A gap between the locked portion and what is derivable is a record-gap

question for the human, never an invented criterion.

What this skill must NOT produce

  • Nothing before the lock is on record.
  • No criteria the prototype does not show, no edits to the prototype or ledger direction, no

implementation code.

Next

implement.

Read more
@teklabsdigital
Ships withx2

An agentic software engineering method: AI agents do the building, the build enforces the rules that must always hold, a person decides only at the gates, and the method measures its own cost in human turns.

Stars on GitHub

Momentum

stars in total
15
Star history of teklabsdigital/x2-method on GitHub, a chart by star-history.com

Other skills on x2.

adopt

adopt

Use when an existing project that was not built with X2 must be migrated to run under it, with documentation sprawl to dissolve,…

@teklabsdigital@teklabsdigitalInstall Skill
decompose

decompose

Use after the repo is seeded to run the D-000 five-lens decomposition, record persistent schema decisions, define slice one, and…

@teklabsdigital@teklabsdigitalInstall Skill
design

design

Use when D-000 exists and the whole-product prototype does not, to run Claude Design in its own context and produce the prototype…

@teklabsdigital@teklabsdigitalInstall Skill
extract

extract

Use when an X2 project completes (or reaches a major milestone) to run the extraction loop, the quality feedback that folds the…

@teklabsdigital@teklabsdigitalInstall Skill
help

help

Use when someone asks what an X2 skill does, which skill to run next, how the gates work, or where an artifact lives. A quick…

@teklabsdigital@teklabsdigitalInstall Skill
implement

implement

Use when the slice portion is locked and its derived tests exist, to build all of the locked portion to green autonomously.…

@teklabsdigital@teklabsdigitalInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about derive-tests.

Which coding agents can use derive-tests?
derive-tests installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.