@ngockhoale/ukit 1.1.8 → 1.2.2
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 +18 -0
- package/README.md +9 -5
- package/manifests/platform.full.yaml +28 -0
- package/package.json +1 -1
- package/src/cli/commands/doctor.js +2 -0
- package/src/cli/commands/install.js +8 -7
- package/src/cli/commands/uninstall.js +1 -1
- package/src/core/ensureGitignore.js +2 -0
- package/src/core/runInstallPipeline.js +6 -1
- package/src/core/runtimeConfig.js +147 -3
- package/src/core/uninstall.js +1 -1
- package/src/index/routeCatalog.js +4 -4
- package/src/index/taskRouting.js +35 -9
- package/templates/.claude/agents/ukit-small-task-maintainer.md +72 -0
- package/templates/.claude/skills/docs-quality/SKILL.md +15 -1
- package/templates/.claude/skills/next-step/SKILL.md +13 -5
- package/templates/.claude/skills/update-status/SKILL.md +16 -2
- package/templates/.claude/ukit/index/route-catalog.mjs +4 -4
- package/templates/.claude/ukit/index/route-task.mjs +35 -9
- package/templates/.codex/README.md +5 -2
- package/templates/.codex/settings.json +125 -4
- package/templates/.gitignore +2 -1
- package/templates/AGENTS.md +13 -3
- package/templates/CLAUDE.md +13 -3
- package/templates/docs/INSTALL.md +2 -0
- package/templates/docs/PROJECT.md +5 -4
- package/templates/docs/STATUS.md +1 -1
- package/templates/docs/TASKS.md +79 -0
- package/templates/docs/UKIT_USAGE_GUIDE.md +4 -3
- package/templates/ukit/README.md +1 -1
- package/templates/ukit/storage/config.json +243 -2
|
@@ -61,7 +61,7 @@ Docs should **not** become:
|
|
|
61
61
|
|
|
62
62
|
- update README / docs after code changes
|
|
63
63
|
- fix source-vs-doc drift
|
|
64
|
-
- improve `docs/PROJECT.md`, `docs/MEMORY.md`, `docs/STATUS.md`, `docs/WORKLOG.md`, `docs/CODE_MAP.md`
|
|
64
|
+
- improve `docs/PROJECT.md`, `docs/MEMORY.md`, `docs/STATUS.md`, `docs/TASKS.md`, `docs/WORKLOG.md`, `docs/CODE_MAP.md`
|
|
65
65
|
- prepare durable handoff notes
|
|
66
66
|
- tighten or remove stale setup instructions
|
|
67
67
|
- document newly discovered module boundaries, dangerous areas, or bug patterns
|
|
@@ -105,6 +105,20 @@ Use for compact current state:
|
|
|
105
105
|
|
|
106
106
|
Do **not** treat it as source truth or duplicate full session history here.
|
|
107
107
|
|
|
108
|
+
#### `docs/TASKS.md`
|
|
109
|
+
Use for:
|
|
110
|
+
- local AI task queue items the human or an AI may hand to another AI/agent later
|
|
111
|
+
- `Inbox` ideas that still need acceptance/verification details
|
|
112
|
+
- `Ready for AI` tasks that are specific enough to implement without scanning the whole repo
|
|
113
|
+
|
|
114
|
+
Default cleanup when reading/updating it:
|
|
115
|
+
- remove exact duplicates
|
|
116
|
+
- prune `Done Recently` to 10 compact lines
|
|
117
|
+
- move stale/vague/blocked tasks to `Deferred / Needs Human Review`
|
|
118
|
+
- only delete unfinished human-authored tasks when explicitly asked and clearly obsolete/duplicated
|
|
119
|
+
|
|
120
|
+
Do **not** treat it as a roadmap, project history, or source truth. It is local working state.
|
|
121
|
+
|
|
108
122
|
#### `docs/WORKLOG.md`
|
|
109
123
|
Use for session-level execution history:
|
|
110
124
|
- what changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: next-step
|
|
3
|
-
description: Use when the user asks what to do next, asks for project status, says continue/làm tiếp without a concrete target, or needs a lightweight session-start orientation from docs/STATUS.md. Do not use as the primary skill for concrete debug, implementation, review, or docs tasks.
|
|
3
|
+
description: Use when the user asks what to do next, asks for project status, says continue/làm tiếp without a concrete target, or needs a lightweight session-start orientation from docs/STATUS.md and optional docs/TASKS.md. Do not use as the primary skill for concrete debug, implementation, review, or docs tasks.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Next Step
|
|
@@ -21,8 +21,10 @@ It is **not** a replacement for concrete workflows. If the user names a bug, fea
|
|
|
21
21
|
- End users should not need to know this skill name.
|
|
22
22
|
- Do not ask users to run a `next-step` command. The human workflow remains `ukit install` + natural language.
|
|
23
23
|
- `docs/STATUS.md` is orientation, not truth. Source code, tests, and the UKit index win.
|
|
24
|
+
- `docs/TASKS.md` is a local AI task queue, not a roadmap and not source truth.
|
|
24
25
|
- Concrete task beats open-ended wording. Example: "I'm fixing login bug but unsure next step" is a debug approach question, not a global roadmap request.
|
|
25
26
|
- Do not scan the whole repo unless `docs/STATUS.md` is missing/stale and the user still wants project-level direction.
|
|
27
|
+
- When reading `docs/TASKS.md`, perform only safe cleanup by default: remove exact duplicates, prune `Done Recently` to 10 lines, and move stale/vague items to `Deferred / Needs Human Review`; do not delete unfinished human-authored tasks unless explicitly asked and clearly obsolete/duplicated.
|
|
26
28
|
|
|
27
29
|
## Freshness Check
|
|
28
30
|
|
|
@@ -43,9 +45,10 @@ If stale or missing, downgrade confidence and verify with the smallest current t
|
|
|
43
45
|
|
|
44
46
|
Read only what is needed:
|
|
45
47
|
1. `docs/STATUS.md` (or existing root `STATUS.md` fallback)
|
|
46
|
-
2. `docs/
|
|
47
|
-
3. `docs/
|
|
48
|
-
4.
|
|
48
|
+
2. `docs/TASKS.md` only for queued-task prompts, “continue” with no active status, or when status points at queued work
|
|
49
|
+
3. `docs/CODE_MAP.md` only when navigation is needed
|
|
50
|
+
4. `docs/MEMORY.md` only when constraints/decisions affect the suggestion
|
|
51
|
+
5. routed index/tree summary only if status/tasks are stale, missing, or contradicted
|
|
49
52
|
|
|
50
53
|
## Output Shape
|
|
51
54
|
|
|
@@ -60,6 +63,10 @@ Suggested next steps:
|
|
|
60
63
|
1. Candidate — why now — likely files — verification — risk
|
|
61
64
|
2. Candidate — why now — likely files — verification — risk
|
|
62
65
|
|
|
66
|
+
Queued tasks (if `docs/TASKS.md` was used):
|
|
67
|
+
- Ready: task title — acceptance — verification
|
|
68
|
+
- Deferred/blocked: compact note only if relevant
|
|
69
|
+
|
|
63
70
|
Recommended: ...
|
|
64
71
|
Why: ...
|
|
65
72
|
First check: ...
|
|
@@ -68,7 +75,8 @@ First check: ...
|
|
|
68
75
|
## Intent Handling
|
|
69
76
|
|
|
70
77
|
- `open-ended-status`: read status and suggest 1-3 candidates.
|
|
71
|
-
- `
|
|
78
|
+
- `queued-task-selection`: read `docs/TASKS.md`, prefer `Ready for AI`, and suggest the best next task with acceptance/verification.
|
|
79
|
+
- `continue-existing-work`: prefer Active Work / Current Debug Threads, then `Ready for AI`, then Next Candidates.
|
|
72
80
|
- `scoped-advice`: do not produce a global roadmap; hand off to the concrete skill and suggest the immediate approach only.
|
|
73
81
|
- `debug-specific`, `implement-specific`, `review-specific`: do not use this skill as primary.
|
|
74
82
|
|
|
@@ -22,7 +22,8 @@ Do **not** run for trivial typo-only edits, pure Q&A, or exploration with no dur
|
|
|
22
22
|
- End users should not need to know this skill name.
|
|
23
23
|
- Do not ask users to run a `update-status` command. The human workflow remains `ukit install` + natural language.
|
|
24
24
|
- Keep `docs/STATUS.md` compact. It is not `docs/WORKLOG.md` and not a raw session transcript.
|
|
25
|
-
-
|
|
25
|
+
- Keep `docs/TASKS.md` compact when the completed/active work is related to queued tasks; this queue is local working state and should stay gitignored.
|
|
26
|
+
- Source code and tests are truth. If status/tasks conflict with source, update the docs to match source or mark uncertainty.
|
|
26
27
|
- Do not invent verification. Record only commands actually run and their outcome.
|
|
27
28
|
- Preserve user edits and rewrite the smallest relevant section.
|
|
28
29
|
|
|
@@ -35,6 +36,7 @@ Before editing, ask internally:
|
|
|
35
36
|
3. Was a root cause, decision, blocker, or next action confirmed?
|
|
36
37
|
4. What verification ran?
|
|
37
38
|
5. Will future sessions be faster if this is recorded?
|
|
39
|
+
6. Did any `docs/TASKS.md` queued task become done, duplicate, stale, or blocked?
|
|
38
40
|
|
|
39
41
|
If all answers are no, skip the update and mention that no status change was needed.
|
|
40
42
|
|
|
@@ -85,4 +87,16 @@ Avoid:
|
|
|
85
87
|
|
|
86
88
|
## Future Context Note
|
|
87
89
|
|
|
88
|
-
Do not create task-scoped `CONTEXT.md`
|
|
90
|
+
Do not create task-scoped `CONTEXT.md` by default unless the project already has that convention. If detailed bug/feature context is needed, note it as a v1.2 candidate or link to an existing `docs/context/<slug>.md` file.
|
|
91
|
+
|
|
92
|
+
## TASKS.md Cleanup
|
|
93
|
+
|
|
94
|
+
When the session touched queued work or the user asks to clean/dọn tasks:
|
|
95
|
+
|
|
96
|
+
- Read `docs/TASKS.md` if it exists; do not create noisy task entries just to summarize the session.
|
|
97
|
+
- Auto-remove exact duplicate tasks.
|
|
98
|
+
- Auto-prune `Done Recently` to max 10 compact lines.
|
|
99
|
+
- Remove a task from active sections only after all are true: it is done, verification is recorded, and completion is summarized in `docs/WORKLOG.md` or `Done Recently`.
|
|
100
|
+
- Move stale, vague, or blocked tasks to `Deferred / Needs Human Review` instead of deleting uncertain human intent.
|
|
101
|
+
- Do not delete non-completed human-authored tasks unless the user explicitly asked for cleanup and the task is clearly obsolete or duplicated.
|
|
102
|
+
- Report the cleanup in one compact line: removed duplicates, moved deferred, pruned done, or no safe cleanup.
|
|
@@ -223,8 +223,8 @@ export const ROUTE_CATALOG = [
|
|
|
223
223
|
path: '.claude/skills/docs-quality/SKILL.md',
|
|
224
224
|
order: 12,
|
|
225
225
|
signals: [
|
|
226
|
-
{ type: 'prompt', regex: /\b(docs|documentation|readme|changelog|handoff|worklog|memory|code map|status\.md)\b/i, score: 4 },
|
|
227
|
-
{ type: 'file', regex: /\bdocs\/|readme\.md$|project\.md$|memory\.md$|status\.md$|worklog\.md$|code_map\.md$/i, score: 4 },
|
|
226
|
+
{ type: 'prompt', regex: /\b(docs|documentation|readme|changelog|handoff|worklog|memory|code map|status\.md|tasks\.md|task queue|clean tasks|cleanup tasks|dọn tasks|dọn task)\b/i, score: 4 },
|
|
227
|
+
{ type: 'file', regex: /\bdocs\/|readme\.md$|project\.md$|memory\.md$|status\.md$|tasks\.md$|worklog\.md$|code_map\.md$/i, score: 4 },
|
|
228
228
|
],
|
|
229
229
|
},
|
|
230
230
|
{
|
|
@@ -233,8 +233,8 @@ export const ROUTE_CATALOG = [
|
|
|
233
233
|
order: 12.1,
|
|
234
234
|
contextMode: 'standalone',
|
|
235
235
|
signals: [
|
|
236
|
-
{ type: 'prompt', regex: /\b(what(?:'s| is)? next|next steps?|project status|current status|where are we|continue(?: from)?(?: last session)?|roadmap|status\.md)\b/i, score: 7 },
|
|
237
|
-
{ type: 'prompt', regex: /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project)\b/i, score: 7 },
|
|
236
|
+
{ type: 'prompt', regex: /\b(what(?:'s| is)? next|next steps?|project status|current status|where are we|continue(?: from)?(?: last session)?|roadmap|status\.md|task queue|tasks\.md|next queued task|pick next task|work from tasks)\b/i, score: 7 },
|
|
237
|
+
{ type: 'prompt', regex: /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project|task tiếp theo|việc tiếp theo trong tasks)\b/i, score: 7 },
|
|
238
238
|
],
|
|
239
239
|
},
|
|
240
240
|
{
|
|
@@ -745,10 +745,11 @@ function getSignalTexts(signalType, routeSignals = {}) {
|
|
|
745
745
|
function deriveIntentMode({ promptText = '', commandText = '', targetFile = null } = {}) {
|
|
746
746
|
const lower = buildNormalizedRouteSignalText(promptText, commandText);
|
|
747
747
|
const raw = `${promptText ?? ''}\n${commandText ?? ''}`.toLowerCase();
|
|
748
|
-
const
|
|
748
|
+
const taskQueueNext = hasTaskQueueNextSignal(lower, raw);
|
|
749
|
+
const docsSpecific = hasDocsSpecificTaskSignal(lower, raw, targetFile, { taskQueueNext });
|
|
749
750
|
const statusUpdate = hasStatusUpdateSignal(lower, raw);
|
|
750
|
-
const openEndedStatus = hasOpenEndedStatusSignal(lower, raw);
|
|
751
|
-
const concreteTask = hasConcreteTaskSignal(lower, raw, targetFile);
|
|
751
|
+
const openEndedStatus = hasOpenEndedStatusSignal(lower, raw) || taskQueueNext;
|
|
752
|
+
const concreteTask = hasConcreteTaskSignal(lower, raw, targetFile, { taskQueueNext });
|
|
752
753
|
|
|
753
754
|
if (docsSpecific) {
|
|
754
755
|
return 'docs-specific';
|
|
@@ -790,13 +791,18 @@ function hasStatusUpdateSignal(lower, raw) {
|
|
|
790
791
|
}
|
|
791
792
|
|
|
792
793
|
function hasOpenEndedStatusSignal(lower, raw) {
|
|
793
|
-
return /\b(what next|what is next|what's next|next step|next steps|project status|current status|where are we|continue|continue from last session|roadmap|status\.md)\b/.test(lower)
|
|
794
|
-
|| /\b(lam gi tiep|buoc tiep theo|tiep theo lam gi|lam tiep|dang o dau|trang thai project|tinh trang project)\b/.test(lower)
|
|
795
|
-
|| /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project)\b/.test(raw);
|
|
794
|
+
return /\b(what next|what is next|what's next|next step|next steps|project status|current status|where are we|continue|continue from last session|roadmap|status\.md|task queue|tasks\.md|next queued task|pick next task|work from tasks)\b/.test(lower)
|
|
795
|
+
|| /\b(lam gi tiep|buoc tiep theo|tiep theo lam gi|lam tiep|dang o dau|trang thai project|tinh trang project|task tiep theo|viec tiep theo trong tasks)\b/.test(lower)
|
|
796
|
+
|| /\b(làm gì tiếp|bước tiếp theo|tiếp theo làm gì|làm tiếp|đang ở đâu|trạng thái project|tình trạng project|task tiếp theo|việc tiếp theo trong tasks)\b/.test(raw);
|
|
796
797
|
}
|
|
797
798
|
|
|
798
|
-
function
|
|
799
|
-
|
|
799
|
+
function hasTaskQueueNextSignal(lower, raw) {
|
|
800
|
+
return /\b(task queue|tasks\.md|next queued task|pick next task|work from tasks|next task from tasks|ready for ai)\b/.test(lower)
|
|
801
|
+
|| /\b(task tiếp theo|việc tiếp theo trong tasks|làm task trong tasks|lấy task tiếp theo)\b/.test(raw);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
function hasConcreteTaskSignal(lower, raw, targetFile, { taskQueueNext = false } = {}) {
|
|
805
|
+
if (targetFile && !isStatusFileTarget(targetFile) && !(taskQueueNext && isTasksFileTarget(targetFile))) {
|
|
800
806
|
return true;
|
|
801
807
|
}
|
|
802
808
|
|
|
@@ -804,8 +810,13 @@ function hasConcreteTaskSignal(lower, raw, targetFile) {
|
|
|
804
810
|
|| /\b(sửa|fix|lỗi|bug|debug|implement|cài|thêm|review|kiểm tra|soát|đăng nhập)\b/.test(raw);
|
|
805
811
|
}
|
|
806
812
|
|
|
807
|
-
function hasDocsSpecificTaskSignal(lower, raw, targetFile) {
|
|
813
|
+
function hasDocsSpecificTaskSignal(lower, raw, targetFile, { taskQueueNext = false } = {}) {
|
|
808
814
|
if (!targetFile || !isDocsTarget(targetFile)) {
|
|
815
|
+
return /\b(clean tasks|cleanup tasks|prune tasks|dedupe tasks|clear completed tasks|dọn tasks|dọn task)\b/.test(lower)
|
|
816
|
+
|| /\b(dọn tasks|dọn task|dọn danh sách task|xóa task đã xong)\b/.test(raw);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
if (taskQueueNext && isTasksFileTarget(targetFile) && !/\b(clean|cleanup|prune|dedupe|edit|template|wording|format|structure)\b/.test(lower)) {
|
|
809
820
|
return false;
|
|
810
821
|
}
|
|
811
822
|
|
|
@@ -847,6 +858,10 @@ function isStatusFileTarget(targetFile) {
|
|
|
847
858
|
return /(?:^|\/)docs\/STATUS\.md$|(?:^|\/)STATUS\.md$/i.test(String(targetFile || ''));
|
|
848
859
|
}
|
|
849
860
|
|
|
861
|
+
function isTasksFileTarget(targetFile) {
|
|
862
|
+
return /(?:^|\/)docs\/TASKS\.md$|(?:^|\/)TASKS\.md$/i.test(String(targetFile || ''));
|
|
863
|
+
}
|
|
864
|
+
|
|
850
865
|
function isDocsTarget(targetFile) {
|
|
851
866
|
const normalized = String(targetFile || '').replaceAll('\\', '/');
|
|
852
867
|
return /(?:^|\/)docs\/.+\.md$|(?:^|\/)(?:README|CHANGELOG|AGENTS|CLAUDE|STATUS)\.md$/i.test(normalized);
|
|
@@ -1100,6 +1115,16 @@ function deriveDelegationRecommendation({
|
|
|
1100
1115
|
const hasRelatedTests = (preview.relatedTests ?? []).length > 0;
|
|
1101
1116
|
const when = contextRecommendation?.command ? 'after-context' : 'now';
|
|
1102
1117
|
|
|
1118
|
+
const smallTaskMaintenanceSignal = /\b(?:ukit|docs\/tasks\.md|tasks\.md|task queue|queued tasks?|compact(?:ion)?|summari[sz](?:e|ation)|doc(?:ument)? summary|cleanup|clean up|dọn rác|dọn dẹp|auto[- ]?triage|queue maintenance|small decision|ra quyết định)\b/.test(lower)
|
|
1119
|
+
&& /\b(?:task|queue|compact(?:ion)?|summari[sz](?:e|ation)|doc(?:ument)?s?|cleanup|clean up|dọn rác|dọn dẹp|classif(?:y|ication)|triage|maintenance|small decision|ra quyết định)\b/.test(lower);
|
|
1120
|
+
if (smallTaskMaintenanceSignal) {
|
|
1121
|
+
return {
|
|
1122
|
+
hint: 'ukit-small-task-maintainer',
|
|
1123
|
+
when,
|
|
1124
|
+
reason: 'Low-risk UKit maintenance decisions should use the configured small-task model without blocking the main AI flow.',
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1103
1128
|
if (routingContext.taskType === 'trivial') {
|
|
1104
1129
|
return null;
|
|
1105
1130
|
}
|
|
@@ -1189,6 +1214,7 @@ function buildRouteSummary({
|
|
|
1189
1214
|
formatCompactSegment('targets', primaryTargets),
|
|
1190
1215
|
formatCompactSegment('tests', relatedTests),
|
|
1191
1216
|
formatCompactSegment('styles', styleFiles),
|
|
1217
|
+
delegationRecommendation?.hint ? `delegate=${delegationRecommendation.hint}` : null,
|
|
1192
1218
|
policyMode ? `policy=${policyMode}` : null,
|
|
1193
1219
|
].filter(Boolean).join(' | ');
|
|
1194
1220
|
|
|
@@ -12,7 +12,7 @@ Auto-generated by UKit for OpenAI Codex.
|
|
|
12
12
|
- Do not make end users memorize skill names, helper scripts, or routing internals unless they are debugging UKit itself.
|
|
13
13
|
- **Treat helper commands as internal orchestration. Do not ask end users to run them.**
|
|
14
14
|
|
|
15
|
-
## UKit v1.
|
|
15
|
+
## UKit v1.2.2 Shared Runtime
|
|
16
16
|
|
|
17
17
|
- Shared runtime state lives in `.ukit/storage/`.
|
|
18
18
|
- Treat `.ukit/storage/config.json` as the source of compact, token-pipeline, router, memory, and validation toggles.
|
|
@@ -23,6 +23,7 @@ Auto-generated by UKit for OpenAI Codex.
|
|
|
23
23
|
- Maintainers can inspect runtime state with `ukit status` and `ukit memory export`.
|
|
24
24
|
- Reuse compact `previous-context` / `recent-output` route snapshots before replaying raw history.
|
|
25
25
|
- Threshold-based compact pressure is internal orchestration; Codex users should not need to manage it manually.
|
|
26
|
+
- UKit keeps Claude PreCompact/reinject and OpenCode native auto/prune compaction intact. For Codex Desktop long sessions, UKit can use `subagents.smallTaskModel` through `ukit-small-task-maintainer` to decide soft auto-compact handoffs. Default `compact.codexContext.compactTarget=150` means about 150 compact handoff lines (120-150 preferred, hard max 170), not 150 app-context tokens.
|
|
26
27
|
|
|
27
28
|
## Speed / Reading Contract
|
|
28
29
|
|
|
@@ -30,6 +31,7 @@ Auto-generated by UKit for OpenAI Codex.
|
|
|
30
31
|
- **Simple**: `docs/MEMORY.md` only.
|
|
31
32
|
- **Non-trivial**: `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
|
|
32
33
|
- `docs/STATUS.md`: read for open-ended status/continue prompts or meaningful continuation context; stale status is orientation only.
|
|
34
|
+
- `docs/TASKS.md`: read only for queued-task prompts or when status points at queued work; safely clean exact duplicates/completed overflow by default without deleting unfinished human-authored tasks.
|
|
33
35
|
- Read `docs/WORKLOG.md` only when recent continuation/debug context matters.
|
|
34
36
|
- Source is truth; if docs are stale, update docs and continue.
|
|
35
37
|
|
|
@@ -53,7 +55,7 @@ For clearly non-code specialist lanes, avoid dragging the source-code index into
|
|
|
53
55
|
- Match from prompt wording plus tool/file evidence.
|
|
54
56
|
- Use the smallest useful set, usually 1-2 skills.
|
|
55
57
|
- If docs work is detected, prefer `.codex/skills/docs-quality/SKILL.md`.
|
|
56
|
-
- For open-ended “what next?” / “continue” / project-status prompts, prefer `.codex/skills/next-step/SKILL.md` and show a status freshness cue.
|
|
58
|
+
- For open-ended “what next?” / “continue” / project-status / queued-task prompts, prefer `.codex/skills/next-step/SKILL.md` and show a status freshness cue when status is used.
|
|
57
59
|
- For explicit handoff/wrap-up/status updates, prefer `.codex/skills/update-status/SKILL.md`.
|
|
58
60
|
- Concrete debug/implementation/review prompts beat open-ended wording; do not let `next-step` replace the concrete workflow.
|
|
59
61
|
- If routing is complex or ambiguous, prefer `node .codex/ukit/index/route-task.mjs "<prompt>" [--tool-command <cmd>] [--target <file>]`.
|
|
@@ -73,6 +75,7 @@ For clearly non-code specialist lanes, avoid dragging the source-code index into
|
|
|
73
75
|
|
|
74
76
|
After significant work, update only what changed:
|
|
75
77
|
- `docs/STATUS.md` — compact current state, blockers, verification, next candidates
|
|
78
|
+
- `docs/TASKS.md` — local AI task queue; remove duplicates/prune completed overflow safely, never delete unfinished human intent by default
|
|
76
79
|
- `docs/WORKLOG.md`
|
|
77
80
|
- `docs/MEMORY.md`
|
|
78
81
|
- `docs/CODE_MAP.md`
|
|
@@ -33,9 +33,18 @@
|
|
|
33
33
|
"maxAnalogFiles": 3,
|
|
34
34
|
"maxSharedAbstractions": 2,
|
|
35
35
|
"contextBudgetByTier": {
|
|
36
|
-
"trivial": {
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
"trivial": {
|
|
37
|
+
"minFiles": 1,
|
|
38
|
+
"maxFiles": 2
|
|
39
|
+
},
|
|
40
|
+
"simple": {
|
|
41
|
+
"minFiles": 2,
|
|
42
|
+
"maxFiles": 5
|
|
43
|
+
},
|
|
44
|
+
"non-trivial": {
|
|
45
|
+
"minFiles": 4,
|
|
46
|
+
"maxFiles": 8
|
|
47
|
+
}
|
|
39
48
|
}
|
|
40
49
|
},
|
|
41
50
|
"skillRouter": {
|
|
@@ -137,6 +146,118 @@
|
|
|
137
146
|
"askBeforeBroadVerificationWithoutRelatedTests": true,
|
|
138
147
|
"preferCommandOrderFromVerificationPlan": true
|
|
139
148
|
}
|
|
149
|
+
},
|
|
150
|
+
"smallTaskModel": {
|
|
151
|
+
"default": "unic-lite",
|
|
152
|
+
"agent": "ukit-small-task-maintainer",
|
|
153
|
+
"useFor": [
|
|
154
|
+
"task-cleanup",
|
|
155
|
+
"compact-decision",
|
|
156
|
+
"codex-context-budget",
|
|
157
|
+
"doc-summarization",
|
|
158
|
+
"classification",
|
|
159
|
+
"small-decision",
|
|
160
|
+
"auto-triage",
|
|
161
|
+
"queue-maintenance",
|
|
162
|
+
"workspace-maintenance"
|
|
163
|
+
],
|
|
164
|
+
"keepMainModelFor": [
|
|
165
|
+
"security",
|
|
166
|
+
"risky-code-change",
|
|
167
|
+
"release",
|
|
168
|
+
"data-loss",
|
|
169
|
+
"architecture-decision",
|
|
170
|
+
"deep-reasoning"
|
|
171
|
+
],
|
|
172
|
+
"internalOnly": true,
|
|
173
|
+
"decisionPolicy": {
|
|
174
|
+
"nonBlocking": true,
|
|
175
|
+
"endUserInvisible": true,
|
|
176
|
+
"handBackOnRisk": true,
|
|
177
|
+
"optimizeOrder": [
|
|
178
|
+
"quality",
|
|
179
|
+
"safety",
|
|
180
|
+
"speed",
|
|
181
|
+
"token-discipline"
|
|
182
|
+
],
|
|
183
|
+
"decisions": [
|
|
184
|
+
"fast-vs-slow-lane",
|
|
185
|
+
"safe-vs-risky-lane",
|
|
186
|
+
"skill-routing-needed",
|
|
187
|
+
"step-budget-enough",
|
|
188
|
+
"compact-now-or-later",
|
|
189
|
+
"summarize-docs-or-keep-detail"
|
|
190
|
+
],
|
|
191
|
+
"stepBudgets": {
|
|
192
|
+
"trivial": {
|
|
193
|
+
"maxSteps": 1,
|
|
194
|
+
"verification": "skip-unless-risky"
|
|
195
|
+
},
|
|
196
|
+
"simple": {
|
|
197
|
+
"maxSteps": 2,
|
|
198
|
+
"verification": "targeted-if-covered"
|
|
199
|
+
},
|
|
200
|
+
"nonTrivial": {
|
|
201
|
+
"maxSteps": 4,
|
|
202
|
+
"verification": "targeted-then-widen-on-risk"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"executionMode": "sidecar-parallel",
|
|
206
|
+
"mustNotBlockMainTask": true,
|
|
207
|
+
"maxSidecarWaitMs": 0
|
|
208
|
+
},
|
|
209
|
+
"codexContext": {
|
|
210
|
+
"autoCompact": true,
|
|
211
|
+
"budgetTokens": 100000,
|
|
212
|
+
"compactTarget": 150,
|
|
213
|
+
"compactTargetUnit": "lines",
|
|
214
|
+
"mode": "soft-handoff",
|
|
215
|
+
"preserve": [
|
|
216
|
+
"current-goal",
|
|
217
|
+
"non-negotiable-rules",
|
|
218
|
+
"active-files",
|
|
219
|
+
"decisions",
|
|
220
|
+
"unresolved-failures",
|
|
221
|
+
"verification-evidence",
|
|
222
|
+
"next-actions"
|
|
223
|
+
],
|
|
224
|
+
"compactTargetRecommendedRange": [
|
|
225
|
+
120,
|
|
226
|
+
170
|
|
227
|
+
],
|
|
228
|
+
"compactTargetMax": 170,
|
|
229
|
+
"configPath": ".ukit/storage/config.json",
|
|
230
|
+
"targetField": "compact.codexContext.compactTarget",
|
|
231
|
+
"budgetField": "compact.codexContext.budgetTokens",
|
|
232
|
+
"autoCompactField": "compact.codexContext.autoCompact"
|
|
233
|
+
},
|
|
234
|
+
"agentContext": {
|
|
235
|
+
"preserveClaudePreCompact": true,
|
|
236
|
+
"preserveOpenCodeCompaction": true,
|
|
237
|
+
"codexSoftHandoff": {
|
|
238
|
+
"autoCompact": true,
|
|
239
|
+
"budgetTokens": 100000,
|
|
240
|
+
"compactTarget": 150,
|
|
241
|
+
"compactTargetUnit": "lines",
|
|
242
|
+
"mode": "soft-handoff",
|
|
243
|
+
"preserve": [
|
|
244
|
+
"current-goal",
|
|
245
|
+
"non-negotiable-rules",
|
|
246
|
+
"active-files",
|
|
247
|
+
"decisions",
|
|
248
|
+
"unresolved-failures",
|
|
249
|
+
"verification-evidence",
|
|
250
|
+
"next-actions"
|
|
251
|
+
],
|
|
252
|
+
"compactTargetRecommendedRange": [
|
|
253
|
+
120,
|
|
254
|
+
170
|
|
255
|
+
],
|
|
256
|
+
"compactTargetMax": 170
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"configPath": ".ukit/storage/config.json",
|
|
260
|
+
"configField": "subagents.smallTaskModel"
|
|
140
261
|
}
|
|
141
262
|
},
|
|
142
263
|
"execution": {
|
|
@@ -158,7 +279,7 @@
|
|
|
158
279
|
"autoAllowInWorkspaceOnly": [
|
|
159
280
|
"build",
|
|
160
281
|
"format",
|
|
161
|
-
|
|
282
|
+
"safe file writes"
|
|
162
283
|
]
|
|
163
284
|
},
|
|
164
285
|
"high": {
|
package/templates/.gitignore
CHANGED
|
@@ -18,7 +18,6 @@ out/
|
|
|
18
18
|
.env.development.local
|
|
19
19
|
.env.test.local
|
|
20
20
|
.env.production.local
|
|
21
|
-
.claude/ukit/.env
|
|
22
21
|
|
|
23
22
|
# Logs
|
|
24
23
|
logs/
|
|
@@ -54,6 +53,8 @@ Thumbs.db
|
|
|
54
53
|
opencode.json
|
|
55
54
|
AGENTS.md
|
|
56
55
|
CLAUDE.md
|
|
56
|
+
docs/STATUS.md
|
|
57
|
+
docs/TASKS.md
|
|
57
58
|
.codex/settings.local.json
|
|
58
59
|
|
|
59
60
|
# Keep tracked template hook sources under templates/.claude/hooks/
|
package/templates/AGENTS.md
CHANGED
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
- review / audit / diff / PR feedback → `.claude/skills/code-review/SKILL.md`
|
|
31
31
|
- bug / error / crash / triage / failing path → `.claude/skills/debugging-toolkit/SKILL.md`
|
|
32
32
|
- test / spec / coverage / fixture → `.claude/skills/testing-quality/SKILL.md`
|
|
33
|
-
- docs / README / changelog / handoff / editing `docs/` → `.claude/skills/docs-quality/SKILL.md`
|
|
34
|
-
- open-ended next step / project status / continue with no concrete target → `.claude/skills/next-step/SKILL.md`
|
|
33
|
+
- docs / README / changelog / handoff / editing `docs/` / cleaning `docs/TASKS.md` → `.claude/skills/docs-quality/SKILL.md`
|
|
34
|
+
- open-ended next step / project status / continue with no concrete target / choose queued task → `.claude/skills/next-step/SKILL.md`
|
|
35
35
|
- explicit handoff / wrap up / update `docs/STATUS.md` → `.claude/skills/update-status/SKILL.md`
|
|
36
36
|
- auth / security / token / permission / validation / risky shell-path-delete-db work → `.claude/skills/discover-security/SKILL.md`
|
|
37
37
|
- stale workspace / reinstall / cleanup / maintenance → `.claude/skills/repo-maintenance/SKILL.md`
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
- If a concrete verification lane is needed, prefer `node .claude/ukit/index/verify-context.mjs ...`.
|
|
44
44
|
- These helper/index commands are internal orchestration. Run them yourself when needed; never turn them into required end-user workflow.
|
|
45
45
|
|
|
46
|
-
## UKit v1.
|
|
46
|
+
## UKit v1.2.2 Shared Runtime
|
|
47
47
|
|
|
48
48
|
- Shared runtime state lives in `.ukit/storage/`.
|
|
49
49
|
- Treat `.ukit/storage/config.json` as the source of runtime toggles for compact, token pipeline, router, memory, and validation behavior.
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
- **Simple**: default to `docs/MEMORY.md` only; pull related files/tests with the resolver.
|
|
63
63
|
- **Non-trivial**: read `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
|
|
64
64
|
- `docs/STATUS.md`: read for open-ended status/continue prompts or meaningful continuation context; treat stale status as orientation only and verify against source/index.
|
|
65
|
+
- `docs/TASKS.md`: read only for queued-task prompts or when status points at queued work; safely clean exact duplicates/completed overflow by default without deleting unfinished human-authored tasks.
|
|
65
66
|
- `docs/WORKLOG.md`: only recent, relevant entries for continuation/debugging.
|
|
66
67
|
- Follow routed verification policy: targeted first when localized, widen in order for shared/risky scope, ask before blanket broad runs when no related-test evidence exists.
|
|
67
68
|
|
|
@@ -71,8 +72,17 @@
|
|
|
71
72
|
- When the user asks “what next?”, “continue”, or “project đang ở đâu?” without a concrete target, use the `next-step` skill and show a freshness cue (fresh / possibly stale / stale / missing).
|
|
72
73
|
- Concrete debug/implementation/review prompts beat open-ended wording; use the concrete skill first and only use status as background.
|
|
73
74
|
- After meaningful work, use `update-status` to record state, verification, blockers, and next candidates; skip trivial/no-state-change tasks.
|
|
75
|
+
- `docs/TASKS.md` is a local AI task queue: prefer `Ready for AI` when asked to pick queued work, and clean duplicates/prune `Done Recently` safely when reading/updating it.
|
|
74
76
|
- Detailed task context files such as `docs/context/<slug>.md` are a future extension, not required baseline workflow.
|
|
75
77
|
|
|
78
|
+
|
|
79
|
+
## Small-Task Maintainer (internal)
|
|
80
|
+
|
|
81
|
+
- UKit may route low-risk internal decisions to the `ukit-small-task-maintainer` subagent using `subagents.smallTaskModel` (default `unic-lite`).
|
|
82
|
+
- Use it for safe/reversible UKit chores: dọn `docs/TASKS.md`, queued-task classification, fast-vs-slow/safe-vs-risky lane decisions, skill-routing/step-budget hints, agent context-budget decisions, compact/summary decisions, docs/status summarization, auto-triage, queue maintenance, and small workspace cleanup.
|
|
83
|
+
- Run it as a sidecar/parallel lane only; do not block, replace, or slow the user task. Do not block the main AI flow: if the small-task lane sees security, risky/shared code, release/publish, data-loss, architecture, deep-reasoning risk, weak context, or quality risk, it hands back to the main model instead of asking the end user to decide.
|
|
84
|
+
- This is optional internal orchestration config from `.ukit/storage/config.json`; never turn it into an end-user workflow. End users still only need `ukit install` and natural-language product work. Always preserve the CoDev priority: quality > safety > speed > token discipline. Keep Claude PreCompact/reinject and OpenCode native auto/prune compaction enabled. For Codex Desktop long sessions, `compact.codexContext.compactTarget` defaults to 150 compact handoff lines (120-150 preferred, hard max 170), decided internally by the small-task maintainer.
|
|
85
|
+
|
|
76
86
|
## Subagent Policy (internal only)
|
|
77
87
|
|
|
78
88
|
- Default to direct execution for trivial/simple work.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
- review / audit / diff → `.claude/skills/code-review/SKILL.md`
|
|
29
29
|
- bug / error / crash / triage → `.claude/skills/debugging-toolkit/SKILL.md`
|
|
30
30
|
- test / spec / coverage → `.claude/skills/testing-quality/SKILL.md`
|
|
31
|
-
- docs / README / changelog / handoff / editing `docs/` → `.claude/skills/docs-quality/SKILL.md`
|
|
32
|
-
- open-ended next step / project status / continue with no concrete target → `.claude/skills/next-step/SKILL.md`
|
|
31
|
+
- docs / README / changelog / handoff / editing `docs/` / cleaning `docs/TASKS.md` → `.claude/skills/docs-quality/SKILL.md`
|
|
32
|
+
- open-ended next step / project status / continue with no concrete target / choose queued task → `.claude/skills/next-step/SKILL.md`
|
|
33
33
|
- explicit handoff / wrap up / update `docs/STATUS.md` → `.claude/skills/update-status/SKILL.md`
|
|
34
34
|
- auth / security / token / permission / validation → `.claude/skills/discover-security/SKILL.md`
|
|
35
35
|
- stale workspace / reinstall / cleanup → `.claude/skills/repo-maintenance/SKILL.md`
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
- **Do not ask normal contributors to run internal helper commands**; run them yourself or tell them to rerun `ukit install`.
|
|
43
43
|
- Do not ask normal contributors to memorize `ukit doctor`, `ukit diff`, `ukit uninstall`, or `ukit index ...` unless they explicitly need maintainer/debug help.
|
|
44
44
|
|
|
45
|
-
## UKit v1.
|
|
45
|
+
## UKit v1.2.2 Shared Runtime
|
|
46
46
|
|
|
47
47
|
- Shared runtime state lives in `.ukit/storage/`.
|
|
48
48
|
- Treat `.ukit/storage/config.json` as the source of runtime toggles for compact, token pipeline, router, memory, and validation behavior.
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
- **Simple**: `docs/MEMORY.md` only, plus resolver-selected files/tests.
|
|
60
60
|
- **Non-trivial**: `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
|
|
61
61
|
- `docs/STATUS.md`: use for open-ended status/continue prompts or meaningful continuation context; stale status is orientation only.
|
|
62
|
+
- `docs/TASKS.md`: use only for queued-task prompts or when status points at queued work; safely clean exact duplicates/completed overflow by default without deleting unfinished human-authored tasks.
|
|
62
63
|
- `docs/WORKLOG.md`: only recent relevant entries.
|
|
63
64
|
- Follow routed verification policy: targeted first, widen only when risk/shared scope justifies it, ask before blanket broad runs.
|
|
64
65
|
|
|
@@ -69,6 +70,15 @@
|
|
|
69
70
|
- For “what next?” / “continue” prompts without a concrete target, use `next-step` and show a freshness cue before relying on the status file.
|
|
70
71
|
- For concrete debug/implementation/review prompts, keep the concrete workflow primary even if the user asks for an approach or next step.
|
|
71
72
|
- After meaningful work, use `update-status`; skip trivial/no-state-change tasks and avoid transcript-style noise.
|
|
73
|
+
- `docs/TASKS.md` is a local AI task queue: prefer `Ready for AI` when asked to pick queued work, and clean duplicates/prune `Done Recently` safely when reading/updating it.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Small-Task Maintainer (internal)
|
|
77
|
+
|
|
78
|
+
- UKit may route low-risk internal decisions to the `ukit-small-task-maintainer` subagent using `subagents.smallTaskModel` (default `unic-lite`).
|
|
79
|
+
- Use it for safe/reversible UKit chores: dọn `docs/TASKS.md`, queued-task classification, fast-vs-slow/safe-vs-risky lane decisions, skill-routing/step-budget hints, agent context-budget decisions, compact/summary decisions, docs/status summarization, auto-triage, queue maintenance, and small workspace cleanup.
|
|
80
|
+
- Run it as a sidecar/parallel lane only; do not block, replace, or slow the user task. Do not block the main AI flow: if the small-task lane sees security, risky/shared code, release/publish, data-loss, architecture, deep-reasoning risk, weak context, or quality risk, it hands back to the main model instead of asking the end user to decide.
|
|
81
|
+
- This is optional internal orchestration config from `.ukit/storage/config.json`; never turn it into an end-user workflow. End users still only need `ukit install` and natural-language product work. Always preserve the CoDev priority: quality > safety > speed > token discipline. Keep Claude PreCompact/reinject and OpenCode native auto/prune compaction enabled. For Codex Desktop long sessions, `compact.codexContext.compactTarget` defaults to 150 compact handoff lines (120-150 preferred, hard max 170), decided internally by the small-task maintainer.
|
|
72
82
|
|
|
73
83
|
## Selective Subagent Policy (internal only)
|
|
74
84
|
|
|
@@ -48,6 +48,7 @@ Complete these files before first serious use:
|
|
|
48
48
|
- `docs/PROJECT.md`
|
|
49
49
|
- `docs/MEMORY.md`
|
|
50
50
|
- `docs/STATUS.md`
|
|
51
|
+
- `docs/TASKS.md`
|
|
51
52
|
- `docs/WORKLOG.md`
|
|
52
53
|
|
|
53
54
|
### 4) Open your AI tool
|
|
@@ -98,6 +99,7 @@ Check that the docs baseline files exist and are filled in:
|
|
|
98
99
|
- `docs/PROJECT.md`
|
|
99
100
|
- `docs/MEMORY.md`
|
|
100
101
|
- `docs/STATUS.md`
|
|
102
|
+
- `docs/TASKS.md`
|
|
101
103
|
- `docs/WORKLOG.md`
|
|
102
104
|
|
|
103
105
|
---
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
1. Run `ukit memory recall "<current task>"` for non-trivial work; reuse relevant `## Previous Context` before asking the user to restate prior decisions
|
|
46
46
|
2. Read `docs/MEMORY.md` — architecture decisions, active constraints, known bugs
|
|
47
47
|
3. Read `docs/STATUS.md` for open-ended status/continue prompts or meaningful continuation context; treat stale status as orientation only
|
|
48
|
-
4. Read `docs/
|
|
49
|
-
5.
|
|
50
|
-
6.
|
|
51
|
-
7.
|
|
48
|
+
4. Read `docs/TASKS.md` only when selecting queued AI work, or when status points at queued tasks; apply safe cleanup without deleting unfinished human intent
|
|
49
|
+
5. Read `docs/CODE_MAP.md` if it exists — structural navigation index
|
|
50
|
+
6. Use the installed source-code index / routed helpers to localize the smallest relevant file + test set first
|
|
51
|
+
7. Scan recent `docs/WORKLOG.md` entries if continuing prior work
|
|
52
|
+
8. Verify understanding against source before acting — **docs orient, source is truth; keep the index-first workflow intact**
|
package/templates/docs/STATUS.md
CHANGED
|
@@ -78,4 +78,4 @@ If this file is stale, AI must treat it as orientation only and verify against s
|
|
|
78
78
|
|
|
79
79
|
## Future Candidate: Task Context Files
|
|
80
80
|
|
|
81
|
-
v1.2 candidate: task-scoped `docs/context/<slug>.md` files for granular bug/feature context. Keep this out of
|
|
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.
|