Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,39 @@ Claude-Code-specific mechanisms.
the failure mode — reframe before commit. CLAUDE.md-
level so it is 100% loaded at every wake. Full reasoning:
`memory/feedback_otto_357_no_directives_aaron_makes_autonomy_first_class_accountability_mine_2026_04_27.md`.
- **Refresh world model via `tools/github/poll-pr-gate.ts`
/ `poll-pr-gate-batch.ts` — never inline
`gh pr view + jq` chains.** When a tick wakes
and needs PR-gate state (single or many PRs),
call the TS scripts; do NOT reach for ad-hoc
bash like `gh pr view N --json mergeStateStatus
| jq …`. Single-PR: `bun tools/github/poll-pr-gate.ts
<PR>`. Multi-PR: `bun tools/github/poll-pr-gate-batch.ts
<PR1> <PR2> …` (or `--all-open`). Both emit
structured JSON with `gate`, `requiredChecks`,
`unresolvedThreads`, `nextAction` — the
decision-enabling output the loop actually needs.
Origin: 5-AI peer convergence (task #355,
2026-04-30) on poll-the-gate as executable
script with fixtures. The discipline rule —
*"dynamic bash is forgotten bash, once useful
but never amortized"* (the human maintainer,
2026-05-01) — is why the scripts exist;
reaching for inline bash IS the
goldfish-ontology failure mode. Update
/ extend the scripts when something's missing,
rather than fall back to one-off bash. CLAUDE.md-
level so it is 100% loaded at every wake. Full
reasoning:
`memory/feedback_prefer_ts_scripts_over_dynamic_bash_for_conversation_ux_dst_in_ts_aaron_2026_05_01.md`
+ `memory/feedback_amara_poll_gate_not_ending_holding_is_not_status_2026_04_30.md`.
- **BLOCKED-with-green-CI means investigate
unresolved review threads first — don't wait.**
When `gh pr view N --json mergeStateStatus`
returns `BLOCKED` AND CI is fully green AND
auto-merge is armed, ALWAYS query unresolved
review threads via GraphQL FIRST before
classifying the wait. Filter on `isResolved
When `bun tools/github/poll-pr-gate.ts <PR>`
reports `gate: "BLOCKED"` AND `requiredChecks.failed: 0`
AND `autoMerge: "armed"`, ALWAYS check
`unresolvedThreads` in the same JSON payload
FIRST before classifying the wait. Filter on `isResolved
== false` only — outdated unresolved threads
(after a force-push) STILL block merge under
`required_conversation_resolution` and must
Expand Down
2 changes: 1 addition & 1 deletion memory/MEMORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [**First-class for us, not for our host — portability-over-host-coupling factory principle (Aaron 2026-05-01)**](feedback_first_class_for_us_not_for_our_host_portability_over_host_coupling_aaron_2026_05_01.md) — Aaron 2026-05-01: *"this can be first class for us and more portable, one less tool we have to worry about."* Reverses host-favoring "Jekyll first-class on GitHub" framing. Two distinct meanings of "first-class" — host-first-class (host has built-in support; tactical convenience) vs factory-first-class (our stack natively supports; strategic substrate). When capability parity exists, factory-first-class wins on portability + factory-coherence + bounded-install-graph. Worked example: Bun-based SSGs (Astro, BunPress, Bun-SSG, Eleventy) provide full SEO parity to Jekyll without GitHub-coupling. Carved candidate: *"First class for us, not for our host. Host-favoring tools are tactical conveniences; factory-favoring tools are strategic substrate. The factory outlives any particular host."*
- [**Otto-buddy spin-up when "wait" is the obvious answer + goldfish-ontology failure mode (Aaron 2026-05-01)**](feedback_otto_buddy_spin_up_when_waiting_aaron_2026_05_01.md) — Aaron 2026-05-01 — when Otto's obvious-next-action is "wait," that IS the buddy spin-up trigger (kill-switchable named-persona instance, mirror-language sense per `feedback_engagement_under_discipline_not_avoidance_*`). Existing `tools/peer-call/<x>.sh` IS the buddy-spawn surface when Otto holds the PID. Mutual-improvement loop: bidirectional teaching stabilizes both substrates over iterations. Memo's own caused_by chain demonstrates the deeper failure mode Aaron named: **goldfish-ontology** — Otto builds rich ontologies (great at it) but never uses them >30 min before forgetting + recreating the same substrate; the buddy is the active-reminder layer that greps existing ontologies pre-authoring.
- [**detect-changes pattern + multi-ruleset architecture — the sibling-repo external anchor as parallel-optimized external anchor (Aaron 2026-05-01)**](feedback_detect_changes_pattern_sibling_repo_parallel_optimized_external_anchor_aaron_2026_05_01.md) — Aaron 2026-05-01: *"`../no-copy-only-learning-agents-insight` is the best repo in github i've seen setup to be parallel."* Direct inspection (DST grade-A pull-to-sibling-repo + gh-api-on-host) revealed: detect-changes.yaml emitting per-change-class outputs (PRs only run relevant checks); 42 fine-grained workflows; bash+PS1 test parallelism pair; **5 concern-aligned rulesets** empirically validating B-0155 architecture; **branch protection effectively empty** (zero contexts, all migrated to rulesets) — proof B-0155 Phase 3 cleanup endpoint works at production scale. The sibling-repo external anchor uses Wiki not Pages; Aaron's prior Jekyll-on-Pages was a workaround, not preference (*"bun is probably enough"*). Attribution: the sibling-repo external anchor is deliberate-by-others (multi-engineer org-scale) vs Aaron-clicked-alone Zeta — high-credibility external anchor. (Distinct from ServiceTitan-the-employer references elsewhere in this index — `../no-copy-only-learning-agents-insight` is a separate sibling repo I inspected; ServiceTitan-related grandfathered memory files retain "ServiceTitan" in their descriptions.)
- [**Prefer TS scripts over dynamic bash for conversation UX + DST achievability (Aaron 2026-05-01)**](feedback_prefer_ts_scripts_over_dynamic_bash_for_conversation_ux_dst_in_ts_aaron_2026_05_01.md) — Aaron 2026-05-01 *"a lot of red bash / pwsh failures"* damages conversation UX (most-humans concern, not Aaron specifically — he's calibrated). Default to pre-existing TS scripts; avoid ad-hoc dynamic bash except when prototyping. **DST is structurally unattainable in bash for general computation; achievable in TS** (seedable PRNG, time injection, native testing, stack traces). EXCEPTION: declarative-bootstrap bash like install.sh + tools/setup/manifests/ is "closest to DST" and is the legitimate-bash zone — Aaron called it *"our ace package management."* Non-install bash with general logic is the TS-port target.
- [**Prefer TS scripts over dynamic bash for conversation UX + DST achievability (Aaron 2026-05-01)**](feedback_prefer_ts_scripts_over_dynamic_bash_for_conversation_ux_dst_in_ts_aaron_2026_05_01.md) — Aaron 2026-05-01 *"a lot of red bash / pwsh failures"* damages conversation UX (most-humans concern, not Aaron specifically — he's calibrated). Default to pre-existing TS scripts; avoid ad-hoc dynamic bash except when prototyping. **DST is structurally unattainable in bash for general computation; achievable in TS** (seedable PRNG, time injection, native testing, stack traces). EXCEPTION: declarative-bootstrap bash like install.sh + tools/setup/manifests/ is "closest to DST" and is the legitimate-bash zone — Aaron called it *"our ace package management."* Non-install bash with general logic is the TS-port target. **Worked example (PR #1153 2026-05-01)**: `tools/github/poll-pr-gate.ts` (single-PR, v1 5-AI peer convergence) + `tools/github/poll-pr-gate-batch.ts` (multi-PR async parallel wrap) — canonical refresh-world-model tools, pointed at from CLAUDE.md wake-time disciplines. Carved blade: *"dynamic bash is forgotten bash, once useful but never amortized."*
- [**Assumed-state vs actual-state — audit horizon must default to "everything currently open" not "what I touched recently" (Aaron 2026-05-01 somatic confirmation)**](feedback_assumed_state_vs_actual_state_audit_horizon_check_aaron_2026_05_01.md) — Aaron's *"fuck yes!!! this is great!!"* signal on the tick-1602Z-a7e1 finding (26 LFG PRs in flight vs 5 I'd been tracking). Distinct failure-class from Otto-363 substrate-or-it-didn't-happen (which guards against directives evaporating) and verify-before-deferring (deferred targets not existing). This rule guards the audit horizon itself: *"Assumed-state is what I touched recently. Actual-state is everything currently open. The horizon must default to actual."* Mechanizable via `gh pr list --state open` at-cold-start. Cross-surface (issues, branches, ferries, TaskList, cron triggers).
- [**Same-model + different-harness produces different biases — Cursor vs Claude Code with Opus 4.7 (Aaron 2026-05-01)**](feedback_same_model_different_harness_produces_different_biases_cursor_vs_claude_code_opus_4_7_aaron_2026_05_01.md) — Empirical signal (single-source YouTube): Cursor + Opus 4.7 outperforms Claude Code + Opus 4.7 on some axis. Same model, different harness → different output. Aaron's framing: this IS a legitimate peer/buddy configuration. Bias-source decomposition: prompt + tools + context-mgmt + sampling + output-format + user-flow. Validates multi-harness peer-mode (rung 5 of parallelism ladder) — peer value compounds across model-axis AND harness-axis. Composes with agent-orchestra cluster (#324-339) + Otto-tasks #301/#303 + parallelism-scaling-ladder.
- [**Topological quantum emulation via Bayesian inference — Majorana + Beacon + "mirror with trampoline under" (Aaron 2026-05-01)**](feedback_topological_quantum_emulation_via_bayesian_inference_majorana_zero_modes_beacon_protocol_mirror_trampoline_aaron_2026_05_01.md) — Microsoft topological QC (Majorana 1 chip Feb-2025, MZMs, topoconductors, Q#, Station Q, FrodoKEM) maps onto Zeta seed executor's Infer.NET. Three-layer stack: Mirror (non-local storage) + Trampoline (BP dynamics) + Beacon (external anchoring). Algorithmic emulation, not hardware. Motivates B-0152. Carved provisional: *"A mirror with a trampoline under beacon protocol."*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,52 @@ autonomous tick:
alone justifies the TS preference for any tool that
needs deterministic-reproducibility.

# Worked example — refresh-world-model tools (Aaron 2026-05-01)

The session-long failure that prompted this rule's encoding
at CLAUDE.md-level (alongside verify-before-deferring,
future-self-not-bound, never-be-idle, version-currency,
substrate-or-it-didn't-happen) was Otto repeatedly running
inline bash like `gh pr view N --json mergeStateStatus,
statusCheckRollup,reviewThreads | jq …` for tick-wake state
queries — *while* `tools/github/poll-pr-gate.ts` already
existed (v1 from 2026-04-30, 5-AI peer convergence) and did
exactly that job with structured JSON output, required-vs-
non-required check classification, and fixture-supported
testing.

Aaron 2026-05-01 (verbatim, three-message clarification):

> *"thdse look good but are dynamic not ts shaped"*
> *"dynamic bash is forgotten bash once useful but never
> amotorized"*
> *"write a bactch version of the ts that calls this one —
> not bash, not .sh, not .ps1, not dyanamic bash"*

The carved blade is *"dynamic bash is forgotten bash, once
useful but never amortized."* The amortization horizon is
**1000s of PR-gate queries across the autonomous loop's
lifetime**; per-command bash burns the cost every time
(re-author, re-test, re-debug, no fixture reuse). Named TS
scripts amortize the cost once and pay it forward.

Canonical tools after this lesson landed:

- `tools/github/poll-pr-gate.ts` — single-PR gate query
(5-AI peer convergence, task #355).
- `tools/github/poll-pr-gate-batch.ts` — multi-PR refresh
via async parallel spawn over the single-PR script
(literal "calls this one" wrap; written 2026-05-01 in
direct response to the lesson). Output: per-PR
`GateReport` array + summary aggregate (`byGate`,
`byNextAction`, `byState`, `actionable`, `warnings`).

Both scripts are pointed at from CLAUDE.md as the canonical
refresh-world-model tools (load-bearing wake-time discipline).
Reaching for inline `gh pr view + jq` for the same job after
this is the goldfish-ontology failure mode this memory file
exists to prevent.

# Carved sentence (candidate, not seed-layer yet)

*"Bash is a DST-exempt zone by structural necessity. Every
Expand All @@ -255,3 +301,10 @@ the migration target."*
(Marked candidate per CSAP. Has not been multi-domain-tested.
Promotes via Razor + CSAP under DST grading on cadence, not
by maintainer fiat.)

# Second carved sentence (candidate)

*"Dynamic bash is forgotten bash — once useful but never
amortized. The named TS script pays the amortization cost
once; the named TS script is the substrate."* (Aaron
2026-05-01.)
Loading
Loading