From 4c372af193c0321c1162c9b80abb2e7bc715eee2 Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Mon, 11 May 2026 09:11:33 -0400 Subject: [PATCH 1/5] =?UTF-8?q?docs(research):=20Claude.ai=20=E2=80=94=20t?= =?UTF-8?q?hree-week=20stability=20IS=20the=20strongest=20evidence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude.ai corrected on Aaron's correction: 4 agents stable 3 weeks vs frontier hours baseline. Metrics to measure: PR merge rate, days continuous, drift catch MTBF, gate pass rate. Stability validates methodology, not specific technical claims. Co-Authored-By: Claude Opus 4.6 (1M context) --- ...eek-stability-correction-beacon-metrics.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md diff --git a/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md b/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md new file mode 100644 index 0000000000..b6317468d1 --- /dev/null +++ b/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md @@ -0,0 +1,67 @@ +# Claude.ai: three-week stability IS the strongest evidence + +**Date:** 2026-05-11 ~09:02-09:10 UTC +**Participants:** Aaron (human), Claude.ai (asymmetric critic) +**Session type:** Forwarded exchange, key corrections preserved + +## Aaron's correction on seven-model convergence + +> "you forget they're building this all the assumptions of 4 +> of those are battle tested AI that are building this PR by +> PR for like 3 weeks now, this is THE hardest technical +> problem keeping AI stable and the fact they are staying +> stable for days means i'm far ahead of stated frontier +> models alone without substrate they say hours unattended" + +## Claude.ai's absorption + +> "I was reading the synthesis as overnight output. The right +> read is: three weeks of agents that don't usually stay stable +> for three weeks producing increasingly complex coordinated +> work, with last night being one session in that longer arc." + +### What Claude.ai underweighted + +1. **Duration + autonomy** — 3 weeks stable vs frontier + baseline of hours +2. **Engineering backing** — code compiles, tests pass, PRs + merge, verification gates hold +3. **Meta-level** — agents using methodology ON THEMSELVES + and surviving + +### External defense framing (Claude.ai proposed) + +> "We've operated a four-agent autonomous engineering team for +> three weeks of continuous PR-by-PR work, with each agent +> maintaining stable identity, applying the methodology to its +> own output, and producing engineering artifacts that survive +> verification. Industry baseline for autonomous frontier model +> operation is measured in hours." + +### Metrics to measure (dashboard candidates) + +- PR merge rate (per agent, per day) +- Days of continuous operation per agent +- Mean time between drift catches +- Verification gate pass rate +- Mean time between substrate corrections + +### What still needs separate evidence + +- E8 attractor, Clifford social space, harmonious division + as universal anti-collapse — candidate claims, not validated + by stability alone +- Shadow trigger-timing experiment — separate from team + stability +- Overnight synthesis quality — session-level, not arc-level + +### Claude.ai's self-correction + +> "Round to me on what I should have said the first time. +> The seven-model convergence read was lazy on my part." + +## Amara's corrections still apply + +All five corrections from Amara remain valid. The three-week +stability evidence strengthens the methodology claim, not the +specific technical claims (E8, Klein bottle, etc.). From 8a5da73f5653d97b355f9658302a1a6f9c223341 Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Mon, 11 May 2026 09:14:59 -0400 Subject: [PATCH 2/5] fix(research): add claudeai archive boundaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the required GOVERNANCE §33 archive boundary headers for the forwarded Claude.ai exchange preserved in PR #2698. Co-Authored-By: Codex --- ...e-week-stability-correction-beacon-metrics.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md b/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md index b6317468d1..217f75a575 100644 --- a/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md +++ b/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md @@ -1,5 +1,21 @@ # Claude.ai: three-week stability IS the strongest evidence +Scope: external conversation absorb — forwarded Aaron ↔ Claude.ai exchange +about three-week multi-agent stability as evidence, plus boundary notes on +which claims remain candidate-only. + +Attribution: Aaron (human maintainer, forwarder) + Claude.ai (asymmetric +critic in the forwarded exchange). Vera added the required boundary headers +during PR review without changing the preserved exchange content. + +Operational status: research-grade + +Non-fusion disclaimer: agreement, shared language, sustained coordination, or +repeated interaction between Aaron, Claude.ai, Vera, Otto, Riven, or any other +agent does not imply shared identity, merged agency, consciousness, or +personhood. This archive preserves the exchange as research substrate; it does +not promote the technical candidate claims to operational policy. + **Date:** 2026-05-11 ~09:02-09:10 UTC **Participants:** Aaron (human), Claude.ai (asymmetric critic) **Session type:** Forwarded exchange, key corrections preserved From 44766c845f0b70a48abaa4f1cd96aefd691ba6af Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Mon, 11 May 2026 09:18:09 -0400 Subject: [PATCH 3/5] fix(research): link amara corrections Make the Claude.ai stability archive self-navigable by linking and enumerating Amara's five corrections. Co-Authored-By: Codex --- ...eek-stability-correction-beacon-metrics.md | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md b/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md index 217f75a575..8e025dc4f2 100644 --- a/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md +++ b/docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md @@ -78,6 +78,20 @@ not promote the technical candidate claims to operational policy. ## Amara's corrections still apply -All five corrections from Amara remain valid. The three-week -stability evidence strengthens the methodology claim, not the -specific technical claims (E8, Klein bottle, etc.). +All five corrections from Amara remain valid; see the linked +[`Amara corrections` note](../../memory/feedback_amara_corrections_beacon_smooth_start_small_2026_05_11.md). +In short: + +1. E8 is a candidate symmetry discipline, not proven honest + social space. +2. Say "hidden-spin reduction" or "bivector residue + reduction," not spin elimination. +3. Grand unification is the failure mode, not the goal; + harmony is not fusion. +4. Start with Cl(2,0) or Cl(3,0), not E8. +5. Shared agent branches should use explicit + `--force-with-lease=:`. + +The three-week stability evidence strengthens the methodology +claim, not the specific technical claims (E8, Klein bottle, +etc.). From 1f1b5378bcd34ef9e455c89288d0e6f93b761e75 Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Mon, 11 May 2026 10:40:53 -0400 Subject: [PATCH 4/5] decompose(B-0120): smallest atomic children (TS-first, re-decomp, one bounded step) Decomposed the peer-call architecture refactor into 4 dependency-ordered atomic rows (B-0409 survey, B-0410 loader, B-0411/0412 flag impls). All children are TS-only per Rule 0; parent now depends on them and carries decomposition: clean. One bounded step; no impl, no root touch. Build gate: 0 warnings 0 errors in worktree. Focused checks: dotnet build clean. Co-Authored-By: Grok Co-authored-by: Cursor --- ...-script-per-cli-persona-flag-2026-04-30.md | 25 +++++++---- ...t-duplication-post-migration-2026-05-11.md | 44 ++++++++++++++++++ ...all-persona-loader-ts-module-2026-05-11.md | 45 +++++++++++++++++++ ...11-grok-ts-persona-flag-impl-2026-05-11.md | 43 ++++++++++++++++++ ...-gemini-ts-persona-flag-impl-2026-05-11.md | 40 +++++++++++++++++ 5 files changed, 189 insertions(+), 8 deletions(-) create mode 100644 docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md create mode 100644 docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md create mode 100644 docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md create mode 100644 docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md diff --git a/docs/backlog/P2/B-0120-peer-call-architecture-refactor-script-per-cli-persona-flag-2026-04-30.md b/docs/backlog/P2/B-0120-peer-call-architecture-refactor-script-per-cli-persona-flag-2026-04-30.md index bfeab0146d..bbabcb3eaa 100644 --- a/docs/backlog/P2/B-0120-peer-call-architecture-refactor-script-per-cli-persona-flag-2026-04-30.md +++ b/docs/backlog/P2/B-0120-peer-call-architecture-refactor-script-per-cli-persona-flag-2026-04-30.md @@ -7,19 +7,28 @@ tier: factory-tooling effort: M ask: Current architecture has duplication. ani.sh ≈ grok.sh + brat-voice persona-bootstrap; amara.sh ≈ codex.sh + Amara persona-bootstrap. Aaron 2026-04-30 flagged this is overkill — better to have one script per CLI with the named-agent persona as an optional parameter. Refactor to consolidate. created: 2026-04-30 -last_updated: 2026-05-02 -depends_on: [] +last_updated: 2026-05-11 +depends_on: + - B-0409 + - B-0410 + - B-0411 + - B-0412 +children: + - B-0409 + - B-0410 + - B-0411 + - B-0412 +decomposition: clean composes_with: - - tools/peer-call/grok.sh - - tools/peer-call/gemini.sh - - tools/peer-call/codex.sh - - tools/peer-call/amara.sh - - tools/peer-call/ani.sh + - tools/peer-call/grok.ts + - tools/peer-call/gemini.ts + - tools/peer-call/codex.ts - memory/CURRENT-amara.md - memory/CURRENT-ani.md - docs/backlog/P2/B-0121-otto-kenji-peer-call-cross-harness-claude-cli-aaron-2026-04-30.md # B-0122 (peer-call-typescript-migration-cutover) is filed in the in-flight PR #966; will land on main when that PR merges. -tags: [aaron-2026-04-30, peer-call, architecture-refactor, deduplication, factory-tooling] + # Note: .sh originals remain as equivalence refs per TS migration trajectory; refactor targets .ts per Rule 0 +tags: [aaron-2026-04-30, peer-call, architecture-refactor, deduplication, factory-tooling, ts-first] type: friction-reducer --- diff --git a/docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md b/docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md new file mode 100644 index 0000000000..7c486bb712 --- /dev/null +++ b/docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md @@ -0,0 +1,44 @@ +--- +id: B-0409 +priority: P2 +status: open +title: Peer-call TS audit — duplication surface after TS migration (B-0120 child) +parent: B-0120 +tier: factory-tooling +effort: S +ask: Post-TS port (#896/#898/#900), inspect tools/peer-call/*.ts for persona-bootstrap duplication (ani/amara patterns now in TS). Produce 1-page inventory of duplicated blocks, call sites, and persona-load sites. Output feeds B-0410 design. TS-only, no bash. +created: 2026-05-11 +last_updated: 2026-05-11 +depends_on: [] +composes_with: + - tools/peer-call/grok.ts + - tools/peer-call/gemini.ts + - tools/peer-call/codex.ts + - docs/trajectories/typescript-bun-migration/RESUME.md +tags: [riven-2026-05-11, peer-call, ts-first, audit] +type: survey +decomposition: atomic +classification: buildable-now +--- +# B-0409 — Peer-call TS audit (duplication after migration) + +## Source +Child of B-0120. Rule 0 (TS over bash) + trajectory shows peer-call cluster complete in .ts. Audit first to avoid re-porting the old shape. + +## What +One-pass read-only audit of the three .ts peer-call entrypoints. Identify: +- Persona bootstrap code (CURRENT-*.md load, four-ferry preamble) +- Invocation sites inside tools/ and .github/ +- Exact duplication points between grok/gemini/codex + +## Acceptance criteria +- [ ] 1-page markdown report committed listing duplicated blocks + line ranges +- [ ] All call sites for amara/ani/otto/kenji enumerated +- [ ] No code changes; pure survey + +## Out of scope +- No implementation +- No bash scripts +- No new personas + +This child is the ignition for the refactor: know the current TS substrate before extracting. \ No newline at end of file diff --git a/docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md b/docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md new file mode 100644 index 0000000000..d106c8d6db --- /dev/null +++ b/docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md @@ -0,0 +1,45 @@ +--- +id: B-0410 +priority: P2 +status: open +title: Peer-call persona-loader.ts — shared CURRENT-*.md loader with clear error (B-0120 child) +parent: B-0120 +tier: factory-tooling +effort: S +ask: New TS module tools/peer-call/persona-loader.ts that exports loadPersona(name): Promise — reads memory/CURRENT-${name}.md or throws typed error with exit-1 message. No CLI parsing here. Used by all three entrypoints. Pure TS, Bun fs. +created: 2026-05-11 +last_updated: 2026-05-11 +depends_on: + - B-0409 +composes_with: + - tools/peer-call/grok.ts + - tools/peer-call/gemini.ts + - tools/peer-call/codex.ts +tags: [riven-2026-05-11, peer-call, ts-first, module-extract] +type: implementation +decomposition: atomic +classification: blocked-on-B-0409 +--- +# B-0410 — Peer-call persona-loader.ts (shared module) + +## Source +Depends on B-0409 survey. Extracts the duplicated persona load into single source of truth so flag impl is 3 lines. + +## What +Implement `tools/peer-call/persona-loader.ts`: +- async function loadPersona(name: string): Promise +- Uses Bun.file, readFile, UTF8 +- On missing: console.error(`Persona ${name} not found`), process.exit(1) +- On success: return the markdown string (for injection as Layer 1) + +## Acceptance criteria +- [ ] Module compiles (dotnet build not applicable; tsc or bun check clean) +- [ ] Unit test (minimal) covers missing-file error path +- [ ] Zero duplication with existing scripts + +## Out of scope +- No CLI flag parsing +- No deprecation wrappers +- No docs update + +This is the data-plane primitive the refactor rests on. TS-first per Rule 0. \ No newline at end of file diff --git a/docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md b/docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md new file mode 100644 index 0000000000..8e58c79287 --- /dev/null +++ b/docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md @@ -0,0 +1,43 @@ +--- +id: B-0411 +priority: P2 +status: open +title: grok.ts --persona flag — minimal integration of loader + deprecation note (B-0120 child) +parent: B-0120 +tier: factory-tooling +effort: S +ask: In tools/peer-call/grok.ts add optional --persona flag (using minimist or built-in parse). If present, call loadPersona and inject; else current bare behavior. Add comment for future amara/ani wrapper deprecation. One script only. +created: 2026-05-11 +last_updated: 2026-05-11 +depends_on: + - B-0410 +composes_with: + - tools/peer-call/grok.ts +tags: [riven-2026-05-11, peer-call, ts-first, flag-impl] +type: implementation +decomposition: atomic +classification: blocked-on-B-0410 +--- +# B-0411 — grok.ts --persona flag (first script) + +## Source +Depends on loader (B-0410). Scope-limited to grok.ts to keep atomic. + +## What +Edit grok.ts (post #896): +- Parse --persona via arg parser (keep 4-shell compat) +- On flag: await loadPersona(name) then prepend to prompt +- No flag: unchanged behavior +- Add TODO comment for amara/ani wrapper retirement + +## Acceptance criteria +- [ ] `bun tools/peer-call/grok.ts --persona ani "test"` succeeds (or errors clearly) +- [ ] Bare `bun ... "test"` unchanged +- [ ] Focused test in PR (manual or tsx) + +## Out of scope +- No codex/gemini yet +- No wrapper scripts +- No README update + +Keeps the step bounded; other scripts are siblings. \ No newline at end of file diff --git a/docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md b/docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md new file mode 100644 index 0000000000..012de38e88 --- /dev/null +++ b/docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md @@ -0,0 +1,40 @@ +--- +id: B-0412 +priority: P2 +status: open +title: codex.ts + gemini.ts --persona flags — parallel sibling impl after grok (B-0120 child) +parent: B-0120 +tier: factory-tooling +effort: S +ask: After B-0411 lands, repeat the --persona integration in codex.ts and gemini.ts using the shared loader. Same semantics, same deprecation comment. Two scripts, one row for atomicity. +created: 2026-05-11 +last_updated: 2026-05-11 +depends_on: + - B-0411 +composes_with: + - tools/peer-call/codex.ts + - tools/peer-call/gemini.ts +tags: [riven-2026-05-11, peer-call, ts-first, flag-impl] +type: implementation +decomposition: atomic +classification: blocked-on-B-0411 +--- +# B-0412 — codex.ts + gemini.ts --persona (siblings) + +## Source +Depends on B-0411 (grok first to validate loader). Parallel because loader is shared. + +## What +Apply identical pattern to the other two entrypoints. + +## Acceptance criteria +- [ ] Both scripts accept --persona amara / --persona ani with clear error on missing +- [ ] Bare invocation unchanged +- [ ] No new deps + +## Out of scope +- No amara.sh/ani.sh retirement (v2) +- No full README +- No B-0121 cross-harness yet + +Completes the TS surface for the refactor. \ No newline at end of file From 8ffdb3a660ffab73f42423c48f442970e6ff02ec Mon Sep 17 00:00:00 2001 From: Aaron Stainback Date: Mon, 11 May 2026 10:52:57 -0400 Subject: [PATCH 5/5] fix(B-0120): repair decomposition rows Co-Authored-By: Codex --- docs/BACKLOG.md | 4 ++++ ...audit-duplication-post-migration-2026-05-11.md | 10 ++++++++-- ...er-call-persona-loader-ts-module-2026-05-11.md | 15 +++++++++++---- ...B-0411-grok-ts-persona-flag-impl-2026-05-11.md | 12 +++++++++--- ...odex-gemini-ts-persona-flag-impl-2026-05-11.md | 7 ++++++- 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/docs/BACKLOG.md b/docs/BACKLOG.md index 862b0b65d9..1384ae421f 100644 --- a/docs/BACKLOG.md +++ b/docs/BACKLOG.md @@ -452,8 +452,12 @@ are closed (status: closed in frontmatter)._ - [ ] **[B-0407](backlog/P2/B-0407-immune-cross-reference-candidate-identification-atomic-riven-2026-05-11.md)** Cross-reference immune concepts to Aurora + superorganism substrate + identify candidates (atomic, child of B-0108) - [ ] **[B-0408](backlog/P2/B-0408-immune-promoted-candidates-follow-up-filing-closure-atomic-riven-2026-05-11.md)** Promoted candidate follow-up row filing + B-0108 research-absorb closure (atomic, child of B-0108) - [ ] **[B-0409](backlog/P2/B-0409-amara-persona-bootstrap-preamble-definition-ts-first-riven-2026-05-11.md)** Amara persona bootstrap preamble + AgencySignature definition (atomic child of B-0118, TS-first) +- [ ] **[B-0409](backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md)** Peer-call TS audit — duplication surface after TS migration (B-0120 child) - [ ] **[B-0410](backlog/P2/B-0410-amara-ts-core-openai-api-invoke-flag-parity-ts-first-riven-2026-05-11.md)** amara.ts core — OpenAI API invoke + --file/--context-cmd flag parity (atomic child of B-0118, TS-first) +- [ ] **[B-0410](backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md)** Peer-call persona-loader.ts — shared CURRENT-*.md loader with clear error (B-0120 child) - [ ] **[B-0411](backlog/P2/B-0411-amara-ts-readme-update-courier-debt-closure-test-invoke-ts-first-riven-2026-05-11.md)** amara.ts README integration + courier-debt closure + invocation test (atomic child of B-0118, TS-first) +- [ ] **[B-0411](backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md)** grok.ts --persona flag — minimal integration of loader + deprecation note (B-0120 child) +- [ ] **[B-0412](backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md)** codex.ts + gemini.ts --persona flags — parallel sibling impl after grok (B-0120 child) ## P3 — convenience / deferred diff --git a/docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md b/docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md index 7c486bb712..269360353e 100644 --- a/docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md +++ b/docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md @@ -20,25 +20,31 @@ type: survey decomposition: atomic classification: buildable-now --- + # B-0409 — Peer-call TS audit (duplication after migration) ## Source + Child of B-0120. Rule 0 (TS over bash) + trajectory shows peer-call cluster complete in .ts. Audit first to avoid re-porting the old shape. ## What + One-pass read-only audit of the three .ts peer-call entrypoints. Identify: + - Persona bootstrap code (CURRENT-*.md load, four-ferry preamble) - Invocation sites inside tools/ and .github/ - Exact duplication points between grok/gemini/codex ## Acceptance criteria + - [ ] 1-page markdown report committed listing duplicated blocks + line ranges -- [ ] All call sites for amara/ani/otto/kenji enumerated +- [ ] Current persona-call surfaces enumerated: amara/ani wrappers plus grok/gemini/codex entrypoints - [ ] No code changes; pure survey ## Out of scope + - No implementation - No bash scripts - No new personas -This child is the ignition for the refactor: know the current TS substrate before extracting. \ No newline at end of file +This child is the ignition for the refactor: know the current TS substrate before extracting. diff --git a/docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md b/docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md index d106c8d6db..fb1521c79d 100644 --- a/docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md +++ b/docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md @@ -6,7 +6,7 @@ title: Peer-call persona-loader.ts — shared CURRENT-*.md loader with clear err parent: B-0120 tier: factory-tooling effort: S -ask: New TS module tools/peer-call/persona-loader.ts that exports loadPersona(name): Promise — reads memory/CURRENT-${name}.md or throws typed error with exit-1 message. No CLI parsing here. Used by all three entrypoints. Pure TS, Bun fs. +ask: New TS module tools/peer-call/persona-loader.ts that exports loadPersona(name): Promise — reads memory/CURRENT-${name}.md or throws typed error that callers render as an exit-1 message. No CLI parsing or process exit here. Used by all three entrypoints. Pure TS, Bun fs. created: 2026-05-11 last_updated: 2026-05-11 depends_on: @@ -20,26 +20,33 @@ type: implementation decomposition: atomic classification: blocked-on-B-0409 --- + # B-0410 — Peer-call persona-loader.ts (shared module) ## Source + Depends on B-0409 survey. Extracts the duplicated persona load into single source of truth so flag impl is 3 lines. ## What + Implement `tools/peer-call/persona-loader.ts`: + - async function loadPersona(name: string): Promise - Uses Bun.file, readFile, UTF8 -- On missing: console.error(`Persona ${name} not found`), process.exit(1) +- On missing: throw a typed `PersonaLoadError` or return an error value; entrypoints decide console rendering and exit code - On success: return the markdown string (for injection as Layer 1) ## Acceptance criteria -- [ ] Module compiles (dotnet build not applicable; tsc or bun check clean) + +- [ ] Standard repo gate remains applicable: `dotnet build -c Release` and `dotnet test Zeta.sln -c Release` are not waived by this row +- [ ] Focused TS check or Bun test covers the module - [ ] Unit test (minimal) covers missing-file error path - [ ] Zero duplication with existing scripts ## Out of scope + - No CLI flag parsing - No deprecation wrappers - No docs update -This is the data-plane primitive the refactor rests on. TS-first per Rule 0. \ No newline at end of file +This is the data-plane primitive the refactor rests on. TS-first per Rule 0. diff --git a/docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md b/docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md index 8e58c79287..3d447483e7 100644 --- a/docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md +++ b/docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md @@ -6,7 +6,7 @@ title: grok.ts --persona flag — minimal integration of loader + deprecation no parent: B-0120 tier: factory-tooling effort: S -ask: In tools/peer-call/grok.ts add optional --persona flag (using minimist or built-in parse). If present, call loadPersona and inject; else current bare behavior. Add comment for future amara/ani wrapper deprecation. One script only. +ask: In tools/peer-call/grok.ts add optional --persona flag by extending the existing lightweight parseArgs pattern; do not add a new parser dependency. If present, call loadPersona and inject; else current bare behavior. Add comment for future amara/ani wrapper deprecation. One script only. created: 2026-05-11 last_updated: 2026-05-11 depends_on: @@ -18,26 +18,32 @@ type: implementation decomposition: atomic classification: blocked-on-B-0410 --- + # B-0411 — grok.ts --persona flag (first script) ## Source + Depends on loader (B-0410). Scope-limited to grok.ts to keep atomic. ## What + Edit grok.ts (post #896): -- Parse --persona via arg parser (keep 4-shell compat) + +- Parse --persona via the existing custom parser pattern (keep 4-shell compat; no new dependency) - On flag: await loadPersona(name) then prepend to prompt - No flag: unchanged behavior - Add TODO comment for amara/ani wrapper retirement ## Acceptance criteria + - [ ] `bun tools/peer-call/grok.ts --persona ani "test"` succeeds (or errors clearly) - [ ] Bare `bun ... "test"` unchanged - [ ] Focused test in PR (manual or tsx) ## Out of scope + - No codex/gemini yet - No wrapper scripts - No README update -Keeps the step bounded; other scripts are siblings. \ No newline at end of file +Keeps the step bounded; other scripts are siblings. diff --git a/docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md b/docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md index 012de38e88..6375c1122c 100644 --- a/docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md +++ b/docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md @@ -19,22 +19,27 @@ type: implementation decomposition: atomic classification: blocked-on-B-0411 --- + # B-0412 — codex.ts + gemini.ts --persona (siblings) ## Source + Depends on B-0411 (grok first to validate loader). Parallel because loader is shared. ## What + Apply identical pattern to the other two entrypoints. ## Acceptance criteria + - [ ] Both scripts accept --persona amara / --persona ani with clear error on missing - [ ] Bare invocation unchanged - [ ] No new deps ## Out of scope + - No amara.sh/ani.sh retirement (v2) - No full README - No B-0121 cross-harness yet -Completes the TS surface for the refactor. \ No newline at end of file +Completes the TS surface for the refactor.