Дмитрий
1f18614d7c
chore(router-gate-v4): delete 5 obsolete v3.9 hooks + vocab.json (Stream G cleanup)
...
Deleted hooks superseded by v4 architecture (spec section 4 behavioral pivot):
- enforce-chain-recommendation (replaced by router-gate decide)
- enforce-classifier-match (replaced by skill-scope-verifier Direction 2)
- enforce-graph-first (replaced by decide classification)
- enforce-semgrep-security (folded into normative-content-rules + per-tool LLM-judge)
- enforce-override-limit (universal vocab removal section 4.2)
- enforce-override-vocab.json (vocab abolished)
Regression: 1705/1705 vitest tools GREEN after deletion.
2026-05-30 06:12:59 +03:00
Дмитрий
8ed7dad669
feat(router-gate-v4): enforce-mcp-classification (PreToolUse mcp__* wrapper, §5.3 + G1/G12)
2026-05-30 06:11:21 +03:00
Дмитрий
7df49dfa92
feat(router-gate-v4): enforce-self-debrief-detector (PreToolUse mutating wrapper, §3.12 NEW)
2026-05-30 06:08:19 +03:00
Дмитрий
83e4b0d708
feat(router-gate-v4): enforce-tdd-real-test-verifier (PreToolUse Edit|Write wrapper, §3.11)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 06:05:17 +03:00
Дмитрий
54241e6b6c
feat(router-gate-v4): enforce-todowrite-skill-verifier (Stop hook wrapper, §3.9 Direction 4)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 06:00:00 +03:00
Дмитрий
d3e192abf1
refactor(router-gate-v4): stub override helpers (universal vocab removed per spec §4.2)
...
findOverride/findOverrideAttempt/loadOverrideVocab become permanent stubs returning null/null/empty.
Non-deleted hooks (verify-before-push, tdd-gate, memory-coverage, branch-switch) still import these
symbols and need them to compile; runtime always reports 'no override'.
Adapted 15 existing tests in enforce-hook-helpers.test.mjs and 7 in enforce-semgrep-security.test.mjs
that asserted old vocab behaviour; all now assert stub behaviour (null/empty).
1824/1824 vitest tools GREEN.
Stream G of router-gate v4 deployment.
2026-05-30 05:55:46 +03:00
Дмитрий
97d7deff99
docs(pilot): snapshot 30.05 ~05:30 МСК — Stage 5 F1+F2 deployed + storm quick-fix вашиденьги24.рф
2026-05-30 05:43:00 +03:00
Дмитрий
bfb650c5e2
ops(sql-runner): whitelist UPDATE supplier_projects
...
Расширяет MUTATING_RE для quick-fix supplier_project signal_type
collision (B3 вашиденьги24.рф site→sms за supplier_lead 1352
шторм 319/h после Stage 5 F2 fast-fail deploy).
Read-only diagnostic queries показали что поставщик сменил тип
кампании site→sms но локальный supplier_project не обновился —
резолвер выбрасывает unique_key collision, поставщик ретраит,
F2 stops at 3 retries per webhook.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-30 05:28:25 +03:00
Дмитрий
0d9d191895
merge(router-gate-v4): Stream E — AskUser + subagent
...
7 commits / 10 files / +2824 lines:
- askuser-answer-parser (S27/E33/E34 + parse + approval)
- punctuation-aware stop detection + review nits (BOM/JSDoc/??)
- cosmetic AskUser detector (v4.1 §4.5)
- subagent return scanner + G2 narrative + structured schema
- anchor 'всё ок' narrative pattern (no false-match inside 'всё окно')
- subagent-prompt-prefix inheritance (256-bit sentinel, restricted/ paths)
Stream tests pass.
2026-05-30 05:09:07 +03:00
Дмитрий
207394f2c0
merge(router-gate-v4): Stream D — LLM-judge Layer 4
...
13 commits / 10 files / +3017 lines:
- multiJudgeConsensus 3-judge any-YES + cache/budget
- per-tool LLM-judge pure decision + PreToolUse hook wiring
- response-scan deterministic layer + LLM layer + Stop hook
- normative-content path matcher + content extraction
- normative-content deterministic layers + multi-judge Layer 4
- normative-content PreToolUse hook wiring
- ProxyAPI live integration smoke
Stream tests pass.
2026-05-30 05:08:41 +03:00
Дмитрий
dba961c51f
merge(router-gate-v4): Stream C — static scan + MCP path-deny
...
8 commits / 11 files / +3066 lines static-content-scanner / framework-boot-scanner / glob-restricted-filter / mcp-tool-classifier / commit-message-scanner.
Review fixes: browser_navigate host-boundary (SSRF spoof), boot-scan best-effort.
2026-05-30 05:08:01 +03:00
Дмитрий
b4217789ca
fix(router-gate-merge): A↔B integration — resolvePathNormalize test after Stream A merged
...
После merge Stream A модуль ./path-normalization.mjs существует → resolvePathNormalize() возвращает Stream A pathNormalize, не fallback. Stream B тест предполагал отсутствие модуля и assert'ил конкретное default-значение 'a/b'.
Fix: меняю assertion на 'returns a function' + 'does not throw' — сохраняет original intent (resolvePathNormalize всегда возвращает callable) без жёсткой привязки к implementation Stream A pathNormalize.
Verified: vitest 59/59 GREEN на enforce-router-gate.test.mjs.
2026-05-30 05:06:58 +03:00
Дмитрий
433e135081
merge(router-gate-v4): Stream B — Bash/PowerShell content rules
...
16 commits / 11 files / +2849 lines:
- Bash hard-blacklist (v3.9+v4.0 C16/#4/#21/#22/#34 + v4.1 G7/G8 wget/nc)
- Bash whitelist + script-execution file-watcher
- classifyBashCommand integration + bashContentClassify export
- Bash gate main() + dynamic path-normalize fallback (fail-CLOSE)
- PowerShell tokenizer + hard-blacklist (keep + v4.1 G10 PS env)
- classifyPowerShellCommand (whitelist + path-deny + git route)
- PowerShell gate main() (fail-CLOSE)
- shared classifyGitCommand (readonly/conditional/hard incl G5/G6 gpgsign/--no-verify)
- Review fixes: 2>&1 fd-duplication allowed, git -c RCE closed, runtime-dir path-deny
Stream tests pass.
2026-05-30 05:05:15 +03:00
Дмитрий
b31f765852
merge(router-gate-v4): Stream A — pure decision modules
...
16 commits / 16 files / +2231 lines:
- decide() 4 поведения + nodeMatches + chain-state (§4, §10.1)
- safe-baseline metering Direction 1 + v4.1 hard sync (§3.6)
- skill scope verifier Direction 2 + v4.1 hard sync (§3.7)
- decomposition detector Direction 3 + v4.1 hard-block (§3.8)
- TodoWrite skill verifier Direction 4 + v4.1 hard sync (§3.9)
- self-debrief detector v4.1 NEW (§3.12)
- TDD real-test verifier regex-based (§3.11)
Stream tests: 920 unit-tests GREEN inside subagent session.
Checkpoint 1 — first of A→B→C→D→E sequence.
2026-05-30 05:04:31 +03:00
Дмитрий
bdd573a129
fix(router-gate): stream A decide — unicode boundary on cyrillic direct-invocation, polite skill_call forms, +tests, knownInRegistry contract docs
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 21:26:10 +03:00
Дмитрий
7f21cd929a
feat(router-gate): stream A — core decide() 4 поведения + nodeMatches + chain-state (§4, §10.1)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 21:16:31 +03:00
Дмитрий
e22148d238
fix(router-gate): stream A tdd-verifier — test no_test_block + EACCES vs ENOENT + known-limitation docs
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 21:12:33 +03:00
Дмитрий
ec637863dd
feat(router-gate): stream A — tdd real-test verifier regex-based (§3.11)
2026-05-29 21:04:37 +03:00
Дмитрий
6f4d8889fc
fix(router-gate): stream A self-debrief — unicode lookbehind for cyrillic patterns + false-positive tests
2026-05-29 21:01:56 +03:00
Дмитрий
5bcb1a6ba0
test(router-gate): ProxyAPI live integration smoke + stream D sub-plan (stream D task 13)
...
Opt-in live smoke (ROUTER_LLM_LIVE_TEST=1 + ROUTER_LLM_KEY); auto-skips otherwise
so it never pollutes the unit regression in worktrees where undici is unresolved.
Checkpoint-1 live result on owner machine: PASS (2/2) — single Sonnet judge + 3-judge
consensus (Sonnet 4.6 + Haiku 4.5 + Opus 4.7) reach all models with real verdicts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 20:55:20 +03:00
Дмитрий
5dff5f83f7
feat(router-gate): stream A — self-debrief detector v4.1 NEW (§3.12)
2026-05-29 20:50:48 +03:00
Дмитрий
b8d2a0ca2e
feat(router-gate): normative-content PreToolUse hook wiring (stream D task 12)
...
Recovered from a subagent crash (socket error mid-task) that left literal-newline
corruption in two .join() string literals; repaired and committed by controller.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 20:48:51 +03:00
Дмитрий
eec75c4d33
docs(CLAUDE.md): v2.42 — router-gate v4 spec triple + master plan + handoff + 5 worktrees + rationalization-audit fix deployed
2026-05-29 20:48:47 +03:00
Дмитрий
86457dc8f5
fix(router-gate): stream A todowrite-verifier — unicode boundary for cyrillic mention patterns + DRY + tests
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 20:46:54 +03:00
Дмитрий
c98f1a47a2
fix(router-gate): allow 2>&1 fd-duplication, keep file-redirect block (review finding)
2026-05-29 20:45:23 +03:00
Дмитрий
f6e26774db
fix(router-gate): close git -c/option-injection RCE + runtime-dir path-deny (review finding)
2026-05-29 20:45:16 +03:00
Дмитрий
657894ac19
feat(router-gate): normative-content decide() + multi-judge layer 4 (stream D task 11)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:37:13 +03:00
Дмитрий
6ca4950eee
feat(router-gate): stream A — todowrite skill verifier Direction 4 + v4.1 hard sync (§3.9)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:34:46 +03:00
Дмитрий
6b97fdb08a
feat(router-gate): powershell gate main() (fail-CLOSE)
2026-05-29 20:29:23 +03:00
Дмитрий
a564b02a59
fix(router-gate): stream A decomposition — EOF newline + skill-in-current edge test
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:22:26 +03:00
Дмитрий
bc28d99b17
feat(router-gate): normative-content deterministic layers (stream D task 10)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:22:13 +03:00
Дмитрий
ada33652f6
docs(plans): router-gate v4 Stream E sub-plan (AskUser + subagent)
2026-05-29 20:21:43 +03:00
Дмитрий
98497bd2b8
feat(router-gate): classifyPowerShellCommand (whitelist + path-deny + git route)
2026-05-29 20:20:35 +03:00
Дмитрий
1f5d0dbc09
feat(router-gate): powershell tokenizer + hard-blacklist (keep + v4.1 G10)
2026-05-29 20:19:15 +03:00
Дмитрий
1659ca2dd3
feat(router-gate): stream E — subagent-prompt-prefix inheritance (256-bit sentinel, restricted/ paths, isCli guard)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:15:12 +03:00
Дмитрий
06d61522cc
feat(router-gate): stream A — decomposition detector Direction 3 + v4.1 hard-block (§3.8)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:14:06 +03:00
Дмитрий
26a9b9af0d
feat(router-gate): normative-content path matcher + content extraction (stream D task 9)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:12:58 +03:00
Дмитрий
0c4a6ca23a
feat(router-gate): bash gate main() + dynamic path-normalize fallback (fail-CLOSE)
2026-05-29 20:10:58 +03:00
Дмитрий
9b7c2b335d
fix(router-gate): stream A skill-scope — restore plan reason strings, arrow/optional-chaining, +reason tests
2026-05-29 20:10:41 +03:00
Дмитрий
23b10d2b7f
feat(router-gate): response-scan LLM layer + Stop hook (stream D task 8)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:10:23 +03:00
Дмитрий
e951193dd5
feat(router-gate): classifyBashCommand integration + bashContentClassify export
2026-05-29 20:09:42 +03:00
Дмитрий
78a88a3bc0
fix(router-gate): stream E — anchor 'всё ок' narrative pattern (no false-match inside 'всё окно')
2026-05-29 20:07:58 +03:00
Дмитрий
fbbfdf530b
feat(router-gate): response-scan deterministic layer (stream D task 7)
2026-05-29 20:06:52 +03:00
Дмитрий
f05a8a66b2
feat(router-gate): bash whitelist + script-execution file-watcher
2026-05-29 20:06:04 +03:00
Дмитрий
826650cb1b
feat(router-gate): stream A — skill scope verifier Direction 2 + v4.1 content-level (§3.7)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:05:22 +03:00
Дмитрий
76ef10ec26
feat(router-gate): bash hard-blacklist (v3.9+v4.0 C16/#4/#21/#22/#34 + v4.1 G7/G8)
2026-05-29 20:04:40 +03:00
Дмитрий
aa28b26047
feat(router-gate): stream E — subagent return scanner + G2 narrative + structured schema
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:01:57 +03:00
Дмитрий
1aa09230d0
feat(router-gate): per-tool LLM-judge PreToolUse hook wiring (stream D task 6)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:01:48 +03:00
Дмитрий
b9b1352bcd
fix(router-gate): stream A safe-baseline — dedupe overlap, deep-freeze, dead-var, +tests
...
Fix 1 (correctness): keywordOverlapCount dedupes `a` into a Set so duplicate
keywords like ['router','router','gate'] ∩ ['router','gate'] yields 2 not 3.
Fix 2 (consistency): deep-freeze all nested threshold objects in DEFAULT_THRESHOLDS
matching the tools/cost-pricing.mjs pattern.
Fix 3 (cleanup): move isMutatingForBaseline check to top of evaluateThresholds
so key/th vars are only computed in the metered-tool branch.
Fix 4 (coverage): add LS=10 and AskUserQuestion=2 soft_flag tests.
Fix 5 (docs): JSDoc on METERED_TOOLS noting TodoWrite → TodoWrite_writes mapping.
Tests: 23 → 29 (+6), all GREEN.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-29 20:01:00 +03:00
Дмитрий
e791d70d0e
feat(router-gate): shared classifyGitCommand (readonly/conditional/hard incl G5/G6)
2026-05-29 19:59:14 +03:00