Skip to content

Unify all data paths under ~/.openexp/#1

Merged
anthroos merged 1 commit intomainfrom
fix/unify-paths-under-openexp
Mar 22, 2026
Merged

Unify all data paths under ~/.openexp/#1
anthroos merged 1 commit intomainfrom
fix/unify-paths-under-openexp

Conversation

@anthroos
Copy link
Copy Markdown
Owner

Summary

  • Replace all ~/.claude-memory/ references with ~/.openexp/ across 8 files
  • All OpenExp data now lives under a single ~/.openexp/ directory (observations, sessions, data)
  • No functional change — just path consistency after rebranding from internal predecessor

Files changed

  • openexp/core/config.py — default paths for OBSERVATIONS_DIR and SESSIONS_DIR
  • openexp/hooks/post-tool-use.sh — hardcoded observation write path
  • openexp/hooks/session-start.sh — hardcoded sessions read path
  • .env.example — commented-out default values
  • README.md — configuration table + data flow diagram
  • docs/architecture.md — system diagram + data persistence table
  • docs/configuration.md — configuration table
  • docs/how-it-works.md — observation storage description

Test plan

  • grep -r "claude-memory" . returns zero matches
  • Run ./setup.sh on clean machine — verify ~/.openexp/ dirs created
  • Start Claude Code session — verify observations written to ~/.openexp/observations/

🤖 Generated with Claude Code

Replace leftover ~/.claude-memory/ references with ~/.openexp/ so all
OpenExp data lives under a single self-contained directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@anthroos anthroos merged commit 5152b75 into main Mar 22, 2026
@anthroos anthroos deleted the fix/unify-paths-under-openexp branch March 22, 2026 13:37
anthroos added a commit that referenced this pull request Mar 22, 2026
- Q-update: EMA → additive (Q = clamp(Q + α*r, floor, ceiling))
- q_init: 0.5 → 0.0 (memories earn value from zero)
- q_ceiling: 1.0 added
- Outcome resolver: CRM CSV transitions → memory rewards
- client_id tagging on memories
- resolve CLI command
- session-end hook with retrieval reward loop
- 73/73 tests pass

Co-authored-by: Ivan Pasichnyk <ivanpasichnyk@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
anthroos added a commit that referenced this pull request Apr 27, 2026
…#39)

* feat: minimal prediction/outcome schema + pack instrumentation rule

Prediction/outcome MCP tools were dead code — 2 entries total since
2026-03-23 because no SKILL.md / CLAUDE.md / hook ever specified the
trigger. The seed pack went into production for the first time on
2026-04-27 (Norda case, lead-norda-001) and there was no instrumentation
to prove the pack moved the outcome. Without a baseline, any future
experiment over packs is unfalsifiable.

This commit installs the minimum viable instrumentation.

Schema (new path, required):
  log_prediction(pack_id, pack_author, cited_step, case_id,
                 applied_action, expected_signal, expected_window_days,
                 prevented_action?, notes?)
  log_outcome(prediction_id, actual_signal, days_to_resolve, notes?)

Three fields are explicitly NOT in the schema: confidence,
alternative_action_if_no_pack, predicted_outcome_alternative. Reasoning
in CHANGELOG — Claude-side confidence is uncalibrated until ≥30 outcome
datapoints, and the same Claude that writes the prediction would invent
a biased counterfactual. Real ablation requires a separate pack-blind
run, which is a different track.

Three fields are kept that the audit flagged as not-obvious: cited_step
(sharp trigger — only log when a relative_day was cited), prevented_action
(negative-space prediction — half the pack's value is "don't do X"), and
expected_signal + expected_window_days (resolves later without
interpretation).

Backward compat: old free-text predictions still accepted, old
log_outcome with reward still updates Q-values for memory_ids_used.
schema_version: 2 marks new-path entries.

Files:
- openexp/mcp_server.py: new MCP schema, dispatcher routes by which
  fields are present
- openexp/reward_tracker.py: log_prediction/log_outcome accept both
  paths; new path skips Q-update entirely
- experiences/d49e0997/SKILL.md: new "Instrumentation (mandatory)"
  section before "What NOT to do"; trigger criterion is sharp
- templates/SKILL.template.md: same section so future packs inherit
- CHANGELOG.md NEW: explains the schema choices
- scripts/seed_norda_outcome.py NEW: retrospective seed for datapoint #1

Datapoint #1 (Norda case) verified in storage:
  pred_a751b249 — pack inbound-acquisition-with-free-pilot, day +57,
  applied "upload to Vchasno → KEP → invite", prevented "follow-up
  nudge during the 6-day pause", resolved as "signed both sides" in
  4 days.

300/300 tests pass. No CLAUDE.md global rule yet — first watch whether
the SKILL.md rule is followed naturally on a single pack before
elevating it to user-level.

* docs(readme): document new prediction/outcome schema

Old MCP Tools table described log_prediction/log_outcome with one-liner
generics ("track a prediction"). That is no longer accurate after the
schema change in this PR.

Added a "Prediction / outcome instrumentation" subsection right under
the table:
- Trigger criterion (only fires when a pack's relative_day is cited)
- Two field tables (new-path log_prediction + log_outcome)
- The "what is deliberately NOT in the schema" reasoning (confidence,
  fake counterfactual fields)
- Backward compat note (legacy fields still accepted, schema_version: 2
  marks new entries)

This is doc-only; the code on this branch already implements both paths.

---------

Co-authored-by: Ivan Pasichnyk <ivanpasichnyk@gmail.com>
anthroos added a commit that referenced this pull request Apr 27, 2026
Replace leftover ~/.claude-memory/ references with ~/.openexp/ so all
OpenExp data lives under a single self-contained directory.

Co-authored-by: Ivan Pasichnyk <ivanpasichnyk@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
anthroos added a commit that referenced this pull request Apr 27, 2026
- Q-update: EMA → additive (Q = clamp(Q + α*r, floor, ceiling))
- q_init: 0.5 → 0.0 (memories earn value from zero)
- q_ceiling: 1.0 added
- Outcome resolver: CRM CSV transitions → memory rewards
- client_id tagging on memories
- resolve CLI command
- session-end hook with retrieval reward loop
- 73/73 tests pass

Co-authored-by: Ivan Pasichnyk <ivanpasichnyk@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
anthroos added a commit that referenced this pull request Apr 27, 2026
…#39)

* feat: minimal prediction/outcome schema + pack instrumentation rule

Prediction/outcome MCP tools were dead code — 2 entries total since
2026-03-23 because no SKILL.md / CLAUDE.md / hook ever specified the
trigger. The seed pack went into production for the first time on
2026-04-27 (first counterparty case) and there was no instrumentation
to prove the pack moved the outcome. Without a baseline, any future
experiment over packs is unfalsifiable.

This commit installs the minimum viable instrumentation.

Schema (new path, required):
  log_prediction(pack_id, pack_author, cited_step, case_id,
                 applied_action, expected_signal, expected_window_days,
                 prevented_action?, notes?)
  log_outcome(prediction_id, actual_signal, days_to_resolve, notes?)

Three fields are explicitly NOT in the schema: confidence,
alternative_action_if_no_pack, predicted_outcome_alternative. Reasoning
in CHANGELOG — Claude-side confidence is uncalibrated until ≥30 outcome
datapoints, and the same Claude that writes the prediction would invent
a biased counterfactual. Real ablation requires a separate pack-blind
run, which is a different track.

Three fields are kept that the audit flagged as not-obvious: cited_step
(sharp trigger — only log when a relative_day was cited), prevented_action
(negative-space prediction — half the pack's value is "don't do X"), and
expected_signal + expected_window_days (resolves later without
interpretation).

Backward compat: old free-text predictions still accepted, old
log_outcome with reward still updates Q-values for memory_ids_used.
schema_version: 2 marks new-path entries.

Files:
- openexp/mcp_server.py: new MCP schema, dispatcher routes by which
  fields are present
- openexp/reward_tracker.py: log_prediction/log_outcome accept both
  paths; new path skips Q-update entirely
- experiences/d49e0997/SKILL.md: new "Instrumentation (mandatory)"
  section before "What NOT to do"; trigger criterion is sharp
- templates/SKILL.template.md: same section so future packs inherit
- CHANGELOG.md NEW: explains the schema choices
- scripts/seed_first_outcome.py NEW: retrospective seed for datapoint #1

Datapoint #1 (first counterparty case) verified in storage:
  pred_a751b249 — pack inbound-acquisition-with-free-pilot, day +57,
  applied "upload to <E_SIGNING_PLATFORM> → <DIGITAL_KEY> → invite", prevented "follow-up
  nudge during the 6-day pause", resolved as "signed both sides" in
  4 days.

300/300 tests pass. No CLAUDE.md global rule yet — first watch whether
the SKILL.md rule is followed naturally on a single pack before
elevating it to user-level.

* docs(readme): document new prediction/outcome schema

Old MCP Tools table described log_prediction/log_outcome with one-liner
generics ("track a prediction"). That is no longer accurate after the
schema change in this PR.

Added a "Prediction / outcome instrumentation" subsection right under
the table:
- Trigger criterion (only fires when a pack's relative_day is cited)
- Two field tables (new-path log_prediction + log_outcome)
- The "what is deliberately NOT in the schema" reasoning (confidence,
  fake counterfactual fields)
- Backward compat note (legacy fields still accepted, schema_version: 2
  marks new entries)

This is doc-only; the code on this branch already implements both paths.

---------

Co-authored-by: Ivan Pasichnyk <ivanpasichnyk@gmail.com>
anthroos added a commit that referenced this pull request Apr 28, 2026
…#39)

* feat: minimal prediction/outcome schema + pack instrumentation rule

Prediction/outcome MCP tools were dead code — 2 entries total since
2026-03-23 because no SKILL.md / CLAUDE.md / hook ever specified the
trigger. The seed pack went into production for the first time on
2026-04-27 (first counterparty case) and there was no instrumentation
to prove the pack moved the outcome. Without a baseline, any future
experiment over packs is unfalsifiable.

This commit installs the minimum viable instrumentation.

Schema (new path, required):
  log_prediction(pack_id, pack_author, cited_step, case_id,
                 applied_action, expected_signal, expected_window_days,
                 prevented_action?, notes?)
  log_outcome(prediction_id, actual_signal, days_to_resolve, notes?)

Three fields are explicitly NOT in the schema: confidence,
alternative_action_if_no_pack, predicted_outcome_alternative. Reasoning
in CHANGELOG — Claude-side confidence is uncalibrated until ≥30 outcome
datapoints, and the same Claude that writes the prediction would invent
a biased counterfactual. Real ablation requires a separate pack-blind
run, which is a different track.

Three fields are kept that the audit flagged as not-obvious: cited_step
(sharp trigger — only log when a relative_day was cited), prevented_action
(negative-space prediction — half the pack's value is "don't do X"), and
expected_signal + expected_window_days (resolves later without
interpretation).

Backward compat: old free-text predictions still accepted, old
log_outcome with reward still updates Q-values for memory_ids_used.
schema_version: 2 marks new-path entries.

Files:
- openexp/mcp_server.py: new MCP schema, dispatcher routes by which
  fields are present
- openexp/reward_tracker.py: log_prediction/log_outcome accept both
  paths; new path skips Q-update entirely
- experiences/d49e0997/SKILL.md: new "Instrumentation (mandatory)"
  section before "What NOT to do"; trigger criterion is sharp
- templates/SKILL.template.md: same section so future packs inherit
- CHANGELOG.md NEW: explains the schema choices
- scripts/seed_first_outcome.py NEW: retrospective seed for datapoint #1

Datapoint #1 (first counterparty case) verified in storage:
  pred_a751b249 — pack inbound-acquisition-with-free-pilot, day +57,
  applied "upload to <E_SIGNING_PLATFORM> → <DIGITAL_KEY> → invite", prevented "follow-up
  nudge during the 6-day pause", resolved as "signed both sides" in
  4 days.

300/300 tests pass. No CLAUDE.md global rule yet — first watch whether
the SKILL.md rule is followed naturally on a single pack before
elevating it to user-level.

* docs(readme): document new prediction/outcome schema

Old MCP Tools table described log_prediction/log_outcome with one-liner
generics ("track a prediction"). That is no longer accurate after the
schema change in this PR.

Added a "Prediction / outcome instrumentation" subsection right under
the table:
- Trigger criterion (only fires when a pack's relative_day is cited)
- Two field tables (new-path log_prediction + log_outcome)
- The "what is deliberately NOT in the schema" reasoning (confidence,
  fake counterfactual fields)
- Backward compat note (legacy fields still accepted, schema_version: 2
  marks new entries)

This is doc-only; the code on this branch already implements both paths.

---------

Co-authored-by: Ivan Pasichnyk <ivanpasichnyk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant