propose-brief
Scaffold a draft brief for pre-decision exploration. Leave its body for human authorship; do not create an ADR or change status.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- propose-brief
- metadata
- { "tags": "briefs, scaffolding, exploration, adr-precursor", "bundles": "crux-docs", "triggers": "draft a brief | scaffold a brief | new brief | BRIEF for <topic> | I want to explore X before deciding", "risk_level": "low", "routing_note": "Scaffolds the file + frontmatter; body is human-authored.", "requires_access": "write-tree" }
- description
- Scaffold a draft brief for pre-decision exploration. Leave its body for human authorship; do not create an ADR or change status.
03 SKILL.md 正文
Propose Brief
<!-- BEGIN GENERATED: runtime-compat -->
Runtime compatibility
This skill is portable across Claude Code, Codex, OpenCode, and OMP (Oh My Pi). This section overrides platform-specific labels below.
- Before running a command that uses
CRUX_PLUGIN_ROOT, set it to the installed plugin root. In Claude Code, use the value ofCLAUDE_PLUGIN_ROOT. In Codex, OpenCode, and OMP, derive it from the absolute path of this selectedSKILL.md: the plugin root is the parent of itsskills/directory (in OMPbash,skill://<name>resolves to the skill directory). In a source checkout, use the checkoutcrux/directory. - For project-local skills, use
.claude/skillsin Claude Code,.agents/skillsin Codex,.opencode/skillsin OpenCode (which also reads the singular.opencode/skill), and.omp/skillsin OMP. SetCRUX_LOCAL_SKILLS_DIRto that path before following any command below that uses it. - Translate Claude Code tool labels such as
Agent,Read,Write,Bash,WebSearch, andWebFetchto the matching capability in the current session. Codex names its own capabilities; OpenCode uses the lowercase formssubagent,read,edit,shell,websearch, andwebfetch, whereeditcovers bothEditandWrite; OMP usestask,read,edit,write,bash,grep,glob,find,todo, andweb_search(wherereadalso handles URLs andskill://URIs). Do not attempt to invoke the Claude Code labels as literal commands on another host. - Install the generated role agents before delegating:
install-codex-agentsin Codex,install-opencode-agentsin OpenCode,install-omp-agentsin OMP. Codex names themcrux_architect,crux_brainstormer,crux_commander,crux_dev_lead,crux_developer,crux_historian,crux_librarian,crux_night_gardener,crux_reviewer, andcrux_wayfinder; OpenCode and OMP use the bare role namesarchitect,brainstormer,commander,dev-lead,developer,historian,librarian,night-gardener,reviewer, andwayfinder(in OMP,scoutmay also be used for reconnaissance alongsidewayfinder). If a required role or capability is unavailable, report that truthfully instead of claiming it ran. - Argument placeholders such as
$adrand$bookbind only in Claude Code. On a host without argument binding they are unset — take the value from the user's phrase. The "Fields OpenCode ignores" section ofOPENCODE_GUIDE.mdnames the invocation-control fields OpenCode ignores. <!-- END GENERATED: runtime-compat -->
Overview
The scaffolding operation for a brief — the short, pre-decision exploration document that an ADR later compresses into a chosen path. Briefs are the one concern whose body is human-authored (per docs/AGENTS.md §2 ownership) — with the single §2(b) exception of a whiteboarding-authored session carried in via --from-inbox: this skill creates the file, populates the frontmatter, wires the indexes, and logs the operation — then stops, leaving the body for the user to write (or, on the --from-inbox path, populating the body from the session).
Pairs with propose-adr (an ADR cites a brief via related_briefs:; audit-docs back-populates the brief's related_adrs:).
Core principle: scaffold, don't author — with one sanctioned exception. A brief's value is the human's framing of the problem; a pre-filled body is wrong-but-shipped content, so by default this skill leaves the body a stub. The sole exception (per docs/AGENTS.md §2(b)) is a whiteboarding-authored session brief carried in via --from-inbox: that content was already machine-authored through the whiteboarding dialogue, so it becomes the body. In every other case: provide the structure; let the user write.
When to use
- User says: "draft a brief", "scaffold a brief", "new brief", "BRIEF for <topic>", "I want to explore X before deciding", "write up the exploration for X".
- After a discussion surfaces a question that needs exploration before an ADR can be proposed.
- When
propose-adrreveals "this needs more exploration first" — the natural hand-off.
Do not use this skill for:
- Writing the brief's body — that's the user's job, unless
--from-inboxsupplies a whiteboarding session (the §2(b) machine-authored exception, which carries the session content into the body). Absent that flag, refuse to pre-fill the exploration content. - Transitioning a brief's status (
draft→published,draft→abandoned) — that's thetransition-briefskill (the lifecycle closer, the symmetric counterpart totransition-adr). Do NOT hand-edit thestatus:frontmatter to publish or abandon — the schema forbids hand-editing frontmatter outside a transition skill. Abandon path: when an exploration is dropped without becoming a decision, runtransition-briefto move itdraft→abandoned(it validates the transition, updatesupdated_at+ thedocs/index.mdrollup, and records abriefop through the log writer); the brief body stays as-is for the historical record. - Recording a decision — that's
propose-adr(cite the brief with--related-briefs BRIEF-<slug>). - Promoting a brief to an ADR — that's
propose-adr, not this skill.
Inputs
--title "<exploration title>"— required. Free-form (briefs are exploratory, not declarative like ADRs). If omitted, prompt the user; confirm before allocation.--tags <comma-list>— optional.--authors <comma-list>— optional. Defaults to the actual user's handle, resolved at runtime (e.g. fromgit config user.nameor the session user) — never a hardcoded name.--related-adrs <comma-list>— optional. ADR ids that already reference this brief (usually empty at creation;audit-docsback-populates as ADRs cite it).--related-research <comma-list>— optional. Research-source slugs (underdocs/research/sources/) to pre-link. Populates arelated_research:frontmatter field IF the template carries one. If--related-researchis passed butBRIEF-template.mdhas norelated_research:field, do NOT silently drop it — emit a WARN ("--related-researchwas provided butBRIEF-template.mdhas norelated_research:field; the values were not recorded. Add the field to the template, or capture these sources in the brief body / the consuming ADR'srelated_research:.") and proceed with the rest of the scaffold. Default empty.--from-inbox <session-path>— optional. Path to a whiteboarding session dropped indocs/inbox/(usually supplied byprocess-inboxwhen it dispatches a whiteboarding-authored item). This is the one sanctioned exception to scaffold-only (perdocs/AGENTS.md§2(b)): the session was machine-authored by thewhiteboardingskill /brainstormeragent, so its content becomes the brief body (a "machine-authored session brief") rather than being left as the stub. Used ONLY for whiteboarding sessions; never to pre-fill a human-authored brief. Default: absent (scaffold-only).
The pipeline
Execute in order.
1. Compute the slug and path
${SLUG}= kebab-case of${title}, ASCII only, truncated to ~50 chars (perdocs/AGENTS.md§9 slug rule). Trim trailing hyphens.${FILE}=docs/briefs/BRIEF-${SLUG}.md.- Collision check: if
${FILE}already exists, STOP — do not overwrite. Tell the user to pick a different title or edit the existing brief. (Briefs have no monotonic counter; the slug IS the key.)
2. Instantiate from the template
- Read
${CRUX_PLUGIN_ROOT}/templates/BRIEF-template.md. The canonical frontmatter shape lives there; substitute, do not re-author the field list. - Substitute frontmatter values:
title: "${title}"slug: ${SLUG}type: briefstatus: draftcreated_at: ${TODAY}updated_at: ${TODAY}authors: ${authors_list}(default the configured handle)tags: ${tags_list}(or[])related_adrs: ${related_adrs_list}(or[])related_research: ${related_research_list}— ONLY if--related-researchwas passed ANDBRIEF-template.mdcarries arelated_research:field; do NOT invent the field. If--related-researchwas passed but the template lacks the field, emit the WARN described in Inputs (do not silently drop the values) and omit the field — the values are surfaced to the user rather than lost.
- Leave the body as the template stub (the explainer blockquote +
<body>placeholder). Do NOT write exploration content — the human authors it. Exception —--from-inbox <session-path>(whiteboarding only, per §2(b)): replace the<body>placeholder with the whiteboarding session's content (strip any leadingcrux:directive line and the session's own top-level title so the brief's# <Title>heading isn't duplicated; preserve the exploration prose/options/decision verbatim). The frontmatter is still written by this skill; only the body comes from the session. This is the machine-authored path, NOT a licence to author a human brief's body.
3. Write the file
- Write
${FILE}. If the write fails, STOP — no index or operations log changes.
4. Update docs/index.md brief rollup
- Under the
## Briefs (N)section, add a row:- [[briefs/BRIEF-${SLUG}]] — \draft` — `updated_at: ${TODAY}``. - Bump the
(N)count to the actual number ofdocs/briefs/BRIEF-*.mdfiles. - If no
## Briefssection exists yet (first brief), create it in the correct concern order (after ADRs, before Journal — seedocs/AGENTS.md§5). - Update the
_Last updated:_line to${TODAY}.
5. Record the brief operation
Write the entry through the log writer (docs/AGENTS.md §6),[^log-writer] using the brief op from the §6 canonical enum. Write the body below to a file outside the tree, then run:
uv run "${CRUX_PLUGIN_ROOT}/scripts/operation-log.py" append --repo-root <repo-root> \
--op brief --subject 'scaffolded BRIEF-${SLUG}' --date ${TODAY} --body-file <path>
The entry it writes at the top of the current month's detail file docs/log/YYYY-MM.md:
## [${TODAY}] brief | scaffolded BRIEF-${SLUG}
Body, 1–2 lines: the title, the file path, status: draft. Note the body is human-authored next — or, on the --from-inbox path, that the body was populated from the whiteboarding session (§2(b)).
A refused append keeps this skill's other writes and adds no entry: fix the cause it names, then rerun the append alone (§6). Then run the commit step of §6 over the result's commit_paths and restore_paths.
6. Hand off to the user
- Tell the user: brief scaffolded at
${FILE}, statusdraft. - Default path (no
--from-inbox) — explicitly instruct: the body is yours to write — replace the template stub with the exploration (problem framing, options, context). --from-inboxpath — report that the body was populated from the whiteboarding session (§2(b) machine-authored exception); invite the user to refine it, not to write it from scratch.- When a decision crystallizes, run
propose-adrand cite this brief with--related-briefs BRIEF-${SLUG}.
Verification checklist
- [ ]
docs/briefs/BRIEF-${SLUG}.mdexists. - [ ] Frontmatter parses as YAML and matches the template's keyset (
title,slug,type: brief,status: draft,created_at,updated_at,authors,related_adrs,tags). - [ ]
created_atandupdated_atboth equal${TODAY}. - [ ] The body is the template stub — NOT pre-filled exploration content (UNLESS
--from-inboxcarried a whiteboarding session, in which case the body is the session content per §2(b) and the leading directive/duplicate title were stripped). - [ ]
docs/index.md## Briefs (N)count matches the actualdocs/briefs/BRIEF-*.mdfile count, and a row for this brief is present. - [ ]
docs/index.md_Last updated:_is${TODAY}. - [ ] The current month's detail file
docs/log/YYYY-MM.mdhas a new## [${TODAY}] brief |entry at the top, written byoperation-log.py append. - [ ] No ADR was created or modified (that's
propose-adr).
Red flags — STOP and reconsider
- About to write exploration content into the brief body without
--from-inbox. NEVER — a human-authored brief's body is the user's; provide the stub only. (WITH--from-inbox, carrying a whiteboarding session's content into the body is the sanctioned §2(b) exception — that is the ONE case where the body is machine-authored.) - About to overwrite an existing
BRIEF-${SLUG}.md. Briefs are not regenerated; refuse and surface the collision. - About to transition a brief's
status(e.g. topublishedorabandoned). Out of scope for this skill — usetransition-brief. Do NOT hand-edit thestatus:frontmatter. - About to use the
journalop (or any op other thanbrief) for the log entry. Thebriefop is the canonical op for brief scaffolding (perdocs/AGENTS.md§6). - About to skip the
docs/index.mdbrief-rollup update. Downstreamaudit-docscount checks depend on it; update on every write. - About to populate
related_adrs:with an ADR that doesn't exist yet. Leave it[]unless a real ADR already cites the brief —audit-docsback-populates.
Rationalization table
| Excuse | Reality |
|---|---|
| "The user clearly knows what they want to explore — I'll draft the brief body to save them time." | The brief body is the user's framing; pre-filling it produces wrong-but-shipped content. Scaffold and hand off. (The sole machine-authored exception is a whiteboarding session carried in via --from-inbox, §2(b) — not a licence to draft a human brief.) |
"There's already a BRIEF-<slug>.md — I'll just append to it." |
Collision = refuse. The user either wants a different title or to edit the existing brief directly; don't silently merge. |
| "Briefs are informal — I'll skip the frontmatter and just write a heading." | The frontmatter (status, related_adrs) is what audit-docs uses for the brief↔ADR bidirectional check. Populate it from the template. |
"I'll log this under journal since there's narrative." |
Brief scaffolding is a brief op, not a journal op. Briefs aren't journal entries — they're pre-decision documents. |
| "The user said 'brief on X and propose the ADR' — I'll do both." | Two skills. Scaffold the brief here; the user (or a follow-up propose-adr) writes the decision once the brief's exploration is done. |
"No ## Briefs section in docs/index.md yet — I'll skip the rollup." |
Create the section in the correct concern order. A missing rollup is drift audit-docs will flag. |
Common mistakes
- Pre-filling the body because the topic seems clear. The body is the human's — the sole exception is a whiteboarding session carried in via
--from-inbox(§2(b)). - Using
createdinstead ofcreated_at— match the template's exact key names. - Forgetting to bump the
## Briefs (N)count by counting actual files, not incrementing the prior number blindly. - Writing
authors: []— default to the configured handle; a brief has at least one author. - Slug ending in a hyphen after truncation — trim it.
- Putting the new brief's own slug in
related_adrs:— that field is for ADR ids, populated as ADRs cite the brief.
See also
propose-adr— the decision artifact that consumes a brief (--related-briefs BRIEF-<slug>).audit-docs— enforces the brief↔ADR bidirectional consistency (related_briefs:↔related_adrs:).docs/AGENTS.md§2 (ownership — briefs are human-authored), §4 (briefs concern), §9 (slug rule), §10 (skill-invocation table).- Template:
crux/templates/BRIEF-template.md.
[^log-writer]: rule:log-entries-go-through-the-log-writer, rule:no-writer-writes-the-legacy-log-file
04 同仓库更多 Skills
whiteboarding
Explore an idea through docs-informed dialogue before committing to a design. Capture the exploration for later filing as a brief.
verify-code-docs
Check generated code documentation against source and report drift without regenerating it.
transition-observation
Apply a human disposition to an observation's lifecycle state without changing its claim or body.
transition-invariant
Ratify, reject, or retire an invariant on human direction. Update lifecycle metadata without changing the invariant's body.
transition-decision
Apply a human ratify, reject, or defer verdict to a recovered decision candidate; ratification creates a Proposed ADR or observation.
transition-brief
Publish or abandon a draft brief, updating lifecycle metadata and indexes without changing its body.