@ngockhoale/ukit 1.5.10 → 1.5.11

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.5.10",
3
+ "version": "1.5.11",
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",
@@ -1,73 +1,64 @@
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 available — this is just file ops)
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.
16
-
17
- ## Step 1 — GATE CHECK (mandatory, cannot skip)
13
+ Read `docs/AI_HANDOFF/INDEX.md`. List every task + status.
18
14
 
19
- Read docs/AI_HANDOFF/INDEX.md.
20
- List every task and its status.
15
+ If ANY task has status ≠ `done` → **STOP**. Report and exit:
21
16
 
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
30
-
31
- If ANY task has status ≠ done → STOP IMMEDIATELY. Do NOT proceed to steps 2-4.
32
- Report:
17
+ ```
18
+ ⛔ Cannot clear — X task(s) not done:
19
+ TASK-001 [pending_review] → run /ukit:review-handoff TASK-001
20
+ TASK-003 [changes_requested] → run /ukit:implement-handoff TASK-003
21
+ TASK-005 [ready] → run /ukit:implement-handoff TASK-005
33
22
 
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.
23
+ Fix all tasks first, then re-run /ukit:clear-handoff.
24
+ ```
39
25
 
40
- Only continue to Step 2 if ALL tasks are done.
26
+ Only proceed if ALL tasks are `done`.
41
27
 
42
28
  ## Step 2 — Cleanup worktrees
43
29
 
30
+ ```bash
44
31
  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
32
+ # For each .worktrees/task-xxx:
33
+ git worktree remove .worktrees/task-xxx --force
34
+ git branch -D handoff/task-xxx
48
35
  git worktree prune
36
+ ```
49
37
 
50
38
  ## Step 3 — Archive cycle
51
39
 
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.
40
+ Write `docs/AI_HANDOFF/archive/cycle-NNN.md`:
41
+ ```
42
+ # Cycle NNN — <YYYY-MM-DD>
43
+ ## Summary: <1 paragraph of what was accomplished>
44
+ ## Tasks: <copy INDEX.md table>
45
+ ```
46
+ If `archive/` has > 3 files → delete oldest, append 1-line to `HISTORY.md`.
59
47
 
60
48
  ## Step 4 — Reset state files
61
49
 
50
+ ```
62
51
  PLAN.md → "# PLAN\n_(empty)_"
63
52
  INDEX.md → empty table header only
64
53
  ACTIVE.md → "# ACTIVE\n_(no active cycle)_"
65
54
  tasks/TASK-*.md → delete all (keep _TEMPLATE.md)
55
+ ```
66
56
 
67
57
  ## Step 5 — Report
68
58
 
69
59
  Cycle NNN archived. X tasks completed. Worktrees removed. Ready for new cycle.
70
- ```
71
60
 
72
- After agent completes:
73
- > Ready for new cycle → `/ukit:create-handoff <description>`
61
+ > Claude Code: spawn `ukit-small-task-maintainer` (haiku) with steps 1–5.
62
+ > Other tools: use lite model, follow steps 1–5 above.
63
+
64
+ **Next:** `/ukit:create-handoff <new problem description>`
@@ -1,61 +1,64 @@
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/cheapest 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 a 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) with the above prompt.
26
+ > Other tools: switch to your lite model, run the above steps, keep the 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. Using the summary from Step 1 (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. Write `docs/AI_HANDOFF/PLAN.md` — all 6 sections mandatory:
37
+ - §1 Intent — problem + success definition
38
+ - §2 Scope — in / out of scope
39
+ - §3 Approach — solution, trade-offs, alternatives rejected
40
+ - §4 Test Plan — happy path + ≥1 edge case + regression if bugfix (non-negotiable)
41
+ - §5 Verification — exact shell commands executor will run
42
+ - §6 Acceptance — done checklist
42
43
 
43
- Using the context above (do NOT re-read the same files):
44
+ 3. Create `docs/AI_HANDOFF/tasks/TASK-001.md`, `TASK-002.md`... from `_TEMPLATE.md`
45
+ Every task MUST have:
46
+ - Target Files (exact paths)
47
+ - Dependencies (`TASK-xxx` or `none`)
48
+ - Test Cases (Type | Name | Expected — ≥1 happy + ≥1 edge case)
49
+ - Test Files (exact paths)
50
+ - Verification Commands (runnable shell commands)
51
+ - Acceptance Criteria (checklist)
52
+ Missing any field → status: `needs_breakdown`, never `ready`
44
53
 
45
- 1. If INDEX.md shows undone tasks → warn human: continue old cycle or start fresh?
54
+ 4. Update `INDEX.md` — one row per task, `status=ready`
55
+ 5. Update `ACTIVE.md` — cycle snapshot + wave structure (Wave 1 = no deps, Wave 2 = depends on Wave 1...)
46
56
 
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
57
+ 6. Report: task IDs, wave map, any `needs_breakdown` + reason
50
58
 
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.
59
+ > Claude Code: spawn `handoff-planner` (opus) with Step 1 summary + problem injected.
60
+ > Other tools: switch to strong model, execute steps 1–6 above.
53
61
 
54
- 4. Update INDEX.md — add rows, status=ready
55
- 5. Update ACTIVE.md — cycle snapshot + wave structure
56
-
57
- 6. Report: task list + IDs, wave map, any needs_breakdown, next step for human
58
- ```
62
+ ---
59
63
 
60
- After both agents complete:
61
- > Switch to **Sonnet / unic-code** → run `/ukit:implement-handoff`
64
+ **Next:** switch to code model → `/ukit:implement-handoff`
@@ -1,47 +1,56 @@
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**
4
+ **Tool: any** (Claude Code / Codex / Antigravity / Kilo / OpenCode — your choice)
5
+ **Model: code model** (Sonnet · unic-code · cheap-smart available)
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
13
  1. Read `docs/AI_HANDOFF/INDEX.md`
12
- - Collect tasks with status `ready` (or the specific task from $ARGUMENTS)
14
+ - Collect all tasks with status `ready` (or specific task from $ARGUMENTS)
13
15
  - If none → report and stop
14
16
 
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
17
+ 2. Group into waves by dependency:
18
+ - Wave 1: `dependencies: none` or all deps already `done`
19
+ - Wave 2+: depends on previous wave
18
20
 
19
- 3. For each wave — spawn feature-implementer agents **in parallel**, one per task:
21
+ 3. For each wave — run tasks **in parallel** (one agent/session per task):
20
22
 
21
- ```
22
- Implement docs/AI_HANDOFF/tasks/TASK-xxx.md in handoff mode.
23
+ **Each task executor does:**
23
24
 
24
- Worktree:
25
- git worktree add -b handoff/task-xxx .worktrees/task-xxx
26
- (skip -b if branch already exists)
25
+ ```
26
+ Worktree (isolated per task):
27
+ git worktree add -b handoff/task-xxx .worktrees/task-xxx
28
+ (omit -b if branch already exists)
27
29
 
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
30
+ TDD — mandatory:
31
+ 1. Read §Test Cases from task file
32
+ 2. Write tests → run → confirm RED
33
+ 3. Implement → run → confirm GREEN
34
+ 4. Run §Verification Commands → paste full output
32
35
 
33
- Executor Report (append to task file):
34
- EXECUTOR_TOOL / EXECUTOR_MODEL / EXECUTOR_SUBAGENT: feature-implementer
35
- Verification Output: <paste>
36
- Status: PASS | FAIL
36
+ Executor Report (append to task file):
37
+ ## Executor Report
38
+ EXECUTOR_TOOL: <tool name>
39
+ EXECUTOR_MODEL: <exact model ID — must be honest, reviewer will check>
40
+ Verification Output: <paste>
41
+ Status: PASS | FAIL
37
42
 
38
- Update INDEX.md: status → pending_review
43
+ Update INDEX.md: status → pending_review
39
44
 
40
- If tests FAIL → fix in same worktree before updating status. Never mark pending_review with a FAIL.
41
- ```
45
+ If FAIL → fix in same worktree before updating status.
46
+ Never mark pending_review while tests still fail.
47
+ ```
42
48
 
43
- 4. Wait for all agents in the wave → run next wave
49
+ > Claude Code: spawn `feature-implementer` agent per task (parallel).
50
+ > Other tools: open each task in a separate session/tab with code model, follow steps above.
44
51
 
45
- 5. Report: PASS/FAIL per task, worktrees created, any blockers
52
+ 4. Wait for all tasks in wave → run next wave if any
46
53
 
47
- > Switch to **Opus / unic-smart** → run `/ukit:review-handoff`
54
+ 5. Report: PASS/FAIL per task, worktrees created, blockers
55
+
56
+ **Next:** switch to strong model → `/ukit:review-handoff`
@@ -1,11 +1,12 @@
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
 
@@ -13,34 +14,44 @@ _Empty = all pending_review tasks. Or: "TASK-001" for a specific task._
13
14
  - Collect tasks with status `pending_review` (or specific task from $ARGUMENTS)
14
15
  - If none → report and stop
15
16
 
16
- 2. For each task — spawn a **code-reviewer** agent:
17
+ 2. For each task — **MUST use a different model than the executor**:
17
18
 
18
- ```
19
- Review docs/AI_HANDOFF/tasks/TASK-xxx.md
19
+ ```
20
+ Read task file: docs/AI_HANDOFF/tasks/TASK-xxx.md
21
+
22
+ Model isolation check (first thing):
23
+ Read EXECUTOR_MODEL from Executor Report
24
+ → REFUSE if your model == EXECUTOR_MODEL (or either is unknown)
25
+ → This is non-negotiable. Same model reviewing its own work defeats the quality gate.
26
+
27
+ Re-run §Verification Commands fresh:
28
+ → Do NOT trust executor's output. Run them yourself.
29
+ → If FAIL → verdict: critical_block. Stop.
20
30
 
21
- Inputs:
22
- - Task file (Test Plan + Verification Commands + Executor Report)
23
- - Diff: git -C .worktrees/task-xxx diff main
31
+ Review diff:
32
+ git -C .worktrees/task-xxx diff main
33
+ Check: correctness, regression risk, security, edge cases, maintainability
24
34
 
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>
35
+ Append ## Reviewer Verdict to task file:
36
+ VERDICT: approved | approved_minor | changes_requested | critical_block
37
+ REVIEWER_MODEL: <your model>
38
+ EXECUTOR_MODEL: <from report>
39
+ VERIFICATION_RERUN: PASS | FAIL
40
+ FINDINGS:
41
+ critical: ...
42
+ important: ...
43
+ minor: ...
44
+ NEXT_STATUS_FOR_INDEX: <status>
45
+
46
+ Update INDEX.md: status = NEXT_STATUS_FOR_INDEX
47
+ ```
37
48
 
38
- 5. Update INDEX.md: set status = NEXT_STATUS_FOR_INDEX
39
- ```
49
+ > Claude Code: spawn `code-reviewer` agent (opus) per task.
50
+ > Other tools: switch to strong model (different from executor), follow steps above per task.
40
51
 
41
- 3. After each agent verdict:
52
+ 3. After each verdict:
42
53
 
43
- **approved / approved_minor:**
54
+ **approved / approved_minor →** merge + cleanup:
44
55
  ```bash
45
56
  git merge handoff/task-xxx --no-ff -m "feat: merge TASK-xxx"
46
57
  git worktree remove .worktrees/task-xxx
@@ -48,14 +59,14 @@ Steps:
48
59
  # INDEX.md: status → done
49
60
  ```
50
61
 
51
- **changes_requested / critical_block:**
62
+ **changes_requested / critical_block →** keep worktree for executor to fix:
52
63
  ```
53
- Keep worktree — executor must fix
54
- Write findings in task file §Discussion
64
+ Write findings in §Discussion of task file
55
65
  # INDEX.md: status → changes_requested | critical_block
56
66
  ```
57
67
 
58
- 4. Report: approved+merged tasks, tasks needing fixes, remaining worktrees
68
+ 4. Report: merged tasks, tasks needing fixes, remaining worktrees
59
69
 
60
- > All done? → `/ukit:clear-handoff`
61
- > Tasks need fixes? → human runs `/ukit:implement-handoff TASK-xxx`
70
+ **Next:**
71
+ - All done → `/ukit:clear-handoff`
72
+ - Has fixes → executor runs `/ukit:implement-handoff TASK-xxx`