Commit Graph
395 Commits
Author SHA1 Message Date
bchanot c3507ea447 docs(doctrine): main loop calls the Fable advisor; Fable prose moves to opus
Global line and effort-shift Advisor section: the main loop calls the advisor when a stronger model is needed, sub-agents do not, advice waives no gate. Skill-runner, Limits, ask-tier and audit-row prose match BDR-150.
2026-11-17 00:37:53 +01:00
bchanot beebfe2d82 feat(routing): skill-runner pins move from fable to opus
Fable is the advisor (BDR-150): the client-handover skill-runner children and the model-gate dispatch doctrine pin opus. A pinned child's route answer "fixed at spawn" passes the gate; a repo-wide census refuses any fable pin.
2026-11-16 23:55:31 +01:00
bchanot 24b0f35960 feat(model-router): Fable leaves auto-routing, Opus heads best and big
Fable is the advisor now: the best and big tiers default to opus then sonnet, the row dialog drops it, and the ask-before-Fable dialog runs only when an override heads best with fable. Fable stays ranked and hand-pickable.
2026-11-16 20:31:06 +01:00
bchanot b9f2d819b7 fix(tests): memory T18 prints SKIP instead of failing when bun is absent 2026-11-16 00:15:44 +01:00
bchanot e0311f4d4f feat(memory): check --staged refuses a new entry that skips or reuses an ID
A new ## entry must carry the next free ID, replayed in line order the way add allocates it. The rule runs only on a v2 HEAD with entries, so upgrade, first commits and template imports pass.
2026-11-15 21:59:04 +01:00
bchanot 87aecc1212 fix(memory): index fails closed on an unreadable registry
memory_index skipped a non-regular blockers.md and dropped the awk rc, so the digest printed a false '- open: none'. With a kind it now returns 2; without, it skips the bad registry with a stderr line. The digest prints unknown on a malformed row.
2026-11-15 19:35:15 +01:00
bchanot 21ef47fd81 fix(style): wrap 4 lines over 80 columns in register.ts and transcripts.ts 2026-11-15 15:56:40 +01:00
bchanot 0f73d7ee01 fix(settings): deny docker mounts of the host root in 7 spellings
The single legacy row matched no real spelling (bench M5). 28 rows (7 shapes x 4 prefixes, bench-proven with an echo analogue) now deny them; soft_deny covers create, container run and compose up; T41 locks the rows.
2026-11-15 15:22:34 +01:00
bchanot 87b3530b29 fix(tests): mods suite hung in a terminal, CLI under timeout now reads /dev/null 2026-11-14 18:48:41 +01:00
bchanot 692e4a5a24 fix(settings): npm -g left to the auto-mode soft_deny 2026-11-14 18:31:44 +01:00
bchanot 490ad8353d fix(session-start): perl fallback runner kills the command's process group
alarm then exec killed one process: a child holding the captured pipe kept the 2 s bound open. perl now leads its own group, kills it at the deadline and TERMs leftovers; SD19/SD19b assert the bound and that the command ran.
2026-11-14 11:27:15 +01:00
bchanot 9045a60f11 fix(scripts): close the BUGS-FOUND script items, fail closed on bad reads
profile-state.jq sanitizes printed values and shape-checks plugin ids (no forged plugin: line); the digest prints open: none or unknown instead of nothing; push-guard deny_lost checks every pipe stage, T63 split into ask and deny lists; prune-memory mktemp guarded.
2026-11-13 22:59:50 +01:00
bchanot 77041e5360 fix(agents): close the 10 prose BUGS-FOUND items, root quoting and $HOME refusal
Handover: rooted reads, whole-line PROJECT_ROOT read with a one-line
pre-paste rule, BDR status filter. plugin-gate: single-quoted templates,
unsafe roots printed never run, apply check against the git common dir,
$HOME refused (and in profile.sh). Advisor: minimal only from project
signals, no extras token, ctx7 wording, print-only plugin remedy. Packs
vocabulary in onboard/tour; graphify labels match the trap.
2026-11-13 20:43:59 +01:00
bchanot 9f9412aaba fix(memory-feedback): post-fix precision split, 3rd pick retired, bounded transcript cache, strict labels
Precision, triggers and the miss share count only rows after the gate-1
fix merge (d3d5e6c, 2026-11-12T19:53:59Z); their actions wait for 20
post-fix asks, a one-off NEW line marks the sample and the reminder
keeps prompting until then. The 3rd-pick signal is gone. The reader
holds one parsed transcript at a time. labels.tsv rows and state.json
are validated on read. Exact key sets of log records pinned.
2026-11-13 19:47:37 +01:00
bchanot 1f107c3c45 fix(hooks): private code-limits state dir, bounded session start without timeout, pre-commit fails closed
code-limits: mkdir -m 700 without -p as the atomic proof, else one
find test (ours, dir, 700). session-start: one runner, timeout then
gtimeout then perl alarm (exec, no shell). pre-commit (generator +
both copies): a git diff or grep error blocks. memory.sh line rewrap;
claude-stub reads its log path from the env. Tests T16, SD19, PC1-4.
2026-11-13 18:25:33 +01:00
bchanot a43ba1b763 fix(settings): close the awk and key-file deny gaps, doctor names every jq consumer
28 deny rows: awk/gawk/mawk 'system (' spacing, -f programs, getline and
pipe-to-command exec primitives; cat and rtk read on .key, .pem, id_rsa
and id_ed25519 without a dir prefix (plus */rtk twins). All rows locked
in push-guard T63; T62 twins hold. doctor.sh jq message names
code-limits and push-guard.
2026-11-13 16:46:06 +01:00
bchanot 061a7cbe61 docs: pack-census fragment key allowlist (profiles README, CHANGELOG) 2026-11-13 16:23:36 +01:00
bchanot 2fb9a2f4c1 fix(pack-census): fixed-string retired match, fragment top-level key allowlist
grep -qxF on gstack-removed.list; a fragment carrying a top-level key
other than enabledPlugins, deniedMcpServers, disableClaudeAiConnectors
or model is RED. T13-unknown-key.
2026-11-13 16:22:39 +01:00
bchanot 5e7a2679c0 docs: memory.sh legacy reader and upgrade semantics (CHANGELOG, MIGRATION, usage comment) 2026-11-13 14:48:13 +01:00
bchanot d8e62c1420 fix(memory): one lexical status reader, body label beats a stale Index, clean stderr
memory_legacy_status is one fence-aware awk program (selector as a
positional, end derived from the ID prefix, stops at another entry or
## Index; no MEM_LEGACY_RE env read). upgrade computes one effective
status (strict word, else the v1 body label) for flush, Index-stated and
the oracle: a **Statut** : line is written as the dated upgrade status
instead of losing to the Index cell. Control chars become ? on stderr
and in written cells; journal keeps exactly one blank line.
2026-11-13 14:45:15 +01:00
bchanot 9d5530af89 fix(project-rules): physical parent check, emit write guard, extract keeps both copies
_rules_out_path_ok resolves the first existing ancestor with cd -P and
refuses an out that escapes the project; emit goes through it and checks
mkdir and the write; an extract rewrite failure keeps tmp and out and
names both. Callers (onboarder, scaffolder) stop on any rc 2 but exists.
2026-11-13 13:14:24 +01:00
bchanot 6c10d3a220 fix(cc): raise oom_score_adj to 500 inside the session (BLK-044)
sshd's systemd override (OOMScoreAdjust=-1000) is inherited by tmux,
dtach and every claude started via cc, so the OOM killer never picks a
runaway claude; systemd-run --scope rejects the property. The inner bash
raises /proc/self/oom_score_adj to 500 (raise-only) before exec claude.
T7-oom asserts it through the stubbed chain.
2026-11-13 12:40:54 +01:00
bchanot 9c038fd22b chore(hooks): retire the design-toolchain reminder hook
59 fires, 0 Reads of web-building.md (2026-10-31); the path rule and the
CLAUDE.global.md pointer carry design routing. Hook, its test and its
UserPromptSubmit entry removed; doctrine-citers T7c becomes T8i on a
synthetic one-line fixture (quoted label kept whole).
2026-11-13 10:13:04 +01:00
bchanot 248000afb1 chore(tests): drop the SKIP-only guard-bash spec, BLK-022 buried 2026-11-13 00:37:01 +01:00
bchanot 1124758a8b feat(digest): todo lines fall back to the file's first items, +N marker on overflow 2026-11-12 21:55:30 +01:00
bchanot 79f1a3fc2c test(push-guard): forgive the 6 dead deny entries, lock still bites
T41 drops the dead Write lines and requires the working Bash forms. T42
forgives the 2 dead Bash entries main carries until version.txt passes
3.0.0; T42c/T42d/T42e prove the lock, the planned hand edit and the expiry.
2026-11-12 14:27:59 +01:00
bchanot 99f10b2a26 feat(prune-memory): read statuses through one classifier, v1 and v2
reconcile_status_classify generalizes the BLK classifier to a prefix; STEP 1
runs it on decisions and blockers, unreadable statuses are an info-only count.
RED-9 runs the shipped block on v1 and v2 fixtures.
2026-11-12 00:11:03 +01:00
bchanot 9b12b1226c feat(advisor): packs vocabulary, profile set only on a project without profile
The advisor emits tokens (SET / ENABLE / DISABLE); the plugin gate checks
them against closed lists, prints what a set turns off and on, applies
at the git root only, set first. USAGE and onboard follow; plugin-dev gone.
2026-11-11 19:00:14 +01:00
bchanot 80f56ef815 feat(banner): drop plugin-dev, hide the OFF row when every toggle is on
plugin-dev was dropped 2026-07-02 yet the banner still printed it as OFF.
With four toggles the >4 split branches were dead: one printf per row.
2026-11-11 15:33:34 +01:00
bchanot 93a8e19c66 fix(handover): read blocker statuses through the shared reader
STEP 9 parsed blocker statuses by hand from a cwd-relative dir, so §5
could list closed blockers or drop open ones (BLK-032..034 class).
New reconcile_blk_classify (strict v2, single-word v1, never the Index)
rooted on the PACKAGE root; unreadable entries are flagged via a
mandatory SYNTH REPORT MEMORY line relayed to the user.
2026-11-11 02:28:53 +01:00
bchanot 1971b8d0f5 fix(banner): drop stale passive-cost constants and the budget row
The banner, plugin-advisor and status-reporter kept hand-copied token
costs (gstack 2750, ui-ux 400) that the 2026-09-28 prune fixed only in
doctor.sh. The banner budget row and its now-dead detect_plan are gone;
the agents point to make doctor for the measured cost.
2026-11-10 18:00:20 +01:00
bchanot 556d0e6ddf fix(banner): plugin rows follow the effective profile, not user scope
The ✅ row and detect_uiux_pro_max read user-scope settings.json and the
plugin cache, so a dev project showed ui-ux-pro-max on and an audit
project hid pr-review-toolkit. list_on_plugins now resolves the effective
profile (user scope for unmanaged ids); status-reporter and the plugin
advisor read per-project state from it.
2026-11-10 12:39:50 +01:00
bchanot 8c284f76a3 fix(hooks): session digest skips HTML comment blocks in journal.md 2026-11-09 18:21:11 +01:00
bchanot d3943cbce6 chore: drop dead detect-plugins sources, refresh comments left by BDR-125 phases 2026-11-09 18:02:30 +01:00
bchanot abacc0bf17 fix(profiles): code review: merge revert hint, design purpose, deny-set identical test 2026-11-09 16:31:01 +01:00
bchanot 91a32a7a7d docs(profiles): profiles no longer described by connector state 2026-11-09 16:17:26 +01:00
bchanot b80da299c7 chore(profiles): drop the dead higgsfield connector denies and their census rule 2026-11-09 16:14:13 +01:00
bchanot 54bdfebd06 fix(memory): partial-stage check sorts and compares in the C locale
uutils sort collates by locale while uutils comm expects byte order: comm warned and could miss a dropped partial stage. Both now run with LC_ALL=C.
2026-11-08 19:49:26 +01:00
bchanot 9ec5617725 fix(memory-feedback): worksheet prints only a shell-safe repo path 2026-11-08 18:09:14 +01:00
bchanot 027e5b3c21 fix(memory-feedback): gate 2 hardening, commit within 5 locals 2026-11-08 18:04:01 +01:00
bchanot 271172564c fix(memory-feedback): final review: locals, per-trigger n, write order 2026-11-08 17:55:08 +01:00
bchanot fcebe19951 feat(hooks): memory feedback reminder in the banner 2026-11-08 17:37:19 +01:00
bchanot 1c53aa05b3 feat(memory-feedback): worksheet, apply and sample reader 2026-11-08 17:34:57 +01:00
bchanot b127b2859b feat(memory-feedback): join log records to transcript turns 2026-11-08 17:33:20 +01:00
bchanot ac477077fe feat(memory-feedback): thresholds, metrics and gate verdicts 2026-11-08 17:27:10 +01:00
bchanot f624ce101c feat(memory-feedback): append-only labels, draft and state 2026-11-08 17:25:07 +01:00
bchanot 7ca6b18f08 fix(tests): gate round, fail-closed sources and gitflow-test mktemp
gitflow-test aborts on a failed mktemp or newrepo before its reset --hard; helper sources exit on failure; no lint suppression left; T19c reads a real registry; doctrine rewrapped.
2026-11-06 17:27:44 +01:00
bchanot c5bd0f8312 fix(gitflow): pre-commit exempts only .claude memory, tasks, audits, deploy
Any .claude/** set passed on main/develop, rules and settings included, and a git mv hid its source. The hook now allowlists the side-car dirs and lists with --no-renames; both hook copies regenerated, citers reworded.
2026-11-06 17:13:58 +01:00
bchanot 97c6afcbc8 fix(settings): deny rtk read with a flag before a root .env
rtk read -n .env matched no deny and rtk passed it through. Bench R3-R7 prove the two new rules and that the */ twins already cover flagged forms. Bench hardened: checked mktemp, mandatory dir.
2026-11-06 16:43:45 +01:00
bchanot dc5f127ea5 fix(tests): hook-running suites stub the claude CLI fail-closed
Inline stubs ran claude probe before checking the stub won PATH, and three suites ran the hook with no stub. A shared helper checks resolution, controls from another cwd and exits on any miss (BLK-043 family).
2026-11-06 16:39:38 +01:00