Skip to content

Promote 2026-09-29 inbox notes: exec.sh refusal rule, UI fix rounds, transcript usage, autocompact advisory - #323

Closed
MendixMau wants to merge 3 commits into
masterfrom
learn/inbox-promotions-2026-10-14
Closed

MendixMau wants to merge 3 commits into
masterfrom
learn/inbox-promotions-2026-10-14

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Triage of the 2026-09-29 field-comparison inbox notes into on-demand skills. Baseline is unchanged at 79,997 words (render-routing.sh --check, before and after). Nothing new went into a baseline file. ui-loop.md and learned-css-that-never-applied.md are both baseline, so the #170 text went to the on-demand learned-page-patterns.md.

#69: "always exec.sh" (Refs #69)

Problem: agents hitting an exec.sh guard had no stated move, and the predictable one is FORCE_EXEC=1. The MCP path's recording status was undecided.
Fix: a new section in skills/iterative-build-loop.md (on-demand):

  • Every model write goes through exec.sh.
  • A refusal table: commit (--commit-first), wait (exec lock), or stop and report (Studio Pro holds the model; gate cannot run → doctor; ALLOW_UNVERIFIED only on the person's say).
  • Never FORCE_EXEC on the agent's own initiative, with the failure example (silent loss of MCP work on auto-restore).
  • MCP writes stay allowed and are accepted as unrecorded. Their record is an MCP: commit.
  • Phase-close denominator: model commits = exec rows + MCP: commits.

The mdl stub gets this only through routing: the trigger is now "…, or an exec.sh guard just refused a write". Stubs were re-rendered.
Verified against project-bin/exec.sh: the uncommitted and --commit-first refusals log a 🚫 row; the Studio Pro and lock refusals only print. The text says this.
Left open (why Refs): decision 4, which projects get --upgrade-bin exec.sh. That is a sync/rollout call, not skill text. Decision 3 is already answered by #304's mxbuild auto-download plus refuse.

#170: UI fix rounds, N1–N4 (Refs #170)

Fix: skills/learned-page-patterns.md → "UI fix rounds" covers:

  • the round order: SCSS first; apply directly via exec.sh with no scratch pre-apply; re-look only changed pages, N of N;
  • a pre-apply table for N1 (page-column on the layout root), N2 (.d-none losing to a display class), N3 (DG2 autoFit at 32 px) and N4 (pointer to the existing focus-ring section);
  • an M-of-M denominator.

The "halves calls" figure is labelled a hypothesis.
Left open: N1–N3 as a mechanical check in project-bin/check-page-shell.sh. That needs captured golden page MDL/SCSS, and none was available.

#171: batched gate and usage measurement (Refs #171)

Fix:

  • The build loop states what the gate already saves: the stamp skips the baseline mxbuild, and the lock refuses a second apply (it does not queue); re-run after the first finishes.
  • It also says there is no batched-gate mode, so do not imitate one with SKIP_*, FORCE_EXEC or raw exec.
  • New skills/measured-claims.md §7: read each message's last usage record. Re-measured on real Claude Code 2.1.296 transcripts:
    • the main loop had 941 messages with 0 disagreeing, so it is exact;
    • sub-agent first-record output was up to 7x low (1,151 vs 8,241).

Proposed, not done (owned elsewhere):

  • a batched-gate mode in exec.sh;
  • bin/token-burn.sh keeps the FIRST record per message.id (it skips ids already seen), so it undercounts sub-agent output. Fix: keep the last record's usage per id.

#173: save-then-check and MCP asks (Closes #173)

Fix:

  • A save-then-check subsection in the build loop (failure example: 229 errors hidden by a stale disk copy).
  • skills/upstream-feedback.md gets a third destination, the Studio Pro MCP server's owners: draft locally, never file in either repo. It carries the asks with their evidence rows and a "done when" bound.
  • The per-page visual check already existed (build loop step 8 / ui-loop.md).

#166: context diet, measured (Refs #166)

Measured with chars/4 on this branch, lead role, baseline skills only. CLAUDE.md and CLAUDE.local.md are not included.

Stage Full runbook read Runbook as §1b + own stage section
0 ~43k ~22k
1 ~52k ~30k
2 ~55k ~32k
3 ~55k ~32k
4 ~55k ~32k

The runbook alone is 15,216 words (~24.7k tokens). The ≤25k target is not met for stages 1–4 even with the slice. No change in this PR; a spine split is still needed.

#167: autocompact advisory (Refs #167)

Fix: bin/init-project.sh prints:

  • a WARNING when CLAUDE_CODE_AUTO_COMPACT_WINDOW, or an autoCompactWindow number in the project or user settings.json, is above 250k;
  • an "ok" line when it is at or below 250k;
  • otherwise a /autocompact 250k recommendation.

It writes nothing and never fails the scaffold. An unparseable value is ignored. The setting names were checked against the installed Claude Code 2.1.296 binary, and the per-model settings shape matches a real ~/.claude/settings.json.
Left open: lean per-role payloads, a bundle cap, and per-role context in the time log.

Inbox

  • 2026-09-29-mcp-build-observations.md: deleted, fully promoted.
  • ui-loop-efficiency, parallel-build-hygiene, subagent-context-cost: trimmed to what stays open.
  • context-diet-early-stages: untouched, since nothing from it was promoted.

Checks run

  • New fixture tests/wave2/test-init-autocompact.sh bin/init-project.sh: 15/15 pass; 4 fail on master's init-project.sh.
  • Scoped fixtures for changed files:
    • test-bug09-13.sh (iterative-build-loop): 22/0
    • test-docs-numbering.sh: 16/0
    • test-routing-tier.sh: 12/0
    • test-baseline-pack.sh: 16/0
    • test-render-routing.sh: 5/0. The first run reported 1 FAIL that did not reproduce on rerun, on this branch or on master.
  • check-scripts, check-portability, check-no-private-citations, render-routing --check, the leak guard (no denylist) and check-pr-discipline origin/master: all clean.
  • Banned-word grep of added lines: 0 hits.

Field run

The init advisory was run against four scratch scaffolds (no setting, env 1M, settings 250000, settings 1000000), and each printed the expected line. A field run on a real project's scaffold is still owed. The skill text has no instrument to field-run.

Review

Independent review: MERGE-AFTER-SMALL-FIX; fix round landed; confirmation round: MERGE-AFTER-SMALL-FIX (kept-write wording, PARTIAL coverage, print-only list, this body) — fixes applied verbatim as specified.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code


Generated by Claude Code

…transcript usage, autocompact advisory

- skills/iterative-build-loop.md: every model write via exec.sh; on a guard refusal commit
  (--commit-first), wait (lock) or stop — never FORCE_EXEC on own initiative; MCP writes
  accepted as unrecorded and recorded by an "MCP:" commit; phase-close count (model commits =
  exec rows + MCP: commits); save-then-check; no batched-gate mode, do not imitate one (#69,
  #171, #173).
- skills/upstream-feedback.md: Studio Pro MCP server asks as a third destination, with the
  evidence rows from the field comparison (#173).
- skills/learned-page-patterns.md: UI fix rounds — SCSS first, apply directly, re-look only
  changed pages; N1–N4 pre-apply checks (#170).
- skills/measured-claims.md §7: read each message's LAST usage record; re-measured on Claude
  Code 2.1.296 transcripts (sub-agents up to 7x low on the first record; main loop exact) (#171).
- bin/init-project.sh: auto-compact advisory, writes nothing, never fails (#167); fixture
  tests/wave2/test-init-autocompact.sh (9 checks, 4 fail on master). Field run: scaffolded four
  scratch projects with no setting, env 1M, settings 250000 and settings 1000000.
- Routing triggers for three on-demand rows extended so the refusal, UI round and token-count
  cases reach the stubs; baseline unchanged at 79,997 words.
- contrib/inbox: mcp-build-observations deleted (fully promoted); ui-loop-efficiency,
  parallel-build-hygiene, subagent-context-cost trimmed to what stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…, dropped MCP asks, stricter autocompact advisory

- iterative-build-loop: phase-close check is coverage (applied exec row, --commit-first commit,
  or MCP: commit), N of N, not an equality; pre-exec step 2 commits as "MCP: <what changed>";
  the exec lock refuses (no queue); refusal table gains PRE-EXISTING and "any other refusal:
  read the printed remedy"; the rows each refusal writes are named.
- learned-page-patterns + inbox: the lock refuses, it does not serialise/queue.
- upstream-feedback: the two dropped MCP-build items recorded with why.
- routing: the exec trigger leads with "An exec.sh guard refused a write (not a permission
  prompt)"; stubs re-rendered; baseline unchanged at 79,997 words.
- init-project advisory: reads env AND every autoCompactWindow in project and user settings,
  warns if any is above 250k; string values ("1M") parsed; unreadable values printed as
  "unparseable: <v>" instead of "none set"; values over 12 digits never reach arithmetic.
  Fixture grows to 15 checks (all pass).
- measured-claims §7: notes token-burn.sh keeps the first record today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…ase-close text

Confirmation review of #323: "the change is not in the model" was false for
LINT ROSE/BLIND and PARTIAL (the write is kept) and could lead an agent to
re-apply a non-idempotent script; PARTIAL rows now count as coverage and are
finished, not re-run; the print-only list is exact. Wording as the reviewer specified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau pushed a commit that referenced this pull request Oct 13, 2026
…sured claims, upstream feedback, init auto-compact advisory (closes #173; refs #69 #166 #167 #170 #171)

Review: MERGE (review + fix round + confirmation; last wording fixes applied verbatim as specified) — no baseline words; init advisory never fails the scaffold.
MendixMau added a commit that referenced this pull request Oct 14, 2026
)

Every constituent PR was reviewed by a fresh agent that did not write it (CLAUDE.md "Merging a PR"); only MERGE verdicts joined. CI green on each constituent head and on this head (40814fc); full suites run on the branch.

Review lines (per merged PR):
- #315 context trim — MERGE; 360/385 removed lines found verbatim in their new homes, rest read by hand; baseline 79,997 -> 76,259.
- #316 independent-review + word-budget rules — MERGE-AFTER-FIX (3 rounds), fixes applied as specified.
- #318 page-fidelity displayed text — MERGE after fix round + confirmation.
- #317 interaction-model skill (#291 part 1) — MERGE after fix round + confirmation; no client names leaked.
- #321 PROOF-OF-LOOK per section; final-look not due before derived Stage 6 — MERGE after fix round + confirmation.
- #307 graph-sweep guard; per-BRD conformance ledgers — MERGE after two fix rounds + confirmation.
- #325 extraction-quality section; token-burn fixes — MERGE after fix round + confirmation.
- #310 e2e OQL by alias, negative-span liveness, APP-DOWN, #302 credential regression fix — MERGE after fix round + 3 confirmations.
- #323 inbox promotions — MERGE after fix round + confirmation.
- #308 lint gate BLIND on reverted stock rules — MERGE (FIRST-SEEN reverted) after two fix rounds + confirmation.
- #328 pipefail + grep -q flake — MERGE; 0/30 flakes vs 15/100 on master. Follow-up: run-all resolves bin/lib/ subjects (reviewed, MERGE).
- #319 test-stack-up command-line ownership proof — MERGE after fix round + 2 confirmations.
- #327 change-intake core + on-demand detail; CRLF-safe change log — MERGE after fix round + confirmation.
- #320 follow-ups to #290/#292; Dispatching split out — MERGE after fix round + confirmation.
- #326 status delivery rounds (existing-app mode) — MERGE after fix round + confirmation.
- #312 lint batch 4: SEC014, toolkit CONV009 — MERGE after review + 2 fix rounds + confirmation; field run on mxcli 0.26.
- #324 exec.sh change classes, shared stale-lock takeover, SEC014 note echo — MERGE (joint review); follow-up owed for a takeover race after a mid-takeover crash.
- #322 MxTest after-startup guard, mxcli-run pid check — MERGE (joint review).
- #314 doctor property-set exit code; sync announces its bound — MERGE (joint review).
- #330 review follow-ups (exit 4/5 docs, pipefail, NUL strip) — MERGE-AFTER-FIX, fixes applied; takeover re-check dropped.

Field runs are still owed for most instruments in this batch (stated in each PR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau

Copy link
Copy Markdown
Owner Author

Landed on master as part of the integration squash #329 (commit 31e90ae), after independent review — its Review: line is in that commit message. Closing as superseded.


Generated by Claude Code

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.

[idea] Build loop: visual check per page during the build + state save-then-check explicitly; route MCP-owner asks upstream

2 participants