@ngockhoale/ukit 1.6.0 → 1.6.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngockhoale/ukit",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Install/update an index-first AI workspace for Claude Code, Antigravity, OpenAI Codex, and OpenCode.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -433,6 +433,9 @@ function printRouteState(state) {
433
433
  console.log(`recent-output: ${recentOutputDisplay}`);
434
434
  }
435
435
  console.log(`summary: ${compactSummary}`);
436
+ if (state.routeSummary?.executionContract?.modelTier) {
437
+ console.log(`modelTier: ${state.routeSummary.executionContract.modelTier}`);
438
+ }
436
439
  if (nextDisplay) {
437
440
  console.log(`next: ${nextDisplay}`);
438
441
  }
@@ -1655,6 +1658,7 @@ function buildExecutionContract(executionMode = null) {
1655
1658
 
1656
1659
  const contracts = {
1657
1660
  'tiny-fix': {
1661
+ modelTier: 'lite',
1658
1662
  maxReadPasses: 0,
1659
1663
  maxContextPulls: 0,
1660
1664
  verificationPolicy: 'minimal-or-targeted',
@@ -1663,6 +1667,7 @@ function buildExecutionContract(executionMode = null) {
1663
1667
  completionEvidence: ['write-evidence'],
1664
1668
  },
1665
1669
  'local-fix': {
1670
+ modelTier: 'code',
1666
1671
  maxReadPasses: 1,
1667
1672
  maxContextPulls: 1,
1668
1673
  verificationPolicy: 'targeted-if-covered',
@@ -1671,6 +1676,7 @@ function buildExecutionContract(executionMode = null) {
1671
1676
  completionEvidence: ['write-evidence'],
1672
1677
  },
1673
1678
  'local-build': {
1679
+ modelTier: 'code',
1674
1680
  maxReadPasses: 2,
1675
1681
  maxContextPulls: 1,
1676
1682
  verificationPolicy: 'targeted-if-covered',
@@ -1679,6 +1685,7 @@ function buildExecutionContract(executionMode = null) {
1679
1685
  completionEvidence: ['write-evidence'],
1680
1686
  },
1681
1687
  'find-cause': {
1688
+ modelTier: 'smart',
1682
1689
  maxReadPassesBeforeReassess: 3,
1683
1690
  verificationPolicy: 'root-cause-then-targeted',
1684
1691
  completionRule: 'never-claim-fixed-without-write-and-verification',
@@ -1686,6 +1693,7 @@ function buildExecutionContract(executionMode = null) {
1686
1693
  completionEvidence: ['write-evidence', 'verification-evidence'],
1687
1694
  },
1688
1695
  'shared-edit': {
1696
+ modelTier: 'code',
1689
1697
  maxReadPasses: 2,
1690
1698
  maxContextPulls: 2,
1691
1699
  verificationPolicy: 'targeted-then-widen-on-risk',
@@ -1695,6 +1703,7 @@ function buildExecutionContract(executionMode = null) {
1695
1703
  mirrorConsistencyRequired: true,
1696
1704
  },
1697
1705
  'map-impact': {
1706
+ modelTier: 'smart',
1698
1707
  maxReadPasses: 3,
1699
1708
  maxContextPulls: 3,
1700
1709
  verificationPolicy: 'impact-first-then-targeted-then-widen-on-risk',
@@ -1704,6 +1713,7 @@ function buildExecutionContract(executionMode = null) {
1704
1713
  mirrorConsistencyRequired: true,
1705
1714
  },
1706
1715
  'review-release': {
1716
+ modelTier: 'smart',
1707
1717
  verificationPolicy: 'evidence-first',
1708
1718
  completionRule: 'report-findings-not-implementation',
1709
1719
  delegationPolicy: 'allow-review-sidecar',
@@ -136,6 +136,32 @@ Khi Handoff mode: đọc `docs/AI_HANDOFF/RULES.md` để biết 4 phase (Idea+P
136
136
  - `autonomy.level` in `.ukit/storage/config.json` controls how much UKit acts without asking first: `conservative` (ask more), `balanced` (default), `free-run` (auto-run more).
137
137
  - End users should not need to change this; maintainers may tune it per-project.
138
138
 
139
+ ## 3-Tier Model Routing
140
+
141
+ **Internal orchestration only — end users still just use natural language. No new commands.**
142
+
143
+ UKit routes tasks to one of three model tiers based on task complexity:
144
+
145
+ | Tier | Generic alias | Claude model | Typical tasks |
146
+ |------|--------------|--------------|---------------|
147
+ | lite | `unic-lite` | claude-haiku | Reads, git queries, bash summaries, small doc edits |
148
+ | code | `unic-code` | claude-sonnet | Normal coding, local fixes, shared edits, builds |
149
+ | smart | `unic-smart` | claude-opus | Deep reasoning, root-cause analysis, release review |
150
+
151
+ ### Contract-to-tier mapping
152
+
153
+ | Contract | Tier |
154
+ |----------|------|
155
+ | `tiny-fix` | lite |
156
+ | `local-fix`, `local-build`, `shared-edit` | code |
157
+ | `find-cause`, `map-impact`, `review-release` | smart |
158
+
159
+ ### Escalation rule
160
+
161
+ When the same file or symbol fails `debugLoopThreshold` (default: 2) times in one session, UKit routes the next attempt one tier higher (capped at `smart`). Config: `orchestration.escalation` in `.ukit/storage/config.json`.
162
+
163
+ This is internal orchestration — end users do not need to know about tiers, thresholds, or escalation. The AI handles routing transparently.
164
+
139
165
  ## Project Snapshot
140
166
 
141
167
  - Project: {{project.name}} | Root: {{project.root}}