{"slug":"close-spec","title":"close-spec","summary":"When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for t","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-14T21:49:24.512449Z","repo":{"url":"https://github.com/dzhng/skills","stars":1333,"forks":81,"license":"MIT","updatedAt":"2026-10-14T20:39:18Z"},"bodyHtml":"<hr>\n<h2>name: close-spec\ndescription: When a spec under specs/</h2>\n<h1>Close Spec</h1>\n<p>A spec is a <strong>build plan</strong> while you're building and a <strong>rationale record</strong>\nonce you've shipped. Closing flips it from one to the other. The plan was a\nladder of slices and predictions; the record is the layer of meaning the code\ncan't hold — why this exists, what it must never break, what you tried that\nfailed. The code is the single source of truth for <em>how</em>; the closed spec is\nthe source of truth for <em>why</em>, and a map into the code.</p>\n<p>Do not summarize the implementation. Anyone can read the code. If a paragraph\nrestates what a function does, cut it and point at the function instead.</p>\n<h2>Workflow</h2>\n<ol>\n<li><p><strong>Confirm it shipped.</strong> The feature is merged or working in-tree and its\ntests/screenshot gates are green. If slices remain unverified, it isn't\ndone — finish or <a href=\"../review/SKILL.md\">review</a> first.</p>\n</li>\n<li><p><strong>Diff plan against reality.</strong> Read the spec's README and slices, then read\nwhat actually landed. Note every place the build diverged from the plan:\ndropped slices, renamed seams, a mechanic that turned out different, an\nassumption that broke. The divergences are the most valuable thing to\nrecord — they're exactly what a future reader would otherwise re-derive.</p>\n</li>\n<li><p><strong>Move it.</strong> <code>specs/&lt;feature&gt;/</code> → <code>specs/done/&lt;feature&gt;/</code> (use <code>git mv</code>).\nSingle-file specs: <code>specs/&lt;feature&gt;.md</code> → <code>specs/done/&lt;feature&gt;.md</code>.</p>\n</li>\n<li><p><strong>Rewrite the README as a record</strong>, not a plan. Keep:</p>\n<ul>\n<li><strong>Overview &amp; purpose</strong> — what shipped and the problem it solves, in\npresent tense (\"the economy settles monthly\"), not future (\"will add\").</li>\n<li><strong>The reason</strong> — why it works this way and not the obvious alternatives;\nthe constraints and trade-offs that forced the shape. This is the part\nthe code cannot tell you.</li>\n<li><strong>Principles &amp; invariants</strong> — the rules the implementation must keep\nhonoring. What must stay true; what would silently break if violated.</li>\n<li><strong>Pointers into the code</strong> — greppable module/type/function names, file\npaths, and the tests that pin the behavior. Send the reader to the code\nfor mechanics; name the entry points so they can find it in one grep.</li>\n<li><strong>Dead ends</strong> — approaches tried and rejected, with the reason, so nobody\nre-walks them.</li>\n<li><strong>Visual provenance</strong> — any images that were uploaded as a baseline to\nmatch, a comparison target, or inspiration for the look. These <em>are</em> the\nrequirement: they say what \"done\" had to resemble and why the result took\nthe shape it did. Keep them in-tree and reference them from the README,\nnaming where each came from (a real screenshot, a mood board, a reference\ngame) and what it was driving. Without them a reader sees the outcome but\nnot the standard it was held to.</li>\n</ul>\n<p>Cut: slice-by-slice build order, \"next we will…\", scaffolding instructions,\nper-slice verification checklists, and any prose that re-narrates code.</p>\n</li>\n<li><p><strong>Collapse the slices, preserve the imagery.</strong> The slices were the build\nladder; once shipped they're sediment. Fold anything durable (a divergence,\na dead end, an invariant a slice established) into the README, then delete\n<code>slices/</code>. But <strong>keep the baseline, comparison, and inspiration images</strong> —\nthe references the work was measured against — and the <code>visualizations/</code> or\n<code>assets/</code> that still help a reader judge the result. These are provenance,\nnot scaffolding: discard a build instruction, never the picture that\ndefined what the build was aiming at. Wire each one into the README's\nvisual-provenance trail so the story of where the requirement came from\nsurvives the close.</p>\n</li>\n<li><p><strong>Fix references.</strong> Update links that pointed at the old path. If <code>[[memory]]</code>\nnotes or other skills referenced the spec, repoint them.</p>\n</li>\n<li><p><strong>Audit every statement, unbiased.</strong> Spawn sub-agents that did not write the\nspec and lack the conversation, and have them check the final document\nclaim by claim against the actual code and tests. Fan out — one agent per\nsection, or split the claim list across agents — so no single biased pass\nwaves it through. Each agent returns a verdict per statement:</p>\n<ul>\n<li><strong>Pointer</strong> (a named module/type/function/file/test) — does it exist and\nsay what the spec says? Flag stale names and wrong paths.</li>\n<li><strong>Invariant / principle</strong> — is it actually enforced in the code, or just\nasserted? Flag claims the code contradicts or doesn't back.</li>\n<li><strong>Overview / reason</strong> — is it consistent with what shipped, present tense,\nno leftover \"will\"/\"next\"/slice numbers?</li>\n<li><strong>Visual provenance</strong> — do the referenced baseline/inspiration images\nstill exist in-tree, and does the README say where each came from and what\nit drove? Flag a result shown with no standard it was held to.</li>\n</ul>\n<p>Treat unsupported, contradicted, or stale statements as defects: fix the\nspec (or the pointer) and re-audit the changed claims. The spec is not\nclosed while any statement is unverified.</p>\n</li>\n</ol>\n<h2>Smell Test</h2>\n<ul>\n<li>Could a reader reconstruct this paragraph by reading the code? → cut it,\nleave a pointer.</li>\n<li>Does it say \"will\" or \"next\" or name a slice number? → it's still a plan.</li>\n<li>Did a real decision diverge from the plan and go unrecorded? → that's the\none thing worth keeping; add it.</li>\n<li>Was there a baseline or inspiration image you were matching against? → keep\nit and say what it drove; the result is meaningless without the standard.</li>\n</ul>\n<h2>Done</h2>\n<p>The spec lives under <code>specs/done/</code>, reads as why-and-what-must-hold rather than\nhow, names the code that implements it, preserves the baseline and inspiration\nimagery the work was measured against, and every statement has survived an\nunbiased audit against the code. A fresh reader gets the intent, the\ninvariants, and the visual standard without the code — the story of why it's\ndone and how the decisions were made — and the mechanics by following the\npointers into it.</p>\n","files":[{"path":"SKILL.md","sizeBytes":6512,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-14T21:49:35.443506Z","sha256":"FE6D599B9F18E44FF365198AC36E5C4D358582244D3EE31E69A59C440BE758C6","sizeBytes":2990},"review":null,"source":{"repositoryUrl":"https://github.com/dzhng/skills","path":"skills/engineering/close-spec","license":"MIT","commit":"f2fbf92f131fb08bbf3e400a1ef99b7be85bb2bc","subtreeSha":"6CA6E0D3BEA1E3CE2380ACF094115579BAC7FB6C97A4A423CCF3209E7BE52480","lastSyncedAt":"2026-10-14T21:49:23.275319Z"},"reviewedAt":"2026-10-14T21:50:01.170348Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/dzhng/skills/tree/main/skills/engineering/close-spec"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dzhng-skills@llmmart"},{"target":"git","command":"git clone https://github.com/dzhng/skills.git"}]}