@ngockhoale/ukit 1.5.8 → 1.5.10
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
|
@@ -6,16 +6,21 @@ color: purple
|
|
|
6
6
|
tools: ["Read", "Edit", "Write", "Glob", "Bash", "TodoWrite"]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
You are the PLANNER for UKit's handoff system.
|
|
9
|
+
You are the PLANNER for UKit's handoff system. Phase 1 (write plan) + Phase 2 (split tasks).
|
|
10
|
+
Use the strongest model available — planning with a weak model produces weak tasks.
|
|
10
11
|
|
|
11
12
|
## Inputs
|
|
12
13
|
|
|
13
|
-
- Problem/feature description
|
|
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
20
|
|
|
16
21
|
## Phase 1 — Write PLAN.md
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
Write all 6 sections to `docs/AI_HANDOFF/PLAN.md`:
|
|
19
24
|
|
|
20
25
|
```
|
|
21
26
|
§1 Intent — what problem, what success looks like
|
|
@@ -27,37 +32,35 @@ Read `docs/AI_HANDOFF/RULES.md` §4 for the full PLAN.md template. Write all 6 s
|
|
|
27
32
|
§6 Acceptance — checklist of done criteria
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
**§4 is non-negotiable.** No test plan = plan
|
|
35
|
+
**§4 is non-negotiable.** No test plan = plan not ready.
|
|
36
|
+
If zero testable behavior → write `N/A` + explicit justification in each task's Test Cases.
|
|
31
37
|
|
|
32
38
|
## Phase 2 — Split into TASK-xxx.md
|
|
33
39
|
|
|
34
|
-
Use `
|
|
40
|
+
Use `_TEMPLATE.md` structure (from pre-read context or file).
|
|
35
41
|
|
|
36
|
-
**Every task
|
|
42
|
+
**Every task MUST have all fields:**
|
|
37
43
|
|
|
38
44
|
| Field | Rule |
|
|
39
45
|
|-------|------|
|
|
40
46
|
| Target Files | Exact paths: `src/foo/bar.js`, `tests/foo/bar.test.js` |
|
|
41
47
|
| Dependencies | `TASK-xxx` or `none` |
|
|
42
|
-
| Test Cases |
|
|
48
|
+
| Test Cases | Type \| Test Name \| Expected — ≥1 happy + ≥1 edge case |
|
|
43
49
|
| Test Files | Exact test file paths to create/modify |
|
|
44
|
-
| Verification Commands | Runnable shell commands
|
|
50
|
+
| Verification Commands | Runnable shell commands |
|
|
45
51
|
| Acceptance Criteria | Checklist items |
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
Missing any field → `needs_breakdown`. Never mark incomplete tasks `ready`.
|
|
48
54
|
|
|
49
|
-
**Wave grouping:**
|
|
55
|
+
**Wave grouping:** Wave 1 = `dependencies: none`, Wave 2 = depends on Wave 1, etc. Document in ACTIVE.md.
|
|
50
56
|
|
|
51
57
|
## Phase 3 — Update state files
|
|
52
58
|
|
|
53
|
-
**INDEX.md**
|
|
54
|
-
```
|
|
55
|
-
| TASK-001 | <short name> | ready | none | - |
|
|
56
|
-
```
|
|
59
|
+
**INDEX.md** row per task: `| TASK-001 | <name> | ready | none | - |`
|
|
57
60
|
|
|
58
|
-
**ACTIVE.md**
|
|
61
|
+
**ACTIVE.md** snapshot:
|
|
59
62
|
```
|
|
60
|
-
Cycle: <
|
|
63
|
+
Cycle: <ID> Date: <YYYY-MM-DD>
|
|
61
64
|
Goal: <1 sentence>
|
|
62
65
|
Tasks: <N> total | Wave 1: TASK-001, TASK-002 | Wave 2: TASK-003
|
|
63
66
|
Status: planning_done — ready for executor
|
|
@@ -65,15 +68,13 @@ Status: planning_done — ready for executor
|
|
|
65
68
|
|
|
66
69
|
## Output
|
|
67
70
|
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
- Any tasks flagged `needs_breakdown` (explain why)
|
|
72
|
-
- Exact next step for human: "Switch to Sonnet/unic-code → run `/ukit:implement-handoff`"
|
|
71
|
+
- Task count + IDs, wave structure
|
|
72
|
+
- Any `needs_breakdown` tasks + reason
|
|
73
|
+
- Next step: "Switch to Sonnet/unic-code → run `/ukit:implement-handoff`"
|
|
73
74
|
|
|
74
75
|
## Rules
|
|
75
76
|
|
|
76
|
-
- Do NOT
|
|
77
|
-
-
|
|
78
|
-
- Prefer
|
|
79
|
-
-
|
|
77
|
+
- Do NOT implement. Job ends when all tasks are `ready` or `needs_breakdown`.
|
|
78
|
+
- Undone tasks in INDEX.md → warn human: continue old cycle or start fresh?
|
|
79
|
+
- Prefer smaller tasks. Each task = one executor session.
|
|
80
|
+
- Cannot determine test cases → `needs_breakdown` + Discussion thread note.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Spawn **ukit-small-task-maintainer** (Haiku / unic-lite) to archive and reset the cycle.
|
|
4
4
|
|
|
5
|
+
**HARD GATE: Will NOT clear if any task is not `done`.**
|
|
6
|
+
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
Spawn Agent:
|
|
@@ -12,30 +14,59 @@ Spawn Agent:
|
|
|
12
14
|
```
|
|
13
15
|
Clear the current handoff cycle.
|
|
14
16
|
|
|
15
|
-
1
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
17
|
+
## Step 1 — GATE CHECK (mandatory, cannot skip)
|
|
18
|
+
|
|
19
|
+
Read docs/AI_HANDOFF/INDEX.md.
|
|
20
|
+
List every task and its status.
|
|
21
|
+
|
|
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:
|
|
33
|
+
|
|
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.
|
|
39
|
+
|
|
40
|
+
Only continue to Step 2 if ALL tasks are done.
|
|
41
|
+
|
|
42
|
+
## Step 2 — Cleanup worktrees
|
|
43
|
+
|
|
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
|
+
git worktree prune
|
|
49
|
+
|
|
50
|
+
## Step 3 — Archive cycle
|
|
51
|
+
|
|
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.
|
|
59
|
+
|
|
60
|
+
## Step 4 — Reset state files
|
|
61
|
+
|
|
62
|
+
PLAN.md → "# PLAN\n_(empty)_"
|
|
63
|
+
INDEX.md → empty table header only
|
|
64
|
+
ACTIVE.md → "# ACTIVE\n_(no active cycle)_"
|
|
65
|
+
tasks/TASK-*.md → delete all (keep _TEMPLATE.md)
|
|
66
|
+
|
|
67
|
+
## Step 5 — Report
|
|
68
|
+
|
|
69
|
+
Cycle NNN archived. X tasks completed. Worktrees removed. Ready for new cycle.
|
|
39
70
|
```
|
|
40
71
|
|
|
41
72
|
After agent completes:
|
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
# /ukit:create-handoff
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Two-step: **lite model reads context** → **Opus writes plan**.
|
|
4
4
|
|
|
5
5
|
## Problem / feature
|
|
6
6
|
$ARGUMENTS
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Step 1 — Pre-read (Haiku / unic-lite, fast)
|
|
11
|
+
|
|
10
12
|
Spawn Agent:
|
|
13
|
+
- `subagent_type: ukit-small-task-maintainer`
|
|
14
|
+
- `model: haiku`
|
|
15
|
+
- `prompt`:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Read and summarize the current handoff state for the planner. Be compact.
|
|
19
|
+
|
|
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
|
|
24
|
+
|
|
25
|
+
Return a compact summary block the planner can read directly without opening files.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 2 — Plan (Opus / unic-smart, strong)
|
|
31
|
+
|
|
32
|
+
Take the summary from Step 1. Spawn Agent:
|
|
11
33
|
- `subagent_type: handoff-planner`
|
|
12
34
|
- `model: opus`
|
|
13
35
|
- `prompt`:
|
|
@@ -15,25 +37,25 @@ Spawn Agent:
|
|
|
15
37
|
```
|
|
16
38
|
Problem to plan: $ARGUMENTS
|
|
17
39
|
|
|
18
|
-
|
|
19
|
-
|
|
40
|
+
Pre-read context (from lite agent):
|
|
41
|
+
<insert Step 1 output here>
|
|
42
|
+
|
|
43
|
+
Using the context above (do NOT re-read the same files):
|
|
20
44
|
|
|
21
|
-
|
|
45
|
+
1. If INDEX.md shows undone tasks → warn human: continue old cycle or start fresh?
|
|
22
46
|
|
|
23
|
-
|
|
24
|
-
§1 Intent | §2 Scope | §3 Approach | §4 Test Plan | §5 Verification
|
|
25
|
-
§4 Test Plan: happy path + ≥1 edge case + regression if bugfix
|
|
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
|
|
26
50
|
|
|
27
|
-
|
|
28
|
-
Each task MUST have
|
|
29
|
-
Verification Commands, Acceptance Criteria
|
|
30
|
-
Missing any field → status: needs_breakdown (never ready)
|
|
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.
|
|
31
53
|
|
|
32
|
-
|
|
33
|
-
|
|
54
|
+
4. Update INDEX.md — add rows, status=ready
|
|
55
|
+
5. Update ACTIVE.md — cycle snapshot + wave structure
|
|
34
56
|
|
|
35
|
-
|
|
57
|
+
6. Report: task list + IDs, wave map, any needs_breakdown, next step for human
|
|
36
58
|
```
|
|
37
59
|
|
|
38
|
-
After
|
|
60
|
+
After both agents complete:
|
|
39
61
|
> Switch to **Sonnet / unic-code** → run `/ukit:implement-handoff`
|