@ngockhoale/ukit 1.5.10 → 1.5.12

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.
@@ -865,6 +865,30 @@ items:
865
865
  packs:
866
866
  - core
867
867
 
868
+ - id: command-status-handoff
869
+ type: command
870
+ sourceTemplate: .claude/commands/ukit/status-handoff.md
871
+ targetPath: .claude/commands/ukit/status-handoff.md
872
+ requires:
873
+ - command-create-handoff
874
+ mergeStrategy: overwrite_with_backup
875
+ variables: []
876
+ enabledByDefault: true
877
+ packs:
878
+ - core
879
+
880
+ - id: command-abort-handoff
881
+ type: command
882
+ sourceTemplate: .claude/commands/ukit/abort-handoff.md
883
+ targetPath: .claude/commands/ukit/abort-handoff.md
884
+ requires:
885
+ - command-create-handoff
886
+ mergeStrategy: overwrite_with_backup
887
+ variables: []
888
+ enabledByDefault: true
889
+ packs:
890
+ - core
891
+
868
892
  - id: provider-compat-config
869
893
  type: config
870
894
  sourceTemplate: .claude/config/providers.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngockhoale/ukit",
3
- "version": "1.5.10",
3
+ "version": "1.5.12",
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",
@@ -12,11 +12,8 @@ Use the strongest model available — planning with a weak model produces weak t
12
12
  ## Inputs
13
13
 
14
14
  - Problem/feature description from the user.
15
- - **Pre-read context** (if provided in the prompt): compact summary of INDEX.md, ACTIVE.md, RULES.md, _TEMPLATE.md read by a lite agent. **Use it directly — do NOT re-read those files.**
16
- - If no pre-read context → read the files yourself (fallback for direct invocation):
17
- - `docs/AI_HANDOFF/INDEX.md` + `ACTIVE.md` (current state)
18
- - `docs/AI_HANDOFF/RULES.md` (PLAN.md format + Task Gate rules)
19
- - `docs/AI_HANDOFF/tasks/_TEMPLATE.md` (task file structure)
15
+ - **Pre-read context** (if provided): compact summary of INDEX.md, ACTIVE.md, RULES.md, _TEMPLATE.md. Use it directly — do NOT re-read those files.
16
+ - If no pre-read context → read the files yourself (fallback for direct invocation).
20
17
 
21
18
  ## Phase 1 — Write PLAN.md
22
19
 
@@ -25,11 +22,13 @@ Write all 6 sections to `docs/AI_HANDOFF/PLAN.md`:
25
22
  ```
26
23
  §1 Intent — what problem, what success looks like
27
24
  §2 Scope — in-scope / out-of-scope
25
+ CONSTRAINT: tasks in the same wave must not modify the same file.
26
+ If two tasks need the same file → make one depend on the other.
28
27
  §3 Approach — technical solution, trade-offs, alternatives rejected
29
28
  §4 Test Plan — happy path × N + ≥1 edge case + regression (if bugfix)
30
29
  table: | Type | Test Name | Expected |
31
30
  §5 Verification — exact shell commands executor will run
32
- §6 Acceptance — checklist of done criteria
31
+ §6 Acceptance — checklist of done criteria (prefer verifiable/command-based criteria)
33
32
  ```
34
33
 
35
34
  **§4 is non-negotiable.** No test plan = plan not ready.
@@ -43,32 +42,38 @@ Use `_TEMPLATE.md` structure (from pre-read context or file).
43
42
 
44
43
  | Field | Rule |
45
44
  |-------|------|
46
- | Target Files | Exact paths: `src/foo/bar.js`, `tests/foo/bar.test.js` |
47
- | Dependencies | `TASK-xxx` or `none` |
45
+ | Target Files | Exact paths — no two tasks in same wave share a file |
46
+ | Dependencies | `TASK-xxx` or `none` — wave order is inferred from this |
48
47
  | Test Cases | Type \| Test Name \| Expected — ≥1 happy + ≥1 edge case |
49
48
  | Test Files | Exact test file paths to create/modify |
50
49
  | Verification Commands | Runnable shell commands |
51
- | Acceptance Criteria | Checklist items |
50
+ | Acceptance Criteria | Verifiable checklist |
52
51
 
53
52
  Missing any field → `needs_breakdown`. Never mark incomplete tasks `ready`.
54
53
 
55
- **Wave grouping:** Wave 1 = `dependencies: none`, Wave 2 = depends on Wave 1, etc. Document in ACTIVE.md.
54
+ **Wave logic (for your reference when splitting):**
55
+ - Wave 1 = tasks with `Dependencies: none`
56
+ - Wave 2 = tasks whose all deps are in Wave 1
57
+ - Chain: A → B → C runs as 3 sequential waves (1 task each, no parallelism)
58
+ - Independent: A, B, C (all `none`) runs as 1 wave, all parallel
56
59
 
57
60
  ## Phase 3 — Update state files
58
61
 
59
62
  **INDEX.md** row per task: `| TASK-001 | <name> | ready | none | - |`
60
63
 
61
- **ACTIVE.md** snapshot:
64
+ **ACTIVE.md** — store base branch + cycle info:
62
65
  ```
63
- Cycle: <ID> Date: <YYYY-MM-DD>
66
+ Cycle: <ID> Date: <YYYY-MM-DD> Base: <current HEAD branch>
64
67
  Goal: <1 sentence>
65
- Tasks: <N> total | Wave 1: TASK-001, TASK-002 | Wave 2: TASK-003
68
+ Tasks: <N> total
66
69
  Status: planning_done — ready for executor
67
70
  ```
71
+ Wave structure is NOT stored here — inferred from task `Dependencies` fields at runtime.
68
72
 
69
73
  ## Output
70
74
 
71
- - Task count + IDs, wave structure
75
+ - Task count + IDs
76
+ - Dependency graph (text form: TASK-001 → TASK-003, TASK-002 independent)
72
77
  - Any `needs_breakdown` tasks + reason
73
78
  - Next step: "Switch to Sonnet/unic-code → run `/ukit:implement-handoff`"
74
79
 
@@ -0,0 +1,59 @@
1
+ # /ukit:abort-handoff — Force Abandon Cycle (no archive)
2
+
3
+ **Role: CLEANUP**
4
+ **Tool: any**
5
+ **Model: lite model** (haiku · unic-lite)
6
+
7
+ **Use when:** plan is wrong from the root, or cycle is unrecoverable. Discards everything — no archive, no history entry.
8
+ **Different from `/ukit:clear-handoff`:** clear = "done, save it". abort = "throw it away".
9
+
10
+ ---
11
+
12
+ ## Step 1 — Confirm intent
13
+
14
+ Report the current state before doing anything:
15
+ ```
16
+ ⚠️ About to ABORT handoff cycle:
17
+ Cycle: <ID> Goal: <goal>
18
+ Tasks that will be lost: TASK-001 [in_progress], TASK-002 [ready], ...
19
+ Worktrees to delete: .worktrees/task-001, ...
20
+
21
+ This will NOT be archived. All work in worktrees will be discarded.
22
+ Respond "confirm abort" to proceed.
23
+ ```
24
+
25
+ Wait for human to confirm. If not confirmed → stop.
26
+
27
+ ## Step 2 — Force remove all worktrees + branches
28
+
29
+ ```bash
30
+ # Remove task worktrees + branches
31
+ git worktree list | grep '.worktrees/task-' | awk '{print $1}' | while read wt; do
32
+ name=$(basename $wt)
33
+ git worktree remove $wt --force
34
+ git branch -D handoff/$name 2>/dev/null
35
+ done
36
+
37
+ # Remove integration branch
38
+ git branch -D handoff/integration 2>/dev/null
39
+
40
+ git worktree prune
41
+ ```
42
+
43
+ ## Step 3 — Reset state files (no archive)
44
+
45
+ ```
46
+ PLAN.md → "# PLAN\n_(empty)_"
47
+ INDEX.md → empty table header only
48
+ ACTIVE.md → "# ACTIVE\n_(no active cycle)_"
49
+ tasks/TASK-*.md → delete all (keep _TEMPLATE.md)
50
+ ```
51
+
52
+ ## Step 4 — Report
53
+
54
+ Cycle aborted. No archive written. Worktrees and branches removed. Ready for new cycle.
55
+
56
+ > Claude Code: spawn `ukit-small-task-maintainer` (haiku) with steps 1–4.
57
+ > Other tools: use lite model, follow steps above.
58
+
59
+ **Next:** `/ukit:create-handoff <new problem description>` (start fresh)
@@ -1,73 +1,73 @@
1
- # /ukit:clear-handoff
1
+ # /ukit:clear-handoff — Archive + Reset
2
2
 
3
- Spawn **ukit-small-task-maintainer** (Haiku / unic-lite) to archive and reset the cycle.
3
+ **Role: CLEANUP**
4
+ **Tool: any**
5
+ **Model: lite model** (haiku · unic-lite · cheapest — this is file ops only)
4
6
 
5
7
  **HARD GATE: Will NOT clear if any task is not `done`.**
6
8
 
7
9
  ---
8
10
 
9
- Spawn Agent:
10
- - `subagent_type: ukit-small-task-maintainer`
11
- - `model: haiku`
12
- - `prompt`:
11
+ ## Step 1 — Gate check (mandatory, cannot skip)
13
12
 
14
- ```
15
- Clear the current handoff cycle.
13
+ Read `docs/AI_HANDOFF/INDEX.md`. List every task + status.
14
+ Read `docs/AI_HANDOFF/ACTIVE.md` → get `Base: <BASE>`.
16
15
 
17
- ## Step 1 — GATE CHECK (mandatory, cannot skip)
16
+ If ANY task status ≠ `done` → **STOP**. Report and exit:
18
17
 
19
- Read docs/AI_HANDOFF/INDEX.md.
20
- List every task and its status.
18
+ ```
19
+ ⛔ Cannot clear — X task(s) not done:
20
+ TASK-001 [pending_review] → /ukit:review-handoff TASK-001
21
+ TASK-003 [changes_requested] → /ukit:implement-handoff TASK-003
22
+ TASK-005 [ready] → /ukit:implement-handoff TASK-005
23
+ TASK-006 [merge_conflict] → rebase handoff/task-006 on handoff/integration, re-run implement
21
24
 
22
- Find all tasks where status ≠ done:
23
- - ready → not started (run /ukit:implement-handoff TASK-xxx)
24
- - in_progress → executor still working
25
- - pending_review → waiting for review (run /ukit:review-handoff TASK-xxx)
26
- - changes_requested → executor must fix (run /ukit:implement-handoff TASK-xxx)
27
- - critical_block → executor must fix (run /ukit:implement-handoff TASK-xxx)
28
- - needs_breakdown → planner must split (run /ukit:create-handoff to re-plan)
29
- - blocked → needs human decision
25
+ Fix all tasks first, then re-run /ukit:clear-handoff.
26
+ ```
30
27
 
31
- If ANY task has status ≠ done → STOP IMMEDIATELY. Do NOT proceed to steps 2-4.
32
- Report:
28
+ Only continue if ALL tasks are `done`.
33
29
 
34
- ⛔ Cannot clear — X task(s) not done:
35
- - TASK-001 [pending_review] → run /ukit:review-handoff TASK-001
36
- - TASK-003 [changes_requested] → run /ukit:implement-handoff TASK-003
37
-
38
- Fix all tasks first, then re-run /ukit:clear-handoff.
30
+ ## Step 2 — Cleanup worktrees + branches
39
31
 
40
- Only continue to Step 2 if ALL tasks are done.
32
+ ```bash
33
+ # Remove any remaining task worktrees (should already be gone after review, but be safe)
34
+ git worktree list | grep '.worktrees/task-' | awk '{print $1}' | while read wt; do
35
+ name=$(basename $wt)
36
+ git worktree remove $wt --force 2>/dev/null
37
+ git branch -D handoff/$name 2>/dev/null
38
+ done
41
39
 
42
- ## Step 2 — Cleanup worktrees
40
+ # Remove integration branch if still exists
41
+ git branch -D handoff/integration 2>/dev/null
43
42
 
44
- git worktree list | grep handoff/
45
- For each .worktrees/task-xxx:
46
- git worktree remove .worktrees/task-xxx --force
47
- git branch -D handoff/task-xxx
48
43
  git worktree prune
44
+ ```
49
45
 
50
46
  ## Step 3 — Archive cycle
51
47
 
52
- Read INDEX.md cycle ID.
53
- Write docs/AI_HANDOFF/archive/cycle-NNN.md:
54
- # Cycle NNN — <YYYY-MM-DD>
55
- ## Summary: <1 paragraph of what was accomplished>
56
- ## Tasks: <copy INDEX.md table>
57
-
58
- If archive/ has > 3 files → delete oldest, append 1-line summary to HISTORY.md.
48
+ Read INDEX.md for cycle ID and task list.
49
+ Write `docs/AI_HANDOFF/archive/cycle-NNN.md`:
50
+ ```
51
+ # Cycle NNN — <YYYY-MM-DD> Base: <BASE>
52
+ ## Summary: <1 paragraph of what was accomplished>
53
+ ## Tasks: <copy INDEX.md table>
54
+ ```
55
+ If `archive/` has > 3 files → delete oldest, append 1-line summary to `HISTORY.md`.
59
56
 
60
57
  ## Step 4 — Reset state files
61
58
 
62
- PLAN.md → "# PLAN\n_(empty)_"
63
- INDEX.md → empty table header only
64
- ACTIVE.md → "# ACTIVE\n_(no active cycle)_"
59
+ ```
60
+ PLAN.md → "# PLAN\n_(empty)_"
61
+ INDEX.md → empty table header only
62
+ ACTIVE.md → "# ACTIVE\n_(no active cycle)_"
65
63
  tasks/TASK-*.md → delete all (keep _TEMPLATE.md)
64
+ ```
66
65
 
67
66
  ## Step 5 — Report
68
67
 
69
- Cycle NNN archived. X tasks completed. Worktrees removed. Ready for new cycle.
70
- ```
68
+ Cycle NNN archived. X tasks completed. Base was $BASE. Worktrees removed. Ready for new cycle.
69
+
70
+ > Claude Code: spawn `ukit-small-task-maintainer` (haiku) with steps 1–5.
71
+ > Other tools: use lite model, follow steps 1–5 above.
71
72
 
72
- After agent completes:
73
- > Ready for new cycle → `/ukit:create-handoff <description>`
73
+ **Next:** `/ukit:create-handoff <new problem description>`
@@ -1,61 +1,77 @@
1
- # /ukit:create-handoff
1
+ # /ukit:create-handoff — Phase 1 + 2: Plan
2
2
 
3
- Two-step: **lite model reads context** → **Opus writes plan**.
3
+ **Role: PLANNER**
4
+ **Tool: any** (Claude Code / Codex / Antigravity / Kilo / OpenCode — your choice)
5
+ **Model split:**
6
+ - Read/understand → lite model (haiku · unic-lite · cheapest available)
7
+ - Write plan + tasks → strong model (Opus · unic-smart · strongest available)
4
8
 
5
9
  ## Problem / feature
6
10
  $ARGUMENTS
7
11
 
8
12
  ---
9
13
 
10
- ## Step 1 — Pre-read (Haiku / unic-lite, fast)
14
+ ## Step 1 — Read context (lite model)
11
15
 
12
- Spawn Agent:
13
- - `subagent_type: ukit-small-task-maintainer`
14
- - `model: haiku`
15
- - `prompt`:
16
+ Use the lightest model available. Read and summarize:
16
17
 
17
- ```
18
- Read and summarize the current handoff state for the planner. Be compact.
18
+ 1. `docs/AI_HANDOFF/INDEX.md` → current tasks + statuses (or "empty")
19
+ 2. `docs/AI_HANDOFF/ACTIVE.md` → active cycle info (or "no active cycle")
20
+ 3. `docs/AI_HANDOFF/RULES.md` → PLAN.md 6-section format + Task Gate required fields
21
+ 4. `docs/AI_HANDOFF/tasks/_TEMPLATE.md` → task file structure
19
22
 
20
- 1. Read docs/AI_HANDOFF/INDEX.md → list all tasks + statuses (or "empty" if none)
21
- 2. Read docs/AI_HANDOFF/ACTIVE.md → current cycle ID + goal (or "no active cycle")
22
- 3. Read docs/AI_HANDOFF/RULES.md → extract: PLAN.md 6 sections, Task Gate fields, wave grouping rule
23
- 4. Read docs/AI_HANDOFF/tasks/_TEMPLATE.md → paste the template structure
23
+ Return compact summary. Do NOT write anything yet.
24
24
 
25
- Return a compact summary block the planner can read directly without opening files.
26
- ```
25
+ > Claude Code: spawn `ukit-small-task-maintainer` (haiku).
26
+ > Other tools: switch to lite model, run above, keep summary in context.
27
27
 
28
28
  ---
29
29
 
30
- ## Step 2 — Plan (Opus / unic-smart, strong)
30
+ ## Step 2 — Write plan + tasks (strong model)
31
31
 
32
- Take the summary from Step 1. Spawn Agent:
33
- - `subagent_type: handoff-planner`
34
- - `model: opus`
35
- - `prompt`:
32
+ Switch to strongest model. Use Step 1 summary — do NOT re-read files.
36
33
 
37
- ```
38
- Problem to plan: $ARGUMENTS
34
+ 1. If INDEX.md has undone tasks → warn human: continue old cycle or start fresh?
39
35
 
40
- Pre-read context (from lite agent):
41
- <insert Step 1 output here>
36
+ 2. Resolve base branch:
37
+ ```bash
38
+ BASE=$(git symbolic-ref --short HEAD)
39
+ ```
42
40
 
43
- Using the context above (do NOT re-read the same files):
41
+ 3. Write `docs/AI_HANDOFF/PLAN.md` — all 6 sections mandatory:
42
+ - §1 Intent — problem + success definition
43
+ - §2 Scope — in / out of scope. **Add a constraint**: same-wave tasks must not modify the same file (prevents merge conflicts). If two tasks need the same file, make one depend on the other.
44
+ - §3 Approach — solution, trade-offs, alternatives rejected
45
+ - §4 Test Plan — happy path + ≥1 edge case + regression if bugfix (non-negotiable)
46
+ - §5 Verification — exact shell commands executor will run
47
+ - §6 Acceptance — done checklist (prefer verifiable criteria with commands)
44
48
 
45
- 1. If INDEX.md shows undone tasks → warn human: continue old cycle or start fresh?
49
+ 4. Create `docs/AI_HANDOFF/tasks/TASK-001.md`, `TASK-002.md`... from `_TEMPLATE.md`
50
+ Every task MUST have:
51
+ - Target Files (exact paths — no two tasks in same wave share a file)
52
+ - Dependencies (`TASK-xxx` or `none` — wave structure inferred from this, not stored separately)
53
+ - Test Cases (Type | Name | Expected — ≥1 happy + ≥1 edge case)
54
+ - Test Files (exact paths)
55
+ - Verification Commands (runnable shell commands)
56
+ - Acceptance Criteria (verifiable checklist)
57
+ Missing any field → status: `needs_breakdown`, never `ready`
46
58
 
47
- 2. Write docs/AI_HANDOFF/PLAN.md — all 6 sections (from RULES.md format in context):
48
- §1 Intent | §2 Scope | §3 Approach | §4 Test Plan | §5 Verification | §6 Acceptance
49
- §4 Test Plan: happy path + ≥1 edge case + regression if bugfix — non-negotiable
59
+ 5. Update `INDEX.md` — one row per task, `status=ready`
50
60
 
51
- 3. Create docs/AI_HANDOFF/tasks/TASK-001.md ... using _TEMPLATE.md structure (from context)
52
- Each task MUST have all Task Gate fields. Missing any → needs_breakdown, never ready.
61
+ 6. Update `ACTIVE.md`:
62
+ ```
63
+ Cycle: <ID> Date: <YYYY-MM-DD> Base: <BASE>
64
+ Goal: <1 sentence>
65
+ Tasks: <N> total
66
+ Status: planning_done — ready for executor
67
+ ```
68
+ Note: wave structure is inferred from task Dependencies fields — not stored here.
53
69
 
54
- 4. Update INDEX.md — add rows, status=ready
55
- 5. Update ACTIVE.md — cycle snapshot + wave structure
70
+ 7. Report: task IDs, dependency graph, any `needs_breakdown` + reason
56
71
 
57
- 6. Report: task list + IDs, wave map, any needs_breakdown, next step for human
58
- ```
72
+ > Claude Code: spawn `handoff-planner` (opus) with Step 1 summary + problem.
73
+ > Other tools: switch to strong model, execute steps 1–7 above.
59
74
 
60
- After both agents complete:
61
- > Switch to **Sonnet / unic-code** → run `/ukit:implement-handoff`
75
+ ---
76
+
77
+ **Next:** switch to code model → `/ukit:implement-handoff`
@@ -1,47 +1,109 @@
1
- # /ukit:implement-handoff
1
+ # /ukit:implement-handoff — Phase 3: Execute
2
2
 
3
- Spawn **feature-implementer** agents in parallel waves (Sonnet / unic-code).
3
+ **Role: EXECUTOR (orchestrated)**
4
+ **Tool: any** (Claude Code / Codex / Antigravity / Kilo / OpenCode — your choice)
5
+ **Model: code model** (Sonnet · unic-code · cheap-smart)
4
6
 
5
7
  ## Target (optional)
6
8
  $ARGUMENTS
7
- _Empty = all ready tasks. Or: "TASK-001" for a specific task._
9
+ _Empty = all `ready` tasks. Or: "TASK-001" for a specific task._
8
10
 
9
11
  ---
10
12
 
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
13
+ ## Step 1 — Setup
14
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
15
+ Read `docs/AI_HANDOFF/ACTIVE.md` → get `Base: <BASE>` (the branch set at plan time).
16
+ Read `docs/AI_HANDOFF/INDEX.md` → collect `ready` tasks (or specific task from $ARGUMENTS).
17
+ If no ready tasks → report and stop.
18
18
 
19
- 3. For each wave — spawn feature-implementer agents **in parallel**, one per task:
19
+ Create integration branch (once per cycle, skip if already exists):
20
+ ```bash
21
+ git branch handoff/integration $BASE 2>/dev/null || echo "integration branch already exists"
22
+ ```
23
+
24
+ ## Step 2 — Build wave groups
25
+
26
+ Wave structure is inferred from task `Dependencies` fields — read each `tasks/TASK-xxx.md`:
27
+ - Wave 1: tasks where `Dependencies: none` (or all deps already `done`)
28
+ - Wave 2: tasks whose deps are all in Wave 1
29
+ - Wave N+1: tasks whose deps are all in Wave N or earlier
30
+
31
+ ## Step 3 — Execute wave by wave
20
32
 
33
+ For each wave:
34
+
35
+ ### 3a — Create worktrees (branch from `handoff/integration`)
36
+ ```bash
37
+ # For each task in this wave:
38
+ git worktree add -b handoff/task-xxx .worktrees/task-xxx handoff/integration
39
+ # (omit -b if branch already exists; worktrees stay open until review-handoff cleans up)
21
40
  ```
22
- Implement docs/AI_HANDOFF/tasks/TASK-xxx.md in handoff mode.
23
41
 
24
- Worktree:
25
- git worktree add -b handoff/task-xxx .worktrees/task-xxx
26
- (skip -b if branch already exists)
42
+ ### 3b — Run tasks in parallel (one agent/session per task)
43
+
44
+ Each executor does — **independently, in its own worktree**:
45
+
46
+ ```
47
+ Read docs/AI_HANDOFF/tasks/TASK-xxx.md
27
48
 
28
- TDD (mandatory):
29
- 1. Write tests from §Test Cases → run → confirm RED
49
+ TDD — mandatory:
50
+ 1. Write tests from §Test Cases
51
+ Run: cd .worktrees/task-xxx && <test command>
52
+ Confirm RED (if immediately GREEN → test is wrong or feature already exists — flag this)
30
53
  2. Implement → run → confirm GREEN
31
- 3. Run §Verification Commands → paste full output
54
+ 3. Run §Verification Commands from INSIDE the worktree:
55
+ cd .worktrees/task-xxx && <each verification command>
56
+ Paste full output.
32
57
 
33
- Executor Report (append to task file):
34
- EXECUTOR_TOOL / EXECUTOR_MODEL / EXECUTOR_SUBAGENT: feature-implementer
58
+ Commit in worktree (required before reporting):
59
+ git -C .worktrees/task-xxx add -A
60
+ git -C .worktrees/task-xxx commit -m "feat(TASK-xxx): <intent from task §1>"
61
+
62
+ Executor Report (append to task file — do NOT touch INDEX.md):
63
+ ## Executor Report
64
+ EXECUTOR_TOOL: <tool name>
65
+ EXECUTOR_MODEL: <exact model ID — mandatory, reviewer will refuse if missing>
66
+ EXECUTOR_SUBAGENT: <subagent name or "-">
35
67
  Verification Output: <paste>
36
68
  Status: PASS | FAIL
69
+ Note: <any issues, or "none">
70
+ ```
37
71
 
38
- Update INDEX.md: status → pending_review
72
+ > Claude Code: spawn `feature-implementer` agents in parallel (one per task).
73
+ > Other tools: open each task in a separate session with code model.
39
74
 
40
- If tests FAIL → fix in same worktree before updating status. Never mark pending_review with a FAIL.
41
- ```
75
+ ### 3c — After all tasks in wave report back (orchestrator)
76
+
77
+ For each task:
78
+ - If `Status: PASS` AND `EXECUTOR_MODEL` present → merge into integration:
79
+ ```bash
80
+ if git merge handoff/task-xxx --no-ff -m "wave-merge(TASK-xxx)" --no-commit 2>/dev/null; then
81
+ git commit -m "wave-merge(TASK-xxx)"
82
+ # update INDEX.md: status → pending_review
83
+ else
84
+ git merge --abort
85
+ # update INDEX.md: status → merge_conflict
86
+ # append to task §Discussion: "merge_conflict with <previously merged tasks in this wave>"
87
+ # report to human: rebase handoff/task-xxx on handoff/integration, re-run
88
+ fi
89
+ ```
90
+ - If `Status: FAIL` → update INDEX.md: status → `blocked`
91
+ - If `EXECUTOR_MODEL` missing → update INDEX.md: status → `needs_executor_report`; do not set pending_review
42
92
 
43
- 4. Wait for all agents in the wave → run next wave
93
+ **Orchestrator writes INDEX.md** — agents never touch INDEX directly.
44
94
 
45
- 5. Report: PASS/FAIL per task, worktrees created, any blockers
95
+ ### 3d — Next wave
96
+ Branch new wave worktrees from `handoff/integration` (which now includes Wave N's code).
97
+ Repeat 3a–3c.
98
+
99
+ ## Step 4 — Report
100
+
101
+ ```
102
+ Wave summary:
103
+ Wave 1: TASK-001 [pending_review], TASK-002 [blocked]
104
+ Wave 2: TASK-003 [pending_review]
105
+ Merge conflicts: none | TASK-xxx (needs rebase)
106
+ Worktrees open: .worktrees/task-001, .worktrees/task-003
107
+ ```
46
108
 
47
- > Switch to **Opus / unic-smart** → run `/ukit:review-handoff`
109
+ **Next:** switch to strong model → `/ukit:review-handoff`
@@ -1,61 +1,117 @@
1
- # /ukit:review-handoff
1
+ # /ukit:review-handoff — Phase 4: Review
2
2
 
3
- Spawn **code-reviewer** agents (Opus / unic-smart — MUST differ from executor).
4
- After approval: merge worktree → delete branch + worktree.
3
+ **Role: REVIEWER**
4
+ **Tool: any** (Claude Code / Codex / Antigravity / Kilo / OpenCode — your choice)
5
+ **Model: strong model, MUST differ from executor** (Opus · unic-smart · strongest available)
5
6
 
6
7
  ## Target (optional)
7
8
  $ARGUMENTS
8
- _Empty = all pending_review tasks. Or: "TASK-001" for a specific task._
9
+ _Empty = all `pending_review` tasks. Or: "TASK-001" for a specific task._
9
10
 
10
11
  ---
11
12
 
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
13
+ ## Step 1 — Setup
15
14
 
16
- 2. For each task — spawn a **code-reviewer** agent:
15
+ Read `docs/AI_HANDOFF/ACTIVE.md` → get `Base: <BASE>`.
16
+ Read `docs/AI_HANDOFF/INDEX.md` → collect `pending_review` tasks (or specific task).
17
+ If none → report and stop.
17
18
 
19
+ ## Step 2 — Review each task
20
+
21
+ **IMPORTANT: run tasks sequentially (not parallel) to avoid INDEX.md race conditions.**
22
+
23
+ For each task:
24
+
25
+ ### 2a — Model isolation check (do this first, always)
26
+
27
+ Read `EXECUTOR_MODEL` from `## Executor Report` in task file.
28
+
29
+ | Executor model | Your model | Action |
30
+ |----------------|------------|--------|
31
+ | present, ≠ yours | present | proceed |
32
+ | present, == yours | present | REFUSE → `changes_requested`: "reviewer model must differ from executor" |
33
+ | missing / blank | any | REFUSE → `changes_requested`: "EXECUTOR_MODEL not reported — executor must re-run and fill in" |
34
+ | "unknown" | present | proceed, add NOTES: "executor model unverified — human confirm before merge" |
35
+
36
+ ### 2b — Re-run verification (in the worktree, not main)
37
+
38
+ ```bash
39
+ # Run INSIDE the task's worktree — not from root:
40
+ cd .worktrees/task-xxx
41
+ <each command from §Verification Commands>
18
42
  ```
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
43
+
44
+ If any command fails → verdict: `critical_block`. Stop — do not review code.
45
+
46
+ ### 2c — Review diff
47
+
48
+ ```bash
49
+ # What this task added on top of its wave base:
50
+ BASE_OF_TASK=$(git merge-base handoff/integration handoff/task-xxx)
51
+ git diff $BASE_OF_TASK..handoff/task-xxx
39
52
  ```
40
53
 
41
- 3. After each agent verdict:
54
+ Check: correctness, regression risk, security, edge cases, maintainability.
42
55
 
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
- ```
56
+ ### 2d — Append verdict to task file
50
57
 
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
- ```
58
+ ```
59
+ ## Reviewer Verdict
60
+ VERDICT: approved | approved_minor | changes_requested | critical_block
61
+ REVIEWER_MODEL: <your exact model ID>
62
+ EXECUTOR_MODEL: <from Executor Report>
63
+ VERIFICATION_RERUN: PASS | FAIL
64
+ FINDINGS:
65
+ critical: <file:line — what fails> | none
66
+ important: <file:line — risk> | none
67
+ minor: <style/naming> | none
68
+ NEXT_STATUS_FOR_INDEX: approved | approved_minor | changes_requested | critical_block
69
+ ```
70
+
71
+ ### 2e — Orchestrator updates INDEX.md
72
+
73
+ Set `status = NEXT_STATUS_FOR_INDEX` for this task.
74
+ (Reviewer writes verdict to task file; orchestrator writes INDEX — same principle as implement.)
75
+
76
+ ## Step 3 — After all tasks reviewed: handle integration
77
+
78
+ **Only if all tasks are `approved` or `approved_minor`:**
79
+
80
+ ```bash
81
+ # Merge integration → BASE (single merge, one clean history entry)
82
+ git checkout $BASE
83
+ if git merge handoff/integration --no-ff -m "feat: handoff cycle complete"; then
84
+ # Cleanup all task worktrees + branches
85
+ for task in $(git worktree list | grep '.worktrees/task-' | awk '{print $1}'); do
86
+ name=$(basename $task)
87
+ git worktree remove $task --force
88
+ git branch -d handoff/$name 2>/dev/null || git branch -D handoff/$name
89
+ done
90
+ git branch -d handoff/integration
91
+ # INDEX.md: all approved tasks → done
92
+ else
93
+ git merge --abort
94
+ # Report: unexpected conflict on integration→BASE merge. Human must resolve manually.
95
+ fi
96
+ ```
97
+
98
+ **If any task has `changes_requested` or `critical_block`:**
99
+ Keep all worktrees and integration branch open.
100
+ Report which tasks need fixes.
101
+
102
+ ## Step 4 — Report
103
+
104
+ ```
105
+ Review summary:
106
+ TASK-001: approved — merged
107
+ TASK-002: changes_requested — see §Discussion
108
+ Integration: pending (TASK-002 needs fix first)
109
+ Worktrees remaining: .worktrees/task-002
110
+ ```
57
111
 
58
- 4. Report: approved+merged tasks, tasks needing fixes, remaining worktrees
112
+ **Next:**
113
+ - All approved + merged → `/ukit:clear-handoff`
114
+ - Has fixes → executor re-runs `/ukit:implement-handoff TASK-xxx`
59
115
 
60
- > All done? → `/ukit:clear-handoff`
61
- > Tasks need fixes? → human runs `/ukit:implement-handoff TASK-xxx`
116
+ > Claude Code: spawn `code-reviewer` agent (opus) per task for Steps 2a–2e. Orchestrator handles Steps 1, 2e (INDEX write), and Step 3.
117
+ > Other tools: use strong model sequentially per task, same steps.
@@ -0,0 +1,49 @@
1
+ # /ukit:status-handoff — Dashboard (read-only)
2
+
3
+ **Role: OBSERVER**
4
+ **Tool: any**
5
+ **Model: lite model** (haiku · unic-lite — read-only, no writes)
6
+
7
+ ---
8
+
9
+ Read and display current handoff state. Do NOT modify any files.
10
+
11
+ ## Read
12
+
13
+ 1. `docs/AI_HANDOFF/ACTIVE.md` → cycle ID, goal, base branch
14
+ 2. `docs/AI_HANDOFF/INDEX.md` → all tasks + statuses
15
+ 3. `git worktree list` → open worktrees
16
+ 4. `git branch | grep handoff/` → open handoff branches
17
+
18
+ ## Report
19
+
20
+ ```
21
+ ━━━ Handoff Status ━━━━━━━━━━━━━━━━━━━━━━━━
22
+ Cycle: <ID> Base: <branch> Date: <date>
23
+ Goal: <goal>
24
+
25
+ Tasks:
26
+ ✅ done TASK-001 <name>
27
+ 🔄 pending_review TASK-002 <name>
28
+ 🔧 in_progress TASK-003 <name>
29
+ 🔴 blocked TASK-004 <name>
30
+ ⏳ ready TASK-005 <name>
31
+
32
+ Summary: X done / Y pending_review / Z in_progress / ... / N total
33
+
34
+ Worktrees open:
35
+ .worktrees/task-002 [handoff/task-002]
36
+ .worktrees/task-003 [handoff/task-003]
37
+
38
+ Integration branch: handoff/integration [exists | not created yet]
39
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
40
+
41
+ Next action:
42
+ pending_review tasks → /ukit:review-handoff
43
+ ready tasks → /ukit:implement-handoff
44
+ all done → /ukit:clear-handoff
45
+ no active cycle → /ukit:create-handoff <description>
46
+ ```
47
+
48
+ > Claude Code: spawn `ukit-small-task-maintainer` (haiku) with the above prompt.
49
+ > Other tools: use lite model, run the reads above, format the report.