@opengsd/gsd-core 1.6.1 → 1.7.0-rc.2
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 +20 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.opencode/plugins/gsd-core.js +711 -0
- package/agents/gsd-advisor-researcher.md +2 -0
- package/agents/gsd-ai-researcher.md +1 -1
- package/agents/gsd-assumptions-analyzer.md +2 -0
- package/agents/gsd-code-fixer.md +2 -0
- package/agents/gsd-code-reviewer.md +2 -0
- package/agents/gsd-codebase-mapper.md +2 -0
- package/agents/gsd-debugger.md +2 -0
- package/agents/gsd-doc-writer.md +2 -0
- package/agents/gsd-eval-auditor.md +2 -0
- package/agents/gsd-executor.md +9 -6
- package/agents/gsd-integration-checker.md +2 -0
- package/agents/gsd-nyquist-auditor.md +2 -0
- package/agents/gsd-phase-researcher.md +2 -0
- package/agents/gsd-plan-checker.md +2 -0
- package/agents/gsd-planner.md +2 -0
- package/agents/gsd-project-researcher.md +2 -0
- package/agents/gsd-research-synthesizer.md +2 -0
- package/agents/gsd-roadmapper.md +2 -0
- package/agents/gsd-security-auditor.md +2 -0
- package/agents/gsd-ui-auditor.md +2 -0
- package/agents/gsd-ui-checker.md +2 -0
- package/agents/gsd-ui-researcher.md +2 -0
- package/agents/gsd-verifier.md +5 -2
- package/bin/gsd-mcp-server.js +31 -0
- package/bin/install.js +411 -1146
- package/commands/gsd/review.md +6 -0
- package/gemini-extension.json +1 -1
- package/gsd-core/bin/gsd-tools.cjs +134 -8
- package/gsd-core/bin/lib/adapter-declarative.cjs +35 -0
- package/gsd-core/bin/lib/adapter-imperative.cjs +52 -0
- package/gsd-core/bin/lib/assumption-delta.cjs +231 -0
- package/gsd-core/bin/lib/capability-lifecycle.cjs +7 -7
- package/gsd-core/bin/lib/capability-loader.cjs +45 -9
- package/gsd-core/bin/lib/capability-lock.cjs +2 -2
- package/gsd-core/bin/lib/capability-registry.cjs +891 -82
- package/gsd-core/bin/lib/capability-source.cjs +26 -11
- package/gsd-core/bin/lib/capability-validator.cjs +222 -2
- package/gsd-core/bin/lib/cli-skew-check.cjs +44 -0
- package/gsd-core/bin/lib/command-aliases.cjs +8 -0
- package/gsd-core/bin/lib/commands.cjs +2 -1
- package/gsd-core/bin/lib/config.cjs +27 -0
- package/gsd-core/bin/lib/embedding-adapter.cjs +27 -0
- package/gsd-core/bin/lib/external-descriptor-trust.cjs +70 -0
- package/gsd-core/bin/lib/frontmatter.cjs +53 -6
- package/gsd-core/bin/lib/handshake-serialized.cjs +70 -0
- package/gsd-core/bin/lib/hook-bus.cjs +81 -0
- package/gsd-core/bin/lib/host-integration-sdk.cjs +53 -0
- package/gsd-core/bin/lib/host-integration.cjs +469 -0
- package/gsd-core/bin/lib/init.cjs +35 -7
- package/gsd-core/bin/lib/install-engine.cjs +755 -0
- package/gsd-core/bin/lib/install-profiles.cjs +35 -4
- package/gsd-core/bin/lib/installer-migrations.cjs +1 -1
- package/gsd-core/bin/lib/mcp-server.cjs +194 -0
- package/gsd-core/bin/lib/milestone.cjs +68 -40
- package/gsd-core/bin/lib/model-adapter.cjs +50 -0
- package/gsd-core/bin/lib/phase-id.cjs +18 -0
- package/gsd-core/bin/lib/phase.cjs +57 -90
- package/gsd-core/bin/lib/phases-command-router.cjs +4 -3
- package/gsd-core/bin/lib/planning-workspace.cjs +1 -1
- package/gsd-core/bin/lib/probe-core.cjs +132 -2
- package/gsd-core/bin/lib/review-reviewer-selection.cjs +129 -13
- package/gsd-core/bin/lib/roadmap-command-router.cjs +3 -2
- package/gsd-core/bin/lib/roadmap-parser.cjs +21 -11
- package/gsd-core/bin/lib/roadmap-upgrade.cjs +3 -2
- package/gsd-core/bin/lib/roadmap.cjs +33 -22
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +65 -9
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +54 -4
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +5 -2
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +1 -1
- package/gsd-core/bin/lib/runtime-name-policy.cjs +160 -30
- package/gsd-core/bin/lib/shell-command-projection.cjs +16 -0
- package/gsd-core/bin/lib/stale-bake-guard.cjs +254 -0
- package/gsd-core/bin/lib/state-command-router.cjs +4 -0
- package/gsd-core/bin/lib/state-io.cjs +55 -0
- package/gsd-core/bin/lib/state-transition.cjs +1603 -0
- package/gsd-core/bin/lib/state.cjs +327 -683
- package/gsd-core/bin/lib/surface.cjs +4 -1
- package/gsd-core/bin/lib/validate.cjs +2 -1
- package/gsd-core/bin/lib/verify.cjs +6 -4
- package/gsd-core/bin/lib/workstream-inventory-builder.cjs +12 -2
- package/gsd-core/bin/lib/workstream-inventory.cjs +28 -0
- package/gsd-core/bin/lib/workstream.cjs +4 -4
- package/gsd-core/bin/shared/config-schema.manifest.json +9 -0
- package/gsd-core/references/agent-skills-bootstrap.md +60 -0
- package/gsd-core/references/honest-verifier.md +105 -0
- package/gsd-core/references/model-profiles.md +27 -0
- package/gsd-core/references/reviewer-instances.md +99 -0
- package/gsd-core/workflows/autonomous.md +30 -32
- package/gsd-core/workflows/complete-milestone.md +6 -10
- package/gsd-core/workflows/execute-phase.md +1 -1
- package/gsd-core/workflows/forensics.md +3 -3
- package/gsd-core/workflows/help/modes/full.md +1 -1
- package/gsd-core/workflows/manager.md +15 -15
- package/gsd-core/workflows/milestone-summary.md +3 -3
- package/gsd-core/workflows/new-milestone.md +6 -0
- package/gsd-core/workflows/plan-phase/steps/closed-phase-gate.md +42 -0
- package/gsd-core/workflows/plan-phase/steps/prd-express-path.md +102 -0
- package/gsd-core/workflows/plan-phase/steps/windows-troubleshooting.md +23 -0
- package/gsd-core/workflows/plan-phase.md +4 -159
- package/gsd-core/workflows/review.md +33 -2
- package/gsd-core/workflows/thread.md +4 -4
- package/gsd-core/workflows/verify-phase.md +11 -4
- package/gsd-core/workflows/verify-work.md +1 -2
- package/hooks/dist/gsd-graphify-update.sh +7 -1
- package/hooks/gsd-graphify-update.sh +7 -1
- package/package.json +6 -4
- package/scripts/ci-test-scope.cjs +38 -9
- package/scripts/lint-allow-test-rule-refs.allowlist.json +0 -1
- package/scripts/lint-regression-test-names.allowlist.json +3 -0
- package/scripts/lint-test-file-count.allowlist.json +19 -5
- package/scripts/mutation-matrix.cjs +45 -3
- package/scripts/prompt-injection-scan.sh +8 -0
- package/scripts/run-tests.cjs +51 -1
- package/scripts/sync-manifest-versions.cjs +66 -14
- package/skills/gsd-review/SKILL.md +6 -0
- package/scripts/lint-windows-test-portability.cjs +0 -178
|
@@ -60,9 +60,9 @@ const { resolveModelInternal, resolveGranularityInternal, assertValidGranularity
|
|
|
60
60
|
const { findPhaseInternal } = phaseLocator;
|
|
61
61
|
const { getRoadmapPhaseInternal, getMilestoneInfo, getMilestonePhaseFilter, stripShippedMilestones, extractCurrentMilestone, } = roadmapParser;
|
|
62
62
|
const { pathExistsInternal, generateSlugInternal, toPosixPath } = coreUtils;
|
|
63
|
-
const { normalizePhaseName, phaseTokenMatches } = phaseId;
|
|
63
|
+
const { normalizePhaseName, phaseTokenMatches, stripProjectCodePrefix } = phaseId;
|
|
64
64
|
const { pruneOrphanedWorktrees } = worktreeSafety;
|
|
65
|
-
const { planningPaths, planningDir, planningRoot, findContextMdIn, } = planningWorkspace;
|
|
65
|
+
const { planningPaths, planningDir, planningRoot, getActiveWorkstream, findContextMdIn, } = planningWorkspace;
|
|
66
66
|
const { determinePhaseStatus } = commandsMod;
|
|
67
67
|
const { extractFrontmatter } = frontmatterMod;
|
|
68
68
|
const { readVerificationStatus } = verificationMod;
|
|
@@ -919,9 +919,12 @@ function cmdInitMilestoneOp(cwd, raw) {
|
|
|
919
919
|
const roadmapPath = node_path_1.default.join(planningDir(cwd), 'ROADMAP.md');
|
|
920
920
|
const roadmapRaw = node_fs_1.default.readFileSync(roadmapPath, 'utf-8');
|
|
921
921
|
const currentSection = extractCurrentMilestone(roadmapRaw, cwd);
|
|
922
|
-
|
|
922
|
+
// #1729: `(?:\s*\([^)\n]*\))?` tolerates a pre-colon ( ) tag (literal mirror of OPTIONAL_PHASE_TAG_SOURCE).
|
|
923
|
+
const phasePattern = /#{2,4}\s*Phase\s+(\d+[A-Z]?(?:\.\d+)*)(?:\s*\([^)\n]*\))?\s*:/gi;
|
|
923
924
|
let m;
|
|
924
925
|
while ((m = phasePattern.exec(currentSection)) !== null) {
|
|
926
|
+
if (/^999(?:\.|$)/.test(m[1]))
|
|
927
|
+
continue;
|
|
925
928
|
roadmapPhaseNumbers.push(m[1]);
|
|
926
929
|
}
|
|
927
930
|
}
|
|
@@ -938,7 +941,7 @@ function cmdInitMilestoneOp(cwd, raw) {
|
|
|
938
941
|
for (const e of entries) {
|
|
939
942
|
if (!e.isDirectory())
|
|
940
943
|
continue;
|
|
941
|
-
const m = e.name.match(/^(\d+[A-Z]?(?:\.\d+)*)/);
|
|
944
|
+
const m = stripProjectCodePrefix(e.name).match(/^(\d+[A-Z]?(?:\.\d+)*)/);
|
|
942
945
|
if (!m)
|
|
943
946
|
continue;
|
|
944
947
|
diskPhaseDirs.set(canonicalizePhase(m[1]), e.name);
|
|
@@ -1071,7 +1074,8 @@ function cmdInitManager(cwd, raw) {
|
|
|
1071
1074
|
while ((_cbMatch = _cbPattern.exec(content)) !== null) {
|
|
1072
1075
|
_checkboxStates.set(_cbMatch[2], _cbMatch[1].toLowerCase() === 'x');
|
|
1073
1076
|
}
|
|
1074
|
-
|
|
1077
|
+
// #1729: `(?:\s*\([^)\n]*\))?` tolerates a pre-colon ( ) tag (literal mirror of OPTIONAL_PHASE_TAG_SOURCE).
|
|
1078
|
+
const phasePattern = /#{2,4}\s*Phase\s+(\d+[A-Z]?(?:\.\d+)*)(?:\s*\([^)\n]*\))?\s*:\s*([^\n]+)/gi;
|
|
1075
1079
|
const phases = [];
|
|
1076
1080
|
let match;
|
|
1077
1081
|
while ((match = phasePattern.exec(content)) !== null) {
|
|
@@ -1355,6 +1359,29 @@ function cmdInitProgress(cwd, raw) {
|
|
|
1355
1359
|
const config = loadConfig(cwd);
|
|
1356
1360
|
const milestone = getMilestoneInfo(cwd);
|
|
1357
1361
|
const _slashRuntime = (0, runtime_slash_cjs_1.resolveRuntime)(cwd);
|
|
1362
|
+
// #1912: fail safe in workstream mode with no active workstream. With no active
|
|
1363
|
+
// workstream and no --ws, planningDir(cwd) resolves to root .planning — silently
|
|
1364
|
+
// reporting a stale root milestone. Require an explicit workstream instead.
|
|
1365
|
+
// Mirror planningDir's resolution (GSD_WORKSTREAM env > stored active pointer) so
|
|
1366
|
+
// an explicit --ws (which sets GSD_WORKSTREAM) satisfies the check.
|
|
1367
|
+
const _wsRoot = node_path_1.default.join(planningRoot(cwd), 'workstreams');
|
|
1368
|
+
let _availableWorkstreams = [];
|
|
1369
|
+
try {
|
|
1370
|
+
_availableWorkstreams = node_fs_1.default
|
|
1371
|
+
.readdirSync(_wsRoot, { withFileTypes: true })
|
|
1372
|
+
.filter((e) => e.isDirectory())
|
|
1373
|
+
.map((e) => e.name)
|
|
1374
|
+
.sort();
|
|
1375
|
+
}
|
|
1376
|
+
catch {
|
|
1377
|
+
/* no workstreams dir → flat mode */
|
|
1378
|
+
}
|
|
1379
|
+
const _resolvedWorkstream = process.env['GSD_WORKSTREAM'] || getActiveWorkstream(cwd);
|
|
1380
|
+
if (_availableWorkstreams.length > 0 && !_resolvedWorkstream) {
|
|
1381
|
+
error(`init.progress requires a workstream in workstream mode — no active workstream is set, so root STATE.md (likely stale) would be reported. ` +
|
|
1382
|
+
`Pass --ws <name> or run ${(0, runtime_slash_cjs_1.formatGsdSlash)('workstream set', _slashRuntime)} first. ` +
|
|
1383
|
+
`Available workstreams: ${_availableWorkstreams.join(', ')}`);
|
|
1384
|
+
}
|
|
1358
1385
|
const phasesDir = node_path_1.default.join(planningDir(cwd), 'phases');
|
|
1359
1386
|
const phases = [];
|
|
1360
1387
|
let currentPhase = null;
|
|
@@ -1364,7 +1391,8 @@ function cmdInitProgress(cwd, raw) {
|
|
|
1364
1391
|
const roadmapCheckboxStates = new Map();
|
|
1365
1392
|
try {
|
|
1366
1393
|
const roadmapContent = extractCurrentMilestone(node_fs_1.default.readFileSync(node_path_1.default.join(planningDir(cwd), 'ROADMAP.md'), 'utf-8'), cwd);
|
|
1367
|
-
|
|
1394
|
+
// #1729: `(?:\s*\([^)\n]*\))?` tolerates a pre-colon ( ) tag (literal mirror of OPTIONAL_PHASE_TAG_SOURCE).
|
|
1395
|
+
const headingPattern = /#{2,4}\s*Phase\s+(\d+[A-Z]?(?:\.\d+)*)(?:\s*\([^)\n]*\))?\s*:\s*([^\n]+)/gi;
|
|
1368
1396
|
let hm;
|
|
1369
1397
|
while ((hm = headingPattern.exec(roadmapContent)) !== null) {
|
|
1370
1398
|
roadmapPhaseNums.add(hm[1]);
|
|
@@ -1756,7 +1784,7 @@ function buildAgentSkillsBlock(config, agentType, projectRoot, diagnostics) {
|
|
|
1756
1784
|
if (entry.kind === 'directive') {
|
|
1757
1785
|
return `- Load the \`${entry.name}\` skill via the Skill tool before proceeding (plugin-provided).`;
|
|
1758
1786
|
}
|
|
1759
|
-
return `- @${entry.ref}`;
|
|
1787
|
+
return `- @${String(entry.ref).replace(/\\/g, '/')}`;
|
|
1760
1788
|
}).join('\n');
|
|
1761
1789
|
return `<agent_skills>\nRead these user-configured skills:\n${lines}\n</agent_skills>`;
|
|
1762
1790
|
}
|