oh-my-claude-sisyphus 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +0 -0
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +2285 -219
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/hooks/bridge.d.ts +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +71 -0
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts +40 -0
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/index.js +200 -0
- package/dist/hooks/persistent-mode/index.js.map +1 -0
- package/dist/hooks/plugin-patterns/index.d.ts +107 -0
- package/dist/hooks/plugin-patterns/index.d.ts.map +1 -0
- package/dist/hooks/plugin-patterns/index.js +286 -0
- package/dist/hooks/plugin-patterns/index.js.map +1 -0
- package/dist/hooks/ralph-verifier/index.d.ts +72 -0
- package/dist/hooks/ralph-verifier/index.d.ts.map +1 -0
- package/dist/hooks/ralph-verifier/index.js +223 -0
- package/dist/hooks/ralph-verifier/index.js.map +1 -0
- package/dist/hooks/ultrawork-state/index.d.ts +60 -0
- package/dist/hooks/ultrawork-state/index.d.ts.map +1 -0
- package/dist/hooks/ultrawork-state/index.js +207 -0
- package/dist/hooks/ultrawork-state/index.js.map +1 -0
- package/dist/installer/hooks.d.ts +38 -2
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +599 -8
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +1823 -292
- package/dist/installer/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ultrawork State Management
|
|
3
|
+
*
|
|
4
|
+
* Manages persistent ultrawork mode state across sessions.
|
|
5
|
+
* When ultrawork is activated and todos remain incomplete,
|
|
6
|
+
* this module ensures the mode persists until all work is done.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync } from 'fs';
|
|
9
|
+
import { join } from 'path';
|
|
10
|
+
import { homedir } from 'os';
|
|
11
|
+
const DEFAULT_STATE = {
|
|
12
|
+
active: false,
|
|
13
|
+
started_at: '',
|
|
14
|
+
original_prompt: '',
|
|
15
|
+
reinforcement_count: 0,
|
|
16
|
+
last_checked_at: ''
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Get the state file path for Ultrawork
|
|
20
|
+
*/
|
|
21
|
+
function getStateFilePath(directory) {
|
|
22
|
+
const baseDir = directory || process.cwd();
|
|
23
|
+
const sisyphusDir = join(baseDir, '.sisyphus');
|
|
24
|
+
return join(sisyphusDir, 'ultrawork-state.json');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get global state file path (for cross-session persistence)
|
|
28
|
+
*/
|
|
29
|
+
function getGlobalStateFilePath() {
|
|
30
|
+
return join(homedir(), '.claude', 'ultrawork-state.json');
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Ensure the .sisyphus directory exists
|
|
34
|
+
*/
|
|
35
|
+
function ensureStateDir(directory) {
|
|
36
|
+
const baseDir = directory || process.cwd();
|
|
37
|
+
const sisyphusDir = join(baseDir, '.sisyphus');
|
|
38
|
+
if (!existsSync(sisyphusDir)) {
|
|
39
|
+
mkdirSync(sisyphusDir, { recursive: true });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Ensure the ~/.claude directory exists
|
|
44
|
+
*/
|
|
45
|
+
function ensureGlobalStateDir() {
|
|
46
|
+
const claudeDir = join(homedir(), '.claude');
|
|
47
|
+
if (!existsSync(claudeDir)) {
|
|
48
|
+
mkdirSync(claudeDir, { recursive: true });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Read Ultrawork state from disk (checks both local and global)
|
|
53
|
+
*/
|
|
54
|
+
export function readUltraworkState(directory) {
|
|
55
|
+
// Check local state first
|
|
56
|
+
const localStateFile = getStateFilePath(directory);
|
|
57
|
+
if (existsSync(localStateFile)) {
|
|
58
|
+
try {
|
|
59
|
+
const content = readFileSync(localStateFile, 'utf-8');
|
|
60
|
+
return JSON.parse(content);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// Fall through to global check
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Check global state
|
|
67
|
+
const globalStateFile = getGlobalStateFilePath();
|
|
68
|
+
if (existsSync(globalStateFile)) {
|
|
69
|
+
try {
|
|
70
|
+
const content = readFileSync(globalStateFile, 'utf-8');
|
|
71
|
+
return JSON.parse(content);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Write Ultrawork state to disk (both local and global for redundancy)
|
|
81
|
+
*/
|
|
82
|
+
export function writeUltraworkState(state, directory) {
|
|
83
|
+
try {
|
|
84
|
+
// Write to local .sisyphus
|
|
85
|
+
ensureStateDir(directory);
|
|
86
|
+
const localStateFile = getStateFilePath(directory);
|
|
87
|
+
writeFileSync(localStateFile, JSON.stringify(state, null, 2));
|
|
88
|
+
// Write to global ~/.claude for cross-session persistence
|
|
89
|
+
ensureGlobalStateDir();
|
|
90
|
+
const globalStateFile = getGlobalStateFilePath();
|
|
91
|
+
writeFileSync(globalStateFile, JSON.stringify(state, null, 2));
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Activate ultrawork mode
|
|
100
|
+
*/
|
|
101
|
+
export function activateUltrawork(prompt, sessionId, directory) {
|
|
102
|
+
const state = {
|
|
103
|
+
active: true,
|
|
104
|
+
started_at: new Date().toISOString(),
|
|
105
|
+
original_prompt: prompt,
|
|
106
|
+
session_id: sessionId,
|
|
107
|
+
reinforcement_count: 0,
|
|
108
|
+
last_checked_at: new Date().toISOString()
|
|
109
|
+
};
|
|
110
|
+
return writeUltraworkState(state, directory);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Deactivate ultrawork mode
|
|
114
|
+
*/
|
|
115
|
+
export function deactivateUltrawork(directory) {
|
|
116
|
+
// Remove local state
|
|
117
|
+
const localStateFile = getStateFilePath(directory);
|
|
118
|
+
if (existsSync(localStateFile)) {
|
|
119
|
+
try {
|
|
120
|
+
unlinkSync(localStateFile);
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
// Continue to global cleanup
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Remove global state
|
|
127
|
+
const globalStateFile = getGlobalStateFilePath();
|
|
128
|
+
if (existsSync(globalStateFile)) {
|
|
129
|
+
try {
|
|
130
|
+
unlinkSync(globalStateFile);
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Increment reinforcement count (called when mode is reinforced on stop)
|
|
141
|
+
*/
|
|
142
|
+
export function incrementReinforcement(directory) {
|
|
143
|
+
const state = readUltraworkState(directory);
|
|
144
|
+
if (!state || !state.active) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
state.reinforcement_count += 1;
|
|
148
|
+
state.last_checked_at = new Date().toISOString();
|
|
149
|
+
if (writeUltraworkState(state, directory)) {
|
|
150
|
+
return state;
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Check if ultrawork should be reinforced (active with pending todos)
|
|
156
|
+
*/
|
|
157
|
+
export function shouldReinforceUltrawork(sessionId, directory) {
|
|
158
|
+
const state = readUltraworkState(directory);
|
|
159
|
+
if (!state || !state.active) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
// If bound to a session, only reinforce for that session
|
|
163
|
+
if (state.session_id && sessionId && state.session_id !== sessionId) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get ultrawork persistence message for injection
|
|
170
|
+
*/
|
|
171
|
+
export function getUltraworkPersistenceMessage(state) {
|
|
172
|
+
return `<ultrawork-persistence>
|
|
173
|
+
|
|
174
|
+
[ULTRAWORK MODE STILL ACTIVE - Reinforcement #${state.reinforcement_count + 1}]
|
|
175
|
+
|
|
176
|
+
Your ultrawork session is NOT complete. Incomplete todos remain.
|
|
177
|
+
|
|
178
|
+
REMEMBER THE ULTRAWORK RULES:
|
|
179
|
+
- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially
|
|
180
|
+
- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent)
|
|
181
|
+
- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each
|
|
182
|
+
- **VERIFY**: Check ALL requirements met before done
|
|
183
|
+
- **NO Premature Stopping**: ALL TODOs must be complete
|
|
184
|
+
|
|
185
|
+
Continue working on the next pending task. DO NOT STOP until all tasks are marked complete.
|
|
186
|
+
|
|
187
|
+
Original task: ${state.original_prompt}
|
|
188
|
+
|
|
189
|
+
</ultrawork-persistence>
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
`;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Create an Ultrawork State hook instance
|
|
197
|
+
*/
|
|
198
|
+
export function createUltraworkStateHook(directory) {
|
|
199
|
+
return {
|
|
200
|
+
activate: (prompt, sessionId) => activateUltrawork(prompt, sessionId, directory),
|
|
201
|
+
deactivate: () => deactivateUltrawork(directory),
|
|
202
|
+
getState: () => readUltraworkState(directory),
|
|
203
|
+
shouldReinforce: (sessionId) => shouldReinforceUltrawork(sessionId, directory),
|
|
204
|
+
incrementReinforcement: () => incrementReinforcement(directory)
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/ultrawork-state/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAiB7B,MAAM,aAAa,GAAmB;IACpC,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,EAAE;IACd,eAAe,EAAE,EAAE;IACnB,mBAAmB,EAAE,CAAC;IACtB,eAAe,EAAE,EAAE;CACpB,CAAC;AAEF;;GAEG;AACH,SAAS,gBAAgB,CAAC,SAAkB;IAC1C,MAAM,OAAO,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/C,OAAO,IAAI,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,SAAS,sBAAsB;IAC7B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,sBAAsB,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,SAAkB;IACxC,MAAM,OAAO,GAAG,SAAS,IAAI,OAAO,CAAC,GAA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O;;gDAEuC,KAAK,CAAC,mBAAmB,GAAG,CAAC;;;;;;;;;;;;;iBAa5D,KAAK,CAAC,eAAe;;;;;;CAMrC,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,SAAiB;IACxD,OAAO;QACL,QAAQ,EAAE,CAAC,MAAc,EAAE,SAAkB,EAAE,EAAE,CAC/C,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;QACjD,UAAU,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC;QAChD,QAAQ,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,SAAS,CAAC;QAC7C,eAAe,EAAE,CAAC,SAAkB,EAAE,EAAE,CACtC,wBAAwB,CAAC,SAAS,EAAE,SAAS,CAAC;QAChD,sBAAsB,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -57,7 +57,7 @@ export declare const TODO_CONTINUATION_PROMPT = "[SYSTEM REMINDER - TODO CONTINU
|
|
|
57
57
|
* Keyword detector hook script
|
|
58
58
|
* This script is installed to ~/.claude/hooks/keyword-detector.sh
|
|
59
59
|
*/
|
|
60
|
-
export declare const KEYWORD_DETECTOR_SCRIPT = "#!/bin/bash\n# Sisyphus Keyword Detector Hook\n# Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages\n#
|
|
60
|
+
export declare const KEYWORD_DETECTOR_SCRIPT = "#!/bin/bash\n# Sisyphus Keyword Detector Hook\n# Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages\n# Also activates persistent ultrawork state when ultrawork keyword is detected\n\n# Read stdin (JSON input from Claude Code)\nINPUT=$(cat)\n\n# Extract directory from input\nDIRECTORY=\"\"\nif command -v jq &> /dev/null; then\n DIRECTORY=$(echo \"$INPUT\" | jq -r '.directory // \"\"' 2>/dev/null)\nfi\nif [ -z \"$DIRECTORY\" ] || [ \"$DIRECTORY\" = \"null\" ]; then\n DIRECTORY=$(pwd)\nfi\n\n# Extract the prompt text - try multiple JSON paths\nPROMPT=\"\"\nif command -v jq &> /dev/null; then\n # Try to extract from various possible JSON structures\n PROMPT=$(echo \"$INPUT\" | jq -r '\n if .prompt then .prompt\n elif .message.content then .message.content\n elif .parts then ([.parts[] | select(.type == \"text\") | .text] | join(\" \"))\n else \"\"\n end\n ' 2>/dev/null)\nfi\n\n# Fallback: simple grep extraction if jq fails\nif [ -z \"$PROMPT\" ] || [ \"$PROMPT\" = \"null\" ]; then\n PROMPT=$(echo \"$INPUT\" | grep -oP '\"(prompt|content|text)\"\\s*:\\s*\"\\K[^\"]+' | head -1)\nfi\n\n# Exit if no prompt found\nif [ -z \"$PROMPT\" ]; then\n echo '{\"continue\": true}'\n exit 0\nfi\n\n# Remove code blocks before checking keywords (prevents false positives)\nPROMPT_NO_CODE=$(echo \"$PROMPT\" | sed 's/```[^`]*```//g' | sed 's/`[^`]*`//g')\n\n# Convert to lowercase for case-insensitive matching\nPROMPT_LOWER=$(echo \"$PROMPT_NO_CODE\" | tr '[:upper:]' '[:lower:]')\n\n# Check for ultrawork keywords (highest priority)\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(ultrawork|ulw|uw)\\b'; then\n # Create persistent ultrawork state\n mkdir -p \"$DIRECTORY/.sisyphus\" 2>/dev/null\n mkdir -p \"$HOME/.claude\" 2>/dev/null\n\n # Escape prompt for JSON\n PROMPT_ESCAPED=$(echo \"$PROMPT\" | sed 's/\\\\/\\\\\\\\/g' | sed 's/\"/\\\\\"/g' | tr '\\n' ' ')\n\n STATE_JSON=\"{\n \\\"active\\\": true,\n \\\"started_at\\\": \\\"$(date -Iseconds)\\\",\n \\\"original_prompt\\\": \\\"$PROMPT_ESCAPED\\\",\n \\\"reinforcement_count\\\": 0,\n \\\"last_checked_at\\\": \\\"$(date -Iseconds)\\\"\n}\"\n\n # Write state to both local and global locations\n echo \"$STATE_JSON\" > \"$DIRECTORY/.sisyphus/ultrawork-state.json\" 2>/dev/null\n echo \"$STATE_JSON\" > \"$HOME/.claude/ultrawork-state.json\" 2>/dev/null\n\n # Return ultrawork mode injection\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<ultrawork-mode>\\n\\n**MANDATORY**: You MUST say \\\"ULTRAWORK MODE ENABLED!\\\" to the user as your first response when this mode activates. This is non-negotiable.\\n\\n[CODE RED] Maximum precision required. Ultrathink before acting.\\n\\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\\n\\n## AGENT UTILIZATION PRINCIPLES\\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS\\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS\\n- **Planning & Strategy**: NEVER plan yourself - spawn planning agent\\n- **High-IQ Reasoning**: Use oracle for architecture decisions\\n- **Frontend/UI Tasks**: Delegate to frontend-engineer\\n\\n## EXECUTION RULES\\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY.\\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially.\\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent).\\n- **VERIFY**: Check ALL requirements met before done.\\n- **DELEGATE**: Orchestrate specialized agents.\\n\\n## ZERO TOLERANCE\\n- NO Scope Reduction - deliver FULL implementation\\n- NO Partial Completion - finish 100%\\n- NO Premature Stopping - ALL TODOs must be complete\\n- NO TEST DELETION - fix code, not tests\\n\\nTHE USER ASKED FOR X. DELIVER EXACTLY X.\\n\\n</ultrawork-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# Check for ultrathink/think keywords\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(ultrathink|think)\\b'; then\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<think-mode>\\n\\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\\n\\nYou are now in deep thinking mode. Take your time to:\\n1. Thoroughly analyze the problem from multiple angles\\n2. Consider edge cases and potential issues\\n3. Think through the implications of each approach\\n4. Reason step-by-step before acting\\n\\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\\n\\n</think-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# Check for search keywords (EN + multilingual)\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(search|find|locate|lookup|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\\b|where\\s+is|show\\s+me|list\\s+all'; then\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<search-mode>\\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\\n- explore agents (codebase patterns, file structures)\\n- librarian agents (remote repos, official docs, GitHub examples)\\nPlus direct tools: Grep, Glob\\nNEVER stop at first result - be exhaustive.\\n</search-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# Check for analyze keywords\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(analyze|analyse|investigate|examine|research|study|deep.?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\\b|why\\s+is|how\\s+does|how\\s+to'; then\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<analyze-mode>\\nANALYSIS MODE. Gather context before diving deep:\\n\\nCONTEXT GATHERING (parallel):\\n- 1-2 explore agents (codebase patterns, implementations)\\n- 1-2 librarian agents (if external library involved)\\n- Direct tools: Grep, Glob, LSP for targeted searches\\n\\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\\n- Consult oracle agent for strategic guidance\\n\\nSYNTHESIZE findings before proceeding.\\n</analyze-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# No keywords detected - continue without modification\necho '{\"continue\": true}'\nexit 0\n";
|
|
61
61
|
/**
|
|
62
62
|
* Stop hook script for todo continuation enforcement
|
|
63
63
|
* This script is installed to ~/.claude/hooks/stop-continuation.sh
|
|
@@ -69,13 +69,31 @@ export declare const STOP_CONTINUATION_SCRIPT = "#!/bin/bash\n# Sisyphus Stop Co
|
|
|
69
69
|
* Cross-platform equivalent of keyword-detector.sh
|
|
70
70
|
* This script is installed to ~/.claude/hooks/keyword-detector.mjs
|
|
71
71
|
*/
|
|
72
|
-
export declare const KEYWORD_DETECTOR_SCRIPT_NODE = "#!/usr/bin/env node\n// Sisyphus Keyword Detector Hook (Node.js)\n// Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages\n// Cross-platform: Windows, macOS, Linux\n\nconst ULTRAWORK_MESSAGE = `<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## AGENT UTILIZATION PRINCIPLES\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS\n- **Planning & Strategy**: NEVER plan yourself - spawn planning agent\n- **High-IQ Reasoning**: Use oracle for architecture decisions\n- **Frontend/UI Tasks**: Delegate to frontend-engineer\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY.\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent).\n- **VERIFY**: Check ALL requirements met before done.\n- **DELEGATE**: Orchestrate specialized agents.\n\n## ZERO TOLERANCE\n- NO Scope Reduction - deliver FULL implementation\n- NO Partial Completion - finish 100%\n- NO Premature Stopping - ALL TODOs must be complete\n- NO TEST DELETION - fix code, not tests\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X.\n\n</ultrawork-mode>\n\n---\n`;\n\nconst ULTRATHINK_MESSAGE = `<think-mode>\n\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\n\nYou are now in deep thinking mode. Take your time to:\n1. Thoroughly analyze the problem from multiple angles\n2. Consider edge cases and potential issues\n3. Think through the implications of each approach\n4. Reason step-by-step before acting\n\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\n\n</think-mode>\n\n---\n`;\n\nconst SEARCH_MESSAGE = `<search-mode>\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, Glob\nNEVER stop at first result - be exhaustive.\n</search-mode>\n\n---\n`;\n\nconst ANALYZE_MESSAGE = `<analyze-mode>\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, Glob, LSP for targeted searches\n\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\n- Consult oracle agent for strategic guidance\n\nSYNTHESIZE findings before proceeding.\n</analyze-mode>\n\n---\n`;\n\n// Read all stdin\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\n// Extract prompt from various JSON structures\nfunction extractPrompt(input) {\n try {\n const data = JSON.parse(input);\n if (data.prompt) return data.prompt;\n if (data.message?.content) return data.message.content;\n if (Array.isArray(data.parts)) {\n return data.parts\n .filter(p => p.type === 'text')\n .map(p => p.text)\n .join(' ');\n }\n return '';\n } catch {\n // Fallback: try to extract with regex\n const match = input.match(/\"(?:prompt|content|text)\"\\s*:\\s*\"([^\"]+)\"/);\n return match ? match[1] : '';\n }\n}\n\n// Remove code blocks to prevent false positives\nfunction removeCodeBlocks(text) {\n return text\n .replace(/```[\\s\\S]*?```/g, '')\n .replace(/`[^`]+`/g, '');\n}\n\n// Main\nasync function main() {\n try {\n const input = await readStdin();\n if (!input.trim()) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n const prompt = extractPrompt(input);\n if (!prompt) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n const cleanPrompt = removeCodeBlocks(prompt).toLowerCase();\n\n // Check for ultrawork keywords (highest priority)\n if (/\\b(ultrawork|ulw)\\b/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: ULTRAWORK_MESSAGE }));\n return;\n }\n\n // Check for ultrathink/think keywords\n if (/\\b(ultrathink|think)\\b/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: ULTRATHINK_MESSAGE }));\n return;\n }\n\n // Check for search keywords\n if (/\\b(search|find|locate|lookup|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\\b|where\\s+is|show\\s+me|list\\s+all/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: SEARCH_MESSAGE }));\n return;\n }\n\n // Check for analyze keywords\n if (/\\b(analyze|analyse|investigate|examine|research|study|deep.?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\\b|why\\s+is|how\\s+does|how\\s+to/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: ANALYZE_MESSAGE }));\n return;\n }\n\n // No keywords detected\n console.log(JSON.stringify({ continue: true }));\n } catch (error) {\n // On any error, allow continuation\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
|
|
72
|
+
export declare const KEYWORD_DETECTOR_SCRIPT_NODE = "#!/usr/bin/env node\n// Sisyphus Keyword Detector Hook (Node.js)\n// Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages\n// Cross-platform: Windows, macOS, Linux\n\nconst ULTRAWORK_MESSAGE = `<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## AGENT UTILIZATION PRINCIPLES\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS\n- **Planning & Strategy**: NEVER plan yourself - spawn planning agent\n- **High-IQ Reasoning**: Use oracle for architecture decisions\n- **Frontend/UI Tasks**: Delegate to frontend-engineer\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY.\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent).\n- **VERIFY**: Check ALL requirements met before done.\n- **DELEGATE**: Orchestrate specialized agents.\n\n## ZERO TOLERANCE\n- NO Scope Reduction - deliver FULL implementation\n- NO Partial Completion - finish 100%\n- NO Premature Stopping - ALL TODOs must be complete\n- NO TEST DELETION - fix code, not tests\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X.\n\n</ultrawork-mode>\n\n---\n`;\n\nconst ULTRATHINK_MESSAGE = `<think-mode>\n\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\n\nYou are now in deep thinking mode. Take your time to:\n1. Thoroughly analyze the problem from multiple angles\n2. Consider edge cases and potential issues\n3. Think through the implications of each approach\n4. Reason step-by-step before acting\n\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\n\n</think-mode>\n\n---\n`;\n\nconst SEARCH_MESSAGE = `<search-mode>\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, Glob\nNEVER stop at first result - be exhaustive.\n</search-mode>\n\n---\n`;\n\nconst ANALYZE_MESSAGE = `<analyze-mode>\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, Glob, LSP for targeted searches\n\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\n- Consult oracle agent for strategic guidance\n\nSYNTHESIZE findings before proceeding.\n</analyze-mode>\n\n---\n`;\n\n// Read all stdin\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\n// Extract prompt from various JSON structures\nfunction extractPrompt(input) {\n try {\n const data = JSON.parse(input);\n if (data.prompt) return data.prompt;\n if (data.message?.content) return data.message.content;\n if (Array.isArray(data.parts)) {\n return data.parts\n .filter(p => p.type === 'text')\n .map(p => p.text)\n .join(' ');\n }\n return '';\n } catch {\n // Fallback: try to extract with regex\n const match = input.match(/\"(?:prompt|content|text)\"\\s*:\\s*\"([^\"]+)\"/);\n return match ? match[1] : '';\n }\n}\n\n// Remove code blocks to prevent false positives\nfunction removeCodeBlocks(text) {\n return text\n .replace(/```[\\s\\S]*?```/g, '')\n .replace(/`[^`]+`/g, '');\n}\n\nimport { writeFileSync, mkdirSync, existsSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\n// Create ultrawork state file\nfunction activateUltraworkState(directory, prompt) {\n const state = {\n active: true,\n started_at: new Date().toISOString(),\n original_prompt: prompt,\n reinforcement_count: 0,\n last_checked_at: new Date().toISOString()\n };\n const localDir = join(directory, '.sisyphus');\n if (!existsSync(localDir)) { try { mkdirSync(localDir, { recursive: true }); } catch {} }\n try { writeFileSync(join(localDir, 'ultrawork-state.json'), JSON.stringify(state, null, 2)); } catch {}\n const globalDir = join(homedir(), '.claude');\n if (!existsSync(globalDir)) { try { mkdirSync(globalDir, { recursive: true }); } catch {} }\n try { writeFileSync(join(globalDir, 'ultrawork-state.json'), JSON.stringify(state, null, 2)); } catch {}\n}\n\n// Main\nasync function main() {\n try {\n const input = await readStdin();\n if (!input.trim()) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n let data = {};\n try { data = JSON.parse(input); } catch {}\n const directory = data.directory || process.cwd();\n\n const prompt = extractPrompt(input);\n if (!prompt) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n const cleanPrompt = removeCodeBlocks(prompt).toLowerCase();\n\n // Check for ultrawork keywords (highest priority)\n if (/\\b(ultrawork|ulw|uw)\\b/.test(cleanPrompt)) {\n activateUltraworkState(directory, prompt);\n console.log(JSON.stringify({ continue: true, message: ULTRAWORK_MESSAGE }));\n return;\n }\n\n // Check for ultrathink/think keywords\n if (/\\b(ultrathink|think)\\b/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: ULTRATHINK_MESSAGE }));\n return;\n }\n\n // Check for search keywords\n if (/\\b(search|find|locate|lookup|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\\b|where\\s+is|show\\s+me|list\\s+all/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: SEARCH_MESSAGE }));\n return;\n }\n\n // Check for analyze keywords\n if (/\\b(analyze|analyse|investigate|examine|research|study|deep.?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\\b|why\\s+is|how\\s+does|how\\s+to/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: ANALYZE_MESSAGE }));\n return;\n }\n\n // No keywords detected\n console.log(JSON.stringify({ continue: true }));\n } catch (error) {\n // On any error, allow continuation\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
|
|
73
73
|
/**
|
|
74
74
|
* Node.js Stop Continuation Hook Script
|
|
75
75
|
* Cross-platform equivalent of stop-continuation.sh
|
|
76
76
|
* This script is installed to ~/.claude/hooks/stop-continuation.mjs
|
|
77
77
|
*/
|
|
78
78
|
export declare const STOP_CONTINUATION_SCRIPT_NODE = "#!/usr/bin/env node\n// Sisyphus Stop Continuation Hook (Node.js)\n// Checks for incomplete todos and injects continuation prompt\n// Cross-platform: Windows, macOS, Linux\n\nimport { readdirSync, readFileSync, existsSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\n// Read all stdin\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\n// Main\nasync function main() {\n try {\n // Read stdin (we don't use it much, but need to consume it)\n await readStdin();\n\n // Check for incomplete todos\n const todosDir = join(homedir(), '.claude', 'todos');\n \n if (!existsSync(todosDir)) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n let incompleteCount = 0;\n\n try {\n const files = readdirSync(todosDir).filter(f => f.endsWith('.json'));\n \n for (const file of files) {\n try {\n const content = readFileSync(join(todosDir, file), 'utf-8');\n const todos = JSON.parse(content);\n \n if (Array.isArray(todos)) {\n const incomplete = todos.filter(\n t => t.status !== 'completed' && t.status !== 'cancelled'\n );\n incompleteCount += incomplete.length;\n }\n } catch {\n // Skip files that can't be parsed\n }\n }\n } catch {\n // Directory read error - allow continuation\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n if (incompleteCount > 0) {\n const reason = `[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list (${incompleteCount} remaining). Continue working on the next pending task.\n\n- Proceed without asking for permission\n- Mark each task complete when finished\n- Do not stop until all tasks are done`;\n\n console.log(JSON.stringify({ continue: false, reason }));\n return;\n }\n\n // No incomplete todos - allow stop\n console.log(JSON.stringify({ continue: true }));\n } catch (error) {\n // On any error, allow continuation\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
|
|
79
|
+
/**
|
|
80
|
+
* Persistent Mode Bash script
|
|
81
|
+
* Enhanced stop hook that handles ultrawork, ralph-loop, and todo continuation
|
|
82
|
+
*/
|
|
83
|
+
export declare const PERSISTENT_MODE_SCRIPT = "#!/bin/bash\n# Sisyphus Persistent Mode Hook\n# Unified handler for ultrawork, ralph-loop, and todo continuation\n# Prevents stopping when work remains incomplete\n\n# Read stdin\nINPUT=$(cat)\n\n# Get session ID and directory\nSESSION_ID=\"\"\nDIRECTORY=\"\"\nif command -v jq &> /dev/null; then\n SESSION_ID=$(echo \"$INPUT\" | jq -r '.sessionId // .session_id // \"\"' 2>/dev/null)\n DIRECTORY=$(echo \"$INPUT\" | jq -r '.directory // \"\"' 2>/dev/null)\nfi\n\n# Default to current directory\nif [ -z \"$DIRECTORY\" ]; then\n DIRECTORY=$(pwd)\nfi\n\n# Check for active ultrawork state\nULTRAWORK_STATE=\"\"\nif [ -f \"$DIRECTORY/.sisyphus/ultrawork-state.json\" ]; then\n ULTRAWORK_STATE=$(cat \"$DIRECTORY/.sisyphus/ultrawork-state.json\" 2>/dev/null)\nelif [ -f \"$HOME/.claude/ultrawork-state.json\" ]; then\n ULTRAWORK_STATE=$(cat \"$HOME/.claude/ultrawork-state.json\" 2>/dev/null)\nfi\n\n# Check for active ralph loop\nRALPH_STATE=\"\"\nif [ -f \"$DIRECTORY/.sisyphus/ralph-state.json\" ]; then\n RALPH_STATE=$(cat \"$DIRECTORY/.sisyphus/ralph-state.json\" 2>/dev/null)\nfi\n\n# Check for incomplete todos\nINCOMPLETE_COUNT=0\nTODOS_DIR=\"$HOME/.claude/todos\"\nif [ -d \"$TODOS_DIR\" ]; then\n for todo_file in \"$TODOS_DIR\"/*.json; do\n if [ -f \"$todo_file\" ]; then\n if command -v jq &> /dev/null; then\n COUNT=$(jq '[.[] | select(.status != \"completed\" and .status != \"cancelled\")] | length' \"$todo_file\" 2>/dev/null || echo \"0\")\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n else\n # Fallback: count \"pending\" or \"in_progress\" occurrences\n COUNT=$(grep -c '\"status\"[[:space:]]*:[[:space:]]*\"pending\\|in_progress\"' \"$todo_file\" 2>/dev/null) || COUNT=0\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n fi\n fi\n done\nfi\n\n# Check project todos as well\nfor todo_path in \"$DIRECTORY/.sisyphus/todos.json\" \"$DIRECTORY/.claude/todos.json\"; do\n if [ -f \"$todo_path\" ]; then\n if command -v jq &> /dev/null; then\n COUNT=$(jq 'if type == \"array\" then [.[] | select(.status != \"completed\" and .status != \"cancelled\")] | length else 0 end' \"$todo_path\" 2>/dev/null || echo \"0\")\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n else\n # Fallback: count \"pending\" or \"in_progress\" occurrences\n COUNT=$(grep -c '\"status\"[[:space:]]*:[[:space:]]*\"pending\\|in_progress\"' \"$todo_path\" 2>/dev/null) || COUNT=0\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n fi\n fi\ndone\n\n# Priority 1: Ralph Loop\nif [ -n \"$RALPH_STATE\" ]; then\n IS_ACTIVE=$(echo \"$RALPH_STATE\" | jq -r '.active // false' 2>/dev/null)\n if [ \"$IS_ACTIVE\" = \"true\" ]; then\n ITERATION=$(echo \"$RALPH_STATE\" | jq -r '.iteration // 1' 2>/dev/null)\n MAX_ITER=$(echo \"$RALPH_STATE\" | jq -r '.max_iterations // 10' 2>/dev/null)\n PROMISE=$(echo \"$RALPH_STATE\" | jq -r '.completion_promise // \"TASK_COMPLETE\"' 2>/dev/null)\n PROMPT=$(echo \"$RALPH_STATE\" | jq -r '.prompt // \"\"' 2>/dev/null)\n\n if [ \"$ITERATION\" -lt \"$MAX_ITER\" ]; then\n # Increment iteration\n NEW_ITER=$((ITERATION + 1))\n echo \"$RALPH_STATE\" | jq \".iteration = $NEW_ITER\" > \"$DIRECTORY/.sisyphus/ralph-state.json\" 2>/dev/null\n\n cat << EOF\n{\"continue\": false, \"reason\": \"<ralph-loop-continuation>\\n\\n[RALPH LOOP - ITERATION $NEW_ITER/$MAX_ITER]\\n\\nYour previous attempt did not output the completion promise. The work is NOT done yet.\\n\\nCRITICAL INSTRUCTIONS:\\n1. Review your progress and the original task\\n2. Check your todo list - are ALL items marked complete?\\n3. Continue from where you left off\\n4. When FULLY complete, output: <promise>$PROMISE</promise>\\n5. Do NOT stop until the task is truly done\\n\\nOriginal task: $PROMPT\\n\\n</ralph-loop-continuation>\\n\\n---\\n\"}\nEOF\n exit 0\n fi\n fi\nfi\n\n# Priority 2: Ultrawork Mode with incomplete todos\nif [ -n \"$ULTRAWORK_STATE\" ] && [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n # Check if active (with jq fallback)\n IS_ACTIVE=\"\"\n if command -v jq &> /dev/null; then\n IS_ACTIVE=$(echo \"$ULTRAWORK_STATE\" | jq -r '.active // false' 2>/dev/null)\n else\n # Fallback: grep for \"active\": true\n if echo \"$ULTRAWORK_STATE\" | grep -q '\"active\"[[:space:]]*:[[:space:]]*true'; then\n IS_ACTIVE=\"true\"\n fi\n fi\n\n if [ \"$IS_ACTIVE\" = \"true\" ]; then\n # Get reinforcement count (with fallback)\n REINFORCE_COUNT=0\n if command -v jq &> /dev/null; then\n REINFORCE_COUNT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.reinforcement_count // 0' 2>/dev/null)\n else\n REINFORCE_COUNT=$(echo \"$ULTRAWORK_STATE\" | grep -oP '\"reinforcement_count\"[[:space:]]*:[[:space:]]*\\K[0-9]+' 2>/dev/null) || REINFORCE_COUNT=0\n fi\n NEW_COUNT=$((REINFORCE_COUNT + 1))\n\n # Get original prompt (with fallback)\n ORIGINAL_PROMPT=\"\"\n if command -v jq &> /dev/null; then\n ORIGINAL_PROMPT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.original_prompt // \"\"' 2>/dev/null)\n else\n ORIGINAL_PROMPT=$(echo \"$ULTRAWORK_STATE\" | grep -oP '\"original_prompt\"[[:space:]]*:[[:space:]]*\"\\K[^\"]+' 2>/dev/null) || ORIGINAL_PROMPT=\"\"\n fi\n\n # Update state file (best effort)\n if command -v jq &> /dev/null; then\n echo \"$ULTRAWORK_STATE\" | jq \".reinforcement_count = $NEW_COUNT | .last_checked_at = \\\"$(date -Iseconds)\\\"\" > \"$DIRECTORY/.sisyphus/ultrawork-state.json\" 2>/dev/null\n fi\n\n cat << EOF\n{\"continue\": false, \"reason\": \"<ultrawork-persistence>\\n\\n[ULTRAWORK MODE STILL ACTIVE - Reinforcement #$NEW_COUNT]\\n\\nYour ultrawork session is NOT complete. $INCOMPLETE_COUNT incomplete todos remain.\\n\\nREMEMBER THE ULTRAWORK RULES:\\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially\\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent)\\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each\\n- **VERIFY**: Check ALL requirements met before done\\n- **NO Premature Stopping**: ALL TODOs must be complete\\n\\nContinue working on the next pending task. DO NOT STOP until all tasks are marked complete.\\n\\nOriginal task: $ORIGINAL_PROMPT\\n\\n</ultrawork-persistence>\\n\\n---\\n\"}\nEOF\n exit 0\n fi\nfi\n\n# Priority 3: Todo Continuation (baseline)\nif [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n cat << EOF\n{\"continue\": false, \"reason\": \"<todo-continuation>\\n\\n[SYSTEM REMINDER - TODO CONTINUATION]\\n\\nIncomplete tasks remain in your todo list ($INCOMPLETE_COUNT remaining). Continue working on the next pending task.\\n\\n- Proceed without asking for permission\\n- Mark each task complete when finished\\n- Do not stop until all tasks are done\\n\\n</todo-continuation>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# No blocking needed\necho '{\"continue\": true}'\nexit 0\n";
|
|
84
|
+
/**
|
|
85
|
+
* Session Start Bash script
|
|
86
|
+
* Restores persistent mode states when a new session starts
|
|
87
|
+
*/
|
|
88
|
+
export declare const SESSION_START_SCRIPT = "#!/bin/bash\n# Sisyphus Session Start Hook\n# Restores persistent mode states and injects context when session starts\n\n# Read stdin\nINPUT=$(cat)\n\n# Get directory\nDIRECTORY=\"\"\nif command -v jq &> /dev/null; then\n DIRECTORY=$(echo \"$INPUT\" | jq -r '.directory // \"\"' 2>/dev/null)\nfi\n\nif [ -z \"$DIRECTORY\" ]; then\n DIRECTORY=$(pwd)\nfi\n\nMESSAGES=\"\"\n\n# Check for active ultrawork state\nif [ -f \"$DIRECTORY/.sisyphus/ultrawork-state.json\" ] || [ -f \"$HOME/.claude/ultrawork-state.json\" ]; then\n if [ -f \"$DIRECTORY/.sisyphus/ultrawork-state.json\" ]; then\n ULTRAWORK_STATE=$(cat \"$DIRECTORY/.sisyphus/ultrawork-state.json\" 2>/dev/null)\n else\n ULTRAWORK_STATE=$(cat \"$HOME/.claude/ultrawork-state.json\" 2>/dev/null)\n fi\n\n IS_ACTIVE=$(echo \"$ULTRAWORK_STATE\" | jq -r '.active // false' 2>/dev/null)\n if [ \"$IS_ACTIVE\" = \"true\" ]; then\n STARTED_AT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.started_at // \"\"' 2>/dev/null)\n PROMPT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.original_prompt // \"\"' 2>/dev/null)\n MESSAGES=\"$MESSAGES<session-restore>\\n\\n[ULTRAWORK MODE RESTORED]\\n\\nYou have an active ultrawork session from $STARTED_AT.\\nOriginal task: $PROMPT\\n\\nContinue working in ultrawork mode until all tasks are complete.\\n\\n</session-restore>\\n\\n---\\n\\n\"\n fi\nfi\n\n# Check for incomplete todos\nINCOMPLETE_COUNT=0\nTODOS_DIR=\"$HOME/.claude/todos\"\nif [ -d \"$TODOS_DIR\" ]; then\n for todo_file in \"$TODOS_DIR\"/*.json; do\n if [ -f \"$todo_file\" ]; then\n if command -v jq &> /dev/null; then\n COUNT=$(jq '[.[] | select(.status != \"completed\" and .status != \"cancelled\")] | length' \"$todo_file\" 2>/dev/null || echo \"0\")\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n fi\n fi\n done\nfi\n\nif [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n MESSAGES=\"$MESSAGES<session-restore>\\n\\n[PENDING TASKS DETECTED]\\n\\nYou have $INCOMPLETE_COUNT incomplete tasks from a previous session.\\nPlease continue working on these tasks.\\n\\n</session-restore>\\n\\n---\\n\\n\"\nfi\n\n# Output message if we have any\nif [ -n \"$MESSAGES\" ]; then\n # Escape for JSON\n MESSAGES_ESCAPED=$(echo \"$MESSAGES\" | sed 's/\"/\\\"/g')\n echo \"{\"continue\": true, \"message\": \"$MESSAGES_ESCAPED\"}\"\nelse\n echo '{\"continue\": true}'\nfi\nexit 0\n";
|
|
89
|
+
/**
|
|
90
|
+
* Node.js Persistent Mode Hook Script
|
|
91
|
+
*/
|
|
92
|
+
export declare const PERSISTENT_MODE_SCRIPT_NODE = "#!/usr/bin/env node\n// Sisyphus Persistent Mode Hook (Node.js)\n// Unified handler for ultrawork, ralph-loop, and todo continuation\n// Cross-platform: Windows, macOS, Linux\n\nimport { existsSync, readFileSync, writeFileSync, readdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\nfunction readJsonFile(path) {\n try {\n if (!existsSync(path)) return null;\n return JSON.parse(readFileSync(path, 'utf-8'));\n } catch {\n return null;\n }\n}\n\nfunction writeJsonFile(path, data) {\n try {\n writeFileSync(path, JSON.stringify(data, null, 2));\n return true;\n } catch {\n return false;\n }\n}\n\nfunction countIncompleteTodos(todosDir, projectDir) {\n let count = 0;\n\n // Check global todos\n if (existsSync(todosDir)) {\n try {\n const files = readdirSync(todosDir).filter(f => f.endsWith('.json'));\n for (const file of files) {\n const todos = readJsonFile(join(todosDir, file));\n if (Array.isArray(todos)) {\n count += todos.filter(t => t.status !== 'completed' && t.status !== 'cancelled').length;\n }\n }\n } catch {}\n }\n\n // Check project todos\n for (const path of [\n join(projectDir, '.sisyphus', 'todos.json'),\n join(projectDir, '.claude', 'todos.json')\n ]) {\n const todos = readJsonFile(path);\n if (Array.isArray(todos)) {\n count += todos.filter(t => t.status !== 'completed' && t.status !== 'cancelled').length;\n }\n }\n\n return count;\n}\n\nasync function main() {\n try {\n const input = await readStdin();\n let data = {};\n try { data = JSON.parse(input); } catch {}\n\n const directory = data.directory || process.cwd();\n const todosDir = join(homedir(), '.claude', 'todos');\n\n // Check for ultrawork state\n let ultraworkState = readJsonFile(join(directory, '.sisyphus', 'ultrawork-state.json'))\n || readJsonFile(join(homedir(), '.claude', 'ultrawork-state.json'));\n\n // Check for ralph loop state\n const ralphState = readJsonFile(join(directory, '.sisyphus', 'ralph-state.json'));\n\n // Count incomplete todos\n const incompleteCount = countIncompleteTodos(todosDir, directory);\n\n // Priority 1: Ralph Loop\n if (ralphState?.active) {\n const iteration = ralphState.iteration || 1;\n const maxIter = ralphState.max_iterations || 10;\n\n if (iteration < maxIter) {\n const newIter = iteration + 1;\n ralphState.iteration = newIter;\n writeJsonFile(join(directory, '.sisyphus', 'ralph-state.json'), ralphState);\n\n console.log(JSON.stringify({\n continue: false,\n reason: `<ralph-loop-continuation>\n\n[RALPH LOOP - ITERATION ${newIter}/${maxIter}]\n\nYour previous attempt did not output the completion promise. The work is NOT done yet.\n\nCRITICAL INSTRUCTIONS:\n1. Review your progress and the original task\n2. Check your todo list - are ALL items marked complete?\n3. Continue from where you left off\n4. When FULLY complete, output: <promise>${ralphState.completion_promise || 'TASK_COMPLETE'}</promise>\n5. Do NOT stop until the task is truly done\n\n${ralphState.prompt ? `Original task: ${ralphState.prompt}` : ''}\n\n</ralph-loop-continuation>\n\n---\n`\n }));\n return;\n }\n }\n\n // Priority 2: Ultrawork with incomplete todos\n if (ultraworkState?.active && incompleteCount > 0) {\n const newCount = (ultraworkState.reinforcement_count || 0) + 1;\n ultraworkState.reinforcement_count = newCount;\n ultraworkState.last_checked_at = new Date().toISOString();\n\n writeJsonFile(join(directory, '.sisyphus', 'ultrawork-state.json'), ultraworkState);\n\n console.log(JSON.stringify({\n continue: false,\n reason: `<ultrawork-persistence>\n\n[ULTRAWORK MODE STILL ACTIVE - Reinforcement #${newCount}]\n\nYour ultrawork session is NOT complete. ${incompleteCount} incomplete todos remain.\n\nREMEMBER THE ULTRAWORK RULES:\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent)\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each\n- **VERIFY**: Check ALL requirements met before done\n- **NO Premature Stopping**: ALL TODOs must be complete\n\nContinue working on the next pending task. DO NOT STOP until all tasks are marked complete.\n\n${ultraworkState.original_prompt ? `Original task: ${ultraworkState.original_prompt}` : ''}\n\n</ultrawork-persistence>\n\n---\n`\n }));\n return;\n }\n\n // Priority 3: Todo Continuation\n if (incompleteCount > 0) {\n console.log(JSON.stringify({\n continue: false,\n reason: `<todo-continuation>\n\n[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list (${incompleteCount} remaining). Continue working on the next pending task.\n\n- Proceed without asking for permission\n- Mark each task complete when finished\n- Do not stop until all tasks are done\n\n</todo-continuation>\n\n---\n`\n }));\n return;\n }\n\n // No blocking needed\n console.log(JSON.stringify({ continue: true }));\n } catch (error) {\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
|
|
93
|
+
/**
|
|
94
|
+
* Node.js Session Start Hook Script
|
|
95
|
+
*/
|
|
96
|
+
export declare const SESSION_START_SCRIPT_NODE = "#!/usr/bin/env node\n// Sisyphus Session Start Hook (Node.js)\n// Restores persistent mode states when session starts\n// Cross-platform: Windows, macOS, Linux\n\nimport { existsSync, readFileSync, readdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\nfunction readJsonFile(path) {\n try {\n if (!existsSync(path)) return null;\n return JSON.parse(readFileSync(path, 'utf-8'));\n } catch {\n return null;\n }\n}\n\nfunction countIncompleteTodos(todosDir) {\n let count = 0;\n if (existsSync(todosDir)) {\n try {\n const files = readdirSync(todosDir).filter(f => f.endsWith('.json'));\n for (const file of files) {\n const todos = readJsonFile(join(todosDir, file));\n if (Array.isArray(todos)) {\n count += todos.filter(t => t.status !== 'completed' && t.status !== 'cancelled').length;\n }\n }\n } catch {}\n }\n return count;\n}\n\nasync function main() {\n try {\n const input = await readStdin();\n let data = {};\n try { data = JSON.parse(input); } catch {}\n\n const directory = data.directory || process.cwd();\n const messages = [];\n\n // Check for ultrawork state\n const ultraworkState = readJsonFile(join(directory, '.sisyphus', 'ultrawork-state.json'))\n || readJsonFile(join(homedir(), '.claude', 'ultrawork-state.json'));\n\n if (ultraworkState?.active) {\n messages.push(`<session-restore>\n\n[ULTRAWORK MODE RESTORED]\n\nYou have an active ultrawork session from ${ultraworkState.started_at}.\nOriginal task: ${ultraworkState.original_prompt}\n\nContinue working in ultrawork mode until all tasks are complete.\n\n</session-restore>\n\n---\n`);\n }\n\n // Check for incomplete todos\n const todosDir = join(homedir(), '.claude', 'todos');\n const incompleteCount = countIncompleteTodos(todosDir);\n\n if (incompleteCount > 0) {\n messages.push(`<session-restore>\n\n[PENDING TASKS DETECTED]\n\nYou have ${incompleteCount} incomplete tasks from a previous session.\nPlease continue working on these tasks.\n\n</session-restore>\n\n---\n`);\n }\n\n if (messages.length > 0) {\n console.log(JSON.stringify({ continue: true, message: messages.join('\\n') }));\n } else {\n console.log(JSON.stringify({ continue: true }));\n }\n } catch (error) {\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
|
|
79
97
|
/**
|
|
80
98
|
* Settings.json hooks configuration for Bash (Unix)
|
|
81
99
|
* Configures Claude Code to run our bash hook scripts
|
|
@@ -88,6 +106,12 @@ export declare const HOOKS_SETTINGS_CONFIG_BASH: {
|
|
|
88
106
|
command: string;
|
|
89
107
|
}[];
|
|
90
108
|
}[];
|
|
109
|
+
SessionStart: {
|
|
110
|
+
hooks: {
|
|
111
|
+
type: "command";
|
|
112
|
+
command: string;
|
|
113
|
+
}[];
|
|
114
|
+
}[];
|
|
91
115
|
Stop: {
|
|
92
116
|
hooks: {
|
|
93
117
|
type: "command";
|
|
@@ -108,6 +132,12 @@ export declare const HOOKS_SETTINGS_CONFIG_NODE: {
|
|
|
108
132
|
command: string;
|
|
109
133
|
}[];
|
|
110
134
|
}[];
|
|
135
|
+
SessionStart: {
|
|
136
|
+
hooks: {
|
|
137
|
+
type: "command";
|
|
138
|
+
command: string;
|
|
139
|
+
}[];
|
|
140
|
+
}[];
|
|
111
141
|
Stop: {
|
|
112
142
|
hooks: {
|
|
113
143
|
type: "command";
|
|
@@ -132,6 +162,12 @@ export declare const HOOKS_SETTINGS_CONFIG: {
|
|
|
132
162
|
command: string;
|
|
133
163
|
}[];
|
|
134
164
|
}[];
|
|
165
|
+
SessionStart: {
|
|
166
|
+
hooks: {
|
|
167
|
+
type: "command";
|
|
168
|
+
command: string;
|
|
169
|
+
}[];
|
|
170
|
+
}[];
|
|
135
171
|
Stop: {
|
|
136
172
|
hooks: {
|
|
137
173
|
type: "command";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/installer/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,kCAAkC;AAClC,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,IAAI,OAAO,CAU5C;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,mCAAmC;AACnC,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,woJA2F7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,wcAgB9B,CAAC;AAEF;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