agentleFS
haruharu/redmine_ai_helper/.claude/skills/speckit-wiki-init/SKILL.md

speckit-wiki-init

Skill107 starsChanged 9 months agoMITView on GitHub

Create the project wiki skeleton (schema, index, source registry) — the

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
  1. Very specific:

    If provided, treat $ARGUMENTS as the wiki scope — one or two sentences describing what this wiki exists to accumulate (e.g.

    line 32
  2. Very specific:

    Read .specify/extensions/wiki/wiki-config.yml if it exists.

    line 41
  3. Very specific:

    If WIKI_DIR/SCHEMA.md already exists, do not overwrite anything.

    line 51
  4. Very specific:

    Create WIKI_DIR/ and write each file below exactly once.

    line 59
  5. Very specific:

    Do not create pages/ yet — the first ingest creates it.

    line 123
  6. Distinctive:

    Never delete or truncate an existing wiki.

    line 138
  7. Distinctive:

    Do not pre-populate pages from general knowledge — pages exist only when a registered source supports them.

    line 139
  8. Very specific:

    Keep this command's own context usage minimal: do not scan the repo here.

    line 141

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

$ARGUMENTS

If 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

  1. Read .specify/extensions/wiki/wiki-config.yml if 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-links auto-fix).
  2. Apply any SPECKIT_WIKI_* environment variable overrides, then any key=value overrides from $ARGUMENTS (highest precedence).
  3. WIKI_DIR = the configured state.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_DIR and 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.ingest to compound the first source — a feature's research.md, a file, or a URL; /speckit.wiki.status at 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; ingest reads what it needs when it needs it.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.