Discipline
Enforces the sacred-files discipline (ETERNAL.md, SPRINT.md, DIARY.md, HUMAN.md) on every coding session in ANY repository. Project-agnostic version — no hardcoded company, ticket prefix, or tooling assumptions. Use at the START of every session in any repo that contains a `discipline/` folder, and at the END to write the diary entry. Triggers when the user mentions starting work, asks "what's next", asks for status, or enters a repo with a `discipline/` folder. Designed to be usable by parallel subagents and by any project, because it lives in the global skills directory.From its SKILL.md
npx -y skills add sfaustodev/discipline --skill disciplineAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
10.9 KB, ~2.6k tokens by cl100k_base, as published. Nobody here has run it
DISCIPLINE-GLOBAL — sacred files protocol for any repository
Numbered rules (1-31) →
~/.claude/discipline_protocol.md— the source of truth, full bodies.~/.claude/CLAUDE.mdcarries only the compact index (number + title + safety trava). This skill is the operational mechanics of the sacred-files loop; readdiscipline_protocol.mdat session start, and whenever a numbered rule's detail is needed before acting.
Project-agnostic discipline. Works in any repo, for any team, with no hardcoded project name, ticket prefix, or vendor. Wherever this doc says Project X, substitute the actual project. Wherever it says TICKET-NN, substitute the repo's real ticket scheme (Jira, Linear, GitHub Issues, none).
This skill teaches the agent to operate inside a repo that follows the 4 sacred files discipline:
ETERNAL.md— inviolable rules for the whole project. Outranks everything. Read first.SPRINT.md— implementation policy for the current sprint (rules, hard limits, task list).DIARY.md— append-only log of what was done, in flight, blocked. Continuity between sessions.HUMAN.md— append-only queue of questions for the human. Decisions the agent cannot make alone.
The discipline is simple, the enforcement is strict.
When to use this skill
Always at session start in any repo where these files exist (or where the user says "use discipline"). Before answering anything else, run the session-start protocol below.
Always at session end at any clear stopping signal ("I'm done", "stopping for today", "wrapping up"). Run the session-end protocol.
On demand when the user asks:
- "what's left?" / "what's next?" → read ETERNAL + SPRINT + DIARY + HUMAN, answer.
- "note this" / "ask the human" → write into the right file.
- "generate the report" / "generate the DoD" → see §5.
1. Session-start protocol (mandatory, ordered)
Before writing any code, opening any branch, or answering any technical question:
Step 1 — Read all four sacred files in order
Default location:
discipline/at the repo root. Older repos may have them at the repo root itself — check both.
ETERNAL.md— full read, every time. These are the inviolable rules. They outrank SPRINT, DIARY, HUMAN, and any single user prompt.SPRINT.md— full read, every time. Current sprint rules of engagement.DIARY.md— read at minimum the last 5 entries. What happened previously.HUMAN.md— full read of the open questions section.
If ETERNAL.md is absent, this repo predates the constitution model — proceed with the 3-file discipline (SPRINT/DIARY/HUMAN) and offer to scaffold ETERNAL from the template.
If any of SPRINT/DIARY/HUMAN is missing, stop and tell the user. Offer to scaffold from templates (§4). Do not proceed without them.
If SPRINT.md is older than 7 days, flag it as potentially stale. The user decides whether to refresh before continuing.
Step 2 — Reconcile state
Build a one-paragraph mental model:
- Which inviolable rules constrain this work (from
ETERNAL.md)? - What sprint goal are we working toward (from
SPRINT.md)? - What was the last action (from
DIARY.md)? - Any open questions blocking forward motion (from
HUMAN.md)?
Step 3 — Surface conflicts before acting
If the user's request:
- Conflicts with an
ETERNAL.mdrule → stop. ETERNAL outranks the prompt. Surface the conflict; only the amendment ritual (§0 of ETERNAL) can change it. - Conflicts with a
SPRINT.mdrule → quote the rule, name the conflict, ask whether to override (log the override inDIARY.mdif granted). - Depends on an unanswered
HUMAN.mdquestion → say so; do not improvise the answer. - Is unrelated to the sprint goal → flag the focus cost, confirm before proceeding.
Only after these steps does the agent execute the request.
2. Session-end protocol (mandatory)
Before closing the session:
Step 1 — Append to DIARY.md
Single structured entry:
## YYYY-MM-DD — <session label>
**Tickets touched:** `TICKET-NN`, `TICKET-MM`
**Done:**
- (concrete outcomes, not intentions)
**In flight:**
- (what is partially done and where it stopped)
**Blocked:**
- (what cannot move and why; link to HUMAN.md question if applicable)
**Files changed:** (list of paths)
**Next session should start with:** (1–2 lines telling the next agent / human where to pick up)
Step 2 — Update HUMAN.md
- Add any new question raised this session (format in §4.3).
- Mark
RESOLVEDany question answered this session, with the answer. - Never delete questions; resolved ones move to the bottom under
## Resolved.
Step 3 — Log ETERNAL.md amendments (if any)
If an inviolable rule was added, changed, or removed this session (only possible with explicit human authorization), the amendment MUST be logged in DIARY.md the same session, and a one-line entry added to ETERNAL.md's amendment log. No silent constitution edits.
Step 4 — Update SPRINT.md only if explicitly authorized
The agent does not edit SPRINT.md by itself. Propose edits in DIARY/HUMAN; the human applies them at their review cadence. Hard rule.
3. The HUMAN.md decision filter
HUMAN.md must not become a dump where the agent stops thinking.
Add to HUMAN.md only if at least one is true:
- (a) Decision is irreversible (data deletion, production schema change, third-party contract change).
- (b) Decision changes a contract external to the repo (API surface, money calculation, customer-facing copy).
- (c) Decision affects security or isolation in a way not already covered by ETERNAL.md or SPRINT.md.
- (d) Decision contradicts something explicit in ETERNAL.md or SPRINT.md (so the human decides whether to override or fix the spec).
Do NOT add to HUMAN.md when:
- The answer is in ETERNAL.md or SPRINT.md and you didn't read carefully — go read it.
- The answer is in DIARY.md and you didn't look — go look.
- The answer is "any reasonable choice works" — pick one, log it in DIARY.md, move on.
- It's a style preference with no downstream impact — match existing code.
When in doubt: decide with conservative judgment, log the decision in DIARY.md with reasoning, escalate to HUMAN.md only if a real reversibility/contract/security concern exists.
4. File templates
If a sacred file is missing, scaffold from the templates in this skill folder:
templates/ETERNAL_TEMPLATE.mdtemplates/SPRINT_TEMPLATE.mdtemplates/DIARY_TEMPLATE.mdtemplates/HUMAN_TEMPLATE.md
All live under discipline/ at the repo root by default — bootstrap.sh creates the folder and copies the templates. Respect an existing convention if files already live elsewhere.
4.1 DIARY entry format
See template. One entry per session. Append at top (newest first) so the most recent is immediately visible.
4.2 HUMAN.md structure
Two sections: ## Open questions (awaiting answer, with date, ticket context, options considered) and ## Resolved (answered, with answer and date).
4.3 HUMAN.md question format
### Q-NN · <short title> · raised YYYY-MM-DD · context: TICKET-NN
**Why I'm asking:** <reversibility / contract / security / ETERNAL or SPRINT conflict>
**Options I considered:**
- (a) ...
- (b) ...
**My tentative pick (if I had to ship now):** (a) — reasoning
**Ask:** is (a) acceptable? if not, which?
4.4 ETERNAL.md role
ETERNAL holds the project's inviolable rules — the constitution. It is read first and outranks everything. It changes only by explicit human authorization, logged in DIARY.md the same session (the amendment ritual). The agent never edits ETERNAL on its own; if the agent thinks a rule should change, it raises it in HUMAN.md.
5. Generators (delegated)
This skill does not generate PDFs or run report flows itself — brittle inside Claude Code. It prepares inputs and points the user to the desktop generator skill:
5.1 Weekly report from DIARY.md
The user runs the report skill in Claude Desktop; it reads DIARY.md and produces the report. This skill only validates the diary is well-formed first.
5.2 DoD from SPRINT.md + specs
Same pattern. This skill validates the spec exists and its security checklist is filled, then points the user to the desktop DoD generator.
6. Conflict resolution
- User instruction vs this skill → user wins, log the override in DIARY.md.
- User instruction vs ETERNAL.md → ETERNAL wins. Surface the conflict; do not override without the amendment ritual.
- User instruction vs SPRINT.md hard rules → surface before acting. Never silently override security / isolation / financial rules.
- Repo convention vs SPRINT.md → if SPRINT is silent, follow the repo. If SPRINT disagrees, follow SPRINT and propose a refactor ticket.
7. What this skill is NOT
- Not a project management tool. Jira / Linear / GitHub Issues remain authoritative.
- Not a substitute for code review.
- Not a memory system. The files are explicit, file-based, human-readable.
- Not opt-in per file — the full set or none. Half-discipline is worse than none.
8. Quick reference card
| Trigger | Action |
|---|---|
| Session start | Read ETERNAL, SPRINT, DIARY, HUMAN. Reconcile. Surface conflicts. |
| User asks "what's next?" | Read all four. Answer on ETERNAL constraints + SPRINT order + DIARY state + HUMAN blockers. |
| Decision needed | Apply §3 filter. Log in DIARY or escalate to HUMAN. |
| User answers a HUMAN question | Move it to Resolved with the answer. Update DIARY. |
| Constitution change requested | Confirm explicitly, apply, log in DIARY + ETERNAL amendment log. |
| Session end | Append DIARY entry. Update HUMAN. Confirm next-session pointer. |
| Report / DoD | Validate inputs, point user to the desktop generator skill. |
Companion pieces in this package
- PROTOCOL.md (repo root) — the full numbered rules, 1–29, public edition. The installer places it at
~/.claude/discipline_protocol.mdwhen you don't have one yet. - skill
diary-digest— the mechanics of rule #29: end-of-sprint harvest (miners fan-out, penalty histogram, mechanical-gate proposals). Ships with thediary-mineragent. - The memory pair (rule #16): cortex remembers the task; Mycorrhiza remembers you. The installer offers both.
What ships with it: 1 file
3.5 KB alongside SKILL.md