@hegemonart/get-design-done 1.28.6 → 1.28.7
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 +46 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/scripts/install.cjs +7 -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.cjs +61 -0
- package/scripts/lib/install/converters/copilot.cjs +47 -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/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 +25 -32
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "Get Design Done — 5-stage agent-orchestrated design pipeline with 9 connections, handoff-first workflow, bidirectional Figma write-back, 22+ specialized agents, queryable knowledge layer (intel store, dependency analysis, learnings extraction), and a self-improvement loop (reflector, frontmatter + budget feedback, global-skills layer). v1.20.0 ships the SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream, and resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) for rate-limit + 429 + context-overflow recovery. Full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation (auto-tag + GitHub Release + release-time smoke test).",
|
|
8
|
-
"version": "1.28.
|
|
8
|
+
"version": "1.28.7"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "get-design-done",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), Claude Design handoff, bidirectional Figma write-back, and a queryable intel store (.design/intel/) for dependency and learnings queries. Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation. Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain.",
|
|
15
|
-
"version": "1.28.
|
|
15
|
+
"version": "1.28.7",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "hegemonart"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-design-done",
|
|
3
3
|
"short_name": "gdd",
|
|
4
|
-
"version": "1.28.
|
|
4
|
+
"version": "1.28.7",
|
|
5
5
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), handoff-first workflow via Claude Design bundles, bidirectional Figma write-back (annotations, Code Connect), queryable intel store (`.design/intel/`) for O(1) design surface lookups, and self-improvement loop (reflector agent, frontmatter + budget feedback, global-skills layer at `~/.claude/gdd/global-skills/`). Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings, reflect, apply-reflections. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows, lint + schema + frontmatter + stale-ref + shellcheck + gitleaks + injection-scan + blocking size-budget) and release automation (auto-tag + GitHub Release + release-time smoke test). Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain. v1.27.7 ships gdd-mcp (Phase 27.7): 12 read-only MCP tools for sub-3s priming. v1.28.0 (Phase 28): Foundational References Tier 2 — 5 new reference files (color-theory, composition, proportion-systems, i18n, contrast-advanced), 2 verifier i18n probes + 1 explore i18n-readiness probe, 12 additive cross-link insertions across 10 existing references, 2 orthogonal audit-scoring lens-tags (composition_alignment + i18n_readiness).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "hegemonart",
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,52 @@ All notable changes to get-design-done are documented here. Versions follow [sem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.28.7] — 2026-05-19
|
|
8
|
+
|
|
9
|
+
### Phase 28.7 — Multi-Runtime Install (Pragmatic Port from gsd-build)
|
|
10
|
+
|
|
11
|
+
Replaces the Phase 24 `kind: 'agents-md'` placeholder (which dropped a single bare `AGENTS.md` into each non-Claude runtime's config dir — content the runtimes did not actually consume) with proper native install for all 14 claimed runtimes. Architecture ported from `gsd-build/get-shit-done` (MIT) — see `NOTICE` for the rollup attribution. Per Phase 28.7 D-02 we port the architecture rather than byte-copying the upstream `bin/install.js` monolith. Off-cadence decimal sub-phase from v1.28.0 parent — sequence 1.28.0 → 1.28.5 → 1.28.6 → 1.28.7. Re-interpretation of the original ROADMAP Phase 28.7 (verification-gated) per user direction 2026-05-18: skip field-test reports, trust gsd-build's upstream proving of the pattern. 10 plans across Waves A (foundations) / B (converters) / C (wire-up + test + closeout).
|
|
12
|
+
|
|
13
|
+
#### New install infrastructure (Wave A)
|
|
14
|
+
|
|
15
|
+
- `scripts/lib/install/runtime-homes.cjs` (28.7-01) — pure per-runtime config-dir resolver for all 14 runtimes. Handles env-var overrides (`CLAUDE_CONFIG_DIR`, `XDG_CONFIG_HOME`, etc.), XDG paths, and special-case nests (Antigravity under `~/.gemini/antigravity`, Windsurf under `~/.codeium/windsurf`). Pure function — no I/O.
|
|
16
|
+
- `scripts/lib/install/runtime-artifact-layout.cjs` (28.7-02) — per-(runtime, scope) layout table mapping each combination to its `kinds[] = [{kind, destSubpath, prefix}]` shape. Claude global → `skills/<name>/`; Claude local → `commands/gsd/` + `agents/`; cursor/codex/copilot/antigravity/windsurf/augment/trae/qwen/codebuddy → `skills/<name>/`; opencode + kilo → `command/<name>` (slash-command dir, not skills); gemini → `commands/gsd/` (commands-only); cline → `kinds: []` (rules-based — embeds in `.clinerules` per D-09).
|
|
17
|
+
- `scripts/lib/install/runtime-slash.cjs` (28.7-03) — per-runtime slash-command surface emitter. Codex uses `$gdd-<name>` shell-var form; all others use `/gdd-<name>`. Reserves a forward-compat seam for downstream slash-aware install behaviors.
|
|
18
|
+
|
|
19
|
+
#### Per-runtime content converters (Wave B)
|
|
20
|
+
|
|
21
|
+
- 13 per-runtime converters at `scripts/lib/install/converters/<runtime>.cjs` (28.7-04 through 28.7-07), plus `shared.cjs` (frontmatter pass-through, tool-name rewrite, brand pass-through utilities). Each runtime converter exports `convert(content, skillName, ctx) → { path, content }`. Cross-references the Phase 21 cross-harness tool-name maps (`reference/codex-tools.md`, `reference/gemini-tools.md`) — tool name rewrites only happen for runtimes whose native tool names differ from Claude's defaults.
|
|
22
|
+
- Wave 1 (28.7-04) — `cursor`, `codex`, `copilot`, `antigravity`.
|
|
23
|
+
- Wave 2 (28.7-05) — `windsurf`, `augment`, `trae`, `qwen`.
|
|
24
|
+
- Wave 3 (28.7-06) — `codebuddy`, `cline`. **Cline** (D-09) writes rule-block aggregation to `.clinerules` rather than a skills directory.
|
|
25
|
+
- Wave 4 (28.7-07) — `opencode`, `kilo`, `gemini`. Opencode + kilo use `command/<name>` (slash-command dir); gemini ships commands-only into `commands/gsd/`.
|
|
26
|
+
- **Hermes is OUT of scope** (D-03 + D-10) — Phase 24 D-02 runtime-list invariant preserved. The Phase 28.6 baseline tests' "no hermes.cjs" guard is mirrored in the new Phase 28.7 baseline test.
|
|
27
|
+
|
|
28
|
+
#### Installer wire-up (Wave C.1)
|
|
29
|
+
|
|
30
|
+
- `scripts/lib/install/installer.cjs` (28.7-08) — replaces the broken `kind: 'agents-md'` placeholder with a proper multi-artifact dispatcher. Reads the layout table, invokes the appropriate per-runtime converter for each kind, lands files at the resolved destination per `runtime-homes.cjs`. Backward-compat retained for the existing invocation surface (`--claude`, `--opencode`, …, `--cline`, `--dry-run`, `--global`, `--local`, `--config-dir`). Scope propagation through to converter `ctx` per D-07.
|
|
31
|
+
|
|
32
|
+
#### Per-runtime simulation suite (Wave C.2)
|
|
33
|
+
|
|
34
|
+
- `tests/install-per-runtime.test.cjs` (28.7-09) — 14 simulation tests + 11 cross-runtime invariants. Each test creates a temp config dir via `mkdtempSync`, invokes the installer with `--config-dir <tmp> --<runtime>`, and asserts files land at the expected paths with content matching the converter output. macOS symlink discipline applied (`os.tmpdir()` + `fs.realpathSync` for path comparison) per Phase 27.6 lesson.
|
|
35
|
+
|
|
36
|
+
#### Fixed
|
|
37
|
+
|
|
38
|
+
- 13 non-Claude runtimes now actually receive their plugin payload. Before Phase 28.7: bare `AGENTS.md` drop with no runtime-side discovery. After: native artifact layout matching what each runtime expects (skills dir / command dir / agents dir / rule-block embedding).
|
|
39
|
+
|
|
40
|
+
#### Closeout (Wave C.3)
|
|
41
|
+
|
|
42
|
+
- 4-manifest lockstep at v1.28.7 (`package.json` + `.claude-plugin/plugin.json` + `.claude-plugin/marketplace.json` (metadata.version + plugins[0].version) + `test-fixture/baselines/phase-28/manifests-version.txt` forward-propagation).
|
|
43
|
+
- `OFF_CADENCE_VERSIONS.add('1.28.7')` in `tests/semver-compare.test.cjs`.
|
|
44
|
+
- README install section confirmed claims all 14 runtimes; no Experimental tier (D-04). Translated READMEs deferred (English authoritative for this phase).
|
|
45
|
+
- `NOTICE` extended with Phase 28.7 gsd-build/get-shit-done (MIT) architectural-port attribution (D-02). Phase 27 (cc-multi-cli, Apache 2.0) + Phase 28.5 (mattpocock/skills, MIT) attributions unchanged.
|
|
46
|
+
- Baseline at `test-fixture/baselines/phase-28.7/` (manifests-version, converter-inventory, registry-diff) + `phase-28.6/manifests-version.txt` and `phase-28/manifests-version.txt` forward-propagated to 1.28.7.
|
|
47
|
+
- `phase-20/skill-list.txt` UNCHANGED (no skill add/remove this phase).
|
|
48
|
+
- ROADMAP add + scoped flip (this section + overview entry, 10 inline plan checkboxes pre-flipped).
|
|
49
|
+
- Phase 28.7 ports gsd-build's architecture rather than gating on field-test reports — re-interpretation of the original ROADMAP entry per user direction 2026-05-18 (CONTEXT.md D-01).
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
7
53
|
## [1.28.6] — 2026-05-18
|
|
8
54
|
|
|
9
55
|
### Phase 28.6 — Skill Reference Co-Location (Corrective Follow-Up to Phase 28.5)
|
package/README.md
CHANGED
|
@@ -139,6 +139,8 @@ The installer prompts you to choose:
|
|
|
139
139
|
1. **Runtime** — Claude Code, OpenCode, Gemini, Kilo, Codex, Copilot, Cursor, Windsurf, Antigravity, Augment, Trae, Qwen Code, CodeBuddy, Cline, or all (interactive multi-select — pick multiple runtimes in a single session)
|
|
140
140
|
2. **Location** — Global (all projects) or local (current project only)
|
|
141
141
|
|
|
142
|
+
All 14 runtimes receive their native artifact layout (`skills/`, `command/`, `agents/`, or `.clinerules`) via per-runtime content converters — Claude SKILL.md sources are translated to each runtime's expected shape at install time (frontmatter pass-through, path rewrite, tool-name rewrite via the Phase 21 cross-harness maps). Architecture ported from `gsd-build/get-shit-done` (MIT — see `NOTICE`).
|
|
143
|
+
|
|
142
144
|
Verify with:
|
|
143
145
|
|
|
144
146
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hegemonart/get-design-done",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.7",
|
|
4
4
|
"description": "A design-quality pipeline for AI coding agents: brief, plan, implement, and verify UI work against your design system.",
|
|
5
5
|
"author": "Hegemon",
|
|
6
6
|
"homepage": "https://github.com/hegemonart/get-design-done",
|
package/scripts/install.cjs
CHANGED
|
@@ -167,6 +167,13 @@ async function main() {
|
|
|
167
167
|
} else if (location === 'local') {
|
|
168
168
|
opts.configDir = resolveLocalConfigDir(runtime);
|
|
169
169
|
}
|
|
170
|
+
// Phase 28.7 D-07 — pass scope through to the installer. The new
|
|
171
|
+
// `multi-artifact` kind branches on `local` vs `global` in
|
|
172
|
+
// `runtime-artifact-layout.cjs` (claude local writes commands/+agents/;
|
|
173
|
+
// claude global writes skills/), so the installer needs to know the
|
|
174
|
+
// user's chosen scope, not just the resolved configDir. Default is
|
|
175
|
+
// `global` per D-07.
|
|
176
|
+
opts.scope = location;
|
|
170
177
|
const result = uninstall
|
|
171
178
|
? uninstallRuntime(id, opts)
|
|
172
179
|
: installRuntime(id, opts);
|
|
@@ -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 };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* scripts/lib/install/converters/codex.cjs — Phase 28.7 (Plan 28.7-04).
|
|
5
|
+
*
|
|
6
|
+
* Codex SKILL.md converter. Translates Claude-shape source into Codex's
|
|
7
|
+
* expected shape:
|
|
8
|
+
*
|
|
9
|
+
* - Frontmatter `name:` normalized to `gdd-<skill>` (no double-prefix).
|
|
10
|
+
* - Slash references in prose rewritten from `/gdd-<name>` to
|
|
11
|
+
* `$gdd-<name>` (Codex's shell-variable form) via
|
|
12
|
+
* `../runtime-slash.cjs#formatGddSlash`. Skill names are lowercased
|
|
13
|
+
* on emission per Codex shell-var convention.
|
|
14
|
+
* - Tool names in code fences rewritten via `CODEX_TOOL_MAP` from
|
|
15
|
+
* `reference/codex-tools.md` (Phase 21 D-06 reuse):
|
|
16
|
+
* Read → read_file
|
|
17
|
+
* Write/Edit → apply_patch
|
|
18
|
+
* Bash/Grep → shell
|
|
19
|
+
* Glob → shell
|
|
20
|
+
* WebSearch → web_search
|
|
21
|
+
* WebFetch → shell
|
|
22
|
+
* Task is left untouched (Phase 21 codex-tools.md "Known gaps").
|
|
23
|
+
* - A 1-line HTML adapter header is injected at the top of the body
|
|
24
|
+
* to record that this file was auto-generated from Claude source.
|
|
25
|
+
*
|
|
26
|
+
* Architecture ported from gsd-build/get-shit-done (MIT) — per Phase
|
|
27
|
+
* 28.7 D-02 (port architecture, not source). See NOTICE for upstream
|
|
28
|
+
* attribution. gsd-build's equivalent is `convertClaudeCommandToCodexSkill`
|
|
29
|
+
* in bin/install.js; our modular factor delegates rewrites to ./shared.cjs
|
|
30
|
+
* and pulls the tool map from the same module's CODEX_TOOL_MAP export.
|
|
31
|
+
*
|
|
32
|
+
* Pure / side-effect-free: no fs, no env, no path. `convert` is a
|
|
33
|
+
* deterministic string → string transform.
|
|
34
|
+
*
|
|
35
|
+
* Per Phase 21 codex-tools.md: tool-name rewrites are operative on the
|
|
36
|
+
* code-fenced INVOCATION form (`Bash(command=...)`) only. Prose mentions
|
|
37
|
+
* of the Claude vocabulary ("Use the Bash tool to...") round-trip
|
|
38
|
+
* unchanged — they're documentation, not invocations.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
const shared = require('./shared.cjs');
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Convert Claude-source SKILL.md content for the Codex runtime.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} content Full source SKILL.md content (frontmatter + body).
|
|
47
|
+
* @param {string} skillName The bare skill name (e.g. `'help'`, `'explore'`).
|
|
48
|
+
* @param {{ runtime?: string }} [opts] Optional context — `runtime` defaults
|
|
49
|
+
* to `'codex'`. Currently informational only.
|
|
50
|
+
* @returns {string}
|
|
51
|
+
*/
|
|
52
|
+
function convert(content, skillName, opts) {
|
|
53
|
+
const { frontmatter, body } = shared.extractFrontmatterAndBody(content);
|
|
54
|
+
const fm = shared.buildFrontmatter(frontmatter, skillName, 'gdd-');
|
|
55
|
+
let out = shared.rewriteSlashRefs(body, 'codex');
|
|
56
|
+
out = shared.rewriteCodeFenceTools(out, shared.CODEX_TOOL_MAP);
|
|
57
|
+
out = shared.ensureAdapterHeader(out, 'Codex');
|
|
58
|
+
return fm + out;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = { convert };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* scripts/lib/install/converters/copilot.cjs — Phase 28.7 (Plan 28.7-04).
|
|
5
|
+
*
|
|
6
|
+
* GitHub Copilot SKILL.md converter. Translates Claude-shape source
|
|
7
|
+
* into Copilot'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
|
+
* Copilot accepts the Claude shape. Mixed-shape inputs are
|
|
12
|
+
* normalized via the runtime-slash module.
|
|
13
|
+
* - Tool names in code fences pass through unchanged — Copilot
|
|
14
|
+
* accepts the Claude vocabulary (Read/Write/Bash/Edit/Grep/Glob).
|
|
15
|
+
* - A 1-line HTML adapter header is injected at the top of the body
|
|
16
|
+
* to record that this file was auto-generated from Claude source.
|
|
17
|
+
*
|
|
18
|
+
* Architecture ported from gsd-build/get-shit-done (MIT) — per Phase
|
|
19
|
+
* 28.7 D-02 (port architecture, not source). See NOTICE for upstream
|
|
20
|
+
* attribution. gsd-build's equivalent function is
|
|
21
|
+
* `convertClaudeCommandToCopilotSkill` in bin/install.js; our modular
|
|
22
|
+
* factor delegates the actual rewrites to ./shared.cjs.
|
|
23
|
+
*
|
|
24
|
+
* Pure / side-effect-free: no fs, no env, no path. `convert` is a
|
|
25
|
+
* deterministic string → string transform.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const shared = require('./shared.cjs');
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Convert Claude-source SKILL.md content for the Copilot runtime.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} content Full source SKILL.md content (frontmatter + body).
|
|
34
|
+
* @param {string} skillName The bare skill name (e.g. `'help'`, `'explore'`).
|
|
35
|
+
* @param {{ runtime?: string }} [opts] Optional context — `runtime` defaults
|
|
36
|
+
* to `'copilot'`. Currently informational only.
|
|
37
|
+
* @returns {string}
|
|
38
|
+
*/
|
|
39
|
+
function convert(content, skillName, opts) {
|
|
40
|
+
const { frontmatter, body } = shared.extractFrontmatterAndBody(content);
|
|
41
|
+
const fm = shared.buildFrontmatter(frontmatter, skillName, 'gdd-');
|
|
42
|
+
let out = shared.rewriteSlashRefs(body, 'copilot');
|
|
43
|
+
out = shared.ensureAdapterHeader(out, 'Copilot');
|
|
44
|
+
return fm + out;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = { convert };
|