You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this framework, I’m reluctantly looking into using AI more and having a clearly introspectable system to see and learn about prompting and setting up agents is really awesome!
I see that the development is still very active (which is cool), but I’m just wondering if there’s a recommended way of updating the setup after the initial install and few user tweaks? I haven’t found anything yet, so my current idea is to ask the "System Builder" agent to run the "OAC update workflow" which I added in a md file (the footer of the message)
It currently relies on chezmoi, and the fact that I can use git diff in my chezmoi directory to review changes 1 by 1, but I don’t know if there’s a better way. (Note: I haven’t tested the workflow yet)
Cheers,
Gerry
OAC Self-Update Workflow
Quick Reference
Purpose: Update OpenAgentsControl configuration from upstream while preserving user customizations
Key Principle: Human-in-the-loop at every critical step - no silent overwrites
Tools Required: chezmoi, git, curl, bash
Safety: ALWAYS show scripts before execution, ALWAYS confirm before destructive operations
Determine if it's likely user customization (check for user-specific content)
Ask: "File <filename> was removed upstream. This appears to be [user customization / old upstream code]. Keep your version? [y/N]"
If keeping: git checkout HEAD -- home/dot_config/opencode/<file>
Decision Framework for Users
Help users decide with these guidelines:
Change Type
Likely Action
Reasoning
New agent files
Accept
New upstream features
Modified workflow files
Review carefully
May contain both improvements and user tweaks
Deleted navigation.md entries
Check if user-added
User additions should be kept
Path changes in context files
Accept
Upstream reorganization
Model configurations
Keep user version
User's model preferences
Custom commands
Keep
User customizations
AGENTS.md changes
Merge manually
Contains user-specific rules
Checkpoint
All files reviewed chunk-by-chunk
User customizations identified and preserved
Upstream improvements accepted where appropriate
Deleted files handled explicitly
No unreviewed changes remain
Error Recovery
If merge gets confusing: git checkout HEAD -- home/dot_config/opencode/ to start over
If specific file needs full reset: git checkout HEAD -- <specific-file>
Stage 4: Update Agent Model Configuration
Trigger Condition
Run this stage if ANY of these are true:
New agent files were added in upstream
User requests model configuration review
opencode.jsonc.tmpl was modified by upstream
Process
Detect new agents
cd~/.local/share/chezmoi
git diff --name-only --diff-filter=A HEAD home/dot_config/opencode/agent/
For each new agent, extract metadata
Read the agent file to determine:
Agent name (from filename and frontmatter)
Agent mode (primary vs subagent)
Agent purpose (from description)
Recommended temperature (from frontmatter or content)
Present each new agent for approval
Display:
New Agent Detected: [AgentName]
Purpose: [description from file]
Mode: [primary/subagent]
Suggested model configuration:
- Work mode (useWorkModels=true): [suggested-model]
- Personal mode (useWorkModels=false): [suggested-model]
Add this agent to opencode.jsonc.tmpl? [y/N/custom]
Ask: "Ready to commit these changes to chezmoi? [y/N]"
Stage and commit
git add home/dot_config/opencode/
git commit -m "feat(opencode): update OAC configuration from upstream- Updated from OpenAgentsControl upstream- Preserved user customizations in: [list key preserved files]- Added new agents: [list if any]- Updated model configurations: [list if any]"
Optional: Apply to target immediately
Ask: "Apply changes to ~/.config/opencode now? [y/N]"
chezmoi apply
Checkpoint
Final diff reviewed by user
User approved commit
Changes committed successfully
Optional: Changes applied to target
Rollback Procedure
If the update causes issues after completion:
Revert Uncommitted Changes
cd~/.local/share/chezmoi
git checkout HEAD -- home/dot_config/opencode/
Revert Committed Changes
cd~/.local/share/chezmoi
git revert HEAD # Creates new commit that undoes changes# OR
git reset --hard HEAD~1 # Removes commit entirely (use with caution)
Re-apply Clean State
chezmoi apply
Full Reset to Known Good State
If all else fails:
Backup current ~/.config/opencode
Delete ~/.config/opencode
Re-run installer with desired profile
Manually restore critical customizations from backup
Automation Hints for Agents
Stage 1 Automation
Fetch script automatically
MUST show script content and wait for approval
Parse installer output for success/failure
Stage 2 Automation
Run chezmoi commands automatically
Parse git status output to categorize changes
Present summary to user
Stage 3 Automation
Run sed command automatically (safe transformation)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Thanks for this framework, I’m reluctantly looking into using AI more and having a clearly introspectable system to see and learn about prompting and setting up agents is really awesome!
I see that the development is still very active (which is cool), but I’m just wondering if there’s a recommended way of updating the setup after the initial install and few user tweaks? I haven’t found anything yet, so my current idea is to ask the "System Builder" agent to run the "OAC update workflow" which I added in a md file (the footer of the message)
It currently relies on
chezmoi, and the fact that I can usegit diffin my chezmoi directory to review changes 1 by 1, but I don’t know if there’s a better way. (Note: I haven’t tested the workflow yet)Cheers,
Gerry
OAC Self-Update Workflow
Quick Reference
Purpose: Update OpenAgentsControl configuration from upstream while preserving user customizations
Key Principle: Human-in-the-loop at every critical step - no silent overwrites
Tools Required:
chezmoi,git,curl,bashSafety: ALWAYS show scripts before execution, ALWAYS confirm before destructive operations
Stage 1: Fetch and Review Upstream Installer
Prerequisites
Process
Fetch installation script from upstream
CRITICAL: Display script for user review
readtool on/tmp/oac-install.shRun installer non-interactively after approval
bash /tmp/oac-install.sh developer --install-dir ~/.config/opencodeVerify installation completed
Checkpoint
~/.config/opencodecontains updated filesError Recovery
wgetas fallbackStage 2: Sync Target State to Source State
Process
Re-add opencode config to chezmoi source state
chezmoi re-add ~/.config/opencodeNavigate to chezmoi source directory
Verify changes were detected
Expected output shows:
M= Modified files (upstream changes to existing files)A= Added files (new upstream files)D= Deleted files (files removed in upstream OR user customizations)??= Untracked files (new files not yet in git)Get summary of changes
Checkpoint
chezmoi re-addcompleted successfullygit statusshows changes inhome/dot_config/opencodeError Recovery
chezmoi re-addfails: verify chezmoi is initialized, check permissionsStage 3: Merge User Customizations with Upstream
Critical Understanding
IMPORTANT: Deleted files in
git statusinclude BOTH:The agent MUST help the user distinguish between these cases.
Process
Make paths portable across machines
Replace hardcoded home paths with portable
~/notation:List all changed files for review
Interactive chunk-by-chunk review
For EACH file with changes, perform interactive review:
a. Show file-level summary first:
b. For each diff hunk, present options:
[k]eep- Revert this chunk to HEAD (preserve user customization)[a]ccept- Keep working tree change (accept upstream)[s]kip- Defer decision on this file for later[v]iew- Show more context around this changec. Apply user decisions:
keep: Usegit checkout -por manual edit to restore HEAD versionaccept: Leave working tree as-isHandle deleted files explicitly
List files marked as deleted:
For EACH deleted file:
<filename>was removed upstream. This appears to be [user customization / old upstream code]. Keep your version? [y/N]"git checkout HEAD -- home/dot_config/opencode/<file>Decision Framework for Users
Help users decide with these guidelines:
Checkpoint
Error Recovery
git checkout HEAD -- home/dot_config/opencode/to start overgit checkout HEAD -- <specific-file>Stage 4: Update Agent Model Configuration
Trigger Condition
Run this stage if ANY of these are true:
opencode.jsonc.tmplwas modified by upstreamProcess
Detect new agents
For each new agent, extract metadata
Read the agent file to determine:
Present each new agent for approval
Display:
Model selection guidelines
For Work Mode (useWorkModels=true):
anthropic/claude-opus-4-6anthropic/claude-opus-4-6,github/gpt-5anthropic/claude-haiku-4-5-latestanthropic/claude-sonnet-4-5-latestgithub/gpt-5For Personal Mode (useWorkModels=false):
anthropic/claude-opus-4-6mistral/devstral-2mistral/mistral-small-latestanthropic/claude-sonnet-4-5-latestanthropic/claude-haiku-4-5-latestResearch current model info if needed
If user asks or models seem outdated:
Update opencode.jsonc.tmpl
For each approved agent, add entries in BOTH template branches:
{{- if .flags.useWorkModels }} "[AgentName]": { "mode": "[primary/subagent]", "model": "[work-model]", "temperature": [0.0-0.4] }, {{- else }} "[AgentName]": { "mode": "[primary/subagent]", "model": "[personal-model]", "temperature": [0.0-0.4] }, {{- end }}Checkpoint
opencode.jsonc.tmplupdated correctlyError Recovery
Stage 5: Final Review and Commit
Process
Show final change summary
Show full diff for final review
Summarize for user:
Confirm commit
Ask: "Ready to commit these changes to chezmoi? [y/N]"
Stage and commit
Optional: Apply to target immediately
Ask: "Apply changes to ~/.config/opencode now? [y/N]"
Checkpoint
Rollback Procedure
If the update causes issues after completion:
Revert Uncommitted Changes
Revert Committed Changes
Re-apply Clean State
Full Reset to Known Good State
If all else fails:
~/.config/opencode~/.config/opencodeAutomation Hints for Agents
Stage 1 Automation
Stage 2 Automation
Stage 3 Automation
Stage 4 Automation
Stage 5 Automation
Related
session-management.mdexternal-context-management.md../../openagents-repo/concepts/open-agents-control-architecture.mdBeta Was this translation helpful? Give feedback.
All reactions