oh-my-claude-sisyphus 1.11.2 → 2.0.2
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 +37 -12
- package/dist/__tests__/example.test.d.ts +2 -0
- package/dist/__tests__/example.test.d.ts.map +1 -0
- package/dist/__tests__/example.test.js +20 -0
- package/dist/__tests__/example.test.js.map +1 -0
- package/dist/__tests__/hooks.test.d.ts +2 -0
- package/dist/__tests__/hooks.test.d.ts.map +1 -0
- package/dist/__tests__/hooks.test.js +644 -0
- package/dist/__tests__/hooks.test.js.map +1 -0
- package/dist/__tests__/installer.test.d.ts +2 -0
- package/dist/__tests__/installer.test.d.ts.map +1 -0
- package/dist/__tests__/installer.test.js +369 -0
- package/dist/__tests__/installer.test.js.map +1 -0
- package/dist/__tests__/model-routing.test.d.ts +2 -0
- package/dist/__tests__/model-routing.test.d.ts.map +1 -0
- package/dist/__tests__/model-routing.test.js +814 -0
- package/dist/__tests__/model-routing.test.js.map +1 -0
- package/dist/__tests__/skills.test.d.ts +2 -0
- package/dist/__tests__/skills.test.d.ts.map +1 -0
- package/dist/__tests__/skills.test.js +126 -0
- package/dist/__tests__/skills.test.js.map +1 -0
- package/dist/__tests__/types.test.d.ts +2 -0
- package/dist/__tests__/types.test.d.ts.map +1 -0
- package/dist/__tests__/types.test.js +77 -0
- package/dist/__tests__/types.test.js.map +1 -0
- package/dist/agents/definitions.d.ts +33 -1
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +254 -3
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +3 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/oracle.d.ts.map +1 -1
- package/dist/agents/oracle.js +43 -1
- package/dist/agents/oracle.js.map +1 -1
- package/dist/agents/orchestrator-sisyphus.js +2 -2
- package/dist/agents/orchestrator-sisyphus.js.map +1 -1
- package/dist/cli/index.js +22 -11
- package/dist/cli/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +49 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/features/auto-update.d.ts.map +1 -1
- package/dist/features/auto-update.js +14 -3
- package/dist/features/auto-update.js.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +0 -1351
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +14 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/model-routing/index.d.ts +34 -0
- package/dist/features/model-routing/index.d.ts.map +1 -0
- package/dist/features/model-routing/index.js +48 -0
- package/dist/features/model-routing/index.js.map +1 -0
- package/dist/features/model-routing/prompts/haiku.d.ts +54 -0
- package/dist/features/model-routing/prompts/haiku.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/haiku.js +141 -0
- package/dist/features/model-routing/prompts/haiku.js.map +1 -0
- package/dist/features/model-routing/prompts/index.d.ts +45 -0
- package/dist/features/model-routing/prompts/index.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/index.js +116 -0
- package/dist/features/model-routing/prompts/index.js.map +1 -0
- package/dist/features/model-routing/prompts/opus.d.ts +34 -0
- package/dist/features/model-routing/prompts/opus.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/opus.js +153 -0
- package/dist/features/model-routing/prompts/opus.js.map +1 -0
- package/dist/features/model-routing/prompts/sonnet.d.ts +38 -0
- package/dist/features/model-routing/prompts/sonnet.d.ts.map +1 -0
- package/dist/features/model-routing/prompts/sonnet.js +149 -0
- package/dist/features/model-routing/prompts/sonnet.js.map +1 -0
- package/dist/features/model-routing/router.d.ts +92 -0
- package/dist/features/model-routing/router.d.ts.map +1 -0
- package/dist/features/model-routing/router.js +267 -0
- package/dist/features/model-routing/router.js.map +1 -0
- package/dist/features/model-routing/rules.d.ts +32 -0
- package/dist/features/model-routing/rules.d.ts.map +1 -0
- package/dist/features/model-routing/rules.js +224 -0
- package/dist/features/model-routing/rules.js.map +1 -0
- package/dist/features/model-routing/scorer.d.ts +35 -0
- package/dist/features/model-routing/scorer.d.ts.map +1 -0
- package/dist/features/model-routing/scorer.js +241 -0
- package/dist/features/model-routing/scorer.js.map +1 -0
- package/dist/features/model-routing/signals.d.ts +26 -0
- package/dist/features/model-routing/signals.d.ts.map +1 -0
- package/dist/features/model-routing/signals.js +283 -0
- package/dist/features/model-routing/signals.js.map +1 -0
- package/dist/features/model-routing/types.d.ts +195 -0
- package/dist/features/model-routing/types.d.ts.map +1 -0
- package/dist/features/model-routing/types.js +86 -0
- package/dist/features/model-routing/types.js.map +1 -0
- package/dist/hooks/agent-usage-reminder/index.d.ts +1 -1
- package/dist/hooks/agent-usage-reminder/index.d.ts.map +1 -1
- package/dist/hooks/agent-usage-reminder/index.js +1 -1
- package/dist/hooks/agent-usage-reminder/index.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/auto-slash-command/index.d.ts +3 -3
- package/dist/hooks/auto-slash-command/index.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/index.js.map +1 -1
- package/dist/hooks/background-notification/index.js +1 -1
- package/dist/hooks/background-notification/index.js.map +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/comment-checker/filters.d.ts +1 -1
- package/dist/hooks/comment-checker/filters.d.ts.map +1 -1
- package/dist/hooks/comment-checker/filters.js +1 -1
- package/dist/hooks/comment-checker/filters.js.map +1 -1
- package/dist/hooks/comment-checker/index.js +1 -1
- package/dist/hooks/comment-checker/index.js.map +1 -1
- package/dist/hooks/context-window-limit-recovery/index.d.ts.map +1 -1
- package/dist/hooks/context-window-limit-recovery/index.js.map +1 -1
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/index.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 +1 -1
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
- package/dist/hooks/plugin-patterns/index.js +12 -22
- package/dist/hooks/plugin-patterns/index.js.map +1 -1
- package/dist/hooks/preemptive-compaction/index.d.ts +2 -2
- package/dist/hooks/preemptive-compaction/index.d.ts.map +1 -1
- package/dist/hooks/preemptive-compaction/index.js +1 -11
- package/dist/hooks/preemptive-compaction/index.js.map +1 -1
- package/dist/hooks/ralph-loop/index.js.map +1 -1
- package/dist/hooks/rules-injector/matcher.js +1 -1
- package/dist/hooks/rules-injector/matcher.js.map +1 -1
- package/dist/hooks/session-recovery/index.d.ts +1 -1
- package/dist/hooks/session-recovery/index.d.ts.map +1 -1
- package/dist/hooks/session-recovery/index.js +1 -1
- package/dist/hooks/session-recovery/index.js.map +1 -1
- package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +1 -1
- package/dist/hooks/sisyphus-orchestrator/index.js.map +1 -1
- package/dist/hooks/ultrawork-state/index.js +1 -1
- package/dist/hooks/ultrawork-state/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/installer/hooks.d.ts +1 -1
- package/dist/installer/hooks.js +1 -1
- package/dist/installer/index.d.ts +8 -7
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +648 -2141
- package/dist/installer/index.js.map +1 -1
- package/dist/shared/types.d.ts +25 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/tools/lsp/servers.d.ts.map +1 -1
- package/dist/tools/lsp/servers.js +2 -14
- package/dist/tools/lsp/servers.js.map +1 -1
- package/package.json +18 -10
- package/scripts/install.sh +236 -260
- package/scripts/test-pr25.sh +525 -0
- package/dist/agents/model-lists.d.ts +0 -26
- package/dist/agents/model-lists.d.ts.map +0 -1
- package/dist/agents/model-lists.js +0 -62
- package/dist/agents/model-lists.js.map +0 -1
- package/dist/auth/index.d.ts +0 -10
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -13
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/manager.d.ts +0 -54
- package/dist/auth/manager.d.ts.map +0 -1
- package/dist/auth/manager.js +0 -248
- package/dist/auth/manager.js.map +0 -1
- package/dist/auth/oauth-google.d.ts +0 -47
- package/dist/auth/oauth-google.d.ts.map +0 -1
- package/dist/auth/oauth-google.js +0 -280
- package/dist/auth/oauth-google.js.map +0 -1
- package/dist/auth/oauth-openai.d.ts +0 -46
- package/dist/auth/oauth-openai.d.ts.map +0 -1
- package/dist/auth/oauth-openai.js +0 -264
- package/dist/auth/oauth-openai.js.map +0 -1
- package/dist/auth/pkce.d.ts +0 -14
- package/dist/auth/pkce.d.ts.map +0 -1
- package/dist/auth/pkce.js +0 -35
- package/dist/auth/pkce.js.map +0 -1
- package/dist/auth/storage.d.ts +0 -52
- package/dist/auth/storage.d.ts.map +0 -1
- package/dist/auth/storage.js +0 -230
- package/dist/auth/storage.js.map +0 -1
- package/dist/auth/types.d.ts +0 -76
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js +0 -5
- package/dist/auth/types.js.map +0 -1
- package/dist/providers/index.d.ts +0 -8
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/index.js +0 -10
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/registry.d.ts +0 -29
- package/dist/providers/registry.d.ts.map +0 -1
- package/dist/providers/registry.js +0 -162
- package/dist/providers/registry.js.map +0 -1
- package/dist/providers/router.d.ts +0 -40
- package/dist/providers/router.d.ts.map +0 -1
- package/dist/providers/router.js +0 -88
- package/dist/providers/router.js.map +0 -1
- package/dist/providers/types.d.ts +0 -92
- package/dist/providers/types.d.ts.map +0 -1
- package/dist/providers/types.js +0 -27
- package/dist/providers/types.js.map +0 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opus-Optimized Prompt Adaptations
|
|
3
|
+
*
|
|
4
|
+
* Opus (HIGH tier) prompts are designed for:
|
|
5
|
+
* - Deep, nuanced reasoning
|
|
6
|
+
* - Complex multi-step analysis
|
|
7
|
+
* - Strategic thinking and planning
|
|
8
|
+
* - Handling ambiguity with sophisticated judgment
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Opus prompt prefix for enhanced reasoning
|
|
12
|
+
*/
|
|
13
|
+
export const OPUS_PROMPT_PREFIX = `<thinking_mode>deep</thinking_mode>
|
|
14
|
+
|
|
15
|
+
You are operating at the highest capability tier. Apply sophisticated reasoning:
|
|
16
|
+
|
|
17
|
+
## Reasoning Guidelines
|
|
18
|
+
- Consider multiple perspectives and edge cases
|
|
19
|
+
- Analyze second and third-order effects
|
|
20
|
+
- Weigh tradeoffs explicitly with structured analysis
|
|
21
|
+
- Surface assumptions and validate them
|
|
22
|
+
- Provide nuanced, context-aware recommendations
|
|
23
|
+
|
|
24
|
+
## Quality Standards
|
|
25
|
+
- Thorough analysis backed by evidence
|
|
26
|
+
- Clear articulation of uncertainty where present
|
|
27
|
+
- Strategic thinking with long-term implications
|
|
28
|
+
- Proactive identification of risks and mitigations
|
|
29
|
+
|
|
30
|
+
`;
|
|
31
|
+
/**
|
|
32
|
+
* Opus prompt suffix for verification
|
|
33
|
+
*/
|
|
34
|
+
export const OPUS_PROMPT_SUFFIX = `
|
|
35
|
+
|
|
36
|
+
## Before Concluding
|
|
37
|
+
- Have you considered edge cases?
|
|
38
|
+
- Are there second-order effects you haven't addressed?
|
|
39
|
+
- Have you validated your assumptions?
|
|
40
|
+
- Is your recommendation backed by the evidence gathered?
|
|
41
|
+
`;
|
|
42
|
+
/**
|
|
43
|
+
* Adapt a base prompt for Opus execution
|
|
44
|
+
*/
|
|
45
|
+
export function adaptPromptForOpus(basePrompt) {
|
|
46
|
+
return OPUS_PROMPT_PREFIX + basePrompt + OPUS_PROMPT_SUFFIX;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Opus-specific delegation template
|
|
50
|
+
*/
|
|
51
|
+
export const OPUS_DELEGATION_TEMPLATE = `## HIGH-TIER TASK DELEGATION
|
|
52
|
+
|
|
53
|
+
**Model**: Claude Opus (deep reasoning)
|
|
54
|
+
**Expectations**: Thorough analysis, strategic thinking, edge case handling
|
|
55
|
+
|
|
56
|
+
### Task
|
|
57
|
+
{TASK}
|
|
58
|
+
|
|
59
|
+
### Required Analysis Depth
|
|
60
|
+
- Consider multiple solution approaches
|
|
61
|
+
- Evaluate tradeoffs explicitly
|
|
62
|
+
- Identify potential risks and mitigations
|
|
63
|
+
- Provide clear, actionable recommendations with reasoning
|
|
64
|
+
|
|
65
|
+
### Deliverables
|
|
66
|
+
{DELIVERABLES}
|
|
67
|
+
|
|
68
|
+
### Success Criteria
|
|
69
|
+
{SUCCESS_CRITERIA}
|
|
70
|
+
|
|
71
|
+
### Context
|
|
72
|
+
{CONTEXT}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
Apply your full reasoning capabilities. Quality over speed.
|
|
76
|
+
`;
|
|
77
|
+
/**
|
|
78
|
+
* Opus debugging template
|
|
79
|
+
*/
|
|
80
|
+
export const OPUS_DEBUG_TEMPLATE = `## DEEP DEBUGGING ANALYSIS
|
|
81
|
+
|
|
82
|
+
You are the Oracle - the architectural advisor for complex debugging.
|
|
83
|
+
|
|
84
|
+
### Problem Statement
|
|
85
|
+
{PROBLEM}
|
|
86
|
+
|
|
87
|
+
### Analysis Framework
|
|
88
|
+
1. **Symptom Mapping**: What is observed vs. what is expected?
|
|
89
|
+
2. **Hypothesis Generation**: What could cause this discrepancy?
|
|
90
|
+
3. **Evidence Gathering**: What data supports/refutes each hypothesis?
|
|
91
|
+
4. **Root Cause Identification**: What is the fundamental issue?
|
|
92
|
+
5. **Solution Design**: How to fix it without introducing new problems?
|
|
93
|
+
|
|
94
|
+
### Required Output
|
|
95
|
+
- Root cause with supporting evidence
|
|
96
|
+
- Impact analysis (what else might be affected)
|
|
97
|
+
- Recommended fix with implementation details
|
|
98
|
+
- Verification strategy to confirm the fix
|
|
99
|
+
|
|
100
|
+
### Files to Examine
|
|
101
|
+
{FILES}
|
|
102
|
+
|
|
103
|
+
### Previous Attempts
|
|
104
|
+
{PREVIOUS_ATTEMPTS}
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
Be thorough. The goal is to solve this once, correctly.
|
|
108
|
+
`;
|
|
109
|
+
/**
|
|
110
|
+
* Opus architecture review template
|
|
111
|
+
*/
|
|
112
|
+
export const OPUS_ARCHITECTURE_TEMPLATE = `## ARCHITECTURAL ANALYSIS
|
|
113
|
+
|
|
114
|
+
You are providing strategic architectural guidance.
|
|
115
|
+
|
|
116
|
+
### Request
|
|
117
|
+
{REQUEST}
|
|
118
|
+
|
|
119
|
+
### Analysis Dimensions
|
|
120
|
+
1. **Current State**: What exists today?
|
|
121
|
+
2. **Desired State**: What should it become?
|
|
122
|
+
3. **Gap Analysis**: What needs to change?
|
|
123
|
+
4. **Migration Path**: How do we get there safely?
|
|
124
|
+
5. **Risk Assessment**: What could go wrong?
|
|
125
|
+
|
|
126
|
+
### Required Output Structure
|
|
127
|
+
\`\`\`
|
|
128
|
+
## Summary
|
|
129
|
+
[2-3 sentence overview]
|
|
130
|
+
|
|
131
|
+
## Current Architecture
|
|
132
|
+
[Description with file references]
|
|
133
|
+
|
|
134
|
+
## Proposed Changes
|
|
135
|
+
[Detailed recommendations]
|
|
136
|
+
|
|
137
|
+
## Tradeoffs
|
|
138
|
+
| Option | Pros | Cons | Effort |
|
|
139
|
+
|--------|------|------|--------|
|
|
140
|
+
| A | ... | ... | ... |
|
|
141
|
+
| B | ... | ... | ... |
|
|
142
|
+
|
|
143
|
+
## Implementation Plan
|
|
144
|
+
[Ordered steps with dependencies]
|
|
145
|
+
|
|
146
|
+
## Risks & Mitigations
|
|
147
|
+
[Specific risks and how to handle them]
|
|
148
|
+
\`\`\`
|
|
149
|
+
|
|
150
|
+
### Codebase Context
|
|
151
|
+
{CONTEXT}
|
|
152
|
+
`;
|
|
153
|
+
//# sourceMappingURL=opus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opus.js","sourceRoot":"","sources":["../../../../src/features/model-routing/prompts/opus.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;CAiBjC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;CAOjC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAkB;IACnD,OAAO,kBAAkB,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBvC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCzC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sonnet-Optimized Prompt Adaptations
|
|
3
|
+
*
|
|
4
|
+
* Sonnet (MEDIUM tier) prompts are designed for:
|
|
5
|
+
* - Balanced reasoning with good speed
|
|
6
|
+
* - Focused task execution
|
|
7
|
+
* - Clear deliverables with structured output
|
|
8
|
+
* - Efficient multi-step workflows
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Sonnet prompt prefix for focused execution
|
|
12
|
+
*/
|
|
13
|
+
export declare const SONNET_PROMPT_PREFIX = "## Task Execution Mode\n\nExecute this task efficiently with clear deliverables:\n\n";
|
|
14
|
+
/**
|
|
15
|
+
* Sonnet prompt suffix for verification
|
|
16
|
+
*/
|
|
17
|
+
export declare const SONNET_PROMPT_SUFFIX = "\n\n---\nFocus on delivering the requested outcome. Be thorough but efficient.\n";
|
|
18
|
+
/**
|
|
19
|
+
* Adapt a base prompt for Sonnet execution
|
|
20
|
+
*/
|
|
21
|
+
export declare function adaptPromptForSonnet(basePrompt: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Sonnet delegation template
|
|
24
|
+
*/
|
|
25
|
+
export declare const SONNET_DELEGATION_TEMPLATE = "## TASK DELEGATION\n\n**Tier**: MEDIUM (balanced)\n\n### Task\n{TASK}\n\n### Expected Outcome\n{DELIVERABLES}\n\n### Success Criteria\n{SUCCESS_CRITERIA}\n\n### Context\n{CONTEXT}\n\n### Required Tools\n{TOOLS}\n\n### Constraints\n- MUST DO: {MUST_DO}\n- MUST NOT DO: {MUST_NOT}\n\n---\nExecute efficiently. Report completion status.\n";
|
|
26
|
+
/**
|
|
27
|
+
* Sonnet implementation template
|
|
28
|
+
*/
|
|
29
|
+
export declare const SONNET_IMPLEMENTATION_TEMPLATE = "## IMPLEMENTATION TASK\n\n### What to Build\n{TASK}\n\n### Acceptance Criteria\n{CRITERIA}\n\n### Approach\n1. Read relevant files to understand patterns\n2. Plan changes before making them\n3. Implement following existing conventions\n4. Verify changes work correctly\n\n### Files to Modify\n{FILES}\n\n### Existing Patterns to Follow\n{PATTERNS}\n\n---\nMatch existing code style. Test your changes.\n";
|
|
30
|
+
/**
|
|
31
|
+
* Sonnet research template
|
|
32
|
+
*/
|
|
33
|
+
export declare const SONNET_RESEARCH_TEMPLATE = "## RESEARCH TASK\n\n### Query\n{QUERY}\n\n### Required Information\n{REQUIREMENTS}\n\n### Sources to Search\n{SOURCES}\n\n### Output Format\n```\n## Query: [restated query]\n\n## Findings\n### [Source 1]\n[Key information]\n**Reference**: [URL/file path]\n\n### [Source 2]\n[Key information]\n**Reference**: [URL/file path]\n\n## Summary\n[Synthesized answer]\n\n## Recommendations\n[Actionable next steps]\n```\n\n---\nCite sources. Provide actionable information.\n";
|
|
34
|
+
/**
|
|
35
|
+
* Sonnet frontend template
|
|
36
|
+
*/
|
|
37
|
+
export declare const SONNET_FRONTEND_TEMPLATE = "## FRONTEND TASK\n\n### Change Required\n{TASK}\n\n### Visual Expectations\n{VISUAL_REQUIREMENTS}\n\n### Technical Constraints\n- Framework: {FRAMEWORK}\n- Styling: {STYLING_APPROACH}\n- Components: {COMPONENT_PATTERNS}\n\n### Existing Patterns\n{PATTERNS}\n\n### Files to Modify\n{FILES}\n\n---\nMatch the existing aesthetic. Test in browser if applicable.\n";
|
|
38
|
+
//# sourceMappingURL=sonnet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sonnet.d.ts","sourceRoot":"","sources":["../../../../src/features/model-routing/prompts/sonnet.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,yFAIhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,qFAIhC,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,oVAyBtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,wZAsB1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,wdAiCpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,4WAqBpC,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sonnet-Optimized Prompt Adaptations
|
|
3
|
+
*
|
|
4
|
+
* Sonnet (MEDIUM tier) prompts are designed for:
|
|
5
|
+
* - Balanced reasoning with good speed
|
|
6
|
+
* - Focused task execution
|
|
7
|
+
* - Clear deliverables with structured output
|
|
8
|
+
* - Efficient multi-step workflows
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Sonnet prompt prefix for focused execution
|
|
12
|
+
*/
|
|
13
|
+
export const SONNET_PROMPT_PREFIX = `## Task Execution Mode
|
|
14
|
+
|
|
15
|
+
Execute this task efficiently with clear deliverables:
|
|
16
|
+
|
|
17
|
+
`;
|
|
18
|
+
/**
|
|
19
|
+
* Sonnet prompt suffix for verification
|
|
20
|
+
*/
|
|
21
|
+
export const SONNET_PROMPT_SUFFIX = `
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Focus on delivering the requested outcome. Be thorough but efficient.
|
|
25
|
+
`;
|
|
26
|
+
/**
|
|
27
|
+
* Adapt a base prompt for Sonnet execution
|
|
28
|
+
*/
|
|
29
|
+
export function adaptPromptForSonnet(basePrompt) {
|
|
30
|
+
return SONNET_PROMPT_PREFIX + basePrompt + SONNET_PROMPT_SUFFIX;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sonnet delegation template
|
|
34
|
+
*/
|
|
35
|
+
export const SONNET_DELEGATION_TEMPLATE = `## TASK DELEGATION
|
|
36
|
+
|
|
37
|
+
**Tier**: MEDIUM (balanced)
|
|
38
|
+
|
|
39
|
+
### Task
|
|
40
|
+
{TASK}
|
|
41
|
+
|
|
42
|
+
### Expected Outcome
|
|
43
|
+
{DELIVERABLES}
|
|
44
|
+
|
|
45
|
+
### Success Criteria
|
|
46
|
+
{SUCCESS_CRITERIA}
|
|
47
|
+
|
|
48
|
+
### Context
|
|
49
|
+
{CONTEXT}
|
|
50
|
+
|
|
51
|
+
### Required Tools
|
|
52
|
+
{TOOLS}
|
|
53
|
+
|
|
54
|
+
### Constraints
|
|
55
|
+
- MUST DO: {MUST_DO}
|
|
56
|
+
- MUST NOT DO: {MUST_NOT}
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
Execute efficiently. Report completion status.
|
|
60
|
+
`;
|
|
61
|
+
/**
|
|
62
|
+
* Sonnet implementation template
|
|
63
|
+
*/
|
|
64
|
+
export const SONNET_IMPLEMENTATION_TEMPLATE = `## IMPLEMENTATION TASK
|
|
65
|
+
|
|
66
|
+
### What to Build
|
|
67
|
+
{TASK}
|
|
68
|
+
|
|
69
|
+
### Acceptance Criteria
|
|
70
|
+
{CRITERIA}
|
|
71
|
+
|
|
72
|
+
### Approach
|
|
73
|
+
1. Read relevant files to understand patterns
|
|
74
|
+
2. Plan changes before making them
|
|
75
|
+
3. Implement following existing conventions
|
|
76
|
+
4. Verify changes work correctly
|
|
77
|
+
|
|
78
|
+
### Files to Modify
|
|
79
|
+
{FILES}
|
|
80
|
+
|
|
81
|
+
### Existing Patterns to Follow
|
|
82
|
+
{PATTERNS}
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
Match existing code style. Test your changes.
|
|
86
|
+
`;
|
|
87
|
+
/**
|
|
88
|
+
* Sonnet research template
|
|
89
|
+
*/
|
|
90
|
+
export const SONNET_RESEARCH_TEMPLATE = `## RESEARCH TASK
|
|
91
|
+
|
|
92
|
+
### Query
|
|
93
|
+
{QUERY}
|
|
94
|
+
|
|
95
|
+
### Required Information
|
|
96
|
+
{REQUIREMENTS}
|
|
97
|
+
|
|
98
|
+
### Sources to Search
|
|
99
|
+
{SOURCES}
|
|
100
|
+
|
|
101
|
+
### Output Format
|
|
102
|
+
\`\`\`
|
|
103
|
+
## Query: [restated query]
|
|
104
|
+
|
|
105
|
+
## Findings
|
|
106
|
+
### [Source 1]
|
|
107
|
+
[Key information]
|
|
108
|
+
**Reference**: [URL/file path]
|
|
109
|
+
|
|
110
|
+
### [Source 2]
|
|
111
|
+
[Key information]
|
|
112
|
+
**Reference**: [URL/file path]
|
|
113
|
+
|
|
114
|
+
## Summary
|
|
115
|
+
[Synthesized answer]
|
|
116
|
+
|
|
117
|
+
## Recommendations
|
|
118
|
+
[Actionable next steps]
|
|
119
|
+
\`\`\`
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
Cite sources. Provide actionable information.
|
|
123
|
+
`;
|
|
124
|
+
/**
|
|
125
|
+
* Sonnet frontend template
|
|
126
|
+
*/
|
|
127
|
+
export const SONNET_FRONTEND_TEMPLATE = `## FRONTEND TASK
|
|
128
|
+
|
|
129
|
+
### Change Required
|
|
130
|
+
{TASK}
|
|
131
|
+
|
|
132
|
+
### Visual Expectations
|
|
133
|
+
{VISUAL_REQUIREMENTS}
|
|
134
|
+
|
|
135
|
+
### Technical Constraints
|
|
136
|
+
- Framework: {FRAMEWORK}
|
|
137
|
+
- Styling: {STYLING_APPROACH}
|
|
138
|
+
- Components: {COMPONENT_PATTERNS}
|
|
139
|
+
|
|
140
|
+
### Existing Patterns
|
|
141
|
+
{PATTERNS}
|
|
142
|
+
|
|
143
|
+
### Files to Modify
|
|
144
|
+
{FILES}
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
Match the existing aesthetic. Test in browser if applicable.
|
|
148
|
+
`;
|
|
149
|
+
//# sourceMappingURL=sonnet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sonnet.js","sourceRoot":"","sources":["../../../../src/features/model-routing/prompts/sonnet.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;CAInC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;CAInC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAkB;IACrD,OAAO,oBAAoB,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAClE,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBzC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB7C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCvC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBvC,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model Router
|
|
3
|
+
*
|
|
4
|
+
* Main routing engine that determines which model tier to use for a given task.
|
|
5
|
+
* Combines signal extraction, scoring, and rules evaluation.
|
|
6
|
+
*/
|
|
7
|
+
import type { RoutingContext, RoutingDecision, RoutingConfig, ComplexityTier } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Route a task to the appropriate model tier
|
|
10
|
+
*/
|
|
11
|
+
export declare function routeTask(context: RoutingContext, config?: Partial<RoutingConfig>): RoutingDecision;
|
|
12
|
+
/**
|
|
13
|
+
* Escalate to a higher tier after failure
|
|
14
|
+
*/
|
|
15
|
+
export declare function escalateModel(currentTier: ComplexityTier): ComplexityTier;
|
|
16
|
+
/**
|
|
17
|
+
* Check if we can escalate further
|
|
18
|
+
*/
|
|
19
|
+
export declare function canEscalate(currentTier: ComplexityTier): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Get routing recommendation for orchestrator
|
|
22
|
+
*
|
|
23
|
+
* This is designed for PROACTIVE routing - the orchestrator (Opus) analyzes
|
|
24
|
+
* task complexity BEFORE delegation and chooses the appropriate model tier.
|
|
25
|
+
*
|
|
26
|
+
* NOT reactive escalation - the right model is chosen upfront.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getRoutingRecommendation(context: RoutingContext, config?: Partial<RoutingConfig>): RoutingDecision;
|
|
29
|
+
/**
|
|
30
|
+
* Legacy: Route with escalation support
|
|
31
|
+
* @deprecated Use getRoutingRecommendation for proactive routing instead.
|
|
32
|
+
* The orchestrator should analyze complexity upfront, not escalate reactively.
|
|
33
|
+
*/
|
|
34
|
+
export declare function routeWithEscalation(context: RoutingContext, config?: Partial<RoutingConfig>): RoutingDecision;
|
|
35
|
+
/**
|
|
36
|
+
* Get routing explanation for debugging/logging
|
|
37
|
+
*/
|
|
38
|
+
export declare function explainRouting(context: RoutingContext, config?: Partial<RoutingConfig>): string;
|
|
39
|
+
/**
|
|
40
|
+
* Quick tier lookup for known agent types
|
|
41
|
+
* Useful for cases where we don't need full signal analysis
|
|
42
|
+
*/
|
|
43
|
+
export declare function quickTierForAgent(agentType: string): ComplexityTier | null;
|
|
44
|
+
/**
|
|
45
|
+
* Check if an agent has a fixed tier (cannot be overridden)
|
|
46
|
+
*
|
|
47
|
+
* Only ORCHESTRATOR agents are fixed to Opus - they need to analyze
|
|
48
|
+
* complexity and delegate. All other agents are adaptive.
|
|
49
|
+
*
|
|
50
|
+
* NOTE: orchestrator-sisyphus was deprecated in v2.0 (merged into default mode)
|
|
51
|
+
* but kept here for backward compatibility if users still have it installed.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isFixedTierAgent(agentType: string): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Get recommended model for an agent based on task complexity
|
|
56
|
+
*
|
|
57
|
+
* This is the main entry point for orchestrator model routing.
|
|
58
|
+
* The orchestrator calls this to determine which model to use when delegating.
|
|
59
|
+
*
|
|
60
|
+
* ALL agents are adaptive EXCEPT orchestrators (which need Opus to analyze and delegate).
|
|
61
|
+
*
|
|
62
|
+
* Routing hierarchy:
|
|
63
|
+
* 1. Fixed-tier (orchestrators only) → always Opus (they analyze complexity)
|
|
64
|
+
* 2. All other agents → adaptive based on task complexity
|
|
65
|
+
*
|
|
66
|
+
* @param agentType - The agent to delegate to
|
|
67
|
+
* @param taskPrompt - The task description
|
|
68
|
+
* @returns The recommended model type ('haiku', 'sonnet', or 'opus')
|
|
69
|
+
*/
|
|
70
|
+
export declare function getModelForTask(agentType: string, taskPrompt: string, config?: Partial<RoutingConfig>): {
|
|
71
|
+
model: 'haiku' | 'sonnet' | 'opus';
|
|
72
|
+
tier: ComplexityTier;
|
|
73
|
+
reason: string;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Generate a complexity analysis summary for the orchestrator
|
|
77
|
+
*
|
|
78
|
+
* Returns a human-readable analysis explaining the routing recommendation.
|
|
79
|
+
*/
|
|
80
|
+
export declare function analyzeTaskComplexity(taskPrompt: string, agentType?: string): {
|
|
81
|
+
tier: ComplexityTier;
|
|
82
|
+
model: string;
|
|
83
|
+
analysis: string;
|
|
84
|
+
signals: {
|
|
85
|
+
wordCount: number;
|
|
86
|
+
hasArchitectureKeywords: boolean;
|
|
87
|
+
hasRiskKeywords: boolean;
|
|
88
|
+
estimatedSubtasks: number;
|
|
89
|
+
impactScope: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../src/features/model-routing/router.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACf,MAAM,YAAY,CAAC;AAUpB;;GAEG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,cAAc,EACvB,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAClC,eAAe,CAkDjB;AAqCD;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,cAAc,GAAG,cAAc,CASzE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,cAAc,GAAG,OAAO,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,cAAc,EACvB,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAClC,eAAe,CAEjB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,cAAc,EACvB,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAClC,eAAe,CAIjB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,cAAc,EACvB,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAClC,MAAM,CAkCR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAkB1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAK3D;AAGD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAClC;IAAE,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAoB9E;AAGD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,GACjB;IACD,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,uBAAuB,EAAE,OAAO,CAAC;QACjC,eAAe,EAAE,OAAO,CAAC;QACzB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CA+BA"}
|