[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F562ATKWAV8NV33611KX27":3,"skill-same:01M7F562ATKWAV8NV33611KX27":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7F562ATKWAV8NV33611KX27","domain-specs",null,"Covers the two artifacts that outlive a plan — a domain's SPEC.md saying what is true now, and the numbered decision records saying why. What belongs in each, the test for when a decision earns a record, how a record is accepted before the code it constrains, and what settling an Issue leaves behind.","workflowaiorg\u002Fworkflow","workflowaiorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F344728430?v=4","01M7F5606QN4BXN2KJNCJPCKAZ","01M7F5607RE7Y5NNRN60FW9NJ3",0,"MIT","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Fbase\u002Ffiles\u002Fcore\u002Fskills\u002Fdomain-specs\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: domain-specs\ndescription: \"Covers the two artifacts that outlive a plan — a domain's SPEC.md saying what is true now, and the numbered decision records saying why. What belongs in each, the test for when a decision earns a record, how a record is accepted before the code it constrains, and what settling an Issue leaves behind.\"\n---\n\n# Skill: Domain specs and decision records\n\nA plan says what we are about to do. It goes stale the day it is implemented, and every project's\ngit log proves it. Two artifacts outlive it:\n\n| File | Answers | Changes? |\n|---|---|---|\n| `.workflow\u002Fspecs\u002F\u003Cdomain>\u002FSPEC.md` | what is true **now** | edited in place, keeps no history |\n| `.workflow\u002Fdecisions\u002FNNNN-\u003Cslug>.md` | why, and what we turned down | never — a change gets a new record |\n\nThey need each other. A spec is edited in place, so it always describes the present — and so it\nquietly erases the fact that another option was ever on the table. A record is the mirror image:\nit remembers everything and tells you nothing about today.\n\n**This skill owns the formats.** *When* in an Issue's life you write them is the `workflow` skill's\n*Settling* section. The two must not disagree; if they do, this file is the authority on shape and\n`workflow` is the authority on timing.\n\n---\n\n## When this skill applies\n\n- Writing or editing any `.workflow\u002Fspecs\u002F\u003Cdomain>\u002FSPEC.md`\n- Deciding whether something you just chose earns a decision record\n- Writing a record, or superseding one\n- Writing a plan's `## Spec changes` section\n- Settling an Issue, alongside the `workflow` skill\n\n---\n\n## The one rule a spec lives by\n\n> **If a machine already checks it, the spec does not repeat it.**\n\nResponse shapes, routes, schemas: whatever the project already pins in a file CI checks — a\ncontract, a manifest, a migration — belongs to that file. A spec that restates it adds a copy that\ncan rot, and rots first.\n\nSo a spec holds what is currently homeless:\n\n| Belongs in a spec | Belongs elsewhere |\n|---|---|\n| State machines, and which transitions cannot happen | Field names and shapes → the contract CI checks |\n| Money rules, rounding, what a refund covers | Route paths and methods → wherever routes are registered and checked |\n| Retry, ack and idempotency semantics | Request and response examples → the contract |\n| Invariants two services depend on | Struct definitions → the code |\n| What is deliberately **not** built, and why not | How to run the thing → `.workflow\u002FGUIDE.md` |\n| Links to the records behind any of the above | What we are about to change → a `PLAN.md` |\n\nThe last row on the left is the one people skip and the one that saves the most time. *\"There is\nno partial refund; a failed order refunds in full\"* stops someone building the partial-refund\npath that was already considered and rejected.\n\n### Shape of a SPEC.md\n\nStart from `.workflow\u002FSPEC-TEMPLATE.md`. Prose, present tense, second person never. Cite a record\nat the point of the claim it supports:\n\n```markdown\n### Cancelling an order\n\nAn order can be cancelled until it ships, and a cancelled order is refunded in full. Two\ncancellations racing each other both succeed; the second refund finds nothing left to refund.\n→ [ADR-0007](..\u002F..\u002Fdecisions\u002F0007-cancellation-refunds-in-full.md)\n```\n\n**A citation is a link, so a reader can follow it in one click**, and the link text is\n`[ADR-NNNN]` exactly — that is what `wf spec-coverage` looks for, and a renamed label stops\nbeing found. The target is the record's path relative to the spec, which from\n`.workflow\u002Fspecs\u002F\u003Cdomain>\u002F` is always `..\u002F..\u002Fdecisions\u002F`.\n\nPut a long citation on its own line rather than letting it run past the wrap.\n\n### Writing a domain's first spec\n\nA domain that has no spec yet gets one in an Issue of its own. Read its code, the finished plans\nthat built it, the skills that govern it, and whatever contracts already pin its surface. Then\nwrite down what is true today — not what should be true. Where the two differ, the spec says what\nthe code does, and the gap becomes its own Issue.\n\nA domain designed before it has code is the exception: the Issue that creates it writes its first\nspec, with only *What this domain is* and *Deliberately not built*, since nothing else is true yet.\n\nThe domain's old decisions come across with it. They are already built and shipped, so there is no\ncode waiting on them and nothing to block: writing them down now is transcription, not deciding.\nEach still gets [its own `[ADR]` Issue](#how-a-record-is-accepted), carrying the record word for\nword, accepted or rejected on its own. **Never one Issue listing a domain's decisions** — a\nreviewer cannot accept half a wall of text, and the file that then gets written is not the one they\nread.\n\nWhat the backfill changes is only where the records land: with the spec, in this Issue's MR,\nbecause the code they describe is already there.\n\n---\n\n## When a decision earns a record\n\nMost do not. A normal feature is already covered by its spec and its contract; a record there is a\nfile nobody will ever open.\n\nThe test:\n\n> Could a future developer — or an agent — **undo this by accident**, thinking they had found a bug?\n\nTwo examples:\n\n- *\"A retried message that arrives late is never applied\"* — **yes, write one.** Someone will\n  notice the late message being dropped, call it a bug, and fix it. It was weighed and accepted.\n- *\"The plan's phases stay separate because each one compiles\"* — **no.** Scaffolding for one\n  plan. It dies with the plan.\n\nExpect zero to three per plan, weighted heavily toward zero. A record is for a choice that\n**constrains future code**, not for every judgement made along the way.\n\nA record costs an Issue and a round of review, so the temptation is to skip one rather than open\nthe Issue. The test is the guard against that, and it cuts both ways: a decision that passes is\nworth the Issue precisely because someone will otherwise undo it by accident. A decision that\nfails was never going to earn a file.\n\nA plan's own `## Decisions taken` section does not change. That is where thinking happens, freely\nand in context.\n\n---\n\n## How a record is accepted\n\n**Before the implementation it constrains, in an Issue of its own.** Not afterwards in the MR that\nbuilt it — by then the decision is load-bearing and the record is a formality nobody weighed.\n\n**1. The ADR Issue.** Title `[ADR] \u003Cthe decision in one line>`. Type `decision` and the relevant\narea. The milestone of the Issue it blocks, if that has one.\n\n**The body is the record itself, word for word** — the four sections of\n`.workflow\u002FDECISION-TEMPLATE.md` and nothing else, above one line naming what waits on it:\n\n```markdown\n**Blocks:** #41. Accepting this commits it in as the record file, as written below.\n\n## Decision\n## Alternatives considered\n## Consequences\n## Undoing this by accident\n```\n\nAccepting therefore means *\"commit this file as written\"*, and amending means editing a line in\nthe thread. **Anything the developer reads that is not the record is a second draft nobody\nreviews** — no framing, no summary of the argument, no options to pick between. Keep it to about\na dozen lines; a record that needs more is usually two decisions.\n\nOne Issue holds one record. Four decisions are four Issues, so each is accepted, rejected or\namended on its own and closes on its own — **including a backfill**, where it is tempting to put a\ndomain's decisions in one thread and where the wall of text costs the reviewer most.\n\n**2. The discussion is the gate.** The developer accepts, rejects or amends it in the thread.\n**Never write the file ahead of that answer, and never decide on your own that a record is\naccepted.**\n\n**3. The record lands in its own MR** — one new file, plus its row in\n`.workflow\u002Fdecisions\u002FREADME.md`. A record that supersedes another also deletes the old one, by\n[Superseding](#superseding). It carries `Closes #\u003Cadr-issue>`. The exception is a backfill: those\nrecords constrain code that already exists, so there is nothing for them to land ahead of, and they\nride with the domain's spec in that Issue's MR.\n\nThe spec still cites a record whose code is not built yet — `wf spec-coverage` fails on a record\nno spec links to. At the claim it will change, add one line: **Decided, not yet built**, what will\nbe true, the Issue that builds it, and the link. That is true today, so the spec stays in the\npresent tense. The Issue that builds it replaces the line with the behaviour, in its own MR.\n\n**4. The dependent Issue waits** at `blocked` with a comment linking the ADR Issue, and returns to\n`in progress` when the record merges. That is the `workflow` skill's *A discovered blocker* table\napplied unchanged.\n\n**Found mid-implementation?** Same path, entered through the blocker rule: stop editing, leave the\ncheckpoint in the Issue, open the ADR Issue, block the original. A decision important enough to\nrecord is important enough to stop for.\n\n### The record file\n\nStart from `.workflow\u002FDECISION-TEMPLATE.md`.\n\n```markdown\n---\nid: 0007\ntitle: Cancelling an order refunds it in full\ndate: 2026-09-14\nstatus: accepted\ndomain: orders\nspec: .workflow\u002Fspecs\u002Forders\u002FSPEC.md\nsupersedes: —\nissue: 42\n---\n```\n\n`status` is always `accepted`: a replaced record is deleted. `domain` is `none` for a\nprocess-level decision, and `spec` is `none` when no spec cites it. `supersedes` is the `NNNN` of\nthe record this one replaces, or `—`.\n\n**There is no `proposed` status.** The Issue is the proposed state; a rejected decision leaves a\nclosed Issue and no file, which is a better record of a road not taken than a deleted one.\n\n**IDs are flat and numbered, not nested under a domain.** The records that matter most cross\ndomains — how the code is split, how a release is gated. Nesting forces a false choice for exactly\nthose. `domain:` gives filtering without it, and a flat integer gives an ID you can say out loud in\nreview. Two branches can both grab `0031`; renumber at merge, it takes half a minute.\n\n### Superseding\n\nA record is **never edited**, except as the paragraphs below allow. A decision that changes, wholly\nor in part, gets a new record and a new ADR Issue — changing your mind is itself a decision. There\nis no \"amends\": a reader learns the current decision from one file, never by merging a chain of\nthem.\n\n- **Part of it changes.** The new record's *Decision* is the whole decision as it now stands — the\n  parts that hold, carried over as written, plus the new part. The old version of the changed part\n  is one bullet in *Alternatives considered*, saying why it was dropped.\n- **Part of it no longer holds.** The same, with *Decision* holding only what survives and\n  *Alternatives* saying why the rest does not.\n\nThe new record says `supersedes:` the old number from the moment it is written, and **the MR that\nlands it deletes the old record** with its index row, and moves every spec's `→ [ADR-NNNN]` to the\nnew number. Git is the history: it goes wherever the repository goes and needs no network, and\n`git log -p -- '.workflow\u002Fdecisions\u002FNNNN-*'` finds the old text by the number `supersedes:` gives.\nThat *Alternatives* bullet is the one place a reader meets the old decision without git, so it is\nnever left out. A record with no `supersedes:` line means `—`.\n\n**A record no merged code relies on yet** may be amended in the MR that first builds it, with the\nreason in the MR description and a comment on the record's `[ADR]` Issue — before anything is built\non it, a second record would only describe a road nobody took.\n\n**A record whose feature is removed from the code** is deleted the same way, together with its\nindex row and every spec line that cites it, with the reason stated in the commit and the MR.\n\n**Numbers are never reused**: a new record takes the number one above the highest ever used, in\nthe index or in git history. A gap in the index is a record replaced or removed.\n\nThe new record lands before the code that builds it, so for a while the spec describes behaviour\nwhose record is already gone. The claim keeps describing today, and carries the **Decided, not yet\nbuilt** line linking the new record; the old text is in git, by the number its `supersedes:` gives.\n\n---\n\n## The `## Spec changes` section\n\nWritten into a `PLAN.md` while the work is being planned, when the context is already in your\nhead. It makes settling mechanical instead of a re-read of the whole diff.\n\n```markdown\n## Spec changes\n\n`.workflow\u002Fspecs\u002Forders\u002FSPEC.md`\n\n### MODIFIED: Cancelling an order\nCancellable until it ships, refunded in full.\n*(was: cancellable for one hour after it was placed, refunded less a fee)*  → ADR-0007\n\n### REMOVED: The cancellation fee\nDropped outright, along with its setting.\n```\n\n`ADDED` \u002F `MODIFIED` \u002F `REMOVED`, one heading each. **The `(was: …)` line is the point of the whole\nformat** — a reviewer sees what is changing without diffing two documents in their head.\n\nFor an Issue worked without a plan, the same three headings go in the MR description instead.\n\n---\n\n## Settling, in one paragraph\n\nIn the **same MR** as the work: update the domain's `SPEC.md` to match what changed and cite any\nrecord accepted for it; open an ADR Issue for anything the work turned up that passes the accident\ntest and is not already recorded; and, **if this Issue was the last of its plan's Issues**, move\nthe plan directory to `.workflow\u002Fplans\u002Farchive\u002F\u003Cdate>-\u003Cslug>\u002F` with `Settled: \u003Cdate>` in its\nheader. A plan with phases still ahead of it stays where it is.\n\nAn Issue with no behaviour change settles in one line in the MR description and touches no files.\nThat has to stay cheap, or the step gets skipped on the small tasks that are most of the board.\n\n---\n\n## What is checked, and what is not\n\n`wf spec-coverage` runs in about a second, and `\u002Fpre-mr-check` runs it whenever anything under\n`.workflow\u002Fspecs\u002F`, `.workflow\u002Fdecisions\u002F` or `.workflow\u002Fplans\u002F` changes — as the project's CI\nshould. It fails when:\n\n- a spec's `[ADR-NNNN]` link points at no record or at a different record — when the missing one\n  was **superseded**, the behaviour changed and the spec did not follow, and the problem names the\n  record that replaced it — or an `ADR-NNNN` appears without a link;\n- a record is not cited by the spec its own `spec:` names, unless that is `none`;\n- a record's frontmatter is incomplete, its `id` is not its file's number or is taken twice, its\n  status is not `accepted`, it still carries `superseded_by:`, its `supersedes:` is not an earlier\n  number, or the record it supersedes is still in the directory;\n- a record has no row in the index, or a row disagrees with its record;\n- a directory in `.workflow\u002Fplans\u002F` is not named `\u003CDD-MM-YYYY>-\u003Cslug>`.\n\nA plan in flight for more than 30 days is printed as debt, never failed on: counted, and meant to\ngo down.\n\nNone of this verifies prose against behaviour. *\"A failed order is refunded in full\"* is not\ngreppable. The check proves the links hold and the records agree; whether the spec is still *true*\nis a person's job, done in the MR that made it untrue.\n","# Skill: Domain specs and decision records\n\nA plan says what we are about to do. It goes stale the day it is implemented, and every project's\ngit log proves it. Two artifacts outlive it:\n\n| File | Answers | Changes? |\n|---|---|---|\n| `.workflow\u002Fspecs\u002F\u003Cdomain>\u002FSPEC.md` | what is true **now** | edited in place, keeps no history |\n| `.workflow\u002Fdecisions\u002FNNNN-\u003Cslug>.md` | why, and what we turned down | never — a change gets a new record |\n\nThey need each other. A spec is edited in place, so it always describes the present — and so it\nquietly erases the fact that another option was ever on the table. A record is the mirror image:\nit remembers everything and tells you nothing about today.\n\n**This skill owns the formats.** *When* in an Issue's life you write them is the `workflow` skill's\n*Settling* section. The two must not disagree; if they do, this file is the authority on shape and\n`workflow` is the authority on timing.\n\n---\n\n## When this skill applies\n\n- Writing or editing any `.workflow\u002Fspecs\u002F\u003Cdomain>\u002FSPEC.md`\n- Deciding whether something you just chose earns a decision record\n- Writing a record, or superseding one\n- Writing a plan's `## Spec changes` section\n- Settling an Issue, alongside the `workflow` skill\n\n---\n\n## The one rule a spec lives by\n\n> **If a machine already checks it, the spec does not repeat it.**\n\nResponse shapes, routes, schemas: whatever the project already pins in a file CI checks — a\ncontract, a manifest, a migration — belongs to that file. A spec that restates it adds a copy that\ncan rot, and rots first.\n\nSo a spec holds what is currently homeless:\n\n| Belongs in a spec | Belongs elsewhere |\n|---|---|\n| State machines, and which transitions cannot happen | Field names and shapes → the contract CI checks |\n| Money rules, rounding, what a refund covers | Route paths and methods → wherever routes are registered and checked |\n| Retry, ack and idempotency semantics | Request and response examples → the contract |\n| Invariants two services depend on | Struct definitions → the code |\n| What is deliberately **not** built, and why not | How to run the thing → `.workflow\u002FGUIDE.md` |\n| Links to the records behind any of the above | What we are about to change → a `PLAN.md` |\n\nThe last row on the left is the one people skip and the one that saves the most time. *\"There is\nno partial refund; a failed order refunds in full\"* stops someone building the partial-refund\npath that was already considered and rejected.\n\n### Shape of a SPEC.md\n\nStart from `.workflow\u002FSPEC-TEMPLATE.md`. Prose, present tense, second person never. Cite a record\nat the point of the claim it supports:\n\n```markdown\n### Cancelling an order\n\nAn order can be cancelled until it ships, and a cancelled order is refunded in full. Two\ncancellations racing each other both succeed; the second refund finds nothing left to refund.\n→ [ADR-0007](..\u002F..\u002Fdecisions\u002F0007-cancellation-refunds-in-full.md)\n```\n\n**A citation is a link, so a reader can follow it in one click**, and the link text is\n`[ADR-NNNN]` exactly — that is what `wf spec-coverage` looks for, and a renamed label stops\nbeing found. The target is the record's path relative to the spec, which from\n`.workflow\u002Fspecs\u002F\u003Cdomain>\u002F` is always `..\u002F..\u002Fdecisions\u002F`.\n\nPut a long citation on its own line rather than letting it run past the wrap.\n\n### Writing a domain's first spec\n\nA domain that has no spec yet gets one in an Issue of its own. Read its code, the finished plans\nthat built it, the skills that govern it, and whatever contracts already pin its surface. Then\nwrite down what is true today — not what should be true. Where the two differ, the spec says what\nthe code does, and the gap becomes its own Issue.\n\nA domain designed before it has code is the exception: the Issue that creates it writes its first\nspec, with only *What this domain is* and *Deliberately not built*, since nothing else is true yet.\n\nThe domain's old decisions come across with it. They are already built and shipped, so there is no\ncode waiting on them and nothing to block: writing them down now is transcription, not deciding.\nEach still gets [its own `[ADR]` Issue](#how-a-record-is-accepted), carrying the record word for\nword, accepted or rejected on its own. **Never one Issue listing a domain's decisions** — a\nreviewer cannot accept half a wall of text, and the file that then gets written is not the one they\nread.\n\nWhat the backfill changes is only where the records land: with the spec, in this Issue's MR,\nbecause the code they describe is already there.\n\n---\n\n## When a decision earns a record\n\nMost do not. A normal feature is already covered by its spec and its contract; a record there is a\nfile nobody will ever open.\n\nThe test:\n\n> Could a future developer — or an agent — **undo this by accident**, thinking they had found a bug?\n\nTwo examples:\n\n- *\"A retried message that arrives late is never applied\"* — **yes, write one.** Someone will\n  notice the late message being dropped, call it a bug, and fix it. It was weighed and accepted.\n- *\"The plan's phases stay separate because each one compiles\"* — **no.** Scaffolding for one\n  plan. It dies with the plan.\n\nExpect zero to three per plan, weighted heavily toward zero. A record is for a choice that\n**constrains future code**, not for every judgement made along the way.\n\nA record costs an Issue and a round of review, so the temptation is to skip one rather than open\nthe Issue. The test is the guard against that, and it cuts both ways: a decision that passes is\nworth the Issue precisely because someone will otherwise undo it by accident. A decision that\nfails was never going to earn a file.\n\nA plan's own `## Decisions taken` section does not change. That is where thinking happens, freely\nand in context.\n\n---\n\n## How a record is accepted\n\n**Before the implementation it constrains, in an Issue of its own.** Not afterwards in the MR that\nbuilt it — by then the decision is load-bearing and the record is a formality nobody weighed.\n\n**1. The ADR Issue.** Title `[ADR] \u003Cthe decision in one line>`. Type `decision` and the relevant\narea. The milestone of the Issue it blocks, if that has one.\n\n**The body is the record itself, word for word** — the four sections of\n`.workflow\u002FDECISION-TEMPLATE.md` and nothing else, above one line naming what waits on it:\n\n```markdown\n**Blocks:** #41. Accepting this commits it in as the record file, as written below.\n\n## Decision\n## Alternatives considered\n## Consequences\n## Undoing this by accident\n```\n\nAccepting therefore means *\"commit this file as written\"*, and amending means editing a line in\nthe thread. **Anything the developer reads that is not the record is a second draft nobody\nreviews** — no framing, no summary of the argument, no options to pick between. Keep it to about\na dozen lines; a record that needs more is usually two decisions.\n\nOne Issue holds one record. Four decisions are four Issues, so each is accepted, rejected or\namended on its own and closes on its own — **including a backfill**, where it is tempting to put a\ndomain's decisions in one thread and where the wall of text costs the reviewer most.\n\n**2. The discussion is the gate.** The developer accepts, rejects or amends it in the thread.\n**Never write the file ahead of that answer, and never decide on your own that a record is\naccepted.**\n\n**3. The record lands in its own MR** — one new file, plus its row in\n`.workflow\u002Fdecisions\u002FREADME.md`. A record that supersedes another also deletes the old one, by\n[Superseding](#superseding). It carries `Closes #\u003Cadr-issue>`. The exception is a backfill: those\nrecords constrain code that already exists, so there is nothing for them to land ahead of, and they\nride with the domain's spec in that Issue's MR.\n\nThe spec still cites a record whose code is not built yet — `wf spec-coverage` fails on a record\nno spec links to. At the claim it will change, add one line: **Decided, not yet built**, what will\nbe true, the Issue that builds it, and the link. That is true today, so the spec stays in the\npresent tense. The Issue that builds it replaces the line with the behaviour, in its own MR.\n\n**4. The dependent Issue waits** at `blocked` with a comment linking the ADR Issue, and returns to\n`in progress` when the record merges. That is the `workflow` skill's *A discovered blocker* table\napplied unchanged.\n\n**Found mid-implementation?** Same path, entered through the blocker rule: stop editing, leave the\ncheckpoint in the Issue, open the ADR Issue, block the original. A decision important enough to\nrecord is important enough to stop for.\n\n### The record file\n\nStart from `.workflow\u002FDECISION-TEMPLATE.md`.\n\n```markdown\n---\nid: 0007\ntitle: Cancelling an order refunds it in full\ndate: 2026-09-14\nstatus: accepted\ndomain: orders\nspec: .workflow\u002Fspecs\u002Forders\u002FSPEC.md\nsupersedes: —\nissue: 42\n---\n```\n\n`status` is always `accepted`: a replaced record is deleted. `domain` is `none` for a\nprocess-level decision, and `spec` is `none` when no spec cites it. `supersedes` is the `NNNN` of\nthe record this one replaces, or `—`.\n\n**There is no `proposed` status.** The Issue is the proposed state; a rejected decision leaves a\nclosed Issue and no file, which is a better record of a road not taken than a deleted one.\n\n**IDs are flat and numbered, not nested under a domain.** The records that matter most cross\ndomains — how the code is split, how a release is gated. Nesting forces a false choice for exactly\nthose. `domain:` gives filtering without it, and a flat integer gives an ID you can say out loud in\nreview. Two branches can both grab `0031`; renumber at merge, it takes half a minute.\n\n### Superseding\n\nA record is **never edited**, except as the paragraphs below allow. A decision that changes, wholly\nor in part, gets a new record and a new ADR Issue — changing your mind is itself a decision. There\nis no \"amends\": a reader learns the current decision from one file, never by merging a chain of\nthem.\n\n- **Part of it changes.** The new record's *Decision* is the whole decision as it now stands — the\n  parts that hold, carried over as written, plus the new part. The old version of the changed part\n  is one bullet in *Alternatives considered*, saying why it was dropped.\n- **Part of it no longer holds.** The same, with *Decision* holding only what survives and\n  *Alternatives* saying why the rest does not.\n\nThe new record says `supersedes:` the old number from the moment it is written, and **the MR that\nlands it deletes the old record** with its index row, and moves every spec's `→ [ADR-NNNN]` to the\nnew number. Git is the history: it goes wherever the repository goes and needs no network, and\n`git log -p -- '.workflow\u002Fdecisions\u002FNNNN-*'` finds the old text by the number `supersedes:` gives.\nThat *Alternatives* bullet is the one place a reader meets the old decision without git, so it is\nnever left out. A record with no `supersedes:` line means `—`.\n\n**A record no merged code relies on yet** may be amended in the MR that first builds it, with the\nreason in the MR description and a comment on the record's `[ADR]` Issue — before anything is built\non it, a second record would only describe a road nobody took.\n\n**A record whose feature is removed from the code** is deleted the same way, together with its\nindex row and every spec line that cites it, with the reason stated in the commit and the MR.\n\n**Numbers are never reused**: a new record takes the number one above the highest ever used, in\nthe index or in git history. A gap in the index is a record replaced or removed.\n\nThe new record lands before the code that builds it, so for a while the spec describes behaviour\nwhose record is already gone. The claim keeps describing today, and carries the **Decided, not yet\nbuilt** line linking the new record; the old text is in git, by the number its `supersedes:` gives.\n\n---\n\n## The `## Spec changes` section\n\nWritten into a `PLAN.md` while the work is being planned, when the context is already in your\nhead. It makes settling mechanical instead of a re-read of the whole diff.\n\n```markdown\n## Spec changes\n\n`.workflow\u002Fspecs\u002Forders\u002FSPEC.md`\n\n### MODIFIED: Cancelling an order\nCancellable until it ships, refunded in full.\n*(was: cancellable for one hour after it was placed, refunded less a fee)*  → ADR-0007\n\n### REMOVED: The cancellation fee\nDropped outright, along with its setting.\n```\n\n`ADDED` \u002F `MODIFIED` \u002F `REMOVED`, one heading each. **The `(was: …)` line is the point of the whole\nformat** — a reviewer sees what is changing without diffing two documents in their head.\n\nFor an Issue worked without a plan, the same three headings go in the MR description instead.\n\n---\n\n## Settling, in one paragraph\n\nIn the **same MR** as the work: update the domain's `SPEC.md` to match what changed and cite any\nrecord accepted for it; open an ADR Issue for anything the work turned up that passes the accident\ntest and is not already recorded; and, **if this Issue was the last of its plan's Issues**, move\nthe plan directory to `.workflow\u002Fplans\u002Farchive\u002F\u003Cdate>-\u003Cslug>\u002F` with `Settled: \u003Cdate>` in its\nheader. A plan with phases still ahead of it stays where it is.\n\nAn Issue with no behaviour change settles in one line in the MR description and touches no files.\nThat has to stay cheap, or the step gets skipped on the small tasks that are most of the board.\n\n---\n\n## What is checked, and what is not\n\n`wf spec-coverage` runs in about a second, and `\u002Fpre-mr-check` runs it whenever anything under\n`.workflow\u002Fspecs\u002F`, `.workflow\u002Fdecisions\u002F` or `.workflow\u002Fplans\u002F` changes — as the project's CI\nshould. It fails when:\n\n- a spec's `[ADR-NNNN]` link points at no record or at a different record — when the missing one\n  was **superseded**, the behaviour changed and the spec did not follow, and the problem names the\n  record that replaced it — or an `ADR-NNNN` appears without a link;\n- a record is not cited by the spec its own `spec:` names, unless that is `none`;\n- a record's frontmatter is incomplete, its `id` is not its file's number or is taken twice, its\n  status is not `accepted`, it still carries `superseded_by:`, its `supersedes:` is not an earlier\n  number, or the record it supersedes is still in the directory;\n- a record has no row in the index, or a row disagrees with its record;\n- a directory in `.workflow\u002Fplans\u002F` is not named `\u003CDD-MM-YYYY>-\u003Cslug>`.\n\nA plan in flight for more than 30 days is printed as debt, never failed on: counted, and meant to\ngo down.\n\nNone of this verifies prose against behaviour. *\"A failed order is refunded in full\"* is not\ngreppable. The check proves the links hold and the records agree; whether the spec is still *true*\nis a person's job, done in the MR that made it untrue.\n",{"name":5,"description":7},"main","68fb57dd74de5ed76dcfaff357932684f77650e6","internal\u002Fbase\u002Ffiles\u002Fcore\u002Fskills\u002Fdomain-specs","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg","2026-11-13 17:41:05",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add workflowaiorg\u002Fworkflow --skill domain-specs",{"tool":35,"command":36},"bunx","bunx skills add workflowaiorg\u002Fworkflow --skill domain-specs",{"tool":38,"command":39},"pnpm","pnpm dlx skills add workflowaiorg\u002Fworkflow --skill domain-specs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Fbase\u002Ffiles\u002Fcore\u002Fskills\u002Fdomain-specs\u002FSKILL.md",true,[],[44,51,58,65,72,77],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7F58YP2QA8F89599TDWEY0Y","notes","Where notes go.","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Frender\u002Ftestdata\u002Fsync\u002Fwant\u002F.opencode\u002Fskills\u002Fnotes\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7F58X62078DBFA7YZH0M9VP","naming","How things are named, including the sample's tables.","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Frender\u002Ftestdata\u002Fsync\u002Fwant\u002F.opencode\u002Fskills\u002Fnaming\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7F58VXX28G09AJCA667GHBS","local","A skill only this project has.","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Frender\u002Ftestdata\u002Fsync\u002Fwant\u002F.opencode\u002Fskills\u002Flocal\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7F58TQ8XVBD6SDV0S4T6E77","hello","Greets sample's developers.","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Frender\u002Ftestdata\u002Fsync\u002Fwant\u002F.opencode\u002Fskills\u002Fhello\u002FSKILL.md",[],[],{"skillNo":73,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7F58R379TW8C6VY572RK11F","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Frender\u002Ftestdata\u002Fsync\u002Fwant\u002F.github\u002Fskills\u002Fnotes\u002FSKILL.md",[],[],{"skillNo":78,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7F58PNRREJ4KPY496M2XHSY","https:\u002F\u002Fgithub.com\u002Fworkflowaiorg\u002Fworkflow\u002Fblob\u002Fmain\u002Finternal\u002Frender\u002Ftestdata\u002Fsync\u002Fwant\u002F.github\u002Fskills\u002Fnaming\u002FSKILL.md",[],[]]