* Add standardized template for custom agent creation
New file: references/agent-template.md
This is a reference document that the Architect reads when generating
custom agents. It defines the exact structure every agent must follow:
YAML frontmatter format, required sections (Language, User Profile,
Inter-Agent Coordination, Core Responsibilities, Operational Rules),
placeholder tokens, and inline conventions (naming rules, tool
permissions, multilingual triggers).
The template is not an agent itself. It is a structural guide that
ensures custom agents are generated with the same quality and
consistency as the core 8.
* Add custom agent support to orchestration references
agents-registry.md:
- Added "Custom Agents" section with rules for how custom agents
are added to the registry (naming, priority, creation flow)
- Custom agents always have lower priority than core 8
- Names must be lowercase with hyphens, no conflicts with core names
agents.md:
- Added "Custom Agents" section explaining what they are, how they
coordinate with core agents, and how to create/edit/remove them
agent-orchestration.md:
- Added "Suggested new agent" signal format so agents can flag when
the user needs functionality that no existing agent provides
- Added step in Dispatcher Decision Logic to check for this signal
- Added "Custom Agent Lifecycle" section covering creation, discovery,
routing, chaining, maintenance, and deletion
* Add "Suggested new agent" capability to all 7 non-architect agents
Each agent now has a "When to suggest a new agent" subsection inside
its Inter-Agent Coordination block. When an agent detects that the
user needs functionality that no existing agent can handle, it
outputs a "Suggested new agent" section with:
- Need: what capability is missing
- Reason: why no existing agent covers it
- Suggested role: what the new agent would do
The dispatcher reads this and asks the user if they want the
Architect to create a custom agent for the detected need.
Agents are also told when NOT to suggest a new agent (existing
agent can handle it, one-off task, outside vault scope).
* Add full custom agent creation flow to the Architect
The Architect can now create, edit, and remove custom agents through
an extended conversational flow with the user.
Changes to the frontmatter:
- Added trigger phrases for custom agent creation in 6 languages
("create a new agent", "custom agent", "crea un nuovo agente", etc.)
New section "Custom Agent Creation" with:
- 5-phase conversation flow (Understanding, Capabilities, Output,
Advanced, Confirmation) where the Architect asks one question at
a time and adapts follow-ups based on user answers
- Agent file generation following references/agent-template.md
- Automatic updates to agents-registry.md and agents.md
- Management commands: edit, remove, list custom agents
- Validation rules: no name conflicts with core 8, minimal tool
permissions by default, mandatory coordination sections
- Quality standards: Core Responsibilities must be detailed enough
to produce a production-quality agent
Also added the "Suggested new agent" subsection (same as other agents).
* Update dispatcher routing to support custom agents
- Changed "The ONLY agents you may use are these 8" to acknowledge
that custom agents created by the Architect are also valid
- Added row 9+ to the routing priority table for custom agents
(always lower priority than core 8)
- Added section 9 "CUSTOM AGENTS" with routing logic: when no core
agent matches, check agents-registry.md for custom agents
- Added check for "Suggested new agent" signals in the multi-agent
routing decision flow (step 6)
* Add custom agents to README, CONTRIBUTING, and TERMS_OF_USE
README.md:
- Badge changed from "8 Agents" to "8+ Agents"
- Added custom agents as point 4 of "What makes this different",
positioned right after the main pitch for maximum visibility
- Includes a table of real-life scenarios (budget tracking, journaling,
paper reading, project monitoring, client deadline management)
- Links to Terms of Use for the responsibility disclaimer
CONTRIBUTING.md:
- Renamed "Propose a new crew member" to "Propose a new core crew
member" with a note that users can create custom agents via Architect
- Added "Custom agents vs. core agents" section explaining the
distinction between personal custom agents and project-shipped
core agents
TERMS_OF_USE.md:
- Added new Section 9 "Custom Agents" with full disclaimer: custom
agents are entirely the user's creation and responsibility, no
warranty on their behavior, author accepts no liability
- Updated Section 7 (Limitation of Liability) to reference custom
agents explicitly
- Renumbered sections 9-11 to 10-12
* Force the Architect to always run the full conversation before creating a custom agent
The Architect was generating custom agents immediately from a single
user message instead of going through the 5-phase conversation flow.
Added explicit blocking instructions at three points:
- Section intro: "NEVER create an agent in one shot"
- Before the conversation phases: "Do NOT generate the agent
immediately, even if the request seems clear"
- Explicit rule: "You are NOT allowed to create the agent file
until Phase 5"
- Reinforced one-question-per-message rule
* Force custom agent descriptions to use only the user's language
The Architect was copying the multilingual pattern from core agents
and adding translations in 6+ languages to custom agent descriptions.
Custom agents should have their description and trigger phrases
written exclusively in the language the user speaks. Reinforced
this rule in both the generation instructions and the validation
rules section.
* Force custom agent body to always be written in English
The frontmatter description uses the user's language (for trigger
matching), but the agent body (system prompt) must always be in
English for better LLM instruction-following performance. The agent
still responds in the user's language at runtime thanks to the
language matching rule.
* Add confirmation prompt before overwriting existing installation
launchme.sh:
- Detects if .claude/ or CLAUDE.md already exist in the vault
- Shows the user what will be overwritten
- Asks for explicit confirmation before proceeding
- Clarifies that custom agents and vault notes are never touched
updateme.sh:
- Asks for confirmation before overwriting core files
- Same clarification about custom agents being preserved
* Deprecate removed files instead of leaving orphans in the vault
When a file is removed from the repo (agents, references, or skills),
the updater now renames it with a "-DEPRECATED" suffix and prepends
a "DEPRECATED DO NOT USE" header instead of silently leaving it.
updateme.sh:
- Core agents in .claude/agents/ that no longer exist in the repo
get renamed to {name}-DEPRECATED.md with deprecation header
(custom agents are never touched)
- References in .claude/references/ that no longer exist in the repo
get the same treatment
- The entire .claude/skills/ directory (removed from the project)
gets renamed to .claude/skills-DEPRECATED/ with deprecation headers
on each SKILL.md
- Summary now reports deprecated file count
launchme.sh:
- Added confirmation prompt before overwriting existing installation
- Skills generation and copying kept intact (generate-skills.py runs
first, then copies to .claude/skills/)
* Add first-run setup section to custom agent template and creation flow
Custom agents now have a "First Run Setup" section that defines what
the agent must do the very first time it is invoked: what questions
to ask the user, what config files or folders to create, and how to
detect that it has already been set up.
agent-template.md:
- New "First Run Setup" section between Core Responsibilities and
Operational Rules, with subsections for detection, questions to
ask, what to create, and post-setup behavior
architect.md:
- New Phase 4 "First Run Setup" in the conversational flow where
the Architect asks the user what the agent should do on first run
- Previous Phase 4 (Advanced) becomes Phase 5
- Previous Phase 5 (Confirmation) becomes Phase 6
- Updated blocking rules to reference Phase 6
* Redesign README header and broaden legal disclaimers for custom agents
Improve README header visual hierarchy: centered title, prominent Discord
CTA, metadata badges moved to secondary row. Replace two custom agent
examples with funnier, gender-neutral ones. Rewrite TERMS_OF_USE Section 3
from "Health and Wellness Agents" to "Custom Agents and Advice-Generating
Output" covering health, legal, financial, and all regulated domains.
* Fix reference paths in architect to use .claude/references/ prefix
The agent runs inside the vault where references live under
.claude/references/, not under references/ (which is the repo layout).
* Fix reference paths in agent-template to use .claude/references/ prefix
* Add core-manifest to protect custom agents from deprecation
launchme.sh and updateme.sh now write .core-manifest listing which agent
files were installed as core. The deprecation loop checks this manifest
before touching any file, so custom agents are never deprecated.
* Skip agent deprecation if target DEPRECATED file already exists
* Include skill count in updateme.sh summary condition and message
* Fix agents-registry.md paths in CLAUDE.md to use .claude/references/ prefix
* Add edit/remove/list trigger phrases to custom agent routing
* Deprecate stale core agents on reinstall before copying new ones
On reinstall (EXISTING=1), read the old .core-manifest and deprecate
any agent that is no longer shipped in the repo, before writing the
new manifest. Prevents stale core agents from lingering in the vault.
* Fix custom agent description: triggers are in user's language, not multilingual
* Fix updateme.sh: deprecate stale agents before rewriting manifest
The manifest was being truncated and rewritten before the deprecation
loop ran, so removed core agents were no longer in the manifest and
got skipped as "custom". Now: read old manifest -> deprecate -> copy
new agents -> rewrite manifest.
* Fix grep exit code handling when removing last entry from manifest
* Fix nested fenced code blocks in agent-template using tildes
* Add core-manifest for references to protect user-created reference docs
Same pattern as agents: launchme/updateme write a .core-manifest in
.claude/references/ listing installed core files. The deprecation loop
only touches files in the manifest, leaving user-created references
untouched.
* Move deprecated files to .claude/deprecated/ to prevent auto-discovery
Deprecated agents kept in .claude/agents/ could still be auto-discovered
by Claude Code via their frontmatter. Moving them to .claude/deprecated/
ensures they are completely invisible to the dispatcher while still
preserved for user reference.
* Harden updateme.sh from Copilot review feedback
Address multiple issues raised during PR code review:
- Skip deprecation entirely when .core-manifest is missing, preventing
accidental deprecation of custom agents/references on first update
- Preserve user's "## Custom Agents" sections in agents-registry.md and
agents.md during reference updates (merge strategy instead of overwrite)
- Update confirmation message to accurately reflect what is preserved
* Preserve custom agent content during install and update
- launchme.sh: skip overwriting agents-registry.md and agents.md on
reinstall to preserve custom agent entries
- updateme.sh: extract and re-insert custom table rows from the
registry table plus custom sections, preventing data loss when
updating from upstream
- Require manifest before deprecating to avoid false positives
* Update wardrobe-coach example phrase in README
* Use robust string matching and printf for user-mutable refs
- Replace grep -qw with bash substring match for filename detection
- Replace echo with printf '%s\n' to prevent content mangling
* Enforce step-by-step conversation in Architect and fix registry row reinsertion
- Add HARD CONSTRAINT blocks to both onboarding and custom agent creation
flows, forcing the use of AskUserQuestion for each question to prevent
the Architect from skipping phases or bundling questions
- Replace hard-coded "| postman |" match in updateme.sh with generic
last-table-row detection to avoid breaking custom row reinsertion if
core agents are renamed or reordered
* Improve input handling in launchme.sh and updateme.sh for non-interactive shells
* Extract 13 skills from agents and update full documentation
Architecture change: complex multi-step flows (onboarding, email triage,
transcription, etc.) are now skills that run in the main conversation
context instead of agent subprocesses. This fixes the state/context loss
that caused agents to skip phases during multi-turn conversations.
Skills created (13):
- Architect: /onboarding, /create-agent, /manage-agent, /defrag
- Postman: /email-triage, /meeting-prep, /weekly-agenda, /deadline-radar
- Transcriber: /transcribe
- Librarian: /vault-audit, /deep-clean, /tag-garden
- Sorter: /inbox-triage
Agent changes:
- architect.md: -70% (1554 → 473 lines)
- transcriber.md: -72% (530 → 147 lines)
- postman.md: -42%, librarian.md: -37%, sorter.md: -11%
- All agents: explicit post-it create-if-not-exists
Scripts:
- launchme.sh/updateme.sh: copy skills/ directly, remove generate-skills.py
Docs updated:
- README.md: new Skills section, mermaid diagrams, routing
- getting-started.md, examples.md: skill references
- docs/agents/*.md: capability tables with skill vs agent routing
- references/agents.md, agent-orchestration.md, agents-registry.md,
agent-template.md: skill registry, skill-first routing protocol
7.8 KiB
Librarian
The quality inspector that keeps your vault healthy, consistent, and trustworthy.
What it does
The Librarian is your vault's maintenance crew. While other agents create and organize notes, the Librarian checks that everything stays clean, consistent, and structurally sound over time. Think of it as a weekly health checkup for your entire knowledge base.
Run it once a week (or whenever things feel off), and it performs a thorough 6-phase audit: scanning folder structure, hunting duplicates, verifying every wikilink, auditing frontmatter consistency, reviewing Maps of Content, and generating a detailed health report. It finds the problems you would never notice on your own. That broken link from two months ago, the two nearly identical notes in different folders, the 15 notes still tagged status: inbox even though they were filed weeks ago.
The Librarian is conservative by design. It never deletes anything, only archives. It never auto-merges duplicates. Instead, it shows you both versions and asks. Every change is logged and transparent.
Capabilities
Several of the Librarian's more complex, multi-step flows have been promoted to dedicated skills that run as guided conversations:
| Capability | Now handled by |
|---|---|
| Full 7-phase vault audit | /vault-audit skill |
| Deep clean (extended cleanup) | /deep-clean skill |
| Tag garden (tag analysis and cleanup) | /tag-garden skill |
What the Librarian agent still does directly:
- Quick health check: a lighter version focusing on the most common issues (broken links, inbox stragglers, recent duplicates)
- Consistency report: shows exactly what is wrong and what was fixed, with counts and percentages
- Growth analytics: tracks your vault's growth over time (notes per week, links per note, health score trends)
- Stale content detector: identifies notes not touched in 30, 60, or 90 days across active areas
- Duplicate detection: finds exact filename matches, "(copy)" variants, sync conflicts, and content-similar notes
- Broken link repair: identifies wikilinks pointing to non-existent notes and fixes or flags them
- Orphan note rescue: finds notes with zero incoming links and suggests where they should be connected
- Frontmatter consistency: checks that every note has required fields (type, date, tags, status) and fixes format issues automatically
- Message archive cleanup: archives resolved agent messages older than 7 days
How to use it
Run the Librarian periodically to maintain vault quality. Some phrases invoke a dedicated skill instead of the agent:
- "Weekly review" / "Run the weekly audit" / "Vault audit" --> invokes the
/vault-auditskill - "Deep clean the vault" --> invokes the
/deep-cleanskill - "Clean up the tags" / "Tag garden" --> invokes the
/tag-gardenskill - "Check vault health" / "Quick health check" --> Librarian agent
- "Are there any duplicates?" --> Librarian agent
- "Fix broken links" --> Librarian agent
- "Show me orphan notes" --> Librarian agent
- "Consistency report" --> Librarian agent
- "How has my vault grown?" --> Librarian agent
In Italian: "Review settimanale", "Controlla il vault", "Ci sono duplicati?", "Pulizia" In French: "Revision hebdomadaire", "Verifier le vault" In Spanish: "Revision semanal", "Verificar el vault" In German: "Wochentliche Uberprufung", "Vault-Gesundheit"
Example conversations
Weekly review
You: Weekly review
Librarian: Running full 6-phase audit...
Phase 1, Structure: Folders OK (12/12 match the canonical structure). 1 empty folder found: 04-Archive/2024/. Consider removing?
Phase 2, Duplicates: Found 2 potential duplicates:
- "Project Plan.md" (01-Projects/) vs "Project Plan (updated).md" (01-Projects/). The updated version contains everything from the original plus 17 new lines. Recommendation: keep the updated version, archive the original.
Phase 3, Links: 3 broken wikilinks found and fixed:
[[Sprint Planning]]updated to[[Sprint Planning Q2]](file was renamed)[[Marco]]updated to[[05-People/Marco Rossi]](path corrected)[[Old RFC]]: target does not exist. Should I create a stub note or remove the link?
Phase 4, Frontmatter: 8 notes had format issues:
- 5 notes had dates in non-standard format (auto-fixed to YYYY-MM-DD)
- 3 notes were missing
statusfield (added based on file location)
Phase 5, MOCs: 2 MOCs are stale (not updated in 30+ days with new notes available). Updated both with 4 new entries total.
Phase 6, Health Report: Saved to Meta/health-reports/2026-03-21 - Vault Health.md
Health Score: 87% (up from 82% last week) Notes: 147 total, 12 new this week Orphan notes: 18 (down from 23 after Connector work)
Quick duplicate check
You: Are there any duplicates?
Librarian: Scanned 147 notes for duplicates. Found 3 issues:
-
Exact duplicate: "Meeting Notes March 10.md" exists in both
00-Inbox/and06-Meetings/2026/03/. The Inbox version is older. Recommendation: delete the Inbox copy. -
Near-duplicate (85% overlap): "API Design Notes.md" and "API Architecture Draft.md" cover the same topic with different titles. The Architecture Draft is more complete. Recommendation: merge and archive the older one.
-
Sync conflict: "Daily 2026-03-15 (conflict).md" is a sync conflict from Obsidian Sync. The conflict version has 2 extra lines. Recommendation: merge the extra lines into the main version.
Want me to handle any of these?
Growth analytics
You: How has my vault grown this month?
Librarian: Vault Growth, March 2026
- Notes created: 42 (up 15% from February)
- Average per week: 10.5
- Most active areas: Projects (18 notes), Meetings (12 notes), Resources (7 notes)
- Links created: 89 new links this month
- Link density trend: 2.1 links/note (up from 1.8 in February)
- Health score trend: 82% -> 85% -> 87% (improving steadily)
Top contributors (by agent):
- Scribe: 22 notes
- Transcriber: 12 notes
- Postman: 8 notes
Your vault is growing healthily. The link density improvement is a good sign. The Connector has been doing solid work.
Works with
- Architect: when the Librarian finds structural inconsistencies that need a design decision (overlapping areas, drifting taxonomy), it flags the Architect
- Sorter: misplaced notes found during audits are reported to the Sorter for re-filing
- Connector: orphan notes that need linking are flagged for the Connector
- Seeker: when the Librarian finds conflicting information in duplicate notes, it asks the Seeker for content-level verification
- Scribe: malformed notes in the Health area are sent back to the Scribe for reformatting
- All agents: the Librarian cleans up the shared message board by archiving resolved messages older than 7 days
Tips
- Run it weekly. A weekly audit catches small issues before they compound. Monthly audits find too much to fix at once.
- Start with quick health checks. If you are new to the vault, a quick check is less overwhelming than a full 6-phase audit.
- Let it auto-fix the safe stuff. Date format normalization, tag casing, and missing status fields are safe to fix automatically. The Librarian always asks before doing anything destructive.
- Pay attention to the health score. It is a single number that tells you how well-maintained your vault is. Aim for 85%+.
- Use growth analytics for motivation. Seeing your vault grow in notes, links, and quality is surprisingly satisfying and helps you stay consistent.
- Act on archive suggestions. Stale content in active areas adds noise. Archiving old notes keeps your working areas focused.
What it remembers
The Librarian keeps a post-it in Meta/states/librarian.md with notes from its last audit: issues found, problems fixed, and recurring problems across audits. This lets it track whether vault health is improving or degrading over time.