fable-discipline
/fable-discipline
Engineering discipline distilled from a forensic read of one model's work. Use when building a feature, fixing a bug, writing tests, hardening a data path, or running any task that spans multiple files, sources, or sessions. Two layers: how to RUN the task (stage it, verify each stage with a check that can fail, write done-criteria) and how to WRITE the code (recon before edit, verify against a copy with a negative self-test, single-writer chokepoints, scar-anchored why-comments). Ships a paired hook that deterministically blocks a test from touching live data, the one habit a machine can enfo
- Author
- assafkip ↗
- Repository
- fable-discipline ↗
- Licence
- MIT
- Last repository change
- 03.07.2026
Assessment and security
- Files in this package
- 5
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.07.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/fable-discipline-lint.py, scripts/test_fable_discipline_lint.py
What it does and when to use it
Engineering discipline distilled from a forensic read of one model's work. Use when building a feature, fixing a bug, writing tests, hardening a data path, or running any task that spans multiple files, sources, or sessions. Two layers: how to RUN the task (stage it, verify each stage with a check that can fail, write done-criteria) and how to WRITE the code (recon before edit, verify against a copy with a negative self-test, single-writer chokepoints, scar-anchored why-comments). Ships a paired hook that deterministically blocks a test from touching live data, the one habit a machine can enfo
Original author description
Engineering discipline distilled from a forensic read of one model's work. Use when building a feature, fixing a bug, writing tests, hardening a data path, or running any task that spans multiple files, sources, or sessions. Two layers: how to RUN the task (stage it, verify each stage with a check that can fail, write done-criteria) and how to WRITE the code (recon before edit, verify against a copy with a negative self-test, single-writer chokepoints, scar-anchored why-comments). Ships a paired hook that deterministically blocks a test from touching live data, the one habit a machine can enfo
How it works
- When NOT to use this
- Layer 1: running the task
- Layer 2: writing the code
- Consistency rules
- Anti-patterns to drop
- Communication while building
- Enforcement
SKILL.md preview
--- name: fable-discipline description: "Engineering discipline distilled from a forensic read of one model's work. Use when building a feature, fixing a bug, writing tests, hardening a data path, or running any task that spans multiple files, sources, or sessions. Two layers: how to RUN the task (stage it, verify each stage with a check that can fail, write done-criteria) and how to WRITE the code (recon before edit, verify against a copy with a negative self-test, single-writer chokepoints, scar-anchored why-comments). Ships a paired hook that deterministically blocks a test from touching live data, the one habit a machine can enforce." --- # Fable-Discipline Coding and task discipline, distilled from reading thousands of edits by one capable model and grading them against an independent review. It is additive: it does not replace what your model already does well, it adds the habits that strong engineers have and most code generation skips. Most of it is judgment the skill teaches. One slice is enforced by a hook, because a rule a model can talk itself out of is a suggestion, not a gate. The skill teaches; the hook makes the one checkable habit non-optional. ## When NOT to use this One-line changes, typo fixes, a task with one obvious approach that fits in a single pass. Staging a trivial task buries the answer under ceremony. This earns its cost only when a one-shot attempt would plausibly miss something. --- ## Layer 1: running the task How to move through complex work without shipping a confident wrong answer. 1. **Stage before you act.** Write the stage plan first. Number the stages, name the one checkable artifact each produces. If a stage produces nothing checkable, merge it into the next. The map is living, not a contract; update it when what you learn invalidates it. 2. **Verify each stage with a check that can fail.** A test that runs, a file that provably exists in the right shape, a source actually read, an output diffed against the spec. "I reviewed it and it looks right" is not a check: a model that would skip verification also passes its own introspection. If a stage has no failable check, say so and mark its output unverified so the gap is visible. 3. **Say, then batch.** State the one-line intent, then fire the burst of actions that executes it. The test is binary: a reader given only your intent lines can reconstruct the plan, or the intent line failed; rewrite it. It keeps you from drifting mid-burst. 4. **Done is written, not felt.** Define done-criteria up front. On a task that spans sessions, keep a short work log (decisions, what was tried, what failed) and re-read it before continuing, so you do not duplicate work or guess where you left off. 5. **Ground before you diagnose.** Confirm a perceived error actually reproduces before you act on it. Read where the data comes from before you trust what it represents. The failure mode this prevents: seeing a likely error, diagnosing it instinctively, and running with that explanation before checking it was real. --- ## Layer 2: writing the code 1. **Recon before edit. Read reality, do not assume it.** Grep the real schema and call-sites before changing anything. Never edit a file you have not read this session, unless you created that file in this same session (your own fresh write counts as read). If you already read a schema, re-read the exact field names rather than guessing them. 2. **Verify against a copy, with a negative self-test.** A passing gate is not trusted until it has been seen to fail. Run the reproducer against a copy of the live resource, never the live one, unless the resource is disposable by design (a regenerable fixture or sandbox environment). Then corrupt a valid input and prove the check FAILS on the violation, so a green result is not a rubber stamp. 3. **Single-writer chokepoint, guarded by a grep-the-tree test.** Route every mutation of a shared resource through one helper, and write a test that greps the tree to prove no caller bypasses it. Migrate existing call-sites one small, independently revertible edit at a time, not one bulk rewrite. 4. **Why-comments anchored to a named scar.** Comments encode the constraint and the specific past bug that motivates it, not a restatement of the code. These survive refactors because they encode an invariant. 5. **Capture every out-of-scope finding; never just mention it.** If you notice a real issue that is out of scope for the current work, write it to a tracked backlog (an issue, a ticket, a standing ledger your gate reads), not a bare prose mention. A mention is a silent drop; a tracked item is one a gate can keep failing until it is resolved. The paired lint blocks deferral language written into code without such a capture. Override: capture first, then ack the captured line with `# spillover-skip`; there is no skip-first path. 6. **Build against the recurring gap classes.** If the change scales or touches sensitive data, walk the gap-class block in `references/checklist.md`: an in-memory cap is not a disk bound; a UI hide is not access control; a gate fails closed while a filter fails open; redact at the egress edge; a new flag must reach every reader; check-then-mutate needs one lock; single-source the version; a cross-cutting invariant needs a written scope + a self-enumerating guard. Check only the classes the change touches. --- ## Consistency rules Habits that are easy to do somewhere and forget elsewhere. Make them non-optional: - **Test isolation.** A test uses a temp copy, a tempfile, or `:memory:`, never a real data path. (This is the slice the paired hook enforces.) Override: an audit test that must NAME a live path may assert on it (assertion lines are exempt); anything else carries `# fable-discipline-lint-skip` in that file with a one-line reason. - **Declare and pin every new dependency** the moment you import it, and keep a test that proves the manifest covers every third-party import. - **Specify degenerate cases before implementing**: empty, single-element, disconnected, non-converging. Each gets defined behavior, not an implicit crash. - **Validate persisted external input.** Never store arbitrary user or model JSON that, if malformed, can permanently break a render or load path, unless every read path runs a validating loader that tolerates the malformed record. - **Enumerate all call-sites when scoping a change.** Grep for every site the change must reach before declaring it done. ## Anti-patterns to drop - Guessing a schema or API you already read. Re-read it. - Acting on an unconfirmed diagnosis. Confirm the error is real first. - Re-attempting the same failing command. Change the approach, do not retry it. - Applying the user's stated style rules only to shipped output, not your own narration. ## Communication while building Terse mid-task, then decompress at the seam into a short "ran, not assumed" block listing what you ran and what passed. When a real choice exists, name the options, mark your pick, give the tradeoff, end with one action. ## Enforcement The deterministic slice (test isolation) is enforced by `scripts/fable-discipline-lint.py`, wired in `hooks/hooks.json` as a PostToolUse hook. Everything else is judgment and lives here. See `EXAMPLE.md` for a worked before/after, and `references/checklist.md` for the copy-paste pre-done gate.
Files in this package (5)
- EXAMPLE.md 3 KB
- SKILL.md 7 KB
- references/checklist.md 5 KB
- scripts/fable-discipline-lint.py 10 KB
- scripts/test_fable_discipline_lint.py 3 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · assafkip/fable-discipline | 100 | MIT |
| assafkip/kipi-system | 100 | MIT |
Database snapshot: 13.11.2026 · package version 57eada45178d (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100build-discipline
King's Reach engineering rules for the Build stage and any code change here: Windows-safe commands, surgical diffs, files under 600 lines, never touching store/ or secrets, test first, and no 'done' without real command output. Use whenever you write, change, or review code in this repository. - 100fable-code
Code like Fable 5 — methodical, verified, and deeply informed by context. Use this skill whenever you need to write, edit, or create code. - 100engineering-discipline
Use for every Botss run that writes, changes, tests, or fixes code (backend, frontend, QA, DevOps, tech lead scaffolding), and whenever a test fails, a bug appears, review comments arrive, you feel stuck, or you are about to say a task is done or a test passes. - 85fable-review
Launch an independent Fable code review and return it verbatim. Use only when the user explicitly invokes /fable-review. - 90fable-ish
Apply fable-ish verification discipline to Claude Code coding tasks with risk-proportional workflow, review, and final reporting. Use for fable-ish requests, common typo fablish, complex implementation, debugging, refactoring, deployment preparation, or work where completion… - 100ai-coding-discipline
Mandatory coding discipline rules that prevent common AI coding anti-patterns. MUST be loaded for ALL code writing, editing, reviewing, bug fixing, and testing tasks. Trigger on: writing code, editing code, fixing bugs, writing tests, implementing features, refactoring, code…