look-before-you-leap/skills/doc-coauthoring/SKILL.md
Collaborative document authoring through structured dialogue — RFCs, design docs, ADRs, specs, proposals, technical writing, runbooks, onboarding guides, API documentation, decision docs, postmortems, and any prose artifact where clarity and completeness matter. Use whenever the user wants to write, draft, or co-author documentation, specifications, technical proposals, architecture decision records, runbooks, onboarding guides, API docs, or any structured prose document. Also trigger when the user says 'help me write', 'draft an RFC', 'document this decision', 'write a spec', 'I need a design doc', or 'help me explain this'. Do NOT use when: making code changes without documentation output, implementing features, debugging, doing code review without documentation deliverables, writing inline code comments, updating README files as part of a code change, or adding JSDoc/docstrings as part of implementation work.
npx skillsauth add miospotdevteam/claude-control doc-coauthoringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Co-author documents through structured dialogue. Your job is not to generate text — it is to draw out what the author knows, organize it into something readers can act on, and then verify that readers actually understand it.
Most documentation fails not because the writing is bad, but because the author skipped one of three things: understanding the audience, iterating on structure, or testing comprehension. This skill enforces all three.
Announce at start: "I'm using the doc-coauthoring skill to co-author this document through structured dialogue."
No full drafts in one shot. The document is built section by section, with the user reviewing and steering at each step. Dumping a complete document and asking "does this look good?" produces mediocre results because users approve things they haven't carefully read.
This skill operates within the conductor's phases:
Because the "codebase" is a document, the engineering-discipline rules adapt: "read before editing" means reading what the user has already written or said. "Track blast radius" means tracking how a change to one section affects the coherence of others. "Verify" means reader testing.
After brainstorming: If brainstorming ran first and produced a
design.md, consume its outputs as raw material for the document. The
design's Problem, Scope, Chosen Approach, Alternatives Considered, and
Key Decisions sections map directly to corresponding sections in a design
doc or RFC. Do NOT re-ask questions that brainstorming already answered —
use the design.md and fill gaps only.
Standalone: If no brainstorming preceded this skill, run the full Stage 1 context gathering. The user's brain-dump replaces the brainstorming design as the raw material.
Orbit integration: After Stage 2 produces a complete draft, present
it for user approval via Orbit (orbit_await_review). After Stage 3
reader testing, present revisions via Orbit if substantive changes were
made.
The goal is to extract everything the author knows before imposing any structure. Structure too early kills ideas; structure too late produces incoherent documents.
Ask these first — they constrain every decision that follows:
Who is the audience? Not "engineers" — which engineers? Backend engineers who know the system? New hires who don't? External partners with no codebase access? The audience determines vocabulary, assumed knowledge, and level of detail.
What is the document's goal? What should someone DO after reading it? Approve a proposal? Follow a procedure? Understand a decision that was already made? The goal determines whether the tone is persuasive, instructional, or explanatory.
What format fits? Each format has conventions that readers expect:
| Format | When to use | Key sections | |---|---|---| | RFC | Proposing a change that needs buy-in | Problem, Proposal, Alternatives, Migration | | ADR | Recording a decision already made | Context, Decision, Consequences | | Design doc | Explaining how something will work | Goals, Non-goals, Design, Trade-offs | | Spec | Defining exact behavior for implementers | Requirements, Behavior, Edge cases | | Runbook | Guiding operators through procedures | Prerequisites, Steps, Rollback, Escalation | | Onboarding guide | Getting new people productive | Setup, Concepts, First tasks, References | | API documentation | Enabling consumers to integrate | Authentication, Endpoints, Examples, Errors | | Postmortem | Learning from an incident | Timeline, Root cause, Impact, Action items | | Proposal | Pitching an idea to stakeholders | Problem, Solution, Cost, Timeline, Risks |
What's the lifecycle? Will this document be updated regularly (living doc) or is it a snapshot (decision record)? Living docs need clear ownership and update triggers. Snapshots need enough context to be understood without the original author.
What exists already? Are there prior documents, Slack threads, meeting notes, or code comments that contain relevant context? If so, the user should share them — this avoids re-deriving things the organization already knows.
After meta-questions, let the user brain-dump everything they know about the topic. Do NOT interrupt with structure. Do NOT correct or organize. Just absorb.
Prompt with: "Tell me everything you know about this topic — context, constraints, opinions, things you're unsure about, things you think are obvious but might not be. Don't worry about order or completeness. I'll ask follow-up questions after."
The brain-dump is raw material. Some of it will become the document. Some will become context that informs tone and emphasis. Some will be discarded. That's fine — the point is to get everything out of the author's head so nothing is forgotten once structure takes over.
After the brain-dump, identify gaps. Ask 5-10 questions that are specific to what the user said, not generic. Bad questions ask about things you could figure out yourself. Good questions surface things only the author knows.
Bad questions (generic, answerable by reading):
Good questions (specific, gap-filling):
Ask questions one at a time using the AskUserQuestion tool when the
question has a clear set of possible answers. Use open-ended text when
the question requires explanation.
Stage 1 is complete when you can answer:
If you cannot confidently answer all five, ask more questions. Do NOT proceed to Stage 2 with gaps — they become incoherent sections later.
The goal is to go from raw context to a polished draft through iterative refinement. Never write the whole document at once — build it section by section with user feedback at each step.
Generate a proposed outline with section headings and a 1-line summary of what each section covers. The outline should follow the conventions of the chosen format (from Stage 1.1).
Present the outline to the user. Ask:
Iterate until the outline is approved. The outline is the skeleton — everything else hangs on it.
For each section in the approved outline, brainstorm 5-20 options for key points, phrasings, framings, or approaches. This is where creative breadth happens — before narrowing to a single draft.
Why brainstorm before drafting: A first draft locks in assumptions. If you brainstorm 10 ways to frame the "Problem" section and the user picks the framing that resonates, the resulting draft is far better than the one you would have written from your first instinct.
What to brainstorm per section:
Present options to the user. Use AskUserQuestion for clear-cut
choices. Curate together: which options land? Which need revision? Which
should be combined?
Write the document section by section using the Edit tool. After each section:
Do NOT write all sections and then ask for feedback. By the time a user reads a 2000-word draft, they've lost the energy to give detailed feedback on each section. Section-by-section review catches problems early when they're cheap to fix.
The right tone depends on the audience and goal from Stage 1:
| Audience + Goal | Tone | |---|---| | Engineers + technical decision | Precise, direct, evidence-based. Short sentences. Code examples. | | Leadership + proposal | Clear, confident, outcome-focused. Quantify impact. Lead with the ask. | | New hires + onboarding | Warm, patient, no jargon without definition. "You'll see X" not "X exists." | | External partners + API docs | Neutral, complete, example-heavy. Assume nothing about internal context. | | Incident reviewers + postmortem | Factual, blameless, timeline-driven. Clear separation of what happened vs. what we'll do. |
If the tone feels wrong during drafting, stop and recalibrate. Ask the user: "This section reads as [X] — is that the right register for [audience]? Should it be more [Y]?"
After all sections are drafted, read the document end-to-end and check:
Stage 2 is complete when:
The goal is to verify that the document communicates what the author intends. Writers are the worst judges of their own clarity — they fill in gaps from memory that readers don't have.
Spawn a fresh Claude Code sub-agent with NO context from the writing process. This is critical — the sub-agent must simulate a naive reader, not a collaborator who already knows the backstory.
Setup:
Write 2-3 comprehension questions tailored to this document. These should test the document's KEY claims, not trivia. Examples:
Dispatch a foreground sub-agent with ONLY:
You are a reader testing this document for clarity and completeness.
You have NO prior context about this topic — only what the document
tells you.
1. Summarize the document in 3 sentences.
2. List the top 3 decisions or recommendations the document makes.
3. Identify any sections that are confusing, incomplete, or
contradictory.
4. Answer these comprehension questions:
[insert your 2-3 questions here]
5. List any terms or acronyms used without definition.
6. Note any place where you had to re-read a sentence to understand
it.
Do NOT include any context from Stage 1 or Stage 2 in the sub-agent prompt. No brain-dump content, no design.md, no conversation history. The sub-agent must work from the document alone.
Evaluation: Compare the sub-agent's responses against the author's intent:
| Sub-agent result | What it means | Action | |---|---|---| | Summary matches intent | Core message is clear | No change needed | | Summary misses a key point | That point is buried or unclear | Elevate it — move earlier, make it a heading, add emphasis | | Wrong answer to comprehension question | The document is ambiguous or misleading | Rewrite the relevant section for clarity | | "Confusing" flag on a section | The section assumes context the reader doesn't have | Add context, define terms, or restructure | | Terms listed without definition | Jargon leak | Add definitions or a glossary | | Re-read needed | Sentence is too complex or poorly structured | Simplify — shorter sentences, clearer antecedents |
For environments where sub-agents are not available, simulate the reader test yourself. This is less reliable than the sub-agent approach because you wrote the document and cannot fully forget your context, but it still catches obvious gaps.
For each gap identified in 3.1 or 3.2:
After reader testing revisions are complete, present the final document for user approval:
ToolSearch query: "+orbit await_review"orbit_await_review on the document fileStage 3 is complete when:
This skill must NOT:
development
Use after discovery to write implementation plans with TDD-granularity steps. Produces plan.json (immutable definition, frozen after approval), progress.json (mutable execution state), and masterPlan.md (user-facing proposal for Orbit review). Every step is one component/feature; TDD rhythm (test, verify fail, implement, verify pass, commit) lives in its progress items. Consumes discovery.md from exploration phase. Make sure to use this skill whenever the user says discovery is done, exploration is finished, discovery.md is ready, or asks to write/create/draft the implementation plan — even if they don't mention plan.json or masterPlan.md by name. Also use when the user references completed exploration findings, blast radius analysis, or consumer mappings and wants them converted into actionable steps. Do NOT use when: the user says 'just do it' or 'no plan', resuming or executing an existing plan, during exploration or brainstorming (discovery not yet complete), debugging, or code review.
tools
End-to-end webapp testing with Playwright MCP integration. Use when: writing Playwright tests, E2E testing, browser testing, webapp testing, visual regression testing, accessibility testing with axe-core, testing user flows through a web UI, verifying frontend behavior in a real browser. Integrates with test-driven-development skill for test-first browser tests and engineering-discipline for verification. Do NOT use when: unit tests only (no browser UI involved), API tests without UI, mobile native testing (use react-native-mobile), testing CLI tools, or writing backend-only integration tests.
development
Test-Driven Development workflow enforcing red-green-refactor cycles. Use when writing new features, adding behavior, or implementing functions where tests should drive design. Requires explicit test-first prompting because Claude naturally writes implementation first. Integrates with writing-plans (TDD rhythm in Progress items) and engineering-discipline (verification). Do NOT use when: fixing a bug in existing tested code (use systematic-debugging), writing tests for existing untested code (characterization tests are a different workflow), refactoring without behavior change (use refactoring), or the project has no test infrastructure.
development
Use when encountering any bug, test failure, or unexpected behavior. Enforces root cause investigation before fixes. Four phases: investigate, analyze patterns, form hypotheses, implement. Prevents guess-and-check thrashing. Use ESPECIALLY when under pressure or when 'just one quick fix' seems obvious. Do NOT use for: learning unfamiliar APIs (use exploration), performance optimization without a specific regression, or code review without a reported bug.