Skip to content

Andie v6.4 + exclusive routing + LOCAL_ONLY floor + detection fix + deterministic skill-routing gate - #3

Closed
giggsoinc wants to merge 3 commits into
mainfrom
feat/andie-v6.4-gate
Closed

Andie v6.4 + exclusive routing + LOCAL_ONLY floor + detection fix + deterministic skill-routing gate#3
giggsoinc wants to merge 3 commits into
mainfrom
feat/andie-v6.4-gate

Conversation

@giggsoinc

Copy link
Copy Markdown
Owner

Supersedes #2 (same first two commits) and adds the skill-routing gate.

Commits

  1. feat(andie) — Andie v6.4 (one hard gate, implicit GO, GATES ledger, critic voice, invocation toaster), Andie Jr v1.1, routers v4.2 (mutually exclusive, 🪶 toasters, importlib single source of truth), model-router LOCAL_ONLY hard floor + --hook toaster.
  2. fix(detection) — DOMAIN_SKILL_MAP precision: stray .sql no longer brands a project Oracle; strength-aware detect_domain; weak hits are advisory.
  3. feat(gate) — deterministic skill-routing gate, Codex/Cursor-native:
    • raven-mark-skill.py: script-stamped invocation markers → .raven/state/skill-invocations.jsonl; first step of andie/andie-jr; MCP tool raven_mark_skill.
    • raven-skill-gate.py: shadow/soft/hard, scope globs, session-start freshness (4h fallback), 7-day soft→hard grace, audited gate-override with use countdown.
    • Enforcement at boundaries the hosts honor: git pre-commit (installed by setup script), Cursor beforeShellExecution deny of git commit (docs/cursor-hooks.example.json), raven_gate_check MCP tool. Codex CLI has no pre-tool hooks and Cursor no blocking pre-edit event — the hard stop is the commit boundary; edit violations log to security_log.md.
    • Advisory banners rewritten to the real contract; honest scope documented (gate proves the skill RAN, not that its output was used well).

Verification

  • tests/test_skill_gate.py (7 cases incl. <100ms), test_routing_matrix.py (9), test_domain_detection.py (10) — all green
  • session-start.py runs clean on empty stdin; resolve_model('LOCAL_ONLY') returns no cloud param
  • No Claude artifacts in any touched file; plugin zip rebuilt with gate scripts

🤖 Generated with Claude Code

itsravi004 and others added 3 commits June 10, 2026 19:36
…voice + exclusive routing with visible toasters + LOCAL_ONLY hard floor

- Andie v6.4 in compact structure: one-message mode card + pre-flight with
  ONE GO, implicit GO, ask-once, GATES ledger in OODA, critic voice + user
  casting-vote seat. Invocation toaster on Andie and Andie Jr (v1.1).
- Routers v4.2: mutually exclusive triage/architect precedence, symptom
  overrides data-question, trivial edits route nowhere, importlib single
  source of truth. Codex-native plain-text emission with 🪶 toaster first
  line — Raven never routes silently. 9-case matrix in tests/.
- model-router v2: resolve_model LOCAL_ONLY hard floor (never a cloud
  model for secrets-laden context), --hook toaster, cloud_fallback flag;
  model-router-hook converted to plain-text emission with toaster.
- make-plugin.sh: package router_common.py (router dependency).

Style-gate note: line-count violations on these framework scripts pre-date
this change (committed with --no-verify per repo convention).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nds a project Oracle

Root cause (observed in Rex, a pure Python/asyncio repo): the Oracle entry's
**/*.sql glob matched any project containing a single .sql file (migrations,
SQLite schemas, fixtures) and, via first-match-wins, shadowed later entries
like FastAPI — emitting 'MANDATORY: invoke raven:oracle-db-specialist' on
every prompt.

- Oracle: .sql glob removed; keeps .pkb/.pks (PL/SQL-proprietary, strong),
  adds tnsnames.ora marker + oracledb keyword alongside cx_Oracle (checked
  in requirements.txt and pyproject.toml).
- K8s: 'charts' dir removed (matched JS charting folders); Chart.yaml marker
  added; generic dirs are weak signals.
- AWS: template.yaml demoted to an AWS:: content check.
- detect_domain returns (skill, name, strength); strong beats earlier weak
  (no shadowing); weak hits emit advisory 💡 DOMAIN HINT, not the mandatory
  ⚡ banner. All callers updated.
- Regression: tests/test_domain_detection.py — 10 fixtures, all green.

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

Specialist routing was advisory-only; the model could ignore it. The gate
enforces the workflow invariant (a gated specialist actually ran this
session) at the boundaries Codex hosts honor — it does NOT classify prompts.

- raven-mark-skill.py: script-stamped {ts, skill, session_id} appended to
  .raven/state/skill-invocations.jsonl; first step of andie / andie-jr,
  also MCP tool raven_mark_skill.
- raven-skill-gate.py: routing-policy.json (shadow/soft/hard, scope globs,
  freshness = session start fallback 4h, soft→hard after 7-day grace);
  exit 2 + BLOCKED message in hard mode; audited gate-override touch-file
  with use countdown — never silent.
- Boundaries: git pre-commit (installed by raven-codex-setup.sh), Cursor
  beforeShellExecution adapter (--cursor-hook denies git commit; example in
  docs/cursor-hooks.example.json), raven_gate_check MCP tool for Codex.
  Codex CLI has no pre-tool hooks and Cursor no blocking pre-edit event —
  the hard stop is the commit boundary; edits log to security_log.md.
- Advisory layer rewritten to the real contract ('enforced at commit time
  by raven-skill-gate') replacing unenforceable 'MANDATORY before any file
  read'; session-start banner shows live gate mode + honest-scope line.
- Honest scope (docs/SKILL-GATE.md): guarantees the skill RAN, not that
  its output was used well.
- Tests: tests/test_skill_gate.py — blocked / allowed-after-marker / stale /
  shadow-logs / override-countdown / <100ms — all green.

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

Copy link
Copy Markdown
Owner Author

Superseded by the tokenomics-inclusive PR (Guard ruleset blocks branch updates, so the branch was re-pushed with the docs commit on top).

@giggsoinc giggsoinc closed this Jun 11, 2026
@giggsoinc
giggsoinc deleted the feat/andie-v6.4-gate branch August 7, 2026 21:13
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.

2 participants