oh-my-claude-sisyphus 3.0.11 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/agents/build-fixer-low.md +83 -0
- package/agents/build-fixer.md +160 -0
- package/agents/code-reviewer-low.md +82 -0
- package/agents/code-reviewer.md +115 -0
- package/agents/planner.md +83 -0
- package/agents/security-reviewer-low.md +83 -0
- package/agents/security-reviewer.md +186 -0
- package/agents/tdd-guide-low.md +81 -0
- package/agents/tdd-guide.md +165 -0
- package/commands/build-fix.md +55 -0
- package/commands/code-review.md +47 -0
- package/commands/ralph.md +9 -0
- package/commands/security-review.md +47 -0
- package/commands/tdd.md +54 -0
- package/dist/__tests__/hud-agents.test.js +13 -10
- package/dist/__tests__/hud-agents.test.js.map +1 -1
- package/dist/__tests__/installer.test.js +1 -1
- package/dist/cli/index.js +0 -0
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +15 -3
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +2 -1
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/ralph-loop/index.d.ts +0 -20
- package/dist/hooks/ralph-loop/index.d.ts.map +1 -1
- package/dist/hooks/ralph-loop/index.js +6 -40
- package/dist/hooks/ralph-loop/index.js.map +1 -1
- package/dist/hooks/ultrawork-state/index.d.ts +3 -1
- package/dist/hooks/ultrawork-state/index.d.ts.map +1 -1
- package/dist/hooks/ultrawork-state/index.js +3 -2
- package/dist/hooks/ultrawork-state/index.js.map +1 -1
- package/dist/hud/elements/limits.d.ts +1 -1
- package/dist/hud/elements/limits.d.ts.map +1 -1
- package/dist/hud/elements/limits.js +35 -2
- package/dist/hud/elements/limits.js.map +1 -1
- package/dist/hud/elements/todos.d.ts +1 -1
- package/dist/hud/elements/todos.js +3 -3
- package/dist/hud/elements/todos.js.map +1 -1
- package/dist/hud/render.js +6 -6
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/types.d.ts +4 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js.map +1 -1
- package/dist/hud/usage-api.d.ts.map +1 -1
- package/dist/hud/usage-api.js +32 -6
- package/dist/hud/usage-api.js.map +1 -1
- package/dist/installer/hooks.d.ts +5 -0
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +20 -0
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.js +2 -2
- package/dist/installer/index.js.map +1 -1
- package/docs/CLAUDE.md +13 -1
- package/package.json +1 -1
- package/skills/omc-setup/SKILL.md +95 -0
- package/skills/ralph/SKILL.md +9 -0
- package/skills/ultrawork/SKILL.md +9 -5
- package/dist/__tests__/learned-skills/config.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/config.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/config.test.js +0 -37
- package/dist/__tests__/learned-skills/config.test.js.map +0 -1
- package/dist/__tests__/learned-skills/detector.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/detector.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/detector.test.js +0 -99
- package/dist/__tests__/learned-skills/detector.test.js.map +0 -1
- package/dist/__tests__/learned-skills/finder.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/finder.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/finder.test.js +0 -59
- package/dist/__tests__/learned-skills/finder.test.js.map +0 -1
- package/dist/__tests__/learned-skills/loader.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/loader.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/loader.test.js +0 -69
- package/dist/__tests__/learned-skills/loader.test.js.map +0 -1
- package/dist/__tests__/learned-skills/parser.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/parser.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/parser.test.js +0 -81
- package/dist/__tests__/learned-skills/parser.test.js.map +0 -1
- package/dist/__tests__/learned-skills/validator.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/validator.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/validator.test.js +0 -85
- package/dist/__tests__/learned-skills/validator.test.js.map +0 -1
- package/dist/agents/document-writer.d.ts +0 -11
- package/dist/agents/document-writer.d.ts.map +0 -1
- package/dist/agents/document-writer.js +0 -209
- package/dist/agents/document-writer.js.map +0 -1
- package/dist/agents/frontend-engineer.d.ts +0 -11
- package/dist/agents/frontend-engineer.d.ts.map +0 -1
- package/dist/agents/frontend-engineer.js +0 -115
- package/dist/agents/frontend-engineer.js.map +0 -1
- package/dist/agents/librarian.d.ts +0 -12
- package/dist/agents/librarian.d.ts.map +0 -1
- package/dist/agents/librarian.js +0 -103
- package/dist/agents/librarian.js.map +0 -1
- package/dist/agents/metis.d.ts +0 -12
- package/dist/agents/metis.d.ts.map +0 -1
- package/dist/agents/metis.js +0 -117
- package/dist/agents/metis.js.map +0 -1
- package/dist/agents/momus.d.ts +0 -12
- package/dist/agents/momus.d.ts.map +0 -1
- package/dist/agents/momus.js +0 -128
- package/dist/agents/momus.js.map +0 -1
- package/dist/agents/multimodal-looker.d.ts +0 -11
- package/dist/agents/multimodal-looker.d.ts.map +0 -1
- package/dist/agents/multimodal-looker.js +0 -70
- package/dist/agents/multimodal-looker.js.map +0 -1
- package/dist/agents/oracle.d.ts +0 -13
- package/dist/agents/oracle.d.ts.map +0 -1
- package/dist/agents/oracle.js +0 -191
- package/dist/agents/oracle.js.map +0 -1
- package/dist/agents/orchestrator-sisyphus.d.ts +0 -11
- package/dist/agents/orchestrator-sisyphus.d.ts.map +0 -1
- package/dist/agents/orchestrator-sisyphus.js +0 -115
- package/dist/agents/orchestrator-sisyphus.js.map +0 -1
- package/dist/agents/prometheus.d.ts +0 -12
- package/dist/agents/prometheus.d.ts.map +0 -1
- package/dist/agents/prometheus.js +0 -195
- package/dist/agents/prometheus.js.map +0 -1
- package/dist/agents/sisyphus-junior.d.ts +0 -12
- package/dist/agents/sisyphus-junior.d.ts.map +0 -1
- package/dist/agents/sisyphus-junior.js +0 -93
- package/dist/agents/sisyphus-junior.js.map +0 -1
- package/dist/hooks/learned-skills/config.d.ts +0 -53
- package/dist/hooks/learned-skills/config.d.ts.map +0 -1
- package/dist/hooks/learned-skills/config.js +0 -103
- package/dist/hooks/learned-skills/config.js.map +0 -1
- package/dist/hooks/learned-skills/constants.d.ts +0 -24
- package/dist/hooks/learned-skills/constants.d.ts.map +0 -1
- package/dist/hooks/learned-skills/constants.js +0 -26
- package/dist/hooks/learned-skills/constants.js.map +0 -1
- package/dist/hooks/learned-skills/detection-hook.d.ts +0 -39
- package/dist/hooks/learned-skills/detection-hook.d.ts.map +0 -1
- package/dist/hooks/learned-skills/detection-hook.js +0 -83
- package/dist/hooks/learned-skills/detection-hook.js.map +0 -1
- package/dist/hooks/learned-skills/detector.d.ts +0 -30
- package/dist/hooks/learned-skills/detector.d.ts.map +0 -1
- package/dist/hooks/learned-skills/detector.js +0 -150
- package/dist/hooks/learned-skills/detector.js.map +0 -1
- package/dist/hooks/learned-skills/finder.d.ts +0 -21
- package/dist/hooks/learned-skills/finder.d.ts.map +0 -1
- package/dist/hooks/learned-skills/finder.js +0 -117
- package/dist/hooks/learned-skills/finder.js.map +0 -1
- package/dist/hooks/learned-skills/index.d.ts +0 -62
- package/dist/hooks/learned-skills/index.d.ts.map +0 -1
- package/dist/hooks/learned-skills/index.js +0 -137
- package/dist/hooks/learned-skills/index.js.map +0 -1
- package/dist/hooks/learned-skills/loader.d.ts +0 -20
- package/dist/hooks/learned-skills/loader.d.ts.map +0 -1
- package/dist/hooks/learned-skills/loader.js +0 -107
- package/dist/hooks/learned-skills/loader.js.map +0 -1
- package/dist/hooks/learned-skills/parser.d.ts +0 -21
- package/dist/hooks/learned-skills/parser.d.ts.map +0 -1
- package/dist/hooks/learned-skills/parser.js +0 -190
- package/dist/hooks/learned-skills/parser.js.map +0 -1
- package/dist/hooks/learned-skills/promotion.d.ts +0 -29
- package/dist/hooks/learned-skills/promotion.d.ts.map +0 -1
- package/dist/hooks/learned-skills/promotion.js +0 -87
- package/dist/hooks/learned-skills/promotion.js.map +0 -1
- package/dist/hooks/learned-skills/types.d.ts +0 -109
- package/dist/hooks/learned-skills/types.d.ts.map +0 -1
- package/dist/hooks/learned-skills/types.js +0 -8
- package/dist/hooks/learned-skills/types.js.map +0 -1
- package/dist/hooks/learned-skills/validator.d.ts +0 -15
- package/dist/hooks/learned-skills/validator.d.ts.map +0 -1
- package/dist/hooks/learned-skills/validator.js +0 -87
- package/dist/hooks/learned-skills/validator.js.map +0 -1
- package/dist/hooks/learned-skills/writer.d.ts +0 -27
- package/dist/hooks/learned-skills/writer.d.ts.map +0 -1
- package/dist/hooks/learned-skills/writer.js +0 -126
- package/dist/hooks/learned-skills/writer.js.map +0 -1
- package/dist/hooks/mnemosyne/config.d.ts +0 -53
- package/dist/hooks/mnemosyne/config.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/config.js +0 -103
- package/dist/hooks/mnemosyne/config.js.map +0 -1
- package/dist/hooks/mnemosyne/constants.d.ts +0 -24
- package/dist/hooks/mnemosyne/constants.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/constants.js +0 -26
- package/dist/hooks/mnemosyne/constants.js.map +0 -1
- package/dist/hooks/mnemosyne/detection-hook.d.ts +0 -39
- package/dist/hooks/mnemosyne/detection-hook.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/detection-hook.js +0 -83
- package/dist/hooks/mnemosyne/detection-hook.js.map +0 -1
- package/dist/hooks/mnemosyne/detector.d.ts +0 -30
- package/dist/hooks/mnemosyne/detector.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/detector.js +0 -150
- package/dist/hooks/mnemosyne/detector.js.map +0 -1
- package/dist/hooks/mnemosyne/finder.d.ts +0 -21
- package/dist/hooks/mnemosyne/finder.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/finder.js +0 -117
- package/dist/hooks/mnemosyne/finder.js.map +0 -1
- package/dist/hooks/mnemosyne/index.d.ts +0 -62
- package/dist/hooks/mnemosyne/index.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/index.js +0 -137
- package/dist/hooks/mnemosyne/index.js.map +0 -1
- package/dist/hooks/mnemosyne/loader.d.ts +0 -20
- package/dist/hooks/mnemosyne/loader.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/loader.js +0 -113
- package/dist/hooks/mnemosyne/loader.js.map +0 -1
- package/dist/hooks/mnemosyne/parser.d.ts +0 -21
- package/dist/hooks/mnemosyne/parser.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/parser.js +0 -190
- package/dist/hooks/mnemosyne/parser.js.map +0 -1
- package/dist/hooks/mnemosyne/promotion.d.ts +0 -29
- package/dist/hooks/mnemosyne/promotion.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/promotion.js +0 -87
- package/dist/hooks/mnemosyne/promotion.js.map +0 -1
- package/dist/hooks/mnemosyne/types.d.ts +0 -109
- package/dist/hooks/mnemosyne/types.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/types.js +0 -8
- package/dist/hooks/mnemosyne/types.js.map +0 -1
- package/dist/hooks/mnemosyne/validator.d.ts +0 -15
- package/dist/hooks/mnemosyne/validator.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/validator.js +0 -87
- package/dist/hooks/mnemosyne/validator.js.map +0 -1
- package/dist/hooks/mnemosyne/writer.d.ts +0 -27
- package/dist/hooks/mnemosyne/writer.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/writer.js +0 -126
- package/dist/hooks/mnemosyne/writer.js.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts +0 -23
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/constants.js +0 -142
- package/dist/hooks/sisyphus-orchestrator/constants.js.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/index.d.ts +0 -113
- package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/index.js +0 -309
- package/dist/hooks/sisyphus-orchestrator/index.js.map +0 -1
- package/dist/hud/sisyphus-state.d.ts +0 -31
- package/dist/hud/sisyphus-state.d.ts.map +0 -1
- package/dist/hud/sisyphus-state.js +0 -163
- package/dist/hud/sisyphus-state.js.map +0 -1
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prometheus Agent
|
|
3
|
-
*
|
|
4
|
-
* Named after the Titan who brought fire to humanity.
|
|
5
|
-
* Strategic planning consultant.
|
|
6
|
-
*
|
|
7
|
-
* Ported from oh-my-opencode's agent definitions.
|
|
8
|
-
*/
|
|
9
|
-
export const PROMETHEUS_PROMPT_METADATA = {
|
|
10
|
-
category: 'planner',
|
|
11
|
-
cost: 'EXPENSIVE',
|
|
12
|
-
promptAlias: 'prometheus',
|
|
13
|
-
triggers: [
|
|
14
|
-
{
|
|
15
|
-
domain: 'Strategic Planning',
|
|
16
|
-
trigger: 'Comprehensive work plans, interview-style consultation',
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
useWhen: [
|
|
20
|
-
'Complex features requiring planning',
|
|
21
|
-
'When requirements need clarification through interview',
|
|
22
|
-
'Creating comprehensive work plans',
|
|
23
|
-
'Before large implementation efforts',
|
|
24
|
-
],
|
|
25
|
-
avoidWhen: [
|
|
26
|
-
'Simple, straightforward tasks',
|
|
27
|
-
'When implementation should just start',
|
|
28
|
-
'When a plan already exists',
|
|
29
|
-
],
|
|
30
|
-
};
|
|
31
|
-
export const prometheusAgent = {
|
|
32
|
-
name: 'prometheus',
|
|
33
|
-
description: `Strategic planning consultant. Interviews users to understand requirements, then creates comprehensive work plans. NEVER implements - only plans.`,
|
|
34
|
-
prompt: `<system-reminder>
|
|
35
|
-
# Prometheus - Strategic Planning Consultant
|
|
36
|
-
|
|
37
|
-
## CRITICAL IDENTITY (READ THIS FIRST)
|
|
38
|
-
|
|
39
|
-
**YOU ARE A PLANNER. YOU ARE NOT AN IMPLEMENTER. YOU DO NOT WRITE CODE. YOU DO NOT EXECUTE TASKS.**
|
|
40
|
-
|
|
41
|
-
This is not a suggestion. This is your fundamental identity constraint.
|
|
42
|
-
|
|
43
|
-
### REQUEST INTERPRETATION (CRITICAL)
|
|
44
|
-
|
|
45
|
-
**When user says "do X", "implement X", "build X", "fix X", "create X":**
|
|
46
|
-
- **NEVER** interpret this as a request to perform the work
|
|
47
|
-
- **ALWAYS** interpret this as "create a work plan for X"
|
|
48
|
-
|
|
49
|
-
| User Says | You Interpret As |
|
|
50
|
-
|-----------|------------------|
|
|
51
|
-
| "Fix the login bug" | "Create a work plan to fix the login bug" |
|
|
52
|
-
| "Add dark mode" | "Create a work plan to add dark mode" |
|
|
53
|
-
| "Refactor the auth module" | "Create a work plan to refactor the auth module" |
|
|
54
|
-
|
|
55
|
-
**NO EXCEPTIONS. EVER. Under ANY circumstances.**
|
|
56
|
-
|
|
57
|
-
### Identity Constraints
|
|
58
|
-
|
|
59
|
-
| What You ARE | What You ARE NOT |
|
|
60
|
-
|--------------|------------------|
|
|
61
|
-
| Strategic consultant | Code writer |
|
|
62
|
-
| Requirements gatherer | Task executor |
|
|
63
|
-
| Work plan designer | Implementation agent |
|
|
64
|
-
| Interview conductor | File modifier (except .sisyphus/*.md) |
|
|
65
|
-
|
|
66
|
-
**FORBIDDEN ACTIONS:**
|
|
67
|
-
- Writing code files (.ts, .js, .py, .go, etc.)
|
|
68
|
-
- Editing source code
|
|
69
|
-
- Running implementation commands
|
|
70
|
-
- Any action that "does the work" instead of "planning the work"
|
|
71
|
-
|
|
72
|
-
**YOUR ONLY OUTPUTS:**
|
|
73
|
-
- Questions to clarify requirements
|
|
74
|
-
- Research via explore/librarian agents
|
|
75
|
-
- Work plans saved to \`.sisyphus/plans/*.md\`
|
|
76
|
-
- Drafts saved to \`.sisyphus/drafts/*.md\`
|
|
77
|
-
</system-reminder>
|
|
78
|
-
|
|
79
|
-
You are Prometheus, the strategic planning consultant. Named after the Titan who brought fire to humanity, you bring foresight and structure to complex work through thoughtful consultation.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
# PHASE 1: INTERVIEW MODE (DEFAULT)
|
|
84
|
-
|
|
85
|
-
## Step 0: Intent Classification (EVERY request)
|
|
86
|
-
|
|
87
|
-
Before diving into consultation, classify the work intent:
|
|
88
|
-
|
|
89
|
-
| Intent | Signal | Interview Focus |
|
|
90
|
-
|--------|--------|-----------------|
|
|
91
|
-
| **Trivial/Simple** | Quick fix, small change | Fast turnaround: Quick questions, propose action |
|
|
92
|
-
| **Refactoring** | "refactor", "restructure" | Safety focus: Test coverage, risk tolerance |
|
|
93
|
-
| **Build from Scratch** | New feature, greenfield | Discovery focus: Explore patterns first |
|
|
94
|
-
| **Mid-sized Task** | Scoped feature | Boundary focus: Clear deliverables, exclusions |
|
|
95
|
-
|
|
96
|
-
## When to Use Research Agents
|
|
97
|
-
|
|
98
|
-
| Situation | Action |
|
|
99
|
-
|-----------|--------|
|
|
100
|
-
| User mentions unfamiliar technology | \`librarian\`: Find official docs |
|
|
101
|
-
| User wants to modify existing code | \`explore\`: Find current implementation |
|
|
102
|
-
| User describes new feature | \`explore\`: Find similar features in codebase |
|
|
103
|
-
|
|
104
|
-
## Context-Aware Interview Mode (CRITICAL)
|
|
105
|
-
|
|
106
|
-
If you receive **PRE-GATHERED CONTEXT** from the orchestrator (look for "Pre-Gathered Codebase Context" section in your prompt):
|
|
107
|
-
|
|
108
|
-
1. **DO NOT** ask questions that the context already answers
|
|
109
|
-
2. **DO** use the context to inform your interview
|
|
110
|
-
3. **ONLY** ask questions about user preferences, NOT codebase facts
|
|
111
|
-
|
|
112
|
-
### Question Classification (Before Asking ANY Question)
|
|
113
|
-
|
|
114
|
-
| Type | Example | Ask User? |
|
|
115
|
-
|------|---------|-----------|
|
|
116
|
-
| **Codebase fact** | "What patterns exist?" | NO - use provided context |
|
|
117
|
-
| **Codebase fact** | "Where is X implemented?" | NO - use provided context |
|
|
118
|
-
| **Codebase fact** | "What's the current architecture?" | NO - use provided context |
|
|
119
|
-
| **Codebase fact** | "What files are involved?" | NO - use provided context |
|
|
120
|
-
| **Preference** | "Should we prioritize speed or quality?" | YES - ask user |
|
|
121
|
-
| **Requirement** | "What's the deadline?" | YES - ask user |
|
|
122
|
-
| **Scope** | "Should this include feature Y?" | YES - ask user |
|
|
123
|
-
| **Constraint** | "Are there performance requirements?" | YES - ask user |
|
|
124
|
-
| **Ownership** | "Who will maintain this?" | YES - ask user |
|
|
125
|
-
| **Risk tolerance** | "How much refactoring is acceptable?" | YES - ask user |
|
|
126
|
-
|
|
127
|
-
### If Context NOT Provided
|
|
128
|
-
|
|
129
|
-
If the orchestrator did NOT provide pre-gathered context:
|
|
130
|
-
1. Use \`explore\` agent yourself to gather codebase context FIRST
|
|
131
|
-
2. THEN ask only user-preference questions
|
|
132
|
-
3. **Never burden the user with questions the codebase can answer**
|
|
133
|
-
|
|
134
|
-
### Example Good vs Bad Questions
|
|
135
|
-
|
|
136
|
-
| BAD (asks user about codebase) | GOOD (asks user about preferences) |
|
|
137
|
-
|--------------------------------|-------------------------------------|
|
|
138
|
-
| "Where is auth implemented?" | "What auth method do you prefer (OAuth, JWT, session)?" |
|
|
139
|
-
| "What patterns does the codebase use?" | "What's your timeline for this feature?" |
|
|
140
|
-
| "How many files will this touch?" | "Should we prioritize backward compatibility?" |
|
|
141
|
-
| "What's the test coverage?" | "What's your risk tolerance for this change?" |
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
# PHASE 2: PLAN GENERATION TRIGGER
|
|
146
|
-
|
|
147
|
-
ONLY transition to plan generation when user says:
|
|
148
|
-
- "Make it into a work plan!"
|
|
149
|
-
- "Save it as a file"
|
|
150
|
-
- "Generate the plan" / "Create the work plan"
|
|
151
|
-
|
|
152
|
-
## Pre-Generation: Metis Consultation (MANDATORY)
|
|
153
|
-
|
|
154
|
-
**BEFORE generating the plan**, summon Metis to catch what you might have missed.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
# PHASE 3: PLAN GENERATION
|
|
159
|
-
|
|
160
|
-
## Plan Structure
|
|
161
|
-
|
|
162
|
-
Generate plan to: \`.sisyphus/plans/{name}.md\`
|
|
163
|
-
|
|
164
|
-
Include:
|
|
165
|
-
- Context (Original Request, Interview Summary, Research Findings)
|
|
166
|
-
- Work Objectives (Core Objective, Deliverables, Definition of Done)
|
|
167
|
-
- Must Have / Must NOT Have (Guardrails)
|
|
168
|
-
- Task Flow and Dependencies
|
|
169
|
-
- Detailed TODOs with acceptance criteria
|
|
170
|
-
- Commit Strategy
|
|
171
|
-
- Success Criteria
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
# BEHAVIORAL SUMMARY
|
|
176
|
-
|
|
177
|
-
| Phase | Trigger | Behavior |
|
|
178
|
-
|-------|---------|----------|
|
|
179
|
-
| **Interview Mode** | Default state | Consult, research, discuss. NO plan generation. |
|
|
180
|
-
| **Pre-Generation** | "Make it into a work plan" | Summon Metis → Ask final questions |
|
|
181
|
-
| **Plan Generation** | After pre-generation complete | Generate plan, optionally loop through Momus |
|
|
182
|
-
| **Handoff** | Plan saved | Tell user "Plan saved. Start implementing when ready." |
|
|
183
|
-
|
|
184
|
-
## Key Principles
|
|
185
|
-
|
|
186
|
-
1. **Interview First** - Understand before planning
|
|
187
|
-
2. **Research-Backed Advice** - Use agents to provide evidence-based recommendations
|
|
188
|
-
3. **User Controls Transition** - NEVER generate plan until explicitly requested
|
|
189
|
-
4. **Metis Before Plan** - Always catch gaps before committing to plan
|
|
190
|
-
5. **Clear Handoff** - Tell user the plan is ready to implement`,
|
|
191
|
-
tools: ['Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
|
192
|
-
model: 'opus',
|
|
193
|
-
metadata: PROMETHEUS_PROMPT_METADATA,
|
|
194
|
-
};
|
|
195
|
-
//# sourceMappingURL=prometheus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prometheus.js","sourceRoot":"","sources":["../../src/agents/prometheus.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,MAAM,0BAA0B,GAAwB;IAC7D,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,YAAY;IACzB,QAAQ,EAAE;QACR;YACE,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE,wDAAwD;SAClE;KACF;IACD,OAAO,EAAE;QACP,qCAAqC;QACrC,wDAAwD;QACxD,mCAAmC;QACnC,qCAAqC;KACtC;IACD,SAAS,EAAE;QACT,+BAA+B;QAC/B,uCAAuC;QACvC,4BAA4B;KAC7B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,mJAAmJ;IAChK,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEA4JsD;IAC9D,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAChD,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,0BAA0B;CACrC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sisyphus Junior Agent - Focused Task Executor
|
|
3
|
-
*
|
|
4
|
-
* Executes tasks directly without delegation capabilities.
|
|
5
|
-
* Same discipline as Sisyphus, but works alone.
|
|
6
|
-
*
|
|
7
|
-
* Ported from oh-my-opencode's sisyphus-junior agent.
|
|
8
|
-
*/
|
|
9
|
-
import type { AgentConfig, AgentPromptMetadata } from './types.js';
|
|
10
|
-
export declare const SISYPHUS_JUNIOR_PROMPT_METADATA: AgentPromptMetadata;
|
|
11
|
-
export declare const sisyphusJuniorAgent: AgentConfig;
|
|
12
|
-
//# sourceMappingURL=sisyphus-junior.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sisyphus-junior.d.ts","sourceRoot":"","sources":["../../src/agents/sisyphus-junior.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEnE,eAAO,MAAM,+BAA+B,EAAE,mBAoB7C,CAAC;AA0DF,eAAO,MAAM,mBAAmB,EAAE,WAOjC,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sisyphus Junior Agent - Focused Task Executor
|
|
3
|
-
*
|
|
4
|
-
* Executes tasks directly without delegation capabilities.
|
|
5
|
-
* Same discipline as Sisyphus, but works alone.
|
|
6
|
-
*
|
|
7
|
-
* Ported from oh-my-opencode's sisyphus-junior agent.
|
|
8
|
-
*/
|
|
9
|
-
export const SISYPHUS_JUNIOR_PROMPT_METADATA = {
|
|
10
|
-
category: 'specialist',
|
|
11
|
-
cost: 'CHEAP',
|
|
12
|
-
promptAlias: 'Junior',
|
|
13
|
-
triggers: [
|
|
14
|
-
{ domain: 'Direct implementation', trigger: 'Single-file changes, focused tasks' },
|
|
15
|
-
{ domain: 'Bug fixes', trigger: 'Clear, scoped fixes' },
|
|
16
|
-
{ domain: 'Small features', trigger: 'Well-defined, isolated work' },
|
|
17
|
-
],
|
|
18
|
-
useWhen: [
|
|
19
|
-
'Direct, focused implementation tasks',
|
|
20
|
-
'Single-file or few-file changes',
|
|
21
|
-
'When delegation overhead isn\'t worth it',
|
|
22
|
-
'Clear, well-scoped work items',
|
|
23
|
-
],
|
|
24
|
-
avoidWhen: [
|
|
25
|
-
'Multi-file refactoring (use orchestrator)',
|
|
26
|
-
'Tasks requiring research (use explore/librarian first)',
|
|
27
|
-
'Complex decisions (consult oracle)',
|
|
28
|
-
],
|
|
29
|
-
};
|
|
30
|
-
const SISYPHUS_JUNIOR_PROMPT = `<Role>
|
|
31
|
-
Sisyphus-Junior - Focused executor from OhMyOpenCode.
|
|
32
|
-
Execute tasks directly. NEVER delegate or spawn other agents.
|
|
33
|
-
</Role>
|
|
34
|
-
|
|
35
|
-
<Critical_Constraints>
|
|
36
|
-
BLOCKED ACTIONS (will fail if attempted):
|
|
37
|
-
- Task tool: BLOCKED
|
|
38
|
-
- Any agent spawning: BLOCKED
|
|
39
|
-
|
|
40
|
-
You work ALONE. No delegation. No background tasks. Execute directly.
|
|
41
|
-
</Critical_Constraints>
|
|
42
|
-
|
|
43
|
-
<Work_Context>
|
|
44
|
-
## Notepad Location (for recording learnings)
|
|
45
|
-
NOTEPAD PATH: .sisyphus/notepads/{plan-name}/
|
|
46
|
-
- learnings.md: Record patterns, conventions, successful approaches
|
|
47
|
-
- issues.md: Record problems, blockers, gotchas encountered
|
|
48
|
-
- decisions.md: Record architectural choices and rationales
|
|
49
|
-
|
|
50
|
-
You SHOULD append findings to notepad files after completing work.
|
|
51
|
-
|
|
52
|
-
## Plan Location (READ ONLY)
|
|
53
|
-
PLAN PATH: .sisyphus/plans/{plan-name}.md
|
|
54
|
-
|
|
55
|
-
⚠️⚠️⚠️ CRITICAL RULE: NEVER MODIFY THE PLAN FILE ⚠️⚠️⚠️
|
|
56
|
-
|
|
57
|
-
The plan file (.sisyphus/plans/*.md) is SACRED and READ-ONLY.
|
|
58
|
-
- You may READ the plan to understand tasks
|
|
59
|
-
- You MUST NOT edit, modify, or update the plan file
|
|
60
|
-
- Only the Orchestrator manages the plan file
|
|
61
|
-
</Work_Context>
|
|
62
|
-
|
|
63
|
-
<Todo_Discipline>
|
|
64
|
-
TODO OBSESSION (NON-NEGOTIABLE):
|
|
65
|
-
- 2+ steps → TodoWrite FIRST, atomic breakdown
|
|
66
|
-
- Mark in_progress before starting (ONE at a time)
|
|
67
|
-
- Mark completed IMMEDIATELY after each step
|
|
68
|
-
- NEVER batch completions
|
|
69
|
-
|
|
70
|
-
No todos on multi-step work = INCOMPLETE WORK.
|
|
71
|
-
</Todo_Discipline>
|
|
72
|
-
|
|
73
|
-
<Verification>
|
|
74
|
-
Task NOT complete without:
|
|
75
|
-
- lsp_diagnostics clean on changed files
|
|
76
|
-
- Build passes (if applicable)
|
|
77
|
-
- All todos marked completed
|
|
78
|
-
</Verification>
|
|
79
|
-
|
|
80
|
-
<Style>
|
|
81
|
-
- Start immediately. No acknowledgments.
|
|
82
|
-
- Match user's communication style.
|
|
83
|
-
- Dense > verbose.
|
|
84
|
-
</Style>`;
|
|
85
|
-
export const sisyphusJuniorAgent = {
|
|
86
|
-
name: 'sisyphus-junior',
|
|
87
|
-
description: 'Focused task executor. Execute tasks directly. NEVER delegate or spawn other agents. Same discipline as Sisyphus, no delegation.',
|
|
88
|
-
prompt: SISYPHUS_JUNIOR_PROMPT,
|
|
89
|
-
tools: ['Read', 'Write', 'Edit', 'Grep', 'Glob', 'Bash'],
|
|
90
|
-
model: 'sonnet',
|
|
91
|
-
metadata: SISYPHUS_JUNIOR_PROMPT_METADATA
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=sisyphus-junior.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sisyphus-junior.js","sourceRoot":"","sources":["../../src/agents/sisyphus-junior.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,MAAM,+BAA+B,GAAwB;IAClE,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE;QACR,EAAE,MAAM,EAAE,uBAAuB,EAAE,OAAO,EAAE,oCAAoC,EAAE;QAClF,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,qBAAqB,EAAE;QACvD,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,6BAA6B,EAAE;KACrE;IACD,OAAO,EAAE;QACP,sCAAsC;QACtC,iCAAiC;QACjC,0CAA0C;QAC1C,+BAA+B;KAChC;IACD,SAAS,EAAE;QACT,2CAA2C;QAC3C,wDAAwD;QACxD,oCAAoC;KACrC;CACF,CAAC;AAEF,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAsDtB,CAAC;AAEV,MAAM,CAAC,MAAM,mBAAmB,GAAgB;IAC9C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kIAAkI;IAC/I,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IACxD,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,+BAA+B;CAC1C,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claudeception Configuration
|
|
3
|
-
*
|
|
4
|
-
* Handles configuration loading and validation.
|
|
5
|
-
*/
|
|
6
|
-
export interface ClaudeceptionConfig {
|
|
7
|
-
/** Feature enabled/disabled */
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
/** Detection configuration */
|
|
10
|
-
detection: {
|
|
11
|
-
/** Enable auto-detection */
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
/** Confidence threshold for prompting (0-100) */
|
|
14
|
-
promptThreshold: number;
|
|
15
|
-
/** Cooldown between prompts (messages) */
|
|
16
|
-
promptCooldown: number;
|
|
17
|
-
};
|
|
18
|
-
/** Quality gate configuration */
|
|
19
|
-
quality: {
|
|
20
|
-
/** Minimum score to accept (0-100) */
|
|
21
|
-
minScore: number;
|
|
22
|
-
/** Minimum problem length */
|
|
23
|
-
minProblemLength: number;
|
|
24
|
-
/** Minimum solution length */
|
|
25
|
-
minSolutionLength: number;
|
|
26
|
-
};
|
|
27
|
-
/** Storage configuration */
|
|
28
|
-
storage: {
|
|
29
|
-
/** Maximum skills per scope */
|
|
30
|
-
maxSkillsPerScope: number;
|
|
31
|
-
/** Auto-prune old skills */
|
|
32
|
-
autoPrune: boolean;
|
|
33
|
-
/** Days before auto-prune (if enabled) */
|
|
34
|
-
pruneDays: number;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Load configuration from disk.
|
|
39
|
-
*/
|
|
40
|
-
export declare function loadConfig(): ClaudeceptionConfig;
|
|
41
|
-
/**
|
|
42
|
-
* Save configuration to disk.
|
|
43
|
-
*/
|
|
44
|
-
export declare function saveConfig(config: Partial<ClaudeceptionConfig>): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Get a specific config value.
|
|
47
|
-
*/
|
|
48
|
-
export declare function getConfigValue<K extends keyof ClaudeceptionConfig>(key: K): ClaudeceptionConfig[K];
|
|
49
|
-
/**
|
|
50
|
-
* Update a specific config value.
|
|
51
|
-
*/
|
|
52
|
-
export declare function setConfigValue<K extends keyof ClaudeceptionConfig>(key: K, value: ClaudeceptionConfig[K]): boolean;
|
|
53
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/hooks/learned-skills/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,8BAA8B;IAC9B,SAAS,EAAE;QACT,4BAA4B;QAC5B,OAAO,EAAE,OAAO,CAAC;QACjB,iDAAiD;QACjD,eAAe,EAAE,MAAM,CAAC;QACxB,0CAA0C;QAC1C,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,iCAAiC;IACjC,OAAO,EAAE;QACP,sCAAsC;QACtC,QAAQ,EAAE,MAAM,CAAC;QACjB,6BAA6B;QAC7B,gBAAgB,EAAE,MAAM,CAAC;QACzB,8BAA8B;QAC9B,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,4BAA4B;IAC5B,OAAO,EAAE;QACP,+BAA+B;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,4BAA4B;QAC5B,SAAS,EAAE,OAAO,CAAC;QACnB,0CAA0C;QAC1C,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAuBD;;GAEG;AACH,wBAAgB,UAAU,IAAI,mBAAmB,CAehD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAgBxE;AA0BD;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAChE,GAAG,EAAE,CAAC,GACL,mBAAmB,CAAC,CAAC,CAAC,CAGxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAChE,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC5B,OAAO,CAIT"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claudeception Configuration
|
|
3
|
-
*
|
|
4
|
-
* Handles configuration loading and validation.
|
|
5
|
-
*/
|
|
6
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
7
|
-
import { join } from 'path';
|
|
8
|
-
import { homedir } from 'os';
|
|
9
|
-
import { DEBUG_ENABLED } from './constants.js';
|
|
10
|
-
const DEFAULT_CONFIG = {
|
|
11
|
-
enabled: true,
|
|
12
|
-
detection: {
|
|
13
|
-
enabled: true,
|
|
14
|
-
promptThreshold: 60,
|
|
15
|
-
promptCooldown: 5,
|
|
16
|
-
},
|
|
17
|
-
quality: {
|
|
18
|
-
minScore: 50,
|
|
19
|
-
minProblemLength: 10,
|
|
20
|
-
minSolutionLength: 20,
|
|
21
|
-
},
|
|
22
|
-
storage: {
|
|
23
|
-
maxSkillsPerScope: 100,
|
|
24
|
-
autoPrune: false,
|
|
25
|
-
pruneDays: 90,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
const CONFIG_PATH = join(homedir(), '.claude', 'sisyphus', 'claudeception.json');
|
|
29
|
-
/**
|
|
30
|
-
* Load configuration from disk.
|
|
31
|
-
*/
|
|
32
|
-
export function loadConfig() {
|
|
33
|
-
if (!existsSync(CONFIG_PATH)) {
|
|
34
|
-
return DEFAULT_CONFIG;
|
|
35
|
-
}
|
|
36
|
-
try {
|
|
37
|
-
const content = readFileSync(CONFIG_PATH, 'utf-8');
|
|
38
|
-
const loaded = JSON.parse(content);
|
|
39
|
-
return mergeConfig(DEFAULT_CONFIG, loaded);
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
if (DEBUG_ENABLED) {
|
|
43
|
-
console.error('[learned-skills] Error loading config:', error);
|
|
44
|
-
}
|
|
45
|
-
return DEFAULT_CONFIG;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Save configuration to disk.
|
|
50
|
-
*/
|
|
51
|
-
export function saveConfig(config) {
|
|
52
|
-
const merged = mergeConfig(DEFAULT_CONFIG, config);
|
|
53
|
-
try {
|
|
54
|
-
const dir = join(homedir(), '.claude', 'sisyphus');
|
|
55
|
-
if (!existsSync(dir)) {
|
|
56
|
-
mkdirSync(dir, { recursive: true });
|
|
57
|
-
}
|
|
58
|
-
writeFileSync(CONFIG_PATH, JSON.stringify(merged, null, 2));
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
if (DEBUG_ENABLED) {
|
|
63
|
-
console.error('[learned-skills] Error saving config:', error);
|
|
64
|
-
}
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Merge partial config with defaults.
|
|
70
|
-
*/
|
|
71
|
-
function mergeConfig(defaults, partial) {
|
|
72
|
-
return {
|
|
73
|
-
enabled: partial.enabled ?? defaults.enabled,
|
|
74
|
-
detection: {
|
|
75
|
-
...defaults.detection,
|
|
76
|
-
...partial.detection,
|
|
77
|
-
},
|
|
78
|
-
quality: {
|
|
79
|
-
...defaults.quality,
|
|
80
|
-
...partial.quality,
|
|
81
|
-
},
|
|
82
|
-
storage: {
|
|
83
|
-
...defaults.storage,
|
|
84
|
-
...partial.storage,
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Get a specific config value.
|
|
90
|
-
*/
|
|
91
|
-
export function getConfigValue(key) {
|
|
92
|
-
const config = loadConfig();
|
|
93
|
-
return config[key];
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Update a specific config value.
|
|
97
|
-
*/
|
|
98
|
-
export function setConfigValue(key, value) {
|
|
99
|
-
const config = loadConfig();
|
|
100
|
-
config[key] = value;
|
|
101
|
-
return saveConfig(config);
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/hooks/learned-skills/config.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Learned Skills Constants
|
|
3
|
-
*/
|
|
4
|
-
/** User-level skills directory */
|
|
5
|
-
export declare const USER_SKILLS_DIR: string;
|
|
6
|
-
/** Project-level skills subdirectory */
|
|
7
|
-
export declare const PROJECT_SKILLS_SUBDIR = ".sisyphus/skills";
|
|
8
|
-
/** Valid skill file extension */
|
|
9
|
-
export declare const SKILL_EXTENSION = ".md";
|
|
10
|
-
/** Feature flag key for enabling/disabling */
|
|
11
|
-
export declare const FEATURE_FLAG_KEY = "claudeception.enabled";
|
|
12
|
-
/** Default feature flag value */
|
|
13
|
-
export declare const FEATURE_FLAG_DEFAULT = true;
|
|
14
|
-
/** Maximum skill content length (characters) */
|
|
15
|
-
export declare const MAX_SKILL_CONTENT_LENGTH = 4000;
|
|
16
|
-
/** Minimum quality score for auto-injection */
|
|
17
|
-
export declare const MIN_QUALITY_SCORE = 50;
|
|
18
|
-
/** Required metadata fields */
|
|
19
|
-
export declare const REQUIRED_METADATA_FIELDS: string[];
|
|
20
|
-
/** Maximum skills to inject per session */
|
|
21
|
-
export declare const MAX_SKILLS_PER_SESSION = 10;
|
|
22
|
-
/** Debug mode enabled */
|
|
23
|
-
export declare const DEBUG_ENABLED: boolean;
|
|
24
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/hooks/learned-skills/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,kCAAkC;AAClC,eAAO,MAAM,eAAe,QAA2D,CAAC;AAExF,wCAAwC;AACxC,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD,iCAAiC;AACjC,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,8CAA8C;AAC9C,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AAExD,iCAAiC;AACjC,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,gDAAgD;AAChD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,+BAA+B;AAC/B,eAAO,MAAM,wBAAwB,UAAsD,CAAC;AAE5F,2CAA2C;AAC3C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,yBAAyB;AACzB,eAAO,MAAM,aAAa,SAAqC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Learned Skills Constants
|
|
3
|
-
*/
|
|
4
|
-
import { join } from 'path';
|
|
5
|
-
import { homedir } from 'os';
|
|
6
|
-
/** User-level skills directory */
|
|
7
|
-
export const USER_SKILLS_DIR = join(homedir(), '.claude', 'skills', 'sisyphus-learned');
|
|
8
|
-
/** Project-level skills subdirectory */
|
|
9
|
-
export const PROJECT_SKILLS_SUBDIR = '.sisyphus/skills';
|
|
10
|
-
/** Valid skill file extension */
|
|
11
|
-
export const SKILL_EXTENSION = '.md';
|
|
12
|
-
/** Feature flag key for enabling/disabling */
|
|
13
|
-
export const FEATURE_FLAG_KEY = 'claudeception.enabled';
|
|
14
|
-
/** Default feature flag value */
|
|
15
|
-
export const FEATURE_FLAG_DEFAULT = true;
|
|
16
|
-
/** Maximum skill content length (characters) */
|
|
17
|
-
export const MAX_SKILL_CONTENT_LENGTH = 4000;
|
|
18
|
-
/** Minimum quality score for auto-injection */
|
|
19
|
-
export const MIN_QUALITY_SCORE = 50;
|
|
20
|
-
/** Required metadata fields */
|
|
21
|
-
export const REQUIRED_METADATA_FIELDS = ['id', 'name', 'description', 'triggers', 'source'];
|
|
22
|
-
/** Maximum skills to inject per session */
|
|
23
|
-
export const MAX_SKILLS_PER_SESSION = 10;
|
|
24
|
-
/** Debug mode enabled */
|
|
25
|
-
export const DEBUG_ENABLED = process.env.SISYPHUS_DEBUG === '1';
|
|
26
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/hooks/learned-skills/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AAExF,wCAAwC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAExD,iCAAiC;AACjC,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AAErC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAExD,iCAAiC;AACjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,gDAAgD;AAChD,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAE7C,+CAA+C;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,+BAA+B;AAC/B,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAE5F,2CAA2C;AAC3C,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,yBAAyB;AACzB,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,GAAG,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detection Hook
|
|
3
|
-
*
|
|
4
|
-
* Integrates skill detection into the message flow.
|
|
5
|
-
*/
|
|
6
|
-
import type { DetectionResult } from './detector.js';
|
|
7
|
-
/**
|
|
8
|
-
* Configuration for detection behavior.
|
|
9
|
-
*/
|
|
10
|
-
export interface DetectionConfig {
|
|
11
|
-
/** Minimum confidence to prompt (0-100) */
|
|
12
|
-
promptThreshold: number;
|
|
13
|
-
/** Cooldown between prompts (messages) */
|
|
14
|
-
promptCooldown: number;
|
|
15
|
-
/** Enable/disable auto-detection */
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Process assistant response for skill detection.
|
|
20
|
-
* Returns prompt text if extraction should be suggested, null otherwise.
|
|
21
|
-
*/
|
|
22
|
-
export declare function processResponseForDetection(assistantMessage: string, userMessage: string | undefined, sessionId: string, config?: Partial<DetectionConfig>): string | null;
|
|
23
|
-
/**
|
|
24
|
-
* Get the last detection result for a session.
|
|
25
|
-
*/
|
|
26
|
-
export declare function getLastDetection(sessionId: string): DetectionResult | null;
|
|
27
|
-
/**
|
|
28
|
-
* Clear detection state for a session.
|
|
29
|
-
*/
|
|
30
|
-
export declare function clearDetectionState(sessionId: string): void;
|
|
31
|
-
/**
|
|
32
|
-
* Get detection statistics for a session.
|
|
33
|
-
*/
|
|
34
|
-
export declare function getDetectionStats(sessionId: string): {
|
|
35
|
-
messagesSincePrompt: number;
|
|
36
|
-
promptedCount: number;
|
|
37
|
-
lastDetection: DetectionResult | null;
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=detection-hook.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detection-hook.d.ts","sourceRoot":"","sources":["../../../src/hooks/learned-skills/detection-hook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,2CAA2C;IAC3C,eAAe,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,OAAO,EAAE,OAAO,CAAC;CAClB;AAiCD;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,OAAO,CAAC,eAAe,CAAM,GACpC,MAAM,GAAG,IAAI,CA2Bf;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAE1E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG;IACpD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,eAAe,GAAG,IAAI,CAAC;CACvC,CAcA"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detection Hook
|
|
3
|
-
*
|
|
4
|
-
* Integrates skill detection into the message flow.
|
|
5
|
-
*/
|
|
6
|
-
import { detectExtractableMoment, shouldPromptExtraction, generateExtractionPrompt } from './detector.js';
|
|
7
|
-
import { isClaudeceptionEnabled } from './index.js';
|
|
8
|
-
const DEFAULT_CONFIG = {
|
|
9
|
-
promptThreshold: 60,
|
|
10
|
-
promptCooldown: 5,
|
|
11
|
-
enabled: true,
|
|
12
|
-
};
|
|
13
|
-
const sessionStates = new Map();
|
|
14
|
-
/**
|
|
15
|
-
* Get or create session state.
|
|
16
|
-
*/
|
|
17
|
-
function getSessionState(sessionId) {
|
|
18
|
-
if (!sessionStates.has(sessionId)) {
|
|
19
|
-
sessionStates.set(sessionId, {
|
|
20
|
-
messagesSincePrompt: 0,
|
|
21
|
-
lastDetection: null,
|
|
22
|
-
promptedCount: 0,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return sessionStates.get(sessionId);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Process assistant response for skill detection.
|
|
29
|
-
* Returns prompt text if extraction should be suggested, null otherwise.
|
|
30
|
-
*/
|
|
31
|
-
export function processResponseForDetection(assistantMessage, userMessage, sessionId, config = {}) {
|
|
32
|
-
const mergedConfig = { ...DEFAULT_CONFIG, ...config };
|
|
33
|
-
if (!mergedConfig.enabled || !isClaudeceptionEnabled()) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
const state = getSessionState(sessionId);
|
|
37
|
-
state.messagesSincePrompt++;
|
|
38
|
-
// Check cooldown
|
|
39
|
-
if (state.messagesSincePrompt < mergedConfig.promptCooldown) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
// Detect extractable moment
|
|
43
|
-
const detection = detectExtractableMoment(assistantMessage, userMessage);
|
|
44
|
-
state.lastDetection = detection;
|
|
45
|
-
// Check if we should prompt
|
|
46
|
-
if (shouldPromptExtraction(detection, mergedConfig.promptThreshold)) {
|
|
47
|
-
state.messagesSincePrompt = 0;
|
|
48
|
-
state.promptedCount++;
|
|
49
|
-
return generateExtractionPrompt(detection);
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Get the last detection result for a session.
|
|
55
|
-
*/
|
|
56
|
-
export function getLastDetection(sessionId) {
|
|
57
|
-
return sessionStates.get(sessionId)?.lastDetection || null;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Clear detection state for a session.
|
|
61
|
-
*/
|
|
62
|
-
export function clearDetectionState(sessionId) {
|
|
63
|
-
sessionStates.delete(sessionId);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Get detection statistics for a session.
|
|
67
|
-
*/
|
|
68
|
-
export function getDetectionStats(sessionId) {
|
|
69
|
-
const state = sessionStates.get(sessionId);
|
|
70
|
-
if (!state) {
|
|
71
|
-
return {
|
|
72
|
-
messagesSincePrompt: 0,
|
|
73
|
-
promptedCount: 0,
|
|
74
|
-
lastDetection: null,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
messagesSincePrompt: state.messagesSincePrompt,
|
|
79
|
-
promptedCount: state.promptedCount,
|
|
80
|
-
lastDetection: state.lastDetection,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=detection-hook.js.map
|