pi-subagents 0.82.0 → 0.82.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +1 -1
  3. package/bundle/{chunk-GC4DSPMH.js → chunk-3JCDWF4V.js} +3 -3
  4. package/bundle/{chunk-NRQ75MGH.js → chunk-46XKCPJR.js} +33 -3
  5. package/bundle/{chunk-M2CTFYT3.js → chunk-4Y2ROR7L.js} +3 -3
  6. package/bundle/{chunk-VH5OAWVG.js → chunk-6XJB7PIX.js} +2 -2
  7. package/bundle/{chunk-7PCKZHR5.js → chunk-FXUXCX2K.js} +2 -2
  8. package/bundle/{chunk-7YMXOYEU.js → chunk-G4GZD3OJ.js} +7 -6
  9. package/bundle/{chunk-WVD4UEL4.js → chunk-IVAE5Z6Q.js} +12 -12
  10. package/bundle/{chunk-SIJ4S3EN.js → chunk-JYUKW2SY.js} +5 -5
  11. package/bundle/{chunk-7IVSUMQQ.js → chunk-PBK2I7WY.js} +3 -3
  12. package/bundle/{chunk-MHZ4G23A.js → chunk-PDZWJCHD.js} +1 -1
  13. package/bundle/{chunk-B5EKXDHE.js → chunk-QE4AGIMG.js} +11 -10
  14. package/bundle/{chunk-NGGAFDL6.js → chunk-UCPP4GNU.js} +1 -1
  15. package/bundle/{chunk-ZQGSDHL6.js → chunk-UTT254JE.js} +1 -1
  16. package/bundle/{chunk-W2SZ22EM.js → chunk-VSUSLDNW.js} +2 -2
  17. package/bundle/{chunk-ZLINIYTP.js → chunk-ZIV4J4HG.js} +6 -7
  18. package/bundle/index.js +1 -1
  19. package/bundle/preflight.js +2 -2
  20. package/docs/agents.md +6 -7
  21. package/package.json +1 -1
  22. package/skills/council-mode/SKILL.md +1 -4
  23. package/skills/pi-subagents/SKILL.md +130 -107
  24. package/skills/pi-subagents/references/orchestration.md +124 -0
  25. package/skills/pi-subagents/references/prompting-and-roles.md +96 -295
  26. package/src/extension/reply-workflow-script.js +5 -2
  27. package/src/extension/subagent-guide.js +1 -2
  28. package/src/runs/background/async-status.d.ts +2 -0
  29. package/src/runs/background/async-status.js +1 -1
  30. package/src/runs/background/terminal-run-index.d.ts +1 -0
  31. package/src/runs/background/terminal-run-index.js +40 -1
  32. package/src/tui/fleet.js +1 -0
  33. package/skills/pi-subagents/references/constraints-and-recipes.md +0 -74
  34. package/skills/pi-subagents/references/execution-controls.md +0 -564
  35. package/skills/pi-subagents/references/management-authoring-rpc.md +0 -165
  36. package/skills/pi-subagents/references/multi-lane-orchestration.md +0 -61
  37. package/skills/pi-subagents/references/review-and-validation.md +0 -73
@@ -1,165 +0,0 @@
1
- # Pi Subagents: Management Authoring Rpc
2
-
3
- This file is a detailed reference loaded from `skills/pi-subagents/SKILL.md`.
4
-
5
- ## Management Mode
6
-
7
- The `subagent(...)` tool also supports management actions.
8
-
9
- ### List available agents and legacy chain records
10
-
11
- ```typescript
12
- subagent({ action: "list" })
13
- ```
14
-
15
- ### List retained children
16
-
17
- ```typescript
18
- subagent({ action: "children.list" })
19
- ```
20
-
21
- Lists up to the last 10 retained workflow children from this parent session with explicit `resumable` or `not resumable` rows. This workflow-only roster is not an exhaustive list of direct native children. Resume only rows reported `resumable`. When the exact run id of an intended direct child is known, inspect it with `subagent({ action: "status", id: "<run-id>" })`; if status identifies the candidate, attempt `subagent({ action: "resume", id: "<run-id>", message: "..." })`. Resume performs the authoritative eligibility check and may reject the attempt. Continue one inside a workflow with `runs.run(key, { resume: "<run-id>", task: "follow-up" })`; each workflow key identifies one result lane, so use a new stable workflow key for every distinct retained resume pass. Same-key calls are reused only when launch parameters are identical, and incompatible parameters are rejected. The revived child keeps its stored agent, model, and tool contract. Start a same-role fallback challenge, labeled as fallback, only when no known candidate exists or resume rejects eligibility. `steer` with `mode: "follow_up"` only queues text for the next `resume` when the child has already completed.
22
-
23
- ### Refinement overlays
24
-
25
- ```typescript
26
- subagent({ action: "refine", agent: "reviewer" })
27
- subagent({ action: "refine.show", agent: "reviewer" })
28
- subagent({ action: "refine.rollback", agent: "reviewer" })
29
- ```
30
-
31
- `refine` builds a bounded project-local guidance overlay for one agent from recent run evidence, using a fresh read-only proposal child; validated guidance is stored under `.pi/subagents/refinements/<agent>.md` with revision snapshots and is injected into that agent's child system prompt for this project. `refine.show` prints the current overlay and history; `refine.rollback` restores the previous revision. Guidance that tries to override safety, policy, tool, output, acceptance, developer, or system instructions is rejected. `/subagents-refine <agent>` is the slash equivalent.
32
-
33
- ### Create an agent
34
-
35
- ```typescript
36
- subagent({
37
- action: "create",
38
- options: {
39
- config: {
40
- name: "my-agent",
41
- package: "code-analysis",
42
- description: "Project-specific implementation helper",
43
- systemPrompt: "Your system prompt here.",
44
- systemPromptMode: "replace",
45
- model: "provider/model-id",
46
- tools: "read,grep,find,ls,bash"
47
- }
48
- }
49
- })
50
- ```
51
-
52
- ### Update an agent
53
-
54
- ```typescript
55
- subagent({
56
- action: "update",
57
- agent: "code-analysis.my-agent",
58
- options: {
59
- config: {
60
- thinking: "high"
61
- }
62
- }
63
- })
64
- ```
65
-
66
- ### Delete an agent
67
-
68
- ```typescript
69
- subagent({ action: "delete", agent: "code-analysis.my-agent" })
70
- ```
71
-
72
- ### Eject, disable, enable, and reset
73
-
74
- ```typescript
75
- // Copy a bundled builtin/package agent to user scope as an editable custom file.
76
- subagent({ action: "eject", agent: "reviewer" })
77
- subagent({ action: "eject", agent: "reviewer", options: { agentScope: "project" } })
78
-
79
- // Hide an agent from runtime discovery without deleting it (reversible).
80
- subagent({ action: "disable", agent: "reviewer" })
81
- subagent({ action: "enable", agent: "reviewer", options: { agentScope: "project" } })
82
-
83
- // Delete the scope's custom agent file and/or settings override, restoring the bundled default.
84
- subagent({ action: "reset", agent: "reviewer" })
85
- ```
86
-
87
- `eject` copies a builtin or package agent verbatim into the user (default) or project agent dir so it can be customized without hunting package files; the copy shadows the original by runtime name. `disable` writes a reversible `agentOverrides.<name>.disabled: true` entry to the user or project settings file. `enable` removes that `disabled` field while keeping any other override fields. `reset` removes the scope's custom file and settings override to restore the bundled default, and refuses if no bundled default exists (use `delete` for purely custom agents). All four take optional `agentScope: "user" | "project"`; project overrides win over user ones, so target the project scope to undo a project-scope disable.
88
-
89
- Use management actions when the system needs to create or edit subagents on
90
- demand without dropping into raw file editing.
91
-
92
- Management actions create or update user/project agent files. `config.name` is the local frontmatter name; optional `config.package` registers and looks up the runtime name as `{package}.{name}`. Use the dotted runtime name for `get`, `update`, `delete`, slash commands, and scripted workflow steps. For small agent changes such as a model swap, prefer `subagents.agentOverrides` in settings. Durable `.chain.md` definitions are legacy records, not a current authoring target; use a workflow script file (`workflow: "./path.js"`) or `/prompt-workflow` for repeatable orchestration.
93
-
94
- ## Creating and Editing Agents by File
95
-
96
- A minimal agent file looks like this:
97
-
98
- ```markdown
99
- ---
100
- name: my-agent
101
- package: code-analysis
102
- description: What this agent does
103
- advertise: true
104
- aliases: developer, coder
105
- model: provider/model-id
106
- thinking: high
107
- tools: read, grep, find, ls, bash
108
- systemPromptMode: replace
109
- inheritProjectContext: true
110
- inheritGlobalContext: false
111
- inheritSkills: false
112
- skills: safe-bash, review-checklist
113
- skillPath: ./skills, ../shared-skills
114
- ---
115
-
116
- Your system prompt here.
117
- ```
118
-
119
- That is only a starting point. Omit `package` for the traditional unqualified runtime name. Set `advertise: true` only when the parent should receive this agent's name and description before deciding whether to delegate; advertisement is off by default. Common optional fields include:
120
- - `defaultProgress`
121
- - `defaultReads`
122
- - `output`
123
- - `aliases`
124
- - `subagentOnlyExtensions`
125
- - `skills`
126
- - `skillPath`
127
- - `memory`
128
- - `maxSubagentDepth`
129
- - `acceptance`
130
- - `acceptanceRole`
131
- - `async` — single-agent default for background launch (`true`/`false`); explicit tool-call `async` wins
132
- - `timeoutMs` — single-agent default run-level max runtime in ms; foreground calls use a 30-minute package default only when neither the call nor agent provides one (tool alias `maxRuntimeMs` is also accepted)
133
-
134
- `aliases` is an optional comma-separated or block-list set of alternate names for selecting an agent. Aliases resolve to the canonical `name` for execution, status, persistence, and config. Exact canonical names take precedence over aliases, and alias collisions between distinct canonical agents fail as ambiguous. Management create/update accepts a comma-separated string, string array, or `false`/empty string to clear aliases.
135
-
136
- `acceptance` is a single-agent launch default. Use a scalar level such as `checked` or an inline/block YAML map such as `{ level: "none", reason: "lightweight lookup" }`. An explicit tool-call value wins; scripted workflow child acceptance remains configured on the `runs.run` or `runs.all` item. Management create/update accepts the same policy object, and `acceptance: ""` clears the frontmatter default (`false` remains the deprecated disabled-policy shorthand).
137
-
138
- `acceptanceRole` is `read-only` or `writer` and controls automatic acceptance inference only. The structured role is authoritative; task wording and agent names do not escalate acceptance. Omission uses lightweight attestation. The field does not grant or revoke tools. Management accepts `false` or an empty string to clear it.
139
-
140
- `tools` is a strict child allowlist, not an extension loader. For a named extension tool, keep its registered name in `tools` and load its provider through normal Pi discovery, `extensions`, a path-like `tools` entry, or `subagentOnlyExtensions`. For example, pair `tools: read, fixture_search` with `subagentOnlyExtensions: ./tools/fixture-search.ts` when the provider should exist only in that agent's child sessions. The child now fails with the unavailable names and provider-loading guidance instead of silently continuing when a requested tool is absent; internal `structured_output` is allowed automatically when an output schema requires it.
141
-
142
- `skillPath` adds invocation-private skill files or discovery directories relative to the agent file; it does not select them, so list the desired names under `skills`. Local matches win, unresolved or unreadable matches use normal discovery, and local candidates never enter the parent/global catalog. Use `memory: { scope: "project" | "user", path: "<name>" }` for opt-in role-specific durable memory under the dedicated `agent-memory/` namespace; it is separate from parent/session project memory.
143
-
144
- For many customizations, builtin overrides in settings are lower-friction than
145
- copying a full builtin file.
146
-
147
- ## Prompt Template Integration
148
-
149
- The package includes prompt shortcuts for common workflows: `/parallel-review`,
150
- `/review-loop`, `/parallel-research`, `/gather-context-and-clarify`, and
151
- `/parallel-cleanup`. Use them when the user wants repeatable review,
152
- review/fix loops, research, context handoff, implementation handoff,
153
- clarification, or cleanup-review patterns. `/parallel-review autofix` and
154
- `/parallel-cleanup autofix` synthesize reviewer feedback and then apply only the
155
- fixes worth doing now. Parent agents can also apply the same recipes directly
156
- with `subagent(...)` when the user describes the workflow in natural language
157
- instead of invoking a slash command.
158
-
159
- Additional user prompt templates can delegate into `pi-subagents` through the native `/prompt-workflow` command. This is useful when a slash command should always run through a particular agent or with forked context. Prompt frontmatter can set `subagent`, `model`, `skill`, `cwd`, `fresh`, `fork`, or `inheritContext` for the native adapter.
160
-
161
- ## Extension RPC
162
-
163
- Other Pi extensions can call `pi-subagents` through the in-process event bus. The RPC channels are `subagents:rpc:v1:ready`, `subagents:rpc:v1:request`, and per-request replies at `subagents:rpc:v1:reply:<requestId>`. Envelopes use `{ version: 1, requestId, method, params }`, and replies use `{ version: 1, requestId, success, data | error }`. `ping` advertises the exact process-local async completion event as `events.asyncComplete` for RPC-spawn consumers.
164
-
165
- Methods: `ping`, `status`, `manage`, `spawn`, `steer`, `interrupt`, `resume`, `stop`, and `cost`. `ping` capability metadata advertises optional projections: `capabilities.fleetStatus: { version: 1 }` adds bounded current-session `data.fleet` records (opaque reconciliation `key`, resolved `agent`, optional `role`, `model`, `effort`, caller-facing `goal`, `startedAt`, split `{ input, output, total }` tokens, plus `totalActive`/`omitted` overflow counts) to successful `status` replies; `capabilities.launchResolvedExtensions` advertises parent-resolved opaque launch-extension identifiers in status details; `capabilities.runtimeAcknowledgedExtensions` advertises the best-effort child-runtime acknowledgement projection fed by cooperating extensions emitting `subagent:acknowledge-extension`; `capabilities.cost: { version: 1 }` advertises parent-plus-child accounting as data. Foreground `details.results[]` rows carry a stable numeric `index`; correlate children by `(runId, index)` rather than row position. Consumers should read status/result artifacts and RPC projections instead of scraping terminal output and must ignore unknown fields. `spawn` accepts either `{ agent, task? }`, inline script text as `script`, or `workflow` with a script path (containing `/`) or a named workflow resource; `workflow: true` is rejected because RPC has no assistant reply to read. It is async-only and rejects management actions, `async: false`, or `clarify: true`. It reuses the normal executor, so discovery, validation, session attribution, configured spawn caps, child-safety depth, artifacts, and async status are shared with the `subagent` tool. `manage` accepts only the schedule actions advertised by `ping.capabilities.managementActions`. `status`, acknowledged async `steer`, and `interrupt` map to the normal control actions. RPC steer disables pause-and-revive recovery and advertises `capabilities.nonRecoveringSteer`, preserving the caller's authority over the exact spawned child. `resume` requires a target plus non-empty message and delegates to the package-owned revival path; it may set a caller-owned `file-only` output path but cannot override the persisted child model, tools, budgets, session ownership, or exclusive session lease. For retained-child workflows, resume only roster rows reported `resumable`; because that workflow-only roster is not exhaustive, inspect the exact status of a known direct-run candidate and attempt the authoritative resume when status identifies it. Start a labeled same-role fallback only when there is no known candidate or resume rejects eligibility. `stop` targets running async runs through the existing timeout control channel. `pi.events` is process-local, so separate Pi processes and child subagents need lifecycle artifact files or `pi-intercom` instead.
@@ -1,61 +0,0 @@
1
- # Multi-Lane Orchestration
2
-
3
- Use this reference when several independent tasks need coordinated workers, worktrees, or repositories. It defines lane ownership; use the other pi-subagents references for run controls, prompts, and mission details. The parent remains the final decision-maker.
4
-
5
- Create lanes only after delegation is operator-authorized and each lane materially improves evidence, independent review, specialization, useful parallelism, or isolated execution. Do not manufacture parallelism: keep dependent work serial, and only split work when each lane has a distinct decision and useful output.
6
-
7
- ## Mandatory implementation-topology preflight
8
-
9
- Before launching a writer for substantial mutation work, classify the implementation as **single-seam** or **multi-seam**. Two or more independently testable contracts or source boundaries make it multi-seam. One PR does not imply one writer, and the one-writer-per-worktree rule prevents concurrent ownership conflicts; it does not authorize an issue-wide commission.
10
-
11
- Record the classification and evidence on a lane board before writer launch. For multi-seam work, give each isolated component writer exclusive file or contract ownership and focused validation gates. Require every component to produce a committed or otherwise durable handoff, then start a separate integration-only owner after the component handoffs are ready. Mechanically reject and repartition a writer prompt if it owns all major outcomes across multiple independent boundaries.
12
-
13
- A single complete writer remains valid only when the board records evidence that the work is genuinely one seam or that splitting it would create overlapping ownership or artificial handoffs. This preflight must not manufacture parallelism: do not split tightly coupled work merely to increase the lane count.
14
-
15
- ## Lane board and authority
16
-
17
- Before multiple mutation-capable lanes start, record this board in the parent context:
18
-
19
- `Lane | repo/cwd | exact decision | claimed files or contract | isolation path | authority | next gate | handoff | why independent`
20
-
21
- Record the isolation path before the first mutation. Do not split one source seam or decision into duplicate lanes. Make overlapping work one lane with one source of truth.
22
-
23
- For every lane, record the delivery target, allowed actions, required validation, and review rigor. For cross-repository work, name the shared contract and which repository changes first. A blocked decision is a lane state: record the owner, options, recommended default, and evidence needed to continue.
24
-
25
- ## Partitioned runs
26
-
27
- Use one writer per repo/cwd or worktree. Mutation lanes need distinct isolation paths and explicit `cwd` values. Set `worktree: true` when a run needs managed worktree isolation within one repository. Each managed worktree branches from `HEAD` unless `baseRef` names another ref, and launch fails with "worktree isolation requires a clean git working tree" while the source checkout has modified, staged, or untracked files outside `.pi/subagents/`. In a shared or dirty checkout, commit your own changes before launching, give each lane an explicit `cwd` in a worktree you created, or run without isolation. Read-only runs can share a checkout only when they cannot change state or create generated files.
28
-
29
- For Pi extension repositories, keep lane worktrees outside auto-discovered extension directories such as `~/.pi/agent/extensions`. A stale extension worktree there can auto-load duplicate tools and shortcuts. Remove or move it only after its handoff is durable, the worktree is clean, and no run owns it.
30
-
31
- Partition fanout by repository, source seam, decision, or review angle. Each run needs a stable key, lane-specific task, and a managed output path when a file is needed. Do not launch prompts that differ only by item name or broad file glob.
32
-
33
- ### Cold-start packets and bounded orchestration audits
34
-
35
- Every child packet must stand alone: include the goal, exact repository/cwd/ref, authority and edit boundary, relevant context/evidence, success criteria, validation, expected output, and stop/escalation rules. Do not rely on parent history, an issue number, or a broad glob alone. An orchestration audit by a top-reasoning critic model is read-only and returns at most three cited omissions; use high thinking only as an explicit parent/user escalation, never as an autonomous root or a parallel placeholder.
36
-
37
- Use one async workflow script (`subagent({ workflow: true, async: true })` after a ```` ```js workflow ```` block) for a coordinated wave. Use `runs.all` for independent lanes and `runs.run` for dependent lane stages. Give cross-repository runs explicit `cwd` values and lane-qualified outputs. Use `outputMode: "file-only"` when a report must survive the run or feed a later stage. Keep scratch outputs relative so they live under subagent artifacts; use absolute paths only for durable memory, approved docs paths, or final handoff files.
38
-
39
- ## Keep independent work moving
40
-
41
- While one lane waits, run safe independent preparation, validation, or fresh read-only review lanes. Do not block the parent just because a run is active. If no safe lane remains, record the blocker and the event that will reopen work.
42
-
43
- In an ordinary interactive session, completion wakes the parent; after useful
44
- async lanes are launched or triaged, yield rather than use
45
- `bg_wait({ all: true })` as a barrier. “Continue/orchestrate/work until
46
- done” means keep the board moving while safe immediate work remains. If only
47
- async lanes are running, record the revisit trigger and yield.
48
-
49
- An ordinary coordinated workflow has one mission. Use its durable state, artifacts, run records, and receipts for recovery. Treat a receipt as evidence, not as authority or acceptance.
50
-
51
- After a writer produces a candidate, run the required fresh-context, read-only reviewer. The reviewer inspects the exact worktree and returns evidence-backed findings. The parent decides which findings are in scope and whether the lane is ready. Use `review-and-validation.md` for finding disposition, validation, and gate-failure triage. Send accepted fixes to that lane's sole writer, then rerun only the affected gate.
52
-
53
- ## Handoff, cleanup, and recovery
54
-
55
- Use stable lane-qualified artifact paths for reports and review output. A handoff states the lane status, repository and worktree, changed files, validation, open decisions, next action, and artifact or receipt paths. Copy only the final evidence to memory, a mission record, or a PR/comment, then remove scratch files from the active worktree before closing the lane.
56
-
57
- For backlog lanes and other subagent-governed workflows, a setup/runtime/tooling failure remains an infrastructure blocker. Preserve the exact failure, run/status, and repository/cwd/worktree/branch/ref state; verify a clean worktree or capture any partial diff before a same-protocol retry or asking the owner. Do not start another writer or switch to an external, foreground, or CLI execution mode without explicit owner approval.
58
-
59
- Keep a worktree until its handoff is durable, no run owns it, and no later gate needs it. Clean up only inside the recorded authority boundary. If a run stops or needs attention, preserve its worktree and artifacts, record the last known state and recovery owner, then resume that run or create one replacement lane from the handoff. Do not start another writer while worktree ownership is uncertain.
60
-
61
- Before completion, inspect the board. Every lane must be terminal or blocked with a named next action. Confirm one writer per repo/cwd or worktree, required validation, required fresh read-only review, and a durable handoff. The parent reports outcomes, evidence, residual risks, and the next decision.
@@ -1,73 +0,0 @@
1
- # Pi Subagents: Review And Validation
2
-
3
- Generic review and delivery guidance for operator-authorized delegated work. This file does not encode private backlog, merge, or release policy.
4
-
5
- ## Delivery loop
6
-
7
- Use the smallest loop that proves the change:
8
-
9
- 1. Inspect the source, diff, issue, or plan directly.
10
- 2. Keep one writer for each cwd or worktree.
11
- 3. Run focused validation that can fail for the changed behavior.
12
- 4. When the operator/project delegation contract calls for independent review, use a fresh-context read-only reviewer; otherwise parent inspection is valid.
13
- 5. Apply only accepted findings inside the same writer boundary.
14
- 6. Re-run affected validation and review only the changed blast radius.
15
- 7. Inspect the final diff and evidence before parent acceptance.
16
-
17
- Skip review ceremony for trivial wording, renames, or local-only probes when direct parent inspection is enough.
18
-
19
- ## Review shape
20
-
21
- | Situation | Shape |
22
- | --- | --- |
23
- | One coherent diff or one risk | one reviewer |
24
- | Independent risks, such as correctness, tests, security, or UI | parallel reviewers with distinct contracts |
25
- | Possible over-scope or needless complexity | same-writer challenge before fresh review |
26
- | Material design tradeoff | council mode |
27
-
28
- Reviewers are fresh-context by default. Use the ordinary `reviewer` role for routine code review. Forked oracle/advisor runs are escalation-only for parent-history, drift, root-cause, model-routing, or hard tradeoff evidence.
29
-
30
- ## Finding disposition
31
-
32
- The parent classifies each finding against current HEAD:
33
-
34
- - **Valid blocker:** concrete failure, repro, security issue, contract mismatch, or source-proven regression. Fix now.
35
- - **Valid non-blocker:** real but outside the delivery slice. Record or defer.
36
- - **Stale:** fixed or absent at the reviewed head. Cite current evidence.
37
- - **Invalid:** contradicted by source, tests, docs, or user-approved scope. Cite the contradiction.
38
- - **Out of policy/scope:** needs unapproved product, architecture, authority, release, or public-repo action. Escalate.
39
- - **Speculative:** no contract, repro, or reachable failure. Do not block.
40
-
41
- A clean reviewer result is evidence, not publication authority.
42
-
43
- ## Gate-failure triage
44
-
45
- When validation fails:
46
-
47
- 1. Confirm the run belongs to the exact head/ref under judgment.
48
- 2. Read the focused failing logs first.
49
- 3. Name the failing test, assertion, contract, or thread.
50
- 4. Classify cause: current diff, stale test, environment/setup, or existing flake.
51
- 5. Reproduce locally when practical with the narrowest command.
52
- 6. Patch forward when the current diff caused it.
53
- 7. For stale/flaky failures, collect proof before one rerun or residual-risk note.
54
- 8. Re-run the affected command or exact-head gate after every fix.
55
-
56
- For bot comments, classify each thread as valid, stale, invalid, or out of policy before assigning severity.
57
-
58
- ## Final checklist
59
-
60
- Before reporting delegated work as done, verify the relevant subset:
61
-
62
- - final diff contains only intended files
63
- - focused validation covers changed behavior
64
- - required independent review has fresh-review evidence
65
- - accepted findings are fixed and revalidated
66
- - publication authority exists before push, comment, close, merge, deploy, or release
67
- - external checks are exact-head when used as evidence
68
- - handoff is durable before cleanup
69
- - residual risks, skipped validation, and blocked decisions are explicit
70
-
71
- ## Public/private boundary
72
-
73
- For issue/PR backlogs, releases, merge queues, contributor credit, or repo-specific policy, load the matching user/project skill when available. Keep those rules out of this public package until intentionally released.