@hegemonart/get-design-done 1.28.0 → 1.28.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +78 -0
- package/SKILL.md +1 -1
- package/hooks/gdd-decision-injector.js +149 -3
- package/package.json +1 -1
- package/reference/adr-format.md +96 -0
- package/reference/apply-reflections-procedure.md +68 -0
- package/reference/architecture-vocabulary.md +102 -0
- package/reference/cache-policy.md +126 -0
- package/reference/compare-rubric.md +171 -0
- package/reference/connections-onboarding.md +417 -0
- package/reference/context-md-format.md +106 -0
- package/reference/darkmode-audit-procedure.md +258 -0
- package/reference/debug-feedback-loops.md +119 -0
- package/reference/design-procedure.md +304 -0
- package/reference/discover-procedure.md +204 -0
- package/reference/explore-procedure.md +267 -0
- package/reference/health-mcp-detection.md +44 -0
- package/reference/health-skill-length-report.md +69 -0
- package/reference/heuristics.md +84 -0
- package/reference/milestone-completeness-rubric.md +87 -0
- package/reference/peer-cli-protocol.md +161 -0
- package/reference/plan-procedure.md +278 -0
- package/reference/registry.json +169 -1
- package/reference/registry.schema.json +1 -1
- package/reference/router-rules.md +84 -0
- package/reference/scan-procedure.md +731 -0
- package/reference/shared-preamble.md +78 -6
- package/reference/skill-authoring-contract.md +128 -0
- package/reference/start-procedure.md +115 -0
- package/reference/style-doc-procedure.md +150 -0
- package/reference/threat-modeling.md +101 -0
- package/reference/verify-procedure.md +512 -0
- package/scripts/validate-skill-length.cjs +283 -0
- package/skills/add-backlog/SKILL.md +1 -0
- package/skills/analyze-dependencies/SKILL.md +33 -122
- package/skills/apply-reflections/SKILL.md +1 -40
- package/skills/audit/SKILL.md +3 -1
- package/skills/bandit-status/SKILL.md +31 -66
- package/skills/benchmark/SKILL.md +15 -55
- package/skills/brief/SKILL.md +12 -1
- package/skills/cache-manager/SKILL.md +3 -57
- package/skills/check-update/SKILL.md +38 -75
- package/skills/compare/SKILL.md +29 -269
- package/skills/complete-cycle/SKILL.md +1 -1
- package/skills/connections/SKILL.md +21 -427
- package/skills/continue/SKILL.md +1 -0
- package/skills/darkmode/SKILL.md +32 -287
- package/skills/debug/SKILL.md +11 -8
- package/skills/design/SKILL.md +27 -245
- package/skills/discover/SKILL.md +26 -133
- package/skills/discuss/SKILL.md +18 -2
- package/skills/explore/SKILL.md +40 -205
- package/skills/fast/SKILL.md +1 -0
- package/skills/figma-write/SKILL.md +2 -2
- package/skills/health/SKILL.md +11 -33
- package/skills/help/SKILL.md +1 -0
- package/skills/list-assumptions/SKILL.md +1 -0
- package/skills/map/SKILL.md +8 -31
- package/skills/new-cycle/SKILL.md +3 -1
- package/skills/next/SKILL.md +1 -0
- package/skills/note/SKILL.md +1 -0
- package/skills/optimize/SKILL.md +21 -44
- package/skills/pause/SKILL.md +1 -0
- package/skills/peer-cli-add/SKILL.md +26 -108
- package/skills/peer-cli-customize/SKILL.md +22 -42
- package/skills/peers/SKILL.md +33 -57
- package/skills/plan/SKILL.md +33 -220
- package/skills/plant-seed/SKILL.md +1 -0
- package/skills/pr-branch/SKILL.md +1 -0
- package/skills/progress/SKILL.md +1 -7
- package/skills/quality-gate/SKILL.md +34 -166
- package/skills/quick/SKILL.md +1 -0
- package/skills/reapply-patches/SKILL.md +1 -0
- package/skills/recall/SKILL.md +1 -0
- package/skills/resume/SKILL.md +1 -0
- package/skills/review-backlog/SKILL.md +1 -0
- package/skills/router/SKILL.md +3 -59
- package/skills/scan/SKILL.md +36 -675
- package/skills/settings/SKILL.md +1 -0
- package/skills/ship/SKILL.md +1 -0
- package/skills/sketch/SKILL.md +1 -1
- package/skills/sketch-wrap-up/SKILL.md +13 -54
- package/skills/spike/SKILL.md +1 -1
- package/skills/spike-wrap-up/SKILL.md +12 -46
- package/skills/start/SKILL.md +13 -112
- package/skills/stats/SKILL.md +1 -0
- package/skills/style/SKILL.md +18 -140
- package/skills/synthesize/SKILL.md +1 -0
- package/skills/timeline/SKILL.md +1 -0
- package/skills/todo/SKILL.md +1 -0
- package/skills/turn-closeout/SKILL.md +36 -56
- package/skills/undo/SKILL.md +1 -0
- package/skills/update/SKILL.md +1 -0
- package/skills/verify/SKILL.md +42 -457
- package/skills/warm-cache/SKILL.md +3 -35
- package/skills/zoom-out/SKILL.md +26 -0
package/reference/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./schemas/registry.schema.json",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"generated_at": "2026-
|
|
4
|
+
"generated_at": "2026-05-18T12:47:59.666Z",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
7
|
"name": "codex-tools",
|
|
@@ -811,6 +811,174 @@
|
|
|
811
811
|
"path": "reference/visual-hierarchy-layout.md",
|
|
812
812
|
"type": "heuristic",
|
|
813
813
|
"description": "Z-order, whitespace, grids, F/Z patterns, 24 landing archetypes"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "adr-format",
|
|
817
|
+
"path": "reference/adr-format.md",
|
|
818
|
+
"type": "meta-rules",
|
|
819
|
+
"phase": 28.5,
|
|
820
|
+
"description": "ADR (Architecture Decision Record) format — adapted from mattpocock/skills (MIT). 3-criteria offer gate (hard-to-reverse AND surprising-without-context AND real-tradeoff), 4-state status lifecycle. GDD addition: optional cycle-id + phase-id cross-refs to STATE.md."
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"name": "apply-reflections-procedure",
|
|
824
|
+
"path": "reference/apply-reflections-procedure.md",
|
|
825
|
+
"type": "heuristic",
|
|
826
|
+
"phase": 28.5,
|
|
827
|
+
"description": "Phase 28.5 — apply-reflections procedure extracted from skills/apply-reflections per progressive-disclosure rule. Read by skills/apply-reflections/SKILL.md."
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "architecture-vocabulary",
|
|
831
|
+
"path": "reference/architecture-vocabulary.md",
|
|
832
|
+
"type": "principles",
|
|
833
|
+
"phase": 28.5,
|
|
834
|
+
"description": "Ousterhout glossary (A Philosophy of Software Design) ported via mattpocock/skills LANGUAGE.md (MIT). 8 core terms (Module / Interface / Implementation / Depth / Seam / Adapter / Leverage / Locality) + 3 principles (deletion test, interface-is-test-surface, two-adapters-rule)."
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "cache-policy",
|
|
838
|
+
"path": "reference/cache-policy.md",
|
|
839
|
+
"type": "heuristic",
|
|
840
|
+
"phase": 28.5,
|
|
841
|
+
"description": "Phase 28.5 — cache-policy reference extracted from skills/cache-manager + skills/warm-cache per progressive-disclosure rule (Bucket 3 orchestrator + utility rework)."
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"name": "compare-rubric",
|
|
845
|
+
"path": "reference/compare-rubric.md",
|
|
846
|
+
"type": "heuristic",
|
|
847
|
+
"phase": 28.5,
|
|
848
|
+
"description": "Phase 28.5 — compare-rubric extracted from skills/compare per progressive-disclosure rule. Read by skills/compare/SKILL.md (Bucket 2 design-family rework)."
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"name": "connections-onboarding",
|
|
852
|
+
"path": "reference/connections-onboarding.md",
|
|
853
|
+
"type": "meta-rules",
|
|
854
|
+
"phase": 28.5,
|
|
855
|
+
"description": "Phase 28.5 — connections-onboarding procedure extracted from skills/connections per progressive-disclosure rule (Bucket 2 design-family rework). Four-option setup prompt + onboarding flow."
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"name": "context-md-format",
|
|
859
|
+
"path": "reference/context-md-format.md",
|
|
860
|
+
"type": "meta-rules",
|
|
861
|
+
"phase": 28.5,
|
|
862
|
+
"description": "CONTEXT.md format — adapted from mattpocock/skills (MIT) CONTEXT-FORMAT.md. DDD-style ubiquitous-language glossary schema, inline-write trigger, multi-context CONTEXT-MAP.md pattern. GDD additions: optional first-seen + aliases on term entries."
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "darkmode-audit-procedure",
|
|
866
|
+
"path": "reference/darkmode-audit-procedure.md",
|
|
867
|
+
"type": "meta-rules",
|
|
868
|
+
"phase": 28.5,
|
|
869
|
+
"description": "Phase 28.5 — darkmode audit procedure extracted from skills/darkmode per progressive-disclosure rule (Bucket 2 design-family rework)."
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"name": "debug-feedback-loops",
|
|
873
|
+
"path": "reference/debug-feedback-loops.md",
|
|
874
|
+
"type": "heuristic",
|
|
875
|
+
"phase": 28.5,
|
|
876
|
+
"description": "Debug feedback-loop discipline — adapted from mattpocock/skills (MIT) engineering/diagnose Phase 1. 10 construction paths in priority order (failing test -> curl -> CLI fixture -> headless browser -> trace replay -> throwaway harness -> fuzz -> bisect harness -> differential loop -> HITL bash), iterate-on-loop sub-discipline, non-determinism reproduction-rate branch."
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "design-procedure",
|
|
880
|
+
"path": "reference/design-procedure.md",
|
|
881
|
+
"type": "meta-rules",
|
|
882
|
+
"phase": 28.5,
|
|
883
|
+
"description": "Phase 28.5 — design-stage procedure extracted from skills/design per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "discover-procedure",
|
|
887
|
+
"path": "reference/discover-procedure.md",
|
|
888
|
+
"type": "meta-rules",
|
|
889
|
+
"phase": 28.5,
|
|
890
|
+
"description": "Phase 28.5 — discover-stage procedure extracted from skills/discover per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"name": "explore-procedure",
|
|
894
|
+
"path": "reference/explore-procedure.md",
|
|
895
|
+
"type": "meta-rules",
|
|
896
|
+
"phase": 28.5,
|
|
897
|
+
"description": "Phase 28.5 — explore-stage procedure extracted from skills/explore per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"name": "health-mcp-detection",
|
|
901
|
+
"path": "reference/health-mcp-detection.md",
|
|
902
|
+
"type": "heuristic",
|
|
903
|
+
"phase": 28.5,
|
|
904
|
+
"description": "Phase 28.5 — health-MCP detection procedure extracted from skills/health per progressive-disclosure rule (D-10). Documents dismissal check, detection via scripts/lib/install/mcp-register.cjs, row rendering for claude/codex/both/neither, fallback for missing mcp-register.cjs."
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "health-skill-length-report",
|
|
908
|
+
"path": "reference/health-skill-length-report.md",
|
|
909
|
+
"type": "heuristic",
|
|
910
|
+
"phase": 28.5,
|
|
911
|
+
"description": "Phase 28.5 — health-skill-length-report contract documenting validate-skill-length.cjs JSON shape + threshold rationale. Read by skills/health/SKILL.md to render the skill-length report subsection."
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"name": "milestone-completeness-rubric",
|
|
915
|
+
"path": "reference/milestone-completeness-rubric.md",
|
|
916
|
+
"type": "heuristic",
|
|
917
|
+
"phase": 28.5,
|
|
918
|
+
"description": "Phase 28.5 — milestone-completeness rubric extracted from skills/turn-closeout per progressive-disclosure rule (Bucket 4 analysis + audit rework). Turn-closeout / new-cycle completeness criteria."
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"name": "peer-cli-protocol",
|
|
922
|
+
"path": "reference/peer-cli-protocol.md",
|
|
923
|
+
"type": "heuristic",
|
|
924
|
+
"phase": 28.5,
|
|
925
|
+
"description": "Phase 28.5 — peer-CLI protocol scaffold extracted from skills/peer-cli-add + skills/peer-cli-customize per progressive-disclosure rule (Bucket 4 analysis + audit rework). ACP + ASP adapter scaffolding patterns, verification ladder, Windows quirk handling."
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "plan-procedure",
|
|
929
|
+
"path": "reference/plan-procedure.md",
|
|
930
|
+
"type": "meta-rules",
|
|
931
|
+
"phase": 28.5,
|
|
932
|
+
"description": "Phase 28.5 — plan-stage procedure extracted from skills/plan per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "router-rules",
|
|
936
|
+
"path": "reference/router-rules.md",
|
|
937
|
+
"type": "heuristic",
|
|
938
|
+
"phase": 28.5,
|
|
939
|
+
"description": "Phase 28.5 — router-rules reference extracted from skills/router per progressive-disclosure rule (Bucket 3 orchestrator + utility rework). S/M/L/XL bucket assignments + path-selection heuristic."
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "scan-procedure",
|
|
943
|
+
"path": "reference/scan-procedure.md",
|
|
944
|
+
"type": "meta-rules",
|
|
945
|
+
"phase": 28.5,
|
|
946
|
+
"description": "Phase 28.5 — scan-stage procedure extracted from skills/scan per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"name": "skill-authoring-contract",
|
|
950
|
+
"path": "reference/skill-authoring-contract.md",
|
|
951
|
+
"type": "meta-rules",
|
|
952
|
+
"phase": 28.5,
|
|
953
|
+
"description": "Phase 28.5 skill-authoring contract — adapted from mattpocock/skills (MIT). SKILL.md <=100-line cap (warn >=100, block >=250 in CI), 1024-char description cap, <what>. Use when <triggers>. form (lax-mode default per Phase 33 A/B pending), frontmatter required fields, progressive-disclosure one-level-deep rule. Validator at scripts/validate-skill-length.cjs."
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"name": "start-procedure",
|
|
957
|
+
"path": "reference/start-procedure.md",
|
|
958
|
+
"type": "heuristic",
|
|
959
|
+
"phase": 28.5,
|
|
960
|
+
"description": "Phase 28.5 — start-procedure reference extracted from skills/start per progressive-disclosure rule (Bucket 4 analysis + audit rework)."
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"name": "style-doc-procedure",
|
|
964
|
+
"path": "reference/style-doc-procedure.md",
|
|
965
|
+
"type": "meta-rules",
|
|
966
|
+
"phase": 28.5,
|
|
967
|
+
"description": "Phase 28.5 — style-doc procedure extracted from skills/style per progressive-disclosure rule (Bucket 2 design-family rework)."
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "threat-modeling",
|
|
971
|
+
"path": "reference/threat-modeling.md",
|
|
972
|
+
"type": "heuristic",
|
|
973
|
+
"phase": 28.5,
|
|
974
|
+
"description": "Phase 28.5 — STRIDE threat-modeling patterns extracted from skills/quality-gate + audit-side scanning per progressive-disclosure rule (Bucket 4 analysis + audit rework). Audit-side threat-model invariants."
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "verify-procedure",
|
|
978
|
+
"path": "reference/verify-procedure.md",
|
|
979
|
+
"type": "meta-rules",
|
|
980
|
+
"phase": 28.5,
|
|
981
|
+
"description": "Phase 28.5 — verify-stage procedure extracted from skills/verify per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
814
982
|
}
|
|
815
983
|
]
|
|
816
984
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"tier": { "enum": ["L0", "L1", "L2"] },
|
|
48
|
-
"phase": { "type": "
|
|
48
|
+
"phase": { "type": "number", "description": "Phase that introduced this entry. Numbers are allowed (e.g., 19.6, 27.5, 27.6, 27.7, 28.5) — decimal phases are valid per the long-standing precedent established by Phases 19.6 / 27.5 / 27.6 / 27.7 / 28.5." },
|
|
49
49
|
"description": { "type": "string" },
|
|
50
50
|
"registered_at": { "type": "string", "format": "date-time" }
|
|
51
51
|
},
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: router-rules
|
|
3
|
+
type: heuristic
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [router, path-selection, complexity-class, model-tier, runtime-resolution, cost-estimation]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Router Path-Selection + Runtime Resolution Rules
|
|
11
|
+
|
|
12
|
+
Extracted from `skills/router/SKILL.md` per Phase 28.5 D-10 (extract-then-link, never delete
|
|
13
|
+
content). The router SKILL keeps its invocation contract, output schema versioning table,
|
|
14
|
+
integration point, and failure modes. The path-selection heuristic tables, the cost
|
|
15
|
+
estimation algorithm, and the runtime-aware model resolution computation contract live
|
|
16
|
+
here so the SKILL stays under the 100-line cap.
|
|
17
|
+
|
|
18
|
+
## Path Selection Heuristic
|
|
19
|
+
|
|
20
|
+
The router emits both `path` (legacy 3-tier enum) and `complexity_class` (Phase 25 4-tier enum). The canonical mapping is:
|
|
21
|
+
|
|
22
|
+
| complexity_class | path | Behavior |
|
|
23
|
+
|------------------|------|----------|
|
|
24
|
+
| `S` | `fast` (short-circuited) | Skip router itself, skip cache-manager, skip telemetry write. Deterministic no-op decision. |
|
|
25
|
+
| `M` | `fast` | Single Haiku + no checkers. |
|
|
26
|
+
| `L` | `quick` | Sonnet mappers + Haiku verify. |
|
|
27
|
+
| `XL` | `full` | Opus planners + full quality gates. Recommends worktree-isolation default + mandatory inter-stage checkpoint + reflector auto-spawn. |
|
|
28
|
+
|
|
29
|
+
Bucket assignment:
|
|
30
|
+
|
|
31
|
+
| Signal | complexity_class | path |
|
|
32
|
+
|--------|------------------|------|
|
|
33
|
+
| Command is `/gdd:help`, `/gdd:stats`, `/gdd:note`, `/gdd:health`, single-Haiku skill | `S` | `fast` (short-circuited — see below) |
|
|
34
|
+
| Command is `/gdd:scan`, `/gdd:brief`, `/gdd:sketch`, `/gdd:spike`, `/gdd:fast` | `M` | `fast` |
|
|
35
|
+
| Command spawns exactly one agent (no orchestration), not in S list | `M` | `fast` |
|
|
36
|
+
| Command is `/gdd:explore`, `/gdd:discover`, standalone `/gdd:verify`, standalone `/gdd:plan` | `L` | `quick` |
|
|
37
|
+
| Command spawns parallel mappers but no planners/auditors (`/gdd:discover` in `--auto` mode) | `L` | `quick` |
|
|
38
|
+
| Command is `/gdd:next`, `/gdd:do`, `/gdd:autonomous`, end-to-end Brief→Verify, anything spawning planners + auditors + verifiers in series | `XL` | `full` |
|
|
39
|
+
| Command spawns planners, auditors, verifiers, or integration-checkers (`/gdd:plan`, `/gdd:verify`, `/gdd:audit`) and is not standalone | `XL` | `full` |
|
|
40
|
+
| `--dry-run` flag present on any command | downgrade one tier (XL→L→M→S; `path` follows the mapping table) |
|
|
41
|
+
|
|
42
|
+
### S-class short-circuit
|
|
43
|
+
|
|
44
|
+
When `complexity_class` would be `S`, the router itself **does not run** for that invocation — the deterministic skip list is encoded in the `/gdd:*` SKILL.md entry of the matching command. The budget-enforcer hook treats "no router decision payload + matching command name" as the S-class signal and skips enforcement entirely (no telemetry row, no cache lookup, no event emission). When the router *is* invoked explicitly (e.g., debugging) it still emits `complexity_class: "S"` in the JSON for observability, but the runtime path is the no-op.
|
|
45
|
+
|
|
46
|
+
## Cost Estimation Algorithm
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
total = 0
|
|
50
|
+
for each agent in planned spawn graph:
|
|
51
|
+
tier = resolve_tier(agent) # budget.json tier_overrides > agent frontmatter default-tier
|
|
52
|
+
(in_tok, out_tok) = token_range_from_size_budget(agent.size_budget) # from reference/model-prices.md
|
|
53
|
+
(in_rate, out_rate) = price_from_tier(tier)
|
|
54
|
+
total += (in_tok / 1e6) * in_rate + (out_tok / 1e6) * out_rate
|
|
55
|
+
return total
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Runtime-aware model resolution
|
|
59
|
+
|
|
60
|
+
The router emits `resolved_models` alongside `model_tier_overrides` so downstream consumers (budget-enforcer cost computation, Phase 22 cost telemetry, Phase 23.5 bandit posterior store) can read the **concrete model ID** for the active runtime without re-deriving it from the tier name. The resolution is per-agent and additive — `model_tier_overrides` keeps its `opus|sonnet|haiku` enum for back-compat across all 14 runtimes, and `resolved_models` runs the runtime-specific translation on top of it.
|
|
61
|
+
|
|
62
|
+
Computation contract (per D-07):
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
runtime = runtimeDetect.detect() ?? 'claude'
|
|
66
|
+
for each agent in planned spawn graph:
|
|
67
|
+
tier = resolve_tier(agent) # same merge as model_tier_overrides
|
|
68
|
+
resolved_models[agent] = tierResolver.resolve(runtime, tier)
|
|
69
|
+
# → concrete model string OR null
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Implementation surfaces (Phase 26 / Wave A):
|
|
73
|
+
|
|
74
|
+
- `scripts/lib/runtime-detect.cjs` — `detect() → runtime-id | null`. Reads the same `*_CONFIG_DIR` / `*_HOME` env-vars Phase 24's installer uses (single source of truth in `scripts/lib/install/runtimes.cjs`). Returns `null` when no recognized runtime env-var is set; the router falls back to `'claude'` so the resolver always has a runtime ID to work with.
|
|
75
|
+
- `scripts/lib/tier-resolver.cjs` — `resolve(runtime, tier, opts?) → model | null`. Translates `opus|sonnet|haiku` to the concrete model the runtime understands using the `./runtime-models.md` mapping (Phase 26 / Wave A). Fallback chain (D-04): runtime-specific entry → `claude` row default with `tier_resolution_fallback` event → `null` with `tier_resolution_failed` event. Never throws; `null` is a valid output the consumer must handle.
|
|
76
|
+
|
|
77
|
+
Per-agent emission rules:
|
|
78
|
+
|
|
79
|
+
- One key per agent in the planned spawn graph (same key set the cost-estimation loop iterates over). Keys MUST match agent names exactly so consumers can join `resolved_models` against `model_tier_overrides` and the spawn graph by name.
|
|
80
|
+
- Value is the concrete model string returned by `tier-resolver.resolve(runtime, tier)`.
|
|
81
|
+
- When the resolver returns `null` (missing tier-map row, missing tier, garbage input), the value is JSON `null` — NOT omitted, NOT the empty string. Consumers (budget-enforcer, telemetry) MUST handle `null`: typically by skipping the cost row for that spawn and emitting their own diagnostic event, never by crashing.
|
|
82
|
+
- When `complexity_class` is `S` and the router itself short-circuits (see **S-class short-circuit** above), no payload is emitted at all and `resolved_models` does not exist for that invocation — the budget-enforcer's "no router decision payload" branch already handles this case.
|
|
83
|
+
|
|
84
|
+
Back-compat assertion: a router invocation in a Claude runtime (or any environment where `runtime-detect.detect()` returns `null` and the router falls back to `'claude'`) produces `resolved_models` values that are the canonical Anthropic model IDs (`claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5`) for the corresponding tiers. Pre-Phase-26 consumers that ignore `resolved_models` see the same `model_tier_overrides` they always saw (Plan 26-09 owns the runtime fixture diff that asserts this).
|