@cleocode/core 2026.3.45 → 2026.3.47
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/dist/bootstrap.d.ts.map +1 -1
- package/dist/index.js +1508 -377
- package/dist/index.js.map +4 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/injection.d.ts +1 -1
- package/dist/injection.d.ts.map +1 -1
- package/dist/routing/capability-matrix.d.ts +6 -4
- package/dist/routing/capability-matrix.d.ts.map +1 -1
- package/dist/scaffold.d.ts +35 -9
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/skills/agents/install.d.ts.map +1 -1
- package/dist/skills/routing-table.d.ts +17 -16
- package/dist/skills/routing-table.d.ts.map +1 -1
- package/dist/skills/skill-paths.d.ts.map +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +9 -4
- package/schemas/adr-frontmatter.schema.json +72 -0
- package/schemas/agent-configs.schema.json +120 -0
- package/schemas/agent-registry.json +243 -0
- package/schemas/agent-registry.schema.json +132 -0
- package/schemas/archive/research-manifest.schema.json +257 -0
- package/schemas/archive.schema.json +450 -0
- package/schemas/brain-decision.schema.json +69 -0
- package/schemas/brain-learning.schema.json +57 -0
- package/schemas/brain-pattern.schema.json +72 -0
- package/schemas/config.schema.json +2606 -0
- package/schemas/context-state.schema.json +137 -0
- package/schemas/contribution.schema.json +722 -0
- package/schemas/critical-path.schema.json +246 -0
- package/schemas/deps-cache.schema.json +97 -0
- package/schemas/doctor-output.schema.json +283 -0
- package/schemas/error.schema.json +161 -0
- package/schemas/export-package.schema.json +375 -0
- package/schemas/global-config.schema.json +219 -0
- package/schemas/grade.schema.json +49 -0
- package/schemas/log.schema.json +250 -0
- package/schemas/metrics.schema.json +328 -0
- package/schemas/migrations.schema.json +150 -0
- package/schemas/nexus-registry.schema.json +90 -0
- package/schemas/operation-constitution.schema.json +438 -0
- package/schemas/output.schema.json +164 -0
- package/schemas/project-context.schema.json +164 -0
- package/schemas/project-info.schema.json +180 -0
- package/schemas/projects-registry.schema.json +107 -0
- package/schemas/protocol-frontmatter.schema.json +72 -0
- package/schemas/rcasd-consensus-report.schema.json +10 -0
- package/schemas/rcasd-evidence.schema.json +42 -0
- package/schemas/rcasd-gate-result.schema.json +46 -0
- package/schemas/rcasd-hitl-resolution.schema.json +10 -0
- package/schemas/rcasd-index.schema.json +10 -0
- package/schemas/rcasd-manifest.schema.json +10 -0
- package/schemas/rcasd-research-output.schema.json +10 -0
- package/schemas/rcasd-spec-frontmatter.schema.json +10 -0
- package/schemas/rcasd-stage-transition.schema.json +38 -0
- package/schemas/releases.schema.json +267 -0
- package/schemas/skills-manifest.schema.json +91 -0
- package/schemas/skillsmp.schema.json +208 -0
- package/schemas/spec-index.schema.json +196 -0
- package/schemas/system-flow-atlas.schema.json +125 -0
- package/src/__tests__/injection-chain.test.d.ts +4 -3
- package/src/__tests__/injection-chain.test.d.ts.map +1 -1
- package/src/__tests__/injection-chain.test.js +11 -10
- package/src/__tests__/injection-chain.test.js.map +1 -1
- package/src/__tests__/injection-chain.test.ts +11 -10
- package/src/__tests__/injection-mvi-tiers.test.js +4 -2
- package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
- package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
- package/src/agents/__tests__/capacity.test.d.ts +7 -0
- package/src/agents/__tests__/capacity.test.d.ts.map +1 -0
- package/src/agents/__tests__/capacity.test.js +173 -0
- package/src/agents/__tests__/capacity.test.js.map +1 -0
- package/src/agents/__tests__/registry.test.d.ts +8 -0
- package/src/agents/__tests__/registry.test.d.ts.map +1 -0
- package/src/agents/__tests__/registry.test.js +348 -0
- package/src/agents/__tests__/registry.test.js.map +1 -0
- package/src/agents/__tests__/retry.test.d.ts +7 -0
- package/src/agents/__tests__/retry.test.d.ts.map +1 -0
- package/src/agents/__tests__/retry.test.js +225 -0
- package/src/agents/__tests__/retry.test.js.map +1 -0
- package/src/bootstrap.ts +37 -6
- package/src/init.ts +63 -18
- package/src/injection.ts +11 -5
- package/src/intelligence/__tests__/impact.test.d.ts +15 -0
- package/src/intelligence/__tests__/impact.test.d.ts.map +1 -0
- package/src/intelligence/__tests__/impact.test.js +384 -0
- package/src/intelligence/__tests__/impact.test.js.map +1 -0
- package/src/intelligence/__tests__/patterns.test.d.ts +8 -0
- package/src/intelligence/__tests__/patterns.test.d.ts.map +1 -0
- package/src/intelligence/__tests__/patterns.test.js +370 -0
- package/src/intelligence/__tests__/patterns.test.js.map +1 -0
- package/src/intelligence/__tests__/prediction.test.d.ts +8 -0
- package/src/intelligence/__tests__/prediction.test.d.ts.map +1 -0
- package/src/intelligence/__tests__/prediction.test.js +314 -0
- package/src/intelligence/__tests__/prediction.test.js.map +1 -0
- package/src/nexus/__tests__/nexus-e2e.test.d.ts +12 -0
- package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +1 -0
- package/src/nexus/__tests__/nexus-e2e.test.js +1220 -0
- package/src/nexus/__tests__/nexus-e2e.test.js.map +1 -0
- package/src/nexus/__tests__/transfer.test.d.ts +8 -0
- package/src/nexus/__tests__/transfer.test.d.ts.map +1 -0
- package/src/nexus/__tests__/transfer.test.js +372 -0
- package/src/nexus/__tests__/transfer.test.js.map +1 -0
- package/src/nexus/__tests__/transfer.test.ts +1 -1
- package/src/routing/capability-matrix.ts +1435 -205
- package/src/scaffold.ts +70 -13
- package/src/sessions/__tests__/briefing.test.js +28 -2
- package/src/sessions/__tests__/briefing.test.js.map +1 -1
- package/src/skills/__tests__/routing-table.test.js +48 -31
- package/src/skills/__tests__/routing-table.test.js.map +1 -1
- package/src/skills/__tests__/routing-table.test.ts +53 -33
- package/src/skills/agents/install.ts +9 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js +41 -32
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js.map +1 -1
- package/src/skills/routing-table.ts +39 -253
- package/src/skills/skill-paths.ts +3 -2
- package/src/store/__tests__/project-detect.test.js +1 -1
- package/src/store/__tests__/project-detect.test.js.map +1 -1
- package/src/store/__tests__/project-detect.test.ts +1 -1
- package/src/store/__tests__/test-db-helper.d.ts.map +1 -1
- package/src/store/__tests__/test-db-helper.js +0 -1
- package/src/store/__tests__/test-db-helper.js.map +1 -1
- package/src/system/health.ts +18 -7
- package/src/ui/index.ts +0 -6
- package/src/validation/operation-gate-validators.ts +2 -2
- package/templates/CLEO-INJECTION.md +120 -0
- package/templates/README.md +29 -0
- package/templates/agent-registry.json +305 -0
- package/templates/cleo-gitignore +74 -0
- package/templates/config.template.json +187 -0
- package/templates/git-hooks/commit-msg +149 -0
- package/templates/git-hooks/pre-commit +40 -0
- package/templates/git-hooks/pre-push +79 -0
- package/templates/github/ISSUE_TEMPLATE/bug_report.yml +143 -0
- package/templates/github/ISSUE_TEMPLATE/config.yml +8 -0
- package/templates/github/ISSUE_TEMPLATE/feature_request.yml +125 -0
- package/templates/github/ISSUE_TEMPLATE/help_question.yml +99 -0
- package/templates/global-config.template.json +56 -0
- package/templates/hooks/precompact-safestop.sh +89 -0
- package/templates/issue-templates/bug_report.yml +143 -0
- package/templates/issue-templates/config.yml +8 -0
- package/templates/issue-templates/feature_request.yml +125 -0
- package/templates/issue-templates/help_question.yml +99 -0
- package/templates/skillsmp.json.example +28 -0
- package/templates/skillsmp.json.example.md +214 -0
- package/dist/ui/injection-legacy.d.ts +0 -26
- package/dist/ui/injection-legacy.d.ts.map +0 -1
- package/src/ui/__tests__/injection-registry.test.d.ts +0 -11
- package/src/ui/__tests__/injection-registry.test.d.ts.map +0 -1
- package/src/ui/__tests__/injection-registry.test.js +0 -46
- package/src/ui/__tests__/injection-registry.test.js.map +0 -1
- package/src/ui/__tests__/injection-registry.test.ts +0 -57
- package/src/ui/injection-legacy.ts +0 -44
|
@@ -25,6 +25,21 @@ vi.mock('../../discovery.js', () => ({
|
|
|
25
25
|
findSkill: vi.fn(),
|
|
26
26
|
mapSkillName: vi.fn(() => ({ canonical: 'task-executor', mapped: true })),
|
|
27
27
|
}));
|
|
28
|
+
vi.mock('../../../store/data-accessor.js', () => ({
|
|
29
|
+
getAccessor: vi.fn().mockResolvedValue({
|
|
30
|
+
loadSingleTask: vi.fn().mockResolvedValue({
|
|
31
|
+
id: 'T100',
|
|
32
|
+
title: 'Test task',
|
|
33
|
+
status: 'active',
|
|
34
|
+
description: 'A test',
|
|
35
|
+
priority: 'medium',
|
|
36
|
+
labels: [],
|
|
37
|
+
depends: [],
|
|
38
|
+
}),
|
|
39
|
+
loadTasks: vi.fn().mockResolvedValue([]),
|
|
40
|
+
queryTasks: vi.fn().mockResolvedValue({ tasks: [], total: 0 }),
|
|
41
|
+
}),
|
|
42
|
+
}));
|
|
28
43
|
import { existsSync, readFileSync } from 'node:fs';
|
|
29
44
|
import { findSkill } from '../../discovery.js';
|
|
30
45
|
import { injectProtocol, orchestratorSpawnSkill } from '../../injection/subagent.js';
|
|
@@ -59,7 +74,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
59
74
|
content: '# Test Skill\nDo the thing.',
|
|
60
75
|
});
|
|
61
76
|
});
|
|
62
|
-
it('passes tier 0 through — output excludes standard and orchestrator', () => {
|
|
77
|
+
it('passes tier 0 through — output excludes standard and orchestrator', async () => {
|
|
63
78
|
vi.mocked(readFileSync).mockImplementation((path) => {
|
|
64
79
|
const p = String(path);
|
|
65
80
|
if (p.includes('subagent-protocol-base'))
|
|
@@ -68,13 +83,13 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
68
83
|
return MOCK_TASKS_JSON;
|
|
69
84
|
return '';
|
|
70
85
|
});
|
|
71
|
-
const result = orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project', 0);
|
|
86
|
+
const result = await orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project', 0);
|
|
72
87
|
expect(result).toContain('Minimal Section');
|
|
73
88
|
expect(result).not.toContain('Standard Section');
|
|
74
89
|
expect(result).not.toContain('Orchestrator Section');
|
|
75
90
|
expect(result).toContain('Test Skill');
|
|
76
91
|
});
|
|
77
|
-
it('passes tier 1 through — output includes minimal + standard', () => {
|
|
92
|
+
it('passes tier 1 through — output includes minimal + standard', async () => {
|
|
78
93
|
vi.mocked(readFileSync).mockImplementation((path) => {
|
|
79
94
|
const p = String(path);
|
|
80
95
|
if (p.includes('subagent-protocol-base'))
|
|
@@ -83,12 +98,12 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
83
98
|
return MOCK_TASKS_JSON;
|
|
84
99
|
return '';
|
|
85
100
|
});
|
|
86
|
-
const result = orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project', 1);
|
|
101
|
+
const result = await orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project', 1);
|
|
87
102
|
expect(result).toContain('Minimal Section');
|
|
88
103
|
expect(result).toContain('Standard Section');
|
|
89
104
|
expect(result).not.toContain('Orchestrator Section');
|
|
90
105
|
});
|
|
91
|
-
it('passes tier 2 through — output includes all tiers', () => {
|
|
106
|
+
it('passes tier 2 through — output includes all tiers', async () => {
|
|
92
107
|
vi.mocked(readFileSync).mockImplementation((path) => {
|
|
93
108
|
const p = String(path);
|
|
94
109
|
if (p.includes('subagent-protocol-base'))
|
|
@@ -97,12 +112,12 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
97
112
|
return MOCK_TASKS_JSON;
|
|
98
113
|
return '';
|
|
99
114
|
});
|
|
100
|
-
const result = orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project', 2);
|
|
115
|
+
const result = await orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project', 2);
|
|
101
116
|
expect(result).toContain('Minimal Section');
|
|
102
117
|
expect(result).toContain('Standard Section');
|
|
103
118
|
expect(result).toContain('Orchestrator Section');
|
|
104
119
|
});
|
|
105
|
-
it('omitting tier includes full protocol (backward compat)', () => {
|
|
120
|
+
it('omitting tier includes full protocol (backward compat)', async () => {
|
|
106
121
|
vi.mocked(readFileSync).mockImplementation((path) => {
|
|
107
122
|
const p = String(path);
|
|
108
123
|
if (p.includes('subagent-protocol-base'))
|
|
@@ -112,17 +127,15 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
112
127
|
return '';
|
|
113
128
|
});
|
|
114
129
|
// No tier parameter — should pass through unfiltered
|
|
115
|
-
const result = orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project');
|
|
130
|
+
const result = await orchestratorSpawnSkill('T100', 'test-skill', { TASK_ID: 'T100' }, '/mock/project');
|
|
116
131
|
// All tier content present because no filtering was applied
|
|
117
132
|
expect(result).toContain('TIER:minimal');
|
|
118
133
|
expect(result).toContain('TIER:standard');
|
|
119
134
|
expect(result).toContain('TIER:orchestrator');
|
|
120
135
|
});
|
|
121
|
-
it('throws when skill not found', () => {
|
|
136
|
+
it('throws when skill not found', async () => {
|
|
122
137
|
vi.mocked(findSkill).mockReturnValue(null);
|
|
123
|
-
expect(()
|
|
124
|
-
orchestratorSpawnSkill('T100', 'nonexistent', { TASK_ID: 'T100' }, '/mock/project', 0);
|
|
125
|
-
}).toThrow(/Skill not found/);
|
|
138
|
+
await expect(orchestratorSpawnSkill('T100', 'nonexistent', { TASK_ID: 'T100' }, '/mock/project', 0)).rejects.toThrow(/Skill not found/);
|
|
126
139
|
});
|
|
127
140
|
});
|
|
128
141
|
describe('injectProtocol tier parameter', () => {
|
|
@@ -130,29 +143,25 @@ describe('injectProtocol tier parameter', () => {
|
|
|
130
143
|
vi.clearAllMocks();
|
|
131
144
|
vi.mocked(existsSync).mockReturnValue(true);
|
|
132
145
|
});
|
|
133
|
-
it('tier undefined leaves protocol unfiltered', () => {
|
|
146
|
+
it('tier undefined leaves protocol unfiltered', async () => {
|
|
134
147
|
vi.mocked(readFileSync).mockImplementation((path) => {
|
|
135
148
|
const p = String(path);
|
|
136
149
|
if (p.includes('subagent-protocol-base'))
|
|
137
150
|
return TIERED_PROTOCOL;
|
|
138
|
-
if (p.includes('tasks.json'))
|
|
139
|
-
return MOCK_TASKS_JSON;
|
|
140
151
|
return '';
|
|
141
152
|
});
|
|
142
|
-
const result = injectProtocol('# Skill', 'T100', {}, '/mock/project', undefined);
|
|
153
|
+
const result = await injectProtocol('# Skill', 'T100', {}, '/mock/project', undefined);
|
|
143
154
|
expect(result).toContain('TIER:minimal');
|
|
144
155
|
expect(result).toContain('TIER:orchestrator');
|
|
145
156
|
});
|
|
146
|
-
it('tier 0 filters to minimal only', () => {
|
|
157
|
+
it('tier 0 filters to minimal only', async () => {
|
|
147
158
|
vi.mocked(readFileSync).mockImplementation((path) => {
|
|
148
159
|
const p = String(path);
|
|
149
160
|
if (p.includes('subagent-protocol-base'))
|
|
150
161
|
return TIERED_PROTOCOL;
|
|
151
|
-
if (p.includes('tasks.json'))
|
|
152
|
-
return MOCK_TASKS_JSON;
|
|
153
162
|
return '';
|
|
154
163
|
});
|
|
155
|
-
const result = injectProtocol('# Skill', 'T100', {}, '/mock/project', 0);
|
|
164
|
+
const result = await injectProtocol('# Skill', 'T100', {}, '/mock/project', 0);
|
|
156
165
|
expect(result).toContain('Minimal Section');
|
|
157
166
|
expect(result).not.toContain('Standard Section');
|
|
158
167
|
expect(result).not.toContain('Orchestrator Section');
|
|
@@ -179,38 +188,38 @@ describe('buildPrompt tier passthrough', () => {
|
|
|
179
188
|
content: '# Task Executor\nExecute {{TASK_ID}}.',
|
|
180
189
|
});
|
|
181
190
|
});
|
|
182
|
-
it('buildPrompt with tier 0 filters protocol to minimal only', () => {
|
|
183
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
191
|
+
it('buildPrompt with tier 0 filters protocol to minimal only', async () => {
|
|
192
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
184
193
|
expect(result.prompt).toContain('Minimal Section');
|
|
185
194
|
expect(result.prompt).not.toContain('Standard Section');
|
|
186
195
|
expect(result.prompt).not.toContain('Orchestrator Section');
|
|
187
196
|
expect(result.prompt).toContain('SUBAGENT PROTOCOL');
|
|
188
197
|
});
|
|
189
|
-
it('buildPrompt with tier 1 includes minimal + standard', () => {
|
|
190
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 1);
|
|
198
|
+
it('buildPrompt with tier 1 includes minimal + standard', async () => {
|
|
199
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 1);
|
|
191
200
|
expect(result.prompt).toContain('Minimal Section');
|
|
192
201
|
expect(result.prompt).toContain('Standard Section');
|
|
193
202
|
expect(result.prompt).not.toContain('Orchestrator Section');
|
|
194
203
|
});
|
|
195
|
-
it('buildPrompt without tier includes full protocol', () => {
|
|
196
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project');
|
|
204
|
+
it('buildPrompt without tier includes full protocol', async () => {
|
|
205
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project');
|
|
197
206
|
// No tier = unfiltered, so tier markers present
|
|
198
207
|
expect(result.prompt).toContain('TIER:minimal');
|
|
199
208
|
expect(result.prompt).toContain('TIER:orchestrator');
|
|
200
209
|
});
|
|
201
|
-
it('buildPrompt injects task context', () => {
|
|
202
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
210
|
+
it('buildPrompt injects task context', async () => {
|
|
211
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
203
212
|
expect(result.prompt).toContain('Task Context');
|
|
204
213
|
expect(result.prompt).toContain('T100');
|
|
205
214
|
});
|
|
206
|
-
it('spawn passes tier through', () => {
|
|
207
|
-
const result = spawn('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
215
|
+
it('spawn passes tier through', async () => {
|
|
216
|
+
const result = await spawn('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
208
217
|
expect(result.prompt).toContain('Minimal Section');
|
|
209
218
|
expect(result.prompt).not.toContain('Orchestrator Section');
|
|
210
219
|
expect(result.spawnTimestamp).toBeDefined();
|
|
211
220
|
});
|
|
212
|
-
it('spawnBatch passes tier through', () => {
|
|
213
|
-
const result = spawnBatch(['T100'], 'TASK-EXECUTOR', '/mock/project', 0);
|
|
221
|
+
it('spawnBatch passes tier through', async () => {
|
|
222
|
+
const result = await spawnBatch(['T100'], 'TASK-EXECUTOR', '/mock/project', 0);
|
|
214
223
|
expect(result.succeeded).toBe(1);
|
|
215
224
|
expect(result.spawns[0].result.prompt).toContain('Minimal Section');
|
|
216
225
|
expect(result.spawns[0].result.prompt).not.toContain('Orchestrator Section');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-tier.test.js","sourceRoot":"","sources":["spawn-tier.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9D,mDAAmD;AACnD,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;IACxB,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;IAC7B,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE;CACtB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;IAClC,cAAc,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC;IAC5C,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,gCAAgC,CAAC;IAC1D,kBAAkB,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;CACrE,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,C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|
-
*
|
|
7
|
-
*
|
|
8
|
-
* and are preferred for rapid, repeated queries. CLI is preferred for
|
|
9
|
-
* operations that benefit from human-readable output or shell integration.
|
|
4
|
+
* Thin wrapper over the merged capability matrix. PreferredChannel data
|
|
5
|
+
* is now stored as part of OperationCapability in the capability matrix
|
|
6
|
+
* (packages/core/src/routing/capability-matrix.ts), which is the single
|
|
7
|
+
* SSoT for both execution mode and channel preference.
|
|
10
8
|
*
|
|
11
9
|
* @task T5240
|
|
12
10
|
* @epic T5149
|
|
11
|
+
* @see packages/core/src/routing/capability-matrix.ts
|
|
13
12
|
*/
|
|
14
13
|
|
|
14
|
+
import { getCapabilityMatrix } from '../routing/capability-matrix.js';
|
|
15
|
+
|
|
16
|
+
export type { PreferredChannel } from '../routing/capability-matrix.js';
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* Routing entry describing the preferred channel for an operation.
|
|
20
|
+
*
|
|
21
|
+
* Derived from OperationCapability in the capability matrix.
|
|
22
|
+
* Use this type when consuming domain-level routing results from
|
|
23
|
+
* getRoutingForDomain() or getOperationsByChannel().
|
|
17
24
|
*/
|
|
18
25
|
export interface RoutingEntry {
|
|
19
26
|
/** Domain name (e.g. 'tasks', 'memory', 'session') */
|
|
20
27
|
domain: string;
|
|
21
|
-
/** Operation name (e.g. '
|
|
28
|
+
/** Operation name (e.g. 'show', 'find') */
|
|
22
29
|
operation: string;
|
|
23
30
|
/** Preferred channel for token efficiency */
|
|
24
31
|
preferredChannel: 'mcp' | 'cli' | 'either';
|
|
@@ -26,277 +33,56 @@ export interface RoutingEntry {
|
|
|
26
33
|
reason: string;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
|
-
/**
|
|
30
|
-
* Static routing table for all canonical operations.
|
|
31
|
-
*
|
|
32
|
-
* Operations are grouped by domain with channel preferences based on:
|
|
33
|
-
* - MCP: lower overhead (no CLI startup), direct DB access, structured JSON
|
|
34
|
-
* - CLI: human-readable output, shell integration, interactive prompts
|
|
35
|
-
* - Either: no significant difference or context-dependent
|
|
36
|
-
*/
|
|
37
|
-
export const ROUTING_TABLE: RoutingEntry[] = [
|
|
38
|
-
// === Memory domain -- MCP strongly preferred (direct DB, no CLI startup) ===
|
|
39
|
-
{
|
|
40
|
-
domain: 'memory',
|
|
41
|
-
operation: 'brain.search',
|
|
42
|
-
preferredChannel: 'mcp',
|
|
43
|
-
reason: 'Low overhead search, direct DB access',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
domain: 'memory',
|
|
47
|
-
operation: 'brain.fetch',
|
|
48
|
-
preferredChannel: 'mcp',
|
|
49
|
-
reason: 'Direct DB access, structured response',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
domain: 'memory',
|
|
53
|
-
operation: 'brain.timeline',
|
|
54
|
-
preferredChannel: 'mcp',
|
|
55
|
-
reason: 'Complex multi-table query, direct DB',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
domain: 'memory',
|
|
59
|
-
operation: 'brain.observe',
|
|
60
|
-
preferredChannel: 'mcp',
|
|
61
|
-
reason: 'Direct DB write, no CLI overhead',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
domain: 'memory',
|
|
65
|
-
operation: 'find',
|
|
66
|
-
preferredChannel: 'mcp',
|
|
67
|
-
reason: 'Alias for brain.search',
|
|
68
|
-
},
|
|
69
|
-
{ domain: 'memory', operation: 'show', preferredChannel: 'mcp', reason: 'Alias for brain.fetch' },
|
|
70
|
-
{
|
|
71
|
-
domain: 'memory',
|
|
72
|
-
operation: 'decision.store',
|
|
73
|
-
preferredChannel: 'mcp',
|
|
74
|
-
reason: 'Direct DB write',
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
domain: 'memory',
|
|
78
|
-
operation: 'decision.find',
|
|
79
|
-
preferredChannel: 'mcp',
|
|
80
|
-
reason: 'Direct DB query',
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
domain: 'memory',
|
|
84
|
-
operation: 'learning.store',
|
|
85
|
-
preferredChannel: 'mcp',
|
|
86
|
-
reason: 'Direct DB write',
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
domain: 'memory',
|
|
90
|
-
operation: 'learning.find',
|
|
91
|
-
preferredChannel: 'mcp',
|
|
92
|
-
reason: 'Direct DB query',
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
domain: 'memory',
|
|
96
|
-
operation: 'pattern.store',
|
|
97
|
-
preferredChannel: 'mcp',
|
|
98
|
-
reason: 'Direct DB write',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
domain: 'memory',
|
|
102
|
-
operation: 'pattern.find',
|
|
103
|
-
preferredChannel: 'mcp',
|
|
104
|
-
reason: 'Direct DB query',
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
// === Tasks domain -- MCP preferred for queries, CLI for complex ops ===
|
|
108
|
-
{
|
|
109
|
-
domain: 'tasks',
|
|
110
|
-
operation: 'show',
|
|
111
|
-
preferredChannel: 'mcp',
|
|
112
|
-
reason: 'Structured JSON response',
|
|
113
|
-
},
|
|
114
|
-
{ domain: 'tasks', operation: 'find', preferredChannel: 'mcp', reason: 'Low overhead search' },
|
|
115
|
-
{ domain: 'tasks', operation: 'list', preferredChannel: 'mcp', reason: 'Paginated response' },
|
|
116
|
-
{
|
|
117
|
-
domain: 'tasks',
|
|
118
|
-
operation: 'next',
|
|
119
|
-
preferredChannel: 'mcp',
|
|
120
|
-
reason: 'Algorithm runs in-process',
|
|
121
|
-
},
|
|
122
|
-
{ domain: 'tasks', operation: 'current', preferredChannel: 'mcp', reason: 'Simple DB lookup' },
|
|
123
|
-
{
|
|
124
|
-
domain: 'tasks',
|
|
125
|
-
operation: 'plan',
|
|
126
|
-
preferredChannel: 'mcp',
|
|
127
|
-
reason: 'Composite view, in-process',
|
|
128
|
-
},
|
|
129
|
-
{ domain: 'tasks', operation: 'add', preferredChannel: 'mcp', reason: 'Atomic DB write' },
|
|
130
|
-
{ domain: 'tasks', operation: 'update', preferredChannel: 'mcp', reason: 'Atomic DB write' },
|
|
131
|
-
{
|
|
132
|
-
domain: 'tasks',
|
|
133
|
-
operation: 'complete',
|
|
134
|
-
preferredChannel: 'mcp',
|
|
135
|
-
reason: 'Atomic DB write with hooks',
|
|
136
|
-
},
|
|
137
|
-
{ domain: 'tasks', operation: 'start', preferredChannel: 'mcp', reason: 'Atomic DB write' },
|
|
138
|
-
{ domain: 'tasks', operation: 'stop', preferredChannel: 'mcp', reason: 'Atomic DB write' },
|
|
139
|
-
|
|
140
|
-
// === Session domain -- MCP preferred (stateful, in-process) ===
|
|
141
|
-
{ domain: 'session', operation: 'status', preferredChannel: 'mcp', reason: 'Quick state lookup' },
|
|
142
|
-
{ domain: 'session', operation: 'start', preferredChannel: 'mcp', reason: 'State transition' },
|
|
143
|
-
{
|
|
144
|
-
domain: 'session',
|
|
145
|
-
operation: 'end',
|
|
146
|
-
preferredChannel: 'mcp',
|
|
147
|
-
reason: 'State transition with hooks',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
domain: 'session',
|
|
151
|
-
operation: 'handoff.show',
|
|
152
|
-
preferredChannel: 'mcp',
|
|
153
|
-
reason: 'Structured handoff data',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
domain: 'session',
|
|
157
|
-
operation: 'briefing.show',
|
|
158
|
-
preferredChannel: 'mcp',
|
|
159
|
-
reason: 'Composite cold-start',
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
// === Admin domain -- either (human interaction common) ===
|
|
163
|
-
{ domain: 'admin', operation: 'version', preferredChannel: 'either', reason: 'Simple lookup' },
|
|
164
|
-
{ domain: 'admin', operation: 'health', preferredChannel: 'either', reason: 'Diagnostics' },
|
|
165
|
-
{ domain: 'admin', operation: 'dash', preferredChannel: 'mcp', reason: 'Composite view' },
|
|
166
|
-
{ domain: 'admin', operation: 'help', preferredChannel: 'mcp', reason: 'Operation discovery' },
|
|
167
|
-
{
|
|
168
|
-
domain: 'admin',
|
|
169
|
-
operation: 'map',
|
|
170
|
-
preferredChannel: 'mcp',
|
|
171
|
-
reason: 'Structured codebase analysis',
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
// === Tools domain -- MCP preferred (structured responses) ===
|
|
175
|
-
{
|
|
176
|
-
domain: 'tools',
|
|
177
|
-
operation: 'skill.list',
|
|
178
|
-
preferredChannel: 'mcp',
|
|
179
|
-
reason: 'Structured catalog',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
domain: 'tools',
|
|
183
|
-
operation: 'skill.show',
|
|
184
|
-
preferredChannel: 'mcp',
|
|
185
|
-
reason: 'Structured skill data',
|
|
186
|
-
},
|
|
187
|
-
{ domain: 'tools', operation: 'skill.find', preferredChannel: 'mcp', reason: 'Search response' },
|
|
188
|
-
{
|
|
189
|
-
domain: 'tools',
|
|
190
|
-
operation: 'skill.install',
|
|
191
|
-
preferredChannel: 'either',
|
|
192
|
-
reason: 'May need shell access',
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
domain: 'tools',
|
|
196
|
-
operation: 'provider.list',
|
|
197
|
-
preferredChannel: 'mcp',
|
|
198
|
-
reason: 'Structured list',
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
domain: 'tools',
|
|
202
|
-
operation: 'provider.detect',
|
|
203
|
-
preferredChannel: 'mcp',
|
|
204
|
-
reason: 'Detection result',
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
domain: 'tools',
|
|
208
|
-
operation: 'adapter.list',
|
|
209
|
-
preferredChannel: 'mcp',
|
|
210
|
-
reason: 'Structured list',
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
domain: 'tools',
|
|
214
|
-
operation: 'adapter.show',
|
|
215
|
-
preferredChannel: 'mcp',
|
|
216
|
-
reason: 'Structured manifest',
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
domain: 'tools',
|
|
220
|
-
operation: 'adapter.activate',
|
|
221
|
-
preferredChannel: 'mcp',
|
|
222
|
-
reason: 'State transition',
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
// === Check domain -- MCP preferred (validation results) ===
|
|
226
|
-
{
|
|
227
|
-
domain: 'check',
|
|
228
|
-
operation: 'validate',
|
|
229
|
-
preferredChannel: 'mcp',
|
|
230
|
-
reason: 'Structured validation',
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
domain: 'check',
|
|
234
|
-
operation: 'compliance',
|
|
235
|
-
preferredChannel: 'mcp',
|
|
236
|
-
reason: 'Compliance report',
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
// === Pipeline domain -- MCP preferred (lifecycle gates) ===
|
|
240
|
-
{
|
|
241
|
-
domain: 'pipeline',
|
|
242
|
-
operation: 'lifecycle.status',
|
|
243
|
-
preferredChannel: 'mcp',
|
|
244
|
-
reason: 'Gate status',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
domain: 'pipeline',
|
|
248
|
-
operation: 'release.ship',
|
|
249
|
-
preferredChannel: 'cli',
|
|
250
|
-
reason: 'Complex multi-step with git ops',
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
// === Orchestrate domain -- MCP preferred (agent coordination) ===
|
|
254
|
-
{ domain: 'orchestrate', operation: 'spawn', preferredChannel: 'mcp', reason: 'Agent spawning' },
|
|
255
|
-
{ domain: 'orchestrate', operation: 'plan', preferredChannel: 'mcp', reason: 'Decomposition' },
|
|
256
|
-
|
|
257
|
-
// === Nexus domain -- either (cross-project queries) ===
|
|
258
|
-
{
|
|
259
|
-
domain: 'nexus',
|
|
260
|
-
operation: 'search',
|
|
261
|
-
preferredChannel: 'either',
|
|
262
|
-
reason: 'Cross-project search',
|
|
263
|
-
},
|
|
264
|
-
{ domain: 'nexus', operation: 'sync', preferredChannel: 'either', reason: 'Cross-project sync' },
|
|
265
|
-
|
|
266
|
-
// === Sticky domain -- MCP preferred (quick ephemeral notes) ===
|
|
267
|
-
{ domain: 'sticky', operation: 'add', preferredChannel: 'mcp', reason: 'Quick DB write' },
|
|
268
|
-
{ domain: 'sticky', operation: 'list', preferredChannel: 'mcp', reason: 'Quick DB read' },
|
|
269
|
-
{ domain: 'sticky', operation: 'show', preferredChannel: 'mcp', reason: 'Quick DB read' },
|
|
270
|
-
];
|
|
271
|
-
|
|
272
36
|
/**
|
|
273
37
|
* Look up the preferred channel for a given domain + operation.
|
|
274
38
|
*
|
|
39
|
+
* Reads from the merged capability matrix (single SSoT).
|
|
40
|
+
*
|
|
275
41
|
* @param domain - Domain name
|
|
276
42
|
* @param operation - Operation name
|
|
277
43
|
* @returns Preferred channel ('mcp', 'cli', or 'either' as fallback)
|
|
278
44
|
*/
|
|
279
45
|
export function getPreferredChannel(domain: string, operation: string): 'mcp' | 'cli' | 'either' {
|
|
280
|
-
const entry =
|
|
46
|
+
const entry = getCapabilityMatrix().find(
|
|
47
|
+
(cap) => cap.domain === domain && cap.operation === operation,
|
|
48
|
+
);
|
|
281
49
|
return entry?.preferredChannel ?? 'either';
|
|
282
50
|
}
|
|
283
51
|
|
|
284
52
|
/**
|
|
285
53
|
* Get routing entries for a specific domain.
|
|
286
54
|
*
|
|
55
|
+
* Derives entries from the capability matrix.
|
|
56
|
+
*
|
|
287
57
|
* @param domain - Domain name
|
|
288
58
|
* @returns All routing entries for the domain
|
|
289
59
|
*/
|
|
290
60
|
export function getRoutingForDomain(domain: string): RoutingEntry[] {
|
|
291
|
-
return
|
|
61
|
+
return getCapabilityMatrix()
|
|
62
|
+
.filter((cap) => cap.domain === domain)
|
|
63
|
+
.map((cap) => ({
|
|
64
|
+
domain: cap.domain,
|
|
65
|
+
operation: cap.operation,
|
|
66
|
+
preferredChannel: cap.preferredChannel,
|
|
67
|
+
reason: '',
|
|
68
|
+
}));
|
|
292
69
|
}
|
|
293
70
|
|
|
294
71
|
/**
|
|
295
72
|
* Get all operations that prefer a specific channel.
|
|
296
73
|
*
|
|
74
|
+
* Derives entries from the capability matrix.
|
|
75
|
+
*
|
|
297
76
|
* @param channel - Channel preference to filter by
|
|
298
77
|
* @returns Matching routing entries
|
|
299
78
|
*/
|
|
300
79
|
export function getOperationsByChannel(channel: 'mcp' | 'cli' | 'either'): RoutingEntry[] {
|
|
301
|
-
return
|
|
80
|
+
return getCapabilityMatrix()
|
|
81
|
+
.filter((cap) => cap.preferredChannel === channel)
|
|
82
|
+
.map((cap) => ({
|
|
83
|
+
domain: cap.domain,
|
|
84
|
+
operation: cap.operation,
|
|
85
|
+
preferredChannel: cap.preferredChannel,
|
|
86
|
+
reason: '',
|
|
87
|
+
}));
|
|
302
88
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import { existsSync, lstatSync, readlinkSync, realpathSync } from 'node:fs';
|
|
17
17
|
import { delimiter, join, resolve } from 'node:path';
|
|
18
|
-
import {
|
|
18
|
+
import { getCanonicalSkillsDir } from '@cleocode/caamp';
|
|
19
19
|
|
|
20
20
|
/** Source type classification for a skill directory. */
|
|
21
21
|
export type SkillSourceType = 'embedded' | 'caamp' | 'project-link' | 'global-link';
|
|
@@ -31,10 +31,11 @@ export interface SkillSearchPath {
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Get the CAAMP canonical skill location.
|
|
34
|
+
* Delegates to caamp's getCanonicalSkillsDir() which is XDG-aware.
|
|
34
35
|
* @task T4552
|
|
35
36
|
*/
|
|
36
37
|
function getCaampCanonical(): string {
|
|
37
|
-
return
|
|
38
|
+
return getCanonicalSkillsDir();
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
/**
|
|
@@ -11,7 +11,7 @@ import addFormatsModule from 'ajv-formats';
|
|
|
11
11
|
import { afterEach, describe, expect, it } from 'vitest';
|
|
12
12
|
import { detectProjectType } from '../project-detect.js';
|
|
13
13
|
// ─── Schema validator setup ───────────────────────────────────────────────────
|
|
14
|
-
const schemaPath = fileURLToPath(new URL('
|
|
14
|
+
const schemaPath = fileURLToPath(new URL('../../../schemas/project-context.schema.json', import.meta.url));
|
|
15
15
|
const schema = JSON.parse(readFileSync(schemaPath, 'utf-8'));
|
|
16
16
|
const Ajv = AjvModule.default ?? AjvModule;
|
|
17
17
|
const addFormats = addFormatsModule.default ?? addFormatsModule;
|