addon-decision-justification-ledger
Add-on: Decision Justification Ledger
Use this skill when decision visibility is required by default and no non-trivial change should ship without a recorded rationale.
Compatibility
- Works with all
architect-*,addon-*, andui-*skills. - Required default for
production-defaultmode.
Inputs
Collect:
DECISION_LOG_LEVEL:standard|strict(defaultstrict).DECISION_SCOPE:architecture-only|architecture+implementation(defaultarchitecture+implementation).DECISION_LOG_PATH: defaultdocs/DECISION_LOG.md.DECISION_TRACE_PATH: defaultREVIEW_BUNDLE/DECISION_TRACE.md.
Integration Workflow
- Add decision visibility artifacts:
docs/DECISION_LOG.md
REVIEW_BUNDLE/DECISION_TRACE.md
- Record each non-trivial decision in
docs/DECISION_LOG.md:
- Decision ID
- Context and requirement
- Options considered
- Chosen option
- Concrete justification
- Tradeoffs and residual risks
- Validation evidence
-
Link changed files to decision IDs in
REVIEW_BUNDLE/DECISION_TRACE.mdso reviewers can map code to rationale quickly. -
Keep entries append-only for auditability; corrections should be new entries that reference previous IDs.
Required Template
docs/DECISION_LOG.md
# Decision Log
## DEC-001 <short title>
- Context: <what requirement or constraint triggered this>
- Options: <A>, <B>, <C>
- Chosen: <selected option>
- Justification: <why this option is best for this case>
- Tradeoffs: <known downsides>
- Risks: <residual risk + mitigations>
- Evidence: <tests/build/checks/docs>
REVIEW_BUNDLE/DECISION_TRACE.md
# Decision Trace
| File | Decision ID | Summary |
|---|---|---|
| src/app/main.py | DEC-001 | Chose local lexical index for offline deterministic retrieval |
Guardrails
-
Documentation contract for generated code:
- Python: write module docstrings and docstrings for public classes, methods, and functions.
- Next.js/TypeScript: write JSDoc for exported components, hooks, utilities, and route handlers.
- Add concise rationale comments only for non-obvious logic, invariants, or safety constraints.
- Apply this contract even when using template snippets below; expand templates as needed.
-
No non-trivial decision without rationale.
-
Do not use generic claims like "best practice" as a sole justification.
-
If alternatives were not considered, explicitly state why only one path is viable.
-
Missing decision entries are merge blockers in production-default mode.
Validation Checklist
- Confirm generated code includes required docstrings/JSDoc and rationale comments for non-obvious logic.
test -f docs/DECISION_LOG.md
test -f REVIEW_BUNDLE/DECISION_TRACE.md
rg -n "## DEC-[0-9]{3}" docs/DECISION_LOG.md
rg -n "Justification:|Tradeoffs:|Risks:" docs/DECISION_LOG.md
Decision Justification Rule
- Every non-trivial decision must include a concrete justification.
- Capture the alternatives considered and why they were rejected.
- State tradeoffs and residual risks for the chosen option.
- If justification is missing, treat the task as incomplete and surface it as a blocker.
More from ajrlewis/ai-skills
architect-python-uv-fastapi-sqlalchemy
Use when scaffolding production-ready FastAPI services with uv, SQLAlchemy, Alembic, Postgres, Docker, and CI gates.
11addon-rag-ingestion-pipeline
Use when adding multi-format RAG ingest, chunk, embed, and retrieval pipelines; pair with architect-python-uv-batch or architect-python-uv-fastapi-sqlalchemy.
11addon-docling-legal-chunk-embed
Use when you need legal PDF to markdown extraction plus clause chunking and embedding prep; pair with addon-rag-ingestion-pipeline and architect-python-uv-batch.
10addon-llm-ancient-greek-translation
Use when adding Koine or Attic Greek translation to Next.js content flows; pair with ui-editorial-writing-surface and addon-nostr-nip23-longform.
10architect-python-uv-batch
Use when scaffolding production-ready Python uv batch or worker projects with Docker required by default.
10addon-human-pr-review-gate
Use when agent-generated code must pass a human PR review gate with trusted checks and merge blocks; pair with addon-decision-justification-ledger and architect-stack-selector.
9