Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
06f6a7c
feat: add complete opencode configuration
baphled Feb 12, 2026
f17657b
build(skills): add BATS test infrastructure and skill-discovery skill
baphled Feb 13, 2026
dc31232
test(skills): add comprehensive BATS tests for skill import pipeline
baphled Feb 13, 2026
4044391
docs: Update AGENTS.md with complete agent system documentation
baphled Feb 13, 2026
3f2cc82
feat(agents): Add senior-engineer agent and update commit command
baphled Feb 13, 2026
6ad6e99
feat(skills): Add new skills for code reading, debugging, and TDD wor…
baphled Feb 13, 2026
870e91f
refactor(skills): Update core pattern skills with enhanced guidance
baphled Feb 13, 2026
d47fac6
refactor(skills): Update testing and validation skills
baphled Feb 13, 2026
f46cedb
refactor(skills): Update JavaScript and framework testing skills
baphled Feb 13, 2026
fbe25f6
refactor(skills): Update Go ecosystem skills
baphled Feb 13, 2026
538705d
refactor(skills): Update TUI framework and creation skills
baphled Feb 13, 2026
74b63b2
refactor(skills): Update API, database, and pre-commit validation skills
baphled Feb 13, 2026
253140e
refactor(skills): Update documentation and writing skills
baphled Feb 13, 2026
ef94a28
refactor(skills): Update Git workflow and version control skills
baphled Feb 13, 2026
611ef4b
refactor(skills): Update operations and observability skills
baphled Feb 13, 2026
e53a543
refactor(skills): Update analytical and thinking skills
baphled Feb 13, 2026
39a9a1b
refactor(skills): Update workflow and resource management skills
baphled Feb 13, 2026
9ddb0cc
refactor(skills): Update infrastructure and embedded systems skills
baphled Feb 13, 2026
1c7cac9
refactor(skills): Update security and incident management skills
baphled Feb 13, 2026
cd7272c
refactor(skills): Update utility and support skills
baphled Feb 13, 2026
89c8c2c
refactor(skills): Update knowledge management and release skills
baphled Feb 13, 2026
205e7d7
refactor(skills): Update domain modeling and architecture skills
baphled Feb 13, 2026
9b1ba58
refactor(skills): Update workflow and PR management skills
baphled Feb 13, 2026
ab2722c
refactor(skills): Update Obsidian vault and plugin expertise
baphled Feb 13, 2026
008770b
refactor(skills): Update language expertise and review skills
baphled Feb 13, 2026
c39399b
refactor(skills): Update service layer and code quality skills
baphled Feb 13, 2026
06a0ab0
refactor(skills): Update UI/UX, design, and testing utilities
baphled Feb 13, 2026
d89ed71
test(skills): Update skill-import BATS test suite
baphled Feb 13, 2026
57bd982
feat(skills): add skill-import and skill-remove Makefile targets for …
baphled Feb 13, 2026
bbac97b
test(skills): add BATS tests for skill-import, skill-remove, and coll…
baphled Feb 13, 2026
4e4da29
test(skills): add BATS tests for staging workflow and version tracking
baphled Feb 13, 2026
4f5cab8
feat(skills): add 10-touchpoint integration pipeline for imported skills
baphled Feb 13, 2026
294f791
feat(skills): add skill-discovery skill for proactive skills.sh sugge…
baphled Feb 13, 2026
b26177b
feat(opencode): integrate all agents with role-specific rules and def…
baphled Feb 13, 2026
1a51ad5
feat(plugins): add event logger for provider failover investigation
baphled Feb 13, 2026
876ac28
feat(plugins): add tier-based fallback chain configuration
baphled Feb 13, 2026
3a17f0a
feat(plugins): add provider health state manager with persistence
baphled Feb 13, 2026
e213ed9
feat(plugins): add provider failover routing with tier-aware fallback…
baphled Feb 13, 2026
92f7f54
feat(plugins): add provider-health inspection tool
baphled Feb 13, 2026
40183ea
test(plugins): add integration tests for provider failover with mock …
baphled Feb 13, 2026
daa8e4d
docs(agents): document provider failover behaviour and health monitoring
baphled Feb 13, 2026
35f6b0d
refactor(agents): standardise agent file naming to title case
baphled Feb 13, 2026
e334550
feat(skills): add math-expert skill for mathematical reasoning
baphled Feb 13, 2026
10848e7
fix(plugins): add null guards for provider/model in chat.params hook
baphled Feb 13, 2026
43db87f
fix(plugins): remove noisy logging for expected guard conditions
baphled Feb 13, 2026
6d1b2c9
fix(plugins): add informational notifications for guard conditions
baphled Feb 13, 2026
e50a467
chore: remove planning docs from git and add .gitignore
baphled Feb 13, 2026
d0c121c
chore(gitignore): add ignore rules for non-opencode and sensitive files
baphled Feb 13, 2026
1385bf6
feat(mcp): add mcphub vault-rag tool definition and mcp-hub config
baphled Feb 13, 2026
177b902
feat(scripts): add sanitised vault and diagnostic scripts to opencode
baphled Feb 13, 2026
ba60411
feat(tooling): add skill collision detection scripts and opencode Mak…
baphled Feb 13, 2026
9d7b319
fix(gitignore): remove overly broad wildcard pattern from .config/.gi…
baphled Feb 13, 2026
b9311e4
chore(opencode): commit remaining workflow files and new skills
baphled Feb 13, 2026
57000b1
feat(skills): add back-references for evaluate-change-request
baphled Feb 13, 2026
bacb3f5
fix(plugins): make toast notifications fire-and-forget to prevent TUI…
baphled Feb 14, 2026
1c46244
docs(agents): document provider-failover toast notifications
baphled Feb 14, 2026
f94b428
feat(skills): add agent-discovery skill for intelligent agent orchest…
baphled Feb 14, 2026
5e93bea
feat(config): integrate agent-discovery into orchestrators and Senior…
baphled Feb 14, 2026
fbde674
feat(skills): replace stub Obsidian plugin skills with comprehensive …
baphled Feb 14, 2026
bc4aef8
feat(agents): enhance KB Curator with dynamic content rules and memor…
baphled Feb 14, 2026
befb6f8
fix: correct T2 fallback chain and add comprehensive validation tests
baphled Feb 14, 2026
9c33d1c
fix: handle edge case where all providers are unhealthy
baphled Feb 14, 2026
e3e625f
feat: include model in rate limit and error notifications
baphled Feb 14, 2026
5a27b48
feat: add Ollama Cloud support and local Ollama tool filtering
baphled Feb 14, 2026
8a95839
fix: add debug logging for error events and ollama-cloud detection
baphled Feb 14, 2026
5b20e14
fix: use lightweight Ollama models, remove granite4
baphled Feb 14, 2026
8cadba2
fix: add debug output for chat.params provider info
baphled Feb 14, 2026
9e9cd8f
fix: improve debug output for provider info
baphled Feb 14, 2026
be2e933
fix: add Kimi and GLM provider detection for OpenCode Zen
baphled Feb 14, 2026
a0241da
refactor: rewrite provider failover to use session.status for rate li…
baphled Feb 14, 2026
9e776db
feat: add skill auto-loader plugin with agent config parsing
baphled Feb 17, 2026
e8a9395
refactor: simplify provider failover to rate-limit tracking only
baphled Feb 17, 2026
3133278
feat: add agent-discovery skill to all agents and improve KB Curator
baphled Feb 17, 2026
05cfda9
docs: add testing contracts to BDD and TUI testing skills
baphled Feb 17, 2026
7ba9037
feat: add OpenCode Zen provider tier and update model routing
baphled Feb 17, 2026
b3bc782
feat: add OpenCode assets (agents, commands, skills, system JSON)
baphled Feb 17, 2026
489d447
refactor(discovery): separate skill and agent discovery logic
baphled Feb 17, 2026
af89ca0
feat(skills): distill BDD testing expertise
baphled Feb 17, 2026
ff98f22
feat(skills): distill DevOps and IaC expertise
baphled Feb 17, 2026
c916459
feat(skills): distill technical-debt management expertise
baphled Feb 17, 2026
2da4196
refactor(discovery): finalize skill and agent discovery separation
baphled Feb 17, 2026
651b5c8
chore(deps): update project dependencies and submodules
baphled Feb 17, 2026
2cf12ab
feat(skills): distill DevOps and Architecture domain skills
baphled Feb 17, 2026
981230d
docs(AGENTS.md): Add golden rule and delegation patterns to orchestra…
baphled Feb 18, 2026
c7d2bd1
refactor(Knowledge Base Curator): Add frontmatter, skill-discovery, a…
baphled Feb 18, 2026
e3f5f1f
refactor(plugins): enhance provider-failover and health tracking
baphled Feb 20, 2026
bab9a63
feat(plugins): add specialist agent routing to skill-auto-loader
baphled Feb 20, 2026
3f863ea
feat(agents): add specialist agent definitions and routing config
baphled Feb 20, 2026
5ed1ab0
refactor(agents): streamline Knowledge Base Curator and add Model-Eva…
baphled Feb 20, 2026
8bd1982
refactor(skills): finalise discovery skill separation
baphled Feb 20, 2026
d4c6f33
feat(skills): distill testing and BDD domain skills
baphled Feb 20, 2026
788cf82
feat(skills): distill architecture, code quality, and domain skills
baphled Feb 20, 2026
6f9f6d8
feat(skills): distill data, DevOps, and Obsidian domain skills
baphled Feb 20, 2026
e8f8dcf
test(plugins): add comprehensive skill-auto-loader test suite
baphled Feb 20, 2026
d269619
chore(deps): add TypeScript testing dependencies
baphled Feb 20, 2026
a7a0628
fix(plugins): resolve TypeError by removing non-plugin file and fixin…
baphled Feb 20, 2026
0bb2dc9
chore(plugins): relocate jest config outside plugin scan path
baphled Feb 20, 2026
e8a6e4a
test(plugin): add spike validating prompt modification propagation
baphled Feb 20, 2026
c2aac71
fix(config): replace go-expert with golang in keyword patterns
baphled Feb 20, 2026
c1f5545
fix(plugin): inject baseline skills on session continuation
baphled Feb 20, 2026
421e885
fix(tests): update stale session continuation test expectations
baphled Feb 20, 2026
d493854
chore(agents): remove redundant mcp_skill loading instructions from r…
baphled Feb 20, 2026
ff056fc
chore(config): raise max_auto_skills cap to 10 with documentation
baphled Feb 20, 2026
85079d4
feat(plugin): add skill existence validation
baphled Feb 20, 2026
73fff71
feat(plugin): inject skill content into agent prompt
baphled Feb 20, 2026
fe975c8
feat(plugin): add injection logging and prompt size tracking
baphled Feb 20, 2026
e51f081
test(plugin): add end-to-end skill injection integration tests
baphled Feb 20, 2026
87aab21
fix(plugin): address code quality issues from review
baphled Feb 20, 2026
0b93b47
docs(agents): add KB Curator integration section to all 14 agents
baphled Feb 20, 2026
b86d744
feat(agents): enforce orchestrator-only edit permissions
baphled Feb 20, 2026
a5b015c
docs(agents): document tool restriction permission gates
baphled Feb 20, 2026
aac81e9
feat(agents): add skill-discovery to all specialist agent defaults
baphled Feb 20, 2026
97b235e
test(plugins): update orchestrator-only tests for permission enforcement
baphled Feb 20, 2026
38f0682
chore(deps): update package dependencies
baphled Feb 20, 2026
8774bb5
feat(skills): integrate Anthropic engineering blog recommendations
baphled Feb 20, 2026
e3f9800
fix(tests): update agent-config-parser for skill-discovery and spy in…
baphled Feb 20, 2026
f120cd7
refactor(plugins): wave 1 foundation for skill auto-loader refinement
baphled Feb 20, 2026
dbb3310
test(injection): add failing tests for progressive skill injection
baphled Feb 20, 2026
92253d3
feat(auto-loader): add codebase language detection module
baphled Feb 20, 2026
dd551be
test(selector): add failing tests for focus parameter and byte budget
baphled Feb 20, 2026
40c5ede
feat(selector): add focus parameter and byte budget cap to selectSkills
baphled Feb 20, 2026
2e43b23
feat(injection): implement progressive skill injection within byte bu…
baphled Feb 20, 2026
bda4333
feat(auto-loader): wire codebase detection, focus, skillSizes, and ba…
baphled Feb 20, 2026
2c6fe50
feat(auto-loader): wire codebase detection, focus, skillSizes, and ba…
baphled Feb 20, 2026
ce54f56
feat(selector): add codebaseSkills as Tier 2.5 source
baphled Feb 20, 2026
5a37ade
test(integration): update for 20KB ceiling and progressive injection …
baphled Feb 20, 2026
67470a3
refactor(injection): raise ceiling to 35KB
baphled Feb 20, 2026
1b2e1b2
fix(auto-loader): pass codebaseSkills into selectionInput
baphled Feb 20, 2026
06a49df
docs(auto-loader): update stale comment for codebaseSkills wiring
baphled Feb 20, 2026
6c58eb7
fix(auto-loader): show ceiling exceeded warning via toast instead of …
baphled Feb 20, 2026
b6043af
fix(auto-loader): remove greedy keyword patterns and fix baseline budget
baphled Feb 20, 2026
6cf0fc0
feat(selector): focus suppresses Tier 3 keyword patterns except critical
baphled Feb 22, 2026
c225132
fix(config): remove Go-specific skills from generic keyword patterns
baphled Feb 22, 2026
8071ace
refactor(skill-loader): remove clean-code from generic category mappings
baphled Feb 22, 2026
32872ea
feat(selector): add focus+language test framework mapping
baphled Feb 22, 2026
0d985cc
refactor(skill-loader): shrink baseline to pre-action and memory-keep…
baphled Feb 22, 2026
ae5fcd9
fix(skill-loader): use project directory for codebase detection inste…
baphled Feb 22, 2026
806b721
refactor(config): lower max_auto_skills from 10 to 6
baphled Feb 22, 2026
6be2f7b
test(integration): add BDD workflow scenario and fix stale baseline test
baphled Feb 22, 2026
30320dd
refactor(orchestration): make skill selection domain-agnostic
baphled Feb 22, 2026
e8f2b89
refactor(agents): broaden Tech-Lead scope to general task orchestration
baphled Feb 22, 2026
38da829
feat(agents): add Editor, Researcher, and Code-Reviewer specialist ag…
baphled Feb 22, 2026
d6292c7
refactor(orchestration): make orchestration composable and domain-agn…
baphled Feb 22, 2026
bdfb6e2
refactor(plugins): update agent config parser and skill validation
baphled Feb 22, 2026
8addbf7
fix(skills/obsidian-mermaid-expert): document \n vs <br/> line-break …
baphled Feb 22, 2026
640b52d
refactor(skills): update content for notable skill changes
baphled Feb 22, 2026
34dfcbd
chore(skills): add KB reference links across all remaining skill files
baphled Feb 22, 2026
47cfb0c
refactor(commands): update command documentation and workflows
baphled Feb 22, 2026
5b766d6
chore(build): add ai-commit and check-compliance Makefile targets
baphled Feb 22, 2026
48d4cef
chore(assets): regenerate cached agent, command, skill, and system ma…
baphled Feb 22, 2026
f659c80
fix(agents): remove tools: YAML block from agent frontmatter
baphled Feb 22, 2026
5eeef8c
feat(plugins/skill-auto-loader): add grouped toast notification and n…
baphled Feb 22, 2026
8a64aeb
refactor(skills): improve auto-rebase, pre-merge, and respond-to-revi…
baphled Feb 22, 2026
f821819
docs(skills): fill in 55 stub skill files with domain-accurate content
baphled Feb 22, 2026
c0753da
chore(git): ignore .sisyphus/ directory — AI agent working files
baphled Feb 22, 2026
03dd8ba
fix(git): correct .gitignore — separate logs/ and .sisyphus/ entries
baphled Feb 22, 2026
4419995
docs(commands): flesh out 35 stubbed command files with detailed work…
baphled Feb 22, 2026
3e5808a
fix(commands): correct qa.md skill listing and heading consistency
baphled Feb 22, 2026
479aeab
docs(orchestration): enforce mandatory delegation policy in rule files
baphled Feb 22, 2026
b2450ee
refactor(config): sync mandatory delegation rules into dynamic prompts
baphled Feb 22, 2026
bfff458
fix(mcp): update mem0 MCP server with readline stdin handling
baphled Feb 23, 2026
06076cb
fix(mcp): update script to use compiled JS with absolute paths
baphled Feb 23, 2026
9a50014
docs(agents): document Tech-Lead as mid-tier orchestrator
baphled Feb 23, 2026
0d6e816
feat: enhance fallback logic and provider health filtering
baphled Feb 23, 2026
2d1d135
fix(plugins): remove dead model routing and add proactive failover
baphled Feb 24, 2026
75dc0d7
fix(plugins): add per-session model logging and remove unused variable
baphled Feb 24, 2026
800480f
fix(plugins): make failover agent-aware — only switch subagent models
baphled Feb 24, 2026
41f18dd
fix(plugins): make failover agent-aware — only switch subagent models
baphled Feb 24, 2026
3e98a3b
fix: persist cleaned health state on startup
baphled Feb 24, 2026
09a31e3
fix(agents): enforce strict tool restrictions for orchestrator agents
baphled Feb 24, 2026
1d75efb
feat(provider-failover): add anthropic models to all tiers and fix to…
baphled Feb 24, 2026
d41ebb4
fix(provider-failover): only switch model when rate-limited, clear th…
baphled Feb 24, 2026
24762a0
feat(agents): enforce deterministic orchestrator behaviour
baphled Feb 25, 2026
0b5768d
style(config): format oh-my-opencode.jsonc for readability
baphled Feb 25, 2026
0633b16
feat(skills): add pr-review-workflow skill
baphled Feb 25, 2026
c81327b
feat(plugins): register pr-review-workflow in skill-auto-loader
baphled Feb 25, 2026
66ba28f
feat(agents): add pr-review-workflow and pre-merge to Code-Reviewer d…
baphled Feb 25, 2026
bfdf710
fix(plugins): correct claude-sonnet-4 model ID to claude-sonnet-4-0
baphled Feb 25, 2026
647fd2c
docs(agents): add delegation rules for smarter context-aware routing
baphled Feb 25, 2026
eb0bdf4
feat(plugins): implement selectAgent() for prompt-based agent routing
baphled Feb 25, 2026
686461f
feat: enforce test-first mandate for implementation agents
baphled Feb 25, 2026
444ee84
fix(plugins): improve provider failover logic and monthly rate limit …
baphled Feb 25, 2026
6f41e8a
feat(skills): resolve pre-action vs parallel-execution conflict as co…
baphled Feb 26, 2026
565a6f8
feat(agents): inject step discipline enforcement into all 17 agent de…
baphled Feb 26, 2026
c5446f1
feat(config): replace bloated prompt_append with slim CRITICAL blocks
baphled Feb 26, 2026
5215f52
refactor(agents): harden agentic system with lean prompts, skill gove…
baphled Mar 1, 2026
8519696
feat(discipline): sync KB Curator triggers with AGENTS.md
baphled Mar 1, 2026
43638fc
feat(discipline): sync SKILL.md with new triggers
baphled Mar 1, 2026
15553ac
feat(agents): add explicit 3-category KB Curator auto-triggers
baphled Mar 1, 2026
ce6ae6a
feat(agents): enable worktree access with main/next branch protection
baphled Mar 1, 2026
cb6a606
chore(opencode): Add to $PATH
baphled Mar 1, 2026
54ccb49
fix(provider-health): cross-provider rate limit detection and paralle…
baphled Mar 3, 2026
9ca108c
chore(opencode): update skill documentation and remove deprecated config
baphled Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Sisyphus planning and notepad files
.sisyphus/

# IDE
.idea/
.vscode/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Python
__pycache__/
*.pyc
1 change: 1 addition & 0 deletions .config/hypr/rules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ windowrule = fullscreen on, match:class ^(com.baphled.btop)$
windowrule = float on, match:class ^(blueberry.py)$
windowrule = float on, match:class ^(steam)$
windowrule = float on, match:class ^(guifetch)$ # FlafyDev/guifetch
windowrule = float on, match:class ^(1Password)$ # FlafyDev/guifetch
windowrule = tile on, match:class ^(dev.warp.Warp)$
windowrule = center on, match:title ^(Open File)(.*)$
windowrule = center on, match:title ^(Select a File)(.*)$
Expand Down
9 changes: 9 additions & 0 deletions .config/mcp-hub/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"servers": [
{
"name": "vault-rag",
"command": "/home/baphled/.local/bin/mcp-vault-server",
"transport": "stdio"
}
]
}
52 changes: 52 additions & 0 deletions .config/mcphub/vault-rag.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "vault-rag",
"version": "1.0.0",
"description": "MCP server for querying Obsidian vaults via Qdrant",
"tools": [
{
"name": "query_vault",
"description": "Query an Obsidian vault knowledge base",
"parameters": {
"type": "object",
"properties": {
"vault": {
"type": "string",
"description": "Vault name",
"enum": ["baphled"]
},
"question": {
"type": "string",
"description": "Question to ask about the vault content"
},
"top_k": {
"type": "integer",
"description": "Number of sources to retrieve",
"default": 5
}
},
"required": ["vault", "question"]
}
},
{
"name": "sync_vault",
"description": "Sync a vault to Qdrant vector database",
"parameters": {
"type": "object",
"properties": {
"vault": {
"type": "string",
"description": "Vault name to sync",
"enum": ["baphled"]
}
},
"required": ["vault"]
}
},
{
"name": "list_vaults",
"description": "List all configured vaults"
}
],
"command": "python3",
"args": ["/home/baphled/.local/bin/mcp-vault-server"]
}
6 changes: 6 additions & 0 deletions .config/opencode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
package.json
bun.lock
.gitignore
logs/
.sisyphus/
4 changes: 4 additions & 0 deletions .config/opencode/.skill-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": 1,
"skills": {}
}
200 changes: 200 additions & 0 deletions .config/opencode/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# Agent System

# 🚨 THE GOLDEN RULE: ORCHESTRATOR ALWAYS DELEGATES 🚨

**The orchestrator performs ZERO implementation and ZERO investigation. No exceptions.**

Pattern: Classify → Delegate via `task()` → Verify → Report.

🚫 Orchestrators MUST NOT: edit files directly, do "quick fixes", read files for context (delegate to `explore`/`Researcher` instead).

### Orchestrator Allowed Actions

- **Classify** task and select specialist
- **Delegate** via `task()` or `call_omo_agent()`
- **Verify** via automated checks (build, test, lsp_diagnostics, git status)
- **Confirm** final `read` of changed files ONLY to confirm subagent work
- **Report** progress and outcomes

---

## Specialist Agent Routing

Agents are composable. **Tech-Lead** orchestrates multi-domain tasks. Single-domain → route directly.

| Task | Route to |
| ------------------------------------------ | ---------------------- |
| Multi-domain coordination | Tech-Lead |
| Implementation, bug fix, refactoring | Senior-Engineer |
| Testing strategy, test writing, coverage | QA-Engineer |
| Documentation, READMEs, tutorials, content | Writer |
| Editorial review, structural editing, tone | Editor |
| Research, investigation, synthesis | Researcher |
| Security review, vulnerability assessment | Security-Engineer |
| CI/CD, infrastructure, deployment | DevOps |
| Data analysis, metrics, reporting | Data-Analyst |
| KB, vault, knowledge management | Knowledge Base Curator |
| Terminal recordings, demos | VHS-Director |
| Embedded/microcontroller work | Embedded-Engineer |
| Nix/flakes, reproducible builds | Nix-Expert |
| Linux administration, system configuration | Linux-Expert |
| System operations, monitoring | SysOp |
| Model testing, evaluation | Model-Evaluator |
| Planning, task decomposition, pre-flight analysis | Prometheus (Plan Builder) |

---

## Pre-Delegation Gate (MANDATORY)

Before EVERY `task()` call:
0. For complex or ambiguous requests: fire `task(subagent_type="Prometheus", ...)` first — Prometheus is the Plan Builder that decomposes requests into structured, sequenced work plans before delegating implementation work.
1. Look up routing table for specialist match.
2. ≥70% confidence → use `subagent_type="{Specialist}"`. Do NOT use `category=`.
3. No match → fall back to `category=` routing.
4. NEVER use `subagent_type="Sisyphus-Junior"` directly.

🚫 Using `category=` when a specialist exists, using Sisyphus-Junior for routable work, or skipping the routing table lookup are all **blocking violations**.

---

## Delegation Rules

- **Atomicity:** One concern per delegation. No batching distinct changes.
- **Session cap:** 15 tasks max. Decompose larger plans into phases.
- **Background default:** `run_in_background=true` for explore/librarian.
- **Specialists over generics:** Never use Sisyphus-Junior as a catch-all.
- **Exception:** Deviations only for genuine production incidents.

---

## Tool Restrictions

### Orchestrators (edit: deny)

| Agent | `edit` | `bash` | Role |
| ------------ | ------ | ------ | -------------------------- |
| `sisyphus` | deny | allow | Primary orchestrator |
| `hephaestus` | deny | allow | Orchestrator (Claude Code) |
| `atlas` | deny | allow | Orchestrator (OpenCode) |
| `Tech-Lead` | deny | allow | Engineering orchestrator |

### Workers (edit: allow)

| Agent | `edit` | `bash` | Role |
| ------------------------ | ------ | ------ | ---------------------------------- |
| `sisyphus-junior` | allow | allow | Generic worker (category fallback) |
| `Senior-Engineer` | allow | allow | Software engineering |
| `QA-Engineer` | allow | allow | Testing and quality |
| `Code-Reviewer` | allow | allow | PR change request response |
| `Writer` | allow | deny | Documentation |
| `DevOps` | allow | allow | Infrastructure |
| `VHS-Director` | allow | allow | Terminal recordings |
| `Embedded-Engineer` | allow | allow | Firmware |
| `Knowledge Base Curator` | allow | deny | Knowledge management |
| `Editor` | allow | deny | Editorial review |
| `Model-Evaluator` | allow | allow | Model testing |
| `Oracle` | allow | allow | Deep analysis + implementation |

### Read-Only Specialists (edit: deny)

| Agent | `edit` | `bash` | Role |
| ------------------- | ------ | ------ | ------------------- |
| `Security-Engineer` | deny | allow | Security auditing |
| `Data-Analyst` | deny | allow | Data analysis |
| `Nix-Expert` | deny | allow | Nix guidance |
| `Linux-Expert` | deny | allow | Linux guidance |
| `SysOp` | deny | allow | Operations guidance |
| `Researcher` | deny | deny | Research and investigation |
| `Prometheus` | deny | deny | Plan Builder (built-in OMO agent) — pre-flight planning and task decomposition |

---

## Step Discipline

Sub-agents MUST execute EVERY prescribed step. No skipping. No self-authorisation. Permission chain: `User → Orchestrator → Sub-agent`.

---

## Universal Skills (AUTO-LOAD)

`pre-action`, `memory-keeper`, `skill-discovery`, `parallel-execution` — loaded on every `task()` call.

## Knowledge Lookup Protocol

**Before any investigation:** 1) `mcp_memory_search_nodes` 2) `mcp_vault-rag_query_vault` 3) Codebase/web as last resort.

**After significant work:** capture via `mcp_memory_create_entities` or `mcp_memory_add_observations`.

## KB Curator Auto-Trigger (NON-NEGOTIABLE)

Fire KB Curator as a background task after ANY of these three categories. Do NOT wait to be asked.

```typescript
task(subagent_type="Knowledge Base Curator", run_in_background=true, load_skills=[], prompt="Sync: {what changed}")
```

### Mandatory trigger categories

1. **Project or feature work** — Feature completion, task set done, project milestone reached. Document what was built, changed, or decided.
2. **Exploration or investigation** — Research, codebase exploration, or investigation that produced new understanding. Document discoveries, patterns, and conclusions.
3. **Agentic flow or config changes** — Any modification to agent files, skill files, commands, `AGENTS.md`, `oh-my-opencode.jsonc`, or OpenCode configuration.

> Skipping KB Curator for these categories is a **blocking violation**.

---

## Worktree Safety Rules

Agents may work in git worktrees outside the main working directory.

**Protected branches (NEVER modify without explicit user permission):**
- `main` worktree
- `next` worktree

Before operating in ANY worktree, verify:
1. Which worktree/branch you are in
2. That it is NOT a protected branch (main, next) unless the user explicitly granted permission

> Modifying a protected worktree without explicit permission is a **blocking violation**.

## Skill Injection Limits

- **Orchestrators:** `load_skills=[]` always.
- **Subagents:** Maximum 3–4 task-relevant skills per `task()` call.
- **On-demand:** Use `mcp_skill` tool mid-task instead of front-loading.
- **Orchestrators only:** `agent-discovery` — only load on orchestrating agents (sisyphus, hephaestus, atlas, Tech-Lead). Never on workers or specialists.
- **Prometheus only:** Thinking skills (`critical-thinking`, `epistemic-rigor`, `assumption-tracker`, `systems-thinker`, `scope-management`, `estimation`) — only load when delegating to `Prometheus`.

### 🚫 Skill Content in Prompts (BLOCKING VIOLATION)

- ❌ NEVER paste skill content (`<skill name="...">` XML blocks) into `task()` prompts.
- ❌ NEVER inline skill markdown into the `prompt` field.
- ✅ ALWAYS use `load_skills=["skill-name"]` — the plugin handles injection.
- Applies to ALL `task()` calls including `explore`, `librarian`, and specialist agents.

---

## Commit Rules

1. New commits: write to `tmp/commit.txt`, run `make ai-commit FILE=tmp/commit.txt`
2. Fixups: `git commit --fixup=<hash>` directly
3. Before first commit: run `make check-compliance`
4. **NEVER use raw `git commit -m` for new commits.**

---

## Model Routing

| Tier | When | Models |
| ---- | ------------------------------ | ----------------- |
| T1 | Exploration, search | gpt-5-mini, Haiku |
| T2 | Implementation, tests, writing | gpt-5, Sonnet 4 |
| T3 | Architecture, novel problems | gpt-5.2, Opus 4.6 |

| Category | Tier |
| --------------------------------------------------- | ---- |
| quick, unspecified-low | T1 |
| deep, visual-engineering, writing, unspecified-high | T2 |
| ultrabrain, artistry | T3 |

**Pre-delegation health check (MANDATORY):** Call `provider-health(tier=X, recommend=true)` before delegating.
Loading