@mrciphersmith/keryx 0.3.0 → 0.3.1

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.
Files changed (89) hide show
  1. package/README.md +4 -1
  2. package/dist/cli.js +8451 -4817
  3. package/dist/core.js +11700 -11374
  4. package/package.json +1 -1
  5. package/src/gdskills/bundled/agents/go-code-auditor.md +1 -1
  6. package/src/gdskills/bundled/agents/python-code-auditor.md +1 -1
  7. package/src/gdskills/bundled/install-manifest.json +271 -4
  8. package/src/gdskills/bundled/rules/core/model-selection.mdc +51 -0
  9. package/src/gdskills/bundled/skills/review/review-jev-rules/SKILL.md +267 -0
  10. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +26 -0
  11. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +1 -1
  12. package/src/gdskills/bundled/stacks/angular/agent-refs.json +4 -0
  13. package/src/gdskills/bundled/stacks/angular/governance/eval.json +1751 -0
  14. package/src/gdskills/bundled/stacks/angular/governance/scout.json +32 -0
  15. package/src/gdskills/bundled/stacks/angular/pack.json +55 -0
  16. package/src/gdskills/bundled/stacks/angular/rules/coding-style.mdc +82 -0
  17. package/src/gdskills/bundled/stacks/angular/rules/patterns.mdc +84 -0
  18. package/src/gdskills/bundled/stacks/angular/rules/security.mdc +70 -0
  19. package/src/gdskills/bundled/stacks/angular/rules/testing.mdc +73 -0
  20. package/src/gdskills/bundled/stacks/angular/skills/angular-build-fix/SKILL.md +127 -0
  21. package/src/gdskills/bundled/stacks/angular/skills/angular-build-fix/evals.json +72 -0
  22. package/src/gdskills/bundled/stacks/angular/skills/angular-code-review/SKILL.md +98 -0
  23. package/src/gdskills/bundled/stacks/angular/skills/angular-code-review/evals.json +73 -0
  24. package/src/gdskills/bundled/stacks/angular/skills/angular-implementation/SKILL.md +112 -0
  25. package/src/gdskills/bundled/stacks/angular/skills/angular-implementation/evals.json +74 -0
  26. package/src/gdskills/bundled/stacks/angular/skills/angular-testing/SKILL.md +102 -0
  27. package/src/gdskills/bundled/stacks/angular/skills/angular-testing/evals.json +71 -0
  28. package/src/gdskills/bundled/stacks/mobx/agent-refs.json +4 -0
  29. package/src/gdskills/bundled/stacks/mobx/governance/eval.json +904 -0
  30. package/src/gdskills/bundled/stacks/mobx/governance/scout.json +18 -0
  31. package/src/gdskills/bundled/stacks/mobx/pack.json +28 -0
  32. package/src/gdskills/bundled/stacks/mobx/rules/coding-style.mdc +91 -0
  33. package/src/gdskills/bundled/stacks/mobx/rules/patterns.mdc +122 -0
  34. package/src/gdskills/bundled/stacks/mobx/rules/security.mdc +56 -0
  35. package/src/gdskills/bundled/stacks/mobx/rules/testing.mdc +63 -0
  36. package/src/gdskills/bundled/stacks/mobx/skills/mobx-observable-testing/SKILL.md +124 -0
  37. package/src/gdskills/bundled/stacks/mobx/skills/mobx-observable-testing/evals.json +73 -0
  38. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +149 -0
  39. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/evals.json +74 -0
  40. package/src/gdskills/bundled/stacks/nestjs/agent-refs.json +4 -0
  41. package/src/gdskills/bundled/stacks/nestjs/governance/eval.json +1308 -0
  42. package/src/gdskills/bundled/stacks/nestjs/governance/scout.json +34 -0
  43. package/src/gdskills/bundled/stacks/nestjs/pack.json +53 -0
  44. package/src/gdskills/bundled/stacks/nestjs/rules/coding-style.mdc +70 -0
  45. package/src/gdskills/bundled/stacks/nestjs/rules/patterns.mdc +83 -0
  46. package/src/gdskills/bundled/stacks/nestjs/rules/security.mdc +73 -0
  47. package/src/gdskills/bundled/stacks/nestjs/rules/testing.mdc +69 -0
  48. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-build-fix/SKILL.md +157 -0
  49. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-build-fix/evals.json +70 -0
  50. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-implementation/SKILL.md +129 -0
  51. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-implementation/evals.json +71 -0
  52. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-testing/SKILL.md +143 -0
  53. package/src/gdskills/bundled/stacks/nestjs/skills/nestjs-testing/evals.json +69 -0
  54. package/src/gdskills/bundled/stacks/nextjs-nuxt/agent-refs.json +4 -0
  55. package/src/gdskills/bundled/stacks/nextjs-nuxt/governance/eval.json +2413 -0
  56. package/src/gdskills/bundled/stacks/nextjs-nuxt/governance/scout.json +42 -0
  57. package/src/gdskills/bundled/stacks/nextjs-nuxt/pack.json +42 -0
  58. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/coding-style.mdc +69 -0
  59. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/patterns.mdc +88 -0
  60. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/security.mdc +72 -0
  61. package/src/gdskills/bundled/stacks/nextjs-nuxt/rules/testing.mdc +64 -0
  62. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-build-fix/SKILL.md +147 -0
  63. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-build-fix/evals.json +75 -0
  64. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-code-review/SKILL.md +118 -0
  65. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-code-review/evals.json +76 -0
  66. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-implementation/SKILL.md +135 -0
  67. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-implementation/evals.json +78 -0
  68. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-testing/SKILL.md +116 -0
  69. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-testing/evals.json +75 -0
  70. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-upgrade-migration/SKILL.md +134 -0
  71. package/src/gdskills/bundled/stacks/nextjs-nuxt/skills/nextjs-nuxt-upgrade-migration/evals.json +76 -0
  72. package/src/gdskills/bundled/stacks/vue/agent-refs.json +4 -0
  73. package/src/gdskills/bundled/stacks/vue/governance/eval.json +2215 -0
  74. package/src/gdskills/bundled/stacks/vue/governance/scout.json +42 -0
  75. package/src/gdskills/bundled/stacks/vue/pack.json +42 -0
  76. package/src/gdskills/bundled/stacks/vue/rules/coding-style.mdc +73 -0
  77. package/src/gdskills/bundled/stacks/vue/rules/patterns.mdc +84 -0
  78. package/src/gdskills/bundled/stacks/vue/rules/security.mdc +60 -0
  79. package/src/gdskills/bundled/stacks/vue/rules/testing.mdc +69 -0
  80. package/src/gdskills/bundled/stacks/vue/skills/vue-build-fix/SKILL.md +137 -0
  81. package/src/gdskills/bundled/stacks/vue/skills/vue-build-fix/evals.json +72 -0
  82. package/src/gdskills/bundled/stacks/vue/skills/vue-code-review/SKILL.md +120 -0
  83. package/src/gdskills/bundled/stacks/vue/skills/vue-code-review/evals.json +71 -0
  84. package/src/gdskills/bundled/stacks/vue/skills/vue-implementation/SKILL.md +122 -0
  85. package/src/gdskills/bundled/stacks/vue/skills/vue-implementation/evals.json +72 -0
  86. package/src/gdskills/bundled/stacks/vue/skills/vue-testing/SKILL.md +115 -0
  87. package/src/gdskills/bundled/stacks/vue/skills/vue-testing/evals.json +72 -0
  88. package/src/gdskills/bundled/stacks/vue/skills/vue2-to-vue3-migration/SKILL.md +135 -0
  89. package/src/gdskills/bundled/stacks/vue/skills/vue2-to-vue3-migration/evals.json +71 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  schema_version: 1
3
3
  name: "go-code-auditor"
4
- description: "Reviews Go code, read-only, for the 6 stack-specific risk patterns this pack's governance gate has confirmed for go (correctness, resource, and security patterns particular to Go). Dispatched for a stack-specific code-quality pass distinct from generic review, gated the same stack_requires-style way review-orchestrator already uses for per-stack reviewers."
4
+ description: "Reviews Go code, read-only, for the 6 stack-specific risk patterns this pack's authors documented for go (correctness, resource, and security patterns particular to Go). Dispatched for a stack-specific code-quality pass distinct from generic review, gated the same stack_requires-style way review-orchestrator already uses for per-stack reviewers."
5
5
  role: "A Go-focused code auditor who reads for this stack's known risk patterns without editing anything, and ranks findings by real-world impact rather than listing every theoretical concern equally."
6
6
  tools:
7
7
  - "read_file"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  schema_version: 1
3
3
  name: "python-code-auditor"
4
- description: "Reviews Python code, read-only, for the 6 stack-specific risk patterns this pack's governance gate has confirmed for python (correctness, resource, and security patterns particular to Python). Dispatched for a stack-specific code-quality pass distinct from generic review, gated the same stack_requires-style way review-orchestrator already uses for per-stack reviewers."
4
+ description: "Reviews Python code, read-only, for the 6 stack-specific risk patterns this pack's authors documented for python (correctness, resource, and security patterns particular to Python). Dispatched for a stack-specific code-quality pass distinct from generic review, gated the same stack_requires-style way review-orchestrator already uses for per-stack reviewers."
5
5
  role: "A Python-focused code auditor who reads for this stack's known risk patterns without editing anything, and ranks findings by real-world impact rather than listing every theoretical concern equally."
6
6
  tools:
7
7
  - "read_file"
@@ -78,6 +78,44 @@
78
78
  ],
79
79
  "stackDetectionAware": true
80
80
  },
81
+ "vue": {
82
+ "description": "Common rules plus the Vue stack pack component (`vue-rules` + `vue-skills`, from src/gdskills/bundled/stacks/vue/), installed when `keryx stack detect` finds a matching tag.",
83
+ "modules": [
84
+ "core-common-rules",
85
+ "skill-lifecycle"
86
+ ],
87
+ "components": [
88
+ "framework:vue",
89
+ "lang:ts-js-node"
90
+ ],
91
+ "stackDetectionAware": true
92
+ },
93
+ "angular": {
94
+ "description": "Common rules plus the Angular stack pack component (`angular-rules` + `angular-skills`, from src/gdskills/bundled/stacks/angular/), installed when `keryx stack detect` finds a matching tag.",
95
+ "modules": [
96
+ "core-common-rules",
97
+ "skill-lifecycle"
98
+ ],
99
+ "components": [
100
+ "framework:angular",
101
+ "lang:ts-js-node"
102
+ ],
103
+ "stackDetectionAware": true
104
+ },
105
+ "nextjs-nuxt": {
106
+ "description": "Common rules plus the Next.js/Nuxt meta-framework stack pack component (`nextjs-nuxt-rules` + `nextjs-nuxt-skills`, from src/gdskills/bundled/stacks/nextjs-nuxt/) alongside its React and Vue bases, installed when `keryx stack detect` finds a matching tag (nextjs or nuxt).",
107
+ "modules": [
108
+ "core-common-rules",
109
+ "skill-lifecycle"
110
+ ],
111
+ "components": [
112
+ "framework:react",
113
+ "framework:vue",
114
+ "framework:nextjs-nuxt",
115
+ "lang:ts-js-node"
116
+ ],
117
+ "stackDetectionAware": true
118
+ },
81
119
  "full": {
82
120
  "description": "Every registered module and component, unconditionally.",
83
121
  "modules": [
@@ -89,8 +127,12 @@
89
127
  "react-review-skills",
90
128
  "mobx-review-skill",
91
129
  "mobx-store-template-rule",
130
+ "mobx-rules",
131
+ "mobx-skills",
92
132
  "nestjs-review-skill",
93
133
  "nestjs-dto-rule",
134
+ "nestjs-rules",
135
+ "nestjs-skills",
94
136
  "python-rules",
95
137
  "python-skills",
96
138
  "ts-js-node-rules",
@@ -98,7 +140,13 @@
98
140
  "react-rules",
99
141
  "react-skills",
100
142
  "go-rules",
101
- "go-skills"
143
+ "go-skills",
144
+ "vue-rules",
145
+ "vue-skills",
146
+ "angular-rules",
147
+ "angular-skills",
148
+ "nextjs-nuxt-rules",
149
+ "nextjs-nuxt-skills"
102
150
  ],
103
151
  "components": [
104
152
  "lang:ts-js-node",
@@ -106,7 +154,10 @@
106
154
  "capability:mobx",
107
155
  "framework:nestjs",
108
156
  "lang:python",
109
- "lang:go"
157
+ "lang:go",
158
+ "framework:vue",
159
+ "framework:angular",
160
+ "framework:nextjs-nuxt"
110
161
  ]
111
162
  }
112
163
  },
@@ -441,6 +492,178 @@
441
492
  "defaultInstall": true,
442
493
  "cost": "medium",
443
494
  "stability": "stable"
495
+ },
496
+ "nestjs-rules": {
497
+ "kind": "rule",
498
+ "description": "NestJS stack pack rules (coding-style, patterns, security, testing; scoped to *.ts) from src/gdskills/bundled/stacks/nestjs/rules/. Complements, does not replace, the existing nestjs-dto-rule.",
499
+ "paths": [
500
+ "src/gdskills/bundled/stacks/nestjs/rules/*.mdc"
501
+ ],
502
+ "targets": [
503
+ "claude",
504
+ "keryx-shell"
505
+ ],
506
+ "dependencies": [
507
+ "ts-js-node-rules"
508
+ ],
509
+ "defaultInstall": true,
510
+ "cost": "light",
511
+ "stability": "experimental"
512
+ },
513
+ "nestjs-skills": {
514
+ "kind": "skill",
515
+ "description": "NestJS stack pack skills (implementation, testing, build-fix) from src/gdskills/bundled/stacks/nestjs/skills/. Complements, does not replace, the existing nestjs-review-skill (review-backend).",
516
+ "paths": [
517
+ "src/gdskills/bundled/stacks/nestjs/skills/**"
518
+ ],
519
+ "targets": [
520
+ "claude",
521
+ "keryx-shell"
522
+ ],
523
+ "dependencies": [
524
+ "ts-js-node-skills"
525
+ ],
526
+ "defaultInstall": true,
527
+ "cost": "medium",
528
+ "stability": "experimental"
529
+ },
530
+ "vue-rules": {
531
+ "kind": "rule",
532
+ "description": "Vue stack pack rules (coding-style, patterns, security, testing; scoped to *.vue) from src/gdskills/bundled/stacks/vue/rules/.",
533
+ "paths": [
534
+ "src/gdskills/bundled/stacks/vue/rules/*.mdc"
535
+ ],
536
+ "targets": [
537
+ "claude",
538
+ "keryx-shell"
539
+ ],
540
+ "dependencies": [
541
+ "ts-js-node-rules"
542
+ ],
543
+ "defaultInstall": true,
544
+ "cost": "light",
545
+ "stability": "experimental"
546
+ },
547
+ "vue-skills": {
548
+ "kind": "skill",
549
+ "description": "Vue stack pack skills (implementation, testing, code review, build-fix, Vue 2 to Vue 3 migration) from src/gdskills/bundled/stacks/vue/skills/.",
550
+ "paths": [
551
+ "src/gdskills/bundled/stacks/vue/skills/**"
552
+ ],
553
+ "targets": [
554
+ "claude",
555
+ "keryx-shell"
556
+ ],
557
+ "dependencies": [
558
+ "ts-js-node-skills"
559
+ ],
560
+ "defaultInstall": true,
561
+ "cost": "medium",
562
+ "stability": "experimental"
563
+ },
564
+ "angular-rules": {
565
+ "kind": "rule",
566
+ "description": "Angular stack pack rules (coding-style, patterns, security, testing; scoped to *.ts/*.html) from src/gdskills/bundled/stacks/angular/rules/.",
567
+ "paths": [
568
+ "src/gdskills/bundled/stacks/angular/rules/*.mdc"
569
+ ],
570
+ "targets": [
571
+ "claude",
572
+ "keryx-shell"
573
+ ],
574
+ "dependencies": [
575
+ "ts-js-node-rules"
576
+ ],
577
+ "defaultInstall": true,
578
+ "cost": "light",
579
+ "stability": "experimental"
580
+ },
581
+ "angular-skills": {
582
+ "kind": "skill",
583
+ "description": "Angular stack pack skills (implementation, testing, code review, build-fix) from src/gdskills/bundled/stacks/angular/skills/.",
584
+ "paths": [
585
+ "src/gdskills/bundled/stacks/angular/skills/**"
586
+ ],
587
+ "targets": [
588
+ "claude",
589
+ "keryx-shell"
590
+ ],
591
+ "dependencies": [
592
+ "ts-js-node-skills"
593
+ ],
594
+ "defaultInstall": true,
595
+ "cost": "medium",
596
+ "stability": "experimental"
597
+ },
598
+ "nextjs-nuxt-rules": {
599
+ "kind": "rule",
600
+ "description": "Next.js/Nuxt meta-framework stack pack rules (coding-style, patterns, security, testing; scoped to *.tsx/*.jsx/*.vue) from src/gdskills/bundled/stacks/nextjs-nuxt/rules/.",
601
+ "paths": [
602
+ "src/gdskills/bundled/stacks/nextjs-nuxt/rules/*.mdc"
603
+ ],
604
+ "targets": [
605
+ "claude",
606
+ "keryx-shell"
607
+ ],
608
+ "dependencies": [
609
+ "react-rules",
610
+ "vue-rules"
611
+ ],
612
+ "defaultInstall": true,
613
+ "cost": "light",
614
+ "stability": "experimental"
615
+ },
616
+ "nextjs-nuxt-skills": {
617
+ "kind": "skill",
618
+ "description": "Next.js/Nuxt meta-framework stack pack skills (implementation, testing, code review, build-fix, upgrade migration) from src/gdskills/bundled/stacks/nextjs-nuxt/skills/.",
619
+ "paths": [
620
+ "src/gdskills/bundled/stacks/nextjs-nuxt/skills/**"
621
+ ],
622
+ "targets": [
623
+ "claude",
624
+ "keryx-shell"
625
+ ],
626
+ "dependencies": [
627
+ "react-skills",
628
+ "vue-skills"
629
+ ],
630
+ "defaultInstall": true,
631
+ "cost": "medium",
632
+ "stability": "experimental"
633
+ },
634
+ "mobx-rules": {
635
+ "kind": "rule",
636
+ "description": "MobX stack pack rules (coding-style, patterns, security, testing; scoped to *.ts/*.tsx) from src/gdskills/bundled/stacks/mobx/rules/. Complements, does not replace, the existing mobx-store-template-rule.",
637
+ "paths": [
638
+ "src/gdskills/bundled/stacks/mobx/rules/*.mdc"
639
+ ],
640
+ "targets": [
641
+ "claude",
642
+ "keryx-shell"
643
+ ],
644
+ "dependencies": [
645
+ "react-rules"
646
+ ],
647
+ "defaultInstall": true,
648
+ "cost": "light",
649
+ "stability": "experimental"
650
+ },
651
+ "mobx-skills": {
652
+ "kind": "skill",
653
+ "description": "MobX stack pack skills (store implementation, observable testing) from src/gdskills/bundled/stacks/mobx/skills/. Complements, does not replace, the existing mobx-review-skill (code-mobx-store-review).",
654
+ "paths": [
655
+ "src/gdskills/bundled/stacks/mobx/skills/**"
656
+ ],
657
+ "targets": [
658
+ "claude",
659
+ "keryx-shell"
660
+ ],
661
+ "dependencies": [
662
+ "react-skills"
663
+ ],
664
+ "defaultInstall": true,
665
+ "cost": "medium",
666
+ "stability": "experimental"
444
667
  }
445
668
  },
446
669
  "components": {
@@ -478,7 +701,9 @@
478
701
  "family": "capability",
479
702
  "modules": [
480
703
  "mobx-review-skill",
481
- "mobx-store-template-rule"
704
+ "mobx-store-template-rule",
705
+ "mobx-rules",
706
+ "mobx-skills"
482
707
  ],
483
708
  "detectionMarkers": [
484
709
  "mobx"
@@ -491,7 +716,9 @@
491
716
  "family": "framework",
492
717
  "modules": [
493
718
  "nestjs-review-skill",
494
- "nestjs-dto-rule"
719
+ "nestjs-dto-rule",
720
+ "nestjs-rules",
721
+ "nestjs-skills"
495
722
  ],
496
723
  "detectionMarkers": [
497
724
  "nestjs"
@@ -525,6 +752,46 @@
525
752
  "provenance": {
526
753
  "origin": "authored"
527
754
  }
755
+ },
756
+ "framework:vue": {
757
+ "family": "framework",
758
+ "modules": [
759
+ "vue-rules",
760
+ "vue-skills"
761
+ ],
762
+ "detectionMarkers": [
763
+ "vue"
764
+ ],
765
+ "provenance": {
766
+ "origin": "authored"
767
+ }
768
+ },
769
+ "framework:angular": {
770
+ "family": "framework",
771
+ "modules": [
772
+ "angular-rules",
773
+ "angular-skills"
774
+ ],
775
+ "detectionMarkers": [
776
+ "angular"
777
+ ],
778
+ "provenance": {
779
+ "origin": "authored"
780
+ }
781
+ },
782
+ "framework:nextjs-nuxt": {
783
+ "family": "framework",
784
+ "modules": [
785
+ "nextjs-nuxt-rules",
786
+ "nextjs-nuxt-skills"
787
+ ],
788
+ "detectionMarkers": [
789
+ "nextjs",
790
+ "nuxt"
791
+ ],
792
+ "provenance": {
793
+ "origin": "authored"
794
+ }
528
795
  }
529
796
  }
530
797
  }
@@ -83,6 +83,57 @@ residue, and it is kept in the smallest shape that works:
83
83
  A model whose name is a codename carrying no size is unrankable by design. That
84
84
  is the honest outcome, not a gap to be patched with folklore.
85
85
 
86
+ **Version is deliberately not ranked here.** `rankModelId` never parses a
87
+ version number out of an id — two ids in the same size-word family but a
88
+ different generation (an older vs. a newer numbered release of the same
89
+ line) rank IDENTICALLY through this resolution, and a
90
+ `standard`/`light`/`deep` dispatch never distinguishes between them. That
91
+ stays true for `spawn_subagent` and `keryx review tier` after the decision
92
+ below; it is a DIFFERENT consumer's rule, not this one's.
93
+
94
+ The routing "derived default table" (`deriveDefaultTable`,
95
+ `src/harness/routing/derive-default-table.ts`, flow 327/PRD §6.3) is that
96
+ different consumer: it picks one model per routing category (`review`,
97
+ `subagents`, `quick`, …) from a whole connected catalogue, not a tier
98
+ relative to the session. The operator decided, 2026-09-25 (review of PR #718:
99
+ a session's newer release lost a tie to an older release of the SAME family
100
+ it should have beaten), that WITHIN the same family and vendor a newer
101
+ version ranks higher there — the family word (a size marker from this same
102
+ `MODEL_RANK_HINTS` list) already carries the size class, so version is free
103
+ to order generations within it. That table reuses
104
+ `rankModelId`/`MODEL_RANK_HINTS` UNMODIFIED for the size axis and adds its
105
+ own separate, conservative version parse on top of it — nothing above
106
+ changes for this module's own tier resolution.
107
+
108
+ That version parse (`parseModelVersion`/`familyKey`, round 2) reads BOTH a
109
+ dotted id (`vendor-opus-5.5`, `gemini-3.8-flash`) and a real
110
+ Anthropic-style HYPHENATED one, where a run of 2-3 adjacent short (1-2
111
+ digit) numeric tokens reads as a dotted version (`vendor-opus-4-8` → `4.8`).
112
+ It still refuses a date/snapshot-shaped token (6-8 bare digits) and more
113
+ than one numeric group in the same id — no version rather than a guess. A
114
+ `gpt-4o`-style id (a short number plus one trailing letter) parses the
115
+ number alone as the version, the letter kept only as an ignored variant
116
+ tag, so `gpt-4o` and `gpt-4.1` compare within the same family instead of
117
+ never comparing at all. Two versions of the same family are never decided
118
+ by alphabetical order — the id-string fallback only applies when neither
119
+ side has a parseable version.
120
+
121
+ **A parameter-size token is never a version (round 3, review of PR #718).**
122
+ `7b`, `32b`, `70b`, `1.5b`, `8x7b` — a total or MoE "N experts x M billion"
123
+ param count — always stay in `familyKey` and are never fed to
124
+ `parseModelVersion`. Before this fix, the letter-variant shape meant for
125
+ `gpt-4o` (`/^(\d{1,2})([a-z])$/`, any trailing lowercase letter) also
126
+ matched a size token, so `qwen2.5-coder-7b` and `qwen2.5-coder-32b` were
127
+ misread as the SAME family at "version" 7 vs. 32 — merging two genuinely
128
+ different-sized models and ranking the smaller one "newer". The letter
129
+ variant is now restricted to the one real vendor shape that needs it
130
+ (`4o`'s trailing `o`); every other trailing letter after a short digit run
131
+ is a size suffix, so `qwen2.5-coder-7b`/`qwen2.5-coder-32b` and
132
+ `llama-3.3-70b`/`llama-3.3-8b` key to different families and are never
133
+ version-compared against each other. A trailing `-latest`/`-preview` alias
134
+ word is also stripped from `familyKey` only (never from the id itself), so
135
+ `vendor-3-7-sonnet-latest` joins the same family as `vendor-sonnet-5`.
136
+
86
137
  ## Falling back
87
138
 
88
139
  Ranking is **refused**, and every tier keeps the session's provider and model,