Claude-skill-registry bootstrapping-design-docs
Creates design document infrastructure including templates, workflows, and a specific design doc skill. Use when setting up design docs for a new project or when the user mentions "bootstrapping-design-docs".
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/bootstrapping-design-docs" ~/.claude/skills/majiayu000-claude-skill-registry-bootstrapping-design-docs && rm -rf "$T"
skills/data/bootstrapping-design-docs/SKILL.mdFor the rest of this document
{DESIGN_DOC_SKILL_NAME} will refer to the name of the skill we will make that will later be used to generate design docs for this project. Default: creating-design-doc.
Once you create the base design doc template and skill, you must ask questions to the user to help clarify anything you are unsure of.
This is a joint user-agent process: ask targeted questions when unsure; do not finalize templates without user review.
</objective>
<outputs>
Create (idempotent; do not overwrite without preserving history):
<file_list>
- How design docs are written, reviewed, and used for delegated execution.design-docs/README.md
- Directory for active design documents.design-docs/active/
- Directory for agent-executable XML subtasks.design-docs/agents/
- The generated.{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/SKILL.md
skill.${DESIGN_DOC_SKILL_NAME}
- Lists available templates and when to use them..{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/README.md
- Meta "base" design doc template (guardrails + structure)..{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/base.md
- Project-specific templates (e.g.,.{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/<variant>.md
,etl-pipeline.md
). </file_list>feature.md
Note: Templates are bundled with the skill (not in
design-docs/) per Agent Skills progressive disclosure pattern.
<output_format> Design docs are written in markdown - not XML. Markdown is easier for humans to read/edit and for agents to parse during collaboration. Agent-executable subtasks use XML in a separate file under
design-docs/agents/.
</output_format>
<agent_name_resolution> Replace
{AGENT_NAME} with the agent's config directory:
- Aider.aider/
- Claude Code.claude/
- OpenAI Codex CLI.codex/
- GitHub Copilot.copilot/
- Cursor.cursor/
If the repo has an existing agent config directory, use it. If multiple exist, prefer the current agent's. If none exist, create one. </agent_name_resolution> </outputs>
<preconditions> Before asking questions, scan the repo to ground defaults: If you have not already, run the $activating-memories skill to get an overview of the project. <scan_targets> 1. **Languages/frameworks/build files** 2. **CI entrypoints** 3. **Project Specific Utility modules** 4. **DB/migrations** 5. **Style rules** </scan_targets> </preconditions><generation_steps>
-
Create folder structure (if missing):
design-docs/design-docs/active/design-docs/agents/.{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/.{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/
-
Write design doc skill and bundled templates:
(workflow + approvals)design-docs/README.md
(the skill).{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/SKILL.md
(template index).{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/README.md
(meta template with guardrails).{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/base.md
(skill creation template).{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/skill.md
(feature template).{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/feature.md
-
Run Adaptive Questioning Protocol:
- Produce "Detected Defaults Summary"
- Ask triggered questions
- Stop for answers before proceeding
-
Idempotency:
- Never overwrite existing templates without timestamped backup
- Add new variants to
</generation_steps>.{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/README.md
<questioning_protocol> Ask only questions that materially influence template contents.
<question_tags> Every question must be tagged:
- must be answered to generate correct template or enforce safety[blocking]
- significantly improves template quality / reduces future rework[important]
- preference-level; safe defaults exist </question_tags>[optional]
<question_budget>
- Max 10 questions total.
- Each question includes a one-line "why" tying to a template section, guardrail, or convention. </question_budget>
<triggered_questions> Ask only what applies based on scan:
- Migrations tooling detected -> ask DB reset/backfill/rollback/testing policy
- HTTP/WS dependencies detected -> ask record/replay + fixture storage constraints
- Monorepo structure detected -> ask where templates live and how commands differ
- No tests/CI detected -> ask what canonical verification commands should be </triggered_questions>
<template_delta_preview> Before writing files, show:
- Which variants will be created
- Repo-specific defaults that will be baked in
- Any tightened guardrails derived from project norms
- Any unresolved
items[blocking]
Stop and ask for
[blocking] answers before proceeding.
</template_delta_preview>
</questioning_protocol>
<common_questions> Ask only what you cannot infer from the scan: <question_examples>
-
Template variants desired[blocking]- "Which templates do you want generated? (e.g.,
,feature
,etl_http_ws
,db_migration
)"refactor - Why: determines templates bundled with skill.
- "Which templates do you want generated? (e.g.,
-
Test integrity policy[blocking]- "What is your rule on mocks? (only mock boundaries; prefer record/replay; never mock core transforms)"
- Why: populates guardrails + testing strategy.
-
Data capture constraints[blocking]- "Can we store captured payloads under
? Any size/licensing/PII constraints?"tests/fixtures/ - Why: populates test-data acquisition plan.
- "Can we store captured payloads under
-
Destructive actions boundary[blocking]- "What DB reset patterns are allowed in tests? (transactions/temp schema/containers). Forbidden actions?"
- Why: prevents unsafe "delete DB to pass tests" behavior.
-
Type discipline[important]- "For Python projects, what is your stance on Optional/None? (forbid unless justified; require invalid states unrepresentable)"
- Why: shapes interface-contract requirements.
-
Review workflow[important]- "Stop at Template Delta Preview for approval, or write files and you review diffs?"
- Why: controls collaboration checkpoint. </question_examples> </common_questions>
<base_template_sections> The base template MUST include these sections (in order):
- Identity and lifecycle
- Context
- Problem
- Goals / Non-goals
- Requirements (FRs / NFRs)
- Constraints and invariants (include DB + test integrity)
- Proposed design (architecture, contracts, schemas, idempotency/retries)
- Project common utilities that will be used.
- Project common utilities that will be created.
- Interface contracts (explicit signatures; Optional/None justification required)
- Alternatives considered (>=2)
- Test data acquisition plan (mandatory for external I/O / ETL)
- Testing and verification strategy (commands + CI gates + test integrity rules)
- Rollout / migration / ops (flags, backfills, observability, runbook)
- Open questions / follow-ups
- Subtasks (human-readable checklist for review)
Subtasks Section Format:
## Subtasks ### T1: [Task Title] - **Summary**: One sentence objective - **Scope**: What's in / what's out - **Acceptance**: Binary pass/fail criteria - **Status**: [ ] Not started / [~] In progress / [x] Complete ### T2: [Task Title] ...
</base_template_sections>
<guardrails> Include verbatim in the design doc skill you create under "Engineering Guardrails for Agent Execution":- Reuse-first rule (anti-duplication): search existing utilities; record decision per task.
- No destructive shortcuts: never delete dev/prod data to pass tests; destructive actions require confirmation.
- Test integrity (anti-mock-cheating): mock boundaries only; prefer record/replay; do not change tests without spec change approval.
- Signature discipline (anti-vagueness): explicit types/invariants; Optional/None requires justification and handling strategy.
- Alternatives requirement: evaluate >=2 alternatives + "do nothing".
- Uncertainty protocol: ask
questions when unsure; do not proceed. </guardrails>[blocking]
<completion_criteria>
exists with README +design-docs/
+active/
subdirectoriesagents/- name of ${DESIGN_DOC_SKILL_NAME} confirmed with user.
skill exists at${DESIGN_DOC_SKILL_NAME}.{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/- Templates bundled at
.{AGENT_NAME}/skills/{DESIGN_DOC_SKILL_NAME}/templates/
includes guardrails and human-readable subtasks section formatbase.md- At least one project-specific template variant exists with repo-specific test commands
- Skill workflow: human-readable subtasks in main doc -> user approval -> XML in
</completion_criteria>design-docs/agents/
<decision_points>
- No existing config directory -> create one for current agent
- Multiple templates requested -> generate each as separate variant file
- User wants immediate write vs preview -> honor preference from question 6 </decision_points>
<failure_modes>
- Scan finds nothing -> ask user for stack/commands explicitly
- Conflicting conventions -> note in template as "resolve before use"
- Overwriting existing templates -> create backup with timestamp first </failure_modes>