Skip to content

Loop-engineering L1 scaffolding + bl-20260717 truth-fix sweep - #21

Open
adithya0597 wants to merge 46 commits into
mainfrom
feat/loop-engineering-v3
Open

Loop-engineering L1 scaffolding + bl-20260717 truth-fix sweep#21
adithya0597 wants to merge 46 commits into
mainfrom
feat/loop-engineering-v3

Conversation

@adithya0597

Copy link
Copy Markdown
Owner

What

Two layers, one branch (rebased onto current main, duplicate neo4j commit dropped):

1. Loop-engineering L1 scaffolding (3 commits, from the original feat/loop-engineering work): LOOP.md, STATE.md, AGENTS.md, loop-budget.md, loop-run-log.md, docs/safety.md, loop-triage skill, loop-verifier agent.

2. bl-20260717 fix sweep (8 commits) — 3 review findings + 22 deep-scan-confirmed issues, every finding adversarially verified before fixing:

  • docs-truth: AGENTS.md build block now runs from repo root (paths verified line-by-line); "no loop has run yet" contradictions reconciled with the single logged run (2026-06-29T15:57:35Z); STATE.md/HANDOFF.md stale git-state claims replaced with durable/anchored wording
  • eval diagnostics: eval_corrective/eval_planner/eval_ocr Neo4j-unreachable messages now interpolate the resolved NEO4J_URI instead of a hardcoded literal
  • env-hardcode: eval_ocr.EMBED_MODEL now mirrors embed.py's BG_EMBED_MODEL resolution (CI's env override no longer probes the wrong model's cache); h3_instr Langfuse host honors LANGFUSE_HOST
  • doc-drift: run_guard.py docstring states the real ALLOWLIST exemption; test_g3.py/golden_v1_draft.py/golden_v1_review.md 6-role claims corrected to the actual 3-role generator
  • loop-control enforcement: kill-switch (loop-pause-all), budget caps (2 runs/day, 100k tokens/day), and mandatory run-log append wired into the loop-triage skill; docs-vs-state invariant + >10 files/third-failed-attempt human gates added to the loop-verifier's REJECT triggers
  • .env.example truth (maintainer-approved edit): port 7688, honest compose-auth comment, dead vars removed, LANGFUSE_HOST/BG_EMBED_MODEL documented; setup_a2.sh pins neo4j-graphrag==1.17.0

Verification

  • Every bead's acceptance independently re-verified (grep/py_compile proofs); deterministic close gate PASS
  • Review: 2 independent codex passes + security pass (0 findings at 8/10 bar) + 3 PIR lenses (RED-TEAM/EXPOSE/REGRESSION), each P1/P2 finding adversarially refuted by a different-method agent; confirmed findings fixed in 2 rounds, codex CONFIRM on the fix diff
  • Regression: CI's *_OK grep gates untouched by rewordings (statically verified); disclosure gate (tools/publish_gate.sh) CLEAN
  • Local runs: py_compile on all touched Python; full graph gates deferred to this PR's CI (that expectation is now stated honestly in STATE.md)

Notes for reviewer

  • HANDOFF.md is a branch working doc — its own header says remove/relocate before merging
  • Known, deliberately-untouched sibling: 01-context/src/serve.py docstring still says "6-role" (file is on the loop-safety denylist; no override requested)
  • Pre-existing open bugs 78o/6mg/dju were explicitly excluded from this sweep's scope

🤖 Generated with Claude Code

https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB

adithya0597 and others added 18 commits July 16, 2026 20:08
…fier, safety, budget)

Make Builder Guild legible to loop-engineering / loop-audit, scoped to its real domain:
- STATE.md       durable loop memory (graph/invariant/eval/CI sections)
- LOOP.md        daily-triage L1 config, human gates, worktrees, MCP, budget
- AGENTS.md      build/verify + invariants + review norms + loop operation
- .claude/skills/loop-triage     signal-only triage skill (writes STATE.md, no code edits)
- .claude/agents/loop-verifier   maker/checker, default REJECT, runs narrowest proof
- docs/safety.md denylist (01-context enforcement, 03-evals calibration), no auto-merge, human gates
- loop-budget.md + loop-run-log.md   cost-observability spine

Operational level: L1 (report-only, no loop has run). loop-audit would score this
high structurally and may even read L3 via its activity heuristic (it scans STATE.md
prose for 'triage'/'last run') — the run log is intentionally empty to keep that honest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Branch working doc: goal, honest L1-pre-run status, next steps (run the loop once;
resolve the .claude merge collision), branch graph. Remove before merging to main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ck paths, logged run, branch v3, PR #13 closed, ci.yml line citations)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
…le diagnostics

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
…Langfuse host (LANGFUSE_HOST); Neo4j diagnostic prints resolved URI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
…WLIST exemption in run_guard self_test, 6 roles -> 3 roles in test_g3 and golden_v1_draft founder sheet

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
… loop-triage; add docs-vs-state + human gates to loop-verifier

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
… pin neo4j-graphrag in setup_a2.sh

- .env.example: NEO4J_URI port 7687->7688 (compose publishes 7688:7687); header now states docker-compose hardcodes NEO4J_AUTH=neo4j/companybrain and does NOT read NEO4J_PASSWORD; NEO4J_USER removed (unread by code, noted in comment); PAPERCLIP_* block removed (etl_live.py does not exist in repo)
- 01-context/setup_a2.sh: pin neo4j-graphrag==1.17.0 matching requirements.txt:7

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
…nvalidating snapshots), schema-consistent run-log abort entries + LOOP.md:38 cite, LANGFUSE_HOST/BG_EMBED_MODEL in .env.example, 3-role fix in golden_v1_review.md

Addresses confirmed reviewloop/PIR findings CDX-1..4, RT-1, EXPOSE-1, PIR-BR-1 (P1/P2 docs-vs-state family) + folded P3s (CDX-3/5/6/7/8, RT-2, EXPOSE-2, PIR-BR-2/3).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
…format block (SKILL.md abort/budget entries now schema-consistent)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
…state, DA review verdict + 5 wiring items, live tracker delta

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
…er per loop

Move root-scattered loop files into a per-loop structure mirroring .claude/skills/:
loops/daily-triage/{LOOP,STATE,run-log,budget}.md + shared loops/safety.md +
loops/README.md (per-loop contract, add-a-loop recipe, loop-audit heuristic note).
All cross-references updated (AGENTS.md, HANDOFF.md, loop-triage skill,
loop-verifier agent); line-number cites (LOOP.md:38, budget.md:21, safety.md:64)
verified stable. Skills/agents stay under .claude/ (harness discovery).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… on relocated loops/ structure

STATE.md rewritten from live signals (CI run 29773277829 smoke+graph green on
2546e25; main 29653108642 green; CALIBRATED all-False verified at
01-context/src/abstain.py:26; 0 high-priority, 4 watch items). Run-log entry
appended per the mandatory pre-run/append protocol (kill switch clear, budget
0/2 runs today).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tatus

LOOP.md maturity lines: one run -> two manual runs, no scheduler yet.
HANDOFF.md: status/next-steps updated (loop re-run DONE, 9 wiring beads
CREATED not started), tracker delta refreshed to 2026-07-20 live counts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ts, loops/ restructure, PR #22 scheduler+kill-switch

Append session block on top; refresh Next Steps 0 (merge #22 -> bead 006 ops
proof -> bgo egress decision -> ye0 settings-fix), Key Files (scheduler on
#22 branch + local audits), Tracker Delta (opened 13 / closed 3 / 23 open of
145), Status + Branch graph verified live.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n + main ruleset payload (ye0+hot)

- pr-classified: deterministic t0/t1/t2 from changed files, always-runs required check
- t2-highlight founder digest comment, t0 auto-merge-eligible note
- publish-gate: reset --soft to base -> tools/publish_gate.sh on exact PR surface
- rulesets/loop-merge-gates.json: main-only, 4 required checks, approvals 0, no bypass

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ypass (codex P1-B)

for f in $FILES word-split on any space in a path -> file skipped -> secret exited CLEAN
(proven under bash 3.2, hit CI twin AND local pre-push hook). Iterate the staged/tree
file lists NUL-delimited via process substitution so the scan can't be evaded by a
filename containing whitespace. Also soften publish-gate.yml wording: CI runs the
generic (no-overlay) half of the scan — the personal overlay lives outside the repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

Founder highlights — this PR touches t2 (highest-risk) surface.

Files that triggered t2:

  • .claude/agents/loop-verifier.md
  • .claude/skills/loop-triage/SKILL.md
  • .claude/skills/pre-ship-adversarial-review/SKILL.md
  • .env.example
  • .github/rulesets/loop-merge-gates.json
  • .github/workflows/classify.yml
  • .github/workflows/loop-heartbeat.yml
  • .github/workflows/loop-triage.yml
  • .github/workflows/publish-gate.yml
  • loops/safety.md
  • tools/publish_gate.sh

adithya0597 and others added 11 commits July 20, 2026 18:15
Watches loops/daily-triage/run-log.md (durable evidence a scheduled workflow can't
get about its own non-execution); raises ONE issue when newest run_id is older than
cadence+grace (30h), auto-closes on recovery. Honors LOOP_PAUSE_ALL (missed runs are
expected when paused). Pure-bash SYNC-REGION kept byte-identical to the local test;
GNU date isolated to the runner. Issue lookup by exact jq marker (no search tokenizer).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
P1 (silent): a future-dated run_id (typo/skew) became lexical-max, went age-negative,
read not-stale AND auto-closed live alerts. P2a: month-13/hour-99 stamps crashed date -d
under set -e. Both now route through sanitize_epoch (reject future) + a guarded parse
into the empty->STALE fail-safe. P2b: MAX 30->33h so an isolated jittery miss is tolerated
and sustained death fires (~54h) — cadence comment corrected. P3: concurrency group
serializes cron+dispatch so they can't both create the issue. Test extended to prove all
(15/15 incl codex's exact triggers); test now mirrors the guard glue instead of masking it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dex confirm P1 residual)

Round-1 narrowed the future-stamp hole but left a 34h window: a near-future typo next to
a genuinely-old entry still won lexical-max and read FRESH (codex counterexample: 54h-dead
loop + now+3599s typo -> no alert, closed live alert). Root cause was the structure
'pick max, then reject if too-future'. Restructured to newest_valid_run_id(max_iso): filter
stamps > now+5min OUT (awk lexical) BEFORE sort|tail, so the newest GENUINE past stamp always
wins and future noise can never be the freshness basis. Dropped sanitize_epoch (subsumed).
Proven 13/13 incl codex's exact counterexample with real (non-subshell) NEWEST assertions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…fier REJECT on 223b285)

Independent loop-verifier (bead btj) REJECTed 223b285 on docs-vs-state:
- STATE.md cited CodeQL run 29653108642 as main's 'smoke+graph green' evidence; CodeQL is a
  security scan, not the ci.yml gate. Real main ci run on sha 3096310 = 29452819406 (2026-07-15),
  verified via gh run view (workflowName=CodeQL vs ci) + gh run list --workflow=ci.yml.
- STATE.md #16 label was StatusValue/Decision; issue #16 title is StatusValue and Document.
Maker/checker split working end-to-end on a real diff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…PROVE) + run-log reference

verifier-log.md: audit trail of the maker/checker cycle on real diff 223b285 (loop-verifier
caught a CodeQL-vs-ci citation surface-mismatch, maker fixed d500757, re-verified APPROVE).
run-log.md: prose reference (NOT a JSON run entry, so the heartbeat freshness signal is unaffected).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… oy7 heartbeat, btj verifier) + gitignore local lessons

3 sections shipped to v3 (702a11e), each review caught a real bug (P1-B secret-scan bypass,
oy7 future-stamp silent-miss, btj STATE.md CodeQL-vs-ci citation). Next Steps/Status/Tracker/
Branch-graph refreshed to verified end-state. Founder-gated: 8pf (ruleset), 006 (secret), bgo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…buted writes (lbd)

STATE.md had no concurrency guard (overlapping run / human edit silently clobbers) and no
write attribution. state_guard.py (pure stdlib): hash (precondition token) / precheck (exit 1
STALE = reject a write on a stale read) / stamp (append-only who/when/field/post-hash). Wired
as a MANDATORY check-point in the loop-triage skill (hash->precheck->write->stamp; exit-1=ABORT,
do-not-clobber) + LOOP.md note. Self-test STATE_GUARD_OK proves stale-hash rejection + append-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…heck (codex P2)

codex CONDITIONAL-PASS: the lock was correct but the attribution half was unenforced prose
(stamp had no gate -> a crash after write, before stamp, left a permanent undetectable
un-attributed mutation, repeating the 2026-07-17 anti-pattern). Added `verify` subcommand
(exit 1 if STATE.md hash != last stamped post_hash) wired as loop-triage pre-run check 4, so a
skipped stamp is DETECTED next run. Fixed cmd_stamp uncaught OSError (P2-3). Reworded the
"check not prose" over-claim to the honest ceiling (agent instruction within a run, detectable
across runs). Self-test + CLI edge cases (bootstrap/attributed/unattributed/malformed/missing) all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…vs committed intent (icg)

A no-bypass ruleset protects merges, not its own on/off switch (DA teardown + codex rev-security P3).
settings_sentinel.py: check (pure, gh-free: live snapshot vs committed minimum-secure posture in
settings-expected.json; DRIFT exit 1) + fetch-live (best-effort gh dump, fail-safe {gh:unavailable}
sentinel, never crashes the loop). Wired into loop-triage as a report-path step: drift -> High-Priority
human-gate (never auto-fix a live setting); gh-down -> Watch. Self-test SENTINEL_OK (8 drift classes incl
the theatrical-1-approval trap + gh-down-not-false-alarm). Live demo founder-gated (needs 8pf ruleset).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…les for main (codex icg)

codex proved 3 silent missed-tamper bypasses (loaded the module + ran mutations): (1) delete the
live pull_request rule -> approvals defaults to 0 == intent -> read match; (2) delete deletion/
non_fast_forward rules -> unwatched -> match; (3) retarget conditions.ref_name off main -> ruleset
active but applies to nothing -> match (neutralizes the whole gate). Fix per codex's advice —
compare EFFECTIVE rules for main, not hand-picked fields: normalize now captures rule_types + target
+ ref_name_include; intent adds required_rule_types + target_includes; _check asserts required rule
TYPES present AND the ruleset still targets main. Also P2 (precise 'HTTP 404' not substring '404')
+ P3 (per_page=100 so the ruleset can't fall off page 1). Self-test 13 cases incl i/j/k/k2; end-to-end
verified through the REAL ruleset shape (normalize->check aligned, retarget caught).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…entinel (bg security review)

A background security review flagged a parser/validator differential; verified real:
(1) _index_by_name was last-wins — an attacker could disable the real loop-merge-gates ruleset and
    add a passing same-named duplicate (GitHub applies ALL rulesets; the check saw only the last) ->
    proven MATCH before. Now validate EVERY same-named ruleset (_rulesets_named), so a disabled/weakened
    duplicate is caught.
(2) _normalize_ruleset read ref_name.include but not exclude — include=[main]+exclude=[main] targets main
    then carves it out, passing the check while protecting nothing. Now capture + flag a non-empty exclude.
Self-test +2 cases (l dup-shadow, m exclude), 15 total; end-to-end re-verified (differential closed, committed ruleset still MEETS intent).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
adithya0597 and others added 3 commits July 20, 2026 22:35
…ntinel, d0j can't-fix)

lbd (state_guard optimistic lock + verify gate), icg (settings-tamper sentinel; codex 3 P1
false-negatives + a bg-review parser-validator differential all fixed), d0j (can't-fix: reddit
login-walls all unauthenticated routes; honest-route false-passed -> reverted). v3 tip b5c21e0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…inal state

Correct d0j from 'can't-fix reverted' to FIXED: reddit threads resolve via oembed (positive signal),
fabricated->404->dead, self-deleted->tombstone->dead, mod-removed->RESOLVABLE (documented limitation),
codex PASS. Shared ~/Projects/.claude @ 93e0fd5 (not this branch). All 7 epic build beads done; only
006/bgo remain (founder-gated). Branch-graph tip b5c21e0->b836230, tracker delta + next-steps refreshed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ecommendation

006 is NOT a standalone secret-set: scheduled workflows fire only from the default branch, so the loop
can't go live until loop-triage.yml reaches main (merge PR#22->v3 -> unblock PR#21 via 8pf/admin-override
-> merge PR#21->main -> set secret -> cron fires -> 006 proofs). Next Steps 0 rewritten as an ordered
go-live runbook. bgo: grounded recommendation (Anthropic spend cap + accept-residual; harden-runner
optional, free-tier DoH bypass). Tracker: 19 open/129 closed, 7/9 epic beads done.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
adithya0597 added a commit that referenced this pull request Jul 21, 2026
…ublish gate, guard, env)

Cherry-set of the pure bug-fix layer from feat/loop-engineering-v3, split out
per adversarial review so fixes are not bundled with loop automation infra:

- tools/publish_gate.sh: NUL-delimited staged-file loop — the previous
  `for f in $FILES` word-split let a secret in a spaced filename exit CLEAN
  (P1; functionally re-proven: spaced-filename ghp_ token now BLOCKS exit 1)
- 03-evals/src/eval_{corrective,ocr,planner}.py: diagnostics interpolate the
  resolved Neo4j URI instead of hardcoded bolt://localhost:7688
- 03-evals/{golden_v1_review.md,src/{golden_v1_draft,test_g3,h3_instr}.py}:
  stale claims corrected (6 roles -> 3 roles; docstring drift)
- tools/run_guard.py: self_test docstring matches ALLOWLIST-exemption behavior
  (GUARD_SELFTEST_OK)
- 01-context/setup_a2.sh: pin neo4j-graphrag
- .env.example: correct Neo4j/paperclip facts; add LANGFUSE_HOST/BG_EMBED_MODEL
- .gitignore: ignore .claude/lessons.md (local working notes)

Loop scheduler/heartbeat/rulesets stay on the feature branch (PR #21/#22).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… infra parked, OAuth rewire, deadlock warning

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
adithya0597 added a commit that referenced this pull request Jul 21, 2026
…ublish gate, guard, env) (#23)

Cherry-set of the pure bug-fix layer from feat/loop-engineering-v3, split out
per adversarial review so fixes are not bundled with loop automation infra:

- tools/publish_gate.sh: NUL-delimited staged-file loop — the previous
  `for f in $FILES` word-split let a secret in a spaced filename exit CLEAN
  (P1; functionally re-proven: spaced-filename ghp_ token now BLOCKS exit 1)
- 03-evals/src/eval_{corrective,ocr,planner}.py: diagnostics interpolate the
  resolved Neo4j URI instead of hardcoded bolt://localhost:7688
- 03-evals/{golden_v1_review.md,src/{golden_v1_draft,test_g3,h3_instr}.py}:
  stale claims corrected (6 roles -> 3 roles; docstring drift)
- tools/run_guard.py: self_test docstring matches ALLOWLIST-exemption behavior
  (GUARD_SELFTEST_OK)
- 01-context/setup_a2.sh: pin neo4j-graphrag
- .env.example: correct Neo4j/paperclip facts; add LANGFUSE_HOST/BG_EMBED_MODEL
- .gitignore: ignore .claude/lessons.md (local working notes)

Loop scheduler/heartbeat/rulesets stay on the feature branch (PR #21/#22).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
adithya0597 and others added 13 commits July 21, 2026 16:09
…fied live

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…icts on faf9bfb .env.example (codex-verified); record option scores

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e queue

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…j) (#22)

* feat(loops): external scheduler + scheduler-side kill switch for daily-triage (phy, 8cj)

Workflow .github/workflows/loop-triage.yml: daily cron 09:17 UTC + workflow_dispatch,
caps in-file (timeout-minutes 15 + --max-turns 25), deterministic report-only guard
step enforcing the STATE.md/run-log.md surface, minimal contents:write permissions.
Three-layer kill switch documented in LOOP.md, budget.md, safety.md: LOOP_PAUSE_ALL
variable (scheduler pause) / gh workflow disable (hard-off) / STATE.md flag (in-band).

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

* harden(loop-triage): two-job separation + review fixes (codex x3 + red-team)

Security review (2 codex passes + 1 confirm + RED-TEAM lens) drove a re-architecture:
- Two separated jobs (gh-aw safe-outputs pattern): agent runs contents:read + no push
  token, emits only STATE.md/run-log.md as an artifact; a fresh-checkout commit job the
  agent never touched holds the write token and transplants exactly those two paths.
  Kills the whole 'untrusted agent contaminates a later privileged step' class
  ($GITHUB_ENV poisoning, planted git hooks, push-before-guard, diff-HEAD-misses-commit).
- persist-credentials:false; all 4 actions SHA-pinned; ubuntu-24.04; input-discipline
  prompt (public text AND prior STATE.md prose = untrusted data); doc precision on
  max-turns!=spend and LOOP_PAUSE_ALL fail-open semantics.
Accepted residual (bead builder-guild-bgo): API-key egress (bounded: credit-burn only).

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

* feat(006): auth loop-triage via CLAUDE_CODE_OAUTH_TOKEN (subscription, $0 marginal)

The scheduled loop-triage job needs a stored credential to run Claude in
headless CI (no interactive subscription session on a runner). Wire the
claude-code-action to claude_code_oauth_token (from `claude setup-token`)
instead of the metered anthropic_api_key: reuses the Claude Code subscription
at $0 marginal, so there is no per-token billing to exfiltrate/cap (bgo moot).

Founder still sets the secret; this only changes which input the workflow reads.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…required check

The pr-classified required check died on a single un-retried gh api call when
GitHub returned a transient 500 (run 88756713877: 'diff temporarily unavailable
due to heavy server load'). The job's contract is to always conclude; retry the
files fetch with 2/4/8/16s backoff before going red. Retry sits outside the
classify_tier SYNC-REGION, so test_classify_tier.sh extraction is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
.claude/agents, .claude/skills, and .claude/settings.json define loop behavior
(loop-verifier's default-REJECT stance, the triage skill's no-code-edits rule,
the Stop hook) but classified as t1 ordinary — a PR flipping the verifier to
default-APPROVE would skip the founder-highlights digest. Same risk class as
.claude/scripts, so same tier.

Verified by extracting the SYNC-REGION and running classify_tier: all tracked
.claude paths now emit t2; loops/daily-triage state files stay t0.

Note: the local scratchpad/hot/test_classify_tier.sh fixture (not in-repo) may
assert t1 for non-script .claude paths and would need its expectation updated.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…gap detector

First loop promoted by the loop-miner pipeline (run bl-20260722-loopminer:
5 sessions/14 days of manual pre-ship review requests, gated on recurrence/
done-check/blast-radius/ROI) and shipped via /routeloop (Claude orchestrates,
codex implements; 2 red passes + EXPOSE lens + blue-team verify; 2 fix rounds;
final confirm PASS 0 findings).

Report-only, manually invoked: detects substantive diffs that reached a
terminal state without a recorded adversarial verdict. Verdicts satisfied ONLY
by structured sources (ledger records, verifier-log) — PR/commit text is
untrusted data; loop-state-only commits excluded (no self-reporting); exact
'PAUSE: loop-pause-all' control-line kill switch per loops/safety.md; run-log
schema matches daily-triage; not yet heartbeat-covered (stated in LOOP.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…gister pre-ship loop

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…/morynt publish + tracker delta

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…us 5 lineup, Conductor binary-refresh finding

No branch work this session. Records host/harness state a successor needs:
- native Claude Code updated to 2.1.220; stale npm-global copy removed
- Claude Opus 5 (released 2026-07-24) verified against platform docs; corrects
  an earlier wrong "no Opus 5" answer that came from a stale model catalog
- Conductor app self-updates but does not refresh its bundled agent binary,
  which is why /model lacks Opus 5; manual restart path + verification command
- two harness limits: sandboxed ps hides processes; detached nohup scripts do
  not survive the tool call
- Tracker Delta: 0 opened / 0 closed; live 21 open of 169 total

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BR7bBRtUfrBEf59V2UyzNB
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.

1 participant