sisyphi 1.0.13 → 1.1.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 (100) hide show
  1. package/dist/{chunk-T7ETTIQK.js → chunk-M7LZ2ZHD.js} +3 -27
  2. package/dist/chunk-M7LZ2ZHD.js.map +1 -0
  3. package/dist/{chunk-JXKUI4P6.js → chunk-REUQ4B45.js} +7 -38
  4. package/dist/chunk-REUQ4B45.js.map +1 -0
  5. package/dist/{chunk-LWWRGQWM.js → chunk-Z32YVDMY.js} +2 -2
  6. package/dist/chunk-Z32YVDMY.js.map +1 -0
  7. package/dist/cli.js +75 -56
  8. package/dist/cli.js.map +1 -1
  9. package/dist/daemon.js +776 -629
  10. package/dist/daemon.js.map +1 -1
  11. package/dist/{paths-NUUALUVP.js → paths-IJXOAN4E.js} +4 -6
  12. package/dist/templates/CLAUDE.md +16 -14
  13. package/dist/templates/agent-plugin/agents/CLAUDE.md +17 -6
  14. package/dist/templates/agent-plugin/agents/design.md +134 -0
  15. package/dist/templates/agent-plugin/agents/explore.md +39 -0
  16. package/dist/templates/agent-plugin/agents/operator.md +24 -0
  17. package/dist/templates/agent-plugin/agents/plan.md +15 -20
  18. package/dist/templates/agent-plugin/agents/problem.md +119 -0
  19. package/dist/templates/agent-plugin/agents/requirements.md +138 -0
  20. package/dist/templates/agent-plugin/agents/review/CLAUDE.md +29 -0
  21. package/dist/templates/agent-plugin/agents/review/compliance.md +6 -6
  22. package/dist/templates/agent-plugin/agents/review-plan/code-smells.md +4 -4
  23. package/dist/templates/agent-plugin/agents/review-plan/requirements-coverage.md +62 -0
  24. package/dist/templates/agent-plugin/agents/review-plan/security.md +1 -1
  25. package/dist/templates/agent-plugin/agents/review-plan.md +9 -8
  26. package/dist/templates/agent-plugin/agents/review.md +1 -1
  27. package/dist/templates/agent-plugin/agents/test-spec.md +3 -3
  28. package/dist/templates/agent-plugin/hooks/CLAUDE.md +2 -2
  29. package/dist/templates/agent-plugin/hooks/explore-user-prompt.sh +13 -0
  30. package/dist/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -1
  31. package/dist/templates/agent-plugin/hooks/require-submit.sh +70 -3
  32. package/dist/templates/agent-plugin/hooks/review-plan-user-prompt.sh +4 -4
  33. package/dist/templates/agent-plugin/hooks/review-user-prompt.sh +1 -1
  34. package/dist/templates/agent-suffix.md +0 -2
  35. package/dist/templates/orchestrator-base.md +169 -145
  36. package/dist/templates/orchestrator-impl.md +92 -57
  37. package/dist/templates/orchestrator-planning.md +46 -56
  38. package/dist/templates/orchestrator-plugin/commands/sisyphus/design.md +13 -0
  39. package/dist/templates/orchestrator-plugin/commands/sisyphus/problem.md +13 -0
  40. package/dist/templates/orchestrator-plugin/commands/sisyphus/requirements.md +13 -0
  41. package/dist/templates/orchestrator-plugin/commands/sisyphus/strategize.md +19 -0
  42. package/dist/templates/orchestrator-plugin/hooks/explore-gate.sh +15 -0
  43. package/dist/templates/orchestrator-plugin/hooks/hooks.json +14 -1
  44. package/dist/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +34 -27
  45. package/dist/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +56 -24
  46. package/dist/templates/orchestrator-strategy.md +233 -0
  47. package/dist/templates/orchestrator-validation.md +94 -0
  48. package/dist/tui.js +2730 -2924
  49. package/dist/tui.js.map +1 -1
  50. package/package.json +2 -4
  51. package/templates/CLAUDE.md +16 -14
  52. package/templates/agent-plugin/agents/CLAUDE.md +17 -6
  53. package/templates/agent-plugin/agents/design.md +134 -0
  54. package/templates/agent-plugin/agents/explore.md +39 -0
  55. package/templates/agent-plugin/agents/operator.md +24 -0
  56. package/templates/agent-plugin/agents/plan.md +15 -20
  57. package/templates/agent-plugin/agents/problem.md +119 -0
  58. package/templates/agent-plugin/agents/requirements.md +138 -0
  59. package/templates/agent-plugin/agents/review/CLAUDE.md +29 -0
  60. package/templates/agent-plugin/agents/review/compliance.md +6 -6
  61. package/templates/agent-plugin/agents/review-plan/code-smells.md +4 -4
  62. package/templates/agent-plugin/agents/review-plan/requirements-coverage.md +62 -0
  63. package/templates/agent-plugin/agents/review-plan/security.md +1 -1
  64. package/templates/agent-plugin/agents/review-plan.md +9 -8
  65. package/templates/agent-plugin/agents/review.md +1 -1
  66. package/templates/agent-plugin/agents/test-spec.md +3 -3
  67. package/templates/agent-plugin/hooks/CLAUDE.md +2 -2
  68. package/templates/agent-plugin/hooks/explore-user-prompt.sh +13 -0
  69. package/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -1
  70. package/templates/agent-plugin/hooks/require-submit.sh +70 -3
  71. package/templates/agent-plugin/hooks/review-plan-user-prompt.sh +4 -4
  72. package/templates/agent-plugin/hooks/review-user-prompt.sh +1 -1
  73. package/templates/agent-suffix.md +0 -2
  74. package/templates/orchestrator-base.md +169 -145
  75. package/templates/orchestrator-impl.md +92 -57
  76. package/templates/orchestrator-planning.md +46 -56
  77. package/templates/orchestrator-plugin/commands/sisyphus/design.md +13 -0
  78. package/templates/orchestrator-plugin/commands/sisyphus/problem.md +13 -0
  79. package/templates/orchestrator-plugin/commands/sisyphus/requirements.md +13 -0
  80. package/templates/orchestrator-plugin/commands/sisyphus/strategize.md +19 -0
  81. package/templates/orchestrator-plugin/hooks/explore-gate.sh +15 -0
  82. package/templates/orchestrator-plugin/hooks/hooks.json +14 -1
  83. package/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +34 -27
  84. package/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +56 -24
  85. package/templates/orchestrator-strategy.md +233 -0
  86. package/templates/orchestrator-validation.md +94 -0
  87. package/dist/chunk-JXKUI4P6.js.map +0 -1
  88. package/dist/chunk-LWWRGQWM.js.map +0 -1
  89. package/dist/chunk-T7ETTIQK.js.map +0 -1
  90. package/dist/templates/agent-plugin/agents/review-plan/spec-coverage.md +0 -44
  91. package/dist/templates/agent-plugin/agents/spec-draft.md +0 -78
  92. package/dist/templates/agent-plugin/hooks/hooks.json +0 -25
  93. package/dist/templates/agent-plugin/hooks/spec-user-prompt.sh +0 -19
  94. package/dist/templates/orchestrator-plugin/skills/git-management/SKILL.md +0 -111
  95. package/templates/agent-plugin/agents/review-plan/spec-coverage.md +0 -44
  96. package/templates/agent-plugin/agents/spec-draft.md +0 -78
  97. package/templates/agent-plugin/hooks/hooks.json +0 -25
  98. package/templates/agent-plugin/hooks/spec-user-prompt.sh +0 -19
  99. package/templates/orchestrator-plugin/skills/git-management/SKILL.md +0 -111
  100. /package/dist/{paths-NUUALUVP.js.map → paths-IJXOAN4E.js.map} +0 -0
@@ -5,35 +5,11 @@ import {
5
5
  sessionsDir,
6
6
  socketPath,
7
7
  statePath
8
- } from "./chunk-JXKUI4P6.js";
8
+ } from "./chunk-REUQ4B45.js";
9
9
 
10
10
  // src/shared/utils.ts
11
11
  function computeActiveTimeMs(session) {
12
- const now = Date.now();
13
- const intervals = [];
14
- for (const cycle of session.orchestratorCycles) {
15
- const start = new Date(cycle.timestamp).getTime();
16
- const end = cycle.completedAt ? new Date(cycle.completedAt).getTime() : now;
17
- if (end > start) intervals.push([start, end]);
18
- }
19
- for (const agent of session.agents) {
20
- const start = new Date(agent.spawnedAt).getTime();
21
- const end = agent.completedAt ? new Date(agent.completedAt).getTime() : now;
22
- if (end > start) intervals.push([start, end]);
23
- }
24
- if (intervals.length === 0) return 0;
25
- intervals.sort((a, b) => a[0] - b[0]);
26
- const merged = [intervals[0]];
27
- for (let i = 1; i < intervals.length; i++) {
28
- const last = merged[merged.length - 1];
29
- const cur = intervals[i];
30
- if (cur[0] <= last[1]) {
31
- last[1] = Math.max(last[1], cur[1]);
32
- } else {
33
- merged.push(cur);
34
- }
35
- }
36
- return merged.reduce((sum, [start, end]) => sum + (end - start), 0);
12
+ return session.activeMs;
37
13
  }
38
14
 
39
15
  // src/shared/format.ts
@@ -261,4 +237,4 @@ export {
261
237
  buildCompanionContext,
262
238
  buildSessionContext
263
239
  };
264
- //# sourceMappingURL=chunk-T7ETTIQK.js.map
240
+ //# sourceMappingURL=chunk-M7LZ2ZHD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/utils.ts","../src/shared/format.ts","../src/tui/lib/reports.ts","../src/tui/lib/context.ts","../src/shared/client.ts"],"sourcesContent":["import type { Session } from './types.js';\n\n/**\n * Return the tracked active time for a session.\n * Active time is accumulated by the daemon's pane monitor, excluding sleep/idle gaps.\n */\nexport function computeActiveTimeMs(session: Session): number {\n return session.activeMs;\n}\n","/** Format milliseconds or ISO date range to human-readable duration */\nexport function formatDuration(startOrMs: string | number, endIso?: string | null): string {\n let totalMs: number;\n if (typeof startOrMs === 'number') {\n totalMs = startOrMs;\n } else {\n const start = new Date(startOrMs).getTime();\n const end = endIso ? new Date(endIso).getTime() : Date.now();\n totalMs = end - start;\n }\n const totalSeconds = Math.floor(totalMs / 1000);\n if (totalSeconds < 0) return '0s';\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n if (hours > 0) return `${hours}h${minutes}m`;\n if (minutes > 0) return `${minutes}m${seconds}s`;\n return `${seconds}s`;\n}\n\n/** Map session/agent status to a color name */\nexport function statusColor(status: string): string {\n switch (status) {\n case 'active':\n case 'running':\n return 'green';\n case 'completed':\n return 'cyan';\n case 'paused':\n return 'yellow';\n case 'killed':\n case 'crashed':\n return 'red';\n case 'lost':\n return 'gray';\n default:\n return 'white';\n }\n}\n","import { readFileSync } from 'node:fs';\nimport type { AgentReport } from '../../shared/types.js';\n\nexport interface ReportBlock {\n type: 'update' | 'final';\n timestamp: string;\n content: string;\n summary: string;\n}\n\nfunction loadReportContent(report: AgentReport): string {\n try {\n return readFileSync(report.filePath, 'utf-8');\n } catch {\n return report.summary;\n }\n}\n\nexport function resolveReports(reports: AgentReport[]): ReportBlock[] {\n return [...reports].reverse().map((r) => ({\n type: r.type as 'update' | 'final',\n timestamp: r.timestamp,\n content: loadReportContent(r),\n summary: r.summary,\n }));\n}\n","import { readFileSync, readdirSync } from 'node:fs';\nimport { goalPath, roadmapPath, sessionsDir, statePath } from '../../shared/paths.js';\nimport { resolveReports } from './reports.js';\nimport type { Session, AgentStatus } from '../../shared/types.js';\n\nfunction readFileSafe(filePath: string): string | null {\n try {\n return readFileSync(filePath, 'utf-8');\n } catch {\n return null;\n }\n}\n\nfunction escapeXml(s: string): string {\n return s\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;');\n}\n\nexport function buildCompanionContext(cwd: string): string {\n let sessionDirs: string[];\n try {\n sessionDirs = readdirSync(sessionsDir(cwd));\n } catch {\n return '<sessions>No sessions found.</sessions>';\n }\n\n const now = Date.now();\n const sevenDaysMs = 7 * 24 * 60 * 60 * 1000;\n const sessionBlocks: string[] = [];\n\n for (const sessionId of sessionDirs) {\n const stateRaw = readFileSafe(statePath(cwd, sessionId));\n if (!stateRaw) continue;\n\n let session: Session;\n try {\n session = JSON.parse(stateRaw) as Session;\n } catch {\n continue;\n }\n\n // Skip completed sessions older than 7 days\n if (session.status === 'completed' && session.completedAt) {\n if (now - new Date(session.completedAt).getTime() > sevenDaysMs) continue;\n }\n\n const lines: string[] = [];\n const nameAttr = session.name ? ` name=\"${escapeXml(session.name)}\"` : '';\n lines.push(` <session id=\"${escapeXml(session.id)}\"${nameAttr} status=\"${escapeXml(session.status)}\">`);\n lines.push(` <task>${escapeXml(session.task)}</task>`);\n lines.push(` <created>${escapeXml(session.createdAt)}</created>`);\n lines.push(` <cycles>${session.orchestratorCycles.length}</cycles>`);\n\n if (session.status === 'completed') {\n if (session.completionReport) {\n const snippet = session.completionReport.slice(0, 300).replace(/\\n+/g, ' ').trim();\n lines.push(` <completion-report>${escapeXml(snippet)}${session.completionReport.length > 300 ? '…' : ''}</completion-report>`);\n }\n } else {\n // Agent summary by status\n if (session.agents.length > 0) {\n const counts = new Map<AgentStatus, number>();\n for (const agent of session.agents) {\n counts.set(agent.status, (counts.get(agent.status) ?? 0) + 1);\n }\n const summary = [...counts.entries()].map(([status, n]) => `${n} ${status}`).join(', ');\n lines.push(` <agents>${escapeXml(summary)}</agents>`);\n }\n\n // Goal: first meaningful line\n const goalContent = readFileSafe(goalPath(cwd, session.id));\n if (goalContent) {\n const firstLine = goalContent.split('\\n').map(l => l.trim()).find(l => l.length > 0 && !l.startsWith('#'));\n if (firstLine) lines.push(` <goal>${escapeXml(firstLine)}</goal>`);\n }\n\n // Roadmap unchecked todos (up to 5)\n const roadmapContent = readFileSafe(roadmapPath(cwd, session.id));\n if (roadmapContent) {\n const todos = roadmapContent\n .split('\\n')\n .filter(l => l.includes('- [ ]'))\n .slice(0, 5)\n .map(l => l.trim());\n if (todos.length > 0) {\n lines.push(' <todos>');\n for (const todo of todos) lines.push(` ${escapeXml(todo)}`);\n lines.push(' </todos>');\n }\n }\n }\n\n lines.push(' </session>');\n sessionBlocks.push(lines.join('\\n'));\n }\n\n if (sessionBlocks.length === 0) {\n return '<sessions>No sessions found.</sessions>';\n }\n\n return ['<sessions>', ...sessionBlocks, '</sessions>'].join('\\n');\n}\n\nexport function buildSessionContext(session: Session, cwd: string): string {\n const goal = readFileSafe(goalPath(cwd, session.id));\n const roadmap = readFileSafe(roadmapPath(cwd, session.id));\n\n const agentsXml = session.agents.map((agent) => {\n const reportBlocks = resolveReports(agent.reports);\n // resolveReports returns newest-first; reverse to chronological for context\n const reportsXml = [...reportBlocks].reverse().map((block) => {\n return ` <report type=\"${block.type}\" time=\"${escapeXml(block.timestamp)}\">${escapeXml(block.content)}</report>`;\n }).join('\\n');\n\n return [\n ` <agent id=\"${escapeXml(agent.id)}\" name=\"${escapeXml(agent.name)}\" type=\"${escapeXml(agent.agentType)}\" status=\"${escapeXml(agent.status)}\">`,\n ` <instruction>${escapeXml(agent.instruction)}</instruction>`,\n ...(reportsXml ? [reportsXml] : []),\n ` </agent>`,\n ].join('\\n');\n }).join('\\n');\n\n const cyclesXml = session.orchestratorCycles.map((cycle) => {\n const agents = cycle.agentsSpawned.join(', ');\n const mode = cycle.mode ? ` mode=\"${escapeXml(cycle.mode)}\"` : '';\n return ` <cycle number=\"${cycle.cycle}\"${mode} agents=\"${escapeXml(agents)}\" />`;\n }).join('\\n');\n\n const lines: string[] = [\n '<context>',\n `<session id=\"${escapeXml(session.id)}\" status=\"${escapeXml(session.status)}\">`,\n ` <task>${escapeXml(session.task)}</task>`,\n ` <cwd>${escapeXml(session.cwd)}</cwd>`,\n ];\n\n if (goal) lines.push(` <goal>${escapeXml(goal)}</goal>`);\n if (roadmap) lines.push(` <roadmap>${escapeXml(roadmap)}</roadmap>`);\n\n if (session.agents.length > 0) {\n lines.push(' <agents>');\n lines.push(agentsXml);\n lines.push(' </agents>');\n }\n\n if (session.orchestratorCycles.length > 0) {\n lines.push(' <cycles>');\n lines.push(cyclesXml);\n lines.push(' </cycles>');\n }\n\n if (session.completionReport) {\n lines.push(` <completion-report>${escapeXml(session.completionReport)}</completion-report>`);\n }\n\n lines.push('</session>');\n lines.push('</context>');\n\n return lines.join('\\n');\n}\n","import { connect } from 'node:net';\nimport { socketPath } from './paths.js';\nimport type { Request, Response } from './protocol.js';\n\nexport function rawSend(request: Request, timeoutMs = 10_000): Promise<Response> {\n const sock = socketPath();\n\n return new Promise<Response>((resolve, reject) => {\n const socket = connect(sock);\n let data = '';\n\n const timeout = setTimeout(() => {\n socket.destroy();\n reject(new Error(`Request timed out after ${(timeoutMs / 1000).toFixed(0)}s. The daemon may be overloaded.\\n Check: sisyphus doctor\\n Logs: tail -20 ~/.sisyphus/daemon.log`));\n }, timeoutMs);\n\n socket.on('connect', () => {\n socket.write(JSON.stringify(request) + '\\n');\n });\n\n socket.on('data', (chunk) => {\n data += chunk.toString();\n const newlineIdx = data.indexOf('\\n');\n if (newlineIdx !== -1) {\n clearTimeout(timeout);\n const line = data.slice(0, newlineIdx);\n socket.destroy();\n try {\n resolve(JSON.parse(line) as Response);\n } catch {\n reject(new Error(`Invalid JSON response from daemon: ${line}`));\n }\n }\n });\n\n socket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A4B,YAAY,KAAM,QAAQ,CAAC,CAAC;AAAA;AAAA,wCAAqG,CAAC;AAAA,IACjL,GAAG,SAAS;AAEZ,WAAO,GAAG,WAAW,MAAM;AACzB,aAAO,MAAM,KAAK,UAAU,OAAO,IAAI,IAAI;AAAA,IAC7C,CAAC;AAED,WAAO,GAAG,QAAQ,CAAC,UAAU;AAC3B,cAAQ,MAAM,SAAS;AACvB,YAAM,aAAa,KAAK,QAAQ,IAAI;AACpC,UAAI,eAAe,IAAI;AACrB,qBAAa,OAAO;AACpB,cAAM,OAAO,KAAK,MAAM,GAAG,UAAU;AACrC,eAAO,QAAQ;AACf,YAAI;AACF,kBAAQ,KAAK,MAAM,IAAI,CAAa;AAAA,QACtC,QAAQ;AACN,iBAAO,IAAI,MAAM,sCAAsC,IAAI,EAAE,CAAC;AAAA,QAChE;AAAA,MACF;AAAA,IACF,CAAC;AAED,WAAO,GAAG,SAAS,CAAC,QAAQ;AAC1B,mBAAa,OAAO;AACpB,aAAO,GAAG;AAAA,IACZ,CAAC;AAAA,EACH,CAAC;AACH;","names":["readFileSync","readFileSync"]}
@@ -1,33 +1,8 @@
1
1
  #!/usr/bin/env node
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
2
 
28
3
  // src/shared/paths.ts
29
4
  import { homedir } from "os";
30
- import { basename, join } from "path";
5
+ import { join } from "path";
31
6
  function globalDir() {
32
7
  return join(homedir(), ".sisyphus");
33
8
  }
@@ -85,6 +60,9 @@ function roadmapPath(cwd, sessionId) {
85
60
  function goalPath(cwd, sessionId) {
86
61
  return join(sessionDir(cwd, sessionId), "goal.md");
87
62
  }
63
+ function strategyPath(cwd, sessionId) {
64
+ return join(sessionDir(cwd, sessionId), "strategy.md");
65
+ }
88
66
  function logsDir(cwd, sessionId) {
89
67
  return join(sessionDir(cwd, sessionId), "logs");
90
68
  }
@@ -100,16 +78,8 @@ function snapshotsDir(cwd, sessionId) {
100
78
  function snapshotDir(cwd, sessionId, cycle) {
101
79
  return join(snapshotsDir(cwd, sessionId), `cycle-${cycle}`);
102
80
  }
103
- function worktreeConfigPath(cwd) {
104
- return join(projectDir(cwd), "worktree.json");
105
- }
106
- function worktreeBaseDir(cwd) {
107
- return join(cwd, "..", `${basename(cwd)}-sisyphus-wt`);
108
- }
109
81
 
110
82
  export {
111
- __commonJS,
112
- __toESM,
113
83
  globalDir,
114
84
  socketPath,
115
85
  globalConfigPath,
@@ -129,12 +99,11 @@ export {
129
99
  contextDir,
130
100
  roadmapPath,
131
101
  goalPath,
102
+ strategyPath,
132
103
  logsDir,
133
104
  cycleLogPath,
134
105
  legacyLogsPath,
135
106
  snapshotsDir,
136
- snapshotDir,
137
- worktreeConfigPath,
138
- worktreeBaseDir
107
+ snapshotDir
139
108
  };
140
- //# sourceMappingURL=chunk-JXKUI4P6.js.map
109
+ //# sourceMappingURL=chunk-REUQ4B45.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/paths.ts"],"sourcesContent":["import { homedir } from 'node:os';\nimport { join } from 'node:path';\n\nexport function globalDir(): string {\n return join(homedir(), '.sisyphus');\n}\n\nexport function socketPath(): string {\n return join(globalDir(), 'daemon.sock');\n}\n\nexport function globalConfigPath(): string {\n return join(globalDir(), 'config.json');\n}\n\nexport function daemonLogPath(): string {\n return join(globalDir(), 'daemon.log');\n}\n\nexport function daemonPidPath(): string {\n return join(globalDir(), 'daemon.pid');\n}\n\nexport function daemonUpdatingPath(): string {\n return join(globalDir(), 'updating');\n}\n\nexport function projectDir(cwd: string): string {\n return join(cwd, '.sisyphus');\n}\n\nexport function projectConfigPath(cwd: string): string {\n return join(projectDir(cwd), 'config.json');\n}\n\nexport function projectOrchestratorPromptPath(cwd: string): string {\n return join(projectDir(cwd), 'orchestrator.md');\n}\n\nexport function sessionsDir(cwd: string): string {\n return join(projectDir(cwd), 'sessions');\n}\n\nexport function sessionDir(cwd: string, sessionId: string): string {\n return join(sessionsDir(cwd), sessionId);\n}\n\nexport function statePath(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'state.json');\n}\n\nexport function reportsDir(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'reports');\n}\n\nexport function reportFilePath(cwd: string, sessionId: string, agentId: string, suffix: string): string {\n return join(reportsDir(cwd, sessionId), `${agentId}-${suffix}.md`);\n}\n\nexport function messagesDir(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'messages');\n}\n\nexport function promptsDir(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'prompts');\n}\n\nexport function contextDir(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'context');\n}\n\nexport function roadmapPath(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'roadmap.md');\n}\n\nexport function goalPath(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'goal.md');\n}\n\nexport function strategyPath(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'strategy.md');\n}\n\nexport function logsDir(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'logs');\n}\n\nexport function cycleLogPath(cwd: string, sessionId: string, cycle: number): string {\n return join(logsDir(cwd, sessionId), `cycle-${String(cycle).padStart(3, '0')}.md`);\n}\n\n// Backwards compat for old sessions\nexport function legacyLogsPath(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'logs.md');\n}\n\nexport function snapshotsDir(cwd: string, sessionId: string): string {\n return join(sessionDir(cwd, sessionId), 'snapshots');\n}\n\nexport function snapshotDir(cwd: string, sessionId: string, cycle: number): string {\n return join(snapshotsDir(cwd, sessionId), `cycle-${cycle}`);\n}\n\n"],"mappings":";;;AAAA,SAAS,eAAe;AACxB,SAAS,YAAY;AAEd,SAAS,YAAoB;AAClC,SAAO,KAAK,QAAQ,GAAG,WAAW;AACpC;AAEO,SAAS,aAAqB;AACnC,SAAO,KAAK,UAAU,GAAG,aAAa;AACxC;AAEO,SAAS,mBAA2B;AACzC,SAAO,KAAK,UAAU,GAAG,aAAa;AACxC;AAEO,SAAS,gBAAwB;AACtC,SAAO,KAAK,UAAU,GAAG,YAAY;AACvC;AAEO,SAAS,gBAAwB;AACtC,SAAO,KAAK,UAAU,GAAG,YAAY;AACvC;AAEO,SAAS,qBAA6B;AAC3C,SAAO,KAAK,UAAU,GAAG,UAAU;AACrC;AAEO,SAAS,WAAW,KAAqB;AAC9C,SAAO,KAAK,KAAK,WAAW;AAC9B;AAEO,SAAS,kBAAkB,KAAqB;AACrD,SAAO,KAAK,WAAW,GAAG,GAAG,aAAa;AAC5C;AAEO,SAAS,8BAA8B,KAAqB;AACjE,SAAO,KAAK,WAAW,GAAG,GAAG,iBAAiB;AAChD;AAEO,SAAS,YAAY,KAAqB;AAC/C,SAAO,KAAK,WAAW,GAAG,GAA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Aa,KAAa,WAA2B;AACnE,SAAO,KAAK,WAAW,KAAK,SAAS,GAAG,WAAW;AACrD;AAEO,SAAS,YAAY,KAAa,WAAmB,OAAuB;AACjF,SAAO,KAAK,aAAa,KAAK,SAAS,GAAG,SAAS,KAAK,EAAE;AAC5D;","names":[]}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  globalConfigPath,
4
4
  projectConfigPath
5
- } from "./chunk-JXKUI4P6.js";
5
+ } from "./chunk-REUQ4B45.js";
6
6
 
7
7
  // src/shared/config.ts
8
8
  import { readFileSync } from "fs";
@@ -84,4 +84,4 @@ export {
84
84
  exec,
85
85
  execSafe
86
86
  };
87
- //# sourceMappingURL=chunk-LWWRGQWM.js.map
87
+ //# sourceMappingURL=chunk-Z32YVDMY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/config.ts","../src/shared/env.ts","../src/shared/exec.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { globalConfigPath, projectConfigPath } from './paths.js';\n\nexport type EffortLevel = 'low' | 'medium' | 'high' | 'max';\n\nexport interface Config {\n model?: string;\n tmuxSession?: string;\n orchestratorPrompt?: string;\n pollIntervalMs?: number;\n autoUpdate?: boolean;\n orchestratorEffort?: EffortLevel;\n agentEffort?: EffortLevel;\n editor?: string;\n repos?: string[];\n}\n\nconst DEFAULT_CONFIG: Config = {\n pollIntervalMs: 5000,\n orchestratorEffort: 'high',\n agentEffort: 'medium',\n};\n\nfunction readJsonFile(filePath: string): Partial<Config> {\n try {\n const content = readFileSync(filePath, 'utf-8');\n return JSON.parse(content) as Partial<Config>;\n } catch {\n return {};\n }\n}\n\nexport function loadConfig(cwd: string): Config {\n const global = readJsonFile(globalConfigPath());\n const project = readJsonFile(projectConfigPath(cwd));\n return { ...DEFAULT_CONFIG, ...global, ...project };\n}\n","/**\n * Build a PATH string that includes common binary directories\n * across package managers and platforms.\n *\n * Prepends known directories that exist on the system to the current PATH.\n * This ensures tmux commands can find binaries installed by Homebrew,\n * MacPorts, nix, and other package managers.\n */\nexport function augmentedPath(): string {\n const rawPath = process.env['PATH'];\n const basePath = rawPath !== undefined && rawPath.length > 0 ? rawPath : '/usr/bin:/bin';\n\n // Common binary directories across platforms/package managers.\n // Only prepend ones that aren't already in PATH.\n const candidates = [\n '/opt/homebrew/bin', // Homebrew (Apple Silicon macOS)\n '/opt/homebrew/sbin', // Homebrew sbin\n '/usr/local/bin', // Homebrew (Intel macOS), manual installs\n '/usr/local/sbin', // Manual installs\n '/opt/local/bin', // MacPorts\n '/opt/local/sbin', // MacPorts\n '/home/linuxbrew/.linuxbrew/bin', // Linuxbrew\n ];\n\n // Check for nix profile paths\n const nixProfile = process.env['NIX_PROFILES'];\n if (nixProfile) {\n for (const p of nixProfile.split(' ').reverse()) {\n candidates.push(`${p}/bin`);\n }\n }\n\n const existing = new Set(basePath.split(':'));\n const prepend = candidates.filter(dir => !existing.has(dir));\n\n return prepend.length > 0 ? `${prepend.join(':')}:${basePath}` : basePath;\n}\n\n/**\n * Environment variables for child processes that need access to\n * user-installed binaries (tmux, git, claude, etc.).\n */\nexport function execEnv(): Record<string, string | undefined> {\n return {\n ...process.env,\n PATH: augmentedPath(),\n };\n}\n","import { execSync } from 'node:child_process';\nimport { execEnv } from './env.js';\n\nexport const EXEC_ENV = execEnv();\n\nexport function exec(cmd: string, cwd?: string): string {\n return execSync(cmd, { encoding: 'utf-8', env: EXEC_ENV, cwd }).trim();\n}\n\nexport function execSafe(cmd: string, cwd?: string): string | null {\n try {\n return execSync(cmd, { encoding: 'utf-8', env: EXEC_ENV, cwd, stdio: ['pipe', 'pipe', 'pipe'] }).trim();\n } catch { return null; }\n}\n"],"mappings":";;;;;;;AAAA,SAAS,oBAAoB;AAiB7B,IAAM,iBAAyB;AAAA,EAC7B,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,aAAa;AACf;AAEA,SAAS,aAAa,UAAmC;AACvD,MAAI;AACF,UAAM,UAAU,aAAa,UAAU,OAAO;AAC9C,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EAAE,UAAU,SAAS,KAAK,UAAU,KAAK,OAAO,CAAC,QAAQ,QAAQ,MAAM,EAAE,CAAC,EAAE,KAAK;AAAA,EACxG,QAAQ;AAAE,WAAO;AAAA,EAAM;AACzB;","names":[]}
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatDuration,
6
6
  rawSend,
7
7
  statusColor
8
- } from "./chunk-T7ETTIQK.js";
8
+ } from "./chunk-M7LZ2ZHD.js";
9
9
  import {
10
10
  shellQuote
11
11
  } from "./chunk-6G226ZK7.js";
@@ -16,11 +16,11 @@ import {
16
16
  globalDir,
17
17
  roadmapPath,
18
18
  socketPath
19
- } from "./chunk-JXKUI4P6.js";
19
+ } from "./chunk-REUQ4B45.js";
20
20
 
21
21
  // src/cli/index.ts
22
22
  import { Command } from "commander";
23
- import { existsSync as existsSync5, mkdirSync as mkdirSync4 } from "fs";
23
+ import { existsSync as existsSync6, mkdirSync as mkdirSync4 } from "fs";
24
24
 
25
25
  // src/cli/commands/start.ts
26
26
  import { execSync as execSync5 } from "child_process";
@@ -576,6 +576,10 @@ Control:`);
576
576
  });
577
577
  }
578
578
 
579
+ // src/cli/commands/spawn.ts
580
+ import { existsSync as existsSync3 } from "fs";
581
+ import { join as join4 } from "path";
582
+
579
583
  // src/cli/stdin.ts
580
584
  function readStdin() {
581
585
  if (process.stdin.isTTY) return Promise.resolve(null);
@@ -592,11 +596,11 @@ function readStdin() {
592
596
 
593
597
  // src/cli/commands/spawn.ts
594
598
  function registerSpawn(program2) {
595
- program2.command("spawn").description("Spawn a new agent (orchestrator only)").argument("[instruction]", "Task instruction for the agent").option("--agent-type <type>", "Agent role label (default: worker)", "worker").requiredOption("--name <name>", "Agent name").option("--instruction <instruction>", "Task instruction for the agent (or pipe via stdin)").option("--worktree", "Spawn agent in an isolated git worktree").action(async (positionalInstruction, opts) => {
599
+ program2.command("spawn").description("Spawn a new agent (orchestrator only)").argument("[instruction]", "Task instruction for the agent").option("--agent-type <type>", "Agent role label (default: worker)", "worker").requiredOption("--name <name>", "Agent name").option("--instruction <instruction>", "Task instruction for the agent (or pipe via stdin)").option("--repo <name>", "Repo subdirectory to use for this agent").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (positionalInstruction, opts) => {
596
600
  assertTmux();
597
- const sessionId = process.env.SISYPHUS_SESSION_ID;
601
+ const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
598
602
  if (!sessionId) {
599
- console.error("Error: SISYPHUS_SESSION_ID environment variable not set");
603
+ console.error("Error: provide --session or set SISYPHUS_SESSION_ID environment variable");
600
604
  process.exit(1);
601
605
  }
602
606
  const instruction = opts.instruction ?? positionalInstruction ?? await readStdin();
@@ -604,13 +608,25 @@ function registerSpawn(program2) {
604
608
  console.error("Error: --instruction is required (or pipe via stdin)");
605
609
  process.exit(1);
606
610
  }
611
+ const sisyphusCwd = process.env["SISYPHUS_CWD"] ?? process.cwd();
612
+ if (opts.repo && (opts.repo.includes("/") || opts.repo.includes("..") || opts.repo.includes("\\"))) {
613
+ console.error("Error: --repo must be a directory name, not a path");
614
+ process.exit(1);
615
+ }
616
+ if (opts.repo && opts.repo !== ".") {
617
+ const repoPath = join4(sisyphusCwd, opts.repo);
618
+ if (!existsSync3(repoPath)) {
619
+ console.error(`Error: repo directory does not exist: ${repoPath}`);
620
+ process.exit(1);
621
+ }
622
+ }
607
623
  const request = {
608
624
  type: "spawn",
609
625
  sessionId,
610
626
  agentType: opts.agentType,
611
627
  name: opts.name,
612
628
  instruction,
613
- ...opts.worktree ? { worktree: true } : {}
629
+ ...opts.repo ? { repo: opts.repo } : {}
614
630
  };
615
631
  const response = await sendRequest(request);
616
632
  if (response.ok) {
@@ -645,18 +661,18 @@ function getUncommittedChanges() {
645
661
  }
646
662
  }
647
663
  function registerSubmit(program2) {
648
- program2.command("submit").description("Submit work report and exit (agent only)").option("--report <report>", "Work report (or pipe via stdin)").action(async (opts) => {
664
+ program2.command("submit").description("Submit work report and exit (agent only)").option("--report <report>", "Work report (or pipe via stdin)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
649
665
  assertTmux();
650
- const sessionId = process.env.SISYPHUS_SESSION_ID;
666
+ const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
651
667
  const agentId = process.env.SISYPHUS_AGENT_ID;
652
668
  if (!sessionId || !agentId) {
653
- console.error("Error: SISYPHUS_SESSION_ID and SISYPHUS_AGENT_ID environment variables must be set");
669
+ console.error("Error: provide --session or set SISYPHUS_SESSION_ID (and SISYPHUS_AGENT_ID) environment variables");
654
670
  process.exit(1);
655
671
  }
656
672
  if (isInWorktree()) {
657
673
  const changes = getUncommittedChanges();
658
674
  if (changes) {
659
- console.error("Error: uncommitted changes in worktree. Your branch is merged automatically after submit \u2014 uncommitted work will be lost.");
675
+ console.error("Error: uncommitted changes in worktree. Commit your changes before submitting.");
660
676
  console.error('\nCommit first:\n git add -A && git commit -m "description of changes"\n');
661
677
  console.error("Or discard:\n git checkout -- .\n");
662
678
  console.error("Uncommitted changes:");
@@ -683,11 +699,11 @@ function registerSubmit(program2) {
683
699
 
684
700
  // src/cli/commands/yield.ts
685
701
  function registerYield(program2) {
686
- program2.command("yield").description("Yield control back to daemon (orchestrator only)").option("--prompt <text>", "Instructions for the next orchestrator cycle (or pipe via stdin)").option("--mode <mode>", "System prompt mode for next cycle (planning, implementation)").action(async (opts) => {
702
+ program2.command("yield").description("Yield control back to daemon (orchestrator only)").option("--prompt <text>", "Instructions for the next orchestrator cycle (or pipe via stdin)").option("--mode <mode>", "System prompt mode for next cycle (planning, implementation, validation)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
687
703
  assertTmux();
688
- const sessionId = process.env.SISYPHUS_SESSION_ID;
704
+ const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
689
705
  if (!sessionId) {
690
- console.error("Error: SISYPHUS_SESSION_ID environment variable not set");
706
+ console.error("Error: provide --session or set SISYPHUS_SESSION_ID environment variable");
691
707
  process.exit(1);
692
708
  }
693
709
  const nextPrompt = opts.prompt ?? await readStdin() ?? void 0;
@@ -704,11 +720,11 @@ function registerYield(program2) {
704
720
 
705
721
  // src/cli/commands/complete.ts
706
722
  function registerComplete(program2) {
707
- program2.command("complete").description("Mark session as completed (orchestrator only)").requiredOption("--report <report>", "Final completion report").action(async (opts) => {
723
+ program2.command("complete").description("Mark session as completed (orchestrator only)").requiredOption("--report <report>", "Final completion report").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
708
724
  assertTmux();
709
- const sessionId = process.env.SISYPHUS_SESSION_ID;
725
+ const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
710
726
  if (!sessionId) {
711
- console.error("Error: SISYPHUS_SESSION_ID environment variable not set");
727
+ console.error("Error: provide --session or set SISYPHUS_SESSION_ID environment variable");
712
728
  process.exit(1);
713
729
  }
714
730
  const request = { type: "complete", sessionId, report: opts.report };
@@ -716,9 +732,8 @@ function registerComplete(program2) {
716
732
  if (response.ok) {
717
733
  console.log("Session completed.");
718
734
  console.log(`
719
- Follow up:`);
720
- console.log(` sisyphus continue # reactivate and keep working`);
721
- console.log(` sisyphus resume ${sessionId} "new instructions" # respawn orchestrator externally`);
735
+ To keep working in this session:`);
736
+ console.log(` sisyphus continue # reactivate session and clear roadmap for new work`);
722
737
  } else {
723
738
  console.error(`Error: ${response.error}`);
724
739
  process.exit(1);
@@ -728,17 +743,19 @@ Follow up:`);
728
743
 
729
744
  // src/cli/commands/continue.ts
730
745
  function registerContinue(program2) {
731
- program2.command("continue").description("Clear roadmap and continue working on a completed session (stays in current cycle)").addHelpText("after", "\n Use `continue` when a session completed but you want to add more work.\n Use `resume` when you want to restart with specific new instructions.\n").action(async () => {
746
+ program2.command("continue").description("Clear roadmap and continue working on a completed session (stays in current cycle)").addHelpText("after", "\n Use `continue` when a session completed but you want to add more work.\n Use `resume` when you want to restart with specific new instructions.\n").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
732
747
  assertTmux();
733
- const sessionId = process.env.SISYPHUS_SESSION_ID;
748
+ const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
734
749
  if (!sessionId) {
735
- console.error("Error: SISYPHUS_SESSION_ID environment variable not set");
750
+ console.error("Error: provide --session or set SISYPHUS_SESSION_ID environment variable");
736
751
  process.exit(1);
737
752
  }
738
753
  const request = { type: "continue", sessionId };
739
754
  const response = await sendRequest(request);
740
755
  if (response.ok) {
741
- console.log("Session reactivated. Plan cleared.");
756
+ console.log("Session reactivated. Roadmap cleared.");
757
+ console.log("\nThe previous roadmap has been wiped \u2014 you are starting fresh.");
758
+ console.log("Consider writing a new roadmap before spawning agents.");
742
759
  } else {
743
760
  console.error(`Error: ${response.error}`);
744
761
  process.exit(1);
@@ -787,7 +804,7 @@ function formatAgent(agent) {
787
804
  const status = colorize(agent.status, agent.status);
788
805
  const name = `${BOLD}${agent.name}${RESET}`;
789
806
  const type = `${DIM}(${agent.agentType})${RESET}`;
790
- const duration = formatDuration(agent.spawnedAt, agent.completedAt);
807
+ const duration = formatDuration(agent.activeMs);
791
808
  let line = ` ${agent.id} ${name} ${type} \u2014 ${status} ${DIM}(${duration})${RESET}`;
792
809
  if (agent.reports.length > 0) {
793
810
  for (const r of agent.reports) {
@@ -805,9 +822,9 @@ function formatAgent(agent) {
805
822
  function formatCycle(cycle, phase) {
806
823
  let duration;
807
824
  if (cycle.completedAt) {
808
- duration = ` ${DIM}(${formatDuration(cycle.timestamp, cycle.completedAt)})${RESET}`;
825
+ duration = ` ${DIM}(${formatDuration(cycle.activeMs)})${RESET}`;
809
826
  } else {
810
- const elapsed = formatDuration(cycle.timestamp, null);
827
+ const elapsed = formatDuration(cycle.activeMs);
811
828
  duration = ` ${DIM}(running, ${elapsed})${RESET}`;
812
829
  }
813
830
  const agents = cycle.agentsSpawned.length > 0 ? ` \u2014 agents: ${cycle.agentsSpawned.join(", ")}` : "";
@@ -865,7 +882,7 @@ ${BOLD}Active agents (${runningAgents.length}):${RESET}`);
865
882
  for (const agent of runningAgents) {
866
883
  const name = `${BOLD}${agent.name}${RESET}`;
867
884
  const type = `${DIM}(${agent.agentType})${RESET}`;
868
- const duration = formatDuration(agent.spawnedAt, null);
885
+ const duration = formatDuration(agent.activeMs);
869
886
  console.log(` ${agent.id} ${name} ${type} running ${duration}`);
870
887
  }
871
888
  }
@@ -929,8 +946,8 @@ function truncateTask(task, max) {
929
946
  return task.slice(0, max - 1) + "\u2026";
930
947
  }
931
948
  function registerList(program2) {
932
- program2.command("list").description("List sessions (defaults to current project)").option("-a, --all", "Show sessions from all projects").action(async (opts) => {
933
- const cwd = process.cwd();
949
+ program2.command("list").description("List sessions (defaults to current project)").option("-a, --all", "Show sessions from all projects").option("--cwd <path>", "Project directory to list sessions for (overrides SISYPHUS_CWD)").action(async (opts) => {
950
+ const cwd = opts.cwd ?? process.env["SISYPHUS_CWD"] ?? process.cwd();
934
951
  const request = { type: "list", cwd, all: opts.all };
935
952
  const response = await sendRequest(request);
936
953
  if (response.ok) {
@@ -951,8 +968,9 @@ function registerList(program2) {
951
968
  const status = `${color}${s.status}${RESET2}`;
952
969
  const agents = `${DIM2}${s.agentCount} agent(s)${RESET2}`;
953
970
  const task = truncateTask(s.task, 60);
971
+ const label = s.name ? `${s.name} ${DIM2}(${s.id.slice(0, 8)})${RESET2}` : s.id;
954
972
  const cwdLabel = opts.all && s.cwd ? ` ${DIM2}${basename(s.cwd)}${RESET2}` : "";
955
- console.log(` ${BOLD2}${s.id}${RESET2} ${status} ${agents} ${task}${cwdLabel}`);
973
+ console.log(` ${BOLD2}${label}${RESET2} ${status} ${agents} ${task}${cwdLabel}`);
956
974
  }
957
975
  if (filtered && totalCount && totalCount > sessions.length) {
958
976
  const otherCount = totalCount - sessions.length;
@@ -968,12 +986,12 @@ ${DIM2}${otherCount} more session(s) in other projects. Run ${RESET2}sisyphus li
968
986
 
969
987
  // src/cli/commands/report.ts
970
988
  function registerReport(program2) {
971
- program2.command("report").description("Send a progress report without exiting (agent only)").option("--message <message>", "Progress report content").action(async (opts) => {
989
+ program2.command("report").description("Send a progress report without exiting (agent only)").option("--message <message>", "Progress report content").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
972
990
  assertTmux();
973
- const sessionId = process.env.SISYPHUS_SESSION_ID;
991
+ const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
974
992
  const agentId = process.env.SISYPHUS_AGENT_ID;
975
993
  if (!sessionId || !agentId) {
976
- console.error("Error: SISYPHUS_SESSION_ID and SISYPHUS_AGENT_ID environment variables must be set");
994
+ console.error("Error: provide --session or set SISYPHUS_SESSION_ID (and SISYPHUS_AGENT_ID) environment variables");
977
995
  process.exit(1);
978
996
  }
979
997
  const content = opts.message ?? await readStdin();
@@ -995,7 +1013,7 @@ function registerReport(program2) {
995
1013
  // src/cli/commands/resume.ts
996
1014
  function registerResume(program2) {
997
1015
  program2.command("resume").description("Respawn orchestrator with new instructions (for paused/completed sessions)").addHelpText("after", "\n Use `resume` to restart a paused or completed session with new instructions.\n Use `continue` to keep working on a completed session without new instructions.\n").argument("<session-id>", "Session ID to resume").argument("[message]", "Additional instructions for the orchestrator").action(async (sessionId, message) => {
998
- const cwd = process.cwd();
1016
+ const cwd = process.env["SISYPHUS_CWD"] ?? process.cwd();
999
1017
  const request = { type: "resume", sessionId, cwd, message };
1000
1018
  const response = await sendRequest(request);
1001
1019
  if (response.ok) {
@@ -1114,7 +1132,8 @@ function registerRollback(program2) {
1114
1132
  console.error("Error: cycle must be a positive integer");
1115
1133
  process.exit(1);
1116
1134
  }
1117
- const request = { type: "rollback", sessionId, cwd: process.cwd(), toCycle };
1135
+ const cwd = process.env["SISYPHUS_CWD"] ?? process.cwd();
1136
+ const request = { type: "rollback", sessionId, cwd, toCycle };
1118
1137
  const response = await sendRequest(request);
1119
1138
  if (response.ok) {
1120
1139
  const data = response.data;
@@ -1173,7 +1192,7 @@ function registerSetupKeybind(program2) {
1173
1192
 
1174
1193
  // src/cli/commands/doctor.ts
1175
1194
  import { execSync as execSync7 } from "child_process";
1176
- import { existsSync as existsSync3, statSync } from "fs";
1195
+ import { existsSync as existsSync4, statSync } from "fs";
1177
1196
  function checkNodeVersion() {
1178
1197
  const major = parseInt(process.versions.node.split(".")[0], 10);
1179
1198
  if (major < 22) {
@@ -1230,7 +1249,7 @@ function checkDaemonInstalled() {
1230
1249
  };
1231
1250
  }
1232
1251
  const pid = daemonPidPath();
1233
- if (existsSync3(pid)) {
1252
+ if (existsSync4(pid)) {
1234
1253
  return { name: "Daemon setup", status: "ok", detail: `PID file found at ${pid}` };
1235
1254
  }
1236
1255
  return {
@@ -1242,7 +1261,7 @@ function checkDaemonInstalled() {
1242
1261
  }
1243
1262
  function checkDaemonRunning() {
1244
1263
  const pid = daemonPidPath();
1245
- if (!existsSync3(pid)) {
1264
+ if (!existsSync4(pid)) {
1246
1265
  const fix = process.platform === "darwin" ? "launchctl load -w ~/Library/LaunchAgents/com.sisyphus.daemon.plist" : "sisyphusd & \u2014 or check if the process is running";
1247
1266
  return {
1248
1267
  name: "Daemon process",
@@ -1280,7 +1299,7 @@ function checkTmux() {
1280
1299
  }
1281
1300
  function checkCycleScript() {
1282
1301
  const path = cycleScriptPath();
1283
- if (!existsSync3(path)) {
1302
+ if (!existsSync4(path)) {
1284
1303
  return {
1285
1304
  name: "Cycle script",
1286
1305
  status: "fail",
@@ -1305,7 +1324,7 @@ function checkCycleScript() {
1305
1324
  function checkTmuxKeybind() {
1306
1325
  const existing = getExistingBinding(DEFAULT_KEY);
1307
1326
  if (existing === null) {
1308
- if (existsSync3(sisyphusTmuxConfPath())) {
1327
+ if (existsSync4(sisyphusTmuxConfPath())) {
1309
1328
  return {
1310
1329
  name: `Tmux keybind (${DEFAULT_KEY})`,
1311
1330
  status: "warn",
@@ -1331,7 +1350,7 @@ function checkTmuxKeybind() {
1331
1350
  }
1332
1351
  function checkGlobalDir() {
1333
1352
  const dir = globalDir();
1334
- if (existsSync3(dir)) {
1353
+ if (existsSync4(dir)) {
1335
1354
  return { name: "Data directory", status: "ok", detail: dir };
1336
1355
  }
1337
1356
  return { name: "Data directory", status: "warn", detail: `${dir} does not exist (created on first use)` };
@@ -1427,11 +1446,11 @@ function registerGettingStarted(program2) {
1427
1446
  " mode, it's too small for sisyphus.",
1428
1447
  "",
1429
1448
  " Good tasks:",
1430
- ' \u2022 "Implement this feature" @path/to/spec.md',
1449
+ ' \u2022 "Implement this feature" @path/to/requirements.md',
1431
1450
  ' \u2022 "Do a deep dive on all SEO/AEO optimizations and',
1432
1451
  ' systematically apply them across the site"',
1433
1452
  " \u2022 Large-scale refactors spanning dozens of files",
1434
- " \u2022 Full feature builds from a written spec",
1453
+ " \u2022 Full feature builds from written requirements",
1435
1454
  "",
1436
1455
  " Too small for sisyphus:",
1437
1456
  ' \u2022 "Add these 3 UI components to the page"',
@@ -1442,9 +1461,9 @@ function registerGettingStarted(program2) {
1442
1461
  " tasks work great because the orchestrator will plan the approach.",
1443
1462
  " What matters is SCALE, not specificity.",
1444
1463
  "",
1445
- " For best results, write a spec and reference it directly:",
1464
+ " For best results, write requirements and reference them directly:",
1446
1465
  "",
1447
- ' sisyphus start "Implement this @path/to/spec.md"',
1466
+ ' sisyphus start "Implement this @path/to/requirements.md"',
1448
1467
  "",
1449
1468
  " \u2500\u2500\u2500 How It Works \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
1450
1469
  "",
@@ -1481,7 +1500,7 @@ function registerGettingStarted(program2) {
1481
1500
  "",
1482
1501
  " Start & monitor:",
1483
1502
  ' sisyphus start "task" Start a session',
1484
- ' sisyphus start "task @spec.md" Start referencing a spec',
1503
+ ' sisyphus start "task @requirements.md" Start referencing requirements',
1485
1504
  " sisyphus status [id] Show session status",
1486
1505
  " sisyphus list List all sessions",
1487
1506
  " sisyphus dashboard Open TUI dashboard",
@@ -1506,8 +1525,8 @@ function registerGettingStarted(program2) {
1506
1525
  }
1507
1526
 
1508
1527
  // src/cli/commands/init.ts
1509
- import { existsSync as existsSync4, mkdirSync as mkdirSync3, writeFileSync as writeFileSync3 } from "fs";
1510
- import { join as join4 } from "path";
1528
+ import { existsSync as existsSync5, mkdirSync as mkdirSync3, writeFileSync as writeFileSync3 } from "fs";
1529
+ import { join as join5 } from "path";
1511
1530
  var DEFAULT_CONFIG = {};
1512
1531
  var ORCHESTRATOR_TEMPLATE = `# Custom Orchestrator Prompt
1513
1532
 
@@ -1518,9 +1537,9 @@ var ORCHESTRATOR_TEMPLATE = `# Custom Orchestrator Prompt
1518
1537
  function registerInit(program2) {
1519
1538
  program2.command("init").description("Initialize sisyphus configuration for this project").option("--orchestrator", "Also create a custom orchestrator prompt template").action((opts) => {
1520
1539
  const cwd = process.cwd();
1521
- const sisDir = join4(cwd, ".sisyphus");
1522
- const configPath = join4(sisDir, "config.json");
1523
- if (existsSync4(configPath)) {
1540
+ const sisDir = join5(cwd, ".sisyphus");
1541
+ const configPath = join5(sisDir, "config.json");
1542
+ if (existsSync5(configPath)) {
1524
1543
  console.log(`Already initialized: ${configPath}`);
1525
1544
  return;
1526
1545
  }
@@ -1528,8 +1547,8 @@ function registerInit(program2) {
1528
1547
  writeFileSync3(configPath, JSON.stringify(DEFAULT_CONFIG, null, 2) + "\n", "utf-8");
1529
1548
  console.log(`Created ${configPath}`);
1530
1549
  if (opts.orchestrator) {
1531
- const orchPath = join4(sisDir, "orchestrator.md");
1532
- if (!existsSync4(orchPath)) {
1550
+ const orchPath = join5(sisDir, "orchestrator.md");
1551
+ if (!existsSync5(orchPath)) {
1533
1552
  writeFileSync3(orchPath, ORCHESTRATOR_TEMPLATE, "utf-8");
1534
1553
  console.log(`Created ${orchPath}`);
1535
1554
  }
@@ -1580,7 +1599,7 @@ registerInit(program);
1580
1599
  program.addHelpText("after", `
1581
1600
  Examples:
1582
1601
  $ sisyphus start "Implement auth system" Start a new session
1583
- $ sisyphus start "Build @spec.md" -n auth Start with a name and spec reference
1602
+ $ sisyphus start "Build @requirements.md" -n auth Start with a name and requirements reference
1584
1603
  $ sisyphus status Check current sessions
1585
1604
  $ sisyphus dashboard Open the TUI
1586
1605
  $ sisyphus doctor Verify installation
@@ -1590,7 +1609,7 @@ Run 'sisyphus getting-started' for a complete usage guide.
1590
1609
  var args = process.argv.slice(2);
1591
1610
  var firstArg = args[0];
1592
1611
  var skipWelcome = ["doctor", "getting-started", "help", "--help", "-h", "init", "uninstall", "--version", "-V"];
1593
- if (!existsSync5(globalDir()) && firstArg && !skipWelcome.includes(firstArg)) {
1612
+ if (!existsSync6(globalDir()) && firstArg && !skipWelcome.includes(firstArg)) {
1594
1613
  mkdirSync4(globalDir(), { recursive: true });
1595
1614
  console.log("");
1596
1615
  console.log(" Welcome to Sisyphus \u2014 multi-agent orchestration for Claude Code.");