/sdlc-knowledge-base:kb-init [--with-starter-pack | --empty] [--library <path>]from sdlc-knowledge-base
Initializes a project for knowledge base use by appending the [Knowledge Base] section to CLAUDE.md and creating the library/ directory structure. Optionally seeds with example library files.
Ships in sdlc-knowledge-base. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set up a project to use the sdlc-knowledge-base plugin. This skill is idempotent — safe to run multiple times. It checks for existing setup before making changes.
--with-starter-pack (default) — Seed library/ with three example library files synthesised from the Agentic SDLC research programme: agentic-sdlc-options.md, agent-suitability-rubric.md, specification-formality-and-agent-performance.md. New users get a queryable library on first install and can see the format end-to-end. The starter content is example only and meant to be replaced or extended.--empty — Create the library directory structure but skip the starter pack. Use when you want a completely empty library to populate from scratch.--library <path> — Initialise a library at this explicit path instead of ./library
and skip the CLAUDE.md append (the section assumes one library at the default path).
Use for isolated testing or a secondary library. See #209.Check that the sdlc-knowledge-base plugin is available. If not, report:
sdlc-knowledge-base plugin is not installed. Run:
/plugin install sdlc-knowledge-base@ai-first-sdlc
Then re-run this skill.
The schema section gets appended to the project's CLAUDE.md. If CLAUDE.md does not exist, report:
CLAUDE.md not found in the project root. Create it first (even an empty file is fine), then re-run this skill.
Read CLAUDE.md and look for an existing ## Knowledge Base heading. If present, report:
[Knowledge Base] section already exists in CLAUDE.md. Skipping append.
If you want to reset the section, remove it manually and re-run this skill.
Then proceed to step 5 (directory creation) — it's still useful even if the section already exists.
Read the template from templates/claude-md-section.md (relative to this skill's directory; in plugin install this resolves to ${CLAUDE_PLUGIN_ROOT}/skills/kb-init/templates/claude-md-section.md).
Strip the HTML comment block at the top of the template (the <!-- ... --> block explaining what the template is for).
Append the remaining content to CLAUDE.md with one blank line of separation.
Report what was added:
Appended [Knowledge Base] section to CLAUDE.md (XX lines).
Check whether library/ exists. If it does, skip the directory creation step (the starter pack copy in step 6 is still useful and safe).
If --library <path> is given, create the structure under <path> instead of ./library, and skip steps 2-4 (the CLAUDE.md append).
If it does not, create:
library/
library/raw/
Plus a placeholder library/.gitkeep so git tracks the empty directory.
Report:
Created library/, library/raw/
Default mode (--with-starter-pack or no argument): copy the starter pack from the plugin install directory into the project's library/. The starter pack files live at ${CLAUDE_PLUGIN_ROOT}/skills/kb-init/templates/starter-pack/library/:
agentic-sdlc-options.mdagent-suitability-rubric.mdspecification-formality-and-agent-performance.md_shelf-index.md (with placeholder hashes)log.md (with starter header and install entry)For each file, check whether the destination already exists in library/. If yes, skip (don't overwrite). If no, copy.
Report:
Seeded library/ with starter pack:
Copied: agentic-sdlc-options.md
Copied: agent-suitability-rubric.md
Copied: specification-formality-and-agent-performance.md
Copied: _shelf-index.md (placeholder hashes — run kb-rebuild-indexes to regenerate)
Copied: log.md
After copying, recommend the user run /sdlc-knowledge-base:kb-rebuild-indexes to replace the placeholder hashes in the shelf-index with real ones based on the actual file contents.
--empty mode: skip the copy entirely. Create only the directory structure plus an empty log.md with the starter header:
# Knowledge Base Log
Append-only chronological record of ingest, query, and lint events.
Format: `## [YYYY-MM-DD] <operation> | <subject>`
Report:
Created empty library structure (no starter pack).
Add raw sources to library/raw/ and run kb-ingest to populate.
Print a summary of what to do next.
For --with-starter-pack (default):
Knowledge base initialised with starter pack.
Next steps:
1. Run /sdlc-knowledge-base:kb-rebuild-indexes to replace placeholder hashes with real ones
2. Try a query: /sdlc-knowledge-base:kb-query "What does our research say about specification formality?"
3. Review the example library files in library/ — replace or extend with content for your problem space
4. Add your own raw sources to library/raw/ and run /sdlc-knowledge-base:kb-ingest <source> to integrate
5. Read CLAUDE.md's new [Knowledge Base] section for the full conventions and workflow
For the format and design rationale, see:
- The plugin README at plugins/sdlc-knowledge-base/README.md
- The pattern document at docs/architecture/knowledge-base-pattern.md (in the framework repo)
For --empty:
Knowledge base initialised (empty).
Next steps:
1. Add raw sources to library/raw/ (papers, articles, reports, conversation excerpts)
2. Run /sdlc-knowledge-base:kb-ingest <source> to integrate them into structured library files
3. After your first few library files exist, run /sdlc-knowledge-base:kb-rebuild-indexes to build the shelf-index
4. Query the library with /sdlc-knowledge-base:kb-query "your question"
5. Read CLAUDE.md's new [Knowledge Base] section for the full conventions and workflow
For the format and design rationale, see:
- The plugin README at plugins/sdlc-knowledge-base/README.md
- The pattern document at docs/architecture/knowledge-base-pattern.md (in the framework repo)
kb-ingest produces library files from them.kb-rebuild-indexes does that, after library files exist.This skill is safe to run multiple times. On second invocation:
[Knowledge Base] section in CLAUDE.md is detected and not duplicatedlibrary/ directory is detected and not recreatedtemplates/claude-md-section.md (opens in a new tab)templates/starter-pack/library/_shelf-index.md (opens in a new tab)templates/starter-pack/library/agent-suitability-rubric.md (opens in a new tab)templates/starter-pack/library/agentic-sdlc-options.md (opens in a new tab)templates/starter-pack/library/log.md (opens in a new tab)templates/starter-pack/library/specification-formality-and-agent-performance.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub stevegjones/ai-first-sdlc-practices --plugin sdlc-knowledge-base16 skills in this plugin
/kb-audit-queryFilter and summarise the cross-library KB audit log. Reports confidentiality events (attribution drops, synthesis aborts, dispatcher failures, no-evidence markers, cross-library promotions) over a date range, by event type, and by source handle./kb-ingestIntegrate a new source into the project knowledge base. Wraps the agent-knowledge-updater agent. Source can be a local file path, a URL, or pasted content. The updater reads the source, classifies it, identifies which existing library files it touches, makes surgical updates or creates new files, rebuilds the shelf-index, and appends to log.md./kb-ingest-batchDrive agent-knowledge-updater over a batch of staged files in library/raw/. Tracks progress in .batch-progress.json for resume support. Sequential by default; --parallel <N> opt-in (max 5). Single shelf-index rebuild and one consolidated log.md entry at the end./kb-ingest-bulkParallel map-reduce bulk ingest for large source sets. Map phase dispatches read-only knowledge-extractor agents (≤N-wide, default Haiku) emitting per-source JSON extracts; Python routes extracts by target library file (fuzzy-merging new topics, pre-allocating new files, flagging oversized topics); reduce phase dispatches one agent-knowledge-updater per file (parallel, one writer per file); single shelf-index rebuild + one log.md entry. Resumable. Supersedes kb-ingest-batch./kb-layersManage the project's layer vocabulary — list allowed layers with file counts, add new layers, or safely remove unused layers. Reads the shelf-index for usage data; writes CLAUDE.md atomically. No agent dispatch./kb-lintHealth-check the project knowledge base. Looks for contradictions between files, stale claims that newer sources have superseded, orphan files with no inbound cross-references, important concepts mentioned but lacking their own page, missing cross-references, and data gaps. Returns a structured report; does not auto-fix.Other plugins' skills for the same job