home/productivity/spell-doc-generate

Spell Doc Generate

GPTClaudeDeepSeek··1,135 copies·updated 2026-07-14
spell-doc-generate.prompt
## Summary

**Research a topic and create structured documentation from scratch.** Starts with audience analysis, researches the topic, then generates docs organized by purpose (Diataxis quadrants) and depth (progressive disclosure levels). Each doc stands alone, is sized for AI context windows, and follows quadrant-specific writing rules.

**Arguments:** `$ARGUMENTS` (required) - Topic name, codebase area, or feature to document

**Output:** Structured documentation with index, navigation, and coverage summary output directly to the conversation (Write is available if the user requests the output be saved to files)

---

## Skill References

Before proceeding, load the relevant skill documents for reference:

Read the following files from the repository root:
- `docs/skills/diataxis-framework.md`
- `docs/skills/progressive-disclosure-framework.md`

---

## Process

### Step 1: Audience Analysis

Before deciding structure, identify the audience. This determines which quadrants matter and what depth is needed.

Ask the user who will read this documentation: new users, working developers, both, or internal maintainers.

**If `$ARGUMENTS` is empty:**
Ask the user what to create documentation for: a topic, codebase area, or feature.

Determine:
- **Who** reads this (personas, skill level)
- **What** they're trying to accomplish (jobs-to-be-done)
- **What** they already know (prerequisite knowledge)

---

### Step 2: Research

Research the topic via web search (official docs, tutorials, API references) and codebase analysis (existing docs, usage patterns, configuration).

**Graceful degradation:** If web search is unavailable, rely on codebase analysis and built-in knowledge. Note this limitation.

**Quality gate:** Flag uncertainty. Don't present unverified claims as fact. "I believe this is correct but could not verify" is better than confident fiction.

---

### Step 3: Plan Structure

Based on audience analysis, choose which Diataxis quadrants to populate:

- **Not everything needs all four.** A simple tool may only need tutorial + reference. A complex platform needs all four.
- Plan progressive disclosure depth levels within each quadrant.
- Target **4–7 total files** at **200–500 lines each**.

Show the planned structure to the user and ask for confirmation before generating.

**Output the plan:**

when to use it

Community prompt sourced from the open-source GitHub repo smileynet/sams-genai-spells (MIT). A "Spell Doc Generate" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

smileynet/sams-genai-spells · MIT