[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75K72A3397KH8GXFDJ0FCJM":3,"skill-same:01M75K72A3397KH8GXFDJ0FCJM":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M75K72A3397KH8GXFDJ0FCJM","spec-draft",null,"Interactively elicit a four-file spec bundle (requirements.md, design.md, tasks.md, test-spec.md) at Status Draft on the spec's own branch, mining seed sources (pending notes, the observations log, transcripts) and citing them. Runs fold-detection against existing specs on every invocation and surfaces an extend recommendation instead of spinning a duplicate bundle. Commits the completed bundle (commit_on_draft opt-out); never pushes, never flips a spec to Ready.","inkatze\u002Fplanwright","inkatze","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2029270?v=4","01M75K412KAPRFBSFXA7ZF2ZVY","Diego Romero","01M75K41364G95D0ZS5MWK7PZ3",4,"MIT","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fspec-draft\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: spec-draft\ndescription: >\n  Interactively elicit a four-file spec bundle (requirements.md, design.md,\n  tasks.md, test-spec.md) at Status Draft on the spec's own branch, mining\n  seed sources (pending notes, the observations log, transcripts) and citing\n  them. Runs fold-detection against existing specs on every invocation and\n  surfaces an extend recommendation instead of spinning a duplicate bundle.\n  Commits the completed bundle (commit_on_draft opt-out); never pushes, never\n  flips a spec to Ready.\nargument-hint: \"\u003Cfeature-name> [--extend \u003Cspec>]\"\n---\n\n# \u002Fspec-draft\n\nThe authoring entry point of the planwright pipeline (REQ-B1.1): a Socratic,\ninteractive elicitation that turns an idea plus its seed material into a\ncompliant four-file bundle at `\u003Croot>\u002F\u003Cspec>\u002F`, Status Draft, committed on the\nspec branch. Drafting ends where comprehension begins: `\u002Fspec-kickoff` walks\nthe Draft to sign-off and flips it Ready. This skill never pushes, never\nopens a PR, and never flips a status to Ready — sign-off is a human gate\n(`doctrine\u002Fhuman-gates.md`) it has no business near.\n\n## Doctrine\n\nResolve and read the manifest's rule docs below via the rule-doc resolution\nconvention (`scripts\u002Fresolve-rule-doc.sh \u003Cdoc-name>` or the documented\n`PLANWRIGHT_ROOT`\u002F`CLAUDE_PLUGIN_ROOT` chain), per\n`doctrine\u002Finstruction-hygiene.md`: `run-start` entries before work begins,\n`point-of-use` entries at the step each names, so no bundle write happens\nbefore `spec-format` loads. Their definitions govern wherever this skill names\na concept. A doc that does not resolve, at run start or its point of use,\nhalts with a clear message naming it and the chain consulted (REQ-K1.7: a\nclear message is the graceful arm); `decision-domains` alone degrades\ninstead, as Design step 3 says.\n\nDoctrine: run-start interaction-style\nDoctrine: run-start research-rigor\nDoctrine: run-start security-posture\nDoctrine: run-start proportionality\nDoctrine: point-of-use spec-format (elicitation start — conventions + the bundle write)\nDoctrine: point-of-use engineering-decisions (the design phase)\nDoctrine: point-of-use customization-boundary (the design-phase capability-vs-style call)\nDoctrine: point-of-use autopilot-reflex (the altitude gate, Design step 3)\nDoctrine: point-of-use decision-domains (the design-phase catalog walk)\n\n## Pre-flight\n\n1. **Parse arguments.** `$ARGUMENTS` carries the proposed feature name —\n   free-form idea text by design (the name is a hint, D-22) — and optionally\n   `--extend \u003Cspec>` (extend mode on an existing bundle; alias `specs\u002F\u003Cspec>`,\n   one trailing slash allowed).\n   The feature name is not used directly: the skill derives the **spec\n   identifier** (`\u003Cspec>`) from it, and that derived identifier is what\n   appears in paths, branch names, and commands. Validate the derived\n   identifier (and any identifier a seed or `--extend` proposes) against the\n   anchored, full-string pattern `^[a-z0-9][a-z0-9-]*$`, maximum length 64\n   (REQ-A1.8), never `flight`, **before** any such use.\n   When the feature name is not already a conforming identifier, propose a\n   conforming kebab-case variant and ask; nothing non-conforming is ever\n   interpolated. No name given: elicit the idea first (seed gathering\n   below) and propose a name from it. Resolve `\u003Croot>` and its posture per\n   `docs\u002Fspec-location.md`; outside `same-repo`, its table governs\n   `\u003Croot>\u002F\u003Cspec>`, the git steps and walkthrough suggestion below. When\n   `--extend \u003Cspec>` is present,\n   additionally\n   verify the target: `\u003Croot>\u002F\u003Cspec>\u002Frequirements.md` must exist and its\n   Status must be non-terminal. A nonexistent target gets a clear message\n   listing the specs that do exist; a Retired or Superseded target is\n   refused per the extend-mode terminal rule, up front rather than after\n   elicitation starts.\n2. **Altitude routing (inception REQ-J1.2, D-16).** Pitch-shaped input\n   (independently ownable tracks, no candidate home repository, three or\n   more discipline domains, or a pitch-form document) sits above a spec:\n   recommend `\u002Finception` with a one-line reason, drafting here the other\n   option. Recommend only, never route; a decline drafts normally.\n3. **Detect the git state.** Not a git repository: degrade\n   per REQ-K1.7 — say so up front, elicit and write the bundle in place, and\n   skip every branch\u002Fworktree\u002Fcommit step below, surfacing at the end what\n   was skipped and why. No remote configured: irrelevant here; note it only\n   so the human knows `\u002Fspec-kickoff`'s push step will degrade.\n4. **Read the config.** `commit_on_draft` from `config\u002Fdefaults.yml`\n   overridden by `\u003Crepo>\u002F.claude\u002Fplanwright.local.yml` (local wins). Default\n   `true`; an absent, unreadable, or malformed config file falls back to the\n   default with a one-line warning surfaced immediately at this step — before\n   any fallback-driven action (such as the auto-commit) can fire — and\n   repeated in the handoff (REQ-K1.7).\n5. **Resolve the working location** (D-44, graceful in every starting state).\n   The spec branch is `planwright\u002F\u003Cspec>\u002Fspec` (the reserved namespace the\n   `tasks-pr-sync` hook no-ops on); the spec worktree is\n   `\u003Crepo>\u002F.claude\u002Fworktrees\u002F\u003Cspec>-spec` (D-37 placement; the directory name\n   disambiguates the literal branch suffix `spec`, which would collide across\n   specs, while staying open to hand-launch `claude --worktree \u003Cspec>-spec`).\n   - **Already in the spec's own worktree:** proceed. Dirty or diverged\n     state: surface it and ask before touching anything — never auto-stash,\n     auto-commit, or clean.\n   - **In the main checkout or an unrelated worktree:** if the spec worktree\n     exists, do not work here — print the re-open hand-launch\n     (`claude --worktree \u003Cspec>-spec`) and stop. If the branch exists but the\n     worktree was pruned, recreate the worktree from the branch (native\n     mechanics below). If neither exists, create them: worktree via Claude\n     Code's native mechanism (EnterWorktree — never raw `git worktree`,\n     D-37), then `git switch -c planwright\u002F\u003Cspec>\u002Fspec` inside it, branched\n     from the current main view.\n   - Worktree\u002Fbranch resolution happens after the name is final — which for\n     a fresh idea may be after seed gathering and fold-detection have run\n     (both are read-only against the existing checkout).\n\n## Seed gathering (REQ-B1.2, REQ-B1.4)\n\nCollect the framing inputs before asking the human a single elicitation\nquestion; seeds answer questions the human would otherwise repeat.\n\n1. **The invocation itself** — whatever idea, links, or files came with the\n   prompt.\n2. **Pending notes** — files under `\u003Croot>\u002F_pending\u002F`. Read them; ask which\n   apply if more than one plausibly does. Graduated venture seeds among them\n   come through `\u003Cplanwright-root>\u002Fscripts\u002Finception-seed-read.sh \u003Croot>`\n   (inception REQ-J1.1); follow its `note` line.\n3. **The observations accumulator** — the live fragments under\n   `\u003Croot>\u002F_observations\u002Fentries\u002F` plus the frozen legacy\n   `opportunities.md`'s unconsumed lines, read as **one candidate set** and\n   mined as a first-class seed source (D-23; this skill is its canonical\n   reader, REQ-H1.6; `mise run obs:log` renders the chronological view). An\n   `entries\u002F` fragment already bearing a `Consumed-by:` line is consumed,\n   not a candidate — complete its archive move (below) rather than\n   re-mining it, and skip-and-warn any grammar-invalid file rather than\n   silently dropping it. Read every candidate; select the ones relevant to\n   the feature being drafted; present the selection to the human (selector\n   with the relevant set pre-marked) so nothing is consumed silently.\n4. **The venture drop** — `\u003Cplanwright-root>\u002Fscripts\u002Finception-registry.sh drop-read`\n   (inception REQ-J1.8); follow its `note` line.\n5. **Transcripts and documents** the human offers.\n\nAn absent `\u003Croot>\u002F_pending\u002F`, fragment directory, legacy log, venture drop,\nor root directory entirely (a first-run repo) is not an error:\nnote what was absent and proceed with the seeds that exist.\n\nEvery identifier a seed proposes (a spec name, a path segment) is\nre-validated against REQ-A1.8 at consumption, before any interpolation —\naccumulator contents are unscreened input. Record every seed actually used:\neach becomes a `## Sources` entry in `requirements.md`, and the REQs and\nD-IDs it framed cite it (the meta-spec's citation kinds; `drafting-session\ndecision (\u003Cdate>)` covers choices made live in the session that mint no\nD-ID).\n\n**Pin altitude seed claims (REQ-H1.1).** While gathering seeds, extract every\nexplicit statement about the deliverable's *nature* — the seed-claim trigger\nclass `doctrine\u002Fautopilot-reflex.md` names (\"that's a doctrine gap\", \"this is\na first-class concern\", \"we keep doing X manually\"). Each is an altitude\nassertion the elicitation must reconcile against, not a throwaway phrase, and\nit is easy to under-weight in the rush toward mechanism. Record each pinned\nclaim as a `## Sources` entry in `requirements.md` so the altitude signal is\n**bundle-local** — the\nREQ-H1.3 kickoff check reads it from the bundle, never from drafting-session\nmemory. A pinned claim is one of the two altitude trigger classes; when a\ntrigger fires, the firing rule in Elicitation resolves the altitude before the\ndesign phase.\n\n**Archive-on-consume.** When the bundle is written, consume each mined\nentry through the shared helper `scripts\u002Fobs-consume.sh` (resolved under\nthe planwright root) — never by hand-composing paths or annotations. A\nfragment is consumed by UID: `scripts\u002Fobs-consume.sh --uid \u003Cuid> --spec\n\u003Cspec>` writes the `Consumed-by: specs\u002F\u003Cspec> (\u003Cdate>)` line inside the\nfragment and moves it from `entries\u002F` to `archive\u002F` with its filename\npreserved (annotate first, move second; idempotent on re-run, and it\ncompletes a crashed half-consume found still in `entries\u002F`). A frozen\nlegacy line is consumed in place: `scripts\u002Fobs-consume.sh --legacy --line\n'\u003Cexact line>' --spec \u003Cspec>` annotates the line where it sits. Surface a\nnon-zero helper exit — an unknown UID, an ambiguous duplicate-UID match\n(named, never silently picked), a refused argument — rather than papering\nover it. Unconsumed entries stay byte-for-byte; consumption moves content\nverbatim (write-time hygiene screened it when it was recorded, and the\nmove implies no re-screen — REQ-D1.2). Cite a consumed fragment as\n`obs:\u003Cuid>` in the bundle's `## Sources` entry (the UID survives the\narchive move, so the citation never dangles). The consume commits ride the\nspec branch and land on main with the spec PR, keeping them one revert\nfrom undone. The accumulator-taxonomy doctrine is the canonical home of\nthis drain ritual; this section applies it, not defines it.\n\n## Fold-detection (REQ-B1.3, D-21, D-22)\n\nRuns on **every** invocation, regardless of the feature name — the name is a\nhint, not a command. Skipped only when `--extend` already named the target.\n\n1. Scan every existing spec under `\u003Croot>` (any non-terminal status: Draft,\n   Ready, Active, Done). Read each bundle's `requirements.md` Goal and Scope\n   sections — bounded by design; the overlap signal lives in goal\u002Fscope. A malformed bundle (missing\n   `requirements.md`, unparseable header) is skipped with a notice naming\n   it; the scan never halts the session over someone else's broken bundle\n   (REQ-K1.7 — the validator owns reporting it).\n2. Judge semantic overlap between the new idea and each scanned spec: same\n   problem domain, same external interface, same decision space.\n3. On overlap, check D-21's spin-new triggers: the new idea introduces a new\n   external interface; is independently ownable; forces decisions orthogonal\n   to the bundle's domain; or would push the bundle past \"one feature a\n   reader holds in their head\".\n4. **Overlap and no trigger fires:** surface an extend recommendation —\n   a selector naming the overlapping spec, why it overlaps, with **extend as\n   the recommended option** and spin-new as the alternative. The human\n   decides. Never auto-fold; never silently obey the name over a clear\n   overlap.\n5. No overlap, or a trigger fires: proceed as a new bundle, noting in one\n   line what was scanned and why nothing folded.\n\n### Extend mode\n\nEntered via `--extend \u003Cspec>` or the human accepting the recommendation.\nExtend mode follows the target bundle's declared `Format-version:`\n(invariant-tasks D-7): a v1 target keeps every v1 convention unchanged —\nnew task blocks join `## Forward plan`, the v1 state sections stay — while\na v2 target takes the v2 shape (new blocks join `## Tasks` in dependency\norder; no placement sections or state annotations are ever written to it),\nand a v3 target takes that shape plus the optional `Repository:` field (a\nv2 target whose extension adds one bumps its declaration to 3);\nan unparseable target `Format-version:` is refused — fail closed, never\nthe v1 conventions (D-7).\nOperates on the existing bundle per the meta-spec's stable-ID discipline:\n\n- **Append, never renumber.** New REQs and D-IDs continue the existing ID\n  space; dotted task ids insert between existing tasks.\n- **Supersede what changes meaning.** A changed requirement or decision mints\n  a new ID adjacent to the old, old marked `Superseded-by`; bodies of\n  superseded records are never edited (D-20).\n- **Grow `test-spec.md`** with entries for every new REQ; **re-sync\n  `tasks.md`** (new task blocks per the declared version above, dependency\n  lines updated); **append a dated Changelog entry** describing the\n  extension.\n- **Reopen cycle (REQ-A3.1):** extending a Done bundle flips its stored\n  Status to Draft on all four headers — a v1 bundle stores Done, so the\n  write is Done→Draft; a v2 bundle derives Done over a stored Ready, so\n  the write is Ready→Draft — and the scoped kickoff of the delta flips it\n  back to Ready, the delta's first dispatch deriving Active. Extending an\n  Active bundle leaves its stored status untouched — the delta is Draft\n  content inside it, and `\u002Fspec-kickoff`'s delta re-walkthrough\n  is the sign-off path; say so in the handoff. Retired and Superseded are\n  terminal: refuse, suggesting a new bundle citing the old as a Source.\n- Extension work happens on the spec's own branch\u002Fworktree, same as a fresh\n  draft.\n\n## Elicitation\n\nSix phases, each governed by the interaction-style rules: show the progress\nindicator (`[\u003Cphase> \u003Cn>\u002F6]`), work in small bites, present decisions as\nselectors with a recommendation, and end each phase with the running summary\nin delta-plus-open form: the decisions since the previous summary, their\none-line rationale, and what remains open, never a restatement of everything\nso far (`interaction-style`'s *Running summary* rule under the turn\u002Fartifact\narbitration; the bundle on disk is the cumulative record). Each such\nprojection (a phase summary, the read-through below) is mirrored into the\nstructured decision\u002Ftranscript log as a `turn` record (D-19). Per the phase\nre-anchor (`doctrine\u002Fautopilot-reflex.md`, REQ-H1.2), the summary also\n**restates the claimed altitude and flags any drift** between the claim and\nwhat the elicitation is currently producing (\"the seed claimed doctrine; the\nlast phase produced only mechanism tasks\"). The restatement is cheap; its\nabsence is how a session silently slides altitude. Before\nphase 1, resolve and read `spec-format` (its point-of-use read): the\nmeta-spec defines every structural convention referenced here and governs\nthe Completion bundle write; follow it exactly so the bundle passes the\nvalidator the first time.\n\n1. **Goal & scope.** The problem, the one-paragraph goal, in-scope \u002F\n   out-of-scope lists. Elicit what the feature must *not* do — out-of-scope\n   entries prevent more drift than REQs do.\n2. **Requirements.** Thematic REQ groups (`## REQ-\u003CGroup> — \u003Ctheme>`), each\n   requirement a single SHALL\u002FMUST bullet with a stable ID and a citation.\n   Derive candidate REQs from the seeds and goal, present per group for\n   correction; the human supplies judgment, not formatting.\n3. **Design.** **Altitude gate first (REQ-H1.1).** Resolve and read\n   `autopilot-reflex` now (its point-of-use read). Before designing any\n   mechanism, check whether an altitude trigger has fired — a pinned seed\n   claim (seed gathering above) or a mid-flow signal surfaced during\n   elicitation (a recurring capability-vs-style call, an \"is this even core?\"\n   hesitation, a mechanism acquiring rules that read like doctrine): the two\n   trigger classes `doctrine\u002Fautopilot-reflex.md` defines. If one has fired,\n   resolve the deliverable's altitude **now**, and record the call as an early\n   **altitude D-ID** cited from the bundle's goal (the trigger-scoped altitude\n   record the doctrine requires — a conversational resolution with no artifact\n   can be pencil-whipped, so the D-ID is what the REQ-H1.3 kickoff check\n   verifies). Designing first and retrofitting the altitude is how a doctrine\n   deliverable ends up specced as a one-repo script. No trigger fired: no\n   record is required (per `proportionality`, the ceremony is scoped to the\n   specs that exhibited the risk) — proceed. Then resolve and read\n   `engineering-decisions` (its point-of-use read; it governs this phase's\n   recommendations) and record, for each load-bearing choice, a D-ID with all\n   three fields\n   (Decision \u002F Alternatives considered \u002F Chosen because). This phase fires\n   Research Rigor triggers (new dependency, unfamiliar domain,\n   security-touching pattern, version-sensitive API, mature-project\n   comparison): research before recommending, cite what was consulted.\n   **Capability-vs-style call:** when a choice is whether a preference belongs\n   in core or in an adopter\u002Fteam overlay, resolve, read, and apply\n   `customization-boundary` (its point-of-use read) — does\n   the general *capability* land in core as an opt-in, default-preserving config\n   knob, while the specific *value\u002Fstyle* stays in an overlay? Default tilt is\n   overlay when in doubt; a preference graduates to a core knob only with\n   drain-loop evidence that it generalizes.\n   **Builder hook point:** walk the decision-domains catalog for domains the\n   feature touches; flag any the spec touches but does not decide, and\n   escalate stake-bearing decisions (authn\u002Fz, data modeling, security\n   posture, integration surface) as explicit design decisions — never\n   auto-default them. Walk the catalog's prose seed (`doctrine\u002Fdecision-domains.md`,\n   the normative full text) **and** any adopter\u002Fteam\u002Fmachine-local additions via\n   the merged path `scripts\u002Fresolve-catalog.sh decision-domains`, so overlay\n   domains apply too rather than a single-layer read (REQ-D1.1). When the\n   planwright builder skill exists it plugs in here (stack detection, guard\n   recommendations); until then the catalog walk is the manual form and a\n   missing catalog doc degrades to a one-line notice. Hook point and catalog\n   scan, not a dependency: drafting works without the builder.\n4. **Tasks.** Decompose into task blocks with the five definition fields\n   (Deliverables \u002F Done when \u002F Dependencies \u002F Citations \u002F Estimated effort);\n   IDs stable from birth. `Done when:` conditions an agent can evaluate.\n   All blocks land in a single `## Tasks` section in dependency order, and\n   the three human-payload sections (`## Awaiting input`, `## Deferred`,\n   `## Out of scope`) are written with `(none yet)` placeholders — no\n   placement sections and no state annotations: a block carries its five\n   definition fields and nothing else, because execution state is derived,\n   never authored (invariant-tasks D-2). Dependency edges are load-bearing\n   (orchestration selection reads them): ask about ordering the human knows\n   and the text doesn't show — in particular, tasks whose deliverables gate\n   other tasks' verification (CI, guards, validators) should carry explicit\n   edges from the tasks they protect, or they dispatch too late. When the\n   elicitation surfaces a second repository (a task whose code lives outside\n   the bundle's work repository), offer that task the optional `Repository:`\n   field: one alias per block, resolved only through the machine-local\n   work-repository registry, never a path or URL (`spec-format`\n   *Format-version 3*); work spanning repositories splits into tasks joined\n   by dependency edges.\n5. **Test-spec.** Every REQ pinned to at least one verification path, tagged\n   `[test]` \u002F `[manual]` \u002F `[design-level]` \u002F `[Gherkin]` (mixed:\n   `[test + manual]`). Prefer `[test]` where automation is honest; say which\n   CI runs it.\n6. **Review & validate.** Assemble all four files (shared header block,\n   `**Status:** Draft`, `**Last reviewed:** \u003Cdate>`, `**Format-version:** 2`\n   (`**Format-version:** 3` only when some task names a repository), and —\n   fixed vocabulary, on all four files (D-5) — the canonical pointer line\n   `**Execution:** derived — see the status render`).\n\n   **Self-critique pass (REQ-C1.1, D-7).** Before the validator runs and\n   before commit, run one scoped self-critique lens pass over the freshly\n   assembled bundle: assume the draft is incomplete and re-read it for gaps,\n   contradictions, uncited claims, mis-scoped or unverifiable REQs, dangling\n   citations, and missing edge cases (`doctrine\u002Fdiscovery-rigor.md`'s\n   self-critique pass, applied to the assembled bundle rather than a diff).\n   **Declared scoping (`proportionality`):** this pass is inline, not a\n   Discovery-Rigor fan-out — the Draft bundle gets the heavyweight lens\n   fan-out at `\u002Fspec-kickoff` activation, so a fan-out here would spend the\n   rigor budget twice (D-7); the lighter inline pass is the proportional form\n   where a human review still follows. **Disposition every finding — never\n   silently drop one:** either fix it in place in the bundle, or surface it to\n   the human as an open question in the read-through summary below. A pass\n   that cannot complete (it errors) is surfaced as an erroring pass, never\n   treated as a clean one.\n\n   **Enumeration cross-check (REQ-E1.2).** In the same pass, flag every\n   enumerated count and corpus claim in the bundle, and either verify it\n   against the surface it enumerates or convert it to a decided rule, per\n   `spec-format`'s *Decided rules over enumerated claims*. Drafting is where\n   the count is born.\n\n   Then present the read-through as a projection, never the assembled bundle\n   (`interaction-style`, the arbitration): the bundle on disk is the artifact;\n   the turn carries a bounded excerpt (the goal and the section headings with\n   counts), the self-critique dispositions as counts plus the\n   open questions surfaced to the human (an erroring pass named as such,\n   never counted as clean), and the delta-plus-open summary, with the full\n   disposition list one request away.\n   Run `scripts\u002Fspec-validate.sh \u003Croot>\u002F\u003Cspec>` when present and executable\n   (findings are warnings on Draft: surface them, fix structural ones,\n   let the human defer judgment ones); validator absent: note it and\n   continue — authoring is a graceful-degradation path (REQ-K1.7), and\n   `\u002Fspec-kickoff` enforces before anything executes.\n\n**Data hygiene throughout (REQ-D1.6):** no secrets, credentials, internal\nhostnames, or sensitive operational detail in any committed artifact — spec\nfiles, Sources entries, archived observations. Seeds may contain them;\ncommitted prose neutralizes them.\n\n## Completion\n\n1. **Write the bundle** at `\u003Croot>\u002F\u003Cspec>\u002F` in the spec worktree (plus the\n   `_observations` consumption writes — fragment moves into `archive\u002F` and\n   any frozen-legacy in-place annotations — when entries were consumed).\n2. **Neutralize machine-local references (REQ-D1.1, REQ-D1.2, D-4).** Before\n   committing, rewrite every `[[name]]` memory-link token in would-be-committed\n   spec prose into plain prose plus a `## Sources` pointer. A `[[name]]` link\n   resolves only against the authoring session's private memory store, never\n   for a reader of the committed bundle, so state the fact in prose and cite the\n   source: a recorded observation carries a fragment UID and is cited as\n   `obs:\u003Cuid>` (the Observation citation kind — see Archive-on-consume above),\n   while any other machine-local reference — including an unconsumed frozen\n   legacy line, which has no UID — becomes a `## Sources` entry naming the\n   source. When the prose must *mention* the token syntax itself (a spec\n   about this rule does), wrap the mention in an inline code span (`` `[[name]]` ``)\n   so it reads as documentation, not a live link. This is mechanically\n   backstopped: `check:memory-links` (`scripts\u002Fcheck-memory-links.sh`, under\n   `mise run check`) flags any bare `[[name]]` token in a committed spec file, so a draft that\n   skips this step fails CI rather than shipping an unresolvable reference.\n3. **Commit** (D-41) when `commit_on_draft` is true: one commit on\n   `planwright\u002F\u003Cspec>\u002Fspec` containing the four files and the\n   `_observations` consumption writes, message `feat(spec): draft specs\u002F\u003Cspec> bundle`\n   (extend mode: `feat(spec): extend specs\u002F\u003Cspec>, \u003Csummary>`). Rewriting\n   the spec branch is a human gate (`doctrine\u002Fhuman-gates.md`). Opt-out\n   set: leave the work uncommitted and say so explicitly.\n4. **Hand off.** Report: the bundle path and branch, validator outcome,\n   seeds consumed (and archived), fold-detection outcome, and the next step —\n   `\u002Fspec-kickoff specs\u002F\u003Cspec>` for the walkthrough and sign-off.\n   - Optionally recommend `\u002Fspec-walkthrough specs\u002F\u003Cspec>` for an unaided,\n     plain-language read before sign-off (REQ-F1.1, REQ-F1.2, D-11) — a\n     suggestion only, never a step this skill performs.\n\n## Maintenance\n\nAfter the run completes (or halts), compare these instructions against the\nresolved doctrine docs listed above (REQ-B3.2, D-42) — especially\n`spec-format` (file conventions, citation kinds, status lifecycle) and\n`interaction-style`. If a concept this skill names has changed meaning,\ngained or lost a step, or moved between docs, record a one-line drift\nobservation through the shared helper (`scripts\u002Fobs-record.sh --slug\nskill-drift --scope \u003Crepo> --text 'skill-drift(spec-draft): \u003Cwhat>'` — the\nentry text keeps the `skill-drift(...)` prefix) and commit the fragment as\nits own chore commit, per REQ-B3.2 \u002F D-42; surface a non-zero helper exit\nrather than silently dropping the observation, and tell the user what\ndrifted. In repositories without `specs\u002F`, surface the drift to the user\ninstead of recording it. Do not edit this skill or the doctrine docs to\nresolve the drift; the accumulator's canonical reader (`\u002Fspec-draft`) owns\nfolding drift into spec amendments.\n","# \u002Fspec-draft\n\nThe authoring entry point of the planwright pipeline (REQ-B1.1): a Socratic,\ninteractive elicitation that turns an idea plus its seed material into a\ncompliant four-file bundle at `\u003Croot>\u002F\u003Cspec>\u002F`, Status Draft, committed on the\nspec branch. Drafting ends where comprehension begins: `\u002Fspec-kickoff` walks\nthe Draft to sign-off and flips it Ready. This skill never pushes, never\nopens a PR, and never flips a status to Ready — sign-off is a human gate\n(`doctrine\u002Fhuman-gates.md`) it has no business near.\n\n## Doctrine\n\nResolve and read the manifest's rule docs below via the rule-doc resolution\nconvention (`scripts\u002Fresolve-rule-doc.sh \u003Cdoc-name>` or the documented\n`PLANWRIGHT_ROOT`\u002F`CLAUDE_PLUGIN_ROOT` chain), per\n`doctrine\u002Finstruction-hygiene.md`: `run-start` entries before work begins,\n`point-of-use` entries at the step each names, so no bundle write happens\nbefore `spec-format` loads. Their definitions govern wherever this skill names\na concept. A doc that does not resolve, at run start or its point of use,\nhalts with a clear message naming it and the chain consulted (REQ-K1.7: a\nclear message is the graceful arm); `decision-domains` alone degrades\ninstead, as Design step 3 says.\n\nDoctrine: run-start interaction-style\nDoctrine: run-start research-rigor\nDoctrine: run-start security-posture\nDoctrine: run-start proportionality\nDoctrine: point-of-use spec-format (elicitation start — conventions + the bundle write)\nDoctrine: point-of-use engineering-decisions (the design phase)\nDoctrine: point-of-use customization-boundary (the design-phase capability-vs-style call)\nDoctrine: point-of-use autopilot-reflex (the altitude gate, Design step 3)\nDoctrine: point-of-use decision-domains (the design-phase catalog walk)\n\n## Pre-flight\n\n1. **Parse arguments.** `$ARGUMENTS` carries the proposed feature name —\n   free-form idea text by design (the name is a hint, D-22) — and optionally\n   `--extend \u003Cspec>` (extend mode on an existing bundle; alias `specs\u002F\u003Cspec>`,\n   one trailing slash allowed).\n   The feature name is not used directly: the skill derives the **spec\n   identifier** (`\u003Cspec>`) from it, and that derived identifier is what\n   appears in paths, branch names, and commands. Validate the derived\n   identifier (and any identifier a seed or `--extend` proposes) against the\n   anchored, full-string pattern `^[a-z0-9][a-z0-9-]*$`, maximum length 64\n   (REQ-A1.8), never `flight`, **before** any such use.\n   When the feature name is not already a conforming identifier, propose a\n   conforming kebab-case variant and ask; nothing non-conforming is ever\n   interpolated. No name given: elicit the idea first (seed gathering\n   below) and propose a name from it. Resolve `\u003Croot>` and its posture per\n   `docs\u002Fspec-location.md`; outside `same-repo`, its table governs\n   `\u003Croot>\u002F\u003Cspec>`, the git steps and walkthrough suggestion below. When\n   `--extend \u003Cspec>` is present,\n   additionally\n   verify the target: `\u003Croot>\u002F\u003Cspec>\u002Frequirements.md` must exist and its\n   Status must be non-terminal. A nonexistent target gets a clear message\n   listing the specs that do exist; a Retired or Superseded target is\n   refused per the extend-mode terminal rule, up front rather than after\n   elicitation starts.\n2. **Altitude routing (inception REQ-J1.2, D-16).** Pitch-shaped input\n   (independently ownable tracks, no candidate home repository, three or\n   more discipline domains, or a pitch-form document) sits above a spec:\n   recommend `\u002Finception` with a one-line reason, drafting here the other\n   option. Recommend only, never route; a decline drafts normally.\n3. **Detect the git state.** Not a git repository: degrade\n   per REQ-K1.7 — say so up front, elicit and write the bundle in place, and\n   skip every branch\u002Fworktree\u002Fcommit step below, surfacing at the end what\n   was skipped and why. No remote configured: irrelevant here; note it only\n   so the human knows `\u002Fspec-kickoff`'s push step will degrade.\n4. **Read the config.** `commit_on_draft` from `config\u002Fdefaults.yml`\n   overridden by `\u003Crepo>\u002F.claude\u002Fplanwright.local.yml` (local wins). Default\n   `true`; an absent, unreadable, or malformed config file falls back to the\n   default with a one-line warning surfaced immediately at this step — before\n   any fallback-driven action (such as the auto-commit) can fire — and\n   repeated in the handoff (REQ-K1.7).\n5. **Resolve the working location** (D-44, graceful in every starting state).\n   The spec branch is `planwright\u002F\u003Cspec>\u002Fspec` (the reserved namespace the\n   `tasks-pr-sync` hook no-ops on); the spec worktree is\n   `\u003Crepo>\u002F.claude\u002Fworktrees\u002F\u003Cspec>-spec` (D-37 placement; the directory name\n   disambiguates the literal branch suffix `spec`, which would collide across\n   specs, while staying open to hand-launch `claude --worktree \u003Cspec>-spec`).\n   - **Already in the spec's own worktree:** proceed. Dirty or diverged\n     state: surface it and ask before touching anything — never auto-stash,\n     auto-commit, or clean.\n   - **In the main checkout or an unrelated worktree:** if the spec worktree\n     exists, do not work here — print the re-open hand-launch\n     (`claude --worktree \u003Cspec>-spec`) and stop. If the branch exists but the\n     worktree was pruned, recreate the worktree from the branch (native\n     mechanics below). If neither exists, create them: worktree via Claude\n     Code's native mechanism (EnterWorktree — never raw `git worktree`,\n     D-37), then `git switch -c planwright\u002F\u003Cspec>\u002Fspec` inside it, branched\n     from the current main view.\n   - Worktree\u002Fbranch resolution happens after the name is final — which for\n     a fresh idea may be after seed gathering and fold-detection have run\n     (both are read-only against the existing checkout).\n\n## Seed gathering (REQ-B1.2, REQ-B1.4)\n\nCollect the framing inputs before asking the human a single elicitation\nquestion; seeds answer questions the human would otherwise repeat.\n\n1. **The invocation itself** — whatever idea, links, or files came with the\n   prompt.\n2. **Pending notes** — files under `\u003Croot>\u002F_pending\u002F`. Read them; ask which\n   apply if more than one plausibly does. Graduated venture seeds among them\n   come through `\u003Cplanwright-root>\u002Fscripts\u002Finception-seed-read.sh \u003Croot>`\n   (inception REQ-J1.1); follow its `note` line.\n3. **The observations accumulator** — the live fragments under\n   `\u003Croot>\u002F_observations\u002Fentries\u002F` plus the frozen legacy\n   `opportunities.md`'s unconsumed lines, read as **one candidate set** and\n   mined as a first-class seed source (D-23; this skill is its canonical\n   reader, REQ-H1.6; `mise run obs:log` renders the chronological view). An\n   `entries\u002F` fragment already bearing a `Consumed-by:` line is consumed,\n   not a candidate — complete its archive move (below) rather than\n   re-mining it, and skip-and-warn any grammar-invalid file rather than\n   silently dropping it. Read every candidate; select the ones relevant to\n   the feature being drafted; present the selection to the human (selector\n   with the relevant set pre-marked) so nothing is consumed silently.\n4. **The venture drop** — `\u003Cplanwright-root>\u002Fscripts\u002Finception-registry.sh drop-read`\n   (inception REQ-J1.8); follow its `note` line.\n5. **Transcripts and documents** the human offers.\n\nAn absent `\u003Croot>\u002F_pending\u002F`, fragment directory, legacy log, venture drop,\nor root directory entirely (a first-run repo) is not an error:\nnote what was absent and proceed with the seeds that exist.\n\nEvery identifier a seed proposes (a spec name, a path segment) is\nre-validated against REQ-A1.8 at consumption, before any interpolation —\naccumulator contents are unscreened input. Record every seed actually used:\neach becomes a `## Sources` entry in `requirements.md`, and the REQs and\nD-IDs it framed cite it (the meta-spec's citation kinds; `drafting-session\ndecision (\u003Cdate>)` covers choices made live in the session that mint no\nD-ID).\n\n**Pin altitude seed claims (REQ-H1.1).** While gathering seeds, extract every\nexplicit statement about the deliverable's *nature* — the seed-claim trigger\nclass `doctrine\u002Fautopilot-reflex.md` names (\"that's a doctrine gap\", \"this is\na first-class concern\", \"we keep doing X manually\"). Each is an altitude\nassertion the elicitation must reconcile against, not a throwaway phrase, and\nit is easy to under-weight in the rush toward mechanism. Record each pinned\nclaim as a `## Sources` entry in `requirements.md` so the altitude signal is\n**bundle-local** — the\nREQ-H1.3 kickoff check reads it from the bundle, never from drafting-session\nmemory. A pinned claim is one of the two altitude trigger classes; when a\ntrigger fires, the firing rule in Elicitation resolves the altitude before the\ndesign phase.\n\n**Archive-on-consume.** When the bundle is written, consume each mined\nentry through the shared helper `scripts\u002Fobs-consume.sh` (resolved under\nthe planwright root) — never by hand-composing paths or annotations. A\nfragment is consumed by UID: `scripts\u002Fobs-consume.sh --uid \u003Cuid> --spec\n\u003Cspec>` writes the `Consumed-by: specs\u002F\u003Cspec> (\u003Cdate>)` line inside the\nfragment and moves it from `entries\u002F` to `archive\u002F` with its filename\npreserved (annotate first, move second; idempotent on re-run, and it\ncompletes a crashed half-consume found still in `entries\u002F`). A frozen\nlegacy line is consumed in place: `scripts\u002Fobs-consume.sh --legacy --line\n'\u003Cexact line>' --spec \u003Cspec>` annotates the line where it sits. Surface a\nnon-zero helper exit — an unknown UID, an ambiguous duplicate-UID match\n(named, never silently picked), a refused argument — rather than papering\nover it. Unconsumed entries stay byte-for-byte; consumption moves content\nverbatim (write-time hygiene screened it when it was recorded, and the\nmove implies no re-screen — REQ-D1.2). Cite a consumed fragment as\n`obs:\u003Cuid>` in the bundle's `## Sources` entry (the UID survives the\narchive move, so the citation never dangles). The consume commits ride the\nspec branch and land on main with the spec PR, keeping them one revert\nfrom undone. The accumulator-taxonomy doctrine is the canonical home of\nthis drain ritual; this section applies it, not defines it.\n\n## Fold-detection (REQ-B1.3, D-21, D-22)\n\nRuns on **every** invocation, regardless of the feature name — the name is a\nhint, not a command. Skipped only when `--extend` already named the target.\n\n1. Scan every existing spec under `\u003Croot>` (any non-terminal status: Draft,\n   Ready, Active, Done). Read each bundle's `requirements.md` Goal and Scope\n   sections — bounded by design; the overlap signal lives in goal\u002Fscope. A malformed bundle (missing\n   `requirements.md`, unparseable header) is skipped with a notice naming\n   it; the scan never halts the session over someone else's broken bundle\n   (REQ-K1.7 — the validator owns reporting it).\n2. Judge semantic overlap between the new idea and each scanned spec: same\n   problem domain, same external interface, same decision space.\n3. On overlap, check D-21's spin-new triggers: the new idea introduces a new\n   external interface; is independently ownable; forces decisions orthogonal\n   to the bundle's domain; or would push the bundle past \"one feature a\n   reader holds in their head\".\n4. **Overlap and no trigger fires:** surface an extend recommendation —\n   a selector naming the overlapping spec, why it overlaps, with **extend as\n   the recommended option** and spin-new as the alternative. The human\n   decides. Never auto-fold; never silently obey the name over a clear\n   overlap.\n5. No overlap, or a trigger fires: proceed as a new bundle, noting in one\n   line what was scanned and why nothing folded.\n\n### Extend mode\n\nEntered via `--extend \u003Cspec>` or the human accepting the recommendation.\nExtend mode follows the target bundle's declared `Format-version:`\n(invariant-tasks D-7): a v1 target keeps every v1 convention unchanged —\nnew task blocks join `## Forward plan`, the v1 state sections stay — while\na v2 target takes the v2 shape (new blocks join `## Tasks` in dependency\norder; no placement sections or state annotations are ever written to it),\nand a v3 target takes that shape plus the optional `Repository:` field (a\nv2 target whose extension adds one bumps its declaration to 3);\nan unparseable target `Format-version:` is refused — fail closed, never\nthe v1 conventions (D-7).\nOperates on the existing bundle per the meta-spec's stable-ID discipline:\n\n- **Append, never renumber.** New REQs and D-IDs continue the existing ID\n  space; dotted task ids insert between existing tasks.\n- **Supersede what changes meaning.** A changed requirement or decision mints\n  a new ID adjacent to the old, old marked `Superseded-by`; bodies of\n  superseded records are never edited (D-20).\n- **Grow `test-spec.md`** with entries for every new REQ; **re-sync\n  `tasks.md`** (new task blocks per the declared version above, dependency\n  lines updated); **append a dated Changelog entry** describing the\n  extension.\n- **Reopen cycle (REQ-A3.1):** extending a Done bundle flips its stored\n  Status to Draft on all four headers — a v1 bundle stores Done, so the\n  write is Done→Draft; a v2 bundle derives Done over a stored Ready, so\n  the write is Ready→Draft — and the scoped kickoff of the delta flips it\n  back to Ready, the delta's first dispatch deriving Active. Extending an\n  Active bundle leaves its stored status untouched — the delta is Draft\n  content inside it, and `\u002Fspec-kickoff`'s delta re-walkthrough\n  is the sign-off path; say so in the handoff. Retired and Superseded are\n  terminal: refuse, suggesting a new bundle citing the old as a Source.\n- Extension work happens on the spec's own branch\u002Fworktree, same as a fresh\n  draft.\n\n## Elicitation\n\nSix phases, each governed by the interaction-style rules: show the progress\nindicator (`[\u003Cphase> \u003Cn>\u002F6]`), work in small bites, present decisions as\nselectors with a recommendation, and end each phase with the running summary\nin delta-plus-open form: the decisions since the previous summary, their\none-line rationale, and what remains open, never a restatement of everything\nso far (`interaction-style`'s *Running summary* rule under the turn\u002Fartifact\narbitration; the bundle on disk is the cumulative record). Each such\nprojection (a phase summary, the read-through below) is mirrored into the\nstructured decision\u002Ftranscript log as a `turn` record (D-19). Per the phase\nre-anchor (`doctrine\u002Fautopilot-reflex.md`, REQ-H1.2), the summary also\n**restates the claimed altitude and flags any drift** between the claim and\nwhat the elicitation is currently producing (\"the seed claimed doctrine; the\nlast phase produced only mechanism tasks\"). The restatement is cheap; its\nabsence is how a session silently slides altitude. Before\nphase 1, resolve and read `spec-format` (its point-of-use read): the\nmeta-spec defines every structural convention referenced here and governs\nthe Completion bundle write; follow it exactly so the bundle passes the\nvalidator the first time.\n\n1. **Goal & scope.** The problem, the one-paragraph goal, in-scope \u002F\n   out-of-scope lists. Elicit what the feature must *not* do — out-of-scope\n   entries prevent more drift than REQs do.\n2. **Requirements.** Thematic REQ groups (`## REQ-\u003CGroup> — \u003Ctheme>`), each\n   requirement a single SHALL\u002FMUST bullet with a stable ID and a citation.\n   Derive candidate REQs from the seeds and goal, present per group for\n   correction; the human supplies judgment, not formatting.\n3. **Design.** **Altitude gate first (REQ-H1.1).** Resolve and read\n   `autopilot-reflex` now (its point-of-use read). Before designing any\n   mechanism, check whether an altitude trigger has fired — a pinned seed\n   claim (seed gathering above) or a mid-flow signal surfaced during\n   elicitation (a recurring capability-vs-style call, an \"is this even core?\"\n   hesitation, a mechanism acquiring rules that read like doctrine): the two\n   trigger classes `doctrine\u002Fautopilot-reflex.md` defines. If one has fired,\n   resolve the deliverable's altitude **now**, and record the call as an early\n   **altitude D-ID** cited from the bundle's goal (the trigger-scoped altitude\n   record the doctrine requires — a conversational resolution with no artifact\n   can be pencil-whipped, so the D-ID is what the REQ-H1.3 kickoff check\n   verifies). Designing first and retrofitting the altitude is how a doctrine\n   deliverable ends up specced as a one-repo script. No trigger fired: no\n   record is required (per `proportionality`, the ceremony is scoped to the\n   specs that exhibited the risk) — proceed. Then resolve and read\n   `engineering-decisions` (its point-of-use read; it governs this phase's\n   recommendations) and record, for each load-bearing choice, a D-ID with all\n   three fields\n   (Decision \u002F Alternatives considered \u002F Chosen because). This phase fires\n   Research Rigor triggers (new dependency, unfamiliar domain,\n   security-touching pattern, version-sensitive API, mature-project\n   comparison): research before recommending, cite what was consulted.\n   **Capability-vs-style call:** when a choice is whether a preference belongs\n   in core or in an adopter\u002Fteam overlay, resolve, read, and apply\n   `customization-boundary` (its point-of-use read) — does\n   the general *capability* land in core as an opt-in, default-preserving config\n   knob, while the specific *value\u002Fstyle* stays in an overlay? Default tilt is\n   overlay when in doubt; a preference graduates to a core knob only with\n   drain-loop evidence that it generalizes.\n   **Builder hook point:** walk the decision-domains catalog for domains the\n   feature touches; flag any the spec touches but does not decide, and\n   escalate stake-bearing decisions (authn\u002Fz, data modeling, security\n   posture, integration surface) as explicit design decisions — never\n   auto-default them. Walk the catalog's prose seed (`doctrine\u002Fdecision-domains.md`,\n   the normative full text) **and** any adopter\u002Fteam\u002Fmachine-local additions via\n   the merged path `scripts\u002Fresolve-catalog.sh decision-domains`, so overlay\n   domains apply too rather than a single-layer read (REQ-D1.1). When the\n   planwright builder skill exists it plugs in here (stack detection, guard\n   recommendations); until then the catalog walk is the manual form and a\n   missing catalog doc degrades to a one-line notice. Hook point and catalog\n   scan, not a dependency: drafting works without the builder.\n4. **Tasks.** Decompose into task blocks with the five definition fields\n   (Deliverables \u002F Done when \u002F Dependencies \u002F Citations \u002F Estimated effort);\n   IDs stable from birth. `Done when:` conditions an agent can evaluate.\n   All blocks land in a single `## Tasks` section in dependency order, and\n   the three human-payload sections (`## Awaiting input`, `## Deferred`,\n   `## Out of scope`) are written with `(none yet)` placeholders — no\n   placement sections and no state annotations: a block carries its five\n   definition fields and nothing else, because execution state is derived,\n   never authored (invariant-tasks D-2). Dependency edges are load-bearing\n   (orchestration selection reads them): ask about ordering the human knows\n   and the text doesn't show — in particular, tasks whose deliverables gate\n   other tasks' verification (CI, guards, validators) should carry explicit\n   edges from the tasks they protect, or they dispatch too late. When the\n   elicitation surfaces a second repository (a task whose code lives outside\n   the bundle's work repository), offer that task the optional `Repository:`\n   field: one alias per block, resolved only through the machine-local\n   work-repository registry, never a path or URL (`spec-format`\n   *Format-version 3*); work spanning repositories splits into tasks joined\n   by dependency edges.\n5. **Test-spec.** Every REQ pinned to at least one verification path, tagged\n   `[test]` \u002F `[manual]` \u002F `[design-level]` \u002F `[Gherkin]` (mixed:\n   `[test + manual]`). Prefer `[test]` where automation is honest; say which\n   CI runs it.\n6. **Review & validate.** Assemble all four files (shared header block,\n   `**Status:** Draft`, `**Last reviewed:** \u003Cdate>`, `**Format-version:** 2`\n   (`**Format-version:** 3` only when some task names a repository), and —\n   fixed vocabulary, on all four files (D-5) — the canonical pointer line\n   `**Execution:** derived — see the status render`).\n\n   **Self-critique pass (REQ-C1.1, D-7).** Before the validator runs and\n   before commit, run one scoped self-critique lens pass over the freshly\n   assembled bundle: assume the draft is incomplete and re-read it for gaps,\n   contradictions, uncited claims, mis-scoped or unverifiable REQs, dangling\n   citations, and missing edge cases (`doctrine\u002Fdiscovery-rigor.md`'s\n   self-critique pass, applied to the assembled bundle rather than a diff).\n   **Declared scoping (`proportionality`):** this pass is inline, not a\n   Discovery-Rigor fan-out — the Draft bundle gets the heavyweight lens\n   fan-out at `\u002Fspec-kickoff` activation, so a fan-out here would spend the\n   rigor budget twice (D-7); the lighter inline pass is the proportional form\n   where a human review still follows. **Disposition every finding — never\n   silently drop one:** either fix it in place in the bundle, or surface it to\n   the human as an open question in the read-through summary below. A pass\n   that cannot complete (it errors) is surfaced as an erroring pass, never\n   treated as a clean one.\n\n   **Enumeration cross-check (REQ-E1.2).** In the same pass, flag every\n   enumerated count and corpus claim in the bundle, and either verify it\n   against the surface it enumerates or convert it to a decided rule, per\n   `spec-format`'s *Decided rules over enumerated claims*. Drafting is where\n   the count is born.\n\n   Then present the read-through as a projection, never the assembled bundle\n   (`interaction-style`, the arbitration): the bundle on disk is the artifact;\n   the turn carries a bounded excerpt (the goal and the section headings with\n   counts), the self-critique dispositions as counts plus the\n   open questions surfaced to the human (an erroring pass named as such,\n   never counted as clean), and the delta-plus-open summary, with the full\n   disposition list one request away.\n   Run `scripts\u002Fspec-validate.sh \u003Croot>\u002F\u003Cspec>` when present and executable\n   (findings are warnings on Draft: surface them, fix structural ones,\n   let the human defer judgment ones); validator absent: note it and\n   continue — authoring is a graceful-degradation path (REQ-K1.7), and\n   `\u002Fspec-kickoff` enforces before anything executes.\n\n**Data hygiene throughout (REQ-D1.6):** no secrets, credentials, internal\nhostnames, or sensitive operational detail in any committed artifact — spec\nfiles, Sources entries, archived observations. Seeds may contain them;\ncommitted prose neutralizes them.\n\n## Completion\n\n1. **Write the bundle** at `\u003Croot>\u002F\u003Cspec>\u002F` in the spec worktree (plus the\n   `_observations` consumption writes — fragment moves into `archive\u002F` and\n   any frozen-legacy in-place annotations — when entries were consumed).\n2. **Neutralize machine-local references (REQ-D1.1, REQ-D1.2, D-4).** Before\n   committing, rewrite every `[[name]]` memory-link token in would-be-committed\n   spec prose into plain prose plus a `## Sources` pointer. A `[[name]]` link\n   resolves only against the authoring session's private memory store, never\n   for a reader of the committed bundle, so state the fact in prose and cite the\n   source: a recorded observation carries a fragment UID and is cited as\n   `obs:\u003Cuid>` (the Observation citation kind — see Archive-on-consume above),\n   while any other machine-local reference — including an unconsumed frozen\n   legacy line, which has no UID — becomes a `## Sources` entry naming the\n   source. When the prose must *mention* the token syntax itself (a spec\n   about this rule does), wrap the mention in an inline code span (`` `[[name]]` ``)\n   so it reads as documentation, not a live link. This is mechanically\n   backstopped: `check:memory-links` (`scripts\u002Fcheck-memory-links.sh`, under\n   `mise run check`) flags any bare `[[name]]` token in a committed spec file, so a draft that\n   skips this step fails CI rather than shipping an unresolvable reference.\n3. **Commit** (D-41) when `commit_on_draft` is true: one commit on\n   `planwright\u002F\u003Cspec>\u002Fspec` containing the four files and the\n   `_observations` consumption writes, message `feat(spec): draft specs\u002F\u003Cspec> bundle`\n   (extend mode: `feat(spec): extend specs\u002F\u003Cspec>, \u003Csummary>`). Rewriting\n   the spec branch is a human gate (`doctrine\u002Fhuman-gates.md`). Opt-out\n   set: leave the work uncommitted and say so explicitly.\n4. **Hand off.** Report: the bundle path and branch, validator outcome,\n   seeds consumed (and archived), fold-detection outcome, and the next step —\n   `\u002Fspec-kickoff specs\u002F\u003Cspec>` for the walkthrough and sign-off.\n   - Optionally recommend `\u002Fspec-walkthrough specs\u002F\u003Cspec>` for an unaided,\n     plain-language read before sign-off (REQ-F1.1, REQ-F1.2, D-11) — a\n     suggestion only, never a step this skill performs.\n\n## Maintenance\n\nAfter the run completes (or halts), compare these instructions against the\nresolved doctrine docs listed above (REQ-B3.2, D-42) — especially\n`spec-format` (file conventions, citation kinds, status lifecycle) and\n`interaction-style`. If a concept this skill names has changed meaning,\ngained or lost a step, or moved between docs, record a one-line drift\nobservation through the shared helper (`scripts\u002Fobs-record.sh --slug\nskill-drift --scope \u003Crepo> --text 'skill-drift(spec-draft): \u003Cwhat>'` — the\nentry text keeps the `skill-drift(...)` prefix) and commit the fragment as\nits own chore commit, per REQ-B3.2 \u002F D-42; surface a non-zero helper exit\nrather than silently dropping the observation, and tell the user what\ndrifted. In repositories without `specs\u002F`, surface the drift to the user\ninstead of recording it. Do not edit this skill or the doctrine docs to\nresolve the drift; the accumulator's canonical reader (`\u002Fspec-draft`) owns\nfolding drift into spec amendments.\n",{"name":5,"description":24,"argument-hint":25},"Interactively elicit a four-file spec bundle (requirements.md, design.md, tasks.md, test-spec.md) at Status Draft on the spec's own branch, mining seed sources (pending notes, the observations log, transcripts) and citing them. Runs fold-detection against existing specs on every invocation and surfaces an extend recommendation instead of spinning a duplicate bundle. Commits the completed bundle (commit_on_draft opt-out); never pushes, never flips a spec to Ready.\n","\u003Cfeature-name> [--extend \u003Cspec>]","main","4e6ff2890011c9b5c4cf4ce33e05a037cc8996a6","skills\u002Fspec-draft",0,"https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright","https:\u002F\u002Fgithub.com\u002Finkatze","https:\u002F\u002Fwww.inkatze.com","Software Engineer | Open Source n00b","2026-11-15 05:06:45",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add inkatze\u002Fplanwright --skill spec-draft",{"tool":41,"command":42},"bunx","bunx skills add inkatze\u002Fplanwright --skill spec-draft",{"tool":44,"command":45},"pnpm","pnpm dlx skills add inkatze\u002Fplanwright --skill spec-draft","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fspec-draft\u002FSKILL.md",true,[],[50,56,62,67,74,81],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M75K7QKF8AFQ3JAJ1T67HT3F","demo","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript-invocation\u002Fsh-runs-bash\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M75K7NKAW0V15FAVSWPVV4NZ","usage","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript-invocation\u002Fclean\u002Fskills\u002Fusage\u002FSKILL.md",[],[],{"skillNo":63,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M75K7MD8DA50HDQ1NSTZCVXM","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript-invocation\u002Fclean\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M75K7GFAKYN7X3QZ385P3V7H","tower","The front door: a standing conversational session that takes any ask about the repository in plain language, answers questions, and routes work that changes the repository per request onto visual flight (an isolated worker that lands a draft PR) or instrument flight (the spec pipeline), stating its grounds, with status on demand. Use it to start work without writing a spec first. It never edits the repository itself, never merges, never marks a PR ready, and never starts a kickoff.","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Ftower\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M75K7AVKFPCAKKX8BBK2HWWN","spec-walkthrough","Render a spec bundle (or a chosen slice) into a plain-language, didactic comprehension artifact a human reads and judges for themselves: an unaided cold read before kickoff, re-orientation mid-execution, or onboarding to a finished or abandoned spec. Standalone and strictly read-only: it renders any status, never edits, signs off, mutates the pipeline, or delivers a verdict of its own. The independent complement to \u002Fspec-kickoff's guided dialogue.","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fspec-walkthrough\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M75K6XYRVCS69Z79MF4N71GV","self-review","Gate-wired review pass of the current feature branch: Discovery Rigor fan-out, multi-pass validation, and act-then-review dispositions per the finding categorization. Standalone runs push and open or update a draft PR; pass --nested to stay local and return the audit record to the invoking skill.","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fself-review\u002FSKILL.md",[],[]]