artifact-resurfacing
Four-phase protocol for clearing accumulated drift between memory claims, CLAUDE.md citations, and on-disk reality. Detects stale citations, missing files, and orphan plans; classifies findings; emits proposed diffs; codifies prevention. Companion to closeout (closeout discovers orphans; this skill polishes them). Discovery ≠ remediation — Phase 3 emits proposed diffs only; constitutional doc edits require explicit conductor authorization.
What this skill does
# Artifact Resurfacing
Open the drift on the table. Surface the buried artifacts — stale citations, missing referenced files, orphan plans, cross-scope memory entries pointing at paths that moved. Polish them in proposal form. Codify the lesson so the next session does not have to re-discover the same drift.
## Authority boundary (read first)
This skill is **propose-not-apply** for any constitutional surface. It produces drift tables, edit diffs, and IRF row proposals. It does not commit edits to `CLAUDE.md`, `MEMORY.md`, `governance-rules.json`, `registry-v2.json`, or any `seed.yaml` without explicit conductor authorization in the same session.
- **Closure for plans** — defer to [`closeout`](../closeout/SKILL.md). This skill does not assign DONE-NNN / IRF-XXX-NNN labels; it surfaces orphans for closeout's classifier.
- **Memory operations** — defer to [`consolidate-memory`](../../knowledge/consolidate-memory/SKILL.md) for memory file mutations. This skill emits proposed memory diffs.
- **Cross-session continuity** — defer to [`cross-agent-handoff`](../cross-agent-handoff/SKILL.md). This skill writes the polish-log entry; handoff carries it forward.
- **Verification of claimed transitions** — defer to [`qa-audit`](../qa-audit/SKILL.md).
Discovery ≠ remediation. The skill *finds* and *proposes*. The conductor *applies*.
## When to use
- "Resurface buried artifacts in <domain>"
- "Find stale citations in this CLAUDE.md"
- "Reconcile memory drift between scopes"
- "Audit this domain for orphans"
- "Polish referenced-but-missing files"
- "Future-fix this so it doesn't drift again"
- Closeout has surfaced ≥3 follow-ups whose root cause is drift between memory and disk
- A `MEMORY.md` walkback flags ≥1 stale path citation
- A `find` for a CLAUDE.md-cited path returns zero results
## Four-phase protocol
### Phase 1 — Detect
Enumerate the domain's surface. For a target `CLAUDE.md` or `MEMORY.md`, extract every:
- File path (absolute or `~/`-anchored)
- Function/script identifier (`foo.py`, `bar()`, `--flag`)
- Issue/ledger ID (`IRF-XXX-NNN`, `DONE-NNN`, `GH#123`)
- External reference (URL, package name, doc anchor)
- Plan filename (any `~/.claude/plans/*.md` referenced by path)
Run the citation audit:
```bash
bash scripts/audit-citations.sh <path-to-CLAUDE.md>
```
The script emits one JSONL record per citation: `{cited, kind, exists, found_at, status}`. A path is **present** if `test -f` (or `test -d`) succeeds. It is **stale** if a different path on disk holds the same canonical content (e.g., the institution moved from `~/Workspace/...` to `~/Code/...`). It is **missing** if no candidate path holds the artifact.
Run the orphan-plan scan:
```bash
bash scripts/find-orphan-plans.sh [glob]
```
Default glob is `~/.claude/plans/*.md`. Output: one JSONL record per plan, with `{path, mtime, has_done_ref, has_irf_ref, has_delivered_research_marker}`. Plans lacking all three markers are orphan candidates.
Surface a four-column finding table to the user before classifying:
| artifact | cited-at | status | candidate-action |
|---|---|---|---|
| ... | ... | present \| stale \| missing \| orphan | (proposed action, no execution yet) |
### Phase 2 — Classify
For each finding, assign one class:
- **Present** — no action.
- **Stale-citation** — the artifact exists on disk; the citation points at the wrong path. Polishable via citation rewrite.
- **Missing-but-probably-never-written** — citation appears to run ahead of an unwritten artifact (e.g., a paper title cited with no draft, no commit history, no cross-scope mention). Polishable via citation annotation (`(planned — not yet written, YYYY-MM-DD)`) rather than reconstruction.
- **Missing-but-lost** — citation points at an artifact whose creation history exists somewhere (a session transcript, an old commit, a cross-scope memory file) but the artifact itself is gone. Polishable via deep search; if search fails, propose reconstruction-from-context or citation removal.
- **Orphan-plan** — pass through to [`closeout`](../closeout/SKILL.md)'s classifier (EXECUTED / IN-PROGRESS / ABANDONED / DELIVERED-RESEARCH). This skill does not assign closure labels.
For ambiguous classifications, surface the finding to the conductor and stop. Universal Rule #21 ("Do what is asked — never preempt") applies.
See `references/buried-bodies-taxonomy.md` for the full taxonomy with worked examples.
### Phase 3 — Polish (propose, do not apply)
For each classified finding, generate a polish artifact. **Never write directly to constitutional files.** Emit diffs and proposals instead.
For **stale citations**, run the proposer:
```bash
python3 scripts/propose-citation-fix.py \
--file <path-to-CLAUDE.md-or-memory-file> \
--stale-path <wrong-path> \
--canonical-path <correct-path>
```
Output: a unified diff to stdout. The conductor reviews and applies (or rejects) the diff via Edit. The script never writes the file itself.
For **missing-probably-never-written**, emit a one-line annotation diff:
```diff
- See ~/path/to/cited-but-missing.md for details.
+ See ~/path/to/cited-but-missing.md for details (planned — not yet written as of YYYY-MM-DD).
```
For **missing-but-lost**, emit the deep-search command set first:
```bash
find /Users/4jp -name "<artifact-name>*" 2>/dev/null | grep -v node_modules
grep -rl "<artifact-keyword>" ~/.claude/projects/*/memory/*.md 2>/dev/null
grep -rl "<artifact-keyword>" ~/Code/organvm/praxis-perpetua/prompt-corpus/ 2>/dev/null
```
If the search returns hits, the finding reclassifies as stale-citation and the citation-fix proposer runs. If the search returns zero hits across the deep corpus, the finding reclassifies as probably-never-written and the annotation diff applies.
For **orphan plans**, hand the plan path to `closeout` with a classification request. Do not move plans to `abandoned/` from this skill — closeout owns that decision.
See `references/constitutional-doc-policy.md` for the full rule set on what may/may not be auto-edited.
### Phase 4 — Codify (future-fix)
Polishing one drift instance is tactical. Codifying so the *next* drift self-corrects is strategic.
For each polished finding, append an entry to a `polish-log.md` in the affected repo's root (create if absent):
```markdown
## YYYY-MM-DD — <one-line summary>
- **Artifact**: <cited-path-or-id>
- **Class**: stale-citation | missing-never-written | missing-lost | orphan-plan
- **Finding**: <what was wrong>
- **Action**: <what was proposed; "applied" or "deferred-to-conductor">
- **Authorization**: <session-id-and-approver, or "pending">
- **Codification**: <what's been added to prevent recurrence, or "none yet">
```
Then check for compound patterns:
- **Same stale citation in ≥2 scopes** — propose updating the workspace `CLAUDE.md` autogen footer (under `<!-- ORGANVM:AUTO:START -->` sentinels) to assert the canonical path. The next `organvm refresh` will re-write it, making the truth periodic rather than ad-hoc.
- **Same orphan-plan class in ≥5 plans** — propose adding a detector clause to `closeout`'s SKILL.md so the class is auto-recognized in future sessions.
- **Cross-scope memory drift** — propose a `reference_<topic>_canonical_path.md` memory at the workspace scope so all sibling scopes can grep-find one truth.
Emit one IRF row proposal per unresolved finding (Universal Rule #1: N/A = vacuum). Format:
```yaml
- id: IRF-<DOMAIN>-<NNN> # next available
title: "<artifact>: <class> drift surfaced in session <id>"
status: open
domain: <domain-code>
surfaced_by: artifact-resurfacing
resurfacing_session: <session-id-or-date>
action_required: <one line>
authorization_required_from: conductor
```
The IRF row is a *proposal*. Writing it into `INST-INDEX-RERUM-FACIENDARUM.md` requires conductor authorization (Universal Rule #21).
## What this skill explicitly does NOT do
- Edit `CLAUDE.md`, `MEMORY.md`, `governance-rules.json`, `registry-v2.json`, or any `seed.yaml` without same-session conduRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.