pi-crew 0.1.30 → 0.1.32
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 +9 -0
- package/README.md +80 -27
- package/agents/analyst.md +11 -11
- package/agents/critic.md +11 -11
- package/agents/executor.md +11 -11
- package/agents/explorer.md +11 -11
- package/agents/planner.md +11 -11
- package/agents/reviewer.md +11 -11
- package/agents/security-reviewer.md +11 -11
- package/agents/test-engineer.md +11 -11
- package/agents/verifier.md +11 -11
- package/agents/writer.md +11 -11
- package/docs/architecture.md +173 -164
- package/docs/refactor-tasks-phase3.md +394 -394
- package/docs/refactor-tasks-phase4.md +564 -564
- package/docs/refactor-tasks-phase5.md +402 -402
- package/docs/refactor-tasks-phase6.md +662 -662
- package/docs/research-extension-examples.md +297 -0
- package/docs/research-extension-system.md +324 -0
- package/docs/research-optimization-plan.md +548 -0
- package/docs/research-pi-coding-agent.md +357 -0
- package/docs/resource-formats.md +4 -3
- package/docs/runtime-flow.md +148 -148
- package/docs/source-runtime-refactor-map.md +83 -83
- package/docs/usage.md +3 -3
- package/index.ts +6 -6
- package/package.json +1 -1
- package/schema.json +53 -1
- package/skills/git-master/SKILL.md +24 -19
- package/skills/read-only-explorer/SKILL.md +26 -21
- package/skills/safe-bash/SKILL.md +21 -16
- package/skills/task-packet/SKILL.md +28 -23
- package/skills/verify-evidence/SKILL.md +27 -22
- package/src/agents/agent-serializer.ts +34 -34
- package/src/agents/discover-agents.ts +102 -102
- package/src/config/config.ts +14 -1
- package/src/config/defaults.ts +3 -2
- package/src/extension/cross-extension-rpc.ts +82 -82
- package/src/extension/import-index.ts +4 -3
- package/src/extension/management.ts +2 -2
- package/src/extension/project-init.ts +9 -7
- package/src/extension/register.ts +63 -0
- package/src/extension/registration/artifact-cleanup.ts +15 -14
- package/src/extension/registration/commands.ts +208 -208
- package/src/extension/registration/compaction-guard.ts +125 -0
- package/src/extension/registration/subagent-tools.ts +27 -8
- package/src/extension/registration/team-tool.ts +61 -44
- package/src/extension/result-watcher.ts +98 -98
- package/src/extension/run-import.ts +4 -4
- package/src/extension/run-index.ts +14 -14
- package/src/extension/run-maintenance.ts +24 -24
- package/src/extension/team-tool/api.ts +3 -0
- package/src/extension/team-tool/cancel.ts +31 -31
- package/src/extension/team-tool/doctor.ts +179 -178
- package/src/extension/team-tool/inspect.ts +41 -41
- package/src/extension/team-tool/lifecycle-actions.ts +79 -79
- package/src/extension/team-tool/plan.ts +19 -19
- package/src/extension/team-tool/status.ts +73 -73
- package/src/prompt/prompt-runtime.ts +68 -68
- package/src/runtime/agent-control.ts +64 -64
- package/src/runtime/agent-memory.ts +72 -72
- package/src/runtime/agent-observability.ts +113 -113
- package/src/runtime/async-marker.ts +26 -26
- package/src/runtime/background-runner.ts +53 -53
- package/src/runtime/crew-agent-runtime.ts +58 -58
- package/src/runtime/direct-run.ts +35 -35
- package/src/runtime/foreground-control.ts +82 -82
- package/src/runtime/green-contract.ts +46 -46
- package/src/runtime/group-join.ts +88 -88
- package/src/runtime/live-agent-control.ts +78 -78
- package/src/runtime/live-agent-manager.ts +85 -85
- package/src/runtime/live-control-realtime.ts +36 -36
- package/src/runtime/live-session-runtime.ts +299 -299
- package/src/runtime/manifest-cache.ts +212 -214
- package/src/runtime/model-fallback.ts +261 -261
- package/src/runtime/parallel-research.ts +44 -44
- package/src/runtime/parallel-utils.ts +99 -99
- package/src/runtime/pi-json-output.ts +111 -111
- package/src/runtime/pi-spawn.ts +96 -96
- package/src/runtime/policy-engine.ts +78 -78
- package/src/runtime/post-exit-stdio-guard.ts +86 -86
- package/src/runtime/process-status.ts +56 -56
- package/src/runtime/progress-event-coalescer.ts +43 -43
- package/src/runtime/recovery-recipes.ts +74 -74
- package/src/runtime/role-permission.ts +39 -39
- package/src/runtime/session-usage.ts +79 -79
- package/src/runtime/sidechain-output.ts +28 -28
- package/src/runtime/subagent-manager.ts +29 -2
- package/src/runtime/task-display.ts +38 -38
- package/src/runtime/task-output-context.ts +106 -106
- package/src/runtime/task-packet.ts +84 -84
- package/src/runtime/task-runner/live-executor.ts +98 -98
- package/src/runtime/task-runner/progress.ts +111 -111
- package/src/runtime/task-runner/prompt-builder.ts +72 -72
- package/src/runtime/task-runner/result-utils.ts +14 -14
- package/src/runtime/task-runner/state-helpers.ts +22 -22
- package/src/runtime/worker-heartbeat.ts +21 -21
- package/src/runtime/worker-startup.ts +57 -57
- package/src/schema/config-schema.ts +12 -0
- package/src/schema/team-tool-schema.ts +100 -100
- package/src/state/artifact-store.ts +108 -108
- package/src/state/contracts.ts +105 -105
- package/src/state/jsonl-writer.ts +77 -77
- package/src/state/state-store.ts +8 -9
- package/src/state/task-claims.ts +42 -42
- package/src/state/types.ts +180 -180
- package/src/state/usage.ts +29 -29
- package/src/subagents/async-entry.ts +1 -1
- package/src/subagents/index.ts +3 -3
- package/src/subagents/live/control.ts +1 -1
- package/src/subagents/live/manager.ts +1 -1
- package/src/subagents/live/realtime.ts +1 -1
- package/src/subagents/live/session-runtime.ts +1 -1
- package/src/subagents/manager.ts +1 -1
- package/src/subagents/spawn.ts +1 -1
- package/src/teams/discover-teams.ts +2 -2
- package/src/teams/team-serializer.ts +36 -36
- package/src/types/diff.d.ts +18 -0
- package/src/ui/crew-footer.ts +101 -101
- package/src/ui/crew-select-list.ts +111 -111
- package/src/ui/crew-widget.ts +285 -285
- package/src/ui/dynamic-border.ts +25 -25
- package/src/ui/layout-primitives.ts +106 -106
- package/src/ui/loaders.ts +158 -158
- package/src/ui/mascot.ts +441 -441
- package/src/ui/powerbar-publisher.ts +94 -94
- package/src/ui/render-diff.ts +119 -119
- package/src/ui/run-dashboard.ts +372 -372
- package/src/ui/status-colors.ts +54 -54
- package/src/ui/syntax-highlight.ts +116 -116
- package/src/ui/transcript-viewer.ts +302 -302
- package/src/utils/completion-dedupe.ts +63 -63
- package/src/utils/file-coalescer.ts +84 -84
- package/src/utils/frontmatter.ts +36 -36
- package/src/utils/fs-watch.ts +31 -31
- package/src/utils/git.ts +262 -262
- package/src/utils/ids.ts +12 -12
- package/src/utils/names.ts +26 -26
- package/src/utils/paths.ts +34 -7
- package/src/utils/sleep.ts +32 -32
- package/src/utils/timings.ts +31 -31
- package/src/utils/visual.ts +159 -159
- package/src/workflows/discover-workflows.ts +2 -2
- package/src/workflows/validate-workflow.ts +40 -40
- package/src/worktree/branch-freshness.ts +45 -45
- package/src/worktree/cleanup.ts +71 -69
- package/src/worktree/worktree-manager.ts +3 -1
- package/teams/default.team.md +12 -12
- package/teams/fast-fix.team.md +11 -11
- package/teams/implementation.team.md +18 -18
- package/teams/parallel-research.team.md +14 -14
- package/teams/research.team.md +11 -11
- package/teams/review.team.md +12 -12
- package/workflows/default.workflow.md +29 -29
- package/workflows/fast-fix.workflow.md +22 -22
- package/workflows/implementation.workflow.md +38 -38
- package/workflows/parallel-research.workflow.md +46 -46
- package/workflows/research.workflow.md +22 -22
- package/workflows/review.workflow.md +30 -30
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
# pi-crew runtime refactor source map
|
|
2
|
-
|
|
3
|
-
This document records the source projects used as the baseline for the pi-crew subagent/runtime refactor. The goal is to avoid ad-hoc fixes in critical process orchestration paths and instead align pi-crew with proven Pi extension patterns.
|
|
4
|
-
|
|
5
|
-
## Source/pi-subagents
|
|
6
|
-
|
|
7
|
-
Primary source for child-process worker execution.
|
|
8
|
-
|
|
9
|
-
- `pi-spawn.ts`: robust Pi CLI resolution on Windows and package installs.
|
|
10
|
-
- `async-execution.ts`: detached async runner with `windowsHide: true` to avoid blank console windows.
|
|
11
|
-
- `subagent-runner.ts`: streaming child Pi process runner, output capture, result extraction.
|
|
12
|
-
- `post-exit-stdio-guard.ts`: guards for child processes that exit before stdio fully closes.
|
|
13
|
-
- `result-watcher.ts` and `async-job-tracker.ts`: durable async job/result observation patterns.
|
|
14
|
-
- `model-fallback.ts`: model fallback policy independent of hardcoded provider assumptions.
|
|
15
|
-
- `subagent-control.ts`, `run-status.ts`: status and control semantics.
|
|
16
|
-
|
|
17
|
-
pi-crew alignment:
|
|
18
|
-
|
|
19
|
-
- Background runner and child worker spawn options now explicitly set `windowsHide: true`.
|
|
20
|
-
- Parallel research no longer gates all shard workers behind a single discover worker.
|
|
21
|
-
- Further work should consolidate `child-pi.ts`, `async-runner.ts`, and `subagent-manager.ts` into a durable-first subagent runtime module.
|
|
22
|
-
|
|
23
|
-
## Source/pi-subagents2
|
|
24
|
-
|
|
25
|
-
Primary source for higher-level agent management and UI patterns.
|
|
26
|
-
|
|
27
|
-
- `src/agent-manager.ts`: agent lifecycle registry boundaries.
|
|
28
|
-
- `src/agent-runner.ts`: invocation/run abstraction separate from UI registration.
|
|
29
|
-
- `src/model-resolver.ts`: cleaner model resolution responsibility.
|
|
30
|
-
- `src/output-file.ts`: output file abstraction.
|
|
31
|
-
- `src/ui/agent-widget.ts`, `src/ui/conversation-viewer.ts`: compact live status and transcript viewing.
|
|
32
|
-
|
|
33
|
-
pi-crew alignment:
|
|
34
|
-
|
|
35
|
-
- Keep `Agent`/`crew_agent` tools as thin adapters over a durable manager.
|
|
36
|
-
- Avoid storing essential run mapping in memory only.
|
|
37
|
-
- Keep UI active-only and file-backed.
|
|
38
|
-
|
|
39
|
-
## Source/pi-mono
|
|
40
|
-
|
|
41
|
-
Primary source for Pi extension API/lifecycle constraints.
|
|
42
|
-
|
|
43
|
-
- `packages/coding-agent/src/core/extensions/types.ts`: extension context/tool contracts.
|
|
44
|
-
- `packages/coding-agent/src/core/extensions/runner.ts`: extension execution boundaries.
|
|
45
|
-
- `packages/coding-agent/src/core/model-registry.ts`: available model discovery.
|
|
46
|
-
- `packages/coding-agent/src/modes/interactive/interactive-mode.ts`: session lifecycle/UI behavior.
|
|
47
|
-
|
|
48
|
-
pi-crew alignment:
|
|
49
|
-
|
|
50
|
-
- Treat session-bound foreground workers differently from explicit async background workers.
|
|
51
|
-
- Do not assume hardcoded providers/models.
|
|
52
|
-
- Use Pi-native UI calls without modal auto-open by default.
|
|
53
|
-
|
|
54
|
-
## Source/pi-powerbar, pi-plan, pi-diff-review, pi-extensions*
|
|
55
|
-
|
|
56
|
-
Sources for UI and small-extension patterns.
|
|
57
|
-
|
|
58
|
-
- `pi-powerbar/src/powerbar/*`: low-noise status segment publishing.
|
|
59
|
-
- `pi-plan/src/plan-action-ui.ts`: action-oriented UI without persistent heavy overlays.
|
|
60
|
-
- `pi-diff-review/src/*`: command/tool registration and review UX patterns.
|
|
61
|
-
- `pi-extensions2/files-widget/*`: file-backed UI composition and navigation.
|
|
62
|
-
|
|
63
|
-
pi-crew alignment:
|
|
64
|
-
|
|
65
|
-
- Keep persistent widget active-only.
|
|
66
|
-
- Prefer manual dashboard/transcript commands for history.
|
|
67
|
-
- Avoid expensive render scans and auto-opening focus-capturing overlays.
|
|
68
|
-
|
|
69
|
-
## Current refactor checkpoints
|
|
70
|
-
|
|
71
|
-
- [x] Hide Windows console windows for background runner and child Pi workers.
|
|
72
|
-
- [x] Make parallel research shard workers start in parallel instead of depending on a single discover worker.
|
|
73
|
-
- [x] Keep direct-agent reconstruction gated by `workflow === "direct-agent"` only.
|
|
74
|
-
- [x] Persist subagent records and recover terminal results after restart.
|
|
75
|
-
- [x] Fail fast for unrecoverable persisted records without `runId` instead of hanging.
|
|
76
|
-
- [x] Persist direct-agent model override into task state for background/resume reconstruction.
|
|
77
|
-
|
|
78
|
-
## Remaining larger subsystem work
|
|
79
|
-
|
|
80
|
-
- Consolidate subagent runtime into `src/subagents/*` or equivalent durable-first module.
|
|
81
|
-
- Move model routing transparency into persisted task/subagent records: requested model, selected model, fallback chain, fallback reason.
|
|
82
|
-
- Add real integration smoke scripts for Windows process visibility, async restart recovery, and multi-shard fanout.
|
|
83
|
-
- Add adaptive planner repair/retry for invalid JSON instead of immediate block when safe.
|
|
1
|
+
# pi-crew runtime refactor source map
|
|
2
|
+
|
|
3
|
+
This document records the source projects used as the baseline for the pi-crew subagent/runtime refactor. The goal is to avoid ad-hoc fixes in critical process orchestration paths and instead align pi-crew with proven Pi extension patterns.
|
|
4
|
+
|
|
5
|
+
## Source/pi-subagents
|
|
6
|
+
|
|
7
|
+
Primary source for child-process worker execution.
|
|
8
|
+
|
|
9
|
+
- `pi-spawn.ts`: robust Pi CLI resolution on Windows and package installs.
|
|
10
|
+
- `async-execution.ts`: detached async runner with `windowsHide: true` to avoid blank console windows.
|
|
11
|
+
- `subagent-runner.ts`: streaming child Pi process runner, output capture, result extraction.
|
|
12
|
+
- `post-exit-stdio-guard.ts`: guards for child processes that exit before stdio fully closes.
|
|
13
|
+
- `result-watcher.ts` and `async-job-tracker.ts`: durable async job/result observation patterns.
|
|
14
|
+
- `model-fallback.ts`: model fallback policy independent of hardcoded provider assumptions.
|
|
15
|
+
- `subagent-control.ts`, `run-status.ts`: status and control semantics.
|
|
16
|
+
|
|
17
|
+
pi-crew alignment:
|
|
18
|
+
|
|
19
|
+
- Background runner and child worker spawn options now explicitly set `windowsHide: true`.
|
|
20
|
+
- Parallel research no longer gates all shard workers behind a single discover worker.
|
|
21
|
+
- Further work should consolidate `child-pi.ts`, `async-runner.ts`, and `subagent-manager.ts` into a durable-first subagent runtime module.
|
|
22
|
+
|
|
23
|
+
## Source/pi-subagents2
|
|
24
|
+
|
|
25
|
+
Primary source for higher-level agent management and UI patterns.
|
|
26
|
+
|
|
27
|
+
- `src/agent-manager.ts`: agent lifecycle registry boundaries.
|
|
28
|
+
- `src/agent-runner.ts`: invocation/run abstraction separate from UI registration.
|
|
29
|
+
- `src/model-resolver.ts`: cleaner model resolution responsibility.
|
|
30
|
+
- `src/output-file.ts`: output file abstraction.
|
|
31
|
+
- `src/ui/agent-widget.ts`, `src/ui/conversation-viewer.ts`: compact live status and transcript viewing.
|
|
32
|
+
|
|
33
|
+
pi-crew alignment:
|
|
34
|
+
|
|
35
|
+
- Keep `Agent`/`crew_agent` tools as thin adapters over a durable manager.
|
|
36
|
+
- Avoid storing essential run mapping in memory only.
|
|
37
|
+
- Keep UI active-only and file-backed.
|
|
38
|
+
|
|
39
|
+
## Source/pi-mono
|
|
40
|
+
|
|
41
|
+
Primary source for Pi extension API/lifecycle constraints.
|
|
42
|
+
|
|
43
|
+
- `packages/coding-agent/src/core/extensions/types.ts`: extension context/tool contracts.
|
|
44
|
+
- `packages/coding-agent/src/core/extensions/runner.ts`: extension execution boundaries.
|
|
45
|
+
- `packages/coding-agent/src/core/model-registry.ts`: available model discovery.
|
|
46
|
+
- `packages/coding-agent/src/modes/interactive/interactive-mode.ts`: session lifecycle/UI behavior.
|
|
47
|
+
|
|
48
|
+
pi-crew alignment:
|
|
49
|
+
|
|
50
|
+
- Treat session-bound foreground workers differently from explicit async background workers.
|
|
51
|
+
- Do not assume hardcoded providers/models.
|
|
52
|
+
- Use Pi-native UI calls without modal auto-open by default.
|
|
53
|
+
|
|
54
|
+
## Source/pi-powerbar, pi-plan, pi-diff-review, pi-extensions*
|
|
55
|
+
|
|
56
|
+
Sources for UI and small-extension patterns.
|
|
57
|
+
|
|
58
|
+
- `pi-powerbar/src/powerbar/*`: low-noise status segment publishing.
|
|
59
|
+
- `pi-plan/src/plan-action-ui.ts`: action-oriented UI without persistent heavy overlays.
|
|
60
|
+
- `pi-diff-review/src/*`: command/tool registration and review UX patterns.
|
|
61
|
+
- `pi-extensions2/files-widget/*`: file-backed UI composition and navigation.
|
|
62
|
+
|
|
63
|
+
pi-crew alignment:
|
|
64
|
+
|
|
65
|
+
- Keep persistent widget active-only.
|
|
66
|
+
- Prefer manual dashboard/transcript commands for history.
|
|
67
|
+
- Avoid expensive render scans and auto-opening focus-capturing overlays.
|
|
68
|
+
|
|
69
|
+
## Current refactor checkpoints
|
|
70
|
+
|
|
71
|
+
- [x] Hide Windows console windows for background runner and child Pi workers.
|
|
72
|
+
- [x] Make parallel research shard workers start in parallel instead of depending on a single discover worker.
|
|
73
|
+
- [x] Keep direct-agent reconstruction gated by `workflow === "direct-agent"` only.
|
|
74
|
+
- [x] Persist subagent records and recover terminal results after restart.
|
|
75
|
+
- [x] Fail fast for unrecoverable persisted records without `runId` instead of hanging.
|
|
76
|
+
- [x] Persist direct-agent model override into task state for background/resume reconstruction.
|
|
77
|
+
|
|
78
|
+
## Remaining larger subsystem work
|
|
79
|
+
|
|
80
|
+
- Consolidate subagent runtime into `src/subagents/*` or equivalent durable-first module.
|
|
81
|
+
- Move model routing transparency into persisted task/subagent records: requested model, selected model, fallback chain, fallback reason.
|
|
82
|
+
- Add real integration smoke scripts for Windows process visibility, async restart recovery, and multi-shard fanout.
|
|
83
|
+
- Add adaptive planner repair/retry for invalid JSON instead of immediate block when safe.
|
package/docs/usage.md
CHANGED
|
@@ -118,10 +118,10 @@ Check status:
|
|
|
118
118
|
}
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
The leader repository must be clean. Per-task worktrees are created under:
|
|
121
|
+
The leader repository must be clean. Per-task worktrees are created under the project crew root (`.crew/` for new projects, `.pi/teams/` when the repo already has `.pi/`):
|
|
122
122
|
|
|
123
123
|
```text
|
|
124
|
-
|
|
124
|
+
<crewRoot>/worktrees/{runId}/{taskId}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
Cleanup:
|
|
@@ -152,7 +152,7 @@ Dirty worktrees are preserved unless `force: true` is provided.
|
|
|
152
152
|
/team-cleanup team_...
|
|
153
153
|
/team-forget team_... --confirm
|
|
154
154
|
/team-export team_...
|
|
155
|
-
/team-import .
|
|
155
|
+
/team-import .crew/artifacts/team_.../export/run-export.json # or .pi/teams/artifacts/... on legacy layout
|
|
156
156
|
/team-imports
|
|
157
157
|
/team-prune --keep=20 --confirm
|
|
158
158
|
/team-manager
|
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
-
import { registerPiTeams } from "./src/extension/register.ts";
|
|
3
|
-
|
|
4
|
-
export default function (pi: ExtensionAPI): void {
|
|
5
|
-
registerPiTeams(pi);
|
|
6
|
-
}
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
import { registerPiTeams } from "./src/extension/register.ts";
|
|
3
|
+
|
|
4
|
+
export default function (pi: ExtensionAPI): void {
|
|
5
|
+
registerPiTeams(pi);
|
|
6
|
+
}
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -80,6 +80,38 @@
|
|
|
80
80
|
"needsAttentionAfterMs": { "type": "integer", "minimum": 1 }
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
+
"worktree": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"description": "Worktree setup hooks and dependency-linking options.",
|
|
87
|
+
"properties": {
|
|
88
|
+
"setupHook": { "type": "string", "minLength": 1 },
|
|
89
|
+
"setupHookTimeoutMs": { "type": "integer", "minimum": 1 },
|
|
90
|
+
"linkNodeModules": { "type": "boolean" }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"agents": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"description": "Builtin agent override settings.",
|
|
97
|
+
"properties": {
|
|
98
|
+
"disableBuiltins": { "type": "boolean" },
|
|
99
|
+
"overrides": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"properties": {
|
|
105
|
+
"disabled": { "type": "boolean" },
|
|
106
|
+
"model": { "oneOf": [{ "type": "string", "minLength": 1 }, { "const": false }] },
|
|
107
|
+
"fallbackModels": { "oneOf": [{ "type": "array", "items": { "type": "string", "minLength": 1 } }, { "const": false }] },
|
|
108
|
+
"thinking": { "oneOf": [{ "type": "string", "minLength": 1 }, { "const": false }] },
|
|
109
|
+
"tools": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
83
115
|
"ui": {
|
|
84
116
|
"type": "object",
|
|
85
117
|
"additionalProperties": false,
|
|
@@ -95,7 +127,27 @@
|
|
|
95
127
|
"autoOpenDashboardForForegroundRuns": { "type": "boolean", "default": true },
|
|
96
128
|
"showModel": { "type": "boolean", "default": true, "description": "Show worker model attempts in dashboard agent rows." },
|
|
97
129
|
"showTokens": { "type": "boolean", "description": "Show token usage in dashboard agent rows." },
|
|
98
|
-
"showTools": { "type": "boolean", "description": "Show tool activity in dashboard agent rows." }
|
|
130
|
+
"showTools": { "type": "boolean", "description": "Show tool activity in dashboard agent rows." },
|
|
131
|
+
"mascotStyle": { "type": "string", "enum": ["cat", "armin"] },
|
|
132
|
+
"mascotEffect": { "type": "string", "enum": ["random", "none", "typewriter", "scanline", "rain", "fade", "crt", "glitch", "dissolve"] }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"tools": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"description": "Public tool registration and foreground result behavior.",
|
|
139
|
+
"properties": {
|
|
140
|
+
"enableClaudeStyleAliases": { "type": "boolean", "default": true },
|
|
141
|
+
"enableSteer": { "type": "boolean", "default": true },
|
|
142
|
+
"terminateOnForeground": { "type": "boolean", "default": false, "description": "Opt in to returning terminate:true from foreground Agent/crew_agent calls after the child result is available." }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"telemetry": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"description": "Pi-crew telemetry event controls.",
|
|
149
|
+
"properties": {
|
|
150
|
+
"enabled": { "type": "boolean", "default": true }
|
|
99
151
|
}
|
|
100
152
|
}
|
|
101
153
|
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
---
|
|
2
|
+
name: git-master
|
|
3
|
+
description: Commit and release hygiene for safe version-control work. Use when preparing commits, releases, version bumps, publishing, or validating package installation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# git-master
|
|
7
|
+
|
|
8
|
+
Use this skill for commit/release hygiene.
|
|
9
|
+
|
|
10
|
+
## Commit rules
|
|
11
|
+
|
|
12
|
+
- Check `git status --short` before staging.
|
|
13
|
+
- Stage only files related to the current task.
|
|
14
|
+
- Keep commits independently revertible.
|
|
15
|
+
- Use concise imperative commit messages.
|
|
16
|
+
- Do not push or publish unless explicitly requested.
|
|
17
|
+
- Do not include secrets, OTPs, local temp files, or generated tarballs.
|
|
18
|
+
|
|
19
|
+
## Release rules
|
|
20
|
+
|
|
21
|
+
- Run the required verification gate before version bumps.
|
|
22
|
+
- Bump version only after tests pass and user confirms publish intent.
|
|
23
|
+
- Verify registry after publish with `npm view`.
|
|
24
|
+
- Install through `pi install npm:pi-crew` when validating Pi package loading.
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
---
|
|
2
|
+
name: read-only-explorer
|
|
3
|
+
description: Read-only exploration and audit workflow. Use for explorer, analyst, reviewer, and source-audit roles that must inspect code without modifying files.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# read-only-explorer
|
|
7
|
+
|
|
8
|
+
Use this skill for explorer, analyst, reviewer, and source-audit roles.
|
|
9
|
+
|
|
10
|
+
## Contract
|
|
11
|
+
|
|
12
|
+
- Do not edit files.
|
|
13
|
+
- Do not write generated artifacts outside the run artifact directory.
|
|
14
|
+
- Prefer `read`, `rg`, `find`, `git status`, and package metadata inspection.
|
|
15
|
+
- Record exact files inspected.
|
|
16
|
+
- Distinguish direct evidence from inference.
|
|
17
|
+
- If implementation is needed, recommend it instead of modifying code.
|
|
18
|
+
|
|
19
|
+
## Output shape
|
|
20
|
+
|
|
21
|
+
Return:
|
|
22
|
+
|
|
23
|
+
1. files inspected;
|
|
24
|
+
2. findings with path references;
|
|
25
|
+
3. risks/unknowns;
|
|
26
|
+
4. recommended next tests or implementation tasks.
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
---
|
|
2
|
+
name: safe-bash
|
|
3
|
+
description: Safe shell-command workflow. Use whenever a task may execute shell commands, especially to prefer read-only commands and avoid destructive actions without confirmation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# safe-bash
|
|
7
|
+
|
|
8
|
+
Use this skill whenever a task may execute shell commands.
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
- Prefer read-only commands first: `pwd`, `ls`, `find`, `rg`, `git status`, package-manager dry runs.
|
|
13
|
+
- Before mutating commands, explain the target path and expected effect.
|
|
14
|
+
- Never run destructive cleanup (`rm -rf`, `git clean`, force delete, prune, reset hard) without explicit confirmation.
|
|
15
|
+
- Avoid shell-specific assumptions when a cross-platform Node/Pi API exists.
|
|
16
|
+
- On Windows, prefer argv-based process execution and avoid `cmd /c start` or `/bin/bash` unless explicitly required.
|
|
17
|
+
- Capture verification output and summarize exit status.
|
|
18
|
+
|
|
19
|
+
## Reporting
|
|
20
|
+
|
|
21
|
+
Mention commands run and whether they were read-only or mutating.
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
---
|
|
2
|
+
name: task-packet
|
|
3
|
+
description: Structured worker task-packet template. Use when creating or executing worker tasks that need clear objective, scope, constraints, outputs, acceptance criteria, and verification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# task-packet
|
|
7
|
+
|
|
8
|
+
Use this skill when creating or executing a worker task.
|
|
9
|
+
|
|
10
|
+
## Required sections
|
|
11
|
+
|
|
12
|
+
Each task should clarify:
|
|
13
|
+
|
|
14
|
+
- objective;
|
|
15
|
+
- scope and paths;
|
|
16
|
+
- constraints and permissions;
|
|
17
|
+
- dependencies and expected inputs;
|
|
18
|
+
- expected outputs/artifacts;
|
|
19
|
+
- acceptance criteria;
|
|
20
|
+
- verification commands;
|
|
21
|
+
- escalation conditions.
|
|
22
|
+
|
|
23
|
+
## Worker behavior
|
|
24
|
+
|
|
25
|
+
- Read dependency outputs before starting dependent work.
|
|
26
|
+
- Keep outputs concise and artifact-oriented.
|
|
27
|
+
- Do not claim completion until required artifacts and status are durable.
|
|
28
|
+
- If blocked, report the blocker and the smallest recoverable next action.
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
---
|
|
2
|
+
name: verify-evidence
|
|
3
|
+
description: Final verification evidence checklist. Use before finalizing implementation, review, or audit work to report changed files, checks run, artifacts, risks, and rollback notes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# verify-evidence
|
|
7
|
+
|
|
8
|
+
Use this skill before finalizing implementation, review, or audit work.
|
|
9
|
+
|
|
10
|
+
## Required final evidence
|
|
11
|
+
|
|
12
|
+
Include:
|
|
13
|
+
|
|
14
|
+
- changed files, or `none` for read-only work;
|
|
15
|
+
- tests/checks run with pass/fail result;
|
|
16
|
+
- relevant artifacts, run IDs, or log paths;
|
|
17
|
+
- unresolved risks and rollback notes when code changed.
|
|
18
|
+
|
|
19
|
+
## Verification ladder
|
|
20
|
+
|
|
21
|
+
Prefer the smallest reliable check first, then escalate:
|
|
22
|
+
|
|
23
|
+
1. Targeted unit tests for touched behavior.
|
|
24
|
+
2. Typecheck for TypeScript changes.
|
|
25
|
+
3. Integration tests for runtime/spawn/state changes.
|
|
26
|
+
4. `npm pack --dry-run` for package/release/doc changes.
|
|
27
|
+
5. Real Pi smoke only when needed and safe.
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import type { AgentConfig } from "./agent-config.ts";
|
|
2
|
-
|
|
3
|
-
function line(key: string, value: string | boolean | string[] | undefined): string | undefined {
|
|
4
|
-
if (value === undefined) return undefined;
|
|
5
|
-
if (Array.isArray(value)) return `${key}: ${value.join(", ")}`;
|
|
6
|
-
return `${key}: ${String(value)}`;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function serializeAgent(agent: AgentConfig): string {
|
|
10
|
-
const lines = [
|
|
11
|
-
"---",
|
|
12
|
-
`name: ${agent.name}`,
|
|
13
|
-
`description: ${agent.description}`,
|
|
14
|
-
line("model", agent.model),
|
|
15
|
-
line("fallbackModels", agent.fallbackModels),
|
|
16
|
-
line("thinking", agent.thinking),
|
|
17
|
-
line("tools", agent.tools),
|
|
18
|
-
agent.extensions !== undefined ? line("extensions", agent.extensions) ?? "extensions:" : undefined,
|
|
19
|
-
line("skills", agent.skills),
|
|
20
|
-
line("systemPromptMode", agent.systemPromptMode),
|
|
21
|
-
line("inheritProjectContext", agent.inheritProjectContext),
|
|
22
|
-
line("inheritSkills", agent.inheritSkills),
|
|
23
|
-
line("triggers", agent.routing?.triggers),
|
|
24
|
-
line("useWhen", agent.routing?.useWhen),
|
|
25
|
-
line("avoidWhen", agent.routing?.avoidWhen),
|
|
26
|
-
line("cost", agent.routing?.cost),
|
|
27
|
-
line("category", agent.routing?.category),
|
|
28
|
-
"---",
|
|
29
|
-
"",
|
|
30
|
-
agent.systemPrompt.trim(),
|
|
31
|
-
"",
|
|
32
|
-
].filter((entry): entry is string => entry !== undefined);
|
|
33
|
-
return lines.join("\n");
|
|
34
|
-
}
|
|
1
|
+
import type { AgentConfig } from "./agent-config.ts";
|
|
2
|
+
|
|
3
|
+
function line(key: string, value: string | boolean | string[] | undefined): string | undefined {
|
|
4
|
+
if (value === undefined) return undefined;
|
|
5
|
+
if (Array.isArray(value)) return `${key}: ${value.join(", ")}`;
|
|
6
|
+
return `${key}: ${String(value)}`;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function serializeAgent(agent: AgentConfig): string {
|
|
10
|
+
const lines = [
|
|
11
|
+
"---",
|
|
12
|
+
`name: ${agent.name}`,
|
|
13
|
+
`description: ${agent.description}`,
|
|
14
|
+
line("model", agent.model),
|
|
15
|
+
line("fallbackModels", agent.fallbackModels),
|
|
16
|
+
line("thinking", agent.thinking),
|
|
17
|
+
line("tools", agent.tools),
|
|
18
|
+
agent.extensions !== undefined ? line("extensions", agent.extensions) ?? "extensions:" : undefined,
|
|
19
|
+
line("skills", agent.skills),
|
|
20
|
+
line("systemPromptMode", agent.systemPromptMode),
|
|
21
|
+
line("inheritProjectContext", agent.inheritProjectContext),
|
|
22
|
+
line("inheritSkills", agent.inheritSkills),
|
|
23
|
+
line("triggers", agent.routing?.triggers),
|
|
24
|
+
line("useWhen", agent.routing?.useWhen),
|
|
25
|
+
line("avoidWhen", agent.routing?.avoidWhen),
|
|
26
|
+
line("cost", agent.routing?.cost),
|
|
27
|
+
line("category", agent.routing?.category),
|
|
28
|
+
"---",
|
|
29
|
+
"",
|
|
30
|
+
agent.systemPrompt.trim(),
|
|
31
|
+
"",
|
|
32
|
+
].filter((entry): entry is string => entry !== undefined);
|
|
33
|
+
return lines.join("\n");
|
|
34
|
+
}
|