[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HBVB6SVSMQPXBMWEWQ4J5M":3,"skill-same:01M6HBVB6SVSMQPXBMWEWQ4J5M":71},{"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":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":56,"updatedAt":57,"install":58,"resources":70},"01M6HBVB6SVSMQPXBMWEWQ4J5M","refine",null,"Mid-mission gap analysis: read the active mission's roadmap and briefs, surface what's missing or underspecified, converge on one gap, and append a NEW numbered work unit plus its full brief — strictly additive. Use when: refine, what are we missing, find gaps in the current mission, add the next unit. Never edits an existing brief or roadmap unit in place — that is \u002Fbrief N's job.","SyloRei\u002Fclaude-godmode","SyloRei","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5840195?v=4","01M6HBT6QSK7QM4DTVPNGARNP4","Andrey Prokofev","01M6HBT6WED1MEN8W7JYP412WE",3,"MIT","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Frefine\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000031","产品经理","PROFESSION","适用职业",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"godmode","mission","converge","briefs","unit","add","full","active","next","brief","roadmap","never","append","edit","write","read","work","Bash","analysis","2026-11-10 10:12:30",false,"---\nname: refine\ndescription: \"Mid-mission gap analysis: read the active mission's roadmap and briefs, surface what's missing or underspecified, converge on one gap, and append a NEW numbered work unit plus its full brief — strictly additive. Use when: refine, what are we missing, find gaps in the current mission, add the next unit. Never edits an existing brief or roadmap unit in place — that is \u002Fbrief N's job.\"\nuser-invocable: true\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash(gm=*), Bash(*godmode-state*)\n---\n\n# Refine\n\nThe **mid-mission gap-analysis** step of the planning spine. Where `\u002Fideate` is pre-mission and generative — exploring directions for the *next* mission before any charter exists — `\u002Frefine` is mid-mission and analytical: it works *inside* the active mission, reads what has already been planned, finds what's missing or underspecified, converges on one gap, and turns it into a buildable unit. It is the sibling of `\u002Fideate`, one step later in the lifecycle.\n\n`\u002Frefine` is **strictly additive**. It reads the active mission's roadmap and briefs, surfaces candidate gaps and improvements, converges on the one most worth doing next, and **appends** a new numbered work unit to the roadmap plus that unit's complete brief. It never edits or rewrites an existing brief or roadmap unit in place — in-place updates are delegated to `\u002Fbrief N`. This is the spine's gap-analysis seam: `\u002Fmission` → `\u002Fbrief N` → `\u002Fplan N` → `\u002Fbuild N` → `\u002Fverify N` → `\u002Fship`, with `\u002Frefine` feeding a new appended unit back to `\u002Fbrief`\u002F`\u002Fplan` whenever a gap is found.\n\nThe artifacts live in the **consumer's** repo, never in the plugin source, scoped to the **active mission**:\n\n- `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md` — the new unit is appended here (existing entries untouched).\n- `.planning\u002Fmissions\u002F\u003Cmission_id>\u002Fbriefs\u002FNN-name\u002FBRIEF.md` — the new unit's complete brief, in the same format `\u002Fbrief` produces.\n\n`\u003Cmission_id>` is the active mission's `NN-slug`, resolved from workflow state (`\"$gm\u002Fgodmode-state\" get mission_id`; see the helper-resolution note in Process), so `\u002Frefine` always operates on whatever mission is currently active. `.planning\u002FPROJECT.md` and `.planning\u002FSTATE.md` stay at the `.planning\u002F` root (project-global).\n\n---\n\n## Mission-scoped contract\n\n`\u002Frefine` is a mission-scoped skill. Unlike `\u002Fideate`, it does not run on a bare repo:\n\n- **Requires an active mission.** It resolves `mission_id` from workflow state and operates entirely within that mission. With no active mission it stops and points the user at `\u002Fmission` — it never scaffolds or invents a mission.\n- **Reads the whole mission before converging.** It surveys the active mission's roadmap and existing briefs to find gaps — not just the unit the user happens to be on.\n- **Strictly additive — never edits in place.** It appends a new unit and its brief. It never rewrites, renumbers, or edits an existing roadmap entry or brief. A gap *inside* an already-specified unit becomes either a new appended unit or is deferred to `\u002Fbrief N` (see below). Allocating a `mission_id` and resetting the work-unit counter remain `\u002Fmission`'s job alone — `\u002Frefine` does neither.\n\n---\n\n## Auto Mode\n\nAuto Mode suppresses **confirmation prompts** (\"proceed? \u002F shall I append the unit?\") — never the **gap-analysis questions** that decide *which* gap is worth doing next. Converging on the wrong gap appends a unit nobody needs, and `\u002Fbrief`\u002F`\u002Fplan`\u002F`\u002Fbuild` then spend real effort on it. So in **either** mode:\n\n- **Ask the consequential questions** — the ones whose answer materially changes which gap gets appended or how its scope is drawn (which gap matters most now, where the new unit's scope edges sit, hard constraints) AND that the roadmap \u002F existing briefs \u002F `.planning\u002FPROJECT.md` \u002F repo cannot answer. Auto Mode does not waive these; it just batches them.\n- **Assume the trivial** — for low-stakes gaps the context reasonably implies, pick a sensible default and record it under an **Assumptions** heading in the brief instead of asking.\n- Never ask what the roadmap or existing briefs already answer. Treat user course-corrections as normal input.\n\nAsk following the shared recommendation convention (`godmode:recommend-convention`) defined in `rules\u002Fgodmode-recommend.md`: **lead with a Recommended option** carrying a visible one-line rationale, then let the user override. A flat menu of equal gaps offloads the decision back onto the user — `\u002Frefine` is exactly where you owe the user your analysis, so say which gap you'd append and why:\n\n```\nWhich gap should the next unit close?\n\n  a) Add the missing error-path brief for the importer (Recommended — every\n     built unit covers the happy path, but unit 3's brief left malformed-input\n     handling unspecified, so \u002Fverify has nothing to check against)\n  b) A metrics surface — useful later, but no roadmap unit or brief calls for\n     it and it widens scope the mission deliberately kept narrow\n  c) Something else — name the gap you want the next unit to close\n\nPick a letter, or describe a different gap.\n```\n\nThe rationale is one line, concrete, and tied to the actual context (a specific roadmap entry, an underspecified brief, a stated constraint) — never a generic \"this is common.\"\n\n---\n\n## Process\n\n**Resolving the godmode helpers.** The `godmode-*` helpers live in the plugin install dir — **not** the consumer repo you're working in — so a bare `bin\u002Fgodmode-*` path fails from another project's working directory. Every `bash` block below resolves their location into `$gm` first (plugin mode → `$CLAUDE_PLUGIN_ROOT\u002Fbin`, manual install → `~\u002F.claude\u002Fbin`, in-repo → `.\u002Fbin`) and calls `\"$gm\u002Fgodmode-\u003Cname>\"`. Keep the resolver line; never call a helper by a bare relative path.\n\n### 1. Resolve the active mission\n\nFirst resolve which mission is active — every path below is scoped to it:\n\n```bash\ngm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\nmission_id=$(\"$gm\u002Fgodmode-state\" get mission_id)\n```\n\nIf `mission_id` is unset or empty, **stop**. Tell the user to run `\u002Fmission \u003Cname>` first — `\u002Frefine` analyzes an *existing* mission and never scaffolds or invents one.\n\n### 2. Read the mission and surface candidate gaps\n\nRead, for the active mission:\n\n- `.planning\u002Fmissions\u002F${mission_id}\u002FROADMAP.md` — the full numbered work-unit list and each entry's status.\n- `.planning\u002Fmissions\u002F${mission_id}\u002Fbriefs\u002F` — every existing `NN-name\u002FBRIEF.md`. These are the specs already captured.\n- `.planning\u002FPROJECT.md` — the project-global purpose and constraints the mission must satisfy.\n- The current workflow state, so you know where the user is:\n  ```bash\n  gm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\n  \"$gm\u002Fgodmode-state\" get mission_id\n  \"$gm\u002Fgodmode-state\" get active_unit\n  \"$gm\u002Fgodmode-state\" get status\n  ```\n\nWith the whole mission in view, surface the **candidate gaps and improvements**: outcomes the roadmap implies but no unit covers, briefs missing an error path or an edge case, constraints in `PROJECT.md` that nothing yet satisfies. Use the recommendation convention (above) to converge on the **one** gap most worth closing next. The rest stay noted but unbuilt.\n\n### 3. Derive the next unit number and directory name\n\nThe new unit takes the **next free number**: the maximum existing roadmap unit number **plus one**, zero-padded to two digits via `printf '%02d'` (the project convention: unit `3` → `03`, unit `12` → `12`). Derive a kebab-case `name` from the new unit's title — the same rule `\u002Fbrief` uses: lowercase, spaces and punctuation → single hyphens, trim leading\u002Ftrailing hyphens.\n\n```bash\n# mission_id from state (step 1).\ngm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\nmission_id=$(\"$gm\u002Fgodmode-state\" get mission_id)\nroadmap=\".planning\u002Fmissions\u002F${mission_id}\u002FROADMAP.md\"\n\n# MAX_UNIT = highest existing roadmap unit number (0 if the roadmap is empty).\n# Roadmap units are numbered table rows (\"| 23 | ... |\") or \"## N\" headings;\n# pull every leading unit number, take the largest. Default 0 when none exist.\nmax_unit=$(grep -Eo '^(\\| *|#+ *)[0-9]+' \"$roadmap\" 2>\u002Fdev\u002Fnull \\\n  | grep -Eo '[0-9]+' | sort -rn | head -1)\nmax_unit=${max_unit:-0}\n\nN=$((max_unit + 1))\nNN=$(printf '%02d' \"$N\")\nname=$(printf '%s' \"$UNIT_TITLE\" \\\n  | tr '[:upper:]' '[:lower:]' \\\n  | tr -cs 'a-z0-9' '-' \\\n  | sed -e 's\u002F^-\u002F\u002F' -e 's\u002F-$\u002F\u002F')\nbrief_dir=\".planning\u002Fmissions\u002F${mission_id}\u002Fbriefs\u002F${NN}-${name}\"\n```\n\nThe brief path is `${brief_dir}\u002FBRIEF.md`.\n\n### 4. Append the new unit to the roadmap\n\n**Append** the new numbered entry to `.planning\u002Fmissions\u002F${mission_id}\u002FROADMAP.md` — title plus its one-line outcome — at the end of the unit list. Every existing entry keeps its number, title, and status untouched. This is an Edit that adds a line; it is never a rewrite of the file's existing units.\n\n### 5. Write the new unit's complete brief\n\nWrite the full brief at `${brief_dir}\u002FBRIEF.md`, in the **same format `\u002Fbrief` produces** (see Artifact format below): **why** (the gap and the value closing it adds), **what** (explicit in-scope and out-of-scope lists), a **spec** of verifiable `AC-N` acceptance criteria, and **assumptions**. Because this is a brand-new unit, this is always a first-time Write — `\u002Frefine` never opens an existing brief to edit it.\n\n### 6. Record workflow state\n\nPoint the workflow at the new unit so `\u002Fgodmode` knows the next command:\n\n```bash\ngm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\n\"$gm\u002Fgodmode-state\" set active_unit \"$N\"\n\"$gm\u002Fgodmode-state\" set status \"unit appended — brief captured\"\n\"$gm\u002Fgodmode-state\" set next_command \"\u002Fplan $N\"\n```\n\n`\u002Frefine` does **not** allocate a `mission_id` and does **not** reset the work-unit counter — only `\u002Fmission` does that. It sets the three pointers above and nothing more.\n\n---\n\n## Strictly additive — what \u002Frefine never does\n\n`\u002Frefine` is append-only. To keep the boundary unambiguous:\n\n- It **never edits or rewrites** an existing brief or an existing roadmap unit in place. Existing entries keep their numbers, titles, statuses, and AC IDs.\n- A gap that lives *inside* an already-specified unit is **not** fixed by editing that unit. Either it becomes a **new appended unit** (when it is genuinely separable work), or it is **deferred to `\u002Fbrief N`** (when it is a refinement of unit `N`'s own spec). In-place brief updates are `\u002Fbrief N`'s job, never `\u002Frefine`'s.\n- It allocates no `mission_id` and resets no counter — those belong to `\u002Fmission`.\n\n---\n\n## Artifact format\n\n### `.planning\u002Fmissions\u002F\u003Cmission_id>\u002Fbriefs\u002FNN-name\u002FBRIEF.md`\n\nThe appended unit's brief uses the exact format `\u002Fbrief` produces:\n\n```markdown\n# Brief NN: [unit title]\n\n**Updated:** [YYYY-MM-DD]\n**Roadmap unit:** N — [one-line outcome from ROADMAP.md]\n\n## Why\n[The gap this unit closes — what's missing or underspecified in the mission,\nthe value closing it adds, and who benefits.]\n\n## What\n\n### In scope\n- [Concrete capability included.]\n\n### Out of scope\n- [Explicitly excluded — what this unit will NOT do.]\n\n## Spec — acceptance criteria\nEach criterion is verifiable (a clear trigger and observable result) and carries a stable **`AC-N`** label — these IDs are the references `\u002Fplan N` and `\u002Fverify N` use.\n\n- [ ] **AC-1:** [Returns \u002F renders \u002F writes ... when ...]\n- [ ] **AC-2:** [...]\n\n## Assumptions\n[Auto Mode: inferred defaults surfaced here. Otherwise omit or note open questions.]\n```\n\n---\n\n## Output\n\n\u003C!-- Output follows the in-skill output convention: godmode:output-convention — see rules\u002Fgodmode-output.md -->\n\nAfter writing, report:\n\n- The gap that was selected, and a one-line summary of why it won over the other candidate gaps surfaced.\n- The new unit's number `N` and the path of its appended brief `.planning\u002Fmissions\u002F\u003Cmission_id>\u002Fbriefs\u002FNN-name\u002FBRIEF.md`, confirming it was *appended* (the roadmap's existing units untouched).\n- The acceptance criteria, confirming each is verifiable.\n- In Auto Mode, the **Assumptions** that were made.\n- The workflow state set and the next step:\n\n> \"Unit N appended to the active mission and its brief captured. Run `\u002Fplan N` to break it into a tactical plan.\"\n\n---\n\n## Related\n\n- **\u002Fideate** — pre-mission sibling: explores directions for the *next* mission before any charter exists. `\u002Frefine` is its mid-mission counterpart, working inside the active mission.\n- **\u002Fbrief N** — owns in-place brief updates. A refinement of an existing unit's spec is delegated here; `\u002Frefine` only ever appends new units.\n- **\u002Fplan N** — next step: turns the appended unit's brief into a tactical plan plus verification.\n- **\u002Fgodmode** — reads the workflow state this skill records and tells the user the next command.\n\n**Spine:** `\u002Fmission` → `\u002Fbrief N` → `\u002Fplan N` → `\u002Fbuild N` → `\u002Fverify N` → `\u002Fship`. `\u002Frefine` is the mid-mission gap-analysis step: it reads the current mission, finds what's missing, and appends a buildable unit plus its brief that re-enters the spine at `\u002Fbrief`\u002F`\u002Fplan`.\n","# Refine\n\nThe **mid-mission gap-analysis** step of the planning spine. Where `\u002Fideate` is pre-mission and generative — exploring directions for the *next* mission before any charter exists — `\u002Frefine` is mid-mission and analytical: it works *inside* the active mission, reads what has already been planned, finds what's missing or underspecified, converges on one gap, and turns it into a buildable unit. It is the sibling of `\u002Fideate`, one step later in the lifecycle.\n\n`\u002Frefine` is **strictly additive**. It reads the active mission's roadmap and briefs, surfaces candidate gaps and improvements, converges on the one most worth doing next, and **appends** a new numbered work unit to the roadmap plus that unit's complete brief. It never edits or rewrites an existing brief or roadmap unit in place — in-place updates are delegated to `\u002Fbrief N`. This is the spine's gap-analysis seam: `\u002Fmission` → `\u002Fbrief N` → `\u002Fplan N` → `\u002Fbuild N` → `\u002Fverify N` → `\u002Fship`, with `\u002Frefine` feeding a new appended unit back to `\u002Fbrief`\u002F`\u002Fplan` whenever a gap is found.\n\nThe artifacts live in the **consumer's** repo, never in the plugin source, scoped to the **active mission**:\n\n- `.planning\u002Fmissions\u002F\u003Cmission_id>\u002FROADMAP.md` — the new unit is appended here (existing entries untouched).\n- `.planning\u002Fmissions\u002F\u003Cmission_id>\u002Fbriefs\u002FNN-name\u002FBRIEF.md` — the new unit's complete brief, in the same format `\u002Fbrief` produces.\n\n`\u003Cmission_id>` is the active mission's `NN-slug`, resolved from workflow state (`\"$gm\u002Fgodmode-state\" get mission_id`; see the helper-resolution note in Process), so `\u002Frefine` always operates on whatever mission is currently active. `.planning\u002FPROJECT.md` and `.planning\u002FSTATE.md` stay at the `.planning\u002F` root (project-global).\n\n---\n\n## Mission-scoped contract\n\n`\u002Frefine` is a mission-scoped skill. Unlike `\u002Fideate`, it does not run on a bare repo:\n\n- **Requires an active mission.** It resolves `mission_id` from workflow state and operates entirely within that mission. With no active mission it stops and points the user at `\u002Fmission` — it never scaffolds or invents a mission.\n- **Reads the whole mission before converging.** It surveys the active mission's roadmap and existing briefs to find gaps — not just the unit the user happens to be on.\n- **Strictly additive — never edits in place.** It appends a new unit and its brief. It never rewrites, renumbers, or edits an existing roadmap entry or brief. A gap *inside* an already-specified unit becomes either a new appended unit or is deferred to `\u002Fbrief N` (see below). Allocating a `mission_id` and resetting the work-unit counter remain `\u002Fmission`'s job alone — `\u002Frefine` does neither.\n\n---\n\n## Auto Mode\n\nAuto Mode suppresses **confirmation prompts** (\"proceed? \u002F shall I append the unit?\") — never the **gap-analysis questions** that decide *which* gap is worth doing next. Converging on the wrong gap appends a unit nobody needs, and `\u002Fbrief`\u002F`\u002Fplan`\u002F`\u002Fbuild` then spend real effort on it. So in **either** mode:\n\n- **Ask the consequential questions** — the ones whose answer materially changes which gap gets appended or how its scope is drawn (which gap matters most now, where the new unit's scope edges sit, hard constraints) AND that the roadmap \u002F existing briefs \u002F `.planning\u002FPROJECT.md` \u002F repo cannot answer. Auto Mode does not waive these; it just batches them.\n- **Assume the trivial** — for low-stakes gaps the context reasonably implies, pick a sensible default and record it under an **Assumptions** heading in the brief instead of asking.\n- Never ask what the roadmap or existing briefs already answer. Treat user course-corrections as normal input.\n\nAsk following the shared recommendation convention (`godmode:recommend-convention`) defined in `rules\u002Fgodmode-recommend.md`: **lead with a Recommended option** carrying a visible one-line rationale, then let the user override. A flat menu of equal gaps offloads the decision back onto the user — `\u002Frefine` is exactly where you owe the user your analysis, so say which gap you'd append and why:\n\n```\nWhich gap should the next unit close?\n\n  a) Add the missing error-path brief for the importer (Recommended — every\n     built unit covers the happy path, but unit 3's brief left malformed-input\n     handling unspecified, so \u002Fverify has nothing to check against)\n  b) A metrics surface — useful later, but no roadmap unit or brief calls for\n     it and it widens scope the mission deliberately kept narrow\n  c) Something else — name the gap you want the next unit to close\n\nPick a letter, or describe a different gap.\n```\n\nThe rationale is one line, concrete, and tied to the actual context (a specific roadmap entry, an underspecified brief, a stated constraint) — never a generic \"this is common.\"\n\n---\n\n## Process\n\n**Resolving the godmode helpers.** The `godmode-*` helpers live in the plugin install dir — **not** the consumer repo you're working in — so a bare `bin\u002Fgodmode-*` path fails from another project's working directory. Every `bash` block below resolves their location into `$gm` first (plugin mode → `$CLAUDE_PLUGIN_ROOT\u002Fbin`, manual install → `~\u002F.claude\u002Fbin`, in-repo → `.\u002Fbin`) and calls `\"$gm\u002Fgodmode-\u003Cname>\"`. Keep the resolver line; never call a helper by a bare relative path.\n\n### 1. Resolve the active mission\n\nFirst resolve which mission is active — every path below is scoped to it:\n\n```bash\ngm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\nmission_id=$(\"$gm\u002Fgodmode-state\" get mission_id)\n```\n\nIf `mission_id` is unset or empty, **stop**. Tell the user to run `\u002Fmission \u003Cname>` first — `\u002Frefine` analyzes an *existing* mission and never scaffolds or invents one.\n\n### 2. Read the mission and surface candidate gaps\n\nRead, for the active mission:\n\n- `.planning\u002Fmissions\u002F${mission_id}\u002FROADMAP.md` — the full numbered work-unit list and each entry's status.\n- `.planning\u002Fmissions\u002F${mission_id}\u002Fbriefs\u002F` — every existing `NN-name\u002FBRIEF.md`. These are the specs already captured.\n- `.planning\u002FPROJECT.md` — the project-global purpose and constraints the mission must satisfy.\n- The current workflow state, so you know where the user is:\n  ```bash\n  gm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\n  \"$gm\u002Fgodmode-state\" get mission_id\n  \"$gm\u002Fgodmode-state\" get active_unit\n  \"$gm\u002Fgodmode-state\" get status\n  ```\n\nWith the whole mission in view, surface the **candidate gaps and improvements**: outcomes the roadmap implies but no unit covers, briefs missing an error path or an edge case, constraints in `PROJECT.md` that nothing yet satisfies. Use the recommendation convention (above) to converge on the **one** gap most worth closing next. The rest stay noted but unbuilt.\n\n### 3. Derive the next unit number and directory name\n\nThe new unit takes the **next free number**: the maximum existing roadmap unit number **plus one**, zero-padded to two digits via `printf '%02d'` (the project convention: unit `3` → `03`, unit `12` → `12`). Derive a kebab-case `name` from the new unit's title — the same rule `\u002Fbrief` uses: lowercase, spaces and punctuation → single hyphens, trim leading\u002Ftrailing hyphens.\n\n```bash\n# mission_id from state (step 1).\ngm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\nmission_id=$(\"$gm\u002Fgodmode-state\" get mission_id)\nroadmap=\".planning\u002Fmissions\u002F${mission_id}\u002FROADMAP.md\"\n\n# MAX_UNIT = highest existing roadmap unit number (0 if the roadmap is empty).\n# Roadmap units are numbered table rows (\"| 23 | ... |\") or \"## N\" headings;\n# pull every leading unit number, take the largest. Default 0 when none exist.\nmax_unit=$(grep -Eo '^(\\| *|#+ *)[0-9]+' \"$roadmap\" 2>\u002Fdev\u002Fnull \\\n  | grep -Eo '[0-9]+' | sort -rn | head -1)\nmax_unit=${max_unit:-0}\n\nN=$((max_unit + 1))\nNN=$(printf '%02d' \"$N\")\nname=$(printf '%s' \"$UNIT_TITLE\" \\\n  | tr '[:upper:]' '[:lower:]' \\\n  | tr -cs 'a-z0-9' '-' \\\n  | sed -e 's\u002F^-\u002F\u002F' -e 's\u002F-$\u002F\u002F')\nbrief_dir=\".planning\u002Fmissions\u002F${mission_id}\u002Fbriefs\u002F${NN}-${name}\"\n```\n\nThe brief path is `${brief_dir}\u002FBRIEF.md`.\n\n### 4. Append the new unit to the roadmap\n\n**Append** the new numbered entry to `.planning\u002Fmissions\u002F${mission_id}\u002FROADMAP.md` — title plus its one-line outcome — at the end of the unit list. Every existing entry keeps its number, title, and status untouched. This is an Edit that adds a line; it is never a rewrite of the file's existing units.\n\n### 5. Write the new unit's complete brief\n\nWrite the full brief at `${brief_dir}\u002FBRIEF.md`, in the **same format `\u002Fbrief` produces** (see Artifact format below): **why** (the gap and the value closing it adds), **what** (explicit in-scope and out-of-scope lists), a **spec** of verifiable `AC-N` acceptance criteria, and **assumptions**. Because this is a brand-new unit, this is always a first-time Write — `\u002Frefine` never opens an existing brief to edit it.\n\n### 6. Record workflow state\n\nPoint the workflow at the new unit so `\u002Fgodmode` knows the next command:\n\n```bash\ngm=$(for c in \"${CLAUDE_PLUGIN_ROOT:-}\" \"$HOME\u002F.claude\" .; do [ -x \"$c\u002Fbin\u002Fgodmode-state\" ] && { echo \"$c\u002Fbin\"; break; }; done)\n\"$gm\u002Fgodmode-state\" set active_unit \"$N\"\n\"$gm\u002Fgodmode-state\" set status \"unit appended — brief captured\"\n\"$gm\u002Fgodmode-state\" set next_command \"\u002Fplan $N\"\n```\n\n`\u002Frefine` does **not** allocate a `mission_id` and does **not** reset the work-unit counter — only `\u002Fmission` does that. It sets the three pointers above and nothing more.\n\n---\n\n## Strictly additive — what \u002Frefine never does\n\n`\u002Frefine` is append-only. To keep the boundary unambiguous:\n\n- It **never edits or rewrites** an existing brief or an existing roadmap unit in place. Existing entries keep their numbers, titles, statuses, and AC IDs.\n- A gap that lives *inside* an already-specified unit is **not** fixed by editing that unit. Either it becomes a **new appended unit** (when it is genuinely separable work), or it is **deferred to `\u002Fbrief N`** (when it is a refinement of unit `N`'s own spec). In-place brief updates are `\u002Fbrief N`'s job, never `\u002Frefine`'s.\n- It allocates no `mission_id` and resets no counter — those belong to `\u002Fmission`.\n\n---\n\n## Artifact format\n\n### `.planning\u002Fmissions\u002F\u003Cmission_id>\u002Fbriefs\u002FNN-name\u002FBRIEF.md`\n\nThe appended unit's brief uses the exact format `\u002Fbrief` produces:\n\n```markdown\n# Brief NN: [unit title]\n\n**Updated:** [YYYY-MM-DD]\n**Roadmap unit:** N — [one-line outcome from ROADMAP.md]\n\n## Why\n[The gap this unit closes — what's missing or underspecified in the mission,\nthe value closing it adds, and who benefits.]\n\n## What\n\n### In scope\n- [Concrete capability included.]\n\n### Out of scope\n- [Explicitly excluded — what this unit will NOT do.]\n\n## Spec — acceptance criteria\nEach criterion is verifiable (a clear trigger and observable result) and carries a stable **`AC-N`** label — these IDs are the references `\u002Fplan N` and `\u002Fverify N` use.\n\n- [ ] **AC-1:** [Returns \u002F renders \u002F writes ... when ...]\n- [ ] **AC-2:** [...]\n\n## Assumptions\n[Auto Mode: inferred defaults surfaced here. Otherwise omit or note open questions.]\n```\n\n---\n\n## Output\n\n\u003C!-- Output follows the in-skill output convention: godmode:output-convention — see rules\u002Fgodmode-output.md -->\n\nAfter writing, report:\n\n- The gap that was selected, and a one-line summary of why it won over the other candidate gaps surfaced.\n- The new unit's number `N` and the path of its appended brief `.planning\u002Fmissions\u002F\u003Cmission_id>\u002Fbriefs\u002FNN-name\u002FBRIEF.md`, confirming it was *appended* (the roadmap's existing units untouched).\n- The acceptance criteria, confirming each is verifiable.\n- In Auto Mode, the **Assumptions** that were made.\n- The workflow state set and the next step:\n\n> \"Unit N appended to the active mission and its brief captured. Run `\u002Fplan N` to break it into a tactical plan.\"\n\n---\n\n## Related\n\n- **\u002Fideate** — pre-mission sibling: explores directions for the *next* mission before any charter exists. `\u002Frefine` is its mid-mission counterpart, working inside the active mission.\n- **\u002Fbrief N** — owns in-place brief updates. A refinement of an existing unit's spec is delegated here; `\u002Frefine` only ever appends new units.\n- **\u002Fplan N** — next step: turns the appended unit's brief into a tactical plan plus verification.\n- **\u002Fgodmode** — reads the workflow state this skill records and tells the user the next command.\n\n**Spine:** `\u002Fmission` → `\u002Fbrief N` → `\u002Fplan N` → `\u002Fbuild N` → `\u002Fverify N` → `\u002Fship`. `\u002Frefine` is the mid-mission gap-analysis step: it reads the current mission, finds what's missing, and appends a buildable unit plus its brief that re-enters the spine at `\u002Fbrief`\u002F`\u002Fplan`.\n",{"name":5,"description":7,"allowed-tools":48,"user-invocable":49},"Read, Write, Edit, Glob, Grep, Bash(gm=*), Bash(*godmode-state*)",true,"main","717a1f3af996804502df0047840b6c74a1d464c5","skills\u002Frefine",0,"https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode","https:\u002F\u002Fgithub.com\u002FSyloRei","Nya? Kawai? Desu?","2026-06-08 16:03:07",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":49},[60,63,66],{"tool":61,"command":62},"npx","npx skills add SyloRei\u002Fclaude-godmode --skill refine",{"tool":64,"command":65},"bunx","bunx skills add SyloRei\u002Fclaude-godmode --skill refine",{"tool":67,"command":68},"pnpm","pnpm dlx skills add SyloRei\u002Fclaude-godmode --skill refine","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Frefine\u002FSKILL.md",[],[72,81,101,123,152,171],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":43},"01M6HBW3WEVBXANCRWF5YK5BYC","{{name=null}=null}","{{description=null}=null}","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Ftemplates\u002Fskill\u002FSKILL.md",[],[74,79,80],"name","true",{"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":43},"01M6HBVZ86GN3TGGFSJ4XM9C5Q","verify","Check a built unit goal-backward: classify every brief acceptance criterion COVERED \u002F PARTIAL \u002F MISSING with concrete evidence, so you know what is truly done. Use when: verify N, check whether unit N is done, confirm the goals for roadmap unit N are met.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[],[83,88,89,24,90,91,28,92,93,94,95,96,97,34,98,39,99,41,33,100],"run","git","you","ShellCheck","scripts","classify","done","show","log","goal","coverage","model","acceptance",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":43},"01M6HBVTDPNPD88ZWXT4T5M8EA","triage","Respond to a production incident, outage, or regression in the wild: establish the timeline, assess blast radius, and reconstruct what happened with cited evidence. Use this when something is failing in production and you need to understand it before fixing it.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[103,108,109,80,90,110,111,112,113,114,115,116,117,118,119,120,121,122],"incident","wild","with","understand","it","respond","assess","production incident","evidence","use","regression","radius","timeline","Production","blast radius",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":137,"publishedAt":43},"01M6HBVNQ1ASFTJTYT47F8M559","tdd","Build new behavior test-first using strict Red-Green-Refactor cycles. Use this when you want to drive a new feature or behavior from failing tests before writing the implementation.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[129,134],{"categoryNo":130,"categoryName":131,"taxonomyType":132,"taxonomyTypeDesc":133},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":135,"categoryName":136,"taxonomyType":132,"taxonomyTypeDesc":133},"01JBSEEDCAT000000000000023","Skill与智能体开发",[125,80,90,138,139,140,141,142,143,144,145,146,117,147,148,149,150,151],"red","first","feature","tests","green","build","implementation","drive","red-green-refactor","new feature","behavior","refactor","test","writing",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":43},"01M6HBVH8GX9JCMS5432JZVTMN","ship","Run every canonical quality gate, push the branch, and open a pull request — release in one command. Use when: ship it, ready to ship, create the PR, push and open a PR.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Fship\u002FSKILL.md",[],[154,88,159,160,99,41,161,162,163,89,164,39,165,166,167,168,92,169,24,170],"command","branch","open","push","pull","release","create","quality gate","pr","canonical","ship it","ready",{"skillNo":172,"name":149,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":181,"publishedAt":43},"01M6HBV7SGBH14T5K2336RYZWW","Improve code structure without changing behavior, verifying with tests at every step. Use this when you want to restructure, extract, rename, or simplify existing code that already works.","https:\u002F\u002Fgithub.com\u002FSyloRei\u002Fclaude-godmode\u002Fblob\u002Fmain\u002Fskills\u002Frefactor\u002FSKILL.md",[176,177,178],{"categoryNo":130,"categoryName":131,"taxonomyType":132,"taxonomyTypeDesc":133},{"categoryNo":135,"categoryName":136,"taxonomyType":132,"taxonomyTypeDesc":133},{"categoryNo":179,"categoryName":180,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师",[149,148,182,183,184,117,185,186,80,90,110,141,187,188,189],"code","simplify","improve","Existing","at","structure","rename","extract"]