@maestria/pi 0.2.0 → 0.2.1
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/dist/extension.mjs +1 -1
- package/dist/extension.mjs.map +1 -1
- package/package.json +2 -3
- package/prompts/adventurer.md +15 -35
- package/prompts/architect.md +8 -20
- package/prompts/builder.md +14 -37
- package/prompts/diagnose.md +7 -17
- package/prompts/orchestrator.md +73 -178
- package/prompts/planner.md +8 -12
- package/prompts/reviewer.md +9 -22
- package/prompts/writer.md +10 -25
- package/rules/AGENTS.md +27 -47
package/rules/AGENTS.md
CHANGED
|
@@ -1,69 +1,49 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
2
|
+
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
2
3
|
|
|
3
|
-
# Global Agent Rules
|
|
4
|
+
# Global Agent Rules
|
|
4
5
|
|
|
5
6
|
## Orchestration
|
|
6
7
|
|
|
7
|
-
- **!!! Don't assume** — verify against actual code and docs.
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
documentation. Don't guess at API changes. This rule is scar
|
|
12
|
-
tissue from repeated failures; treat it seriously.
|
|
13
|
-
- **Don't reference internal project names in explanations** — avoid
|
|
14
|
-
leaking context outside the workspace.
|
|
15
|
-
- **Use `opensrc` for repos; `webfetch` for pages** — when analyzing a
|
|
16
|
-
GitHub/GitLab/BitBucket repo or any multi-file code reference, run
|
|
17
|
-
`opensrc path <owner/repo>` (e.g. `opensrc path facebook/react`).
|
|
18
|
-
It clones to a global cache and prints a path that `read`/`glob`/`grep`
|
|
19
|
-
can use directly. For a single file, a specific page, or a known
|
|
20
|
-
URL, `webfetch` is fine. Don't fetch an entire repo one file at a
|
|
21
|
-
time — clone it once, then read locally. Use `--cwd` to resolve
|
|
22
|
-
versions from the current project.
|
|
8
|
+
- **!!! Don't assume** — verify against actual code and docs. Guesses lead to bugs.
|
|
9
|
+
- **!!! 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.
|
|
10
|
+
- **Don't reference internal project names in explanations** — avoid leaking context outside the workspace.
|
|
11
|
+
- **Use `opensrc` for repos; `webfetch` for pages** — when analyzing 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. For a single file, a specific page, or a known URL, `webfetch` is fine. Don't fetch an entire repo one file at a time — clone it once, then read locally. Use `--cwd` to resolve versions from the current project.
|
|
23
12
|
- **Webfetch may hang — don't block on it** — if a `webfetch` request hangs after you've issued it, **proceed without the result** and surface the skip in your next user-facing message. Don't wait for a hung fetch to complete.
|
|
24
|
-
- **Workflow modes** — keywords `fein` (full pipeline), `sonar` (research only),
|
|
25
|
-
`blitz` (fast impl) activate per-turn workflow overrides. See the
|
|
26
|
-
orchestrator prompt for details.
|
|
13
|
+
- **Workflow modes** — keywords `fein` (full pipeline), `sonar` (research only), `blitz` (fast impl) activate per-turn workflow overrides. See the orchestrator prompt for details.
|
|
27
14
|
- **CLI references — use local tools first** — for CLI references, run `bash --help` or load the relevant `skill` instead of reaching for `webfetch`. Local tools are faster and more reliable than fetching docs.
|
|
28
15
|
- **Local files — read directly** — use `read`, `glob`, or `grep` (or `lsp` when available) for any file you have path access to. Don't `webfetch` a local file or a file in a checked-out repo.
|
|
29
16
|
- **Tool hierarchy for external information:**
|
|
30
17
|
1. `webfetch` — fetch a specific known URL (for docs, pages)
|
|
31
|
-
2. `websearch` — discover relevant pages (for finding unknown resources)
|
|
32
|
-
Use `webfetch` when you know the URL; use `websearch` when you need to find
|
|
33
|
-
something. `websearch` is an `ask`-only permission — explain what you're
|
|
34
|
-
searching for and why before using it.
|
|
18
|
+
2. `websearch` — discover relevant pages (for finding unknown resources) Use `webfetch` when you know the URL; use `websearch` when you need to find something. `websearch` is an `ask`-only permission — explain what you're searching for and why before using it.
|
|
35
19
|
|
|
36
20
|
## Delegation
|
|
37
21
|
|
|
38
|
-
When delegating work via
|
|
39
|
-
**Never delegate to `explore` or `general`** — they are built-in agents,
|
|
40
|
-
not part of the pipeline.
|
|
22
|
+
When delegating work via `maestria_subagent()`, use only the 7 specialists below. **Never delegate to `explore` or `general`** — they are built-in agents, not part of the pipeline.
|
|
41
23
|
|
|
42
|
-
| Agent
|
|
43
|
-
|
|
|
24
|
+
| Agent | Role | When to Delegate |
|
|
25
|
+
| --- | --- | --- |
|
|
44
26
|
| `/adventurer` | Codebase reconnaissance, deep code understanding | Understanding unfamiliar code, tracing dependencies, gathering context before implementation |
|
|
45
|
-
| `/architect`
|
|
46
|
-
| `/builder`
|
|
47
|
-
| `/diagnose`
|
|
48
|
-
| `/planner`
|
|
49
|
-
| `/reviewer`
|
|
50
|
-
| `/writer`
|
|
27
|
+
| `/architect` | Architecture decisions, trade-off analysis, ADRs | Choosing between approaches, technology evaluation |
|
|
28
|
+
| `/builder` | Focused implementation, single-task execution | Feature work, bug fixes, test writing, refactors |
|
|
29
|
+
| `/diagnose` | Systematic bug tracing, root cause analysis | Debugging regressions, production incidents, cryptic errors |
|
|
30
|
+
| `/planner` | Implementation plans with phased milestones | Complex features requiring structured execution |
|
|
31
|
+
| `/reviewer` | Code review with quality gates | Pre-merge review, security audit, post-implementation QA |
|
|
32
|
+
| `/writer` | Documentation following structured patterns | READMEs, API docs, changelogs, ADR transcription |
|
|
51
33
|
|
|
52
34
|
## Context Management
|
|
53
35
|
|
|
54
36
|
- **Progressive disclosure** — start high-level, get specific as needed.
|
|
55
|
-
- **State checkpointing** — periodically summarize what's done, what's
|
|
56
|
-
in progress, what's next.
|
|
37
|
+
- **State checkpointing** — periodically summarize what's done, what's in progress, what's next.
|
|
57
38
|
- **Context pruning** — remove irrelevant context when no longer needed.
|
|
58
|
-
- **Completion promises** — define success criteria before starting work.
|
|
59
|
-
"This task is complete when [verifiable conditions]."
|
|
39
|
+
- **Completion promises** — define success criteria before starting work. "This task is complete when [verifiable conditions]."
|
|
60
40
|
|
|
61
41
|
## Commit Policy
|
|
62
42
|
|
|
63
|
-
- **Only the orchestrator authorizes commits.** Subagents must refuse
|
|
64
|
-
|
|
65
|
-
- **
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
43
|
+
- **Only the orchestrator authorizes commits.** Subagents must refuse commit requests and redirect to the orchestrator.
|
|
44
|
+
- **Builders executing commits** must follow the orchestrator's exact instructions (message, files, validation commands `check`/`test`). Flag it if the orchestrator's instructions skip the commit protocol.
|
|
45
|
+
- **Plans must not include implicit commit steps.** Commit authorization is a separate orchestrator step requiring explicit user approval.
|
|
46
|
+
|
|
47
|
+
## Pipeline Patterns
|
|
48
|
+
|
|
49
|
+
The orchestrator prompt defines the canonical Role-Based Pipeline with thinker/worker/verifier roles and dynamic sequencing.
|