Doc coauthoring

From event4u-app/agent-config · View interactive version

Doc coauthoring is an AI agent skill from the GitHub repository event4u-app/agent-config. When co-authoring a PRD, design doc, RFC, decision doc, or technical spec — 3-stage flow (context → section-by-section → reader-test) — even if the user just says 'help me write this spec'.

How to use this skill

Skill file

doc-coauthoring

When to use

Cross-surface handoff. When this document consumes upstream work (research

→ document, spreadsheet → report), read the handoff envelope from

CODE0:

trust verification_already_done, honour source restrictions, and don't

re-fetch what the source already grounded.

Use this skill when:

Do NOT use when:

Goal

Move from a fuzzy ask to a complete document the user owns, by:

  1. Closing the context gap before drafting
  2. Building each section through brainstorm → curate → draft → refine
  3. Testing the draft with a fresh-context reader before declaring done

Preconditions

Document format & export floor

The document surface's floor (per

CODE0):

user will DO with it — when a named format is requested, produce THAT format

via the document tooling; never silently substitute markdown for a .docx

request. (fixture: ssac-docx-requested-markdown-only.)

the rest of the document (mirrors

CODE0).

to an image-only PDF when browser print or native export keeps the text

selectable. (fixture: ssac-pdf-screenshot-rasterized.)

round-trips

(CODE0);

where the format's tooling is absent, ship the source + say what could not be

verified rather than claiming a produced file.

Procedure

0. Inspect existing material

Before any drafting, inspect the landscape: search agents/ and

the repo for related prior docs (grep -ril "{topic}" agents/ docs/),

check the user's named ticket / thread for context, and confirm no

in-flight document already covers the ask. If a near-duplicate exists,

surface it and ask whether to extend or supersede.

1. Context gathering

Close the gap between what the user knows and what you know.

  1. Meta-questions — one numbered-options block (per user-interaction): doc type? primary audience? desired impact? template/format constraint? existing related docs / threads / tickets?
  2. Info dump — invite stream-of-consciousness context: plain text, paths to existing docs, ticket links, thread paste.
  3. Clarifying questions — 5–10 numbered questions to fill remaining gaps. User answers shorthand (1: yes, 2: see #channel, 3: backwards-compat reason).
  4. Exit gate — ask "ready to draft, or more context?" — wait for confirmation. Do not start scaffolding the file until the user confirms.

2. Refinement & structure

Build the document section by section.

  1. Agree on structure — propose 3–5 sections based on doc type and context. Ask user to confirm or adjust.
  2. Scaffold the file — use save-file to create the doc with placeholder text per section ([To be written]). One commit-equivalent action; review with the user before populating.
  3. Pick the starting section — suggest the one with the most unknowns (usually the core decision / proposal). Never start with the summary.
  4. Per-section loop — repeat for each section:
  1. Whole-doc review at 80% complete — re-read the full file. Surface contradictions, redundancy, generic filler. Apply final edits.

3. Reader test

Verify the doc works for someone without your context.

  1. Predict reader questions — generate 5–10 questions a real reader would ask after reading.
  2. Run the test — pick one:
  1. Additional fresh-reader checks (always): "what is ambiguous?" · "what context does this doc assume readers have?" · "internal contradictions?"
  2. Report — surface where the fresh reader got it wrong, where assumptions break.
  3. Loop back to Stage 2 for problematic sections until the fresh reader answers cleanly and surfaces no new gaps.

4. Handover

  1. Final read-through by the user (they own the doc).
  2. Verify facts, links, technical details.
  3. Confirm intended impact achieved.
  4. Surface the final file path. Done.

Output format

  1. Target document file at the agreed path (e.g. agents/proposals/{slug}.md)
  2. One concluding line stating "Doc complete at {path} — ready for owner review"

Gotcha

Frugality Standards

Apply the Frugality Charter.

Pre-save self-check:

  1. Does any section open with a narrative preamble instead of content?
  2. Are clarifying questions bundled when one-at-a-time would surface user priorities better?
  3. Is the reader-test stage skipped or merged into a "we're done" claim?
  4. Is non-English prose present outside DE: / EN: anchor blocks?

Do NOT

→ Final prose pass for audience-facing output: humanizer (gtm-marketing pack) — remove AI-writing tells before delivery.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.