pi-herdsman 0.2.1 → 0.3.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/LICENSE +1 -1
- package/README.md +5 -6
- package/dist/agent-definitions/researcher.md +11 -1
- package/dist/index.js +67 -71
- package/docs/concepts/delegation.md +21 -0
- package/docs/concepts/lifecycle.md +4 -0
- package/docs/development/smoke-testing.md +4 -1
- package/docs/development/validation.md +14 -4
- package/docs/getting-started.md +5 -2
- package/docs/reference/agent-definition-schema.md +20 -7
- package/docs/reference/commands.md +3 -1
- package/docs/reference/configuration.md +14 -7
- package/package.json +1 -1
|
@@ -37,6 +37,27 @@ A lead may have many direct agents, and each direct agent that is explicitly
|
|
|
37
37
|
delegation-enabled may have its own direct agents. A delegation-capable agent
|
|
38
38
|
remains an agent at every depth; it is not a separate public role.
|
|
39
39
|
|
|
40
|
+
Physical placement is presentation only and never determines ownership. The
|
|
41
|
+
lead's placement setting controls direct agents: `tab` shares one tab per lead,
|
|
42
|
+
`subtree` gives each direct agent a fresh tab, and `split` stays in the caller's
|
|
43
|
+
tab. Nested delegation always splits inside the owner's current tab, regardless
|
|
44
|
+
of the setting.
|
|
45
|
+
|
|
46
|
+
For example, the logical ownership tree and a subtree layout are separate:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
logical ownership physical subtree layout
|
|
50
|
+
|
|
51
|
+
lead [lead]
|
|
52
|
+
├── implementer → [implementer]
|
|
53
|
+
│ └── scout ├─ implementer
|
|
54
|
+
└── reviewer │ └─ scout
|
|
55
|
+
└─ [reviewer]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Physical layout never determines ownership; the durable owner/session
|
|
59
|
+
relationships do.
|
|
60
|
+
|
|
40
61
|
## Inferred `agent` capability
|
|
41
62
|
|
|
42
63
|
A non-empty `agents` field implies the `agent` tool when the definition uses
|
|
@@ -107,6 +107,10 @@ agent generation for the new assignment. The continuation uses the saved cwd
|
|
|
107
107
|
and session history together with the current effective authorized definition
|
|
108
108
|
configuration. Use `delegate.definition` with `fork` when a separate derived
|
|
109
109
|
session is required.
|
|
110
|
+
Session continuation does not retain the old Herdr tab. A still-live
|
|
111
|
+
generation may be restored from its exact managed identity, while ordinary
|
|
112
|
+
same-workspace tab movement remains presentation-only and does not change
|
|
113
|
+
assignment ownership.
|
|
110
114
|
|
|
111
115
|
## Steering is different
|
|
112
116
|
|
|
@@ -26,7 +26,10 @@ The supported repository contract requires:
|
|
|
26
26
|
- herdr `>=0.8.0`
|
|
27
27
|
- herdr Pi integration version `2` or newer
|
|
28
28
|
|
|
29
|
-
Run
|
|
29
|
+
Run focused tests and other intermediate checks before this smoke suite. Do
|
|
30
|
+
not format during smoke testing; complete smoke testing and review before the
|
|
31
|
+
final formatting and read-only verification sequence in
|
|
32
|
+
[Development validation](validation.md).
|
|
30
33
|
|
|
31
34
|
## Current mailbox contract
|
|
32
35
|
|
|
@@ -5,16 +5,24 @@
|
|
|
5
5
|
Repository handoff is not complete until the current validation gates have been
|
|
6
6
|
run or a concrete environment blocker is recorded.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Validation order
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Focused tests, smoke testing, review, and all intermediate checks happen first.
|
|
11
|
+
Do not format during those phases. Once implementation and review are
|
|
12
|
+
complete, run the following as the final pre-commit sequence:
|
|
11
13
|
|
|
12
14
|
```sh
|
|
15
|
+
# Final pre-commit mutation; run once only.
|
|
13
16
|
prettier . --write
|
|
17
|
+
|
|
18
|
+
# Read-only verification before staging or committing.
|
|
14
19
|
npm run check
|
|
15
20
|
git diff --check
|
|
16
21
|
```
|
|
17
22
|
|
|
23
|
+
Do not run formatting again between these verification commands and staging or
|
|
24
|
+
committing.
|
|
25
|
+
|
|
18
26
|
When reviewing staged work, also run as appropriate:
|
|
19
27
|
|
|
20
28
|
```sh
|
|
@@ -82,13 +90,15 @@ tracked separately in [Smoke testing](smoke-testing.md).
|
|
|
82
90
|
File selection is the primary focusing mechanism. A name pattern narrows the
|
|
83
91
|
tests within the selected file; it does not select which files Node loads.
|
|
84
92
|
|
|
85
|
-
|
|
93
|
+
After focused tests, smoke testing, review, and intermediate checks are
|
|
94
|
+
complete, run the final pre-commit sequence above. The full repository check is
|
|
95
|
+
the read-only verification step:
|
|
86
96
|
|
|
87
97
|
```sh
|
|
88
98
|
npm run check
|
|
89
99
|
```
|
|
90
100
|
|
|
91
|
-
`npm run check` remains the bounded full
|
|
101
|
+
`npm run check` remains the bounded full check, including process-group cleanup
|
|
92
102
|
when the test runner times out or leaks descendants.
|
|
93
103
|
|
|
94
104
|
## Dependency availability
|
package/docs/getting-started.md
CHANGED
|
@@ -99,8 +99,11 @@ global override. Definition Details shows the effective metadata and can
|
|
|
99
99
|
expand the resolved definition instructions with Pi's native `Ctrl+O`
|
|
100
100
|
behavior. These edits always write global overrides, never project files.
|
|
101
101
|
|
|
102
|
-
Use `Layout` to choose the current
|
|
103
|
-
agents
|
|
102
|
+
Use `Layout` to choose the current placement for newly started lead-direct
|
|
103
|
+
agents: `subtree` is the default and gives each lead-direct agent one tab;
|
|
104
|
+
`tab` uses one lead-owned agents tab; `split` stays in the caller's tab. Nested
|
|
105
|
+
delegation always splits inside the owner's current tab. Placement changes
|
|
106
|
+
affect future starts only.
|
|
104
107
|
|
|
105
108
|
For complete configuration ownership, see:
|
|
106
109
|
|
|
@@ -19,8 +19,21 @@ tools: ["read", "bash"]
|
|
|
19
19
|
Prompt body.
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
Agent definitions use YAML frontmatter. Array fields accept normal YAML flow or
|
|
23
|
+
block sequences.
|
|
24
|
+
|
|
25
|
+
For example, block sequences are valid for array fields:
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
---
|
|
29
|
+
name: reviewer
|
|
30
|
+
tools:
|
|
31
|
+
- read
|
|
32
|
+
- grep
|
|
33
|
+
skills:
|
|
34
|
+
- "/absolute/path/to/code-review/SKILL.md"
|
|
35
|
+
---
|
|
36
|
+
```
|
|
24
37
|
|
|
25
38
|
Unknown frontmatter fields fail validation.
|
|
26
39
|
|
|
@@ -69,14 +82,14 @@ available actions; disabling a definition does not mutate that assignment.
|
|
|
69
82
|
| `bodyMode` | `append` or `replace` | `replace` for non-empty matching overlay body | Valid only when overlaying an existing lower-precedence definition; consumed during body composition. |
|
|
70
83
|
| `noTools` | boolean | Pi normal tool policy | `true` emits `--no-tools`; managed `ask_owner` remains infrastructure. |
|
|
71
84
|
| `noBuiltinTools` | boolean | Pi normal built-in tool policy | `true` emits `--no-builtin-tools`. |
|
|
72
|
-
| `tools` |
|
|
73
|
-
| `excludeTools` |
|
|
85
|
+
| `tools` | array of non-empty strings | no explicit allowlist | Passed to Pi as a source-agnostic tool-name allowlist; matching overlay replaces whole array. |
|
|
86
|
+
| `excludeTools` | array of non-empty strings | no explicit exclusions | Passed to Pi as source-agnostic tool-name exclusions; matching override replaces whole array. |
|
|
74
87
|
| `noSkills` | boolean | skills disabled unless `inheritSkills: true` | Controls Pi native skill discovery; explicit `skills` values are still passed separately. |
|
|
75
88
|
| `inheritSkills` | boolean | does not enable by itself unless `true` | `true` changes omitted `noSkills` default so native skills remain available. Explicit `noSkills` wins. |
|
|
76
|
-
| `skills` |
|
|
89
|
+
| `skills` | array of non-empty strings | no explicit skill arguments | Each value is passed unchanged as a Pi skill path/resource. |
|
|
77
90
|
| `noExtensions` | boolean | Pi normal extension policy | `true` emits `--no-extensions`. Required herdr agent infrastructure remains injected by the launcher. |
|
|
78
|
-
| `extensions` |
|
|
79
|
-
| `agents` |
|
|
91
|
+
| `extensions` | array of non-empty strings | no extra extension arguments | Each value is passed unchanged to Pi. |
|
|
92
|
+
| `agents` | array of unique non-empty definition names | no direct agents | Names direct definitions this agent may delegate to; every name must exist. |
|
|
80
93
|
| `inheritProjectContext` | boolean | `true` only for definition name `delegate`; otherwise `false` | Controls project context-file inheritance. |
|
|
81
94
|
| `inheritGlobalContext` | boolean | follows effective `inheritProjectContext` | Controls global context-file inheritance. |
|
|
82
95
|
|
|
@@ -13,7 +13,7 @@ Commands require a lead Pi session with UI.
|
|
|
13
13
|
```text
|
|
14
14
|
/agents
|
|
15
15
|
/agents definitions
|
|
16
|
-
/agents placement [tab|split]
|
|
16
|
+
/agents placement [tab|subtree|split]
|
|
17
17
|
/agents stop
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -95,10 +95,12 @@ is sent.
|
|
|
95
95
|
## `/agents placement`
|
|
96
96
|
|
|
97
97
|
Selecting Layout opens a native selector showing the effective setting.
|
|
98
|
+
When unset, the effective setting is `subtree`.
|
|
98
99
|
Explicit values continue to set directly:
|
|
99
100
|
|
|
100
101
|
```text
|
|
101
102
|
/agents placement tab
|
|
103
|
+
/agents placement subtree
|
|
102
104
|
/agents placement split
|
|
103
105
|
```
|
|
104
106
|
|
|
@@ -14,7 +14,7 @@ Settings shape:
|
|
|
14
14
|
```json
|
|
15
15
|
{
|
|
16
16
|
"piHerdsman": {
|
|
17
|
-
"spawnPlacement": "
|
|
17
|
+
"spawnPlacement": "subtree"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
```
|
|
@@ -23,19 +23,26 @@ Supported values:
|
|
|
23
23
|
|
|
24
24
|
```text
|
|
25
25
|
tab
|
|
26
|
+
subtree
|
|
26
27
|
split
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
Default:
|
|
30
31
|
|
|
31
32
|
```text
|
|
32
|
-
|
|
33
|
+
subtree
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
`
|
|
36
|
+
When no `spawnPlacement` value is configured, it resolves to `subtree`.
|
|
37
|
+
Unrecognized values remain invalid and resolve to `tab`.
|
|
38
|
+
|
|
39
|
+
`tab` places future direct agents owned by a lead in one dedicated agents tab.
|
|
40
|
+
|
|
41
|
+
`subtree` gives each future lead-direct agent its own tab. Descendants always
|
|
42
|
+
split inside their owner's current tab.
|
|
36
43
|
|
|
37
|
-
`split` places future agents by splitting from the caller's
|
|
38
|
-
|
|
44
|
+
`split` places future lead-direct agents by splitting from the caller's current
|
|
45
|
+
pane. Descendants always split inside their owner's current tab.
|
|
39
46
|
|
|
40
47
|
This affects future starts, not existing agents.
|
|
41
48
|
|
|
@@ -83,12 +90,12 @@ Project settings are stored in:
|
|
|
83
90
|
A project placement value is effective only when:
|
|
84
91
|
|
|
85
92
|
- the project is trusted by Pi; and
|
|
86
|
-
- the project setting is `tab` or `split`.
|
|
93
|
+
- the project setting is `tab`, `subtree`, or `split`.
|
|
87
94
|
|
|
88
95
|
If no valid trusted project placement is active, the global value is used.
|
|
89
96
|
|
|
90
97
|
`/agents placement` opens a native selector showing the effective value and
|
|
91
|
-
offering `tab` or `split`. Selecting a value writes to the current effective
|
|
98
|
+
offering `tab`, `subtree`, or `split`. Selecting a value writes to the current effective
|
|
92
99
|
scope and verifies the value after writing; the confirmation reports whether
|
|
93
100
|
that scope is `project` or `global`.
|
|
94
101
|
|
package/package.json
CHANGED