@senior-skills/adapter-claude 1.0.0

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.
@@ -0,0 +1,39 @@
1
+ import { type AgentAdapter, type AgentDetection, type AgentLayout, type AgentLocation, type DetectionContext, type InstallScope, type LocationContext, type PackageKind, type SkillPackage, type ValidationIssue } from '@senior-skills/core';
2
+ export declare const CLAUDE_CODE_AGENT_ID = "claude-code";
3
+ /**
4
+ * Claude Code.
5
+ *
6
+ * Layout:
7
+ * global $CLAUDE_CONFIG_DIR/skills/<name>/ (default ~/.claude/skills/<name>/)
8
+ * project <project>/.claude/skills/<name>/
9
+ * global $CLAUDE_CONFIG_DIR/commands/<name>.md
10
+ * project <project>/.claude/commands/<name>.md
11
+ *
12
+ * Claude Code reads `SKILL.md` frontmatter and ignores unknown keys, so the projection is
13
+ * close to a pass-through. The adapter's real job is deciding *which* frontmatter keys to
14
+ * forward — distribution metadata stays in `skill.yaml`, where the agent never looks.
15
+ *
16
+ * `node:path` is used for OS path algebra, which is pure computation. All I/O goes through
17
+ * the ports in {@link DetectionContext}.
18
+ */
19
+ export declare class ClaudeCodeAdapter implements AgentAdapter {
20
+ readonly id = "claude-code";
21
+ readonly displayName = "Claude Code";
22
+ readonly aliases: string[];
23
+ /**
24
+ * Claude has no vendor metadata file, so it accepts no overrides. Declaring an empty list
25
+ * rather than omitting the concept makes `agentOverrides.claude-code` a validation error
26
+ * instead of a silently ignored key.
27
+ */
28
+ readonly overrideKeys: readonly string[];
29
+ detect(ctx: DetectionContext): Promise<AgentDetection>;
30
+ locationFor(kind: PackageKind, scope: InstallScope, ctx: LocationContext): AgentLocation;
31
+ layoutFor(pkg: SkillPackage): AgentLayout;
32
+ validate(pkg: SkillPackage): readonly ValidationIssue[];
33
+ /**
34
+ * Rules Claude Code enforces when it compiles a workflow. Reporting them here turns a
35
+ * failure the author would only see at run time into one `publish` refuses to ship.
36
+ */
37
+ private workflowIssues;
38
+ }
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAyClD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,iBAAkB,YAAW,YAAY;IACpD,QAAQ,CAAC,EAAE,iBAAwB;IACnC,QAAQ,CAAC,WAAW,iBAAiB;IACrC,QAAQ,CAAC,OAAO,WAA6B;IAE7C;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAM;IAExC,MAAM,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC;IAyB5D,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,eAAe,GAAG,aAAa;IAqBxF,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,WAAW;IA0CzC,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,eAAe,EAAE;IAkDvD;;;OAGG;IACH,OAAO,CAAC,cAAc;CA6CvB"}
package/dist/index.js ADDED
@@ -0,0 +1,189 @@
1
+ import { IssueCollector, MANIFEST_FILENAME, detectionFrom, readTextFile, encodeText, entrypointFor, stringifySkillDocument, } from '@senior-skills/core';
2
+ import { join } from 'node:path';
3
+ export const CLAUDE_CODE_AGENT_ID = 'claude-code';
4
+ /** Claude Code reads this itself; honouring it is how a relocated config keeps working. */
5
+ const CONFIG_DIR_ENV = 'CLAUDE_CONFIG_DIR';
6
+ const DEFAULT_CONFIG_DIRNAME = '.claude';
7
+ const SKILLS_DIRNAME = 'skills';
8
+ const COMMANDS_DIRNAME = 'commands';
9
+ const WORKFLOWS_DIRNAME = 'workflows';
10
+ /**
11
+ * Claude Code compiles a workflow script and refuses these outright: they break run resume,
12
+ * which is the whole point of the deterministic script model. Catching them at validate time
13
+ * turns a runtime compile failure into a publish-time error.
14
+ */
15
+ const NONDETERMINISTIC = /\b(?:Date\.now\s*\(|Math\.random\s*\(|new\s+Date\s*\()/;
16
+ // eslint-disable-next-line no-control-regex
17
+ const DISALLOWED_CONTROL = /[\u0000-\u0008\u000b\u000c\u000e-\u001f]/;
18
+ /**
19
+ * Frontmatter keys Claude Code reads on a slash command. `name` is not among them: the file
20
+ * name is the command name, which is why a command installs as `<name>.md` rather than as a
21
+ * directory.
22
+ */
23
+ const COMMAND_KEYS = ['argument-hint', 'allowed-tools', 'model', 'disable-model-invocation'];
24
+ /** Behavioural keys a skill author set are Claude's own, and are preserved verbatim. */
25
+ const SKILL_KEYS = ['allowed-tools', 'user-invocable', 'disable-model-invocation'];
26
+ const SHAPES = {
27
+ skill: { shape: 'directory', extension: '' },
28
+ command: { shape: 'file', extension: '.md' },
29
+ workflow: { shape: 'file', extension: '.js' },
30
+ };
31
+ const DIRNAMES = {
32
+ skill: SKILLS_DIRNAME,
33
+ command: COMMANDS_DIRNAME,
34
+ workflow: WORKFLOWS_DIRNAME,
35
+ };
36
+ /**
37
+ * Claude Code.
38
+ *
39
+ * Layout:
40
+ * global $CLAUDE_CONFIG_DIR/skills/<name>/ (default ~/.claude/skills/<name>/)
41
+ * project <project>/.claude/skills/<name>/
42
+ * global $CLAUDE_CONFIG_DIR/commands/<name>.md
43
+ * project <project>/.claude/commands/<name>.md
44
+ *
45
+ * Claude Code reads `SKILL.md` frontmatter and ignores unknown keys, so the projection is
46
+ * close to a pass-through. The adapter's real job is deciding *which* frontmatter keys to
47
+ * forward — distribution metadata stays in `skill.yaml`, where the agent never looks.
48
+ *
49
+ * `node:path` is used for OS path algebra, which is pure computation. All I/O goes through
50
+ * the ports in {@link DetectionContext}.
51
+ */
52
+ export class ClaudeCodeAdapter {
53
+ id = CLAUDE_CODE_AGENT_ID;
54
+ displayName = 'Claude Code';
55
+ aliases = ['claude', 'claude-code'];
56
+ /**
57
+ * Claude has no vendor metadata file, so it accepts no overrides. Declaring an empty list
58
+ * rather than omitting the concept makes `agentOverrides.claude-code` a validation error
59
+ * instead of a silently ignored key.
60
+ */
61
+ overrideKeys = [];
62
+ async detect(ctx) {
63
+ const environment = ctx.env.env();
64
+ const evidence = [];
65
+ const configDir = environment[CONFIG_DIR_ENV] ?? join(ctx.env.homeDir(), DEFAULT_CONFIG_DIRNAME);
66
+ if (await ctx.fs.exists(configDir)) {
67
+ evidence.push({ strength: 'strong', kind: 'config-dir', detail: configDir });
68
+ }
69
+ const executable = await ctx.commands.which('claude');
70
+ if (executable !== undefined) {
71
+ evidence.push({ strength: 'strong', kind: 'executable', detail: executable });
72
+ }
73
+ // A `.claude/` directory in a repository is weak evidence: it may have been committed by
74
+ // a colleague who uses Claude Code even though this machine does not have it.
75
+ const projectDir = join(ctx.env.cwd(), DEFAULT_CONFIG_DIRNAME);
76
+ if (await ctx.fs.exists(projectDir)) {
77
+ evidence.push({ strength: 'weak', kind: 'project-dir', detail: projectDir });
78
+ }
79
+ return detectionFrom(this.id, evidence);
80
+ }
81
+ locationFor(kind, scope, ctx) {
82
+ // A skill is a directory Claude Code loads on demand. A command and a workflow are each a
83
+ // single file whose name is how they are invoked, so neither can sit in a directory of
84
+ // its own.
85
+ const shape = SHAPES[kind];
86
+ if (ctx.overrideRoot !== undefined)
87
+ return { root: ctx.overrideRoot, ...shape };
88
+ const dirname = DIRNAMES[kind];
89
+ if (scope === 'project') {
90
+ if (ctx.projectRoot === undefined) {
91
+ throw new Error('Claude Code project scope requires a project root');
92
+ }
93
+ return { root: join(ctx.projectRoot, DEFAULT_CONFIG_DIRNAME, dirname), ...shape };
94
+ }
95
+ const configDir = ctx.env[CONFIG_DIR_ENV] ?? join(ctx.homeDir, DEFAULT_CONFIG_DIRNAME);
96
+ return { root: join(configDir, dirname), ...shape };
97
+ }
98
+ layoutFor(pkg) {
99
+ const { manifest, document } = pkg;
100
+ const entrypoint = entrypointFor(manifest.kind);
101
+ // A workflow ships as source Claude Code compiles: `meta` must stay the first statement
102
+ // and the bytes must stay the bytes, so this is a copy, not a projection.
103
+ if (manifest.kind === 'workflow') {
104
+ return {
105
+ entries: [{ path: entrypoint, copyFrom: entrypoint }],
106
+ frontmatter: document.frontmatter,
107
+ };
108
+ }
109
+ const frontmatter = { description: manifest.description };
110
+ if (manifest.kind === 'skill') {
111
+ frontmatter['name'] = manifest.name;
112
+ if (manifest.license !== undefined)
113
+ frontmatter['license'] = manifest.license;
114
+ }
115
+ for (const key of manifest.kind === 'command' ? COMMAND_KEYS : SKILL_KEYS) {
116
+ if (document.frontmatter[key] !== undefined)
117
+ frontmatter[key] = document.frontmatter[key];
118
+ }
119
+ const entries = [
120
+ {
121
+ path: entrypoint,
122
+ content: encodeText(stringifySkillDocument({ frontmatter, body: document.body })),
123
+ },
124
+ ];
125
+ // A command is a single file: the rest of the package has nowhere to go, which
126
+ // `validate` warns about before an install can drop it silently.
127
+ if (SHAPES[manifest.kind].shape === 'directory') {
128
+ for (const file of pkg.files) {
129
+ if (file.path === entrypoint)
130
+ continue;
131
+ entries.push({ path: file.path, copyFrom: file.path });
132
+ }
133
+ }
134
+ return { entries, frontmatter };
135
+ }
136
+ validate(pkg) {
137
+ const issues = new IssueCollector();
138
+ const entrypoint = entrypointFor(pkg.manifest.kind);
139
+ if (pkg.manifest.kind === 'workflow') {
140
+ issues.absorb(this.workflowIssues(pkg, entrypoint));
141
+ }
142
+ if (SHAPES[pkg.manifest.kind].shape === 'file') {
143
+ const extra = pkg.files.filter((file) => file.path !== entrypoint && file.path !== MANIFEST_FILENAME);
144
+ if (extra.length > 0) {
145
+ issues.warn('claude.command.extraFiles', entrypoint, `A Claude Code ${pkg.manifest.kind} installs as a single ${entrypoint} file; ${extra.length} other file(s) will not be installed`, `Move the material into the ${entrypoint} body, or publish it as a skill instead`);
146
+ }
147
+ }
148
+ // Claude Code shows the description during skill selection; an overlong one is truncated
149
+ // there, which quietly degrades routing rather than failing loudly.
150
+ if (pkg.manifest.kind === 'skill' && pkg.manifest.description.length > 1024) {
151
+ issues.warn('claude.description.long', 'description', `Description is ${pkg.manifest.description.length} characters; Claude Code shows roughly the first 1024`, 'Move the detail into the SKILL.md body');
152
+ }
153
+ const allowedTools = pkg.manifest.kind === 'workflow' ? undefined : pkg.document.frontmatter['allowed-tools'];
154
+ if (allowedTools !== undefined &&
155
+ !Array.isArray(allowedTools) &&
156
+ typeof allowedTools !== 'string') {
157
+ issues.error('claude.allowedTools.type', `${entrypoint}.allowed-tools`, '"allowed-tools" must be a string or a list of strings');
158
+ }
159
+ return issues.all();
160
+ }
161
+ /**
162
+ * Rules Claude Code enforces when it compiles a workflow. Reporting them here turns a
163
+ * failure the author would only see at run time into one `publish` refuses to ship.
164
+ */
165
+ workflowIssues(pkg, entrypoint) {
166
+ const issues = new IssueCollector();
167
+ const script = readTextFile(pkg, entrypoint) ?? '';
168
+ const nondeterministic = NONDETERMINISTIC.exec(pkg.document.body);
169
+ if (nondeterministic !== null) {
170
+ issues.error('claude.workflow.nondeterministic', entrypoint, `Workflow scripts must be deterministic; "${nondeterministic[0].trim()}" is unavailable`, 'Claude Code needs determinism to resume a run — stamp results after the run instead');
171
+ }
172
+ if (DISALLOWED_CONTROL.test(script)) {
173
+ issues.error('claude.workflow.controlCharacters', entrypoint, 'The script contains control characters Claude Code refuses to compile');
174
+ }
175
+ const phases = pkg.document.frontmatter['phases'];
176
+ if (phases !== undefined) {
177
+ const shaped = Array.isArray(phases) &&
178
+ phases.every((phase) => phase !== null &&
179
+ typeof phase === 'object' &&
180
+ !Array.isArray(phase) &&
181
+ typeof phase['title'] === 'string');
182
+ if (!shaped) {
183
+ issues.error('claude.workflow.phases', `${entrypoint}.meta.phases`, 'meta.phases must be a list of { title, detail? } entries', 'Use the same titles here as in the phase() calls; they are matched exactly');
184
+ }
185
+ }
186
+ return issues.all();
187
+ }
188
+ }
189
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,aAAa,EACb,sBAAsB,GAavB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC;AAElD,2FAA2F;AAC3F,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,sBAAsB,GAAG,SAAS,CAAC;AACzC,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChC,MAAM,gBAAgB,GAAG,UAAU,CAAC;AACpC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,wDAAwD,CAAC;AAElF,4CAA4C;AAC5C,MAAM,kBAAkB,GAAG,0CAA0C,CAAC;AAEtE;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;AAE7F,wFAAwF;AACxF,MAAM,UAAU,GAAG,CAAC,eAAe,EAAE,gBAAgB,EAAE,0BAA0B,CAAC,CAAC;AAEnF,MAAM,MAAM,GAA8E;IACxF,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,EAAE;IAC5C,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;IAC5C,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;CAC9C,CAAC;AAEF,MAAM,QAAQ,GAA0C;IAC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;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,MAAM,GACV,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBACrB,MAAM,CAAC,KAAK,CACV,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,KAAK,IAAI;oBACd,OAAO,KAAK,KAAK,QAAQ;oBACzB,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;oBACrB,OAAQ,KAAiC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAClE,CAAC;YACJ,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,CAAC,KAAK,CACV,wBAAwB,EACxB,GAAG,UAAU,cAAc,EAC3B,0DAA0D,EAC1D,4EAA4E,CAC7E,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC;IACtB,CAAC;CACF"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@senior-skills/adapter-claude",
3
+ "version": "1.0.0",
4
+ "description": "Claude Code agent adapter for senior-skills",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/robsonkades/senior-skills.git",
9
+ "directory": "packages/adapter-claude"
10
+ },
11
+ "type": "module",
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "engines": {
24
+ "node": ">=22.18.0"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "dependencies": {
30
+ "@senior-skills/core": "1.0.0"
31
+ }
32
+ }