@opengsd/gsd-core 1.7.0-rc.6 → 1.8.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.opencode/plugins/gsd-core.js +14 -0
- package/README.md +2 -0
- package/agents/gsd-debug-session-manager.md +42 -4
- package/agents/gsd-debugger.md +87 -29
- package/agents/gsd-executor.md +31 -3
- package/agents/gsd-planner.md +29 -36
- package/agents/gsd-security-auditor.md +13 -15
- package/agents/gsd-verifier.md +2 -2
- package/bin/install.js +1157 -84
- package/commands/gsd/ai-integration-phase.md +1 -1
- package/commands/gsd/mempalace-capture.md +31 -1
- package/commands/gsd/new-milestone.md +1 -1
- package/commands/gsd/plan-phase.md +5 -3
- package/commands/gsd/plan-review-convergence.md +3 -2
- package/commands/gsd/surface.md +6 -6
- package/gsd-core/bin/gsd-tools.cjs +1866 -2434
- package/gsd-core/bin/lib/adapter-imperative.cjs +8 -1
- package/gsd-core/bin/lib/agent-command-router.cjs +20 -5
- package/gsd-core/bin/lib/api-coverage.cjs +341 -49
- package/gsd-core/bin/lib/audit.cjs +7 -6
- package/gsd-core/bin/lib/broken-windows.cjs +716 -0
- package/gsd-core/bin/lib/capability-command-router.cjs +733 -0
- package/gsd-core/bin/lib/capability-registry.cjs +157 -88
- package/gsd-core/bin/lib/capability-writer.cjs +6 -1
- package/gsd-core/bin/lib/check-command-router.cjs +129 -26
- package/gsd-core/bin/lib/claude-orchestration-command-router.cjs +115 -27
- package/gsd-core/bin/lib/claude-orchestration.cjs +84 -9
- package/gsd-core/bin/lib/clock.cjs +19 -0
- package/gsd-core/bin/lib/command-aliases.cjs +14 -0
- package/gsd-core/bin/lib/commands.cjs +129 -13
- package/gsd-core/bin/lib/config-loader.cjs +20 -4
- package/gsd-core/bin/lib/config.cjs +81 -18
- package/gsd-core/bin/lib/core-utils.cjs +14 -3
- package/gsd-core/bin/lib/decisions.cjs +32 -8
- package/gsd-core/bin/lib/docs.cjs +6 -0
- package/gsd-core/bin/lib/drift.cjs +4 -4
- package/gsd-core/bin/lib/external-descriptor-trust.cjs +14 -2
- package/gsd-core/bin/lib/frontmatter.cjs +22 -0
- package/gsd-core/bin/lib/gap-checker.cjs +17 -2
- package/gsd-core/bin/lib/gsd2-import.cjs +2 -1
- package/gsd-core/bin/lib/init.cjs +138 -60
- package/gsd-core/bin/lib/install-engine.cjs +301 -25
- package/gsd-core/bin/lib/install-profiles.cjs +239 -1
- package/gsd-core/bin/lib/installer-migration-authoring.cjs +2 -1
- package/gsd-core/bin/lib/installer-migrations/005-opencode-baseline-commands-dir.cjs +146 -0
- package/gsd-core/bin/lib/installer-migrations/006-pi-extension-cjs-to-js.cjs +91 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +45 -6
- package/gsd-core/bin/lib/markdown-sectionizer.cjs +449 -0
- package/gsd-core/bin/lib/markdown-table.cjs +698 -0
- package/gsd-core/bin/lib/milestone.cjs +463 -43
- package/gsd-core/bin/lib/model-catalog.cjs +19 -4
- package/gsd-core/bin/lib/model-resolver.cjs +189 -7
- package/gsd-core/bin/lib/onboard-projection.cjs +11 -8
- package/gsd-core/bin/lib/phase-command-router.cjs +50 -2
- package/gsd-core/bin/lib/phase-id.cjs +26 -4
- package/gsd-core/bin/lib/phase-lifecycle.cjs +62 -36
- package/gsd-core/bin/lib/phase-locator.cjs +23 -2
- package/gsd-core/bin/lib/phase.cjs +636 -72
- package/gsd-core/bin/lib/plan-scan.cjs +73 -2
- package/gsd-core/bin/lib/roadmap-parser.cjs +225 -17
- package/gsd-core/bin/lib/roadmap.cjs +113 -52
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +14 -7
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +3 -2
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +24 -9
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +41 -17
- package/gsd-core/bin/lib/schema-detect.cjs +2 -1
- package/gsd-core/bin/lib/security.cjs +1 -1
- package/gsd-core/bin/lib/shell-command-projection.cjs +61 -25
- package/gsd-core/bin/lib/smart-entry.cjs +73 -7
- package/gsd-core/bin/lib/state-document.cjs +7 -4
- package/gsd-core/bin/lib/state-transition.cjs +122 -46
- package/gsd-core/bin/lib/state.cjs +456 -137
- package/gsd-core/bin/lib/surface.cjs +53 -11
- package/gsd-core/bin/lib/template.cjs +2 -1
- package/gsd-core/bin/lib/uat.cjs +474 -13
- package/gsd-core/bin/lib/ui-safety-gate.cjs +23 -1
- package/gsd-core/bin/lib/validate.cjs +12 -8
- package/gsd-core/bin/lib/verification.cjs +112 -17
- package/gsd-core/bin/lib/verify.cjs +224 -25
- package/gsd-core/bin/lib/workstream.cjs +3 -2
- package/gsd-core/bin/lib/worktree-safety.cjs +1 -1
- package/gsd-core/bin/lib/write-set.cjs +38 -0
- package/gsd-core/bin/shared/config-schema.manifest.json +5 -2
- package/gsd-core/references/api-coverage.md +37 -7
- package/gsd-core/references/checkpoints.md +13 -1
- package/gsd-core/references/common-bug-patterns.md +13 -0
- package/gsd-core/references/debugger-bug-taxonomy.md +111 -0
- package/gsd-core/references/debugger-fix-acceptance.md +157 -0
- package/gsd-core/references/debugger-philosophy.md +1 -0
- package/gsd-core/references/debugger-prevention.md +98 -0
- package/gsd-core/references/debugger-rca-branching.md +98 -0
- package/gsd-core/references/debugger-repro-hardening.md +130 -0
- package/gsd-core/references/debugger-sbfl.md +110 -0
- package/gsd-core/references/debugger-semantic-recall.md +81 -0
- package/gsd-core/references/execute-phase-quota-recovery.md +55 -0
- package/gsd-core/references/execute-phase-requirement-revert.md +8 -0
- package/gsd-core/references/execute-phase-response-language.md +7 -0
- package/gsd-core/references/planner-antipatterns.md +6 -0
- package/gsd-core/references/planner-mvp-mode.md +12 -13
- package/gsd-core/references/planner-preconditions.md +156 -0
- package/gsd-core/references/planner-reversibility.md +132 -0
- package/gsd-core/references/reviewer-instances.md +9 -7
- package/gsd-core/references/skeleton-template.md +1 -1
- package/gsd-core/references/thinking-models-planning.md +3 -1
- package/gsd-core/templates/DEBUG.md +5 -3
- package/gsd-core/workflows/add-phase.md +2 -0
- package/gsd-core/workflows/add-tests.md +4 -2
- package/gsd-core/workflows/add-todo.md +32 -1
- package/gsd-core/workflows/ai-integration-phase.md +4 -2
- package/gsd-core/workflows/audit-fix.md +2 -2
- package/gsd-core/workflows/check-todos.md +3 -1
- package/gsd-core/workflows/cleanup.md +7 -1
- package/gsd-core/workflows/code-review.md +17 -5
- package/gsd-core/workflows/complete-milestone.md +3 -0
- package/gsd-core/workflows/debug.md +27 -5
- package/gsd-core/workflows/diagnose-issues.md +1 -1
- package/gsd-core/workflows/discovery-phase.md +7 -0
- package/gsd-core/workflows/discuss-phase/templates/context.md +16 -2
- package/gsd-core/workflows/discuss-phase-assumptions.md +3 -0
- package/gsd-core/workflows/do.md +7 -1
- package/gsd-core/workflows/docs-update.md +1 -0
- package/gsd-core/workflows/eval-review.md +3 -0
- package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +4 -4
- package/gsd-core/workflows/execute-phase/steps/regression-gate.md +2 -2
- package/gsd-core/workflows/execute-phase.md +30 -37
- package/gsd-core/workflows/execute-plan.md +15 -4
- package/gsd-core/workflows/fast.md +8 -22
- package/gsd-core/workflows/graduation.md +3 -0
- package/gsd-core/workflows/health.md +7 -1
- package/gsd-core/workflows/help/modes/full.md +6 -2
- package/gsd-core/workflows/import.md +8 -2
- package/gsd-core/workflows/inbox.md +7 -0
- package/gsd-core/workflows/ingest-docs.md +15 -10
- package/gsd-core/workflows/manager.md +3 -1
- package/gsd-core/workflows/map-codebase.md +4 -4
- package/gsd-core/workflows/mvp-phase.md +3 -0
- package/gsd-core/workflows/new-milestone.md +69 -21
- package/gsd-core/workflows/new-project.md +17 -15
- package/gsd-core/workflows/new-workspace.md +3 -1
- package/gsd-core/workflows/onboard.md +3 -0
- package/gsd-core/workflows/plan-phase.md +14 -5
- package/gsd-core/workflows/plan-review-convergence.md +48 -3
- package/gsd-core/workflows/plant-seed.md +3 -0
- package/gsd-core/workflows/profile-user.md +7 -1
- package/gsd-core/workflows/progress.md +33 -5
- package/gsd-core/workflows/quick.md +21 -7
- package/gsd-core/workflows/remove-workspace.md +3 -0
- package/gsd-core/workflows/review.md +123 -68
- package/gsd-core/workflows/scan.md +1 -1
- package/gsd-core/workflows/secure-phase.md +4 -1
- package/gsd-core/workflows/settings-integrations.md +3 -0
- package/gsd-core/workflows/settings.md +3 -0
- package/gsd-core/workflows/ship.md +58 -5
- package/gsd-core/workflows/sketch.md +3 -0
- package/gsd-core/workflows/smart-entry.md +3 -0
- package/gsd-core/workflows/spec-phase.md +1 -1
- package/gsd-core/workflows/spike.md +7 -1
- package/gsd-core/workflows/transition.md +1 -1
- package/gsd-core/workflows/ui-phase.md +3 -1
- package/gsd-core/workflows/ui-review.md +3 -0
- package/gsd-core/workflows/undo.md +7 -0
- package/gsd-core/workflows/update.md +2 -0
- package/gsd-core/workflows/validate-phase.md +3 -0
- package/gsd-core/workflows/verify-phase.md +2 -2
- package/gsd-core/workflows/verify-work.md +7 -3
- package/hooks/dist/gsd-context-monitor.js +27 -9
- package/hooks/dist/gsd-statusline.js +252 -17
- package/hooks/gsd-context-monitor.js +27 -9
- package/hooks/gsd-statusline.js +252 -17
- package/package.json +8 -4
- package/pi/gsd.cjs +8 -2
- package/scripts/changeset/lint.cjs +1 -0
- package/scripts/changeset/parse.cjs +26 -0
- package/scripts/check-glossary-refs.cjs +220 -0
- package/scripts/ci-rebase-check.cjs +48 -4
- package/scripts/ci-test-scope.cjs +39 -1
- package/scripts/gen-adr-index.cjs +526 -0
- package/scripts/gen-golden-install-parity-zcode.cjs +35 -45
- package/scripts/gen-install-tree-fixtures.cjs +75 -0
- package/scripts/gen-test-timings.cjs +201 -0
- package/scripts/lint-allow-test-rule-refs.allowlist.json +0 -1
- package/scripts/lint-portable-timeout.cjs +140 -0
- package/scripts/lint-table-schema-drift.cjs +157 -0
- package/scripts/lint-test-file-count.allowlist.json +1 -0
- package/scripts/release-tarball-smoke.cjs +18 -11
- package/scripts/run-tests.cjs +420 -58
- package/skills/gsd-ai-integration-phase/SKILL.md +1 -1
- package/skills/gsd-mempalace-capture/SKILL.md +31 -1
- package/skills/gsd-new-milestone/SKILL.md +1 -1
- package/skills/gsd-plan-phase/SKILL.md +5 -3
- package/skills/gsd-plan-review-convergence/SKILL.md +3 -2
- package/skills/gsd-surface/SKILL.md +6 -6
- package/vscode/package.json +1 -1
|
@@ -37,7 +37,11 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
37
37
|
const shell_command_projection_cjs_1 = require("./shell-command-projection.cjs");
|
|
38
38
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
39
39
|
const installProfiles = require("./install-profiles.cjs");
|
|
40
|
-
const { readActiveProfile, resolveProfile, loadSkillsManifest,
|
|
40
|
+
const { readActiveProfile, resolveProfile, loadSkillsManifest,
|
|
41
|
+
// #2322 HIGH-3: shared marker name — single source of truth with the writer
|
|
42
|
+
// (install-profiles.cts stageSkillsForRuntimeAsSkills) so the prune reader
|
|
43
|
+
// below can never drift from what the stage-time writer actually wrote.
|
|
44
|
+
CAPABILITY_SKILL_MARKER, } = installProfiles;
|
|
41
45
|
const clusters_cjs_1 = require("./clusters.cjs");
|
|
42
46
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
43
47
|
const runtimeArtifactLayout = require("./runtime-artifact-layout.cjs");
|
|
@@ -305,8 +309,8 @@ function applySurface(runtimeConfigDir, layout, manifest, clusterMap, registry,
|
|
|
305
309
|
// surface-path agents lack path-prefix rewrites and Co-Authored-By trailers,
|
|
306
310
|
// diverging from a fresh install.
|
|
307
311
|
const _homedirFn = opts?.homedir ?? (() => node_os_1.default.homedir());
|
|
308
|
-
const _resolvedTarget = node_path_1.default.resolve(layout.configDir)
|
|
309
|
-
const _homeDir =
|
|
312
|
+
const _resolvedTarget = (0, shell_command_projection_cjs_1.posixNormalize)(node_path_1.default.resolve(layout.configDir));
|
|
313
|
+
const _homeDir = (0, shell_command_projection_cjs_1.posixNormalize)(_homedirFn());
|
|
310
314
|
const _isGlobal = (layout.scope ?? 'global') === 'global';
|
|
311
315
|
const _isOpencode = layout.runtime === 'opencode';
|
|
312
316
|
const _isWindowsHost = (opts?.platform ?? process.platform) === 'win32';
|
|
@@ -379,12 +383,18 @@ function applySurface(runtimeConfigDir, layout, manifest, clusterMap, registry,
|
|
|
379
383
|
*
|
|
380
384
|
* Ownership criteria:
|
|
381
385
|
* - Non-empty prefix (e.g. 'gsd-'): dir name starts with that prefix AND
|
|
382
|
-
* appears in the manifest (
|
|
383
|
-
*
|
|
386
|
+
* EITHER appears in the manifest (first-party membership) OR carries the
|
|
387
|
+
* persisted `CAPABILITY_SKILL_MARKER` file (#2322 HIGH-3: a third-party
|
|
388
|
+
* capability skill, self-certifying and independent of current registry
|
|
389
|
+
* state — so an uninstalled/unsurfaced capability's stale skill is still
|
|
390
|
+
* prunable even though it no longer appears in any registry view). Dirs
|
|
391
|
+
* that match the prefix but satisfy NEITHER are treated as user-owned and
|
|
384
392
|
* preserved — this prevents data loss for user-created gsd-* directories.
|
|
385
393
|
* A warning is written to stderr when such a dir is encountered.
|
|
386
394
|
* - Empty prefix (Hermes): dir name appears as a canonical skill stem in the
|
|
387
|
-
* manifest. User dirs not in the manifest are preserved.
|
|
395
|
+
* manifest. User dirs not in the manifest are preserved. (Hermes does not
|
|
396
|
+
* yet stage third-party capability skills, so the marker check does not
|
|
397
|
+
* apply on this path.)
|
|
388
398
|
* - Empty prefix without manifest, or manifest not a Map: conservative; no
|
|
389
399
|
* dirs are removed.
|
|
390
400
|
*
|
|
@@ -419,18 +429,50 @@ function pruneSkillDirs(skillsDir, retainedNames, prefix, manifest) {
|
|
|
419
429
|
// Does not match prefix at all — user-owned, preserve.
|
|
420
430
|
continue;
|
|
421
431
|
}
|
|
422
|
-
|
|
423
|
-
|
|
432
|
+
// #2322: an entry in THIS apply's retained set is unambiguously wanted —
|
|
433
|
+
// check that BEFORE the first-party-manifest-membership gate below. The
|
|
434
|
+
// manifest only ever knows gsd-core's own bundled stems; a materialized
|
|
435
|
+
// third-party capability skill (retained via the resolved profile's
|
|
436
|
+
// registry union, #2045/#2322) has no manifest entry at all, so without
|
|
437
|
+
// this early check it fell into the "unknown, preserve with warning"
|
|
438
|
+
// branch on EVERY apply — misreporting a live, GSD-managed capability
|
|
439
|
+
// skill as "user-owned or unknown" noise. This does not change any
|
|
440
|
+
// deletion outcome (a retained entry was always preserved — see the
|
|
441
|
+
// `retainedNames.has(entry)` check further below); it only short-
|
|
442
|
+
// circuits the ambiguous-ownership warning for entries we already know,
|
|
443
|
+
// this apply, are wanted.
|
|
444
|
+
if (retainedNames.has(entry))
|
|
424
445
|
continue;
|
|
425
|
-
}
|
|
426
446
|
// Finding 1 fix: prefix match is necessary but NOT sufficient.
|
|
427
447
|
// The dir must also be in the manifest to be considered GSD-owned.
|
|
428
448
|
// A user-created gsd-* dir that isn't in the manifest is preserved with a warning.
|
|
429
|
-
|
|
449
|
+
const stem = entry.slice(prefix.length);
|
|
450
|
+
if (canonicalStems && canonicalStems.has(stem)) {
|
|
451
|
+
isGsdOwned = true;
|
|
452
|
+
}
|
|
453
|
+
else if (node_fs_1.default.existsSync(node_path_1.default.join(entryPath, CAPABILITY_SKILL_MARKER))) {
|
|
454
|
+
// #2322 HIGH-3: not a first-party stem, but self-certified as a
|
|
455
|
+
// GSD-managed THIRD-PARTY capability skill via the persisted marker
|
|
456
|
+
// (written by install-profiles.cts stageSkillsForRuntimeAsSkills at
|
|
457
|
+
// stage time). Without this, an orphaned capability skill — its
|
|
458
|
+
// owning capability uninstalled/unsurfaced and no longer appearing in
|
|
459
|
+
// ANY registry view — had no manifest entry at all and fell into the
|
|
460
|
+
// "unknown, preserve with warning" branch below FOREVER: uninstalling
|
|
461
|
+
// a malicious capability never actually removed its already-staged
|
|
462
|
+
// instructions from the agent's context. The marker makes ownership
|
|
463
|
+
// self-certifying at prune time, independent of current registry
|
|
464
|
+
// state (or even of whether a manifest was supplied at all).
|
|
465
|
+
isGsdOwned = true;
|
|
466
|
+
}
|
|
467
|
+
else if (!canonicalStems) {
|
|
468
|
+
// No manifest available and no capability marker: cannot confirm
|
|
469
|
+
// ownership — preserve conservatively (silent).
|
|
470
|
+
continue;
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
430
473
|
process.stderr.write(`[gsd] Warning: ${entry} matches GSD prefix '${prefix}' but is not in the manifest — preserving (user-owned or unknown)\n`);
|
|
431
474
|
continue;
|
|
432
475
|
}
|
|
433
|
-
isGsdOwned = true;
|
|
434
476
|
}
|
|
435
477
|
else if (canonicalStems) {
|
|
436
478
|
// Hermes: GSD-owned iff the directory name appears in the canonical manifest.
|
|
@@ -11,6 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
};
|
|
12
12
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
13
13
|
const node_path_1 = __importDefault(require("node:path"));
|
|
14
|
+
const clock_cjs_1 = require("./clock.cjs");
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
15
16
|
const ioMod = require("./io.cjs");
|
|
16
17
|
const { output, error } = ioMod;
|
|
@@ -85,7 +86,7 @@ function cmdTemplateFill(cwd, templateType, options, raw) {
|
|
|
85
86
|
return;
|
|
86
87
|
}
|
|
87
88
|
const padded = normalizePhaseName(options.phase);
|
|
88
|
-
const today =
|
|
89
|
+
const today = clock_cjs_1.realClock.localToday();
|
|
89
90
|
const phaseName = options.name || phaseInfo.phase_name || 'Unnamed';
|
|
90
91
|
const phaseSlug = phaseInfo.phase_slug || generateSlugInternal(phaseName);
|
|
91
92
|
const phaseId = `${padded}-${phaseSlug}`;
|