Commit Graph
68 Commits
Author SHA1 Message Date
bchanot 8778c9d920 fix(memory): known line rematches on live entries after the status read 2026-11-05 17:02:16 +01:00
bchanot 78eff1cf34 feat(memory): memory_pending lists earlier-session milestones 2026-11-05 16:59:25 +01:00
bchanot 66696e9a3e feat(memory): known-error line on failing commands 2026-11-05 16:52:21 +01:00
bchanot 3bb2eafb0c feat(memory): intent recall at the prompt, once per context 2026-11-05 16:41:34 +01:00
bchanot acbfd71327 feat(memory): recall switch, injection log and per-context ledger 2026-11-05 16:28:54 +01:00
bchanot a75efabbf1 feat(memory): bm25 ranking and the rerank prompt 2026-11-05 16:18:39 +01:00
bchanot 6adb05ce1e fix(memory): errno phrases never make an error known 2026-11-05 16:12:22 +01:00
bchanot 38afa9325d feat(memory): status reader through memory.sh, entries with lessons 2026-11-05 16:06:09 +01:00
bchanot 5d55585ea5 fix(memory): Set-Cookie header, curl segment prefixes
Header rule names Set-Cookie again behind the lookbehind. The curl
segment test admits sudo, rtk, NAME=value, NAME=$( and $( prefixes.
2026-11-04 15:33:33 +01:00
bchanot 181bcfc7f2 fix(memory): hyphenated api-key, URL scheme bound, cookie flag scoped to curl
api[_-]?key in JSON, pair and header rules. URL scheme bound 200 behind a
lookbehind. -b redacted only in a curl segment (quote-aware cut); --cookie
stays global. Timing test slack for load.
2026-11-04 15:25:25 +01:00
bchanot f80b00a997 fix(memory): security re-scan — header tail, cookie flags, JSON key affixes, URL lookbehind
Header rule redacts to end of line. -b/--cookie values redacted before
pattern 1. JSON keys take affixes. URL rules get a lookbehind. A switch
file with no boolean enabled logs one line. Probe skips logging without
CLAUDE_JOB_DIR.
2026-11-04 14:55:08 +01:00
bchanot d5dd34fc68 fix(memory): security gate — redaction shapes 6-bis, off switch log, span cap, line flatten
Vendor prefixes, --token flags, API-key headers, JSON and key: value
pairs, hex URL user redacted; quoted values redacted to the closing
quote. Unreadable ~/.claude/memory.json logs one line. Registry spans
capped at 300. Stored line gets the newline flatten.
2026-11-04 14:39:50 +01:00
bchanot c6a5fcea9e fix(memory): linear JWT regex, whole-token credential redaction 2026-11-04 14:14:05 +01:00
bchanot c81a7a2132 fix(memory): final review — placeholder grams, redaction shapes, letter rule, success fast path 2026-11-04 14:02:42 +01:00
bchanot 1ad53eff40 test(memory): errorish edge cases, letterless rule folded into the filter 2026-11-04 13:10:26 +01:00
bchanot 2674bbd997 fix(memory): error-shaped line filter (noise gate option A) 2026-11-04 13:04:45 +01:00
bchanot 01eac15367 fix(memory): heredoc commit form, per-segment milestone matching 2026-11-04 12:38:37 +01:00
bchanot 86fac26390 feat(memory): milestones and one note at the next prompt 2026-11-04 12:28:54 +01:00
bchanot 929c5dc50c fix(memory): fail-open exists probe, drop dead readRegistry 2026-11-04 12:20:03 +01:00
bchanot 0478061457 fix(memory): bound index regexes, skip unreadable registries and malformed entries 2026-11-04 12:14:58 +01:00
bchanot e31baf669c feat(memory): memory_pending tool with the registry error index 2026-11-04 12:07:20 +01:00
bchanot 51828461fd fix(memory): bound redaction pattern 1, adversarial timing cases 2026-11-04 11:55:04 +01:00
bchanot 6072522558 feat(memory): capture Bash failures, redacted and bounded, per project and session 2026-11-04 11:51:28 +01:00
bchanot cc1da66fd4 feat(memory): redaction and normalization 2026-11-04 11:39:43 +01:00
bchanot f1d4f9de0a feat(memory): mod skeleton with off switch and fail-open hooks 2026-11-04 11:35:29 +01:00
bchanot 867a34c326 docs: phase 2 doc sync (static rule limits, release prep span, code-limits hook, merge tier, .env denies, guard in the mod manifest) — ship-feature phase2-guards 2026-11-02 22:50:48 +01:00
bchanot 63f4628452 test(model-router): a denied Skill answer keeps the write guard closed 2026-11-02 19:57:49 +01:00
bchanot 9bbd1d5baa fix(model-router): a non-object Skill answer counts as no deny for the guard latch 2026-11-02 18:41:58 +01:00
bchanot 22ff57b57b feat(model-router): redirect main-loop code writes until a skill ran in the session 2026-11-02 18:37:29 +01:00
bchanot 9a24a6229a feat(model-router): ask before a route lifts main or a rowed spawn onto Fable
routing.json askTier (best | false), /route ask-tier on|off, one question per span with origin, phase, about, model and effort: Fable, Opus instead (big tier), stop for the session. The choice is a tier name stamped on the turn and run slots, inherited by same-tier helper routes only; spawns remember one answer per agent type per session; never headless or inside an agent. 28 TIER tests.
2026-11-02 15:59:24 +01:00
bchanot 1fb07050da chore(routing): skill census globs pack skills; long-name rows for pack skills; every row resolves to a skill 2026-11-02 01:38:59 +01:00
bchanot 657e5cb55b feat(router): a bare /model opens the router's model, variant and scope dialog
Picking the session's current model in the native picker fires no PreModelSwitch, so the scope question never came and the project pin stayed. The bare /model now asks model (fable/opus/sonnet or the native picker), Standard or [1m], then the scope.
2026-10-29 17:25:36 +01:00
bchanot 8e93507b19 fix(router): only Haiku 4.x takes no effort; Haiku 5.x gets its route's
The no-effort rule was keyed on every claude-haiku id, so Haiku 5.5 ran at the engine default instead of its phase effort (mechanical: low). The guard now names Haiku 4.x; status-reporter pins effort: low.
2026-10-25 22:19:55 +01:00
bchanot 2202964d02 feat(router): the /model picker asks its scope; a hand pick always switches
A pick in the picker is held (PreModelSwitch deny), then the same project / conversation / everywhere question runs; only Everywhere reaches the native write to user settings.json. A model chosen in that dialog bypasses the cold-read caps but waits while held down.
2026-10-25 20:36:49 +01:00
bchanot 2c39524473 fix(router): haiku maps to claude-haiku-5-5, not Haiku 4.5
The native haiku alias moved to claude-haiku-5-5, so haiku sessions were unknown to the table and never routed. The 200K window entry was Haiku 4.5's; 5.5 is 1M like the rest.
2026-10-25 18:35:18 +01:00
bchanot 1fde5bbc76 feat(router): /model <name> asks its scope: project, conversation, everywhere
This project writes model into .claude/settings.local.json and sets a sticky route; This conversation sets the sticky route only; Everywhere runs the native write. Links refused in the project tree, native never runs after an answer.
2026-10-25 16:21:39 +01:00
bchanot 0da7ac604c chore(router): confirmed row bugfix → reflect (dialog write) 2026-10-25 13:58:14 +01:00
bchanot 7e3efc7109 chore(router): confirmed row feat → reflect (dialog write) 2026-10-25 03:11:14 +01:00
bchanot 786ee13c24 feat(router): keyword rules, ultrathink and dispatches set effort only
Prompt rules and the derived orchestrate route write effort-only routes, so
they never lift main above the session model; a held run keeps its model.
Fable on main comes from skill rows, the route tool or /route (BDR-123).
2026-10-23 01:24:16 +02:00
bchanot eb4771e635 chore(router): record the confirmed audit phase in routing.json
First-use dialog write from feat A (feature/routing-audit-phase): the audit
phase was kept, the answer lands under confirmed.phases.
2026-10-23 01:04:32 +02:00
bchanot ef13713f09 feat(doctrine): main on Fable writes no code past the /hotfix scope
The Sub-agents rule gains the ceiling and hands the rest to /feat or /bugfix; README and the challenge citers now say the main loop reaches Fable through best-tier rows from an opus session. /deploy's floor follows its verify row and its stale changed entry goes.
2026-10-21 22:18:16 +02:00
bchanot a7d747c65f feat(model-router): audit phase puts the verifier and security-auditor on Fable
New best-tier phase audit (xhigh) carries both merge gates; their opus frontmatter stays the outage floor, since inTier never writes below a tier head. The census floors best-tier rows on the second alias, and the citers now name the audit row.
2026-10-21 16:50:47 +02:00
bchanot d3635b6c33 chore(model-router): dialog decisions and session model opus
deploy apply→verify and the release-executor row, written by the router's first-use dialog; settings.json model claude-fable-5-1[1m] → opus (BLK-032 policy, point 1).
2026-10-21 16:11:53 +02:00
bchanot 45e3454b99 chore(model-router): a11y skill row (reflect) 2026-10-19 00:47:59 +02:00
bchanot 558c49e1a1 feat(guardrails): secure-by-default rule and /guardrails scanner
Always-on rules/secure-by-default.md: hosting, a11y, Supabase RLS,
SMS/email consent, cloud functions, API hygiene incl. password storage.
Stdlib scanner (FAIL/WARN/MANUAL) + skill, 89-check suite, auditor
gate wiring, profiles, routing row (plus Explore rows confirmed
through the router dialog).
2026-10-18 18:10:20 +02:00
bchanot b353fac2ba feat(explain-diff): explain a diff as one self-contained HTML page
Adapted from Geoffrey Litt's explain-diff gist: background, intuition, grouped code walkthrough, 5-question quiz, saved outside the repo. Bundled template, components catalog and checker with its test suite. Row reflect; profiles full, max, dev.
2026-10-17 13:05:01 +02:00
bchanot c11cd3b53b fix(model-router): probe the kept session model, not only a move target
A session on Fable without credits kept Fable unprobed and lost its first turn, and each hold lapse, to the 429. The probe now covers the model the decision lands on, moved or kept.
2026-10-16 19:06:43 +02:00
bchanot f8665b292b chore(model-router): routing.json — confirm 7 agent rows, reflect/plan/apply phases, gitflow + ship-feature skills 2026-10-16 18:36:36 +02:00
bchanot 2cccc43d37 fix(model-router): probe a move target before routing main to it
The breaker learned availability only from a failed request: with
Fable out of usage credits, every new session and every hold lapse
routed main to Fable and lost the turn to a 429
(model_requires_usage_credits, typed rate_limit).

decideFor now probes the model a decision moves main to, once per
session, with a 1-call $.model.complete raced against 8 s: a timeout
or rejection marks it down (reason "probe") and re-decides once. The
current model and held ids are never probed; `probe: false` in
~/.claude/model-router.json turns it off. When a model ranked below
its tier head stands in where the head would have run, the phase's
own effort goes one notch up (reflect xhigh, plan max on Opus).
2026-10-15 00:07:10 +02:00
bchanot 1be57a382c feat(model-router): close the cap residuals: session pin for inheriting spawns, prompt-size estimate, engine cache TTL
A built-in general-purpose agent with no explicit model, spawned by main
while main sits below the session model, is sent the session model
instead of inheriting the demoted one (narrow: built-in source, no fork,
no workflow, main's own child; other types carry their own frontmatter
model the hook cannot see). The cold-read cap now counts the prompt the
engine's usage may not include yet: code points / 3 of the submitted
text, its context entries and main's typed skill body, summed, added at
the turn's first main step unless usage already grew by half of it;
a document attachment makes the size unknown (blocks). Texts and the
step read the same adjusted size; the served record stays raw. The
cache TTL follows the engine's cache_ttl ('5m' | '1h') from main's
PostModelSwitch events, survives /clear, and /route show prints it.
2026-10-13 19:56:17 +02:00