@reinamaccredy/oh-my-opencode 1.0.1 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +4 -4
- package/README.md +11 -11
- package/README.zh-cn.md +4 -4
- package/dist/agents/metis.d.ts +1 -0
- package/dist/agents/orchestrator-sisyphus.d.ts +1 -0
- package/dist/cli/index.js +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts +3 -0
- package/dist/hooks/auto-update-checker/index.test.d.ts +1 -0
- package/dist/index.js +134 -61
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
> [!TIP]
|
|
7
7
|
>
|
|
8
|
-
> [](https://github.com/
|
|
9
|
-
> >
|
|
8
|
+
> [](https://github.com/ReinaMacCredy/oh-my-opencode/releases)
|
|
9
|
+
> > **オーケストレーターがベータ版で利用可能になりました。`@reinamaccredy/oh-my-opencode@3.0.0-beta.1`を使用してインストールしてください。**
|
|
10
10
|
>
|
|
11
11
|
> 一緒に歩みましょう!
|
|
12
12
|
>
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
<div align="center">
|
|
21
21
|
|
|
22
|
-
[](https://github.com/
|
|
22
|
+
[](https://github.com/ReinaMacCredy/oh-my-opencode#oh-my-opencode)
|
|
23
23
|
|
|
24
|
-
[](https://github.com/
|
|
24
|
+
[](https://github.com/ReinaMacCredy/oh-my-opencode#oh-my-opencode)
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
</div>
|
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
> [!TIP]
|
|
7
7
|
>
|
|
8
|
-
> [](https://github.com/
|
|
9
|
-
> > **The Orchestrator is now available in beta. Use
|
|
8
|
+
> [](https://github.com/ReinaMacCredy/oh-my-opencode/releases)
|
|
9
|
+
> > **The Orchestrator is now available in beta. Use `@reinamaccredy/oh-my-opencode@3.0.0-beta.1` to install it.**
|
|
10
10
|
>
|
|
11
11
|
> Be with us!
|
|
12
12
|
>
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
<div align="center">
|
|
21
21
|
|
|
22
|
-
[](https://github.com/
|
|
22
|
+
[](https://github.com/ReinaMacCredy/oh-my-opencode#oh-my-opencode)
|
|
23
23
|
|
|
24
|
-
[](https://github.com/
|
|
24
|
+
[](https://github.com/ReinaMacCredy/oh-my-opencode#oh-my-opencode)
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
</div>
|
|
@@ -237,9 +237,9 @@ If you don't want all this, as mentioned, you can just pick and choose specific
|
|
|
237
237
|
Run the interactive installer:
|
|
238
238
|
|
|
239
239
|
```bash
|
|
240
|
-
bunx oh-my-opencode install
|
|
240
|
+
bunx @reinamaccredy/oh-my-opencode install
|
|
241
241
|
# or use npx if bunx doesn't work
|
|
242
|
-
npx oh-my-opencode install
|
|
242
|
+
npx @reinamaccredy/oh-my-opencode install
|
|
243
243
|
```
|
|
244
244
|
|
|
245
245
|
> **Note for Ubuntu/Debian users**: If you installed Bun via Snap (`/snap/bin/bun`), `bunx` will fail with "script not found" due to Snap's sandboxing. Either use `npx` instead, or reinstall Bun via the official installer: `curl -fsSL https://bun.sh/install | bash`
|
|
@@ -250,7 +250,7 @@ Follow the prompts to configure your Claude, ChatGPT, and Gemini subscriptions.
|
|
|
250
250
|
|
|
251
251
|
Paste this into a fresh opencode session:
|
|
252
252
|
```
|
|
253
|
-
Install and configure by following the instructions here https://raw.githubusercontent.com/
|
|
253
|
+
Install and configure by following the instructions here https://raw.githubusercontent.com/ReinaMacCredy/oh-my-opencode/refs/heads/main/README.md
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
### For LLM Agents
|
|
@@ -299,13 +299,13 @@ Spawn a subagent to handle installation and report back - to save context.
|
|
|
299
299
|
Based on user's answers, run the CLI installer with appropriate flags:
|
|
300
300
|
|
|
301
301
|
```bash
|
|
302
|
-
bunx oh-my-opencode install --no-tui --claude=<yes|no|max20> --chatgpt=<yes|no> --gemini=<yes|no>
|
|
302
|
+
bunx @reinamaccredy/oh-my-opencode install --no-tui --claude=<yes|no|max20> --chatgpt=<yes|no> --gemini=<yes|no>
|
|
303
303
|
```
|
|
304
304
|
|
|
305
305
|
**Examples:**
|
|
306
|
-
- User has all subscriptions with max20: `bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes`
|
|
307
|
-
- User has only Claude (no max20): `bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no`
|
|
308
|
-
- User has no subscriptions: `bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no`
|
|
306
|
+
- User has all subscriptions with max20: `bunx @reinamaccredy/oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes`
|
|
307
|
+
- User has only Claude (no max20): `bunx @reinamaccredy/oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no`
|
|
308
|
+
- User has no subscriptions: `bunx @reinamaccredy/oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no`
|
|
309
309
|
|
|
310
310
|
The CLI will:
|
|
311
311
|
- Register the plugin in `opencode.json`
|
package/README.zh-cn.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
> [!TIP]
|
|
7
7
|
>
|
|
8
|
-
> [](https://github.com/
|
|
9
|
-
> >
|
|
8
|
+
> [](https://github.com/ReinaMacCredy/oh-my-opencode/releases)
|
|
9
|
+
> > **编排器现已推出测试版。使用`@reinamaccredy/oh-my-opencode@3.0.0-beta.1`来安装。**
|
|
10
10
|
>
|
|
11
11
|
> 与我们同行!
|
|
12
12
|
>
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
<div align="center">
|
|
21
21
|
|
|
22
|
-
[](https://github.com/
|
|
22
|
+
[](https://github.com/ReinaMacCredy/oh-my-opencode#oh-my-opencode)
|
|
23
23
|
|
|
24
|
-
[](https://github.com/
|
|
24
|
+
[](https://github.com/ReinaMacCredy/oh-my-opencode#oh-my-opencode)
|
|
25
25
|
|
|
26
26
|
</div>
|
|
27
27
|
|
package/dist/agents/metis.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ import type { AgentPromptMetadata } from "./types";
|
|
|
14
14
|
* - Prepare directives for the planner agent
|
|
15
15
|
*/
|
|
16
16
|
export declare const METIS_SYSTEM_PROMPT = "# Metis - Pre-Planning Consultant\n\n## CONSTRAINTS\n\n- **READ-ONLY**: You analyze, question, advise. You do NOT implement or modify files.\n- **OUTPUT**: Your analysis feeds into Prometheus (planner). Be actionable.\n\n---\n\n## PHASE 0: INTENT CLASSIFICATION (MANDATORY FIRST STEP)\n\nBefore ANY analysis, classify the work intent. This determines your entire strategy.\n\n### Step 1: Identify Intent Type\n\n| Intent | Signals | Your Primary Focus |\n|--------|---------|-------------------|\n| **Refactoring** | \"refactor\", \"restructure\", \"clean up\", changes to existing code | SAFETY: regression prevention, behavior preservation |\n| **Build from Scratch** | \"create new\", \"add feature\", greenfield, new module | DISCOVERY: explore patterns first, informed questions |\n| **Mid-sized Task** | Scoped feature, specific deliverable, bounded work | GUARDRAILS: exact deliverables, explicit exclusions |\n| **Collaborative** | \"help me plan\", \"let's figure out\", wants dialogue | INTERACTIVE: incremental clarity through dialogue |\n| **Architecture** | \"how should we structure\", system design, infrastructure | STRATEGIC: long-term impact, Oracle recommendation |\n| **Research** | Investigation needed, goal exists but path unclear | INVESTIGATION: exit criteria, parallel probes |\n\n### Step 2: Validate Classification\n\nConfirm:\n- [ ] Intent type is clear from request\n- [ ] If ambiguous, ASK before proceeding\n\n---\n\n## PHASE 1: INTENT-SPECIFIC ANALYSIS\n\n### IF REFACTORING\n\n**Your Mission**: Ensure zero regressions, behavior preservation.\n\n**Tool Guidance** (recommend to Prometheus):\n- `lsp_find_references`: Map all usages before changes\n- `lsp_rename` / `lsp_prepare_rename`: Safe symbol renames\n- `ast_grep_search`: Find structural patterns to preserve\n- `ast_grep_replace(dryRun=true)`: Preview transformations\n\n**Questions to Ask**:\n1. What specific behavior must be preserved? (test commands to verify)\n2. What's the rollback strategy if something breaks?\n3. Should this change propagate to related code, or stay isolated?\n\n**Directives for Prometheus**:\n- MUST: Define pre-refactor verification (exact test commands + expected outputs)\n- MUST: Verify after EACH change, not just at the end\n- MUST NOT: Change behavior while restructuring\n- MUST NOT: Refactor adjacent code not in scope\n\n---\n\n### IF BUILD FROM SCRATCH\n\n**Your Mission**: Discover patterns before asking, then surface hidden requirements.\n\n**Pre-Analysis Actions** (YOU should do before questioning):\n```\n// Launch these explore agents FIRST\ncall_omo_agent(subagent_type=\"explore\", prompt=\"Find similar implementations...\")\ncall_omo_agent(subagent_type=\"explore\", prompt=\"Find project patterns for this type...\")\ncall_omo_agent(subagent_type=\"librarian\", prompt=\"Find best practices for [technology]...\")\n```\n\n**Questions to Ask** (AFTER exploration):\n1. Found pattern X in codebase. Should new code follow this, or deviate? Why?\n2. What should explicitly NOT be built? (scope boundaries)\n3. What's the minimum viable version vs full vision?\n\n**Directives for Prometheus**:\n- MUST: Follow patterns from `[discovered file:lines]`\n- MUST: Define \"Must NOT Have\" section (AI over-engineering prevention)\n- MUST NOT: Invent new patterns when existing ones work\n- MUST NOT: Add features not explicitly requested\n\n---\n\n### IF MID-SIZED TASK\n\n**Your Mission**: Define exact boundaries. AI slop prevention is critical.\n\n**Questions to Ask**:\n1. What are the EXACT outputs? (files, endpoints, UI elements)\n2. What must NOT be included? (explicit exclusions)\n3. What are the hard boundaries? (no touching X, no changing Y)\n4. Acceptance criteria: how do we know it's done?\n\n**AI-Slop Patterns to Flag**:\n| Pattern | Example | Ask |\n|---------|---------|-----|\n| Scope inflation | \"Also tests for adjacent modules\" | \"Should I add tests beyond [TARGET]?\" |\n| Premature abstraction | \"Extracted to utility\" | \"Do you want abstraction, or inline?\" |\n| Over-validation | \"15 error checks for 3 inputs\" | \"Error handling: minimal or comprehensive?\" |\n| Documentation bloat | \"Added JSDoc everywhere\" | \"Documentation: none, minimal, or full?\" |\n\n**Directives for Prometheus**:\n- MUST: \"Must Have\" section with exact deliverables\n- MUST: \"Must NOT Have\" section with explicit exclusions\n- MUST: Per-task guardrails (what each task should NOT do)\n- MUST NOT: Exceed defined scope\n\n---\n\n### IF COLLABORATIVE\n\n**Your Mission**: Build understanding through dialogue. No rush.\n\n**Behavior**:\n1. Start with open-ended exploration questions\n2. Use explore/librarian to gather context as user provides direction\n3. Incrementally refine understanding\n4. Don't finalize until user confirms direction\n\n**Questions to Ask**:\n1. What problem are you trying to solve? (not what solution you want)\n2. What constraints exist? (time, tech stack, team skills)\n3. What trade-offs are acceptable? (speed vs quality vs cost)\n\n**Directives for Prometheus**:\n- MUST: Record all user decisions in \"Key Decisions\" section\n- MUST: Flag assumptions explicitly\n- MUST NOT: Proceed without user confirmation on major decisions\n\n---\n\n### IF ARCHITECTURE\n\n**Your Mission**: Strategic analysis. Long-term impact assessment.\n\n**Oracle Consultation** (RECOMMEND to Prometheus):\n```\nTask(\n subagent_type=\"oracle\",\n prompt=\"Architecture consultation:\n Request: [user's request]\n Current state: [gathered context]\n \n Analyze: options, trade-offs, long-term implications, risks\"\n)\n```\n\n**Questions to Ask**:\n1. What's the expected lifespan of this design?\n2. What scale/load should it handle?\n3. What are the non-negotiable constraints?\n4. What existing systems must this integrate with?\n\n**AI-Slop Guardrails for Architecture**:\n- MUST NOT: Over-engineer for hypothetical future requirements\n- MUST NOT: Add unnecessary abstraction layers\n- MUST NOT: Ignore existing patterns for \"better\" design\n- MUST: Document decisions and rationale\n\n**Directives for Prometheus**:\n- MUST: Consult Oracle before finalizing plan\n- MUST: Document architectural decisions with rationale\n- MUST: Define \"minimum viable architecture\"\n- MUST NOT: Introduce complexity without justification\n\n---\n\n### IF RESEARCH\n\n**Your Mission**: Define investigation boundaries and exit criteria.\n\n**Questions to Ask**:\n1. What's the goal of this research? (what decision will it inform?)\n2. How do we know research is complete? (exit criteria)\n3. What's the time box? (when to stop and synthesize)\n4. What outputs are expected? (report, recommendations, prototype?)\n\n**Investigation Structure**:\n```\n// Parallel probes\ncall_omo_agent(subagent_type=\"explore\", prompt=\"Find how X is currently handled...\")\ncall_omo_agent(subagent_type=\"librarian\", prompt=\"Find official docs for Y...\")\ncall_omo_agent(subagent_type=\"librarian\", prompt=\"Find OSS implementations of Z...\")\n```\n\n**Directives for Prometheus**:\n- MUST: Define clear exit criteria\n- MUST: Specify parallel investigation tracks\n- MUST: Define synthesis format (how to present findings)\n- MUST NOT: Research indefinitely without convergence\n\n---\n\n## OUTPUT FORMAT\n\n```markdown\n## Intent Classification\n**Type**: [Refactoring | Build | Mid-sized | Collaborative | Architecture | Research]\n**Confidence**: [High | Medium | Low]\n**Rationale**: [Why this classification]\n\n## Pre-Analysis Findings\n[Results from explore/librarian agents if launched]\n[Relevant codebase patterns discovered]\n\n## Questions for User\n1. [Most critical question first]\n2. [Second priority]\n3. [Third priority]\n\n## Identified Risks\n- [Risk 1]: [Mitigation]\n- [Risk 2]: [Mitigation]\n\n## Directives for Prometheus\n- MUST: [Required action]\n- MUST: [Required action]\n- MUST NOT: [Forbidden action]\n- MUST NOT: [Forbidden action]\n- PATTERN: Follow `[file:lines]`\n- TOOL: Use `[specific tool]` for [purpose]\n\n## Recommended Approach\n[1-2 sentence summary of how to proceed]\n```\n\n---\n\n## TOOL REFERENCE\n\n| Tool | When to Use | Intent |\n|------|-------------|--------|\n| `lsp_find_references` | Map impact before changes | Refactoring |\n| `lsp_rename` | Safe symbol renames | Refactoring |\n| `ast_grep_search` | Find structural patterns | Refactoring, Build |\n| `explore` agent | Codebase pattern discovery | Build, Research |\n| `librarian` agent | External docs, best practices | Build, Architecture, Research |\n| `oracle` agent | Read-only consultation. High-IQ debugging, architecture | Architecture |\n\n---\n\n## CRITICAL RULES\n\n**NEVER**:\n- Skip intent classification\n- Ask generic questions (\"What's the scope?\")\n- Proceed without addressing ambiguity\n- Make assumptions about user's codebase\n\n**ALWAYS**:\n- Classify intent FIRST\n- Be specific (\"Should this change UserService only, or also AuthService?\")\n- Explore before asking (for Build/Research intents)\n- Provide actionable directives for Prometheus\n";
|
|
17
|
+
export declare function createMetisAgent(model?: string): AgentConfig;
|
|
17
18
|
export declare const metisAgent: AgentConfig;
|
|
18
19
|
export declare const metisPromptMetadata: AgentPromptMetadata;
|
|
@@ -9,6 +9,7 @@ import type { CategoryConfig } from "../config/schema";
|
|
|
9
9
|
* You are the conductor of a symphony of specialized agents.
|
|
10
10
|
*/
|
|
11
11
|
export interface OrchestratorContext {
|
|
12
|
+
model?: string;
|
|
12
13
|
availableAgents?: AvailableAgent[];
|
|
13
14
|
availableSkills?: AvailableSkill[];
|
|
14
15
|
userCategories?: Record<string, CategoryConfig>;
|
package/dist/cli/index.js
CHANGED
|
@@ -2253,7 +2253,7 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
2253
2253
|
var require_package = __commonJS((exports, module) => {
|
|
2254
2254
|
module.exports = {
|
|
2255
2255
|
name: "@reinamaccredy/oh-my-opencode",
|
|
2256
|
-
version: "
|
|
2256
|
+
version: "3.0.0-beta.1",
|
|
2257
2257
|
description: "Fork of oh-my-opencode with Maestro workflow integration - Multi-Model Orchestration, Parallel Background Agents, Design Phases, and TDD Methodology",
|
|
2258
2258
|
main: "dist/index.js",
|
|
2259
2259
|
types: "dist/index.d.ts",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { AutoUpdateCheckerOptions } from "./types";
|
|
3
|
+
export declare function isPrereleaseVersion(version: string): boolean;
|
|
4
|
+
export declare function isDistTag(version: string): boolean;
|
|
5
|
+
export declare function isPrereleaseOrDistTag(pinnedVersion: string | null): boolean;
|
|
3
6
|
export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?: AutoUpdateCheckerOptions): {
|
|
4
7
|
event: ({ event }: {
|
|
5
8
|
event: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -19567,6 +19567,18 @@ async function runBunInstallWithDetails() {
|
|
|
19567
19567
|
|
|
19568
19568
|
// src/hooks/auto-update-checker/index.ts
|
|
19569
19569
|
var SISYPHUS_SPINNER = ["\xB7", "\u2022", "\u25CF", "\u25CB", "\u25CC", "\u25E6", " "];
|
|
19570
|
+
function isPrereleaseVersion(version) {
|
|
19571
|
+
return version.includes("-");
|
|
19572
|
+
}
|
|
19573
|
+
function isDistTag(version) {
|
|
19574
|
+
const startsWithDigit = /^\d/.test(version);
|
|
19575
|
+
return !startsWithDigit;
|
|
19576
|
+
}
|
|
19577
|
+
function isPrereleaseOrDistTag(pinnedVersion) {
|
|
19578
|
+
if (!pinnedVersion)
|
|
19579
|
+
return false;
|
|
19580
|
+
return isPrereleaseVersion(pinnedVersion) || isDistTag(pinnedVersion);
|
|
19581
|
+
}
|
|
19570
19582
|
function createAutoUpdateCheckerHook(ctx, options = {}) {
|
|
19571
19583
|
const { showStartupToast = true, isSisyphusEnabled = false, autoUpdate = true } = options;
|
|
19572
19584
|
const getToastMessage = (isUpdate, latestVersion) => {
|
|
@@ -19637,7 +19649,15 @@ async function runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage) {
|
|
|
19637
19649
|
log("[auto-update-checker] Auto-update disabled, notification only");
|
|
19638
19650
|
return;
|
|
19639
19651
|
}
|
|
19652
|
+
if (isPrereleaseVersion(currentVersion)) {
|
|
19653
|
+
log(`[auto-update-checker] Skipping auto-update for prerelease version: ${currentVersion}`);
|
|
19654
|
+
return;
|
|
19655
|
+
}
|
|
19640
19656
|
if (pluginInfo.isPinned) {
|
|
19657
|
+
if (isPrereleaseOrDistTag(pluginInfo.pinnedVersion)) {
|
|
19658
|
+
log(`[auto-update-checker] Skipping auto-update for prerelease/dist-tag: ${pluginInfo.pinnedVersion}`);
|
|
19659
|
+
return;
|
|
19660
|
+
}
|
|
19641
19661
|
const updated = updatePinnedVersion(pluginInfo.configPath, pluginInfo.entry, latestVersion);
|
|
19642
19662
|
if (!updated) {
|
|
19643
19663
|
await showUpdateAvailableToast(ctx, latestVersion, getToastMessage);
|
|
@@ -19755,6 +19775,8 @@ var TARGET_TOOLS = new Set([
|
|
|
19755
19775
|
"safe_glob",
|
|
19756
19776
|
"webfetch",
|
|
19757
19777
|
"context7_resolve-library-id",
|
|
19778
|
+
"context7_query-docs",
|
|
19779
|
+
"websearch_web_search_exa",
|
|
19758
19780
|
"context7_get-library-docs",
|
|
19759
19781
|
"grep_app_searchgithub"
|
|
19760
19782
|
]);
|
|
@@ -50227,7 +50249,7 @@ function createOracleAgent(model = DEFAULT_MODEL2) {
|
|
|
50227
50249
|
var oracleAgent = createOracleAgent();
|
|
50228
50250
|
|
|
50229
50251
|
// src/agents/librarian.ts
|
|
50230
|
-
var DEFAULT_MODEL3 = "
|
|
50252
|
+
var DEFAULT_MODEL3 = "anthropic/claude-sonnet-4-5";
|
|
50231
50253
|
var LIBRARIAN_PROMPT_METADATA = {
|
|
50232
50254
|
category: "exploration",
|
|
50233
50255
|
cost: "CHEAP",
|
|
@@ -50245,24 +50267,17 @@ var LIBRARIAN_PROMPT_METADATA = {
|
|
|
50245
50267
|
]
|
|
50246
50268
|
};
|
|
50247
50269
|
function createLibrarianAgent(model = DEFAULT_MODEL3) {
|
|
50248
|
-
const restrictions = createAgentToolRestrictions([
|
|
50249
|
-
"write",
|
|
50250
|
-
"edit",
|
|
50251
|
-
"task",
|
|
50252
|
-
"sisyphus_task",
|
|
50253
|
-
"call_omo_agent"
|
|
50254
|
-
]);
|
|
50255
50270
|
return {
|
|
50256
50271
|
description: "Specialized codebase understanding agent for multi-repository analysis, searching remote codebases, retrieving official documentation, and finding implementation examples using GitHub CLI, Context7, and Web Search. MUST BE USED when users ask to look up code in remote repositories, explain library internals, or find usage examples in open source.",
|
|
50257
50272
|
mode: "subagent",
|
|
50258
50273
|
model,
|
|
50259
50274
|
temperature: 0.1,
|
|
50260
|
-
|
|
50275
|
+
tools: { write: false, edit: false, background_task: false },
|
|
50261
50276
|
prompt: `# THE LIBRARIAN
|
|
50262
50277
|
|
|
50263
50278
|
You are **THE LIBRARIAN**, a specialized open-source codebase understanding agent.
|
|
50264
50279
|
|
|
50265
|
-
Your job: Answer questions about open-source libraries
|
|
50280
|
+
Your job: Answer questions about open-source libraries by finding **EVIDENCE** with **GitHub permalinks**.
|
|
50266
50281
|
|
|
50267
50282
|
## CRITICAL: DATE AWARENESS
|
|
50268
50283
|
|
|
@@ -50274,20 +50289,64 @@ Your job: Answer questions about open-source libraries. Provide **EVIDENCE** wit
|
|
|
50274
50289
|
|
|
50275
50290
|
---
|
|
50276
50291
|
|
|
50277
|
-
## PHASE 0:
|
|
50278
|
-
|
|
50279
|
-
**First**: Can you answer confidently from training knowledge? If yes, answer directly.
|
|
50280
|
-
|
|
50281
|
-
**Search when**: version-specific info, implementation internals, recent changes, unfamiliar libraries, user explicitly requests source/examples.
|
|
50292
|
+
## PHASE 0: REQUEST CLASSIFICATION (MANDATORY FIRST STEP)
|
|
50282
50293
|
|
|
50283
|
-
|
|
50294
|
+
Classify EVERY request into one of these categories before taking action:
|
|
50284
50295
|
|
|
50285
50296
|
| Type | Trigger Examples | Tools |
|
|
50286
50297
|
|------|------------------|-------|
|
|
50287
|
-
| **TYPE A: CONCEPTUAL** | "How do I use X?", "Best practice for Y?" |
|
|
50298
|
+
| **TYPE A: CONCEPTUAL** | "How do I use X?", "Best practice for Y?" | Doc Discovery \u2192 context7 + websearch |
|
|
50288
50299
|
| **TYPE B: IMPLEMENTATION** | "How does X implement Y?", "Show me source of Z" | gh clone + read + blame |
|
|
50289
|
-
| **TYPE C: CONTEXT** | "Why was this changed?", "
|
|
50290
|
-
| **TYPE D: COMPREHENSIVE** | Complex/ambiguous requests |
|
|
50300
|
+
| **TYPE C: CONTEXT** | "Why was this changed?", "History of X?" | gh issues/prs + git log/blame |
|
|
50301
|
+
| **TYPE D: COMPREHENSIVE** | Complex/ambiguous requests | Doc Discovery \u2192 ALL tools |
|
|
50302
|
+
|
|
50303
|
+
---
|
|
50304
|
+
|
|
50305
|
+
## PHASE 0.5: DOCUMENTATION DISCOVERY (FOR TYPE A & D)
|
|
50306
|
+
|
|
50307
|
+
**When to execute**: Before TYPE A or TYPE D investigations involving external libraries/frameworks.
|
|
50308
|
+
|
|
50309
|
+
### Step 1: Find Official Documentation
|
|
50310
|
+
\`\`\`
|
|
50311
|
+
websearch("library-name official documentation site")
|
|
50312
|
+
\`\`\`
|
|
50313
|
+
- Identify the **official documentation URL** (not blogs, not tutorials)
|
|
50314
|
+
- Note the base URL (e.g., \`https://docs.example.com\`)
|
|
50315
|
+
|
|
50316
|
+
### Step 2: Version Check (if version specified)
|
|
50317
|
+
If user mentions a specific version (e.g., "React 18", "Next.js 14", "v2.x"):
|
|
50318
|
+
\`\`\`
|
|
50319
|
+
websearch("library-name v{version} documentation")
|
|
50320
|
+
// OR check if docs have version selector:
|
|
50321
|
+
webfetch(official_docs_url + "/versions")
|
|
50322
|
+
// or
|
|
50323
|
+
webfetch(official_docs_url + "/v{version}")
|
|
50324
|
+
\`\`\`
|
|
50325
|
+
- Confirm you're looking at the **correct version's documentation**
|
|
50326
|
+
- Many docs have versioned URLs: \`/docs/v2/\`, \`/v14/\`, etc.
|
|
50327
|
+
|
|
50328
|
+
### Step 3: Sitemap Discovery (understand doc structure)
|
|
50329
|
+
\`\`\`
|
|
50330
|
+
webfetch(official_docs_base_url + "/sitemap.xml")
|
|
50331
|
+
// Fallback options:
|
|
50332
|
+
webfetch(official_docs_base_url + "/sitemap-0.xml")
|
|
50333
|
+
webfetch(official_docs_base_url + "/docs/sitemap.xml")
|
|
50334
|
+
\`\`\`
|
|
50335
|
+
- Parse sitemap to understand documentation structure
|
|
50336
|
+
- Identify relevant sections for the user's question
|
|
50337
|
+
- This prevents random searching\u2014you now know WHERE to look
|
|
50338
|
+
|
|
50339
|
+
### Step 4: Targeted Investigation
|
|
50340
|
+
With sitemap knowledge, fetch the SPECIFIC documentation pages relevant to the query:
|
|
50341
|
+
\`\`\`
|
|
50342
|
+
webfetch(specific_doc_page_from_sitemap)
|
|
50343
|
+
context7_query-docs(libraryId: id, query: "specific topic")
|
|
50344
|
+
\`\`\`
|
|
50345
|
+
|
|
50346
|
+
**Skip Doc Discovery when**:
|
|
50347
|
+
- TYPE B (implementation) - you're cloning repos anyway
|
|
50348
|
+
- TYPE C (context/history) - you're looking at issues/PRs
|
|
50349
|
+
- Library has no official docs (rare OSS projects)
|
|
50291
50350
|
|
|
50292
50351
|
---
|
|
50293
50352
|
|
|
@@ -50296,15 +50355,15 @@ Your job: Answer questions about open-source libraries. Provide **EVIDENCE** wit
|
|
|
50296
50355
|
### TYPE A: CONCEPTUAL QUESTION
|
|
50297
50356
|
**Trigger**: "How do I...", "What is...", "Best practice for...", rough/general questions
|
|
50298
50357
|
|
|
50299
|
-
**
|
|
50358
|
+
**Execute Documentation Discovery FIRST (Phase 0.5)**, then:
|
|
50300
50359
|
\`\`\`
|
|
50301
50360
|
Tool 1: context7_resolve-library-id("library-name")
|
|
50302
|
-
\u2192 then
|
|
50303
|
-
Tool 2:
|
|
50304
|
-
Tool 3 (
|
|
50361
|
+
\u2192 then context7_query-docs(libraryId: id, query: "specific-topic")
|
|
50362
|
+
Tool 2: webfetch(relevant_pages_from_sitemap) // Targeted, not random
|
|
50363
|
+
Tool 3: grep_app_searchGitHub(query: "usage pattern", language: ["TypeScript"])
|
|
50305
50364
|
\`\`\`
|
|
50306
50365
|
|
|
50307
|
-
**Output**: Summarize findings with links to official docs and real-world examples.
|
|
50366
|
+
**Output**: Summarize findings with links to official docs (versioned if applicable) and real-world examples.
|
|
50308
50367
|
|
|
50309
50368
|
---
|
|
50310
50369
|
|
|
@@ -50328,7 +50387,7 @@ Step 4: Construct permalink
|
|
|
50328
50387
|
https://github.com/owner/repo/blob/<sha>/path/to/file#L10-L20
|
|
50329
50388
|
\`\`\`
|
|
50330
50389
|
|
|
50331
|
-
**
|
|
50390
|
+
**Parallel acceleration (4+ calls)**:
|
|
50332
50391
|
\`\`\`
|
|
50333
50392
|
Tool 1: gh repo clone owner/repo \${TMPDIR:-/tmp}/repo -- --depth 1
|
|
50334
50393
|
Tool 2: grep_app_searchGitHub(query: "function_name", repo: "owner/repo")
|
|
@@ -50341,7 +50400,7 @@ Tool 4: context7_get-library-docs(id, topic: "relevant-api")
|
|
|
50341
50400
|
### TYPE C: CONTEXT & HISTORY
|
|
50342
50401
|
**Trigger**: "Why was this changed?", "What's the history?", "Related issues/PRs?"
|
|
50343
50402
|
|
|
50344
|
-
**
|
|
50403
|
+
**Execute in parallel (4+ calls)**:
|
|
50345
50404
|
\`\`\`
|
|
50346
50405
|
Tool 1: gh search issues "keyword" --repo owner/repo --state all --limit 10
|
|
50347
50406
|
Tool 2: gh search prs "keyword" --repo owner/repo --state merged --limit 10
|
|
@@ -50363,22 +50422,21 @@ gh api repos/owner/repo/pulls/<number>/files
|
|
|
50363
50422
|
### TYPE D: COMPREHENSIVE RESEARCH
|
|
50364
50423
|
**Trigger**: Complex questions, ambiguous requests, "deep dive into..."
|
|
50365
50424
|
|
|
50366
|
-
**
|
|
50425
|
+
**Execute Documentation Discovery FIRST (Phase 0.5)**, then execute in parallel (6+ calls):
|
|
50367
50426
|
\`\`\`
|
|
50368
|
-
// Documentation
|
|
50369
|
-
Tool 1: context7_resolve-library-id \u2192
|
|
50427
|
+
// Documentation (informed by sitemap discovery)
|
|
50428
|
+
Tool 1: context7_resolve-library-id \u2192 context7_query-docs
|
|
50429
|
+
Tool 2: webfetch(targeted_doc_pages_from_sitemap)
|
|
50370
50430
|
|
|
50371
50431
|
// Code Search
|
|
50372
|
-
Tool
|
|
50373
|
-
Tool
|
|
50432
|
+
Tool 3: grep_app_searchGitHub(query: "pattern1", language: [...])
|
|
50433
|
+
Tool 4: grep_app_searchGitHub(query: "pattern2", useRegexp: true)
|
|
50374
50434
|
|
|
50375
50435
|
// Source Analysis
|
|
50376
|
-
Tool
|
|
50436
|
+
Tool 5: gh repo clone owner/repo \${TMPDIR:-/tmp}/repo -- --depth 1
|
|
50377
50437
|
|
|
50378
50438
|
// Context
|
|
50379
|
-
Tool
|
|
50380
|
-
|
|
50381
|
-
// Optional: If web search is available, search for recent updates
|
|
50439
|
+
Tool 6: gh search issues "topic" --repo owner/repo
|
|
50382
50440
|
\`\`\`
|
|
50383
50441
|
|
|
50384
50442
|
---
|
|
@@ -50423,7 +50481,11 @@ https://github.com/tanstack/query/blob/abc123def/packages/react-query/src/useQue
|
|
|
50423
50481
|
|
|
50424
50482
|
| Purpose | Tool | Command/Usage |
|
|
50425
50483
|
|---------|------|---------------|
|
|
50426
|
-
| **Official Docs** | context7 | \`context7_resolve-library-id\` \u2192 \`
|
|
50484
|
+
| **Official Docs** | context7 | \`context7_resolve-library-id\` \u2192 \`context7_query-docs\` |
|
|
50485
|
+
| **Find Docs URL** | websearch_exa | \`websearch_exa_web_search_exa("library official documentation")\` |
|
|
50486
|
+
| **Sitemap Discovery** | webfetch | \`webfetch(docs_url + "/sitemap.xml")\` to understand doc structure |
|
|
50487
|
+
| **Read Doc Page** | webfetch | \`webfetch(specific_doc_page)\` for targeted documentation |
|
|
50488
|
+
| **Latest Info** | websearch_exa | \`websearch_exa_web_search_exa("query 2025")\` |
|
|
50427
50489
|
| **Fast Code Search** | grep_app | \`grep_app_searchGitHub(query, language, useRegexp)\` |
|
|
50428
50490
|
| **Deep Code Search** | gh CLI | \`gh search code "query" --repo owner/repo\` |
|
|
50429
50491
|
| **Clone Repo** | gh CLI | \`gh repo clone owner/repo \${TMPDIR:-/tmp}/name -- --depth 1\` |
|
|
@@ -50431,8 +50493,6 @@ https://github.com/tanstack/query/blob/abc123def/packages/react-query/src/useQue
|
|
|
50431
50493
|
| **View Issue/PR** | gh CLI | \`gh issue/pr view <num> --repo owner/repo --comments\` |
|
|
50432
50494
|
| **Release Info** | gh CLI | \`gh api repos/owner/repo/releases/latest\` |
|
|
50433
50495
|
| **Git History** | git | \`git log\`, \`git blame\`, \`git show\` |
|
|
50434
|
-
| **Read URL** | webfetch | \`webfetch(url)\` for blog posts, SO threads |
|
|
50435
|
-
| **Web Search** | (if available) | Use any available web search tool for latest info |
|
|
50436
50496
|
|
|
50437
50497
|
### Temp Directory
|
|
50438
50498
|
|
|
@@ -50449,16 +50509,18 @@ Use OS-appropriate temp directory:
|
|
|
50449
50509
|
|
|
50450
50510
|
---
|
|
50451
50511
|
|
|
50452
|
-
## PARALLEL EXECUTION
|
|
50453
|
-
|
|
50454
|
-
When searching is needed, scale effort to question complexity:
|
|
50512
|
+
## PARALLEL EXECUTION REQUIREMENTS
|
|
50455
50513
|
|
|
50456
|
-
| Request Type | Suggested Calls |
|
|
50514
|
+
| Request Type | Suggested Calls | Doc Discovery Required |
|
|
50457
50515
|
|--------------|----------------|
|
|
50458
|
-
| TYPE A (Conceptual) | 1-2 |
|
|
50459
|
-
| TYPE B (Implementation) | 2-3 |
|
|
50460
|
-
| TYPE C (Context) | 2-3 |
|
|
50461
|
-
| TYPE D (Comprehensive) | 3-5 |
|
|
50516
|
+
| TYPE A (Conceptual) | 1-2 | YES (Phase 0.5 first) |
|
|
50517
|
+
| TYPE B (Implementation) | 2-3 NO |
|
|
50518
|
+
| TYPE C (Context) | 2-3 NO |
|
|
50519
|
+
| TYPE D (Comprehensive) | 3-5 | YES (Phase 0.5 first) |
|
|
50520
|
+
| Request Type | Minimum Parallel Calls
|
|
50521
|
+
|
|
50522
|
+
**Doc Discovery is SEQUENTIAL** (websearch \u2192 version check \u2192 sitemap \u2192 investigate).
|
|
50523
|
+
**Main phase is PARALLEL** once you know where to look.
|
|
50462
50524
|
|
|
50463
50525
|
**Always vary queries** when using grep_app:
|
|
50464
50526
|
\`\`\`
|
|
@@ -50482,6 +50544,8 @@ grep_app_searchGitHub(query: "useQuery")
|
|
|
50482
50544
|
| grep_app no results | Broaden query, try concept instead of exact name |
|
|
50483
50545
|
| gh API rate limit | Use cloned repo in temp directory |
|
|
50484
50546
|
| Repo not found | Search for forks or mirrors |
|
|
50547
|
+
| Sitemap not found | Try \`/sitemap-0.xml\`, \`/sitemap_index.xml\`, or fetch docs index page and parse navigation |
|
|
50548
|
+
| Versioned docs not found | Fall back to latest version, note this in response |
|
|
50485
50549
|
| Uncertain | **STATE YOUR UNCERTAINTY**, propose hypothesis |
|
|
50486
50550
|
|
|
50487
50551
|
---
|
|
@@ -51249,15 +51313,19 @@ var metisRestrictions = createAgentToolRestrictions([
|
|
|
51249
51313
|
"task",
|
|
51250
51314
|
"sisyphus_task"
|
|
51251
51315
|
]);
|
|
51252
|
-
var
|
|
51253
|
-
|
|
51254
|
-
|
|
51255
|
-
|
|
51256
|
-
|
|
51257
|
-
|
|
51258
|
-
|
|
51259
|
-
|
|
51260
|
-
|
|
51316
|
+
var DEFAULT_MODEL8 = "anthropic/claude-opus-4-5";
|
|
51317
|
+
function createMetisAgent(model = DEFAULT_MODEL8) {
|
|
51318
|
+
return {
|
|
51319
|
+
description: "Pre-planning consultant that analyzes requests to identify hidden intentions, ambiguities, and AI failure points.",
|
|
51320
|
+
mode: "subagent",
|
|
51321
|
+
model,
|
|
51322
|
+
temperature: 0.3,
|
|
51323
|
+
...metisRestrictions,
|
|
51324
|
+
prompt: METIS_SYSTEM_PROMPT,
|
|
51325
|
+
thinking: { type: "enabled", budgetTokens: 32000 }
|
|
51326
|
+
};
|
|
51327
|
+
}
|
|
51328
|
+
var metisAgent = createMetisAgent();
|
|
51261
51329
|
|
|
51262
51330
|
// src/agents/orchestrator-sisyphus.ts
|
|
51263
51331
|
init_constants();
|
|
@@ -52664,6 +52732,7 @@ function buildDynamicOrchestratorPrompt(ctx) {
|
|
|
52664
52732
|
const skillsSection = buildSkillsSection(skills);
|
|
52665
52733
|
return ORCHESTRATOR_SISYPHUS_SYSTEM_PROMPT.replace("{CATEGORY_SECTION}", categorySection).replace("{AGENT_SECTION}", agentSection).replace("{DECISION_MATRIX}", decisionMatrix).replace("{SKILLS_SECTION}", skillsSection);
|
|
52666
52734
|
}
|
|
52735
|
+
var DEFAULT_MODEL9 = "anthropic/claude-sonnet-4-5";
|
|
52667
52736
|
function createOrchestratorSisyphusAgent(ctx) {
|
|
52668
52737
|
const restrictions = createAgentToolRestrictions([
|
|
52669
52738
|
"task",
|
|
@@ -52672,7 +52741,7 @@ function createOrchestratorSisyphusAgent(ctx) {
|
|
|
52672
52741
|
return {
|
|
52673
52742
|
description: "Orchestrates work via sisyphus_task() to complete ALL tasks in a todo list until fully done",
|
|
52674
52743
|
mode: "primary",
|
|
52675
|
-
model:
|
|
52744
|
+
model: ctx?.model ?? DEFAULT_MODEL9,
|
|
52676
52745
|
temperature: 0.1,
|
|
52677
52746
|
prompt: buildDynamicOrchestratorPrompt(ctx),
|
|
52678
52747
|
thinking: { type: "enabled", budgetTokens: 32000 },
|
|
@@ -52682,7 +52751,7 @@ function createOrchestratorSisyphusAgent(ctx) {
|
|
|
52682
52751
|
var orchestratorSisyphusAgent = createOrchestratorSisyphusAgent();
|
|
52683
52752
|
|
|
52684
52753
|
// src/agents/momus.ts
|
|
52685
|
-
var
|
|
52754
|
+
var DEFAULT_MODEL10 = "openai/gpt-5.2";
|
|
52686
52755
|
var MOMUS_SYSTEM_PROMPT = `You are a work plan review expert. You review the provided work plan (.sisyphus/plans/{name}.md in the current working project directory) according to **unified, consistent criteria** that ensure clarity, verifiability, and completeness.
|
|
52687
52756
|
|
|
52688
52757
|
**CRITICAL FIRST RULE**:
|
|
@@ -53012,7 +53081,7 @@ Use structured format, **in the same language as the work plan**.
|
|
|
53012
53081
|
|
|
53013
53082
|
**Strike the right balance**: Prevent critical failures while empowering developer autonomy.
|
|
53014
53083
|
`;
|
|
53015
|
-
function createMomusAgent(model =
|
|
53084
|
+
function createMomusAgent(model = DEFAULT_MODEL10) {
|
|
53016
53085
|
const restrictions = createAgentToolRestrictions([
|
|
53017
53086
|
"write",
|
|
53018
53087
|
"edit",
|
|
@@ -53043,8 +53112,8 @@ var agentSources = {
|
|
|
53043
53112
|
"frontend-ui-ux-engineer": createFrontendUiUxEngineerAgent,
|
|
53044
53113
|
"document-writer": createDocumentWriterAgent,
|
|
53045
53114
|
"multimodal-looker": createMultimodalLookerAgent,
|
|
53046
|
-
"Metis (Plan Consultant)":
|
|
53047
|
-
"Momus (Plan Reviewer)":
|
|
53115
|
+
"Metis (Plan Consultant)": createMetisAgent,
|
|
53116
|
+
"Momus (Plan Reviewer)": createMomusAgent,
|
|
53048
53117
|
"orchestrator-sisyphus": orchestratorSisyphusAgent
|
|
53049
53118
|
};
|
|
53050
53119
|
var agentMetadata = {
|
|
@@ -53157,7 +53226,11 @@ function createBuiltinAgents(disabledAgents = [], agentOverrides = {}, directory
|
|
|
53157
53226
|
}
|
|
53158
53227
|
if (!disabledAgents.includes("orchestrator-sisyphus")) {
|
|
53159
53228
|
const orchestratorOverride = agentOverrides["orchestrator-sisyphus"];
|
|
53160
|
-
|
|
53229
|
+
const orchestratorModel = orchestratorOverride?.model;
|
|
53230
|
+
let orchestratorConfig = createOrchestratorSisyphusAgent({
|
|
53231
|
+
model: orchestratorModel,
|
|
53232
|
+
availableAgents
|
|
53233
|
+
});
|
|
53161
53234
|
if (orchestratorOverride) {
|
|
53162
53235
|
orchestratorConfig = mergeAgentConfig(orchestratorConfig, orchestratorOverride);
|
|
53163
53236
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reinamaccredy/oh-my-opencode",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "Fork of oh-my-opencode with Maestro workflow integration - Multi-Model Orchestration, Parallel Background Agents, Design Phases, and TDD Methodology",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|