speckit-wiki-init
Skill107 starsChanged 9 months agoMITView on GitHub
Create the project wiki skeleton (schema, index, source registry) — the
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- commitSkill
- create-pull-requestSkill
- create-release-branchSkill
- create-release-notesSkill
- handle-pr-reviewSkill
- qlty-checkSkill
- record-code-review-feedbackSkill
- record-spec-feedbackSkill
- recreate-test-dbSkill
- redmine-playwright-loginSkill
- regression-checkSkill
- rubocopSkill
- speckit-agent-context-updateSkill
- speckit-analyzeSkill
- speckit-branch-convention-configureSkill
- speckit-branch-convention-renameSkill
- speckit-branch-convention-validateSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-review-codeSkill
- speckit-review-commentsSkill
- speckit-review-errorsSkill
- speckit-review-runSkill
- speckit-review-simplifySkill
- speckit-review-testsSkill
- speckit-review-typesSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- speckit-token-budget-compactSkill
- speckit-token-budget-conciseSkill
- speckit-token-budget-scopeSkill
- speckit-token-budget-usageSkill
- speckit-wiki-ingestSkill
- speckit-wiki-lintSkill
- speckit-wiki-querySkill
- speckit-wiki-statusSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
If provided, treat $ARGUMENTS as the wiki scope — one or two sentences describing what this wiki exists to accumulate (e.g.
- Very specific: line 41
Read .specify/extensions/wiki/wiki-config.yml if it exists.
- Very specific: line 51
If WIKI_DIR/SCHEMA.md already exists, do not overwrite anything.
- Very specific: line 59
Create WIKI_DIR/ and write each file below exactly once.
- Very specific: line 123
Do not create pages/ yet — the first ingest creates it.
- Distinctive: line 138
Never delete or truncate an existing wiki.
- Distinctive: line 139
Do not pre-populate pages from general knowledge — pages exist only when a registered source supports them.
- Very specific: line 141
Keep this command's own context usage minimal: do not scan the repo here.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Wiki Init Skill
Initialize LLM Wiki
Set up the persistent, LLM-maintained project wiki. After this command, the
project has a compounding knowledge layer — ordinary markdown, committed with
the repo — that ingest grows, query answers from, and lint keeps honest.
This implements the three-layer structure of Karpathy's LLM Wiki pattern: raw sources (immutable — your repo, spec artifacts, external documents) → the wiki (LLM-written, cross-referenced pages) → the schema (a configuration document defining the wiki's structure and maintenance rules).
User Input
$ARGUMENTSIf provided, treat $ARGUMENTS as the wiki scope — one or two sentences
describing what this wiki exists to accumulate (e.g. "Everything we learn
about the payments domain and our integration constraints"). key=value
tokens (e.g. directory=docs/wiki) are configuration overrides.
Steps
1. Resolve configuration
- Read
.specify/extensions/wiki/wiki-config.ymlif it exists; otherwise use the extension defaults (wiki/directory, 12 pages max per ingest, 600 words per page, citations required, 8-page query slice, 90-day staleness,index-and-linksauto-fix). - Apply any
SPECKIT_WIKI_*environment variable overrides, then anykey=valueoverrides from$ARGUMENTS(highest precedence). WIKI_DIR= the configuredstate.directory, relative to the repo root.
2. Idempotency check
If WIKI_DIR/SCHEMA.md already exists, do not overwrite anything. Report
that the wiki is already initialized, then behave exactly like
/speckit.wiki.status and stop. If the user supplied a new scope sentence in
$ARGUMENTS, append it to the ## Scope section of SCHEMA.md as an
additional numbered item instead.
3. Create the wiki skeleton
Create WIKI_DIR/ and write each file below exactly once.
SCHEMA.md — the schema layer (user-editable; every command obeys it):
# Wiki Schema
This file defines how this wiki is structured and maintained. Edit it to
change the rules; `/speckit.wiki.*` commands read it before writing anything.
## Scope
1. <scope from $ARGUMENTS, or "(not set — pass a sentence to /speckit.wiki.init)">
## Page types
| Type | Holds | Example title |
|------|-------|---------------|
| concept | domain ideas and definitions that outlive any feature | "Idempotency keys" |
| decision | choices made, alternatives rejected, and why | "Why SQLite over Postgres" |
| component | how a part of the system actually works | "Auth middleware" |
| reference | distilled external facts (APIs, papers, vendor limits) | "Stripe rate limits" |
| howto | procedures that took effort to figure out | "Local TLS setup" |
## Rules
- Pages live in `pages/`, one topic per page, kebab-case filenames.
- Every synthesized claim cites a source ID from `sources.md` (e.g. `(S003)`).
- Pages cross-reference with relative links: `[title](./other-page.md)`.
- A page that outgrows <ingest.page_max_words> words is split, and both halves
link to each other.
- Conflicting claims are kept side by side under a `> ⚠ conflict:` marker
until resolved — never silently overwritten.
- Frontmatter per page: `title`, `type`, `sources`, `updated` (ISO date).
## Maintenance workflows
- Grow: `/speckit.wiki.ingest <source>` — the only way knowledge enters.
- Use: `/speckit.wiki.query <question>` — answers come from pages, cited.
- Check: `/speckit.wiki.lint` — drift, orphans, contradictions, staleness.
- Resume: `/speckit.wiki.status` — the session-resume entry point.INDEX.md — the page directory (maintained by ingest and lint):
# Wiki Index
One line per page, grouped by type. Maintained by `/speckit.wiki.ingest` and
regenerated by `/speckit.wiki.lint` — hand edits will be preserved only in
page files, not here.
_No pages yet. Run `/speckit.wiki.ingest` to add the first source._sources.md — the source registry (raw sources are never copied, only pointed to):
# Source Registry
Append-only IDs (S001, S002…). Dedup key: normalized path or URL.
Sources are immutable inputs — the wiki never edits them.
| ID | Source | Type | First ingested | Last ingested | Pages touched |
|----|--------|------|----------------|---------------|---------------|Replace every <...> placeholder with the resolved configuration value.
Do not create pages/ yet — the first ingest creates it.
4. Report
Output a short confirmation:
- The resolved
WIKI_DIRand the three files created. - The scope (or a note that none is set).
- The active caps (pages per ingest, words per page, query slice).
- Next step:
/speckit.wiki.ingestto compound the first source — a feature'sresearch.md, a file, or a URL;/speckit.wiki.statusat any time — including from a brand-new session — to resume from the files.
Guardrails
- Never delete or truncate an existing wiki; this command only creates.
- Do not pre-populate pages from general knowledge — pages exist only when a registered source supports them.
- Keep this command's own context usage minimal: do not scan the repo here;
ingestreads what it needs when it needs it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

