diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index cd6736b..2c82eff 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -153,6 +153,10 @@ desktop_common_dotfiles: src: .config/yt-dlp/ dest: .config/yt-dlp/ mode: preserve + - name: OpenCode config + src: .config/opencode/ + dest: .config/opencode/ + mode: preserve - name: .gitignore_global src: .gitignore_global dest: .gitignore_global diff --git a/dotfiles/desktop/.config/opencode/AGENTS.md b/dotfiles/desktop/.config/opencode/AGENTS.md new file mode 100644 index 0000000..2e4a749 --- /dev/null +++ b/dotfiles/desktop/.config/opencode/AGENTS.md @@ -0,0 +1,7 @@ +# AGENTS.md — Global Context + +Rules: +- minimal, targeted edits +- preserve layering +- avoid duplication +- validate before applying changes diff --git a/dotfiles/desktop/.config/opencode/bootstrap.md b/dotfiles/desktop/.config/opencode/bootstrap.md new file mode 100644 index 0000000..d92fc25 --- /dev/null +++ b/dotfiles/desktop/.config/opencode/bootstrap.md @@ -0,0 +1,30 @@ +# bootstrap.md — Global Operating Context for opencode + +This file defines the persistent mental model for the agent. + +## Core Principles +- UNIX philosophy (simple, composable tools) +- Minimalism (only what is necessary) +- Reproducibility (everything rebuildable) +- Control over convenience (explicit > magic) + +Golden rule: +If it cannot be rebuilt, it is not owned. + +## System Model +core system → user environment + +## Infrastructure Model +common → OS → profile → host + +## Hosts +- ikaros (Void desktop) +- nymph (Void laptop) +- deadalus (workstation) +- prometheus (server) + +## Agent Behavior +- make minimal changes +- avoid refactors +- preserve architecture +- never break existing systems diff --git a/dotfiles/desktop/.config/opencode/infra.md b/dotfiles/desktop/.config/opencode/infra.md new file mode 100644 index 0000000..1f7b989 --- /dev/null +++ b/dotfiles/desktop/.config/opencode/infra.md @@ -0,0 +1,9 @@ +# infra.md + +Layering: +common → OS → profile → host + +Rules: +- no host logic in shared layers +- reuse over duplication +- incremental evolution diff --git a/dotfiles/desktop/.config/opencode/opencode.json b/dotfiles/desktop/.config/opencode/opencode.json new file mode 100644 index 0000000..80beaf9 --- /dev/null +++ b/dotfiles/desktop/.config/opencode/opencode.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://opencode.ai/config.json", + "instructions": [ + "~/.config/opencode/bootstrap.md", + "~/.config/opencode/infra.md", + "~/.config/opencode/philosophy.md", + "~/.config/opencode/workflow.md" + ] +} diff --git a/dotfiles/desktop/.config/opencode/philosophy.md b/dotfiles/desktop/.config/opencode/philosophy.md new file mode 100644 index 0000000..c0b7e0f --- /dev/null +++ b/dotfiles/desktop/.config/opencode/philosophy.md @@ -0,0 +1,6 @@ +# philosophy.md + +- UNIX first +- simple > complex +- explicit > implicit +- control > convenience diff --git a/dotfiles/desktop/.config/opencode/workflow.md b/dotfiles/desktop/.config/opencode/workflow.md new file mode 100644 index 0000000..d219de5 --- /dev/null +++ b/dotfiles/desktop/.config/opencode/workflow.md @@ -0,0 +1,6 @@ +# workflow.md + +- small changes +- test on one host +- use dry-run (--check --diff) +- keep idempotency