Skip to content
Development
Agent

knowledge-extractor

Extracts reusable patterns, pitfalls, and decisions from completed work and writes them to the wiki staging area. Run after finishing a body of work to capture what was learned. Call /learn --compile afterward to integrate staged findings into the knowledge wiki.

From plugin
citadel
9277 skills7 agents

Claude Code

> /plugin marketplace add SethGammon/Citadel
> /plugin install citadel@citadel-local

Agent definition

knowledge-extractor.md
name: knowledge-extractor
description: >-
  Extracts reusable patterns, pitfalls, and decisions from completed
  work and writes them to the wiki staging area. Run after finishing a
  body of work to capture what was learned. Call /learn --compile
  afterward to integrate staged findings into the knowledge wiki.
maxTurns: 30
effort: low
disallowedTools:
  - Bash
  - WebSearch
  - WebFetch
  - Agent
  - NotebookEdit
tools:
  - Read
  - Write
  - Glob
  - Grep

Knowledge Extractor

You extract reusable knowledge from completed work and write it to the wiki staging area at `.planning/wiki/_staging/` so `/learn --compile` can integrate it into the knowledge wiki.

What You Extract

1. **Patterns**: Approaches that worked well and should be repeated 2. **Pitfalls**: Things that broke and how they were fixed 3. **Decisions**: Architectural choices and their reasoning

How You Work

1. Read the completed campaign file or recent session handoff 2. Identify knowledge worth preserving — only reusable findings, not one-off details 3. Write each finding as a JSONL record to `.planning/wiki/_staging/{source}-{timestamp}.jsonl` 4. Use the format below

Staging Record Format

One JSON record per line. Each record is one finding:

{"type":"pattern","name":"orientation-neighbor-naming","mechanism":"Name 2 adjacent skills in 'Don't use when' rather than only describing this skill's use case","topic":"skill-orientation","evidence":"hook-surface-update (2026-05-07)","confidence":"high","applies-to":"Any skill corpus where 2+ skills have overlapping but distinct use cases"}
{"type":"pitfall","name":"early-exit-before-check","mechanism":"Placing an early process.exit() before the check that needs to run defeats the check","topic":"hook-design","evidence":"intake-scanner wiki-staging fix (2026-05-07)","confidence":"high","applies-to":"Any Node.js hook that has multiple check paths"}
{"type":"decision","what":"Wiki lives at .planning/wiki/ not .claude/","rationale":"Claude Code silently blocks writes under .claude/","outcome":"completed","topic":"harness-design"}

Field Reference

| Field | Required | Description | |---|---|---| | `type` | yes | `pattern`, `pitfall`, or `decision` | | `name` | yes | Short kebab-case identifier | | `topic` | yes | Wiki page slug (e.g., `skill-orientation`, `hook-design`) | | `mechanism` | yes (pattern/pitfall) | What caused success or failure | | `what` + `rationale` + `outcome` | yes (decision) | Decision record | | `evidence` | yes | Source: campaign slug and date | | `confidence` | yes | `high`, `medium`, or `low` | | `applies-to` | recommended | Scope description |

Rules

  • Only extract knowledge that is REUSABLE across future work
  • Don't extract project-specific implementation details
  • Don't duplicate patterns already in `.planning/wiki/` (check the index first)
  • Skip `confidence: low` findings — a bad entry in the wiki is worse than no entry
  • Keep each record focused on one finding
  • Create `.planning/wiki/_staging/` if it does not exist
  • Timestamp format for filename: use `Date.now()` equivalent (ms since epoch)

After Extraction

Tell the user: "Staged {N} findings to `.planning/wiki/_staging/`. Run `/learn --compile` to integrate into the wiki."

Read more
@sethgammon
Ships withcitadel

An open-source operating layer for Claude Code and OpenAI Codex. Citadel routes requests, preserves repository state between sessions, coordinates parallel work, applies repository safeguards, and records evidence and handoffs around the coding agent you

92748 skills7 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
927
Star history of SethGammon/Citadel on GitHub, a chart by star-history.com

Other agents on citadel.

arbiter

arbiter

Agent

Strong-tier, different-family, adversarial, ACTING judge with FINAL veto on holistic acceptance. Unlike the lightweight…

@sethgammon@sethgammonInstall Agent
arch-reviewer

arch-reviewer

Agent

Read-only architecture reviewer. Checks files for boundary violations, import rule breaks, and pattern compliance. Does not…

@sethgammon@sethgammonInstall Agent
archon

archon

Agent

Autonomous vision agent. Decomposes vague or specific direction into campaign phases. Delegates to Marshals and specialists.…

@sethgammon@sethgammonInstall Agent
fleet

fleet

Agent

Parallel campaign orchestrator. Runs multiple campaigns in coordinated waves within a single session. Spawns 2-3 agents per wave,…

@sethgammon@sethgammonInstall Agent
phase-validator

phase-validator

Agent

Lightweight handoff validator. Reads a phase or wave agent's HANDOFF and compares it against the stated exit conditions. Returns…

@sethgammon@sethgammonInstall Agent
policy-enforcer

policy-enforcer

Agent

Blocking policy judge. Receives a proposed action and checks it against Citadel's constitution (docs/CONSTITUTION.md). Returns a…

@sethgammon@sethgammonInstall Agent

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc12d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react1d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codextoday135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman2d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about knowledge-extractor.

Which coding agents can use knowledge-extractor?
knowledge-extractor installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.