Loom keeps your agents on track.

Tutorial 12: Audit and maintain your Loom store

Why this matters

Tutorial 11 walked one maintenance pass end to end. This tutorial turns that into a routine you can re-run for the life of a store — the thing you reach for after a large import, a hierarchy change, or a stretch where retrieval started feeling unreliable.

The loop is four steps: audit, decide, repair, verify. The order carries the whole discipline. Auditing before deciding stops you from fixing the wrong thing; verifying with the same read that exposed the problem is what proves the repair actually worked rather than merely ran.

As in Tutorial 11, finding nothing to repair is a valid result — and here it will be common, because you may have already repaired this store once.

Before you start

Expect this to take about twenty minutes.

Start with the tutorial store

YouLoad configured store [loom_demo] for this session, confirm its description, and do not change persistent configuration.
AgentThe agent connects to the exact configured tutorial store and leaves saved routing unchanged.
ResultI loaded [loom_demo] for this session and left persistent configuration unchanged.

1. Establish a read-only baseline

YouAudit [loom_demo] in read-only mode. Check for duplicate or near-duplicate categories, conflicting current facts, missing project scope, missing author attribution, unfinished Roadmap items, and stale work records. Group findings by severity, cite exact record IDs and types, and do not change anything.
AgentThe agent narrows from the live catalog into only evidence-backed candidates and treats age as context rather than proof.
ResultThe audit lists findings by severity with exact record IDs and types. Categories with no evidence-backed finding are empty. No changes were made.

Keep this report as the before-state.

2. Review category consolidation semantically

YouIf the baseline identified duplicate-category candidates, explain the shared kind, show how every affected record would map, and reject the merge if any record would lose meaning. Do not apply it yet.
AgentFor each actual candidate, the agent either provides a meaning-preserving mapping or rejects it. With no candidate, it reports a no-op.
YouApply only a consolidation explicitly verified in the preceding result. If none was verified, make no change. Preserve record identity, relationships, and history, then repeat the category inventory.
ResultThe verified consolidation passed the repeated inventory, or no change was made.

3. Reconcile current facts without erasing history

YouFor any current-state conflict cited by the baseline, use dates, scope, and meaning to choose one current answer. Preserve older records as history and explain whether each newer fact negates, disputes, or supersedes the older one. If there is no cited conflict, make no change.
AgentThe agent repairs only cited conflicts with enough evidence and leaves unrelated scopes separate.
YouFor every repaired conflict, repeat the exposing current-state read and show the historical context separately.
ResultEach repaired read has one current answer and preserved history, or the verification is a no-op because nothing was repaired.

4. Check scope and author hygiene

YouAudit cited [loom_demo] records for missing or inconsistent project and author edges. Propose a correction only when the intended existing target is explicit in record history; never infer it from this disposable repository's Git identity.
AgentThe agent proposes only exact existing targets and reports ambiguity instead of inventing scope or authors.
YouApply only verified scope or author corrections, repeat the same scoped reads, and list everything intentionally unresolved.
ResultVerified relationships now resolve correctly, or no change was made. Ambiguous records remain listed.

5. Finish a Roadmap with a delivery receipt

If you ran Tutorial 11, expect this step to be a no-op. That tutorial's §3 targets this same Roadmap in this same store, so if it closed there, the item is already closed and the correct outcome now is to say so — not to close it twice. Retrieve the existing receipt instead and confirm the item has left the open-work view. Recognising already-done work is the exercise.

YouIn [loom_demo], look for an exact open Roadmap named document the bundled CSV columns. Close it only if that exact item exists and this disposable repository contains real branch, commit, file, and test evidence. Otherwise report not closed and make no change.
AgentThe agent verifies the exact plan and repository evidence before changing state or writing a separate Deliverable receipt.
ResultThe plan was closed with a real receipt, or it was reported not closed with no mutation.

If closure occurred, retrieve the receipt and confirm the item left the open-work view. Otherwise confirm that it remains open or absent.

6. Audit stale work without leaving [loom_demo]

YouAudit task-like records stored in [loom_demo]. Classify them as open, completed, cancelled, awaiting a decision, or unclear from the available evidence. Do not query [kanban], do not use Kanban events, and do not change anything.
AgentThe agent reads only [loom_demo], treats age as context rather than proof, and reports exact IDs and types.
ResultThe audit reports only classifications supported by [loom_demo]; if it contains no task-like records, the result is empty. No changes were made.

7. Verify the actual outcome

YouRepeat the same [loom_demo] health checks as the baseline. List mutations actually made (possibly none), every verification result, preserved history, unresolved items, and follow-up steps. Do not report a repair that did not occur.
AgentThe agent compares the same bounded before-and-after reads.
ResultThe report contains only observed changes and verification results. Zero mutations is valid.

8. Make it a routine

Use this prompt after a large import, hierarchy change, or retrieval problem:

YouUsing only [loom_demo] for this tutorial run, audit store health first. Show evidence for duplicate categories, conflicting current facts, scope and author problems, incomplete Roadmap lifecycles, and stale work. Make no changes until I approve a bounded repair; preserve history and repeat every exposing read afterward.

9. If something looks wrong

Every step reports no changes. Expected, especially straight after Tutorial 11. A clean store produces a clean audit. Zero mutations across all eight steps is a passing run, not a broken one.

A merge in §2 would collapse two categories that only look alike. Reject it. Consolidation is by shared meaning, not similar spelling — two categories spelled almost identically can be genuinely distinct, and a merge that loses that distinction is not recoverable by re-running the audit.

You cannot tell whether a newer fact negates, disputes, or supersedes an older one. That ambiguity is itself the finding. Leave it unresolved and list it. §3 asks you to explain which relationship applies; if you cannot, the evidence is not sufficient to repair it yet.

The agent wants to fill in a missing author or scope from your Git identity. Decline. §4 is explicit that the intended target must be present in the record's own history — inferring it from whoever happens to be running the tutorial invents attribution that will later read as fact.

The before-and-after reads in §7 disagree with what you were told was repaired. Trust the reads. That is exactly why the loop repeats the same query rather than a fresh one.

10. Takeaways