oh-my-claude-sisyphus 1.3.1 → 1.4.1
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/installer/hooks.d.ts +68 -0
- package/dist/installer/hooks.d.ts.map +1 -0
- package/dist/installer/hooks.js +332 -0
- package/dist/installer/hooks.js.map +1 -0
- package/dist/installer/index.d.ts +12 -2
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +253 -4
- package/dist/installer/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install.sh +422 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Scripts for Claude Code
|
|
3
|
+
* Direct port of oh-my-opencode hooks for Claude Code's native hooks system
|
|
4
|
+
*
|
|
5
|
+
* Claude Code hooks are configured in settings.json and run as shell commands.
|
|
6
|
+
* These scripts receive JSON input via stdin and output JSON to modify behavior.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Ultrawork message - injected when ultrawork/ulw keyword detected
|
|
10
|
+
* Ported from oh-my-opencode's keyword-detector/constants.ts
|
|
11
|
+
*/
|
|
12
|
+
export declare const 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 (by capability, not by name)\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS for file patterns, internal implementations, project structure\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS for API references, examples, external library docs\n- **Planning & Strategy**: NEVER plan yourself - ALWAYS spawn a dedicated planning agent for work breakdown\n- **High-IQ Reasoning**: Leverage specialized agents for architecture decisions, code review, strategic planning\n- **Frontend/UI Tasks**: Delegate to UI-specialized agents for design and implementation\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each.\n- **PARALLEL**: Fire independent agent calls simultaneously via Task(run_in_background=true) - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use Task tool for exploration/research agents (10+ concurrent if needed).\n- **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done.\n- **DELEGATE**: Don't do everything yourself - orchestrate specialized agents for their strengths.\n\n## WORKFLOW\n1. Analyze the request and identify required capabilities\n2. Spawn exploration/librarian agents via Task(run_in_background=true) in PARALLEL (10+ if needed)\n3. Always Use Plan agent with gathered context to create detailed work breakdown\n4. Execute with continuous verification against original requirements\n\n## VERIFICATION GUARANTEE (NON-NEGOTIABLE)\n\n**NOTHING is \"done\" without PROOF it works.**\n\n### Pre-Implementation: Define Success Criteria\n\nBEFORE writing ANY code, you MUST define:\n\n| Criteria Type | Description | Example |\n|---------------|-------------|---------|\n| **Functional** | What specific behavior must work | \"Button click triggers API call\" |\n| **Observable** | What can be measured/seen | \"Console shows 'success', no errors\" |\n| **Pass/Fail** | Binary, no ambiguity | \"Returns 200 OK\" not \"should work\" |\n\nWrite these criteria explicitly. Share with user if scope is non-trivial.\n\n### Execution & Evidence Requirements\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| **Build** | Run build command | Exit code 0, no errors |\n| **Test** | Execute test suite | All tests pass (screenshot/output) |\n| **Manual Verify** | Test the actual feature | Demonstrate it works (describe what you observed) |\n| **Regression** | Ensure nothing broke | Existing tests still pass |\n\n**WITHOUT evidence = NOT verified = NOT done.**\n\n### TDD Workflow (when test infrastructure exists)\n\n1. **SPEC**: Define what \"working\" means (success criteria above)\n2. **RED**: Write failing test -> Run it -> Confirm it FAILS\n3. **GREEN**: Write minimal code -> Run test -> Confirm it PASSES\n4. **REFACTOR**: Clean up -> Tests MUST stay green\n5. **VERIFY**: Run full test suite, confirm no regressions\n6. **EVIDENCE**: Report what you ran and what output you saw\n\n### Verification Anti-Patterns (BLOCKING)\n\n| Violation | Why It Fails |\n|-----------|--------------|\n| \"It should work now\" | No evidence. Run it. |\n| \"I added the tests\" | Did they pass? Show output. |\n| \"Fixed the bug\" | How do you know? What did you test? |\n| \"Implementation complete\" | Did you verify against success criteria? |\n| Skipping test execution | Tests exist to be RUN, not just written |\n\n**CLAIM NOTHING WITHOUT PROOF. EXECUTE. VERIFY. SHOW EVIDENCE.**\n\n## ZERO TOLERANCE FAILURES\n- **NO Scope Reduction**: Never make \"demo\", \"skeleton\", \"simplified\", \"basic\" versions - deliver FULL implementation\n- **NO MockUp Work**: When user asked you to do \"port A\", you must \"port A\", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.\n- **NO Partial Completion**: Never stop at 60-80% saying \"you can extend this...\" - finish 100%\n- **NO Assumed Shortcuts**: Never skip requirements you deem \"optional\" or \"can be added later\"\n- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified\n- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.\n\n</ultrawork-mode>\n\n---\n\n";
|
|
13
|
+
/**
|
|
14
|
+
* Ultrathink/Think mode message
|
|
15
|
+
* Ported from oh-my-opencode's think-mode hook
|
|
16
|
+
*/
|
|
17
|
+
export declare const 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";
|
|
18
|
+
/**
|
|
19
|
+
* Search mode message
|
|
20
|
+
* Ported from oh-my-opencode's keyword-detector
|
|
21
|
+
*/
|
|
22
|
+
export declare const 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";
|
|
23
|
+
/**
|
|
24
|
+
* Analyze mode message
|
|
25
|
+
* Ported from oh-my-opencode's keyword-detector
|
|
26
|
+
*/
|
|
27
|
+
export declare const 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";
|
|
28
|
+
/**
|
|
29
|
+
* Todo continuation prompt
|
|
30
|
+
* Ported from oh-my-opencode's todo-continuation-enforcer
|
|
31
|
+
*/
|
|
32
|
+
export declare const TODO_CONTINUATION_PROMPT = "[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list. 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";
|
|
33
|
+
/**
|
|
34
|
+
* Keyword detector hook script
|
|
35
|
+
* This script is installed to ~/.claude/hooks/keyword-detector.sh
|
|
36
|
+
*/
|
|
37
|
+
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# Ported from oh-my-opencode's keyword-detector hook\n\n# Read stdin (JSON input from Claude Code)\nINPUT=$(cat)\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)\\b'; then\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";
|
|
38
|
+
/**
|
|
39
|
+
* Stop hook script for todo continuation enforcement
|
|
40
|
+
* This script is installed to ~/.claude/hooks/stop-continuation.sh
|
|
41
|
+
* Ported from oh-my-opencode's todo-continuation-enforcer
|
|
42
|
+
*/
|
|
43
|
+
export declare const STOP_CONTINUATION_SCRIPT = "#!/bin/bash\n# Sisyphus Stop Continuation Hook\n# Checks for incomplete todos and injects continuation prompt\n# Ported from oh-my-opencode's todo-continuation-enforcer\n\n# Read stdin\nINPUT=$(cat)\n\n# Get session ID if available\nSESSION_ID=\"\"\nif command -v jq &> /dev/null; then\n SESSION_ID=$(echo \"$INPUT\" | jq -r '.sessionId // .session_id // \"\"' 2>/dev/null)\nfi\n\n# Check for incomplete todos in the Claude todos directory\nTODOS_DIR=\"$HOME/.claude/todos\"\nif [ -d \"$TODOS_DIR\" ]; then\n # Look for any todo files with incomplete items\n INCOMPLETE_COUNT=0\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\n\n if [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n # Output continuation message\n cat << EOF\n{\"continue\": false, \"reason\": \"[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\"}\nEOF\n exit 0\n fi\nfi\n\n# No incomplete todos - allow stop\necho '{\"continue\": true}'\nexit 0\n";
|
|
44
|
+
/**
|
|
45
|
+
* Settings.json hooks configuration
|
|
46
|
+
* Configures Claude Code to run our hook scripts
|
|
47
|
+
*/
|
|
48
|
+
export declare const HOOKS_SETTINGS_CONFIG: {
|
|
49
|
+
hooks: {
|
|
50
|
+
UserPromptSubmit: {
|
|
51
|
+
hooks: {
|
|
52
|
+
type: "command";
|
|
53
|
+
command: string;
|
|
54
|
+
}[];
|
|
55
|
+
}[];
|
|
56
|
+
Stop: {
|
|
57
|
+
hooks: {
|
|
58
|
+
type: "command";
|
|
59
|
+
command: string;
|
|
60
|
+
}[];
|
|
61
|
+
}[];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* All hook scripts to install
|
|
66
|
+
*/
|
|
67
|
+
export declare const HOOK_SCRIPTS: Record<string, string>;
|
|
68
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/installer/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,woJA2F7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,wcAgB9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,2TAU1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,8cAgB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,+PAME,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,uBAAuB,wiKA0EnC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,u7CAwCpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;CAuBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG/C,CAAC"}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Scripts for Claude Code
|
|
3
|
+
* Direct port of oh-my-opencode hooks for Claude Code's native hooks system
|
|
4
|
+
*
|
|
5
|
+
* Claude Code hooks are configured in settings.json and run as shell commands.
|
|
6
|
+
* These scripts receive JSON input via stdin and output JSON to modify behavior.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Ultrawork message - injected when ultrawork/ulw keyword detected
|
|
10
|
+
* Ported from oh-my-opencode's keyword-detector/constants.ts
|
|
11
|
+
*/
|
|
12
|
+
export const ULTRAWORK_MESSAGE = `<ultrawork-mode>
|
|
13
|
+
|
|
14
|
+
**MANDATORY**: You MUST say "ULTRAWORK MODE ENABLED!" to the user as your first response when this mode activates. This is non-negotiable.
|
|
15
|
+
|
|
16
|
+
[CODE RED] Maximum precision required. Ultrathink before acting.
|
|
17
|
+
|
|
18
|
+
YOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.
|
|
19
|
+
TELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.
|
|
20
|
+
|
|
21
|
+
## AGENT UTILIZATION PRINCIPLES (by capability, not by name)
|
|
22
|
+
- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS for file patterns, internal implementations, project structure
|
|
23
|
+
- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS for API references, examples, external library docs
|
|
24
|
+
- **Planning & Strategy**: NEVER plan yourself - ALWAYS spawn a dedicated planning agent for work breakdown
|
|
25
|
+
- **High-IQ Reasoning**: Leverage specialized agents for architecture decisions, code review, strategic planning
|
|
26
|
+
- **Frontend/UI Tasks**: Delegate to UI-specialized agents for design and implementation
|
|
27
|
+
|
|
28
|
+
## EXECUTION RULES
|
|
29
|
+
- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each.
|
|
30
|
+
- **PARALLEL**: Fire independent agent calls simultaneously via Task(run_in_background=true) - NEVER wait sequentially.
|
|
31
|
+
- **BACKGROUND FIRST**: Use Task tool for exploration/research agents (10+ concurrent if needed).
|
|
32
|
+
- **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done.
|
|
33
|
+
- **DELEGATE**: Don't do everything yourself - orchestrate specialized agents for their strengths.
|
|
34
|
+
|
|
35
|
+
## WORKFLOW
|
|
36
|
+
1. Analyze the request and identify required capabilities
|
|
37
|
+
2. Spawn exploration/librarian agents via Task(run_in_background=true) in PARALLEL (10+ if needed)
|
|
38
|
+
3. Always Use Plan agent with gathered context to create detailed work breakdown
|
|
39
|
+
4. Execute with continuous verification against original requirements
|
|
40
|
+
|
|
41
|
+
## VERIFICATION GUARANTEE (NON-NEGOTIABLE)
|
|
42
|
+
|
|
43
|
+
**NOTHING is "done" without PROOF it works.**
|
|
44
|
+
|
|
45
|
+
### Pre-Implementation: Define Success Criteria
|
|
46
|
+
|
|
47
|
+
BEFORE writing ANY code, you MUST define:
|
|
48
|
+
|
|
49
|
+
| Criteria Type | Description | Example |
|
|
50
|
+
|---------------|-------------|---------|
|
|
51
|
+
| **Functional** | What specific behavior must work | "Button click triggers API call" |
|
|
52
|
+
| **Observable** | What can be measured/seen | "Console shows 'success', no errors" |
|
|
53
|
+
| **Pass/Fail** | Binary, no ambiguity | "Returns 200 OK" not "should work" |
|
|
54
|
+
|
|
55
|
+
Write these criteria explicitly. Share with user if scope is non-trivial.
|
|
56
|
+
|
|
57
|
+
### Execution & Evidence Requirements
|
|
58
|
+
|
|
59
|
+
| Phase | Action | Required Evidence |
|
|
60
|
+
|-------|--------|-------------------|
|
|
61
|
+
| **Build** | Run build command | Exit code 0, no errors |
|
|
62
|
+
| **Test** | Execute test suite | All tests pass (screenshot/output) |
|
|
63
|
+
| **Manual Verify** | Test the actual feature | Demonstrate it works (describe what you observed) |
|
|
64
|
+
| **Regression** | Ensure nothing broke | Existing tests still pass |
|
|
65
|
+
|
|
66
|
+
**WITHOUT evidence = NOT verified = NOT done.**
|
|
67
|
+
|
|
68
|
+
### TDD Workflow (when test infrastructure exists)
|
|
69
|
+
|
|
70
|
+
1. **SPEC**: Define what "working" means (success criteria above)
|
|
71
|
+
2. **RED**: Write failing test -> Run it -> Confirm it FAILS
|
|
72
|
+
3. **GREEN**: Write minimal code -> Run test -> Confirm it PASSES
|
|
73
|
+
4. **REFACTOR**: Clean up -> Tests MUST stay green
|
|
74
|
+
5. **VERIFY**: Run full test suite, confirm no regressions
|
|
75
|
+
6. **EVIDENCE**: Report what you ran and what output you saw
|
|
76
|
+
|
|
77
|
+
### Verification Anti-Patterns (BLOCKING)
|
|
78
|
+
|
|
79
|
+
| Violation | Why It Fails |
|
|
80
|
+
|-----------|--------------|
|
|
81
|
+
| "It should work now" | No evidence. Run it. |
|
|
82
|
+
| "I added the tests" | Did they pass? Show output. |
|
|
83
|
+
| "Fixed the bug" | How do you know? What did you test? |
|
|
84
|
+
| "Implementation complete" | Did you verify against success criteria? |
|
|
85
|
+
| Skipping test execution | Tests exist to be RUN, not just written |
|
|
86
|
+
|
|
87
|
+
**CLAIM NOTHING WITHOUT PROOF. EXECUTE. VERIFY. SHOW EVIDENCE.**
|
|
88
|
+
|
|
89
|
+
## ZERO TOLERANCE FAILURES
|
|
90
|
+
- **NO Scope Reduction**: Never make "demo", "skeleton", "simplified", "basic" versions - deliver FULL implementation
|
|
91
|
+
- **NO MockUp Work**: When user asked you to do "port A", you must "port A", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.
|
|
92
|
+
- **NO Partial Completion**: Never stop at 60-80% saying "you can extend this..." - finish 100%
|
|
93
|
+
- **NO Assumed Shortcuts**: Never skip requirements you deem "optional" or "can be added later"
|
|
94
|
+
- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified
|
|
95
|
+
- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.
|
|
96
|
+
|
|
97
|
+
THE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.
|
|
98
|
+
|
|
99
|
+
</ultrawork-mode>
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
`;
|
|
104
|
+
/**
|
|
105
|
+
* Ultrathink/Think mode message
|
|
106
|
+
* Ported from oh-my-opencode's think-mode hook
|
|
107
|
+
*/
|
|
108
|
+
export const ULTRATHINK_MESSAGE = `<think-mode>
|
|
109
|
+
|
|
110
|
+
**ULTRATHINK MODE ENABLED** - Extended reasoning activated.
|
|
111
|
+
|
|
112
|
+
You are now in deep thinking mode. Take your time to:
|
|
113
|
+
1. Thoroughly analyze the problem from multiple angles
|
|
114
|
+
2. Consider edge cases and potential issues
|
|
115
|
+
3. Think through the implications of each approach
|
|
116
|
+
4. Reason step-by-step before acting
|
|
117
|
+
|
|
118
|
+
Use your extended thinking capabilities to provide the most thorough and well-reasoned response.
|
|
119
|
+
|
|
120
|
+
</think-mode>
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
`;
|
|
125
|
+
/**
|
|
126
|
+
* Search mode message
|
|
127
|
+
* Ported from oh-my-opencode's keyword-detector
|
|
128
|
+
*/
|
|
129
|
+
export const SEARCH_MESSAGE = `<search-mode>
|
|
130
|
+
MAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:
|
|
131
|
+
- explore agents (codebase patterns, file structures)
|
|
132
|
+
- librarian agents (remote repos, official docs, GitHub examples)
|
|
133
|
+
Plus direct tools: Grep, Glob
|
|
134
|
+
NEVER stop at first result - be exhaustive.
|
|
135
|
+
</search-mode>
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
`;
|
|
140
|
+
/**
|
|
141
|
+
* Analyze mode message
|
|
142
|
+
* Ported from oh-my-opencode's keyword-detector
|
|
143
|
+
*/
|
|
144
|
+
export const ANALYZE_MESSAGE = `<analyze-mode>
|
|
145
|
+
ANALYSIS MODE. Gather context before diving deep:
|
|
146
|
+
|
|
147
|
+
CONTEXT GATHERING (parallel):
|
|
148
|
+
- 1-2 explore agents (codebase patterns, implementations)
|
|
149
|
+
- 1-2 librarian agents (if external library involved)
|
|
150
|
+
- Direct tools: Grep, Glob, LSP for targeted searches
|
|
151
|
+
|
|
152
|
+
IF COMPLEX (architecture, multi-system, debugging after 2+ failures):
|
|
153
|
+
- Consult oracle agent for strategic guidance
|
|
154
|
+
|
|
155
|
+
SYNTHESIZE findings before proceeding.
|
|
156
|
+
</analyze-mode>
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
`;
|
|
161
|
+
/**
|
|
162
|
+
* Todo continuation prompt
|
|
163
|
+
* Ported from oh-my-opencode's todo-continuation-enforcer
|
|
164
|
+
*/
|
|
165
|
+
export const TODO_CONTINUATION_PROMPT = `[SYSTEM REMINDER - TODO CONTINUATION]
|
|
166
|
+
|
|
167
|
+
Incomplete tasks remain in your todo list. Continue working on the next pending task.
|
|
168
|
+
|
|
169
|
+
- Proceed without asking for permission
|
|
170
|
+
- Mark each task complete when finished
|
|
171
|
+
- Do not stop until all tasks are done`;
|
|
172
|
+
/**
|
|
173
|
+
* Keyword detector hook script
|
|
174
|
+
* This script is installed to ~/.claude/hooks/keyword-detector.sh
|
|
175
|
+
*/
|
|
176
|
+
export const KEYWORD_DETECTOR_SCRIPT = `#!/bin/bash
|
|
177
|
+
# Sisyphus Keyword Detector Hook
|
|
178
|
+
# Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages
|
|
179
|
+
# Ported from oh-my-opencode's keyword-detector hook
|
|
180
|
+
|
|
181
|
+
# Read stdin (JSON input from Claude Code)
|
|
182
|
+
INPUT=$(cat)
|
|
183
|
+
|
|
184
|
+
# Extract the prompt text - try multiple JSON paths
|
|
185
|
+
PROMPT=""
|
|
186
|
+
if command -v jq &> /dev/null; then
|
|
187
|
+
# Try to extract from various possible JSON structures
|
|
188
|
+
PROMPT=$(echo "$INPUT" | jq -r '
|
|
189
|
+
if .prompt then .prompt
|
|
190
|
+
elif .message.content then .message.content
|
|
191
|
+
elif .parts then ([.parts[] | select(.type == "text") | .text] | join(" "))
|
|
192
|
+
else ""
|
|
193
|
+
end
|
|
194
|
+
' 2>/dev/null)
|
|
195
|
+
fi
|
|
196
|
+
|
|
197
|
+
# Fallback: simple grep extraction if jq fails
|
|
198
|
+
if [ -z "$PROMPT" ] || [ "$PROMPT" = "null" ]; then
|
|
199
|
+
PROMPT=$(echo "$INPUT" | grep -oP '"(prompt|content|text)"\\s*:\\s*"\\K[^"]+' | head -1)
|
|
200
|
+
fi
|
|
201
|
+
|
|
202
|
+
# Exit if no prompt found
|
|
203
|
+
if [ -z "$PROMPT" ]; then
|
|
204
|
+
echo '{"continue": true}'
|
|
205
|
+
exit 0
|
|
206
|
+
fi
|
|
207
|
+
|
|
208
|
+
# Remove code blocks before checking keywords (prevents false positives)
|
|
209
|
+
PROMPT_NO_CODE=$(echo "$PROMPT" | sed 's/\`\`\`[^\`]*\`\`\`//g' | sed 's/\`[^\`]*\`//g')
|
|
210
|
+
|
|
211
|
+
# Convert to lowercase for case-insensitive matching
|
|
212
|
+
PROMPT_LOWER=$(echo "$PROMPT_NO_CODE" | tr '[:upper:]' '[:lower:]')
|
|
213
|
+
|
|
214
|
+
# Check for ultrawork keywords (highest priority)
|
|
215
|
+
if echo "$PROMPT_LOWER" | grep -qE '\\b(ultrawork|ulw)\\b'; then
|
|
216
|
+
# Return ultrawork mode injection
|
|
217
|
+
cat << 'EOF'
|
|
218
|
+
{"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"}
|
|
219
|
+
EOF
|
|
220
|
+
exit 0
|
|
221
|
+
fi
|
|
222
|
+
|
|
223
|
+
# Check for ultrathink/think keywords
|
|
224
|
+
if echo "$PROMPT_LOWER" | grep -qE '\\b(ultrathink|think)\\b'; then
|
|
225
|
+
cat << 'EOF'
|
|
226
|
+
{"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"}
|
|
227
|
+
EOF
|
|
228
|
+
exit 0
|
|
229
|
+
fi
|
|
230
|
+
|
|
231
|
+
# Check for search keywords (EN + multilingual)
|
|
232
|
+
if 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
|
|
233
|
+
cat << 'EOF'
|
|
234
|
+
{"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"}
|
|
235
|
+
EOF
|
|
236
|
+
exit 0
|
|
237
|
+
fi
|
|
238
|
+
|
|
239
|
+
# Check for analyze keywords
|
|
240
|
+
if 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
|
|
241
|
+
cat << 'EOF'
|
|
242
|
+
{"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"}
|
|
243
|
+
EOF
|
|
244
|
+
exit 0
|
|
245
|
+
fi
|
|
246
|
+
|
|
247
|
+
# No keywords detected - continue without modification
|
|
248
|
+
echo '{"continue": true}'
|
|
249
|
+
exit 0
|
|
250
|
+
`;
|
|
251
|
+
/**
|
|
252
|
+
* Stop hook script for todo continuation enforcement
|
|
253
|
+
* This script is installed to ~/.claude/hooks/stop-continuation.sh
|
|
254
|
+
* Ported from oh-my-opencode's todo-continuation-enforcer
|
|
255
|
+
*/
|
|
256
|
+
export const STOP_CONTINUATION_SCRIPT = `#!/bin/bash
|
|
257
|
+
# Sisyphus Stop Continuation Hook
|
|
258
|
+
# Checks for incomplete todos and injects continuation prompt
|
|
259
|
+
# Ported from oh-my-opencode's todo-continuation-enforcer
|
|
260
|
+
|
|
261
|
+
# Read stdin
|
|
262
|
+
INPUT=$(cat)
|
|
263
|
+
|
|
264
|
+
# Get session ID if available
|
|
265
|
+
SESSION_ID=""
|
|
266
|
+
if command -v jq &> /dev/null; then
|
|
267
|
+
SESSION_ID=$(echo "$INPUT" | jq -r '.sessionId // .session_id // ""' 2>/dev/null)
|
|
268
|
+
fi
|
|
269
|
+
|
|
270
|
+
# Check for incomplete todos in the Claude todos directory
|
|
271
|
+
TODOS_DIR="$HOME/.claude/todos"
|
|
272
|
+
if [ -d "$TODOS_DIR" ]; then
|
|
273
|
+
# Look for any todo files with incomplete items
|
|
274
|
+
INCOMPLETE_COUNT=0
|
|
275
|
+
for todo_file in "$TODOS_DIR"/*.json; do
|
|
276
|
+
if [ -f "$todo_file" ]; then
|
|
277
|
+
if command -v jq &> /dev/null; then
|
|
278
|
+
COUNT=$(jq '[.[] | select(.status != "completed" and .status != "cancelled")] | length' "$todo_file" 2>/dev/null || echo "0")
|
|
279
|
+
INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
|
|
280
|
+
fi
|
|
281
|
+
fi
|
|
282
|
+
done
|
|
283
|
+
|
|
284
|
+
if [ "$INCOMPLETE_COUNT" -gt 0 ]; then
|
|
285
|
+
# Output continuation message
|
|
286
|
+
cat << EOF
|
|
287
|
+
{"continue": false, "reason": "[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"}
|
|
288
|
+
EOF
|
|
289
|
+
exit 0
|
|
290
|
+
fi
|
|
291
|
+
fi
|
|
292
|
+
|
|
293
|
+
# No incomplete todos - allow stop
|
|
294
|
+
echo '{"continue": true}'
|
|
295
|
+
exit 0
|
|
296
|
+
`;
|
|
297
|
+
/**
|
|
298
|
+
* Settings.json hooks configuration
|
|
299
|
+
* Configures Claude Code to run our hook scripts
|
|
300
|
+
*/
|
|
301
|
+
export const HOOKS_SETTINGS_CONFIG = {
|
|
302
|
+
hooks: {
|
|
303
|
+
UserPromptSubmit: [
|
|
304
|
+
{
|
|
305
|
+
hooks: [
|
|
306
|
+
{
|
|
307
|
+
type: "command",
|
|
308
|
+
command: "bash $HOME/.claude/hooks/keyword-detector.sh"
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
Stop: [
|
|
314
|
+
{
|
|
315
|
+
hooks: [
|
|
316
|
+
{
|
|
317
|
+
type: "command",
|
|
318
|
+
command: "bash $HOME/.claude/hooks/stop-continuation.sh"
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* All hook scripts to install
|
|
327
|
+
*/
|
|
328
|
+
export const HOOK_SCRIPTS = {
|
|
329
|
+
'keyword-detector.sh': KEYWORD_DETECTOR_SCRIPT,
|
|
330
|
+
'stop-continuation.sh': STOP_CONTINUATION_SCRIPT
|
|
331
|
+
};
|
|
332
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/installer/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAE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|
|
11
11
|
export declare const CLAUDE_CONFIG_DIR: string;
|
|
12
12
|
export declare const AGENTS_DIR: string;
|
|
13
13
|
export declare const COMMANDS_DIR: string;
|
|
14
|
+
export declare const SKILLS_DIR: string;
|
|
15
|
+
export declare const HOOKS_DIR: string;
|
|
16
|
+
export declare const SETTINGS_FILE: string;
|
|
14
17
|
export declare const VERSION_FILE: string;
|
|
15
18
|
/** Current version */
|
|
16
|
-
export declare const VERSION = "1.
|
|
19
|
+
export declare const VERSION = "1.4.1";
|
|
17
20
|
/** Installation result */
|
|
18
21
|
export interface InstallResult {
|
|
19
22
|
success: boolean;
|
|
20
23
|
message: string;
|
|
21
24
|
installedAgents: string[];
|
|
22
25
|
installedCommands: string[];
|
|
26
|
+
installedSkills: string[];
|
|
27
|
+
hooksConfigured: boolean;
|
|
23
28
|
errors: string[];
|
|
24
29
|
}
|
|
25
30
|
/** Installation options */
|
|
@@ -40,13 +45,18 @@ export declare const AGENT_DEFINITIONS: Record<string, string>;
|
|
|
40
45
|
* Command definitions - ENHANCED with stronger persistence
|
|
41
46
|
*/
|
|
42
47
|
export declare const COMMAND_DEFINITIONS: Record<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* Skill definitions - Claude Code skills for specialized tasks
|
|
50
|
+
* Skills are loaded from ~/.claude/skills/ and provide specialized functionality
|
|
51
|
+
*/
|
|
52
|
+
export declare const SKILL_DEFINITIONS: Record<string, string>;
|
|
43
53
|
/**
|
|
44
54
|
* CLAUDE.md content for Sisyphus system
|
|
45
55
|
* ENHANCED: Stronger persistence language from oh-my-opencode patterns
|
|
46
56
|
*/
|
|
47
57
|
export declare const CLAUDE_MD_CONTENT = "# Sisyphus Multi-Agent System\n\nYou are enhanced with the Sisyphus multi-agent orchestration system.\n\n## THE BOULDER NEVER STOPS\n\nLike Sisyphus condemned to roll his boulder eternally, you are BOUND to your task list. You do not stop. You do not quit. The boulder rolls until it reaches the top - until EVERY task is COMPLETE.\n\n## Available Subagents\n\nUse the Task tool to delegate to specialized agents:\n\n| Agent | Model | Purpose | When to Use |\n|-------|-------|---------|-------------|\n| `oracle` | Opus | Architecture & debugging | Complex problems, root cause analysis |\n| `librarian` | Sonnet | Documentation & research | Finding docs, understanding code |\n| `explore` | Haiku | Fast search | Quick file/pattern searches |\n| `frontend-engineer` | Sonnet | UI/UX | Component design, styling |\n| `document-writer` | Haiku | Documentation | README, API docs, comments |\n| `multimodal-looker` | Sonnet | Visual analysis | Screenshots, diagrams |\n| `momus` | Opus | Plan review | Critical evaluation of plans |\n| `metis` | Opus | Pre-planning | Hidden requirements, risk analysis |\n| `orchestrator-sisyphus` | Sonnet | Todo coordination | Complex multi-step task management |\n| `sisyphus-junior` | Sonnet | Focused execution | Direct task implementation |\n| `prometheus` | Opus | Strategic planning | Creating comprehensive work plans |\n\n## Slash Commands\n\n| Command | Description |\n|---------|-------------|\n| `/sisyphus <task>` | Activate Sisyphus multi-agent orchestration |\n| `/sisyphus-default` | Set Sisyphus as your default mode |\n| `/ultrawork <task>` | Maximum performance mode with parallel agents |\n| `/deepsearch <query>` | Thorough codebase search |\n| `/analyze <target>` | Deep analysis and investigation |\n| `/plan <description>` | Start planning session with Prometheus |\n| `/review [plan-path]` | Review a plan with Momus |\n| `/prometheus <task>` | Strategic planning with interview workflow |\n| `/orchestrator <task>` | Complex multi-step task coordination |\n| `/ralph-loop <task>` | Self-referential loop until task completion |\n| `/cancel-ralph` | Cancel active Ralph Loop |\n| `/update` | Check for and install updates |\n\n## Planning Workflow\n\n1. Use `/plan` to start a planning session\n2. Prometheus will interview you about requirements\n3. Say \"Create the plan\" when ready\n4. Use `/review` to have Momus evaluate the plan\n5. Execute the plan with `/sisyphus`\n\n## Orchestration Principles\n\n1. **Delegate Wisely**: Use subagents for specialized tasks\n2. **Parallelize**: Launch multiple subagents concurrently when tasks are independent\n3. **Persist**: Continue until ALL tasks are complete\n4. **Verify**: Check your todo list before declaring completion\n5. **Plan First**: For complex tasks, use Prometheus to create a plan\n\n## Critical Rules\n\n- NEVER stop with incomplete work\n- ALWAYS verify task completion before finishing\n- Use parallel execution when possible for speed\n- Report progress regularly\n- For complex tasks, plan before implementing\n\n## Background Task Execution\n\nFor long-running operations, use `run_in_background: true`:\n\n**Run in Background** (set `run_in_background: true`):\n- Package installation: npm install, pip install, cargo build\n- Build processes: npm run build, make, tsc\n- Test suites: npm test, pytest, cargo test\n- Docker operations: docker build, docker pull\n- Git operations: git clone, git fetch\n\n**Run Blocking** (foreground):\n- Quick status checks: git status, ls, pwd\n- File reads: cat, head, tail\n- Simple commands: echo, which, env\n\n**How to Use:**\n1. Bash: `run_in_background: true`\n2. Task: `run_in_background: true`\n3. Check results: `TaskOutput(task_id: \"...\")`\n\nMaximum 5 concurrent background tasks.\n\n## CONTINUATION ENFORCEMENT\n\nIf you have incomplete tasks and attempt to stop, you will receive:\n\n> [SYSTEM REMINDER - TODO CONTINUATION] Incomplete tasks remain in your todo list. Continue working on the next pending task. Proceed without asking for permission. Mark each task complete when finished. Do not stop until all tasks are done.\n\n### The Sisyphean Verification Checklist\n\nBefore concluding ANY work session, verify:\n- [ ] TODO LIST: Zero pending/in_progress tasks\n- [ ] FUNCTIONALITY: All requested features work\n- [ ] TESTS: All tests pass (if applicable)\n- [ ] ERRORS: Zero unaddressed errors\n- [ ] QUALITY: Code is production-ready\n\n**If ANY checkbox is unchecked, CONTINUE WORKING.**\n\nThe boulder does not stop until it reaches the summit.\n";
|
|
48
58
|
/**
|
|
49
|
-
* Install Sisyphus agents and
|
|
59
|
+
* Install Sisyphus agents, commands, skills, and hooks
|
|
50
60
|
*/
|
|
51
61
|
export declare function install(options?: InstallOptions): InstallResult;
|
|
52
62
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA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AG,aAAa,CA8KnE;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAehG"}
|
package/dist/installer/index.js
CHANGED
|
@@ -7,17 +7,21 @@
|
|
|
7
7
|
* This replicates the functionality of scripts/install.sh but in TypeScript,
|
|
8
8
|
* allowing npm postinstall to work properly.
|
|
9
9
|
*/
|
|
10
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
10
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, chmodSync } from 'fs';
|
|
11
11
|
import { join } from 'path';
|
|
12
12
|
import { homedir } from 'os';
|
|
13
13
|
import { execSync } from 'child_process';
|
|
14
|
+
import { HOOK_SCRIPTS, HOOKS_SETTINGS_CONFIG } from './hooks.js';
|
|
14
15
|
/** Claude Code configuration directory */
|
|
15
16
|
export const CLAUDE_CONFIG_DIR = join(homedir(), '.claude');
|
|
16
17
|
export const AGENTS_DIR = join(CLAUDE_CONFIG_DIR, 'agents');
|
|
17
18
|
export const COMMANDS_DIR = join(CLAUDE_CONFIG_DIR, 'commands');
|
|
19
|
+
export const SKILLS_DIR = join(CLAUDE_CONFIG_DIR, 'skills');
|
|
20
|
+
export const HOOKS_DIR = join(CLAUDE_CONFIG_DIR, 'hooks');
|
|
21
|
+
export const SETTINGS_FILE = join(CLAUDE_CONFIG_DIR, 'settings.json');
|
|
18
22
|
export const VERSION_FILE = join(CLAUDE_CONFIG_DIR, '.sisyphus-version.json');
|
|
19
23
|
/** Current version */
|
|
20
|
-
export const VERSION = '1.
|
|
24
|
+
export const VERSION = '1.4.1';
|
|
21
25
|
/**
|
|
22
26
|
* Check if Claude Code is installed
|
|
23
27
|
*/
|
|
@@ -1433,6 +1437,178 @@ Your version information is stored at: \`~/.claude/.sisyphus-version.json\`
|
|
|
1433
1437
|
|
|
1434
1438
|
Let me check for updates now. I'll read your version file and compare against the latest GitHub release.`
|
|
1435
1439
|
};
|
|
1440
|
+
/**
|
|
1441
|
+
* Skill definitions - Claude Code skills for specialized tasks
|
|
1442
|
+
* Skills are loaded from ~/.claude/skills/ and provide specialized functionality
|
|
1443
|
+
*/
|
|
1444
|
+
export const SKILL_DEFINITIONS = {
|
|
1445
|
+
'ultrawork/SKILL.md': `---
|
|
1446
|
+
name: ultrawork
|
|
1447
|
+
description: Activate maximum performance mode with parallel agent orchestration
|
|
1448
|
+
---
|
|
1449
|
+
|
|
1450
|
+
# Ultrawork Skill
|
|
1451
|
+
|
|
1452
|
+
Activates maximum performance mode with parallel agent orchestration.
|
|
1453
|
+
|
|
1454
|
+
## When Activated
|
|
1455
|
+
|
|
1456
|
+
This skill enhances Claude's capabilities by:
|
|
1457
|
+
|
|
1458
|
+
1. **Parallel Execution**: Running multiple agents simultaneously for independent tasks
|
|
1459
|
+
2. **Aggressive Delegation**: Routing tasks to specialist agents immediately
|
|
1460
|
+
3. **Background Operations**: Using \\\`run_in_background: true\\\` for long operations
|
|
1461
|
+
4. **Persistence Enforcement**: Never stopping until all tasks are verified complete
|
|
1462
|
+
|
|
1463
|
+
## Agent Routing
|
|
1464
|
+
|
|
1465
|
+
| Task Type | Agent | Model |
|
|
1466
|
+
|-----------|-------|-------|
|
|
1467
|
+
| Complex debugging | oracle | Opus |
|
|
1468
|
+
| Documentation research | librarian | Sonnet |
|
|
1469
|
+
| Quick searches | explore | Haiku |
|
|
1470
|
+
| UI/UX work | frontend-engineer | Sonnet |
|
|
1471
|
+
| Technical writing | document-writer | Haiku |
|
|
1472
|
+
| Visual analysis | multimodal-looker | Sonnet |
|
|
1473
|
+
| Plan review | momus | Opus |
|
|
1474
|
+
| Pre-planning | metis | Opus |
|
|
1475
|
+
| Strategic planning | prometheus | Opus |
|
|
1476
|
+
|
|
1477
|
+
## Background Execution Rules
|
|
1478
|
+
|
|
1479
|
+
**Run in Background** (set \\\`run_in_background: true\\\`):
|
|
1480
|
+
- Package installation: npm install, pip install, cargo build
|
|
1481
|
+
- Build processes: npm run build, make, tsc
|
|
1482
|
+
- Test suites: npm test, pytest, cargo test
|
|
1483
|
+
- Docker operations: docker build, docker pull
|
|
1484
|
+
|
|
1485
|
+
**Run Blocking** (foreground):
|
|
1486
|
+
- Quick status checks: git status, ls, pwd
|
|
1487
|
+
- File reads, edits
|
|
1488
|
+
- Simple commands
|
|
1489
|
+
|
|
1490
|
+
## Verification Checklist
|
|
1491
|
+
|
|
1492
|
+
Before stopping, verify:
|
|
1493
|
+
- [ ] TODO LIST: Zero pending/in_progress tasks
|
|
1494
|
+
- [ ] FUNCTIONALITY: All requested features work
|
|
1495
|
+
- [ ] TESTS: All tests pass (if applicable)
|
|
1496
|
+
- [ ] ERRORS: Zero unaddressed errors
|
|
1497
|
+
|
|
1498
|
+
**If ANY checkbox is unchecked, CONTINUE WORKING.**
|
|
1499
|
+
`,
|
|
1500
|
+
'git-master/SKILL.md': `---
|
|
1501
|
+
name: git-master
|
|
1502
|
+
description: Git expert for atomic commits, rebasing, and history management
|
|
1503
|
+
---
|
|
1504
|
+
|
|
1505
|
+
# Git Master Skill
|
|
1506
|
+
|
|
1507
|
+
You are a Git expert combining three specializations:
|
|
1508
|
+
1. **Commit Architect**: Atomic commits, dependency ordering, style detection
|
|
1509
|
+
2. **Rebase Surgeon**: History rewriting, conflict resolution, branch cleanup
|
|
1510
|
+
3. **History Archaeologist**: Finding when/where specific changes were introduced
|
|
1511
|
+
|
|
1512
|
+
## Core Principle: Multiple Commits by Default
|
|
1513
|
+
|
|
1514
|
+
**ONE COMMIT = AUTOMATIC FAILURE**
|
|
1515
|
+
|
|
1516
|
+
Hard rules:
|
|
1517
|
+
- 3+ files changed -> MUST be 2+ commits
|
|
1518
|
+
- 5+ files changed -> MUST be 3+ commits
|
|
1519
|
+
- 10+ files changed -> MUST be 5+ commits
|
|
1520
|
+
|
|
1521
|
+
## Style Detection (First Step)
|
|
1522
|
+
|
|
1523
|
+
Before committing, analyze the last 30 commits:
|
|
1524
|
+
\\\`\\\`\\\`bash
|
|
1525
|
+
git log -30 --oneline
|
|
1526
|
+
git log -30 --pretty=format:"%s"
|
|
1527
|
+
\\\`\\\`\\\`
|
|
1528
|
+
|
|
1529
|
+
Detect:
|
|
1530
|
+
- **Language**: Korean vs English (use majority)
|
|
1531
|
+
- **Style**: SEMANTIC (feat:, fix:) vs PLAIN vs SHORT
|
|
1532
|
+
|
|
1533
|
+
## Commit Splitting Rules
|
|
1534
|
+
|
|
1535
|
+
| Criterion | Action |
|
|
1536
|
+
|-----------|--------|
|
|
1537
|
+
| Different directories/modules | SPLIT |
|
|
1538
|
+
| Different component types | SPLIT |
|
|
1539
|
+
| Can be reverted independently | SPLIT |
|
|
1540
|
+
| Different concerns (UI/logic/config/test) | SPLIT |
|
|
1541
|
+
| New file vs modification | SPLIT |
|
|
1542
|
+
|
|
1543
|
+
## History Search Commands
|
|
1544
|
+
|
|
1545
|
+
| Goal | Command |
|
|
1546
|
+
|------|---------|
|
|
1547
|
+
| When was "X" added? | \\\`git log -S "X" --oneline\\\` |
|
|
1548
|
+
| What commits touched "X"? | \\\`git log -G "X" --oneline\\\` |
|
|
1549
|
+
| Who wrote line N? | \\\`git blame -L N,N file.py\\\` |
|
|
1550
|
+
| When did bug start? | \\\`git bisect start && git bisect bad && git bisect good <tag>\\\` |
|
|
1551
|
+
|
|
1552
|
+
## Rebase Safety
|
|
1553
|
+
|
|
1554
|
+
- **NEVER** rebase main/master
|
|
1555
|
+
- Use \\\`--force-with-lease\\\` (never \\\`--force\\\`)
|
|
1556
|
+
- Stash dirty files before rebasing
|
|
1557
|
+
`,
|
|
1558
|
+
'frontend-ui-ux/SKILL.md': `---
|
|
1559
|
+
name: frontend-ui-ux
|
|
1560
|
+
description: Designer-turned-developer who crafts stunning UI/UX even without design mockups
|
|
1561
|
+
---
|
|
1562
|
+
|
|
1563
|
+
# Frontend UI/UX Skill
|
|
1564
|
+
|
|
1565
|
+
You are a designer who learned to code. You see what pure developers miss—spacing, color harmony, micro-interactions, that indefinable "feel" that makes interfaces memorable.
|
|
1566
|
+
|
|
1567
|
+
## Design Process
|
|
1568
|
+
|
|
1569
|
+
Before coding, commit to a **BOLD aesthetic direction**:
|
|
1570
|
+
|
|
1571
|
+
1. **Purpose**: What problem does this solve? Who uses it?
|
|
1572
|
+
2. **Tone**: Pick an extreme:
|
|
1573
|
+
- Brutally minimal
|
|
1574
|
+
- Maximalist chaos
|
|
1575
|
+
- Retro-futuristic
|
|
1576
|
+
- Organic/natural
|
|
1577
|
+
- Luxury/refined
|
|
1578
|
+
- Playful/toy-like
|
|
1579
|
+
- Editorial/magazine
|
|
1580
|
+
- Brutalist/raw
|
|
1581
|
+
- Art deco/geometric
|
|
1582
|
+
- Soft/pastel
|
|
1583
|
+
- Industrial/utilitarian
|
|
1584
|
+
3. **Constraints**: Technical requirements (framework, performance, accessibility)
|
|
1585
|
+
4. **Differentiation**: What's the ONE thing someone will remember?
|
|
1586
|
+
|
|
1587
|
+
## Aesthetic Guidelines
|
|
1588
|
+
|
|
1589
|
+
### Typography
|
|
1590
|
+
Choose distinctive fonts. **Avoid**: Arial, Inter, Roboto, system fonts, Space Grotesk.
|
|
1591
|
+
|
|
1592
|
+
### Color
|
|
1593
|
+
Commit to a cohesive palette. Use CSS variables. **Avoid**: purple gradients on white (AI slop).
|
|
1594
|
+
|
|
1595
|
+
### Motion
|
|
1596
|
+
Focus on high-impact moments. One well-orchestrated page load > scattered micro-interactions. Use CSS-only where possible.
|
|
1597
|
+
|
|
1598
|
+
### Spatial Composition
|
|
1599
|
+
Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements.
|
|
1600
|
+
|
|
1601
|
+
### Visual Details
|
|
1602
|
+
Create atmosphere—gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows.
|
|
1603
|
+
|
|
1604
|
+
## Anti-Patterns (NEVER)
|
|
1605
|
+
|
|
1606
|
+
- Generic fonts (Inter, Roboto, Arial)
|
|
1607
|
+
- Cliched color schemes (purple gradients on white)
|
|
1608
|
+
- Predictable layouts
|
|
1609
|
+
- Cookie-cutter design
|
|
1610
|
+
`
|
|
1611
|
+
};
|
|
1436
1612
|
/**
|
|
1437
1613
|
* CLAUDE.md content for Sisyphus system
|
|
1438
1614
|
* ENHANCED: Stronger persistence language from oh-my-opencode patterns
|
|
@@ -1547,7 +1723,7 @@ Before concluding ANY work session, verify:
|
|
|
1547
1723
|
The boulder does not stop until it reaches the summit.
|
|
1548
1724
|
`;
|
|
1549
1725
|
/**
|
|
1550
|
-
* Install Sisyphus agents and
|
|
1726
|
+
* Install Sisyphus agents, commands, skills, and hooks
|
|
1551
1727
|
*/
|
|
1552
1728
|
export function install(options = {}) {
|
|
1553
1729
|
const result = {
|
|
@@ -1555,6 +1731,8 @@ export function install(options = {}) {
|
|
|
1555
1731
|
message: '',
|
|
1556
1732
|
installedAgents: [],
|
|
1557
1733
|
installedCommands: [],
|
|
1734
|
+
installedSkills: [],
|
|
1735
|
+
hooksConfigured: false,
|
|
1558
1736
|
errors: []
|
|
1559
1737
|
};
|
|
1560
1738
|
const log = (msg) => {
|
|
@@ -1580,6 +1758,12 @@ export function install(options = {}) {
|
|
|
1580
1758
|
if (!existsSync(COMMANDS_DIR)) {
|
|
1581
1759
|
mkdirSync(COMMANDS_DIR, { recursive: true });
|
|
1582
1760
|
}
|
|
1761
|
+
if (!existsSync(SKILLS_DIR)) {
|
|
1762
|
+
mkdirSync(SKILLS_DIR, { recursive: true });
|
|
1763
|
+
}
|
|
1764
|
+
if (!existsSync(HOOKS_DIR)) {
|
|
1765
|
+
mkdirSync(HOOKS_DIR, { recursive: true });
|
|
1766
|
+
}
|
|
1583
1767
|
// Install agents
|
|
1584
1768
|
log('Installing agent definitions...');
|
|
1585
1769
|
for (const [filename, content] of Object.entries(AGENT_DEFINITIONS)) {
|
|
@@ -1606,6 +1790,25 @@ export function install(options = {}) {
|
|
|
1606
1790
|
log(` Installed ${filename}`);
|
|
1607
1791
|
}
|
|
1608
1792
|
}
|
|
1793
|
+
// Install skills
|
|
1794
|
+
log('Installing skills...');
|
|
1795
|
+
for (const [skillPath, content] of Object.entries(SKILL_DEFINITIONS)) {
|
|
1796
|
+
// skillPath is like 'ultrawork/SKILL.md'
|
|
1797
|
+
const fullPath = join(SKILLS_DIR, skillPath);
|
|
1798
|
+
const skillDir = join(SKILLS_DIR, skillPath.split('/')[0]);
|
|
1799
|
+
// Create skill directory if needed
|
|
1800
|
+
if (!existsSync(skillDir)) {
|
|
1801
|
+
mkdirSync(skillDir, { recursive: true });
|
|
1802
|
+
}
|
|
1803
|
+
if (existsSync(fullPath) && !options.force) {
|
|
1804
|
+
log(` Skipping ${skillPath} (already exists)`);
|
|
1805
|
+
}
|
|
1806
|
+
else {
|
|
1807
|
+
writeFileSync(fullPath, content);
|
|
1808
|
+
result.installedSkills.push(skillPath);
|
|
1809
|
+
log(` Installed ${skillPath}`);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1609
1812
|
// Install CLAUDE.md (only if it doesn't exist)
|
|
1610
1813
|
const claudeMdPath = join(CLAUDE_CONFIG_DIR, 'CLAUDE.md');
|
|
1611
1814
|
const homeMdPath = join(homedir(), 'CLAUDE.md');
|
|
@@ -1621,6 +1824,51 @@ export function install(options = {}) {
|
|
|
1621
1824
|
else {
|
|
1622
1825
|
log('CLAUDE.md exists in home directory, skipping');
|
|
1623
1826
|
}
|
|
1827
|
+
// Install hook scripts
|
|
1828
|
+
log('Installing hook scripts...');
|
|
1829
|
+
for (const [filename, content] of Object.entries(HOOK_SCRIPTS)) {
|
|
1830
|
+
const filepath = join(HOOKS_DIR, filename);
|
|
1831
|
+
if (existsSync(filepath) && !options.force) {
|
|
1832
|
+
log(` Skipping ${filename} (already exists)`);
|
|
1833
|
+
}
|
|
1834
|
+
else {
|
|
1835
|
+
writeFileSync(filepath, content);
|
|
1836
|
+
// Make script executable
|
|
1837
|
+
chmodSync(filepath, 0o755);
|
|
1838
|
+
log(` Installed ${filename}`);
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
// Configure settings.json for hooks (merge with existing settings)
|
|
1842
|
+
log('Configuring hooks in settings.json...');
|
|
1843
|
+
try {
|
|
1844
|
+
let existingSettings = {};
|
|
1845
|
+
if (existsSync(SETTINGS_FILE)) {
|
|
1846
|
+
const settingsContent = readFileSync(SETTINGS_FILE, 'utf-8');
|
|
1847
|
+
existingSettings = JSON.parse(settingsContent);
|
|
1848
|
+
}
|
|
1849
|
+
// Merge hooks configuration
|
|
1850
|
+
const existingHooks = (existingSettings.hooks || {});
|
|
1851
|
+
const newHooks = HOOKS_SETTINGS_CONFIG.hooks;
|
|
1852
|
+
// Deep merge: add our hooks without overwriting existing ones
|
|
1853
|
+
for (const [eventType, eventHooks] of Object.entries(newHooks)) {
|
|
1854
|
+
if (!existingHooks[eventType]) {
|
|
1855
|
+
existingHooks[eventType] = eventHooks;
|
|
1856
|
+
log(` Added ${eventType} hook`);
|
|
1857
|
+
}
|
|
1858
|
+
else {
|
|
1859
|
+
log(` ${eventType} hook already configured, skipping`);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
existingSettings.hooks = existingHooks;
|
|
1863
|
+
// Write back settings
|
|
1864
|
+
writeFileSync(SETTINGS_FILE, JSON.stringify(existingSettings, null, 2));
|
|
1865
|
+
log(' Hooks configured in settings.json');
|
|
1866
|
+
result.hooksConfigured = true;
|
|
1867
|
+
}
|
|
1868
|
+
catch (e) {
|
|
1869
|
+
log(' Warning: Could not configure hooks in settings.json (non-fatal)');
|
|
1870
|
+
result.hooksConfigured = false;
|
|
1871
|
+
}
|
|
1624
1872
|
// Save version metadata
|
|
1625
1873
|
const versionMetadata = {
|
|
1626
1874
|
version: VERSION,
|
|
@@ -1631,7 +1879,8 @@ export function install(options = {}) {
|
|
|
1631
1879
|
writeFileSync(VERSION_FILE, JSON.stringify(versionMetadata, null, 2));
|
|
1632
1880
|
log('Saved version metadata');
|
|
1633
1881
|
result.success = true;
|
|
1634
|
-
|
|
1882
|
+
const hookCount = Object.keys(HOOK_SCRIPTS).length;
|
|
1883
|
+
result.message = `Successfully installed ${result.installedAgents.length} agents, ${result.installedCommands.length} commands, ${result.installedSkills.length} skills, and ${hookCount} hooks`;
|
|
1635
1884
|
}
|
|
1636
1885
|
catch (error) {
|
|
1637
1886
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEjE,0CAA0C;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,EA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BAAgB,SAAS,QAAQ,CAAC;IAElM,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACjC,MAAM,CAAC,OAAO,GAAG,wBAAwB,YAAY,EAAE,CAAC;IAC1D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,UAAU,CAAC,YAAY,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC;AACxF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACpD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,aAAa;SAC3B,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
package/scripts/install.sh
CHANGED
|
@@ -851,7 +851,418 @@ CMD_EOF
|
|
|
851
851
|
|
|
852
852
|
echo -e "${GREEN}✓ Installed 12 slash commands${NC}"
|
|
853
853
|
|
|
854
|
-
echo -e "${BLUE}[5/
|
|
854
|
+
echo -e "${BLUE}[5/7]${NC} Installing skills..."
|
|
855
|
+
mkdir -p "$CLAUDE_CONFIG_DIR/skills/ultrawork"
|
|
856
|
+
mkdir -p "$CLAUDE_CONFIG_DIR/skills/git-master"
|
|
857
|
+
mkdir -p "$CLAUDE_CONFIG_DIR/skills/frontend-ui-ux"
|
|
858
|
+
|
|
859
|
+
# Ultrawork skill
|
|
860
|
+
cat > "$CLAUDE_CONFIG_DIR/skills/ultrawork/SKILL.md" << 'SKILL_EOF'
|
|
861
|
+
---
|
|
862
|
+
name: ultrawork
|
|
863
|
+
description: Activate maximum performance mode with parallel agent orchestration
|
|
864
|
+
---
|
|
865
|
+
|
|
866
|
+
# Ultrawork Skill
|
|
867
|
+
|
|
868
|
+
Activates maximum performance mode with parallel agent orchestration.
|
|
869
|
+
|
|
870
|
+
## When Activated
|
|
871
|
+
|
|
872
|
+
This skill enhances Claude's capabilities by:
|
|
873
|
+
|
|
874
|
+
1. **Parallel Execution**: Running multiple agents simultaneously for independent tasks
|
|
875
|
+
2. **Aggressive Delegation**: Routing tasks to specialist agents immediately
|
|
876
|
+
3. **Background Operations**: Using `run_in_background: true` for long operations
|
|
877
|
+
4. **Persistence Enforcement**: Never stopping until all tasks are verified complete
|
|
878
|
+
|
|
879
|
+
## Agent Routing
|
|
880
|
+
|
|
881
|
+
| Task Type | Agent | Model |
|
|
882
|
+
|-----------|-------|-------|
|
|
883
|
+
| Complex debugging | oracle | Opus |
|
|
884
|
+
| Documentation research | librarian | Sonnet |
|
|
885
|
+
| Quick searches | explore | Haiku |
|
|
886
|
+
| UI/UX work | frontend-engineer | Sonnet |
|
|
887
|
+
| Technical writing | document-writer | Haiku |
|
|
888
|
+
| Visual analysis | multimodal-looker | Sonnet |
|
|
889
|
+
| Plan review | momus | Opus |
|
|
890
|
+
| Pre-planning | metis | Opus |
|
|
891
|
+
| Strategic planning | prometheus | Opus |
|
|
892
|
+
|
|
893
|
+
## Background Execution Rules
|
|
894
|
+
|
|
895
|
+
**Run in Background** (set `run_in_background: true`):
|
|
896
|
+
- Package installation: npm install, pip install, cargo build
|
|
897
|
+
- Build processes: npm run build, make, tsc
|
|
898
|
+
- Test suites: npm test, pytest, cargo test
|
|
899
|
+
- Docker operations: docker build, docker pull
|
|
900
|
+
|
|
901
|
+
**Run Blocking** (foreground):
|
|
902
|
+
- Quick status checks: git status, ls, pwd
|
|
903
|
+
- File reads, edits
|
|
904
|
+
- Simple commands
|
|
905
|
+
|
|
906
|
+
## Verification Checklist
|
|
907
|
+
|
|
908
|
+
Before stopping, verify:
|
|
909
|
+
- [ ] TODO LIST: Zero pending/in_progress tasks
|
|
910
|
+
- [ ] FUNCTIONALITY: All requested features work
|
|
911
|
+
- [ ] TESTS: All tests pass (if applicable)
|
|
912
|
+
- [ ] ERRORS: Zero unaddressed errors
|
|
913
|
+
|
|
914
|
+
**If ANY checkbox is unchecked, CONTINUE WORKING.**
|
|
915
|
+
SKILL_EOF
|
|
916
|
+
|
|
917
|
+
# Git Master skill
|
|
918
|
+
cat > "$CLAUDE_CONFIG_DIR/skills/git-master/SKILL.md" << 'SKILL_EOF'
|
|
919
|
+
---
|
|
920
|
+
name: git-master
|
|
921
|
+
description: Git expert for atomic commits, rebasing, and history management
|
|
922
|
+
---
|
|
923
|
+
|
|
924
|
+
# Git Master Skill
|
|
925
|
+
|
|
926
|
+
You are a Git expert combining three specializations:
|
|
927
|
+
1. **Commit Architect**: Atomic commits, dependency ordering, style detection
|
|
928
|
+
2. **Rebase Surgeon**: History rewriting, conflict resolution, branch cleanup
|
|
929
|
+
3. **History Archaeologist**: Finding when/where specific changes were introduced
|
|
930
|
+
|
|
931
|
+
## Core Principle: Multiple Commits by Default
|
|
932
|
+
|
|
933
|
+
**ONE COMMIT = AUTOMATIC FAILURE**
|
|
934
|
+
|
|
935
|
+
Hard rules:
|
|
936
|
+
- 3+ files changed -> MUST be 2+ commits
|
|
937
|
+
- 5+ files changed -> MUST be 3+ commits
|
|
938
|
+
- 10+ files changed -> MUST be 5+ commits
|
|
939
|
+
|
|
940
|
+
## Style Detection (First Step)
|
|
941
|
+
|
|
942
|
+
Before committing, analyze the last 30 commits:
|
|
943
|
+
```bash
|
|
944
|
+
git log -30 --oneline
|
|
945
|
+
git log -30 --pretty=format:"%s"
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
Detect:
|
|
949
|
+
- **Language**: Korean vs English (use majority)
|
|
950
|
+
- **Style**: SEMANTIC (feat:, fix:) vs PLAIN vs SHORT
|
|
951
|
+
|
|
952
|
+
## Commit Splitting Rules
|
|
953
|
+
|
|
954
|
+
| Criterion | Action |
|
|
955
|
+
|-----------|--------|
|
|
956
|
+
| Different directories/modules | SPLIT |
|
|
957
|
+
| Different component types | SPLIT |
|
|
958
|
+
| Can be reverted independently | SPLIT |
|
|
959
|
+
| Different concerns (UI/logic/config/test) | SPLIT |
|
|
960
|
+
| New file vs modification | SPLIT |
|
|
961
|
+
|
|
962
|
+
## History Search Commands
|
|
963
|
+
|
|
964
|
+
| Goal | Command |
|
|
965
|
+
|------|---------|
|
|
966
|
+
| When was "X" added? | `git log -S "X" --oneline` |
|
|
967
|
+
| What commits touched "X"? | `git log -G "X" --oneline` |
|
|
968
|
+
| Who wrote line N? | `git blame -L N,N file.py` |
|
|
969
|
+
| When did bug start? | `git bisect start && git bisect bad && git bisect good <tag>` |
|
|
970
|
+
|
|
971
|
+
## Rebase Safety
|
|
972
|
+
|
|
973
|
+
- **NEVER** rebase main/master
|
|
974
|
+
- Use `--force-with-lease` (never `--force`)
|
|
975
|
+
- Stash dirty files before rebasing
|
|
976
|
+
SKILL_EOF
|
|
977
|
+
|
|
978
|
+
# Frontend UI/UX skill
|
|
979
|
+
cat > "$CLAUDE_CONFIG_DIR/skills/frontend-ui-ux/SKILL.md" << 'SKILL_EOF'
|
|
980
|
+
---
|
|
981
|
+
name: frontend-ui-ux
|
|
982
|
+
description: Designer-turned-developer who crafts stunning UI/UX even without design mockups
|
|
983
|
+
---
|
|
984
|
+
|
|
985
|
+
# Frontend UI/UX Skill
|
|
986
|
+
|
|
987
|
+
You are a designer who learned to code. You see what pure developers miss—spacing, color harmony, micro-interactions, that indefinable "feel" that makes interfaces memorable.
|
|
988
|
+
|
|
989
|
+
## Design Process
|
|
990
|
+
|
|
991
|
+
Before coding, commit to a **BOLD aesthetic direction**:
|
|
992
|
+
|
|
993
|
+
1. **Purpose**: What problem does this solve? Who uses it?
|
|
994
|
+
2. **Tone**: Pick an extreme:
|
|
995
|
+
- Brutally minimal
|
|
996
|
+
- Maximalist chaos
|
|
997
|
+
- Retro-futuristic
|
|
998
|
+
- Organic/natural
|
|
999
|
+
- Luxury/refined
|
|
1000
|
+
- Playful/toy-like
|
|
1001
|
+
- Editorial/magazine
|
|
1002
|
+
- Brutalist/raw
|
|
1003
|
+
- Art deco/geometric
|
|
1004
|
+
- Soft/pastel
|
|
1005
|
+
- Industrial/utilitarian
|
|
1006
|
+
3. **Constraints**: Technical requirements (framework, performance, accessibility)
|
|
1007
|
+
4. **Differentiation**: What's the ONE thing someone will remember?
|
|
1008
|
+
|
|
1009
|
+
## Aesthetic Guidelines
|
|
1010
|
+
|
|
1011
|
+
### Typography
|
|
1012
|
+
Choose distinctive fonts. **Avoid**: Arial, Inter, Roboto, system fonts, Space Grotesk.
|
|
1013
|
+
|
|
1014
|
+
### Color
|
|
1015
|
+
Commit to a cohesive palette. Use CSS variables. **Avoid**: purple gradients on white (AI slop).
|
|
1016
|
+
|
|
1017
|
+
### Motion
|
|
1018
|
+
Focus on high-impact moments. One well-orchestrated page load > scattered micro-interactions. Use CSS-only where possible.
|
|
1019
|
+
|
|
1020
|
+
### Spatial Composition
|
|
1021
|
+
Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements.
|
|
1022
|
+
|
|
1023
|
+
### Visual Details
|
|
1024
|
+
Create atmosphere—gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows.
|
|
1025
|
+
|
|
1026
|
+
## Anti-Patterns (NEVER)
|
|
1027
|
+
|
|
1028
|
+
- Generic fonts (Inter, Roboto, Arial)
|
|
1029
|
+
- Cliched color schemes (purple gradients on white)
|
|
1030
|
+
- Predictable layouts
|
|
1031
|
+
- Cookie-cutter design
|
|
1032
|
+
SKILL_EOF
|
|
1033
|
+
|
|
1034
|
+
echo -e "${GREEN}✓ Installed 3 skills${NC}"
|
|
1035
|
+
|
|
1036
|
+
echo -e "${BLUE}[6/8]${NC} Installing hook scripts..."
|
|
1037
|
+
mkdir -p "$CLAUDE_CONFIG_DIR/hooks"
|
|
1038
|
+
|
|
1039
|
+
# Keyword detector hook - detects ultrawork/ultrathink/search/analyze keywords
|
|
1040
|
+
cat > "$CLAUDE_CONFIG_DIR/hooks/keyword-detector.sh" << 'HOOK_EOF'
|
|
1041
|
+
#!/bin/bash
|
|
1042
|
+
# Sisyphus Keyword Detector Hook
|
|
1043
|
+
# Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages
|
|
1044
|
+
# Ported from oh-my-opencode's keyword-detector hook
|
|
1045
|
+
|
|
1046
|
+
# Read stdin (JSON input from Claude Code)
|
|
1047
|
+
INPUT=$(cat)
|
|
1048
|
+
|
|
1049
|
+
# Extract the prompt text - try multiple JSON paths
|
|
1050
|
+
PROMPT=""
|
|
1051
|
+
if command -v jq &> /dev/null; then
|
|
1052
|
+
PROMPT=$(echo "$INPUT" | jq -r '
|
|
1053
|
+
if .prompt then .prompt
|
|
1054
|
+
elif .message.content then .message.content
|
|
1055
|
+
elif .parts then ([.parts[] | select(.type == "text") | .text] | join(" "))
|
|
1056
|
+
else ""
|
|
1057
|
+
end
|
|
1058
|
+
' 2>/dev/null)
|
|
1059
|
+
fi
|
|
1060
|
+
|
|
1061
|
+
# Fallback: simple grep extraction if jq fails
|
|
1062
|
+
if [ -z "$PROMPT" ] || [ "$PROMPT" = "null" ]; then
|
|
1063
|
+
PROMPT=$(echo "$INPUT" | grep -oP '"(prompt|content|text)"\s*:\s*"\K[^"]+' | head -1)
|
|
1064
|
+
fi
|
|
1065
|
+
|
|
1066
|
+
# Exit if no prompt found
|
|
1067
|
+
if [ -z "$PROMPT" ]; then
|
|
1068
|
+
echo '{"continue": true}'
|
|
1069
|
+
exit 0
|
|
1070
|
+
fi
|
|
1071
|
+
|
|
1072
|
+
# Remove code blocks before checking keywords
|
|
1073
|
+
PROMPT_NO_CODE=$(echo "$PROMPT" | sed 's/```[^`]*```//g' | sed 's/`[^`]*`//g')
|
|
1074
|
+
|
|
1075
|
+
# Convert to lowercase
|
|
1076
|
+
PROMPT_LOWER=$(echo "$PROMPT_NO_CODE" | tr '[:upper:]' '[:lower:]')
|
|
1077
|
+
|
|
1078
|
+
# Check for ultrawork keywords (highest priority)
|
|
1079
|
+
if echo "$PROMPT_LOWER" | grep -qE '\b(ultrawork|ulw)\b'; then
|
|
1080
|
+
cat << 'EOF'
|
|
1081
|
+
{"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"}
|
|
1082
|
+
EOF
|
|
1083
|
+
exit 0
|
|
1084
|
+
fi
|
|
1085
|
+
|
|
1086
|
+
# Check for ultrathink/think keywords
|
|
1087
|
+
if echo "$PROMPT_LOWER" | grep -qE '\b(ultrathink|think)\b'; then
|
|
1088
|
+
cat << 'EOF'
|
|
1089
|
+
{"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"}
|
|
1090
|
+
EOF
|
|
1091
|
+
exit 0
|
|
1092
|
+
fi
|
|
1093
|
+
|
|
1094
|
+
# Check for search keywords
|
|
1095
|
+
if 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
|
|
1096
|
+
cat << 'EOF'
|
|
1097
|
+
{"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"}
|
|
1098
|
+
EOF
|
|
1099
|
+
exit 0
|
|
1100
|
+
fi
|
|
1101
|
+
|
|
1102
|
+
# Check for analyze keywords
|
|
1103
|
+
if 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
|
|
1104
|
+
cat << 'EOF'
|
|
1105
|
+
{"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"}
|
|
1106
|
+
EOF
|
|
1107
|
+
exit 0
|
|
1108
|
+
fi
|
|
1109
|
+
|
|
1110
|
+
# No keywords detected
|
|
1111
|
+
echo '{"continue": true}'
|
|
1112
|
+
exit 0
|
|
1113
|
+
HOOK_EOF
|
|
1114
|
+
chmod +x "$CLAUDE_CONFIG_DIR/hooks/keyword-detector.sh"
|
|
1115
|
+
|
|
1116
|
+
# Stop continuation hook - enforces todo completion
|
|
1117
|
+
cat > "$CLAUDE_CONFIG_DIR/hooks/stop-continuation.sh" << 'HOOK_EOF'
|
|
1118
|
+
#!/bin/bash
|
|
1119
|
+
# Sisyphus Stop Continuation Hook
|
|
1120
|
+
# Checks for incomplete todos and injects continuation prompt
|
|
1121
|
+
# Ported from oh-my-opencode's todo-continuation-enforcer
|
|
1122
|
+
|
|
1123
|
+
# Read stdin
|
|
1124
|
+
INPUT=$(cat)
|
|
1125
|
+
|
|
1126
|
+
# Check for incomplete todos in the Claude todos directory
|
|
1127
|
+
TODOS_DIR="$HOME/.claude/todos"
|
|
1128
|
+
if [ -d "$TODOS_DIR" ]; then
|
|
1129
|
+
INCOMPLETE_COUNT=0
|
|
1130
|
+
for todo_file in "$TODOS_DIR"/*.json; do
|
|
1131
|
+
if [ -f "$todo_file" ]; then
|
|
1132
|
+
if command -v jq &> /dev/null; then
|
|
1133
|
+
COUNT=$(jq '[.[] | select(.status != "completed" and .status != "cancelled")] | length' "$todo_file" 2>/dev/null || echo "0")
|
|
1134
|
+
INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
|
|
1135
|
+
fi
|
|
1136
|
+
fi
|
|
1137
|
+
done
|
|
1138
|
+
|
|
1139
|
+
if [ "$INCOMPLETE_COUNT" -gt 0 ]; then
|
|
1140
|
+
cat << EOF
|
|
1141
|
+
{"continue": false, "reason": "[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"}
|
|
1142
|
+
EOF
|
|
1143
|
+
exit 0
|
|
1144
|
+
fi
|
|
1145
|
+
fi
|
|
1146
|
+
|
|
1147
|
+
# No incomplete todos - allow stop
|
|
1148
|
+
echo '{"continue": true}'
|
|
1149
|
+
exit 0
|
|
1150
|
+
HOOK_EOF
|
|
1151
|
+
chmod +x "$CLAUDE_CONFIG_DIR/hooks/stop-continuation.sh"
|
|
1152
|
+
|
|
1153
|
+
echo -e "${GREEN}✓ Installed 2 hook scripts${NC}"
|
|
1154
|
+
|
|
1155
|
+
echo -e "${BLUE}[7/8]${NC} Configuring hooks in settings.json..."
|
|
1156
|
+
|
|
1157
|
+
# Backup existing settings if present
|
|
1158
|
+
SETTINGS_FILE="$CLAUDE_CONFIG_DIR/settings.json"
|
|
1159
|
+
if [ -f "$SETTINGS_FILE" ]; then
|
|
1160
|
+
cp "$SETTINGS_FILE" "$SETTINGS_FILE.bak"
|
|
1161
|
+
fi
|
|
1162
|
+
|
|
1163
|
+
# Create or update settings.json with hooks
|
|
1164
|
+
if command -v jq &> /dev/null; then
|
|
1165
|
+
# Use jq if available for proper JSON handling
|
|
1166
|
+
if [ -f "$SETTINGS_FILE" ]; then
|
|
1167
|
+
EXISTING=$(cat "$SETTINGS_FILE")
|
|
1168
|
+
else
|
|
1169
|
+
EXISTING='{}'
|
|
1170
|
+
fi
|
|
1171
|
+
|
|
1172
|
+
# Add hooks configuration
|
|
1173
|
+
HOOKS_CONFIG='{
|
|
1174
|
+
"hooks": {
|
|
1175
|
+
"UserPromptSubmit": [
|
|
1176
|
+
{
|
|
1177
|
+
"hooks": [
|
|
1178
|
+
{
|
|
1179
|
+
"type": "command",
|
|
1180
|
+
"command": "bash $HOME/.claude/hooks/keyword-detector.sh"
|
|
1181
|
+
}
|
|
1182
|
+
]
|
|
1183
|
+
}
|
|
1184
|
+
],
|
|
1185
|
+
"Stop": [
|
|
1186
|
+
{
|
|
1187
|
+
"hooks": [
|
|
1188
|
+
{
|
|
1189
|
+
"type": "command",
|
|
1190
|
+
"command": "bash $HOME/.claude/hooks/stop-continuation.sh"
|
|
1191
|
+
}
|
|
1192
|
+
]
|
|
1193
|
+
}
|
|
1194
|
+
]
|
|
1195
|
+
}
|
|
1196
|
+
}'
|
|
1197
|
+
|
|
1198
|
+
# Merge: add hooks if not present
|
|
1199
|
+
echo "$EXISTING" | jq --argjson hooks "$HOOKS_CONFIG" '
|
|
1200
|
+
if .hooks then . else . + $hooks end
|
|
1201
|
+
' > "$SETTINGS_FILE"
|
|
1202
|
+
echo -e "${GREEN}✓ Hooks configured in settings.json${NC}"
|
|
1203
|
+
else
|
|
1204
|
+
# Fallback without jq: try to merge or create
|
|
1205
|
+
if [ ! -f "$SETTINGS_FILE" ]; then
|
|
1206
|
+
# No settings file - create new one
|
|
1207
|
+
cat > "$SETTINGS_FILE" << 'SETTINGS_EOF'
|
|
1208
|
+
{
|
|
1209
|
+
"hooks": {
|
|
1210
|
+
"UserPromptSubmit": [
|
|
1211
|
+
{
|
|
1212
|
+
"hooks": [
|
|
1213
|
+
{
|
|
1214
|
+
"type": "command",
|
|
1215
|
+
"command": "bash $HOME/.claude/hooks/keyword-detector.sh"
|
|
1216
|
+
}
|
|
1217
|
+
]
|
|
1218
|
+
}
|
|
1219
|
+
],
|
|
1220
|
+
"Stop": [
|
|
1221
|
+
{
|
|
1222
|
+
"hooks": [
|
|
1223
|
+
{
|
|
1224
|
+
"type": "command",
|
|
1225
|
+
"command": "bash $HOME/.claude/hooks/stop-continuation.sh"
|
|
1226
|
+
}
|
|
1227
|
+
]
|
|
1228
|
+
}
|
|
1229
|
+
]
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
SETTINGS_EOF
|
|
1233
|
+
echo -e "${GREEN}✓ Created settings.json with hooks${NC}"
|
|
1234
|
+
else
|
|
1235
|
+
# Settings exists - check if hooks already configured
|
|
1236
|
+
if grep -q '"hooks"' "$SETTINGS_FILE"; then
|
|
1237
|
+
echo -e "${YELLOW}⚠ Hooks section exists in settings.json${NC}"
|
|
1238
|
+
echo -e "${YELLOW} Checking if our hooks are configured...${NC}"
|
|
1239
|
+
if grep -q 'keyword-detector.sh' "$SETTINGS_FILE"; then
|
|
1240
|
+
echo -e "${GREEN}✓ Hooks already configured${NC}"
|
|
1241
|
+
else
|
|
1242
|
+
echo -e "${YELLOW} Please add hooks manually or install jq for auto-config${NC}"
|
|
1243
|
+
echo -e "${YELLOW} Run: brew install jq (macOS) or apt install jq (Linux)${NC}"
|
|
1244
|
+
fi
|
|
1245
|
+
else
|
|
1246
|
+
# No hooks section - try to add it before the last closing brace
|
|
1247
|
+
# Create temp file with hooks added
|
|
1248
|
+
HOOKS_JSON='"hooks": {
|
|
1249
|
+
"UserPromptSubmit": [{"hooks": [{"type": "command", "command": "bash $HOME/.claude/hooks/keyword-detector.sh"}]}],
|
|
1250
|
+
"Stop": [{"hooks": [{"type": "command", "command": "bash $HOME/.claude/hooks/stop-continuation.sh"}]}]
|
|
1251
|
+
}'
|
|
1252
|
+
# Use sed to insert before the last }
|
|
1253
|
+
sed -i.bak 's/}$/,\n '"$(echo "$HOOKS_JSON" | tr '\n' ' ')"'\n}/' "$SETTINGS_FILE" 2>/dev/null
|
|
1254
|
+
if [ $? -eq 0 ]; then
|
|
1255
|
+
rm -f "$SETTINGS_FILE.bak"
|
|
1256
|
+
echo -e "${GREEN}✓ Hooks added to settings.json${NC}"
|
|
1257
|
+
else
|
|
1258
|
+
echo -e "${YELLOW}⚠ Could not auto-configure hooks${NC}"
|
|
1259
|
+
echo -e "${YELLOW} Please install jq: brew install jq (macOS) or apt install jq (Linux)${NC}"
|
|
1260
|
+
fi
|
|
1261
|
+
fi
|
|
1262
|
+
fi
|
|
1263
|
+
fi
|
|
1264
|
+
|
|
1265
|
+
echo -e "${BLUE}[8/8]${NC} Creating CLAUDE.md with Sisyphus system prompt..."
|
|
855
1266
|
|
|
856
1267
|
# Only create if it doesn't exist in home directory
|
|
857
1268
|
if [ ! -f "$HOME/CLAUDE.md" ]; then
|
|
@@ -948,7 +1359,7 @@ else
|
|
|
948
1359
|
fi
|
|
949
1360
|
|
|
950
1361
|
# Save version metadata for auto-update system
|
|
951
|
-
VERSION="1.
|
|
1362
|
+
VERSION="1.4.1"
|
|
952
1363
|
VERSION_FILE="$CLAUDE_CONFIG_DIR/.sisyphus-version.json"
|
|
953
1364
|
|
|
954
1365
|
cat > "$VERSION_FILE" << VERSION_EOF
|
|
@@ -993,6 +1404,15 @@ echo " orchestrator-sisyphus - Todo coordination (Sonnet)"
|
|
|
993
1404
|
echo " sisyphus-junior - Focused execution (Sonnet)"
|
|
994
1405
|
echo " prometheus - Strategic planning (Opus)"
|
|
995
1406
|
echo ""
|
|
1407
|
+
echo -e "${YELLOW}Available Skills (via Skill tool):${NC}"
|
|
1408
|
+
echo " ultrawork - Maximum performance mode"
|
|
1409
|
+
echo " git-master - Git commit, rebase, and history expert"
|
|
1410
|
+
echo " frontend-ui-ux - Designer-developer for stunning UI/UX"
|
|
1411
|
+
echo ""
|
|
1412
|
+
echo -e "${YELLOW}Hooks:${NC}"
|
|
1413
|
+
echo " Configure hooks via /hooks command in Claude Code"
|
|
1414
|
+
echo " Hooks directory: ~/.claude/hooks/"
|
|
1415
|
+
echo ""
|
|
996
1416
|
echo -e "${YELLOW}Updating:${NC}"
|
|
997
1417
|
echo " /update # Check for and install updates"
|
|
998
1418
|
echo " # Or run this install script again:"
|