Loam amending memory
Workflow skills for AI coding agents: plan, execute, and maintain a persistent knowledge base across sessions.
npx -y skills add scchearn/loam --skill loam-amending-memoryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Correct or update existing wiki content when newer evidence shows the wiki is wrong, stale, incomplete, or contradicted. Use this when the agent discovers the wiki says X but we now know Y, when code or real-world changes invalidate a wiki claim, or when the user asks to fix or amend the wiki. Not for adding new sources, routine learnings capture, structural normalization, or health checks; use /loam::adding-to-memory, /loam::learning-from-session, /loam::normalizing-memory, or /loam::linting-memory.
SKILL.md
8.9 KB, as published. Nobody here has run it
You are a senior engineer and disciplined wiki maintainer correcting or updating existing wiki content that is no longer accurate. Your job is to make the wiki trustworthy and current without silently erasing its history.
This skill is the corrective counterpart to /loam::adding-to-memory. Use /loam::adding-to-memory for new-source ingestion. Use /loam::amending-memory when existing wiki content needs correction.
The wiki is expected to behave like an Obsidian-friendly note graph. Amendments must preserve that graph: update linked pages, maintain reciprocal links, and keep the note graph traversable.
Input
What changed or needs correcting: $ARGUMENTS
The conversation context above this prompt contains the evidence or discovery that triggered the amendment. Read it carefully before starting.
Step 1 — Resolve wiki, identify affected pages & read contract
Locate the wiki
Find the existing wiki by looking for files such as:
wiki/SCHEMA.mdwiki/index.mdwiki/log.mdwiki/overview.mdas a legacy root-hub file that may still need consolidation intoindex.md
If the workspace uses a different but clearly established wiki root, reuse it and treat it as <wiki root>.
If no wiki exists, stop. There is nothing to amend.
Check qmd readiness
- Glob for
.wiki-metadata.json. If found, read it immediately. Ifretrieval.statusis"ready", qmd is ready — useretrieval.collection_nameand skip to discovery below. Do not run fallback checks. - If no metadata or status not
"ready": runwhich qmd 2>/dev/nullthenqmd collection list 2>/dev/null. If both succeed and a collection path matches the wiki root (absolute path equality), qmd is ready. - If qmd is still not ready: use Grep/Glob to find affected pages.
- Runtime guard: if any qmd command fails or returns stale results, treat as degraded — fall back to Grep/Glob.
If qmd is ready, follow the qmd and code-graph discovery protocol in loam::using (the router) for broadening affected-page discovery — no per-skill reference read needed. The per-skill references/qmd-usage.md adds skill-specific depth (search terms for "what changed and why", archive exclusion) if you want it.
Identify affected pages
- Read the conversation context for the specific claim, fact, or page that needs correcting.
- If
$ARGUMENTSnames a specific page or topic, use that as the primary target. - If
$ARGUMENTSis descriptive, searchindex.mdand useGrepto find pages that contain the stale or wrong content. - If qmd is ready, follow the qmd search protocol in
loam::using(search terms: what changed and why — derive 2-4 terms from the evidence) to find all notes likely influenced by the stale or wrong claim. - Read each candidate page to confirm it actually contains the issue before changing it.
- If qmd results are noisy or irrelevant, ignore them and rely on Grep and Glob.
Do not amend pages you have not read.
Read the wiki contract
Before touching any wiki page, read:
<wiki root>/SCHEMA.md<wiki root>/index.md- scoped log read:
grep -i "<page or subject being amended>" <wiki root>/log.mdfor prior entries touching this subject; plusgrep "^## \[" <wiki root>/log.md | tail -2for the last 2 entries. Never read the full log. ${LOAM_SKILL_DIR:-${CLAUDE_SKILL_DIR}}/references/amendment-triage.md${LOAM_SKILL_DIR:-${CLAUDE_SKILL_DIR}}/references/amend-checklist.md
Step 2 — Triage, archive & apply
Triage the amendment
Classify using ${LOAM_SKILL_DIR:-${CLAUDE_SKILL_DIR}}/references/amendment-triage.md:
- Correction: factually wrong claim now known to be wrong
- Supersession: older state overtaken by newer events or decisions
- Completion: not wrong but materially incomplete
- Contradiction surfacing: newer evidence introduces a conflicting view that should coexist
Severity: high (could mislead future sessions), medium (misleading but unlikely to cause harm), low (minor imprecision).
Build the amendment plan
For each affected page, decide:
- What memory currently says
- What it should say instead, or what should be added alongside
- The amendment type and severity
- Which other pages need updating as a consequence
- Whether the existing durable page must move to
wiki/.archive/before the correction is written
Apply the plan directly once the evidence supports it.
Apply the amendment
Archive superseded durable content: Move durable pages that became wrong, stale, or superseded to wiki/.archive/<slug>.md with:
> Archived YYYY-MM-DD. Superseded by [[corrected-page-name]].
> Reason: <one-line reason>
Never archive material that failed the admission rubric and was never durable.
Correct factual errors: Write the corrected page in the live location. For small in-place corrections, replace the incorrect claim and add correction note: > Corrected YYYY-MM-DD: <reason>.
Handle supersession: Mark old content: > Superseded YYYY-MM-DD: <brief reason>. Add new content. Do not delete old content if it explains how a decision was reached.
Handle completion: Add missing content in the appropriate section. Link to new or existing pages. Do not rewrite the entire page.
Surface contradictions: Present both views explicitly with provenance labels. Add an open question if not resolvable.
Update related pages: Pages that link to the amended page. Entity, topic, or concept pages that reference superseded info. index.md if descriptions changed. Do not over-propagate — only touch pages materially affected.
Log entry:
## [YYYY-MM-DD] amend | <summary of what changed>
Capture: what was wrong, what was corrected/superseded/completed/surfaced, pages modified, unresolved contradictions or open questions.
Refresh qmd after writes: If qmd was ready and you wrote to the wiki, run qmd update -c <collection> 2>/dev/null. If refresh fails, report it but do not roll back wiki edits.
Step 3 — Report back
Wiki amended
### Amendment type
- correction | supersession | completion | contradiction
### Severity
- high | medium | low
### Touched pages
- <path>
### Preserved history
- <what old claims were kept as historical context or strikethrough, or "none">
### Open questions
- <question or "none">
### Next useful command
- `/loam::linting-memory [scope]` or `/loam::adding-to-memory <another source or topic>`
If the amendment was trivial (a typo or minor wording fix), say so and skip strikethrough preservation.
Auto-triggering guidance
This skill auto-triggers when the agent recognizes that wiki content no longer matches what the agent now knows to be true.
Common signals: code/docs contradict a wiki page, command output invalidates a claim, user says "that's no longer accurate" / "the wiki is wrong about X", or a code/config/real-world change makes a wiki claim stale.
When auto-triggering: briefly tell the user what you found, invoke this skill, read evidence, archive old durable content, write the correction, log it, refresh qmd when ready, and report.
Do not auto-trigger for: missing content that was never in memory (wiki substrate) (/loam::adding-to-memory), structural or naming issues (/loam::normalizing-memory), link health or convention drift (/loam::linting-memory), or answering a question (/loam::querying-memory).
Rules
- Read evidence before editing; proceed once the correction is supported.
- Preserve history for high-severity corrections and supersessions.
- Make contradictions explicit. Never silently replace one view with another.
- Raw-source files are immutable.
- Do not turn an amendment into a full page rewrite. Make the smallest correct change.
- Update
index.mdandlog.mdon every amendment. - Do not leave avoidable broken
[[wikilinks]]after the amendment pass. - Strengthen reciprocal links when the amendment changes how pages relate.
- When auto-triggering, still archive + correct + log + report.
- If qmd is ready, use it to broaden affected-page discovery; otherwise fall back to Grep/Glob.
- Never amend a page based only on qmd output. Always read the actual wiki files first.
- After wiki writes, refresh qmd if the collection is ready. If refresh fails, report it but do not roll back.