scaffold-documentation

Creates the canonical documentation tree with seed READMEs and ledger entries for a repository.

2|Updated Jul 18, 2026
One-click install
npx skills add https://github.com/Arasz/ai-badger --skill scaffold-documentation-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-documentation
Source: https://github.com/Arasz/ai-badger/tree/main/features/common/skills/documentation/references/scaffold-documentation
Command: npx skills add https://github.com/Arasz/ai-badger --skill scaffold-documentation-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Repositories without a documentation structure end up with documents scattered in ad-hoc locations, missing directory maps, and files that later have to be moved at the cost of their history. This Skill establishes the complete canonical docs tree before any content is written, so every future document has a legal home from the first commit. ## Core Features & Use Cases - Canonical tree creation: Inventories the current tree against the canonical Diátaxis-based layout (tutorials, how-to, reference, explanation, adr, work, assets), creates every missing directory, and gates all content writing on a clean structure check. - Complete seed READMEs: Writes a root README as a full map of every directory plus one README per directory listing every file, with humanized prose and verified relative links. - Ledger integration: Records every seeded file in the project's documentation ledger when one exists, and supports a config-gated extension that binds a project's docs tool (check, scaffold, link-check, record subcommands) via .ai-badger/config.json. - Use Case: A fresh repository contains only a README. Invoke this Skill to produce the full docs/ tree, a root map README, per-directory READMEs, and ledger entries so the next documentation check passes immediately. ## Quick Start Set up the canonical documentation structure for this repository, including the docs tree, directory READMEs, and ledger entries.

Frequently Asked Questions about scaffold-documentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a documentation structure for a new repository?

Run the scaffold to create the canonical tree (tutorials, how-to, reference, explanation, adr, work, assets), then write a root README mapping every directory and one README per directory. Record seeded files in the project ledger if one exists.

What documentation layout does the Diátaxis framework use?

The tree separates docs by purpose: tutorials for learning, how-to for tasks, reference for lookup, explanation for understanding, plus adr for frozen decisions and work for dated records. Filenames are kebab-case with per-directory grammar rules.

When should I not use the documentation scaffolding skill?

Do not use it to add or edit a single document (use update-documentation) or to reorganize an existing docs tree (use migrate-documentation). If the structure inventory comes back empty, the tree is already canonical and no scaffold is needed.

Can the docs root be a directory other than docs/?

Yes. The docs root defaults to docs/ but a project can set docs.root in .ai-badger/config.json, and everything in the canonical tree is then relative to that configured root.

Why must no content be written before the structure check passes?

Content written into a wrong or incomplete tree must be moved later, and moving a file costs its history. The structure gate re-runs the inventory and blocks all content writing until it reports zero missing and zero extra paths.

What is a frozen file in a documentation tree?

A frozen file is never moved, renamed, reformatted, or given frontmatter. Paths become frozen when the build embeds them, configuration references them, they appear in open PRs, they sit under adr/, or they are not markdown.