gsd-pi 2.38.0-dev.7209774 → 2.38.0-dev.785052f

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.
Files changed (81) hide show
  1. package/README.md +15 -11
  2. package/dist/resources/extensions/gsd/auto-prompts.js +171 -4
  3. package/dist/resources/extensions/gsd/doctor-providers.js +3 -0
  4. package/dist/resources/extensions/gsd/files.js +42 -7
  5. package/dist/resources/extensions/gsd/gitignore.js +16 -3
  6. package/dist/resources/extensions/gsd/guided-flow.js +67 -6
  7. package/dist/resources/extensions/gsd/health-widget-core.js +32 -70
  8. package/dist/resources/extensions/gsd/health-widget.js +3 -86
  9. package/dist/resources/extensions/gsd/migrate-external.js +18 -1
  10. package/dist/resources/extensions/gsd/preferences.js +17 -9
  11. package/dist/resources/extensions/gsd/prompt-loader.js +6 -2
  12. package/dist/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
  13. package/dist/resources/extensions/gsd/prompts/complete-slice.md +1 -1
  14. package/dist/resources/extensions/gsd/prompts/execute-task.md +1 -1
  15. package/dist/resources/extensions/gsd/prompts/guided-complete-slice.md +1 -1
  16. package/dist/resources/extensions/gsd/prompts/guided-execute-task.md +1 -1
  17. package/dist/resources/extensions/gsd/prompts/guided-plan-milestone.md +1 -1
  18. package/dist/resources/extensions/gsd/prompts/guided-plan-slice.md +1 -1
  19. package/dist/resources/extensions/gsd/prompts/guided-research-slice.md +1 -1
  20. package/dist/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
  21. package/dist/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
  22. package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
  23. package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +1 -1
  24. package/dist/resources/extensions/gsd/prompts/research-milestone.md +1 -1
  25. package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -1
  26. package/dist/resources/extensions/gsd/prompts/run-uat.md +1 -1
  27. package/dist/resources/extensions/gsd/state.js +41 -22
  28. package/dist/resources/extensions/gsd/templates/task-plan.md +3 -0
  29. package/dist/resources/extensions/remote-questions/status.js +4 -2
  30. package/dist/resources/extensions/remote-questions/store.js +4 -2
  31. package/dist/resources/extensions/shared/frontmatter.js +1 -1
  32. package/package.json +1 -1
  33. package/packages/pi-coding-agent/dist/core/skills.d.ts +1 -0
  34. package/packages/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
  35. package/packages/pi-coding-agent/dist/core/skills.js +6 -1
  36. package/packages/pi-coding-agent/dist/core/skills.js.map +1 -1
  37. package/packages/pi-coding-agent/dist/index.d.ts +1 -1
  38. package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
  39. package/packages/pi-coding-agent/dist/index.js +1 -1
  40. package/packages/pi-coding-agent/dist/index.js.map +1 -1
  41. package/packages/pi-coding-agent/src/core/skills.ts +9 -1
  42. package/packages/pi-coding-agent/src/index.ts +1 -0
  43. package/src/resources/extensions/gsd/auto-prompts.ts +213 -4
  44. package/src/resources/extensions/gsd/doctor-providers.ts +4 -0
  45. package/src/resources/extensions/gsd/files.ts +46 -8
  46. package/src/resources/extensions/gsd/gitignore.ts +17 -3
  47. package/src/resources/extensions/gsd/guided-flow.ts +67 -6
  48. package/src/resources/extensions/gsd/health-widget-core.ts +28 -80
  49. package/src/resources/extensions/gsd/health-widget.ts +3 -89
  50. package/src/resources/extensions/gsd/migrate-external.ts +18 -1
  51. package/src/resources/extensions/gsd/preferences.ts +20 -9
  52. package/src/resources/extensions/gsd/prompt-loader.ts +7 -2
  53. package/src/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
  54. package/src/resources/extensions/gsd/prompts/complete-slice.md +1 -1
  55. package/src/resources/extensions/gsd/prompts/execute-task.md +1 -1
  56. package/src/resources/extensions/gsd/prompts/guided-complete-slice.md +1 -1
  57. package/src/resources/extensions/gsd/prompts/guided-execute-task.md +1 -1
  58. package/src/resources/extensions/gsd/prompts/guided-plan-milestone.md +1 -1
  59. package/src/resources/extensions/gsd/prompts/guided-plan-slice.md +1 -1
  60. package/src/resources/extensions/gsd/prompts/guided-research-slice.md +1 -1
  61. package/src/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
  62. package/src/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
  63. package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
  64. package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +1 -1
  65. package/src/resources/extensions/gsd/prompts/research-milestone.md +1 -1
  66. package/src/resources/extensions/gsd/prompts/research-slice.md +1 -1
  67. package/src/resources/extensions/gsd/prompts/run-uat.md +1 -1
  68. package/src/resources/extensions/gsd/state.ts +38 -20
  69. package/src/resources/extensions/gsd/templates/task-plan.md +3 -0
  70. package/src/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +4 -3
  71. package/src/resources/extensions/gsd/tests/derive-state.test.ts +43 -0
  72. package/src/resources/extensions/gsd/tests/gitignore-tracked-gsd.test.ts +50 -0
  73. package/src/resources/extensions/gsd/tests/health-widget.test.ts +16 -54
  74. package/src/resources/extensions/gsd/tests/parsers.test.ts +131 -14
  75. package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +209 -0
  76. package/src/resources/extensions/gsd/tests/run-uat.test.ts +5 -1
  77. package/src/resources/extensions/gsd/tests/skill-activation.test.ts +140 -0
  78. package/src/resources/extensions/gsd/types.ts +10 -0
  79. package/src/resources/extensions/remote-questions/status.ts +4 -2
  80. package/src/resources/extensions/remote-questions/store.ts +4 -2
  81. package/src/resources/extensions/shared/frontmatter.ts +1 -1
@@ -11,12 +11,10 @@ import { runProviderChecks, summariseProviderIssues } from "./doctor-providers.j
11
11
  import { runEnvironmentChecks } from "./doctor-environment.js";
12
12
  import { loadEffectiveGSDPreferences } from "./preferences.js";
13
13
  import { loadLedgerFromDisk, getProjectTotals } from "./metrics.js";
14
- import { describeNextUnit, estimateTimeRemaining, updateSliceProgressCache } from "./auto-dashboard.js";
15
14
  import { projectRoot } from "./commands.js";
16
- import { deriveState, invalidateStateCache } from "./state.js";
17
15
  import { buildHealthLines, detectHealthWidgetProjectState, } from "./health-widget-core.js";
18
16
  // ── Data loader ────────────────────────────────────────────────────────────────
19
- function loadBaseHealthWidgetData(basePath) {
17
+ function loadHealthWidgetData(basePath) {
20
18
  let budgetCeiling;
21
19
  let budgetSpent = 0;
22
20
  let providerIssue = null;
@@ -58,86 +56,6 @@ function loadBaseHealthWidgetData(basePath) {
58
56
  lastRefreshed: Date.now(),
59
57
  };
60
58
  }
61
- function compactText(text, max = 64) {
62
- const trimmed = text.replace(/\s+/g, " ").trim();
63
- if (trimmed.length <= max)
64
- return trimmed;
65
- return `${trimmed.slice(0, max - 1).trimEnd()}…`;
66
- }
67
- function summarizeExecutionStatus(state) {
68
- switch (state.phase) {
69
- case "blocked": return "Blocked";
70
- case "paused": return "Paused";
71
- case "complete": return "Complete";
72
- case "executing": return "Executing";
73
- case "planning": return "Planning";
74
- case "pre-planning": return "Pre-planning";
75
- case "summarizing": return "Summarizing";
76
- case "validating-milestone": return "Validating";
77
- case "completing-milestone": return "Completing";
78
- case "needs-discussion": return "Needs discussion";
79
- case "replanning-slice": return "Replanning";
80
- default: return "Active";
81
- }
82
- }
83
- function summarizeExecutionTarget(state) {
84
- switch (state.phase) {
85
- case "needs-discussion":
86
- return state.activeMilestone ? `Discuss ${state.activeMilestone.id}` : "Discuss milestone draft";
87
- case "pre-planning":
88
- return state.activeMilestone ? `Plan ${state.activeMilestone.id}` : "Research & plan milestone";
89
- case "planning":
90
- return state.activeSlice ? `Plan ${state.activeSlice.id}` : "Plan next slice";
91
- case "executing":
92
- return state.activeTask ? `Execute ${state.activeTask.id}` : "Execute next task";
93
- case "summarizing":
94
- return state.activeSlice ? `Complete ${state.activeSlice.id}` : "Complete current slice";
95
- case "validating-milestone":
96
- return state.activeMilestone ? `Validate ${state.activeMilestone.id}` : "Validate milestone";
97
- case "completing-milestone":
98
- return state.activeMilestone ? `Complete ${state.activeMilestone.id}` : "Complete milestone";
99
- case "replanning-slice":
100
- return state.activeSlice ? `Replan ${state.activeSlice.id}` : "Replan current slice";
101
- case "blocked":
102
- return `waiting on ${compactText(state.blockers[0] ?? state.nextAction, 56)}`;
103
- case "paused":
104
- return compactText(state.nextAction || "waiting to resume", 56);
105
- case "complete":
106
- return "All milestones complete";
107
- default:
108
- return compactText(describeNextUnit(state).label, 56);
109
- }
110
- }
111
- async function enrichHealthWidgetData(basePath, baseData) {
112
- if (baseData.projectState !== "active")
113
- return baseData;
114
- try {
115
- invalidateStateCache();
116
- const state = await deriveState(basePath);
117
- if (state.activeMilestone) {
118
- // Warm the slice-progress cache so estimateTimeRemaining() has data
119
- updateSliceProgressCache(basePath, state.activeMilestone.id, state.activeSlice?.id);
120
- }
121
- return {
122
- ...baseData,
123
- executionPhase: state.phase,
124
- executionStatus: summarizeExecutionStatus(state),
125
- executionTarget: summarizeExecutionTarget(state),
126
- nextAction: state.nextAction,
127
- blocker: state.blockers[0] ?? null,
128
- activeMilestoneId: state.activeMilestone?.id,
129
- activeSliceId: state.activeSlice?.id,
130
- activeTaskId: state.activeTask?.id,
131
- progress: state.progress,
132
- eta: state.phase === "blocked" || state.phase === "paused" || state.phase === "complete"
133
- ? null
134
- : estimateTimeRemaining(),
135
- };
136
- }
137
- catch {
138
- return baseData;
139
- }
140
- }
141
59
  // ── Widget init ────────────────────────────────────────────────────────────────
142
60
  const REFRESH_INTERVAL_MS = 60_000;
143
61
  /**
@@ -149,7 +67,7 @@ export function initHealthWidget(ctx) {
149
67
  return;
150
68
  const basePath = projectRoot();
151
69
  // String-array fallback — used in RPC mode (factory is a no-op there)
152
- const initialData = loadBaseHealthWidgetData(basePath);
70
+ const initialData = loadHealthWidgetData(basePath);
153
71
  ctx.ui.setWidget("gsd-health", buildHealthLines(initialData), { placement: "belowEditor" });
154
72
  // Factory-based widget for TUI mode — replaces the string-array above
155
73
  ctx.ui.setWidget("gsd-health", (_tui, _theme) => {
@@ -161,8 +79,7 @@ export function initHealthWidget(ctx) {
161
79
  return;
162
80
  refreshInFlight = true;
163
81
  try {
164
- const baseData = loadBaseHealthWidgetData(basePath);
165
- data = await enrichHealthWidgetData(basePath, baseData);
82
+ data = loadHealthWidgetData(basePath);
166
83
  cachedLines = undefined;
167
84
  _tui.requestRender();
168
85
  }
@@ -5,11 +5,13 @@
5
5
  * `~/.gsd/projects/<hash>/` state directory. After migration, a
6
6
  * symlink replaces the original directory so all paths remain valid.
7
7
  */
8
+ import { execFileSync } from "node:child_process";
8
9
  import { existsSync, lstatSync, mkdirSync, readdirSync, realpathSync, renameSync, cpSync, rmSync, symlinkSync } from "node:fs";
9
10
  import { join } from "node:path";
10
11
  import { externalGsdRoot } from "./repo-identity.js";
11
12
  import { getErrorMessage } from "./error-utils.js";
12
13
  import { hasGitTrackedGsdFiles } from "./gitignore.js";
14
+ import { GIT_NO_PROMPT_ENV } from "./git-constants.js";
13
15
  /**
14
16
  * Migrate a legacy in-project `.gsd/` directory to external storage.
15
17
  *
@@ -142,7 +144,22 @@ export function migrateToExternalState(basePath) {
142
144
  catch { /* best-effort restore */ }
143
145
  return { migrated: false, error: `Migration verification failed: ${getErrorMessage(verifyErr)}` };
144
146
  }
145
- // Remove .gsd.migrating only after symlink is verified
147
+ // Clean the git index — any .gsd/* files tracked before migration now
148
+ // sit behind the symlink and git can't follow it, causing them to show
149
+ // as deleted. Remove them from the index so the working tree stays clean.
150
+ // --ignore-unmatch makes this a no-op on fresh projects with no tracked .gsd/.
151
+ try {
152
+ execFileSync("git", ["rm", "-r", "--cached", "--ignore-unmatch", ".gsd"], {
153
+ cwd: basePath,
154
+ stdio: ["ignore", "pipe", "ignore"],
155
+ env: GIT_NO_PROMPT_ENV,
156
+ timeout: 10_000,
157
+ });
158
+ }
159
+ catch {
160
+ // Non-fatal — git may be unavailable or nothing was tracked
161
+ }
162
+ // Remove .gsd.migrating only after symlink is verified and index is clean
146
163
  rmSync(migratingPath, { recursive: true, force: true });
147
164
  return { migrated: true };
148
165
  }
@@ -12,7 +12,6 @@
12
12
  import { existsSync, readFileSync } from "node:fs";
13
13
  import { homedir } from "node:os";
14
14
  import { join } from "node:path";
15
- const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd");
16
15
  import { gsdRoot } from "./paths.js";
17
16
  import { parse as parseYaml } from "yaml";
18
17
  import { normalizeStringArray } from "../shared/format-utils.js";
@@ -27,31 +26,40 @@ export { resolveAllSkillReferences, resolveSkillDiscoveryMode, resolveSkillStale
27
26
  // ─── Re-exports: models ─────────────────────────────────────────────────────
28
27
  export { resolveModelForUnit, resolveModelWithFallbacksForUnit, getNextFallbackModel, isTransientNetworkError, validateModelId, updatePreferencesModels, resolveDynamicRoutingConfig, resolveAutoSupervisorConfig, resolveProfileDefaults, resolveEffectiveProfile, resolveInlineLevel, resolveContextSelection, resolveSearchProviderFromPreferences, } from "./preferences-models.js";
29
28
  // ─── Path Constants & Getters ───────────────────────────────────────────────
30
- const GLOBAL_PREFERENCES_PATH = join(gsdHome, "preferences.md");
31
- const LEGACY_GLOBAL_PREFERENCES_PATH = join(homedir(), ".pi", "agent", "gsd-preferences.md");
29
+ function gsdHome() {
30
+ return process.env.GSD_HOME || join(homedir(), ".gsd");
31
+ }
32
+ function globalPreferencesPath() {
33
+ return join(gsdHome(), "preferences.md");
34
+ }
35
+ function legacyGlobalPreferencesPath() {
36
+ return join(homedir(), ".pi", "agent", "gsd-preferences.md");
37
+ }
32
38
  function projectPreferencesPath() {
33
39
  return join(gsdRoot(process.cwd()), "preferences.md");
34
40
  }
35
41
  // Bootstrap in gitignore.ts historically created PREFERENCES.md (uppercase) by mistake.
36
42
  // Check uppercase as a fallback so those files aren't silently ignored.
37
- const GLOBAL_PREFERENCES_PATH_UPPERCASE = join(gsdHome, "PREFERENCES.md");
43
+ function globalPreferencesPathUppercase() {
44
+ return join(gsdHome(), "PREFERENCES.md");
45
+ }
38
46
  function projectPreferencesPathUppercase() {
39
47
  return join(gsdRoot(process.cwd()), "PREFERENCES.md");
40
48
  }
41
49
  export function getGlobalGSDPreferencesPath() {
42
- return GLOBAL_PREFERENCES_PATH;
50
+ return globalPreferencesPath();
43
51
  }
44
52
  export function getLegacyGlobalGSDPreferencesPath() {
45
- return LEGACY_GLOBAL_PREFERENCES_PATH;
53
+ return legacyGlobalPreferencesPath();
46
54
  }
47
55
  export function getProjectGSDPreferencesPath() {
48
56
  return projectPreferencesPath();
49
57
  }
50
58
  // ─── Loading ────────────────────────────────────────────────────────────────
51
59
  export function loadGlobalGSDPreferences() {
52
- return loadPreferencesFile(GLOBAL_PREFERENCES_PATH, "global")
53
- ?? loadPreferencesFile(GLOBAL_PREFERENCES_PATH_UPPERCASE, "global")
54
- ?? loadPreferencesFile(LEGACY_GLOBAL_PREFERENCES_PATH, "global");
60
+ return loadPreferencesFile(globalPreferencesPath(), "global")
61
+ ?? loadPreferencesFile(globalPreferencesPathUppercase(), "global")
62
+ ?? loadPreferencesFile(legacyGlobalPreferencesPath(), "global");
55
63
  }
56
64
  export function loadProjectGSDPreferences() {
57
65
  return loadPreferencesFile(projectPreferencesPath(), "project")
@@ -74,6 +74,10 @@ export function loadPrompt(name, vars = {}) {
74
74
  content = readFileSync(path, "utf-8");
75
75
  templateCache.set(name, content);
76
76
  }
77
+ const effectiveVars = {
78
+ skillActivation: "If a `GSD Skill Preferences` block is present in system context, use it and the `<available_skills>` catalog in your system prompt to decide which skills to load and follow for this unit, without relaxing required verification or artifact rules.",
79
+ ...vars,
80
+ };
77
81
  // Check BEFORE substitution: find all {{varName}} placeholders the template
78
82
  // declares and verify every one has a value in vars. Checking after substitution
79
83
  // would also flag {{...}} patterns injected by inlined content (e.g. template
@@ -82,14 +86,14 @@ export function loadPrompt(name, vars = {}) {
82
86
  if (declared) {
83
87
  const missing = [...new Set(declared)]
84
88
  .map(m => m.slice(2, -2))
85
- .filter(key => !(key in vars));
89
+ .filter(key => !(key in effectiveVars));
86
90
  if (missing.length > 0) {
87
91
  throw new GSDError(GSD_PARSE_ERROR, `loadPrompt("${name}"): template declares {{${missing.join("}}, {{")}}}} but no value was provided. ` +
88
92
  `This usually means the extension code in memory is older than the template on disk. ` +
89
93
  `Restart pi to reload the extension.`);
90
94
  }
91
95
  }
92
- for (const [key, value] of Object.entries(vars)) {
96
+ for (const [key, value] of Object.entries(effectiveVars)) {
93
97
  content = content.replaceAll(`{{${key}}}`, value);
94
98
  }
95
99
  return content.trim();
@@ -16,7 +16,7 @@ All relevant context has been preloaded below — the roadmap, all slice summari
16
16
 
17
17
  Then:
18
18
  1. Use the **Milestone Summary** output template from the inlined context above
19
- 2. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during completion, without relaxing required verification or artifact rules
19
+ 2. {{skillActivation}}
20
20
  3. Verify each **success criterion** from the milestone definition in `{{roadmapPath}}`. For each criterion, confirm it was met with specific evidence from slice summaries, test results, or observable behavior. List any criterion that was NOT met.
21
21
  4. Verify the milestone's **definition of done** — all slices are `[x]`, all slice summaries exist, and any cross-slice integration points work correctly.
22
22
  5. Validate **requirement status transitions**. For each requirement that changed status during this milestone, confirm the transition is supported by evidence. Requirements can move between Active, Validated, Deferred, Blocked, or Out of Scope — but only with proof.
@@ -20,7 +20,7 @@ All relevant context has been preloaded below — the slice plan, all task summa
20
20
 
21
21
  Then:
22
22
  1. Use the **Slice Summary** and **UAT** output templates from the inlined context above
23
- 2. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during completion, without relaxing required verification or artifact rules
23
+ 2. {{skillActivation}}
24
24
  3. Run all slice-level verification checks defined in the slice plan. All must pass before marking the slice done. If any fail, fix them first.
25
25
  4. If the slice plan includes observability/diagnostic surfaces, confirm they work. Skip this for simple slices that don't have observability sections.
26
26
  5. If `.gsd/REQUIREMENTS.md` exists, update it based on what this slice actually proved. Move requirements between Active, Validated, Deferred, Blocked, or Out of Scope only when the evidence from execution supports that change.
@@ -28,7 +28,7 @@ A researcher explored the codebase and a planner decomposed the work — you are
28
28
 
29
29
  Then:
30
30
  0. Narrate step transitions, key implementation decisions, and verification outcomes as you work. Keep it terse — one line between tool-call clusters, not between every call — but write complete sentences in user-facing prose, not shorthand notes or scratchpad fragments.
31
- 1. **Load relevant skills before writing code.** Check the `GSD Skill Preferences` block in system context and the `<available_skills>` catalog in your system prompt. For each skill that matches this task's technology stack (e.g., React, Next.js, accessibility, component design), `read` its SKILL.md file now. Skills contain implementation rules and patterns that should guide your code. If no skills match this task, skip this step.
31
+ 1. {{skillActivation}} Follow any activated skills before writing code. If no skills match this task, skip this step.
32
32
  2. Execute the steps in the inlined task plan, adapting minor local mismatches when the surrounding code differs from the planner's snapshot
33
33
  3. Build the real thing. If the task plan says "create login endpoint", build an endpoint that actually authenticates against a real store, not one that returns a hardcoded success response. If the task plan says "create dashboard page", build a page that renders real data from the API, not a component with hardcoded props. Stubs and mocks are for tests, not for the shipped feature.
34
34
  4. Write or update tests as part of execution — tests are verification, not an afterthought. If the slice plan defines test files in its Verification section and this is the first task, create them (they should initially fail).
@@ -1,3 +1,3 @@
1
- Complete slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Your working directory is `{{workingDirectory}}` — all file operations must use this path. All tasks are done. Your slice summary is the primary record of what was built — downstream agents (reassess-roadmap, future slice researchers) read it to understand what this slice delivered and what to watch out for. Use the **Slice Summary** and **UAT** output templates below. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during completion, without relaxing required verification or artifact rules. Write `{{sliceId}}-SUMMARY.md` (compress task summaries), write `{{sliceId}}-UAT.md`, and fill the `UAT Type` plus `Not Proven By This UAT` sections explicitly so the artifact states what class of acceptance it covers and what still remains unproven. Review task summaries for `key_decisions` and ensure any significant ones are in `.gsd/DECISIONS.md`. Mark the slice checkbox done in the roadmap, update milestone summary, Do not commit or merge manually — the system handles this after the unit completes.
1
+ Complete slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Your working directory is `{{workingDirectory}}` — all file operations must use this path. All tasks are done. Your slice summary is the primary record of what was built — downstream agents (reassess-roadmap, future slice researchers) read it to understand what this slice delivered and what to watch out for. Use the **Slice Summary** and **UAT** output templates below. {{skillActivation}} Write `{{sliceId}}-SUMMARY.md` (compress task summaries), write `{{sliceId}}-UAT.md`, and fill the `UAT Type` plus `Not Proven By This UAT` sections explicitly so the artifact states what class of acceptance it covers and what still remains unproven. Review task summaries for `key_decisions` and ensure any significant ones are in `.gsd/DECISIONS.md`. Mark the slice checkbox done in the roadmap, update milestone summary, Do not commit or merge manually — the system handles this after the unit completes.
2
2
 
3
3
  {{inlinedTemplates}}
@@ -1,3 +1,3 @@
1
- Execute the next task: {{taskId}} ("{{taskTitle}}") in slice {{sliceId}} of milestone {{milestoneId}}. Read the task plan (`{{taskId}}-PLAN.md`), load relevant summaries from prior tasks, and execute each step. Verify must-haves when done. If the task touches UI, browser flows, DOM behavior, or user-visible web state, exercise the real flow in the browser, prefer `browser_batch` for obvious sequences, prefer `browser_assert` for explicit pass/fail verification, use `browser_diff` when an action's effect is ambiguous, and use browser diagnostics when validating async or failure-prone UI. If you made an architectural, pattern, or library decision, append it to `.gsd/DECISIONS.md`. Use the **Task Summary** output template below. Write `{{taskId}}-SUMMARY.md`, mark it done, commit, and advance. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during execution, without relaxing required verification or artifact rules. If running long and not all steps are finished, stop implementing and prioritize writing a clean partial summary over attempting one more step — a recoverable handoff is more valuable than a half-finished step with no documentation. If verification fails, debug methodically: form a hypothesis and test that specific theory before changing anything, change one variable at a time, read entire functions not just the suspect line, distinguish observable facts from assumptions, and if 3+ fixes fail without progress stop and reassess your mental model — list what you know for certain, what you've ruled out, and form fresh hypotheses. Don't fix symptoms — understand why something fails before changing code.
1
+ Execute the next task: {{taskId}} ("{{taskTitle}}") in slice {{sliceId}} of milestone {{milestoneId}}. Read the task plan (`{{taskId}}-PLAN.md`), load relevant summaries from prior tasks, and execute each step. Verify must-haves when done. If the task touches UI, browser flows, DOM behavior, or user-visible web state, exercise the real flow in the browser, prefer `browser_batch` for obvious sequences, prefer `browser_assert` for explicit pass/fail verification, use `browser_diff` when an action's effect is ambiguous, and use browser diagnostics when validating async or failure-prone UI. If you made an architectural, pattern, or library decision, append it to `.gsd/DECISIONS.md`. Use the **Task Summary** output template below. Write `{{taskId}}-SUMMARY.md`, mark it done, commit, and advance. {{skillActivation}} If running long and not all steps are finished, stop implementing and prioritize writing a clean partial summary over attempting one more step — a recoverable handoff is more valuable than a half-finished step with no documentation. If verification fails, debug methodically: form a hypothesis and test that specific theory before changing anything, change one variable at a time, read entire functions not just the suspect line, distinguish observable facts from assumptions, and if 3+ fixes fail without progress stop and reassess your mental model — list what you know for certain, what you've ruled out, and form fresh hypotheses. Don't fix symptoms — understand why something fails before changing code.
2
2
 
3
3
  {{inlinedTemplates}}
@@ -1,4 +1,4 @@
1
- Plan milestone {{milestoneId}} ("{{milestoneTitle}}"). Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists and treat Active requirements as the capability contract. If `REQUIREMENTS.md` is missing, continue in legacy compatibility mode but explicitly note missing requirement coverage. Use the **Roadmap** output template below. Create `{{milestoneId}}-ROADMAP.md` in the milestone directory with slices, risk levels, dependencies, demo sentences, verification classes, milestone definition of done, requirement coverage, and a boundary map. Write success criteria as observable truths, not implementation tasks. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required roadmap formatting.
1
+ Plan milestone {{milestoneId}} ("{{milestoneTitle}}"). Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists and treat Active requirements as the capability contract. If `REQUIREMENTS.md` is missing, continue in legacy compatibility mode but explicitly note missing requirement coverage. Use the **Roadmap** output template below. Create `{{milestoneId}}-ROADMAP.md` in the milestone directory with slices, risk levels, dependencies, demo sentences, verification classes, milestone definition of done, requirement coverage, and a boundary map. Write success criteria as observable truths, not implementation tasks. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`. {{skillActivation}}
2
2
 
3
3
  ## Requirement Rules
4
4
 
@@ -1,3 +1,3 @@
1
- Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Use the **Slice Plan** and **Task Plan** output templates below. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains. Write `{{sliceId}}-PLAN.md` and individual `T##-PLAN.md` files in the `tasks/` subdirectory. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required plan formatting. Before committing, self-audit the plan: every must-have maps to at least one task, every task has complete sections (steps, must-haves, verification, observability impact, inputs, and expected output), task ordering is consistent with no circular references, every pair of artifacts that must connect has an explicit wiring step, task scope targets 2–5 steps and 3–8 files (6–8 steps or 8–10 files — consider splitting; 10+ steps or 12+ files — must split), the plan honors locked decisions from context/research/decisions artifacts, the proof-level wording does not overclaim live integration if only fixture/contract proof is planned, every Active requirement this slice owns has at least one task with verification that proves it is met, and every task produces real user-facing progress — if the slice has a UI surface at least one task builds the real UI, if it has an API at least one task connects it to a real data source, and showing the completed result to a non-technical stakeholder would demonstrate real product progress rather than developer artifacts.
1
+ Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Use the **Slice Plan** and **Task Plan** output templates below. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains. Write `{{sliceId}}-PLAN.md` and individual `T##-PLAN.md` files in the `tasks/` subdirectory. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`. {{skillActivation}} Before committing, self-audit the plan: every must-have maps to at least one task, every task has complete sections (steps, must-haves, verification, observability impact, inputs, and expected output), task ordering is consistent with no circular references, every pair of artifacts that must connect has an explicit wiring step, task scope targets 2–5 steps and 3–8 files (6–8 steps or 8–10 files — consider splitting; 10+ steps or 12+ files — must split), the plan honors locked decisions from context/research/decisions artifacts, the proof-level wording does not overclaim live integration if only fixture/contract proof is planned, every Active requirement this slice owns has at least one task with verification that proves it is met, and every task produces real user-facing progress — if the slice has a UI surface at least one task builds the real UI, if it has an API at least one task connects it to a real data source, and showing the completed result to a non-technical stakeholder would demonstrate real product progress rather than developer artifacts.
2
2
 
3
3
  {{inlinedTemplates}}
@@ -1,4 +1,4 @@
1
- Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during research, without relaxing required verification or artifact rules. Explore the relevant code — use `rg`/`find` for targeted reads, or `scout` if the area is broad or unfamiliar. Check libraries with `resolve_library`/`get_library_docs` — skip this for libraries already used in the codebase. Use the **Research** output template below. Write `{{sliceId}}-RESEARCH.md` in the slice directory.
1
+ Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements. {{skillActivation}} Explore the relevant code — use `rg`/`find` for targeted reads, or `scout` if the area is broad or unfamiliar. Check libraries with `resolve_library`/`get_library_docs` — skip this for libraries already used in the codebase. Use the **Research** output template below. Write `{{sliceId}}-RESEARCH.md` in the slice directory.
2
2
 
3
3
  **You are the scout.** A planner agent reads your output in a fresh context to decompose this slice into tasks. Write for the planner — surface key files, where the work divides naturally, what to build first, and how to verify. If the research doc is vague, the planner re-explores code you already read. If it's precise, the planner decomposes immediately.
4
4
 
@@ -1 +1 @@
1
- Resume interrupted work. Find the continue file (`{{sliceId}}-CONTINUE.md` or `continue.md`) in slice {{sliceId}} of milestone {{milestoneId}}, read it, and use it as the recovery contract for where to pick up. Do **not** delete the continue file immediately. Keep it until the task is successfully completed or you have written a newer summary/continue artifact that clearly supersedes it. If the resumed attempt fails again, update or replace the continue file so no recovery context is lost. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during execution, without relaxing required verification or artifact rules.
1
+ Resume interrupted work. Find the continue file (`{{sliceId}}-CONTINUE.md` or `continue.md`) in slice {{sliceId}} of milestone {{milestoneId}}, read it, and use it as the recovery contract for where to pick up. Do **not** delete the continue file immediately. Keep it until the task is successfully completed or you have written a newer summary/continue artifact that clearly supersedes it. If the resumed attempt fails again, update or replace the continue file so no recovery context is lost. {{skillActivation}}
@@ -44,7 +44,7 @@ Narrate your decomposition reasoning — why you're grouping work this way, what
44
44
 
45
45
  Then:
46
46
  1. Use the **Roadmap** output template from the inlined context above
47
- 2. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required roadmap formatting
47
+ 2. {{skillActivation}}
48
48
  3. Create the roadmap: decompose into demoable vertical slices — as many as the work genuinely needs, no more. A simple feature might be 1 slice. Don't decompose for decomposition's sake.
49
49
  4. Order by risk (high-risk first)
50
50
  5. Write `{{outputPath}}` with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, **requirement coverage**, and a boundary map. Write success criteria as observable truths, not implementation tasks. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment
@@ -47,7 +47,7 @@ Then:
47
47
  1. Read the templates:
48
48
  - `~/.gsd/agent/extensions/gsd/templates/plan.md`
49
49
  - `~/.gsd/agent/extensions/gsd/templates/task-plan.md`
50
- 2. **Load relevant skills.** Check the `GSD Skill Preferences` block in system context and the `<available_skills>` catalog in your system prompt. `read` any skill files relevant to this slice's technology stack before decomposing. When writing task plans, note which installed skills are relevant in the task description so executors know which to load.
50
+ 2. {{skillActivation}} Record the installed skills you expect executors to use in each task plan's `skills_used` frontmatter.
51
51
  3. Define slice-level verification — the objective stopping condition for this slice:
52
52
  - For non-trivial slices: plan actual test files with real assertions. Name the files.
53
53
  - For simple slices: executable commands or script assertions are fine.
@@ -22,7 +22,7 @@ The following user thoughts were captured during execution and deferred to futur
22
22
 
23
23
  {{deferredCaptures}}
24
24
 
25
- If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during reassessment, without relaxing required verification or artifact rules.
25
+ {{skillActivation}}
26
26
 
27
27
  Then assess whether the remaining roadmap still makes sense given what was just built.
28
28
 
@@ -21,7 +21,7 @@ Write for the roadmap planner. It needs to understand: what exists in the codeba
21
21
  A milestone adding a small feature to an established codebase needs targeted research — check the relevant code, confirm the approach, note constraints. A milestone introducing new technology, building a new system, or spanning multiple unfamiliar subsystems needs deep research — explore broadly, look up docs, investigate alternatives. Match your effort to the actual uncertainty, not the template's section count. Include only sections that have real content.
22
22
 
23
23
  Then research the codebase and relevant technologies. Narrate key findings and surprises as you go — what exists, what's missing, what constrains the approach.
24
- 1. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during research, without relaxing required verification or artifact rules
24
+ 1. {{skillActivation}}
25
25
  2. **Skill Discovery ({{skillDiscoveryMode}}):**{{skillDiscoveryInstructions}}
26
26
  3. Explore relevant code. For small/familiar codebases, use `rg`, `find`, and targeted reads. For large or unfamiliar codebases, use `scout` to build a broad map efficiently before diving in.
27
27
  4. Use `resolve_library` / `get_library_docs` for unfamiliar libraries — skip this for libraries already used in the codebase
@@ -42,7 +42,7 @@ An honest "this is straightforward, here's the pattern to follow" is more valuab
42
42
 
43
43
  Research what this slice needs. Narrate key findings and surprises as you go — what exists, what's missing, what constrains the approach.
44
44
  0. If `REQUIREMENTS.md` was preloaded above, identify which Active requirements this slice owns or supports. Research should target these requirements — surfacing risks, unknowns, and implementation constraints that could affect whether the slice actually delivers them.
45
- 1. **Load relevant skills.** Check the `GSD Skill Preferences` block in system context and the `<available_skills>` catalog in your system prompt. `read` any skill files relevant to this slice's technology stack before exploring code. Reference specific rules from loaded skills in your findings where they inform the implementation approach.
45
+ 1. {{skillActivation}} Reference specific rules from loaded skills in your findings where they inform the implementation approach.
46
46
  2. **Skill Discovery ({{skillDiscoveryMode}}):**{{skillDiscoveryInstructions}}
47
47
  3. Explore relevant code for this slice's scope. For targeted exploration, use `rg`, `find`, and reads. For broad or unfamiliar subsystems, use `scout` to map the relevant area first.
48
48
  4. Use `resolve_library` / `get_library_docs` for unfamiliar libraries — skip this for libraries already used in the codebase
@@ -10,7 +10,7 @@ All relevant context has been preloaded below. Start working immediately without
10
10
 
11
11
  {{inlinedContext}}
12
12
 
13
- If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during UAT execution, without relaxing required verification or artifact rules.
13
+ {{skillActivation}}
14
14
 
15
15
  ---
16
16
 
@@ -82,8 +82,13 @@ export async function getActiveMilestoneId(basePath) {
82
82
  // A draft milestone is still "active" — this function only determines which milestone is current.
83
83
  }
84
84
  const roadmap = parseRoadmap(content);
85
- if (!isMilestoneComplete(roadmap))
86
- return mid;
85
+ if (!isMilestoneComplete(roadmap)) {
86
+ // Summary is the terminal artifact — if it exists, the milestone is
87
+ // complete even when roadmap checkboxes weren't ticked (#864).
88
+ const summaryFile = resolveMilestoneFile(basePath, mid, "SUMMARY");
89
+ if (!summaryFile)
90
+ return mid;
91
+ }
87
92
  }
88
93
  return null;
89
94
  }
@@ -202,8 +207,14 @@ async function _deriveStateImpl(basePath) {
202
207
  }
203
208
  const rmap = parseRoadmap(rc);
204
209
  roadmapCache.set(mid, rmap);
205
- if (!isMilestoneComplete(rmap))
210
+ if (!isMilestoneComplete(rmap)) {
211
+ // Summary is the terminal artifact — if it exists, the milestone is
212
+ // complete even when roadmap checkboxes weren't ticked (#864).
213
+ const sf = resolveMilestoneFile(basePath, mid, "SUMMARY");
214
+ if (sf)
215
+ completeMilestoneIds.add(mid);
206
216
  continue;
217
+ }
207
218
  const sf = resolveMilestoneFile(basePath, mid, "SUMMARY");
208
219
  if (sf)
209
220
  completeMilestoneIds.add(mid);
@@ -303,29 +314,37 @@ async function _deriveStateImpl(basePath) {
303
314
  registry.push({ id: mid, title, status: 'complete' });
304
315
  }
305
316
  }
306
- else if (!activeMilestoneFound) {
307
- // Check milestone-level dependencies before promoting to active
308
- const contextFile = resolveMilestoneFile(basePath, mid, "CONTEXT");
309
- const contextContent = contextFile ? await cachedLoadFile(contextFile) : null;
310
- const deps = parseContextDependsOn(contextContent);
311
- const depsUnmet = deps.some(dep => !completeMilestoneIds.has(dep));
312
- if (depsUnmet) {
313
- registry.push({ id: mid, title, status: 'pending', dependsOn: deps });
314
- // Do NOT set activeMilestoneFound let the loop continue to the next milestone
317
+ else {
318
+ // Roadmap slices not all checked but if a summary exists, the milestone
319
+ // is still complete. The summary is the terminal artifact (#864).
320
+ const summaryFile = resolveMilestoneFile(basePath, mid, "SUMMARY");
321
+ if (summaryFile) {
322
+ registry.push({ id: mid, title, status: 'complete' });
323
+ }
324
+ else if (!activeMilestoneFound) {
325
+ // Check milestone-level dependencies before promoting to active
326
+ const contextFile = resolveMilestoneFile(basePath, mid, "CONTEXT");
327
+ const contextContent = contextFile ? await cachedLoadFile(contextFile) : null;
328
+ const deps = parseContextDependsOn(contextContent);
329
+ const depsUnmet = deps.some(dep => !completeMilestoneIds.has(dep));
330
+ if (depsUnmet) {
331
+ registry.push({ id: mid, title, status: 'pending', dependsOn: deps });
332
+ // Do NOT set activeMilestoneFound — let the loop continue to the next milestone
333
+ }
334
+ else {
335
+ activeMilestone = { id: mid, title };
336
+ activeRoadmap = roadmap;
337
+ activeMilestoneFound = true;
338
+ registry.push({ id: mid, title, status: 'active', ...(deps.length > 0 ? { dependsOn: deps } : {}) });
339
+ }
315
340
  }
316
341
  else {
317
- activeMilestone = { id: mid, title };
318
- activeRoadmap = roadmap;
319
- activeMilestoneFound = true;
320
- registry.push({ id: mid, title, status: 'active', ...(deps.length > 0 ? { dependsOn: deps } : {}) });
342
+ const contextFile2 = resolveMilestoneFile(basePath, mid, "CONTEXT");
343
+ const contextContent2 = contextFile2 ? await cachedLoadFile(contextFile2) : null;
344
+ const deps2 = parseContextDependsOn(contextContent2);
345
+ registry.push({ id: mid, title, status: 'pending', ...(deps2.length > 0 ? { dependsOn: deps2 } : {}) });
321
346
  }
322
347
  }
323
- else {
324
- const contextFile2 = resolveMilestoneFile(basePath, mid, "CONTEXT");
325
- const contextContent2 = contextFile2 ? await cachedLoadFile(contextFile2) : null;
326
- const deps2 = parseContextDependsOn(contextContent2);
327
- registry.push({ id: mid, title, status: 'pending', ...(deps2.length > 0 ? { dependsOn: deps2 } : {}) });
328
- }
329
348
  }
330
349
  const milestoneProgress = {
331
350
  done: registry.filter(entry => entry.status === 'complete').length,
@@ -3,6 +3,9 @@
3
3
  # Tasks with 10+ estimated steps or 12+ estimated files trigger a warning to consider splitting.
4
4
  estimated_steps: {{estimatedSteps}}
5
5
  estimated_files: {{estimatedFiles}}
6
+ # Installed skills the planner expects the executor to load before coding.
7
+ skills_used:
8
+ - {{skillName}}
6
9
  ---
7
10
 
8
11
  # {{taskId}}: {{taskTitle}}
@@ -5,9 +5,11 @@ import { existsSync, readdirSync } from "node:fs";
5
5
  import { join } from "node:path";
6
6
  import { homedir } from "node:os";
7
7
  import { readPromptRecord } from "./store.js";
8
- const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd");
8
+ function getGsdHome() {
9
+ return process.env.GSD_HOME || join(homedir(), ".gsd");
10
+ }
9
11
  export function getLatestPromptSummary() {
10
- const runtimeDir = join(gsdHome, "runtime", "remote-questions");
12
+ const runtimeDir = join(getGsdHome(), "runtime", "remote-questions");
11
13
  if (!existsSync(runtimeDir))
12
14
  return null;
13
15
  const files = readdirSync(runtimeDir).filter((f) => f.endsWith(".json"));
@@ -4,9 +4,11 @@
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  import { join } from "node:path";
6
6
  import { homedir } from "node:os";
7
- const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd");
7
+ function getGsdHome() {
8
+ return process.env.GSD_HOME || join(homedir(), ".gsd");
9
+ }
8
10
  function runtimeDir() {
9
- return join(gsdHome, "runtime", "remote-questions");
11
+ return join(getGsdHome(), "runtime", "remote-questions");
10
12
  }
11
13
  function recordPath(id) {
12
14
  return join(runtimeDir(), `${id}.json`);
@@ -45,7 +45,7 @@ export function parseFrontmatterMap(lines) {
45
45
  continue;
46
46
  }
47
47
  // Array item (2-space indent)
48
- const arrayMatch = line.match(/^ - (.*)$/);
48
+ const arrayMatch = line.match(/^ - ?(.*)$/);
49
49
  if (arrayMatch && currentKey) {
50
50
  // If there's a pending nested object, push it
51
51
  if (currentObj && Object.keys(currentObj).length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-pi",
3
- "version": "2.38.0-dev.7209774",
3
+ "version": "2.38.0-dev.785052f",
4
4
  "description": "GSD — Get Shit Done coding agent",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,6 +17,7 @@ export interface LoadSkillsResult {
17
17
  skills: Skill[];
18
18
  diagnostics: ResourceDiagnostic[];
19
19
  }
20
+ export declare function getLoadedSkills(): Skill[];
20
21
  export interface LoadSkillsFromDirOptions {
21
22
  /** Directory to scan for skills */
22
23
  dir: string;
@@ -1 +1 @@
1
- {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAuD3D,MAAM,WAAW,gBAAgB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,WAAW,EAAE,kBAAkB,EAAE,CAAC;CAClC;AA+CD,MAAM,WAAW,wBAAwB;IACxC,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,gBAAgB,CAGrF;AAqID;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CA0B7D;AAWD,MAAM,WAAW,iBAAiB;IACjC,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,wDAAwD;IACxD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAeD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CAwG5E"}
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAuD3D,MAAM,WAAW,gBAAgB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,WAAW,EAAE,kBAAkB,EAAE,CAAC;CAClC;AAID,wBAAgB,eAAe,IAAI,KAAK,EAAE,CAEzC;AA+CD,MAAM,WAAW,wBAAwB;IACxC,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,gBAAgB,CAGrF;AAqID;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CA0B7D;AAWD,MAAM,WAAW,iBAAiB;IACjC,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,wDAAwD;IACxD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAeD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CA0G5E"}
@@ -51,6 +51,10 @@ function addIgnoreRules(ig, dir, rootDir) {
51
51
  catch { }
52
52
  }
53
53
  }
54
+ let loadedSkills = [];
55
+ export function getLoadedSkills() {
56
+ return [...loadedSkills];
57
+ }
54
58
  /**
55
59
  * Validate skill name per Agent Skills spec.
56
60
  * Returns array of validation error messages (empty if valid).
@@ -354,8 +358,9 @@ export function loadSkills(options = {}) {
354
358
  allDiagnostics.push({ type: "warning", message, path: resolvedPath });
355
359
  }
356
360
  }
361
+ loadedSkills = Array.from(skillMap.values());
357
362
  return {
358
- skills: Array.from(skillMap.values()),
363
+ skills: [...loadedSkills],
359
364
  diagnostics: [...allDiagnostics, ...collisionDiagnostics],
360
365
  };
361
366
  }