Skip to content

Commit b62b04b

Browse files
copeusclaude
andcommitted
merge: v2.16.0 — decision memory + challenge (recall your own past reasoning, always challenged)
Reframed after a domain audit rated the 'reason-as-the-creator' clone high-hazard: v1 is a falsifiable memory + mandatory divergent counter-move (never a nudge). off|on-demand(pull)|marked(soft badge, never a pre-tick default); unprompted why; recon/novelty suppression; split storage (raw jsonl LOCAL ~/.claude, distilled preferences.md in-repo/V-memory, PII-scrubbed); recency-weighted drift + holdout + expiry + purge. 3 Codex Sol rounds: 7 findings (3 CRITICAL manipulation/anti-ruflo) -> 4 residual -> converged. Anti-ruflo throughout (counts only, no fabricated %, evidence-not-authority, human-gate intact). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 parents aceaf41 + 47576eb commit b62b04b

16 files changed

Lines changed: 2779 additions & 3 deletions

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
"name": "superpowers-v",
1111
"description": "Compound V for Superpowers: triple parallel pre-flight (code archaeology + domain-expert + Context7 library validator), disjoint partitioning, manifest-driven multi-backend dispatch (Claude + Codex + Antigravity + Cursor), git-diff scope enforcement, crash-resumable runs, adaptive tier-based routing, epic mode, research-grounded brainstorming (gated pre-brainstorm recon + batched elicitation), V-memory local-first semantic+lexical recall over docs/superpowers (opt-in pure-python embeddings + a deterministic recall→action bridge), and batched parallel dispatch (Opus default, narrow Sonnet exception)",
12-
"version": "2.15.0",
12+
"version": "2.16.0",
1313
"source": "./",
1414
"author": {
1515
"name": "Oleg",

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "superpowers-v",
33
"description": "Compound V for Superpowers: triple parallel pre-flight (code archaeology + domain-expert advisor + library/doc validator via Context7), disjoint file partitioning, manifest-driven multi-backend dispatch (Claude + headless Codex + Antigravity + Cursor workers), git-diff scope enforcement, crash-resumable runs, adaptive tier-based routing, epic mode for multi-feature builds, V-memory local-first semantic+lexical recall over docs/superpowers (opt-in pure-python embeddings + a deterministic recall\u2192action bridge), and batched parallel dispatch (Opus default, Sonnet for narrow junior-task carve-out), plus /v:onboard — a project-onboarding command that builds a citation-verified knowledge base + AGENTS.md/CLAUDE.md bridge behind a human gate. Auto-intercepts four transitions: pre-brainstorm recon \u2192 brainstorming \u2192 writing-plans \u2192 execution.",
4-
"version": "2.15.0",
4+
"version": "2.16.0",
55
"author": {
66
"name": "Oleg",
77
"email": "copeus@gmail.com"

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to **superpowers-v (Compound V)** are documented here.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project uses semantic versioning.
66

7+
## [2.16.0] - 2026-07-15
8+
9+
### Added — Decision memory + challenge (recall your own past reasoning, always challenged)
10+
11+
During the brainstorm/elicitation phase Compound V already intercepts, it now **remembers your own dated past decisions** and surfaces them as *falsifiable history***always paired with a divergent counter-move**, so a recall triggers re-examination, not autopilot. New `scripts/compound-v-preferences.py` (`recall`/`capture`/`distill`/`stats`/`purge`) + `/v:preferences` + a `brainstorm.preferences` config key. Grounded by three pre-flights whose **domain audit reframed the feature**: the original "let the brainstorm reason as the creator" clone was rated high-hazard (choice-blindness confabulation, default-nudge dark patterns, echo chamber, opposing this project's own anti-anchoring moat), so v1 ships the safe **memory + challenge** framing instead.
12+
13+
- **Three modes** `off | on-demand (default) | marked`. **`marked`** puts a soft, falsifiable dated badge (`↩ your past pick: N/M · date`) beside the matching option — a **label, never a pre-selected default** (a mark is information; a pre-tick is an answer you must override — the audit's red line). Every surfacing is challenge-paired or suppressed (`no-challenge`).
14+
- **The "why" is captured UNPROMPTED** (free-text first); a tapped candidate is a weaker `borrowed` class, excluded from the distilled "your reasoning" — never an inferred rationale.
15+
- **Anti-anchoring:** suppressed on recon-touched / high-novelty forks (never fires where Trigger-0 widens). **Drift honesty:** recency-weighted last-K disagreement demotes + banners a shifting pattern; a holdout probe records un-nudged choices; patterns auto-expire.
16+
- **Split storage:** the raw `decisions.jsonl` stays **LOCAL** (`~/.claude/compound-v/preferences/`, private, `purge`-able); the distilled `preferences.md` is written **in-repo** (`docs/superpowers/preferences/`, git-tracked → V-memory, `/v:remember`-able) and is **secret+PII-scrubbed before write**.
17+
- **Anti-ruflo:** counts only (`4/5 similar forks`), never a fabricated confidence `%`; recall is evidence, never an authority — the brainstorm human-gate is untouched. Pure Python 3.9 stdlib (reuses V-memory's `fts5_escape` + `redact` and `append_line` by import); `--selftest` auto-run by the CI all-selftest gate.
18+
719
## [2.15.0] - 2026-07-14
820

921
### Added — Local observability dashboard (present-only, read-only)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ That's it.
9898
| `/v:remember "<query>"` | Search the project memory |
9999
| `/v:status` · `/v:resume <id>` | Check progress / continue after a crash |
100100
| `/v:dashboard` (v2.15) | Open a **read-only** browser view of your runs/epics — `emit` a static HTML snapshot, or `serve` an ephemeral, localhost-only live view. Observe in the browser; control stays in the CLI |
101+
| `/v:preferences` (v2.16) | Your own dated past-brainstorm reasoning, as **falsifiable memory + a challenge**`stats` / `distill` / `show` / `purge`. `marked` mode badges the option matching your history (never pre-selects it); raw log stays local, the scrubbed distillate is `/v:remember`-able |
101102
| `/v:models` | Refresh which model each backend uses |
102103

103104
---

commands/v-preferences.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
description: Manage Compound V decision preferences — your OWN dated past-reasoning memory (memory + challenge, never a clone). Present-only, observe-in-output / control-via-CLI. `stats` shows override/disagreement rates and demoted/expired patterns; `distill` regenerates the in-repo (secret+PII-scrubbed) preferences.md; `show` prints the current distilled model; `purge` wipes the LOCAL raw log (irreversible). Mode is set by .claude/compound-v.json `brainstorm.preferences` (off|on-demand|marked).
3+
---
4+
5+
You are managing **Compound V decision preferences** — the maker's OWN dated past reasoning at a brainstorm
6+
fork. This is **memory + challenge, not a clone**: it recalls "you decided X before" only to trigger
7+
**re-examination**, always paired with a divergent counter-move — never "reason as the creator", never a
8+
pre-selected default. It has **no routing influence**. Every subcommand here is read-only-ish observation and
9+
LOCAL model management; the live fork surface is wired into the elicitation driver, not this command.
10+
11+
**Split storage (state it honestly):**
12+
13+
- The **raw `decisions.jsonl`** — the full free-text `why` + question context, the PII-prone part — lives
14+
**LOCAL** under `~/.claude/compound-v/preferences/` and is **NEVER committed / never shipped**. It is
15+
purgeable.
16+
- The **distilled `preferences.md`** lives **in-repo** at `docs/superpowers/preferences/preferences.md`,
17+
git-tracked and **V-memory-indexed** (recallable via [`/v:remember`](v-remember.md)) — the "all in one
18+
memory" path. It is **secret+PII-scrubbed at `distill` time** before it is written, so the committed copy
19+
carries no flagged token (the honest caveat: the scrubbed distillate DOES ship with the plugin).
20+
21+
Deterministic mechanics live in [`scripts/compound-v-preferences.py`](../scripts/compound-v-preferences.py)
22+
(pure stdlib, `--selftest`-gated). **Anti-ruflo:** counts only ("4/5 similar forks"), **never a fabricated
23+
confidence %**; drift + staleness are surfaced, never hidden.
24+
25+
Args: `{{args}}` — one of `stats` (default) · `distill` · `show` · `purge`.
26+
27+
## Branch on `{{args}}`
28+
29+
- **`stats`** (default) — per-pattern override/disagreement rates plus demoted/expired flags, from the LOCAL log:
30+
```
31+
python3 scripts/compound-v-preferences.py stats
32+
```
33+
Render each pattern's dominant choice with its sample size (counts only), the recency-weighted last-K
34+
disagreement (`N/M diverged`, **not** an all-time ratio), and any `demoted` (your reasoning here may have
35+
shifted → stops surfacing) or `expired` (past the staleness window → stops surfacing until refreshed) banner.
36+
Never print a `%` confidence.
37+
38+
- **`distill`** — regenerate the in-repo `docs/superpowers/preferences/preferences.md` from the LOCAL jsonl,
39+
**secret+PII-scrubbed before write**:
40+
```
41+
python3 scripts/compound-v-preferences.py distill --repo .
42+
```
43+
Only **unprompted** rationales appear as "your reasoning" — a `borrowed` (candidate-tapped) why is excluded.
44+
Print the written path + pattern count. Commit the result so V-memory can index it (then it surfaces via
45+
`/v:remember`); re-index with [`/v:memory-refresh`](v-memory-refresh.md).
46+
47+
- **`show`** — print the current distilled model (the committed, scrubbed in-repo view):
48+
```
49+
cat docs/superpowers/preferences/preferences.md
50+
```
51+
If it is absent, say so and suggest running `distill` first. `distill` always writes the in-repo
52+
`preferences.md` — a placeholder (`_No decisions captured yet._`) when the local log is empty, or the
53+
distilled, PII-scrubbed pattern model once decisions exist. This is the shared, aggregated model — the raw
54+
per-decision log (local `~/.claude`) is never shown here.
55+
56+
- **`purge`** — wipe the **LOCAL** raw `decisions.jsonl` in one command. **State that it is IRREVERSIBLE**
57+
(per the base rule for destructive actions — say WHY and confirm intent before running): it deletes the full
58+
free-text history under `~/.claude/compound-v/preferences/`. The already-committed distillate is untouched.
59+
```
60+
python3 scripts/compound-v-preferences.py purge
61+
```
62+
63+
## Modes — `.claude/compound-v.json` `brainstorm.preferences`
64+
65+
The fork surface (in the elicitation driver, not this command) is governed by `brainstorm.preferences`,
66+
resolved fail-closed by [`scripts/compound-v-project-config.py`](../scripts/compound-v-project-config.py)
67+
(`resolve_brainstorm`) — a bad/missing value degrades to the safe `on-demand`, never silently to `marked`:
68+
69+
- **`off`** — nothing surfaces.
70+
- **`on-demand`** (default) — the human/driver **pulls** history ("have I decided something like this
71+
before?"); no unsolicited surface. A pull can't nudge.
72+
- **`marked`** — a *qualifying* fork's past-matching option carries a **falsifiable dated soft badge**
73+
(`↩ your past pick: N/M · date`), rendered **together with the mandatory divergent challenge** and
74+
**never pre-selected** — a label beside a neutral choice, not a default you must un-tick.
75+
76+
Authority doc: [`skills/compound-v/decision-preferences.md`](../skills/compound-v/decision-preferences.md).
77+
Wiring: [`skills/compound-v/brainstorm-elicitation.md`](../skills/compound-v/brainstorm-elicitation.md).
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Phase 1A Archaeology — v2.16 decision-preferences
2+
3+
Read-only survey, branch v2.16.0-decision-preferences. Key reuse/insertion points (file:line).
4+
5+
## Reuse (import-by-path, NOT the search subprocess)
6+
- `compound-v-memory.py`: `fts5_escape(q)` (:363) — the crash-safe MATCH primitive (raw `MATCH 'index.ts'` throws);
7+
`bm25_search(conn,q,limit)` (:710) wraps MATCH in try/except OperationalError; `open_db` (:328); `redact`/`SECRET_RE`(:56)/`PEM_RE`(:53) — reuse for the secret-scan gate, do not fork.
8+
Load like `compound-v-onboard.py:6-9` (importlib spec_from_file_location) or `_load_sibling` (fastpath-materialize.py:109).
9+
- 🔴 The `search` SUBPROCESS is UNSUITABLE for recall: its JSON output is prose chunks (`context_pack`), lacks per-decision `chosen`/`why`/override fields, and only sees the corpus after `/v:memory-refresh`. The "capture→recall roundtrip" AC FORCES an in-process FTS5 index over the LOCAL `decisions.jsonl` reusing `fts5_escape`.
10+
- `compound-v-update-memory.py:append_line(path,obj)` (:114-130) — forbidden-basename guard + makedirs + `open(...,"a",encoding="utf-8")` (the LANG=C fix) + `json.dumps(ensure_ascii=False)`. Reuse by import (triage-outcomes.py:196 pattern); do not hand-roll append.
11+
12+
## Config 🔴 (spec inaccuracy caught)
13+
- `compound-v-project-config.py` has NO `brainstorm.*` reader — it resolves only `models` (:97) + `pre_eval` (`resolve_pre_eval` :114-175). `brainstorm.deep_research`/`batch_elicitation` are read by PROSE (.md), never Python. So `resolve_brainstorm` will be the FIRST Python `brainstorm.*` reader — mirror `resolve_pre_eval` exactly (fresh-dict guard :121, bool-is-int guard :153, coerce+warn, never raise).
14+
15+
## Elicitation wiring
16+
- `skills/compound-v/brainstorm-elicitation.md`: wire `recall` at the pre-fork checkpoint (after the batch gate 78-95, before the surface ladder 105); `capture` at per-group reconciliation (169-178, the resolved-answer authority). Never add a rung / alter gate/ladder logic. Human gate inviolable (:103, :169).
17+
18+
## Storage (LOCAL, per the reframe)
19+
- Data lives under `~/.claude/compound-v/preferences/` (personal, never committed — v2.6.2 egress precedent). NO `.gitignore` change (not in-repo). Recall = spine's own in-process FTS5; NOT V-memory's git-tracked index.
20+
21+
## Partition seams to pin
22+
- Freeze the `recall`/`capture` JSON contract in p1 (counts only, no `%`, no pre-select field; `marked_option` = label not selection). p2/p3 depend_on p1.
23+
- `brainstorm.preferences` key spelling + enum {off,on-demand,marked} across p2/p3.
24+
- z1 owns version files + README; p2/p3 never touch `.gitignore` (not needed anyway).

0 commit comments

Comments
 (0)