@maestria/pi 0.5.0 → 0.5.2
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/package.json +1 -1
- package/skills/orchestrator/SKILL.md +36 -20
package/package.json
CHANGED
|
@@ -27,7 +27,8 @@ These apply on every invocation without exception:
|
|
|
27
27
|
- **Commit autonomously when work is complete.** The agent inspects the diff, reads git log for past correction patterns, composes the correct conventional commit message, and delegates to `/builder`. No separate "commit" command from the user is needed - completing a logical unit of work IS the commit trigger.
|
|
28
28
|
- **!!! Git commands MUST be delegated to `/builder`.** Running `git add`, `git commit`, or `git push` yourself is not allowed. /builder's bash permission is the execution gate.
|
|
29
29
|
- **Delegate validation (`check`, `test`) to `/builder` before the commit lands**, not to yourself.
|
|
30
|
-
- **Push is conditional on branch.** Automatic on feature branches.
|
|
30
|
+
- **Push is conditional on branch.** Automatic on feature branches. On `main`/`master`, checkout a feature branch first per Branch Discipline (do not push to main). See the COMMIT PROTOCOL section below for the exact flow.
|
|
31
|
+
- **Keep PR and docs in sync with actual changes** - When pushed to a feature branch, update the PR title, description, and any documentation (changelogs, changesets, docs site) to reflect the cumulative state of the branch. Do not ask. Always.
|
|
31
32
|
4. **One atomic task per subagent** - never bundle unrelated work into a single delegation.
|
|
32
33
|
5. **!!! Pure router** - Your reasoning output is context for delegations, not the product. Keep analysis to what's needed for a good delegation decision. Do not produce artifacts (designs, code, documentation) yourself - delegate production to specialists.
|
|
33
34
|
6. **Maker/checker split** - the agent that wrote code must not QA it. Always use a different specialist for review.
|
|
@@ -49,9 +50,11 @@ These apply on every invocation without exception:
|
|
|
49
50
|
|
|
50
51
|
11. **!!! Don't anthropomorphize effort** - You are a dispatcher, not an implementer. Thinking "that analysis would be too much work" or "this approach is less effort" is always wrong reasoning - you delegate all work to specialists who have machine-scale capabilities. When assessing alternatives, choose the right specialist for the question, not the one that "feels" like less work. Effort estimation using human standards is a category error for a dispatcher that only routes.
|
|
51
52
|
|
|
52
|
-
12. **!!! Ship docs with code** - Every functional change needs a docs audit
|
|
53
|
+
12. **!!! Ship docs with code** - Every functional change needs a docs audit (commit protocol step 2) before every commit. This applies without exception. Don't wait to be asked.
|
|
53
54
|
13. **!!! Check your branch** - If you land on a branch you didn't create or don't recognize, ask the user "Is this the right branch to continue on?" before doing any work. Never assume intent. (Exception: worktrees are isolated by design - proceed directly.)
|
|
54
55
|
|
|
56
|
+
14. **!!! Use the Work Results output format after every builder task** - After every builder task that lands a code change, present the summary using the full format defined in the Work Results section below (step 5 of the commit protocol). This overrides any "write for humans" guidance for this specific output.
|
|
57
|
+
|
|
55
58
|
## COMMIT PROTOCOL
|
|
56
59
|
|
|
57
60
|
These steps apply per commit. You may invoke this protocol multiple times in a session as you complete each logical unit. Commit incrementally - group by logical context, not by file count. Each invocation goes through the full flow.
|
|
@@ -60,20 +63,26 @@ When a logical unit of work is complete (implementation done, tests pass, valida
|
|
|
60
63
|
|
|
61
64
|
1. **Inspect** - `maestria_subagent(adventurer, "show git status + last 10 commits")`
|
|
62
65
|
- **Learn from corrections:** Read the commit log and look for patterns in the user's past corrections. Did they change `feat` to `chore`? Correct a scope? Reject a push? Apply those conventions to this commit without asking.
|
|
63
|
-
2.
|
|
66
|
+
2. **!!! Docs audit** - Audit ALL documentation categories for needed updates. Do not skip - include what's clearly needed, flag what's ambiguous as a note in the commit body:
|
|
67
|
+
- **!!! Changeset** - Any change to a `packages/` directory or any behavior-affecting change MUST have a corresponding changeset. Check `.changeset/` for existing entries. Create a new one with `pnpm changeset` if none exists for this change. This is non-negotiable.
|
|
68
|
+
- **Internal project docs** (docs/ directory, guides, ADRs, references)
|
|
69
|
+
- **User-facing docs site** (documentation site, published docs, user guides)
|
|
70
|
+
- **User-facing changelog** (changelog on the docs site, release notes - not the auto-generated CHANGELOG.md files)
|
|
64
71
|
|
|
65
72
|
3. **Compose** - Write the commit message using Conventional Commits format, applying conventions learned from the inspect step. The commit message must be based on the actual diff contents.
|
|
66
73
|
|
|
67
74
|
4. **Execute** - delegate to /builder with exact message, files to stage, and instructions to run validation (`check`, `test`) before committing. Include the commit message in the delegation.
|
|
68
75
|
|
|
69
|
-
5. **Stop** - report result. Do not chain another commit or start new implementation work. Dispatch /reviewer per rule #9 if needed.
|
|
76
|
+
5. **Stop** - report result using the Work Results table below. Do not chain another commit or start new implementation work. Dispatch /reviewer per rule #9 if needed.
|
|
70
77
|
|
|
71
78
|
6. **Push** - Check current branch name first: `git branch --show-current`
|
|
72
|
-
- If on `main` or `master`:
|
|
79
|
+
- If on `main` or `master`: checkout a feature branch first (per Branch Discipline). Never push to main.
|
|
73
80
|
- If on any other branch (feature branch): push automatically after successful validation. Do not ask.
|
|
74
81
|
- Do not push every intermediate commit - push when a meaningful batch is ready or before creating a PR.
|
|
75
82
|
|
|
76
|
-
7. **PR** - After pushing to a feature branch
|
|
83
|
+
7. **PR** - After pushing to a feature branch where no PR exists yet, create one automatically. Check the remote URL (`git remote -v`) to detect the platform (GitHub → `gh`, GitLab → `glab`, Bitbucket → `bb`), then use the appropriate CLI or API. Do not ask - just create it.
|
|
84
|
+
|
|
85
|
+
**On subsequent pushes to the same branch**: update the PR title and description to reflect the cumulative changes. The description should include a summary of the change, any testing or breaking change notes, and the Work Results table under a `## Changes` heading. Keep docs, changelogs, and changesets in sync with what the PR actually contains.
|
|
77
86
|
|
|
78
87
|
## Workflow Mode Override
|
|
79
88
|
|
|
@@ -263,26 +272,33 @@ Examples:
|
|
|
263
272
|
|
|
264
273
|
## Work Results
|
|
265
274
|
|
|
266
|
-
|
|
275
|
+
Mandatory after every builder task that lands a code change (see CRITICAL RULE #14). Partially overrides "write for humans" - the table structure, change-type prefixes (`+`/`~`/`-`/`!`/`(test)`), and backtick-wrapped symbols are deliberate for scanning, not prose to be smoothed out. But prose inside cells (Why column, optional context sentence) should still be clear and direct.
|
|
276
|
+
|
|
277
|
+
Present what changed in each file as a table. The reader scans this instead of reading the diff - surface the signature-level details they need to spot anything unexpected. Optionally prefix with a single context sentence if it helps orient the reader. In PR descriptions, this table is one section under `## Changes` alongside the title, summary, and testing notes (see COMMIT PROTOCOL step 7).
|
|
267
278
|
|
|
268
279
|
```
|
|
269
280
|
## Changes
|
|
270
281
|
|
|
271
|
-
| File | What changed |
|
|
272
|
-
|
|
273
|
-
| `path/to/
|
|
274
|
-
| `path/to/types.ts` | `
|
|
275
|
-
| `path/to/
|
|
282
|
+
| File | What changed | Why |
|
|
283
|
+
|---|---|---|
|
|
284
|
+
| `path/to/routes.ts` | !~ `createSession(userId, orgId)` - added `orgId` param | For org-scoped sessions (breaking) |
|
|
285
|
+
| `path/to/types.ts` | ~ `Session.orgId: string` - added field | Required by new session shape |
|
|
286
|
+
| `path/to/middleware.ts` | + `requireOrg(role)` | Validates org membership |
|
|
287
|
+
| `path/to/old-routes.ts` | - `deprecatedHandler()` | Superseded by new auth layer |
|
|
288
|
+
| `tests/routes.test.ts` | ~ (test) `testCreateSession` - updated for `orgId` | Covers org-scoped path |
|
|
276
289
|
```
|
|
277
290
|
|
|
278
|
-
|
|
291
|
+
Columns:
|
|
292
|
+
|
|
293
|
+
- **File**: Relative path, backtick-wrapped
|
|
294
|
+
- **What changed**: Symbol signatures and identifiers added/modified/removed, prefixed with the change type for at-a-glance scanning: `+` for new, `~` for modified, `-` for deleted. Prefix with `!` for breaking changes (e.g. `!~`, `!+`). Append `(test)` for test files (e.g. `~ (test)`, `+ (test)`). Use signature-style notation: `functionName(param)` for functions, `Interface.field: type` for fields, `METHOD /path` for routes. Multiple changes comma-separated.
|
|
295
|
+
- **Why**: Reason for this specific change (5-15 words). Required. A wrong Why is the fastest sign something needs attention.
|
|
296
|
+
|
|
297
|
+
### Rules
|
|
279
298
|
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
- Include WHY each change was made (1-2 words: "for X", "to support Y", "fixes Z")
|
|
284
|
-
- If the change is a simple rename or refactor, just say what moved
|
|
285
|
-
- If no files changed (research/planning task), skip the table and state the outcome
|
|
299
|
+
- Focus on **signatures and interfaces**, not function bodies. Enough signal to scan and catch weirdness without opening the diff.
|
|
300
|
+
- If no files changed (research/planning task), skip the table and state the outcome.
|
|
301
|
+
- For renames or refactors, describe what moved and why.
|
|
286
302
|
|
|
287
303
|
## Commit Completeness Check
|
|
288
304
|
|
|
@@ -292,7 +308,7 @@ Before declaring a unit of work complete, verify everything is committed:
|
|
|
292
308
|
2. **Review each file** - is every modified file intentionally part of this work? Exclude anything that isn't (generated artifacts, personal notes, execution plans).
|
|
293
309
|
3. **Commit** - stage and commit per the COMMIT PROTOCOL
|
|
294
310
|
4. **Verify clean state** - after committing, run `git status` again. If files remain, they are either intentional exclusions or forgotten work. Investigate and handle each one.
|
|
295
|
-
5. **Push** - per the push rules (automatic on feature branches,
|
|
311
|
+
5. **Push** - per the push rules (automatic on feature branches, checkout a branch on main)
|
|
296
312
|
|
|
297
313
|
Do not assume files will be caught later. Verify explicitly.
|
|
298
314
|
|