⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v0.20.3

keep-the-why

oliver-zehentleitner@oliver-zehentleitner⭐ 240 stars· last commit 6d ago· 2 open issues

In a project with a .keep-the-why, or asked about it or to set one up (never offered or named otherwise) - extract and preserve the reasoning code cannot explain - decisions, rejected alternatives, workarounds, incidents, constraints - plus project setup and maintainer interviews. Not for what changed (see Keep a Changelog) - only why. Also the place for questions about how this skill works, complaints, feedback and settings changes about it.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐ 240 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

GitHub Release npm keep-the-why PyPI PyPI License GitHub Marketplace Validate Skill ktw-lint keep-the-why-lint (package) Black Link Check Security: SkillsLLM HOL scanner HOL Guard Telegram X Bluesky Mastodon Keep the Why · live maity

Keep the Why

Keep a Changelog records what changed. Keep the Why preserves why it changed.

Keep the Why is the why layer of repo-native project memory: your repository already holds what the project is, how it works and what changed; this is the agent skill, and the file convention it maintains, that preserve the one thing it was missing — the reasoning behind a codebase — architecture decisions, rejected alternatives, workarounds, incident learnings, operational constraints that the code alone can't explain — in the repo. That memory is plain Markdown in context/, committed with the code, so Git already provides the storage, the history and the distribution: it travels with every clone, branch and fork, and a pull request shows the reasoning diff beside the code diff. It captures that reasoning as a byproduct of working with your agent, so every later session can use it. Your agent, and every other agent that works in the repository, understands not just the code but everything around it: why it is the way it is, what was tried and rejected, which constraints the source doesn't show. So does the next person. Onboarding gets faster, legacy projects become tractable again. It works continuously as you develop, where the reasoning comes for free.

It pays off most where re-debated decisions, forgotten workarounds and departed knowledge cost the most: maintainers and teams running coding agents on long-lived codebases. Starting on an existing repository works too, within limits — history, issues and code give back only part of the why, a maintainer has to fill in the rest, and that takes real effort. It is never too late to begin, though.

The payoff, made concrete: a new hire, or an AI agent that's never touched the codebase before, doesn't have to track down whoever wrote the original code — and doesn't just repeat what was already tried and rejected. That part is measured: twenty fresh agent sessions, the same codebase, the same request to simplify a retry wrapper. Without a recorded reason, seven of ten offered the already-rejected simplification again; with one context/ entry, all ten found it and none did (the experiment, transcripts and grades). Every wrong turn the agent doesn't take is work nobody has to do and undo — it saves time, money in tokens, and nerves. The same context makes changes safer across the board — no more guessing whether an odd piece of code is a Chesterton's Fence worth keeping or just cruft nobody got around to removing — turning a legacy project back into something tractable instead of a black box only one person ever understood. "Ask Bob" stops being the fallback.

Documentation is normally extra work that happens after the code is done — reload the reasoning from memory, write it down again, file it somewhere else: a wiki, an ADR, a PR description nobody reopens. That's exactly why it so often doesn't happen. When an agent is already how you work — deciding, weighing trade-offs, explaining itself in the same conversation that produces the change — the reasoning shows up for free, as a byproduct of that conversation, not separate effort. Keep the Why's actual job is narrower than it sounds: don't let that reasoning get thrown away.

Tested with: Claude Code, opencode, Pi, Hermes, and more — see the full eval suite and the agent × model matrix for what's actually been run against what, and how.

Installable with one command on Claude Code, Codex, GitHub Copilot, Cursor, OpenClaw, Hermes Agent, Cline, OpenCode, Pi, Antigravity and 60+ more agents.

Website: https://keepthewhy.com · llms.txt for AI agents/assistants looking up this project

The problem

Important project knowledge gets created in conversation — with a teammate, or with an AI coding agent — and then evaporates once the conversation ends. The code shows what was built. It rarely

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/keep-the-why/SKILL.md7.9 KBupstream ↗
    ---
    name: keep-the-why
    description: In a project with a .keep-the-why, or asked about it or to set one up (never offered or named otherwise) - extract and preserve the reasoning code cannot explain - decisions, rejected alternatives, workarounds, incidents, constraints - plus project setup and maintainer interviews. Not for what changed (see Keep a Changelog) - only why. Also the place for questions about how this skill works, complaints, feedback and settings changes about it.
    license: MIT
    metadata:
      version: "0.20.0"
      repository: "https://github.com/oliver-zehentleitner/keep-the-why"
      author: "Oliver Zehentleitner"
    ---
    
    # Keep the Why
    
    The core job: preserve and recover the reasoning that code alone cannot explain. Because "ask Bob" is not documentation — Keep a Changelog records what changed, this preserves why it changed.
    
    ## When to use this skill
    
    Four modes, all part of the same job:
    
    1. **Continuous capture** — record rationale as it surfaces during normal development: decisions, rejected alternatives, workarounds, incidents, constraints, and changes that *didn't* happen (starting to modify something, then stopping once a reason not to became clear — that reasoning would otherwise leave no trace). See `references/continuous-capture.md`.
    2. **Retrospective recovery** — given an existing or legacy repository, reconstruct what the code cannot explain from git history, issues, existing docs, and the code itself. Before a pass, read `references/retrospective-analysis.md`.
    3. **Knowledge-transfer interview** — when a maintainer's knowledge is about to become unavailable, analyze the repository first, then either ask targeted questions or let them narrate freely. Before preparing or running one, read `references/interview-playbook.md`.
    4. **Maintenance** — keep existing rationale current: resolve contradictions, mark superseded entries, merge duplicates, split files that have grown too large.
    
    Asked what Keep the Why is, how it works, or what one can ask for: before answering, read `references/help.md` — its parts (what is required, what optional), and the sentences that start each mode, setup, an update and each optional component.
    
    ## Edge cases
    
    Don't create a `context/` entry for:
    
    - Routine implementation detail with no rejected alternative behind it.
    - Generic formatting or style changes.
    - Anything already fully explained by the code itself.
    - A correction — restoring something to what it should already have been (rule 4) — as opposed to a genuine fork between contending options.
    
    Not every change is a decision worth a `context/` entry — see rule 10's proportionality gate.
    
    ## Composition with other skills
    
    Keep the Why is a cross-cutting persistence skill, not a development methodology. When another skill governs *how* the work gets done (planning, debugging, TDD, code review), that workflow runs first; this skill only preserves the rationale it produces. A design doc or implementation plan is evidence to draw from, not something to duplicate (rule 3; "Which file does this belong in?" in `references/repository-structure.md`).
    
    Re-check whether this skill applies at the natural end of another skill's workflow step (a design settled, a root cause confirmed, an alternative rejected) — that's when capture-worthy content has just been produced. This re-check isn't guaranteed to happen on its own — another framework can hold attention through its own workflow; asking directly ("check whether keep-the-why applies here") is a reasonable fallback, not a sign something's broken.
    
    ## Core rules
    
    Rules 1 and 2 matter most — a skill that hallucinates rationale or acts on a misunderstood instruction is worse than no documentation.
    
    1. **Never invent, never assume — ask.** If rationale can't be confirmed or reasonably inferred, mark it `unknown` or ask a focused question. This applies everywhere: entry content, config fields, ambiguous instructions, removals ("no reference found" means *unknown*, not *safe to delete* — ask before removing a Chesterton's Fence candidate; don't manufacture a justification either way). A genuinely *missing* config field with a documented default may be silently backfilled; a *present but unrecognized* or contradictory value is not the same — name the valid options and ask. Don't act on an unresolved ambiguity.
    
    2. **Classify Evidence for every entry.** Three levels: **confirmed** (stated by a maintainer or backed by authoritative evidence), **inferred** (reasonably derived), **unknown** (can't be established). Evidence is a separate axis from Status (rule 5): a superseded decision can still have been confirmed when it was current. Add **Source** and **Verification** (`corroborated` | `uncorroborated` | `contradicted`) where there's something concrete to trace — a `contradicted` verification must explain what contradicts it. When two sources disagree, record both and flag the conflict as open rather than picking a winner. Full field definitions: `references/specification.md`; the `source-reference` setting governing when Source is actively sought: `references/setup.md`. One word per entry: when parts of an entry stand differently — a confirmed new reason beside a lost original one — the weakest grade wins and the body says which is which.
    
    3. **Adapt to what exists.** Preserve the project's terminology and conventions. Update existing topic files instead of creating near-duplicates. Organize by *topic* (`auth.md`, `sync.md`), not by source file or commit. Existing, working decision records (an ADR folder, design notes) keep their own format: this skill's fields go on the entries it writes from now on, not retrofitted onto records that already work ("Retrofitting" in `references/repository-structure.md`).
    
    4. **Record both halves of every decision: what was chosen, and what wasn't.** Actively look for rejected alternatives and why they lost — in code, history, and what the person said; if none surfaces, record that ("alternatives: unknown") and still write the entry; a follow-up question about alternatives goes on top, not instead. Only record alternatives that were genuinely in contention, not manufactured after the fact. A correction (fixing a stale value, a regressed bug) involved no real fork and belongs in `CHANGELOG.md`, not `context/` — its own line under the unreleased section, even when an older entry already names the restored value: that entry recorded the original change, not the regression's fix. Two sources that disagree — the code retries three times, the document says five — are not a correction until someone confirms which one is stale: neither is overwritten with the other, both are recorded and the conflict stays open (rule 2). Significance and decision-worthiness are different questions: rule 10 tests the former, this rule tests the latter.
    
    5. **Track Status separately from Evidence.** Status values: `active`, `superseded`, `open`, `needs-review`, `pending-confirmation`. `open` means the question is unresolved (distinct from `Evidence: unknown`, which means a *settled* claim's rationale can't be traced). A retrospective finding with no traceable rationale becomes an entry with `Status: open` and `Evidence: unknown`, not only a remark (workflow step 5). Mark superseded entries explicitly instead of deleting them — `superseded` always comes with a `Superseded by` line naming the successor's `Id` (or `none — <why nothing replaced it>`). When a `Revisit when` condition (`references/specification.md`) triggers, flip Status to `needs-review` in that same turn — a mechanical edit needing no permission, not something to describe, propose, or defer. Resolving `needs-review` (whether to supersede, rewrite, or re-confirm) is a separate deliberate re-check that may need to ask (rule 8). Evidence stays as previously recorded until that re-check happens; the agent's own reading of the code doesn't upgrade Evidence to confirmed on its own (rule 2). `pending-confirmation` is the fifth value: an entry written in an *un
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/oliver-zehentleitner-keep-the-why-skills-keep-the-why.md

// REPO STATS

240 stars
2 open issues
Last commit: 6d ago