Skip to content

chore(skills): /be §5 syncs master before CI — kill the 'merge latest master' order - #1756

Merged
srid merged 1 commit into
masterfrom
chore/self-improve-e401a1d9-2fc5-4cef-a4ba-185238ab9050
Jul 10, 2026
Merged

chore(skills): /be §5 syncs master before CI — kill the 'merge latest master' order#1756
srid merged 1 commit into
masterfrom
chore/self-improve-e401a1d9-2fc5-4cef-a4ba-185238ab9050

Conversation

@srid

@srid srid commented Jul 10, 2026

Copy link
Copy Markdown
Member

What

/be §5 (Ship) now syncs master before kicking off CI: fetch origin and merge origin/<default> into the branch so the pipeline — and the final HEAD the 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 /be session e401a1d9-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:

"Merge latest master to our PR before CI"

This is not a one-off. The llm-autonomy corpus audit already logs it under ci-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

Edit Source of the lesson Verification
agents/.apm/skills/be/SKILL.md §5 — bold "First, sync master" preamble before the CI/evidence list; fetch+merge origin/<default>, skip only when already an ancestor, wait out an in-flight gauntlet commit before merging Human turn "Merge latest master to our PR before CI" in the mined session (raw line 762); llm-autonomy.mdx fix #3 + "removes the 7+ 'merge latest master' orders" Regenerated via just ai::apm; landed in .claude/skills/be/ and .agents/skills/be/ (verified by grep); just check green
docs/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 /ci half stays open Keep the corpus audit honest — a stale note is itself a flagged defect just atlas::build + just atlas::check-sync → "dist is idempotent"; dist rebuilt

Notes for the reviewer

  • Scope kept tight. just ai::apm on this box also produced incidental apm-CLI version-bump churn (0.24.0 → 0.24.1: timestamps, Build IDs, an mcp_config_provenance block, a reordered .codex block) across apm.lock.yaml, .codex/config.toml, and every AGENTS.md. No gate (local just check or 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 two be/SKILL.md hash updates that match the new content.
  • Honors the design philosophy: bakes in a required action and crashes loud on a real conflict (resolve now, never defer) rather than adding a fallback; reuses the existing git fetch origin mechanism from §2; no new knob.

🤖 Generated with Claude Code

… 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
srid marked this pull request as ready for review July 10, 2026 23:07
@srid
srid merged commit ebdb9a7 into master Jul 10, 2026
8 checks passed
@srid
srid deleted the chore/self-improve-e401a1d9-2fc5-4cef-a4ba-185238ab9050 branch 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)
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.

Rust: use 2-space indentation

1 participant