[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77K4XPGYKFDCVBX9TVN2MBC":3,"skill-same:01M77K4XPGYKFDCVBX9TVN2MBC":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},"01M77K4XPGYKFDCVBX9TVN2MBC","refine-spec",null,"Use when the user asks whether a spec is still accurate, suspects spec drift, wants a capability's behavior captured before or after a change, or names code that has no spec. Reconciles one capability's loom spec against its tests and code and reports drift by requirement id.","ZPerrin\u002Floom","ZPerrin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6732345?v=4","01M77K4SE6DQV2GZ683DV0E7TN","01M77K4SF9C4MTN5KJM90Y895Z",0,"MIT","https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom\u002Fblob\u002Fmaster\u002Fskills\u002Frefine-spec\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: refine-spec\ndescription: Use when the user asks whether a spec is still accurate, suspects spec drift, wants a capability's behavior captured before or after a change, or names code that has no spec. Reconciles one capability's loom spec against its tests and code and reports drift by requirement id.\n---\n\n## Refine spec\n\nHold one capability's living spec against the code that claims to implement it. Read what the tests and code do, compare it with what the spec says by id, put each divergence to the operator with a recommended direction, and land only what the operator rules. Drift runs both ways: a spec that lags the code and code that broke the spec look the same until the operator says which is the bug.\n\nTwo entry states:\n\n- **No repo spec:** every behavior the evidence shows is undocumented. The findings are the fence, and `spec` writes the first repo spec from it.\n- **Repo spec exists:** compare by id. Findings land as change-log lines, as in-place edits through `spec`, or as blocks in a work spec.\n\n## Refine Spec Control Surfaces\n\nThese are the surfaces `refine-spec` reads or writes directly; the full key map is the [reference project](..\u002F..\u002Freferences\u002Freference-project.md).\n\n| Surface | Refine spec uses it for |\n|---|---|\n| `[specs].repo_dir` | where the capability's repo spec is looked for (default `docs\u002Fspecs`) |\n| `[specs].work_dir` | where a proposal with text lands, as a work spec `spec` writes (default `.loom\u002Fspecs`) |\n| `.loom\u002Fskills\u002Fspec.md` | repo opinion shared with `spec`: capability boundaries and the form a test ref is resolved by |\n| `.loom\u002Fskills\u002Frefine-spec.md` | optional repo opinion: how to sample a run, refs known to be stale, where a sweep costs too much |\n| `doc-linter` | the gate on every file touched |\n| `doc-stamp` | `updated=\u003Ctoday>` on the repo spec a line was appended to |\n| `spec` | writes every requirement block: a first repo spec, an in-place extension, a work spec |\n| tests, code, a sampled run | the evidence, in that order of authority |\n\n## Hard constraints\n\n- **Evidence in order, named.** Every finding names its evidence: the test first, the code it exercises where no test speaks, a sampled run only where both are silent. A sample answers one named question; it is never a sweep.\n- **Findings carry an id.** A finding is keyed by the id it contradicts, the id it extends, or the id `spec` mints for it. A file or a line number is a locator, never a key.\n- **Never a silent rewrite.** This skill writes only change-log lines and the stamp to a repo spec, the tier the grammar gives a reconciliation pass. Recommend a direction for each finding, and write only what the operator ruled.\n- **Confirm before writing.** Present the whole set of findings before any file changes. An invocation that fixes a direction for every finding kind, such as leaving all of them open, is a confirmed set, which is how a brief drives this skill with no operator present.\n- **Writing is spec's.** New blocks, replacement blocks, and a first repo spec go through `spec`, handed the fence in its own terms: capability, token, boundary, and every decision and invariant the operator gave, so its Confirm needs no second round. Where the harness cannot invoke a skill from a skill, read [spec](..\u002Fspec\u002FSKILL.md) and follow it.\n- **One capability.** The scope is the capability named or the one the diff touched. Behavior that belongs to a neighbor is a finding for the neighbor's spec, reported and not chased.\n\n## Workflow\n\nThe gate first: a `loom gate: refine-spec` receipt in your context says whether the repo opinion was read and which hook ran, with that opinion and that hook's output beneath it. Without one for this invocation, do the same by hand: read `.loom\u002Fskills\u002Frefine-spec.md` if it exists and run `bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fskill-hook\" refine-spec`; exit 3 is no hook. A receipt from an earlier invocation does not count, and a hook tolerates a repeat.\n\n### 1. Read\n\nWhen no capability is named, or the name is a script, a module, or a test file, map first: list the product's features from the front doors (README, roadmap, the skills' descriptions), put the cut to the operator as features at the 20,000-foot view, and read no test until one is chosen. Evidence is walked inside a fence, never to find one.\n\nThe repo spec if one exists, `.loom\u002Fskills\u002Fspec.md`, the tests the scenarios name and the tests that cover the capability, then the code they exercise. Resolve every test ref by the repo's form; a ref that resolves to nothing is a finding. Where a sampled run is called for, write down what was run.\n\n### 2. Compare\n\nWalk the spec by id: for each requirement and scenario, what the evidence says. Then walk the evidence for what the spec does not say: every assertion a test makes, a clean expectation included, and every branch the code takes. Classify each divergence:\n\n- **Undocumented:** behavior the evidence asserts and no id covers.\n- **Drift:** the evidence contradicts a requirement or scenario; either side may be the bug.\n- **Unverified:** a scenario without a test ref, a ref that resolves to nothing, a test that does not establish the sentence it is named for, or a requirement without a scenario.\n- **Dead:** no test and no code path exercises the requirement.\n- **Detail:** the evidence pins how the code does something rather than what the feature promises; it is named in the report and never logged, and a test that pins the how gets no scenario.\n\nAn existing change-log line that already records the observation under the id is a finding already open: cite it, do not log it again. A finding `doc-linter` already reports by id is carried in the report from the lint output, not logged; the change log holds what only this pass observed.\n\n### 3. Confirm\n\nPresent the findings by id, each with its kind, its evidence, and your recommended direction: the spec follows the code (for a dead requirement, the block goes and its id retires), the code is the bug, or open. Rounds as needed; wait for the operator between them. With no repo spec, present the fence in `spec`'s terms plus the behaviors found, the test each names, and the neighbors the evidence touched.\n\n### 4. Land\n\n- **Left open:** append the change-log line to the repo spec. Where there is text to propose, `spec` writes it as a work spec carrying only those blocks.\n- **Ruled:** the operator has closed the finding. Hand the ruling to `spec`, which makes the edit and deletes the open line it closes in the same diff, or leaves the line open with the ruling in its text while the code is the bug. Lines this skill writes itself end `open`.\n- **No repo spec:** `spec` writes the first repo spec from the fence.\n\nStamp the repo spec with `bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fdoc-stamp\" \u003Cfile> updated=\u003Ctoday>` when a line was appended. Run `bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fdoc-linter\"`; a finding on a line this skill wrote sends it back here.\n\n## Output\n\nReport the capability and the evidence read, with any sampled run and the question it answered; each finding on one line with its id, kind, evidence, and the direction ruled or left open; the change-log lines appended and the open lines cited instead; the file `spec` wrote, or that it wrote nothing; the refs that resolved to nothing; behavior handed to a neighbor's spec; and the lint result. If the spec and the evidence agree, say so and write nothing.\n\n## References\n\nThe grammar and the writing rules the findings and the change-log lines obey:\n\n!`cat \"${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Fspec-grammar.md\" \"${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Fspec-writing-rules.md\" 2>\u002Fdev\u002Fnull || true`\n\nIf the line above shows a command instead of the grammar, read [spec-grammar.md](..\u002F..\u002Freferences\u002Fspec-grammar.md) and [spec-writing-rules.md](..\u002F..\u002Freferences\u002Fspec-writing-rules.md) before comparing.\n","## Refine spec\n\nHold one capability's living spec against the code that claims to implement it. Read what the tests and code do, compare it with what the spec says by id, put each divergence to the operator with a recommended direction, and land only what the operator rules. Drift runs both ways: a spec that lags the code and code that broke the spec look the same until the operator says which is the bug.\n\nTwo entry states:\n\n- **No repo spec:** every behavior the evidence shows is undocumented. The findings are the fence, and `spec` writes the first repo spec from it.\n- **Repo spec exists:** compare by id. Findings land as change-log lines, as in-place edits through `spec`, or as blocks in a work spec.\n\n## Refine Spec Control Surfaces\n\nThese are the surfaces `refine-spec` reads or writes directly; the full key map is the [reference project](..\u002F..\u002Freferences\u002Freference-project.md).\n\n| Surface | Refine spec uses it for |\n|---|---|\n| `[specs].repo_dir` | where the capability's repo spec is looked for (default `docs\u002Fspecs`) |\n| `[specs].work_dir` | where a proposal with text lands, as a work spec `spec` writes (default `.loom\u002Fspecs`) |\n| `.loom\u002Fskills\u002Fspec.md` | repo opinion shared with `spec`: capability boundaries and the form a test ref is resolved by |\n| `.loom\u002Fskills\u002Frefine-spec.md` | optional repo opinion: how to sample a run, refs known to be stale, where a sweep costs too much |\n| `doc-linter` | the gate on every file touched |\n| `doc-stamp` | `updated=\u003Ctoday>` on the repo spec a line was appended to |\n| `spec` | writes every requirement block: a first repo spec, an in-place extension, a work spec |\n| tests, code, a sampled run | the evidence, in that order of authority |\n\n## Hard constraints\n\n- **Evidence in order, named.** Every finding names its evidence: the test first, the code it exercises where no test speaks, a sampled run only where both are silent. A sample answers one named question; it is never a sweep.\n- **Findings carry an id.** A finding is keyed by the id it contradicts, the id it extends, or the id `spec` mints for it. A file or a line number is a locator, never a key.\n- **Never a silent rewrite.** This skill writes only change-log lines and the stamp to a repo spec, the tier the grammar gives a reconciliation pass. Recommend a direction for each finding, and write only what the operator ruled.\n- **Confirm before writing.** Present the whole set of findings before any file changes. An invocation that fixes a direction for every finding kind, such as leaving all of them open, is a confirmed set, which is how a brief drives this skill with no operator present.\n- **Writing is spec's.** New blocks, replacement blocks, and a first repo spec go through `spec`, handed the fence in its own terms: capability, token, boundary, and every decision and invariant the operator gave, so its Confirm needs no second round. Where the harness cannot invoke a skill from a skill, read [spec](..\u002Fspec\u002FSKILL.md) and follow it.\n- **One capability.** The scope is the capability named or the one the diff touched. Behavior that belongs to a neighbor is a finding for the neighbor's spec, reported and not chased.\n\n## Workflow\n\nThe gate first: a `loom gate: refine-spec` receipt in your context says whether the repo opinion was read and which hook ran, with that opinion and that hook's output beneath it. Without one for this invocation, do the same by hand: read `.loom\u002Fskills\u002Frefine-spec.md` if it exists and run `bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fskill-hook\" refine-spec`; exit 3 is no hook. A receipt from an earlier invocation does not count, and a hook tolerates a repeat.\n\n### 1. Read\n\nWhen no capability is named, or the name is a script, a module, or a test file, map first: list the product's features from the front doors (README, roadmap, the skills' descriptions), put the cut to the operator as features at the 20,000-foot view, and read no test until one is chosen. Evidence is walked inside a fence, never to find one.\n\nThe repo spec if one exists, `.loom\u002Fskills\u002Fspec.md`, the tests the scenarios name and the tests that cover the capability, then the code they exercise. Resolve every test ref by the repo's form; a ref that resolves to nothing is a finding. Where a sampled run is called for, write down what was run.\n\n### 2. Compare\n\nWalk the spec by id: for each requirement and scenario, what the evidence says. Then walk the evidence for what the spec does not say: every assertion a test makes, a clean expectation included, and every branch the code takes. Classify each divergence:\n\n- **Undocumented:** behavior the evidence asserts and no id covers.\n- **Drift:** the evidence contradicts a requirement or scenario; either side may be the bug.\n- **Unverified:** a scenario without a test ref, a ref that resolves to nothing, a test that does not establish the sentence it is named for, or a requirement without a scenario.\n- **Dead:** no test and no code path exercises the requirement.\n- **Detail:** the evidence pins how the code does something rather than what the feature promises; it is named in the report and never logged, and a test that pins the how gets no scenario.\n\nAn existing change-log line that already records the observation under the id is a finding already open: cite it, do not log it again. A finding `doc-linter` already reports by id is carried in the report from the lint output, not logged; the change log holds what only this pass observed.\n\n### 3. Confirm\n\nPresent the findings by id, each with its kind, its evidence, and your recommended direction: the spec follows the code (for a dead requirement, the block goes and its id retires), the code is the bug, or open. Rounds as needed; wait for the operator between them. With no repo spec, present the fence in `spec`'s terms plus the behaviors found, the test each names, and the neighbors the evidence touched.\n\n### 4. Land\n\n- **Left open:** append the change-log line to the repo spec. Where there is text to propose, `spec` writes it as a work spec carrying only those blocks.\n- **Ruled:** the operator has closed the finding. Hand the ruling to `spec`, which makes the edit and deletes the open line it closes in the same diff, or leaves the line open with the ruling in its text while the code is the bug. Lines this skill writes itself end `open`.\n- **No repo spec:** `spec` writes the first repo spec from the fence.\n\nStamp the repo spec with `bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fdoc-stamp\" \u003Cfile> updated=\u003Ctoday>` when a line was appended. Run `bash \"${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fdoc-linter\"`; a finding on a line this skill wrote sends it back here.\n\n## Output\n\nReport the capability and the evidence read, with any sampled run and the question it answered; each finding on one line with its id, kind, evidence, and the direction ruled or left open; the change-log lines appended and the open lines cited instead; the file `spec` wrote, or that it wrote nothing; the refs that resolved to nothing; behavior handed to a neighbor's spec; and the lint result. If the spec and the evidence agree, say so and write nothing.\n\n## References\n\nThe grammar and the writing rules the findings and the change-log lines obey:\n\n!`cat \"${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Fspec-grammar.md\" \"${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Fspec-writing-rules.md\" 2>\u002Fdev\u002Fnull || true`\n\nIf the line above shows a command instead of the grammar, read [spec-grammar.md](..\u002F..\u002Freferences\u002Fspec-grammar.md) and [spec-writing-rules.md](..\u002F..\u002Freferences\u002Fspec-writing-rules.md) before comparing.\n",{"name":5,"description":7},"master","1654547be6e5893679da596a76333a780abf7a5a","skills\u002Frefine-spec","https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom","https:\u002F\u002Fgithub.com\u002FZPerrin","2026-09-08 11:58:22",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add ZPerrin\u002Floom --skill refine-spec",{"tool":35,"command":36},"bunx","bunx skills add ZPerrin\u002Floom --skill refine-spec",{"tool":38,"command":39},"pnpm","pnpm dlx skills add ZPerrin\u002Floom --skill refine-spec","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom\u002Fblob\u002Fmaster\u002Fskills\u002Frefine-spec\u002FSKILL.md",true,[],[44,51,58,65,72],{"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},"01M77K5BNBMX9GMZYVQ6R5RWPK","weft","Use when a loom-managed documentation set needs an editorial pass to prune, condense, reroute, and realign durable project docs with the code and the editorial ethos.","https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom\u002Fblob\u002Fmaster\u002Fskills\u002Fweft\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},"01M77K593XBM4TW4B8E9JSWTDJ","weave","Use when wrapping up a loom work session, especially when durable docs, close-out checks, merge handoff, or branch cleanup need attention.","https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom\u002Fblob\u002Fmaster\u002Fskills\u002Fweave\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},"01M77K54XGV4J50S4S99S5DQES","warp","Use when opening a unit of work in a loom managed repo, especially when orientation, branch\u002Fworktree setup, ticket context, or kickoff guidance may be needed.","https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom\u002Fblob\u002Fmaster\u002Fskills\u002Fwarp\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},"01M77K512EAS982K3E2B2FY23S","spec","Use when the user asks to spec a capability, write its requirements, or capture what the code does before changing it. Produces a repo spec of what the code does or a work spec of what one unit of work will make true, under the loom spec grammar.","https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom\u002Fblob\u002Fmaster\u002Fskills\u002Fspec\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M77K4VDAVMQ3HDK6HN72BCFN","dress","Use when adopting loom on a repo, or re-tuning an existing loom configuration.","https:\u002F\u002Fgithub.com\u002FZPerrin\u002Floom\u002Fblob\u002Fmaster\u002Fskills\u002Fdress\u002FSKILL.md",[],[]]