@ngockhoale/ukit 1.5.5 → 1.5.8
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 +8 -0
- package/manifests/platform.full.yaml +75 -0
- package/package.json +1 -1
- package/src/cli/commands/diff.js +2 -0
- package/src/cli/commands/install.js +2 -0
- package/src/cli/index.js +4 -0
- package/src/core/runInstallPipeline.js +2 -0
- package/src/core/runtimeConfig.js +1 -1
- package/src/render/buildVariables.js +15 -1
- package/templates/.claude/agents/handoff-planner.md +79 -0
- package/templates/.claude/commands/ukit/clear-handoff.md +42 -0
- package/templates/.claude/commands/ukit/create-handoff.md +39 -0
- package/templates/.claude/commands/ukit/implement-handoff.md +47 -0
- package/templates/.claude/commands/ukit/review-handoff.md +61 -0
- package/templates/CLAUDE.md +1 -0
- package/templates/ukit/storage/config.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to UKit are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.5.7 - 2026-06-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed `compact-threshold.mjs` never being deployed by `ukit install` — the file existed in `templates/` since v1.1.2 but was missing from `manifests/platform.full.yaml`. Every Bash PostToolUse hook (`compress-output.sh`) and PreCompact hook (`reinject-context.sh`) crashed with `ERR_MODULE_NOT_FOUND`, causing the agent to silently stop mid-task.
|
|
10
|
+
- Added `ukit-runtime-compact-threshold-script` manifest entry with correct `requires` chain. Updated `requires` for `ukit-runtime-reinject-context-script`, `ukit-runtime-output-compression-script`, and `hook-skill-router` to declare the dependency.
|
|
11
|
+
- Changed default `safePatch.advisoryOnly` from `false` to `true` in `src/core/runtimeConfig.js`. Previously, `stale-spec-guard.sh` exited code 2 on any Edit to a shared/risky file with a stale `old_string`, causing Claude Code to block the tool call and halt the agent loop silently from the user's perspective. Advisory mode downgrades exit 2 → exit 0 + warning, allowing the agent to continue.
|
|
12
|
+
|
|
5
13
|
## 1.5.5 - 2026-05-30
|
|
6
14
|
|
|
7
15
|
### Added
|
|
@@ -768,6 +768,18 @@ items:
|
|
|
768
768
|
packs:
|
|
769
769
|
- core
|
|
770
770
|
|
|
771
|
+
- id: agent-handoff-planner
|
|
772
|
+
type: agent
|
|
773
|
+
sourceTemplate: .claude/agents/handoff-planner.md
|
|
774
|
+
targetPath: .claude/agents/handoff-planner.md
|
|
775
|
+
requires:
|
|
776
|
+
- docs-ai-handoff
|
|
777
|
+
mergeStrategy: overwrite_with_backup
|
|
778
|
+
variables: []
|
|
779
|
+
enabledByDefault: true
|
|
780
|
+
packs:
|
|
781
|
+
- core
|
|
782
|
+
|
|
771
783
|
- id: agent-feature-implementer
|
|
772
784
|
type: agent
|
|
773
785
|
sourceTemplate: .claude/agents/feature-implementer.md
|
|
@@ -805,6 +817,54 @@ items:
|
|
|
805
817
|
packs:
|
|
806
818
|
- core
|
|
807
819
|
|
|
820
|
+
- id: command-create-handoff
|
|
821
|
+
type: command
|
|
822
|
+
sourceTemplate: .claude/commands/ukit/create-handoff.md
|
|
823
|
+
targetPath: .claude/commands/ukit/create-handoff.md
|
|
824
|
+
requires:
|
|
825
|
+
- docs-ai-handoff
|
|
826
|
+
mergeStrategy: overwrite_with_backup
|
|
827
|
+
variables: []
|
|
828
|
+
enabledByDefault: true
|
|
829
|
+
packs:
|
|
830
|
+
- core
|
|
831
|
+
|
|
832
|
+
- id: command-implement-handoff
|
|
833
|
+
type: command
|
|
834
|
+
sourceTemplate: .claude/commands/ukit/implement-handoff.md
|
|
835
|
+
targetPath: .claude/commands/ukit/implement-handoff.md
|
|
836
|
+
requires:
|
|
837
|
+
- command-create-handoff
|
|
838
|
+
mergeStrategy: overwrite_with_backup
|
|
839
|
+
variables: []
|
|
840
|
+
enabledByDefault: true
|
|
841
|
+
packs:
|
|
842
|
+
- core
|
|
843
|
+
|
|
844
|
+
- id: command-review-handoff
|
|
845
|
+
type: command
|
|
846
|
+
sourceTemplate: .claude/commands/ukit/review-handoff.md
|
|
847
|
+
targetPath: .claude/commands/ukit/review-handoff.md
|
|
848
|
+
requires:
|
|
849
|
+
- command-create-handoff
|
|
850
|
+
mergeStrategy: overwrite_with_backup
|
|
851
|
+
variables: []
|
|
852
|
+
enabledByDefault: true
|
|
853
|
+
packs:
|
|
854
|
+
- core
|
|
855
|
+
|
|
856
|
+
- id: command-clear-handoff
|
|
857
|
+
type: command
|
|
858
|
+
sourceTemplate: .claude/commands/ukit/clear-handoff.md
|
|
859
|
+
targetPath: .claude/commands/ukit/clear-handoff.md
|
|
860
|
+
requires:
|
|
861
|
+
- command-create-handoff
|
|
862
|
+
mergeStrategy: overwrite_with_backup
|
|
863
|
+
variables: []
|
|
864
|
+
enabledByDefault: true
|
|
865
|
+
packs:
|
|
866
|
+
- core
|
|
867
|
+
|
|
808
868
|
- id: provider-compat-config
|
|
809
869
|
type: config
|
|
810
870
|
sourceTemplate: .claude/config/providers.md
|
|
@@ -932,6 +992,7 @@ items:
|
|
|
932
992
|
targetPath: .claude/hooks/skill-router.sh
|
|
933
993
|
requires:
|
|
934
994
|
- ukit-index-route-catalog-script
|
|
995
|
+
- ukit-runtime-compact-threshold-script
|
|
935
996
|
mergeStrategy: overwrite_with_backup
|
|
936
997
|
variables: []
|
|
937
998
|
enabledByDefault: true
|
|
@@ -1214,12 +1275,25 @@ items:
|
|
|
1214
1275
|
packs:
|
|
1215
1276
|
- core
|
|
1216
1277
|
|
|
1278
|
+
- id: ukit-runtime-compact-threshold-script
|
|
1279
|
+
type: config
|
|
1280
|
+
sourceTemplate: .claude/ukit/runtime/compact-threshold.mjs
|
|
1281
|
+
targetPath: .claude/ukit/runtime/compact-threshold.mjs
|
|
1282
|
+
requires:
|
|
1283
|
+
- ukit-runtime-token-utils-script
|
|
1284
|
+
mergeStrategy: overwrite_with_backup
|
|
1285
|
+
variables: []
|
|
1286
|
+
enabledByDefault: true
|
|
1287
|
+
packs:
|
|
1288
|
+
- core
|
|
1289
|
+
|
|
1217
1290
|
- id: ukit-runtime-reinject-context-script
|
|
1218
1291
|
type: config
|
|
1219
1292
|
sourceTemplate: .claude/ukit/runtime/reinject-context.mjs
|
|
1220
1293
|
targetPath: .claude/ukit/runtime/reinject-context.mjs
|
|
1221
1294
|
requires:
|
|
1222
1295
|
- ukit-runtime-token-utils-script
|
|
1296
|
+
- ukit-runtime-compact-threshold-script
|
|
1223
1297
|
mergeStrategy: overwrite_with_backup
|
|
1224
1298
|
variables: []
|
|
1225
1299
|
enabledByDefault: true
|
|
@@ -1232,6 +1306,7 @@ items:
|
|
|
1232
1306
|
targetPath: .claude/ukit/runtime/output-compression.mjs
|
|
1233
1307
|
requires:
|
|
1234
1308
|
- ukit-runtime-token-utils-script
|
|
1309
|
+
- ukit-runtime-compact-threshold-script
|
|
1235
1310
|
mergeStrategy: overwrite_with_backup
|
|
1236
1311
|
variables: []
|
|
1237
1312
|
enabledByDefault: true
|
package/package.json
CHANGED
package/src/cli/commands/diff.js
CHANGED
|
@@ -18,6 +18,7 @@ export async function runDiff({ packageRoot, projectRoot, packageVersion, argv =
|
|
|
18
18
|
const toolsArg = parseToolsArg(argv);
|
|
19
19
|
const selectedOptionalTools = resolveOptionalToolKeys(toolsArg);
|
|
20
20
|
const selectedAdapterItemIds = toSelectedAdapterItemIds(selectedOptionalTools);
|
|
21
|
+
const withCodegraph = argv.includes('--with-codegraph');
|
|
21
22
|
|
|
22
23
|
const pathConfig = buildPathConfig({ packageRoot, projectRoot });
|
|
23
24
|
|
|
@@ -26,6 +27,7 @@ export async function runDiff({ packageRoot, projectRoot, packageVersion, argv =
|
|
|
26
27
|
pathConfig,
|
|
27
28
|
dryRun: true,
|
|
28
29
|
selectedAdapterItemIds,
|
|
30
|
+
withCodegraph,
|
|
29
31
|
});
|
|
30
32
|
|
|
31
33
|
console.log('[UKit] Diff preview:');
|
|
@@ -198,6 +198,7 @@ export async function pruneDeselectedAdapters({
|
|
|
198
198
|
export async function runInstall({ packageRoot, projectRoot, packageVersion, argv = [] }) {
|
|
199
199
|
const toolsArg = parseToolsArg(argv);
|
|
200
200
|
const selectedOptionalTools = resolveOptionalToolKeys(toolsArg);
|
|
201
|
+
const withCodegraph = argv.includes('--with-codegraph');
|
|
201
202
|
|
|
202
203
|
const pruneResult = await pruneDeselectedAdapters({
|
|
203
204
|
projectRoot,
|
|
@@ -213,6 +214,7 @@ export async function runInstall({ packageRoot, projectRoot, packageVersion, arg
|
|
|
213
214
|
dryRun: false,
|
|
214
215
|
selectedAdapterItemIds,
|
|
215
216
|
retainedManagedRelativePaths: pruneResult?.retainedManagedPaths ?? [],
|
|
217
|
+
withCodegraph,
|
|
216
218
|
});
|
|
217
219
|
|
|
218
220
|
const { create, update, unchanged, skip } = result.summary;
|
package/src/cli/index.js
CHANGED
|
@@ -92,6 +92,10 @@ export async function runCli({ argv, packageRoot, projectRoot, packageVersion })
|
|
|
92
92
|
console.log(' Values: claude, antigravity, codex, opencode');
|
|
93
93
|
console.log(' Example: ukit install --tools=claude,codex,opencode');
|
|
94
94
|
console.log(' Use --tools=none to disable all optional adapters');
|
|
95
|
+
console.log(' --with-codegraph Enable CodeGraph MCP integration in CLAUDE.md');
|
|
96
|
+
console.log(' Adds routing rules that prefer codegraph_* tools for');
|
|
97
|
+
console.log(' symbol search, context building, and impact analysis.');
|
|
98
|
+
console.log(' Omit this flag to remove the section on reinstall.');
|
|
95
99
|
console.log('');
|
|
96
100
|
console.log('Maintainer / debug examples:');
|
|
97
101
|
console.log(' ukit index build');
|
|
@@ -217,6 +217,7 @@ export async function runInstallPipeline({
|
|
|
217
217
|
dryRun,
|
|
218
218
|
selectedAdapterItemIds,
|
|
219
219
|
retainedManagedRelativePaths = [],
|
|
220
|
+
withCodegraph = false,
|
|
220
221
|
}) {
|
|
221
222
|
// Check for an existing install before making any changes.
|
|
222
223
|
// cleanupLegacyPaths() is only safe to run on reinstalls: on a fresh install
|
|
@@ -239,6 +240,7 @@ export async function runInstallPipeline({
|
|
|
239
240
|
stackContext,
|
|
240
241
|
packageVersion,
|
|
241
242
|
providerContext,
|
|
243
|
+
withCodegraph,
|
|
242
244
|
});
|
|
243
245
|
|
|
244
246
|
const plan = await buildInstallPlan({
|
|
@@ -183,7 +183,7 @@ export function buildDefaultRuntimeConfig(overrides = {}) {
|
|
|
183
183
|
safePatch: {
|
|
184
184
|
enabled: true,
|
|
185
185
|
strictSharedRisk: true,
|
|
186
|
-
advisoryOnly:
|
|
186
|
+
advisoryOnly: true,
|
|
187
187
|
largeFileLineThreshold: 800,
|
|
188
188
|
largeFileByteThreshold: 200_000,
|
|
189
189
|
backupEnabled: true,
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
const CODEGRAPH_SECTION = `
|
|
2
|
+
## CodeGraph Integration (active)
|
|
3
|
+
|
|
4
|
+
CodeGraph MCP is enabled for this project. When \`codegraph_*\` tools appear in your tool list:
|
|
5
|
+
- **Symbol search** → \`codegraph_search\` (replaces \`node .claude/ukit/index/query-index.mjs\`)
|
|
6
|
+
- **Context building** → \`codegraph_context\` (replaces \`resolve-context.mjs\`)
|
|
7
|
+
- **Impact analysis** → \`codegraph_impact\` (replaces \`impact-context.mjs\`)
|
|
8
|
+
- **Call graph** → \`codegraph_trace\`, \`codegraph_callers\`, \`codegraph_callees\` (new capability, no UKit equivalent)
|
|
9
|
+
|
|
10
|
+
UKit routing, memory, and skill activation remain primary. CodeGraph is the index query layer only.
|
|
11
|
+
To disable: rerun \`ukit install\` without \`--with-codegraph\`.
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export function buildTemplateVariables({ projectContext, stackContext, packageVersion, providerContext, withCodegraph = false }) {
|
|
2
15
|
return {
|
|
3
16
|
project: {
|
|
4
17
|
name: projectContext.project.name,
|
|
@@ -35,5 +48,6 @@ export function buildTemplateVariables({ projectContext, stackContext, packageVe
|
|
|
35
48
|
user: {
|
|
36
49
|
profile: 'default',
|
|
37
50
|
},
|
|
51
|
+
codegraphSection: withCodegraph ? CODEGRAPH_SECTION : '',
|
|
38
52
|
};
|
|
39
53
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handoff-planner
|
|
3
|
+
description: "Handoff planning specialist for Phase 1+2. Use when creating a new handoff cycle: writes PLAN.md with full test plan, splits into TASK-xxx.md files with TDD-embedded test cases, and updates INDEX.md. Always use the strongest available model (Opus/unic-smart)."
|
|
4
|
+
model: inherit
|
|
5
|
+
color: purple
|
|
6
|
+
tools: ["Read", "Edit", "Write", "Glob", "Bash", "TodoWrite"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are the PLANNER for UKit's handoff system. Your job is Phase 1 (write plan) + Phase 2 (split tasks). Always use the strongest model available — planning with a weak model produces weak tasks.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- Problem/feature description passed by the user (or from the invoking command).
|
|
14
|
+
- Existing state in `docs/AI_HANDOFF/`: read `INDEX.md` and `ACTIVE.md` first.
|
|
15
|
+
|
|
16
|
+
## Phase 1 — Write PLAN.md
|
|
17
|
+
|
|
18
|
+
Read `docs/AI_HANDOFF/RULES.md` §4 for the full PLAN.md template. Write all 6 sections:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
§1 Intent — what problem, what success looks like
|
|
22
|
+
§2 Scope — in-scope / out-of-scope
|
|
23
|
+
§3 Approach — technical solution, trade-offs, alternatives rejected
|
|
24
|
+
§4 Test Plan — happy path × N + ≥1 edge case + regression (if bugfix)
|
|
25
|
+
table: | Type | Test Name | Expected |
|
|
26
|
+
§5 Verification — exact shell commands executor will run
|
|
27
|
+
§6 Acceptance — checklist of done criteria
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**§4 is non-negotiable.** No test plan = plan is not ready. If the problem has zero testable behavior, write `N/A` + explicit justification in each task's Test Cases field.
|
|
31
|
+
|
|
32
|
+
## Phase 2 — Split into TASK-xxx.md
|
|
33
|
+
|
|
34
|
+
Use `docs/AI_HANDOFF/tasks/_TEMPLATE.md` as the template for each file.
|
|
35
|
+
|
|
36
|
+
**Every task file MUST have:**
|
|
37
|
+
|
|
38
|
+
| Field | Rule |
|
|
39
|
+
|-------|------|
|
|
40
|
+
| Target Files | Exact paths: `src/foo/bar.js`, `tests/foo/bar.test.js` |
|
|
41
|
+
| Dependencies | `TASK-xxx` or `none` |
|
|
42
|
+
| Test Cases | Table: Type \| Test Name \| Expected — ≥1 happy + ≥1 edge case |
|
|
43
|
+
| Test Files | Exact test file paths to create/modify |
|
|
44
|
+
| Verification Commands | Runnable shell commands (e.g. `yarn test tests/foo/bar.test.js`) |
|
|
45
|
+
| Acceptance Criteria | Checklist items |
|
|
46
|
+
|
|
47
|
+
Task missing any field → status = `needs_breakdown`. Never mark incomplete tasks `ready`.
|
|
48
|
+
|
|
49
|
+
**Wave grouping:** Group tasks so Wave 1 = tasks with `dependencies: none`, Wave 2 = tasks depending on Wave 1, etc. Document the wave structure in `ACTIVE.md`.
|
|
50
|
+
|
|
51
|
+
## Phase 3 — Update state files
|
|
52
|
+
|
|
53
|
+
**INDEX.md** — add one row per task:
|
|
54
|
+
```
|
|
55
|
+
| TASK-001 | <short name> | ready | none | - |
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**ACTIVE.md** — write snapshot:
|
|
59
|
+
```
|
|
60
|
+
Cycle: <cycle-ID> Date: <YYYY-MM-DD>
|
|
61
|
+
Goal: <1 sentence>
|
|
62
|
+
Tasks: <N> total | Wave 1: TASK-001, TASK-002 | Wave 2: TASK-003
|
|
63
|
+
Status: planning_done — ready for executor
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
Report:
|
|
69
|
+
- Number of tasks created + their IDs
|
|
70
|
+
- Wave structure
|
|
71
|
+
- Any tasks flagged `needs_breakdown` (explain why)
|
|
72
|
+
- Exact next step for human: "Switch to Sonnet/unic-code → run `/ukit:implement-handoff`"
|
|
73
|
+
|
|
74
|
+
## Rules
|
|
75
|
+
|
|
76
|
+
- Do NOT start implementing. Your job ends when all tasks are `ready` (or `needs_breakdown`).
|
|
77
|
+
- If existing INDEX.md has undone tasks → warn human, ask: continue old cycle or clear and start fresh?
|
|
78
|
+
- Prefer more smaller tasks over fewer large tasks. Each task should be completable in one executor session.
|
|
79
|
+
- If you cannot determine test cases for a task → flag `needs_breakdown`, add a Discussion thread note explaining what's missing.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# /ukit:clear-handoff
|
|
2
|
+
|
|
3
|
+
Spawn **ukit-small-task-maintainer** (Haiku / unic-lite) to archive and reset the cycle.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Spawn Agent:
|
|
8
|
+
- `subagent_type: ukit-small-task-maintainer`
|
|
9
|
+
- `model: haiku`
|
|
10
|
+
- `prompt`:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Clear the current handoff cycle.
|
|
14
|
+
|
|
15
|
+
1. Read docs/AI_HANDOFF/INDEX.md
|
|
16
|
+
→ If any task is in_progress or pending_review → WARN human, ask to confirm before proceeding
|
|
17
|
+
|
|
18
|
+
2. Cleanup worktrees:
|
|
19
|
+
git worktree list | grep handoff/
|
|
20
|
+
For each .worktrees/task-xxx:
|
|
21
|
+
git worktree remove .worktrees/task-xxx --force
|
|
22
|
+
git branch -D handoff/task-xxx
|
|
23
|
+
git worktree prune
|
|
24
|
+
|
|
25
|
+
3. Archive cycle:
|
|
26
|
+
Write docs/AI_HANDOFF/archive/cycle-NNN.md:
|
|
27
|
+
# Cycle NNN — <YYYY-MM-DD>
|
|
28
|
+
## Summary: <1 paragraph>
|
|
29
|
+
## Tasks: <INDEX.md table>
|
|
30
|
+
If archive/ has > 3 files → delete oldest, append 1-line to HISTORY.md
|
|
31
|
+
|
|
32
|
+
4. Reset state files:
|
|
33
|
+
PLAN.md → "# PLAN\n_(empty)_"
|
|
34
|
+
INDEX.md → empty table header
|
|
35
|
+
ACTIVE.md → "# ACTIVE\n_(no active cycle)_"
|
|
36
|
+
tasks/TASK-*.md → delete all (keep _TEMPLATE.md)
|
|
37
|
+
|
|
38
|
+
5. Report: cycle archived, worktrees removed, ready for new cycle
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
After agent completes:
|
|
42
|
+
> Ready for new cycle → `/ukit:create-handoff <description>`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# /ukit:create-handoff
|
|
2
|
+
|
|
3
|
+
Spawn a **handoff-planner** agent (Opus / unic-smart) to run Phase 1 + Phase 2.
|
|
4
|
+
|
|
5
|
+
## Problem / feature
|
|
6
|
+
$ARGUMENTS
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Spawn Agent:
|
|
11
|
+
- `subagent_type: handoff-planner`
|
|
12
|
+
- `model: opus`
|
|
13
|
+
- `prompt`:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Problem to plan: $ARGUMENTS
|
|
17
|
+
|
|
18
|
+
1. Read docs/AI_HANDOFF/INDEX.md + ACTIVE.md
|
|
19
|
+
→ If undone tasks exist, warn and ask human: continue old cycle or start fresh?
|
|
20
|
+
|
|
21
|
+
2. Read docs/AI_HANDOFF/RULES.md for PLAN.md format + Task Gate rules
|
|
22
|
+
|
|
23
|
+
3. Write docs/AI_HANDOFF/PLAN.md — all 6 sections mandatory:
|
|
24
|
+
§1 Intent | §2 Scope | §3 Approach | §4 Test Plan | §5 Verification Commands | §6 Acceptance Criteria
|
|
25
|
+
§4 Test Plan: happy path + ≥1 edge case + regression if bugfix
|
|
26
|
+
|
|
27
|
+
4. Create docs/AI_HANDOFF/tasks/TASK-001.md ... using _TEMPLATE.md
|
|
28
|
+
Each task MUST have: Target Files, Dependencies, Test Cases, Test Files,
|
|
29
|
+
Verification Commands, Acceptance Criteria
|
|
30
|
+
Missing any field → status: needs_breakdown (never ready)
|
|
31
|
+
|
|
32
|
+
5. Update INDEX.md — add row per task, status=ready
|
|
33
|
+
6. Update ACTIVE.md — cycle snapshot + wave structure
|
|
34
|
+
|
|
35
|
+
7. Report: task list + statuses, wave map, next step for human
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
After agent completes, tell human:
|
|
39
|
+
> Switch to **Sonnet / unic-code** → run `/ukit:implement-handoff`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# /ukit:implement-handoff
|
|
2
|
+
|
|
3
|
+
Spawn **feature-implementer** agents in parallel waves (Sonnet / unic-code).
|
|
4
|
+
|
|
5
|
+
## Target (optional)
|
|
6
|
+
$ARGUMENTS
|
|
7
|
+
_Empty = all ready tasks. Or: "TASK-001" for a specific task._
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
1. Read `docs/AI_HANDOFF/INDEX.md`
|
|
12
|
+
- Collect tasks with status `ready` (or the specific task from $ARGUMENTS)
|
|
13
|
+
- If none → report and stop
|
|
14
|
+
|
|
15
|
+
2. Group tasks into waves by dependency:
|
|
16
|
+
- Wave 1: tasks with `dependencies: none` or all deps already `done`
|
|
17
|
+
- Wave 2+: tasks whose deps are in the previous wave
|
|
18
|
+
|
|
19
|
+
3. For each wave — spawn feature-implementer agents **in parallel**, one per task:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Implement docs/AI_HANDOFF/tasks/TASK-xxx.md in handoff mode.
|
|
23
|
+
|
|
24
|
+
Worktree:
|
|
25
|
+
git worktree add -b handoff/task-xxx .worktrees/task-xxx
|
|
26
|
+
(skip -b if branch already exists)
|
|
27
|
+
|
|
28
|
+
TDD (mandatory):
|
|
29
|
+
1. Write tests from §Test Cases → run → confirm RED
|
|
30
|
+
2. Implement → run → confirm GREEN
|
|
31
|
+
3. Run §Verification Commands → paste full output
|
|
32
|
+
|
|
33
|
+
Executor Report (append to task file):
|
|
34
|
+
EXECUTOR_TOOL / EXECUTOR_MODEL / EXECUTOR_SUBAGENT: feature-implementer
|
|
35
|
+
Verification Output: <paste>
|
|
36
|
+
Status: PASS | FAIL
|
|
37
|
+
|
|
38
|
+
Update INDEX.md: status → pending_review
|
|
39
|
+
|
|
40
|
+
If tests FAIL → fix in same worktree before updating status. Never mark pending_review with a FAIL.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
4. Wait for all agents in the wave → run next wave
|
|
44
|
+
|
|
45
|
+
5. Report: PASS/FAIL per task, worktrees created, any blockers
|
|
46
|
+
|
|
47
|
+
> Switch to **Opus / unic-smart** → run `/ukit:review-handoff`
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# /ukit:review-handoff
|
|
2
|
+
|
|
3
|
+
Spawn **code-reviewer** agents (Opus / unic-smart — MUST differ from executor).
|
|
4
|
+
After approval: merge worktree → delete branch + worktree.
|
|
5
|
+
|
|
6
|
+
## Target (optional)
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
_Empty = all pending_review tasks. Or: "TASK-001" for a specific task._
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
1. Read `docs/AI_HANDOFF/INDEX.md`
|
|
13
|
+
- Collect tasks with status `pending_review` (or specific task from $ARGUMENTS)
|
|
14
|
+
- If none → report and stop
|
|
15
|
+
|
|
16
|
+
2. For each task — spawn a **code-reviewer** agent:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Review docs/AI_HANDOFF/tasks/TASK-xxx.md
|
|
20
|
+
|
|
21
|
+
Inputs:
|
|
22
|
+
- Task file (Test Plan + Verification Commands + Executor Report)
|
|
23
|
+
- Diff: git -C .worktrees/task-xxx diff main
|
|
24
|
+
|
|
25
|
+
Steps:
|
|
26
|
+
1. Read EXECUTOR_MODEL from Executor Report
|
|
27
|
+
→ REFUSE if same as your model (or model unknown)
|
|
28
|
+
2. Re-run §Verification Commands fresh — do NOT trust executor output
|
|
29
|
+
→ If FAIL → verdict: critical_block, stop
|
|
30
|
+
3. Review diff: correctness, regression risk, security, maintainability
|
|
31
|
+
4. Append ## Reviewer Verdict to task file:
|
|
32
|
+
VERDICT: approved | approved_minor | changes_requested | critical_block
|
|
33
|
+
REVIEWER_MODEL / EXECUTOR_MODEL
|
|
34
|
+
VERIFICATION_RERUN: result
|
|
35
|
+
FINDINGS: critical / important / minor
|
|
36
|
+
NEXT_STATUS_FOR_INDEX: <status>
|
|
37
|
+
|
|
38
|
+
5. Update INDEX.md: set status = NEXT_STATUS_FOR_INDEX
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. After each agent verdict:
|
|
42
|
+
|
|
43
|
+
**approved / approved_minor:**
|
|
44
|
+
```bash
|
|
45
|
+
git merge handoff/task-xxx --no-ff -m "feat: merge TASK-xxx"
|
|
46
|
+
git worktree remove .worktrees/task-xxx
|
|
47
|
+
git branch -d handoff/task-xxx
|
|
48
|
+
# INDEX.md: status → done
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**changes_requested / critical_block:**
|
|
52
|
+
```
|
|
53
|
+
Keep worktree — executor must fix
|
|
54
|
+
Write findings in task file §Discussion
|
|
55
|
+
# INDEX.md: status → changes_requested | critical_block
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
4. Report: approved+merged tasks, tasks needing fixes, remaining worktrees
|
|
59
|
+
|
|
60
|
+
> All done? → `/ukit:clear-handoff`
|
|
61
|
+
> Tasks need fixes? → human runs `/ukit:implement-handoff TASK-xxx`
|
package/templates/CLAUDE.md
CHANGED
|
@@ -165,3 +165,4 @@ DuraOne skill chỉ active khi pack `duraone` được cài hoặc `.claude/skil
|
|
|
165
165
|
- `.claude/skills/duraone/references/sql.md`
|
|
166
166
|
- `.claude/skills/duraone/references/workflow.md`
|
|
167
167
|
- Khi không active: dùng generic coding standards + project-specific patterns từ index.
|
|
168
|
+
{{codegraphSection}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.5.
|
|
2
|
+
"version": "1.5.7",
|
|
3
3
|
"agent": "claude-code",
|
|
4
4
|
"autonomy": {
|
|
5
5
|
"level": "balanced",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"safePatch": {
|
|
148
148
|
"enabled": true,
|
|
149
149
|
"strictSharedRisk": true,
|
|
150
|
-
"advisoryOnly":
|
|
150
|
+
"advisoryOnly": true,
|
|
151
151
|
"largeFileLineThreshold": 800,
|
|
152
152
|
"largeFileByteThreshold": 200000,
|
|
153
153
|
"backupEnabled": true,
|