claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Curate the web-capture index. Use when the capture backlog grows, captures sit unprocessed at seedling/pending, or to surface stored research during work.
$ npx -y skills add athola/claude-night-market --skill palace-index-curator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/palace-index-curatorContext preview
The summary Claude sees to decide when to auto-load this skill.
Curate the web-capture index. Use when the capture backlog grows, captures sit unprocessed at seedling/pending, or to surface stored research during work.
name: palace-index-curator description: Curate the web-capture index. Use when the capture backlog grows, captures sit unprocessed at seedling/pending, or to surface stored research during work. alwaysApply: false category: governance tags: - knowledge-management - capture-index - curation - promotion - analytics dependencies: - memory_palace.corpus.index_analytics - memory_palace.corpus.index_promoter
The web-research hooks auto-capture every WebFetch and WebSearch into `hooks/memory-palace-index.yaml`, storing each as a markdown file and an index entry. Captures land at the defaults `routing_type: pending`, `maturity: seedling`, `importance_score: 50`, and nothing advances them. Left alone, the index becomes a write-only graveyard: the majority of entries are never incorporated, analyzed, or surfaced.
This skill drains that backlog and keeps it drained. It wires the capture index to the corpus tooling the plugin already ships (`decay_model`, `keyword_index`, `marginal_value`) through three commands: a read-only report, a dry-run-first promotion engine, and a SessionStart surfacing hook.
entries the drain held back.
uv run python scripts/memory_palace_cli.py index report
Reports total entries, the inert ratio, orphaned captures (entries whose backing file is gone), the largest topic clusters by domain, and the top promotion candidates. Writes nothing.
# Dry run: prints promote/archive proposals, writes nothing. uv run python scripts/memory_palace_cli.py index promote # Apply: backs up the index under data/backups/, then persists. uv run python scripts/memory_palace_cli.py index promote --apply
Each `pending` entry is classified into one action:
importance score, a routing type, and maturity `seedling -> growing`.
revisited. Marked `archived` rather than promoted, following the principle that unused captures should drain, not accumulate.
Applying is idempotent: promoted and archived entries are no longer `pending`, so a second run proposes nothing new. The dry-run diff is always shown before `--apply` writes.
Running these by hand is the exception. `--apply` runs on every commit from `scripts/precommit_palace_maintenance.sh`, so the backlog drains continuously rather than in occasional sweeps. Reach for the commands above when a commit is blocked, or when you want the dry-run diff before the hook decides for you.
The commit that carries the index must carry it with zero `pending` entries. `scripts/check_capture_index_drained.py` runs at the end of the maintenance hook and fails the commit otherwise, and `tests/test_capture_index_artifact.py` re-checks the same invariant in CI so a bypassed hook does not land a backlog.
Two things make that gate reachable rather than a standing block:
(`hooks/shared/deduplication._stage_index`). Without it, pre-commit reverts the unstaged write before any hook runs, so the drain reads a tree the fresh capture is missing from and converges on a fixed point that excludes exactly the entries it exists to process. That is how 47 captures accumulated behind a drain that reported nothing to do.
it, so a blocked commit means a specific capture needs a person to score or archive it. The gate names the keys.
A SessionStart hook (`hooks/index_surfacer.py`) names the highest-value promoted captures at the start of a session. It is disabled by default. Enable it in `memory-palace-config.yaml`:
feature_flags: context_injection: true
The hook only speaks when promoted entries clear the importance floor, and it exits silently on any error so it can never block a session.
The three steps above all operate on the capture index at `hooks/memory-palace-index.yaml`. Retrieval reads a different file: `data/indexes/keyword-index.yaml`, built from the staging captures and consumed by `cache_lookup`. Curating one does nothing to the other.
That keyword index is derived data and is not tracked in git, so a fresh checkout has none at all. Rebuild it with:
# Report what would be indexed, writing nothing. uv run python scripts/build_indexes.py --dry-run # Write data/indexes/keyword-index.yaml. uv run python scripts/build_indexes.py
The builder refuses to write an empty index over a populated one. An empty corpus is reported with `"wrote": false` and any existing index is left untouched. Writing `entries: {}` over real data is how the corpus went dark in 1.5.0, and it stayed dark because the regeneration script named in that stub file had never been written.
A capture whose frontmatter will not parse contributes nothing to the keyword index. Body extraction is gated on that parse, so the whole document drops out rather than just its topic, and the drain above reports nothing wrong because the index entry itself looks ordinary.
The usual cause is a page title or search query holding a double quote, which closed the YAML sca
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.