OpenCode & Agents
The repo ships a shared OpenCode configuration: agents, slash commands, skills, and lifecycle plugins. The source lives in agents/.config/opencode/ (agents, commands, plugins, and shared lib/ modules) and agents/.agents/skills/ (skills exposed through the shared ~/.agents/skills/ path).
These are generated from this dotfiles repo and published automatically to timmo001/opencode-config so they can be browsed, imported, and installed independently of the full dotfiles repo.
How it fits together
Section titled “How it fits together”- Graduated agent permissions - agents range from workspace-read-only (
reviewer,ask) through ask-gated (build-ask) to edit-capable (refactorer). Read-only primary agents use native task allowlists, whilegeneral-readonlyandresearcher-readonlyare terminal subagents with task delegation denied. The interactiveresearchercan fan out once without allowing recursive research chains. - Comparative primary-source research -
/researchanswers direct facts from the source that owns them. When judgement is involved, it compares relevant project policy, maintainer and contributor practice, independent evidence, and credible disagreement claim by claim rather than ranking people by reputation. Research agents can inspect indexed local agent history through the read-onlyctxstatus, source, search, show, locate, docs, and SQL commands; shell output flags remain blocked across these read-only agents. - Workflow failure diagnosis -
/fix-workflowsinspects recent GitHub Actions failures for the current branch, or a named workflow or run, reproduces the failing path locally where possible, applies the smallest fix, and verifies it without committing, pushing, or rerunning workflows automatically. - Skill-based routing - commands are thin wrappers that name an agent, declare required skills, and state whether branch context is needed. The workflow logic lives in skills and plugins.
- Question-led stress-testing -
/grillsupports Light and Full intensity through one shared workflow. Phrases such as “lightly grill me” or “ask me a couple” select a short pass directly; when the requested intensity is unclear, it asks once before proceeding. - Staged implementation -
/planidentifies one active stage, records separate reviewable stages as deferred, and makes no edits. It recommends one numbered handoff per deferred reviewable phase. In a new repository it tries handoffs first, then proposes one temporary, all-in-one repository-local working Markdown plan when repository notes are not available yet; that document tracks numbered phases and updates their status at every checkpoint. During execution, thestaged-implementationskill defines shared contracts before delegation, uses targeted checks while iterating, runs one focused review before full validation, and pauses at validated checkpoints between separate review units unless the user requested one combined delivery. - Visual plan and code review - Plannotator opens plan review from OpenCode’s
planagent and provides/plannotator-review,/plannotator-annotate, and/plannotator-lastfor manual review. Its CLI is pinned through mise’s GitHub backend because it is not available from Arch, AUR, or the Aqua registry. - Branch context injection - commands registered with the
branch-contextplugin receive pre-computed git and PR state as structured XML instead of running their owngitorghcalls. The plugin consumes the standalonecontextCLI (context git --json), preserves explicit unresolved default-branch state, and keeps the plugin-specific injection rules here./commit,/commit-push, and/update-docsquery the Context MCP server’sgit_contexttool directly when they need branch or recent-change state. - Codebase stack injection - the
stack-contextplugin injects a deterministic tech-stack summary (languages, ecosystems, and frameworks with their general locations) computed bycontext stack --json, including structured notices when safety limits make a section partial. It injects automatically on the first message of a session inside a git repository, and on demand via/inject-stackor (alongside branch context)/inject-context. - Repository notes: the
repo-notesplugin injects the current repository’s notes path, thenotesMCP server owns vault reads and writes, andnotes-guardblocks direct file or shell access to the notes vault. See Notes & Handoffs and MCP Servers. - Secret protection - the
env-protectionplugin blocks reads of.envfiles (except.env.example). - Generated artefact protection - the
generated-artifact-guardplugin blocks direct mutation of generated dotfiles artefacts and names the canonical regeneration command. Read-only inspection (cat,git diff,rg, and similar) is allowed. The guard activates only inside this dotfiles repository layout.
| Generated artefact | Regenerate with |
|---|---|
docs/src/content/docs/dot/commands.md | mise run docs:gen:cli |
docs/src/content/docs/reference/{agents,commands,skills,plugins}.md | mise run docs:gen:opencode |
bash/.local/share/bash-completion/completions/dot | dot completions bash |
fish/.config/fish/completions/dot.fish | dot completions fish |
zsh/.local/share/zsh/site-functions/_dot | dot completions zsh |
scripts/.local/bin/dot | mise run dot:build |
docs/public/og.png | mise run docs:og |
- Background dev servers - starting a long-running dev server follows a precedence: the project’s own
AGENTS.mdworkflow first, then framework-native background mode (Astro 7+ self-detachesastro devunder an agent), then pitchfork as the fallback. Thepitchfork-dev-server-guardplugin covers only the pitchfork tier, redirecting foreground dev commands toserve:*orpitchfork startwhen a project declarespitchfork.toml, and it leavesastro devto Astro’s native mode. - Contextual notifications - top-level task completion and permission events ring BEL, send an Omarchy-formatted desktop notification when
omarchyis available, and play the freedesktop message sound whenpaplayis available. When the plugin starts under Hyprland, it captures the active window address so clicking a notification can return focus to that window. Background subagent completions stay silent.
Tooling
Section titled “Tooling”opencodeis installed through mise’s Aqua backend. The explicitcalias resolves to the same binary and keeps the GitHub MCP bearer scoped to the launched harness process.dot agents-sync— mirror~/.config/opencode/AGENTS.mdinto agent harness instruction files. Runs automatically at the end of fulldot updateanddot init.opencode debug <paths|config|skill|info|agent>— inspect resolved OpenCode config, paths, skills, and agents directly.DOT_CONTEXT_CAPTURE=1- capture assembled system-prompt segments and tool definitions for starter-context profiling. See Environment Variables.dot skill-updates/dot skill-check: check/apply upstream skill updates and validate branch-context command wiring.dot is-agent— detect whether dot is running under an AI agent, from agent environment variables with a Linux/procancestry fallback (exit0/1, so scripts can branch withif dot is-agent).DOT_AGENT=1/0overrides detection. When an agent (or a non-interactive stdout) invokes adotcommand that would open the TUI, dot refuses and points at the machine-readable equivalent instead.
Publishing to opencode-config happens automatically via GitHub Actions on push. The Agents, Commands, Skills, and Plugins pages above are generated by mise run docs:gen:opencode from the live assets, so they always match what ships — edit the source assets, not the generated pages. See also the generated dot Command Reference.