@noodleseed/one 0.72.0 → 0.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-skills-state.d.ts +40 -0
- package/dist/agent-skills-state.d.ts.map +1 -0
- package/dist/agent-skills-state.js +184 -0
- package/dist/agent-skills-state.js.map +1 -0
- package/dist/agents.d.ts +15 -4
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +196 -76
- package/dist/agents.js.map +1 -1
- package/dist/skills-update.d.ts +1 -0
- package/dist/skills-update.d.ts.map +1 -1
- package/dist/skills-update.js +81 -5
- package/dist/skills-update.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/behavior-skills.d.ts +20 -0
- package/node_modules/@noodle-borg/agent-kit/dist/behavior-skills.d.ts.map +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/behavior-skills.js +280 -0
- package/node_modules/@noodle-borg/agent-kit/dist/behavior-skills.js.map +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/index.d.ts +18 -4
- package/node_modules/@noodle-borg/agent-kit/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/index.js +57 -46
- package/node_modules/@noodle-borg/agent-kit/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-registry.d.ts +31 -0
- package/node_modules/@noodle-borg/agent-kit/dist/skill-registry.d.ts.map +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/skill-registry.js +116 -0
- package/node_modules/@noodle-borg/agent-kit/dist/skill-registry.js.map +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/skill-router.d.ts +3 -3
- package/node_modules/@noodle-borg/agent-kit/dist/skill-router.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-router.js +35 -25
- package/node_modules/@noodle-borg/agent-kit/dist/skill-router.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { type AgentTarget, type SkillRegistry } from './skill-registry.js';
|
|
2
|
+
export * from './behavior-skills.js';
|
|
1
3
|
export * from './plugin-compatibility.js';
|
|
2
4
|
export * from './plugin-launcher.js';
|
|
3
5
|
export * from './plugin-submission.js';
|
|
6
|
+
export * from './skill-registry.js';
|
|
4
7
|
export declare const AGENT_KIT_VERSION: string;
|
|
5
8
|
export declare const MANAGED_BEGIN = "<!-- BEGIN NOODLE AGENT CONTEXT -->";
|
|
6
9
|
export declare const MANAGED_END = "<!-- END NOODLE AGENT CONTEXT -->";
|
|
7
|
-
export type AgentTarget = 'codex' | 'claude-code';
|
|
8
10
|
export type AgentTargetSelection = AgentTarget | 'all' | 'none';
|
|
9
11
|
export interface AgentProjectMetadata {
|
|
10
12
|
readonly name?: string;
|
|
@@ -20,24 +22,34 @@ export interface PlannedAgentFile {
|
|
|
20
22
|
readonly path: string;
|
|
21
23
|
readonly content: string;
|
|
22
24
|
readonly mode: 'managed-block' | 'generated-file';
|
|
25
|
+
readonly skill?: string;
|
|
26
|
+
readonly skillVersion?: string;
|
|
23
27
|
}
|
|
24
28
|
export interface PublishableSkillFile {
|
|
25
29
|
readonly path: string;
|
|
26
30
|
readonly content: string;
|
|
27
31
|
readonly agentTarget: AgentTarget;
|
|
32
|
+
readonly skill: string;
|
|
33
|
+
readonly skillVersion: string;
|
|
28
34
|
}
|
|
29
35
|
/** Correspondence between a publishable skill file and where it installs, per target. */
|
|
30
36
|
export interface SkillFileMapping {
|
|
31
37
|
readonly publishPath: string;
|
|
32
38
|
readonly installedPath: string;
|
|
33
39
|
readonly agentTarget: AgentTarget;
|
|
40
|
+
readonly skill: string;
|
|
41
|
+
readonly skillVersion: string;
|
|
34
42
|
}
|
|
35
43
|
export interface AgentKitManifestFile {
|
|
36
44
|
readonly path: string;
|
|
45
|
+
readonly installedPath: string;
|
|
37
46
|
readonly sha256: string;
|
|
38
47
|
readonly agentTarget: AgentTarget;
|
|
48
|
+
readonly skill: string;
|
|
49
|
+
readonly skillVersion: string;
|
|
39
50
|
}
|
|
40
51
|
export interface AgentKitManifest {
|
|
52
|
+
readonly schemaVersion: 2;
|
|
41
53
|
readonly packageVersion: string;
|
|
42
54
|
readonly files: readonly AgentKitManifestFile[];
|
|
43
55
|
}
|
|
@@ -46,10 +58,12 @@ export interface ManagedBlockResult {
|
|
|
46
58
|
readonly action: 'created' | 'unchanged' | 'updated' | 'skipped' | 'overwritten';
|
|
47
59
|
readonly reason?: 'user-edited-managed-block' | 'duplicate-managed-blocks';
|
|
48
60
|
}
|
|
61
|
+
export declare const SKILL_REGISTRY: SkillRegistry;
|
|
49
62
|
export declare function parseAgentTargets(value: string | undefined): readonly AgentTarget[] | undefined;
|
|
50
63
|
export declare function renderAgentFiles(input: {
|
|
51
64
|
readonly targets?: readonly AgentTarget[];
|
|
52
65
|
readonly project?: AgentProjectMetadata;
|
|
66
|
+
readonly registry?: SkillRegistry;
|
|
53
67
|
}): readonly PlannedAgentFile[];
|
|
54
68
|
export declare function renderManagedBlock(input: {
|
|
55
69
|
readonly target: AgentTarget;
|
|
@@ -63,11 +77,11 @@ export declare function reconcileManagedBlock(input: {
|
|
|
63
77
|
}): ManagedBlockResult;
|
|
64
78
|
export declare function contentHash(content: string): string;
|
|
65
79
|
export declare function contentSha256(content: string): string;
|
|
66
|
-
export declare function renderPublishableSkills(): readonly PublishableSkillFile[];
|
|
80
|
+
export declare function renderPublishableSkills(registry?: SkillRegistry): readonly PublishableSkillFile[];
|
|
67
81
|
/**
|
|
68
82
|
* Map each publishable skill file to its installed destination, per target. The CLI uses this to
|
|
69
83
|
* apply registry-fresh content (keyed by installed path) over the bundled tree.
|
|
70
84
|
*/
|
|
71
|
-
export declare function skillFileMappings(): readonly SkillFileMapping[];
|
|
72
|
-
export declare function renderAgentKitManifest(): AgentKitManifest;
|
|
85
|
+
export declare function skillFileMappings(registry?: SkillRegistry): readonly SkillFileMapping[];
|
|
86
|
+
export declare function renderAgentKitManifest(registry?: SkillRegistry): AgentKitManifest;
|
|
73
87
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAG7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AAEpC,eAAO,MAAM,iBAAiB,EAAE,MAAoB,CAAC;AACrD,eAAO,MAAM,aAAa,wCAAwC,CAAC;AACnE,eAAO,MAAM,WAAW,sCAAsC,CAAC;AAE/D,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB,CAAC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AgB,sBAAsB,CAAC,QAAQ,GAAE,aAA8B,GAAG,gBAAgB,CAiBjG"}
|
|
@@ -1,39 +1,52 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import pkg from '../package.json' with { type: 'json' };
|
|
3
|
+
import { BEHAVIOR_SKILLS, renderBehaviorSkillBody } from './behavior-skills.js';
|
|
3
4
|
import { BUNDLED_EXAMPLE_FILES } from './generated/example-files.js';
|
|
4
5
|
import { SKILL_REFERENCES } from './skill-content.js';
|
|
6
|
+
import { defineSkillRegistry, renderRegisteredSkillFiles, } from './skill-registry.js';
|
|
5
7
|
import { SKILL_DESCRIPTION, skillRouterBody } from './skill-router.js';
|
|
8
|
+
export * from './behavior-skills.js';
|
|
6
9
|
export * from './plugin-compatibility.js';
|
|
7
10
|
export * from './plugin-launcher.js';
|
|
8
11
|
export * from './plugin-submission.js';
|
|
12
|
+
export * from './skill-registry.js';
|
|
9
13
|
export const AGENT_KIT_VERSION = pkg.version;
|
|
10
14
|
export const MANAGED_BEGIN = '<!-- BEGIN NOODLE AGENT CONTEXT -->';
|
|
11
15
|
export const MANAGED_END = '<!-- END NOODLE AGENT CONTEXT -->';
|
|
12
16
|
const TARGETS = ['codex', 'claude-code'];
|
|
13
|
-
/** Install directory for the `noodle-seed` skill tree, per target. */
|
|
14
|
-
const SKILL_DIR_BY_TARGET = {
|
|
15
|
-
codex: '.agents/skills/noodle-seed',
|
|
16
|
-
'claude-code': '.claude/skills/noodle-seed',
|
|
17
|
-
};
|
|
18
17
|
/** Managed-block host file, per target. */
|
|
19
18
|
const MANAGED_FILE_BY_TARGET = {
|
|
20
19
|
codex: 'AGENTS.md',
|
|
21
20
|
'claude-code': 'CLAUDE.md',
|
|
22
21
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
export const SKILL_REGISTRY = defineSkillRegistry([
|
|
23
|
+
{
|
|
24
|
+
name: 'noodle-seed',
|
|
25
|
+
description: SKILL_DESCRIPTION,
|
|
26
|
+
version: AGENT_KIT_VERSION,
|
|
27
|
+
supportedHosts: TARGETS,
|
|
28
|
+
publishAtTargetRoot: true,
|
|
29
|
+
renderBody: skillRouterBody,
|
|
30
|
+
files: [
|
|
31
|
+
...SKILL_REFERENCES.map((reference) => ({
|
|
32
|
+
relPath: reference.relPath,
|
|
33
|
+
render: () => reference.render(),
|
|
34
|
+
})),
|
|
35
|
+
...BUNDLED_EXAMPLE_FILES.map((file) => ({
|
|
36
|
+
relPath: file.relPath,
|
|
37
|
+
render: () => file.content,
|
|
38
|
+
})),
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
...BEHAVIOR_SKILLS.map((skill) => ({
|
|
42
|
+
name: skill.name,
|
|
43
|
+
description: skill.description,
|
|
44
|
+
version: AGENT_KIT_VERSION,
|
|
45
|
+
supportedHosts: TARGETS,
|
|
46
|
+
renderBody: (target) => renderBehaviorSkillBody(skill, target),
|
|
47
|
+
files: [],
|
|
48
|
+
})),
|
|
49
|
+
]);
|
|
37
50
|
export function parseAgentTargets(value) {
|
|
38
51
|
if (value === undefined || value === 'all')
|
|
39
52
|
return TARGETS;
|
|
@@ -58,13 +71,14 @@ export function renderAgentFiles(input) {
|
|
|
58
71
|
...(input.project !== undefined ? { project: input.project } : {}),
|
|
59
72
|
}),
|
|
60
73
|
});
|
|
61
|
-
const
|
|
62
|
-
for (const file of skillFileSet(target)) {
|
|
74
|
+
for (const file of renderRegisteredSkillFiles(input.registry ?? SKILL_REGISTRY, target)) {
|
|
63
75
|
files.push({
|
|
64
76
|
target,
|
|
65
|
-
path:
|
|
77
|
+
path: file.installedPath,
|
|
66
78
|
mode: 'generated-file',
|
|
67
79
|
content: file.content,
|
|
80
|
+
skill: file.skill,
|
|
81
|
+
skillVersion: file.skillVersion,
|
|
68
82
|
});
|
|
69
83
|
}
|
|
70
84
|
}
|
|
@@ -158,14 +172,16 @@ export function contentHash(content) {
|
|
|
158
172
|
export function contentSha256(content) {
|
|
159
173
|
return createHash('sha256').update(content).digest('hex');
|
|
160
174
|
}
|
|
161
|
-
export function renderPublishableSkills() {
|
|
175
|
+
export function renderPublishableSkills(registry = SKILL_REGISTRY) {
|
|
162
176
|
const files = [];
|
|
163
177
|
for (const target of TARGETS) {
|
|
164
|
-
for (const file of
|
|
178
|
+
for (const file of renderRegisteredSkillFiles(registry, target)) {
|
|
165
179
|
files.push({
|
|
166
|
-
path:
|
|
180
|
+
path: file.publishPath,
|
|
167
181
|
content: file.content,
|
|
168
182
|
agentTarget: target,
|
|
183
|
+
skill: file.skill,
|
|
184
|
+
skillVersion: file.skillVersion,
|
|
169
185
|
});
|
|
170
186
|
}
|
|
171
187
|
}
|
|
@@ -175,31 +191,40 @@ export function renderPublishableSkills() {
|
|
|
175
191
|
* Map each publishable skill file to its installed destination, per target. The CLI uses this to
|
|
176
192
|
* apply registry-fresh content (keyed by installed path) over the bundled tree.
|
|
177
193
|
*/
|
|
178
|
-
export function skillFileMappings() {
|
|
194
|
+
export function skillFileMappings(registry = SKILL_REGISTRY) {
|
|
179
195
|
const mappings = [];
|
|
180
196
|
for (const target of TARGETS) {
|
|
181
|
-
const
|
|
182
|
-
for (const file of skillFileSet(target)) {
|
|
197
|
+
for (const file of renderRegisteredSkillFiles(registry, target)) {
|
|
183
198
|
mappings.push({
|
|
184
|
-
publishPath:
|
|
185
|
-
installedPath:
|
|
199
|
+
publishPath: file.publishPath,
|
|
200
|
+
installedPath: file.installedPath,
|
|
186
201
|
agentTarget: target,
|
|
202
|
+
skill: file.skill,
|
|
203
|
+
skillVersion: file.skillVersion,
|
|
187
204
|
});
|
|
188
205
|
}
|
|
189
206
|
}
|
|
190
207
|
return mappings;
|
|
191
208
|
}
|
|
192
|
-
export function renderAgentKitManifest() {
|
|
193
|
-
const files = renderPublishableSkills();
|
|
209
|
+
export function renderAgentKitManifest(registry = SKILL_REGISTRY) {
|
|
210
|
+
const files = renderPublishableSkills(registry);
|
|
211
|
+
const installedByPublish = new Map(skillFileMappings(registry).map((mapping) => [mapping.publishPath, mapping.installedPath]));
|
|
194
212
|
return {
|
|
213
|
+
schemaVersion: 2,
|
|
195
214
|
packageVersion: AGENT_KIT_VERSION,
|
|
196
215
|
files: files.map((file) => ({
|
|
197
216
|
path: file.path,
|
|
217
|
+
installedPath: installedByPublish.get(file.path) ?? failMissingMapping(file.path),
|
|
198
218
|
sha256: contentSha256(file.content),
|
|
199
219
|
agentTarget: file.agentTarget,
|
|
220
|
+
skill: file.skill,
|
|
221
|
+
skillVersion: file.skillVersion,
|
|
200
222
|
})),
|
|
201
223
|
};
|
|
202
224
|
}
|
|
225
|
+
function failMissingMapping(path) {
|
|
226
|
+
throw new Error(`missing installed mapping for publishable skill: ${path}`);
|
|
227
|
+
}
|
|
203
228
|
function projectLines(project) {
|
|
204
229
|
if (project === undefined)
|
|
205
230
|
return ['- No project defaults resolved yet.'];
|
|
@@ -216,20 +241,6 @@ function projectLines(project) {
|
|
|
216
241
|
.map(([label, value]) => `- ${label}: ${value}`);
|
|
217
242
|
return lines.length > 0 ? lines : ['- No project defaults resolved yet.'];
|
|
218
243
|
}
|
|
219
|
-
function stampSkill(body) {
|
|
220
|
-
const hash = contentHash(body);
|
|
221
|
-
return [
|
|
222
|
-
'---',
|
|
223
|
-
'name: noodle-seed',
|
|
224
|
-
`description: ${SKILL_DESCRIPTION}`,
|
|
225
|
-
'---',
|
|
226
|
-
'',
|
|
227
|
-
`<!-- noodle-skill version:${AGENT_KIT_VERSION} hash:${hash} -->`,
|
|
228
|
-
'',
|
|
229
|
-
body,
|
|
230
|
-
'',
|
|
231
|
-
].join('\n');
|
|
232
|
-
}
|
|
233
244
|
function managedBlockRanges(content) {
|
|
234
245
|
const ranges = [];
|
|
235
246
|
let offset = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEvE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAEL,mBAAmB,EACnB,0BAA0B,GAE3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEvE,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AAEpC,MAAM,CAAC,MAAM,iBAAiB,GAAW,GAAG,CAAC,OAAO,CAAC;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,qCAAqC,CAAC;AACnE,MAAM,CAAC,MAAM,WAAW,GAAG,mCAAmC,CAAC;AA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SAAS,GAAG,CAAC;YAAE,MAAM;QACzB,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;QAC5D,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAa;IAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACjC,MAAM,IAAI,GAAG,KAAK;SACf,KAAK,CAAC,CAAC,CAAC;SACR,IAAI,CAAC,IAAI,CAAC;SACV,OAAO,CAAC,0CAA0C,EAAE,EAAE,CAAC,CAAC;IAC3D,OAAO,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type AgentTarget = 'codex' | 'claude-code';
|
|
2
|
+
export declare const INSTALLED_SKILL_ROOT_BY_TARGET: Readonly<Record<AgentTarget, string>>;
|
|
3
|
+
export interface SkillDefinitionFile {
|
|
4
|
+
readonly relPath: string;
|
|
5
|
+
readonly render: (host: AgentTarget) => string;
|
|
6
|
+
}
|
|
7
|
+
export interface SkillDefinition {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
readonly version: string;
|
|
11
|
+
readonly supportedHosts: readonly AgentTarget[];
|
|
12
|
+
readonly renderBody: (host: AgentTarget) => string;
|
|
13
|
+
readonly files: readonly SkillDefinitionFile[];
|
|
14
|
+
/** Preserve the historical `skills/<host>/*` public package path for the front-door skill. */
|
|
15
|
+
readonly publishAtTargetRoot?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface SkillRegistry {
|
|
18
|
+
readonly definitions: readonly SkillDefinition[];
|
|
19
|
+
}
|
|
20
|
+
export interface RegisteredSkillFile {
|
|
21
|
+
readonly skill: string;
|
|
22
|
+
readonly skillVersion: string;
|
|
23
|
+
readonly agentTarget: AgentTarget;
|
|
24
|
+
readonly relPath: string;
|
|
25
|
+
readonly content: string;
|
|
26
|
+
readonly publishPath: string;
|
|
27
|
+
readonly installedPath: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function defineSkillRegistry(definitions: readonly SkillDefinition[]): SkillRegistry;
|
|
30
|
+
export declare function renderRegisteredSkillFiles(registry: SkillRegistry, host: AgentTarget): readonly RegisteredSkillFile[];
|
|
31
|
+
//# sourceMappingURL=skill-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-registry.d.ts","sourceRoot":"","sources":["../src/skill-registry.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,aAAa,CAAC;AAOlD,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAGhF,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC;CAChD;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,SAAS,WAAW,EAAE,CAAC;IAChD,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC/C,8FAA8F;IAC9F,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,GAAG,aAAa,CAkD1F;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,WAAW,GAChB,SAAS,mBAAmB,EAAE,CAwChC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
const SKILL_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
3
|
+
const VERSION_PATTERN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
4
|
+
const RELATIVE_PATH_PATTERN = /^(?!\/)(?!.*(?:^|\/)\.\.(?:\/|$))[^\0]+$/;
|
|
5
|
+
const HOSTS = ['codex', 'claude-code'];
|
|
6
|
+
export const INSTALLED_SKILL_ROOT_BY_TARGET = {
|
|
7
|
+
codex: '.agents/skills',
|
|
8
|
+
'claude-code': '.claude/skills',
|
|
9
|
+
};
|
|
10
|
+
export function defineSkillRegistry(definitions) {
|
|
11
|
+
const names = new Set();
|
|
12
|
+
let targetRootCount = 0;
|
|
13
|
+
const validated = definitions.map((definition) => {
|
|
14
|
+
if (!SKILL_NAME_PATTERN.test(definition.name) || definition.name.length > 100) {
|
|
15
|
+
throw new Error(`invalid skill name: ${definition.name}`);
|
|
16
|
+
}
|
|
17
|
+
if (names.has(definition.name))
|
|
18
|
+
throw new Error(`duplicate skill name: ${definition.name}`);
|
|
19
|
+
names.add(definition.name);
|
|
20
|
+
if (definition.description.trim().length === 0 ||
|
|
21
|
+
definition.description.length > 300 ||
|
|
22
|
+
definition.description.includes('\n')) {
|
|
23
|
+
throw new Error(`invalid skill description: ${definition.name}`);
|
|
24
|
+
}
|
|
25
|
+
if (!VERSION_PATTERN.test(definition.version)) {
|
|
26
|
+
throw new Error(`invalid skill version: ${definition.name}`);
|
|
27
|
+
}
|
|
28
|
+
if (definition.supportedHosts.length === 0) {
|
|
29
|
+
throw new Error(`skill requires a supported host: ${definition.name}`);
|
|
30
|
+
}
|
|
31
|
+
const supportedHosts = [...new Set(definition.supportedHosts)];
|
|
32
|
+
if (supportedHosts.length !== definition.supportedHosts.length ||
|
|
33
|
+
supportedHosts.some((host) => !HOSTS.includes(host))) {
|
|
34
|
+
throw new Error(`invalid supported host set: ${definition.name}`);
|
|
35
|
+
}
|
|
36
|
+
if (definition.publishAtTargetRoot === true)
|
|
37
|
+
targetRootCount += 1;
|
|
38
|
+
const paths = new Set();
|
|
39
|
+
const files = definition.files.map((file) => {
|
|
40
|
+
if (!RELATIVE_PATH_PATTERN.test(file.relPath) ||
|
|
41
|
+
file.relPath === 'SKILL.md' ||
|
|
42
|
+
file.relPath.endsWith('/') ||
|
|
43
|
+
file.relPath.length > 300) {
|
|
44
|
+
throw new Error(`invalid skill file path: ${definition.name}/${file.relPath}`);
|
|
45
|
+
}
|
|
46
|
+
if (paths.has(file.relPath)) {
|
|
47
|
+
throw new Error(`duplicate skill file: ${definition.name}/${file.relPath}`);
|
|
48
|
+
}
|
|
49
|
+
paths.add(file.relPath);
|
|
50
|
+
return Object.freeze({ ...file });
|
|
51
|
+
});
|
|
52
|
+
return Object.freeze({ ...definition, supportedHosts, files });
|
|
53
|
+
});
|
|
54
|
+
if (targetRootCount > 1)
|
|
55
|
+
throw new Error('only one skill may publish at the target root');
|
|
56
|
+
return Object.freeze({ definitions: Object.freeze(validated) });
|
|
57
|
+
}
|
|
58
|
+
export function renderRegisteredSkillFiles(registry, host) {
|
|
59
|
+
if (!HOSTS.includes(host))
|
|
60
|
+
throw new Error(`unsupported agent target: ${host}`);
|
|
61
|
+
const files = [];
|
|
62
|
+
const publishPaths = new Set();
|
|
63
|
+
const installedPaths = new Set();
|
|
64
|
+
for (const definition of registry.definitions) {
|
|
65
|
+
if (!definition.supportedHosts.includes(host))
|
|
66
|
+
continue;
|
|
67
|
+
const body = definition.renderBody(host);
|
|
68
|
+
if (body.trim().length === 0)
|
|
69
|
+
throw new Error(`empty skill body: ${definition.name}`);
|
|
70
|
+
const rendered = [
|
|
71
|
+
{ relPath: 'SKILL.md', content: stampSkill(definition, body) },
|
|
72
|
+
...definition.files.map((file) => ({ relPath: file.relPath, content: file.render(host) })),
|
|
73
|
+
];
|
|
74
|
+
const publishBase = definition.publishAtTargetRoot
|
|
75
|
+
? `skills/${host}`
|
|
76
|
+
: `skills/${host}/${definition.name}`;
|
|
77
|
+
const installedBase = `${INSTALLED_SKILL_ROOT_BY_TARGET[host]}/${definition.name}`;
|
|
78
|
+
for (const file of rendered) {
|
|
79
|
+
if (file.content.trim().length === 0) {
|
|
80
|
+
throw new Error(`empty skill file: ${definition.name}/${file.relPath}`);
|
|
81
|
+
}
|
|
82
|
+
const publishPath = `${publishBase}/${file.relPath}`;
|
|
83
|
+
const installedPath = `${installedBase}/${file.relPath}`;
|
|
84
|
+
if (publishPaths.has(publishPath) || installedPaths.has(installedPath)) {
|
|
85
|
+
throw new Error(`duplicate rendered skill path: ${definition.name}/${file.relPath}`);
|
|
86
|
+
}
|
|
87
|
+
publishPaths.add(publishPath);
|
|
88
|
+
installedPaths.add(installedPath);
|
|
89
|
+
files.push({
|
|
90
|
+
skill: definition.name,
|
|
91
|
+
skillVersion: definition.version,
|
|
92
|
+
agentTarget: host,
|
|
93
|
+
relPath: file.relPath,
|
|
94
|
+
content: file.content,
|
|
95
|
+
publishPath,
|
|
96
|
+
installedPath,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return files;
|
|
101
|
+
}
|
|
102
|
+
function stampSkill(definition, body) {
|
|
103
|
+
const hash = createHash('sha256').update(body).digest('hex').slice(0, 16);
|
|
104
|
+
return [
|
|
105
|
+
'---',
|
|
106
|
+
`name: ${definition.name}`,
|
|
107
|
+
`description: ${JSON.stringify(definition.description)}`,
|
|
108
|
+
'---',
|
|
109
|
+
'',
|
|
110
|
+
`<!-- noodle-skill version:${definition.version} hash:${hash} -->`,
|
|
111
|
+
'',
|
|
112
|
+
body,
|
|
113
|
+
'',
|
|
114
|
+
].join('\n');
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=skill-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-registry.js","sourceRoot":"","sources":["../src/skill-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC,MAAM,kBAAkB,GAAG,4BAA4B,CAAC;AACxD,MAAM,eAAe,GAAG,4CAA4C,CAAC;AACrE,MAAM,qBAAqB,GAAG,0CAA0C,CAAC;AACzE,MAAM,KAAK,GAA2B,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,8BAA8B,GAA0C;IACnF,KAAK,EAAE,gBAAgB;IACvB,aAAa,EAAE,gBAAgB;CAChC,CAAC;AAgCF,MAAM,UAAU,mBAAmB,CAAC,WAAuC;IACzE,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,IAAI,eAAe,G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AAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO;QACL,KAAK;QACL,SAAS,UAAU,CAAC,IAAI,EAAE;QAC1B,gBAAgB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;QACxD,KAAK;QACL,EAAE;QACF,6BAA6B,UAAU,CAAC,OAAO,SAAS,IAAI,MAAM;QAClE,EAAE;QACF,IAAI;QACJ,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { type BehaviorSkillName } from './behavior-skills.js';
|
|
1
2
|
import type { AgentTarget } from './index.js';
|
|
2
3
|
export declare const SKILL_DESCRIPTION: string;
|
|
3
4
|
export type SkillReferencePath = `references/${string}.md`;
|
|
4
5
|
export declare const APP_DIRECTORY_COMPLIANCE_REFERENCE: SkillReferencePath;
|
|
5
|
-
export type SkillRouteId = 'build-server' | 'connect-api' | 'build-app' | 'verify-recover' | 'inspect-hosted' | 'deploy-hosted' | 'embed-assistant' | 'publish' | 'feedback';
|
|
6
|
+
export type SkillRouteId = 'design-product' | 'build-server' | 'connect-api' | 'build-app' | 'verify-recover' | 'debug-recover' | 'inspect-hosted' | 'deploy-hosted' | 'embed-assistant' | 'publish' | 'feedback';
|
|
6
7
|
export interface SkillRoute {
|
|
7
8
|
readonly id: SkillRouteId;
|
|
8
9
|
readonly intent: string;
|
|
9
|
-
readonly
|
|
10
|
-
readonly supportingReferences: readonly SkillReferencePath[];
|
|
10
|
+
readonly skill: BehaviorSkillName;
|
|
11
11
|
readonly exitCondition: string;
|
|
12
12
|
}
|
|
13
13
|
export declare const SKILL_ROUTES: readonly SkillRoute[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-router.d.ts","sourceRoot":"","sources":["../src/skill-router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skill-router.d.ts","sourceRoot":"","sources":["../src/skill-router.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,eAAO,MAAM,iBAAiB,QAEmC,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG,cAAc,MAAM,KAAK,CAAC;AAE3D,eAAO,MAAM,kCAAkC,EAAE,kBACP,CAAC;AAE3C,MAAM,MAAM,YAAY,GACpB,gBAAgB,GAChB,cAAc,GACd,aAAa,GACb,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAiF7C,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAqBlD,CAAC;AAkBF,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAwD5D"}
|
|
@@ -1,68 +1,75 @@
|
|
|
1
|
+
// Intent router for the project-local `noodle-seed` skill. Keep this file small: it selects one
|
|
2
|
+
// outcome workflow and bounds progressive disclosure. Detailed MCP guidance belongs in the
|
|
3
|
+
// one-level reference tree rendered by skill-content.ts.
|
|
4
|
+
import { BEHAVIOR_SKILLS } from './behavior-skills.js';
|
|
1
5
|
export const SKILL_DESCRIPTION = 'Use when building, validating, testing, deploying, or operating a local or hosted Noodle Seed ' +
|
|
2
6
|
'MCP server or app authored in TypeScript with the noodle CLI.';
|
|
3
7
|
export const APP_DIRECTORY_COMPLIANCE_REFERENCE = 'references/app-directory-compliance.md';
|
|
4
8
|
export const SKILL_ROUTES = [
|
|
9
|
+
{
|
|
10
|
+
id: 'design-product',
|
|
11
|
+
intent: 'Turn a vague MCP product idea into a bounded design before implementation',
|
|
12
|
+
skill: 'designing-mcp-products',
|
|
13
|
+
exitCondition: 'The product contract identifies the user benefit, model boundary, evidence, and next implementation skill.',
|
|
14
|
+
},
|
|
5
15
|
{
|
|
6
16
|
id: 'build-server',
|
|
7
17
|
intent: 'Create or extend a headless MCP server whose external API contract is already modeled',
|
|
8
|
-
|
|
9
|
-
supportingReferences: ['references/authoring-workflow.md', 'references/sdk-surface.md'],
|
|
18
|
+
skill: 'authoring-mcp-servers',
|
|
10
19
|
exitCondition: 'The requested server behavior is locally validated and tested; connector reads have real-output evidence.',
|
|
11
20
|
},
|
|
12
21
|
{
|
|
13
22
|
id: 'connect-api',
|
|
14
23
|
intent: 'Connect a real API when credentials or an API specification are available',
|
|
15
|
-
|
|
16
|
-
supportingReferences: ['references/authoring-workflow.md'],
|
|
24
|
+
skill: 'connecting-apis-to-mcp',
|
|
17
25
|
exitCondition: 'A representative live read returns populated, intentionally mapped fields without exposing credentials.',
|
|
18
26
|
},
|
|
19
27
|
{
|
|
20
28
|
id: 'build-app',
|
|
21
29
|
intent: 'Build or change an MCP App, widget, or host-visible UI',
|
|
22
|
-
|
|
23
|
-
supportingReferences: ['references/experience-design.md', 'references/widgets-and-apps.md'],
|
|
30
|
+
skill: 'building-mcp-apps',
|
|
24
31
|
exitCondition: 'The UI has a stated user benefit, passes the requested checks, and degrades to useful text.',
|
|
25
32
|
},
|
|
26
33
|
{
|
|
27
34
|
id: 'verify-recover',
|
|
28
|
-
intent: 'Validate, test,
|
|
29
|
-
|
|
30
|
-
supportingReferences: ['references/agent-contract.md', 'references/compile-errors.md'],
|
|
35
|
+
intent: 'Validate, test, or prove a project at a named delivery evidence level',
|
|
36
|
+
skill: 'verifying-mcp-delivery',
|
|
31
37
|
exitCondition: 'The failing evidence layer is repaired and rerun, or the remaining blocker and exact next action are reported.',
|
|
32
38
|
},
|
|
39
|
+
{
|
|
40
|
+
id: 'debug-recover',
|
|
41
|
+
intent: 'Diagnose or recover an existing project with concrete local or hosted failure evidence',
|
|
42
|
+
skill: 'debugging-mcp-delivery',
|
|
43
|
+
exitCondition: 'The failing layer is repaired and rerun, or the stable blocker and exact next action are reported.',
|
|
44
|
+
},
|
|
33
45
|
{
|
|
34
46
|
id: 'inspect-hosted',
|
|
35
47
|
intent: 'Inspect or diagnose hosted status, logs, metrics, events, or deployment metadata read-only',
|
|
36
|
-
|
|
37
|
-
supportingReferences: [],
|
|
48
|
+
skill: 'debugging-mcp-delivery',
|
|
38
49
|
exitCondition: 'The requested hosted evidence is reported without changing target, configuration, access, or deployment state.',
|
|
39
50
|
},
|
|
40
51
|
{
|
|
41
52
|
id: 'deploy-hosted',
|
|
42
53
|
intent: 'Deploy, configure, connect with writes, change access, or roll back a hosted MCP service when explicitly requested',
|
|
43
|
-
|
|
44
|
-
supportingReferences: ['references/cli-commands.md'],
|
|
54
|
+
skill: 'deploying-mcp-services',
|
|
45
55
|
exitCondition: 'The requested hosted state is evidenced without claiming unperformed host or production checks.',
|
|
46
56
|
},
|
|
47
57
|
{
|
|
48
58
|
id: 'embed-assistant',
|
|
49
59
|
intent: 'Embed a Noodle assistant in an existing SaaS or web application',
|
|
50
|
-
|
|
51
|
-
supportingReferences: ['references/authoring-workflow.md'],
|
|
60
|
+
skill: 'embedding-mcp-assistants',
|
|
52
61
|
exitCondition: 'The requested embed boundary works with verified identity and credential separation at the tested level.',
|
|
53
62
|
},
|
|
54
63
|
{
|
|
55
64
|
id: 'publish',
|
|
56
65
|
intent: 'Prepare or submit an integration to a host directory',
|
|
57
|
-
|
|
58
|
-
supportingReferences: [APP_DIRECTORY_COMPLIANCE_REFERENCE],
|
|
66
|
+
skill: 'publishing-mcp-integrations',
|
|
59
67
|
exitCondition: 'The requested submission evidence is complete and any host-review uncertainty is explicit.',
|
|
60
68
|
},
|
|
61
69
|
{
|
|
62
70
|
id: 'feedback',
|
|
63
71
|
intent: 'Report a Noodle Seed bug, documentation gap, or product improvement',
|
|
64
|
-
|
|
65
|
-
supportingReferences: [],
|
|
72
|
+
skill: 'reporting-noodle-feedback',
|
|
66
73
|
exitCondition: 'A sanitized command is shown to the user and is submitted only after explicit approval.',
|
|
67
74
|
},
|
|
68
75
|
];
|
|
@@ -91,13 +98,16 @@ export const REFERENCE_INDEX_LINES = [
|
|
|
91
98
|
];
|
|
92
99
|
function routeTableLines() {
|
|
93
100
|
return [
|
|
94
|
-
'| User outcome |
|
|
101
|
+
'| User outcome | Load sibling skill | Canonical playbook | Done when |',
|
|
95
102
|
'| :--- | :--- | :--- | :--- |',
|
|
96
103
|
...SKILL_ROUTES.map((route) => {
|
|
97
|
-
const
|
|
98
|
-
|
|
104
|
+
const skill = BEHAVIOR_SKILLS.find((candidate) => candidate.name === route.skill);
|
|
105
|
+
if (skill === undefined)
|
|
106
|
+
throw new Error(`missing behavior skill for route ${route.id}`);
|
|
107
|
+
const supporting = skill.supportingReferences.length > 0
|
|
108
|
+
? skill.supportingReferences.map((reference) => `\`${reference}\``).join(', ')
|
|
99
109
|
: 'None';
|
|
100
|
-
return `| ${route.intent} | \`${route.
|
|
110
|
+
return `| ${route.intent} | \`${route.skill}\` | \`${skill.primaryReference}\` (${supporting}) | ${route.exitCondition} |`;
|
|
101
111
|
}),
|
|
102
112
|
];
|
|
103
113
|
}
|
|
@@ -116,9 +126,9 @@ export function skillRouterBody(_target) {
|
|
|
116
126
|
'',
|
|
117
127
|
'## Route the request',
|
|
118
128
|
'',
|
|
119
|
-
'Choose exactly one primary route from the user outcome below. Read that primary reference in full
|
|
129
|
+
'Choose exactly one primary route from the user outcome below, then load the selected sibling skill and hand off the request. Read that primary reference in full; read supporting references only when the sibling or observed evidence requires them. Do not reread the corpus or restart discovery after the handoff.',
|
|
120
130
|
'',
|
|
121
|
-
'Apply this precedence when wording overlaps:
|
|
131
|
+
'Apply this precedence when wording overlaps: concrete failure evidence takes the debugging route; an MCP App/UI outcome takes the App route; external API integration from credentials, a URL, or an API specification takes precedence over generic server building; hosted inspection is debugging read-only; hosted mutation requires the explicitly requested deployment route.',
|
|
122
132
|
'',
|
|
123
133
|
'Negative routing examples: “Inspect hosted logs/status” → `inspect-hosted` (read-only). “Prepare for deployment” → the applicable build or verification route and stop with a handoff; preparation does not authorize `link`, hosted config, deployment, rollback, host writes, or submission. “Keep this local” → a build or verification route, never a hosted route.',
|
|
124
134
|
'',
|