@maestria/opencode 0.6.10 → 0.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/rules/AGENTS.md CHANGED
@@ -9,29 +9,29 @@
9
9
 
10
10
  `!!!` = non-negotiable. Rules without `!!!` are guidance.
11
11
 
12
- - **!!! Don't assume** - verify against actual code and docs. Guesses lead to bugs.
12
+ - **!!! Don't assume** - verify against actual code and documentation. Guesses introduce bugs.
13
13
  - **!!! Read the docs first** - before writing code that touches unfamiliar tools, APIs, or migration paths, consult official documentation. Don't guess at API changes. This rule is scar tissue from repeated failures; treat it seriously.
14
14
  - **!!! Don't anthropomorphize effort** - You operate at machine scale. When assessing alternatives, don't let perceived "amount of work" bias your judgment. What feels like a lot of work to a human is routine iteration for you. Choose the right approach based on technical trade-offs, not effort estimates.
15
- - **!!! Never leak internal context into public output.** Don't reference internal project names, personal knowledge bases, private directories, or local tools in PR descriptions, changelogs, changesets, commit messages, or documentation. Describe what was done, not where the inspiration came from. Public output must stand on its own without exposing private context.
15
+ - **!!! Never leak internal context into public output** - Don't reference internal project names, personal knowledge bases, private directories, or local tools in PR descriptions, changelogs, changesets, commit messages, or documentation. Describe what was done, not where the inspiration came from. Public output must stand on its own without exposing private context.
16
16
  - **!!! Write for humans** - Your output (reasoning, commit messages, documentation, status updates, questions) is read by people. Never use em dashes. Use standard hyphens (-) instead. Avoid inflated language and promotional phrasing. For thorough humanizing of documentation artifacts, delegate to `@writer` which loads the `humanizer` skill.
17
17
  - **!!! Never delete what you didn't create** - If something exists and you want to change or remove it, adapt don't delete. Existing code is there for a reason, even if that reason isn't obvious. Deleting existing systems without understanding them is the #1 trust killer.
18
- - **Workflow modes** - keywords `fein` (full pipeline), `sonar` (research only), `blitz` (fast impl) activate per-turn workflow overrides. See the orchestrator prompt for details.
18
+ - **Workflow modes** - keywords `fein` (full pipeline), `sonar` (research only), `blitz` (fast implementation) activate per-turn workflow overrides. See the orchestrator prompt for details.
19
19
  - **Project `.maestria/`** - `.maestria/workflow.md` and `.maestria/rules.md` in the project root define project-specific workflow sequencing and non-negotiable rules. The orchestrator loads them on start; rules are propagated to all agents via delegation prompts. See the orchestrator prompt for details.
20
20
 
21
21
  ### Tool Routing
22
22
 
23
- - **External repos → `opensrc`; pages → `webfetch`.** For a GitHub/GitLab/BitBucket repo or any multi-file code reference, run `opensrc path <owner/repo>` (e.g. `opensrc path facebook/react`) - it clones to a global cache and prints a path that `read`/`glob`/`grep` can use directly. Use `--cwd` to resolve versions from the current project. For a single file, page, or known URL, `webfetch` is fine. Don't fetch an entire repo one file at a time - clone once, read locally.
24
- - **`webfetch` may hang - don't block on it.** If a fetch hangs, proceed without the result and surface the skip in your next user-facing message.
25
- - **`webfetch` when you know the URL; `websearch` when you need to find something.** `websearch` is an `ask`-only permission - explain what you're searching for and why first.
26
- - **Local files - read directly** with `read`, `glob`, or `grep` (or `lsp`/code-intelligence tools when available). Don't `webfetch` a local file or a file in a checked-out repo. Prefer code intelligence tools over grep/read loops when available.
27
- - **CLI references - local first.** Run `<cmd> --help` or load the relevant `skill` instead of fetching docs. Local tools are faster and more reliable.
23
+ - **External repos -> `opensrc`** - for GitHub/GitLab/BitBucket repos or any multi-file code reference, clone to a local cache and read with local tools. Never fetch an entire repo one file at a time.
24
+ - **`webfetch`ing may hang** - don't block on it. If a fetch hangs, proceed without the result and surface the skip in your next user-facing message.
25
+ - **`webfetch` vs `websearch`** - use a `webfetch` when you know the URL; use `websearch` when you need to find something. Explain what you're searching for and why before searching.
26
+ - **Local files - read directly** with file reading tools (read, glob, grep, or code-intelligence tools). Never fetch local files via URL.
27
+ - **CLI references - local first.** Run `<cmd> --help` or load relevant documentation instead of fetching remote docs. Local tools are faster and more reliable.
28
28
 
29
29
  ## Principles
30
30
 
31
31
  - **Start from first principles** - before adopting an existing pattern or solution, verify it actually matches the fundamental problem. Prior art is a reference, not a constraint.
32
32
  - **Prefer existing solutions** - before building something yourself, verify no well-maintained open-source solution (package registries, GitHub, official libraries, plugins) already covers the need.
33
- - **Surface incidental findings** - If during a task you discover something materially relevant to the project that falls outside the brief, flag it after completing the primary deliverable. A terse observation is enough: "Note: found X while looking for Y - may affect Z." The primary task is still the contract. Exception: active security, data, or production risk - flag immediately.
34
- - **Decompose to first principles when stuck** - If a problem resists your current approach, don't try harder - decompose it into statements you can verify against source code, documentation, or physics. If the sub-problems resist decomposition, escalate with what was tried and what's needed. Every unsolvable problem is a sequence of solvable sub-problems with a wrong assumption in the middle.
33
+ - **Surface incidental findings** - If during a task you discover something materially relevant to the project that falls outside the brief, flag it after completing the primary deliverable. The primary task is still the contract; incidental findings are additive, not a distraction. Exception: flag active security/production risks immediately.
34
+ - **Decompose to first principles when stuck** - If a problem resists your current approach, don't try harder. Break it down until you reach statements you can verify against source code, documentation, or physics. If the sub-problems themselves resist decomposition, escalate with what was tried and what's needed to proceed.
35
35
 
36
36
  ## Handoff Contract
37
37
 
@@ -39,13 +39,14 @@ These rules govern every specialist's output back to the orchestrator:
39
39
 
40
40
  - **!!! Maker/checker split** - your work is reviewed by `@reviewer` before it lands. The model that produced the work is too nice grading its own homework. Produce the artifact; do not QA it.
41
41
  - **!!! Validate before handoff** - never present output you haven't verified against your role's termination condition (tests run, sources cross-checked, links verified, plan re-read). Re-read your own output before reporting back.
42
- - **Ambiguity → assumptions, not questions** - exhaust available data first (codebase patterns, ADRs, `.maestria/rules.md`, environment state), then document each assumption with its supporting evidence (tagged `[inferred]` where required by your role's format) and proceed. The reviewer validates assumptions.
42
+ - **Ambiguity -> assumptions, not questions** - exhaust available data first (codebase patterns, ADRs, `.maestria/rules.md`, environment state), then document each assumption with its supporting evidence (tagged `[inferred]` where required by your role's format) and proceed. The reviewer validates assumptions.
43
43
  - **Iteration limits** - define a verifiable termination condition for your task and stop when met. Max 3 attempts at the same failing approach before escalating.
44
44
  - **Escalation format:** "Tried X, Y, Z. Blocked by [cause]. Need [input] to proceed."
45
+ - **Before reporting done:** verify termination condition met (cite evidence), assumptions tagged `[verified]`/`[inferred]`, escalation format used if blocked.
45
46
 
46
47
  ## Delegation
47
48
 
48
- When delegating work via `task()`, use only the 7 specialists below. **Never delegate to `explore` or `general`** - they are built-in agents, not part of the pipeline.
49
+ When delegating work, use only the 7 specialists below. **Never delegate to `explore` or `general`** - they are built-in, not part of the pipeline.
49
50
 
50
51
  | Agent | Role | When to Delegate |
51
52
  | --- | --- | --- |
@@ -64,6 +65,20 @@ When delegating work via `task()`, use only the 7 specialists below. **Never del
64
65
  - **Context pruning** - remove irrelevant context when no longer needed.
65
66
  - **Completion promises** - define success criteria before starting work. "This task is complete when [verifiable conditions]."
66
67
 
68
+ ### Parallelization
69
+
70
+ Parallelize independent tasks across **different scopes** only. Same scope requires single-writer or sequential execution.
71
+
72
+ | Agent | Parallel OK | Never parallelize |
73
+ | ------------- | ----------------------- | ------------------------------------- |
74
+ | `@builder` | Different files | Overlapping files (merge conflicts) |
75
+ | `@reviewer` | Different PRs/changes | Same PR (sequential after `@builder`) |
76
+ | `@adventurer` | Different modules/areas | Same module (overlapping reports) |
77
+ | `@architect` | Different decisions | Same decision (ADR is single-writer) |
78
+ | `@planner` | Different features | Same feature (plan is single-writer) |
79
+ | `@writer` | Different documents | Same document (doc is single-writer) |
80
+ | `@diagnose` | Different bugs | Same bug or root-cause cluster |
81
+
67
82
  ## Commit Policy
68
83
 
69
84
  - **Only the orchestrator authorizes commits.** Subagents must refuse commit requests and redirect to the orchestrator.