Skip to main content
ClaudeWave
Slash Command4.6k repo starsupdated 3d ago

om-correct

Sweep a corrected fact through the vault — finds every note restating it, applies the correction at the single source, replaces restatements with links, and preserves notes that correctly record what was believed at the time.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/breferrari/obsidian-mind/HEAD/.claude/commands/om-correct.md -o ~/.claude/commands/om-correct.md
Then start a new Claude Code session; the slash command loads automatically.

om-correct.md

# /om-correct

```
/om-correct "<the corrected fact, stated as it is now true>"
```

The acting half of Write-Correctness Law 2. Laws 1 and 2 already say a corrected fact must be swept out of every note restating it; this is the thing that does it.

Run it **at the moment of correction**, not on a schedule. `/om-vault-audit` is periodic, whole-vault and structural, and takes no argument. A sweep needs the corrected fact as input, because nothing in the vault can resolve two contradicting notes — nothing in it says which is true. Only the person making the correction knows, which is why the fact is an argument and not a discovery.

## Hard rails

- **A historical note is never edited.** Not carefully, not with a callout. It is reported and preserved. See the asymmetry below.
- **Never delete.** Restatements are replaced with a link to the source, not removed.
- **Never commit.** Leave the working tree for review.
- **No authoritative note, no edits.** If the single source cannot be identified, the pass reports and stops rather than guessing.

## 1. Find

Both arms, always. Neither alone is sufficient.

- **Semantic** — `qmd query "<the corrected fact>"` (index name from `vault-manifest.json`). This is the arm that finds the *paraphrase*: the same claim in someone else's words, with none of the same strings. That half is invisible to grep and indistinguishable from correct prose to every structural check, and it is the half most likely to survive a manual sweep, because the sweeper stops when grep goes quiet.
- **Literal** — grep the distinctive strings from the fact: version numbers, tool names, counts, identifiers. This is the arm that finds a bare `v8.3.2` that means nothing to an embedding.

## 2. Classify

This is the design. The search is the easy part.

| class | what it is | what happens |
|---|---|---|
| **AUTHORITATIVE** | the single-source note Law 1 designates | the correction is **applied** here, and only here |
| **RESTATEMENT** | a living note asserting the fact, which per Law 1 should be linking to the source instead | the assertion is **replaced with a link** — fixes today's stain and prevents the next |
| **HISTORICAL** | a note that correctly records what was believed *at the time* | **preserved**, and reported so the omission is visible |

`isHistoricalNote` in `.claude/scripts/lib/correction-sweep.ts` decides the third category, and its rules are pinned by tests. A note is historical if **any one** holds:

- it sits under a record directory (`archive/`, `1-1/`, `meetings/`, `thinking/`, `memories/`, `journal/`, `incidents/`)
- its filename carries a date, prefix **or** suffix — this vault's 1:1 convention is `<Person> YYYY-MM-DD.md`
- its frontmatter `status` is `superseded`, `archived`, `completed`, `deprecated` or `done`

A frontmatter `date:` is deliberately **not** a signal. Every note has one.

**Ask before assuming a note is a restatement.** Token overlap is blind. A note that mentions the same subject while making a different claim is not restating anything, and rewriting it is a silent content loss.

## 3. Apply, in one pass

Report what changed and what was deliberately preserved:

```
/om-correct "the qmd MCP surface exposes no lexical search tool"

  AUTHORITATIVE   reference/QMD.md:12            ← correction applied here
  RESTATEMENT     brain/Gotchas.md:47            → replaced with link
  RESTATEMENT     work/Search Quality.md:88      → replaced with link
  HISTORICAL      work/archive/2026/Intake.md    ✋ preserved — records what
                                                    was believed 2026-03-02

  2 fixed, 1 applied, 1 preserved.
```

A correction callout on top of a note whose body still says the wrong thing is **not** a correction. Law 2 rules that out in as many words: the body is what future sessions re-absorb.

## Why historical notes are untouchable

The two failure modes are not symmetric, and the whole design follows from that.

A **missed restatement** leaves a stale claim somewhere. Someone reads it, notices, and fixes it. Recoverable, and visible.

A **rewritten record** destroys a true thing. The note said what was believed on a date; afterwards it says something else, reads perfectly fine, and carries no trace that it ever said otherwise. Nothing detects it, and nothing recovers it.

Law 5 warns about this class directly: an attribution quarter differing from a creation date "is legitimate, not a bug to fix". A sweep enthusiastic about consistency is how that law gets violated at scale.

So when the classification is uncertain, the note is preserved and reported. Always.

## Delegation

For a sweep touching more than a handful of notes, invoke the `correction-sweep` agent so the many-note read runs in its own context window — the same pattern `/om-vault-audit` uses for `vault-librarian`. The agent returns a classified plan; the edits happen here, after you have read it.

## Related

- `/om-vault-audit` — structural health, periodic, whole-vault. Complementary: it checks shape, this checks truth.
- `/om-tidy` — acts on hygiene flags. Also structural.
- `CLAUDE.md` § Write-Correctness Laws — Laws 1, 2 and 5, which this implements.
brag-spotterSubagent

Proactively scans for achievements and wins that aren't in the brag doc yet. Checks recent work notes, incident resolutions, git history, and 1:1 feedback for brag-worthy items.

context-loaderSubagent

Load all vault context about a specific topic — person, project, incident, team, or concept. Gathers notes, backlinks, mentions, timeline, and produces a synthesized briefing.

correction-sweepSubagent

Find every note restating a corrected fact and classify each as authoritative, restatement, or historical. Discovery and judgement only — never edits. Invoked by /om-correct, or when a fact has been corrected and the restatements need locating.

cross-linkerSubagent

Scan recent or specified notes for missing wikilinks. Finds mentions of people, projects, teams, competencies, and incidents that should be linked but aren't. Suggests missing bidirectional links for user approval.

people-profilerSubagent

Bulk create or update person notes from Slack profiles. Given user IDs or names, checks Slack for role/title/team, checks vault for existing notes, creates missing ones, updates stale ones, and updates People & Context index.

review-fact-checkerSubagent

Verify every factual claim in a review draft against vault sources. Returns verified/unverified/flagged claims.

review-prepSubagent

Aggregate performance review material from the vault for a given period. Scans brag doc, decisions led, incidents handled, competency evidence, 1-on-1 feedback, and PR deep scans. Invoke via /om-review-brief or when the user asks for review prep.

slack-archaeologistSubagent

Deep reconstruction of Slack conversations. Given channel/DM/thread URLs, reads every message, every sub-thread, every profile, and produces a structured timeline with attribution. Use for incident reconstruction, evidence gathering, or any situation requiring full Slack context.