@ngockhoale/ukit 2.2.16 → 2.3.1
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 +104 -0
- package/manifests/platform.full.yaml +11 -0
- package/package.json +1 -1
- package/src/core/executionContracts.js +130 -0
- package/src/core/runtimeConfig.js +13 -50
- package/src/index/taskRouting.js +10 -103
- package/templates/.claude/agents/ukit-vision-analyst.md +32 -21
- package/templates/.claude/hooks/context-window-guard.sh +66 -14
- package/templates/.claude/hooks/protect-files.sh +1 -0
- package/templates/.claude/hooks/sensitive-data-guard.sh +269 -0
- package/templates/.claude/hooks/skill-router.sh +33 -0
- package/templates/.claude/hooks/vision-router.sh +63 -37
- package/templates/.claude/settings.json +17 -1
- package/templates/.claude/ukit/index/extract-image.mjs +18 -8
- package/templates/.claude/ukit/index/route-task.mjs +53 -2
- package/templates/.claude/ukit/runtime/execution-ledger.mjs +180 -22
- package/templates/.claude/ukit/runtime/hook-chain-runner.mjs +8 -4
- package/templates/.omp/hooks/pre/ukit-bridge.js +15 -5
- package/templates/AGENTS.md +2 -2
- package/templates/CLAUDE.md +1 -1
- package/templates/ukit/storage/config.json +8 -7
- package/src/core/router/advisor.js +0 -42
- package/src/core/router/router.js +0 -180
- package/src/core/validation/confidence.js +0 -89
- package/src/core/validation/validator.js +0 -165
- package/templates/docs/INSTALL.md +0 -115
- package/templates/docs/STATUS.md +0 -81
- package/templates/docs/TASKS.md +0 -79
- package/templates/docs/UKIT_USAGE_GUIDE.md +0 -163
package/templates/docs/STATUS.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Project Status — {{project.name}}
|
|
2
|
-
|
|
3
|
-
> Living project state for AI sessions.
|
|
4
|
-
> Keep this compact: current state only, not a session transcript.
|
|
5
|
-
> Source code, tests, and the UKit index remain ground truth.
|
|
6
|
-
|
|
7
|
-
## Freshness
|
|
8
|
-
|
|
9
|
-
- Last meaningful update: TODO YYYY-MM-DD HH:mm
|
|
10
|
-
- Updated by: TODO
|
|
11
|
-
- Status confidence: low
|
|
12
|
-
- Stale after: 72h
|
|
13
|
-
|
|
14
|
-
If this file is stale, AI must treat it as orientation only and verify against source/index before recommending or editing.
|
|
15
|
-
|
|
16
|
-
## Snapshot
|
|
17
|
-
|
|
18
|
-
- Current focus: TODO
|
|
19
|
-
- Health: unknown
|
|
20
|
-
- Branch/state: TODO
|
|
21
|
-
- Release/version: TODO
|
|
22
|
-
|
|
23
|
-
## Active Work
|
|
24
|
-
|
|
25
|
-
<!-- Keep only live work. Move finished work to Recently Completed or WORKLOG.md. -->
|
|
26
|
-
|
|
27
|
-
### TODO work item
|
|
28
|
-
|
|
29
|
-
- Status: planned / in-progress / blocked / done
|
|
30
|
-
- Goal: TODO
|
|
31
|
-
- Done: TODO
|
|
32
|
-
- Remaining: TODO
|
|
33
|
-
- Files involved: TODO
|
|
34
|
-
- Verification: TODO
|
|
35
|
-
- Next action: TODO
|
|
36
|
-
|
|
37
|
-
## Current Debug Threads
|
|
38
|
-
|
|
39
|
-
<!-- Detailed bug context belongs in docs/context/<task>.md when that exists. STATUS should only link/summarize. -->
|
|
40
|
-
|
|
41
|
-
### TODO debug thread
|
|
42
|
-
|
|
43
|
-
- Status: investigating / root cause found / fixed / blocked
|
|
44
|
-
- Symptom: TODO
|
|
45
|
-
- Root cause: unknown
|
|
46
|
-
- Evidence: TODO
|
|
47
|
-
- Changed files: TODO
|
|
48
|
-
- Verification: TODO
|
|
49
|
-
- Remaining risk: TODO
|
|
50
|
-
- Next action: TODO
|
|
51
|
-
|
|
52
|
-
## Decisions Pending
|
|
53
|
-
|
|
54
|
-
- [ ] TODO decision
|
|
55
|
-
- Context: TODO
|
|
56
|
-
- Options: TODO
|
|
57
|
-
- Recommended: TODO
|
|
58
|
-
|
|
59
|
-
## Next Candidates
|
|
60
|
-
|
|
61
|
-
1. TODO candidate
|
|
62
|
-
- Why now: TODO
|
|
63
|
-
- Expected files: TODO
|
|
64
|
-
- Verification: TODO
|
|
65
|
-
- Risk: TODO
|
|
66
|
-
|
|
67
|
-
## Recently Completed
|
|
68
|
-
|
|
69
|
-
<!-- Max 10 compact lines. Use docs/WORKLOG.md for session history. -->
|
|
70
|
-
|
|
71
|
-
- TODO YYYY-MM-DD — summary — verification
|
|
72
|
-
|
|
73
|
-
## Notes for Next AI Session
|
|
74
|
-
|
|
75
|
-
- Read first: docs/STATUS.md, then docs/CODE_MAP.md only if navigation is needed.
|
|
76
|
-
- Avoid: treating this file as source truth when it is stale or contradicted by code/tests.
|
|
77
|
-
- Known traps: keep concrete debug/implementation prompts on their specific workflow; do not turn them into global roadmap suggestions.
|
|
78
|
-
|
|
79
|
-
## Future Candidate: Task Context Files
|
|
80
|
-
|
|
81
|
-
v1.2 candidate: task-scoped `docs/context/<slug>.md` files for granular bug/feature context. Keep this out of default scope unless a project already uses that folder.
|
package/templates/docs/TASKS.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# AI Task Queue — {{project.name}}
|
|
2
|
-
|
|
3
|
-
> Local AI task queue.
|
|
4
|
-
> Use this for work the human wants an AI/agent to pick up later.
|
|
5
|
-
> Keep tasks actionable; source code, tests, and project docs remain ground truth.
|
|
6
|
-
|
|
7
|
-
## How to Use
|
|
8
|
-
|
|
9
|
-
- Human or AI can add tasks here when work is deferred.
|
|
10
|
-
- AI should read this for open-ended “what next?” / “continue” prompts, or when the user asks to work from the task queue.
|
|
11
|
-
- AI/agents may implement tasks from `Ready for AI`; do not dispatch from `Inbox` until the task has acceptance and verification notes.
|
|
12
|
-
- This file is local working state, not project history and not a full roadmap.
|
|
13
|
-
- Completed work belongs in `docs/WORKLOG.md`; current state belongs in `docs/STATUS.md`.
|
|
14
|
-
|
|
15
|
-
## Auto-Cleanup Rules
|
|
16
|
-
|
|
17
|
-
AI should keep this file compact by default whenever it reads or updates the queue:
|
|
18
|
-
|
|
19
|
-
- Auto-remove exact duplicate tasks.
|
|
20
|
-
- Auto-prune `Done Recently` to max 10 compact lines.
|
|
21
|
-
- Auto-remove tasks from active sections after all are true:
|
|
22
|
-
- the task is done,
|
|
23
|
-
- verification is recorded,
|
|
24
|
-
- completion is summarized in `docs/WORKLOG.md` or `Done Recently`.
|
|
25
|
-
- Auto-move stale, vague, or blocked tasks to `Deferred / Needs Human Review` instead of deleting them.
|
|
26
|
-
- Do not delete non-completed human-authored tasks unless the user explicitly asks for cleanup and the task is clearly obsolete or duplicated.
|
|
27
|
-
- If the user says “clean tasks” / “dọn tasks”, perform the cleanup pass and report what changed.
|
|
28
|
-
|
|
29
|
-
## Inbox
|
|
30
|
-
|
|
31
|
-
<!-- Raw ideas go here first. Refine before moving to Ready for AI. -->
|
|
32
|
-
|
|
33
|
-
- [ ] TODO task title
|
|
34
|
-
- Why: TODO
|
|
35
|
-
- Context: TODO
|
|
36
|
-
- Expected files: TODO
|
|
37
|
-
- Acceptance: TODO
|
|
38
|
-
- Verification: TODO
|
|
39
|
-
- Risk: low / medium / high
|
|
40
|
-
|
|
41
|
-
## Ready for AI
|
|
42
|
-
|
|
43
|
-
<!-- Tasks here should be specific enough for an AI/agent to start without scanning the whole repo. -->
|
|
44
|
-
|
|
45
|
-
- [ ] TODO ready task
|
|
46
|
-
- Goal: TODO
|
|
47
|
-
- Files likely involved: TODO
|
|
48
|
-
- Constraints: TODO
|
|
49
|
-
- Acceptance: TODO
|
|
50
|
-
- Verification: TODO
|
|
51
|
-
- Notes: TODO
|
|
52
|
-
|
|
53
|
-
## In Progress
|
|
54
|
-
|
|
55
|
-
- [ ] TODO active task
|
|
56
|
-
- Owner: human / Claude / Codex / OpenCode / agent
|
|
57
|
-
- Started: TODO YYYY-MM-DD
|
|
58
|
-
- Current state: TODO
|
|
59
|
-
- Next action: TODO
|
|
60
|
-
|
|
61
|
-
## Blocked / Waiting
|
|
62
|
-
|
|
63
|
-
- [ ] TODO blocked task
|
|
64
|
-
- Blocker: TODO
|
|
65
|
-
- Needed from human: TODO
|
|
66
|
-
|
|
67
|
-
## Deferred / Needs Human Review
|
|
68
|
-
|
|
69
|
-
<!-- AI should move stale/vague/blocked tasks here instead of deleting uncertain human intent. -->
|
|
70
|
-
|
|
71
|
-
- [ ] TODO deferred task
|
|
72
|
-
- Reason deferred: TODO
|
|
73
|
-
- Last touched: TODO YYYY-MM-DD
|
|
74
|
-
|
|
75
|
-
## Done Recently
|
|
76
|
-
|
|
77
|
-
<!-- Keep max 10. Older completed work belongs in docs/WORKLOG.md. -->
|
|
78
|
-
|
|
79
|
-
- TODO YYYY-MM-DD — task — verification
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
# UKit Usage Guide
|
|
2
|
-
|
|
3
|
-
## Core Product Promise
|
|
4
|
-
|
|
5
|
-
**Teammates should only need to remember one UKit command:**
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
ukit install
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
After that, the expected workflow is natural language.
|
|
12
|
-
|
|
13
|
-
UKit should handle:
|
|
14
|
-
- hidden skill selection
|
|
15
|
-
- source-code indexing
|
|
16
|
-
- compact context selection
|
|
17
|
-
- living project status for open-ended continuation prompts
|
|
18
|
-
- targeted verification
|
|
19
|
-
- optional internal delegation when it is actually useful
|
|
20
|
-
|
|
21
|
-
The user should **not** need to know skill names, router names, or agent names.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## How UKit should behave
|
|
26
|
-
|
|
27
|
-
### 1) Prompt first
|
|
28
|
-
The user asks naturally:
|
|
29
|
-
- `review this PR for regressions`
|
|
30
|
-
- `fix login bug in src/api/auth/login.js`
|
|
31
|
-
- `clone this screen following the existing pattern`
|
|
32
|
-
- `containerize this app with Docker and docker compose`
|
|
33
|
-
- `làm theo kiểu duraone cho flow này`
|
|
34
|
-
|
|
35
|
-
### 2) Skill auto-detection
|
|
36
|
-
UKit should infer the right lane from:
|
|
37
|
-
- prompt wording
|
|
38
|
-
- target file path
|
|
39
|
-
- tools already used (`Read`, `Grep`, `Glob`, `Edit`, `Write`, `Bash`)
|
|
40
|
-
|
|
41
|
-
### 3) Index-first localization
|
|
42
|
-
For real code work, UKit should use the **source-code index first** to find:
|
|
43
|
-
- primary targets
|
|
44
|
-
- analog/reference files
|
|
45
|
-
- shared abstractions
|
|
46
|
-
- related tests
|
|
47
|
-
|
|
48
|
-
This is extremely important: the index is what keeps file discovery fast and token-efficient.
|
|
49
|
-
|
|
50
|
-
### 4) Minimal useful verification
|
|
51
|
-
After the lane is clear, UKit should verify in scope order:
|
|
52
|
-
1. related tests
|
|
53
|
-
2. then lint/typecheck if the scope warrants it
|
|
54
|
-
3. then broader checks only when risk/shared scope justifies it
|
|
55
|
-
|
|
56
|
-
### 5) Internal delegation only when it helps
|
|
57
|
-
Subagents/internal delegation are optional implementation details.
|
|
58
|
-
They are useful when they:
|
|
59
|
-
- reduce context pollution
|
|
60
|
-
- allow parallel side work
|
|
61
|
-
- isolate noisy debug/research lanes
|
|
62
|
-
|
|
63
|
-
They are **not** part of the end-user mental model.
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Common workflows
|
|
68
|
-
|
|
69
|
-
### A) Fix a bug
|
|
70
|
-
User says:
|
|
71
|
-
|
|
72
|
-
```text
|
|
73
|
-
Fix the failing order summary total in src/cart/summary.ts and add the right test coverage.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Expected UKit behavior:
|
|
77
|
-
1. activate debug/testing lane if relevant
|
|
78
|
-
2. use the index to find the target + related test files
|
|
79
|
-
3. patch the smallest relevant area
|
|
80
|
-
4. run targeted verification first
|
|
81
|
-
|
|
82
|
-
### B) Review code
|
|
83
|
-
User says:
|
|
84
|
-
|
|
85
|
-
```text
|
|
86
|
-
Review this auth permission change for regressions.
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Expected UKit behavior:
|
|
90
|
-
1. activate review/security lane if relevant
|
|
91
|
-
2. localize files with the index
|
|
92
|
-
3. inspect risky shared abstractions and related tests
|
|
93
|
-
4. avoid unrelated broad reads
|
|
94
|
-
|
|
95
|
-
### C) Clone/follow pattern
|
|
96
|
-
User says:
|
|
97
|
-
|
|
98
|
-
```text
|
|
99
|
-
Create supplier detail page similar to customer detail page.
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Expected UKit behavior:
|
|
103
|
-
1. use the index to find the closest analog page
|
|
104
|
-
2. open shared abstractions and related tests
|
|
105
|
-
3. follow existing project structure instead of generating generic code
|
|
106
|
-
|
|
107
|
-
### D) Docker / packaging
|
|
108
|
-
User says:
|
|
109
|
-
|
|
110
|
-
```text
|
|
111
|
-
Package this app into Docker with a Dockerfile and docker compose setup.
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Expected UKit behavior:
|
|
115
|
-
1. auto-load the hidden Docker packaging lane
|
|
116
|
-
2. still use the source-code index first to identify entrypoints, env, ports, services
|
|
117
|
-
3. generate packaging assets that match the real app
|
|
118
|
-
|
|
119
|
-
### E) DuraOne style
|
|
120
|
-
User says:
|
|
121
|
-
|
|
122
|
-
```text
|
|
123
|
-
Làm theo kiểu duraone cho màn agreement này.
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Expected UKit behavior:
|
|
127
|
-
1. if the DuraOne skill is installed, auto-load it
|
|
128
|
-
2. use DuraOne references only when the repo actually matches that domain/shape
|
|
129
|
-
3. keep the user away from manual skill selection
|
|
130
|
-
|
|
131
|
-
### F) Continue / what next
|
|
132
|
-
|
|
133
|
-
User says:
|
|
134
|
-
|
|
135
|
-
```text
|
|
136
|
-
Project đang ở đâu, làm gì tiếp?
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Expected UKit behavior:
|
|
140
|
-
1. auto-load the hidden next-step lane
|
|
141
|
-
2. read `docs/AI_HANDOFF/ACTIVE.md` when the team is passing planning, task breakdown, or implementation context between AIs
|
|
142
|
-
3. verify the handoff against source/index before treating it as authoritative
|
|
143
|
-
4. suggest only a few actionable next candidates
|
|
144
|
-
5. if the prompt names a concrete bug/feature/review target, keep the concrete workflow primary instead of producing a global roadmap
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## What users should NOT need to do
|
|
149
|
-
|
|
150
|
-
Users should not need to:
|
|
151
|
-
- remember `/ukit`-style slash commands
|
|
152
|
-
- remember skill names
|
|
153
|
-
- choose subagents manually
|
|
154
|
-
- know router/helper filenames
|
|
155
|
-
- manually orchestrate verification order
|
|
156
|
-
|
|
157
|
-
If UKit requires that, the UX is drifting away from the product goal.
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## One-line summary
|
|
162
|
-
|
|
163
|
-
> `ukit install`, then ask naturally. UKit should auto-pick the right hidden skill, use the source-code index to find files fast, and verify only as broadly as needed.
|