AGENT SKILL

record-the-why

Capture the reasoning behind a decision permanently, not just the decision itself. Use when making an architectural choice, changing a public API or data format, choosing between libraries, or reversing an earlier decision. Also use when a comment would just restate the code instead of explaining a non-obvious constraint. Skip for self-explanatory code or decisions that are trivially reversible.

License 许可
MIT
最近更新
2026-11-07
Stars
★ 16
Forks
2

01 前言 Front Matter

name
record-the-why
description
Capture the reasoning behind a decision permanently, not just the decision itself. Use when making an architectural choice, changing a public API or data format, choosing between libraries, or reversing an earlier decision. Also use when a comment would just restate the code instead of explaining a non-obvious constraint. Skip for self-explanatory code or decisions that are trivially reversible.

03 SKILL.md 正文

Record the why

Code shows what was done, not why. Six months from now, whoever runs into that decision again (usually you) can't answer "why is this like this?" from the code alone.

When to record it

  • When you make a decision that's expensive to reverse: an architectural choice, a public API or data format change, a library pick
  • When you reverse an earlier decision — especially why the old approach stopped fitting
  • When you wrote unnatural-looking code to work around a non-obvious constraint (the spot where someone will look and think "why is this written this way?")
  • Principal angle: when the decision sets a precedent other teams or future features will copy — record it even if this instance alone would be trivially reversible, because the pattern it establishes isn't
  • Distinguished/Fellow angle: if the person who made this call could leave tomorrow, the record has to stand on its own — legible to someone joining the company in five years with zero institutional memory of the meeting where this was decided
  • Executive angle (CTO/VP-Eng): if the decision moves headcount, vendor/infra spend, or carries regulatory exposure, the record needs to be legible to a board or investor audit and traceable to the budget line it justified — not just clear to the next engineer

Skip it where the code explains itself (naming, function decomposition already do the job) — a comment that just restates the code is noise.

Where to record it

  • Check this repo's existing convention first (an ADR directory, design docs, commit message format) and match it — don't invent a new format
  • No convention → at minimum, in the commit message or a comment near the code: decision + rejected alternatives + reasoning
  • If weigh-tradeoffs already compared the alternatives, carry that result over as-is — don't rewrite it
  • Example from this codebase: Hncs has no ADR directory — its actual mechanism is each apply_* docstring carrying its full fitting history (sample size, sources, what was tried and rejected), and hybrid_engine/EVALUATION.md logging every experiment win/loss/inconclusive, including the ~20 rejected approaches. That's the convention a new decision here should join, not a fresh ADR format.

Never delete the record

  • When a decision changes, don't delete and rewrite the old record — overturn it with a new one. Why it changed is itself information a future reader (or another team hitting the same tradeoff) needs.
  • "I'll clean it up later" means the context at that moment — why this was the best call then — is gone for good. Right after the decision is the cheapest time to write it down.
  • Example: when a finding in EVALUATION.md later turns out wrong, Hncs appends a dated correction blockquote in place — > **정정(YYYY-MM-DD, how it was caught)**: ... — right after the original claim, and leaves the original text standing as history. Done 4 times so far. The wrong conclusion isn't deleted; it's overturned where a reader will actually find it.

04 同仓库更多 Skills

songjiun10-collab
songjiun10-collab/Hncs

widen-the-solution-space

Deliberately widen the set of candidate approaches before committing to one. Use before irreversible decisions (architecture, DB schema, data format, public API), when the first solution feels complicated or awkward, when the user is deciding rather than instructing ("what's the best way to do this?"), or when a previous attempt at the same problem failed. Skip for routine work with one obvious answer.

★ 16
songjiun10-collab
songjiun10-collab/Hncs

weigh-tradeoffs

Compare real alternatives explicitly and record why one was chosen. Use when picking between libraries, data structures, architectures, or storage options; when a decision is hard to reverse (schema, public API, data format, dependency); or when the user asks "which is better, A or B". Also use to decide how much deliberation a decision even deserves.

★ 16
songjiun10-collab
songjiun10-collab/Hncs

verify-before-claiming

Run the verification and read its output before saying anything is done, fixed, working, or passing. Use before any completion claim, before committing or opening a PR, before moving to the next task, and after a subagent or tool reports success. Triggers on the words "should work", "fixed", "done", "passing", "looks good" — and on the urge to celebrate.

★ 16
songjiun10-collab
songjiun10-collab/Hncs

verifiability-first

Turn the task into something verifiable and declare the success criterion before seeing results. Use when the request is vague about "done" ("make it work", "improve this"), when writing tests, when fixing a bug (write the failing reproduction first), or when comparing two approaches. Critical before any measurement or benchmark, where deciding the bar after seeing the numbers guarantees a "success".

★ 16
songjiun10-collab
songjiun10-collab/Hncs

threat-and-scale-check

Check trust boundaries, scale behavior, and layered safety. Use when handling user input, external API responses, files, or auth; when designing permissions, validation, or any safety mechanism; when data volume could grow; or when writing loops that touch I/O. Also use when reviewing whether a single safeguard is the only thing standing between a mistake and a disaster.

★ 16
songjiun10-collab
songjiun10-collab/Hncs

surgical-change

Keep every changed line traceable to the request. Use when editing existing code, especially code you didn't write; when tempted to clean up something you noticed while reading; when a diff is growing beyond the ask; or when deciding whether to delete code that looks dead.

★ 16