@opengsd/gsd-core 1.18.0 → 1.20.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 +2 -1
- package/.opencode/plugins/gsd-core.js +2 -3
- package/agents/gsd-code-fixer.compact.md +7 -7
- package/agents/gsd-code-fixer.md +13 -7
- package/agents/gsd-code-reviewer.compact.md +49 -8
- package/agents/gsd-code-reviewer.md +53 -14
- package/agents/gsd-executor.md +8 -4
- package/agents/gsd-verifier.md +1 -1
- package/bin/install.js +422 -103
- package/commands/gsd/update.md +5 -2
- package/gsd-core/bin/gsd-tools.cjs +179 -30
- package/gsd-core/bin/lib/agent-install-check.cjs +29 -3
- package/gsd-core/bin/lib/args-terminator.cjs +114 -0
- package/gsd-core/bin/lib/broken-windows.cjs +59 -1
- package/gsd-core/bin/lib/capability-lifecycle.cjs +1 -12
- package/gsd-core/bin/lib/capability-lock.cjs +13 -2
- package/gsd-core/bin/lib/capability-registry.cjs +376 -103
- package/gsd-core/bin/lib/capability-state.cjs +14 -8
- package/gsd-core/bin/lib/capability-validator.cjs +32 -0
- package/gsd-core/bin/lib/commands.cjs +27 -17
- package/gsd-core/bin/lib/config-loader.cjs +13 -3
- package/gsd-core/bin/lib/config.cjs +256 -58
- package/gsd-core/bin/lib/core-utils.cjs +45 -0
- package/gsd-core/bin/lib/decision-coverage-support.cjs +74 -0
- package/gsd-core/bin/lib/frontmatter.cjs +21 -3
- package/gsd-core/bin/lib/gate-api-coverage-verify-pre.cjs +2 -2
- package/gsd-core/bin/lib/gate-context-drift.cjs +9 -4
- package/gsd-core/bin/lib/gate-decision-coverage-plan.cjs +6 -1
- package/gsd-core/bin/lib/gate-decision-coverage-verify.cjs +6 -1
- package/gsd-core/bin/lib/gate-evaluation-scope.cjs +134 -13
- package/gsd-core/bin/lib/gate-phase-context.cjs +7 -8
- package/gsd-core/bin/lib/gate-schema-drift.cjs +1 -1
- package/gsd-core/bin/lib/gate-tdd-review-checkpoint.cjs +63 -22
- package/gsd-core/bin/lib/gate-ui-safety.cjs +23 -5
- package/gsd-core/bin/lib/git-info-exclude.cjs +52 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/phase-structure.cjs +31 -12
- package/gsd-core/bin/lib/health-diagnostic-rules/roadmap-disk-consistency.cjs +9 -7
- package/gsd-core/bin/lib/health-diagnostic-rules/state-consistency.cjs +3 -3
- package/gsd-core/bin/lib/health-diagnostic-types.cjs +4 -0
- package/gsd-core/bin/lib/health-diagnostic.cjs +52 -1
- package/gsd-core/bin/lib/host-integration.cjs +13 -6
- package/gsd-core/bin/lib/init.cjs +245 -68
- package/gsd-core/bin/lib/install-engine.cjs +246 -32
- package/gsd-core/bin/lib/install-profiles.cjs +9 -4
- package/gsd-core/bin/lib/installer-migration-report.cjs +2 -0
- package/gsd-core/bin/lib/io.cjs +6 -0
- package/gsd-core/bin/lib/markdown-line-diff.cjs +147 -0
- package/gsd-core/bin/lib/markdown-sectionizer.cjs +147 -1
- package/gsd-core/bin/lib/markdown-table.cjs +23 -0
- package/gsd-core/bin/lib/mcp-server.cjs +8 -5
- package/gsd-core/bin/lib/milestone-lock.cjs +8 -1
- package/gsd-core/bin/lib/milestone-release-map.cjs +244 -0
- package/gsd-core/bin/lib/milestone-release-tags.cjs +440 -0
- package/gsd-core/bin/lib/milestone.cjs +61 -51
- package/gsd-core/bin/lib/model-catalog.cjs +8 -0
- package/gsd-core/bin/lib/normalize-test-command.cjs +67 -0
- package/gsd-core/bin/lib/phase-entry-grammar.cjs +119 -0
- package/gsd-core/bin/lib/phase-id-display.cjs +2 -0
- package/gsd-core/bin/lib/phase-id.cjs +629 -38
- package/gsd-core/bin/lib/phase-lifecycle.cjs +12 -44
- package/gsd-core/bin/lib/phase-locator.cjs +328 -19
- package/gsd-core/bin/lib/phase.cjs +3066 -653
- package/gsd-core/bin/lib/planning-document.cjs +26 -5
- package/gsd-core/bin/lib/planning-inspect.cjs +27 -35
- package/gsd-core/bin/lib/planning-snapshot.cjs +15 -8
- package/gsd-core/bin/lib/planning-workspace.cjs +21 -3
- package/gsd-core/bin/lib/pristine-baseline.cjs +11 -3
- package/gsd-core/bin/lib/read-only-git-env.cjs +79 -0
- package/gsd-core/bin/lib/refactor-trigger-command-router.cjs +2 -2
- package/gsd-core/bin/lib/review-lane-descriptor.cjs +57 -2
- package/gsd-core/bin/lib/review-lane-invocation.cjs +125 -18
- package/gsd-core/bin/lib/review-lane-runner.cjs +33 -4
- package/gsd-core/bin/lib/reviewer-step-dispatch.cjs +11 -9
- package/gsd-core/bin/lib/roadmap-parser.cjs +735 -137
- package/gsd-core/bin/lib/roadmap-progress.cjs +136 -0
- package/gsd-core/bin/lib/roadmap-upgrade.cjs +47 -7
- package/gsd-core/bin/lib/roadmap.cjs +383 -123
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +381 -14
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +8 -4
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +60 -16
- package/gsd-core/bin/lib/shell-command-projection.cjs +151 -19
- package/gsd-core/bin/lib/smart-entry.cjs +35 -11
- package/gsd-core/bin/lib/state-contract.cjs +39 -15
- package/gsd-core/bin/lib/state-document.cjs +344 -27
- package/gsd-core/bin/lib/state-transition.cjs +156 -32
- package/gsd-core/bin/lib/state.cjs +527 -186
- package/gsd-core/bin/lib/surface.cjs +9 -0
- package/gsd-core/bin/lib/task-command-router.cjs +5 -25
- package/gsd-core/bin/lib/task-content-resolution.cjs +46 -1
- package/gsd-core/bin/lib/template.cjs +2 -2
- package/gsd-core/bin/lib/validate.cjs +3 -2
- package/gsd-core/bin/lib/vendor/re2js.cjs +863 -577
- package/gsd-core/bin/lib/vendor/re2js.d.cts +284 -219
- package/gsd-core/bin/lib/verification.cjs +96 -9
- package/gsd-core/bin/lib/verify.cjs +4 -2
- package/gsd-core/bin/lib/workstream-inventory.cjs +26 -20
- package/gsd-core/bin/lib/worktree-safety.cjs +22 -1
- package/gsd-core/bin/shared/config-defaults.manifest.json +1 -0
- package/gsd-core/bin/shared/config-schema.manifest.json +1 -0
- package/gsd-core/bin/verify-reapply-patches.cjs +411 -10
- package/gsd-core/references/cicd-review-patterns.md +45 -0
- package/gsd-core/references/git-integration.md +11 -0
- package/gsd-core/references/loop-hook-dispatch.md +13 -6
- package/gsd-core/references/necessity-review.md +48 -0
- package/gsd-core/references/planning-config.md +2 -0
- package/gsd-core/references/tdd.md +2 -2
- package/gsd-core/templates/DEBUG.md +16 -0
- package/gsd-core/templates/config.json +2 -1
- package/gsd-core/templates/verification-report.md +1 -1
- package/gsd-core/workflows/audit-fix.md +2 -1
- package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +10 -1
- package/gsd-core/workflows/code-review-fix.md +46 -5
- package/gsd-core/workflows/code-review.md +64 -7
- package/gsd-core/workflows/complete-milestone/steps/project-md-evolution-review.md +145 -0
- package/gsd-core/workflows/complete-milestone/steps/release-map.md +80 -0
- package/gsd-core/workflows/complete-milestone.md +37 -150
- package/gsd-core/workflows/diagnose-issues.md +29 -5
- package/gsd-core/workflows/discuss-phase/modes/power.md +1 -1
- package/gsd-core/workflows/discuss-phase-assumptions.md +33 -2
- package/gsd-core/workflows/discuss-phase-power.md +19 -2
- package/gsd-core/workflows/discuss-phase.md +6 -10
- package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +13 -7
- package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +7 -2
- package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +2 -1
- package/gsd-core/workflows/execute-phase/steps/verify-phase-goal.md +2 -2
- package/gsd-core/workflows/execute-phase/steps/wave-post-gate-hooks.md +11 -2
- package/gsd-core/workflows/execute-phase.md +10 -6
- package/gsd-core/workflows/execute-plan.md +1 -1
- package/gsd-core/workflows/health.md +2 -1
- package/gsd-core/workflows/import.md +1 -1
- package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +2 -2
- package/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md +13 -9
- package/gsd-core/workflows/plan-phase.md +14 -14
- package/gsd-core/workflows/pr-branch.md +2 -0
- package/gsd-core/workflows/quick/steps/plan-checker-loop.md +1 -1
- package/gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md +8 -1
- package/gsd-core/workflows/quick-batch/steps/plan-checker-loop.md +2 -1
- package/gsd-core/workflows/quick.md +1 -1
- package/gsd-core/workflows/reapply-patches.md +104 -0
- package/gsd-core/workflows/review.md +70 -154
- package/gsd-core/workflows/section-manifest.json +5 -0
- package/gsd-core/workflows/secure-phase.md +1 -1
- package/gsd-core/workflows/settings-advanced.md +57 -9
- package/gsd-core/workflows/settings.md +1 -0
- package/gsd-core/workflows/ship.md +15 -4
- package/gsd-core/workflows/spec-phase.md +3 -6
- package/gsd-core/workflows/verify-work.md +4 -3
- package/hooks/dist/gsd-agent-isolation-guard.js +11 -1
- package/hooks/dist/gsd-cursor-subagent-start.js +6 -2
- package/hooks/dist/gsd-graphify-update.sh +6 -0
- package/hooks/dist/gsd-path-export.js +95 -0
- package/hooks/dist/gsd-secret-read-guard.js +172 -39
- package/hooks/dist/gsd-statusline.js +37 -3
- package/hooks/dist/gsd-windsurf-pre-write.js +29 -2
- package/hooks/dist/gsd-workflow-guard.js +3 -2
- package/hooks/dist/gsd-worktree-path-guard.js +29 -2
- package/hooks/dist/lib/git-probe.js +16 -0
- package/hooks/dist/lib/isolation-sentinel.js +44 -0
- package/hooks/dist/managed-hooks-registry.cjs +1 -0
- package/hooks/gsd-agent-isolation-guard.js +11 -1
- package/hooks/gsd-cursor-subagent-start.js +6 -2
- package/hooks/gsd-graphify-update.sh +6 -0
- package/hooks/gsd-path-export.js +95 -0
- package/hooks/gsd-secret-read-guard.js +172 -39
- package/hooks/gsd-statusline.js +37 -3
- package/hooks/gsd-windsurf-pre-write.js +29 -2
- package/hooks/gsd-workflow-guard.js +3 -2
- package/hooks/gsd-worktree-path-guard.js +29 -2
- package/hooks/hooks.json +1 -0
- package/hooks/lib/git-probe.js +16 -0
- package/hooks/lib/isolation-sentinel.js +44 -0
- package/hooks/managed-hooks-registry.cjs +1 -0
- package/package.json +15 -8
- package/pi/gsd.cjs +1047 -10
- package/pi/package-agents/gsd-advisor-researcher.md +113 -0
- package/pi/package-agents/gsd-ai-researcher.md +111 -0
- package/pi/package-agents/gsd-assumptions-analyzer.md +110 -0
- package/pi/package-agents/gsd-code-fixer.md +774 -0
- package/pi/package-agents/gsd-code-reviewer.md +441 -0
- package/pi/package-agents/gsd-codebase-mapper.md +850 -0
- package/pi/package-agents/gsd-debug-session-manager.md +416 -0
- package/pi/package-agents/gsd-debugger.md +1274 -0
- package/pi/package-agents/gsd-doc-classifier.md +269 -0
- package/pi/package-agents/gsd-doc-synthesizer.md +259 -0
- package/pi/package-agents/gsd-doc-verifier.md +212 -0
- package/pi/package-agents/gsd-doc-writer.md +626 -0
- package/pi/package-agents/gsd-dom-verifier.md +164 -0
- package/pi/package-agents/gsd-domain-researcher.md +144 -0
- package/pi/package-agents/gsd-eval-auditor.md +185 -0
- package/pi/package-agents/gsd-eval-planner.md +149 -0
- package/pi/package-agents/gsd-executor.md +898 -0
- package/pi/package-agents/gsd-framework-selector.md +159 -0
- package/pi/package-agents/gsd-integration-checker.md +476 -0
- package/pi/package-agents/gsd-intel-updater.md +338 -0
- package/pi/package-agents/gsd-mempalace-curator.md +49 -0
- package/pi/package-agents/gsd-nyquist-auditor.md +200 -0
- package/pi/package-agents/gsd-pattern-mapper.md +340 -0
- package/pi/package-agents/gsd-phase-researcher.md +897 -0
- package/pi/package-agents/gsd-plan-checker.md +1077 -0
- package/pi/package-agents/gsd-planner.md +1003 -0
- package/pi/package-agents/gsd-project-researcher.md +611 -0
- package/pi/package-agents/gsd-research-synthesizer.md +259 -0
- package/pi/package-agents/gsd-roadmapper.md +779 -0
- package/pi/package-agents/gsd-security-auditor.md +171 -0
- package/pi/package-agents/gsd-ui-auditor.md +581 -0
- package/pi/package-agents/gsd-ui-checker.md +417 -0
- package/pi/package-agents/gsd-ui-researcher.md +469 -0
- package/pi/package-agents/gsd-user-profiler.md +174 -0
- package/pi/package-agents/gsd-verifier.md +963 -0
- package/pi/package-agents/manifest.json +39 -0
- package/pi/package-skills/gsd-add-tests/SKILL.md +39 -0
- package/pi/package-skills/gsd-ai-integration-phase/SKILL.md +36 -0
- package/pi/package-skills/gsd-audit-fix/SKILL.md +34 -0
- package/pi/package-skills/gsd-audit-milestone/SKILL.md +40 -0
- package/pi/package-skills/gsd-audit-uat/SKILL.md +26 -0
- package/pi/package-skills/gsd-autonomous/SKILL.md +52 -0
- package/pi/package-skills/gsd-capture/SKILL.md +68 -0
- package/pi/package-skills/gsd-cleanup/SKILL.md +25 -0
- package/pi/package-skills/gsd-code-review/SKILL.md +71 -0
- package/pi/package-skills/gsd-complete-milestone/SKILL.md +147 -0
- package/pi/package-skills/gsd-config/SKILL.md +60 -0
- package/pi/package-skills/gsd-debug/SKILL.md +64 -0
- package/pi/package-skills/gsd-discuss-phase/SKILL.md +74 -0
- package/pi/package-skills/gsd-docs-update/SKILL.md +50 -0
- package/pi/package-skills/gsd-eval-review/SKILL.md +35 -0
- package/pi/package-skills/gsd-execute-phase/SKILL.md +62 -0
- package/pi/package-skills/gsd-explore/SKILL.md +26 -0
- package/pi/package-skills/gsd-extract-learnings/SKILL.md +25 -0
- package/pi/package-skills/gsd-fast/SKILL.md +33 -0
- package/pi/package-skills/gsd-forensics/SKILL.md +59 -0
- package/pi/package-skills/gsd-graphify/SKILL.md +210 -0
- package/pi/package-skills/gsd-health/SKILL.md +36 -0
- package/pi/package-skills/gsd-help/SKILL.md +37 -0
- package/pi/package-skills/gsd-import/SKILL.md +46 -0
- package/pi/package-skills/gsd-inbox/SKILL.md +42 -0
- package/pi/package-skills/gsd-ingest-docs/SKILL.md +43 -0
- package/pi/package-skills/gsd-manager/SKILL.md +46 -0
- package/pi/package-skills/gsd-map-codebase/SKILL.md +85 -0
- package/pi/package-skills/gsd-mempalace-capture/SKILL.md +111 -0
- package/pi/package-skills/gsd-mempalace-recall/SKILL.md +111 -0
- package/pi/package-skills/gsd-milestone-summary/SKILL.md +54 -0
- package/pi/package-skills/gsd-mvp-phase/SKILL.md +45 -0
- package/pi/package-skills/gsd-new-milestone/SKILL.md +49 -0
- package/pi/package-skills/gsd-new-project/SKILL.md +49 -0
- package/pi/package-skills/gsd-next/SKILL.md +34 -0
- package/pi/package-skills/gsd-ns-context/SKILL.md +31 -0
- package/pi/package-skills/gsd-ns-ideate/SKILL.md +30 -0
- package/pi/package-skills/gsd-ns-manage/SKILL.md +42 -0
- package/pi/package-skills/gsd-ns-project/SKILL.md +34 -0
- package/pi/package-skills/gsd-ns-review/SKILL.md +35 -0
- package/pi/package-skills/gsd-ns-workflow/SKILL.md +44 -0
- package/pi/package-skills/gsd-onboard/SKILL.md +46 -0
- package/pi/package-skills/gsd-pause-work/SKILL.md +48 -0
- package/pi/package-skills/gsd-phase/SKILL.md +61 -0
- package/pi/package-skills/gsd-plan-phase/SKILL.md +62 -0
- package/pi/package-skills/gsd-plan-review-convergence/SKILL.md +63 -0
- package/pi/package-skills/gsd-pr-branch/SKILL.md +31 -0
- package/pi/package-skills/gsd-profile-user/SKILL.md +48 -0
- package/pi/package-skills/gsd-progress/SKILL.md +51 -0
- package/pi/package-skills/gsd-quick/SKILL.md +179 -0
- package/pi/package-skills/gsd-quick-batch/SKILL.md +114 -0
- package/pi/package-skills/gsd-resume-work/SKILL.md +31 -0
- package/pi/package-skills/gsd-review/SKILL.md +50 -0
- package/pi/package-skills/gsd-review-backlog/SKILL.md +65 -0
- package/pi/package-skills/gsd-secure-phase/SKILL.md +37 -0
- package/pi/package-skills/gsd-settings/SKILL.md +30 -0
- package/pi/package-skills/gsd-ship/SKILL.md +27 -0
- package/pi/package-skills/gsd-sketch/SKILL.md +56 -0
- package/pi/package-skills/gsd-spec-phase/SKILL.md +63 -0
- package/pi/package-skills/gsd-spike/SKILL.md +53 -0
- package/pi/package-skills/gsd-stats/SKILL.md +22 -0
- package/pi/package-skills/gsd-surface/SKILL.md +177 -0
- package/pi/package-skills/gsd-thread/SKILL.md +29 -0
- package/pi/package-skills/gsd-ui-phase/SKILL.md +35 -0
- package/pi/package-skills/gsd-ui-review/SKILL.md +35 -0
- package/pi/package-skills/gsd-ultraplan-phase/SKILL.md +38 -0
- package/pi/package-skills/gsd-undo/SKILL.md +38 -0
- package/pi/package-skills/gsd-update/SKILL.md +54 -0
- package/pi/package-skills/gsd-validate-phase/SKILL.md +37 -0
- package/pi/package-skills/gsd-verify-work/SKILL.md +41 -0
- package/pi/package-skills/gsd-workspace/SKILL.md +57 -0
- package/pi/package-skills/gsd-workstreams/SKILL.md +73 -0
- package/scripts/build-hooks.js +4 -0
- package/scripts/ci-next-health.cjs +246 -23
- package/scripts/command-contract-helpers.cjs +1 -1
- package/scripts/docs-guard-registry.cjs +22 -7
- package/scripts/gen-features.cjs +14 -2
- package/scripts/gen-health-docs.cjs +13 -1
- package/scripts/gen-pi-package-skills.cjs +217 -0
- package/scripts/lib/drift-scan.cjs +27 -0
- package/scripts/lib/macos-conformance-tier.generated.cjs +17 -1
- package/scripts/lib/platform-conformance-tier.generated.cjs +37 -1
- package/scripts/lint-docs-guard-registration.exempt-baseline.cjs +3 -3
- package/scripts/lint-phase-enumeration-drift.cjs +8 -4
- package/scripts/lint-retired-runtime-name.cjs +5 -0
- package/scripts/lint-roadmap-progress-drift.cjs +421 -0
- package/scripts/mutation-matrix.cjs +23 -1
- package/scripts/npm-audit-baseline.cjs +41 -7
- package/scripts/reviewed-or-maintainer-policy.cjs +181 -0
- package/scripts/select-docs-guards.cjs +1 -1
- package/scripts/self-test-report-policy.cjs +350 -0
- package/scripts/sync-next-version.cjs +38 -6
- package/skills/gsd-update/SKILL.md +5 -2
- package/vscode/package.json +1 -1
- package/scripts/diagnose-validate-commit-in-tier.cjs +0 -270
- package/scripts/diagnose-validate-commit-phases.cjs +0 -348
- package/scripts/xtrace-phase-timing.cjs +0 -205
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* gen-pi-package-skills.cjs — generates pi/package-skills/gsd-<stem>/SKILL.md,
|
|
6
|
+
* the Pi skill templates the Pi package (`pi install npm:@opengsd/gsd-core`)
|
|
7
|
+
* renders at session start.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* node scripts/gen-pi-package-skills.cjs # print summary
|
|
11
|
+
* node scripts/gen-pi-package-skills.cjs --write # write pi/package-skills/
|
|
12
|
+
* node scripts/gen-pi-package-skills.cjs --check # exit 1 if committed templates are stale
|
|
13
|
+
*
|
|
14
|
+
* #5558 (Phase 1b of epic #5556). Pi skill bodies embed the absolute path of the
|
|
15
|
+
* engine tree they `@`-include, and a package's install location is unknown at
|
|
16
|
+
* build time. So the templates are produced by running the real installer
|
|
17
|
+
* (`bin/install.js --pi --global --config-dir <tmp>`), then replacing the temp
|
|
18
|
+
* config dir with PI_ENGINE_ROOT_TOKEN. Rendering a template with a root R
|
|
19
|
+
* (`renderSkillTemplate`, exported for the parity test; pi/gsd.cjs carries the
|
|
20
|
+
* same two-line substitution) is therefore byte-identical to what the installer
|
|
21
|
+
* writes for config dir R.
|
|
22
|
+
*
|
|
23
|
+
* Depends on a built lib (`npm run build:lib`); must run after it in the build chain.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const fs = require('node:fs');
|
|
27
|
+
const os = require('node:os');
|
|
28
|
+
const crypto = require('node:crypto');
|
|
29
|
+
const path = require('node:path');
|
|
30
|
+
const { spawnSync } = require('node:child_process');
|
|
31
|
+
const { ExitError, runMain } = require('./lib/cli-exit.cjs');
|
|
32
|
+
|
|
33
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
34
|
+
const OUT_DIR = path.join(ROOT, 'pi', 'package-skills');
|
|
35
|
+
// #5569: the converted Pi role files the package's gsd_dispatch reads (ADR-5559 amendment).
|
|
36
|
+
const ROLES_DIR = path.join(ROOT, 'pi', 'package-agents');
|
|
37
|
+
const ROLES_MANIFEST = 'manifest.json';
|
|
38
|
+
const INSTALLER = path.join(ROOT, 'bin', 'install.js');
|
|
39
|
+
const PI_ENGINE_ROOT_TOKEN = '__GSD_PI_ENGINE_ROOT__';
|
|
40
|
+
const INSTALL_BOUND_MS = 30000;
|
|
41
|
+
|
|
42
|
+
/** Forward-slash form of a path; the installer emits either form depending on platform. */
|
|
43
|
+
function toSlash(p) {
|
|
44
|
+
return String(p).replace(/\\/g, '/');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Replace every occurrence of `root` (raw and forward-slash forms) with the token.
|
|
49
|
+
* @param {string} content
|
|
50
|
+
* @param {string} root
|
|
51
|
+
*/
|
|
52
|
+
function tokenizeSkill(content, root) {
|
|
53
|
+
// The installer may print either the path it was given or its symlink-resolved form (/private/var on macOS).
|
|
54
|
+
let real = root;
|
|
55
|
+
try { real = fs.realpathSync(root); } catch { /* removed already: only the given form */ }
|
|
56
|
+
const forms = [...new Set([root, toSlash(root), real, toSlash(real)])].sort((a, b) => b.length - a.length);
|
|
57
|
+
let out = content;
|
|
58
|
+
for (const form of forms) out = out.split(form).join(PI_ENGINE_ROOT_TOKEN);
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Render a template for an engine root. The root is substituted in its
|
|
64
|
+
* forward-slash form, which is what the installer writes for the Pi skills.
|
|
65
|
+
* @param {string} template
|
|
66
|
+
* @param {string} engineRoot
|
|
67
|
+
*/
|
|
68
|
+
function renderSkillTemplate(template, engineRoot) {
|
|
69
|
+
return template.split(PI_ENGINE_ROOT_TOKEN).join(toSlash(engineRoot));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Run the installer for Pi into a fresh temp dir and return that dir. The run
|
|
74
|
+
* gets a separate throwaway HOME (removed straight after): the two must differ,
|
|
75
|
+
* because the installer writes a config dir that equals or sits under HOME as
|
|
76
|
+
* `~`/`$HOME`-relative paths.
|
|
77
|
+
*/
|
|
78
|
+
function installIntoTemp() {
|
|
79
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-pi-skills-'));
|
|
80
|
+
const home = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-pi-home-'));
|
|
81
|
+
const res = spawnSync(process.execPath, [INSTALLER, '--pi', '--global', '--config-dir', tmp], {
|
|
82
|
+
cwd: ROOT,
|
|
83
|
+
encoding: 'utf8',
|
|
84
|
+
timeout: INSTALL_BOUND_MS,
|
|
85
|
+
windowsHide: true,
|
|
86
|
+
// HOME is redirected too: the installer writes GSD's global defaults store under
|
|
87
|
+
// $HOME/.gsd, and a generator run must not touch the developer's real one.
|
|
88
|
+
// GSD_ARGS_NONCE_OFF keeps the templates canonical: they ship in the package, so a per-install
|
|
89
|
+
// nonce stamped here would be a build-time constant and would change on every generation.
|
|
90
|
+
env: { ...process.env, PI_CODING_AGENT_DIR: tmp, HOME: home, USERPROFILE: home, GSD_HOME: home, GSD_ARGS_NONCE_OFF: '1' },
|
|
91
|
+
});
|
|
92
|
+
fs.rmSync(home, { recursive: true, force: true });
|
|
93
|
+
if (res.status !== 0) {
|
|
94
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
95
|
+
throw new ExitError(
|
|
96
|
+
1,
|
|
97
|
+
`gen-pi-package-skills: installer failed (${res.error ? res.error.message : `exit ${res.status}`}).\n` +
|
|
98
|
+
`${(res.stderr || res.stdout || '').slice(-1500)}\nRun \`npm run build:lib\` first.`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
return tmp;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The role templates and their hash manifest, from an installed `agents/` dir. Roles `@`-reference
|
|
106
|
+
* files under the engine root, so like the skills they ship with PI_ENGINE_ROOT_TOKEN in place of the
|
|
107
|
+
* install path; gsd_dispatch verifies the template bytes against this manifest, then renders the root.
|
|
108
|
+
* @returns {{ roles: { name: string, content: string }[], manifest: string }}
|
|
109
|
+
*/
|
|
110
|
+
function collectRoles(tmp) {
|
|
111
|
+
const dir = path.join(tmp, 'agents');
|
|
112
|
+
const roles = fs.readdirSync(dir, { withFileTypes: true })
|
|
113
|
+
.filter((e) => e.isFile() && e.name.endsWith('.md'))
|
|
114
|
+
.map((e) => e.name)
|
|
115
|
+
.sort()
|
|
116
|
+
.map((name) => ({ name, content: tokenizeSkill(fs.readFileSync(path.join(dir, name), 'utf8'), tmp) }));
|
|
117
|
+
const files = {};
|
|
118
|
+
for (const { name, content } of roles) files[name] = crypto.createHash('sha256').update(content).digest('hex');
|
|
119
|
+
return { roles, manifest: `${JSON.stringify({ files }, null, 2)}\n` };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** @returns {{ templates: { skillName: string, content: string }[], roles: { name: string, content: string }[], manifest: string }} */
|
|
123
|
+
function generateAll() {
|
|
124
|
+
const tmp = installIntoTemp();
|
|
125
|
+
try {
|
|
126
|
+
const skillsDir = path.join(tmp, 'skills');
|
|
127
|
+
const names = fs.readdirSync(skillsDir, { withFileTypes: true })
|
|
128
|
+
.filter((e) => e.isDirectory() && e.name.startsWith('gsd-'))
|
|
129
|
+
.map((e) => e.name)
|
|
130
|
+
.sort();
|
|
131
|
+
const templates = names.map((skillName) => ({
|
|
132
|
+
skillName,
|
|
133
|
+
content: tokenizeSkill(fs.readFileSync(path.join(skillsDir, skillName, 'SKILL.md'), 'utf8'), tmp),
|
|
134
|
+
}));
|
|
135
|
+
return { templates, ...collectRoles(tmp) };
|
|
136
|
+
} finally {
|
|
137
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** @returns {{ skillName: string, content: string }[]} sorted by skill name */
|
|
142
|
+
function generateTemplates() {
|
|
143
|
+
return generateAll().templates;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function main() {
|
|
147
|
+
const args = new Set(process.argv.slice(2));
|
|
148
|
+
const { templates: results, roles, manifest } = generateAll();
|
|
149
|
+
|
|
150
|
+
if (args.has('--write')) {
|
|
151
|
+
fs.rmSync(ROLES_DIR, { recursive: true, force: true });
|
|
152
|
+
fs.mkdirSync(ROLES_DIR, { recursive: true });
|
|
153
|
+
for (const { name, content } of roles) fs.writeFileSync(path.join(ROLES_DIR, name), content);
|
|
154
|
+
fs.writeFileSync(path.join(ROLES_DIR, ROLES_MANIFEST), manifest);
|
|
155
|
+
fs.rmSync(OUT_DIR, { recursive: true, force: true });
|
|
156
|
+
for (const { skillName, content } of results) {
|
|
157
|
+
fs.mkdirSync(path.join(OUT_DIR, skillName), { recursive: true });
|
|
158
|
+
fs.writeFileSync(path.join(OUT_DIR, skillName, 'SKILL.md'), content);
|
|
159
|
+
}
|
|
160
|
+
process.stdout.write(`gen-pi-package-skills: wrote ${results.length} templates to ${path.relative(ROOT, OUT_DIR)}/ and ${roles.length} roles to ${path.relative(ROOT, ROLES_DIR)}/\n`);
|
|
161
|
+
return 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (args.has('--check')) {
|
|
165
|
+
if (!fs.existsSync(OUT_DIR)) {
|
|
166
|
+
throw new ExitError(1, 'gen-pi-package-skills: pi/package-skills/ missing. Run: npm run gen:pi-package-skills');
|
|
167
|
+
}
|
|
168
|
+
let stale = 0;
|
|
169
|
+
const expected = new Set(results.map((r) => r.skillName));
|
|
170
|
+
for (const { skillName, content } of results) {
|
|
171
|
+
const file = path.join(OUT_DIR, skillName, 'SKILL.md');
|
|
172
|
+
if (!fs.existsSync(file)) {
|
|
173
|
+
process.stderr.write(`gen-pi-package-skills: missing ${path.relative(ROOT, file)}\n`);
|
|
174
|
+
stale++;
|
|
175
|
+
} else if (fs.readFileSync(file, 'utf8') !== content) {
|
|
176
|
+
process.stderr.write(`gen-pi-package-skills: stale ${path.relative(ROOT, file)}\n`);
|
|
177
|
+
stale++;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
for (const e of fs.readdirSync(OUT_DIR, { withFileTypes: true })) {
|
|
181
|
+
if (e.isDirectory() && !expected.has(e.name)) {
|
|
182
|
+
process.stderr.write(`gen-pi-package-skills: stale (no source) ${path.relative(ROOT, path.join(OUT_DIR, e.name))}\n`);
|
|
183
|
+
stale++;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const wantRoles = new Map([...roles.map((r) => [r.name, r.content]), [ROLES_MANIFEST, manifest]]);
|
|
187
|
+
const haveRoles = fs.existsSync(ROLES_DIR) ? fs.readdirSync(ROLES_DIR) : [];
|
|
188
|
+
for (const [name, content] of wantRoles) {
|
|
189
|
+
const file = path.join(ROLES_DIR, name);
|
|
190
|
+
if (!fs.existsSync(file) || fs.readFileSync(file, 'utf8') !== content) {
|
|
191
|
+
process.stderr.write(`gen-pi-package-skills: stale ${path.relative(ROOT, file)}\n`);
|
|
192
|
+
stale++;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
for (const name of haveRoles) {
|
|
196
|
+
if (!wantRoles.has(name)) {
|
|
197
|
+
process.stderr.write(`gen-pi-package-skills: stale (no source) ${path.relative(ROOT, path.join(ROLES_DIR, name))}\n`);
|
|
198
|
+
stale++;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (stale > 0) {
|
|
202
|
+
throw new ExitError(1, `gen-pi-package-skills: ${stale} stale template(s). Run: npm run gen:pi-package-skills`);
|
|
203
|
+
}
|
|
204
|
+
process.stdout.write(`gen-pi-package-skills: ${results.length} templates up to date\n`);
|
|
205
|
+
return 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
process.stdout.write(
|
|
209
|
+
`gen-pi-package-skills: would write ${results.length} templates to ${path.relative(ROOT, OUT_DIR)}/\n` +
|
|
210
|
+
' (use --write to generate, --check to verify staleness)\n',
|
|
211
|
+
);
|
|
212
|
+
return 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
module.exports = { PI_ENGINE_ROOT_TOKEN, tokenizeSkill, renderSkillTemplate, toSlash, generateTemplates, generateAll };
|
|
216
|
+
|
|
217
|
+
if (require.main === module) runMain(main);
|
|
@@ -294,12 +294,39 @@ function sanitizeForReport(text) {
|
|
|
294
294
|
.replace(/[\u200B-\u200F\u2028\u2029\u202A-\u202E\u2066-\u2069]/g, (c) => '\\u' + c.charCodeAt(0).toString(16).padStart(4, '0'));
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Read the quoted or backtick-delimited string literal starting at `line[start]`
|
|
299
|
+
* (which must be `'`, `"`, or a backtick). Returns `{ text, end }` (`text`
|
|
300
|
+
* includes both delimiters, `end` is the index one past the literal) or null when
|
|
301
|
+
* no close quote is found within MAX_REGEX_LITERAL_LEN characters. Same single
|
|
302
|
+
* left-to-right, no-backtracking, escape-aware pass as `readRegexLiteralAt` (a
|
|
303
|
+
* `\x` escape consumes both characters, so an escaped quote never ends the
|
|
304
|
+
* literal early). A literal cannot span lines in a per-line scan. The older drift
|
|
305
|
+
* guards each carry their own byte-identical copy; new guards import this one.
|
|
306
|
+
*/
|
|
307
|
+
function readStringLiteralAt(line, start) {
|
|
308
|
+
const quote = line[start];
|
|
309
|
+
if (quote !== "'" && quote !== '"' && quote !== '`') return null;
|
|
310
|
+
const limit = Math.min(line.length, start + MAX_REGEX_LITERAL_LEN);
|
|
311
|
+
for (let i = start + 1; i < limit; i++) {
|
|
312
|
+
const ch = line[i];
|
|
313
|
+
if (ch === '\\') {
|
|
314
|
+
i++;
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
if (ch === '\r' || ch === '\n') return null;
|
|
318
|
+
if (ch === quote) return { text: line.slice(start, i + 1), end: i + 1 };
|
|
319
|
+
}
|
|
320
|
+
return null;
|
|
321
|
+
}
|
|
322
|
+
|
|
297
323
|
module.exports = {
|
|
298
324
|
SKIP_DIR_NAMES,
|
|
299
325
|
isInsideRoot,
|
|
300
326
|
isUnderSkippedDir,
|
|
301
327
|
walk,
|
|
302
328
|
readRegexLiteralAt,
|
|
329
|
+
readStringLiteralAt,
|
|
303
330
|
MAX_REGEX_LITERAL_LEN,
|
|
304
331
|
sanitizeForReport,
|
|
305
332
|
scanTree,
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
module.exports = {
|
|
8
8
|
MACOS_CONFORMANCE_TIER_FILES: [
|
|
9
|
+
"tests/5100-win32-bare-bash-sentinel.property.test.cjs",
|
|
9
10
|
"tests/active-workstream-store.unit.test.cjs",
|
|
10
11
|
"tests/adr-612-bracket-phase-counting.test.cjs",
|
|
12
|
+
"tests/adr-612-bracket-phase-remove.test.cjs",
|
|
13
|
+
"tests/adr-612-bracket-write-path.test.cjs",
|
|
11
14
|
"tests/adr-index-gate.test.cjs",
|
|
12
15
|
"tests/adr-parser.property.test.cjs",
|
|
13
16
|
"tests/adr-parser.unit.test.cjs",
|
|
@@ -16,6 +19,7 @@ module.exports = {
|
|
|
16
19
|
"tests/agent-skills.test.cjs",
|
|
17
20
|
"tests/api-coverage-gate-e2e.test.cjs",
|
|
18
21
|
"tests/api-coverage.test.cjs",
|
|
22
|
+
"tests/args-terminator-nonce.test.cjs",
|
|
19
23
|
"tests/ask-user-questions-fallback.test.cjs",
|
|
20
24
|
"tests/audit-command-cutover.test.cjs",
|
|
21
25
|
"tests/broken-windows.test.cjs",
|
|
@@ -38,6 +42,7 @@ module.exports = {
|
|
|
38
42
|
"tests/check-ui-safety-gate.test.cjs",
|
|
39
43
|
"tests/check-update-config-dir.test.cjs",
|
|
40
44
|
"tests/chunked-planning-parallel.test.cjs",
|
|
45
|
+
"tests/ci-conformance-pr-gating.test.cjs",
|
|
41
46
|
"tests/ci-docs-guard-registry.test.cjs",
|
|
42
47
|
"tests/ci-test-scope.test.cjs",
|
|
43
48
|
"tests/cline-install.test.cjs",
|
|
@@ -60,6 +65,7 @@ module.exports = {
|
|
|
60
65
|
"tests/contributor-standards.test.cjs",
|
|
61
66
|
"tests/core-utils.test.cjs",
|
|
62
67
|
"tests/cursor-subagent-isolation.test.cjs",
|
|
68
|
+
"tests/custom-phase-readers.test.cjs",
|
|
63
69
|
"tests/debugger-semantic-recall.test.cjs",
|
|
64
70
|
"tests/default-flip-documentation-lint.test.cjs",
|
|
65
71
|
"tests/discuss-phase-power.test.cjs",
|
|
@@ -82,6 +88,7 @@ module.exports = {
|
|
|
82
88
|
"tests/gap-checker.property.test.cjs",
|
|
83
89
|
"tests/gate-api-coverage-verify-pre-escape.test.cjs",
|
|
84
90
|
"tests/gate-codebase-drift.unit.test.cjs",
|
|
91
|
+
"tests/gate-evaluation-scope.test.cjs",
|
|
85
92
|
"tests/gate-predicate.unit.test.cjs",
|
|
86
93
|
"tests/gate-tdd-red-evidence-containment.test.cjs",
|
|
87
94
|
"tests/gate-ui-plan.unit.test.cjs",
|
|
@@ -90,9 +97,11 @@ module.exports = {
|
|
|
90
97
|
"tests/gen-context-index.test.cjs",
|
|
91
98
|
"tests/gen-section-manifest.test.cjs",
|
|
92
99
|
"tests/git-base-branch.test.cjs",
|
|
100
|
+
"tests/git-location-env-scrub.test.cjs",
|
|
93
101
|
"tests/graphify-query.test.cjs",
|
|
94
102
|
"tests/graphify-visualization.test.cjs",
|
|
95
103
|
"tests/gsd-agent-isolation-guard.test.cjs",
|
|
104
|
+
"tests/gsd-path-export-hook.test.cjs",
|
|
96
105
|
"tests/gsd-secret-read-guard.test.cjs",
|
|
97
106
|
"tests/gsd-settings-advanced.test.cjs",
|
|
98
107
|
"tests/gsd-statusline.test.cjs",
|
|
@@ -107,7 +116,6 @@ module.exports = {
|
|
|
107
116
|
"tests/hooks-crash-policy.test.cjs",
|
|
108
117
|
"tests/hooks-opt-in.test.cjs",
|
|
109
118
|
"tests/host-integration.test.cjs",
|
|
110
|
-
"tests/in-tier-commit-hook-timing.test.cjs",
|
|
111
119
|
"tests/init-manager.test.cjs",
|
|
112
120
|
"tests/install-minimal-hooks.test.cjs",
|
|
113
121
|
"tests/install-path-detection.test.cjs",
|
|
@@ -135,6 +143,7 @@ module.exports = {
|
|
|
135
143
|
"tests/markdown-sectionizer.test.cjs",
|
|
136
144
|
"tests/mcp-catalog.test.cjs",
|
|
137
145
|
"tests/milestone-archive.test.cjs",
|
|
146
|
+
"tests/milestone-release-tags.test.cjs",
|
|
138
147
|
"tests/milestone-window-single-owner.test.cjs",
|
|
139
148
|
"tests/model-catalog.unit.test.cjs",
|
|
140
149
|
"tests/model-resolver.test.cjs",
|
|
@@ -163,6 +172,8 @@ module.exports = {
|
|
|
163
172
|
"tests/phase-status.test.cjs",
|
|
164
173
|
"tests/phase.platform.test.cjs",
|
|
165
174
|
"tests/phase.test.cjs",
|
|
175
|
+
"tests/pi-dispatch.test.cjs",
|
|
176
|
+
"tests/pi-package.test.cjs",
|
|
166
177
|
"tests/plan-authoring-verification-gaps.test.cjs",
|
|
167
178
|
"tests/plan-count-single-owner.test.cjs",
|
|
168
179
|
"tests/plan-document.test.cjs",
|
|
@@ -195,11 +206,13 @@ module.exports = {
|
|
|
195
206
|
"tests/retired-artifact-cleanup.test.cjs",
|
|
196
207
|
"tests/review-build-prompt-optional-sections.test.cjs",
|
|
197
208
|
"tests/review-lane-invocation.test.cjs",
|
|
209
|
+
"tests/review-lane-prompt-cap.test.cjs",
|
|
198
210
|
"tests/review-lane-runner.test.cjs",
|
|
199
211
|
"tests/review-lane-windows-spawn-resolution.test.cjs",
|
|
200
212
|
"tests/review-parallel-lanes.test.cjs",
|
|
201
213
|
"tests/review-plan-coverage-manifest.test.cjs",
|
|
202
214
|
"tests/review-reviewer-selection.test.cjs",
|
|
215
|
+
"tests/reviewed-or-maintainer-policy.test.cjs",
|
|
203
216
|
"tests/reviewer-manifest-body.test.cjs",
|
|
204
217
|
"tests/reviewer-step-dispatch.test.cjs",
|
|
205
218
|
"tests/roadmap-mode-field.test.cjs",
|
|
@@ -214,11 +227,14 @@ module.exports = {
|
|
|
214
227
|
"tests/runtime-launcher-parity.test.cjs",
|
|
215
228
|
"tests/runtime-name-policy.test.cjs",
|
|
216
229
|
"tests/security.test.cjs",
|
|
230
|
+
"tests/self-test-report-policy.test.cjs",
|
|
217
231
|
"tests/settings-jsonc.test.cjs",
|
|
218
232
|
"tests/shared-hooks-dir-resolution.test.cjs",
|
|
219
233
|
"tests/shell-command-projection-dispatch.test.cjs",
|
|
234
|
+
"tests/shell-command-projection-md-normalize.test.cjs",
|
|
220
235
|
"tests/shipped-reference-cites.test.cjs",
|
|
221
236
|
"tests/skill-manifest.test.cjs",
|
|
237
|
+
"tests/smart-entry.unit.test.cjs",
|
|
222
238
|
"tests/spawn-liveness-banner.test.cjs",
|
|
223
239
|
"tests/state-document.test.cjs",
|
|
224
240
|
"tests/state-transition.test.cjs",
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
CONFORMANCE_TIER_FILES: [
|
|
6
|
+
"tests/5100-win32-bare-bash-sentinel.property.test.cjs",
|
|
7
|
+
"tests/adr-612-bracket-new-project-config.test.cjs",
|
|
8
|
+
"tests/adr-612-bracket-phase-remove.test.cjs",
|
|
9
|
+
"tests/adr-612-bracket-write-path.test.cjs",
|
|
6
10
|
"tests/adr-index-gate.test.cjs",
|
|
7
11
|
"tests/adr857-core-without-capabilities.test.cjs",
|
|
8
12
|
"tests/agent-install-check.test.cjs",
|
|
@@ -11,6 +15,7 @@ module.exports = {
|
|
|
11
15
|
"tests/antigravity-upgrades.test.cjs",
|
|
12
16
|
"tests/api-coverage-gate-e2e.test.cjs",
|
|
13
17
|
"tests/api-coverage.test.cjs",
|
|
18
|
+
"tests/args-terminator-nonce.test.cjs",
|
|
14
19
|
"tests/assumption-delta-checkpoint-e2e.test.cjs",
|
|
15
20
|
"tests/assumption-delta.test.cjs",
|
|
16
21
|
"tests/audit-command-cutover.test.cjs",
|
|
@@ -42,6 +47,7 @@ module.exports = {
|
|
|
42
47
|
"tests/check-update-config-dir.test.cjs",
|
|
43
48
|
"tests/check-update-fail-open.test.cjs",
|
|
44
49
|
"tests/chunked-planning-parallel.test.cjs",
|
|
50
|
+
"tests/ci-conformance-pr-gating.test.cjs",
|
|
45
51
|
"tests/ci-docs-guard-registry.test.cjs",
|
|
46
52
|
"tests/ci-rebase-check.test.cjs",
|
|
47
53
|
"tests/ci-test-scope.test.cjs",
|
|
@@ -49,7 +55,9 @@ module.exports = {
|
|
|
49
55
|
"tests/claude-md.test.cjs",
|
|
50
56
|
"tests/cline-install.test.cjs",
|
|
51
57
|
"tests/close-phase-todos-padded-resolves.test.cjs",
|
|
58
|
+
"tests/code-review-cicd.test.cjs",
|
|
52
59
|
"tests/code-review-fix-pipeline-regression.test.cjs",
|
|
60
|
+
"tests/code-review-necessity.test.cjs",
|
|
53
61
|
"tests/code-review-pipeline-regression.test.cjs",
|
|
54
62
|
"tests/code-review-tier3-files-override-scoping.test.cjs",
|
|
55
63
|
"tests/code-review.test.cjs",
|
|
@@ -67,6 +75,7 @@ module.exports = {
|
|
|
67
75
|
"tests/commit-files-pathspec.test.cjs",
|
|
68
76
|
"tests/commonjs-marker.test.cjs",
|
|
69
77
|
"tests/compact-content-4139.test.cjs",
|
|
78
|
+
"tests/complete-milestone-release-map-routing.test.cjs",
|
|
70
79
|
"tests/completion-ratio-scope-withholding.test.cjs",
|
|
71
80
|
"tests/config-defaults-runtime-exclusion.test.cjs",
|
|
72
81
|
"tests/config-get-default.test.cjs",
|
|
@@ -82,6 +91,7 @@ module.exports = {
|
|
|
82
91
|
"tests/cursor-hook-workspace-roots.test.cjs",
|
|
83
92
|
"tests/cursor-hooks.test.cjs",
|
|
84
93
|
"tests/cursor-subagent-isolation.test.cjs",
|
|
94
|
+
"tests/custom-phase-readers.test.cjs",
|
|
85
95
|
"tests/debug-session-management.test.cjs",
|
|
86
96
|
"tests/defaults-json-fallback.test.cjs",
|
|
87
97
|
"tests/diagnose-windows-spawn-watcher.test.cjs",
|
|
@@ -121,6 +131,7 @@ module.exports = {
|
|
|
121
131
|
"tests/gate-tdd-red-evidence-containment.test.cjs",
|
|
122
132
|
"tests/gate-tdd-review-checkpoint-hardening.test.cjs",
|
|
123
133
|
"tests/gate-tdd-review-checkpoint.unit.test.cjs",
|
|
134
|
+
"tests/gate-tdd-review-order-5275.test.cjs",
|
|
124
135
|
"tests/gate-ui-plan.unit.test.cjs",
|
|
125
136
|
"tests/gate-ui-safety.unit.test.cjs",
|
|
126
137
|
"tests/gate-verify-command-paths.unit.test.cjs",
|
|
@@ -129,6 +140,8 @@ module.exports = {
|
|
|
129
140
|
"tests/gen-health-docs.test.cjs",
|
|
130
141
|
"tests/gen-section-manifest.test.cjs",
|
|
131
142
|
"tests/git-base-branch.test.cjs",
|
|
143
|
+
"tests/git-location-env-scrub.test.cjs",
|
|
144
|
+
"tests/git-optional-locks-parity.test.cjs",
|
|
132
145
|
"tests/golden-install-tree.test.cjs",
|
|
133
146
|
"tests/graphify-graph-path.test.cjs",
|
|
134
147
|
"tests/graphify-visualization.test.cjs",
|
|
@@ -137,6 +150,8 @@ module.exports = {
|
|
|
137
150
|
"tests/gsd-check-update-worker-atomic-cache.test.cjs",
|
|
138
151
|
"tests/gsd-check-update-worker-platform-gate.test.cjs",
|
|
139
152
|
"tests/gsd-mcp-server-bin.test.cjs",
|
|
153
|
+
"tests/gsd-mcp-server.test.cjs",
|
|
154
|
+
"tests/gsd-path-export-hook.test.cjs",
|
|
140
155
|
"tests/gsd-statusline.test.cjs",
|
|
141
156
|
"tests/gsd-validate-commit-crash-policy.test.cjs",
|
|
142
157
|
"tests/gsd-validate-commit-sigpipe.test.cjs",
|
|
@@ -162,6 +177,7 @@ module.exports = {
|
|
|
162
177
|
"tests/install-runtime-artifacts.test.cjs",
|
|
163
178
|
"tests/install-write-confinement.test.cjs",
|
|
164
179
|
"tests/install.test.cjs",
|
|
180
|
+
"tests/installer-first-install-user-skill-5522.test.cjs",
|
|
165
181
|
"tests/installer-migration-antigravity-retire-confighome-artifacts.test.cjs",
|
|
166
182
|
"tests/installer-migration-config-root-marker.test.cjs",
|
|
167
183
|
"tests/installer-migration-pi-retire-hooks-dir.test.cjs",
|
|
@@ -171,6 +187,7 @@ module.exports = {
|
|
|
171
187
|
"tests/intel.test.cjs",
|
|
172
188
|
"tests/inventory-nested-families.test.cjs",
|
|
173
189
|
"tests/io.test.cjs",
|
|
190
|
+
"tests/isolation-aged-none-sentinel.test.cjs",
|
|
174
191
|
"tests/isolation-sentinel.test.cjs",
|
|
175
192
|
"tests/kilo-upgrades.test.cjs",
|
|
176
193
|
"tests/kimi-agent-converter.test.cjs",
|
|
@@ -188,6 +205,9 @@ module.exports = {
|
|
|
188
205
|
"tests/mcp-catalog.property.test.cjs",
|
|
189
206
|
"tests/mcp-catalog.test.cjs",
|
|
190
207
|
"tests/milestone-archive.test.cjs",
|
|
208
|
+
"tests/milestone-lock.test.cjs",
|
|
209
|
+
"tests/milestone-release-map-archive.test.cjs",
|
|
210
|
+
"tests/milestone-release-tags.test.cjs",
|
|
191
211
|
"tests/milestone-window-single-owner.test.cjs",
|
|
192
212
|
"tests/milestone.test.cjs",
|
|
193
213
|
"tests/model-resolver.test.cjs",
|
|
@@ -204,10 +224,12 @@ module.exports = {
|
|
|
204
224
|
"tests/no-unbounded-spawn.test.cjs",
|
|
205
225
|
"tests/no-unguarded-nonportable-exec.rule.test.cjs",
|
|
206
226
|
"tests/node-compile-cache.test.cjs",
|
|
227
|
+
"tests/npm-audit-baseline-safe-directory-5659.test.cjs",
|
|
207
228
|
"tests/npm-audit-baseline.test.cjs",
|
|
208
229
|
"tests/npm-integrity-gate.test.cjs",
|
|
209
230
|
"tests/nsegment-phase-grammar.test.cjs",
|
|
210
231
|
"tests/onboard-command.test.cjs",
|
|
232
|
+
"tests/opencode-advisory-stderr.test.cjs",
|
|
211
233
|
"tests/opencode-command-dir-plural.test.cjs",
|
|
212
234
|
"tests/opencode-config-jsonc.test.cjs",
|
|
213
235
|
"tests/opencode-generations.smoke.test.cjs",
|
|
@@ -228,6 +250,10 @@ module.exports = {
|
|
|
228
250
|
"tests/phase.platform.test.cjs",
|
|
229
251
|
"tests/phase6-capstone-conformance.test.cjs",
|
|
230
252
|
"tests/pi-config-dir-env-override.test.cjs",
|
|
253
|
+
"tests/pi-dispatch-install.test.cjs",
|
|
254
|
+
"tests/pi-dispatch.test.cjs",
|
|
255
|
+
"tests/pi-hook-bridge.test.cjs",
|
|
256
|
+
"tests/pi-package.test.cjs",
|
|
231
257
|
"tests/plan-count-single-owner.test.cjs",
|
|
232
258
|
"tests/plan-phase-stall-detection.test.cjs",
|
|
233
259
|
"tests/plan-pre-hook-e2e.test.cjs",
|
|
@@ -250,6 +276,7 @@ module.exports = {
|
|
|
250
276
|
"tests/process-seam.test.cjs",
|
|
251
277
|
"tests/profile-output.test.cjs",
|
|
252
278
|
"tests/profile-pipeline.test.cjs",
|
|
279
|
+
"tests/progress-drift-guard.test.cjs",
|
|
253
280
|
"tests/prohibition-enforcement.test.cjs",
|
|
254
281
|
"tests/project-root.test.cjs",
|
|
255
282
|
"tests/quick-batch-command-router.stdin.test.cjs",
|
|
@@ -269,7 +296,10 @@ module.exports = {
|
|
|
269
296
|
"tests/retired-artifact-cleanup.test.cjs",
|
|
270
297
|
"tests/review-build-prompt-optional-sections.test.cjs",
|
|
271
298
|
"tests/review-default-reviewers-config.test.cjs",
|
|
299
|
+
"tests/review-lane-availability.test.cjs",
|
|
272
300
|
"tests/review-lane-invocation.test.cjs",
|
|
301
|
+
"tests/review-lane-no-redirect-5433.test.cjs",
|
|
302
|
+
"tests/review-lane-prompt-cap.test.cjs",
|
|
273
303
|
"tests/review-lane-runner.test.cjs",
|
|
274
304
|
"tests/review-lane-windows-spawn-resolution.test.cjs",
|
|
275
305
|
"tests/review-model-config.test.cjs",
|
|
@@ -280,6 +310,7 @@ module.exports = {
|
|
|
280
310
|
"tests/revision-remediation-binding.test.cjs",
|
|
281
311
|
"tests/roadmap-parser.test.cjs",
|
|
282
312
|
"tests/roadmap-upgrade-bracket.test.cjs",
|
|
313
|
+
"tests/roadmap-upgrade.test.cjs",
|
|
283
314
|
"tests/roadmap.test.cjs",
|
|
284
315
|
"tests/run-tests-accounting.test.cjs",
|
|
285
316
|
"tests/run-tests-harness.test.cjs",
|
|
@@ -293,16 +324,20 @@ module.exports = {
|
|
|
293
324
|
"tests/runtime-identity.test.cjs",
|
|
294
325
|
"tests/runtime-launcher-parity.test.cjs",
|
|
295
326
|
"tests/schema-drift.test.cjs",
|
|
327
|
+
"tests/section-manifest-init-facts.test.cjs",
|
|
296
328
|
"tests/security.test.cjs",
|
|
329
|
+
"tests/self-test-report-policy.test.cjs",
|
|
297
330
|
"tests/settings-jsonc.test.cjs",
|
|
298
331
|
"tests/sh-hook-paths.test.cjs",
|
|
299
332
|
"tests/shared-hooks-dir-resolution.test.cjs",
|
|
300
333
|
"tests/shell-command-projection-dispatch.test.cjs",
|
|
334
|
+
"tests/shell-command-projection-md-normalize.test.cjs",
|
|
301
335
|
"tests/shell-command-projection-path-sep.test.cjs",
|
|
302
336
|
"tests/ship-notes-wedged-pr.test.cjs",
|
|
303
337
|
"tests/shipped-reference-cites.test.cjs",
|
|
304
338
|
"tests/skill-manifest.test.cjs",
|
|
305
339
|
"tests/slug-derivation-drift-guard.test.cjs",
|
|
340
|
+
"tests/smart-entry.unit.test.cjs",
|
|
306
341
|
"tests/state-todos-render.test.cjs",
|
|
307
342
|
"tests/state.platform.test.cjs",
|
|
308
343
|
"tests/subject-first-line.platform.test.cjs",
|
|
@@ -321,6 +356,7 @@ module.exports = {
|
|
|
321
356
|
"tests/unusable-input.test.cjs",
|
|
322
357
|
"tests/update-custom-backup.test.cjs",
|
|
323
358
|
"tests/user-artifact-staging.test.cjs",
|
|
359
|
+
"tests/user-home-isolation-5594.test.cjs",
|
|
324
360
|
"tests/verification-append-audit.test.cjs",
|
|
325
361
|
"tests/verification-status.test.cjs",
|
|
326
362
|
"tests/verify-archive-dirs-live-path.test.cjs",
|
|
@@ -336,7 +372,7 @@ module.exports = {
|
|
|
336
372
|
"tests/workstream.test.cjs",
|
|
337
373
|
"tests/worktree-cleanup.test.cjs",
|
|
338
374
|
"tests/worktree-safety.test.cjs",
|
|
375
|
+
"tests/worktree-subdir-effective-root-4885.test.cjs",
|
|
339
376
|
"tests/worktree.test.cjs",
|
|
340
|
-
"tests/xtrace-phase-timing.platform.test.cjs",
|
|
341
377
|
],
|
|
342
378
|
};
|
|
@@ -122,10 +122,10 @@ const DOCS_GUARD_EXEMPT_DOCS_PATHS = {
|
|
|
122
122
|
// reads that (or any) docs/ file.
|
|
123
123
|
'capability-validator-task-content-resolver.test.cjs': ['docs/adr/3646-per-task-content-resolution-seam.md'],
|
|
124
124
|
'ci-docs-guard-registry.test.cjs': [
|
|
125
|
-
'docs/
|
|
125
|
+
'docs/COMMANDS.md', 'docs/INVENTORY.md', 'docs/a.md', 'docs/adr',
|
|
126
126
|
'docs/adr/0001-example.md', 'docs/adrenaline.md', 'docs/bar.md', 'docs/foo.md', 'docs/how-to/foo.md',
|
|
127
|
-
'docs/how-to/some-unrelated-guide.md', 'docs/how-to/x.md', 'docs/
|
|
128
|
-
'docs/totally-unrelated.md',
|
|
127
|
+
'docs/how-to/some-unrelated-guide.md', 'docs/how-to/x.md', 'docs/reference/agents.md',
|
|
128
|
+
'docs/some-unrelated-file.md', 'docs/totally-unrelated.md',
|
|
129
129
|
],
|
|
130
130
|
// #4641: cites docs/adr/4641-windows-selector-consolidation.md in an
|
|
131
131
|
// explanatory comment describing why the retired `windows` scope must not
|
|
@@ -191,6 +191,10 @@
|
|
|
191
191
|
* WHOLE ROADMAP (not milestone-scoped) for existing `2.N` ids — an id
|
|
192
192
|
* collision it must avoid can come from any milestone, so it needs the
|
|
193
193
|
* physical set, matching the CREATE-adjacent exemption category.
|
|
194
|
+
* - `src/phase.cts` `collectPhaseDirNums` (#5528): the allocators' one on-disk scan,
|
|
195
|
+
* run over the cwd's phases dir (cmdPhaseAdd/cmdPhaseAddBatch) and a sibling worktree's
|
|
196
|
+
* (collectSiblingWorktreePhaseNums). It builds the set of USED phase numbers across
|
|
197
|
+
* checkouts, not a milestone-scoped list, so listMilestonePhaseDirs cannot serve it.
|
|
194
198
|
* - `src/phase.cts` `cmdPhasePlanIndex`: resolves ONE caller-supplied
|
|
195
199
|
* `phase` id to its directory — a single-phase LOCATION lookup, not an
|
|
196
200
|
* enumeration of the current milestone's phase set.
|
|
@@ -316,10 +320,10 @@ const FUNCTION_SCOPED_EXEMPTIONS = new Map([
|
|
|
316
320
|
[path.join('src', 'gate-phase-context.cts'), new Set(['resolvePhaseDirByToken'])],
|
|
317
321
|
[path.join('src', 'init.cts'), new Set(['detectHasPriorPhases', 'detectUiPhaseActive'])],
|
|
318
322
|
[path.join('src', 'milestone.cts'), new Set(['archivePhaseDirectories', 'cmdMilestoneComplete', 'cmdPhasesClear'])],
|
|
319
|
-
// #3849:
|
|
320
|
-
// a
|
|
321
|
-
//
|
|
322
|
-
[path.join('src', 'phase.cts'), new Set(['cmdPhasesList', 'cmdPhaseNextDecimal', 'cmdPhasePlanIndex', 'cmdPhaseInsert', 'renameDecimalPhases', 'renameIntegerPhases', '
|
|
323
|
+
// #3849/#5528: collectPhaseDirNums is the allocators' one on-disk scan (the cwd's phases dir for
|
|
324
|
+
// cmdPhaseAdd/cmdPhaseAddBatch, a sibling worktree's for collectSiblingWorktreePhaseNums). It is a
|
|
325
|
+
// used-NUMBER roster across checkouts, not the milestone-scoped list listMilestonePhaseDirs serves.
|
|
326
|
+
[path.join('src', 'phase.cts'), new Set(['cmdPhasesList', 'cmdPhaseNextDecimal', 'cmdPhasePlanIndex', 'cmdPhaseInsert', 'renameDecimalPhases', 'renameIntegerPhases', 'collectPhaseDirNums'])],
|
|
323
327
|
[path.join('src', 'audit.cts'), new Set(['listAuditPhaseTargets'])],
|
|
324
328
|
[path.join('src', 'commands.cts'), new Set(['cmdHistoryDigest'])],
|
|
325
329
|
[path.join('src', 'state.cts'), new Set(['cmdStateValidate', 'cmdStateSync', 'cmdStateRebuild', 'countRoadmapPhaseHeadings'])],
|
|
@@ -234,6 +234,11 @@ const ALLOWLIST_OCCURRENCES = new Map([
|
|
|
234
234
|
{ snippet: 'Google (Gemini)', reason: 'model-provider choice, not a GSD runtime' },
|
|
235
235
|
{ snippet: 'Committed to Gemini / Google Cloud / Vertex AI', reason: 'the same menu entry\'s description' },
|
|
236
236
|
]],
|
|
237
|
+
['pi/package-agents/gsd-framework-selector.md', [
|
|
238
|
+
// Generated copy of agents/gsd-framework-selector.md for the Pi package (#5569).
|
|
239
|
+
{ snippet: 'Google (Gemini)', reason: 'model-provider choice, not a GSD runtime' },
|
|
240
|
+
{ snippet: 'Committed to Gemini / Google Cloud / Vertex AI', reason: 'the same menu entry\'s description' },
|
|
241
|
+
]],
|
|
237
242
|
['agents/gsd-framework-selector.compact.md', [
|
|
238
243
|
{ snippet: 'Google (Gemini)', reason: 'model-provider choice, not a GSD runtime' },
|
|
239
244
|
]],
|