@linxiraos/pi-messenger 1.1.1 → 1.3.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +741 -676
  2. package/LICENSE +45 -0
  3. package/README.md +424 -424
  4. package/THIRD-PARTY-NOTICES.txt +22951 -0
  5. package/config-overlay.ts +175 -171
  6. package/config.ts +221 -209
  7. package/crew/agents/crew-plan-sync.md +66 -64
  8. package/crew/agents/crew-planner.md +173 -172
  9. package/crew/agents/crew-reviewer.md +58 -58
  10. package/crew/agents/crew-worker.md +130 -129
  11. package/crew/agents.ts +507 -434
  12. package/crew/handlers/coordination.ts +350 -332
  13. package/crew/handlers/plan.ts +988 -906
  14. package/crew/handlers/review.ts +354 -333
  15. package/crew/handlers/revise.ts +400 -376
  16. package/crew/handlers/status.ts +303 -295
  17. package/crew/handlers/sync.ts +237 -233
  18. package/crew/handlers/task.ts +820 -792
  19. package/crew/handlers/team.ts +294 -235
  20. package/crew/handlers/work.ts +467 -425
  21. package/crew/id-allocator.ts +30 -30
  22. package/crew/index.ts +297 -257
  23. package/crew/live-progress.ts +58 -58
  24. package/crew/lobby.ts +504 -473
  25. package/crew/prompt.ts +262 -252
  26. package/crew/registry.ts +114 -114
  27. package/crew/spawn.ts +135 -111
  28. package/crew/state-autonomous.ts +163 -164
  29. package/crew/state-planning.ts +264 -263
  30. package/crew/state.ts +20 -20
  31. package/crew/store.ts +646 -642
  32. package/crew/task-actions.ts +162 -131
  33. package/crew/team/store.ts +572 -479
  34. package/crew/team/subagent-roles.ts +105 -87
  35. package/crew/team/types.ts +50 -50
  36. package/crew/types.ts +194 -194
  37. package/crew/utils/artifacts.ts +57 -62
  38. package/crew/utils/config.ts +158 -156
  39. package/crew/utils/discover.ts +221 -219
  40. package/crew/utils/install.ts +94 -85
  41. package/crew/utils/migrations.ts +126 -0
  42. package/crew/utils/progress.ts +191 -187
  43. package/crew/utils/result.ts +16 -16
  44. package/crew/utils/risk-labels.ts +5 -7
  45. package/crew/utils/task-format.ts +14 -14
  46. package/crew/utils/team-roles.ts +44 -28
  47. package/crew/utils/truncate.ts +76 -79
  48. package/crew/utils/verdict.ts +55 -55
  49. package/editor-binary.ts +150 -0
  50. package/editor-command.ts +107 -0
  51. package/editor-target.ts +40 -0
  52. package/feed.ts +321 -268
  53. package/handlers.ts +1041 -1107
  54. package/index.ts +1314 -1206
  55. package/install.mjs +187 -189
  56. package/lib.ts +587 -467
  57. package/overlay-actions.ts +519 -511
  58. package/overlay-coordinator.ts +150 -150
  59. package/overlay-render.ts +770 -676
  60. package/overlay.ts +872 -830
  61. package/package.json +64 -60
  62. package/paths.ts +60 -0
  63. package/skills/pi-messenger-crew/SKILL.md +375 -347
  64. package/store.ts +1147 -1139
  65. package/teamagent-command.ts +321 -0
  66. package/vitest.config.ts +10 -10
package/crew/prompt.ts CHANGED
@@ -1,252 +1,262 @@
1
- /**
2
- * Crew - Worker Prompt Builder
3
- *
4
- * Assembles the full prompt sent to a worker when it's assigned a task.
5
- * Pure function: reads from store, returns a string.
6
- */
7
-
8
- import type { Task } from "./types.ts";
9
- import type { CrewConfig } from "./utils/config.ts";
10
- import type { CrewSkillInfo } from "./utils/discover.ts";
11
- import { TEAM_MEMORY_TYPES, type TeamMemoryType, type TeamPromptContext } from "./team/types.ts";
12
- import { isNonEditingTeamRole } from "./utils/team-roles.ts";
13
- import * as store from "./store.ts";
14
- import { buildDependencySection, buildCoordinationContext, buildCoordinationInstructions } from "./handlers/coordination.ts";
15
-
16
- export function buildWorkerPrompt(
17
- task: Task,
18
- prdPath: string,
19
- cwd: string,
20
- config: CrewConfig,
21
- concurrentTasks: Task[],
22
- skills?: CrewSkillInfo[],
23
- teamContext?: TeamPromptContext,
24
- ): string {
25
- const taskSpec = store.getTaskSpec(cwd, task.id);
26
- const planSpec = store.getPlanSpec(cwd);
27
- const isNonEditingRole = isNonEditingTeamRole(teamContext?.role?.name ?? task.role);
28
- const mission = isNonEditingRole
29
- ? `Inspect this task as a read-only Team role. This overrides generic implementation protocol for this assignment:
30
- 1. Join the mesh
31
- 2. Read task spec to understand requirements
32
- 3. Start the task so Crew can track ownership
33
- 4. Inspect code, docs, and context without editing files
34
- 5. Record findings, plans, decisions, risks, or handoff notes in progress or Team memory
35
- 6. Mark complete with a concise summary of what you found or recommend`
36
- : `Implement this task following the crew-worker protocol:
37
- 1. Join the mesh
38
- 2. Read task spec to understand requirements
39
- 3. Start task and reserve files
40
- 4. Implement the feature
41
- 5. Commit your changes
42
- 6. Release reservations and mark complete`;
43
-
44
- let prompt = `# Task Assignment
45
-
46
- **Task ID:** ${task.id}
47
- **Task Title:** ${task.title}
48
- **PRD:** ${prdPath}
49
- ${task.attempt_count >= 1 ? `**Attempt:** ${task.attempt_count + 1} (retry after previous attempt)` : ""}
50
-
51
- ## Your Mission
52
-
53
- ${mission}
54
-
55
- `;
56
-
57
- const teamSection = buildTeamSection(task, teamContext);
58
- if (teamSection) {
59
- prompt += teamSection;
60
- }
61
-
62
- if (task.last_review) {
63
- prompt += `## ⚠️ Previous Review Feedback
64
-
65
- **Verdict:** ${task.last_review.verdict}
66
-
67
- ${task.last_review.summary}
68
-
69
- ${task.last_review.issues.length > 0 ? `**Issues to fix:**\n${task.last_review.issues.map(i => `- ${i}`).join("\n")}\n` : ""}
70
- ${task.last_review.suggestions.length > 0 ? `**Suggestions:**\n${task.last_review.suggestions.map(s => `- ${s}`).join("\n")}\n` : ""}
71
-
72
- **You MUST address the issues above in this attempt.**
73
-
74
- `;
75
- }
76
-
77
- const progress = store.getTaskProgress(cwd, task.id);
78
- if (progress) {
79
- const lines = progress.trimEnd().split("\n");
80
- const capped = lines.length > 30 ? lines.slice(-30) : lines;
81
- const truncated = capped.join("\n");
82
- const omitted = lines.length > 30 ? `(${lines.length - 30} earlier entries omitted)\n` : "";
83
- prompt += `## Progress from Prior Attempts
84
-
85
- ${omitted}${truncated}
86
-
87
- `;
88
- }
89
-
90
- if (task.depends_on.length > 0) {
91
- if (config.dependencies === "advisory" || config.coordination !== "none") {
92
- prompt += buildDependencySection(cwd, task, config, { readOnly: isNonEditingRole });
93
- } else {
94
- prompt += `## Dependencies
95
-
96
- This task depends on: ${task.depends_on.join(", ")}
97
- These tasks are already complete - you can reference their implementations.
98
-
99
- `;
100
- }
101
- }
102
-
103
- const coordContext = buildCoordinationContext(cwd, task, config, concurrentTasks, { readOnly: isNonEditingRole });
104
- if (coordContext) {
105
- prompt += coordContext;
106
- }
107
-
108
- if (taskSpec && !taskSpec.includes("*Spec pending*")) {
109
- prompt += `## Task Specification
110
-
111
- ${taskSpec}
112
-
113
- `;
114
- }
115
-
116
- if (planSpec && !planSpec.includes("*Spec pending*")) {
117
- const truncatedSpec = planSpec.length > 2000
118
- ? planSpec.slice(0, 2000) + `\n\n[Spec truncated - read full spec from .pi/messenger/crew/plan.md]`
119
- : planSpec;
120
- prompt += `## Plan Context
121
-
122
- ${truncatedSpec}
123
- `;
124
- }
125
-
126
- const coordInstructions = buildCoordinationInstructions(config, { readOnly: isNonEditingRole });
127
- if (coordInstructions) {
128
- prompt += coordInstructions;
129
- }
130
-
131
- const skillsSection = buildSkillsSection(skills, task.skills, isNonEditingRole);
132
- if (skillsSection) {
133
- prompt += skillsSection;
134
- }
135
-
136
- return prompt;
137
- }
138
-
139
- const WORKER_HIDDEN_SKILLS = new Set(["pi-messenger-crew"]);
140
-
141
- function buildTeamSection(task: Task, teamContext: TeamPromptContext | undefined): string | null {
142
- if (!teamContext) return null;
143
-
144
- let section = `## Team Context\n\n`;
145
- if (teamContext.team) {
146
- const profileText = teamContext.profile?.name && teamContext.profile.name !== teamContext.team.name
147
- ? ` (profile: ${teamContext.profile.name})`
148
- : "";
149
- section += `Active team: ${teamContext.team.name}${profileText}\n\n`;
150
- }
151
-
152
- if (task.role || teamContext.role) {
153
- section += `### Team Role\nYou are acting as the \`${task.role ?? teamContext.role?.name}\` role for this task.\n`;
154
- if (teamContext.role?.description) section += `Role description: ${teamContext.role.description}\n`;
155
- if (teamContext.role?.thinking) section += `Thinking default: ${teamContext.role.thinking}\n`;
156
- if (teamContext.role?.skills && teamContext.role.skills.length > 0) section += `Role skills: ${teamContext.role.skills.join(", ")}\n`;
157
- if (teamContext.role && isNonEditingTeamRole(teamContext.role.name)) {
158
- section += "This is a non-editing Team role. Do not edit files; report findings, plans, decisions, or handoff notes instead.\n";
159
- }
160
- if (teamContext.role?.prompt) {
161
- const prompt = teamContext.role.prompt.length > 2000
162
- ? teamContext.role.prompt.slice(0, 2000) + "\n[Role prompt truncated]"
163
- : teamContext.role.prompt;
164
- section += `\nRole working rules:\n${prompt}\n`;
165
- }
166
- section += "\n";
167
- }
168
-
169
- if (teamContext.charter) {
170
- const charter = teamContext.charter.length > 2500
171
- ? teamContext.charter.slice(0, 2500) + "\n[Team charter truncated]"
172
- : teamContext.charter;
173
- section += `### Team Charter\n${charter}\n\n`;
174
- }
175
-
176
- const memoryText = formatMemory(teamContext.memory);
177
- if (memoryText) section += memoryText;
178
-
179
- if (task.risk_labels && task.risk_labels.length > 0) {
180
- section += `### Risk Labels\n${task.risk_labels.join(", ")}\n\n`;
181
- }
182
-
183
- if (task.approval?.required) {
184
- section += `### Approval Policy\nLead approval required. Current status: ${task.approval.status}.\n`;
185
- if (task.approval.plan) section += `Approval plan: ${task.approval.plan}\n`;
186
- if (task.approval.feedback) section += `Approval feedback: ${task.approval.feedback}\n`;
187
- section += "\n";
188
- }
189
-
190
- return section;
191
- }
192
-
193
- function formatMemory(memory: TeamPromptContext["memory"]): string {
194
- const labels: Record<TeamMemoryType, string> = {
195
- decision: "Recent decisions",
196
- interface: "Interfaces",
197
- risk: "Risks",
198
- handoff: "Handoffs",
199
- };
200
- let text = "";
201
- for (const type of TEAM_MEMORY_TYPES) {
202
- const entries = memory[type];
203
- if (!entries || entries.length === 0) continue;
204
- text += `### ${labels[type]}\n`;
205
- for (const entry of entries.slice(-8)) {
206
- text += `- ${entry.message}${entry.taskId ? ` (${entry.taskId})` : ""}\n`;
207
- }
208
- text += "\n";
209
- }
210
- return text ? `### Team Memory\n${text}` : "";
211
- }
212
-
213
- function buildSkillsSection(
214
- skills: CrewSkillInfo[] | undefined,
215
- taskSkills: string[] | undefined,
216
- readOnly: boolean,
217
- ): string | null {
218
- if (!skills || skills.length === 0) return null;
219
-
220
- const visibleSkills = skills.filter(skill => !WORKER_HIDDEN_SKILLS.has(skill.name));
221
- if (visibleSkills.length === 0) return null;
222
-
223
- const recommended = new Set(taskSkills ?? []);
224
- const recSkills = visibleSkills.filter(s => recommended.has(s.name));
225
- const otherSkills = visibleSkills.filter(s => !recommended.has(s.name));
226
-
227
- let section = `## Available Skills
228
-
229
- ${readOnly ? "Read any skill that matches what you're investigating." : "Read any skill that matches what you're implementing."}
230
-
231
- `;
232
-
233
- if (recSkills.length > 0) {
234
- section += "**Recommended for this task:**\n";
235
- for (const s of recSkills) {
236
- section += ` ${s.name} — ${s.description}\n ${s.path}\n`;
237
- }
238
- section += "\n";
239
- }
240
-
241
- if (otherSkills.length > 0) {
242
- if (recSkills.length > 0) section += "**Also available:**\n";
243
- for (const s of otherSkills) {
244
- section += ` ${s.name} — ${s.description}\n ${s.path}\n`;
245
- }
246
- section += "\n";
247
- }
248
-
249
- section += `To load a skill: read({ path: "<skill-path>" })\n`;
250
-
251
- return section;
252
- }
1
+ /**
2
+ * Crew - Worker Prompt Builder
3
+ *
4
+ * Assembles the full prompt sent to a worker when it's assigned a task.
5
+ * Pure function: reads from store, returns a string.
6
+ */
7
+
8
+ import type { Task } from "./types.ts";
9
+ import type { CrewConfig } from "./utils/config.ts";
10
+ import type { CrewSkillInfo } from "./utils/discover.ts";
11
+ import { TEAM_MEMORY_TYPES, type TeamMemoryType, type TeamPromptContext } from "./team/types.ts";
12
+ import { isNonEditingTeamRole } from "./utils/team-roles.ts";
13
+ import * as store from "./store.ts";
14
+ import {
15
+ buildDependencySection,
16
+ buildCoordinationContext,
17
+ buildCoordinationInstructions,
18
+ } from "./handlers/coordination.ts";
19
+
20
+ export function buildWorkerPrompt(
21
+ task: Task,
22
+ prdPath: string,
23
+ cwd: string,
24
+ config: CrewConfig,
25
+ concurrentTasks: Task[],
26
+ skills?: CrewSkillInfo[],
27
+ teamContext?: TeamPromptContext,
28
+ ): string {
29
+ const taskSpec = store.getTaskSpec(cwd, task.id);
30
+ const planSpec = store.getPlanSpec(cwd);
31
+ const isNonEditingRole = isNonEditingTeamRole(teamContext?.role?.name ?? task.role);
32
+ const mission = isNonEditingRole
33
+ ? `Inspect this task as a read-only Team role. This overrides generic implementation protocol for this assignment:
34
+ 1. Join the mesh
35
+ 2. Read task spec to understand requirements
36
+ 3. Start the task so Crew can track ownership
37
+ 4. Inspect code, docs, and context without editing files
38
+ 5. Record findings, plans, decisions, risks, or handoff notes in progress or Team memory
39
+ 6. Mark complete with a concise summary of what you found or recommend`
40
+ : `Implement this task following the crew-worker protocol:
41
+ 1. Join the mesh
42
+ 2. Read task spec to understand requirements
43
+ 3. Start task and reserve files
44
+ 4. Implement the feature
45
+ 5. Commit your changes
46
+ 6. Release reservations and mark complete`;
47
+
48
+ let prompt = `# Task Assignment
49
+
50
+ **Task ID:** ${task.id}
51
+ **Task Title:** ${task.title}
52
+ **PRD:** ${prdPath}
53
+ ${task.attempt_count >= 1 ? `**Attempt:** ${task.attempt_count + 1} (retry after previous attempt)` : ""}
54
+
55
+ ## Your Mission
56
+
57
+ ${mission}
58
+
59
+ `;
60
+
61
+ const teamSection = buildTeamSection(task, teamContext);
62
+ if (teamSection) {
63
+ prompt += teamSection;
64
+ }
65
+
66
+ if (task.last_review) {
67
+ prompt += `## ⚠️ Previous Review Feedback
68
+
69
+ **Verdict:** ${task.last_review.verdict}
70
+
71
+ ${task.last_review.summary}
72
+
73
+ ${task.last_review.issues.length > 0 ? `**Issues to fix:**\n${task.last_review.issues.map(i => `- ${i}`).join("\n")}\n` : ""}
74
+ ${task.last_review.suggestions.length > 0 ? `**Suggestions:**\n${task.last_review.suggestions.map(s => `- ${s}`).join("\n")}\n` : ""}
75
+
76
+ **You MUST address the issues above in this attempt.**
77
+
78
+ `;
79
+ }
80
+
81
+ const progress = store.getTaskProgress(cwd, task.id);
82
+ if (progress) {
83
+ const lines = progress.trimEnd().split("\n");
84
+ const capped = lines.length > 30 ? lines.slice(-30) : lines;
85
+ const truncated = capped.join("\n");
86
+ const omitted = lines.length > 30 ? `(${lines.length - 30} earlier entries omitted)\n` : "";
87
+ prompt += `## Progress from Prior Attempts
88
+
89
+ ${omitted}${truncated}
90
+
91
+ `;
92
+ }
93
+
94
+ if (task.depends_on.length > 0) {
95
+ if (config.dependencies === "advisory" || config.coordination !== "none") {
96
+ prompt += buildDependencySection(cwd, task, config, { readOnly: isNonEditingRole });
97
+ } else {
98
+ prompt += `## Dependencies
99
+
100
+ This task depends on: ${task.depends_on.join(", ")}
101
+ These tasks are already complete - you can reference their implementations.
102
+
103
+ `;
104
+ }
105
+ }
106
+
107
+ const coordContext = buildCoordinationContext(cwd, task, config, concurrentTasks, { readOnly: isNonEditingRole });
108
+ if (coordContext) {
109
+ prompt += coordContext;
110
+ }
111
+
112
+ if (taskSpec && !taskSpec.includes("*Spec pending*")) {
113
+ prompt += `## Task Specification
114
+
115
+ ${taskSpec}
116
+
117
+ `;
118
+ }
119
+
120
+ if (planSpec && !planSpec.includes("*Spec pending*")) {
121
+ const truncatedSpec =
122
+ planSpec.length > 2000
123
+ ? planSpec.slice(0, 2000) + `\n\n[Spec truncated - read full spec from .zeta/messenger/crew/plan.md]`
124
+ : planSpec;
125
+ prompt += `## Plan Context
126
+
127
+ ${truncatedSpec}
128
+ `;
129
+ }
130
+
131
+ const coordInstructions = buildCoordinationInstructions(config, { readOnly: isNonEditingRole });
132
+ if (coordInstructions) {
133
+ prompt += coordInstructions;
134
+ }
135
+
136
+ const skillsSection = buildSkillsSection(skills, task.skills, isNonEditingRole);
137
+ if (skillsSection) {
138
+ prompt += skillsSection;
139
+ }
140
+
141
+ return prompt;
142
+ }
143
+
144
+ const WORKER_HIDDEN_SKILLS = new Set(["pi-messenger-crew"]);
145
+
146
+ function buildTeamSection(task: Task, teamContext: TeamPromptContext | undefined): string | null {
147
+ if (!teamContext) return null;
148
+
149
+ let section = `## Team Context\n\n`;
150
+ if (teamContext.team) {
151
+ const profileText =
152
+ teamContext.profile?.name && teamContext.profile.name !== teamContext.team.name
153
+ ? ` (profile: ${teamContext.profile.name})`
154
+ : "";
155
+ section += `Active team: ${teamContext.team.name}${profileText}\n\n`;
156
+ }
157
+
158
+ if (task.role || teamContext.role) {
159
+ section += `### Team Role\nYou are acting as the \`${task.role ?? teamContext.role?.name}\` role for this task.\n`;
160
+ if (teamContext.role?.description) section += `Role description: ${teamContext.role.description}\n`;
161
+ if (teamContext.role?.thinking) section += `Thinking default: ${teamContext.role.thinking}\n`;
162
+ if (teamContext.role?.skills && teamContext.role.skills.length > 0)
163
+ section += `Role skills: ${teamContext.role.skills.join(", ")}\n`;
164
+ if (teamContext.role && isNonEditingTeamRole(teamContext.role.name)) {
165
+ section +=
166
+ "This is a non-editing Team role. Do not edit files; report findings, plans, decisions, or handoff notes instead.\n";
167
+ }
168
+ if (teamContext.role?.prompt) {
169
+ const prompt =
170
+ teamContext.role.prompt.length > 2000
171
+ ? teamContext.role.prompt.slice(0, 2000) + "\n[Role prompt truncated]"
172
+ : teamContext.role.prompt;
173
+ section += `\nRole working rules:\n${prompt}\n`;
174
+ }
175
+ section += "\n";
176
+ }
177
+
178
+ if (teamContext.charter) {
179
+ const charter =
180
+ teamContext.charter.length > 2500
181
+ ? teamContext.charter.slice(0, 2500) + "\n[Team charter truncated]"
182
+ : teamContext.charter;
183
+ section += `### Team Charter\n${charter}\n\n`;
184
+ }
185
+
186
+ const memoryText = formatMemory(teamContext.memory);
187
+ if (memoryText) section += memoryText;
188
+
189
+ if (task.risk_labels && task.risk_labels.length > 0) {
190
+ section += `### Risk Labels\n${task.risk_labels.join(", ")}\n\n`;
191
+ }
192
+
193
+ if (task.approval?.required) {
194
+ section += `### Approval Policy\nLead approval required. Current status: ${task.approval.status}.\n`;
195
+ if (task.approval.plan) section += `Approval plan: ${task.approval.plan}\n`;
196
+ if (task.approval.feedback) section += `Approval feedback: ${task.approval.feedback}\n`;
197
+ section += "\n";
198
+ }
199
+
200
+ return section;
201
+ }
202
+
203
+ function formatMemory(memory: TeamPromptContext["memory"]): string {
204
+ const labels: Record<TeamMemoryType, string> = {
205
+ decision: "Recent decisions",
206
+ interface: "Interfaces",
207
+ risk: "Risks",
208
+ handoff: "Handoffs",
209
+ };
210
+ let text = "";
211
+ for (const type of TEAM_MEMORY_TYPES) {
212
+ const entries = memory[type];
213
+ if (!entries || entries.length === 0) continue;
214
+ text += `### ${labels[type]}\n`;
215
+ for (const entry of entries.slice(-8)) {
216
+ text += `- ${entry.message}${entry.taskId ? ` (${entry.taskId})` : ""}\n`;
217
+ }
218
+ text += "\n";
219
+ }
220
+ return text ? `### Team Memory\n${text}` : "";
221
+ }
222
+
223
+ function buildSkillsSection(
224
+ skills: CrewSkillInfo[] | undefined,
225
+ taskSkills: string[] | undefined,
226
+ readOnly: boolean,
227
+ ): string | null {
228
+ if (!skills || skills.length === 0) return null;
229
+
230
+ const visibleSkills = skills.filter(skill => !WORKER_HIDDEN_SKILLS.has(skill.name));
231
+ if (visibleSkills.length === 0) return null;
232
+
233
+ const recommended = new Set(taskSkills ?? []);
234
+ const recSkills = visibleSkills.filter(s => recommended.has(s.name));
235
+ const otherSkills = visibleSkills.filter(s => !recommended.has(s.name));
236
+
237
+ let section = `## Available Skills
238
+
239
+ ${readOnly ? "Read any skill that matches what you're investigating." : "Read any skill that matches what you're implementing."}
240
+
241
+ `;
242
+
243
+ if (recSkills.length > 0) {
244
+ section += "**Recommended for this task:**\n";
245
+ for (const s of recSkills) {
246
+ section += ` ${s.name} — ${s.description}\n ${s.path}\n`;
247
+ }
248
+ section += "\n";
249
+ }
250
+
251
+ if (otherSkills.length > 0) {
252
+ if (recSkills.length > 0) section += "**Also available:**\n";
253
+ for (const s of otherSkills) {
254
+ section += ` ${s.name} — ${s.description}\n ${s.path}\n`;
255
+ }
256
+ section += "\n";
257
+ }
258
+
259
+ section += `To load a skill: read({ path: "<skill-path>" })\n`;
260
+
261
+ return section;
262
+ }