chore(skills): /be §5 syncs master before CI — kill the 'merge latest master' order - #1756
Merged
srid merged 1 commit intoJul 10, 2026
Merged
Conversation
… master' order Provenance: mined from /be session e401a1d9-2fc5-4cef-a4ba-185238ab9050, where the human had to inject 'Merge latest master to our PR before CI' mid-run. The llm-autonomy corpus audit already logs this as fix #3 (master-sync at the head of §5) with 7+ prior occurrences.
srid
marked this pull request as ready for review
July 10, 2026 23:07
srid
added a commit
that referenced
this pull request
Jul 25, 2026
A `/self-improve` pass over session `159b2ddc` — the run that produced #1982 (PRT1, per-terminal port detection). One commit, five frictions, each turned from something a human had to say into something the skill-set says first. The dominant finding is embarrassing and worth stating plainly: **that run shipped four separate assertions that could not fail.** Not four flaky tests — four green lights wired to nothing. Three were caught mid-review only because a peer reviewer re-derived the subject from the code, and the fourth escaped every local run and surfaced in CI 25 seconds into a scenario as *"the Ports section showed `[]`"*, which read like a broken product sensor and was in fact a listener that never started. The run's own round-3 commit message says it out loud: *"Three vacuous tests of mine have now been caught in this review, all the same shape — an assertion whose subject could not vary."* Worse, the **fix** for the fourth was itself vacuous on the first attempt. The guard waited for a marker in the terminal buffer — but the shell *echoes* what you type, so the marker was in the buffer before the process ran, and the wait passed happily against `/nonexistent/node`. Only deliberately breaking the listener and watching the guard stay green exposed it. That is the general lesson this PR bakes in: **a guard you never watched fail is not a guard.** ## The evidence ledger | Edit | Why it survived the durability bar | Evidence from this session | | --- | --- | --- | | `.agency/code-police.md` → new rule **`no-vacuous-assertion`** | 4 hits in one PR, and the corpus already names the class (`repro-or-test-inadequate`, n=19, critical, in `llm-autonomy.mdx`) | The four shapes, verbatim: an unreachable `?? []` default; a fake `targets()` returning the same mutable array so a mid-pass mutation rewrote what the read captured; a timer count read *after* settling plus a `scans` counter with no producer; and an `opts.scan === undefined && !supported()` exemption that meant attaching a counter **bypassed the guard under test**. Commits `fa697a62`, `62103d85`, `b0376b21`, `c4868aff` | | `.apm/instructions/e2e-testing.instructions.md` → arrange-steps prove they worked · runtime-built markers · absolute tool paths · `applyTo` widened to `packages/tests/**` | The PTY-echo trap is a false-green that shipped and cost a CI cycle; the `applyTo` glob was simply wrong (step definitions live in `step_definitions/`, not `features/`, so the rules never loaded where selectors and steps are written) | `c4868aff`: *"the shell ECHOES what is typed, so a marker spelled literally in the command was already in the buffer before the process ran… the wait passed against `/nonexistent/node`"*. The same commit switched the listener to `process.execPath` — a bare `node` passes on every dev box and can fail only where node lives solely in the dev shell, which presents as a phantom product bug on one host | | `.apm/skills/ci/SKILL.md` → **master-sync precondition** | **Repeat from a prior self-improve run.** `ebdb9a73` (#1756) already landed this in `/be` §5, and the human still had to order it **four** times this session — because CI was driven from a brief and from `/be-review`, so §5 was never the entry point | Queued human turns at 20:37, 22:12, 00:05, 02:28 — *"Merge altest master to opur PR"* and *"merge latest master to our PR"* ×3. `llm-autonomy.mdx` roadmap item #3 marks this "shipped"; it wasn't, for any driver but `/be` | | `.apm/skills/ci/SKILL.md` → **code-scanning in the green gate** | 2 human pointers in one session, at a merge-blocking gate the run was reporting as green | 21:42 *"CodeQL posted 1 new HIGH alert… `js/regex/missing-regexp-anchor`… the merge gate needs CodeQL green"*; 02:32 *"YOu need to fix github pr security comments (codeql)"*. `gh pr checks` does not list CodeQL, so all-green coexisted with an open HIGH. The gate now runs a concrete `gh api code-scanning/alerts` query, verified working against this repo | | `.apm/skills/test/SKILL.md` → re-run the feature-scoped suite after later commits | Repeat of the class `27b5b263` already engineered out for nix-build ("don't leave it for CI to surface"); ~8s vs a whole CI cycle | The ports scenarios were verified at `f199c421`, then `d47e909c` plus four cleanup commits landed in the same files and were pushed — CI was the first thing to exercise the final tree | | `agents/.apm/skills/agent-debate/REVIEW.md` → disposition every finding in one round · dispute from the code | Speed fix with a direct human complaint plus three nudges on the same drag | 23:23 *"Bro why are you not addressing all findings in one?"*, 22:58 *"You stuck?"*, and two Stop-hook nudges — the Codex debate ran 12 rounds fixing one or two findings at a time. The dispute half: the author's F3 dispute argued a blind first pass was unreachable; Codex named three surviving routes, **one of them widened by the author's own earlier fix** | ## Not shipped — observations only - The Ink `alternateScreen` / `useWindowSize` duplicates that `architecture-first-principles` C1 found in PRT0 are a code finding, already fixed on that branch — nothing to teach. - "You have permission to make plan updates" is a post-§0 question, which `/be` §0 already bans and `llm-autonomy.mdx` explicitly forbids answering with *another* prompt. One hit, no edit. - The 33-minute `architecture-first-principles` fan-out (24 agents, 1.28M subagent tokens) and the 37-minute lens workflow are expensive but produced 17 confirmed findings between them. The human asked whether lens-debate needs a workflow at all; that is a design question for its own change, not a session lesson. ## Verification `just ai::apm` regenerated `.claude/` and `.agents/` in this same commit, and the generated copies diff byte-identical against their sources. The `applyTo` widening moved the instruction's placement anchor, so the now-orphaned `packages/tests/features/AGENTS.md` is deleted and `packages/tests/AGENTS.md` takes its place. `just fmt` clean; `just check` green (biome over 1530 files plus the workspace typecheck). Draft on purpose, and **not** on #1982's branch. Skill edits go live when a human merges them. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
/be§5 (Ship) now syncs master before kicking off CI: fetchoriginand mergeorigin/<default>into the branch so the pipeline — and the finalHEADthe human merges — sits on current master, with a caveat baked in against racing a background gauntlet round's per-round commits.Why — a corpus-level recurring intervention, engineered out
Mined from
/besessione401a1d9-2fc5-4cef-a4ba-185238ab9050(the per-host right-panel PR). The run was otherwise fully autonomous through the interview → gauntlet → CI flow. The one genuine human interjection was:This is not a one-off. The
llm-autonomycorpus audit already logs it underci-failure/pr-hygiene/other(branch rot — "merge latest master"), counts 7+ prior occurrences, and had a designed-but-unshipped lever: fix #3, "master-sync at the head of §5." This PR ships that half of #3.Evidence ledger
agents/.apm/skills/be/SKILL.md§5 — bold "First, sync master" preamble before the CI/evidence list; fetch+mergeorigin/<default>, skip only when already an ancestor, wait out an in-flight gauntlet commit before mergingllm-autonomy.mdxfix #3 + "removes the 7+ 'merge latest master' orders"just ai::apm; landed in.claude/skills/be/and.agents/skills/be/(verified by grep);just checkgreendocs/atlas/src/content/atlas/llm-autonomy.mdx— mark the master-sync half of fix #3 shipped (table row + Round-1 milestone); the every-touched-PR/cihalf stays openjust atlas::build+just atlas::check-sync→ "dist is idempotent"; dist rebuiltNotes for the reviewer
just ai::apmon this box also produced incidental apm-CLI version-bump churn (0.24.0 → 0.24.1: timestamps, Build IDs, anmcp_config_provenanceblock, a reordered.codexblock) acrossapm.lock.yaml,.codex/config.toml, and everyAGENTS.md. No gate (localjust checkor any CI lane) enforces apm-generation freshness, and that churn is orthogonal to this skill edit, so it was reverted — the lock carries only the twobe/SKILL.mdhash updates that match the new content.git fetch originmechanism from §2; no new knob.🤖 Generated with Claude Code