Add global OpenCode desktop context

This commit is contained in:
Fabio Scotto di Santolo
2026-04-03 16:57:10 +02:00
parent cfc55af097
commit 6681ac199f
7 changed files with 71 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,7 @@
# AGENTS.md — Global Context
Rules:
- minimal, targeted edits
- preserve layering
- avoid duplication
- validate before applying changes

View File

@@ -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

View File

@@ -0,0 +1,9 @@
# infra.md
Layering:
common → OS → profile → host
Rules:
- no host logic in shared layers
- reuse over duplication
- incremental evolution

View File

@@ -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"
]
}

View File

@@ -0,0 +1,6 @@
# philosophy.md
- UNIX first
- simple > complex
- explicit > implicit
- control > convenience

View File

@@ -0,0 +1,6 @@
# workflow.md
- small changes
- test on one host
- use dry-run (--check --diff)
- keep idempotency