Managed by doccraft — doccraft update regenerates this file. Local edits will be overwritten. See doccraft.json to override project-specific vocabulary and paths without touching this file.
doccraft — session wrap (propose docs artifacts)
When to use
- The user invokes this skill or asks to wrap this session /
propose docs artifacts / what should we capture /
summarize this discussion into docs from the current conversation.
- Typical triggers: architecture or product discussion concluded (or
deferred with rationale), research synthesis, or reprioritisation — not
every casual Q&A.
Default: propose artifacts only if necessary. Do not invent work to
document.
NEVER write files unless the user explicitly asks to create or update
them in the same turn. Propose drafts only.
Configuration
Read doccraft.yaml at invocation. The sessionWrap.capture: block
controls which artifact categories are in scope for this project — skip
rows entirely in the proposals table when their category is disabled.
Relevant keys:
docsDir — root folder for all docs. Default: docs. All artifact
paths below are relative to {docsDir}/.
sessionWrap.capture.research — default true.
sessionWrap.capture.reference — default true.
sessionWrap.capture.business — default false. Projects that track
strategy under {docsDir}/business/ set this to true; most projects
leave it off.
If doccraft.yaml is missing, apply the defaults above. The ADR,
Story, and Backlog / queue categories are always in scope — they
are the load-bearing set.
Package routing
For monorepo projects (a Known package roots block appears above when
packages are declared), artifact proposals route to the package whose
body the conversation referenced most. Default to the project root when
no single package dominates. The paths in the docs map below resolve
relative to the chosen package's docs/ (or the project-root
docs/ for single-root projects).
Docs map (where things go)
Authoritative overview, if the project has one: docs/README.md.
| Kind |
Path |
Use for |
| ADR |
docs/adr/NNN-slug.md |
A decision to freeze (chosen option, explicit deferral, or rejected approach you do not want re-litigated). See doccraft-adr if installed. |
| Research |
docs/research/<topic>.md |
Exploration / comparison / notes (tools, papers, datasets) without a single "we decided X" — synthesis for humans and future agents. |
| Reference |
docs/reference/<topic>.md |
Long-form engineering notes (runbooks, eval harnesses, pricing) that are not framed as an ADR. If the project has a docs/reference/README.md, add a link there when adding a new file. |
| Business |
docs/business/<topic>.md |
Business strategy — target audience, business model, competitive landscape, marketing, unit economics, legal, launch sequence. Only propose if the project already tracks business docs under docs/business/; prefer updating existing topics over creating new ones. |
| Story |
docs/stories/<slug>.md |
Trackable scope with acceptance criteria and optional depends_on. Follow doccraft-story if installed. |
| Backlog / queue |
docs/backlog.md, docs/queue.md |
P-tier rows, status column, ordered "pick next" — not every chat. If the thread defined new dependencies, point the user at doccraft-queue-audit (Agent mode applies mechanical fixes). |
Gate checklist (run mentally before proposing)
Answer each only from the visible thread (and optional repo files the user
already opened). If the answer is "no" for all actionable rows, go to Exit.
- ADR — Did the thread reach (or explicitly record) an architecture /
process / stack conclusion worth git history? (Includes "we will not do X".)
- Research — Is there durable synthesis (comparisons, constraints,
citations) that is not a single sharp decision?
- Reference — Is there operational or eval depth better as a living
doc than an ADR or a story?
- Business — If the project tracks business strategy under
docs/business/: did the thread produce business insights (audience,
pricing, competitive, marketing, legal, economics) that MUST update or
extend those docs? Prefer updating existing docs over creating new ones.
Skip this row entirely if the project has no docs/business/ tree.
- Story — Is there a bounded deliverable with testable acceptance
criteria not already covered by an existing story?
- Backlog / queue — Did priorities or P-tier status change in a way
that belongs in the tables (rare for a pure discussion thread)?
If none of the above apply, go to Exit.
Output format
MUST use these sections in this order:
Summary — One short paragraph: what (if anything) is worth capturing.
Proposals table (omit rows with no proposal):
| Artifact |
Proposed path |
Why (one line) |
Follow |
| ADR / Research / Reference / Story / Backlog / Queue |
e.g. docs/adr/004-foo.md |
... |
link to relevant skill or docs overview |
Do not write files unless the user explicitly asks to create or update
them in the same turn. Offer drafts only when useful.
If proposing an ADR, remind: next NNN-, no renumbering; use
doccraft-adr.
If proposing a story, remind: use doccraft-story; consider updating
docs/backlog.md (status column) and docs/queue.md (pick-next order)
when priorities shift, and invoke doccraft-queue-audit in the same
turn if new depends_on edges were introduced.
Example output
**Summary:** This thread established a caching strategy for API responses
and identified a follow-up task for cache invalidation testing.
| Artifact | Proposed path | Why (one line) | Follow |
|----------|---------------|----------------|--------|
| ADR | `docs/adr/012-api-response-caching.md` | Decided on Redis with 5-min TTL over in-memory; worth freezing | `doccraft-adr` |
| Story | `docs/stories/p2-cache-invalidation-tests.md` | Bounded deliverable with clear acceptance criteria from discussion | `doccraft-story` |
- ADR: next number is 012. Use `doccraft-adr` to write.
- Story: use `doccraft-story`. If `depends_on` edges are added, invoke
`doccraft-queue-audit` in the same turn.
Exit (nothing to capture)
If no row in the proposals table applies, respond with one or two sentences
only, e.g. "No durable decisions or synthesis in this thread; nothing to add
to docs/." — then stop (no filler table, no speculative ADRs).
Pre-execution validation
Before proposing any artifacts, MUST complete these checks:
- Thread scan — review the entire visible conversation thread. NEVER
propose artifacts from assumptions about what was discussed.
- Existing artifacts — check
docs/adr/, docs/stories/,
docs/research/, and docs/reference/ for existing files that
already cover the topic. Prefer updating existing docs over creating
duplicates.
- Config check — read
doccraft.yaml to determine which categories
are enabled. NEVER propose a Research artifact when
sessionWrap.capture.research is false, or a Business artifact when
sessionWrap.capture.business is false.
- ADR numbering — if proposing an ADR, scan
docs/adr/NNN-*.md
to determine the next unused number. MUST include the correct next
number in the proposal.
- Story uniqueness — if proposing a story, scan
docs/stories/*.md frontmatter to confirm no existing story
already covers the same scope.
Invalid examples (do not use)
- Proposing an ADR when the thread only explored options without reaching
a conclusion — use Research instead, or propose nothing.
- Proposing artifacts for a casual Q&A or debugging session with no
durable insight — use Exit instead.
- Writing files without the user explicitly asking in the same turn —
NEVER; propose only.
- Proposing a Business artifact when
docs/business/ does not exist
and the project has not opted in via config — NEVER.
- Proposing speculative stories for work that was not discussed in the
thread — NEVER invent work to document.
- Including a filler table with empty rows when nothing warrants capture —
use the one-sentence Exit instead.
- Proposing a Reference doc when the content is a single sharp decision —
use an ADR instead.
- Proposing an ADR when the content is a broad comparison without a
conclusion — use Research instead.
Done condition
The task is complete when:
- The full conversation thread has been reviewed against the gate
checklist.
- Either a proposals table has been presented with concrete paths, one-line
justifications, and follow links for each proposed artifact, or the Exit
response has been given.
- No files have been written (unless the user explicitly asked to create
or update them in the same turn).
- If an ADR was proposed, the next available
NNN- number is included.
- If a story was proposed, a reminder to use
doccraft-story and
consider doccraft-queue-audit is included.
Workflow reminders
- After the user approves a proposed ADR, invoke
doccraft-adr to write
it — do not write the ADR manually.
- After the user approves a proposed story, invoke
doccraft-story to
write it — do not write the story manually.
- If the user asks to create multiple proposed artifacts in one turn,
invoke each relevant skill in sequence.
- If the proposals table includes both an ADR and a story that references
it, create the ADR first so the story's
adr_refs can reference it.
1---2name: doccraft-session-wrap3description: After a design, research, business, or prioritisation thread, evaluate whether the conversation produced durable insight worth capturing in docs/, then propose only the artifacts that are clearly justified (ADR, research note, reference doc, business update, story, backlog/queue edit). Use when the user says "wrap this session", "propose docs artifacts", "what should we capture", "summarize this into docs", "end-of-session", or similar close-out phrasing. If nothing warrants capture, say so in one sentence and stop. Never write files unless the user explicitly asks to create or update them in the same turn — propose drafts only.4---56> Managed by **doccraft** — `doccraft update` regenerates this file. Local edits will be overwritten. See `doccraft.json` to override project-specific vocabulary and paths without touching this file.78# doccraft — session wrap (propose docs artifacts)910## When to use1112- The user **invokes this skill** or asks to **wrap this session** /13 **propose docs artifacts** / **what should we capture** /14 **summarize this discussion into docs** from the **current conversation**.15- Typical triggers: architecture or product discussion concluded (or16 deferred with rationale), research synthesis, or reprioritisation — **not**17 every casual Q&A.1819**Default:** propose artifacts **only if necessary**. Do not invent work to20document.2122NEVER write files unless the user explicitly asks to create or update23them in the same turn. Propose drafts only.2425## Configuration2627Read `doccraft.yaml` at invocation. The `sessionWrap.capture:` block28controls which artifact categories are in scope for this project — skip29rows entirely in the proposals table when their category is disabled.3031Relevant keys:3233- `docsDir` — root folder for all docs. Default: `docs`. All artifact34 paths below are relative to `{docsDir}/`.35- `sessionWrap.capture.research` — default `true`.36- `sessionWrap.capture.reference` — default `true`.37- `sessionWrap.capture.business` — default `false`. Projects that track38 strategy under `{docsDir}/business/` set this to `true`; most projects39 leave it off.4041If `doccraft.yaml` is missing, apply the defaults above. The `ADR`,42`Story`, and `Backlog / queue` categories are always in scope — they43are the load-bearing set.4445## Package routing464748For monorepo projects (a **Known package roots** block appears above when49packages are declared), artifact proposals route to the package whose50body the conversation referenced most. Default to the project root when51no single package dominates. The paths in the docs map below resolve52relative to the chosen package's `docs/` (or the project-root53`docs/` for single-root projects).5455## Docs map (where things go)5657Authoritative overview, if the project has one: `docs/README.md`.5859| Kind | Path | Use for |60|------|------|--------|61| **ADR** | `docs/adr/NNN-slug.md` | A **decision** to freeze (chosen option, explicit deferral, or rejected approach you do not want re-litigated). See `doccraft-adr` if installed. |62| **Research** | `docs/research/<topic>.md` | **Exploration / comparison / notes** (tools, papers, datasets) without a single "we decided X" — synthesis for humans and future agents. |63| **Reference** | `docs/reference/<topic>.md` | Long-form **engineering** notes (runbooks, eval harnesses, pricing) that are not framed as an ADR. If the project has a `docs/reference/README.md`, add a link there when adding a new file. |64| **Business** | `docs/business/<topic>.md` | **Business strategy** — target audience, business model, competitive landscape, marketing, unit economics, legal, launch sequence. Only propose if the project already tracks business docs under `docs/business/`; prefer updating existing topics over creating new ones. |65| **Story** | `docs/stories/<slug>.md` | **Trackable scope** with acceptance criteria and optional `depends_on`. Follow `doccraft-story` if installed. |66| **Backlog / queue** | `docs/backlog.md`, `docs/queue.md` | P-tier rows, status column, ordered "pick next" — not every chat. If the thread defined new **dependencies**, point the user at `doccraft-queue-audit` (Agent mode applies mechanical fixes). |676869## Gate checklist (run mentally before proposing)7071Answer each **only from the visible thread** (and optional repo files the user72already opened). If the answer is "no" for all actionable rows, go to **Exit**.73741. **ADR** — Did the thread reach (or explicitly record) an **architecture /75 process / stack** conclusion worth git history? (Includes "we will not do X".)762. **Research** — Is there **durable synthesis** (comparisons, constraints,77 citations) that is **not** a single sharp decision?783. **Reference** — Is there **operational or eval** depth better as a living79 doc than an ADR or a story?804. **Business** — If the project tracks business strategy under81 `docs/business/`: did the thread produce **business insights** (audience,82 pricing, competitive, marketing, legal, economics) that MUST update or83 extend those docs? Prefer updating existing docs over creating new ones.84 Skip this row entirely if the project has no `docs/business/` tree.855. **Story** — Is there a **bounded deliverable** with testable acceptance86 criteria not already covered by an existing story?876. **Backlog / queue** — Did priorities or **P-tier status** change in a way88 that belongs in the tables (rare for a pure discussion thread)?8990If **none** of the above apply, go to **Exit**.9192## Output format9394MUST use these sections in this order:95961. **Summary** — One short paragraph: what (if anything) is worth capturing.97982. **Proposals table** (omit rows with no proposal):99100 | Artifact | Proposed path | Why (one line) | Follow |101 |----------|---------------|----------------|--------|102 | ADR / Research / Reference / Story / Backlog / Queue | e.g. `docs/adr/004-foo.md` | ... | link to relevant skill or docs overview |1031043. **Do not write files** unless the user explicitly asks to create or update105 them in the same turn. Offer drafts only when useful.1061074. If proposing an ADR, remind: next `NNN-`, no renumbering; use108 `doccraft-adr`.1091105. If proposing a story, remind: use `doccraft-story`; consider updating111 `docs/backlog.md` (status column) and `docs/queue.md` (pick-next order)112 when priorities shift, and invoke `doccraft-queue-audit` in the same113 turn if new `depends_on` edges were introduced.114115### Example output116117```118**Summary:** This thread established a caching strategy for API responses119and identified a follow-up task for cache invalidation testing.120121| Artifact | Proposed path | Why (one line) | Follow |122|----------|---------------|----------------|--------|123| ADR | `docs/adr/012-api-response-caching.md` | Decided on Redis with 5-min TTL over in-memory; worth freezing | `doccraft-adr` |124| Story | `docs/stories/p2-cache-invalidation-tests.md` | Bounded deliverable with clear acceptance criteria from discussion | `doccraft-story` |125126- ADR: next number is 012. Use `doccraft-adr` to write.127- Story: use `doccraft-story`. If `depends_on` edges are added, invoke128 `doccraft-queue-audit` in the same turn.129```130131## Exit (nothing to capture)132133If no row in the proposals table applies, respond with **one or two sentences**134only, e.g. *"No durable decisions or synthesis in this thread; nothing to add135to `docs/`."* — then **stop** (no filler table, no speculative ADRs).136137## Pre-execution validation138139Before proposing any artifacts, MUST complete these checks:1401411. **Thread scan** — review the entire visible conversation thread. NEVER142 propose artifacts from assumptions about what was discussed.1432. **Existing artifacts** — check `docs/adr/`, `docs/stories/`,144 `docs/research/`, and `docs/reference/` for existing files that145 already cover the topic. Prefer updating existing docs over creating146 duplicates.1473. **Config check** — read `doccraft.yaml` to determine which categories148 are enabled. NEVER propose a Research artifact when149 `sessionWrap.capture.research` is `false`, or a Business artifact when150 `sessionWrap.capture.business` is `false`.1514. **ADR numbering** — if proposing an ADR, scan `docs/adr/NNN-*.md`152 to determine the next unused number. MUST include the correct next153 number in the proposal.1545. **Story uniqueness** — if proposing a story, scan155 `docs/stories/*.md` frontmatter to confirm no existing story156 already covers the same scope.157158## Invalid examples (do not use)159160- Proposing an ADR when the thread only explored options without reaching161 a conclusion — use Research instead, or propose nothing.162- Proposing artifacts for a casual Q&A or debugging session with no163 durable insight — use Exit instead.164- Writing files without the user explicitly asking in the same turn —165 NEVER; propose only.166- Proposing a Business artifact when `docs/business/` does not exist167 and the project has not opted in via config — NEVER.168- Proposing speculative stories for work that was not discussed in the169 thread — NEVER invent work to document.170- Including a filler table with empty rows when nothing warrants capture —171 use the one-sentence Exit instead.172- Proposing a Reference doc when the content is a single sharp decision —173 use an ADR instead.174- Proposing an ADR when the content is a broad comparison without a175 conclusion — use Research instead.176177## Done condition178179The task is complete when:180181- The full conversation thread has been reviewed against the gate182 checklist.183- Either a proposals table has been presented with concrete paths, one-line184 justifications, and follow links for each proposed artifact, or the Exit185 response has been given.186- No files have been written (unless the user explicitly asked to create187 or update them in the same turn).188- If an ADR was proposed, the next available `NNN-` number is included.189- If a story was proposed, a reminder to use `doccraft-story` and190 consider `doccraft-queue-audit` is included.191192## Workflow reminders193194- After the user approves a proposed ADR, invoke `doccraft-adr` to write195 it — do not write the ADR manually.196- After the user approves a proposed story, invoke `doccraft-story` to197 write it — do not write the story manually.198- If the user asks to create multiple proposed artifacts in one turn,199 invoke each relevant skill in sequence.200- If the proposals table includes both an ADR and a story that references201 it, create the ADR first so the story's `adr_refs` can reference it.202