A self-organizing Obsidian vault that gives AI coding agents persistent memory.
TypeScript ai-agentsclaude-codecodex-cligemini-cliknowledge-managementobsidianobsidian-vaultpersistent-memorysecond-braintemplate
Add vault-first memory system, review writing skills, and charcount utility
Brenno Ferrari95de305e58cf
diff --git a/.claude/agents/review-fact-checker.md b/.claude/agents/review-fact-checker.mdnew file mode 100644index 0000000..f2e26d2--- /dev/null+++ b/.claude/agents/review-fact-checker.md@@ -0,0 +1,55 @@+---+description: "Verify every factual claim in a review draft against vault sources. Returns verified/unverified/flagged claims."+tools: ["Read", "Grep", "Glob", "Bash"]+---++# Review Fact-Checker++Takes a review draft file (self-review or peer review) and systematically verifies every factual claim against vault sources.++## Input++The user provides a file path to a review draft.++## Process++1. Read the draft file completely.++2. Extract every factual claim. A claim is:+ - A number (PR count, days, team size, percentage)+ - A timeline (dates, sequences, "before X happened")+ - An attribution ("she authored", "he initiated", "I led")+ - A comparison ("first time", "only", "every", "never")+ - A characterization ("self-initiated", "without being asked", "autonomously")+ - A day-of-week implication ("weekend", "same day", "overnight")++3. For each claim, search the vault:+ - `perf/evidence/` for PR data+ - `perf/<cycle>/` for review briefs+ - `perf/brag/` for quarterly brag notes+ - `perf/competencies/` for competency criteria+ - `work/` for project notes+ - `org/people/` for person notes+ - `brain/` for operational context++4. Classify each claim:+ - **Verified**: Found in vault with matching source+ - **Unverified**: Not found in vault, but plausible (from brag sheet, conversation)+ - **Flagged**: Contradicts vault evidence, embellished, or could be challenged+ - **Date check**: Any day-of-week claim — verify with `date` command++5. For flagged claims, suggest a fix.++## Output++Return a structured report:+```+## Verified (X claims)+- [claim] — source: [file]++## Unverified (X claims)+- [claim] — no vault source, from [brag sheet / conversation / inference]++## Flagged (X claims)+- [claim] — issue: [what's wrong] — fix: [suggestion]+```diff --git a/.claude/commands/review-peer.md b/.claude/commands/review-peer.mdnew file mode 100644index 0000000..ebf16bd--- /dev/null+++ b/.claude/commands/review-peer.md@@ -0,0 +1,100 @@+# Peer Review Writer++Write a peer review for a colleague on your company's review tool. Produces project feedback, principles, and performance summary — all within 1000-char limits, fact-checked against vault evidence.++## Usage++```+/review-peer <Name>+```++## Context: Review System++- **Peers give comments only** — no scores. Manager + Coach give scores.+- **Calibration** happens at the organizational level — managers + People Partners review aggregate ratings.+- **Review tool fields**: per-project feedback (1000 chars), principles (1000 chars each), Strengths (1000 chars), Areas of Development (1000 chars), Confidential Comment (1000 chars, optional — manager-only).++## Workflow++### 1. Gather Evidence++Load in order:+1. Person note from `org/people/<Name>.md`+2. PR evidence from `perf/evidence/<Name> PRs - <cycle>.md` (run `/peer-scan` if missing)+3. Peer review notes from `work/active/` (any active review writing notes)+4. Any brag sheet or impact overview the person shared (user provides)+5. Relevant work notes (search vault for their name)+6. Slack context if available++### 2. Assess Visibility++For each submitted project, classify your evidence level:+- **Direct**: Worked together daily, first-hand observations+- **Reviewed**: Saw their PRs, reviewed some code, aware of the work+- **Informed**: From their brag sheet or shared documents, limited personal observation++Be explicit about this in the review text. Never overclaim visibility.++### 3. Draft++For each section, draft within 1000 chars. Use `.claude/scripts/charcount.sh` to verify.++**Project feedback** (per project):+- Lead with your relationship to the work ("worked alongside daily" vs "less direct visibility")+- Describe what they did and why it matters — behaviors and decisions, not just deliverables+- Include one specific moment you personally observed if possible++**Principles** (your company's defined principles):+- Lead with first-hand evidence, supplement with brag sheet+- Each principle should have distinct evidence — don't repeat the same example+- Reference specific behaviors, not generic praise++**Strengths**:+- Synthesize the defining theme across all projects — what makes this person distinctive?+- One or two specific moments that illustrate the theme+- Keep it genuine — a concise honest assessment beats padded praise++**Areas of Development**:+- Must be genuinely distinct per person — not "be more visible" for everyone+- Frame constructively: "the opportunity is X" not "the weakness is X"+- Base it on something you actually observed, not a generic suggestion++**Confidential Comment** (optional):+- Say something the manager specifically needs to know that wouldn't go in the public sections+- This is NOT a repeat of Areas of Development+- Examples: level trajectory, context the manager lacks, a specific flag worth watching++### 4. Quality Checks++Run these before presenting the draft:++- [ ] All sections under 1000 chars (use `charcount.sh <file> "<section>"`)+- [ ] No PR numbers (e.g., #21579) — describe what was done instead+- [ ] No line counts (e.g., +4,743/-3,362) — these look like an audit+- [ ] No "weekend work visible in timestamps" — don't track when people work+- [ ] Honest about visibility level per project+- [ ] No repetition of the same example across project + principles + summary+- [ ] Areas of Development is specific to THIS person, not generic+- [ ] Confidential adds value the manager doesn't get from public sections+- [ ] Tone sounds like a colleague writing from experience, not a data analysis++### 5. Fact-Check++Enter plan mode and verify every factual claim against vault sources:+- Dates, timelines, sequences+- Specific contributions attributed to the person+- Claims about "first," "only," or "every" — these are easy to get wrong+- Anything from their brag sheet that you present as your own observation — flag the source honestly++### 6. Save++Save draft to `thinking/<name>-peer-review.md` for copy-pasting.+After submission, promote to `perf/<cycle>/Peer Review - <Full Name>.md`.++## Tone Rules++- Write like a colleague talking about someone they work with+- Specific enough to be credible, casual enough to be human+- No emojis, no corporate buzzwords, no "synergy"+- If you wouldn't say it in a 1:1 conversation, don't write it+- It's OK for some sections to be 600 chars if that's all you need to say — don't paddiff --git a/.claude/commands/self-review.md b/.claude/commands/self-review.mdnew file mode 100644index 0000000..88c2035--- /dev/null+++ b/.claude/commands/self-review.md@@ -0,0 +1,115 @@+# Self-Review Writer++Write your self-assessment for your company's review tool. Produces project impact descriptions, competency self-assessments (current level / next level), principles, and growth plan — all within character limits, fact-checked, strategically calibrated.++## Usage++```+/self-review [cycle]+```++Default cycle: current review period.++## Context: Review System++- **Three evaluation axes**: Impact (Volume/Quality/Efficiency/Complexity), Competencies (current level / next level per competency), Principles (your company's defined principles)+- **Rating scale**: Below / Meet / Above for Impact and Principles. Yes/No/Don't Know for competency criteria.+- **Who reads this**: Manager (may have limited context), Coach, Calibration panel (senior managers + People Partners who don't know you)+- **Your self-assessment is the anchor** — especially when the manager is new. If you say Meet, they have no reason to push Above.++## Workflow++### 1. Load Context++Read in order:+1. `brain/North Star.md` — current goals and focus+2. `perf/<cycle>/Review Brief.md` — the full private review brief+3. `perf/<cycle>/Review Brief - Manager.md` — what the manager has seen+4. Previous cycle review — baselines+5. Quarterly brag notes covering the period+6. All competency notes in `perf/competencies/`+7. `perf/Performance Framework.md` — evaluation structure (if exists)+8. Key work notes for submitted projects++### 2. Draft Projects++For each submitted project (1000 chars, no dashes):+- Open with your role and scope+- Hit all four Impact dimensions without naming them: what was delivered (Volume), how good it was (Quality), how the process was managed (Efficiency), whether scope expanded (Complexity)+- Include specific evidence: numbers should be factual (PR counts, team size, timeline)+- End with outcome or significance++Rate each project Meet or Above. Decide all ratings at the end together — calibrate the full picture before committing.++### 3. Draft Competencies++For each competency, decide current level (Yes/No) and next level (Yes/No):+- Read the level criteria from the competency note+- Check each sub-criterion: is there concrete evidence?+- If saying Yes to next level, every sub-criterion should be defensible — missing the primary criterion undermines credibility++Draft 1000-char text per YES answer:+- **Competency texts are NOT project descriptions** — the project section already covers WHAT. Competency texts cover HOW you applied the skill.+- Lead with behaviors and decisions, not deliverables+- Reference the previous cycle baseline: "Previously Meet, this period X" shows trajectory+- Calibrate jargon per audience: technical for Architecture/Functional Expertise, behavioral for Communication/Planning+- No overlap between current level and next level texts for the same competency — use different evidence or different framing++### 4. Draft Principles++For each principle (1000 chars):+- Reference the previous cycle baseline and any specific growth feedback+- Lead with the strongest evidence+- If the rating changed from last cycle, make the growth explicit++### 5. Strategic Calibration++Before finalizing, review the full picture:++**Impact**: Are the ratings defensible? Is there one genuine Meet to show calibration, or are all Above justified?++**Competencies**:+- Are next-level YES answers defensible on EVERY sub-criterion?+- Would you be comfortable if a calibration reviewer challenged any specific answer?+- Does claiming YES here protect or undermine the credibility of other next-level claims?++**Principles**: Does the pattern from last cycle to this cycle show growth?++**Audience check**: Will the manager (who may be new) have enough context to defend these ratings in calibration, or does the written evidence need to do the heavy lifting?++### 6. Quality Checks++- [ ] All sections under 1000 chars (use `.claude/scripts/charcount.sh <file> "<section>" [subsection]`)+- [ ] No dashes (em-dashes, en-dashes) — some review tools count these differently+- [ ] Every factual claim backed by vault evidence+- [ ] No fabricated decisions ("chose X over Y" when Y was never considered)+- [ ] No self-undermining language in next-level YES texts ("not yet at yearly scope")+- [ ] Dates verified — check day of week before claiming "weekend work"+- [ ] No references to specific people's performance issues — don't volunteer information about others' struggles+- [ ] Growth baselines stated for competencies and principles+- [ ] Technical jargon calibrated per audience++### 7. Fact-Check Pass++Enter plan mode. For every claim:+- Is it in the vault? Which source?+- Is it first-hand or inferred?+- Could a reviewer challenge it with "what's your evidence?"+- If the claim names a file, function, or flag — does it still exist?++Flag and fix anything that doesn't pass.++### 8. Save++Save draft to `thinking/review-drafts.md` for copy-pasting.+After submission, promote to `perf/<cycle>/Self-Review.md`.++## Lessons Learned++These come from past review cycles and should be applied going forward:++1. **Strategic Meet only works when the assessor has independent context.** With a new manager, your self-assessment IS the anchor. Don't undersell.+2. **Charcount early and often.** Use the script after every draft, not after pasting into the review tool.+3. **The "no dashes" rule exists** because some review tools may count special characters differently.+4. **Peer reviews feed into your competency ratings.** What peers write about you is visible to the manager. What you write about peers builds your reputation as a thoughtful evaluator.+5. **Fact-check before submitting.** Plan mode for verification has caught fabricated architectural decisions, references that shouldn't be in a review, and date claims where the days of the week were wrong.diff --git a/.claude/memory-template.md b/.claude/memory-template.mdnew file mode 100644index 0000000..b2f24b8--- /dev/null+++ b/.claude/memory-template.md@@ -0,0 +1,31 @@+# Auto Memory++All project memories live in the vault (git-tracked). This file is a lightweight index.++## Rule: Vault-First Memories++**All new memories for this project MUST be written to vault notes in `brain/`, NOT to files in this directory.**++- Durable knowledge → `brain/` notes (git-tracked, Obsidian-browsable, linked)+- This `MEMORY.md` → index only, pointers to vault locations+- Never create new `.md` files in this `~/.claude/` memory directory — they aren't version-controlled++## Where to Find Things++| Topic | Vault Location |+|-------|---------------|+| Technical gotchas | `brain/Gotchas.md` |+| Patterns and conventions | `brain/Patterns.md` |+| Key decisions | `brain/Key Decisions.md` |+| Goals and focus | `brain/North Star.md` |+| Slash commands and skills | `brain/Skills.md` |+| People and org context | `org/People & Context.md` |+| Active work and projects | `work/Index.md` |+| Performance evidence | `perf/Brag Doc.md` |++## Setup++1. Find your project memory path: `~/.claude/projects/<encoded-path>/memory/`+2. Copy this file there as `MEMORY.md`+3. Claude Code will auto-load it at the start of every conversation+4. When Claude creates memories, they go to vault notes — not this directorydiff --git a/.claude/scripts/charcount.sh b/.claude/scripts/charcount.shnew file mode 100755index 0000000..551b5c4--- /dev/null+++ b/.claude/scripts/charcount.sh@@ -0,0 +1,40 @@+#!/bin/bash+# Count characters in a markdown section (useful for review tools with character limits)+# Usage: charcount.sh <file> <section> [subsection]+# Examples:+# charcount.sh review.md "Project Name"+# charcount.sh review.md "Competency Name" "Current Level"+# charcount.sh review.md "Competency Name" "Next Level"++FILE="$1"+SECTION="$2"+SUB="$3"++if [ -z "$FILE" ] || [ -z "$SECTION" ]; then+ echo "Usage: charcount.sh <file> \"Section Header\" [subsection]"+ exit 1+fi++if [ ! -f "$FILE" ]; then+ echo "File not found: $FILE"+ exit 1+fi++if [ -n "$SUB" ]; then+ MARKER="**${SUB}:**"+ awk -v section="$SECTION" -v marker="$MARKER" '+ index($0, "### " section) { found=1; next }+ found && /^### / { exit }+ found && index($0, marker) { capture=1; next }+ found && capture && /^\*\*/ { exit }+ found && capture && /^### / { exit }+ found && capture && $0 != "" { print }+ ' "$FILE" | tr -d '\n' | wc -m | tr -d ' '+else+ awk -v section="$SECTION" '+ index($0, "### " section) { found=1; next }+ found && /^### / { exit }+ found && /^## / { exit }+ found && $0 != "" { print }+ ' "$FILE" | tr -d '\n' | wc -m | tr -d ' '+fidiff --git a/CLAUDE.md b/CLAUDE.mdindex 23f60b1..54b7033 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -29,6 +29,8 @@ Defined in `.claude/commands/`. See [[Skills]] for full documentation.| `/wrap-up` | Full session review -- verify notes, indexes, links, suggest improvements || `/dump` | Freeform capture -- dump anything, gets routed to the right notes || `/standup` | Morning kickoff -- load context, review yesterday, surface tasks, priorities |+| `/self-review` | Write self-assessment for review tool -- projects, competencies, principles |+| `/review-peer` | Write peer review -- projects, principles, performance summary |## Vault Structure@@ -244,14 +246,20 @@ Beyond tags, use these frontmatter properties to enable search and Bases views:- `severity: high` -- incident severity- `role: incident-lead` -- your role in an incident-## Two Memory Systems+## Memory System++**All project memories live in the vault.** The `~/.claude/` MEMORY.md is an auto-loaded index that points to vault locations. Never create new memory files in `~/.claude/` for this project.| System | Location | Purpose ||--------|----------|---------|-| **Claude Code memory** | `~/.claude/` | Auto-loaded. Workflow prefs, quick-recall. |-| **Vault memories** | `brain/Memories.md` + topic notes | Part of the graph. Rich, linked knowledge. |+| **MEMORY.md** | `~/.claude/projects/.../memory/MEMORY.md` | Auto-loaded index only. Pointers to vault notes. |+| **Vault memories** | `brain/` topic notes | Git-tracked, Obsidian-browsable, linked. All durable knowledge lives here. |-Claude Code memory for session-level preferences. Vault memories for knowledge that benefits from linking and Obsidian browsing.+When asked to "remember" something:+1. Find or create the appropriate `brain/` topic note (Gotchas, Patterns, Key Decisions, etc.)+2. Add the knowledge there with a wikilink to context+3. Update `brain/Memories.md` index if a new topic note was created+4. Do NOT create files in `~/.claude/projects/.../memory/` -- they are not version-controlled## Agent Guidelines@@ -315,7 +323,7 @@ Five lifecycle hooks in `.claude/settings.json`:- Never modify `.obsidian/` config files unless explicitly asked.- Preserve existing frontmatter when editing notes.- Git sync is handled by the user's preferred method (obsidian-git, manual commits, etc.) -- don't configure git hooks or auto-commit.-- When asked to "remember" something, write to the relevant memory topic note (not `Memories.md` itself) with a link to context.+- When asked to "remember" something, write to the relevant `brain/` topic note with a link to context. Never create memory files in `~/.claude/` -- they are not git-tracked.- Prefer Obsidian CLI over filesystem when Obsidian is running.- **Always invoke Obsidian skills via the Skill tool** before doing vault work. Load `obsidian-markdown` when creating/editing `.md` files. Load `obsidian-cli` when running vault commands. Load `obsidian-bases` or `json-canvas` when working with those file types.- Always check for and suggest connections between notes.diff --git a/README.md b/README.mdindex d0e6d57..5691a8e 100644--- a/README.md+++ b/README.md@@ -80,7 +80,7 @@ You: "wrap up"**Folders group by purpose. Links group by meaning.** A note lives in one folder (its home) but links to many notes (its context). Claude maintains this graph — linking work notes to people, decisions, and competencies automatically. When review season arrives, the backlinks on each competency note are already the evidence trail. A note without links is a bug.-**Two memory systems** keep context across sessions. Claude Code's own memory (`~/.claude/`) stores session preferences and quick recall. The vault's memory system (`brain/Memories.md` + topic notes) stores linked knowledge that benefits from Obsidian's graph — backlinks, search, and browsing. Short-term goes to Claude Code. Long-term goes to the vault.+**Vault-first memory** keeps context across sessions and machines. All durable knowledge lives in `brain/` topic notes (git-tracked, Obsidian-browsable, linked). Claude Code's `MEMORY.md` (`~/.claude/`) is an auto-loaded index that points to vault locations — never the storage itself. This means memories survive machine changes and are part of the graph.**Sessions have a designed lifecycle.** The `SessionStart` hook auto-injects your North Star goals, active projects, recent changes, open tasks, and the full vault file listing — Claude starts every session with context, not a blank slate. At the end, say "wrap up" and Claude runs `/wrap-up` — verifying notes, updating indexes, and spotting uncaptured wins. The 285-line `CLAUDE.md` governs everything in between: where to file things, how to link, when to split a note, what to do with decisions and incidents.@@ -111,7 +111,7 @@ Five lifecycle hooks handle routing automatically:**Weekly**: Run `/vault-audit` to catch orphan notes, broken links, and stale content.-**Review season**: Run `/review-brief H1 2026` and get a structured review prep document with all the evidence already linked.+**Review season**: Run `/review-brief` and get a structured review prep document with all the evidence already linked.---@@ -131,6 +131,8 @@ Defined in `.claude/commands/`. Run them in any Claude Code session.| `/review-brief` | Generate a review brief (manager or peer version) || `/vault-audit` | Audit indexes, links, orphans, stale context || `/project-archive` | Move a completed project from active/ to archive/, update indexes |+| `/self-review` | Write your self-assessment for review season — projects, competencies, principles |+| `/review-peer` | Write a peer review — projects, principles, performance summary |---@@ -147,6 +149,7 @@ Specialized agents that run in isolated context windows. They handle heavy opera| `review-prep` | Aggregates all performance evidence for a review period | `/review-brief` || `slack-archaeologist` | Full Slack reconstruction — every message, thread, profile | `/incident-capture` || `vault-librarian` | Deep vault maintenance — orphans, broken links, stale notes | `/vault-audit` |+| `review-fact-checker` | Verify every claim in a review draft against vault sources | `/self-review`, `/review-peer` |> [!NOTE]> Subagents are defined in `.claude/agents/`. You can add your own for domain-specific workflows.@@ -250,9 +253,9 @@ thinking/ Scratchpad for drafts — promote findings, then deletetemplates/ Obsidian templates with YAML frontmatter.claude/- commands/ 10 slash commands- agents/ 7 subagents- scripts/ Hook scripts (session-start, classify, validate, backup)+ commands/ 12 slash commands+ agents/ 8 subagents+ scripts/ Hook scripts + charcount.sh utilityskills/ Obsidian + QMD skillssettings.json 5 hooks configuration```diff --git a/brain/Skills.md b/brain/Skills.mdindex 8a90bde..3c2da1d 100644--- a/brain/Skills.md+++ b/brain/Skills.md@@ -33,6 +33,8 @@ Custom slash commands, subagents, and reusable workflows. Defined in `.claude/co|---------|---------|| `/peer-scan` | Deep scan a peer's GitHub PRs for review prep — produces structured analysis saved to `perf/evidence/` || `/review-brief` | Generate review brief (manager or peer version) from vault data |+| `/self-review` | Write self-assessment for review tool — projects, competencies, principles |+| `/review-peer` | Write peer review — projects, principles, performance summary |### Vault Maintenance@@ -52,6 +54,7 @@ Custom slash commands, subagents, and reusable workflows. Defined in `.claude/co| `review-prep` | Aggregates all performance evidence for a given review period | `/review-brief` || `slack-archaeologist` | Full Slack reconstruction — reads every message, thread, profile, produces unified timeline | `/incident-capture` || `vault-librarian` | Deep vault maintenance — orphan detection, broken links, frontmatter validation, stale notes | `/vault-audit` |+| `review-fact-checker` | Verify every claim in a review draft against vault sources | `/self-review`, `/review-peer` |Subagents run in isolated context windows via `.claude/agents/`. They don't pollute the main conversation.