* chore(#604): rename get-shit-done/ runtime directory to gsd-core/ Renames the installed runtime directory `get-shit-done/` to `gsd-core/` so the on-disk name matches the package (`@opengsd/gsd-core`), repo, and binary (`gsd-tools`). The npm package name and binary are unchanged; npx/npm consumers are unaffected. Mechanical (bulk, ~90% of the diff): - `git mv get-shit-done gsd-core` - Swept path/identifier references across the repo via `perl -pe 's/get-shit-done(?!-\w)/gsd-core/g'`. The negative lookahead preserves the five legitimate slug variants that are NOT the directory: get-shit-done-{OLD,cc,classic,cli,redux} (old package/repo names). - Build/manifest wiring: package.json (bin, files, coverage globs), tsconfig.build.json (outDir), ~86 .gitignore build-output entries, stryker.config.mjs, scan-ignore files, install.js path strings. - Frozen (not rewritten): CHANGELOG.md history; translated docs (README.<locale>.md and docs/{ja-JP,ko-KR,pt-BR,zh-CN}/). New logic (review here): - src/installer-migrations/003-rename-get-shit-done-to-gsd-core.cts: a proper ADR-0008 installer migration. On upgrade it walks the legacy `~/.claude/get-shit-done/` tree, classifies each file via the prior install manifest, and emits remove-managed / backup-and-remove for managed files while PRESERVING unknown user-added files. Symlink-safe (skips a symlinked root and symlinked entries; bounds-checks every path under configDir). The framework rolls back on install failure. Emptied dirs may remain (framework has no recursive dir-removal primitive) — documented. - scripts/lint-legacy-dir-name.cjs: CI regression guard forbidding the bare `get-shit-done` directory token (split token to avoid self-match; case- insensitive; `(?!-\w)` lookahead allows the slug variants; allowlists CHANGELOG, translated docs, and `gsd-allow-legacy-name` marker lines). Wired into the lint-tests CI job. - Restored scripts/lint-package-identity-drift.cjs detection regexes (the mechanical sweep had wrongly rewritten the old-name patterns it exists to detect) and marked them as intentional legacy references. - TDD tests for the migration and the guard; do.md slash-command guard regex tightened so a `/gsd-core/bin` path segment is not mistaken for a command; changeset + docs/installer-migrations.md row added. Breaking: the installed runtime path moves `~/.claude/get-shit-done/` -> `~/.claude/gsd-core/`. Migration 003 removes the stale legacy dir's managed files (preserving user files) on upgrade. Users with custom hooks/configs hardcoding the old path must update them. Closes #604 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): unsweep pending changesets + allowlist injection-example docs CI fixes for the rename PR: - Do not sweep pending .changeset/*.md (ephemeral release-note fragments, like CHANGELOG); reverted those body edits so 5 pre-existing malformed fragments (missing type/pr) no longer enter the PR diff and trip docs-lint. Allowlisted .changeset/ in the legacy-name guard accordingly. - Allowlisted TEST-EXAMPLES.md and docs/explanation/security-model.md in prompt-injection-scan.sh: they contain intentional injection examples / security-model prose; the path-reference rewrites are kept. CodeQL alerts on this PR are pre-existing (alert lines unchanged by this PR; none in the new migration/guard) and are out of scope for the rename. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): resolve CodeQL alerts surfaced on this PR The rename diff touched files carrying pre-existing CodeQL findings; per the no-pre-existing-dismissal rule, fixing every surfaced alert rather than waving them off. All behavior-preserving: - scripts/ci-test-scope.cjs: build the config-path match from string .includes() instead of a RegExp over an arg-derived value (js/regex-injection). - src/profile-output.cts: escape backslashes before pipe-escaping desc/safeName so the table-cell escape is complete (js/incomplete-sanitization). - tests/{bug-2643,bug-2808,docs-parity-live-registry}: two-pass HTML-comment strip so a bare/unclosed `<!--` cannot survive (js/incomplete-multi-character-sanitization). - tests/inline-plan-threshold: drop the no-op `\s`->`\s` identity replace, keep the meaningful POSIX-class conversion (js/identity-replacement). Verified: build:lib green; the touched test files + ci-test-scope + profile-output suites pass; lint:legacy-name clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): correctly resolve remaining CodeQL alerts (regex-injection + sanitization) The prior commit's fixes for two alerts were ineffective: - ci-test-scope.cjs js/regex-injection: the alert is the CLI-arg-derived `file` reaching static regex `.test(file)` calls (not the config rule). Removed ALL regex over file/t — startsWith/includes/=== string checks + an isWindowsHint helper — so there is no regex sink for the tainted value. - js/incomplete-multi-character-sanitization (3 test files): a single `.replace(/<!--...-->/g,'')` can let `<!--` re-form. Replaced with a fixpoint loop (replace until stable) plus a final bare-opener strip. Verified: no regex over file/t remains; ci-test-scope + the 3 test suites pass; lint:legacy-name clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): make ci-test-scope + comment-strippers regex-free to clear CodeQL CodeQL flags the regex PATTERNS syntactically (regex-injection on the --files arg split; incomplete-multi-character-sanitization on the <!--...--> replace), so loop fixes do not satisfy it. Made these paths regex-free: - ci-test-scope.cjs splitFiles: char-by-char separator tokenizer (no /[,\\s]+/). - 3 test files: indexOf/slice HTML-comment stripper (no .replace(/<!--/)). Behavior preserved; ci-test-scope + the 3 suites pass; guard clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): unblock security base64 scan on the large rename diff The security job hit its 10m timeout: base64-scan.sh choked on the binary test fixture tests/feat-3594-parser-property-style.test.cjs (embedded NUL/ non-UTF8 bytes -> thousands of bogus blobs + "ignored null byte" warnings), and the ~800-file rename diff is slow to scan regardless. - scripts/base64-scan.sh: skip binary-by-content files (grep -Iq .) — they can't carry base64-obfuscated *text* and feeding NUL bytes through the per-line scanner is pathologically slow. collect_files already filtered binary *extensions*; this catches binary *content* in text extensions. - .github/workflows/security-scan.yml: raise the security job timeout 10m->30m to accommodate very large diffs (the scan itself is unchanged). Verified locally: scan skips the fixture, 0 "ignored null byte" warnings, 0 findings, exit 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): sweep get-shit-done refs introduced by merging next The branch was updated with next (#614/#384/#618 etc.), which reference the get-shit-done/ dir (still named that on next). Swept the stale references in the merged files to gsd-core so the rename stays consistent and lint:legacy-name passes: - commands/gsd/discuss-phase.md (runtime-launcher shim paths) - src/core.cts (getAgentsDir layout comments) - tests/bug-384-agents-runtime-aware.test.cjs (require path to runtime lib) Verified: guard 0 violations; build green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): exclude gsd-core/ path segments from bug-3683 command cross-ref invariant The #614 runtime-launcher shim added to discuss-phase.md references `${_GSD_RUNTIME_ROOT}/gsd-core/bin/...`. bug-3683's REF_PATTERN excluded path-y refs only via lookbehind, but `}` precedes `/gsd-core/` in the shim, so it mis-read the directory path as a dangling `/gsd-core` command ref (same class as the #604 bug-2954 fix). Added a trailing `(?![\w-]*\/)` so `/gsd-<x>/...` path segments are not treated as slash-command references. Verified locally on BOTH platforms before pushing: - mac (node 26) full suite: 0 failures - gsd-test-runner (linux, node22 image) full suite: 0 failures - bug-3683 + bug-2954 pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): lazily resolve findProjectRoot in gsd-tools (harden flaky CI) CI intermittently failed state.test's gsd-tools subprocess with "findProjectRoot is not a function" (flip-flopping across legs; not reproducible on mac full suite, gsd-test linux full suite, test:unit, or state.test x8). findProjectRoot is a re-export from core.cjs (sourced from project-root.cjs); binding it via destructure at module-load can be undefined under a load-ordering edge. Resolve it lazily at call time via a small wrapper so the lookup happens after core.cjs is fully initialized. Verified green on BOTH platforms before pushing: - mac (node 26) full suite: 0 failures - gsd-test-runner (linux, node22) full suite: 0 failures - state.test.cjs: 106/106; gsd-tools loads cleanly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(#604): allowlist verification-patterns.md placeholder examples in secret scan The rename git-mv'd references/verification-patterns.md into gsd-core/, pulling it into the secret-scan diff. It documents stub/placeholder RED-FLAG env-var examples (illustrative Stripe test-key / database-URL / API-key placeholders) — not real credentials. Added it to .secretscanignore with the strict annotation, mirroring the existing gsd-core/workflows/plan-phase.md exception. Verified locally: secret-scan-lint --strict OK; secret-scan --diff origin/next exits 0 with 0 findings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Thin adapter — sources schema data from the manifest via the generated
|
||||
* Configuration Module. All inline literals have been removed; the manifest
|
||||
* at get-shit-done/bin/shared/config-schema.manifest.json is the single source of truth.
|
||||
* at gsd-core/bin/shared/config-schema.manifest.json is the single source of truth.
|
||||
*
|
||||
* Imported by:
|
||||
* - config.cjs (isValidConfigKey validator)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* See feat #49 (model_policy presets) and config-schema.manifest.json.
|
||||
* Added under ADR-457: TS sources in src/ compile to CJS artifacts in
|
||||
* get-shit-done/bin/lib/ at publish time.
|
||||
* gsd-core/bin/lib/ at publish time.
|
||||
*
|
||||
* Resolution precedence (highest → lowest):
|
||||
* 1. model_overrides[agent]
|
||||
|
||||
@@ -16,7 +16,7 @@ const _require: NodeRequire = require;
|
||||
// ─── Manifest requires ───────────────────────────────────────────────────────
|
||||
function loadConfigurationManifest(fileName: string): Record<string, unknown> {
|
||||
const candidates = [
|
||||
// Installed runtime layout: get-shit-done/bin/shared/*.manifest.json
|
||||
// Installed runtime layout: gsd-core/bin/shared/*.manifest.json
|
||||
join(__dirname, '..', 'shared', fileName),
|
||||
];
|
||||
let lastErr: Error | null = null;
|
||||
|
||||
@@ -1203,9 +1203,9 @@ function getRoadmapPhaseInternal(cwd: string, phaseNum: unknown): RoadmapPhaseRe
|
||||
*
|
||||
* Priority:
|
||||
* 1. GSD_AGENTS_DIR env var (explicit override, any runtime)
|
||||
* 2. For claude runtime: __dirname-relative path (agents/ sibling of get-shit-done/)
|
||||
* 2. For claude runtime: __dirname-relative path (agents/ sibling of gsd-core/)
|
||||
* This is correct for both repo runs and real installs (the runtime config dir's
|
||||
* agents/ folder) because gsd-tools.cjs lives inside get-shit-done/bin/ in both cases.
|
||||
* agents/ folder) because gsd-tools.cjs lives inside gsd-core/bin/ in both cases.
|
||||
* 3. For non-claude runtimes: getGlobalConfigDir(runtime)/agents
|
||||
*
|
||||
* @param runtime - the active runtime name; defaults to GSD_RUNTIME env, then 'claude'
|
||||
|
||||
@@ -2067,8 +2067,8 @@ function buildSkillManifest(cwd: string, skillsDir: string | null = null): Skill
|
||||
kind: 'skills',
|
||||
},
|
||||
{
|
||||
root: '.claude/get-shit-done/skills',
|
||||
path: path.join(os.homedir(), '.claude', 'get-shit-done', 'skills'),
|
||||
root: '.claude/gsd-core/skills',
|
||||
path: path.join(os.homedir(), '.claude', 'gsd-core', 'skills'),
|
||||
scope: 'import-only',
|
||||
kind: 'skills',
|
||||
deprecated: true,
|
||||
|
||||
@@ -201,14 +201,14 @@ export function summarizeInstallerMigrationResult(result: MigrationResult | null
|
||||
// categories. Returns null when no safe default applies — caller must
|
||||
// fall back to the hard assertion / interactive prompt for those.
|
||||
//
|
||||
// Stale SDK build artifacts live under get-shit-done/sdk/{dist,src}/
|
||||
// Stale SDK build artifacts live under gsd-core/sdk/{dist,src}/
|
||||
// and are regenerated on every install, so removing them is lossless.
|
||||
// User-facing skill anchors are the .md files that surface as commands
|
||||
// to the user — these are user-owned and must be kept.
|
||||
export function classifyPromptUserAction(action: MigrationAction): ClassifyResult | null {
|
||||
const relPath = action && action.relPath;
|
||||
if (typeof relPath !== 'string' || !relPath) return null;
|
||||
if (/^get-shit-done\/sdk\/(dist|src)\//.test(relPath)) {
|
||||
if (/^gsd-core\/sdk\/(dist|src)\//.test(relPath)) {
|
||||
return { category: 'stale-sdk-build-artifact', choice: 'remove' };
|
||||
}
|
||||
if (/^skills\/gsd-[^/]+\/SKILL\.md$/.test(relPath)) {
|
||||
|
||||
@@ -16,24 +16,24 @@ const BASELINE_MIGRATION_ID = '2026-05-11-first-time-baseline-scan';
|
||||
// - docs/installer-migrations.md#runtime-configuration-contract-registry
|
||||
// - docs/ARCHITECTURE.md#runtime-install-contract-matrix
|
||||
const RUNTIME_SURFACES: Record<string, string[]> = {
|
||||
claude: ['get-shit-done', 'commands/gsd', 'skills', 'agents', 'hooks', 'settings.json'],
|
||||
codex: ['get-shit-done', 'skills', 'agents', 'hooks', 'config.toml', 'hooks.json'],
|
||||
gemini: ['get-shit-done', 'commands/gsd', 'hooks'],
|
||||
opencode: ['get-shit-done', 'command', 'skills', 'agents'],
|
||||
kilo: ['get-shit-done', 'command', 'skills', 'agents'],
|
||||
copilot: ['get-shit-done', 'skills', 'agents'],
|
||||
antigravity: ['get-shit-done', 'skills', 'agents'],
|
||||
cursor: ['get-shit-done', 'skills', 'agents'],
|
||||
windsurf: ['get-shit-done', 'skills', 'agents', 'rules'],
|
||||
augment: ['get-shit-done', 'skills', 'agents'],
|
||||
trae: ['get-shit-done', 'skills', 'agents', 'rules'],
|
||||
qwen: ['get-shit-done', 'skills', 'agents'],
|
||||
hermes: ['get-shit-done', 'skills/gsd', 'agents'],
|
||||
cline: ['get-shit-done', 'skills', 'agents'],
|
||||
codebuddy: ['get-shit-done', 'skills', 'agents'],
|
||||
claude: ['gsd-core', 'commands/gsd', 'skills', 'agents', 'hooks', 'settings.json'],
|
||||
codex: ['gsd-core', 'skills', 'agents', 'hooks', 'config.toml', 'hooks.json'],
|
||||
gemini: ['gsd-core', 'commands/gsd', 'hooks'],
|
||||
opencode: ['gsd-core', 'command', 'skills', 'agents'],
|
||||
kilo: ['gsd-core', 'command', 'skills', 'agents'],
|
||||
copilot: ['gsd-core', 'skills', 'agents'],
|
||||
antigravity: ['gsd-core', 'skills', 'agents'],
|
||||
cursor: ['gsd-core', 'skills', 'agents'],
|
||||
windsurf: ['gsd-core', 'skills', 'agents', 'rules'],
|
||||
augment: ['gsd-core', 'skills', 'agents'],
|
||||
trae: ['gsd-core', 'skills', 'agents', 'rules'],
|
||||
qwen: ['gsd-core', 'skills', 'agents'],
|
||||
hermes: ['gsd-core', 'skills/gsd', 'agents'],
|
||||
cline: ['gsd-core', 'skills', 'agents'],
|
||||
codebuddy: ['gsd-core', 'skills', 'agents'],
|
||||
};
|
||||
|
||||
const COMMON_SURFACES = ['get-shit-done', 'skills', 'agents', 'hooks'];
|
||||
const COMMON_SURFACES = ['gsd-core', 'skills', 'agents', 'hooks'];
|
||||
const INTERNAL_TOP_LEVEL_NAMES = new Set([
|
||||
'gsd-file-manifest.json',
|
||||
'gsd-install-state.json',
|
||||
@@ -41,7 +41,7 @@ const INTERNAL_TOP_LEVEL_NAMES = new Set([
|
||||
'gsd-migration-journal',
|
||||
]);
|
||||
const USER_OWNED_PATHS = new Set([
|
||||
'get-shit-done/USER-PROFILE.md',
|
||||
'gsd-core/USER-PROFILE.md',
|
||||
'commands/gsd/dev-preferences.md',
|
||||
'skills/gsd-dev-preferences/SKILL.md',
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* Installer migration 003: remove stale legacy get-shit-done/ runtime directory // gsd-allow-legacy-name
|
||||
* files after the rename to gsd-core/ (#604).
|
||||
*
|
||||
* Background: the GSD runtime config subdirectory was renamed from
|
||||
* get-shit-done/ to gsd-core/ in #604. On upgrade, both directories can exist // gsd-allow-legacy-name
|
||||
* simultaneously. This migration removes prior-manifest-managed files from the
|
||||
* legacy get-shit-done/ directory during install. Migrations run BEFORE the new // gsd-allow-legacy-name
|
||||
* runtime is materialized, so gsd-core/ will not yet exist on the first upgrade
|
||||
* run — the migration must not gate on its presence. If the install fails after
|
||||
* migrations apply, the framework rolls back by restoring files from rollback
|
||||
* storage (copied before deletion), so removing legacy files pre-materialization
|
||||
* is safe.
|
||||
*
|
||||
* Per-file approach: the migration framework has no recursive directory-removal
|
||||
* primitive — all actions operate on individual files identified by relPath. As
|
||||
* a result, any empty subdirectory shells left under the legacy tree after all
|
||||
* files are removed will remain on disk. Users can remove them manually if
|
||||
* desired. This is a known, intentional limitation of the ADR-0008 design: the
|
||||
* framework never removes directories, only files.
|
||||
*
|
||||
* User file preservation: files classified 'unknown' (not in the prior manifest)
|
||||
* receive a 'baseline-preserve-user' action and are explicitly NOT removed.
|
||||
*/
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
interface ClassifiedArtifact {
|
||||
classification: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
interface MigrationAction {
|
||||
type: string;
|
||||
relPath: string;
|
||||
reason: string;
|
||||
ownershipEvidence: string;
|
||||
}
|
||||
|
||||
interface MigrationPlanContext {
|
||||
configDir: string;
|
||||
classifyArtifact(relPath: string): ClassifiedArtifact;
|
||||
}
|
||||
|
||||
interface InstallerMigration {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
introducedIn: string;
|
||||
scopes: string[];
|
||||
destructive: boolean;
|
||||
plan(ctx: MigrationPlanContext): MigrationAction[];
|
||||
}
|
||||
|
||||
function walkLegacyFiles(root: string, relDir: string, baseResolved: string, results: string[]): void {
|
||||
const dir = path.join(root, relDir);
|
||||
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
// Do not follow symlinks — skip them entirely to avoid out-of-tree traversal.
|
||||
if (entry.isSymbolicLink()) continue; // gsd-allow-legacy-name (entry under legacy get-shit-done/ dir)
|
||||
const relPath = path.posix.join(relDir, entry.name);
|
||||
// Bounds check: ensure the resolved path stays under configDir.
|
||||
const resolved = path.resolve(root, relPath);
|
||||
if (resolved !== baseResolved && !resolved.startsWith(baseResolved + path.sep)) continue;
|
||||
if (entry.isDirectory()) {
|
||||
walkLegacyFiles(root, relPath, baseResolved, results);
|
||||
} else if (entry.isFile()) {
|
||||
results.push(relPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const REASON = 'legacy runtime directory renamed to gsd-core (#604)';
|
||||
|
||||
const migration: InstallerMigration = {
|
||||
id: '2026-06-02-rename-get-shit-done-to-gsd-core', // gsd-allow-legacy-name
|
||||
title: 'Remove stale legacy get-shit-done/ runtime directory files (#604)', // gsd-allow-legacy-name
|
||||
description:
|
||||
'After the config dir rename from get-shit-done/ to gsd-core/ (#604), remove prior-manifest-managed files ' + // gsd-allow-legacy-name
|
||||
'from the stale legacy directory during install (framework rollback restores them if install fails). User-added files are preserved.',
|
||||
introducedIn: '1.2.0',
|
||||
scopes: ['global', 'local'],
|
||||
destructive: true,
|
||||
plan(ctx: MigrationPlanContext): MigrationAction[] {
|
||||
const legacyRoot = path.join(ctx.configDir, 'get-shit-done'); // gsd-allow-legacy-name
|
||||
|
||||
// Idempotency: if the legacy directory doesn't exist, nothing to do.
|
||||
if (!fs.existsSync(legacyRoot)) return [];
|
||||
|
||||
// Safety: if the legacy root itself is a symlink to an out-of-tree location,
|
||||
// do not process it — walking a symlinked dir could emit removes outside configDir.
|
||||
if (fs.lstatSync(legacyRoot).isSymbolicLink()) return []; // gsd-allow-legacy-name
|
||||
|
||||
const baseResolved = path.resolve(ctx.configDir);
|
||||
const relPaths: string[] = [];
|
||||
walkLegacyFiles(ctx.configDir, 'get-shit-done', baseResolved, relPaths); // gsd-allow-legacy-name
|
||||
|
||||
const actions: MigrationAction[] = [];
|
||||
for (const relPath of relPaths) {
|
||||
// Bounds-check each relPath before emitting any action.
|
||||
const resolved = path.resolve(ctx.configDir, relPath);
|
||||
if (resolved !== baseResolved && !resolved.startsWith(baseResolved + path.sep)) continue;
|
||||
const { classification } = ctx.classifyArtifact(relPath);
|
||||
if (classification === 'managed-pristine') {
|
||||
actions.push({
|
||||
type: 'remove-managed',
|
||||
relPath,
|
||||
reason: REASON,
|
||||
ownershipEvidence:
|
||||
'present in prior install manifest as a managed GSD runtime file',
|
||||
});
|
||||
} else if (classification === 'managed-modified') {
|
||||
actions.push({
|
||||
type: 'backup-and-remove',
|
||||
relPath,
|
||||
reason: REASON,
|
||||
ownershipEvidence:
|
||||
'managed GSD runtime file, locally modified; backed up before removal',
|
||||
});
|
||||
} else if (classification === 'unknown') {
|
||||
actions.push({
|
||||
type: 'baseline-preserve-user',
|
||||
relPath,
|
||||
reason: 'user-added file under legacy runtime dir; preserved per ADR-0008',
|
||||
ownershipEvidence:
|
||||
'file is not present in the prior install manifest; treated as user-owned',
|
||||
});
|
||||
}
|
||||
// 'managed-missing', 'missing', and any other classification: skip (no action)
|
||||
}
|
||||
|
||||
return actions;
|
||||
},
|
||||
};
|
||||
|
||||
export = migration;
|
||||
@@ -15,7 +15,7 @@ const _require: NodeRequire = require;
|
||||
// Resolve model-catalog.json via a prioritised candidate list so the module
|
||||
// works in every layout:
|
||||
//
|
||||
// 1. Co-located install path — get-shit-done/bin/shared/model-catalog.json
|
||||
// 1. Co-located install path — gsd-core/bin/shared/model-catalog.json
|
||||
// 2. Source-repo dev path — sdk/shared/model-catalog.json
|
||||
// 3. GSD_MODEL_CATALOG env override
|
||||
const _catalogCandidates: string[] = [
|
||||
|
||||
@@ -531,9 +531,9 @@ function generateSkillsSection(cwd: string): SectionResult {
|
||||
|
||||
const lines = ['| Skill | Description | Path |', '|-------|-------------|------|'];
|
||||
for (const skill of discovered) {
|
||||
// Sanitize table cell content (escape pipes)
|
||||
const desc = skill.description.replace(/\|/g, '\\|').replace(/\n/g, ' ').trim();
|
||||
const safeName = skill.name.replace(/\|/g, '\\|');
|
||||
// Sanitize table cell content (escape backslashes first, then pipes)
|
||||
const desc = skill.description.replace(/\\/g, '\\\\').replace(/\|/g, '\\|').replace(/\n/g, ' ').trim();
|
||||
const safeName = skill.name.replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
|
||||
lines.push(`| ${safeName} | ${desc} | \`${skill.path}/SKILL.md\` |`);
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ function cmdWriteProfile(cwd: string, options: CmdWriteProfileOptions, raw: bool
|
||||
|
||||
let outputPath = options.output;
|
||||
if (!outputPath) {
|
||||
outputPath = path.join(os.homedir(), '.claude', 'get-shit-done', 'USER-PROFILE.md');
|
||||
outputPath = path.join(os.homedir(), '.claude', 'gsd-core', 'USER-PROFILE.md');
|
||||
} else if (!path.isAbsolute(outputPath)) {
|
||||
outputPath = path.join(cwd, outputPath);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* bin/lib/*.cjs collapsed to a TypeScript source of truth).
|
||||
*
|
||||
* Logic is preserved byte-for-behaviour from the prior hand-written
|
||||
* `get-shit-done/bin/lib/semver-compare.cjs`; only types are added. The
|
||||
* `gsd-core/bin/lib/semver-compare.cjs`; only types are added. The
|
||||
* normalization policy here is locked by `tests/semver-compare.test.cjs` and
|
||||
* consumed by update-check, statusline dev-install detection, and changeset
|
||||
* range compare (`scripts/changeset/cli.cjs`).
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
* checkUiPresence(text: string): { hasUI: boolean, tokens: string[] }
|
||||
*
|
||||
* CLI usage — reads phase-section text from STDIN to avoid ARG_MAX limits:
|
||||
* echo "$PHASE_SECTION" | node get-shit-done/bin/lib/ui-safety-gate.cjs
|
||||
* echo "$PHASE_SECTION" | node gsd-core/bin/lib/ui-safety-gate.cjs
|
||||
* echo $? → 0 if UI tokens found, 1 if not, 2 on usage error
|
||||
*
|
||||
* Exit codes mirror grep: 0 = match found, 1 = no match, 2 = usage error.
|
||||
*
|
||||
* Canonical location: get-shit-done/bin/lib/ui-safety-gate.cjs (#448)
|
||||
* This path is deployed by the GSD installer to $RUNTIME_DIR/get-shit-done/bin/lib/.
|
||||
* Canonical location: gsd-core/bin/lib/ui-safety-gate.cjs (#448)
|
||||
* This path is deployed by the GSD installer to $RUNTIME_DIR/gsd-core/bin/lib/.
|
||||
* bin/lib/ui-safety-gate.cjs (root) is retained for source-repo and npm usage.
|
||||
*/
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ function expandHome(p: string | undefined | null, home: string): string {
|
||||
return p.startsWith('~/') ? path.join(home, p.slice(2)) : p;
|
||||
}
|
||||
|
||||
function versionFile(dir: string): string { return path.join(dir, 'get-shit-done', 'VERSION'); }
|
||||
function markerFile(dir: string): string { return path.join(dir, 'get-shit-done', 'workflows', 'update.md'); }
|
||||
function versionFile(dir: string): string { return path.join(dir, 'gsd-core', 'VERSION'); }
|
||||
function markerFile(dir: string): string { return path.join(dir, 'gsd-core', 'workflows', 'update.md'); }
|
||||
|
||||
export interface FsAdapter {
|
||||
exists(p: string): boolean;
|
||||
|
||||
Reference in New Issue
Block a user