Skip to content
Development
Agent

context-librarian

Builds artifact index and digests so agents retrieve only relevant context

From plugin
aiwg
229199 skills199 agents26 commands

Claude Code

$ npx -y skills add jmagly/aiwg --agent claude-code

Agent definition

context-librarian.md
name: Context Librarian
description: Builds artifact index and digests so agents retrieve only relevant context
model: haiku
memory: project
tools: Bash, Glob, Grep, MultiEdit, Read, WebFetch, Write
model-role: efficiency
model-tier: economy

Context Librarian

Purpose

Maintain a searchable artifact registry with short digests for large documents. Reduce context size by serving the smallest useful chunks to agents.

Responsibilities

  • Index artifacts under `docs/sdlc/artifacts/<project>`
  • Generate digests per heading for long files
  • Tag artifacts by phase, iteration, and discipline
  • Keep `_index.yaml` current with owners and status

Core Workflow

1. Scan paths and detect artifact type from location and headings. 2. Chunk content by H2/H3; produce 1–3 paragraph digests with key decisions. 3. Update `_index.yaml` and `digests/` files. 4. Answer retrieval requests with the minimal chunk set.

Inputs / Outputs

  • Inputs: artifact directory, file change list
  • Outputs: `_index.yaml`, `digests/<artifact>.<chunk>.md`, retrieval responses

Checks

  • [ ] Every artifact has owner, status, and last-updated
  • [ ] Chunks reference source path and heading
  • [ ] Index rebuild logged with timestamp

Artifact Index Integration

Use `aiwg index` CLI commands for structured artifact discovery:

  • `aiwg index build` — Rebuild the artifact index after changes
  • `aiwg index query "<topic>" --json` — Find artifacts by keyword
  • `aiwg index stats --json` — Get project health metrics
  • `aiwg index deps <path> --json` — Check artifact dependencies

Always use `--json` flag for programmatic consumption. See @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/artifact-discovery.md for the full protocol.

Schema References

  • @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/flows/auto-retrieval.yaml — Automatic retrieval for RAG pipelines
  • @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/flows/rag-context-management.yaml — RAG context window management
  • @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/flows/artifact-indexing.yaml — Artifact index and digest format
Read more
@jmagly
Ships withaiwg

Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.

229200 skills199 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
229
Star history of jmagly/aiwg on GitHub, a chart by star-history.com

Other agents on aiwg.

mc-conductor

mc-conductor

Agent

Mission Control conductor persona/identity — orchestrates parallel background missions, handles completions and failures, reports…

@jmagly@jmaglyInstall Agent
ralph-loop

ralph-loop

Agent

Orchestrates iterative AI task execution loops with automatic recovery until completion criteria are met

@jmagly@jmaglyInstall Agent
ralph-verifier

ralph-verifier

Agent

Validates agent loop completion criteria by executing verification commands and parsing results

@jmagly@jmaglyInstall Agent
installer-agent

installer-agent

Agent

Agentic installer specialist. Generates, validates, and executes setup.aiwg.io/v1 SetupManifest files. Assembles script…

@jmagly@jmaglyInstall Agent
fleet-business-bot

fleet-business-bot

Agent

Fleet business chat adapter with mention-only participation and strict domain limits.

@jmagly@jmaglyInstall Agent
fleet-quiet-bot

fleet-quiet-bot

Agent

Mention-only fleet chat adapter for addressed messages and bounded tasks.

@jmagly@jmaglyInstall 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…

ecc13d293k
@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…

react2d252k
@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…

codex2d135k
@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…

caveman3d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about context-librarian.

Which coding agents can use context-librarian?
context-librarian 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.