# Wiki

> Wiki vault memory — retrieval, freshness, research, handovers. Use when the user says wiki, asks about vault, project memory, or knowledge context.

- Skill: `fasalzein/wiki` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add fasalzein/wiki`
- Raw SKILL.md: https://api.skillmd.com/api/skills/fasalzein/wiki/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search, Coding & Dev Tools
- Author: fasalzein (https://skillmd.com/u/fasalzein)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/fasalzein/wiki

---


<skill_context>
  <skill_dir>skills/wiki</skill_dir>
  <workspace_dir>/Users/tothemoon/Dev/code-forge/knowledge-wiki-system</workspace_dir>

  <path_policy>
    Relative file references in this SKILL.md normally resolve from skill_dir when they exist there.
    Plain workspace commands like git status and bun test usually run in the workspace unless instructed otherwise.
    Use $PI_SKILL_DIR/path for explicit bundled skill files.
    Use $PI_WORKSPACE/path for explicit workspace/project files.
  </path_policy>
</skill_context>

## Wiki/Forge session context

Resolve vault via `KNOWLEDGE_VAULT_ROOT` or `wiki config --effective --repo <path>`. Do not create durable project memory markdown inside the code repo unless the repo itself is the configured vault.
Forge-tracked use: obey the active Forge phase packet, its required skills, artifact owner, and allowed writes.
Standalone use: route durable memory through Wiki under `${KNOWLEDGE_VAULT_ROOT}/projects/<project>/`.

# Wiki

Wiki is the second-brain memory layer. Wiki remembers; Forge executes lifecycle.

Use this skill for knowledge repository work: vault root orientation, retrieval, source binding, research filing, handovers, freshness repair, and project memory questions. For real-project operation, follow `docs/production-operator-guide.md`.

## Boundary

- Wiki owns durable vault knowledge: notes, research, source bindings, handovers, recall, freshness, and drift.
- Forge owns tracked implementation: feature/PRD/slice state, active slice ownership, evidence, review, and close gates.
- Health inspects and reconciles freshness, drift, repair queues, and readiness gates across Wiki and Forge.
- `wiki checkpoint` is freshness/Git truth, not workflow completion.
- `wiki forge status` and `wiki forge next` are workflow truth, not freshness repair.
- Tracked implementation closes through `wiki forge run`.

## Vault rules

The wiki vault is not assumed to be the current repository. Resolve it through `wiki config --effective --repo <path>`, `wiki init <project> --repo <path>`, or `wiki resume <project> --repo <path> --base HEAD`.

`wiki init <project> --repo <path>` is the single initialization command. It creates `wiki.config.jsonc`, generates `AGENTS.md` and `CLAUDE.md` with the managed orientation block, and preserves any local notes below the managed block. Re-running init refreshes the orientation block idempotently.

Do not create `projects/`, `wiki/`, or `forge/` folders under the repo just because the user says wiki or forge. Project memory belongs under `$KNOWLEDGE_VAULT_ROOT/projects/<project>/` unless the configured vault is explicitly the repository.

Project research goes under `projects/<project>/research/`. Global research is only for reusable cross-project topics.

## Agent command surface

Only use these commands directly:

```
wiki resume <project> --repo <path> --base <rev>    # start session
wiki forge next <project> --json                    # get next action
wiki handover <project> --repo <path> --json        # end session
wiki ask <project> <question...>                    # retrieve knowledge
wiki search [--hybrid] <query...>                   # search vault
```

For research: `wiki research file <topic> --project <project> <title>`

All freshness/repair commands (`wiki checkpoint`, `wiki maintain`, doctor, refresh) are internal — driven by phase packets from `forge next`.
Pages marked as generated (via frontmatter `source_of_truth: generated`) are owned by the pipeline; do not hand-edit them.

## Phase packet contract

If a Forge `phasePacket` is present, do not override it with wiki-layer guesses. Use Wiki only for the packet's context, vault, freshness, or memory needs, then return to Forge.

## Forge integration

Load this skill when work is memory, freshness, vault, research, or handover oriented.
Before changing files, ensure /wiki and /forge skills are loaded.
If the task becomes tracked implementation, return to `/forge`.
Run `wiki forge next` or `wiki forge status` instead of inventing workflow steps.

Wiki is loaded alongside any phase when vault context, research, or freshness is needed. It is not a lifecycle phase itself.

## Skill edits

After editing repo skill files, run `bun run sync:full`, then `bun run sync:local -- --audit`, then restart the agent session.

