plugins/codex-sdlc/skills/verify-citations/SKILL.md
Verify all citations in a document against the research corpus
npx skillsauth add jmagly/aiwg verify-citationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Validate that all citations, references, and factual claims are backed by actual sources in the research corpus.
When invoked, perform systematic citation verification:
Parse Target File
@.aiwg/research/sources/* references@.aiwg/research/findings/* referencesREF-XXX inline references10.XXXX/...)Author et al., YYYY)[<artifact_id>@<content_hash>, L<n>-<n>] and path-only fallback [<artifact_id>, L<n>-<n>]Verify Each Citation
content_hash present, recompute current hash and compare (see RLM Citation Verification below)Detect Hallucinations
Check GRADE Compliance
Generate Report
Auto-Fix Mode (--fix)
[STALE: hash mismatch]; do not auto-rewrite (the agent that emitted them must decide whether the new content still supports the claim)When the target file contains RLM-format citations (#1205, #1223), verify-citations validates them against the current state of the cited artifacts.
The skill recognizes two inline forms (matching the schema at agentic/code/addons/rlm/schemas/citation-tuple.json):
[<artifact_id>@<content_hash>, <lines>] — full provenance with content hash
[src/auth/login.ts@a8f9c2d4e5f60718, L42-58][<artifact_id>, <lines>] — citation without content hash (artifact wasn't in the index when emitted)
[src/legacy/auth.py, L88]The lines field is optional in both forms.
For versioned RLM citations:
<artifact_id> to a project-relative file pathsrc/artifacts/index-builder.ts:243)content_hash:
--strict)For path-only fallback RLM citations:
<artifact_id> to a project-relative file path--strict)Stale verdict means the file content has changed since the citation was emitted — the claim may no longer be supported by the cited region. The simple hash-mismatch heuristic doesn't distinguish whitespace edits from semantic changes; richer semantic-drift detection is the responsibility of aiwg index doctor --rlm-audit (#1208).
The hash routine MUST match the index implementation exactly so citations emitted by rlm-batch round-trip cleanly:
sha256(file_contents).hexdigest()[0:16]
See src/artifacts/index-builder.ts:243 for the canonical implementation. Any verification logic that diverges from this convention will produce false stale verdicts.
When RLM citations are present, the report adds a new section:
RLM Citations: 12 total
✓ Fresh: 9
⚠ Stale: 2
⚠ Un-versioned: 1
✗ Missing: 0
STALE citations:
- [src/auth/login.ts@a8f9c2d4e5f60718, L42-58]
Current hash: f3b2c1d4e5a60718
File modified since citation emitted
UN-VERSIONED citations:
- [src/legacy/auth.py, L88]
File exists but no content hash; consider running through aiwg index
--rlm: opt-in to RLM-only mode — skip @-mention research-corpus checks. Useful when verifying RLM-aggregated outputs in CI without research-corpus context.--strict: existing flag — STALE and UN-VERSIONED RLM citations escalate from warnings to errors and produce non-zero exit.[file-path] - File to verify (default: all .md files in current directory)--strict - Treat warnings as errors (including STALE and UN-VERSIONED RLM citations)--fix - Automatically fix GRADE violations and remove hallucinated citations (does not rewrite RLM citations — see #6 above)--report - Save report to .aiwg/reports/citation-verification.md--corpus-only - Only check @-mention references, skip author-year patterns--rlm (#1225) - Verify RLM citations only; skip research-corpus checksdata-ai
Report which research-corpus radar sidecars are overdue for refresh. Computes staleness (days since last refresh vs the cadence window) for every radar, sorted most-overdue-first. Runs via `aiwg corpus radar-status`.
data-ai
Aggregate research-corpus radar sidecars into a corpus or per-cluster freshness report — totals, overdue count, per-cluster / per-GRADE / per-trajectory breakdowns, an overdue table, and per-radar rationale snippets. Runs via `aiwg corpus radar-report`.
testing
Scaffold radar/freshness sidecars for research-corpus REFs. Pulls title/authors from the citation sidecar and GRADE from the analysis doc, defaults the refresh cadence from GRADE and the cluster from a corpus-local map, and stamps documentation/radar/REF-XXX-radar.md. Runs via `aiwg corpus radar-init`.
data-ai
Compute an entity's publication trajectory — per-year paper counts, topic drift, hot-streak detection (≥3 consecutive A-grade years), and career phase. Runs via `aiwg corpus profile-temporal`.