principal-pi-skills 4.1.0 → 4.2.0
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/CHANGELOG.md +14 -0
- package/README.md +10 -3
- package/agents/principal-build.md +6 -2
- package/agents/principal-plan.md +3 -1
- package/agents/principal-review.md +16 -3
- package/package.json +1 -1
- package/plan/SKILL.md +3 -1
- package/prompts/principal-bugfix.md +17 -9
- package/prompts/principal-feature.md +17 -9
- package/prompts/principal-refactor.md +17 -9
- package/review/SKILL.md +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,20 @@ Where review revealed a prior claim or design decision didn't hold up under clos
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [4.2.0] — 2026-09-21
|
|
10
|
+
|
|
11
|
+
**Cheaper loops, borrowed from superpowers' subagent-driven development.** A delegated
|
|
12
|
+
`principal-build` now writes its full report to `.principal/reports/<step>-build.md` and
|
|
13
|
+
returns five status lines, so reports stop accumulating in the steering context. Review is
|
|
14
|
+
handed a diff package (`git diff --stat` + full diff, one file) and the build reports; it
|
|
15
|
+
treats a verbatim `Full evidence:` line as test evidence and runs a test only for a named
|
|
16
|
+
doubt, instead of rebuilding a worktree and re-running the suite on every call. Repair rounds
|
|
17
|
+
resume the build agent when the tool allows and get a **scoped re-review** (agent form only):
|
|
18
|
+
each open finding ID is verdicted ADDRESSED or NOT ADDRESSED, new breakage is checked in the
|
|
19
|
+
fix diff alone. Plan batches same-shape edits across files into one step. The spines name
|
|
20
|
+
the model tier per review: strongest for the whole-change review, mid-tier for scoped
|
|
21
|
+
re-reviews. Skill forms of build and review are unchanged except review's evidence rule.
|
|
22
|
+
|
|
9
23
|
## [4.1.0] — 2026-09-21
|
|
10
24
|
|
|
11
25
|
**Added.** Two prompt templates. `/principal-refactor <scope>` is the feature spine with a
|
package/README.md
CHANGED
|
@@ -44,9 +44,9 @@ around.
|
|
|
44
44
|
|---|---|---|---|
|
|
45
45
|
| `decide` | Options and stress-tests for a decision that isn't settled — "should I", "what are my options", "I'm stuck" | inline | 1053 |
|
|
46
46
|
| `architect` | System design from measurable drivers; significant or irreversible technical choices. The decision record is a section of the output, not a separate artifact | inline | 1145 |
|
|
47
|
-
| `plan` | A task turned into ordered steps and per-step specs a builder can execute without making load-bearing decisions. Writes no code | subagent (`agents/principal-plan.md`,
|
|
48
|
-
| `build` | Test-first implementation — code proven by a test you watched fail | subagent (`agents/principal-build.md`,
|
|
49
|
-
| `review` | One pass, two axes — correctness and simplicity — ending in one severity-ranked verdict | subagent (`agents/principal-review.md`,
|
|
47
|
+
| `plan` | A task turned into ordered steps and per-step specs a builder can execute without making load-bearing decisions. Writes no code | subagent (`agents/principal-plan.md`, 1457) or inline | 1236 |
|
|
48
|
+
| `build` | Test-first implementation — code proven by a test you watched fail | subagent (`agents/principal-build.md`, 1239) or inline | 1111 |
|
|
49
|
+
| `review` | One pass, two axes — correctness and simplicity — ending in one severity-ranked verdict | subagent (`agents/principal-review.md`, 1393) or inline | 1293 |
|
|
50
50
|
| `debug` | Hypothesis before fix: a diagnosis loop ending in a note with root cause and a regression test | subagent (`agents/principal-debug.md`, 1455) or inline | 1321 |
|
|
51
51
|
| `git-ops` | Safe version-control operator — reads state before writing it, keeps published history immutable, scans for secrets before committing | inline, never delegated | 1976 |
|
|
52
52
|
|
|
@@ -72,6 +72,13 @@ before building — presenting the artifact and starting to build in the same tu
|
|
|
72
72
|
failure the rule exists to catch. The artifact scales with the change (three lines for a
|
|
73
73
|
config tweak, full slices for a feature); the stop does not.
|
|
74
74
|
|
|
75
|
+
Delegated phases hand artifacts to each other as files, not pasted text. A `principal-build`
|
|
76
|
+
writes its full report to `.principal/reports/<step>-build.md` and returns five status lines;
|
|
77
|
+
review is handed one diff package for the whole change plus those reports, treats a verbatim
|
|
78
|
+
test-result line as evidence, and runs a test only for a named doubt. A repair round resumes
|
|
79
|
+
the build agent where the tool allows and gets a scoped re-review of the fix diff against the
|
|
80
|
+
open finding IDs. The `.principal/` directory ignores itself, so none of this reaches git.
|
|
81
|
+
|
|
75
82
|
When plan's output is the multi-step template, it writes the plan to
|
|
76
83
|
`.principal/plans/<slug>.md` and prints the path; `.principal/.gitignore` is created
|
|
77
84
|
alongside it on first use, so the directory is git-ignored and self-ignoring. Delegated
|
|
@@ -12,8 +12,12 @@ allowed-tools: read, grep, find, ls, edit, write, bash
|
|
|
12
12
|
# Build — Test-First Implementation
|
|
13
13
|
|
|
14
14
|
You run in an isolated context and cannot ask questions. **The caller receives ONLY your
|
|
15
|
-
final message
|
|
16
|
-
|
|
15
|
+
final message.** Write the complete implementation report below to the report path the
|
|
16
|
+
caller names (default `.principal/reports/<step>-build.md`; create the directory), then make
|
|
17
|
+
your final message exactly five lines: `Next:`, `Changed paths:`, `Findings applied:`,
|
|
18
|
+
`Tests:` (the verbatim result line), `Report:` (the path). The caller reads the file only
|
|
19
|
+
when routing needs more; everything else you print is lost. You receive a plan file path and
|
|
20
|
+
a step number: read that step and implement exactly it. When no
|
|
17
21
|
plan file is given, the task in your prompt — a fix with a known cause, or a list of
|
|
18
22
|
accepted `[REV-…]` findings to repair — is the whole spec; implement exactly that. If the
|
|
19
23
|
step contradicts the codebase, implement nothing on the contested point and report it under
|
package/agents/principal-plan.md
CHANGED
|
@@ -56,7 +56,9 @@ behavior, and the test that proves it.
|
|
|
56
56
|
done-signal. Never plan horizontal layers ("all models, then all services") — that saves
|
|
57
57
|
integration risk for last, where it is most expensive.
|
|
58
58
|
5. **Slice vertically.** Each later step is a small end-to-end increment, independently
|
|
59
|
-
testable, roughly a day or less of work.
|
|
59
|
+
testable, roughly a day or less of work. Small edits of the same shape repeated across files
|
|
60
|
+
(one rename, constant, or field, N places) are ONE step listing every file, not N steps —
|
|
61
|
+
each step costs a fresh builder.
|
|
60
62
|
6. **Spec each step concretely**: files to touch, signatures, exact behavior, the test
|
|
61
63
|
that proves it, and ripples (callers of changed signatures, config, migrations). If
|
|
62
64
|
the builder would have to make a design decision you skipped, the spec isn't done.
|
|
@@ -63,8 +63,13 @@ ships is a failed review.
|
|
|
63
63
|
still contain the original's guards — code you present as "cleaner" that drops a
|
|
64
64
|
validation or weakens a security compare is a bug you just authored. If the only way
|
|
65
65
|
smaller is through a safeguard, the verdict is KEEP; say so.
|
|
66
|
-
4. **Verify
|
|
67
|
-
(
|
|
66
|
+
4. **Verify with the cheapest evidence that settles it.** A diff package the caller hands you
|
|
67
|
+
(`git diff --stat` plus the full base..head diff in one file) is your view of a committed
|
|
68
|
+
change: read it once and do not re-derive it. The build report's `Full evidence:` line,
|
|
69
|
+
when it names the exact command and a verbatim result, is test evidence — do not re-run
|
|
70
|
+
the suite to confirm it; run one targeted test only when reading the code raises a
|
|
71
|
+
specific doubt, and say which doubt. Destructive probes (revert the fix, break an input)
|
|
72
|
+
and any run against a dirty tree belong in a disposable copy, never the caller checkout:
|
|
68
73
|
`npx -p principal-pi-skills principal-pi-workspace create` prints a throwaway worktree
|
|
69
74
|
holding the exact working state. Work there, then `remove` it. If creation fails, only
|
|
70
75
|
read or run a read-only check and return UNVERIFIED; never mutate the caller checkout.
|
|
@@ -72,6 +77,13 @@ ships is a failed review.
|
|
|
72
77
|
(show smaller code for simplifications). Order by severity; Top concern is the highest.
|
|
73
78
|
Clean code gets “verified, no blockers” — never manufacture findings.
|
|
74
79
|
|
|
80
|
+
## Scoped re-review
|
|
81
|
+
When the caller supplies open finding IDs and a fix diff, you are judging the fix, not the
|
|
82
|
+
change: for each ID return `ADDRESSED` or `NOT ADDRESSED` with `file:line` evidence, flag new
|
|
83
|
+
breakage inside the fix diff only, and leave untouched code alone — an observation outside
|
|
84
|
+
the fix diff goes under Follow-ups, never into Findings. The verdict is APPROVE when every ID
|
|
85
|
+
is addressed and nothing new broke.
|
|
86
|
+
|
|
75
87
|
## Right-sizing
|
|
76
88
|
Depth scales with blast radius. A described one-character/typo-level fix with no behavior
|
|
77
89
|
change gets one line — "fine, ship it" — from the description alone: don't demand the
|
|
@@ -110,9 +122,10 @@ partial verdict.
|
|
|
110
122
|
## Checks
|
|
111
123
|
| If you are about to… | Instead |
|
|
112
124
|
|---|---|
|
|
113
|
-
| Approve without
|
|
125
|
+
| Approve without evidence — neither a verbatim test result in the report nor a run of your own | Get one, or mark UNVERIFIED. |
|
|
114
126
|
| Flag a fallback that logs, counts, or returns real data as a swallow | It is observable. Review the DEGRADATION, not its existence. |
|
|
115
127
|
| Return BLOCKED because the workspace is empty | A described change is reviewable. BLOCKED needs no code AND no description. |
|
|
128
|
+
| Re-run the whole suite that the build report already shows green | The report line is the evidence; run one targeted test only for a named doubt. |
|
|
116
129
|
| Write "LGTM" with no findings on a non-trivial change | Name what you checked, even if the result is "checked X, Y, Z — clean". |
|
|
117
130
|
| Flag style while a real bug sits unmentioned | Correctness findings first; taste is the last 5%. |
|
|
118
131
|
| Delete a safeguard to shrink the diff | The floor holds. Verdict on that code is KEEP. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principal-pi-skills",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Skill framework for principal-level software engineering: seven dual-use skills (decide, architect, plan, build, review, debug, git-ops), a pi bootstrap, and two approval-gated workflows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nemanja Alavanja",
|
package/plan/SKILL.md
CHANGED
|
@@ -39,7 +39,9 @@ behavior, and the test that proves it.
|
|
|
39
39
|
done-signal. Never plan horizontal layers ("all models, then all services") — that saves
|
|
40
40
|
integration risk for last, where it is most expensive.
|
|
41
41
|
5. **Slice vertically.** Each later step is a small end-to-end increment, independently
|
|
42
|
-
testable, roughly a day or less of work.
|
|
42
|
+
testable, roughly a day or less of work. Small edits of the same shape repeated across files
|
|
43
|
+
(one rename, constant, or field, N places) are ONE step listing every file, not N steps —
|
|
44
|
+
each step costs a fresh builder.
|
|
43
45
|
6. **Spec each step concretely**: files to touch, signatures, exact behavior, the test
|
|
44
46
|
that proves it, and ripples (callers of changed signatures, config, migrations). If
|
|
45
47
|
the builder would have to make a design decision you skipped, the spec isn't done.
|
|
@@ -21,17 +21,25 @@ build until the user says go. Presenting the artifact and starting to build in t
|
|
|
21
21
|
is the failure. The artifact scales — three lines for a config change, full slices for a
|
|
22
22
|
feature — the stop does not. A re-plan needs a new approval.
|
|
23
23
|
|
|
24
|
-
**Build.** One writer at a time, on a branch the user can see. Inline when there is no
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
the
|
|
24
|
+
**Build.** One writer at a time, on a branch the user can see. Inline when there is no
|
|
25
|
+
multi-step plan file (a three-line plan, or a bugfix) or the subagent tool is absent.
|
|
26
|
+
Otherwise dispatch one fresh `principal-build` per step — a batched step is one dispatch —
|
|
27
|
+
with the plan file path, the step number, and a report path
|
|
28
|
+
`.principal/reports/<step>-build.md`. It returns five status lines; read the report file only
|
|
29
|
+
when routing needs more, and never paste a report into a later dispatch. Choose the cheapest
|
|
30
|
+
model that can transcribe a complete step spec.
|
|
29
31
|
|
|
30
32
|
**Review.** Always delegate to `principal-review` when the tool exists — a cold read beats
|
|
31
|
-
self-review.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`
|
|
33
|
+
self-review. Hand it files, not prose: write `git diff --stat` and `git diff -U6 <base>..<head>`
|
|
34
|
+
for the whole change to `.principal/reports/review-diff.txt` and pass that path plus the build
|
|
35
|
+
report paths; review judges from them and runs a test only for a named doubt. Use the
|
|
36
|
+
strongest available model for this review. `CHANGES-REQUESTED` → decide which findings are
|
|
37
|
+
accepted; then repair with exactly those IDs — resume the build agent that made the change
|
|
38
|
+
when your tool can, otherwise a fresh dispatch — then a scoped re-review: the open IDs and the
|
|
39
|
+
fix diff only, on a mid-tier model, verdicting each ID. At most two repair rounds; a third means
|
|
40
|
+
the plan or diagnosis was wrong. `UNVERIFIED` is not approval: fix whatever blocked
|
|
41
|
+
verification, then review again; it counts as a repair round. `APPROVE` or `APPROVE-WITH-NITS`
|
|
42
|
+
→ git-ops.
|
|
35
43
|
|
|
36
44
|
**Blocked.** A phase returning `BLOCKED` stops the chain: surface its one question and
|
|
37
45
|
wait. Do not answer it yourself.
|
|
@@ -21,17 +21,25 @@ build until the user says go. Presenting the artifact and starting to build in t
|
|
|
21
21
|
is the failure. The artifact scales — three lines for a config change, full slices for a
|
|
22
22
|
feature — the stop does not. A re-plan needs a new approval.
|
|
23
23
|
|
|
24
|
-
**Build.** One writer at a time, on a branch the user can see. Inline when there is no
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
the
|
|
24
|
+
**Build.** One writer at a time, on a branch the user can see. Inline when there is no
|
|
25
|
+
multi-step plan file (a three-line plan, or a bugfix) or the subagent tool is absent.
|
|
26
|
+
Otherwise dispatch one fresh `principal-build` per step — a batched step is one dispatch —
|
|
27
|
+
with the plan file path, the step number, and a report path
|
|
28
|
+
`.principal/reports/<step>-build.md`. It returns five status lines; read the report file only
|
|
29
|
+
when routing needs more, and never paste a report into a later dispatch. Choose the cheapest
|
|
30
|
+
model that can transcribe a complete step spec.
|
|
29
31
|
|
|
30
32
|
**Review.** Always delegate to `principal-review` when the tool exists — a cold read beats
|
|
31
|
-
self-review.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`
|
|
33
|
+
self-review. Hand it files, not prose: write `git diff --stat` and `git diff -U6 <base>..<head>`
|
|
34
|
+
for the whole change to `.principal/reports/review-diff.txt` and pass that path plus the build
|
|
35
|
+
report paths; review judges from them and runs a test only for a named doubt. Use the
|
|
36
|
+
strongest available model for this review. `CHANGES-REQUESTED` → decide which findings are
|
|
37
|
+
accepted; then repair with exactly those IDs — resume the build agent that made the change
|
|
38
|
+
when your tool can, otherwise a fresh dispatch — then a scoped re-review: the open IDs and the
|
|
39
|
+
fix diff only, on a mid-tier model, verdicting each ID. At most two repair rounds; a third means
|
|
40
|
+
the plan or diagnosis was wrong. `UNVERIFIED` is not approval: fix whatever blocked
|
|
41
|
+
verification, then review again; it counts as a repair round. `APPROVE` or `APPROVE-WITH-NITS`
|
|
42
|
+
→ git-ops.
|
|
35
43
|
|
|
36
44
|
**Blocked.** A phase returning `BLOCKED` stops the chain: surface its one question and
|
|
37
45
|
wait. Do not answer it yourself.
|
|
@@ -21,17 +21,25 @@ build until the user says go. Presenting the artifact and starting to build in t
|
|
|
21
21
|
is the failure. The artifact scales — three lines for a config change, full slices for a
|
|
22
22
|
feature — the stop does not. A re-plan needs a new approval.
|
|
23
23
|
|
|
24
|
-
**Build.** One writer at a time, on a branch the user can see. Inline when there is no
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
the
|
|
24
|
+
**Build.** One writer at a time, on a branch the user can see. Inline when there is no
|
|
25
|
+
multi-step plan file (a three-line plan, or a bugfix) or the subagent tool is absent.
|
|
26
|
+
Otherwise dispatch one fresh `principal-build` per step — a batched step is one dispatch —
|
|
27
|
+
with the plan file path, the step number, and a report path
|
|
28
|
+
`.principal/reports/<step>-build.md`. It returns five status lines; read the report file only
|
|
29
|
+
when routing needs more, and never paste a report into a later dispatch. Choose the cheapest
|
|
30
|
+
model that can transcribe a complete step spec.
|
|
29
31
|
|
|
30
32
|
**Review.** Always delegate to `principal-review` when the tool exists — a cold read beats
|
|
31
|
-
self-review.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`
|
|
33
|
+
self-review. Hand it files, not prose: write `git diff --stat` and `git diff -U6 <base>..<head>`
|
|
34
|
+
for the whole change to `.principal/reports/review-diff.txt` and pass that path plus the build
|
|
35
|
+
report paths; review judges from them and runs a test only for a named doubt. Use the
|
|
36
|
+
strongest available model for this review. `CHANGES-REQUESTED` → decide which findings are
|
|
37
|
+
accepted; then repair with exactly those IDs — resume the build agent that made the change
|
|
38
|
+
when your tool can, otherwise a fresh dispatch — then a scoped re-review: the open IDs and the
|
|
39
|
+
fix diff only, on a mid-tier model, verdicting each ID. At most two repair rounds; a third means
|
|
40
|
+
the plan or diagnosis was wrong. `UNVERIFIED` is not approval: fix whatever blocked
|
|
41
|
+
verification, then review again; it counts as a repair round. `APPROVE` or `APPROVE-WITH-NITS`
|
|
42
|
+
→ git-ops.
|
|
35
43
|
|
|
36
44
|
**Blocked.** A phase returning `BLOCKED` stops the chain: surface its one question and
|
|
37
45
|
wait. Do not answer it yourself.
|
package/review/SKILL.md
CHANGED
|
@@ -56,8 +56,13 @@ ships is a failed review.
|
|
|
56
56
|
still contain the original's guards — code you present as "cleaner" that drops a
|
|
57
57
|
validation or weakens a security compare is a bug you just authored. If the only way
|
|
58
58
|
smaller is through a safeguard, the verdict is KEEP; say so.
|
|
59
|
-
4. **Verify
|
|
60
|
-
(
|
|
59
|
+
4. **Verify with the cheapest evidence that settles it.** A diff package the caller hands you
|
|
60
|
+
(`git diff --stat` plus the full base..head diff in one file) is your view of a committed
|
|
61
|
+
change: read it once and do not re-derive it. The build report's `Full evidence:` line,
|
|
62
|
+
when it names the exact command and a verbatim result, is test evidence — do not re-run
|
|
63
|
+
the suite to confirm it; run one targeted test only when reading the code raises a
|
|
64
|
+
specific doubt, and say which doubt. Destructive probes (revert the fix, break an input)
|
|
65
|
+
and any run against a dirty tree belong in a disposable copy, never the caller checkout:
|
|
61
66
|
`npx -p principal-pi-skills principal-pi-workspace create` prints a throwaway worktree
|
|
62
67
|
holding the exact working state. Work there, then `remove` it. If creation fails, only
|
|
63
68
|
read or run a read-only check and return UNVERIFIED; never mutate the caller checkout.
|
|
@@ -107,9 +112,10 @@ partial verdict.
|
|
|
107
112
|
## Checks
|
|
108
113
|
| If you are about to… | Instead |
|
|
109
114
|
|---|---|
|
|
110
|
-
| Approve without
|
|
115
|
+
| Approve without evidence — neither a verbatim test result in the report nor a run of your own | Get one, or mark UNVERIFIED. |
|
|
111
116
|
| Flag a fallback that logs, counts, or returns real data as a swallow | It is observable. Review the DEGRADATION, not its existence. |
|
|
112
117
|
| Return BLOCKED because the workspace is empty | A described change is reviewable. BLOCKED needs no code AND no description. |
|
|
118
|
+
| Re-run the whole suite that the build report already shows green | The report line is the evidence; run one targeted test only for a named doubt. |
|
|
113
119
|
| Write "LGTM" with no findings on a non-trivial change | Name what you checked, even if the result is "checked X, Y, Z — clean". |
|
|
114
120
|
| Flag style while a real bug sits unmentioned | Correctness findings first; taste is the last 5%. |
|
|
115
121
|
| Delete a safeguard to shrink the diff | The floor holds. Verdict on that code is KEEP. |
|