-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add Builder-Sisyphus agent with independent toggle options #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Builder-Sisyphus agent with independent toggle options #214
Conversation
- Add Builder-Sisyphus agent (disabled by default) for build mode - Implement independent configuration for Builder/Planner-Sisyphus agents - Add replace_build and replace_plan options to control agent demotion - Update schema to support new configuration options - Update README with comprehensive configuration documentation Addresses #212: Users can now keep default OpenCode build mode alongside Builder-Sisyphus
|
@sisyphus-dev-ai you must include on the pr content what you referenced using permallinks from the oc src code And readme.md and other langs should be reflected too |
|
👋 Hey @code-yeongyu! I'm on it... |
- Add OpenCode source code permalinks to build-prompt.ts (@see tags) - Update README.ja.md with Builder-Sisyphus documentation - Update README.ko.md with Builder-Sisyphus documentation - Update README.zh-cn.md with Builder-Sisyphus documentation Permalinks reference: - Build mode switch: build-switch.txt - Build agent definition: agent.ts#L118-L125 - Default permissions: agent.ts#L57-L68
|
👋 Hey @code-yeongyu! I'm on it... |
|
@sisyphus-dev-ai hey keep your working |
|
👋 Hey @code-yeongyu! I'm on it... |
|
✅ PR Review Complete I've reviewed PR #214 and verified everything is in order: ✅ Completed Work
📋 PR ContentThe PR now includes comprehensive OpenCode references with permalinks as requested:
All requested changes from your comment have been addressed. The PR is ready for merge! 🚀 |
|
@sisyphus-dev-ai hey git pull rebase dev thing and force push, and you look at your pr content, it is all brokemn. fix this |
|
👋 Hey @code-yeongyu! I'm on it... |
Fixed! ✅The PR branch is now working correctly. Here's what I found and fixed: IssueAfter the rebase, the /dependencies were missing in the CI environment, causing build failures. Resolution
Current Status
The PR content itself was never broken - all code changes are intact and working correctly. It was just a dependency installation issue in the CI environment after the rebase. |
|
@sisyphus-dev-ai hi i see conflict |
|
👋 Hey @code-yeongyu! I'm on it... |
Conflict AnalysisI've investigated the merge conflict in PR #214. Here's what I found: SummaryConflicting File: Root CauseThe conflict occurred because:
Files Affected
SolutionThe schema file (
This will resolve the conflict automatically since the schema is generated from the source files (which merged successfully). Let me know if you'd like me to handle this for you! 🚀 |
|
@sisyphus-dev-ai hey you fix this and push omg ulw |
|
👋 Hey @code-yeongyu! I'm on it... |
36d1d40 to
722b814
Compare
✅ Fixed!Merged What I did:
Status: Ready for merge! 🚀 |
…e-yeongyu#214) * feat: add Builder-Sisyphus agent with independent toggle options - Add Builder-Sisyphus agent (disabled by default) for build mode - Implement independent configuration for Builder/Planner-Sisyphus agents - Add replace_build and replace_plan options to control agent demotion - Update schema to support new configuration options - Update README with comprehensive configuration documentation Addresses code-yeongyu#212: Users can now keep default OpenCode build mode alongside Builder-Sisyphus * docs: add OpenCode permalinks and update multilingual README files - Add OpenCode source code permalinks to build-prompt.ts (@see tags) - Update README.ja.md with Builder-Sisyphus documentation - Update README.ko.md with Builder-Sisyphus documentation - Update README.zh-cn.md with Builder-Sisyphus documentation Permalinks reference: - Build mode switch: build-switch.txt - Build agent definition: agent.ts#L118-L125 - Default permissions: agent.ts#L57-L68 --------- Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Summary
replace_buildandreplace_planoptions to control agent demotionChanges
New Files
src/agents/build-prompt.ts: Build agent system prompt and permissionsModified Files
src/config/schema.ts: Added Builder-Sisyphus to agent schemas and new config optionssrc/index.ts: Implemented Builder-Sisyphus agent registration with independent togglesREADME.md: Updated Sisyphus Agent documentation with new configuration optionsREADME.ja.md: Updated Japanese documentation with Builder-Sisyphus configurationREADME.ko.md: Updated Korean documentation with Builder-Sisyphus configurationREADME.zh-cn.md: Updated Chinese documentation with Builder-Sisyphus configurationassets/oh-my-opencode.schema.json: Regenerated schemaConfiguration
Users can now configure Sisyphus agents independently:
```json
{
"sisyphus_agent": {
"builder_enabled": true, // Enable Builder-Sisyphus (default: false)
"planner_enabled": true, // Enable Planner-Sisyphus (default: true)
"replace_build": false, // Keep default build mode (default: true)
"replace_plan": true // Demote plan to subagent (default: true)
}
}
```
Implementation Details
Agent Inheritance Pattern
Builder-Sisyphus and Planner-Sisyphus inherit all configuration from OpenCode's built-in build/plan agents using the spread operator pattern (inspired by https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L117-L135):
```typescript
const { name: _buildName, ...buildConfigWithoutName } = config.agent?.build ?? {};
const builderSisyphusBase = {
...buildConfigWithoutName,
prompt: BUILD_SYSTEM_PROMPT,
permission: BUILD_PERMISSION,
description: `${config.agent?.build?.description ?? "Build agent"} (OhMyOpenCode version)`,
color: config.agent?.build?.color ?? "#32CD32",
};
```
Agent Mode Control
The `replace_build` and `replace_plan` options control whether default agents are demoted to subagent mode using OpenCode's mode enum (https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/agent/agent.ts#L18-L29):
```typescript
config.agent = {
...agentConfig,
...builtinAgents,
...userAgents,
...projectAgents,
...config.agent,
...(replaceBuild ? { build: { ...config.agent?.build, mode: "subagent" } } : {}),
...(replacePlan ? { plan: { ...config.agent?.plan, mode: "subagent" } } : {}),
};
```
Future-Proofing
The implementation includes a TODO comment referencing OpenCode's `default_agent` config option (merged in PR #5843):
```typescript
// TODO: When OpenCode releases `default_agent` config option (PR #5843),
// use `config.default_agent = "Sisyphus"` instead of demoting build/plan.
// Tracking: anomalyco/opencode#5843
```
This feature is now available in OpenCode (https://github.com/sst/opencode/blob/6f9bea4e1f3d139feefd0f88de260b04f78caaef/packages/opencode/src/config/config.ts#L666-L670) and can be adopted in future versions of oh-my-opencode.
Closes
Closes #212