Skip to content

decompose(B-0120): smallest atomic children (TS-first, re-decomp, one bounded step)#2706

Merged
AceHack merged 6 commits into
mainfrom
claim/b0120-decompose-smallest-atomic-children-riven-2026-05-11
May 11, 2026
Merged

decompose(B-0120): smallest atomic children (TS-first, re-decomp, one bounded step)#2706
AceHack merged 6 commits into
mainfrom
claim/b0120-decompose-smallest-atomic-children-riven-2026-05-11

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 11, 2026

Summary

Decomposed B-0120 (P2 peer-call architecture refactor) into 4 smallest dependency-ordered atomic child rows:

  • B-0409: TS audit of current duplication post-migration (buildable-now)
  • B-0410: persona-loader.ts shared module (blocked on 0409)
  • B-0411: grok.ts --persona flag (blocked on 0410)
  • B-0412: codex.ts + gemini.ts --persona (blocked on 0411)

All children TS-first per Rule 0. Parent updated with depends_on/children/decomposition:clean. One bounded step only; no implementation, no root checkout touched.

Why

B-0120 was broad (M effort, 5-script to 3+flag + deprecation). Re-decomposition assumed prior mistakes and produced atomic, buildable slices with clear edges. Matches AGENTS.md "always re-decompose" and "if too broad, decompose before implementation".

Focused checks (in dedicated worktree)

  • dotnet build -c Release: 0 Warning(s) 0 Error(s) (passed)
  • git worktree + pushed claim before any write (per rules)
  • No bash used (TS preference honored; no generate-index.sh invoked)

Evidence

  • Worktree: .config/superpowers/worktrees/Zeta/claim-b0120-...
  • Branch: origin/claim/b0120-decompose-smallest-atomic-children-riven-2026-05-11
  • Co-Authored-By trailer present

Next

After merge, B-0409 becomes pickable (S, survey, no code risk).

Co-Authored-By: Grok noreply@x.ai

Made with Cursor

AceHack and others added 4 commits May 11, 2026 09:11
…dence

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) <noreply@anthropic.com>
Add the required GOVERNANCE §33 archive boundary headers for the forwarded Claude.ai exchange preserved in PR #2698.

Co-Authored-By: Codex <noreply@openai.com>
Make the Claude.ai stability archive self-navigable by linking and enumerating Amara's five corrections.

Co-Authored-By: Codex <noreply@openai.com>
… 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 <noreply@x.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings May 11, 2026 14:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Decomposes backlog row B-0120 (peer-call architecture refactor) into four dependency-ordered, smallest-atomic child rows, keeping the work TS-first and limiting this PR to documentation/backlog planning updates.

Changes:

  • Added four new P2 backlog child rows (B-0409..B-0412) describing the survey → module extraction → per-script flag rollout plan.
  • Updated B-0120 frontmatter to reflect the decomposition (depends_on/children/decomposition) and TS-first targets.
  • Added a research archive note capturing a forwarded external exchange + boundary framing.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/research/2026-05-11-claudeai-three-week-stability-correction-beacon-metrics.md New research archive note with boundary headers and a memory cross-link.
docs/backlog/P2/B-0409-peer-call-ts-audit-duplication-post-migration-2026-05-11.md New survey row to inventory TS peer-call duplication before refactor.
docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md New implementation row proposing a shared TS persona loader module.
docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md New implementation row for adding --persona to grok.ts first.
docs/backlog/P2/B-0412-codex-gemini-ts-persona-flag-impl-2026-05-11.md New implementation row for adding --persona to codex.ts and gemini.ts.
docs/backlog/P2/B-0120-peer-call-architecture-refactor-script-per-cli-persona-flag-2026-04-30.md Updates parent row to “clean” decomposition with children/depends_on and TS targets.

Comment thread docs/backlog/P2/B-0411-grok-ts-persona-flag-impl-2026-05-11.md
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f1b5378bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md Outdated
Comment thread docs/backlog/P2/B-0410-peer-call-persona-loader-ts-module-2026-05-11.md Outdated
AceHack and others added 2 commits May 11, 2026 10:51
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Copilot AI review requested due to automatic review settings May 11, 2026 14:53
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack merged commit 2b7e312 into main May 11, 2026
26 checks passed
@AceHack AceHack deleted the claim/b0120-decompose-smallest-atomic-children-riven-2026-05-11 branch May 11, 2026 14:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Comment on lines +2 to +6
id: B-0409
priority: P2
status: open
title: Peer-call TS audit — duplication surface after TS migration (B-0120 child)
parent: B-0120
Comment on lines +2 to +6
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
Comment on lines +2 to +6
id: B-0411
priority: P2
status: open
title: grok.ts --persona flag — minimal integration of loader + deprecation note (B-0120 child)
parent: B-0120
Comment on lines +12 to +19
- B-0409
- B-0410
- B-0411
- B-0412
children:
- B-0409
- B-0410
- B-0411
Comment thread docs/BACKLOG.md
Comment on lines +455 to +460
- [ ] **[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)
Comment thread docs/BACKLOG.md
Comment on lines +457 to +460
- [ ] **[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)
Comment on lines +9 to +27
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.
AceHack added a commit that referenced this pull request May 14, 2026
…s → B-0457-B-0458 (#3069)

* fix(backlog): resolve B-0410-B-0411 collisions — renumber amara series → B-0457-B-0458

Fourth per-collision cleanup from the B-0451 sweep. B-0410 + B-0411
form one connected component (amara series: B-0411 depends on
B-0410 within the chain).

## The collisions

| ID | B-0118 amara series (2026-05-11 PR #2704) | B-0120 peer-call series (2026-05-11 PR #2706) |
|---|---|---|
| B-0410 | amara.ts core OpenAI API invoke | peer-call-persona-loader-ts-module |
| B-0411 | amara.ts README + courier-debt | grok-ts-persona-flag-impl |

## Resolution: keep B-0120 (peer-call) series

Per external-references rule:

- B-0120 parent's frontmatter lists `children: [B-0410, B-0411]`
  AND `depends_on: [B-0410, B-0411]` — strong references
- B-0412 (`codex-gemini-ts-persona-flag-impl`) `depends_on: [B-0411]`
  with body "After B-0411 lands, repeat ... in codex.ts and
  gemini.ts" — clearly refers to the peer-call grok-ts row
- B-0118 parent only has body-text mentions (editable in this PR)

→ Keep B-0120's children at B-0410-B-0411. Renumber amara series
as a unit:

  B-0410 → B-0457  (amara.ts core)
  B-0411 → B-0458  (amara.ts README + closure)

Internal chain remap: B-0458's `depends_on: [B-0410]` → `[B-0457]`.

B-0118 parent body updated to point at new IDs + add note about
the renumber. `renumbered_from` + reason recorded in each
frontmatter.

## Empirical effect

Against current main (which has only B-0409 + B-0410 + B-0411 as
remaining collisions after this session's prior 4 cleanup PRs):

  Duplicate-ID groups: 3 → 1

B-0451 cleanup progress: 9/12 → 11/12. Only B-0409 3-way remains
for future-Otto.

Co-Authored-By: Claude <noreply@anthropic.com>

* shard(tick): 0204Z — fourth B-0451 cleanup; only B-0409 3-way remains

Records: PR #3069 opened with B-0410-B-0411 amara series renumber to
B-0457-B-0458. Substrate-honest detour from previous tick's restraint
(close-out shard): the cleanup is bounded (~10 min following the
procedure), the audit tool confirms 3 → 1 group reduction, and the
B-0409 3-way remaining is pick-up-able via the procedure memo.

B-0451 cleanup progress: 9/12 → 11/12. Only B-0409 3-way remains.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 14, 2026
…rate-hygiene sweep (#3073)

* fix(backlog): resolve B-0409 3-way collision — completes B-0451 substrate-hygiene sweep

Fifth and FINAL per-collision cleanup from the B-0451 sweep. Three
rows shared id: B-0409:

| Row | Filed | Scope |
|---|---|---|
| P1 wallet-immune-system | 2026-05-11 10:48 PR #2709 | Wallet immune system spec (L-effort) |
| P2 amara-persona-bootstrap | 2026-05-11 10:34 PR #2704 | B-0118 amara series atomic child |
| P2 peer-call-ts-audit | 2026-05-11 10:58 PR #2706 | B-0120 peer-call series atomic child |

## Resolution: keep peer-call series at B-0409

Per external-references rule:

- B-0120 frontmatter has `children: [B-0409, B-0410, B-0411, ...]`
  AND `depends_on: [B-0409, B-0410, ...]` — strongest references
- B-0118 has body-text mentions only (editable in this PR)
- Wallet-immune row has no incoming refs from other rows
  (composes_with B-0294/B-0321 point FROM the wallet row, not TO it)

→ Keep peer-call B-0409. Renumber:

  amara B-0409 → B-0459 (completes the amara series renumber
    started in PR #3069: B-0410 → B-0457, B-0411 → B-0458, and
    now B-0409 → B-0459)
  wallet-immune-system B-0409 → B-0460

## Chain remap

PR #3069 left B-0457's `depends_on: [B-0409]` pointing at the
soon-to-be-renumbered amara B-0409. This PR remaps it:

  B-0457.depends_on: [B-0409] → [B-0459]
  B-0457.composes_with: ..., B-0409, ... → ..., B-0459, ...

Plus B-0118 parent body §Decomposition updated:

  "B-0409 — Amara persona bootstrap definition" →
  "B-0459 (renumbered from B-0409) — Amara persona bootstrap definition"

`docs/BACKLOG.md` regenerated.

## Empirical effect (CASCADE COMPLETE)

```
$ bun tools/bg/audit-duplicate-row-ids.ts
audit-duplicate-row-ids: 561 rows with id field, no duplicate IDs
```

**Down from 12 duplicate-ID groups at session start to 0 on main.**

B-0451 cleanup progress: 11/12 → **12/12** (sweep complete).

## Session-arc cascade rounds

Round 1: B-0444 P1+P2 (PR #3053) — 12 → 11 groups
Round 2: B-0068.1 (PR #3057) — 11 → 10 groups
Round 3: B-0090.1-4 batch (PR #3058) — 10 → 6 groups
Round 4: B-0370-0373 P2 batch (PR #3065) — 6 → 3 groups
Round 5: B-0410-B-0411 amara batch (PR #3069) — 3 → 1 group
**Round 6: B-0409 3-way (THIS PR) — 1 → 0 groups**

Co-Authored-By: Claude <noreply@anthropic.com>

* shard(tick): 0223Z — B-0451 substrate-hygiene cascade COMPLETE (12 → 0 groups)

Records: PR #3069 merged (ed9284d). Cross-PR sequencing constraint
cleared. Executed the final B-0409 3-way cleanup in PR #3073.

audit-duplicate-row-ids on the branch reports: 561 rows with id
field, NO DUPLICATE IDs. The substrate-hygiene cascade reaches its
terminal state once PR #3073 lands.

Session-arc final metrics:
- 14 of my PRs merged in the substrate-hygiene cascade
- 11 sibling-agent PRs merged (Otto-Desktop, Lior, Codex)
- 1 PR in flight (#3073), 1 closed-with-provenance (#3052)
- Duplicate-ID groups: 12 → 0
- Dangling-dep refs: 9 → 0
- 12 markdown findings caught across 4 rule classes
- 4 Copilot review rounds metabolized on PR #3066 (11 threads)
- New tooling: audit-duplicate-row-ids.ts
- New durable substrate: procedure memo + B-0451 + B-0456

The work + procedure are durable; future-Otto can pick up B-0456
mechanization or any new findings via the canonical reference.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(backlog): bump renumber to B-0462/B-0463 (avoid PR #3070's B-0459-B-0461 reservation) + fix B-0457 body refs

Three issues addressed in one commit:

1. **PR #3070 just merged** (2026-05-14) and reserved B-0459/0460/0461
   for B-0449 slice 5+ follow-up work (Otto-Desktop's B-0449 body
   text now points at those numbers). My initial renumber claimed
   B-0459 (amara) + B-0460 (wallet-immune) — same collision pattern
   that started this whole sweep, recurring at meta level. Bumped
   to next-available: B-0462 (amara) + B-0463 (wallet-immune).

2. **Codex P2 + Copilot threads on B-0457**: I updated B-0457's
   frontmatter `depends_on: [B-0409] → [B-0459]` but the body text
   still referenced `B-0409` for the preamble source ("Use preamble
   from B-0409"). After this PR's renumber, B-0409 belongs to a
   different peer-call-ts-audit row, so the instruction would point
   at the wrong artifact. Updated B-0457 body to "Use preamble from
   B-0462 (renumbered from B-0409 per B-0451 sweep)" — same in the
   Evidence section.

3. **B-0118 parent body**: Updated 3 places from B-0459 → B-0462 to
   match the new renumber target.

## Final state

```
$ bun tools/bg/audit-duplicate-row-ids.ts
audit-duplicate-row-ids: 561 rows with id field, no duplicate IDs
```

The cascade still terminates at zero collisions; just with B-0462
+ B-0463 instead of B-0459 + B-0460.

## Substrate-honest meta-observation

Otto-Desktop's PR #3070 + my PR #3073 ran in parallel and BOTH
reached for the same next-free range (B-0459-0461). The audit tool
prevents file-level collisions (same id field in two rows) but
doesn't prevent reservation-level collisions (one PR's body text
says "we plan to use X" while another PR makes X canonical for
different content). This is the next failure class — captured in
this commit message for B-0456 follow-up consideration.

Co-Authored-By: Claude <noreply@anthropic.com>

* shard(tick): 0238Z — caught parallel-renumber-collision with PR #3070; bumped to B-0462/0463

Records: PR #3070 (Otto-Desktop's B-0449 slice-5 reservation
renumber) merged, reserving B-0459/0460/0461. My PR #3073 was
reaching for B-0459/B-0460 — same collision pattern recurring at
meta level. Bumped to B-0462/B-0463.

Also resolved 2 Codex/Copilot threads on B-0457 body refs (real
bugs — frontmatter updated but body text still pointed at B-0409).

Meta-observation captured: audit tool catches file-level
collisions but doesn't catch reservation-level collisions where
one PR's body text says "plan to use X" while another PR makes X
canonical for different content. Next failure class for B-0456
follow-up consideration.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(shard): 0223Z — annotate superseded IDs (Copilot+Codex round-1 consistency catch)

Three Copilot/Codex threads converged on the same finding: the 0223Z
tick shard described the renumber as B-0459/B-0460 (the initial
plan) but the PR's final renumber bumped to B-0462/B-0463 (per
0238Z's catch of PR #3070's reservation collision). Without this
annotation, future readers following the 0223Z trail would land on
the wrong IDs.

Added SUPERSEDED annotations inline + a note pointing at 0238Z for
the bump narrative. The PR body has also been updated to reflect
the final IDs.

Cumulative threads resolved across this PR: 3 (Copilot round-1).

Co-Authored-By: Claude <noreply@anthropic.com>

* shard(tick): 0303Z — PR #3073 round-1 review: 3 cross-shard consistency findings

Records: Copilot/Codex caught 3 consistency findings on PR #3073.
Same finding-class as PR #3066's round-4 (cross-document drift after
mid-PR correction). Fixed in 6006bab: 0223Z shard annotated with
SUPERSEDED + pointer to 0238Z; PR body updated to final IDs.

This shard was pre-validated by check-md032-blanks-around-lists.ts
(the B-0456 helper from PR #3075) before push: "1 file(s) scanned,
no MD032 findings".

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.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.

2 participants