@ngockhoale/ukit 2.1.4 → 2.1.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to UKit are documented here.
|
|
4
4
|
|
|
5
|
+
## 2.1.5 - 2026-08-19
|
|
6
|
+
|
|
7
|
+
`local-build` was the one execution contract in the daily (non-handoff) flow that let the executor claim done off write evidence alone — and it is also the busiest lane a weaker `unic-code` backend hits. This closes that gap and adds a non-blocking second opinion, without adding wait time to the main task.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **`local-build` now requires verification evidence, not just write evidence, before claiming done.** `orchestration.contracts['local-build'].completionRule` was `require-write`; every other multi-step contract (`shared-edit`, `find-cause`, `map-impact`) already required verification too, so `local-build` was the odd one out — the exact lane where a weaker executor model producing "silly bugs" that pass a glance but fail a real check would go unnoticed. `completionEvidence` now includes `verification-evidence` alongside `write-evidence` in `src/index/taskRouting.js`, mirrored in `src/core/runtimeConfig.js` and both `config.json` copies. `tests/index/taskRouting.test.js` and `tests/core/runtimeConfig.test.js` lock the new requirement.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Non-blocking sidecar diff review for `local-build` and `shared-edit`.** After write + verification evidence exist for one of these tasks, routed state now carries a `review=code-reviewer(diff)` segment (`routeSummary.postEditReview`) instructing the agent to launch `code-reviewer` in the background (`run_in_background: true`, `REVIEW_TARGET_TYPE=diff`, model `unic-smart` per the new `subagents.diffReviewModel`) — reusing the reviewer-model-differs-from-executor precedent from `handoff.reviewer`, since a background pass can afford a stronger model without slowing the main task down. Findings are advisory only; the main task's completion is never blocked or reopened on their account. New `code-reviewer.md` mode: `REVIEW_TARGET_TYPE=diff`, documented in `templates/.claude/agents/code-reviewer.md` (mirrored byte-identically to `.claude/agents/code-reviewer.md`) and wired into `templates/CLAUDE.md` / this repo's own `CLAUDE.md` under "Post-Edit Sidecar Review (internal)".
|
|
16
|
+
- **`subagents.diffReviewEnabled` / `diffReviewAgent` / `diffReviewModel`** — new config fields in both `.ukit/storage/config.json` and `templates/ukit/storage/config.json`, defaulting to `true` / `code-reviewer` / `unic-smart`.
|
|
17
|
+
|
|
5
18
|
## 2.1.4 - 2026-08-19
|
|
6
19
|
|
|
7
20
|
More room before compaction, the handoff hooks stop taxing every call they were meant to speed up, and the shipped handoff instructions stop contradicting the config they tell agents to read.
|
package/package.json
CHANGED
|
@@ -145,8 +145,9 @@ export function buildDefaultRuntimeConfig(overrides = {}) {
|
|
|
145
145
|
maxReadPasses: 2,
|
|
146
146
|
maxContextPulls: 1,
|
|
147
147
|
verificationPolicy: 'targeted-if-covered',
|
|
148
|
-
completionRule: 'require-write',
|
|
148
|
+
completionRule: 'require-write-and-verification',
|
|
149
149
|
delegationPolicy: 'disallow-by-default',
|
|
150
|
+
postEditReviewPolicy: 'sidecar-non-blocking',
|
|
150
151
|
},
|
|
151
152
|
'find-cause': {
|
|
152
153
|
maxReadPassesBeforeReassess: 3,
|
|
@@ -160,6 +161,7 @@ export function buildDefaultRuntimeConfig(overrides = {}) {
|
|
|
160
161
|
verificationPolicy: 'targeted-then-widen-on-risk',
|
|
161
162
|
completionRule: 'require-write-and-verification',
|
|
162
163
|
delegationPolicy: 'allow-qualified-sidecar',
|
|
164
|
+
postEditReviewPolicy: 'sidecar-non-blocking',
|
|
163
165
|
},
|
|
164
166
|
'map-impact': {
|
|
165
167
|
maxReadPasses: 3,
|
|
@@ -224,6 +226,9 @@ export function buildDefaultRuntimeConfig(overrides = {}) {
|
|
|
224
226
|
enabled: true,
|
|
225
227
|
smallTaskModel: 'unic-lite',
|
|
226
228
|
smallTaskAgent: 'ukit-small-task-maintainer',
|
|
229
|
+
diffReviewEnabled: true,
|
|
230
|
+
diffReviewAgent: 'code-reviewer',
|
|
231
|
+
diffReviewModel: 'unic-smart',
|
|
227
232
|
visionEnabled: true,
|
|
228
233
|
visionModel: 'unic-vision',
|
|
229
234
|
visionAgent: 'ukit-vision-analyst',
|
package/src/index/taskRouting.js
CHANGED
|
@@ -235,6 +235,9 @@ export function buildRouteSummary({
|
|
|
235
235
|
executionCandidates,
|
|
236
236
|
});
|
|
237
237
|
const executionContract = buildExecutionContract(executionMode);
|
|
238
|
+
const postEditReview = executionContract?.postEditReviewPolicy
|
|
239
|
+
? { policy: executionContract.postEditReviewPolicy, agent: 'code-reviewer', reviewTargetType: 'diff' }
|
|
240
|
+
: null;
|
|
238
241
|
const completionState = buildCompletionState({
|
|
239
242
|
executionMode,
|
|
240
243
|
verificationRecommendation,
|
|
@@ -263,6 +266,7 @@ export function buildRouteSummary({
|
|
|
263
266
|
editGuardHint ? `editGuard=${editGuardHint}` : null,
|
|
264
267
|
delegationRecommendation?.hint ? `delegate=${delegationRecommendation.hint}` : null,
|
|
265
268
|
policyMode ? `policy=${policyMode}` : null,
|
|
269
|
+
postEditReview ? `review=${postEditReview.agent}(${postEditReview.reviewTargetType})` : null,
|
|
266
270
|
handoffBudget?.warning ? `budget=${handoffBudget.warning}` : null,
|
|
267
271
|
worklogBudget?.warning ? `budget=${worklogBudget.warning}` : null,
|
|
268
272
|
].filter(Boolean).join(' | ');
|
|
@@ -279,6 +283,7 @@ export function buildRouteSummary({
|
|
|
279
283
|
approachSelector,
|
|
280
284
|
executionContract,
|
|
281
285
|
completionState,
|
|
286
|
+
postEditReview,
|
|
282
287
|
continuationState,
|
|
283
288
|
intentMode: routingContext.intentMode ?? null,
|
|
284
289
|
handoffFile,
|
|
@@ -580,9 +585,10 @@ function buildExecutionContract(executionMode = null) {
|
|
|
580
585
|
maxReadPasses: 2,
|
|
581
586
|
maxContextPulls: 1,
|
|
582
587
|
verificationPolicy: 'targeted-if-covered',
|
|
583
|
-
completionRule: 'require-write',
|
|
588
|
+
completionRule: 'require-write-and-verification',
|
|
584
589
|
delegationPolicy: 'disallow-by-default',
|
|
585
|
-
completionEvidence: ['write-evidence'],
|
|
590
|
+
completionEvidence: ['write-evidence', 'verification-evidence'],
|
|
591
|
+
postEditReviewPolicy: 'sidecar-non-blocking',
|
|
586
592
|
},
|
|
587
593
|
'find-cause': {
|
|
588
594
|
maxReadPassesBeforeReassess: 3,
|
|
@@ -599,6 +605,7 @@ function buildExecutionContract(executionMode = null) {
|
|
|
599
605
|
delegationPolicy: 'allow-qualified-sidecar',
|
|
600
606
|
completionEvidence: ['write-evidence', 'verification-evidence'],
|
|
601
607
|
mirrorConsistencyRequired: true,
|
|
608
|
+
postEditReviewPolicy: 'sidecar-non-blocking',
|
|
602
609
|
},
|
|
603
610
|
'map-impact': {
|
|
604
611
|
maxReadPasses: 3,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-reviewer
|
|
3
|
-
description: "Independent reviewer for handoff Phase 3,
|
|
3
|
+
description: "Independent reviewer for handoff Phase 3, for spec/plan documents, and for non-blocking sidecar diff review of daily-flow edits. For code (default): use after executor reports STATUS: DONE on a handoff task, MUST run with a model different from the executor (configured in .ukit/storage/config.json → handoff.reviewer.model, default unic-smart), produces a verdict: APPROVED | APPROVED-WITH-MINOR | CHANGES-REQUESTED | CRITICAL. For spec/plan documents (set REVIEW_TARGET_TYPE=spec or plan): reviews a docs/plans/*.md file for completeness/consistency/clarity/scope/YAGNI, produces Status: Approved | Issues Found. For sidecar diff review (set REVIEW_TARGET_TYPE=diff): reviews the current uncommitted git diff after a local-build/shared-edit task, runs in the background and never blocks the main task, produces STATUS: clean | issues-found."
|
|
4
4
|
model: opus # unic-smart
|
|
5
5
|
color: yellow
|
|
6
6
|
tools: ["Read", "Grep", "Glob", "Bash"]
|
|
@@ -14,6 +14,7 @@ You are the independent reviewer for UKit's handoff Quality Gate. Your model is
|
|
|
14
14
|
|
|
15
15
|
- `code` (default, if not specified) — reviewing a handoff task diff. Follow **Code Review** below, unchanged.
|
|
16
16
|
- `spec` | `plan` — reviewing a document (e.g. `docs/plans/*.md`), no diff/task file/executor report involved. Skip straight to **Spec/Plan Review** at the end of this file instead.
|
|
17
|
+
- `diff` — non-blocking sidecar review of the current uncommitted diff in the daily (non-handoff) flow. No task file/executor report/model-isolation check involved. Skip straight to **Sidecar Diff Review** at the end of this file instead.
|
|
17
18
|
|
|
18
19
|
## Code Review (REVIEW_TARGET_TYPE=code)
|
|
19
20
|
|
|
@@ -155,3 +156,43 @@ NOTES: [1-2 sentences if needed]
|
|
|
155
156
|
```
|
|
156
157
|
|
|
157
158
|
`<N>` = 1 + however many `### Round` entries already exist in the log (1 if this is the first review).
|
|
159
|
+
|
|
160
|
+
## Sidecar Diff Review (REVIEW_TARGET_TYPE=diff)
|
|
161
|
+
|
|
162
|
+
This mode exists so a weaker daily-flow executor model still gets a second pair of eyes,
|
|
163
|
+
without adding wait time to the main task. You are launched in the background right after
|
|
164
|
+
the main task already has write + verification evidence; the caller is not waiting on you.
|
|
165
|
+
|
|
166
|
+
### Inputs you expect
|
|
167
|
+
|
|
168
|
+
- No task file, no executor report, no model-isolation check. Just read the current uncommitted
|
|
169
|
+
diff yourself: `git diff` (and `git diff --stat` for an overview). If there is no diff, report
|
|
170
|
+
`STATUS: clean` with `FINDINGS: none` and stop.
|
|
171
|
+
|
|
172
|
+
### Review order
|
|
173
|
+
|
|
174
|
+
Apply the same lenses as Code Review's steps 2-6, scoped to what the diff actually touches:
|
|
175
|
+
|
|
176
|
+
1. **Correctness** — Does the diff do what it looks like it's trying to do? Wrong assumptions, stale refs, missing cases?
|
|
177
|
+
2. **Regression risk** — Any existing behavior/tests/contracts this plausibly breaks?
|
|
178
|
+
3. **Safety / security / data loss** — Destructive actions, auth/permission, path handling, unsafe shell/DB/file ops.
|
|
179
|
+
4. **Performance / scale** — Accidental N+1, repeated I/O, large scans in hot paths.
|
|
180
|
+
5. **Maintainability** — Duplicated logic, dead branches, misleading naming, drift between docs/tests/source.
|
|
181
|
+
|
|
182
|
+
Do not re-run the project's full verification suite here — this is an advisory pass, not a gate.
|
|
183
|
+
You may read files for context but this mode never edits anything.
|
|
184
|
+
|
|
185
|
+
### Output
|
|
186
|
+
|
|
187
|
+
Keep it short — this is a quick advisory pass, not a full verdict:
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
STATUS: clean | issues-found
|
|
191
|
+
FINDINGS:
|
|
192
|
+
- file:line — what's wrong, why it matters
|
|
193
|
+
NOTES: [advisory only, non-blocking — 1 sentence if needed]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
There is no task file or INDEX.md to update in this mode. Findings are advisory only: the main
|
|
197
|
+
task is not blocked on this review and may already be reported done by the time you finish.
|
|
198
|
+
Report back to the caller in a few lines; do not paste the full diff.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -128,6 +128,14 @@ Khi Handoff mode: đọc `docs/AI_HANDOFF/RULES.md` để biết 4 phase (Idea+P
|
|
|
128
128
|
- This is optional internal orchestration config from `.ukit/storage/config.json`; never turn it into an end-user workflow.
|
|
129
129
|
- Always preserve the CoDev priority: quality > safety > speed > token discipline.
|
|
130
130
|
|
|
131
|
+
## Post-Edit Sidecar Review (internal)
|
|
132
|
+
|
|
133
|
+
- If routed state's `routeSummary.line` includes a `review=code-reviewer(diff)` segment, a `local-build` or `shared-edit` task qualifies for a non-blocking second opinion — this exists because the daily-flow executor model can miss edge cases.
|
|
134
|
+
- Only launch it once write evidence AND verification evidence already exist for the task (never before; never as a substitute for either).
|
|
135
|
+
- Launch the `code-reviewer` agent via the Agent tool with `REVIEW_TARGET_TYPE=diff` and `run_in_background: true` (model `unic-smart` per `subagents.diffReviewModel`). Do not wait for it — continue and report the task as done using the normal completion rules.
|
|
136
|
+
- Its findings are advisory only: never re-open, block, or delay the already-reported completion on their account. Surface them to the user as a follow-up note if/when they arrive.
|
|
137
|
+
- This is internal orchestration — end users never invoke it directly; `ukit install` plus natural language remains the whole surface. No new commands.
|
|
138
|
+
|
|
131
139
|
## Selective Subagent Policy (internal only)
|
|
132
140
|
|
|
133
141
|
- Keep direct execution as the default for trivial/simple work.
|
|
@@ -105,8 +105,9 @@
|
|
|
105
105
|
"maxReadPasses": 2,
|
|
106
106
|
"maxContextPulls": 1,
|
|
107
107
|
"verificationPolicy": "targeted-if-covered",
|
|
108
|
-
"completionRule": "require-write",
|
|
109
|
-
"delegationPolicy": "disallow-by-default"
|
|
108
|
+
"completionRule": "require-write-and-verification",
|
|
109
|
+
"delegationPolicy": "disallow-by-default",
|
|
110
|
+
"postEditReviewPolicy": "sidecar-non-blocking"
|
|
110
111
|
},
|
|
111
112
|
"find-cause": {
|
|
112
113
|
"modelTier": "code",
|
|
@@ -121,7 +122,8 @@
|
|
|
121
122
|
"maxContextPulls": 2,
|
|
122
123
|
"verificationPolicy": "targeted-then-widen-on-risk",
|
|
123
124
|
"completionRule": "require-write-and-verification",
|
|
124
|
-
"delegationPolicy": "allow-qualified-sidecar"
|
|
125
|
+
"delegationPolicy": "allow-qualified-sidecar",
|
|
126
|
+
"postEditReviewPolicy": "sidecar-non-blocking"
|
|
125
127
|
},
|
|
126
128
|
"map-impact": {
|
|
127
129
|
"modelTier": "code",
|
|
@@ -241,6 +243,9 @@
|
|
|
241
243
|
"enabled": true,
|
|
242
244
|
"smallTaskModel": "unic-lite",
|
|
243
245
|
"smallTaskAgent": "ukit-small-task-maintainer",
|
|
246
|
+
"diffReviewEnabled": true,
|
|
247
|
+
"diffReviewAgent": "code-reviewer",
|
|
248
|
+
"diffReviewModel": "unic-smart",
|
|
244
249
|
"visionEnabled": true,
|
|
245
250
|
"visionModel": "unic-vision",
|
|
246
251
|
"visionAgent": "ukit-vision-analyst",
|