Skip to content

substrate(refresh-before-decide): Claude.ai packet — fundamental invariant + two-layer print DX (verbatim + memo + CLAUDE.md)#1171

Merged
AceHack merged 1 commit intomainfrom
otto/refresh-before-decide-claudeai-packet-2026-05-01
May 1, 2026
Merged

substrate(refresh-before-decide): Claude.ai packet — fundamental invariant + two-layer print DX (verbatim + memo + CLAUDE.md)#1171
AceHack merged 1 commit intomainfrom
otto/refresh-before-decide-claudeai-packet-2026-05-01

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 1, 2026

Phase 1 absorption of Claude.ai's 2026-05-01 carved-handoff packet on agent-loop refresh discipline.

  • Verbatim in docs/research/ (per substrate-or-it-didn't-happen + GOVERNANCE §33)
  • New memory file on refresh-before-decide as fundamental invariant + two-layer print DX
  • CLAUDE.md wake-time bullet at the upstream-invariant position
  • MEMORY.md row pair-edit

The human maintainer flagged refresh-before-decide as 'the most violated invariant in agent loops generally' — the rule names what the existing poll-pr-gate-batch.ts tool was already enabling structurally.

Phase 2 (the packet's 22 failure modes, metrics framework, etc.) deferred to organic absorption as failures surface.

🤖 Generated with Claude Code

…ntal invariant + two-layer print DX (Phase 1 verbatim + memo + CLAUDE.md pointer)

Claude.ai shared a major feedback packet 2026-05-01: 'Backlog-Driven Dual-PM Agent Loop with Refresh Discipline — Carved Handoff'. Per the substrate-or-it-didn't-happen verbatim-preservation trigger (architecture-changing + multi-AI review), preserved verbatim at docs/research/ BEFORE summarizing.

Phase 1 absorption (this commit):

1. **docs/research/2026-05-01-claudeai-backlog-driven-dual-pm-loop-with-refresh-discipline.md** — verbatim packet preserved with the four required header fields per GOVERNANCE §33 (Scope / Attribution / Operational status / Non-fusion disclaimer).

2. **New memory file** capturing the refresh-before-decide invariant + two-layer print DX as load-bearing — the piece the human maintainer flagged as 'the part most worth flagging for Otto specifically.' Documents 4 mandatory refresh triggers (tick selection / post-merge / session start / maintainer challenge) + raw-then-interpretation print discipline + the cheap-to-run requirement. Composes with substrate-or-it-didn't-happen (Otto-363) and BLOCKED-with-green-CI investigation rule (special case of refresh-before-decide).

3. **CLAUDE.md ground-rule bullet** at wake-time scope — first bullet because it's the upstream invariant other disciplines depend on. Points at the memo + verbatim packet for full reasoning. Per the meta-rule (PR #1160), load-bearing learning at wake-time scope.

4. **MEMORY.md row** for the new memory file (pair-edit per index-integrity rule).

Phase 2 absorption (deferred): the packet's 22 named failure modes, externalized proxy metrics framework, Mirror/Beacon ratio gate, convergence definitions — each is its own potential substrate landing as failures or patterns surface organically.

Empirical Otto-pattern this session that motivates the rule: I have repeatedly acted on stale derived state (citing prior-tick PR thread counts, believing memory over fresh poll, predicting rebase outcomes from cached file-overlap knowledge). The cure was the same every time: refresh was cheap (poll-pr-gate-batch.ts), should have refreshed again before deciding. The tool existed; the discipline of using it before tick decisions didn't have explicit wake-time framing. Now it does.

Worked example already in substrate: tools/github/poll-pr-gate-batch.ts produces both raw (per-PR GateReport[]) and interpretation (summary aggregate) layers — the two-layer print pattern is operational, this rule names the discipline.

Sources:
- Claude.ai 2026-05-01 packet (verbatim)
- The human maintainer 2026-05-01 standalone framing in same packet

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 1, 2026 21:57
@AceHack AceHack enabled auto-merge (squash) May 1, 2026 21:57
@AceHack AceHack merged commit 7612894 into main May 1, 2026
25 checks passed
@AceHack AceHack deleted the otto/refresh-before-decide-claudeai-packet-2026-05-01 branch May 1, 2026 21:59
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

Absorbs an external Claude.ai feedback packet into Zeta’s substrate by preserving the verbatim packet, creating a summarized memory entry, and surfacing the key invariant in wake-time guidance.

Changes:

  • Added a new memory memo defining “refresh-before-decide” + “two-layer print DX”.
  • Preserved the Claude.ai packet verbatim under docs/research/.
  • Wired the new memo into CLAUDE.md (wake-time bullets) and memory/MEMORY.md (index).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
memory/feedback_refresh_before_decide_invariant_two_layer_print_dx_claudeai_2026_05_01.md New memory entry capturing the invariant + two-layer output discipline with examples and cross-links.
memory/MEMORY.md Adds the new memory file to the index (newest-first).
docs/research/2026-05-01-claudeai-backlog-driven-dual-pm-loop-with-refresh-discipline.md Stores the external packet verbatim for durability/auditability.
CLAUDE.md Adds a wake-time bullet pointing to the new invariant and to the verbatim packet.

Comment thread CLAUDE.md
when 'I just refreshed earlier.'"* CLAUDE.md-level
so it is 100% loaded at every wake. Full reasoning:
`memory/feedback_refresh_before_decide_invariant_two_layer_print_dx_claudeai_2026_05_01.md`
+ verbatim packet at
Comment on lines +200 to +202
"actionable": [...]
},
"reports": [...]
AceHack added a commit that referenced this pull request May 1, 2026
…de.ai refresh-before-decide packet (PR #1171) (#1172)

Three-artifact Phase 1 landing on #1171: verbatim docs/research/ + load-bearing memo + CLAUDE.md upstream-invariant bullet + MEMORY.md row.

Phase 2 deferred (22 failure modes, metrics framework, Mirror/Beacon ratio, convergence) per Ratchet Pattern threshold.

Empirical session evidence backs the rule: 4+ instances of acting on stale derived state where cure was cheap-refresh-again.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 1, 2026
Codex P1 + Copilot duplicate finding on PR #1173: backlog rows require frontmatter (id, priority, status, title, created, last_updated) per tools/backlog/README.md schema. The .github/workflows/backlog-index-integrity.yml gate blocks PRs touching docs/backlog/** without it.

Fix: add YAML frontmatter matching the canonical shape used by sibling P1 rows (B-0156 style). Includes depends_on: [B-0156] since the unified refresh script is part of the broader TS-standardization trajectory.

Two additional Copilot dangling-pointer findings on the same PR:
- docs/research/2026-05-01-claudeai-backlog-driven-dual-pm-loop-with-refresh-discipline.md
- memory/feedback_refresh_before_decide_invariant_two_layer_print_dx_claudeai_2026_05_01.md

Both were dangling at PR-open time because they were on PR #1171 which had not merged. PR #1171 has now merged to main; rebasing this branch resolves both. The branch is now up-to-date with origin/main and the cross-references resolve.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 1, 2026
…t (Claude.ai 2026-05-01)

Claude.ai's calibrated follow-up to the refresh-before-decide packet identified Otto's narrow-refresh failure mode empirically:

- 5:32pm refresh: 4 PRs
- 5:37pm refresh: same 4 PRs
- 5:40pm-5:50pm refresh: 2-3 PRs across 6 consecutive ticks
- 5:50pm: PR #1170 'appeared out of nowhere' because prior 4 ticks' refresh scope didn't include it

The narrow-refresh pattern hides cross-cutting state changes — PRs from other harnesses, auto-merge cascades, backlog deltas, claim file inventory, recent merges, branch state, pending CI runs.

`poll-pr-gate-batch.ts` is correctly-scoped per its design (per-PR detail). The gap is the cross-cutting view.

This row specs `tools/refresh-github-worldview/refresh.ts` — supersets poll-pr-gate-batch (calls it internally for per-PR detail), adds 5+ cross-cutting queries, two-layer print discipline, DST-grade-A test coverage with fixtures.

Composes with refresh-before-decide memo (PR #1171), poll-pr-gate-batch (PR #1153), SQLSharp DI pattern memo (PR #1155).

Phase 2+ deferred (Mirror/Beacon ratio gate, 22 named failure modes, DST scenario suite, pre-DORA metrics, dual-PM mode-selection) — each is its own future row.

Per Claude.ai's caution: this row is the filing-not-implementation step. Don't context-switch mid-PR-cycle; let it flow through standard claim protocol when queue is quiet.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 1, 2026
Codex P1 + Copilot duplicate finding on PR #1173: backlog rows require frontmatter (id, priority, status, title, created, last_updated) per tools/backlog/README.md schema. The .github/workflows/backlog-index-integrity.yml gate blocks PRs touching docs/backlog/** without it.

Fix: add YAML frontmatter matching the canonical shape used by sibling P1 rows (B-0156 style). Includes depends_on: [B-0156] since the unified refresh script is part of the broader TS-standardization trajectory.

Two additional Copilot dangling-pointer findings on the same PR:
- docs/research/2026-05-01-claudeai-backlog-driven-dual-pm-loop-with-refresh-discipline.md
- memory/feedback_refresh_before_decide_invariant_two_layer_print_dx_claudeai_2026_05_01.md

Both were dangling at PR-open time because they were on PR #1171 which had not merged. PR #1171 has now merged to main; rebasing this branch resolves both. The branch is now up-to-date with origin/main and the cross-references resolve.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 1, 2026
…x P2 + Copilot P1)

Two real findings on PR #1173:

1. Codex P2: `git log --since="..."` after `--` pathspec doesn't filter
   per git-log man page (options must precede pathspecs). Reordered
   to `git log --oneline --diff-filter=A --since="<ts>" -- docs/backlog/`.

2. Codex P2 + Copilot P1 (dup): output-format contradiction —
   row described two separate stdout passes (raw-then-interpretation)
   AND single JSON with `summary` field. Reconciled per Deepseek's
   single-JSON design: `summary` object IS the interpretation layer
   alongside raw arrays in one JSON document, one invocation.
   Mismatch between summary and underlying arrays is the bug class.
   Supersedes the two-pass framing earlier in the row.

Two earlier dangling-pointer Copilot threads on this PR are now
satisfied by main since #1171 landed
(docs/research/2026-05-01-claudeai-backlog-driven-dual-pm-loop-with-refresh-discipline.md
+ memory/feedback_refresh_before_decide_invariant_two_layer_print_dx_claudeai_2026_05_01.md
both exist on main).
AceHack added a commit that referenced this pull request May 1, 2026
…t (Claude.ai 2026-05-01) (#1173)

* backlog(B-0159): refresh-github-worldview cross-cutting refresh script (Claude.ai 2026-05-01)

Claude.ai's calibrated follow-up to the refresh-before-decide packet identified Otto's narrow-refresh failure mode empirically:

- 5:32pm refresh: 4 PRs
- 5:37pm refresh: same 4 PRs
- 5:40pm-5:50pm refresh: 2-3 PRs across 6 consecutive ticks
- 5:50pm: PR #1170 'appeared out of nowhere' because prior 4 ticks' refresh scope didn't include it

The narrow-refresh pattern hides cross-cutting state changes — PRs from other harnesses, auto-merge cascades, backlog deltas, claim file inventory, recent merges, branch state, pending CI runs.

`poll-pr-gate-batch.ts` is correctly-scoped per its design (per-PR detail). The gap is the cross-cutting view.

This row specs `tools/refresh-github-worldview/refresh.ts` — supersets poll-pr-gate-batch (calls it internally for per-PR detail), adds 5+ cross-cutting queries, two-layer print discipline, DST-grade-A test coverage with fixtures.

Composes with refresh-before-decide memo (PR #1171), poll-pr-gate-batch (PR #1153), SQLSharp DI pattern memo (PR #1155).

Phase 2+ deferred (Mirror/Beacon ratio gate, 22 named failure modes, DST scenario suite, pre-DORA metrics, dual-PM mode-selection) — each is its own future row.

Per Claude.ai's caution: this row is the filing-not-implementation step. Don't context-switch mid-PR-cycle; let it flow through standard claim protocol when queue is quiet.

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

* fix(B-0159): Deepseek refinements — delta-diff, provenance, stale_assumptions, perf target, tiered fallback (2026-05-01)

Deepseek follow-up review identified 7 critical refinements:

(1) Delta-diff over current-state-dump — Otto's deeper failure isn't refresh-not-run, it's refresh-not-integrated. Saw 27 open PRs at 5:37pm, noted count, moved on. Snapshot persistence at .zeta/refresh-snapshot.json enables actual deltas.

(2) Provenance per PR — self / peer-call / maintainer / unknown. Computed mechanically from author. Unknowns are highest-priority signal.

(3) stale_assumptions field — most operationally valuable. Refresh reports surprises, not just state. 'PR #X expected to merge by now, why hasn't it?'

(4) Single JSON with summary field — match Otto's existing pattern (poll-pr-gate-batch.ts produces both layers in one output). Maintainer reads same JSON Claude reads; mismatch debuggable at boundary.

(5) Performance target <5s typical tick + tiered fallback (degrade to poll-pr-gate-batch + 'stale at <timestamp>' if exceeded). Prevents bottleneck.

(6) Backlog-row delta as git-derived (git diff --name-only HEAD~1 HEAD -- docs/backlog/), not frontmatter timestamps. Avoids B-0098-class metadata drift.

(7) Recent merges via git log + post-hoc author bucketing. Unknown-author = highest priority.

Plus refresh frequency recommendations + composing with poll-the-gate / manufactured-patience / never-idle / pre-commit lint for refresh artifacts.

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

* fix(B-0159): add required YAML frontmatter (Codex P1 + Copilot dup)

Codex P1 + Copilot duplicate finding on PR #1173: backlog rows require frontmatter (id, priority, status, title, created, last_updated) per tools/backlog/README.md schema. The .github/workflows/backlog-index-integrity.yml gate blocks PRs touching docs/backlog/** without it.

Fix: add YAML frontmatter matching the canonical shape used by sibling P1 rows (B-0156 style). Includes depends_on: [B-0156] since the unified refresh script is part of the broader TS-standardization trajectory.

Two additional Copilot dangling-pointer findings on the same PR:
- docs/research/2026-05-01-claudeai-backlog-driven-dual-pm-loop-with-refresh-discipline.md
- memory/feedback_refresh_before_decide_invariant_two_layer_print_dx_claudeai_2026_05_01.md

Both were dangling at PR-open time because they were on PR #1171 which had not merged. PR #1171 has now merged to main; rebasing this branch resolves both. The branch is now up-to-date with origin/main and the cross-references resolve.

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

* substrate(B-0159): peer-AI absorption + git-native/github-state two-layer split (Aaron + 4 peer reviewers 2026-05-01)

Two artifacts:

(1) docs/research/2026-05-01-peer-ai-followup-reviews-on-b-0159-refresh-script.md — verbatim preservation of 4 peer-AI reviews (Ani / Alexa / Gemini / Amara) per substrate-or-it-didn't-happen + GOVERNANCE §33 trigger (multi-AI review packet preserve verbatim FIRST). Includes carved blades, cross-peer convergence (4/4 agree on aggregator-not-replacement + two-layer output + don't-context-switch + compose-with-existing-disciplines), and divergence preserved as alternatives (tool naming, snapshot persistence path).

(2) B-0159 backlog row updated with two architectural decisions:

   ARCHITECTURE — TWO-LAYER GIT-NATIVE + GITHUB-API SPLIT (Aaron 2026-05-01 calibration of Amara's repo-state rename):
   - Layer 1: tools/repo-state/repo-state.ts — git-native, portable across hosts. Pure git ops + filesystem (backlog, claims, branch state, dirty flag).
   - Layer 2: tools/github/github-state.ts — wraps repo-state + poll-pr-gate-batch + adds GitHub API (PRs, CI, threads, reviews, workflows). GitHub-native.
   - Composes with feedback_git_native_vs_github_native_plural_host_pluggable_adapters_2026_04_23.md and feedback_first_class_for_us_not_for_our_host_*.

   PEER-AI CONSOLIDATED REQUIREMENTS:
   - Ani: idempotency + fail-closed (exit 10 on dirty/rebase), --raw flag, noise filter
   - Alexa: success criteria per phase, staleness detection, rollback procedures, cross-harness coordination, performance benchmarking
   - Gemini: macro/micro framing, strict sequence (don't context switch)
   - Amara: aggregator-not-replacement, flow metrics, unknown/unavailable per-source states, modular collectN() functions, persisted snapshot at .state/<layer>/last.json, --since/--write-state flags

Aaron's calibration in same packet on time-estimation: 'you can't tell time without something like the previous state files you get how long thing took wrong all the time.' My 'X minutes' estimates throughout session are unanchored. Same persisted-snapshot mechanism that enables deltas would also anchor real durations. Filing as separate substrate target for next tick (time-estimation requires external timestamps, not internal feel).

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

* fix(B-0159): --since placement + output-contract reconciliation (Codex P2 + Copilot P1)

Two real findings on PR #1173:

1. Codex P2: `git log --since="..."` after `--` pathspec doesn't filter
   per git-log man page (options must precede pathspecs). Reordered
   to `git log --oneline --diff-filter=A --since="<ts>" -- docs/backlog/`.

2. Codex P2 + Copilot P1 (dup): output-format contradiction —
   row described two separate stdout passes (raw-then-interpretation)
   AND single JSON with `summary` field. Reconciled per Deepseek's
   single-JSON design: `summary` object IS the interpretation layer
   alongside raw arrays in one JSON document, one invocation.
   Mismatch between summary and underlying arrays is the bug class.
   Supersedes the two-pass framing earlier in the row.

Two earlier dangling-pointer Copilot threads on this PR are now
satisfied by main since #1171 landed
(docs/research/2026-05-01-claudeai-backlog-driven-dual-pm-loop-with-refresh-discipline.md
+ memory/feedback_refresh_before_decide_invariant_two_layer_print_dx_claudeai_2026_05_01.md
both exist on main).

---------

Co-authored-by: Claude Opus 4.7 <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