/leyline:decision-journalfrom leyline
Records tradeoffs, lessons learned, and deferred-capture items in append-only docs/tradeoffs.md and docs/lessons-learned.md. Use when a decision or blocker occurs.
Ships in leyline. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
modules/deferred-capture.md).modules/storage-templates.md).attune:project-init).docs/adr/. Reference its number from a journal entry instead of
duplicating it.This is a convention and a helper rather than a hard runtime dependency. Consumers degrade gracefully when leyline is absent (see Fallback).
AI-assisted work tends to narrate tool output ("the agent built X") and lose the human reasoning: the decision, the road not taken, and the honest rework nobody mentions. Two append-only logs, co-located with the code, fix that:
docs/tradeoffs.md records decisions and the alternatives sacrificed.docs/lessons-learned.md records insights, failed approaches, and rework,
framed blamelessly.Both files are in docs/ (co-location is the strongest anti-staleness
lever). Each is a single append-only running log with a scannable
## Active index at the top and an ## Archive section at the bottom.
Status changes.superseded-by: <new-id>, and links both ways.TR-001, LL-001) so links from PRs, commits, and code
never break.Status vocabularies:
proposed -> accepted -> (superseded-by: TR-NNN | deprecated)open -> actioned -> closedWhen a workflow reaches a decision or lesson point:
proposed, and lessons start open.Do not auto-write without the confirm step. The point is to capture the human reasoning.
Run the helper from leyline:
python3 ${LEYLINE}/scripts/journal_append.py <tradeoffs|lessons> \
--project-root <repo-root> \
--title "<short title>" \
[--phase <phase>] [--status <status>] \
[--field key=value ...] \
[--json '<full field object>'] \
[--supersedes TR-NNN] \
[--dry-run]
The helper assigns the next ID, renders the template, inserts the entry above
the ## Archive marker, updates the active index, and (with --supersedes)
flips the prior entry's status and adds backlinks. It is idempotent: appending
an entry whose substantive fields already appear is a no-op.
title (required), context, drivers (list), options (list of
{name, pros, cons, chosen}), decision, ystatement,
consequences_positive, consequences_negative, phase, deciders,
links. Prefer --json for the list-valued fields. status and date
are auto-set (proposed / today) but can be overridden.
title (required), what_happened, what_went_well, what_didnt_work,
root_cause, action, category, owner, phase, links. status
and date are auto-set (open / today) but can be overridden.
The entry template ships inside each scaffolded file as an HTML-comment footer
(<!-- ENTRY TEMPLATE ... -->). When the helper is unavailable, a consumer (or
a human) copies that block into the section above ## Archive, assigns the
next sequential ID, fills it in, and adds an index row by hand. The fallback
template covers the same core sections as the canonical one so entries stay
consistent across the two paths.
Each workflow adds one block at its natural endpoint:
Record to the decision journal (draft + confirm):
- If leyline is installed: run journal_append.py for a {tradeoff|lesson},
drafting fields from this phase's context; show the draft; append on
confirm.
- Fallback (leyline absent): append to docs/{tradeoffs|lessons-learned}.md
using the footer ENTRY TEMPLATE; assign the next sequential ID.
python3 ${LEYLINE}/scripts/journal_append.py tradeoffs \
--title "Compliance check" --field context="verify" --dry-run
Must print a rendered entry containing ## TR-001: and write nothing.
modules/deferred-capture.md: the CLI, issue template, label
taxonomy, duplicate detection, and JSON output that every plugin
deferred-capture wrapper implements. Load it when building or checking
a wrapper.modules/storage-templates.md: seedling, growing, evergreen, and
reference templates, the promotion lifecycle, and naming conventions.
Load it when organizing a knowledge store. Detail is in
template-patterns, lifecycle-stages, and storage-patterns.docs/tradeoffs.md and docs/lessons-learned.md exist with a
## Active index and an ## Archive section.TR-NNN/LL-NNN id and an index row.superseded-by: <id> and
adds bidirectional links. The old entry is not deleted.The last criterion holds even for consumers that name leyline in their
dependencies.
That field is marketplace metadata; no installer acts on it, so
spec-kit or imbue can be installed without leyline present.
The fallback guards that boundary. Do not remove it as leftover code.
See docs/metadata.md, "What dependencies Does Not Mean".
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
decision-log, lessons-learned, tradeoffs, knowledge-management
19 skills in this plugin
/additive-bias-defenseInverts burden of proof for code additions. Use when reviewing PRs, planning refactors, or running unbloat to challenge every addition's necessity./authentication-patternsProvides auth patterns for API keys, OAuth, and token management. Use when implementing or reviewing service authentication and credential handling./content-sanitizationProvides sanitization guidelines for external content in skills and hooks. Use when loading GitHub Issues, PRs, WebFetch results, or any untrusted input./damage-controlRecovers broken agent state via crash recovery, context overflow, and merge conflict protocols. Use when an agent session fails or a worktree is corrupted./document-conversionConverts documents and URLs to markdown via tiered fallback (MCP markitdown, native tools, user notice). Use when a skill must ingest PDF, DOCX, or URL content./error-patternsProvides error classification, recovery, and graceful-degradation patterns. Use when implementing error handling or debugging resilience failures in any skill.npx claudepluginhub athola/claude-night-market --plugin leylineOther plugins' skills for the same job