pacework 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3135,7 +3135,10 @@ async function runExecutor(run, state) {
3135
3135
  const skillInstall = gitAvailable
3136
3136
  ? installSkills(worktreePath, run.skills, { log: (line) => runLogger.info("runner.run.skills", line) })
3137
3137
  : { installed: [], skipped: [], cleanup() {} }
3138
- const skillsSection = skillsPromptSection((run.skills ?? []).filter((skill) => skillInstall.installed.includes(skill.slug)))
3138
+ const skillsSection = skillsPromptSection(
3139
+ (run.skills ?? []).filter((skill) => skillInstall.installed.includes(skill.slug)),
3140
+ { purpose: isReviewRun(run) ? "review" : "build" },
3141
+ )
3139
3142
  const prompt = [
3140
3143
  buildPrompt(run, branch, worktreePath, { localCheckoutMode, gitAvailable, workspaceContext, runLimitsText }),
3141
3144
  skillsSection,
package/lib/skills.mjs CHANGED
@@ -108,12 +108,24 @@ export function installSkills(checkout, skills, { log = () => {} } = {}) {
108
108
  }
109
109
  }
110
110
 
111
+ /**
112
+ * The skill every run of a kind starts from, when the agent has it: it is how
113
+ * that work is done here and says when to use the others. Left to "when it fits",
114
+ * agents skipped it in most runs.
115
+ */
116
+ export const ENTRY_SKILLS = { build: "work-an-issue", review: "code-review" }
117
+
111
118
  /** The skills section of the agent's prompt; empty when there are none. */
112
- export function skillsPromptSection(skills) {
119
+ export function skillsPromptSection(skills, { purpose = "build" } = {}) {
113
120
  const list = (Array.isArray(skills) ? skills : []).filter((skill) => SLUG.test(String(skill?.slug ?? "")))
114
121
  if (!list.length) return ""
122
+ const entry = ENTRY_SKILLS[purpose]
123
+ const start = entry && list.some((skill) => skill.slug === entry)
124
+ ? [`Start by reading the ${entry} skill's SKILL.md and follow it through this run; it says which of the others to use and when.`]
125
+ : []
115
126
  return [
116
127
  "Skills: this checkout has skills for you in .claude/skills and .agents/skills (one folder each, SKILL.md inside).",
128
+ ...start,
117
129
  "Read a skill's SKILL.md when its description fits the task, and follow it:",
118
130
  ...list.map((skill) => `- ${skill.slug}: ${String(skill.description ?? "").replace(/\s+/g, " ").trim()}`),
119
131
  "These files are not part of the repository; do not commit or edit them.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacework",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "pacework CLI: connect this machine as a runner for pacework AI agents",
5
5
  "type": "module",
6
6
  "bin": {