Skip to content

Andie v6.4 + routing + LOCAL_ONLY floor + detection fix + skill gate + tokenomics docs#4

Open
giggsoinc wants to merge 7 commits into
mainfrom
feat/andie-v6.4-gate-tokenomics
Open

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

Conversation

@giggsoinc

Copy link
Copy Markdown
Owner

Supersedes #3 (same first three commits) and adds the tokenomics documentation set.

Commits

  1. feat(andie) — Andie v6.4, Andie Jr v1.1, routers v4.2 (exclusive + toasters), LOCAL_ONLY hard floor.
  2. fix(detection) — DOMAIN_SKILL_MAP precision (stray .sql ≠ Oracle).
  3. feat(gate) — deterministic skill-routing gate (markers + commit-boundary enforcement, Cursor adapter, MCP tools).
  4. docs(tokenomics) — measured cost note (docs/TOKENOMICS.md), README 🪙 Tokenomics section, and two self-contained diagram pages: Agent_token_architecture_business.html (owner view) and Agent_token_architecture_tech.html (engineer view — live-polls dashboard-server's /metrics.json with a >175 tok/call double-fire alarm).

Measured figures

Gate: 0 tok/message (out-of-band) · one router max ~120–145 tok · model toaster ~55 · session banner ~455 once · skill loads 1.5k–3.6k one-time on invocation.

All suites green: routing matrix (9), domain detection (10), skill gate (7 incl. <100ms).

🤖 Generated with Claude Code

itsravi004 and others added 7 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>
…usiness/tech token-architecture pages

- docs/TOKENOMICS.md: measured costs — gate 0 tok (out-of-band), one router
  max ~120–145 tok, model toaster ~55, session banner ~455, skill loads
  1.5–3.6k one-time; regression signal = overhead >175 tok/prompt.
- README: 🪙 Tokenomics section with the cost table and dashboard pointer.
- docs/Agent_token_architecture_business.html: owner view — cost cards,
  flow diagram (conversation lane vs zero-token enforcement lane), monitor
  guide.
- docs/Agent_token_architecture_tech.html: engineer view — full injection
  architecture SVG, per-component table, monitoring playbook; auto-polls
  http://127.0.0.1:9787/metrics.json (dashboard-server) every 5s with the
  >175 tok/call alarm.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…dex, MCP tool list, gate row

- make-plugin.sh: ship docs/SKILL-GATE.md, TOKENOMICS.md, both
  Agent_token_architecture pages, and cursor-hooks.example.json in the zip.
- README: Docs index expanded; MCP server row lists raven_mark_skill +
  raven_gate_check; skill-routing gate row; guard wording 'fire when their
  conditions match'.
- CHANGELOG: tokenomics docs + packaging entry under Unreleased.

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

.gitignore: track release artifacts (plugin/raven-codex-plugin-v*.zip)
while still ignoring other zips.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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