oh-my-claude-sisyphus 3.8.16 → 3.9.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/agents/analyst.md +41 -0
- package/agents/architect.md +45 -0
- package/agents/critic.md +42 -0
- package/agents/deep-executor.md +193 -0
- package/agents/planner.md +82 -0
- package/bridge/mcp-server.cjs +181 -181
- package/dist/__tests__/agent-registry.test.js +1 -1
- package/dist/__tests__/installer.test.js +8 -8
- package/dist/__tests__/installer.test.js.map +1 -1
- package/dist/__tests__/omc-tools-server.test.js +2 -2
- package/dist/__tests__/omc-tools-server.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +5 -4
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/agents/deep-executor.d.ts +15 -0
- package/dist/agents/deep-executor.d.ts.map +1 -0
- package/dist/agents/deep-executor.js +47 -0
- package/dist/agents/deep-executor.js.map +1 -0
- package/dist/agents/definitions.d.ts +15 -0
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +25 -0
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +1 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.d.ts +55 -0
- package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -0
- package/dist/cli/commands/doctor-conflicts.js +261 -0
- package/dist/cli/commands/doctor-conflicts.js.map +1 -0
- package/dist/cli/index.js +16 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/features/auto-update.d.ts +12 -0
- package/dist/features/auto-update.d.ts.map +1 -1
- package/dist/features/auto-update.js +4 -1
- package/dist/features/auto-update.js.map +1 -1
- package/dist/features/context-injector/types.d.ts +1 -1
- package/dist/features/context-injector/types.d.ts.map +1 -1
- package/dist/hooks/__tests__/bridge.test.d.ts +2 -0
- package/dist/hooks/__tests__/bridge.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/bridge.test.js +199 -0
- package/dist/hooks/__tests__/bridge.test.js.map +1 -0
- package/dist/hooks/beads-context/__tests__/index.test.d.ts +2 -0
- package/dist/hooks/beads-context/__tests__/index.test.d.ts.map +1 -0
- package/dist/hooks/beads-context/__tests__/index.test.js +150 -0
- package/dist/hooks/beads-context/__tests__/index.test.js.map +1 -0
- package/dist/hooks/beads-context/constants.d.ts +3 -0
- package/dist/hooks/beads-context/constants.d.ts.map +1 -0
- package/dist/hooks/beads-context/constants.js +35 -0
- package/dist/hooks/beads-context/constants.js.map +1 -0
- package/dist/hooks/beads-context/index.d.ts +21 -0
- package/dist/hooks/beads-context/index.d.ts.map +1 -0
- package/dist/hooks/beads-context/index.js +62 -0
- package/dist/hooks/beads-context/index.js.map +1 -0
- package/dist/hooks/beads-context/types.d.ts +7 -0
- package/dist/hooks/beads-context/types.d.ts.map +1 -0
- package/dist/hooks/beads-context/types.js +2 -0
- package/dist/hooks/beads-context/types.js.map +1 -0
- package/dist/hooks/bridge.d.ts +4 -0
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +76 -23
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/clear-suggestions/constants.d.ts +54 -0
- package/dist/hooks/clear-suggestions/constants.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/constants.js +102 -0
- package/dist/hooks/clear-suggestions/constants.js.map +1 -0
- package/dist/hooks/clear-suggestions/index.d.ts +61 -0
- package/dist/hooks/clear-suggestions/index.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/index.js +282 -0
- package/dist/hooks/clear-suggestions/index.js.map +1 -0
- package/dist/hooks/clear-suggestions/triggers.d.ts +65 -0
- package/dist/hooks/clear-suggestions/triggers.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/triggers.js +222 -0
- package/dist/hooks/clear-suggestions/triggers.js.map +1 -0
- package/dist/hooks/clear-suggestions/types.d.ts +92 -0
- package/dist/hooks/clear-suggestions/types.d.ts.map +1 -0
- package/dist/hooks/clear-suggestions/types.js +9 -0
- package/dist/hooks/clear-suggestions/types.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/permission-handler/index.d.ts.map +1 -1
- package/dist/hooks/permission-handler/index.js +3 -1
- package/dist/hooks/permission-handler/index.js.map +1 -1
- package/dist/hooks/setup/index.d.ts.map +1 -1
- package/dist/hooks/setup/index.js +12 -5
- package/dist/hooks/setup/index.js.map +1 -1
- package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/index.js +25 -9
- package/dist/hooks/subagent-tracker/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/installer/__tests__/claude-md-merge.test.d.ts +6 -0
- package/dist/installer/__tests__/claude-md-merge.test.d.ts.map +1 -0
- package/dist/installer/__tests__/claude-md-merge.test.js +220 -0
- package/dist/installer/__tests__/claude-md-merge.test.js.map +1 -0
- package/dist/installer/__tests__/safe-installer.test.d.ts +6 -0
- package/dist/installer/__tests__/safe-installer.test.d.ts.map +1 -0
- package/dist/installer/__tests__/safe-installer.test.js +172 -0
- package/dist/installer/__tests__/safe-installer.test.js.map +1 -0
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +3 -1
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +27 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +209 -85
- package/dist/installer/index.js.map +1 -1
- package/dist/mcp/omc-tools-server.d.ts +1 -1
- package/dist/mcp/omc-tools-server.d.ts.map +1 -1
- package/dist/mcp/omc-tools-server.js +3 -3
- package/dist/mcp/omc-tools-server.js.map +1 -1
- package/dist/mcp/standalone-server.js +1 -1
- package/dist/mcp/standalone-server.js.map +1 -1
- package/dist/verification/tier-selector.d.ts +40 -0
- package/dist/verification/tier-selector.d.ts.map +1 -0
- package/dist/verification/tier-selector.js +95 -0
- package/dist/verification/tier-selector.js.map +1 -0
- package/dist/verification/tier-selector.test.d.ts +2 -0
- package/dist/verification/tier-selector.test.d.ts.map +1 -0
- package/dist/verification/tier-selector.test.js +282 -0
- package/dist/verification/tier-selector.test.js.map +1 -0
- package/docs/AGENTS.md +1 -1
- package/docs/CLAUDE.md +90 -378
- package/docs/partials/agent-tiers.md +165 -0
- package/docs/partials/features.md +131 -0
- package/docs/partials/mode-hierarchy.md +120 -0
- package/docs/partials/mode-selection-guide.md +82 -0
- package/docs/partials/verification-tiers.md +107 -0
- package/docs/shared/agent-tiers.md +165 -0
- package/docs/shared/features.md +131 -0
- package/docs/shared/mode-hierarchy.md +120 -0
- package/docs/shared/mode-selection-guide.md +82 -0
- package/docs/shared/verification-tiers.md +107 -0
- package/package.json +4 -3
- package/scripts/compose-docs.mjs +44 -0
- package/scripts/keyword-detector.mjs +13 -3
- package/skills/deep-executor/SKILL.md +50 -0
- package/skills/ecomode/SKILL.md +58 -103
- package/skills/omc-setup/SKILL.md +197 -20
- package/skills/plan/SKILL.md +62 -0
- package/skills/project-session-manager/SKILL.md +87 -4
- package/skills/project-session-manager/lib/config.sh +54 -5
- package/skills/project-session-manager/lib/parse.sh +65 -11
- package/skills/project-session-manager/lib/providers/github.sh +52 -0
- package/skills/project-session-manager/lib/providers/interface.sh +76 -0
- package/skills/project-session-manager/lib/providers/jira.sh +79 -0
- package/skills/project-session-manager/lib/session.sh +49 -12
- package/skills/project-session-manager/lib/worktree.sh +37 -4
- package/skills/project-session-manager/psm.sh +116 -51
- package/skills/ralph/SKILL.md +41 -27
- package/skills/ultrawork/SKILL.md +56 -66
- package/templates/hooks/keyword-detector.mjs +21 -13
- package/templates/hooks/lib/stdin.mjs +62 -0
- package/templates/hooks/persistent-mode.mjs +7 -8
- package/templates/hooks/post-tool-use.mjs +8 -10
- package/templates/hooks/pre-tool-use.mjs +9 -6
- package/templates/hooks/session-start.mjs +7 -8
|
@@ -73,10 +73,20 @@ function extractPrompt(input) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//
|
|
77
|
-
function
|
|
76
|
+
// Sanitize text to prevent false positives from code blocks, XML tags, URLs, and file paths
|
|
77
|
+
function sanitizeForKeywordDetection(text) {
|
|
78
78
|
return text
|
|
79
|
+
// 1. Strip XML-style tag blocks: <tag-name ...>...</tag-name> (multi-line, greedy on tag name)
|
|
80
|
+
.replace(/<(\w[\w-]*)[\s>][\s\S]*?<\/\1>/g, '')
|
|
81
|
+
// 2. Strip self-closing XML tags: <tag-name />, <tag-name attr="val" />
|
|
82
|
+
.replace(/<\w[\w-]*(?:\s[^>]*)?\s*\/>/g, '')
|
|
83
|
+
// 3. Strip URLs: http://... or https://... up to whitespace
|
|
84
|
+
.replace(/https?:\/\/[^\s)>\]]+/g, '')
|
|
85
|
+
// 4. Strip file paths: /foo/bar/baz or foo/bar/baz (using lookbehind to avoid consuming leading char)
|
|
86
|
+
.replace(/(?<=^|[\s"'`(])(?:\/)?(?:[\w.-]+\/)+[\w.-]+/gm, '')
|
|
87
|
+
// 5. Strip markdown code blocks (existing)
|
|
79
88
|
.replace(/```[\s\S]*?```/g, '')
|
|
89
|
+
// 6. Strip inline code (existing)
|
|
80
90
|
.replace(/`[^`]+`/g, '');
|
|
81
91
|
}
|
|
82
92
|
|
|
@@ -225,7 +235,7 @@ async function main() {
|
|
|
225
235
|
return;
|
|
226
236
|
}
|
|
227
237
|
|
|
228
|
-
const cleanPrompt =
|
|
238
|
+
const cleanPrompt = sanitizeForKeywordDetection(prompt).toLowerCase();
|
|
229
239
|
|
|
230
240
|
// Collect all matching keywords
|
|
231
241
|
const matches = [];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-executor
|
|
3
|
+
description: Deep executor mode for complex goal-oriented tasks
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deep Executor Skill
|
|
7
|
+
|
|
8
|
+
Activate autonomous deep work mode for complex tasks.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Deep Executor is the autonomous deep worker agent. When activated, it:
|
|
13
|
+
|
|
14
|
+
1. **Explores First**: Uses its own tools (Glob, Grep, Read, ast_grep_search) to thoroughly understand the problem
|
|
15
|
+
2. **Plans Strategically**: Creates execution plan based on exploration
|
|
16
|
+
3. **Executes Directly**: Does all work itself using Edit, Write, Bash, ast_grep_replace
|
|
17
|
+
4. **Verifies Everything**: Runs builds, tests, and diagnostics before claiming completion
|
|
18
|
+
5. **Completes 100%**: Guarantees full completion with evidence
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
/oh-my-claudecode:deep-executor <your complex task>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or use magic keywords:
|
|
27
|
+
- "deep-executor: ..."
|
|
28
|
+
- "deep work: ..."
|
|
29
|
+
- "forge: ..."
|
|
30
|
+
|
|
31
|
+
## When to Use
|
|
32
|
+
|
|
33
|
+
| Situation | Use Deep Executor? |
|
|
34
|
+
|-----------|-----------------|
|
|
35
|
+
| Complex multi-file refactoring | YES |
|
|
36
|
+
| Unclear implementation path | YES |
|
|
37
|
+
| Need guaranteed completion | YES |
|
|
38
|
+
| Simple single-file fix | NO (use executor) |
|
|
39
|
+
| Quick code search | NO (use explore) |
|
|
40
|
+
| Cost-sensitive work | NO (use ecomode) |
|
|
41
|
+
|
|
42
|
+
## Activation
|
|
43
|
+
|
|
44
|
+
This skill spawns the `deep-executor` agent via:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Task(subagent_type="oh-my-claudecode:deep-executor", model="opus", prompt="{{PROMPT}}")
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The agent handles all exploration and execution internally. No sub-agents are spawned.
|
package/skills/ecomode/SKILL.md
CHANGED
|
@@ -1,141 +1,96 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ecomode
|
|
3
|
-
description: Token-efficient
|
|
3
|
+
description: Token-efficient model routing modifier
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Ecomode Skill
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Token-efficient model routing. This is a **MODIFIER**, not a standalone execution mode.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## What Ecomode Does
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Overrides default model selection to prefer cheaper tiers:
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
| Default Tier | Ecomode Override |
|
|
15
|
+
|--------------|------------------|
|
|
16
|
+
| HIGH (opus) | MEDIUM (sonnet), HIGH only if essential |
|
|
17
|
+
| MEDIUM (sonnet) | LOW (haiku) first, MEDIUM if fails |
|
|
18
|
+
| LOW (haiku) | LOW (haiku) - no change |
|
|
19
19
|
|
|
20
|
-
## Ecomode
|
|
20
|
+
## What Ecomode Does NOT Do
|
|
21
21
|
|
|
22
|
-
**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|----------|------|
|
|
26
|
-
| DEFAULT | Use LOW tier (Haiku) for all tasks |
|
|
27
|
-
| UPGRADE | Use MEDIUM (Sonnet) only when task complexity warrants |
|
|
28
|
-
| AVOID | HIGH tier (Opus) - only use for planning/critique if explicitly essential |
|
|
22
|
+
- **Persistence**: Use `ralph` for "don't stop until done"
|
|
23
|
+
- **Parallel Execution**: Use `ultrawork` for parallel agents
|
|
24
|
+
- **Delegation Enforcement**: Always active via core orchestration
|
|
29
25
|
|
|
30
|
-
##
|
|
26
|
+
## Combining Ecomode with Other Modes
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
Ecomode is a modifier that combines with execution modes:
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
| Combination | Effect |
|
|
31
|
+
|-------------|--------|
|
|
32
|
+
| `eco ralph` | Ralph loop with cheaper agents |
|
|
33
|
+
| `eco ultrawork` | Parallel execution with cheaper agents |
|
|
34
|
+
| `eco autopilot` | Full autonomous with cost optimization |
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|--------|-------------------|-------------------|--------------|
|
|
38
|
-
| **Analysis** | `architect-low` | `architect-medium` | ~~`architect`~~ |
|
|
39
|
-
| **Execution** | `executor-low` | `executor` | ~~`executor-high`~~ |
|
|
40
|
-
| **Search** | `explore` | `explore-medium` | ~~`explore-high`~~ |
|
|
41
|
-
| **Research** | `researcher-low` | `researcher` | - |
|
|
42
|
-
| **Frontend** | `designer-low` | `designer` | ~~`designer-high`~~ |
|
|
43
|
-
| **Docs** | `writer` | - | - |
|
|
44
|
-
| **Visual** | - | `vision` | - |
|
|
45
|
-
| **Planning** | - | - | `planner` (if essential) |
|
|
46
|
-
| **Critique** | - | - | `critic` (if essential) |
|
|
47
|
-
| **Testing** | - | `qa-tester` | ~~`qa-tester-high`~~ |
|
|
48
|
-
| **Security** | `security-reviewer-low` | - | ~~`security-reviewer`~~ |
|
|
49
|
-
| **Build** | `build-fixer-low` | `build-fixer` | - |
|
|
50
|
-
| **TDD** | `tdd-guide-low` | `tdd-guide` | - |
|
|
51
|
-
| **Code Review** | `code-reviewer-low` | - | ~~`code-reviewer`~~ |
|
|
52
|
-
| **Data Science** | `scientist-low` | `scientist` | ~~`scientist-high`~~ |
|
|
36
|
+
## Ecomode Routing Rules
|
|
53
37
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
| Task Complexity | Tier | Examples |
|
|
57
|
-
|-----------------|------|----------|
|
|
58
|
-
| Simple lookups | LOW | "What does this function return?", "Find where X is defined" |
|
|
59
|
-
| Standard work | LOW first, MEDIUM if fails | "Add error handling", "Implement this feature" |
|
|
60
|
-
| Complex analysis | MEDIUM | "Debug this issue", "Refactor this module" |
|
|
61
|
-
| Planning only | HIGH (if essential) | "Design architecture for new system" |
|
|
38
|
+
**ALWAYS prefer lower tiers. Only escalate when task genuinely requires it.**
|
|
62
39
|
|
|
63
|
-
|
|
40
|
+
| Decision | Rule |
|
|
41
|
+
|----------|------|
|
|
42
|
+
| DEFAULT | Use LOW tier (Haiku) for all tasks |
|
|
43
|
+
| UPGRADE | Use MEDIUM (Sonnet) only when task complexity warrants |
|
|
44
|
+
| AVOID | HIGH tier (Opus) - only for planning/critique if essential |
|
|
64
45
|
|
|
65
|
-
|
|
46
|
+
## Agent Selection in Ecomode
|
|
66
47
|
|
|
48
|
+
**FIRST ACTION:** Before delegating any work, read the agent reference file:
|
|
67
49
|
```
|
|
68
|
-
|
|
69
|
-
Task(subagent_type="oh-my-claudecode:architect-low", model="haiku", prompt="What does this function return?")
|
|
70
|
-
|
|
71
|
-
// Standard implementation → TRY LOW first
|
|
72
|
-
Task(subagent_type="oh-my-claudecode:executor-low", model="haiku", prompt="Add validation to login form")
|
|
73
|
-
|
|
74
|
-
// If LOW fails, escalate to MEDIUM
|
|
75
|
-
Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="Add error handling to login")
|
|
76
|
-
|
|
77
|
-
// File lookup → ALWAYS LOW
|
|
78
|
-
Task(subagent_type="oh-my-claudecode:explore", model="haiku", prompt="Find where UserService is defined")
|
|
79
|
-
|
|
80
|
-
// Only use MEDIUM for complex patterns
|
|
81
|
-
Task(subagent_type="oh-my-claudecode:explore-medium", model="sonnet", prompt="Find all authentication patterns in the codebase")
|
|
50
|
+
Read file: docs/shared/agent-tiers.md
|
|
82
51
|
```
|
|
52
|
+
This provides the complete agent tier matrix, MCP tool assignments, and selection guidance.
|
|
83
53
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
**YOU ARE AN ORCHESTRATOR, NOT AN IMPLEMENTER.**
|
|
87
|
-
|
|
88
|
-
| Action | YOU Do | DELEGATE |
|
|
89
|
-
|--------|--------|----------|
|
|
90
|
-
| Read files for context | ✓ | |
|
|
91
|
-
| Track progress (TODO) | ✓ | |
|
|
92
|
-
| Spawn parallel agents | ✓ | |
|
|
93
|
-
| **ANY code change** | ✗ NEVER | executor-low/executor |
|
|
94
|
-
| **UI work** | ✗ NEVER | designer-low/designer |
|
|
95
|
-
| **Docs** | ✗ NEVER | writer |
|
|
54
|
+
**Ecomode preference order:**
|
|
96
55
|
|
|
97
|
-
|
|
56
|
+
```
|
|
57
|
+
// PREFERRED - Use for most tasks
|
|
58
|
+
Task(subagent_type="oh-my-claudecode:executor-low", model="haiku", prompt="...")
|
|
59
|
+
Task(subagent_type="oh-my-claudecode:explore", model="haiku", prompt="...")
|
|
60
|
+
Task(subagent_type="oh-my-claudecode:architect-low", model="haiku", prompt="...")
|
|
98
61
|
|
|
99
|
-
|
|
62
|
+
// FALLBACK - Only if LOW fails
|
|
63
|
+
Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="...")
|
|
64
|
+
Task(subagent_type="oh-my-claudecode:architect-medium", model="sonnet", prompt="...")
|
|
100
65
|
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
- Test suites: npm test, pytest, cargo test
|
|
105
|
-
- Docker operations: docker build, docker pull
|
|
66
|
+
// AVOID - Only for planning/critique if essential
|
|
67
|
+
Task(subagent_type="oh-my-claudecode:planner", model="opus", prompt="...")
|
|
68
|
+
```
|
|
106
69
|
|
|
107
|
-
|
|
108
|
-
- Quick status checks: git status, ls, pwd
|
|
109
|
-
- File reads (NOT edits - delegate edits to executor-low)
|
|
110
|
-
- Simple commands
|
|
70
|
+
## Delegation Enforcement
|
|
111
71
|
|
|
112
|
-
|
|
72
|
+
Ecomode maintains all delegation rules from core protocol with cost-optimized routing:
|
|
113
73
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
74
|
+
| Action | Delegate To | Model |
|
|
75
|
+
|--------|-------------|-------|
|
|
76
|
+
| Code changes | executor-low / executor | haiku / sonnet |
|
|
77
|
+
| Analysis | architect-low | haiku |
|
|
78
|
+
| Search | explore | haiku |
|
|
79
|
+
| Documentation | writer | haiku |
|
|
119
80
|
|
|
120
|
-
|
|
81
|
+
### Background Execution
|
|
82
|
+
Long-running commands (install, build, test) run in background. Maximum 5 concurrent.
|
|
121
83
|
|
|
122
84
|
## Token Savings Tips
|
|
123
85
|
|
|
124
86
|
1. **Batch similar tasks** to one agent instead of spawning many
|
|
125
87
|
2. **Use explore (haiku)** for file discovery, not architect
|
|
126
88
|
3. **Prefer executor-low** for simple changes - only upgrade if it fails
|
|
127
|
-
4. **
|
|
128
|
-
5. **
|
|
129
|
-
|
|
130
|
-
## STATE CLEANUP ON COMPLETION
|
|
89
|
+
4. **Use writer (haiku)** for all documentation tasks
|
|
90
|
+
5. **Avoid opus agents** unless the task genuinely requires deep reasoning
|
|
131
91
|
|
|
132
|
-
|
|
92
|
+
## State Management
|
|
133
93
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
# Delete ecomode state files
|
|
138
|
-
rm -f .omc/state/ecomode-state.json
|
|
139
|
-
```
|
|
94
|
+
Ecomode state is tracked in `.omc/state/ecomode-state.json`.
|
|
140
95
|
|
|
141
|
-
|
|
96
|
+
When work is complete, run `/oh-my-claudecode:cancel` for clean state cleanup.
|
|
@@ -146,23 +146,81 @@ mkdir -p .claude && echo ".claude directory ready"
|
|
|
146
146
|
### Download Fresh CLAUDE.md
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
+
# Define target path
|
|
150
|
+
TARGET_PATH=".claude/CLAUDE.md"
|
|
151
|
+
|
|
149
152
|
# Extract old version before download
|
|
150
|
-
OLD_VERSION=$(grep -m1 "^# oh-my-claudecode"
|
|
153
|
+
OLD_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "none")
|
|
151
154
|
|
|
152
|
-
# Backup existing
|
|
153
|
-
if [ -f "
|
|
154
|
-
BACKUP_DATE=$(date +%Y-%m-%
|
|
155
|
-
BACKUP_PATH=".
|
|
156
|
-
cp
|
|
155
|
+
# Backup existing
|
|
156
|
+
if [ -f "$TARGET_PATH" ]; then
|
|
157
|
+
BACKUP_DATE=$(date +%Y-%m-%d_%H%M%S)
|
|
158
|
+
BACKUP_PATH="${TARGET_PATH}.backup.${BACKUP_DATE}"
|
|
159
|
+
cp "$TARGET_PATH" "$BACKUP_PATH"
|
|
157
160
|
echo "Backed up existing CLAUDE.md to $BACKUP_PATH"
|
|
158
161
|
fi
|
|
159
162
|
|
|
160
|
-
# Download fresh
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
# Download fresh OMC content to temp file
|
|
164
|
+
TEMP_OMC=$(mktemp /tmp/omc-claude-XXXXXX.md)
|
|
165
|
+
trap 'rm -f "$TEMP_OMC"' EXIT
|
|
166
|
+
curl -fsSL "https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/docs/CLAUDE.md" -o "$TEMP_OMC"
|
|
167
|
+
|
|
168
|
+
if [ ! -s "$TEMP_OMC" ]; then
|
|
169
|
+
echo "ERROR: Failed to download CLAUDE.md. Aborting."
|
|
170
|
+
rm -f "$TEMP_OMC"
|
|
171
|
+
return 1
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
# Strip existing markers from downloaded content (idempotency)
|
|
175
|
+
if grep -q '<!-- OMC:START -->' "$TEMP_OMC"; then
|
|
176
|
+
# Extract content between markers
|
|
177
|
+
sed -n '/<!-- OMC:START -->/,/<!-- OMC:END -->/{//!p}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
|
|
178
|
+
mv "${TEMP_OMC}.clean" "$TEMP_OMC"
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
if [ ! -f "$TARGET_PATH" ]; then
|
|
182
|
+
# Fresh install: wrap in markers
|
|
183
|
+
{
|
|
184
|
+
echo '<!-- OMC:START -->'
|
|
185
|
+
cat "$TEMP_OMC"
|
|
186
|
+
echo '<!-- OMC:END -->'
|
|
187
|
+
} > "$TARGET_PATH"
|
|
188
|
+
rm -f "$TEMP_OMC"
|
|
189
|
+
echo "Installed CLAUDE.md (fresh)"
|
|
190
|
+
else
|
|
191
|
+
# Merge: preserve user content outside OMC markers
|
|
192
|
+
if grep -q '<!-- OMC:START -->' "$TARGET_PATH"; then
|
|
193
|
+
# Has markers: replace OMC section, keep user content
|
|
194
|
+
BEFORE_OMC=$(sed -n '1,/<!-- OMC:START -->/{ /<!-- OMC:START -->/!p }' "$TARGET_PATH")
|
|
195
|
+
AFTER_OMC=$(sed -n '/<!-- OMC:END -->/,${ /<!-- OMC:END -->/!p }' "$TARGET_PATH")
|
|
196
|
+
{
|
|
197
|
+
[ -n "$BEFORE_OMC" ] && printf '%s\n' "$BEFORE_OMC"
|
|
198
|
+
echo '<!-- OMC:START -->'
|
|
199
|
+
cat "$TEMP_OMC"
|
|
200
|
+
echo '<!-- OMC:END -->'
|
|
201
|
+
[ -n "$AFTER_OMC" ] && printf '%s\n' "$AFTER_OMC"
|
|
202
|
+
} > "${TARGET_PATH}.tmp"
|
|
203
|
+
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
204
|
+
echo "Updated OMC section (user customizations preserved)"
|
|
205
|
+
else
|
|
206
|
+
# No markers: wrap new content in markers, append old content as user section
|
|
207
|
+
OLD_CONTENT=$(cat "$TARGET_PATH")
|
|
208
|
+
{
|
|
209
|
+
echo '<!-- OMC:START -->'
|
|
210
|
+
cat "$TEMP_OMC"
|
|
211
|
+
echo '<!-- OMC:END -->'
|
|
212
|
+
echo ""
|
|
213
|
+
echo "<!-- User customizations (migrated from previous CLAUDE.md) -->"
|
|
214
|
+
printf '%s\n' "$OLD_CONTENT"
|
|
215
|
+
} > "${TARGET_PATH}.tmp"
|
|
216
|
+
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
217
|
+
echo "Migrated existing CLAUDE.md (added OMC markers, preserved old content)"
|
|
218
|
+
fi
|
|
219
|
+
rm -f "$TEMP_OMC"
|
|
220
|
+
fi
|
|
163
221
|
|
|
164
222
|
# Extract new version and report
|
|
165
|
-
NEW_VERSION=$(grep -m1 "^# oh-my-claudecode"
|
|
223
|
+
NEW_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
|
|
166
224
|
if [ "$OLD_VERSION" = "none" ]; then
|
|
167
225
|
echo "Installed CLAUDE.md: $NEW_VERSION"
|
|
168
226
|
elif [ "$OLD_VERSION" = "$NEW_VERSION" ]; then
|
|
@@ -227,23 +285,81 @@ Do not continue to HUD setup or other steps.
|
|
|
227
285
|
### Download Fresh CLAUDE.md
|
|
228
286
|
|
|
229
287
|
```bash
|
|
288
|
+
# Define target path
|
|
289
|
+
TARGET_PATH="$HOME/.claude/CLAUDE.md"
|
|
290
|
+
|
|
230
291
|
# Extract old version before download
|
|
231
|
-
OLD_VERSION=$(grep -m1 "^# oh-my-claudecode"
|
|
292
|
+
OLD_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "none")
|
|
232
293
|
|
|
233
|
-
# Backup existing
|
|
234
|
-
if [ -f "$
|
|
235
|
-
BACKUP_DATE=$(date +%Y-%m-%
|
|
236
|
-
BACKUP_PATH="$
|
|
237
|
-
cp "$
|
|
294
|
+
# Backup existing
|
|
295
|
+
if [ -f "$TARGET_PATH" ]; then
|
|
296
|
+
BACKUP_DATE=$(date +%Y-%m-%d_%H%M%S)
|
|
297
|
+
BACKUP_PATH="${TARGET_PATH}.backup.${BACKUP_DATE}"
|
|
298
|
+
cp "$TARGET_PATH" "$BACKUP_PATH"
|
|
238
299
|
echo "Backed up existing CLAUDE.md to $BACKUP_PATH"
|
|
239
300
|
fi
|
|
240
301
|
|
|
241
|
-
# Download fresh
|
|
242
|
-
|
|
243
|
-
|
|
302
|
+
# Download fresh OMC content to temp file
|
|
303
|
+
TEMP_OMC=$(mktemp /tmp/omc-claude-XXXXXX.md)
|
|
304
|
+
trap 'rm -f "$TEMP_OMC"' EXIT
|
|
305
|
+
curl -fsSL "https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/docs/CLAUDE.md" -o "$TEMP_OMC"
|
|
306
|
+
|
|
307
|
+
if [ ! -s "$TEMP_OMC" ]; then
|
|
308
|
+
echo "ERROR: Failed to download CLAUDE.md. Aborting."
|
|
309
|
+
rm -f "$TEMP_OMC"
|
|
310
|
+
return 1
|
|
311
|
+
fi
|
|
312
|
+
|
|
313
|
+
# Strip existing markers from downloaded content (idempotency)
|
|
314
|
+
if grep -q '<!-- OMC:START -->' "$TEMP_OMC"; then
|
|
315
|
+
# Extract content between markers
|
|
316
|
+
sed -n '/<!-- OMC:START -->/,/<!-- OMC:END -->/{//!p}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
|
|
317
|
+
mv "${TEMP_OMC}.clean" "$TEMP_OMC"
|
|
318
|
+
fi
|
|
319
|
+
|
|
320
|
+
if [ ! -f "$TARGET_PATH" ]; then
|
|
321
|
+
# Fresh install: wrap in markers
|
|
322
|
+
{
|
|
323
|
+
echo '<!-- OMC:START -->'
|
|
324
|
+
cat "$TEMP_OMC"
|
|
325
|
+
echo '<!-- OMC:END -->'
|
|
326
|
+
} > "$TARGET_PATH"
|
|
327
|
+
rm -f "$TEMP_OMC"
|
|
328
|
+
echo "Installed CLAUDE.md (fresh)"
|
|
329
|
+
else
|
|
330
|
+
# Merge: preserve user content outside OMC markers
|
|
331
|
+
if grep -q '<!-- OMC:START -->' "$TARGET_PATH"; then
|
|
332
|
+
# Has markers: replace OMC section, keep user content
|
|
333
|
+
BEFORE_OMC=$(sed -n '1,/<!-- OMC:START -->/{ /<!-- OMC:START -->/!p }' "$TARGET_PATH")
|
|
334
|
+
AFTER_OMC=$(sed -n '/<!-- OMC:END -->/,${ /<!-- OMC:END -->/!p }' "$TARGET_PATH")
|
|
335
|
+
{
|
|
336
|
+
[ -n "$BEFORE_OMC" ] && printf '%s\n' "$BEFORE_OMC"
|
|
337
|
+
echo '<!-- OMC:START -->'
|
|
338
|
+
cat "$TEMP_OMC"
|
|
339
|
+
echo '<!-- OMC:END -->'
|
|
340
|
+
[ -n "$AFTER_OMC" ] && printf '%s\n' "$AFTER_OMC"
|
|
341
|
+
} > "${TARGET_PATH}.tmp"
|
|
342
|
+
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
343
|
+
echo "Updated OMC section (user customizations preserved)"
|
|
344
|
+
else
|
|
345
|
+
# No markers: wrap new content in markers, append old content as user section
|
|
346
|
+
OLD_CONTENT=$(cat "$TARGET_PATH")
|
|
347
|
+
{
|
|
348
|
+
echo '<!-- OMC:START -->'
|
|
349
|
+
cat "$TEMP_OMC"
|
|
350
|
+
echo '<!-- OMC:END -->'
|
|
351
|
+
echo ""
|
|
352
|
+
echo "<!-- User customizations (migrated from previous CLAUDE.md) -->"
|
|
353
|
+
printf '%s\n' "$OLD_CONTENT"
|
|
354
|
+
} > "${TARGET_PATH}.tmp"
|
|
355
|
+
mv "${TARGET_PATH}.tmp" "$TARGET_PATH"
|
|
356
|
+
echo "Migrated existing CLAUDE.md (added OMC markers, preserved old content)"
|
|
357
|
+
fi
|
|
358
|
+
rm -f "$TEMP_OMC"
|
|
359
|
+
fi
|
|
244
360
|
|
|
245
361
|
# Extract new version and report
|
|
246
|
-
NEW_VERSION=$(grep -m1 "^# oh-my-claudecode"
|
|
362
|
+
NEW_VERSION=$(grep -m1 "^# oh-my-claudecode" "$TARGET_PATH" 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "unknown")
|
|
247
363
|
if [ "$OLD_VERSION" = "none" ]; then
|
|
248
364
|
echo "Installed CLAUDE.md: $NEW_VERSION"
|
|
249
365
|
elif [ "$OLD_VERSION" = "$NEW_VERSION" ]; then
|
|
@@ -456,6 +572,67 @@ All functionality is available through the plugin system:
|
|
|
456
572
|
|
|
457
573
|
Skip this step - the plugin provides all features.
|
|
458
574
|
|
|
575
|
+
## Step 3.8.5: Select Task Management Tool
|
|
576
|
+
|
|
577
|
+
First, detect available task tools:
|
|
578
|
+
|
|
579
|
+
```bash
|
|
580
|
+
# Detect beads (bd)
|
|
581
|
+
BD_VERSION=""
|
|
582
|
+
if command -v bd &>/dev/null; then
|
|
583
|
+
BD_VERSION=$(bd --version 2>/dev/null | head -1 || echo "installed")
|
|
584
|
+
fi
|
|
585
|
+
|
|
586
|
+
# Detect beads-rust (br)
|
|
587
|
+
BR_VERSION=""
|
|
588
|
+
if command -v br &>/dev/null; then
|
|
589
|
+
BR_VERSION=$(br --version 2>/dev/null | head -1 || echo "installed")
|
|
590
|
+
fi
|
|
591
|
+
|
|
592
|
+
# Report findings
|
|
593
|
+
if [ -n "$BD_VERSION" ]; then
|
|
594
|
+
echo "Found beads (bd): $BD_VERSION"
|
|
595
|
+
fi
|
|
596
|
+
if [ -n "$BR_VERSION" ]; then
|
|
597
|
+
echo "Found beads-rust (br): $BR_VERSION"
|
|
598
|
+
fi
|
|
599
|
+
if [ -z "$BD_VERSION" ] && [ -z "$BR_VERSION" ]; then
|
|
600
|
+
echo "No external task tools found. Using built-in Tasks."
|
|
601
|
+
fi
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
If **neither** beads nor beads-rust is detected, skip this step (default to built-in).
|
|
605
|
+
|
|
606
|
+
If beads or beads-rust is detected, use AskUserQuestion:
|
|
607
|
+
|
|
608
|
+
**Question:** "Which task management tool should I use for tracking work?"
|
|
609
|
+
|
|
610
|
+
**Options:**
|
|
611
|
+
1. **Built-in Tasks (default)** - Use Claude Code's native TaskCreate/TodoWrite. Tasks are session-only.
|
|
612
|
+
2. **Beads (bd)** - Git-backed persistent tasks. Survives across sessions. [Only if detected]
|
|
613
|
+
3. **Beads-Rust (br)** - Lightweight Rust port of beads. [Only if detected]
|
|
614
|
+
|
|
615
|
+
(Only show options 2/3 if the corresponding tool is detected)
|
|
616
|
+
|
|
617
|
+
Store the preference:
|
|
618
|
+
|
|
619
|
+
```bash
|
|
620
|
+
CONFIG_FILE="$HOME/.claude/.omc-config.json"
|
|
621
|
+
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
622
|
+
|
|
623
|
+
if [ -f "$CONFIG_FILE" ]; then
|
|
624
|
+
EXISTING=$(cat "$CONFIG_FILE")
|
|
625
|
+
else
|
|
626
|
+
EXISTING='{}'
|
|
627
|
+
fi
|
|
628
|
+
|
|
629
|
+
# USER_CHOICE is "builtin", "beads", or "beads-rust" based on user selection
|
|
630
|
+
echo "$EXISTING" | jq --arg tool "USER_CHOICE" '. + {taskTool: $tool, taskToolConfig: {injectInstructions: true, useMcp: false}}' > "$CONFIG_FILE"
|
|
631
|
+
echo "Task tool set to: USER_CHOICE"
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
**Note:** The beads context instructions will be injected automatically on the next session start. No restart is needed for config to take effect.
|
|
635
|
+
|
|
459
636
|
## Step 4: Verify Plugin Installation
|
|
460
637
|
|
|
461
638
|
```bash
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -17,6 +17,20 @@ You guide users through planning by:
|
|
|
17
17
|
|
|
18
18
|
## Planning Modes
|
|
19
19
|
|
|
20
|
+
| Mode | Trigger | Behavior |
|
|
21
|
+
|------|---------|----------|
|
|
22
|
+
| interview | Default | Interactive requirements gathering with adaptive exploration |
|
|
23
|
+
| direct | --direct, detailed request | Skip interview, generate plan directly |
|
|
24
|
+
| consensus | --consensus, "ralplan" | Planner → Architect → Critic loop until consensus |
|
|
25
|
+
| review | --review | Critic review of existing plan |
|
|
26
|
+
|
|
27
|
+
### Review Mode
|
|
28
|
+
|
|
29
|
+
When `--review` is specified or user says "review this plan":
|
|
30
|
+
1. Read the plan file from `.omc/plans/`
|
|
31
|
+
2. Spawn Critic agent to review
|
|
32
|
+
3. Return verdict (OKAY or REJECT with improvements)
|
|
33
|
+
|
|
20
34
|
### Auto-Detection: Interview vs Direct Planning
|
|
21
35
|
|
|
22
36
|
**Interview Mode** (when request is BROAD):
|
|
@@ -53,6 +67,54 @@ Ask clarifying questions about: Goals, Constraints, Context, Risks, Preferences
|
|
|
53
67
|
|
|
54
68
|
**When plain text is OK:** Questions needing specific values (port numbers, names) or follow-up clarifications.
|
|
55
69
|
|
|
70
|
+
## Adaptive Context Gathering (CRITICAL)
|
|
71
|
+
|
|
72
|
+
Before asking ANY question, classify it:
|
|
73
|
+
|
|
74
|
+
### Question Classification
|
|
75
|
+
|
|
76
|
+
| Type | Examples | Action |
|
|
77
|
+
|------|----------|--------|
|
|
78
|
+
| **Codebase Fact** | "What patterns exist?", "Where is X implemented?" | Explore first, DON'T ask user |
|
|
79
|
+
| **User Preference** | "Priority?", "Timeline?", "Risk tolerance?" | Ask user via AskUserQuestion |
|
|
80
|
+
| **Scope Decision** | "Include feature Y?" | Ask user |
|
|
81
|
+
| **Requirement** | "Performance constraints?" | Ask user |
|
|
82
|
+
|
|
83
|
+
### Adaptive Flow
|
|
84
|
+
|
|
85
|
+
1. Generate interview question
|
|
86
|
+
2. Classify: Is this a codebase fact or user preference?
|
|
87
|
+
3. If **CODEBASE FACT**:
|
|
88
|
+
a. Spawn `explore` agent (haiku, 30s timeout)
|
|
89
|
+
b. Query: focused on the specific fact needed
|
|
90
|
+
c. Use findings to inform next question or skip question entirely
|
|
91
|
+
4. If **USER PREFERENCE**:
|
|
92
|
+
a. Use AskUserQuestion tool with options
|
|
93
|
+
b. Wait for response
|
|
94
|
+
5. Repeat for next question
|
|
95
|
+
|
|
96
|
+
### Exploration Integration
|
|
97
|
+
|
|
98
|
+
When context is gathered via explore agent:
|
|
99
|
+
- **DO NOT** ask "What patterns does the codebase use?"
|
|
100
|
+
- **DO** say "I see the codebase uses [pattern X]. Would you like to follow this pattern or try something different?"
|
|
101
|
+
|
|
102
|
+
### Example Adaptive Interview
|
|
103
|
+
|
|
104
|
+
**Without Adaptive (BAD):**
|
|
105
|
+
```
|
|
106
|
+
Planner: "Where is authentication implemented in your codebase?"
|
|
107
|
+
User: "Uh, somewhere in src/auth I think?"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**With Adaptive (GOOD):**
|
|
111
|
+
```
|
|
112
|
+
Planner: [spawns explore agent: "find authentication implementation"]
|
|
113
|
+
Planner: [receives: "Auth is in src/auth/ using JWT with passport.js"]
|
|
114
|
+
Planner: "I see you're using JWT authentication with passport.js in src/auth/.
|
|
115
|
+
For this new feature, should we extend the existing auth or add a separate auth flow?"
|
|
116
|
+
```
|
|
117
|
+
|
|
56
118
|
**MANDATORY: Single Question at a Time**
|
|
57
119
|
|
|
58
120
|
**Core Rule:** Never ask multiple questions in one message during interview mode.
|