KeiSeiKit-1.0/_manifests
Parfii-bot 50c9e76b79 feat(model-tier+branch-dna): activate cost router + give branches DNA
Phase 4 of substrate-unified-registry: turn on the existing
kei-model-router by changing manifest defaults from `model = "opus"`
to `model = "sonnet"` for routine agents, and give every git branch
a deterministic DNA in the kei-status dashboard.

The model-tier system was BUILT (`_primitives/_rust/kei-model-router/`
crate with Beta posterior, complexity τ-estimator, escalate ladder,
calibrate subcommand) and the advisor hook
(`~/.claude/hooks/model-router-advisor.sh`) was REGISTERED. But every
ledger row from this session ran on Opus because:
  1. All 38 manifests hard-coded `model = "opus"` → no chance for the
     router to recommend cheaper.
  2. The orchestrator (me) ignored the stderr advisory.

This commit closes (1). (2) is a behavioural change tracked separately.

Manifest reclassification (4 Opus + 34 Sonnet):
  Opus (hard reasoning):
    - architect            (system-design synthesis)
    - ml-implementer       (Math-First paradigm)
    - ml-researcher        (literature analysis)
    - security-auditor     (deep risk synthesis)
  Sonnet (everything else):
    - 8 code-implementer-* + code-implementer
    - 5 critic-* + critic
    - 6 infra-implementer-* + infra-implementer
    - 4 researcher-* + researcher
    - 6 validator-* + validator
    - 3 security-auditor-{differential,supply-chain,variant}
    - cost-guardian, fal-ai-runner, frontend-validator, modal-runner

Regenerated all 38 `_generated/*.md` so the YAML frontmatter `model:`
field matches the manifest.

Branch DNA (kei-registry status):
  - New `compute_branch_dna(name, commit_sha)` in `status.rs`. Format
    `branch::git::<sha8(name)>::<sha8(commit)>`, mirrors kei-shared
    DNA wire layout `<role>::<caps>::<scope_sha8>::<body_sha8>`.
  - Deterministic — same `(name, commit)` → same DNA. Changes when
    either changes. No DB persistence: the underlying truth lives in
    `.git/refs/heads/<name>`.
  - 3 new unit tests cover format, determinism, name-change, commit-
    change. `cargo test status::tests` → 10 passed.

`kei-registry status` output now shows DNA prefix per branch alongside
ahead/behind, last commit. Combined with existing per-block DNA in the
[Blocks] and [Path Atoms] sections + `dna` column on `agents` table in
kei-ledger, every artefact in the dashboard has an identifier:

  Atoms (incl path-atoms)  → atom::<caps>::<scope>::<body>     (registry)
  Skills/Rules/Hooks/Prim  → <role>::<caps>::<scope>::<body>   (registry)
  Agent forks              → row.dna in agents table           (ledger)
  Local branches           → branch::git::<sha8>::<sha8>       (computed)

What this does NOT do:
- No outcome backfill — the 205 NULL outcomes in ledger still prevent
  the Beta posterior from learning. Router falls back to top-tier
  until ≥1 datapoint per (task_class, model) accumulates. Tracked as
  follow-up.
- No post-checkout hook to auto-register branches in kei-ledger. Live
  shell-out to `git for-each-ref` is fast enough for the dashboard;
  persistence buys nothing the .git tree doesn't already give.

=== STATUS-TRUTH MARKER ===
shipped: functional
stubs: 0
cargo-check: PASS
behaviour-verified: yes
follow-up-required:
  - Outcome backfill hook (writes outcome to ledger after agent done)
  - User /model claude-sonnet-4-6 for current session (5x cheaper)
  - Push the orchestrator (me) to read advisor stderr in real-time

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 23:05:07 +08:00
..
architect.toml feat(path-atoms): atomize ~/.claude memory + rules path references 2026-05-01 22:29:50 +08:00
code-implementer-flutter.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
code-implementer-go.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
code-implementer-python.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
code-implementer-rust.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
code-implementer-swift.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
code-implementer-typescript.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
code-implementer.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
cost-guardian.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
critic-anti-pattern.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
critic-bug.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
critic-perf.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
critic-tech-debt.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
critic.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
fal-ai-runner.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
frontend-validator.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
infra-implementer-cicd.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
infra-implementer-container.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
infra-implementer-iac.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
infra-implementer-secrets.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
infra-implementer.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
ml-implementer.toml feat(path-atoms): atomize ~/.claude memory + rules path references 2026-05-01 22:29:50 +08:00
ml-researcher.toml feat(path-atoms): atomize ~/.claude memory + rules path references 2026-05-01 22:29:50 +08:00
modal-runner.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
researcher-code.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
researcher-hybrid.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
researcher-web.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
researcher.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
security-auditor-differential.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
security-auditor-supply-chain.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
security-auditor-variant.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
security-auditor.toml feat(path-atoms): atomize ~/.claude memory + rules path references 2026-05-01 22:29:50 +08:00
validator-api.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
validator-benchmark.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
validator-code-reality.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
validator-doc.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
validator-version.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00
validator.toml feat(model-tier+branch-dna): activate cost router + give branches DNA 2026-05-01 23:05:07 +08:00