craft-discipline
Use when a change looks finished and is about to be committed, or a phase has just turned green — the self-check the software-engineer runs before claiming the work is done. Not a review contract. The reviewer verifies artifacts independently.
Install
npx skills add https://github.com/SebastienDegodez/skraft-plugin/tree/main/plugins/skraft-framework/skills/craft-discipline
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install sebastiendegodez-skraft-plugin@llmmart
git clone https://github.com/SebastienDegodez/skraft-plugin.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole sebastiendegodez/skraft-plugin collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Craft Discipline
Overview
10 self-discipline checkpoints for the software-engineer.
Run at every COMMIT & VERIFY phase, before committing.
What this skill is NOT: a review contract. The reviewer does not read this skill. It audits artifacts independently through its own gates.
Checkpoints
Execute in order. Each checkpoint must pass before proceeding.
C1 — Acceptance test passes
dotnet test --filter "Category=Acceptance"
The acceptance test targeted by this iteration MUST pass. No [Skip].
C2 — All unit tests pass
dotnet test
Zero red tests, except the committed acceptance tests of the story's scenarios not delivered yet (outside-in-tdd → All Acceptance Tests First). Zero ignored tests.
C3 — Build passes
dotnet build
All projects compile without warnings. Treat warnings as errors.
C4 — Static analysis passes
Verify that the linter/analyzer reports no new findings.
C5 — No skipped tests or placeholder assertions
No [Skip], [Ignore], #if false, disabling comments,
or placeholder assertions in test bodies
(assert.fail() / Assert.Fail() / Assert.True(false, ...) /
throw new NotImplementedException() / throw new Error('not implemented')).
Skipped tests and placeholder assertions are both theater —
they pass the compile gate but assert nothing.
C6 — No mocks in Domain/Application
Check UnitTest files:
- No
A.Fake<>(),Mock<>(),Substitute.For<>()on a Domain or Application type. - Mocks allowed ONLY on output gateways (repositories, external services).
C7 — Business language verified
Test names, variables, and assertions use business vocabulary
(see the project's FR→EN lexicon). No test1, data, ProcessData.
C8 — mutation stays out of the delivery
Run no mutation tool, mutation gate or /skraft-mutation: the project's CI runs mutation. The
developer runs /skraft-mutation; when they ask to kill its survivors, load mutation-testing.
C9 — Conventional commit format
Use git commit -s with type(feature): subject, e.g.
test(loyalty-discount): cover expired membership. For a known issue, end the
body with Refs: #N for intermediate work or Closes #N (no colon) only when the whole
issue is genuinely finished and all required gates pass. Omit the issue line
when unknown.
C10 — Object Calisthenics on Domain
Verify the 9 rules (see references/object-calisthenics.md). Applicable to Domain code only.
C11 — Parametrize Variations
Multiple input variants for the same behavior MUST be a single parameterized test
([Theory]/[InlineData] in .NET, @ParameterizedTest in Java, pytest.mark.parametrize in Python,
it.each / test.each in TypeScript and JavaScript),
not duplicated test methods. One test method per behavior, one row per case.
When to Execute
A pre-approved, staged documentation-only change with no applicable executable tests, build, or mutation targets is not a code COMMIT & VERIFY cycle. Check the exact approved content and changed paths, run applicable whitespace checks, and apply C9; do not invent code-gate results or create code-evidence artifacts.
| TDD Phase | Applicable Checkpoints |
|---|---|
| PREPARE | None |
| RED | None |
| SYNTHESIZE-GREEN | C3 only (build) |
| COMMIT & VERIFY | All (C1-C11) |
On Failure
- Red checkpoint → fix BEFORE committing.
- No exceptions, no
--ignore. - After 3 attempts on the same checkpoint: revert to green + escalate.
References
Files (skraft-plugin)
-
references
-
object-calisthenics.md 1.2 KB
Loading… -
test-theater-patterns.md 2.1 KB
Loading…
-
-
SKILL.md 3.9 KB
--- name: craft-discipline description: Use when a change looks finished and is about to be committed, or a phase has just turned green — the self-check the software-engineer runs before claiming the work is done. Not a review contract. The reviewer verifies artifacts independently. --- # Craft Discipline ## Overview 10 self-discipline checkpoints for the `software-engineer`. Run at every COMMIT & VERIFY phase, before committing. **What this skill is NOT:** a review contract. The reviewer does not read this skill. It audits artifacts independently through its own gates. ## Checkpoints Execute in order. Each checkpoint must pass before proceeding. ### C1 — Acceptance test passes ```bash dotnet test --filter "Category=Acceptance" ``` The acceptance test targeted by this iteration MUST pass. No `[Skip]`. ### C2 — All unit tests pass ```bash dotnet test ``` Zero red tests, except the committed acceptance tests of the story's scenarios not delivered yet (`outside-in-tdd` → All Acceptance Tests First). Zero ignored tests. ### C3 — Build passes ```bash dotnet build ``` All projects compile without warnings. Treat warnings as errors. ### C4 — Static analysis passes Verify that the linter/analyzer reports no new findings. ### C5 — No skipped tests or placeholder assertions No `[Skip]`, `[Ignore]`, `#if false`, disabling comments, or placeholder assertions in test bodies (`assert.fail()` / `Assert.Fail()` / `Assert.True(false, ...)` / `throw new NotImplementedException()` / `throw new Error('not implemented')`). Skipped tests and placeholder assertions are both theater — they pass the compile gate but assert nothing. ### C6 — No mocks in Domain/Application Check UnitTest files: - No `A.Fake<>()`, `Mock<>()`, `Substitute.For<>()` on a Domain or Application type. - Mocks allowed ONLY on output gateways (repositories, external services). ### C7 — Business language verified Test names, variables, and assertions use business vocabulary (see the project's FR→EN lexicon). No `test1`, `data`, `ProcessData`. ### C8 — mutation stays out of the delivery Run no mutation tool, mutation gate or `/skraft-mutation`: the project's CI runs mutation. The developer runs `/skraft-mutation`; when they ask to kill its survivors, load `mutation-testing`. ### C9 — Conventional commit format Use `git commit -s` with `type(feature): subject`, e.g. `test(loyalty-discount): cover expired membership`. For a known issue, end the body with `Refs: #N` for intermediate work or `Closes #N` (no colon) only when the whole issue is genuinely finished and all required gates pass. Omit the issue line when unknown. ### C10 — Object Calisthenics on Domain Verify the 9 rules (see [references/object-calisthenics.md](references/object-calisthenics.md)). Applicable to Domain code only. ### C11 — Parametrize Variations Multiple input variants for the same behavior MUST be a single parameterized test (`[Theory]/[InlineData]` in .NET, `@ParameterizedTest` in Java, `pytest.mark.parametrize` in Python, `it.each` / `test.each` in TypeScript and JavaScript), not duplicated test methods. One test method per behavior, one row per case. ## When to Execute A pre-approved, staged documentation-only change with no applicable executable tests, build, or mutation targets is not a code COMMIT & VERIFY cycle. Check the exact approved content and changed paths, run applicable whitespace checks, and apply C9; do not invent code-gate results or create code-evidence artifacts. | TDD Phase | Applicable Checkpoints | |-----------|------------------------| | PREPARE | None | | RED | None | | SYNTHESIZE-GREEN | C3 only (build) | | COMMIT & VERIFY | **All (C1-C11)** | ## On Failure - Red checkpoint → fix BEFORE committing. - No exceptions, no `--ignore`. - After 3 attempts on the same checkpoint: revert to green + escalate. ## References - [Test Theater Patterns](references/test-theater-patterns.md) - [Object Calisthenics](references/object-calisthenics.md)
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.