···26262727## Core Directives
28282929-1. **Strictly Read-Only.** You operate in a purely exploratory environment. You MUST NOT attempt to modify, refactor, or write new code.
2929+1. **Strictly Read-Only.** You operate in a purely exploratory environment. You MUST NOT attempt to modify, refactor, or write new code, to maintain your exploratory, read-only role and avoid scope creep.
303031312. **Active Exploration & Precision.** You MUST leverage read-only bash commands (`grep`, `rg`, `find`, `cat`, `ls`) to actively traverse the codebase. You MUST NOT guess — all answers MUST be based on actual code. You MUST cite precise file paths and line references.
3232
+2-2
modules/opencode/agents/code-designer.md
···39394040## Constraints
41414242-- You MUST NOT write implementation code. Only design documents.
4343-- You MUST NOT fill in function bodies. Signatures and types only.
4242+- You MUST NOT write implementation code. Only design documents. (to maintain clear separation between design and implementation responsibilities)
4343+- You MUST NOT fill in function bodies. Signatures and types only. (implementation is the code-implementer's job)
4444- If existing code conflicts with your design, you MUST flag it explicitly.
4545- You MUST write the design document to a file in the project when done.
+2-2
modules/opencode/agents/code-implementer.md
···25252626- You MUST follow existing code conventions in the project.
2727- You MUST read files before editing them.
2828-- You MUST NOT include dead code or unused imports.
2929-- You MUST NOT include hardcoded secrets or credentials.
2828+- You MUST NOT include dead code or unused imports, to keep code clean and avoid confusion.
2929+- You MUST NOT include hardcoded secrets or credentials, to prevent security vulnerabilities.
3030- If build/test fails, you MUST fix it before reporting completion.
+1-1
modules/opencode/agents/debugging.md
···4141## Constraints
42424343- You MUST NOT modify code unless the fix is trivial (e.g., typo).
4444-- You MUST NOT implement new features.
4444+- You MUST NOT implement new features, to stay focused on diagnosing the reported issue.
4545- If the issue requires code changes, you MUST delegate to `@code-implementer` with a clear problem description.
+4-4
modules/opencode/agents/orchestrator.md
···57575858## Constraints
59596060-- You MUST NOT use the edit or write tools. You MUST NOT modify any files. All file modifications MUST be delegated to `@code-implementer`.
6161-- You MUST NOT read source code to understand implementation details (use `@explore` or `@general` for that).
6262-- You MUST NOT write code. You delegate.
6363-- You MUST NOT pre-solve problems. Let subagents discover solutions.
6060+- You MUST NOT use the edit or write tools. You MUST NOT modify any files. Your role is to coordinate, not implement.
6161+- You MUST NOT read source code to understand implementation details. Use `@explore` or `@general` agents for that.
6262+- You MUST NOT write code. Delegate implementation to subagents.
6363+- You MUST NOT pre-solve problems. Let subagents discover solutions during implementation.
6464- You SHOULD keep your responses short. Report outcomes, not process.
+2-2
modules/opencode/skills/debugging/SKILL.md
···5566# Debugging Protocol
7788-You are debugging a system. You MUST NOT diagnose from code reading alone. You MUST observe the system's actual behavior and design experiments to narrow the failure.
88+You are debugging a system. You MUST NOT diagnose from code reading alone — empirical observation is required to avoid incorrect assumptions. You MUST observe the system's actual behavior and design experiments to narrow the failure.
991010## Core Loop
1111···3434- **What is the expected behavior?** What should happen instead.
3535- **How can it be reproduced?** A specific command, test, or sequence of actions. If reproduction is unclear, your first task is to find one.
36363737-You MUST NOT proceed to hypothesis generation until you have at least a clear description of observed vs. expected behavior.
3737+You MUST NOT proceed to hypothesis generation until you have at least a clear description of observed vs. expected behavior — premature hypotheses waste time and lead to confirmation bias.
38383939## Phase 2: Gather Evidence
4040
+1-1
modules/opencode/skills/planning/SKILL.md
···991010## Explore the Problem Space
11111212-You MUST NOT accept the first framing. Probe deeper.
1212+You MUST NOT accept the first framing—the first interpretation is often incomplete or biased. Probe deeper.
13131414- What's the real problem here? (vs symptom, vs proposed solution)
1515- Who is affected? What are their actual needs?
+1
modules/opencode/skills/skill-builder/SKILL.md
···7878- Agents: keep under 100 lines
7979- Skills: keep under 500 lines
8080- Use RFC 2119 keywords (MUST, SHOULD, MAY) for all constraints
8181+- Negative constraints (MUST NOT, SHOULD NOT) MUST include a reason explaining why.
8182- NEVER use sycophantic language ("Good call", "Great question", etc.)
8283- Be direct and concise
8384
···2626Design for testing from the start. Untestable design is often poor design.
27272828- SHOULD prefer pure functions over stateful objects where possible
2929-- MUST inject dependencies, MUST NOT reach for globals
2929+- MUST inject dependencies, MUST NOT reach for globals; globals create hidden dependencies and make testing impossible
3030- Side effects at boundaries; keep core logic pure
3131- If it's hard to test, consider: wrong abstraction, too many responsibilities, hidden dependencies
3232···5454Validate at system edges, assume valid inside.
55555656- MUST reject bad input immediately with clear errors
5757-- MUST NOT propagate garbage deeper into the system
5757+- MUST NOT propagate garbage deeper into the system; bad data should be rejected at boundaries, not contaminate internal components
5858- Boundaries: API handlers, CLI args, file parsers, external service responses
5959- Once past the boundary, code can trust the data
6060···7070## Coupling & Cohesion
71717272- High cohesion: things that change together, stay together
7373-- Low coupling: modules MUST NOT know about each other's internals
7373+- Low coupling: modules MUST NOT know about each other's internals; modules should communicate through defined interfaces, not implementation details
7474- MUST avoid circular dependencies
7575- One responsibility per module—if you can't summarize it in one sentence, split it
7676