@ngockhoale/ukit 1.1.6 → 1.1.8
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 +22 -0
- package/README.md +9 -4
- package/manifests/platform.full.yaml +55 -0
- package/package.json +1 -1
- package/src/cli/commands/doctor.js +2 -0
- package/src/cli/commands/install.js +3 -2
- package/src/cli/commands/uninstall.js +1 -1
- package/src/core/runtimeConfig.js +1 -1
- package/src/core/uninstall.js +1 -1
- package/src/index/buildIndex.js +88 -2
- package/src/index/impactCatalog.js +126 -0
- package/src/index/impactContext.js +232 -0
- package/src/index/paths.js +1 -0
- package/src/index/resolveContext.js +1 -0
- package/src/index/routeCatalog.js +24 -2
- package/src/index/taskRouting.js +147 -4
- package/src/index/verificationPlan.js +18 -1
- package/templates/.claude/hooks/skill-router.sh +1 -1
- package/templates/.claude/hooks/verification-guard.sh +150 -12
- package/templates/.claude/skills/docs-quality/SKILL.md +9 -1
- package/templates/.claude/skills/next-step/SKILL.md +78 -0
- package/templates/.claude/skills/update-status/SKILL.md +88 -0
- package/templates/.claude/ukit/index/impact-context.mjs +122 -0
- package/templates/.claude/ukit/index/lib/index-core.mjs +352 -2
- package/templates/.claude/ukit/index/route-catalog.mjs +24 -2
- package/templates/.claude/ukit/index/route-task.mjs +166 -4
- package/templates/.codex/README.md +6 -1
- package/templates/.codex/settings.json +8 -1
- package/templates/AGENTS.md +12 -1
- package/templates/CLAUDE.md +12 -1
- package/templates/docs/INSTALL.md +2 -0
- package/templates/docs/PROJECT.md +5 -4
- package/templates/docs/STATUS.md +81 -0
- package/templates/docs/UKIT_USAGE_GUIDE.md +16 -0
- package/templates/ukit/README.md +1 -1
- package/templates/ukit/storage/config.json +1 -1
|
@@ -230,11 +230,17 @@ async function prepareTaskRoute({
|
|
|
230
230
|
const normalizedPrompt = String(promptText || '').trim();
|
|
231
231
|
const normalizedCommand = String(commandText || '').trim();
|
|
232
232
|
const normalizedTarget = normalizeRelativeFile(absoluteRoot, targetFile);
|
|
233
|
+
const intentMode = deriveIntentMode({
|
|
234
|
+
promptText: normalizedPrompt,
|
|
235
|
+
commandText: normalizedCommand,
|
|
236
|
+
targetFile: normalizedTarget,
|
|
237
|
+
});
|
|
233
238
|
const activeSkills = await selectActiveSkills({
|
|
234
239
|
rootDir: absoluteRoot,
|
|
235
240
|
promptText: normalizedPrompt,
|
|
236
241
|
commandText: normalizedCommand,
|
|
237
242
|
targetFile: normalizedTarget,
|
|
243
|
+
intentMode,
|
|
238
244
|
});
|
|
239
245
|
const selectedIds = activeSkills.map((entry) => entry.id);
|
|
240
246
|
const contextIntent = deriveContextIntent({
|
|
@@ -247,6 +253,7 @@ async function prepareTaskRoute({
|
|
|
247
253
|
promptText: normalizedPrompt,
|
|
248
254
|
commandText: normalizedCommand,
|
|
249
255
|
selectedIds,
|
|
256
|
+
targetFile: normalizedTarget,
|
|
250
257
|
});
|
|
251
258
|
const preservedPrompt = normalizedPrompt || String(lastExplicitUserPromptText || '').trim();
|
|
252
259
|
|
|
@@ -261,6 +268,7 @@ async function prepareTaskRoute({
|
|
|
261
268
|
targetFile: normalizedTarget,
|
|
262
269
|
contextIntent,
|
|
263
270
|
taskType: inferredTaskType,
|
|
271
|
+
intentMode,
|
|
264
272
|
},
|
|
265
273
|
};
|
|
266
274
|
}
|
|
@@ -623,7 +631,7 @@ async function readHelperCacheSnapshot({
|
|
|
623
631
|
};
|
|
624
632
|
}
|
|
625
633
|
|
|
626
|
-
async function selectActiveSkills({ rootDir, promptText, commandText, targetFile }) {
|
|
634
|
+
async function selectActiveSkills({ rootDir, promptText, commandText, targetFile, intentMode = null }) {
|
|
627
635
|
const routeSignals = {
|
|
628
636
|
promptRawText: String(promptText || '').toLowerCase(),
|
|
629
637
|
promptNormalizedText: buildNormalizedRouteSignalText(promptText),
|
|
@@ -634,6 +642,7 @@ async function selectActiveSkills({ rootDir, promptText, commandText, targetFile
|
|
|
634
642
|
const scoredEntries = ROUTE_CATALOG
|
|
635
643
|
.map((entry) => scoreSkillRouteEntry(entry, routeSignals))
|
|
636
644
|
.filter((entry) => entry.score > 0)
|
|
645
|
+
.filter((entry) => shouldKeepRouteEntryForIntent(entry, intentMode))
|
|
637
646
|
.sort((a, b) => b.score - a.score || a.order - b.order);
|
|
638
647
|
const active = [];
|
|
639
648
|
|
|
@@ -649,6 +658,22 @@ async function selectActiveSkills({ rootDir, promptText, commandText, targetFile
|
|
|
649
658
|
return active.map(({ order, ...rest }) => rest);
|
|
650
659
|
}
|
|
651
660
|
|
|
661
|
+
function shouldKeepRouteEntryForIntent(entry, intentMode) {
|
|
662
|
+
if (entry.id === 'next-step' && ['scoped-advice', 'docs-specific'].includes(intentMode)) {
|
|
663
|
+
return false;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
if (entry.id === 'update-status' && intentMode === 'docs-specific') {
|
|
667
|
+
return false;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
if (entry.id === 'docs-quality' && ['open-ended-status', 'status-update'].includes(intentMode)) {
|
|
671
|
+
return false;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
return true;
|
|
675
|
+
}
|
|
676
|
+
|
|
652
677
|
function scoreSkillRouteEntry(entry, routeSignals = {}) {
|
|
653
678
|
let score = 0;
|
|
654
679
|
const reasons = [];
|
|
@@ -717,6 +742,116 @@ function getSignalTexts(signalType, routeSignals = {}) {
|
|
|
717
742
|
};
|
|
718
743
|
}
|
|
719
744
|
|
|
745
|
+
function deriveIntentMode({ promptText = '', commandText = '', targetFile = null } = {}) {
|
|
746
|
+
const lower = buildNormalizedRouteSignalText(promptText, commandText);
|
|
747
|
+
const raw = `${promptText ?? ''}\n${commandText ?? ''}`.toLowerCase();
|
|
748
|
+
const docsSpecific = hasDocsSpecificTaskSignal(lower, raw, targetFile);
|
|
749
|
+
const statusUpdate = hasStatusUpdateSignal(lower, raw);
|
|
750
|
+
const openEndedStatus = hasOpenEndedStatusSignal(lower, raw);
|
|
751
|
+
const concreteTask = hasConcreteTaskSignal(lower, raw, targetFile);
|
|
752
|
+
|
|
753
|
+
if (docsSpecific) {
|
|
754
|
+
return 'docs-specific';
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
if (statusUpdate) {
|
|
758
|
+
return 'status-update';
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
if (concreteTask && openEndedStatus) {
|
|
762
|
+
return 'scoped-advice';
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
if (openEndedStatus) {
|
|
766
|
+
return 'open-ended-status';
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
if (concreteTask) {
|
|
770
|
+
if (/\b(bug|debug|error|crash|broken|failing|stack trace|triage|fix|login|timeout)\b/.test(lower)) {
|
|
771
|
+
return 'debug-specific';
|
|
772
|
+
}
|
|
773
|
+
if (/\b(review|audit|diff|pr feedback|code review|kiem tra|soat)\b/.test(lower)) {
|
|
774
|
+
return 'review-specific';
|
|
775
|
+
}
|
|
776
|
+
if (/\b(implement|build|create|add|ship|deliver|refactor|integrate|integration|scaffold|feature)\b/.test(lower)) {
|
|
777
|
+
return 'implement-specific';
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
return null;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
function hasStatusUpdateSignal(lower, raw) {
|
|
785
|
+
return /\b(update|refresh|write|sync|record|capture|summarize|summarise).{0,64}\b(status\.md|project status|current state|next candidates|session state)\b/.test(lower)
|
|
786
|
+
|| /\b(status\.md|project status).{0,64}\b(update|refresh|write|sync|record|capture|summarize|summarise)\b/.test(lower)
|
|
787
|
+
|| /\b(wrap up|handoff|end this session|ending this session|session summary|before final)\b/.test(lower)
|
|
788
|
+
|| /\b(cap nhat|ghi lai|tong ket|chot session|ban giao).{0,64}\b(status|trang thai|viec tiep theo)\b/.test(lower)
|
|
789
|
+
|| /\b(cập nhật|ghi lại|tổng kết|chốt session|bàn giao).{0,64}\b(status|trạng thái|việc tiếp theo)\b/.test(raw);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
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);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
function hasConcreteTaskSignal(lower, raw, targetFile) {
|
|
799
|
+
if (targetFile && !isStatusFileTarget(targetFile)) {
|
|
800
|
+
return true;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
return /\b(bug|debug|error|crash|broken|failing|stack trace|triage|fix|implement|build|create|add|ship|deliver|refactor|integrate|integration|scaffold|feature|review|audit|diff|pr feedback|code review|auth|login|api|endpoint|test|spec)\b/.test(lower)
|
|
804
|
+
|| /\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
|
+
}
|
|
806
|
+
|
|
807
|
+
function hasDocsSpecificTaskSignal(lower, raw, targetFile) {
|
|
808
|
+
if (!targetFile || !isDocsTarget(targetFile)) {
|
|
809
|
+
return false;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
const targetName = path.posix.basename(String(targetFile || '').replaceAll('\\', '/')).toLowerCase();
|
|
813
|
+
const explicitStatusUpdate = hasExplicitStatusUpdateSignal(lower, raw);
|
|
814
|
+
|
|
815
|
+
if (!isStatusFileTarget(targetFile)) {
|
|
816
|
+
if (explicitStatusUpdate && !mentionsTargetDoc(lower, targetName)) {
|
|
817
|
+
return false;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
return mentionsTargetDoc(lower, targetName)
|
|
821
|
+
|| /\b(edit|write|improve|document|docs?|readme|changelog|worklog|memory|code map|template|wording|copy|grammar|format|structure|heading|section|handoff notes?)\b/.test(lower)
|
|
822
|
+
|| /\b(câu chữ|chỉnh|sửa chữ|ngữ pháp|định dạng|cấu trúc|tài liệu|ghi chú bàn giao)\b/.test(raw);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
return /\b(template|wording|edit|copy|grammar|format|structure|heading|section|docs?)\b/.test(lower)
|
|
826
|
+
|| /\b(mẫu|câu chữ|chỉnh|sửa chữ|ngữ pháp|định dạng|cấu trúc|tài liệu)\b/.test(raw);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
function hasExplicitStatusUpdateSignal(lower, raw) {
|
|
830
|
+
return /\b(update|refresh|write|sync|record|capture|summarize|summarise).{0,64}\b(status\.md|project status|current state|next candidates|session state)\b/.test(lower)
|
|
831
|
+
|| /\b(status\.md|project status).{0,64}\b(update|refresh|write|sync|record|capture|summarize|summarise)\b/.test(lower)
|
|
832
|
+
|| /\b(cap nhat|ghi lai|tong ket|chot session|ban giao).{0,64}\b(status|trang thai|viec tiep theo)\b/.test(lower)
|
|
833
|
+
|| /\b(cập nhật|ghi lại|tổng kết|chốt session|bàn giao).{0,64}\b(status|trạng thái|việc tiếp theo)\b/.test(raw);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
function mentionsTargetDoc(lower, targetName) {
|
|
837
|
+
if (!targetName) {
|
|
838
|
+
return false;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
const escaped = targetName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
842
|
+
const withoutExt = escaped.replace(/\\\.md$/i, '');
|
|
843
|
+
return new RegExp(`\\b(?:${escaped}|${withoutExt})\\b`, 'i').test(lower);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
function isStatusFileTarget(targetFile) {
|
|
847
|
+
return /(?:^|\/)docs\/STATUS\.md$|(?:^|\/)STATUS\.md$/i.test(String(targetFile || ''));
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
function isDocsTarget(targetFile) {
|
|
851
|
+
const normalized = String(targetFile || '').replaceAll('\\', '/');
|
|
852
|
+
return /(?:^|\/)docs\/.+\.md$|(?:^|\/)(?:README|CHANGELOG|AGENTS|CLAUDE|STATUS)\.md$/i.test(normalized);
|
|
853
|
+
}
|
|
854
|
+
|
|
720
855
|
function shouldUseIndexedContext({ activeSkills = [], targetFile = null } = {}) {
|
|
721
856
|
if (activeSkills.length === 0) {
|
|
722
857
|
return Boolean(targetFile);
|
|
@@ -1062,6 +1197,7 @@ function buildRouteSummary({
|
|
|
1062
1197
|
fallbackCommands,
|
|
1063
1198
|
preferredOrder,
|
|
1064
1199
|
policyMode,
|
|
1200
|
+
intentMode: routingContext.intentMode ?? null,
|
|
1065
1201
|
delegateHint: delegationRecommendation?.hint ?? null,
|
|
1066
1202
|
nextActionType: nextAction?.type ?? null,
|
|
1067
1203
|
nextActionCommand,
|
|
@@ -1143,7 +1279,7 @@ function deriveContextIntent({ promptText, commandText, targetFile, selectedIds
|
|
|
1143
1279
|
return '';
|
|
1144
1280
|
}
|
|
1145
1281
|
|
|
1146
|
-
function inferTaskType({ promptText, commandText, selectedIds }) {
|
|
1282
|
+
function inferTaskType({ promptText, commandText, selectedIds, targetFile = null }) {
|
|
1147
1283
|
const lower = buildNormalizedRouteSignalText(promptText, commandText);
|
|
1148
1284
|
if (
|
|
1149
1285
|
selectedIds.includes('discover-security')
|
|
@@ -1152,10 +1288,17 @@ function inferTaskType({ promptText, commandText, selectedIds }) {
|
|
|
1152
1288
|
) {
|
|
1153
1289
|
return 'non-trivial';
|
|
1154
1290
|
}
|
|
1291
|
+
|
|
1292
|
+
let inferred = 'simple';
|
|
1155
1293
|
if (/\b(typo|label|text|rename|color|spacing|toggle|comment)\b/.test(lower)) {
|
|
1156
|
-
|
|
1294
|
+
inferred = 'trivial';
|
|
1157
1295
|
}
|
|
1158
|
-
|
|
1296
|
+
|
|
1297
|
+
if ((inferred === 'simple' || inferred === 'trivial') && isSharedImpactFile(targetFile)) {
|
|
1298
|
+
return 'shared-simple';
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
return inferred;
|
|
1159
1302
|
}
|
|
1160
1303
|
|
|
1161
1304
|
function buildHelperCommand({ commandNamespace = '.claude', scriptName, intent = '', targetFile = null, taskType = null }) {
|
|
@@ -1166,6 +1309,24 @@ function buildHelperCommand({ commandNamespace = '.claude', scriptName, intent =
|
|
|
1166
1309
|
return parts.join(' ');
|
|
1167
1310
|
}
|
|
1168
1311
|
|
|
1312
|
+
const SHARED_IMPACT_PATTERNS = [
|
|
1313
|
+
/^src\/index\//,
|
|
1314
|
+
/^src\/core\/(runInstallPipeline|applyPlan|buildPlan|diffPlan|metadata|migrateLegacy|uninstall|runtimeConfig|runtimePaths)\.js$/,
|
|
1315
|
+
/^src\/core\/(output|token|compact)\//,
|
|
1316
|
+
/^templates\/\.claude\/hooks\//,
|
|
1317
|
+
/^templates\/\.claude\/ukit\//,
|
|
1318
|
+
/^manifests\/platform\.full\.yaml$/,
|
|
1319
|
+
/^templates\//,
|
|
1320
|
+
];
|
|
1321
|
+
|
|
1322
|
+
function isSharedImpactFile(filePath) {
|
|
1323
|
+
const normalized = String(filePath ?? '').trim().replace(/\\/g, '/').replace(/^\.\//, '');
|
|
1324
|
+
if (!normalized) {
|
|
1325
|
+
return false;
|
|
1326
|
+
}
|
|
1327
|
+
return SHARED_IMPACT_PATTERNS.some((pattern) => pattern.test(normalized));
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1169
1330
|
function isTestLikeFile(filePath) {
|
|
1170
1331
|
return /\.(test|spec)\.[a-z0-9]+$/i.test(filePath)
|
|
1171
1332
|
|| /(^|\/)(?:__tests__|tests?|specs?)\//i.test(filePath);
|
|
@@ -1554,6 +1715,7 @@ function compactRoutingContext(routingContext = {}) {
|
|
|
1554
1715
|
adapter: routingContext.adapter ?? 'claude',
|
|
1555
1716
|
lastExplicitUserPromptText: routingContext.lastExplicitUserPromptText ?? '',
|
|
1556
1717
|
taskType: routingContext.taskType ?? null,
|
|
1718
|
+
intentMode: routingContext.intentMode ?? null,
|
|
1557
1719
|
};
|
|
1558
1720
|
}
|
|
1559
1721
|
|
|
@@ -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.1.
|
|
15
|
+
## UKit v1.1.8 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.
|
|
@@ -29,6 +29,7 @@ Auto-generated by UKit for OpenAI Codex.
|
|
|
29
29
|
- **Trivial**: no docs.
|
|
30
30
|
- **Simple**: `docs/MEMORY.md` only.
|
|
31
31
|
- **Non-trivial**: `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
|
|
32
|
+
- `docs/STATUS.md`: read for open-ended status/continue prompts or meaningful continuation context; stale status is orientation only.
|
|
32
33
|
- Read `docs/WORKLOG.md` only when recent continuation/debug context matters.
|
|
33
34
|
- Source is truth; if docs are stale, update docs and continue.
|
|
34
35
|
|
|
@@ -52,6 +53,9 @@ For clearly non-code specialist lanes, avoid dragging the source-code index into
|
|
|
52
53
|
- Match from prompt wording plus tool/file evidence.
|
|
53
54
|
- Use the smallest useful set, usually 1-2 skills.
|
|
54
55
|
- 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.
|
|
57
|
+
- For explicit handoff/wrap-up/status updates, prefer `.codex/skills/update-status/SKILL.md`.
|
|
58
|
+
- Concrete debug/implementation/review prompts beat open-ended wording; do not let `next-step` replace the concrete workflow.
|
|
55
59
|
- If routing is complex or ambiguous, prefer `node .codex/ukit/index/route-task.mjs "<prompt>" [--tool-command <cmd>] [--target <file>]`.
|
|
56
60
|
- That helper should keep shared route memory in `.claude/ukit/skill-router-state.json` so Claude and Codex continue from the same compact route state.
|
|
57
61
|
- When route memory already includes `previous-context` or `recent-output`, reuse it before widening reads or logs.
|
|
@@ -68,6 +72,7 @@ For clearly non-code specialist lanes, avoid dragging the source-code index into
|
|
|
68
72
|
## Docs Discipline
|
|
69
73
|
|
|
70
74
|
After significant work, update only what changed:
|
|
75
|
+
- `docs/STATUS.md` — compact current state, blockers, verification, next candidates
|
|
71
76
|
- `docs/WORKLOG.md`
|
|
72
77
|
- `docs/MEMORY.md`
|
|
73
78
|
- `docs/CODE_MAP.md`
|
|
@@ -65,6 +65,12 @@
|
|
|
65
65
|
],
|
|
66
66
|
"maintenance": [
|
|
67
67
|
"repo-maintenance"
|
|
68
|
+
],
|
|
69
|
+
"nextStep": [
|
|
70
|
+
"next-step"
|
|
71
|
+
],
|
|
72
|
+
"statusUpdate": [
|
|
73
|
+
"update-status"
|
|
68
74
|
]
|
|
69
75
|
},
|
|
70
76
|
"toolSignals": {
|
|
@@ -89,7 +95,8 @@
|
|
|
89
95
|
},
|
|
90
96
|
"routingRule": {
|
|
91
97
|
"endUserShouldNotNeedSkillNames": true,
|
|
92
|
-
"selectSmallestUsefulSkillSet": true
|
|
98
|
+
"selectSmallestUsefulSkillSet": true,
|
|
99
|
+
"concreteTaskBeatsOpenEndedStatus": true
|
|
93
100
|
},
|
|
94
101
|
"delegationBridge": {
|
|
95
102
|
"enabled": true,
|
package/templates/AGENTS.md
CHANGED
|
@@ -31,6 +31,8 @@
|
|
|
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
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`
|
|
35
|
+
- explicit handoff / wrap up / update `docs/STATUS.md` → `.claude/skills/update-status/SKILL.md`
|
|
34
36
|
- auth / security / token / permission / validation / risky shell-path-delete-db work → `.claude/skills/discover-security/SKILL.md`
|
|
35
37
|
- stale workspace / reinstall / cleanup / maintenance → `.claude/skills/repo-maintenance/SKILL.md`
|
|
36
38
|
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
- If a concrete verification lane is needed, prefer `node .claude/ukit/index/verify-context.mjs ...`.
|
|
42
44
|
- These helper/index commands are internal orchestration. Run them yourself when needed; never turn them into required end-user workflow.
|
|
43
45
|
|
|
44
|
-
## UKit v1.1.
|
|
46
|
+
## UKit v1.1.8 Shared Runtime
|
|
45
47
|
|
|
46
48
|
- Shared runtime state lives in `.ukit/storage/`.
|
|
47
49
|
- Treat `.ukit/storage/config.json` as the source of runtime toggles for compact, token pipeline, router, memory, and validation behavior.
|
|
@@ -59,9 +61,18 @@
|
|
|
59
61
|
- **Trivial**: no docs, no index query unless the file target is unclear.
|
|
60
62
|
- **Simple**: default to `docs/MEMORY.md` only; pull related files/tests with the resolver.
|
|
61
63
|
- **Non-trivial**: read `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
|
|
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.
|
|
62
65
|
- `docs/WORKLOG.md`: only recent, relevant entries for continuation/debugging.
|
|
63
66
|
- 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.
|
|
64
67
|
|
|
68
|
+
## Living Status Workflow
|
|
69
|
+
|
|
70
|
+
- `docs/STATUS.md` is compact current state, not a transcript and not source truth.
|
|
71
|
+
- 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
|
+
- Concrete debug/implementation/review prompts beat open-ended wording; use the concrete skill first and only use status as background.
|
|
73
|
+
- After meaningful work, use `update-status` to record state, verification, blockers, and next candidates; skip trivial/no-state-change tasks.
|
|
74
|
+
- Detailed task context files such as `docs/context/<slug>.md` are a future extension, not required baseline workflow.
|
|
75
|
+
|
|
65
76
|
## Subagent Policy (internal only)
|
|
66
77
|
|
|
67
78
|
- Default to direct execution for trivial/simple work.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
- bug / error / crash / triage → `.claude/skills/debugging-toolkit/SKILL.md`
|
|
30
30
|
- test / spec / coverage → `.claude/skills/testing-quality/SKILL.md`
|
|
31
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`
|
|
33
|
+
- explicit handoff / wrap up / update `docs/STATUS.md` → `.claude/skills/update-status/SKILL.md`
|
|
32
34
|
- auth / security / token / permission / validation → `.claude/skills/discover-security/SKILL.md`
|
|
33
35
|
- stale workspace / reinstall / cleanup → `.claude/skills/repo-maintenance/SKILL.md`
|
|
34
36
|
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
- **Do not ask normal contributors to run internal helper commands**; run them yourself or tell them to rerun `ukit install`.
|
|
41
43
|
- Do not ask normal contributors to memorize `ukit doctor`, `ukit diff`, `ukit uninstall`, or `ukit index ...` unless they explicitly need maintainer/debug help.
|
|
42
44
|
|
|
43
|
-
## UKit v1.1.
|
|
45
|
+
## UKit v1.1.8 Shared Runtime
|
|
44
46
|
|
|
45
47
|
- Shared runtime state lives in `.ukit/storage/`.
|
|
46
48
|
- Treat `.ukit/storage/config.json` as the source of runtime toggles for compact, token pipeline, router, memory, and validation behavior.
|
|
@@ -56,9 +58,18 @@
|
|
|
56
58
|
- **Trivial**: no docs.
|
|
57
59
|
- **Simple**: `docs/MEMORY.md` only, plus resolver-selected files/tests.
|
|
58
60
|
- **Non-trivial**: `docs/MEMORY.md` + `docs/PROJECT.md` + `docs/CODE_MAP.md`.
|
|
61
|
+
- `docs/STATUS.md`: use for open-ended status/continue prompts or meaningful continuation context; stale status is orientation only.
|
|
59
62
|
- `docs/WORKLOG.md`: only recent relevant entries.
|
|
60
63
|
- Follow routed verification policy: targeted first, widen only when risk/shared scope justifies it, ask before blanket broad runs.
|
|
61
64
|
|
|
65
|
+
## Living Status Workflow
|
|
66
|
+
|
|
67
|
+
- `docs/STATUS.md` captures compact current state, active work, debug threads, blockers, verification, and next candidates.
|
|
68
|
+
- It is not source truth and must not replace source/index-first investigation.
|
|
69
|
+
- For “what next?” / “continue” prompts without a concrete target, use `next-step` and show a freshness cue before relying on the status file.
|
|
70
|
+
- For concrete debug/implementation/review prompts, keep the concrete workflow primary even if the user asks for an approach or next step.
|
|
71
|
+
- After meaningful work, use `update-status`; skip trivial/no-state-change tasks and avoid transcript-style noise.
|
|
72
|
+
|
|
62
73
|
## Selective Subagent Policy (internal only)
|
|
63
74
|
|
|
64
75
|
- Keep direct execution as the default for trivial/simple work.
|
|
@@ -47,6 +47,7 @@ End users do not need to manage any of that manually.
|
|
|
47
47
|
Complete these files before first serious use:
|
|
48
48
|
- `docs/PROJECT.md`
|
|
49
49
|
- `docs/MEMORY.md`
|
|
50
|
+
- `docs/STATUS.md`
|
|
50
51
|
- `docs/WORKLOG.md`
|
|
51
52
|
|
|
52
53
|
### 4) Open your AI tool
|
|
@@ -96,6 +97,7 @@ ukit install
|
|
|
96
97
|
Check that the docs baseline files exist and are filled in:
|
|
97
98
|
- `docs/PROJECT.md`
|
|
98
99
|
- `docs/MEMORY.md`
|
|
100
|
+
- `docs/STATUS.md`
|
|
99
101
|
- `docs/WORKLOG.md`
|
|
100
102
|
|
|
101
103
|
---
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
|
|
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
|
-
3. Read `docs/
|
|
48
|
-
4.
|
|
49
|
-
5.
|
|
50
|
-
6.
|
|
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/CODE_MAP.md` if it exists — structural navigation index
|
|
49
|
+
5. Use the installed source-code index / routed helpers to localize the smallest relevant file + test set first
|
|
50
|
+
6. Scan recent `docs/WORKLOG.md` entries if continuing prior work
|
|
51
|
+
7. Verify understanding against source before acting — **docs orient, source is truth; keep the index-first workflow intact**
|
|
@@ -0,0 +1,81 @@
|
|
|
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 v1.1.8 scope unless a project already uses that folder.
|
|
@@ -14,6 +14,7 @@ UKit should handle:
|
|
|
14
14
|
- hidden skill selection
|
|
15
15
|
- source-code indexing
|
|
16
16
|
- compact context selection
|
|
17
|
+
- living project status for open-ended continuation prompts
|
|
17
18
|
- targeted verification
|
|
18
19
|
- optional internal delegation when it is actually useful
|
|
19
20
|
|
|
@@ -127,6 +128,21 @@ Expected UKit behavior:
|
|
|
127
128
|
2. use DuraOne references only when the repo actually matches that domain/shape
|
|
128
129
|
3. keep the user away from manual skill selection
|
|
129
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/STATUS.md` first and show whether it is fresh, possibly stale, stale, or missing
|
|
142
|
+
3. suggest only a few actionable next candidates
|
|
143
|
+
4. if status is stale, verify with source/index before treating any candidate as authoritative
|
|
144
|
+
5. if the prompt names a concrete bug/feature/review target, keep the concrete workflow primary instead of producing a global roadmap
|
|
145
|
+
|
|
130
146
|
---
|
|
131
147
|
|
|
132
148
|
## What users should NOT need to do
|
package/templates/ukit/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UKit Shared Runtime
|
|
2
2
|
|
|
3
|
-
This folder stores shared UKit runtime state for v1.1.
|
|
3
|
+
This folder stores shared UKit runtime state for v1.1.8 features.
|
|
4
4
|
|
|
5
5
|
- `storage/config.json` — runtime feature flags and defaults
|
|
6
6
|
- `storage/cache/` — prompt-cache, compact history, compact pressure state, output summaries, and preserved raw tool outputs under `storage/cache/tee/`
|