@hegemonart/get-design-done 1.28.6 → 1.28.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +81 -0
- package/README.de.md +14 -0
- package/README.fr.md +14 -0
- package/README.it.md +14 -0
- package/README.ja.md +14 -0
- package/README.ko.md +14 -0
- package/README.md +18 -0
- package/README.zh-CN.md +14 -0
- package/SKILL.md +10 -10
- package/package.json +3 -1
- package/scripts/build-distribution-bundles.cjs +549 -0
- package/scripts/install.cjs +68 -0
- package/scripts/lib/install/config-dir.cjs +26 -0
- package/scripts/lib/install/converters/antigravity.cjs +48 -0
- package/scripts/lib/install/converters/augment.cjs +68 -0
- package/scripts/lib/install/converters/cline.cjs +206 -0
- package/scripts/lib/install/converters/codebuddy.cjs +55 -0
- package/scripts/lib/install/converters/codex-plugin.cjs +407 -0
- package/scripts/lib/install/converters/codex.cjs +61 -0
- package/scripts/lib/install/converters/copilot.cjs +47 -0
- package/scripts/lib/install/converters/cursor-marketplace.cjs +309 -0
- package/scripts/lib/install/converters/cursor.cjs +49 -0
- package/scripts/lib/install/converters/gemini.cjs +116 -0
- package/scripts/lib/install/converters/kilo.cjs +62 -0
- package/scripts/lib/install/converters/opencode.cjs +64 -0
- package/scripts/lib/install/converters/qwen.cjs +51 -0
- package/scripts/lib/install/converters/shared.cjs +377 -0
- package/scripts/lib/install/converters/trae.cjs +47 -0
- package/scripts/lib/install/converters/windsurf.cjs +47 -0
- package/scripts/lib/install/doctor-codex-plugin.cjs +388 -0
- package/scripts/lib/install/doctor-cursor-marketplace.cjs +366 -0
- package/scripts/lib/install/doctor-tier2.cjs +586 -0
- package/scripts/lib/install/installer.cjs +529 -47
- package/scripts/lib/install/merge.cjs +31 -1
- package/scripts/lib/install/runtime-artifact-layout.cjs +431 -0
- package/scripts/lib/install/runtime-homes.cjs +225 -0
- package/scripts/lib/install/runtime-slash.cjs +172 -0
- package/scripts/lib/install/runtimes.cjs +73 -32
- package/scripts/lint-agentskills-spec.cjs +457 -0
- package/skills/compare/SKILL.md +2 -2
- package/skills/compare/compare-rubric.md +1 -1
- package/skills/darkmode/SKILL.md +2 -2
- package/skills/darkmode/darkmode-audit-procedure.md +1 -1
- package/skills/figma-write/SKILL.md +2 -2
- package/skills/graphify/SKILL.md +2 -2
- package/skills/style/SKILL.md +2 -2
- package/skills/style/style-doc-procedure.md +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* scripts/lib/install/converters/antigravity.cjs — Phase 28.7 (Plan 28.7-04).
|
|
5
|
+
*
|
|
6
|
+
* Google Antigravity SKILL.md converter. Translates Claude-shape source
|
|
7
|
+
* into Antigravity's expected shape (which nests under `~/.gemini/antigravity/`
|
|
8
|
+
* per the runtime-homes resolver):
|
|
9
|
+
*
|
|
10
|
+
* - Frontmatter `name:` normalized to `gdd-<skill>` (no double-prefix).
|
|
11
|
+
* - Slash references in prose pass through as `/gdd-<name>` —
|
|
12
|
+
* Antigravity accepts the Claude shape. Mixed-shape inputs are
|
|
13
|
+
* normalized via the runtime-slash module.
|
|
14
|
+
* - Tool names in code fences pass through unchanged — Antigravity
|
|
15
|
+
* accepts the Claude vocabulary (Read/Write/Bash/Edit/Grep/Glob).
|
|
16
|
+
* - A 1-line HTML adapter header is injected at the top of the body
|
|
17
|
+
* to record that this file was auto-generated from Claude source.
|
|
18
|
+
*
|
|
19
|
+
* Architecture ported from gsd-build/get-shit-done (MIT) — per Phase
|
|
20
|
+
* 28.7 D-02 (port architecture, not source). See NOTICE for upstream
|
|
21
|
+
* attribution. gsd-build's equivalent function is
|
|
22
|
+
* `convertClaudeCommandToAntigravitySkill` in bin/install.js; our
|
|
23
|
+
* modular factor delegates the actual rewrites to ./shared.cjs.
|
|
24
|
+
*
|
|
25
|
+
* Pure / side-effect-free: no fs, no env, no path. `convert` is a
|
|
26
|
+
* deterministic string → string transform.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
const shared = require('./shared.cjs');
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Convert Claude-source SKILL.md content for the Antigravity runtime.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} content Full source SKILL.md content (frontmatter + body).
|
|
35
|
+
* @param {string} skillName The bare skill name (e.g. `'help'`, `'explore'`).
|
|
36
|
+
* @param {{ runtime?: string }} [opts] Optional context — `runtime` defaults
|
|
37
|
+
* to `'antigravity'`. Currently informational only.
|
|
38
|
+
* @returns {string}
|
|
39
|
+
*/
|
|
40
|
+
function convert(content, skillName, opts) {
|
|
41
|
+
const { frontmatter, body } = shared.extractFrontmatterAndBody(content);
|
|
42
|
+
const fm = shared.buildFrontmatter(frontmatter, skillName, 'gdd-');
|
|
43
|
+
let out = shared.rewriteSlashRefs(body, 'antigravity');
|
|
44
|
+
out = shared.ensureAdapterHeader(out, 'Antigravity');
|
|
45
|
+
return fm + out;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
module.exports = { convert };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* scripts/lib/install/converters/augment.cjs — Phase 28.7 (Plan 28.7-05).
|
|
5
|
+
*
|
|
6
|
+
* Augment Code SKILL.md converter. Translates Claude-shape source into
|
|
7
|
+
* Augment's expected shape:
|
|
8
|
+
*
|
|
9
|
+
* - Frontmatter `name:` normalized to `gdd-<skill>` (no double-prefix).
|
|
10
|
+
* - Slash references in prose pass through as `/gdd-<name>` —
|
|
11
|
+
* Augment accepts the Claude shape for slash references.
|
|
12
|
+
* - Tool names in code fences are rewritten per `AUGMENT_TOOL_MAP`:
|
|
13
|
+
* Bash → launch-process
|
|
14
|
+
* Edit → str-replace-editor
|
|
15
|
+
* Read/Write/Grep/Glob/WebSearch/WebFetch pass through unchanged —
|
|
16
|
+
* Augment recognizes the Claude vocabulary for those tools.
|
|
17
|
+
* - Prose mentions of tool names (e.g. "use the Bash tool") are NOT
|
|
18
|
+
* rewritten — only the parenthesized invocation form inside fenced
|
|
19
|
+
* blocks gets rewritten. This matches the codex converter's policy
|
|
20
|
+
* (Phase 28.7 D-06).
|
|
21
|
+
* - A 1-line HTML adapter header is injected at the top of the body
|
|
22
|
+
* to record that this file was auto-generated from Claude source.
|
|
23
|
+
*
|
|
24
|
+
* Architecture ported from gsd-build/get-shit-done (MIT) — per Phase
|
|
25
|
+
* 28.7 D-02 (port architecture, not source). See NOTICE for upstream
|
|
26
|
+
* attribution. gsd-build's equivalent function is
|
|
27
|
+
* `convertClaudeCommandToAugmentSkill` in bin/install.js; our modular
|
|
28
|
+
* factor delegates the actual rewrites to ./shared.cjs.
|
|
29
|
+
*
|
|
30
|
+
* Pure / side-effect-free: no fs, no env, no path. `convert` is a
|
|
31
|
+
* deterministic string → string transform.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
const shared = require('./shared.cjs');
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Claude tool name → Augment tool name. Per Augment's documented tool
|
|
38
|
+
* surface (launch-process for shell execution, str-replace-editor for
|
|
39
|
+
* file edits). Frozen to prevent accidental mutation.
|
|
40
|
+
*
|
|
41
|
+
* Future: extract AUGMENT_TOOL_MAP to reference/augment-tools.md per
|
|
42
|
+
* the Phase 21 pattern (cf. CODEX_TOOL_MAP in shared.cjs) if scope grows
|
|
43
|
+
* beyond two entries.
|
|
44
|
+
*/
|
|
45
|
+
const AUGMENT_TOOL_MAP = Object.freeze({
|
|
46
|
+
Bash: 'launch-process',
|
|
47
|
+
Edit: 'str-replace-editor',
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Convert Claude-source SKILL.md content for the Augment runtime.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} content Full source SKILL.md content (frontmatter + body).
|
|
54
|
+
* @param {string} skillName The bare skill name (e.g. `'help'`, `'explore'`).
|
|
55
|
+
* @param {{ runtime?: string }} [opts] Optional context — `runtime` defaults
|
|
56
|
+
* to `'augment'`. Currently informational only.
|
|
57
|
+
* @returns {string}
|
|
58
|
+
*/
|
|
59
|
+
function convert(content, skillName, opts) {
|
|
60
|
+
const { frontmatter, body } = shared.extractFrontmatterAndBody(content);
|
|
61
|
+
const fm = shared.buildFrontmatter(frontmatter, skillName, 'gdd-');
|
|
62
|
+
let out = shared.rewriteSlashRefs(body, 'augment');
|
|
63
|
+
out = shared.rewriteCodeFenceTools(out, AUGMENT_TOOL_MAP);
|
|
64
|
+
out = shared.ensureAdapterHeader(out, 'Augment');
|
|
65
|
+
return fm + out;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = { convert, AUGMENT_TOOL_MAP };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* scripts/lib/install/converters/cline.cjs — Phase 28.7 (Plan 28.7-06).
|
|
5
|
+
*
|
|
6
|
+
* Cline SKILL.md converter — SPECIAL CASE per Phase 28.7 D-09.
|
|
7
|
+
*
|
|
8
|
+
* Cline does not have a `skills/<name>/SKILL.md` directory model. Per
|
|
9
|
+
* `runtime-artifact-layout.cjs#cline`, its `kinds: []` is intentionally
|
|
10
|
+
* empty and `layout.specialCase = 'clinerules-embed'` routes through
|
|
11
|
+
* this converter. Instead of one SKILL.md file per skill, all installed
|
|
12
|
+
* skills are concatenated into a single `.clinerules` file written at
|
|
13
|
+
* `<cline-config>/.clinerules`. That file contains a stack of markdown
|
|
14
|
+
* rule-blocks, one per skill, with a `## gdd-<skillName>` heading and
|
|
15
|
+
* description + body prose.
|
|
16
|
+
*
|
|
17
|
+
* This file exports TWO functions:
|
|
18
|
+
*
|
|
19
|
+
* 1. `convert(content, skillName, opts) → string`
|
|
20
|
+
* Converts ONE Claude-source SKILL.md into a `.clinerules`-format
|
|
21
|
+
* rule-block. The block is a markdown fragment — NOT a complete
|
|
22
|
+
* file. The installer (Plan 28.7-08) invokes this for each skill,
|
|
23
|
+
* accumulates the blocks, then calls `buildClinerulesFile` to
|
|
24
|
+
* assemble the final file.
|
|
25
|
+
*
|
|
26
|
+
* 2. `buildClinerulesFile(skillBlocks) → string`
|
|
27
|
+
* Concatenates an array of `{ name, block }` entries into the
|
|
28
|
+
* final `.clinerules` file content. Prepends a 4-line header
|
|
29
|
+
* explaining the file's origin (auto-generated from gdd skills).
|
|
30
|
+
*
|
|
31
|
+
* Output shape (one block):
|
|
32
|
+
*
|
|
33
|
+
* ## gdd-<skillName>
|
|
34
|
+
*
|
|
35
|
+
* <description from source frontmatter>
|
|
36
|
+
*
|
|
37
|
+
* <body content, slash-rewritten, prose preserved>
|
|
38
|
+
*
|
|
39
|
+
* The block contains NO YAML frontmatter (cline rules are pure
|
|
40
|
+
* markdown), NO `<!-- ... adapter -->` HTML comment (rules-format does
|
|
41
|
+
* not embed adapter headers), and NO `name:` field — the `## gdd-<name>`
|
|
42
|
+
* heading IS the skill identifier in cline's rule-block model.
|
|
43
|
+
*
|
|
44
|
+
* Architecture ported from gsd-build/get-shit-done (MIT) — per Phase
|
|
45
|
+
* 28.7 D-02 (port architecture, not source). See NOTICE for upstream
|
|
46
|
+
* attribution. gsd-build's equivalent path is the `cline: kinds: []` +
|
|
47
|
+
* `.clinerules` write special-case in their bin/install.js monolith;
|
|
48
|
+
* our modular factor moves the rule-block emission here and lets the
|
|
49
|
+
* installer (Plan 28.7-08) handle the disk write.
|
|
50
|
+
*
|
|
51
|
+
* Wave-3 scope note: this is the only special-case converter in Wave 3
|
|
52
|
+
* (Plan 28.7-06). The other Wave 3 converter (codebuddy.cjs) follows
|
|
53
|
+
* the uniform skills-dir pattern. Per Phase 28.7 D-10, hermes is OUT of
|
|
54
|
+
* scope — no hermes.cjs is created. Hermes was the other special-case
|
|
55
|
+
* runtime in gsd-build's full set (nested skills/gsd/<name>/ layout per
|
|
56
|
+
* upstream #2841), but it is intentionally absent from GDD's 14-runtime
|
|
57
|
+
* set (Phase 24 D-02 runtime list invariant — see Phase 28.7 D-03).
|
|
58
|
+
*
|
|
59
|
+
* Pure / side-effect-free: no fs, no env, no path. Both exports are
|
|
60
|
+
* deterministic string → string transforms; the installer writes the
|
|
61
|
+
* assembled file via its own fs surface.
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
const shared = require('./shared.cjs');
|
|
65
|
+
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
// Internal helpers
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Extract the `description:` value from a frontmatter block.
|
|
72
|
+
*
|
|
73
|
+
* Matches the first `description: <value>` line; tolerates leading
|
|
74
|
+
* whitespace, surrounding quotes (single or double), and CRLF endings.
|
|
75
|
+
* Returns the trimmed value string, or `''` if not present.
|
|
76
|
+
*
|
|
77
|
+
* Note: we don't parse YAML here — a single regex over the raw
|
|
78
|
+
* frontmatter is sufficient because SKILL.md descriptions are always
|
|
79
|
+
* single-line strings (multi-line YAML scalars are not used in the
|
|
80
|
+
* GDD source set).
|
|
81
|
+
*
|
|
82
|
+
* @param {string|null} frontmatter
|
|
83
|
+
* @returns {string}
|
|
84
|
+
*/
|
|
85
|
+
function extractDescription(frontmatter) {
|
|
86
|
+
if (!frontmatter || typeof frontmatter !== 'string') return '';
|
|
87
|
+
const m = frontmatter.match(/^\s*description\s*:\s*(.*)$/m);
|
|
88
|
+
if (!m) return '';
|
|
89
|
+
let v = m[1].trim();
|
|
90
|
+
// Strip surrounding quotes if present.
|
|
91
|
+
const quoted = v.match(/^["'](.*)["']$/);
|
|
92
|
+
if (quoted) v = quoted[1];
|
|
93
|
+
return v;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Normalize the skill name by stripping any prior `gdd-`/`gsd-` prefix
|
|
98
|
+
* (case-insensitive) so we never emit `gdd-gdd-foo`. Matches
|
|
99
|
+
* `shared.buildFrontmatter`'s normalization for consistency.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} skillName
|
|
102
|
+
* @returns {string}
|
|
103
|
+
*/
|
|
104
|
+
function normalizeSkillName(skillName) {
|
|
105
|
+
return String(skillName || '').replace(/^(gdd-|gsd-)/i, '');
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
// convert — produce a single rule-block for one skill
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Convert ONE Claude-source SKILL.md into a `.clinerules`-format rule
|
|
114
|
+
* block (a markdown fragment, not a complete file).
|
|
115
|
+
*
|
|
116
|
+
* The returned block has this shape:
|
|
117
|
+
*
|
|
118
|
+
* ## gdd-<skillName>
|
|
119
|
+
*
|
|
120
|
+
* <description if present>
|
|
121
|
+
*
|
|
122
|
+
* <body content, slash-rewritten via rewriteSlashRefs(body, 'cline')>
|
|
123
|
+
*
|
|
124
|
+
* Trailing newline is included; leading whitespace is stripped from the
|
|
125
|
+
* body so the heading is the first non-blank line. The installer
|
|
126
|
+
* (Plan 28.7-08) accumulates these blocks and joins them via
|
|
127
|
+
* `buildClinerulesFile`.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} content Full source SKILL.md content (frontmatter + body).
|
|
130
|
+
* @param {string} skillName The bare skill name (e.g. `'help'`, `'explore'`).
|
|
131
|
+
* `gdd-`/`gsd-` prefixes are stripped to prevent double-prefix.
|
|
132
|
+
* @param {{ runtime?: string }} [opts] Optional context — `runtime` defaults
|
|
133
|
+
* to `'cline'`. Currently informational only.
|
|
134
|
+
* @returns {string} The rule-block markdown fragment.
|
|
135
|
+
*/
|
|
136
|
+
function convert(content, skillName, opts) {
|
|
137
|
+
const { frontmatter, body } = shared.extractFrontmatterAndBody(content);
|
|
138
|
+
const description = extractDescription(frontmatter);
|
|
139
|
+
const bareName = normalizeSkillName(skillName);
|
|
140
|
+
|
|
141
|
+
// Slash refs rewrite to `/gdd-name` form — cline accepts Claude-shape
|
|
142
|
+
// slashes (runtime-slash.cjs emits `/gdd-` for every non-codex runtime,
|
|
143
|
+
// and cline is not codex). Trim leading/trailing whitespace so the
|
|
144
|
+
// heading directly precedes the body content.
|
|
145
|
+
const prose = shared.rewriteSlashRefs(body, 'cline').trim();
|
|
146
|
+
|
|
147
|
+
const heading = `## gdd-${bareName}`;
|
|
148
|
+
const descLine = description ? `${description}\n\n` : '';
|
|
149
|
+
|
|
150
|
+
return `${heading}\n\n${descLine}${prose}\n`;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// ---------------------------------------------------------------------------
|
|
154
|
+
// buildClinerulesFile — assemble the final .clinerules file content
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Assemble a final `.clinerules` file from an array of per-skill blocks.
|
|
159
|
+
*
|
|
160
|
+
* Prepends a 4-line header citing the gdd origin so anyone reading the
|
|
161
|
+
* generated `.clinerules` file knows it is auto-generated and the
|
|
162
|
+
* authoritative source is the upstream SKILL.md files. Blocks are
|
|
163
|
+
* separated by a blank line (`\n\n`), and the file ends with a single
|
|
164
|
+
* trailing newline.
|
|
165
|
+
*
|
|
166
|
+
* Called by Plan 28.7-08's installer after invoking `convert()` on each
|
|
167
|
+
* skill. Pure transform — does NOT write to disk.
|
|
168
|
+
*
|
|
169
|
+
* Accepts either of two shapes per entry (for installer flexibility):
|
|
170
|
+
* - `{ name: string, block: string }` — preferred, name is informational
|
|
171
|
+
* - `{ skillName: string, content: string }` — alternative legacy/test shape
|
|
172
|
+
*
|
|
173
|
+
* @param {Array<{ name?: string, skillName?: string, block?: string, content?: string }>} skillBlocks
|
|
174
|
+
* @returns {string} The full `.clinerules` content (ready to write).
|
|
175
|
+
*/
|
|
176
|
+
function buildClinerulesFile(skillBlocks) {
|
|
177
|
+
const header = [
|
|
178
|
+
'# get-design-done rules',
|
|
179
|
+
'',
|
|
180
|
+
'<!-- Auto-generated from gdd SKILL.md sources. Edit upstream skills, not this file. -->',
|
|
181
|
+
'',
|
|
182
|
+
].join('\n');
|
|
183
|
+
|
|
184
|
+
// Defensive: empty / non-array → header-only file.
|
|
185
|
+
if (!Array.isArray(skillBlocks) || skillBlocks.length === 0) {
|
|
186
|
+
return header + '\n';
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const body = skillBlocks
|
|
190
|
+
.map((entry) => {
|
|
191
|
+
// Accept either `block` or `content` keys.
|
|
192
|
+
if (!entry || typeof entry !== 'object') return '';
|
|
193
|
+
const text = typeof entry.block === 'string'
|
|
194
|
+
? entry.block
|
|
195
|
+
: typeof entry.content === 'string'
|
|
196
|
+
? entry.content
|
|
197
|
+
: '';
|
|
198
|
+
return text.trim();
|
|
199
|
+
})
|
|
200
|
+
.filter((s) => s.length > 0)
|
|
201
|
+
.join('\n\n');
|
|
202
|
+
|
|
203
|
+
return header + body + '\n';
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
module.exports = { convert, buildClinerulesFile };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* scripts/lib/install/converters/codebuddy.cjs — Phase 28.7 (Plan 28.7-06).
|
|
5
|
+
*
|
|
6
|
+
* CodeBuddy SKILL.md converter. Translates Claude-shape source into
|
|
7
|
+
* CodeBuddy's expected shape (uniform skills/<name>/SKILL.md layout —
|
|
8
|
+
* per `runtime-artifact-layout.cjs#codebuddy` which emits the standard
|
|
9
|
+
* skillsKind('skills', 'gdd-', ...) entry):
|
|
10
|
+
*
|
|
11
|
+
* - Frontmatter `name:` normalized to `gdd-<skill>` (no double-prefix).
|
|
12
|
+
* - Slash references in prose pass through as `/gdd-<name>` —
|
|
13
|
+
* CodeBuddy accepts the Claude shape. Mixed-shape inputs are
|
|
14
|
+
* normalized via the runtime-slash module.
|
|
15
|
+
* - Tool names in code fences pass through unchanged — CodeBuddy
|
|
16
|
+
* accepts the Claude vocabulary (Read/Write/Bash/Edit/Grep/Glob).
|
|
17
|
+
* - A 1-line HTML adapter header is injected at the top of the body
|
|
18
|
+
* to record that this file was auto-generated from Claude source.
|
|
19
|
+
*
|
|
20
|
+
* Architecture ported from gsd-build/get-shit-done (MIT) — per Phase
|
|
21
|
+
* 28.7 D-02 (port architecture, not source). See NOTICE for upstream
|
|
22
|
+
* attribution. gsd-build's equivalent function is
|
|
23
|
+
* `convertClaudeCommandToCodeBuddySkill` in bin/install.js; our modular
|
|
24
|
+
* factor delegates the actual rewrites to ./shared.cjs.
|
|
25
|
+
*
|
|
26
|
+
* This converter follows the same uniform pattern as cursor / windsurf /
|
|
27
|
+
* trae / qwen / copilot / antigravity — it is NOT a special-case
|
|
28
|
+
* runtime. The only special-case converter in Wave 3 is cline.cjs (per
|
|
29
|
+
* D-09: rule-block embedding into `.clinerules`); hermes is OUT of
|
|
30
|
+
* scope per D-10 and intentionally has no converter file.
|
|
31
|
+
*
|
|
32
|
+
* Pure / side-effect-free: no fs, no env, no path. `convert` is a
|
|
33
|
+
* deterministic string → string transform.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
const shared = require('./shared.cjs');
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Convert Claude-source SKILL.md content for the CodeBuddy runtime.
|
|
40
|
+
*
|
|
41
|
+
* @param {string} content Full source SKILL.md content (frontmatter + body).
|
|
42
|
+
* @param {string} skillName The bare skill name (e.g. `'help'`, `'explore'`).
|
|
43
|
+
* @param {{ runtime?: string }} [opts] Optional context — `runtime` defaults
|
|
44
|
+
* to `'codebuddy'`. Currently informational only.
|
|
45
|
+
* @returns {string}
|
|
46
|
+
*/
|
|
47
|
+
function convert(content, skillName, opts) {
|
|
48
|
+
const { frontmatter, body } = shared.extractFrontmatterAndBody(content);
|
|
49
|
+
const fm = shared.buildFrontmatter(frontmatter, skillName, 'gdd-');
|
|
50
|
+
let out = shared.rewriteSlashRefs(body, 'codebuddy');
|
|
51
|
+
out = shared.ensureAdapterHeader(out, 'CodeBuddy');
|
|
52
|
+
return fm + out;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = { convert };
|