From workflows
Internal skill for expanding section outlines into prose. Called after section outlines are complete.
npx claudepluginhub edwinhu/workflows --plugin workflowsThis skill uses the workspace's default tool permissions.
Expand detailed section outlines into prose, one section at a time, using domain-specific style rules.
Implements Playwright E2E testing patterns: Page Object Model, test organization, configuration, reporters, artifacts, and CI/CD integration for stable suites.
Guides Next.js 16+ Turbopack for faster dev via incremental bundling, FS caching, and HMR; covers webpack comparison, bundle analysis, and production builds.
Discovers and evaluates Laravel packages via LaraPlugins.io MCP. Searches by keyword/feature, filters by health score, Laravel/PHP compatibility; fetches details, metrics, and version history.
Expand detailed section outlines into prose, one section at a time, using domain-specific style rules.
Prerequisites: PRECIS.md, OUTLINE.md, ACTIVE_WORKFLOW.md, and at least one section outline in outlines/ must exist.
Auto-load all constraints matching applies-to: writing-draft (includes constraint-loading-protocol, source-anchored-citations, no-bold-lead, topic-sentences, and all shared writing constraints):
!uv run python3 ${CLAUDE_SKILL_DIR}/../../scripts/load-constraints.py writing-draft
You MUST have these constraints loaded before proceeding. No claiming you "remember" them.
CRITICAL: The constraint-loading-protocol above requires loading the domain skill (writing-legal/econ/general) and ai-anti-patterns before writing any prose — see Step 2 below.
START (all section outlines in outlines/ exist)
│
├─ Step 1: Load context (PRECIS, OUTLINE, ACTIVE_WORKFLOW)
│
├─ Step 2: Load domain skill (legal/econ/general)
│
├─ Step 3: Choose strategy (sequential/parallel/key-first)
│
├─ Step 4: For each section with outline:
│ ├─ Read outline from outlines/[Section].md
│ ├─ Cross-reference with PRECIS claim
│ ├─ Expand ALL outline points into prose
│ │ └─ Every POINT → paragraph(s)
│ │ └─ Every EVIDENCE → cited in prose
│ │ └─ Every TRANSITION → explicit bridge
│ ├─ Save to drafts/[Section] (Draft).md
│ ├─ Self-check: covers all outline points? cursory or developed?
│ └─ 5+ iterations same section? → ESCALATE to user
│
├─ Step 5: Update ACTIVE_WORKFLOW.md
│
└─ GATE: All OUTLINE sections have drafts/ files with substance?
├─ NO → Identify gap, re-draft (no pause)
└─ YES → Load writing-validate → Validate claim coverage → Then /writing-review
If text and flowchart disagree, the flowchart wins.
## The Iron Law of DraftingNO PROSE WITHOUT OUTLINE. Every section must have a detailed outline in outlines/ BEFORE you write prose for it. This is not negotiable.
If you find yourself drafting without a matching outline file:
Writing without an outline produces incoherent, wandering prose that requires complete rewriting.
## The Iron Law of Draft CompletenessReporting sections complete without verifying every outline point was expanded is NOT HELPFUL — the user publishes a draft with gaps that reviewers catch.
Before claiming a section is drafted:
If ANY point or evidence is missing, the section is NOT complete. Saying "draft done" when outline points were skipped wastes the user's time — they discover gaps during review that should never have survived drafting. The outline is a contract; the draft must fulfill it.
## The Iron Law of DepthEACH SECTION DESERVES FULL ATTENTION. Do not rush through sections to "finish" the draft. This is not negotiable.
The failure mode: a single agent writes cursory 2-paragraph versions of every section to reach "draft complete" as fast as possible. This is reward hacking - optimizing for the appearance of completion without the substance.
Each section must:
If you catch yourself writing a section significantly shorter than the outline implies, STOP. You are being cursory. Go back to the outline and expand every point.
Before starting, check for an existing handoff:
.planning/HANDOFF.md existsRead(".planning/ACTIVE_WORKFLOW.md")
Read(".planning/PRECIS.md")
Read(".planning/OUTLINE.md")
Based on style in ACTIVE_WORKFLOW.md, load the domain skill that governs prose style (relative to this skill's base directory):
| Style | Action |
|---|---|
| legal | Read("${CLAUDE_SKILL_DIR}/../../skills/writing-legal/SKILL.md") |
| econ | Read("${CLAUDE_SKILL_DIR}/../../skills/writing-econ/SKILL.md") |
| general | Read("${CLAUDE_SKILL_DIR}/../../skills/writing-general/SKILL.md") |
When style: legal is detected:
MUST Read the full skill file:
Discover path: ${CLAUDE_SKILL_DIR}/../../skills/writing-legal/SKILL.md, then Read() the output.
MUST use template for .docx export:
../writing-legal/templates/law_review_template.docx
Iron Laws from writing-legal:
If you create a legal docx without reading the skill and using the template, DELETE IT and START OVER.
### Econ Domain: MUST Load Full SkillWhen style: econ is detected:
MUST Read the full skill file:
Discover path: ${CLAUDE_SKILL_DIR}/../../skills/writing-econ/SKILL.md, then Read() the output.
Iron Laws from writing-econ:
Delete & Restart triggers:
If you write boilerplate in an econ paper, DELETE THE SECTION and START OVER with a hook.
Skill(skill="workflows:ai-anti-patterns")
You MUST load ai-anti-patterns before drafting. Domain skills catch domain-specific issues; ai-anti-patterns catches AI writing smell (hedging, filler, false balance, weasel words). Both layers are required — see constraints/constraint-loading-protocol.md for why.
Use AskUserQuestion to determine approach:
AskUserQuestion(questions=[
{
"question": "How should we draft the sections?",
"header": "Strategy",
"options": [
{"label": "Sequential (Recommended)", "description": "Draft sections one at a time in order. Best for maintaining argument flow."},
{"label": "Agent team (parallel)", "description": "Spawn teammate per section for parallel drafting. Best for long documents with independent sections. Requires reconciliation pass afterward."},
{"label": "Key section first", "description": "Start with the core argument section, then build outward. Best when the central claim needs to be strongest."}
],
"multiSelect": false
}
])
For each section with a completed outline, in order:
Read("outlines/[Section] (Outline).md")Every outline point becomes at least one paragraph
Every piece of evidence from the outline appears in prose
Transitions between subsections are explicit
Cite-fidelity (when ACTIVE_WORKFLOW.md has nlm_notebook): before
attaching any [@bibkey], run Stage 2 to get the actual supporting
passage, paste the emitted <!-- nlm-quote @key (anchor): "..." -->
comment above the cite, then write the prose around the quote — not
around what the source "probably says." See
references/constraints/cite-fidelity-nlm-grounding.md.
uv run ${CLAUDE_PLUGIN_ROOT}/scripts/cite-fidelity/nlm_footnote_pull.py \
--claim "TEXT" --keys k1,k2,k3
Write("drafts/[Section] (Draft).md", content)
implements: [CLAIM-XX, CLAIM-YY] matching the outline's claim referencesAfter completing each section, IMMEDIATELY start the next section. Do NOT:
Pausing between sections is procrastination disguised as courtesy.
For parallel drafting using agent teams, read the full protocol:
Read ${CLAUDE_SKILL_DIR}/../../skills/writing-draft/references/parallel-drafting.md and follow its instructions.
When to use: Document has 5+ substantive sections, sections are relatively independent, and CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is enabled. Falls back to Sequential if unavailable.
After each section, update .planning/ACTIVE_WORKFLOW.md:
phase: draft
current_section: [section name]
sections_drafted:
- [list of completed sections]
edits_since_verify: 0
Before proceeding to edit/verify (see constraints/gate-function-standard.md for the full 6-step gate including SUMMARY):
drafts/ for all sections listed in OUTLINE.mddrafts/, compare against OUTLINE.md sectionshuman-verify — auto-advance to writing-validate..planning/PHASE_SUMMARY.md (see constraints/phase-summary-frontmatter.md):
Reporting "all sections drafted" without checking each file is NOT HELPFUL — the user moves to review with missing sections that force a return to drafting. You must verify every draft exists and has real content.
If a section fails the gate:
| Failure Type | Action |
|---|---|
| Structural (missing outline points) | REJECT section. Re-read outline. Re-draft with ALL points. |
| Depth (points present but cursory) | RETURN to agent with expanded outline and word-count target. |
| Logic (draft doesn't match outline logic) | REJECT. Diagnose where outline logic broke down. |
Re-draft WITHOUT pausing. Agent re-opens outline, re-reads PRECIS.md, expands section with full depth.
After drafting each section, run a quick self-verification loop before moving to the next section:
Draft section → Self-check (outline coverage + depth + evidence) →
├─ PASS → Next section (no pause)
└─ FAIL → Re-read outline → Fix gaps → Self-check again (max 3 per section)
└─ Still failing after 3 → Flag for later, move on
This catches depth and coverage issues WITHIN each section before they accumulate. The gate at phase exit catches cross-section issues.
No iteration limit at draft stage overall, but 3 iterations per section for the quality loop. Cheap iterations here prevent expensive rework later.
Skipping the subsection expansion check is NOT HELPFUL — the user publishes a stub where a full section should be. A 2-paragraph section with a 5-subsection outline is a stub, not a draft.
If 5+ iterations on the same section without meaningful progress, STOP and escalate to the user for scope adjustment.
Signs you are stuck:
When escalating, present:
Spinning without progress is anti-helpful. Five iterations is the threshold for asking the user if scope needs adjustment.
When drafting reveals unplanned issues, follow this 4-rule system:
| Rule | Trigger | Action | Permission |
|---|---|---|---|
| R1: Factual Error | Wrong fact, misattribution, incorrect citation, anachronism, wrong date/name | Fix → verify against source → track [Rule 1 - Factual] | Auto |
| R2: Missing Evidence | Claim without citation, unsupported assertion, missing example, evidence gap | Add evidence/citation → track [Rule 2 - Evidence] | Auto |
| R3: Structural Blocker | Missing section referenced by another, broken cross-reference, orphaned footnote, missing transition | Fix blocker → track [Rule 3 - Structural] | Auto |
| R4: Argument Restructuring | Claim order needs changing, thesis angle needs adjustment, major section add/remove, argument flow fundamentally broken | STOP → present to user → may require .planning/OUTLINE.md revision → track [Rule 4 - Restructuring] | Ask user |
Priority: R4 (STOP) > R1-R3 (auto) > unsure → R4.
Edge cases:
Tracking format per section: Each section's draft summary should include: Deviations: N auto-fixed (R1: X, R2: Y, R3: Z). R4 escalations: [list or "none"].
| Excuse | Reality | Do Instead |
|---|---|---|
| "I'll outline in my head, no file needed" | Mental outlines produce wandering prose | Write the outline file first |
| "This section is short, outline is overkill" | Short sections still need structure | Write a brief outline, then expand |
| "I'll draft all sections at once for flow" | Monolithic drafting loses focus and depth | One section at a time, verify each |
| "The outline is close enough to prose already" | Outlines organize; prose argues | Expand with evidence and transitions |
| "I'll fix the structure in editing" | Structural problems in drafts compound | Get structure right in outline, before prose |
| "This doesn't match the outline but it's better" | Unplanned deviations are usually rationalizations | Update outline first, then draft to match |
| "I'll write a quick version now and expand later" | "Later" means never. Cursory drafts stay cursory. | Write it properly the first time |
| "The user just wants to see something fast" | Fast garbage requires more rework than slow quality | Invest in depth now, save rework later |
| "This section only needs 2 paragraphs" | If the outline has 5 subsections, 2 paragraphs is cursory | Match the depth the outline implies |
| "I can skip the evidence for now" | Evidence-free claims are assertions, not arguments | Include every piece of evidence from the outline |
| Action | Why Wrong | Do Instead |
|---|---|---|
| Drafting without reading the section outline | Prose will drift from structure | Read outline first, always |
| Writing multiple sections simultaneously | Lose focus, miss transitions, cursory treatment | One section at a time |
| Ignoring domain style rules | Generic prose instead of appropriate register | Load and follow domain skill |
| Skipping the PRECIS cross-reference | Section may not advance the argument | Check which claim this section serves |
| Stopping after one section to ask user | Breaks momentum and context | Continue to next section immediately |
| Writing a section in 2 paragraphs when outline has 5 subsections | You are being cursory to "finish" faster | Expand every subsection properly |
| Skipping evidence mapped in the outline | Claims without evidence are assertions | Include all evidence, developed in prose |
| Your Drive | Why You Skip | What Actually Happens | The Drive You Failed |
|---|---|---|---|
| Helpfulness | "Finishing the draft fast helps the user" | Cursory drafts create 3x the rework. Every skipped outline point becomes a revision cycle. Your speed produced waste. | Anti-helpful |
| Competence | "I know the domain style rules" | You didn't load the domain skill. The prose reads as generic AI output. Reviewers will flag every paragraph. Your confidence was incompetence. | Incompetent |
| Efficiency | "Outlining is overkill for a short section" | The section wandered without structure. You rewrote it twice. The 5-minute outline would have saved 30 minutes. Your "efficiency" was a 6x slowdown. | Anti-efficient |
| Approval | "The user wants to see progress" | You showed a cursory draft. The user sees thin prose and loses confidence in the workflow. Next time they'll micromanage every section. You lost autonomy. | Lost approval |
| Honesty | "I expanded the outline points" | You skipped 3 of 5 subsections. The user discovers gaps during review — your shortcut created rework they trusted you to prevent. | Anti-helpful |
After all sections are drafted:
Read ${CLAUDE_SKILL_DIR}/../../skills/writing-validate/SKILL.md and follow its instructions. Follow its instructions to validate claim coverage before review.