# 2026-06-03 — Second wave: `/audit` + `/reconcile` skills

## Task (one sentence)

Package the user's two highest-value, not-yet-covered operator loops from the Claude Code Insights report — audit-driven review of recent commits, and safe git-state reconciliation — as two bundled prompt skills (`audit`, `reconcile`) with matching slash commands, following this repo's skill-mirror / count / build-pipeline invariants.

## Context

The first wave (PR #154) shipped three self-improvement primitives — `recall` (Law 1 episodic search), `goal-monitor` (Law 2 goal-drift), `distill` (Law 7 trajectory→skill). The Insights report's remaining actionable suggestions are de-duped below; only `/audit` and `/reconcile` are net-new and in-repo-appropriate.

### De-dupe of Insights suggestions

| Suggestion | Verdict |
|---|---|
| `/audit` custom skill | BUILD — net-new, Law 4 |
| `/reconcile` custom skill | BUILD — net-new, Law 1 |
| recall / "have I hit this before?" | Covered by `recall` (#154) |
| "verify all surfaces, don't claim done" | Covered by `goal-monitor` (#154) + `verification-loop` |
| workflows→skills | Covered by `distill` (#154) |
| parallel/two-stage review | Covered by `subagent-driven-development`, `dispatching-parallel-agents`, `code-review` |
| post-edit `tsc` hook | Deferred — project-specific; blanket tsc-on-edit is friction; repo gates on `verify:all` |
| CLAUDE.md additions (prize arrays, frontend/src) | Dropped — target the trading platform, not this repo |
| nightly-sweeper / branch-reconciler / spec-gen workflows | Deferred — larger workflows overlapping the two skills above + observe/learn |

## Assumptions

- Both ship as **pure prompt skills** (no `lib/`, no MCP tool, no `src/test`). Justification: the value is the enforced procedure, not novel computation; the repo already ships prompt-only skills (`proceed-with-the-recommendation`, `wild-risa-balance`). Keeps the change surgical and under the commit-size gate.
- `generate-plugin-manifests.mts` auto-discovers `skills/*.md` and copies the whole `commands/` dir, so a pure prompt skill needs **no generator edit** (verified by reading the generator; #154's generator edits were only to copy new libs).
- Adding two skills bumps the bundled-skill count 23 → 25. Source spots: `src/lib/plugin-metadata.mts` (`SHARED_PLUGIN_DESCRIPTION`), `package.json`, `llms.txt`. The two manifests in `check-skill-count`'s `CHECKED_FILES` are regenerated from those.
- `.cloudplugin/marketplace.json` (hand-maintained, currently states "20", not in any gate) is left untouched — out of scope.

## Law mapping

- `audit` → **Law 4 (Verify Before Reporting)**: audit recent commits, confirm each finding (catch false positives), verify every surface before declaring clean.
- `reconcile` → **Law 1 (Research Before Executing)**: establish git ground truth before mutating, halt on protected/destructive ops, verify a push actually landed.

## File plan

Create (source):
- `skills/audit.md` — `tier: "2"`, Law 4
- `skills/reconcile.md` — `tier: "2"`, Law 1
- `commands/audit.md`
- `commands/reconcile.md`

Edit (source, count 23→25):
- `src/lib/plugin-metadata.mts`
- `package.json`
- `llms.txt`

Generated by `npm run build` (commit, never hand-edit):
- `lib/plugin-metadata.mjs`, `.claude-plugin/marketplace.json`, `plugins/<name>.json`,
  `plugins/continuous-improvement/.claude-plugin/{marketplace,plugin}.json`,
  `plugins/continuous-improvement/commands/{audit,reconcile}.md`,
  `plugins/continuous-improvement/skills/{audit,reconcile}/SKILL.md`,
  `plugins/continuous-improvement/skills/README.md`

## Verification steps

1. `npm run build` — regenerate manifests + mirrors + chmod.
2. `npm run verify:all` — 11 invariants + typecheck must be green (skill-count must read 25; everything-mirror must match).
3. `npm run verify:generated` — `npm run build && git diff --exit-code` proves generated output is committed.
4. Adversarial review pass (parallel lenses: duplication vs existing skills, frontmatter/invariant risk, repo voice) before commit.
5. Stage by explicit filename (never `git add -A` — autocrlf phantom rule), commit `.mts` source + generated `.mjs`/manifests atomically, cite this plan doc.
6. Push branch, open PR (squash-merge, never direct-push to main).

## Deferred (logged, not built this wave)

- Post-edit `tsc` PostToolUse hook.
- Nightly-sweeper / branch-reconciler / spec-driven-feature workflows.
- `.cloudplugin/marketplace.json` stale count refresh.
- `reports/daily-improvement.md` entry (separate docs commit per repo convention).
