Doc Writer
Write concise, evidence-based docs with only the sections the reader needs.
Destination And Evidence
- Infer the destination from the request, page URL, referenced page, open file, or
active workspace. Ask only when the destination materially changes the result.
- Treat a Confluence URL, page ID, existing page, or explicit publish/update
request as Confluence context.
- Use the
twg skill for company evidence from Confluence, Jira, Drive, Slack,
ownership records, decisions, and related work.
- Read the smallest useful evidence set. Preserve source links during rewrites
and place citations next to the claims they support.
- Distinguish facts from assumptions, recommendations, and unresolved questions.
Workflow
- Identify the audience, decision or task, document type, and destination.
- Read existing content and source material before changing its structure.
- Resolve material evidence gaps with local sources or
twg.
- Draft the smallest useful section set for the document type.
- Remove repetition, unsupported claims, empty sections, and generic prose.
- Verify links, claims, ownership, decisions, and requested output format.
- Write or publish only under the mutation rules below.
For long documents, put a linked table of contents after the title or
one-sentence summary. Skip it when the document is already easy to scan.
File Deliverables
Write ordinary Markdown and plain-text documents directly. When the requested
deliverable is a Word document, read
references/docx-output.md. When it is a PDF, or a
document must be exported to PDF, read
references/pdf-output.md.
Treat authoring and final-format validation as separate concerns. Preserve an
existing document's useful styles, links, comments, and revision intent. For a
new document, use restrained formatting appropriate to its destination. Render
the final artifact and inspect representative pages when layout is part of the
request; a successful conversion alone does not establish visual correctness.
Confluence Reads And Writes
For Confluence reads, use twg to resolve the page and fetch its current
content, metadata, and relevant comments or children. A read, review, summary,
or draft request is analysis-only and must not mutate the page.
For Confluence writes:
- When the user explicitly asks to create, update, publish, move, or comment,
read the current page state first and execute the requested mutation.
- Without an explicit write request, produce a draft and identify the intended
destination without changing Confluence.
- Preserve existing links, page hierarchy, ownership, and useful formatting.
- Avoid overwriting concurrent edits. Re-read current state when the write follows
a long analysis or the page may have changed.
- Use
twg help or twg help describe when the current command grammar or write
contract is uncertain.
Use Confluence tables for comparisons, ownership, timelines, decisions, or
status. Use expand, status, info, note, and warning macros only when they improve
scanning or change reader behavior.
Document Suites And Review Comments
- Give each page one job. Pillar pages lead with the target state, summarize the
current state briefly, name the gaps, and link to the work log for execution.
Do not turn a direction-setting page into an exhaustive inventory.
- Keep action items, owners, targets, and status in one work log. Link to it from
narrative pages instead of duplicating action tables across the suite.
- If the user marks that work log or another page as manually owned, treat it as
read-only. Collect exact follow-up items in the handoff for the owner to add.
- Treat an answered review comment as a decision. Update every affected page,
remove the item from open questions, and add any implementation work to the
work log.
- Move content to the page where readers need it under pressure. For example,
operational kill switches belong with incident response, while the service
overview should link to them.
- Resolve comments only after re-reading the published pages and checking that
cross-links, terminology, decisions, and work-log actions agree.
PRD Mode
Use PRD mode for product or feature requirements. Gather known context from the
conversation and linked company evidence before asking questions. Ask only for
missing information that blocks a useful draft, and mark unresolved details as
TBD rather than inventing them.
Select from these topics rather than treating them as a fixed template:
- problem, users, proposed outcome, goals, and non-goals
- user journeys, stories, and testable acceptance criteria
- functional and non-functional requirements
- measurable success metrics and guardrail metrics
- dependencies, constraints, rollout, risks, and open questions
- for AI features: model and tool boundaries, grounding data, evaluation,
safety, privacy, latency, and cost
Requirements must be observable or testable. Replace words such as "fast",
"easy", or "intuitive" with a measurable threshold or an explicit TBD.
Document Topic Budgets
Use these as topic budgets, not rigid headings. Merge related topics.
- High-level design: summary, objective, goals and non-goals, context,
requirements, architecture, components, trust boundaries, lifecycle,
alternatives, observability, rollout, rollback, security, risks, open
questions, references
- Deep technical design: context, architecture, invariants, data design,
components, interfaces, feature gates, migration, implementation phases,
constraints, risks, references
- DACI decision: status, impact, driver, approver, recommendation, contributors,
informed, due date, evidence, decision factors, options, outcome, actions
- Runbook: trigger, severity, impact, diagnostics, mitigation, verification,
troubleshooting, follow-up
- Project update: summary, status, progress, risks, decisions needed, next steps
- Meeting notes: summary, decisions, actions, open questions
Technical And Decision Docs
- State the key recommendation, invariant, or system behavior early.
- Explain the path from user action to system response.
- Show component roles, boundaries, ownership, or options in tables when useful.
- Call out deployment, authentication, tenant, policy, data, security, and
privacy boundaries when relevant.
- Use Mermaid for architecture, sequence, lifecycle, and rollback flows when it
communicates more clearly than prose.
- Keep raw payloads, exhaustive configuration, and detailed estimates out of the
main argument unless they determine the decision.
- For consequential decisions, compare options against explicit factors and
record ownership and next actions.
Image Prompts
Add an image prompt only when a visual would materially shorten or clarify the
document. Do not generate the image unless explicitly asked.
Image prompt: Create a clean architecture diagram showing [components], [data
flow], [external dependencies], and [failure or rollback path]. Use labels that
match the document.
Style And Links
- Prefer short paragraphs, concrete bullets, and system-specific language.
- Do not add sections just because a template contains them.
- Do not repeat the same idea across the summary, context, and conclusion.
- Avoid em dashes, adjacent hyphens, semicolons, and stock AI phrasing.
- Link descriptive words instead of pasting bare URLs.
- Put a source link next to a sourced claim. Add a final
References section
only when a consolidated source list helps the reader.
- Do not end with a generic conclusion. End with the decision, owner, or next
action when one exists.
1---2name: doc-writer3description: Use when writing, rewriting, or reviewing concise documentation, including technical and design docs, PRDs, DACI decisions, runbooks, project updates, meeting notes, Confluence pages, and Word or PDF deliverables. Also use when documentation needs tighter structure, source-backed claims, preserved links, or less AI-sounding prose.4---56# Doc Writer78Write concise, evidence-based docs with only the sections the reader needs.910## Destination And Evidence1112- Infer the destination from the request, page URL, referenced page, open file, or13 active workspace. Ask only when the destination materially changes the result.14- Treat a Confluence URL, page ID, existing page, or explicit publish/update15 request as Confluence context.16- Use the `twg` skill for company evidence from Confluence, Jira, Drive, Slack,17 ownership records, decisions, and related work.18- Read the smallest useful evidence set. Preserve source links during rewrites19 and place citations next to the claims they support.20- Distinguish facts from assumptions, recommendations, and unresolved questions.2122## Workflow23241. Identify the audience, decision or task, document type, and destination.252. Read existing content and source material before changing its structure.263. Resolve material evidence gaps with local sources or `twg`.274. Draft the smallest useful section set for the document type.285. Remove repetition, unsupported claims, empty sections, and generic prose.296. Verify links, claims, ownership, decisions, and requested output format.307. Write or publish only under the mutation rules below.3132For long documents, put a linked table of contents after the title or33one-sentence summary. Skip it when the document is already easy to scan.3435## File Deliverables3637Write ordinary Markdown and plain-text documents directly. When the requested38deliverable is a Word document, read39[references/docx-output.md](references/docx-output.md). When it is a PDF, or a40document must be exported to PDF, read41[references/pdf-output.md](references/pdf-output.md).4243Treat authoring and final-format validation as separate concerns. Preserve an44existing document's useful styles, links, comments, and revision intent. For a45new document, use restrained formatting appropriate to its destination. Render46the final artifact and inspect representative pages when layout is part of the47request; a successful conversion alone does not establish visual correctness.4849## Confluence Reads And Writes5051For Confluence reads, use `twg` to resolve the page and fetch its current52content, metadata, and relevant comments or children. A read, review, summary,53or draft request is analysis-only and must not mutate the page.5455For Confluence writes:5657- When the user explicitly asks to create, update, publish, move, or comment,58 read the current page state first and execute the requested mutation.59- Without an explicit write request, produce a draft and identify the intended60 destination without changing Confluence.61- Preserve existing links, page hierarchy, ownership, and useful formatting.62- Avoid overwriting concurrent edits. Re-read current state when the write follows63 a long analysis or the page may have changed.64- Use `twg help` or `twg help describe` when the current command grammar or write65 contract is uncertain.6667Use Confluence tables for comparisons, ownership, timelines, decisions, or68status. Use expand, status, info, note, and warning macros only when they improve69scanning or change reader behavior.7071## Document Suites And Review Comments7273- Give each page one job. Pillar pages lead with the target state, summarize the74 current state briefly, name the gaps, and link to the work log for execution.75 Do not turn a direction-setting page into an exhaustive inventory.76- Keep action items, owners, targets, and status in one work log. Link to it from77 narrative pages instead of duplicating action tables across the suite.78- If the user marks that work log or another page as manually owned, treat it as79 read-only. Collect exact follow-up items in the handoff for the owner to add.80- Treat an answered review comment as a decision. Update every affected page,81 remove the item from open questions, and add any implementation work to the82 work log.83- Move content to the page where readers need it under pressure. For example,84 operational kill switches belong with incident response, while the service85 overview should link to them.86- Resolve comments only after re-reading the published pages and checking that87 cross-links, terminology, decisions, and work-log actions agree.8889## PRD Mode9091Use PRD mode for product or feature requirements. Gather known context from the92conversation and linked company evidence before asking questions. Ask only for93missing information that blocks a useful draft, and mark unresolved details as94`TBD` rather than inventing them.9596Select from these topics rather than treating them as a fixed template:9798- problem, users, proposed outcome, goals, and non-goals99- user journeys, stories, and testable acceptance criteria100- functional and non-functional requirements101- measurable success metrics and guardrail metrics102- dependencies, constraints, rollout, risks, and open questions103- for AI features: model and tool boundaries, grounding data, evaluation,104 safety, privacy, latency, and cost105106Requirements must be observable or testable. Replace words such as "fast",107"easy", or "intuitive" with a measurable threshold or an explicit `TBD`.108109## Document Topic Budgets110111Use these as topic budgets, not rigid headings. Merge related topics.112113- High-level design: summary, objective, goals and non-goals, context,114 requirements, architecture, components, trust boundaries, lifecycle,115 alternatives, observability, rollout, rollback, security, risks, open116 questions, references117- Deep technical design: context, architecture, invariants, data design,118 components, interfaces, feature gates, migration, implementation phases,119 constraints, risks, references120- DACI decision: status, impact, driver, approver, recommendation, contributors,121 informed, due date, evidence, decision factors, options, outcome, actions122- Runbook: trigger, severity, impact, diagnostics, mitigation, verification,123 troubleshooting, follow-up124- Project update: summary, status, progress, risks, decisions needed, next steps125- Meeting notes: summary, decisions, actions, open questions126127## Technical And Decision Docs128129- State the key recommendation, invariant, or system behavior early.130- Explain the path from user action to system response.131- Show component roles, boundaries, ownership, or options in tables when useful.132- Call out deployment, authentication, tenant, policy, data, security, and133 privacy boundaries when relevant.134- Use Mermaid for architecture, sequence, lifecycle, and rollback flows when it135 communicates more clearly than prose.136- Keep raw payloads, exhaustive configuration, and detailed estimates out of the137 main argument unless they determine the decision.138- For consequential decisions, compare options against explicit factors and139 record ownership and next actions.140141## Image Prompts142143Add an image prompt only when a visual would materially shorten or clarify the144document. Do not generate the image unless explicitly asked.145146```markdown147Image prompt: Create a clean architecture diagram showing [components], [data148flow], [external dependencies], and [failure or rollback path]. Use labels that149match the document.150```151152## Style And Links153154- Prefer short paragraphs, concrete bullets, and system-specific language.155- Do not add sections just because a template contains them.156- Do not repeat the same idea across the summary, context, and conclusion.157- Avoid em dashes, adjacent hyphens, semicolons, and stock AI phrasing.158- Link descriptive words instead of pasting bare URLs.159- Put a source link next to a sourced claim. Add a final `References` section160 only when a consolidated source list helps the reader.161- Do not end with a generic conclusion. End with the decision, owner, or next162 action when one exists.