Apply after any non-trivial implementation task — evaluates whether an ADR is warranted, writes to Atelier-ADR repo when yes, names the skip reason when no, and generates E2E tests for every new structural invariant so LDD has a loss signal. High bar: most tasks produce no ADR.
How this skill is triggered — by the user, by Claude, or both
Slash command
/loss-driven-development:adr_gateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apply this gate once at the END of any non-trivial implementation task, immediately before declaring "done." Most tasks will not produce an ADR — that is the correct and expected outcome.
Apply this gate once at the END of any non-trivial implementation task, immediately before declaring "done." Most tasks will not produce an ADR — that is the correct and expected outcome.
The default answer is: no ADR needed. An ADR is only warranted when a future contributor would be genuinely confused about why the system works a certain way — and that confusion would cost them real time or lead them to inadvertently break a structural invariant.
Do NOT write an ADR for:
Condition A — A real design choice was made: You chose A over B, and that choice non-trivially constrains future code. There was a genuine alternative.
Condition B — At least one structural trigger applies:
Gut-check: "Would a capable new contributor, six months from now, spend hours puzzling over why this works this way — or worse, accidentally undo it?"
Before deciding whether to write an ADR — and when writing one — think through all three levels explicitly. A decision described at only one level is an incomplete record; the missing levels will drift independently until someone breaks something.
Conceptual level — What is the core principle or idea being decided? What mental model does this create for future contributors? What rule of thumb or invariant follows from this choice that a reader should carry in their head?
Structural level — How does this decision constrain the architecture? Which layers, interfaces, protocols, contracts, or cross-repo boundaries does it shape? What cannot be changed without revisiting this decision?
Implementation level — What specific code, config, runtime behaviour, file layout, or schema shape is locked in? What does a developer need to know concretely to implement something that respects this decision?
All three levels must appear explicitly in the ADR's Context and Decision sections. If one level has nothing to say (rare), name that explicitly — e.g. "Implementation level: no specific shape is locked in beyond the structural constraint above."
Step 1 — Find the next number:
ls /home/shumway/projects/Atelier-ADR/decisions/ | grep -E '^[0-9]{4}' | sort | tail -1
Add 1, zero-pad to 4 digits (e.g. 0068).
Step 2 — Write to /home/shumway/projects/Atelier-ADR/decisions/XXXX-short-kebab-title.md:
# ADR-XXXX — [Title]
**Status:** Accepted
**Date:** YYYY-MM-DD
**Deciders:** shumway
## Context
[What situation, constraint, or requirement forced a decision here?]
## Decision
[What was decided. Direct statement.]
## Consequences
### Positive
-
### Negative / Trade-offs
-
### Alternatives considered
[What else was evaluated and why it was rejected.]
Step 3 — Commit in the Atelier-ADR repo:
cd /home/shumway/projects/Atelier-ADR
git add decisions/XXXX-short-kebab-title.md
git commit -m "adr: add ADR-XXXX — [title]"
Step 4 — If the ADR documents a load-bearing mechanism in AtelierOS, add a one-line reference at the end of the relevant CLAUDE.md section:
→ ADR: `Atelier-ADR: decisions/XXXX-short-title.md`
Step 5 — E2E tests for the ADR's mechanism (LDD loss signal)
Immediately after writing the ADR, ask: "Can I write one or more E2E tests that would FAIL if this mechanism broke or was accidentally reverted?"
If yes, write the test(s) — this is the LDD loss signal for the new invariant. Rules:
per_subtask_e2e layer). Mocks are only acceptable for pure protocol-shape tests where the real runtime is unavailable.test_adr_0068_egress_lockdown.py. This makes regressions immediately traceable.operator/bridges/run-all-tests.sh (or the relevant sub-suite) so it runs on every git push.If an E2E test is genuinely infeasible (external system unavailable at test time, hardware dependency, etc.), name the reason explicitly — e.g. "No E2E test — requires live TSA endpoint; covered by contract test in test_adr_0073_tsa_contract.py." Never skip silently.
Why this matters for LDD: The outer loop of LDD (loop-driven-engineering) drives refinement via measurable loss. An ADR that ships without a test provides no loss signal — drift goes undetected until a human notices. E2E tests convert structural guarantees into machine-checkable facts.
Write one sentence — e.g. "No ADR — bug fix, no design decision." Do not leave the gate result implicit. A named skip is as valid as a written ADR.
If the ADR is skipped but the task introduced observable new behavior, still evaluate Step 5 independently: E2E tests are warranted for significant behavior changes even without a formal ADR.
npx claudepluginhub veegee82/loss-driven-development --plugin loss-driven-developmentGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.