llm-wiki-audit-feedback-loop

Durable feedback loop for correcting llm-wiki pages without losing the correction to chat history. Use when (1) a human notices a wiki page is wrong, outdated, or contradicts a source, (2) processing the `audit/` inbox of a domain wiki, (3) reviewing what feedback has been resolved vs deferred, (4) needing to leave a comment on a specific text range that survives line- number drift. Implements the anchored-text audit file pattern from lewislulu/llm-wiki-skill, adapted for workspace-hub's domain-wiki layout under /mnt/local-analysis/llm-wiki/wikis/<domain>/. Extends the 5-op model (compile/ingest/query/lint) from research/llm-wiki with the missing `audit` op. Never silently delete feedback — rejected audits stay archived with rejection rationale.

5 stars

Best use case

llm-wiki-audit-feedback-loop is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Durable feedback loop for correcting llm-wiki pages without losing the correction to chat history. Use when (1) a human notices a wiki page is wrong, outdated, or contradicts a source, (2) processing the `audit/` inbox of a domain wiki, (3) reviewing what feedback has been resolved vs deferred, (4) needing to leave a comment on a specific text range that survives line- number drift. Implements the anchored-text audit file pattern from lewislulu/llm-wiki-skill, adapted for workspace-hub's domain-wiki layout under /mnt/local-analysis/llm-wiki/wikis/<domain>/. Extends the 5-op model (compile/ingest/query/lint) from research/llm-wiki with the missing `audit` op. Never silently delete feedback — rejected audits stay archived with rejection rationale.

Teams using llm-wiki-audit-feedback-loop should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/llm-wiki-audit-feedback-loop/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.claude/skills/research/llm-wiki-audit-feedback-loop/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/llm-wiki-audit-feedback-loop/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How llm-wiki-audit-feedback-loop Compares

Feature / Agentllm-wiki-audit-feedback-loopStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Durable feedback loop for correcting llm-wiki pages without losing the correction to chat history. Use when (1) a human notices a wiki page is wrong, outdated, or contradicts a source, (2) processing the `audit/` inbox of a domain wiki, (3) reviewing what feedback has been resolved vs deferred, (4) needing to leave a comment on a specific text range that survives line- number drift. Implements the anchored-text audit file pattern from lewislulu/llm-wiki-skill, adapted for workspace-hub's domain-wiki layout under /mnt/local-analysis/llm-wiki/wikis/<domain>/. Extends the 5-op model (compile/ingest/query/lint) from research/llm-wiki with the missing `audit` op. Never silently delete feedback — rejected audits stay archived with rejection rationale.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# llm-wiki audit / feedback loop

The wiki is AI-written; it is wrong sometimes. Sources are human-written;
they contradict each other. Inline chat corrections evaporate when context
compresses. The `audit/` inbox is the durable correction surface — one file
per comment, anchored to a text range, processed under one of four
resolution states, and **never silently deleted**.

Pattern provenance: [lewislulu/llm-wiki-skill audit-shared](https://github.com/lewislulu/llm-wiki-skill).
Anchor algorithm choice (before/text/after window) is robust against
line-number drift, which is what makes the file format usable across
multiple editing surfaces (CLI, Obsidian plugin, web viewer if/when we
build one).

---

## When this skill applies

| Trigger | Action |
|---|---|
| Human spots a factual error in a wiki page | File an audit entry; do NOT just fix it in chat |
| Cascade-update from new source contradicts existing wiki content | File an audit + annotate in-line; let resolution decide |
| Lint pass flags a heuristic issue (orphan, missing cross-link, freq-mentioned no page) | File an audit; lint script may auto-file |
| Reviewer's cross-provider review finds a defect class in wiki content | File an audit per finding |
| Wiki page contradicts a `feedback_*` memory entry | File an audit; resolution may require updating memory OR wiki |
| You just want to make a small typo fix | **Skip this skill** — edit in place, log it normally |
| You want to retract content entirely | File an audit with `severity: high` + `action: remove` |

---

## Directory layout

```
/mnt/local-analysis/llm-wiki/wikis/<domain>/
├── audit/                    ← open feedback inbox (one file per comment)
│   ├── 20260520-143022-mooring-mbl-calc-error.md
│   └── 20260520-151105-orcaflex-version-drift.md
├── audit/resolved/           ← processed feedback — NEVER deleted
│   ├── 20260519-091233-yaw-moment-citation-fixed.md
│   └── 20260519-093045-acoustic-impedance-rejected.md
└── log/
    └── 20260520.md           ← per-day operation log; every audit resolution logs here
```

`audit/` lives **inside the wiki domain** so multiple domain wikis maintain
independent inboxes. Cross-domain audits (rare) live under whichever domain's
page the comment anchors to.

---

## Audit file format (see `references/audit-file-format.md` for full spec)

```markdown
---
id: 20260520-143022-mooring-mbl-calc-error
target: wikis/engineering/standards/dnv-os-e301.md
anchor_before: |
  ## Safety factor application
  
  The minimum breaking load (MBL) is reduced by the
anchor_text: |
  safety factor 1.67 for ULS conditions per
anchor_after: |
  table 4-2, row 3, before being compared against
  the calculated tension envelope.
severity: high                     # low | medium | high
action: revise                     # revise | remove | clarify | annotate-contradiction
filed_by: vamsee
filed_at: 2026-05-20T14:30:22-05:00
state: open                        # open | resolved
---

# Feedback

The DNV-OS-E301 2023 revision actually specifies 1.5 for ULS in
table 4-2 row 3, not 1.67. The 1.67 value is from the 2018 revision
(table 4-1, row 2) and should not apply to current calcs.

# Recommended action

Update the page to cite the 2023 revision's table 4-2 row 3
(safety factor = 1.5) and add an `## Edition history` section noting
the 2018 → 2023 change. The mooring_design.py citation registry
already points at the 2023 edition; the wiki is the only place still
referencing 1.67.
```

Frontmatter contract:

| Field | Required | Purpose |
|---|---|---|
| `id` | yes | `<YYYYMMDD-HHMMSS-slug>`; filename matches `id` exactly |
| `target` | yes | Repo-relative path to the wiki page being commented on |
| `anchor_before` | yes | ~3 lines immediately preceding `anchor_text` in the target file |
| `anchor_text` | yes | The exact text range the comment is about |
| `anchor_after` | yes | ~3 lines immediately following `anchor_text` |
| `severity` | yes | `low` / `medium` / `high` — drives processing priority |
| `action` | yes | `revise` / `remove` / `clarify` / `annotate-contradiction` |
| `filed_by` | yes | Human handle or agent id |
| `filed_at` | yes | ISO 8601 timestamp with TZ offset |
| `state` | yes | `open` (in `audit/`) or `resolved` (in `audit/resolved/`) |

---

## The four resolution states

Every audit lands in exactly one state. Never delete.

### `accept` — apply the correction

1. Locate the exact range in the target file. Use the `anchor_before` /
   `anchor_text` / `anchor_after` window; line numbers may have drifted
   since the audit was filed.
2. Apply the correction. Bump the target page's `updated:` frontmatter
   date. Run cascade-update scan per `llm-wiki-page-shape-contract` Rule 5
   — the fix may ripple to other pages.
3. Append a `# Resolution` section to the audit file:
   ```markdown
   # Resolution

   2026-05-20 · accepted.
   Fixed safety factor from 1.67 to 1.5 per DNV-OS-E301 (2023) table 4-2
   row 3. Added Edition history section noting 2018 → 2023 change.
   Cascade-updated: wikis/engineering/concepts/mooring-safety-factors.md
   (referenced the old value).
   ```
4. Move file from `audit/` to `audit/resolved/`. Filename unchanged.
5. Log in `log/YYYYMMDD.md`:
   ```
   ## [HH:MM] audit | resolved 20260520-143022-mooring-mbl-calc-error — accepted; fixed DNV-OS-E301 safety factor
   ```

### `partial` — apply some, not all

Same as `accept`, but the resolution section explains what was applied
and what was deferred. If the deferred portion needs follow-up, file a
new audit referencing this one's `id`. Log line includes ` — partial`.

### `reject` — feedback declined

1. Do not modify the target file.
2. Append a `# Resolution` section with the rejection rationale:
   ```markdown
   # Resolution

   2026-05-20 · rejected.
   The 1.67 value is correct for the legacy 2018 edition still cited by
   the upstream client's project basis-of-design (mkt-a project 2024-03).
   The wiki page documents the value as legacy and the citation explicitly
   notes the edition. Not a bug.
   ```
3. Move file from `audit/` to `audit/resolved/`. Filename unchanged.
4. Log:
   ```
   ## [HH:MM] audit | resolved <id> — rejected; <one-line rationale>
   ```

**Never delete rejected audits.** Rejection history is valuable — it
prevents the same feedback being re-filed by a different reviewer next
month, and it documents the wiki's position on a contested point.

### `defer` — needs more research

1. Do not modify the target file.
2. Add the open question to `wikis/<domain>/CLAUDE.md` under an
   "Open research questions" section (create if missing).
3. Append a `# Resolution` section noting the defer:
   ```markdown
   # Resolution

   2026-05-20 · deferred.
   The 2023 revision text is paywalled; we cannot independently verify
   table 4-2 without the source document. Added to engineering wiki's
   open-questions list. Will re-process once we have the 2023 edition
   in `knowledge/wikis/engineering/wiki/standards/sources/`.
   ```
4. **Leave the audit in `audit/`** (NOT `audit/resolved/`). Deferred
   audits remain open until upgraded to `accept` / `partial` / `reject`.
5. Log:
   ```
   ## [HH:MM] audit | deferred <id> — <reason>
   ```

---

## Anchor-window resolution algorithm

When applying an audit's correction, the target file's line numbers may
have drifted since the audit was filed. The before/text/after window
makes the audit robust:

1. Search the target file for `anchor_text` (literal string match).
2. If exactly one match: verify the preceding ~3 lines match `anchor_before`
   and the following ~3 lines match `anchor_after`. If both match, apply.
3. If zero matches: the text was deleted or rewritten since the audit was
   filed. Re-read the audit body and either (a) find the equivalent new
   range, then apply, or (b) defer with reason "anchor text gone — need
   to re-locate intent".
4. If multiple matches: use `anchor_before` and `anchor_after` to
   disambiguate. If still ambiguous: defer with reason "ambiguous anchor".

This algorithm matches lewislulu's `audit-shared/src/anchor.ts` semantics.
A future Python port should live at `scripts/knowledge/audit_anchor.py`
when we have multiple audits to process programmatically.

---

## Processing cadence

| Cadence | What runs |
|---|---|
| Per session that touches a wiki page | Scan `audit/*.md` for that target before editing — open audits may already answer the question |
| Weekly (per `research/llm-wiki-cadence-governance`) | Process all `audit/<domain>/*.md` files; aim for ≤7 day median resolution time |
| Before any wiki PR | Lint pass per `llm-wiki-page-shape-contract` post-conversion checklist; audits against changed files must be processed first |

---

## Anti-patterns

- **Silently deleting audits** — even rejected ones. Rejection history matters.
- **Fixing the page without filing an audit** when feedback came from a non-author. The audit records *who flagged it* and *what was said* — critical for traceability.
- **Using audits for typo fixes** — single-character fixes are noise; just edit in place and log normally. Audits are for substantive corrections.
- **Filing an audit without an anchor window** — the audit is unprocessable; the anchor IS the surface area for resolution.
- **Resolving an audit by editing it instead of moving to `resolved/`** — leaves the inbox cluttered and breaks `audit_review.py` queries (when we build one).
- **Cross-domain audits without explicit target paths** — every audit is anchored to exactly one wiki page. If feedback spans multiple, file one audit per affected page and cross-reference via `related: [<other-audit-id>]` frontmatter.

---

## Hand-off back to `research/llm-wiki`

```bash
# Open audits for a domain wiki
ls /mnt/local-analysis/llm-wiki/wikis/<domain>/audit/*.md 2>/dev/null

# After applying a fix:
git add wikis/<domain>/<target-page>.md \
        wikis/<domain>/audit/resolved/<audit-id>.md \
        wikis/<domain>/log/YYYYMMDD.md
git rm wikis/<domain>/audit/<audit-id>.md
git commit -m "wiki(<domain>): resolve audit <id> — <action>; <one-line>" \
  -- wikis/<domain>/<target-page>.md \
     wikis/<domain>/audit/resolved/<audit-id>.md \
     wikis/<domain>/log/YYYYMMDD.md
```

Pathspec form `git commit -m "..." -- <files>` per
`feedback_multi_agent_commit_serialization`.

---

## What this skill is NOT

- Not for in-chat one-off corrections that don't need to survive context loss
- Not for typo fixes — just edit in place
- Not a CLI tool — this is the file-format contract; a Python `audit_review.py` script can be built later when audit volume justifies it
- Not for non-wiki repos — audits target wiki pages specifically

## Related must-fire rules

- `feedback_attestation_enables_contradiction_detection` — audit-driven contradictions are a defect class, not noise
- `feedback_silent_verdict_flip_defect_class` — standards-page audits should check section + edition, not just code_id
- `feedback_n_night_blocker_promote_to_replan` — if the same defect class keeps re-filing across audits, the underlying wiki structure may need a redesign, not another fix
- `feedback_never_offer_to_self_label_plan_approved` — high-severity audits proposing major restructure should route through a planned issue, not direct-apply
- `feedback_subagent_write_phantom` — if a subagent processes audits, main session verifies the `audit/` → `audit/resolved/` move actually happened on disk

Related Skills

llm-wiki-weekly-freshness

5
from vamseeachanta/workspace-hub

Class-level governance workflow for keeping llm-wiki-style markdown knowledge bases current, public-safe, graph/index-valid, and useful for code development. Use when reviewing llm-wiki architecture/content, scanning new LLM concepts, maintaining public knowledge graphs, producing an issue roadmap, or running recurring freshness cadence.

llm-wiki-source-extraction-coverage

5
from vamseeachanta/workspace-hub

Doc-type-aware extraction contract for llm-wiki source ingestion with measurable coverage and source-anchored traceability. Use when (1) ingesting a PDF, DOCX, XLSX, PPTX, HTML, or scanned-image source into a wiki `sources/` page, (2) computing the pre-extraction estimate (what fraction of the source we expect to recover) and post-extraction yield (what fraction we actually recovered), (3) anchoring wiki claims back to specific page / paragraph / cell / slide positions in the source so a reviewer can re-verify or revise against the actual document, (4) deciding whether OCR fallback or manual transcription is needed. Codifies workspace-hub's existing OCR fallback chain and python-docx / openpyxl / trafilatura patterns into a format-specific routing table. Companion to research/llm-wiki-page-shape-contract (Rule 7 input-layer pages) and research/llm-wiki — this skill is the defense against silent extraction failure.

llm-wiki-public-private-routing

5
from vamseeachanta/workspace-hub

Firewall between the public llm-wiki repo (vamseeachanta/llm-wiki, MIT + CC-BY-4.0) and per-client private wikis (vamseeachanta/llm-wiki-<client>, e.g. llm-wiki-mkt-a per #2746). Use when (1) deciding whether a converted wiki page lands in public or private surface, (2) applying the project-name abstraction rule to public-bound content, (3) evaluating the public- availability exception that lets actual project names pass through unmodified, (4) promoting content from private to public after sanitization. Encodes the 2026-05-20 user routing directive verbatim: exact client results → private; abstracted (project-name only) → public; project name + all key data publicly available → exception applies. Companion to research/llm-wiki-page-shape-contract (which calls this skill at Rule 8) and research/llm-wiki-source-extraction-coverage (which produces the source pages this skill decides where to send).

llm-wiki-page-shape-contract

5
from vamseeachanta/workspace-hub

Enforce the page-shape contract when a repo-side document or analysis output gets converted into an llm-wiki page. Use when (1) running `scripts/knowledge/llm_wiki.py ingest`, (2) writing or rewriting a wiki page from docs/reports/*, docs/handoffs/*, scripts/review/results/*, or calc citation outputs, (3) deciding whether a page should be split into a folder of sub-pages, (4) reviewing wiki PRs for length / diagram / divide-and-conquer compliance. Codifies the Karpathy + Astro-Han + lewislulu page rules applied to workspace-hub's domain-wiki layout under /mnt/local-analysis/llm-wiki/wikis/<domain>/. Sibling to research/llm-wiki (which owns the CLI ops) — this skill is the quality gate every converted page must clear before commit.

llm-wiki-cadence-governance

5
from vamseeachanta/workspace-hub

Weekly governance workflow for keeping an llm-wiki repository current, code-development-useful, and connected to actionable GitHub issue planning.

pre-completion-cleanup-audit

5
from vamseeachanta/workspace-hub

Audit and dispose of session residue (orphan files, scratch dirs, sibling-repo state, locks, trash-stages) BEFORE claiming a task complete. Required gate before any agent says "all done", "task complete", or hands work back to user/orchestrator.

oss-wiki-development-arc

5
from vamseeachanta/workspace-hub

Three-phase methodology (Substrate → Depth → Quality) for building open-source engineering wikis efficiently. Skip 70%+ of empirical iteration cost by pre-loading the pattern.

client-llm-wiki-factory

5
from vamseeachanta/workspace-hub

Operator checklist for instantiating a new per-client private llm-wiki repo under workspace-hub [#2746](https://github.com/vamseeachanta/workspace-hub/issues/2746) + [#2731](https://github.com/vamseeachanta/workspace-hub/issues/2731) D4 (amended) naming convention `llm-wiki-<client>`.

repo-mission-portfolio-audit

5
from vamseeachanta/workspace-hub

Audit the workspace-hub repo portfolio to extract each repo's mission, identify documentation gaps, and prioritize a plan/approval sequence with explicit LLM-wiki weighting for future issue triage.

provider-session-ecosystem-audit-and-exporters

5
from vamseeachanta/workspace-hub

Build and maintain cross-provider session-log audits for Codex, Codex, Hermes, and Gemini, including exporter design, normalization, and behavioral verification.

orcawave-orcaflex-readiness-audit

5
from vamseeachanta/workspace-hub

Audit the real readiness of digitalmodel OrcaWave/OrcaFlex spec-driven workflows by reconciling workspace-hub issues, source/tests, semantic-equivalence boundaries, and wiki synthesis gaps.

read-only-pre-implementation-audit

5
from vamseeachanta/workspace-hub

Systematic cross-check workflow to validate assumptions before TDD coding begins