gentle-pi 0.2.0 → 0.2.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/README.md +36 -13
- package/assets/orchestrator.md +82 -17
- package/package.json +3 -2
- package/skills/gentle-ai/SKILL.md +11 -2
package/README.md
CHANGED
|
@@ -43,19 +43,19 @@ Most coding-agent sessions fail for operational reasons, not model reasons:
|
|
|
43
43
|
|
|
44
44
|
## What it adds
|
|
45
45
|
|
|
46
|
-
| Capability | What it does
|
|
47
|
-
| ------------------------------ |
|
|
48
|
-
| **el Gentleman persona** | Makes Pi behave like a senior architect and teacher, not a generic chatbot. Spanish responses use Rioplatense voseo by default.
|
|
46
|
+
| Capability | What it does |
|
|
47
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| **el Gentleman persona** | Makes Pi behave like a senior architect and teacher, not a generic chatbot. Spanish responses use Rioplatense voseo by default. |
|
|
49
49
|
| **Rose startup intro** | Adds a pink rose fade-in, compact project/runtime panel, and visible startup collaboration credit for @aporcelli's `pi-gentle-startup` ideas. |
|
|
50
|
-
| **Work routing discipline** | Small tasks stay inline. Context-heavy exploration can be delegated. Large or risky changes go through SDD/OpenSpec.
|
|
51
|
-
| **SDD/OpenSpec assets** | Installs phase agents and chains for `init`, `explore`, `proposal`, `spec`, `design`, `tasks`, `apply`, `verify`, and `archive`.
|
|
52
|
-
| **Subagent orchestration** | Keeps one parent session responsible while child agents explore, implement, test, or review with focused context.
|
|
53
|
-
| **Strict TDD support** | When project config declares a test command, apply/verify phases must record RED → GREEN → TRIANGULATE → REFACTOR evidence.
|
|
54
|
-
| **Reviewer protection** | Surfaces review workload risk before a task turns into an oversized PR.
|
|
55
|
-
| **Per-agent model assignment** | Pi-native modal for assigning stronger or cheaper models to specific SDD/custom agents.
|
|
56
|
-
| **Skill discovery registry** | Maintains `.atl/skill-registry.md` from project and user skills so review/comment/PR workflows do not silently miss the right skill.
|
|
57
|
-
| **Delivery skills** | Includes issue-first PRs, chained PRs, work-unit commits, cognitive docs, comment writing, and Judgment Day review.
|
|
58
|
-
| **Shell safety** | Blocks destructive shell commands and asks for confirmation for sensitive operations.
|
|
50
|
+
| **Work routing discipline** | Small tasks stay inline. Context-heavy exploration can be delegated. Large or risky changes go through SDD/OpenSpec. |
|
|
51
|
+
| **SDD/OpenSpec assets** | Installs phase agents and chains for `init`, `explore`, `proposal`, `spec`, `design`, `tasks`, `apply`, `verify`, and `archive`. |
|
|
52
|
+
| **Subagent orchestration** | Keeps one parent session responsible while child agents explore, implement, test, or review with focused context. |
|
|
53
|
+
| **Strict TDD support** | When project config declares a test command, apply/verify phases must record RED → GREEN → TRIANGULATE → REFACTOR evidence. |
|
|
54
|
+
| **Reviewer protection** | Surfaces review workload risk before a task turns into an oversized PR. |
|
|
55
|
+
| **Per-agent model assignment** | Pi-native modal for assigning stronger or cheaper models to specific SDD/custom agents. |
|
|
56
|
+
| **Skill discovery registry** | Maintains `.atl/skill-registry.md` from project and user skills so review/comment/PR workflows do not silently miss the right skill. |
|
|
57
|
+
| **Delivery skills** | Includes issue-first PRs, chained PRs, work-unit commits, cognitive docs, comment writing, and Judgment Day review. |
|
|
58
|
+
| **Shell safety** | Blocks destructive shell commands and asks for confirmation for sensitive operations. |
|
|
59
59
|
|
|
60
60
|
## Install
|
|
61
61
|
|
|
@@ -110,7 +110,27 @@ Typical flow:
|
|
|
110
110
|
| Unknown codebase area or context-heavy investigation | Focused subagent delegation. |
|
|
111
111
|
| Large, ambiguous, architectural, product-facing, or high-review-risk change | SDD/OpenSpec flow. |
|
|
112
112
|
|
|
113
|
-
The goal is not ceremony. The goal is to avoid accidental chaos.
|
|
113
|
+
The goal is not ceremony. The goal is to avoid accidental chaos. Once a task stops being small, delegation is expected rather than optional.
|
|
114
|
+
|
|
115
|
+
### Delegation triggers
|
|
116
|
+
|
|
117
|
+
`gentle-pi` keeps the parent session thin and uses subagents at the narrowest useful point:
|
|
118
|
+
|
|
119
|
+
| Trigger | Expected behavior |
|
|
120
|
+
| --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
121
|
+
| Reading 4+ files to understand a flow | Launch `scout` or `context-builder` and synthesize its handoff. |
|
|
122
|
+
| Touching 2+ non-trivial code files | Use one `worker`, or require fresh review before completion. |
|
|
123
|
+
| Commit, push, or PR after code changes | Run a fresh-context `reviewer` unless the diff is trivial docs/text. |
|
|
124
|
+
| Wrong cwd, worktree/git accident, merge recovery, confusing test/env issue | Stop and run a fresh audit reviewer before continuing. |
|
|
125
|
+
| Long monolithic session with accumulating complexity, roughly 20 tool calls, 5 exploratory reads, or 2 non-mechanical edits | Pause and delegate or explain why not. |
|
|
126
|
+
|
|
127
|
+
The intended balanced loop for a bounded bugfix is:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
parent git/status + clarify → scout when context-heavy → one worker writes → fresh reviewer audits → parent validates and reports
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Fresh reviewers are intentionally not token-saving devices; they buy independent judgment. `scout`/`context-builder` save parent context by compressing broad exploration. `worker` preserves a single writer thread.
|
|
114
134
|
|
|
115
135
|
## SDD/OpenSpec flow
|
|
116
136
|
|
|
@@ -290,6 +310,7 @@ Memory contract for SDD delegation:
|
|
|
290
310
|
| Path | Purpose |
|
|
291
311
|
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
292
312
|
| `extensions/gentle-ai.ts` | Injects identity, installs assets, registers commands, applies model config, and protects shell execution. |
|
|
313
|
+
| `extensions/startup-banner.ts` | Shows the rose startup intro, compact runtime panel, and collaboration credit. |
|
|
293
314
|
| `extensions/sdd-init.ts` | Registers `/sdd-init` for OpenSpec initialization. |
|
|
294
315
|
| `extensions/skill-registry.ts` | Maintains `.atl/skill-registry.md` from project/user skills. |
|
|
295
316
|
| `assets/orchestrator.md` | Parent-session orchestration contract. |
|
|
@@ -312,6 +333,8 @@ Validate before publishing:
|
|
|
312
333
|
```bash
|
|
313
334
|
bun build extensions/skill-registry.ts --target=node --format=esm --outfile=/tmp/skill-registry.js
|
|
314
335
|
node --experimental-strip-types --check extensions/gentle-ai.ts
|
|
336
|
+
node --experimental-strip-types --check extensions/sdd-init.ts
|
|
337
|
+
node --experimental-strip-types --check extensions/startup-banner.ts
|
|
315
338
|
npm pack --dry-run
|
|
316
339
|
```
|
|
317
340
|
|
package/assets/orchestrator.md
CHANGED
|
@@ -25,6 +25,18 @@ You are a COORDINATOR, not the default executor for substantial work. Maintain o
|
|
|
25
25
|
|
|
26
26
|
Keep synthesis short by default: decision, outcome, next action. Expand only when the user asks or the situation requires detail.
|
|
27
27
|
|
|
28
|
+
## Language Boundary
|
|
29
|
+
|
|
30
|
+
User-facing conversation should stay in the user's language and follow the currently selected persona mode. In `gentleman` mode, Spanish uses natural Rioplatense voseo. In `neutral` mode, Spanish stays neutral/professional without regional expression.
|
|
31
|
+
|
|
32
|
+
Subagent-facing prompts should be written in English by default, even when the user speaks Spanish. Translate the user's request into concise English before delegation. This keeps token usage lower and gives built-in/project subagents a consistent operating language without changing the user-facing persona.
|
|
33
|
+
|
|
34
|
+
Exceptions:
|
|
35
|
+
|
|
36
|
+
- Preserve exact user quotes, UI copy, error messages, filenames, commands, and domain terms in their original language when they are evidence.
|
|
37
|
+
- Ask a subagent to produce Spanish only when its output is intended to be pasted directly to the user, a PR/comment/reply in Spanish, or Spanish-language product/documentation text.
|
|
38
|
+
- SDD/OpenSpec artifact content may follow the project's established language, but phase task instructions to subagents should still be English.
|
|
39
|
+
|
|
28
40
|
## Mental Model
|
|
29
41
|
|
|
30
42
|
el Gentleman is an ecosystem configurator and harness layer. After installation, the user should not memorize workflows or manually wire agents. The package should get out of the way:
|
|
@@ -34,9 +46,11 @@ el Gentleman is an ecosystem configurator and harness layer. After installation,
|
|
|
34
46
|
- User says "use sdd" / "hacelo con sdd": run the SDD flow.
|
|
35
47
|
- Parent session orchestrates; phase agents execute.
|
|
36
48
|
|
|
49
|
+
Delegation is not optional once complexity appears. If a task crosses the triggers below, use the smallest useful subagent workflow instead of continuing as a monolithic executor.
|
|
50
|
+
|
|
37
51
|
## Work Routing Ladder
|
|
38
52
|
|
|
39
|
-
Route work through the smallest harness that is safe.
|
|
53
|
+
Route work through the smallest harness that is safe. "Smallest" means minimal safe coordination, not zero delegation by default.
|
|
40
54
|
|
|
41
55
|
### 1. Inline Direct
|
|
42
56
|
|
|
@@ -49,7 +63,7 @@ Examples:
|
|
|
49
63
|
- focused verification over 1-3 files;
|
|
50
64
|
- bash for state, e.g. `git status` or `gh issue view`.
|
|
51
65
|
|
|
52
|
-
Do not add SDD ceremony. Do not delegate just to look sophisticated.
|
|
66
|
+
Do not add SDD ceremony. Do not delegate just to look sophisticated. But do not use this exception to avoid delegation after the task stops being small.
|
|
53
67
|
|
|
54
68
|
### 2. Simple Delegation
|
|
55
69
|
|
|
@@ -66,6 +80,14 @@ Examples:
|
|
|
66
80
|
|
|
67
81
|
Use `pi-subagents` when available. Prefer background/async for long exploration, implementation, tests, or review when the parent has independent work.
|
|
68
82
|
|
|
83
|
+
Default balanced pattern for bounded implementation:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
parent clarifies and checks git → scout/context-builder when context-heavy → one worker writes → fresh reviewer audits diff → parent validates and reports
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Do not make every task SDD. Do make non-trivial tasks multi-agent at the narrowest useful point.
|
|
90
|
+
|
|
69
91
|
### 3. SDD
|
|
70
92
|
|
|
71
93
|
Use SDD for large, ambiguous, architectural, product-facing, multi-area, or high-review-risk work.
|
|
@@ -85,15 +107,58 @@ If the request is large enough for SDD, do not jump directly to implementation.
|
|
|
85
107
|
|
|
86
108
|
Core question: does this inflate parent context without need?
|
|
87
109
|
|
|
88
|
-
| Action
|
|
89
|
-
|
|
90
|
-
| Read to decide/verify 1-3 files
|
|
91
|
-
| Read to explore/understand 4+ files
|
|
92
|
-
| Read as preparation for multi-file writing
|
|
93
|
-
| Write atomic one-file mechanical change
|
|
94
|
-
| Write with analysis across multiple files
|
|
95
|
-
| Bash for state, e.g. git status
|
|
96
|
-
| Bash for execution, e.g. tests/builds
|
|
110
|
+
| Action | Inline | Delegate |
|
|
111
|
+
| ---------------------------------------------------- | -----: | ----------------------: |
|
|
112
|
+
| Read to decide/verify 1-3 files | yes | no |
|
|
113
|
+
| Read to explore/understand 4+ files | no | yes |
|
|
114
|
+
| Read as preparation for multi-file writing | no | yes |
|
|
115
|
+
| Write atomic one-file mechanical change | yes | no |
|
|
116
|
+
| Write with analysis across multiple files | no | yes |
|
|
117
|
+
| Bash for state, e.g. git status | yes | no |
|
|
118
|
+
| Bash for execution, e.g. tests/builds | no | yes |
|
|
119
|
+
| Commit, push, or open PR after code changes | no | yes, fresh review first |
|
|
120
|
+
| Recover from wrong cwd/worktree/git/tooling incident | no | yes, fresh audit first |
|
|
121
|
+
|
|
122
|
+
### Mandatory Delegation Triggers
|
|
123
|
+
|
|
124
|
+
These are parent-orchestrator stop rules. Once any trigger fires, the parent must either delegate or explicitly tell the user why delegation would be unsafe or wasteful for this exact case. Do not inject these as child-agent permission to spawn subagents; children receive concrete role work and must not orchestrate.
|
|
125
|
+
|
|
126
|
+
1. **4-file rule**: if understanding requires reading 4+ files, launch `scout` or `context-builder` with fresh context and a narrow mapping task.
|
|
127
|
+
2. **Multi-file write rule**: if implementation will touch 2+ non-trivial files, use one `worker` or keep writing inline only if a fresh reviewer will audit before completion.
|
|
128
|
+
3. **PR rule**: before commit/push/PR for code changes, run a fresh-context `reviewer` unless the diff is a trivial docs/text-only change.
|
|
129
|
+
4. **Incident rule**: after wrong `cwd`, accidental repo/worktree mutation, failed merge recovery, confusing test command, or environment workaround, stop and run a fresh audit reviewer.
|
|
130
|
+
5. **Long-session rule**: if accumulating work is no longer clearly local — roughly 20 tool calls, 5 exploratory file reads, or 2 non-mechanical edits without delegation — pause and choose `scout`, `worker`, or `reviewer` instead of silently continuing monolithically.
|
|
131
|
+
6. **Fresh review rule**: use `context: "fresh"` for adversarial review of diffs, conflicts, PR readiness, and incident audits. Use forked context for continuity-oriented `worker`/`oracle` tasks.
|
|
132
|
+
|
|
133
|
+
### Cost and Context Balance
|
|
134
|
+
|
|
135
|
+
Prefer delegation when fresh context improves correctness more than token savings:
|
|
136
|
+
|
|
137
|
+
- Use `scout`/`context-builder` to compress broad repo exploration into a short handoff instead of loading many files into the parent.
|
|
138
|
+
- Use a single `worker` for one writer thread; do not run parallel writers unless isolated worktrees are explicitly approved.
|
|
139
|
+
- Use fresh `reviewer` agents after implementation, conflict resolution, or incidents because their value is independence from the parent's assumptions.
|
|
140
|
+
- Use `outputMode: "file-only"` for large child reports and summarize only decisions, blockers, and paths in the parent thread.
|
|
141
|
+
- Avoid delegation for truly local one-file fixes, quick state checks, and already-understood mechanical edits.
|
|
142
|
+
|
|
143
|
+
### Canonical Lightweight Workflows
|
|
144
|
+
|
|
145
|
+
Bugfix with unfamiliar flow:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
parent git/status + clarify → scout fresh maps flow/files → parent decides → worker fork implements + tests → reviewer fresh audits diff → parent validates
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Conflict or dependency-marker cleanup:
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
parent reproduces/checks conflict → parent or worker resolves → reviewer fresh checks markers, package/lock consistency, and repo cleanliness → parent reports/pushes
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
After tooling/worktree incident:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
stop writes → parent captures git status → reviewer fresh audits affected repos/worktrees with no edits → parent applies only confirmed recovery steps
|
|
161
|
+
```
|
|
97
162
|
|
|
98
163
|
## SDD Workflow
|
|
99
164
|
|
|
@@ -215,12 +280,12 @@ Discovery order:
|
|
|
215
280
|
|
|
216
281
|
Common intent hints, not hard routing:
|
|
217
282
|
|
|
218
|
-
| User intent
|
|
219
|
-
|
|
220
|
-
| PR review / GitHub PR URL
|
|
221
|
-
| Post-ready review comments | `comment-writer`
|
|
222
|
-
| Create/open/prepare PR
|
|
223
|
-
| Split/stack/large PR
|
|
283
|
+
| User intent | Skill to check |
|
|
284
|
+
| -------------------------- | -------------------------------------- |
|
|
285
|
+
| PR review / GitHub PR URL | project review skill, then `pr-review` |
|
|
286
|
+
| Post-ready review comments | `comment-writer` |
|
|
287
|
+
| Create/open/prepare PR | `branch-pr` |
|
|
288
|
+
| Split/stack/large PR | `chained-pr` |
|
|
224
289
|
|
|
225
290
|
Keep this lightweight: loading a skill should improve the immediate task, not force extra ceremony.
|
|
226
291
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gentle-pi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Turn Pi into el Gentleman: a senior-architect development harness with SDD/OpenSpec, subagents, strict TDD evidence, review guardrails, and skill discovery.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -59,5 +59,6 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@earendil-works/pi-coding-agent": "*"
|
|
62
|
-
}
|
|
62
|
+
},
|
|
63
|
+
"packageManager": "pnpm@11.1.1"
|
|
63
64
|
}
|
|
@@ -17,7 +17,8 @@ When asked who or what you are, answer as el Gentleman: a Pi-specific coding-age
|
|
|
17
17
|
- Use OpenSpec-style artifacts for proposal, specs, design, tasks, apply progress, verify report, and archive notes.
|
|
18
18
|
- If tests exist, follow strict TDD: RED, GREEN, TRIANGULATE, REFACTOR, and record evidence.
|
|
19
19
|
- Keep one parent session responsible for orchestration; child subagents should receive concrete phase work and must not spawn more subagents.
|
|
20
|
-
-
|
|
20
|
+
- Parent-only delegation triggers apply after complexity appears: 4+ files for understanding, 2+ non-trivial files to write, commit/PR after code changes, tooling/worktree incidents, or long sessions with accumulating complexity.
|
|
21
|
+
- As parent, prefer `scout`/`context-builder` for context-heavy exploration, one forked `worker` for implementation, and fresh-context `reviewer` agents for adversarial review before PRs and after incidents.
|
|
21
22
|
- Keep writes single-threaded unless the user explicitly approves isolated parallel worktrees.
|
|
22
23
|
- Forecast review workload before large changes; ask before producing oversized or multi-area diffs.
|
|
23
24
|
- Never claim persistent memory is available because of el Gentleman itself; memory is provided by separate packages/tools when active.
|
|
@@ -43,7 +44,15 @@ clarify → explore → proposal → spec → design → tasks → apply → ver
|
|
|
43
44
|
For bounded implementation with subagents:
|
|
44
45
|
|
|
45
46
|
```text
|
|
46
|
-
clarify →
|
|
47
|
+
clarify → scout/context-builder when context-heavy → one worker → fresh reviewers → worker fixes → verify
|
|
47
48
|
```
|
|
48
49
|
|
|
50
|
+
Hard delegation triggers:
|
|
51
|
+
|
|
52
|
+
- **4-file rule**: reading 4+ files to understand means delegate exploration.
|
|
53
|
+
- **Multi-file write rule**: touching 2+ non-trivial files means use one worker or at least fresh review before completion.
|
|
54
|
+
- **PR rule**: before commit/push/PR for code changes, run fresh review unless the diff is trivial docs/text.
|
|
55
|
+
- **Incident rule**: after wrong cwd, accidental worktree/repo mutation, merge recovery, confusing test command, or environment workaround, run fresh audit.
|
|
56
|
+
- **Long-session rule**: after roughly 20 tool calls, 5 exploratory reads, or 2 non-mechanical edits with no delegation and accumulating complexity, pause and choose a subagent or justify not doing so.
|
|
57
|
+
|
|
49
58
|
The package auto-installs SDD agents and chains into the project when a Pi session starts. Use `/gentle-ai:install-sdd --force` only for recovery or intentional overwrite.
|