Interactive onboarding wizard that scaffolds an agentic-kb workspace around a flexible layer graph.
Ships in kb. 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.
This skill is the single entry point for bootstrapping an agentic-kb workspace. It is idempotent: reruns add missing pieces, propose graph extensions, and never overwrite existing material without confirmation.
This skill initializes the user's KB workspace. It does not distribute itself.
Two concerns, two tools:
| Concern | Who handles it | When |
|---|---|---|
Get kb-management + kb-setup + kb-operator into the harness | Marketplace install or scripts/install.py | Before this skill runs |
| Scaffold the user's layer repos, config, and workspace indexes | This skill | When the user types /kb setup |
/kb setup.kb-management detects no .kb-config/layers.yaml in the current workspace and the user tries any /kb command.The interview is goal-oriented, not feature-list-driven. Phase 1 collects the minimum admin facts the wizard cannot infer (workspace root and harness — frontloaded so the user knows where files will land before they invest in long answers); phase 2 asks the user about their world in their own language; phase 3 shows a derived plan and lets the user adjust before anything is written.
Ask each block in order. Stop and wait after each block for the user's answer before proceeding. Never ask the user to enumerate layers, features, contributor-mode flags, or scopes in phase 2 — those are derived in phase 3 and only adjusted there.
This phase runs first so the user always knows which directory the scaffold will land in and which harness will host /kb before they invest in open-ended answers. Wrong harness or wrong workspace root caught here is a one-line fix; caught after phase 2 it is sunk-cost frustration.
~/Downloads, a non-git directory the user did not expect).claude-code, vscode, opencode, codex, gemini, kiro. Used by scripts/install.py to decide where harness hooks are written (.claude/commands/, .github/prompts/, .agents/skills/, etc.). The right answer here prevents a silent "No KB detected" later.work/signals/, work/missions/, org/<layer>/, CONFIG.yaml, CODEOWNERS with policy directories). If a repo-as-OS structure is detected, surface it before phase 3 so the proposal can reuse existing repos and propose bridge defaults instead of inventing parallel structure.Question count continues from phase 1 (Q4–Q11 global numbering, as listed in the placeholder mapping section below).
foundation/me.md and contributor directories.consumer rather than contributor).connections: and primitive-storage: per layer and to decide whether the lean export-backed roadmap path applies.reports, roadmaps, journeys) and dashboard panels.references/automation-levels.md for the full contract. Note: agentic-kb does not ship a scheduler — at level 2/3 the user wires OS cron, CI, or their harness's native automation to invoke /kb.references/adoption-stages.md); answers steer the proposed scaffold scope and automation level so the user does not get a Stage-3 setup when they are starting at Stage 1, and does not get a Stage-1 setup when they are already past it.The wizard presents a single concrete proposal derived from phase 1 + 2. The user reviews, adjusts inline if needed, and confirms. Do not ask the user to author the plan from scratch.
personal), no roadmap/journey features unless Q4/Q5/Q9 explicitly call for them, automation level 1, no connection-digest write-back. If Q4/Q5/Q9 mention product management, sequencing, customer journeys, launch planning, portfolio status, or stakeholder roadmap communication, propose roadmaps and/or journeys on the layer whose audience owns that work and label the placement as adjustable. Default for a team already on a repo-as-OS framework: one shared contributor layer plus a connections.product-repos[] entry pointing at the existing governance repo. Ask only one yes-or-adjust question on this block; route deeper edits through targeted follow-ups (rename, add/remove a layer, flip role, change parent, change stage, move roadmaps/journeys to another layer).connections: per layer (sources from Q8, plus any repo-as-OS product-repo detected in Q3), the primitive-storage: decision for decisions/tasks/ideas/feature intake/roadmap items (files, tracker, or hybrid), the dashboard panels and report types that match Q9 outputs, the automation level from Q10 (1 / 2 / 3 per references/automation-levels.md), and any product-management feature blocks (roadmaps, journeys) that the requested artifacts imply. For each tracker-backed primitive, show the tracker provider, repo/project/key/query parameters known so far, the configured kind/type, the supporting KB summary directory, declared canonical CRUD capabilities, reserved digest write-back mode, and the setup artifacts to generate. For each roadmap/journey block, show the chosen owning layer, source inputs, output directories, and whether the first proof path is export-backed or live-adapter-backed. For every multi-user layer, also surface the default artifact visibility per enabled primitive (e.g. "findings, ideas, topics → contributor-scoped; decisions, tasks, foundation, reports → shared") per docs/REFERENCE.md §1 "Two orthogonal axes", so the user can flip visibility before scaffold rather than discovering the default by surprise. Same single yes-or-adjust prompt; collect provider-specific missing values through targeted follow-ups instead of adding a new global interview phase..kb-log/ entries, one cross-layer promote completed, foundation/vmg.md confirmed by stakeholders" before turning on automation level 2). The user can accept, edit, or skip this block; it is informational and does not block scaffold.builtin when Q3 does not mention external branding constraints.If the user wants to skip phase 2 entirely and author the plan directly, accept that and route to a compact expert path: ask the layer list with name/scope/role/parent/features/marketplace per layer, anchor, workstreams, automation, styling, IDE targets. Phase 1 (workspace root, IDE targets) is never skipped — the wizard needs both before it can write anything. Document this as the legacy entry point; the goal-oriented flow is the default.
Required:
| Tool | Check | Abort message if missing |
|---|---|---|
git | git --version exits 0 | Install git first |
| At least one selected harness surface | binary or writable target path exists | Install the harness first or deselect it |
Recommended:
| Tool | Why |
|---|---|
gh | GitHub-native publish and issue flows |
| SSH key for the user's git host | Push without password prompts |
For each declared layer:
layers.yaml.For every declared layer, create only the directories required by its enabled features.
Common files:
AGENTS.mdREADME.md.kb-log/.nojekyll when the layer will publish HTMLindex.html and dashboard.htmlFeature directories:
inputs → _kb-inputs/ + digested/YYYY/MM/findings → _kb-references/findings/YYYY/topics → _kb-references/topics/foundation → _kb-references/foundation/notes → _kb-notes/YYYY/delivery → _kb-delivery/briefs/ + _kb-delivery/specs/operations → _kb-operations/releases/YYYY/ + _kb-operations/incidents/YYYY/ideas → _kb-ideas/ + archive/YYYY/decisions → _kb-decisions/ + archive/YYYY/tasks → _kb-tasks/ + archive/YYYY/workstreams → _kb-workstreams/reports → _kb-references/reports/roadmaps → _kb-roadmaps/journeys → _kb-journeys/When a primitive family is configured as mode: tracker, setup still creates the supporting KB directory only for summaries, reports, backlinks, or archived context. It must not seed a competing canonical backlog or decision list that would make the file and tracker both look authoritative.
For multi-user layers, shared primitives live at the repo root and contributor-scoped primitives are created under contributor or team directories.
Write .kb-config/layers.yaml, .kb-config/automation.yaml, and .kb-config/artifacts.yaml into the anchor layer.
The anchor config must include:
workspace.rootworkspace.userworkspace.anchor-layerworkspace.aliaseslayers: entry per declared layerconnections, marketplace, roadmap, and journeys blocks per layerprimitive-storage blocks per layer, mapping decisions, tasks, ideas, feature intake, and roadmap items to files, tracker, or hybrid ownershipWhen Q4/Q5/Q9 indicate product-management work, setup should propose these blocks rather than waiting for the user to know the feature names. The user still confirms placement. The conservative default is to co-locate a roadmap scope with the journeys it cites in the same contributor-capable layer. Layered roadmaps and journeys are allowed by the layer graph, but setup should mark cross-layer roll-ups/inheritance as a later enhancement unless the user explicitly asks for an expert configuration.
Setup must propose primitive-storage instead of assuming file-backed decisions and tasks. Conservative defaults:
files for decisions, tasks, and ideas,kind: github-issues) as the default tracker for tasks, feature intake, and roadmap items; decisions default to tracker unless the user chooses hybrid for early deliberation in files,files fallback with the reason in the setup summary,tracker only when the roadmap source is already tracker-scoped; otherwise keep roadmap artifacts file-backed and read tracker data as evidence.If any primitive-storage entry uses mode: tracker or mode: hybrid, setup must generate or guide the selected tracker setup package.
For GitHub-backed trackers, setup writes or proposes the GitHub governance profile described in references/github-governance-profile.md:
.github/ISSUE_TEMPLATE/config.yml,.github/PULL_REQUEST_TEMPLATE.md,.github/labeler.yml,.github/workflows/kb-github-governance.yml,agent-skills/kb-tracker-workflow/SKILL.md (or the harness-equivalent skill location),GITHUB_GOVERNANCE_SETUP.md with the manual checklist for native issue types, project/status fields, milestones, labels, branch protection, CODEOWNERS, parent/sub-issues, and required checks that cannot be represented fully as files.For Jira-backed trackers, setup writes or proposes:
connections.trackers[] project/query/type/status mapping,primitive-storage mapping,For any tracker provider, setup records canonical CRUD separately from connection-digest write-back. A live tracker entry declares any implemented canonical operations in connections.trackers[].capabilities (create, status, label, comment, link) and names auth-env when it does not use documented ambient authentication. primitive-storage selects the canonical home; a declared capability says the adapter can execute that operation; available authentication makes it usable; and explicit user confirmation authorizes one proposed mutation. None of those later gates can repair an earlier failure. The separate connections.writeback block remains reserved for connection-digest-derived mutations, so setup must render enabled: false with an empty capability list.
Missing capability or authentication must produce the complete issue/update proposal plus exact manual UI/CLI/API steps. After the user supplies the resulting tracker identifier, setup or the operating skill records only the configured summary/backlink and handoff log; it never creates a competing canonical KB decision or task.
For an existing workspace, scan live tracker entries before validation. When an unambiguous pre-7.0 live adapter has no capabilities field, show the temporary normalized list from kb-management/references/tracker-backed-primitives.md, let the user accept or edit it, and persist the confirmed field. Copy a matching legacy roadmap auth-env name onto the canonical connection in the same preview, or ask the user to name auth-env / confirm documented ambient authentication. An explicit empty list is intentional read-only configuration and must not be expanded. Generic Jira/Linear kinds, export-backed entries, and custom adapters stay read-only until the user supplies a verified implemented list. Report unresolved legacy entries as migration warnings, not as silently unsupported adapters.
Write only the harness hooks needed for the selected surfaces:
.github/prompts/kb.prompt.md and .github/instructions/kb.instructions.md.claude/commands/kb.md.opencode/commands/kb.md.agents/skills/kb/SKILL.md.gemini/commands/kb.toml.kiro/skills/kb/SKILL.mdNever reinstall into a surface that is already up to date unless the user asked for --force behavior.
Minimum verification sequence:
index.html and dashboard.html for every layer,/kb status in the anchor layer,/kb start-day in the anchor layer,roadmaps or journeys are enabled, render their dry-run outputs,primitive-storage.*.tracker points to a declared tracker, that live adapters declare canonical CRUD capabilities, and that every mutation-capable token-only adapter names its required canonical auth-env source or the adapter documents an ambient authentication mechanism. Setup does not require an ambient session to be active: when it is unavailable, preserve the configured connection and let each mutation use the documented manual fallback until the user logs in. Also validate that required issue forms or type-mapping instructions exist for GitHub/Jira selections and that reserved connection-digest write-back remains disabled. A token-only adapter with no authentication source fails setup verification rather than completing with an unusable connection.Verification proves the scaffold is correct. It does not prove the workspace does anything yet. Step 7 closes that gap so the user leaves setup with a visible artifact and a curated 3–5 command shortlist, not with a read-only "Setup: OK" message and a flat dump of the full command surface.
7a — Optional bootstrap capture (default yes). Ask one question:
"Want to capture a first piece of material right now? Paste a URL, a file path, or short text. Skip with
noif you'd rather start clean."
If the user answers with content, route it through the full kb-management flow (evaluation gate → finding under _kb-references/findings/YYYY/ or skip with logged reason → topic update if score ≥ 3 → .kb-log/ entry → regenerate index.html and dashboard.html). Emit the resulting artifact path back to the user explicitly:
"Wrote
alice-personal/_kb-references/findings/2026-05-18-caches-and-invalidation.md(gate score 3/5).alice-personal/index.htmlupdated. Open it in your browser to see your first KB artifact live."
If the user answers no or skips, write a _kb-log/setup-skipped-bootstrap.md line and continue. The capture is optional, not required for setup to count as complete.
7b — Curated next-steps shortlist. Emit a priorized 3–5 command list, derived from the chosen adoption stage (Q11) and audience (Q7). Do not paste the full command surface; pick what this user should actually try first. Suggested patterns:
| Stage × audience | Shortlist (in this order) |
|---|---|
| Stage 1, solo | /kb capture <text-or-URL> · /kb note meeting <topic> · /kb review · /kb start-day |
| Stage 1, multi-user | /kb capture … · /kb note meeting … · /kb decide … · /kb promote <file> <layer> · /kb end-week |
| Stage 2, solo | /kb capture … · /kb review · /kb decide … · /kb digest <layer> · /kb start-day |
| Stage 2, multi-user | /kb capture … · /kb review · /kb promote … · /kb digest … · /kb end-week |
| Stage 3 (any) | /kb status · /kb digest <layer> · /kb audit · /kb end-week (the user owns the scheduler trigger that fires the rest, per automation-levels.md) |
Adjust if Q9 ("what you want out") names roadmaps or journeys — insert /kb roadmap and/or /kb journeys after capture. Adjust if Q9 names release/incident artifacts — insert /kb release and/or /kb incident.
The shortlist is informational, not blocking. The user can always invoke any documented verb; the full surface is documented in plugins/kb/commands/kb.md and plugins/kb/skills/kb-management/references/command-reference.md.
7c — Closing message. Emit one short summary, in plain language, naming exactly what was produced and what the user should do next. Example for Stage 1 solo with a bootstrap capture:
"Setup complete.
alice-personalis your anchor layer;team-observabilityis the contributor target for promotions. You wrote your first finding (_kb-references/findings/2026-05-18-...md), andindex.htmlreflects it. Try these next:/kb capture <text>to file more material,/kb start-dayfor a morning briefing,/kb note meeting <topic>before your next sync. Run/kb statusany time to see where you stand."
Adapt the wording to the actual scaffold, but keep three properties: (a) one short paragraph, not a wall of text; (b) name the actual artifact paths the user can open; (c) name 3 commands max in the closing, even if the full shortlist is longer.
7d — Ritual cadence reminder (level 1 only). If automation level is 1, append a second short paragraph naming the rituals that the user must trigger themselves and the recommended cadence. agentic-kb does not ship a scheduler (see references/automation-levels.md "Scheduler ownership") — at level 1 there is no scheduler at all, so the user is the only thing that pulls the trigger.
The closing message includes:
"Rituals are manual at level 1. Suggested cadence:
/kb start-dayeach morning,/kb end-daybefore you stop,/kb end-weekon Friday afternoon./kb statusis safe to run any time. If a ritual gets forgotten, the next/kb start-dayreconciles missing days from.kb-log/and git diff — but the more consistent you are early on, the cleaner the daily/weekly summaries get."
Setup also offers two optional artifacts to make the cadence stick:
_kb-references/rituals.ics with start-day, end-day (M–F), and end-week (Fri 15:00) events the user can drop into their calendar./kb status — kb-management already surfaces "missing today's start-day" under the "Rituals" triage signal (see plugins/kb/skills/kb-management/references/command-reference.md "Triage scan"). At level 1, the closing message points the user at /kb status as the explicit nudge channel.When automation level is 2 or 3, this block is replaced by the scheduler-ownership reminder (already covered in references/automation-levels.md "Scheduler ownership"): the user owns the cron/CI/harness-native trigger that fires the scheduled rituals.
If the user points setup at an older fixed-ladder KB:
/kb migrate layer-model in dry-run mode to preview the new layer graph,layers: entries,/kb migrate archives in dry-run mode to preview the year-based archive moves,Running /kb setup again:
Question references in this table use the global numbering: phase 1 covers Q1–Q3 (workspace root, IDE targets, discovery pass), phase 2 covers Q4–Q11 (the open-ended context block), phase 3 covers Q12–Q15 (proposal blocks the user adjusts or accepts), phase 4 covers Q16 (final yes).
The layer-graph scaffold uses double-curly setup placeholders for these token names:
| Token name | Source |
|---|---|
USER_NAME | Q4 |
ROLE | Q4 (role sentence extracted from the same answer) |
THEMES | extracted from Q4/Q5 (3–5 keywords); rendered as a bullet list into foundation/me.md |
KB_NAME | anchor-layer name (derived and confirmed in phase 3 question 1, i.e. Q12) |
WORKSPACE_ROOT | Q1 |
WORKSTREAM_1_NAME, WORKSTREAM_1_THEMES | extracted from Q5 (themes) and confirmed in phase 3 question 1 (Q12) |
WORKSTREAMS | rendered list of all confirmed workstreams, including repeated workstream token groups, for personal-kb-AGENTS.md |
ADOPTION_STAGE | derived from Q11 (today bucket); used in automation.yaml and the scaffolded foundation/me.md so the chosen stage is durable, not implicit |
AUTOMATION_LEVEL | derived from Q10 + Q11 (1, 2, or 3 per references/automation-levels.md); written into automation.yaml |
TEAM_NAME, ORG_UNIT_NAME | layer name from phase 3 question 1 (Q12) when the proposal includes a shared contributor or synthesis layer; used by the team-kb-* and org-kb-* templates |
REPO_INDEX, ALIAS_INDEX, KEYWORD_LOOKUP | rendered from the discovered + confirmed repo set (Q3 + phase 3 question 1, Q12); used by workspace-AGENTS.md |
VMG_VISION, VMG_MISSION, VMG_GOALS | populated by the VMG sourcing step (URL fetch, file read, or direct text per references/setup-flow.md); placeholders survive only if the user opts to fill VMG later, in which case a backlog item is created |
DATE | today |
VERSION | 1.0 on first scaffold |
Layer-specific repeated content beyond the anchor layer is rendered from the interview answers rather than from hard-coded placeholder names.
Substitution examples:
# before substitution
workspace:
anchor-layer: <KB_NAME placeholder>
# after confirmation
workspace:
anchor-layer: alice-personal
# if the user deliberately defers VMG text
vision: "<VMG_VISION placeholder>" # follow-up task required before setup is complete
The notes feature always includes general notes, meeting notes, and retros. Setup does not ask for those variants separately; it only decides whether the layer gets the notes feature at all. /kb note retro [topic] then uses the same _kb-notes/YYYY/ directory as the other note variants.
After writing the scaffold, scan the workspace for any remaining double-curly placeholder sequences outside the deliberate presentation-template placeholders. If any remain:
references/setup-flow.md — full step-by-step walkthrough with example output, including VMG sourcing and update guidance.references/github-governance-profile.md — generic GitHub issue/project/PR governance profile generated when GitHub is the tracker or repo workflow backbone.references/automation-levels.md — meaning of setup levels 1/2/3 and how they map into automation.yaml.references/adoption-stages.md — the human → agentic curve: Stage 1 (capture discipline) → Stage 2 (agent-assisted triage) → Stage 3 (bounded autonomous). Names what each stage scaffolds, the graduation criteria between stages, and how adoption stage and automation level relate.references/migration-guide.md — how to migrate an existing KB.references/troubleshooting.md — common setup issues.../../../docs/examples/first-hour.md — narrative onboarding walkthrough for new adopters (the user-facing companion to this skill).../../../docs/first-run-acceptance.md — deterministic acceptance baseline used by maintainers and team leads to verify rollout quality. Not the doc adopters read after first install — see first-hour.md for that.references/adoption-stages.md (opens in a new tab)references/automation-levels.md (opens in a new tab)references/github-governance-profile.md (opens in a new tab)references/migration-guide.md (opens in a new tab)references/setup-flow.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)templates/artifacts.yaml (opens in a new tab)templates/automation.yaml (opens in a new tab)templates/foundation-context.md (opens in a new tab)templates/foundation-me.md (opens in a new tab)templates/foundation-naming.md (opens in a new tab)templates/foundation-sources.md (opens in a new tab)templates/foundation-stakeholders.md (opens in a new tab)templates/foundation-vmg.md (opens in a new tab)templates/github/GITHUB_GOVERNANCE_SETUP.md (opens in a new tab)templates/github/ISSUE_TEMPLATE/bug.yml (opens in a new tab)templates/github/ISSUE_TEMPLATE/config.yml (opens in a new tab)templates/github/ISSUE_TEMPLATE/content_update.yml (opens in a new tab)templates/github/ISSUE_TEMPLATE/decision.yml (opens in a new tab)templates/github/ISSUE_TEMPLATE/feature.yml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/kb-journeysAuthor and publish user/customer/product journeys as living markdown with generated HTML views and standalone UI mocks. Journeys are hierarchical (journey → phase → sub-journey → step) with entry/exit conditions, interfaces, and readiness assessments. The skill ships authoring commands (ideate, discuss, review, refine) shared with kb-roadmap's contract, a neutral HTML template whose tokens are set by the adopter's `.kb-config/artifacts.yaml`, and a mock-extraction pipeline that renders every embedded UI mock as a linkable standalone page. Triggered by `/kb journeys` and journey-authoring phrases./kb-managementLean, layered knowledge management driven by the `/kb` command. Operates on a flexible layer graph, applies the five-question evaluation gate, tracks findings, notes (including retros), decisions, ideas, tasks, briefs, specs, releases, and incidents as first-class artifacts, digests connected repos and trackers, and publishes reusable skills to per-layer marketplaces./kb-roadmapReconcile planning-truth sources against delivery reality. Ingests ≥1 plan source (ticket export, milestone markdown, OKRs) and ≥1 delivery source (git repository, ADR set, release log), runs a five-tier correlation ladder, detects mismatches, and emits a living roadmap artifact in Markdown, HTML, and JSON. Triggered by `/kb roadmap` and roadmap-reconciliation phrases./kb:kb-setupfrom kb
npx claudepluginhub wlfghdr/agentic-kb --plugin kbOther plugins' skills for the same job