pi-crew 0.5.2 → 0.5.6
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 +183 -0
- package/README.md +17 -1
- package/docs/architecture.md +2 -0
- package/docs/bugs/cross-session-notification-leakage.md +82 -0
- package/docs/coding-agent-optimization.md +268 -0
- package/docs/deep-review-report.md +384 -0
- package/docs/distillation/cybersecurity-patterns.md +294 -0
- package/docs/migration-v0.4-v0.5.md +208 -0
- package/docs/optimization-plan.md +642 -0
- package/docs/pi-crew-v0.5.5-audit-fix-plan.md +133 -0
- package/docs/pi-mono-opportunities.md +969 -0
- package/docs/pi-mono-review.md +291 -0
- package/docs/skills/REFERENCE.md +144 -0
- package/package.json +12 -9
- package/skills/artifact-analysis-loop/SKILL.md +302 -0
- package/skills/async-worker-recovery/SKILL.md +19 -1
- package/skills/child-pi-spawning/SKILL.md +19 -6
- package/skills/context-artifact-hygiene/SKILL.md +19 -2
- package/skills/delegation-patterns/SKILL.md +68 -3
- package/skills/detection-pipeline-design/SKILL.md +285 -0
- package/skills/event-log-tracing/SKILL.md +20 -6
- package/skills/git-master/SKILL.md +20 -6
- package/skills/hunting-investigation-loop/SKILL.md +401 -0
- package/skills/incident-playbook-construction/SKILL.md +383 -0
- package/skills/live-agent-lifecycle/SKILL.md +20 -6
- package/skills/mailbox-interactive/SKILL.md +19 -6
- package/skills/model-routing-context/SKILL.md +19 -1
- package/skills/multi-perspective-review/SKILL.md +19 -4
- package/skills/observability-reliability/SKILL.md +19 -2
- package/skills/orchestration/SKILL.md +20 -2
- package/skills/ownership-session-security/SKILL.md +20 -2
- package/skills/pi-extension-lifecycle/SKILL.md +20 -2
- package/skills/post-mortem/SKILL.md +7 -2
- package/skills/read-only-explorer/SKILL.md +20 -6
- package/skills/requirements-to-task-packet/SKILL.md +23 -3
- package/skills/resource-discovery-config/SKILL.md +20 -2
- package/skills/runtime-state-reader/SKILL.md +20 -2
- package/skills/safe-bash/SKILL.md +21 -6
- package/skills/scrutinize/SKILL.md +20 -2
- package/skills/secure-agent-orchestration-review/SKILL.md +29 -2
- package/skills/security-review/SKILL.md +560 -0
- package/skills/state-mutation-locking/SKILL.md +22 -2
- package/skills/systematic-debugging/SKILL.md +8 -6
- package/skills/threat-hypothesis-framework/SKILL.md +175 -0
- package/skills/ui-render-performance/SKILL.md +20 -2
- package/skills/verification-before-done/SKILL.md +17 -2
- package/skills/widget-rendering/SKILL.md +21 -6
- package/skills/workspace-isolation/SKILL.md +20 -6
- package/skills/worktree-isolation/SKILL.md +20 -6
- package/src/agents/agent-config.ts +40 -1
- package/src/benchmark/benchmark-runner.ts +45 -0
- package/src/benchmark/feedback-loop.ts +5 -0
- package/src/config/config.ts +32 -5
- package/src/config/role-tools.ts +82 -0
- package/src/config/suggestions.ts +8 -0
- package/src/config/types.ts +4 -0
- package/src/extension/async-notifier.ts +10 -1
- package/src/extension/crew-cleanup.ts +114 -0
- package/src/extension/cross-extension-rpc.ts +1 -1
- package/src/extension/notification-router.ts +18 -0
- package/src/extension/register.ts +27 -19
- package/src/extension/registration/subagent-tools.ts +1 -1
- package/src/extension/team-tool/anchor.ts +201 -0
- package/src/extension/team-tool/api.ts +2 -1
- package/src/extension/team-tool/auto-summarize.ts +154 -0
- package/src/extension/team-tool/run.ts +42 -7
- package/src/extension/team-tool.ts +44 -2
- package/src/hooks/registry.ts +1 -3
- package/src/observability/event-bus.ts +69 -0
- package/src/observability/event-to-metric.ts +0 -2
- package/src/runtime/anchor-manager.ts +473 -0
- package/src/runtime/async-runner.ts +8 -4
- package/src/runtime/auto-summarize.ts +350 -0
- package/src/runtime/background-runner.ts +10 -3
- package/src/runtime/budget-tracker.ts +354 -0
- package/src/runtime/chain-runner.ts +507 -0
- package/src/runtime/child-pi.ts +123 -35
- package/src/runtime/crash-recovery.ts +5 -4
- package/src/runtime/crew-agent-runtime.ts +1 -0
- package/src/runtime/custom-tools/irc-tool.ts +13 -0
- package/src/runtime/custom-tools/submit-result-tool.ts +3 -2
- package/src/runtime/delivery-coordinator.ts +10 -3
- package/src/runtime/dynamic-script-runner.ts +482 -0
- package/src/runtime/foreground-control.ts +87 -17
- package/src/runtime/handoff-manager.ts +589 -0
- package/src/runtime/hidden-handoff.ts +424 -0
- package/src/runtime/live-agent-manager.ts +20 -4
- package/src/runtime/live-session-runtime.ts +39 -4
- package/src/runtime/manifest-cache.ts +2 -1
- package/src/runtime/model-resolver.ts +16 -4
- package/src/runtime/phase-tracker.ts +373 -0
- package/src/runtime/pi-args.ts +11 -1
- package/src/runtime/pi-json-output.ts +31 -0
- package/src/runtime/pipeline-runner.ts +514 -0
- package/src/runtime/progress-tracker.ts +124 -0
- package/src/runtime/retry-runner.ts +354 -0
- package/src/runtime/sandbox.ts +252 -0
- package/src/runtime/scheduler.ts +7 -2
- package/src/runtime/skill-effectiveness.ts +473 -0
- package/src/runtime/skill-instructions.ts +37 -3
- package/src/runtime/subagent-manager.ts +1 -1
- package/src/runtime/task-graph.ts +11 -1
- package/src/runtime/task-runner.ts +92 -18
- package/src/runtime/team-runner.ts +13 -12
- package/src/runtime/tool-progress.ts +10 -3
- package/src/runtime/verification-gates.ts +367 -0
- package/src/schema/team-tool-schema.ts +37 -0
- package/src/skills/discover-skills.ts +5 -0
- package/src/state/active-run-registry.ts +9 -2
- package/src/state/contracts.ts +9 -0
- package/src/state/crew-init.ts +3 -3
- package/src/state/decision-ledger.ts +98 -55
- package/src/state/event-log-rotation.ts +2 -2
- package/src/state/event-log.ts +144 -10
- package/src/state/hook-instinct-bridge.ts +5 -5
- package/src/state/mailbox.ts +10 -0
- package/src/state/run-cache.ts +18 -8
- package/src/state/state-store.ts +3 -1
- package/src/state/types.ts +4 -0
- package/src/tools/safe-bash-extension.ts +1 -0
- package/src/tools/safe-bash.ts +152 -20
- package/src/types/new-api-types.ts +34 -0
- package/src/ui/agent-management-overlay.ts +5 -1
- package/src/ui/crew-widget.ts +29 -15
- package/src/ui/overlays/mailbox-detail-overlay.ts +13 -2
- package/src/ui/powerbar-publisher.ts +101 -7
- package/src/ui/tool-render.ts +15 -15
- package/src/ui/transcript-cache.ts +13 -0
- package/src/utils/bm25-search.ts +16 -8
- package/src/utils/env-filter.ts +8 -5
- package/src/utils/redaction.ts +169 -15
- package/src/utils/session-utils.ts +52 -0
- package/src/utils/sse-parser.ts +10 -1
- package/src/worktree/cleanup.ts +6 -1
- package/src/worktree/worktree-manager.ts +32 -13
- package/workflows/chain.workflow.md +252 -0
- package/workflows/pipeline.workflow.md +27 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pi-extension-lifecycle
|
|
3
|
-
description: Pi extension lifecycle and registration patterns.
|
|
4
|
-
|
|
3
|
+
description: Pi extension lifecycle and registration patterns.
|
|
4
|
+
triggers:
|
|
5
|
+
- "add extension"
|
|
6
|
+
- "register tools"
|
|
7
|
+
- "session hooks"
|
|
8
|
+
- "context API"
|
|
9
|
+
- "extension lifecycle"
|
|
5
10
|
|
|
11
|
+
---
|
|
6
12
|
# pi-extension-lifecycle
|
|
7
13
|
|
|
8
14
|
Use this skill when working on Pi extension registration or lifecycle behavior.
|
|
@@ -23,6 +29,18 @@ Use this skill when working on Pi extension registration or lifecycle behavior.
|
|
|
23
29
|
- Clean up intervals, event subscriptions, child processes, and watchers on session switch/shutdown.
|
|
24
30
|
- Wrap optional Pi API hooks in compatibility checks/try-catch when supporting older Pi versions.
|
|
25
31
|
|
|
32
|
+
## Enforcement — Pi Extension Lifecycle Gate
|
|
33
|
+
|
|
34
|
+
**Before registering tools or handling session lifecycle, verify:**
|
|
35
|
+
|
|
36
|
+
- [ ] ExtensionContext/ExtensionCommandContext fresh after session replacement
|
|
37
|
+
- [ ] No stale context references retained after session switch/fork/reload
|
|
38
|
+
- [ ] Cleanup registered for intervals, subscriptions, child processes, watchers
|
|
39
|
+
- [ ] Tool/command names unique (no duplicate registrations)
|
|
40
|
+
- [ ] No blocking filesystem/network work in extension render callbacks
|
|
41
|
+
|
|
42
|
+
If ANY answer is NO → Stop. Fix lifecycle issues before proceeding.
|
|
43
|
+
|
|
26
44
|
## Anti-patterns
|
|
27
45
|
|
|
28
46
|
- Do not use stale context objects after session switch.
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: post-mortem
|
|
3
|
-
description: "Write engineering RCA record after bug is fixed.
|
|
3
|
+
description: "Write engineering RCA record after bug is fixed."
|
|
4
|
+
triggers:
|
|
5
|
+
- "post-mortem"
|
|
6
|
+
- "root cause"
|
|
7
|
+
- "RCA"
|
|
8
|
+
- "document this fix"
|
|
9
|
+
- "close out bug"
|
|
4
10
|
---
|
|
5
|
-
|
|
6
11
|
# post-mortem
|
|
7
12
|
|
|
8
13
|
The canonical engineering record of a bug fix. Written after debugging lands a real fix.
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: read-only-explorer
|
|
3
|
-
description: Read-only exploration and audit workflow.
|
|
4
|
-
|
|
3
|
+
description: "Read-only exploration and audit workflow."
|
|
4
|
+
triggers:
|
|
5
|
+
- "explore code"
|
|
6
|
+
- "audit source"
|
|
7
|
+
- "review code"
|
|
8
|
+
- "analyze codebase"
|
|
9
|
+
- "source audit"
|
|
5
10
|
|
|
11
|
+
---
|
|
6
12
|
# read-only-explorer
|
|
7
13
|
|
|
8
14
|
Use this skill for explorer, analyst, reviewer, and source-audit roles. These roles must inspect code without modifying it.
|
|
@@ -209,6 +215,18 @@ For each step, identify:
|
|
|
209
215
|
|
|
210
216
|
Always label uncertainty clearly. Use "may", "might", "could" for inference; "is", "shows", "contains" for evidence.
|
|
211
217
|
|
|
218
|
+
## Enforcement — Read-Only Explorer Gate
|
|
219
|
+
|
|
220
|
+
**Before reporting findings, verify:**
|
|
221
|
+
|
|
222
|
+
- [ ] No files edited, written, or deleted (read-only contract maintained)
|
|
223
|
+
- [ ] Findings include: path, line, evidence, severity, impact, recommendation
|
|
224
|
+
- [ ] Exact files inspected recorded with paths and line numbers
|
|
225
|
+
- [ ] Direct evidence distinguished from inference (cite vs guess)
|
|
226
|
+
- [ ] If implementation needed, recommend (do not modify code)
|
|
227
|
+
|
|
228
|
+
If ANY answer is NO → Stop. Adhere to read-only contract.
|
|
229
|
+
|
|
212
230
|
## Anti-patterns
|
|
213
231
|
|
|
214
232
|
- **Editing during exploration**: If you need to add logging or print statements, use a separate test script instead of modifying source files.
|
|
@@ -218,8 +236,6 @@ Always label uncertainty clearly. Use "may", "might", "could" for inference; "is
|
|
|
218
236
|
- **Not recording files inspected**: Without exact paths, findings can't be verified.
|
|
219
237
|
- **Inference as fact**: If unsure, mark it as inference.
|
|
220
238
|
|
|
221
|
-
---
|
|
222
|
-
|
|
223
239
|
## Source patterns
|
|
224
240
|
|
|
225
241
|
- `src/runtime/task-runner.ts` — task execution pipeline
|
|
@@ -229,8 +245,6 @@ Always label uncertainty clearly. Use "may", "might", "could" for inference; "is
|
|
|
229
245
|
- `src/extension/team-tool/` — API and tool handling
|
|
230
246
|
- `src/ui/` — widget and TUI rendering
|
|
231
247
|
|
|
232
|
-
---
|
|
233
|
-
|
|
234
248
|
## Verification
|
|
235
249
|
|
|
236
250
|
```bash
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requirements-to-task-packet
|
|
3
|
-
description: Use when a goal, issue, roadmap item, review finding, or user request must become actionable worker tasks.
|
|
4
|
-
|
|
3
|
+
description: "Use when a goal, issue, roadmap item, review finding, or user request must become actionable worker tasks."
|
|
4
|
+
triggers:
|
|
5
|
+
- "convert requirements"
|
|
6
|
+
- "create task packet"
|
|
7
|
+
- "decompose goal"
|
|
8
|
+
- "write task"
|
|
9
|
+
- "spec to implementation"
|
|
5
10
|
|
|
11
|
+
---
|
|
6
12
|
# requirements-to-task-packet
|
|
7
13
|
|
|
8
14
|
Core principle: workers need explicit task packets, not inherited ambiguity. Ask only when ambiguity changes architecture, safety, public behavior, or data loss risk; otherwise record assumptions.
|
|
@@ -55,9 +61,23 @@ Use observable checks:
|
|
|
55
61
|
- compatibility requirements such as Windows paths or Pi CLI flags;
|
|
56
62
|
- rollback notes.
|
|
57
63
|
|
|
64
|
+
## Enforcement — Requirements to Task Packet Gate
|
|
65
|
+
|
|
66
|
+
**Before dispatching workers, verify task packet has:**
|
|
67
|
+
|
|
68
|
+
- [ ] Objective clearly stated (goal in one sentence)
|
|
69
|
+
- [ ] Scope and paths defined (what is/isn't in scope)
|
|
70
|
+
- [ ] Allowed vs forbidden edits specified
|
|
71
|
+
- [ ] Inputs/dependencies and expected output artifacts listed
|
|
72
|
+
- [ ] Acceptance criteria are observable (command output, state transition, test)
|
|
73
|
+
- [ ] Verification commands provided
|
|
74
|
+
- [ ] Escalation conditions defined
|
|
75
|
+
|
|
76
|
+
If ANY answer is NO → Stop. Complete task packet before dispatching.
|
|
77
|
+
|
|
58
78
|
## Anti-patterns
|
|
59
79
|
|
|
60
|
-
- Broad
|
|
80
|
+
- Broad "fix everything" prompts.
|
|
61
81
|
- Buried assumptions.
|
|
62
82
|
- Expanding scope because context remains.
|
|
63
83
|
- Treating tests as proof when the requirement was never asserted.
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: resource-discovery-config
|
|
3
|
-
description: pi-crew resource and configuration discovery workflow.
|
|
4
|
-
|
|
3
|
+
description: "pi-crew resource and configuration discovery workflow."
|
|
4
|
+
triggers:
|
|
5
|
+
- "discover agents"
|
|
6
|
+
- "find teams"
|
|
7
|
+
- "config override"
|
|
8
|
+
- "resource discovery"
|
|
9
|
+
- "skill loading"
|
|
5
10
|
|
|
11
|
+
---
|
|
6
12
|
# resource-discovery-config
|
|
7
13
|
|
|
8
14
|
Use this skill for pi-crew resource/config work.
|
|
@@ -23,6 +29,18 @@ Use this skill for pi-crew resource/config work.
|
|
|
23
29
|
- Validate config with schema and provide actionable errors.
|
|
24
30
|
- When adding new config fields, update defaults, schema, docs, tests, and examples together.
|
|
25
31
|
|
|
32
|
+
## Enforcement — Resource Discovery Config Gate
|
|
33
|
+
|
|
34
|
+
**Before adding config or changing resource discovery, verify:**
|
|
35
|
+
|
|
36
|
+
- [ ] Discovery precedence respected (project > user > builtin)
|
|
37
|
+
- [ ] Config schema validated with actionable errors on invalid input
|
|
38
|
+
- [ ] Dangerous user-only settings blocked in lower-trust contexts
|
|
39
|
+
- [ ] Resource paths resolved correctly (package-root not src/skills after build)
|
|
40
|
+
- [ ] New config fields have defaults, schema, docs, tests, and examples
|
|
41
|
+
|
|
42
|
+
If ANY answer is NO → Stop. Fix config/discovery issues before proceeding.
|
|
43
|
+
|
|
26
44
|
## Anti-patterns
|
|
27
45
|
|
|
28
46
|
- Resolving package skills to `src/skills` instead of package-root `skills` after publishing.
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: runtime-state-reader
|
|
3
|
-
description: Safe read-only navigation of pi-crew run state.
|
|
3
|
+
description: Safe read-only navigation of pi-crew run state.
|
|
4
|
+
triggers:
|
|
5
|
+
- "inspect manifest"
|
|
6
|
+
- "read tasks"
|
|
7
|
+
- "trace events"
|
|
8
|
+
- "examine state"
|
|
9
|
+
- "diagnostics"
|
|
4
10
|
---
|
|
5
|
-
|
|
6
11
|
# runtime-state-reader
|
|
7
12
|
|
|
8
13
|
Use this skill when debugging or auditing a pi-crew run.
|
|
@@ -32,6 +37,19 @@ Use this skill when debugging or auditing a pi-crew run.
|
|
|
32
37
|
5. Inspect artifacts/diagnostics only through contained paths.
|
|
33
38
|
6. Report root cause and smallest safe remediation.
|
|
34
39
|
|
|
40
|
+
## Enforcement — Runtime State Reader Gate
|
|
41
|
+
|
|
42
|
+
**Before inspecting or reporting on run state, verify:**
|
|
43
|
+
|
|
44
|
+
- [ ] Using exported state APIs (not direct file parsing where helpers exist)
|
|
45
|
+
- [ ] State treated as append-mostly (no mutations during review/debugging)
|
|
46
|
+
- [ ] runId validated before use (no untrusted path concatenation)
|
|
47
|
+
- [ ] Corrupt JSONL handled gracefully (skip malformed lines)
|
|
48
|
+
- [ ] Terminal vs active statuses distinguished (critical for conclusions)
|
|
49
|
+
- [ ] Exact paths inspected reported with direct evidence vs inference labeled
|
|
50
|
+
|
|
51
|
+
If ANY answer is NO → Stop. Verify state access method before proceeding.
|
|
52
|
+
|
|
35
53
|
## Verification
|
|
36
54
|
|
|
37
55
|
For code changes to state readers:
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: safe-bash
|
|
3
|
-
description: "Safe shell-command workflow.
|
|
4
|
-
|
|
3
|
+
description: "Safe shell-command workflow."
|
|
4
|
+
triggers:
|
|
5
|
+
- "run this command"
|
|
6
|
+
- "execute bash"
|
|
7
|
+
- "safe bash"
|
|
8
|
+
- "destructive command"
|
|
9
|
+
- "shell injection"
|
|
5
10
|
|
|
11
|
+
---
|
|
6
12
|
# safe-bash
|
|
7
13
|
|
|
8
14
|
Use this skill whenever a task may execute shell commands. This skill covers cross-platform shell safety, destructive action confirmation, and Windows-specific patterns.
|
|
@@ -268,6 +274,19 @@ else
|
|
|
268
274
|
fi
|
|
269
275
|
```
|
|
270
276
|
|
|
277
|
+
## Enforcement — Safe Bash Gate
|
|
278
|
+
|
|
279
|
+
**Before executing shell commands, verify:**
|
|
280
|
+
|
|
281
|
+
- [ ] Command classified as read-only or mutating (report which)
|
|
282
|
+
- [ ] Mutating/destructive commands have explicit confirmation before execution
|
|
283
|
+
- [ ] Paths use platform-safe construction (path.join, not hardcoded forward slashes)
|
|
284
|
+
- [ ] Timeout set for long-running commands (prevent blocking)
|
|
285
|
+
- [ ] Exit codes checked and errors handled appropriately
|
|
286
|
+
- [ ] Secrets not passed in command-line args (use environment variables)
|
|
287
|
+
|
|
288
|
+
If ANY answer is NO → Stop. Classify and protect before executing.
|
|
289
|
+
|
|
271
290
|
## Anti-patterns
|
|
272
291
|
|
|
273
292
|
- **`rm -rf` without path validation**: Always double-check the path before rm -rf
|
|
@@ -277,8 +296,6 @@ fi
|
|
|
277
296
|
- **Not handling Windows spaces**: Test on Windows before assuming paths work
|
|
278
297
|
- **Background process zombie**: Always handle process exit or store the pid for cleanup
|
|
279
298
|
|
|
280
|
-
---
|
|
281
|
-
|
|
282
299
|
## Source patterns
|
|
283
300
|
|
|
284
301
|
- `src/utils/resolve-shell.ts` — cross-platform shell detection
|
|
@@ -286,8 +303,6 @@ fi
|
|
|
286
303
|
- `src/worktree/worktree-manager.ts` — git commands via execFileSync
|
|
287
304
|
- `src/config/defaults.ts` — platform detection
|
|
288
305
|
|
|
289
|
-
---
|
|
290
|
-
|
|
291
306
|
## Verification
|
|
292
307
|
|
|
293
308
|
```bash
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scrutinize
|
|
3
|
-
description: "Outsider-perspective review questioning intent before tracing code.
|
|
4
|
-
|
|
3
|
+
description: "Outsider-perspective review questioning intent before tracing code."
|
|
4
|
+
triggers:
|
|
5
|
+
- "scrutinize this"
|
|
6
|
+
- "question this"
|
|
7
|
+
- "is there a better way"
|
|
8
|
+
- "simplify this"
|
|
9
|
+
- "too complex"
|
|
5
10
|
|
|
11
|
+
---
|
|
6
12
|
# Scrutinize
|
|
7
13
|
|
|
8
14
|
Stand outside the change and ask whether it should exist at all, then verify it actually does what it claims end-to-end.
|
|
@@ -58,6 +64,18 @@ Severity:
|
|
|
58
64
|
|
|
59
65
|
Close with verdict: **ship / fix-then-ship / rework / reject** — with single biggest reason.
|
|
60
66
|
|
|
67
|
+
## Enforcement — Scrutinize Gate
|
|
68
|
+
|
|
69
|
+
**Before reporting scrutiny findings, verify:**
|
|
70
|
+
|
|
71
|
+
- [ ] Simpler-alternative pass completed (delete, use existing, smaller change, different layer)
|
|
72
|
+
- [ ] Intent stated in one sentence in your own words
|
|
73
|
+
- [ ] Code traced end-to-end (not just diff lines)
|
|
74
|
+
- [ ] Verdict given: ship / fix-then-ship / rework / reject
|
|
75
|
+
- [ ] Every claim cited with specific path/file/line evidence
|
|
76
|
+
|
|
77
|
+
If ANY answer is NO → Stop. Complete scrutiny requirements before reporting.
|
|
78
|
+
|
|
61
79
|
## Rules
|
|
62
80
|
|
|
63
81
|
- **No rubber-stamps.** "LGTM" is not an output. If nothing found, say what you traced.
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: secure-agent-orchestration-review
|
|
3
|
-
description: Use when reviewing delegation, skill loading, tool access, worker prompts, artifacts, runtime config, state, ownership, or subprocess execution.
|
|
4
|
-
|
|
3
|
+
description: "Use when reviewing delegation, skill loading, tool access, worker prompts, artifacts, runtime config, state, ownership, or subprocess execution."
|
|
4
|
+
triggers:
|
|
5
|
+
- "review delegation"
|
|
6
|
+
- "check skill security"
|
|
7
|
+
- "audit prompts"
|
|
8
|
+
- "security review"
|
|
9
|
+
- "orchestration audit"
|
|
10
|
+
|
|
5
11
|
|
|
12
|
+
---
|
|
6
13
|
# secure-agent-orchestration-review
|
|
7
14
|
|
|
8
15
|
Core principle: every delegated worker crosses trust boundaries. Safe orchestration requires contained paths, explicit ownership, scoped tools, non-invasive defaults, and prompt-injection resistance.
|
|
@@ -40,6 +47,26 @@ Review:
|
|
|
40
47
|
- Skills should be loaded by safe name and source-labeled without absolute path disclosure.
|
|
41
48
|
- Worker prompts should state instruction precedence and treat artifacts as data.
|
|
42
49
|
|
|
50
|
+
## Enforcement — Secure Agent Orchestration Review Gate
|
|
51
|
+
|
|
52
|
+
**Before reporting security findings, verify:**
|
|
53
|
+
|
|
54
|
+
- [ ] All trust boundaries examined (parent↔child, user↔task packet, project↔package skills, etc.)
|
|
55
|
+
- [ ] Must-check findings covered: unsafe defaults, path containment, prompt injection, secrets, destructive commands, ownership races, supply chain
|
|
56
|
+
- [ ] Finding format complete: severity, path/symbol, scenario, fix, verification
|
|
57
|
+
- [ ] Must-fix security issues separated from hardening suggestions
|
|
58
|
+
- [ ] Verification commands provided for each finding
|
|
59
|
+
|
|
60
|
+
If ANY answer is NO → Stop. Complete security review before reporting.
|
|
61
|
+
|
|
43
62
|
## Finding Format
|
|
44
63
|
|
|
45
64
|
Include severity, path/symbol, scenario, fix, and verification. Separate must-fix security issues from hardening suggestions.
|
|
65
|
+
|
|
66
|
+
## Anti-Patterns
|
|
67
|
+
|
|
68
|
+
- **Don't** skip checking for unsafe defaults in configuration
|
|
69
|
+
- **Don't** trust agent output without verifying path containment
|
|
70
|
+
- **Don't** skip prompt injection checks when processing user input
|
|
71
|
+
- **Don't** skip secrets detection in environment and config files
|
|
72
|
+
- **Don't** skip checking for ownership race conditions in concurrent operations
|