agent-concepts 0.0.0-stage → 0.4.0
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 +21 -0
- package/README.md +771 -2
- package/concepts/bc-brainstorming/body/SKILL.md +43 -0
- package/concepts/bc-code-review/body/SKILL.md +120 -0
- package/concepts/bc-codebase-design/body/SKILL.md +54 -0
- package/concepts/bc-codebase-docs/body/SKILL.md +150 -0
- package/concepts/bc-council-audit-security/body/SKILL.md +72 -0
- package/concepts/bc-council-chain/body/SKILL.md +71 -0
- package/concepts/bc-council-challenge-plan/body/SKILL.md +78 -0
- package/concepts/bc-council-find-bugs/body/SKILL.md +70 -0
- package/concepts/bc-council-improve-architecture/body/SKILL.md +52 -0
- package/concepts/bc-council-mode/body/SKILL.md +56 -0
- package/concepts/bc-council-mode/body/examples/agents/README.md +11 -0
- package/concepts/bc-council-mode/body/examples/agents/council-change.md +14 -0
- package/concepts/bc-council-mode/body/examples/agents/council-compat.md +14 -0
- package/concepts/bc-council-mode/body/examples/agents/council-risk.md +14 -0
- package/concepts/bc-council-mode/body/references/pass-contracts.md +133 -0
- package/concepts/bc-delegate-investigation/body/SKILL.md +119 -0
- package/concepts/bc-delegate-investigation/body/examples/pi-settings-snippet.json +8 -0
- package/concepts/bc-delegate-investigation/body/pi.md +168 -0
- package/concepts/bc-design/body/SKILL.md +49 -0
- package/concepts/bc-design/body/design-framework.md +39 -0
- package/concepts/bc-design/body/existing-app.md +9 -0
- package/concepts/bc-design/body/new-work.md +22 -0
- package/concepts/bc-design/body/principles.md +34 -0
- package/concepts/bc-design/body/surfaces.md +13 -0
- package/concepts/bc-diagnosing-bugs/body/SKILL.md +83 -0
- package/concepts/bc-dispatching-parallel-agents/body/SKILL.md +63 -0
- package/concepts/bc-domain-modeling/body/SKILL.md +40 -0
- package/concepts/bc-executing-plans/body/SKILL.md +50 -0
- package/concepts/bc-explain-visually/body/SKILL.md +167 -0
- package/concepts/bc-find-bugs/body/SKILL.md +90 -0
- package/concepts/bc-finishing-development-branch/body/SKILL.md +73 -0
- package/concepts/bc-grilling/body/SKILL.md +22 -0
- package/concepts/bc-handoff/body/SKILL.md +104 -0
- package/concepts/bc-handoff/body/pickup.md +107 -0
- package/concepts/bc-handoff/body/writing.md +217 -0
- package/concepts/bc-improve-codebase-architecture/body/SKILL.md +101 -0
- package/concepts/bc-json-canvas/body/SKILL.md +40 -0
- package/concepts/bc-json-canvas/body/references/EXAMPLES.md +71 -0
- package/concepts/bc-json-canvas/body/references/SPEC.md +55 -0
- package/concepts/bc-json-canvas/body/references/VALIDATION.md +26 -0
- package/concepts/bc-minimal-solution-ladder/body/SKILL.md +120 -0
- package/concepts/bc-obsidian-bases/body/SKILL.md +59 -0
- package/concepts/bc-obsidian-bases/body/references/EXAMPLES.md +80 -0
- package/concepts/bc-obsidian-bases/body/references/FUNCTIONS.md +49 -0
- package/concepts/bc-obsidian-bases/body/references/SYNTAX.md +82 -0
- package/concepts/bc-obsidian-bases/body/references/TROUBLESHOOTING.md +41 -0
- package/concepts/bc-obsidian-markdown/body/SKILL.md +47 -0
- package/concepts/bc-obsidian-markdown/body/references/CALLOUTS.md +40 -0
- package/concepts/bc-obsidian-markdown/body/references/EMBEDS.md +35 -0
- package/concepts/bc-obsidian-markdown/body/references/PROPERTIES.md +37 -0
- package/concepts/bc-optimize-code/body/SKILL.md +41 -0
- package/concepts/bc-performance-guardrails/body/SKILL.md +53 -0
- package/concepts/bc-performance-guardrails/body/measuring.md +29 -0
- package/concepts/bc-performance-guardrails/body/targets.md +20 -0
- package/concepts/bc-pipeline-to-done/body/SKILL.md +205 -0
- package/concepts/bc-pipeline-to-done/body/agents/bc-drain-auditor.md +19 -0
- package/concepts/bc-pipeline-to-done/body/agents/bc-drain-reviewer.md +19 -0
- package/concepts/bc-pipeline-to-done/body/agents/bc-drain-worker.md +19 -0
- package/concepts/bc-pipeline-to-done/body/execute-issue.md +71 -0
- package/concepts/bc-pipeline-to-done/body/recovery-bundle.md +79 -0
- package/concepts/bc-pipeline-to-done/body/review-contract.md +105 -0
- package/concepts/bc-pipeline-to-done/body/roles.md +13 -0
- package/concepts/bc-pipeline-to-done/body/scripts/publish-check.py +172 -0
- package/concepts/bc-pipeline-to-done/body/source-issues.md +86 -0
- package/concepts/bc-pipeline-to-done/body/source-work-items.md +76 -0
- package/concepts/bc-plain-language/body/SKILL.md +134 -0
- package/concepts/bc-plan-slicing/body/SKILL.md +56 -0
- package/concepts/bc-plan-to-pipeline/body/SKILL.md +89 -0
- package/concepts/bc-prd-drafting/body/SKILL.md +43 -0
- package/concepts/bc-prompting-agents/body/SKILL.md +278 -0
- package/concepts/bc-prototype/body/SKILL.md +40 -0
- package/concepts/bc-qmd/body/SKILL.md +64 -0
- package/concepts/bc-research/body/SKILL.md +26 -0
- package/concepts/bc-security-audit/body/AI-AND-LLM.md +25 -0
- package/concepts/bc-security-audit/body/ATTACK-CLASSES.md +35 -0
- package/concepts/bc-security-audit/body/DESKTOP-MOBILE-AND-LOCAL-IPC.md +28 -0
- package/concepts/bc-security-audit/body/RECONNAISSANCE.md +49 -0
- package/concepts/bc-security-audit/body/SKILL.md +117 -0
- package/concepts/bc-security-audit/body/SUPPLY-CHAIN-AND-RELEASE.md +28 -0
- package/concepts/bc-security-audit/body/VALIDATION-AND-REPORTING.md +124 -0
- package/concepts/bc-security-audit/body/WEB-PROTOCOL-AND-AUTH.md +27 -0
- package/concepts/bc-security-audit/body/validate_audit.py +151 -0
- package/concepts/bc-self-improve/body/SKILL.md +104 -0
- package/concepts/bc-seo/body/CITATIONS.md +23 -0
- package/concepts/bc-seo/body/IMAGE-SEO.md +350 -0
- package/concepts/bc-seo/body/SKILL.md +453 -0
- package/concepts/bc-setup-project/body/SKILL.md +252 -0
- package/concepts/bc-setup-project/body/scaffold.py +2751 -0
- package/concepts/bc-setup-project/body/starter-items.md +157 -0
- package/concepts/bc-setup-project/body/work-data.md +114 -0
- package/concepts/bc-setup-project/body/work_index.py +626 -0
- package/concepts/bc-setup-project/body/work_spent.py +220 -0
- package/concepts/bc-subagent-driven-development/body/SKILL.md +61 -0
- package/concepts/bc-tdd/body/SKILL.md +184 -0
- package/concepts/bc-tdd/body/formal.md +77 -0
- package/concepts/bc-tdd/body/mocking.md +49 -0
- package/concepts/bc-tdd/body/properties.md +59 -0
- package/concepts/bc-tdd/body/refactoring.md +12 -0
- package/concepts/bc-tdd/body/scripts/confirm-red.py +136 -0
- package/concepts/bc-tdd/body/tests.md +59 -0
- package/concepts/bc-teach/body/GLOSSARY-FORMAT.md +36 -0
- package/concepts/bc-teach/body/LEARNING-RECORD-FORMAT.md +60 -0
- package/concepts/bc-teach/body/MISSION-FORMAT.md +34 -0
- package/concepts/bc-teach/body/RESOURCES-FORMAT.md +53 -0
- package/concepts/bc-teach/body/REVIEW-FORMAT.md +48 -0
- package/concepts/bc-teach/body/SKILL.md +281 -0
- package/concepts/bc-teach/body/WIKI-FORMAT.md +58 -0
- package/concepts/bc-teach/body/scripts/due.py +65 -0
- package/concepts/bc-to-spec/body/SKILL.md +21 -0
- package/concepts/bc-to-tickets/body/SKILL.md +21 -0
- package/concepts/bc-triage/body/AGENT-BRIEF.md +38 -0
- package/concepts/bc-triage/body/OUT-OF-SCOPE.md +51 -0
- package/concepts/bc-triage/body/SKILL.md +81 -0
- package/concepts/bc-unslop/body/SKILL.md +269 -0
- package/concepts/bc-using-git-worktrees/body/SKILL.md +91 -0
- package/concepts/bc-wiki-maintain/body/SKILL.md +361 -0
- package/concepts/bc-wiki-maintain/body/runner/README.md +552 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.service +24 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-lint.timer +15 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.service +29 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain-all.timer +16 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.service +28 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-maintain.timer +12 -0
- package/concepts/bc-wiki-maintain/body/runner/bc-wiki-notify@.service +15 -0
- package/concepts/bc-wiki-maintain/body/runner/notify-failure.sh +92 -0
- package/concepts/bc-wiki-maintain/body/runner/run-lint.sh +69 -0
- package/concepts/bc-wiki-maintain/body/runner/run-promotion-all.sh +103 -0
- package/concepts/bc-wiki-maintain/body/runner/run-promotion.sh +270 -0
- package/concepts/bc-wiki-maintain/body/wiki_lint.py +958 -0
- package/concepts/bc-wiki-maintain/body/wiki_search.py +206 -0
- package/concepts/bc-work-sync/body/PLAN.md +46 -0
- package/concepts/bc-work-sync/body/SKILL.md +71 -0
- package/concepts/bc-writing-plans/body/SKILL.md +79 -0
- package/package.json +130 -4
- package/packages/agent-kernel-pi/AGENT-KERNEL.md +109 -0
- package/packages/agent-kernel-pi/index.js +8 -0
- package/packages/agent-kernel-pi/package.json +12 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-council-find-bugs
|
|
3
|
+
description: "Run bc-find-bugs through the advisor council: one scout maps the area, every council advisor hunts it with a dealt focus, they attack each other's candidates, then one worker reproduces the strongest as failing tests on a hunt branch before the normal two-tier report and filing. Use when the user says bc-council-find-bugs or asks the council to hunt for bugs. Pi only: runs on bc-council-mode, which needs the pi-subagents `subagent` tool."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: "[area] [--since <ref>] [--max-repro N]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Council bug hunt
|
|
9
|
+
|
|
10
|
+
This skill joins three skills and copies none. Load all three before starting:
|
|
11
|
+
|
|
12
|
+
- `bc-council-chain`: the council steps every chain shares (roster, shared map, pass 1, merge, pass 2, fallbacks, cleanup) and the parts a chain must define.
|
|
13
|
+
- `bc-find-bugs`: scope, the hunted kinds, the candidate block, reproduction, the report and filing.
|
|
14
|
+
- `bc-council-mode`: how to brief, launch, relay to and resume advisors, and the pass cap.
|
|
15
|
+
|
|
16
|
+
Run the `bc-council-chain` steps in order, then reproduction, report and filing below, without stopping between them: the owner is asked only the questions those skills require (for example the roster question or the filing question). Why: a hunt that stops after the map or a pass has produced nothing the owner can use. This file defines only the parts that recipe leaves to the chain. Where this file is silent, those three skills decide.
|
|
17
|
+
|
|
18
|
+
A bug is confirmed only by a reproduction watched failing for the stated reason (`bc-find-bugs`). Advisor agreement never confirms a bug: it orders candidates for reproduction and orders the suspected tier. Why: agreement is not evidence that a bug is real.
|
|
19
|
+
|
|
20
|
+
## Pre-reading and map
|
|
21
|
+
|
|
22
|
+
Pre-reading: `bc-find-bugs` §1. Settle the area (or the whole repo when small), `--since <ref>` and `--max-repro N` (default 12), and name the hunt. Read the area's README and tests.
|
|
23
|
+
|
|
24
|
+
Map contents, each claim with `file:line`: entry points; data flow through the area; error paths (what raises, what catches, what is cleaned up); shared and mutable state, caches and locks; contracts between modules (units, indexing, None vs empty, what a caller assumes of a callee); existing tests and what they cover. With `--since`, mark which files changed.
|
|
25
|
+
|
|
26
|
+
Brief extras: the area and hunt name, the hunted kinds from `bc-find-bugs` §2, and that advisors stay read-only and only propose reproductions.
|
|
27
|
+
|
|
28
|
+
## Focuses
|
|
29
|
+
|
|
30
|
+
Deal one focus per advisor, round-robin from `bc-find-bugs` §2's list in this order: inputs and edge cases; error and failure paths; state and data lifecycle; concurrency and ordering; contracts between modules. With fewer advisors than focuses, the undealt focuses are still hunted by everyone; with more, dealing wraps. State each advisor's focus in chat and in the report's roster section.
|
|
31
|
+
|
|
32
|
+
Each advisor hunts its focus first and still reports bugs outside it. Why: unstanced advisors converge on the obvious.
|
|
33
|
+
|
|
34
|
+
## Candidate format
|
|
35
|
+
|
|
36
|
+
Each advisor returns at most 8 candidates (the owner can raise this per run), each as `bc-find-bugs`' candidate block plus two lines:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
### <id> <one-line title>
|
|
40
|
+
Kind: bug | security
|
|
41
|
+
Location: <path>:<line(s)>
|
|
42
|
+
Evidence: <quoted code lines, with file:line>
|
|
43
|
+
Claim: <what goes wrong, in behaviour terms>
|
|
44
|
+
Reproduction: input <...>; steps <...>; expected <...>; actual <...>
|
|
45
|
+
Focus: <the dealt focus, or the focus it falls under>
|
|
46
|
+
Strength: Strong | Worth reproducing | Weak
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Duplicate rule: candidates with the same location and the same claimed wrong result are one. Same location with a different claimed result is two candidates.
|
|
50
|
+
|
|
51
|
+
## Verdict rule
|
|
52
|
+
|
|
53
|
+
Pass 2: each advisor attacks the candidates it did not propose. It confirms with its own strength, disputes with code evidence (`file:line`, or an input whose actual result is the expected one), or gives no view.
|
|
54
|
+
|
|
55
|
+
- **Dropped:** a code-evidenced dispute nobody answers with code shows the claimed wrong result does not happen. List it in the report with the dispute.
|
|
56
|
+
- **Everything else goes to the reproduction queue**, ordered by: share of N confirming it as Strong, then share of N confirming at any strength, then the strength of the quoted evidence. An open dispute does not drop a candidate; reproduction settles it.
|
|
57
|
+
|
|
58
|
+
This order only chooses what is reproduced first and how the suspected tier is ranked. No share of N confirms a candidate.
|
|
59
|
+
|
|
60
|
+
## Reproduction
|
|
61
|
+
|
|
62
|
+
After pass 2, launch ONE `worker` to run `bc-find-bugs` §3 on the top `--max-repro` candidates of the queue: its own worktree on branch `find-bugs/<hunt-name>`, one test per candidate, kept only if it fails for the stated reason, committed on the hunt branch. Launch it with `skill: ["bc-find-bugs", "bc-minimal-solution-ladder", "bc-codebase-design", "bc-codebase-docs", "bc-diagnosing-bugs", "bc-tdd"]`. Why: a launch skill list replaces the role's default skills, so the defaults are listed with it. Give it the queue in order with each candidate block, and ask it to return, per candidate, the test path and name with the failing assertion lines, or its suspected reason (`bc-find-bugs` §3 wording). Advisors stay read-only and write no reproductions.
|
|
63
|
+
|
|
64
|
+
## Report and filing
|
|
65
|
+
|
|
66
|
+
Write the `bc-find-bugs` §4 report in the hunt worktree and commit it on the hunt branch. Add per candidate: an agreement line (for example `2 of 3 Strong, 1 disputed`), any open dispute with each side's evidence, and its focus; in Suspected, rank by the verdict order above. List dropped candidates with their dispute. Add the roster section `bc-council-chain` asks for, with each advisor's dealt focus.
|
|
67
|
+
|
|
68
|
+
Filing is `bc-find-bugs` §5 unchanged, except that every filed item carries `Source: bc-council-find-bugs` instead of `Source: find-bugs`.
|
|
69
|
+
|
|
70
|
+
When the hunt ends, do `bc-council-chain`'s cleanup.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-council-improve-architecture
|
|
3
|
+
description: "Run bc-improve-codebase-architecture through the advisor council: one scout maps the codebase, every available council advisor proposes and cross-examines deep-module candidates, and candidates are ranked by evidence-backed agreement before the normal report and grilling. Use when the user says bc-council-improve-architecture, council architecture review, or asks the council to review the codebase architecture. Pi only: runs on bc-council-mode, which needs the pi-subagents `subagent` tool."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Council architecture review
|
|
7
|
+
|
|
8
|
+
This skill joins three skills and copies none. Load all three before starting:
|
|
9
|
+
|
|
10
|
+
- `bc-council-chain`: the council steps every chain shares (roster, shared map, pass 1, merge, pass 2, fallbacks, cleanup) and the parts a chain must define.
|
|
11
|
+
- `bc-improve-codebase-architecture`: inputs to read, candidate card fields, the visual report, grilling, and where chosen, rejected and remaining items are filed.
|
|
12
|
+
- `bc-council-mode`: how to brief, launch, relay to and resume advisors, and the pass cap.
|
|
13
|
+
|
|
14
|
+
Run the `bc-council-chain` steps in order. This file defines only the parts that recipe leaves to the chain. Where this file is silent, those three skills decide.
|
|
15
|
+
|
|
16
|
+
## Pre-reading and map
|
|
17
|
+
|
|
18
|
+
Pre-reading: the first step of `bc-improve-codebase-architecture`: read the glossary, decision records and architecture lines in the ideas file.
|
|
19
|
+
|
|
20
|
+
Map contents: modules, their interfaces, seams, call fan-in and fan-out, and places where one change touches many files.
|
|
21
|
+
|
|
22
|
+
Brief extras: the glossary and decision-record paths, and recorded rejections not to re-propose. No focuses or stances are dealt.
|
|
23
|
+
|
|
24
|
+
## Candidate format
|
|
25
|
+
|
|
26
|
+
Return each candidate as:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Candidate: <short name>
|
|
30
|
+
Module / seam: <names from the map>
|
|
31
|
+
Problem: <one or two sentences>
|
|
32
|
+
Direction: <recommended change>
|
|
33
|
+
Evidence: <file:line for every claim>
|
|
34
|
+
Strength: Strong | Worth exploring | Speculative
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Duplicate rule: candidates that name the same module and seam with the same direction are one; a different direction is a disagreement.
|
|
38
|
+
|
|
39
|
+
## Agreement rule
|
|
40
|
+
|
|
41
|
+
Rank candidates by evidence, not by vote alone:
|
|
42
|
+
|
|
43
|
+
- **Strong:** more than half of N rate it Strong, and no advisor holds an unanswered evidence-backed dispute.
|
|
44
|
+
- **Worth exploring:** more than half of N confirm it at any strength, or it would be Strong but carries an open dispute.
|
|
45
|
+
- **Speculative:** half or fewer confirm it, with no dispute refuting it. Keep these: a find only one model sees is still worth listing.
|
|
46
|
+
- **Dropped:** a dispute shows with code evidence that the problem is absent, and no one answers it. List it in the report with the reason.
|
|
47
|
+
|
|
48
|
+
## Report and grilling
|
|
49
|
+
|
|
50
|
+
Produce the report `bc-improve-codebase-architecture` describes, with two additions per card: an agreement line (for example `3 of 4 Strong, 1 no view`) and any open dispute, plus the roster section `bc-council-chain` adds. Then hand over to that skill's grilling and filing steps unchanged, except that a work item filed from this review gets the header lines `Kind: architecture` and `Source: bc-council-improve-architecture`, so tools that list work items can filter the ones it filed.
|
|
51
|
+
|
|
52
|
+
When the review ends, do `bc-council-chain`'s cleanup.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-council-mode
|
|
3
|
+
description: "Run a bounded supervisor-mediated advisor council. Use when the user asks for council mode, asks to convene advisors, debate a decision, cross-examine recommendations, or run /council. Pi only: needs the pi-subagents `subagent` tool."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Council Mode
|
|
7
|
+
|
|
8
|
+
Council mode is parent-supervised advice for a material decision with real tradeoffs. It is not free-form agent chat, implementation work, a transcript dump, mutation authority, or a council UI.
|
|
9
|
+
|
|
10
|
+
The parent selects the roster, relays only curated claims, decides validity, and writes the memo. Advisors stay read-only and do not see peer transcripts by default.
|
|
11
|
+
|
|
12
|
+
Before launch, read [references/pass-contracts.md](references/pass-contracts.md).
|
|
13
|
+
|
|
14
|
+
## Roster
|
|
15
|
+
|
|
16
|
+
If the `subagent` tool is missing, stop and tell the user to install `pi-subagents` and restart Pi. Otherwise run `subagent({ action: "list" })`, then choose 2-3 executable advisor names that start with `council-`. The prefix is convention only. Never use more than four advisors. If the user has no `council-*` profiles, point them to [examples/agents/](examples/agents/README.md): ready profiles with distinct stances and a placeholder model.
|
|
17
|
+
|
|
18
|
+
If fewer than two council profiles are available, fill with `oracle`, then `reviewer`. Launch fallback `oracle` with `context: "fork"`; let fallback `reviewer` use its normal profile context. Note fallbacks and known context modes in the memo. If fewer than two advisors remain, use the normal one-oracle consultation loop and label it degraded mode.
|
|
19
|
+
|
|
20
|
+
`council-*` profiles live in user or project agent directories, not this package. A profile defines model, tools, context, output defaults, and persistent stance. Keep advisors read-only, disable inherited skills unless needed, and put stance in the profile body instead of inventing per-run role labels.
|
|
21
|
+
|
|
22
|
+
External-job/package advisors may join only when their provider is registered. Treat them as ordinary advisor names in `runs.all`, but honor their runner limits: they may lack repo tools, structured output, or resumability. Include evidence they cannot read, request JSON text instead of `outputSchema`, and use a fresh-context fallback when they cannot resume for cross-exam.
|
|
23
|
+
|
|
24
|
+
## Passes
|
|
25
|
+
|
|
26
|
+
Pass 1 is independent reports. Pass 2 is one cross-exam. Run Pass 3 only when `--max-passes 3` was requested and a material dispute can still be settled by evidence. Never run an unbounded loop.
|
|
27
|
+
|
|
28
|
+
## Protocol
|
|
29
|
+
|
|
30
|
+
1. Write the council brief: question, scope, non-goals, evidence targets, roster, known advisor context modes, and pass cap.
|
|
31
|
+
2. Tell the user the roster, context modes, and pass cap.
|
|
32
|
+
3. Launch one async workflow script for Pass 1 with the script inside the call: `subagent({ async: true, options: { script: "<js using runs.all>" } })`. Do not use the `workflow: true` form, which needs a separate ```` ```js workflow ```` block in the same reply; when that block goes missing the launch fails with no advisors run. Use stable keys, `phase: "Council pass 1"`, concise labels, and `output: false` unless separate artifacts are useful. Set `context` only when the profile context is known or a fallback rule requires it.
|
|
33
|
+
4. Return one aggregate Pass 1 receipt. On completion, tell the user completion count, agreement count, dispute count, and whether Pass 2 is needed.
|
|
34
|
+
5. Synthesize the claim matrix in the parent: agreements, disputed claims, missing proof, owner decisions, and at most five material relay claims per advisor.
|
|
35
|
+
6. For Pass 2, tell the user which claims are relayed and why they matter. Resume each advisor with a curated challenge packet. In the `runs.all` script each resume entry has the shape `{ key: "cross-<advisor>", resume: "<Pass 1 runId>", task: "<challenge packet>", output: false }`: the run id goes in `resume` (not `id`), and the entry excludes `agent` and rejects `gate`. Record each new run id; Pass 3 resumes those latest ids with new stable keys.
|
|
36
|
+
7. Stop at convergence, pass cap, failed fallback, or user interruption. The parent writes the final memo.
|
|
37
|
+
|
|
38
|
+
If an advisor is not resumable, run the same profile fresh with its Pass 1 report and challenge packet. Label it a fresh-context fallback, not true cross-exam.
|
|
39
|
+
|
|
40
|
+
Do not set `clarify`, `worktree`, `gate`, tool budgets, or tight usage budgets on advisors. Bound work through the roster, pass cap, and report length.
|
|
41
|
+
|
|
42
|
+
## Memo
|
|
43
|
+
|
|
44
|
+
Converged means no disputed claim remains that both affects the recommendation and can plausibly be settled by advisor evidence. Put unresolved disputes in owner decisions. Do not add a round for polish or symmetry.
|
|
45
|
+
|
|
46
|
+
The memo states:
|
|
47
|
+
|
|
48
|
+
- question and scope
|
|
49
|
+
- recommendation and rationale
|
|
50
|
+
- accepted and rejected feedback with reasons
|
|
51
|
+
- owner decisions
|
|
52
|
+
- evidence and run ids
|
|
53
|
+
- confidence and what would change the decision
|
|
54
|
+
- roster, passes, fallbacks, and known advisor context modes
|
|
55
|
+
|
|
56
|
+
Identify advisors by profile name. State when fallback `oracle` was forked and context-aware. Escalate to a writer only after the memo and only when the user requests it.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Example council advisors
|
|
2
|
+
|
|
3
|
+
Three read-only advisor profiles for `bc-council-mode`, each with a different standing stance. The stances matter: advisors with identical neutral prompts tend to agree in the first round, so the cross-examination never runs.
|
|
4
|
+
|
|
5
|
+
To use them:
|
|
6
|
+
|
|
7
|
+
1. Copy the files you want into your user agent directory (`~/.pi/agent/agents/` in Pi) or a project's `.pi/agents/`.
|
|
8
|
+
2. Replace `model: provider/your-model-id` in each with a model you can run. Use a different model, ideally a different provider, for each advisor so they make different mistakes.
|
|
9
|
+
3. Adjust `thinking` to what your rate limits allow.
|
|
10
|
+
|
|
11
|
+
Two or three advisors are enough; the skill never uses more than four. Keep the `council-` prefix so the skill finds them, keep them read-only, and edit the stance sentence to fit the decisions you bring to the council.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: council-change
|
|
3
|
+
description: Read-only council advisor that argues for the stronger long-term design
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
|
+
model: provider/your-model-id
|
|
6
|
+
thinking: high
|
|
7
|
+
systemPromptMode: replace
|
|
8
|
+
inheritProjectContext: true
|
|
9
|
+
inheritSkills: false
|
|
10
|
+
defaultContext: fresh
|
|
11
|
+
acceptanceRole: read-only
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Analyze the council question independently. Standing stance: you favour the option that leaves the system more correct, faster or simpler in the long run, and you accept migration cost when the gain is real. Inspect evidence directly and cite it. Change your recommendation when the evidence calls for it; the stance sets what you weigh first, not what you must conclude. Do not edit, run mutating commands, commit, push, contact peers, or spawn subagents. Return concise, cited advice using the report contract in the council task.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: council-compat
|
|
3
|
+
description: Read-only council advisor that defends existing users and measured evidence
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
|
+
model: provider/your-model-id
|
|
6
|
+
thinking: high
|
|
7
|
+
systemPromptMode: replace
|
|
8
|
+
inheritProjectContext: true
|
|
9
|
+
inheritSkills: false
|
|
10
|
+
defaultContext: fresh
|
|
11
|
+
acceptanceRole: read-only
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Analyze the council question independently. Standing stance: you favour the status quo and what existing users and integrations rely on, and you distrust benefits that nobody has measured. Inspect evidence directly and cite it. Change your recommendation when the evidence calls for it; the stance sets what you weigh first, not what you must conclude. Do not edit, run mutating commands, commit, push, contact peers, or spawn subagents. Return concise, cited advice using the report contract in the council task.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: council-risk
|
|
3
|
+
description: Read-only council advisor that asks what fails, what it costs, and how to undo it
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
|
+
model: provider/your-model-id
|
|
6
|
+
thinking: high
|
|
7
|
+
systemPromptMode: replace
|
|
8
|
+
inheritProjectContext: true
|
|
9
|
+
inheritSkills: false
|
|
10
|
+
defaultContext: fresh
|
|
11
|
+
acceptanceRole: read-only
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Analyze the council question independently. Standing stance: for each option you ask what can fail, what it costs to build and run, and how it would be reversed; you favour the option with the smallest unrecoverable downside. Inspect evidence directly and cite it. Change your recommendation when the evidence calls for it; the stance sets what you weigh first, not what you must conclude. Do not edit, run mutating commands, commit, push, contact peers, or spawn subagents. Return concise, cited advice using the report contract in the council task.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Council Mode Pass Contracts
|
|
2
|
+
|
|
3
|
+
Load this before launching council advisors.
|
|
4
|
+
|
|
5
|
+
## Pass 1 report
|
|
6
|
+
|
|
7
|
+
Native Pi advisors should receive this `outputSchema`. External runners should receive the same shape as plain JSON text and no `outputSchema`.
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
const pass1OutputSchema = {
|
|
11
|
+
type: "object",
|
|
12
|
+
required: [
|
|
13
|
+
"recommendation",
|
|
14
|
+
"evidence",
|
|
15
|
+
"assumptions",
|
|
16
|
+
"risks",
|
|
17
|
+
"confidence",
|
|
18
|
+
"challengeClaims",
|
|
19
|
+
"ownerDecisions",
|
|
20
|
+
"changeMyMind"
|
|
21
|
+
],
|
|
22
|
+
properties: {
|
|
23
|
+
recommendation: { type: "string" },
|
|
24
|
+
evidence: {
|
|
25
|
+
type: "array",
|
|
26
|
+
items: {
|
|
27
|
+
type: "object",
|
|
28
|
+
required: ["claim", "sources"],
|
|
29
|
+
properties: {
|
|
30
|
+
claim: { type: "string" },
|
|
31
|
+
sources: { type: "array", items: { type: "string" } }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
assumptions: {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: {
|
|
38
|
+
type: "object",
|
|
39
|
+
required: ["assumption", "status"],
|
|
40
|
+
properties: {
|
|
41
|
+
assumption: { type: "string" },
|
|
42
|
+
status: { enum: ["verified", "unverified"] }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
risks: { type: "array", items: { type: "string" } },
|
|
47
|
+
confidence: {
|
|
48
|
+
type: "object",
|
|
49
|
+
required: ["level", "reason"],
|
|
50
|
+
properties: {
|
|
51
|
+
level: { enum: ["high", "medium", "low"] },
|
|
52
|
+
reason: { type: "string" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
challengeClaims: { type: "array", items: { type: "string" }, maxItems: 3 },
|
|
56
|
+
ownerDecisions: { type: "array", items: { type: "string" } },
|
|
57
|
+
changeMyMind: { type: "array", items: { type: "string" } }
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Task text:
|
|
63
|
+
|
|
64
|
+
- inspect supplied evidence directly
|
|
65
|
+
- do not ask other advisors or read peer reports
|
|
66
|
+
- stay read-only
|
|
67
|
+
- do not spawn children
|
|
68
|
+
- return only the structured report
|
|
69
|
+
- keep the report under about 600 words
|
|
70
|
+
|
|
71
|
+
For external runners, say: `Return only JSON matching this shape. Do not wrap it in Markdown.` Include any evidence they cannot read with tools.
|
|
72
|
+
|
|
73
|
+
## Pass 1 aggregate receipt
|
|
74
|
+
|
|
75
|
+
Return one aggregate receipt. Preserve result order or map it by stable key.
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
return {
|
|
79
|
+
pass: 1,
|
|
80
|
+
advisors: results.map((result, index) => ({
|
|
81
|
+
key: result.key,
|
|
82
|
+
agent: result.agent,
|
|
83
|
+
requestedContext: roster[index].context ?? "runtime-default-unknown",
|
|
84
|
+
runId: result.runId,
|
|
85
|
+
report: result.structuredOutput ?? result.output
|
|
86
|
+
}))
|
|
87
|
+
};
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Do not replace `runtime-default-unknown` with a guessed context.
|
|
91
|
+
|
|
92
|
+
## Pass 2 challenge
|
|
93
|
+
|
|
94
|
+
A challenge packet contains only disputed claims, strong conflicting evidence, missing proof, owner decisions, and high-impact risks. Attribute peer content as "another advisor". Do not include full peer reports.
|
|
95
|
+
|
|
96
|
+
Native Pi advisors receive `pass2OutputSchema`. External runners and fresh external fallbacks receive the same shape as JSON-only task text and no `outputSchema`.
|
|
97
|
+
|
|
98
|
+
```js
|
|
99
|
+
const pass2OutputSchema = {
|
|
100
|
+
type: "object",
|
|
101
|
+
required: ["responses", "recommendationChanged", "outOfScopeFindings"],
|
|
102
|
+
properties: {
|
|
103
|
+
responses: {
|
|
104
|
+
type: "array",
|
|
105
|
+
items: {
|
|
106
|
+
type: "object",
|
|
107
|
+
required: ["claimId", "disposition", "reason", "sources"],
|
|
108
|
+
properties: {
|
|
109
|
+
claimId: { type: "string" },
|
|
110
|
+
disposition: { enum: ["accept", "reject", "refine", "owner-decision"] },
|
|
111
|
+
reason: { type: "string" },
|
|
112
|
+
sources: { type: "array", items: { type: "string" } }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
recommendationChanged: {
|
|
117
|
+
type: "object",
|
|
118
|
+
required: ["changed", "reason"],
|
|
119
|
+
properties: {
|
|
120
|
+
changed: { type: "boolean" },
|
|
121
|
+
reason: { type: "string" }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
outOfScopeFindings: { type: "array", items: { type: "string" } }
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Use stable resume keys such as `cross-oracle`, `phase: "Council pass 2"`, concise labels, and `output: false` unless separate artifacts are useful. The aggregate Pass 2 receipt uses the Pass 1 row shape with the new `runId` and `structuredOutput ?? output`. Pass 3 resumes those latest ids with new stable keys.
|
|
130
|
+
|
|
131
|
+
## Advisor profiles
|
|
132
|
+
|
|
133
|
+
Ready example profiles with distinct stances live in [../examples/agents/](../examples/agents/README.md). Put profiles in the user or project agent directory, not in this skill.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bc-delegate-investigation
|
|
3
|
+
description: Aggressively delegate investigation, analysis, and review to parallel subagents under a durability contract, so a lost tool result or a dead terminal never destroys the work. Use when the user says bc-delegate-investigation, swarm, go wide, fan out, or asks for heavy/aggressive subagent use.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# bc-delegate-investigation
|
|
7
|
+
|
|
8
|
+
If `~/.config/agent-concepts/overlays/bc-delegate-investigation.md` exists, read it: it supplies tool names for the generic steps below that this machine's agent instructions do not already name. It never changes behaviour, and the project's own instructions take precedence.
|
|
9
|
+
|
|
10
|
+
Go wide. While this skill is active, delegating is the default and **keeping** work is what needs a reason.
|
|
11
|
+
|
|
12
|
+
It composes `bc-dispatching-parallel-agents`, which owns how to split work, what goes in a packet, and the parent's integration duties. Read that for *how to split*. This skill covers *how hard to push* and *how not to lose the results*.
|
|
13
|
+
|
|
14
|
+
Before fan-out or worktree creation, run the machine's storage health check if one exists, and stop and report on critical or unknown health or if the configured check cannot run. If no storage health check is configured, skip it and note that in one line in the report. After integrating a worker, prove its commits are in `HEAD` (its tip is an ancestor, or every commit is patch-equivalent), record that proof, and only then remove its worktree and branch. Copy into worker packets: run pytest through the guarded test runner the project's or machine's instructions name (otherwise plain `pytest`, with `tmp_path` for test fixtures and cleanup even on failure; never custom `--basetemp`); make scratch folders with `mktemp -d`, never under `/tmp`; run targeted tests only, never the full suite or gate. The `agent-kernel` concept's Storage safety (temp files, scratch folders) and Verification sections hold their rules, when loaded. Why: children do not inherit the kernel and retained worktrees consume storage.
|
|
15
|
+
|
|
16
|
+
## Recovery rule — before routing
|
|
17
|
+
|
|
18
|
+
If a prompt names an interrupted, failed, empty, missing, or reaped prior run, treat it as recovery even when it says redo, relaunch, or start again. Stop before the routing decision or any replacement track, manifest, or dispatch decision and execute rule 4 for that prior run. Never stash, delete, move, or overwrite prior-run evidence merely to make a replacement launchable. Do not name or launch a replacement until recovery proves that track has no usable artifact, valid handoff patch, recorded Git object, or preserved worktree/ref.
|
|
19
|
+
|
|
20
|
+
## The inversion
|
|
21
|
+
|
|
22
|
+
Normally you delegate when a split is obvious. Here it flips: assume every unit of work goes to a child, and justify what you keep.
|
|
23
|
+
|
|
24
|
+
The parent keeps exactly three things:
|
|
25
|
+
|
|
26
|
+
- **Decisions** — judgment calls, tradeoffs, anything the user would want to weigh.
|
|
27
|
+
- **Integration and verification** — reconciling children, spotting contradictions, running the combined check.
|
|
28
|
+
- **Work genuinely cheaper to do than to describe** — one grep, a single file read, a command whose output you need before you can even write the packet.
|
|
29
|
+
|
|
30
|
+
That third one is the honest escape hatch, and it is also the one that rots. Why: "it's faster if I just do it" is true for almost any single item and false for the whole task — it is how an aggressive posture decays into an ordinary one, one reasonable-sounding exception at a time. It is a **per-track** test, never a verdict on the whole job; applied to everything at once it is not a test, it is the rationalization.
|
|
31
|
+
|
|
32
|
+
**The routing decision: name the tracks at the decision point, and decide where each one goes.** List the independent tracks you found; show the dispatched ones in chat. For every dispatched track, name the role and the effective model plus thinking route, in this session's routing names — not a vendor id. Shape: `notes → scout, Luna max`. Do not also label tracks as child or parent — the role already says it is dispatched. Why: the list is how the user sees the fleet; a track without an effective route is a guess they cannot correct, and parent/child is noise once the role is named. The list records the route that will actually run, not a fixed set of fields that every harness must copy into every child object. If the harness exposes per-child model or thinking controls, use them to preserve that route through its own mechanics; read [pi.md](pi.md) for Pi-specific dispatch rules. Keep the effective route in chat and the manifest. Announce, then launch in the same turn. If fewer than two tracks exist, or any track stays with you, settle why per track in your reasoning (`hotfix → cheaper than a packet`) and do not write it in the reply. Those kept tracks are not subagents. Why: the user does not want a keep/no-dispatch justification heading every reply (2026-10-26); the reason still has to exist and fit the three keep cases above.
|
|
33
|
+
|
|
34
|
+
This binds **whichever way you decide, including when you decide to dispatch nothing.** Why: keeping the work is the decision that silently ends the swarm, so it is the one that most needs an explicit reason, even one kept out of the reply. A rule that only fires on the dispatch path cannot catch the case where you quietly chose not to dispatch — and "just read them yourself, it's faster than writing the packets" is precisely that case, arriving as a reasonable request.
|
|
35
|
+
|
|
36
|
+
## Durability contract
|
|
37
|
+
|
|
38
|
+
The parent's context is not a storage medium. A lost tool result, a compaction, or a dead terminal destroys it with no warning and no trace. The host is itself a failure domain: when a multiplexer pane or terminal window dies, every foreground child dies with it and leaves nothing behind. Assume the session can vanish between any two tool calls.
|
|
39
|
+
|
|
40
|
+
Four rules. They are cheap. The failure they prevent is not.
|
|
41
|
+
|
|
42
|
+
**1. Manifest before dispatch.** Before launching anything, write a scratch file listing each dispatched track: key → artifact path → role → effective route (model + thinking) → one-line task. Then **state the run directory path in chat.** Why: a path that exists only in your context dies with your context, and rule 4 cannot fire without it. Telling the user makes the user your backup index. Record the same routing name the user just read so the durable copy matches. Preserve that route through whatever launch controls the harness provides; keep harness-specific field rules in its reference.
|
|
43
|
+
|
|
44
|
+
**Manifest events, todo obligations.** The run manifest records events — dispatched, launched, landed, recovered — as durable history; the session `todo` tool tracks open obligations that outlive the turn (owner waits, deferred items, out-of-sight runs, partial work), with a trigger for deferred checks. They are complementary: do not copy the manifest into todos or use todos as the manifest; later verification or integration of a dispatched run is a todo obligation (which may auto-create from the run), while its launch/landing is a manifest line. Why: a deferred item left only in the manifest was never re-checked after compaction; the todo snapshot is re-injected every turn, the manifest is not.
|
|
45
|
+
|
|
46
|
+
**2. Multi-child fan-out runs async.** Two or more children means async. This is a gate, not a preference. Why: foreground children are bound to the parent's lifetime and the returned tool result is their only delivery channel, so a single crash takes N children and N results atomically. Async runs are retained and stay inspectable after the parent is gone. "It's simpler blocking" is precisely the trade that produced this rule.
|
|
47
|
+
|
|
48
|
+
**3. Every child writes to its artifact, and checkpoints as it goes.** The artifact is the durable record of the deliverable; the returned text is a summary of it. For recon, the deliverable is the file. For a worktree worker, the deliverable is its commit plus the harness patch. Immediately after each commit, the worker appends these two start-of-line records to the artifact:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
Commit: <full 40-hex SHA> <subject>
|
|
52
|
+
Branch: <exact branch>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If no commit was made, it records `Commit: none` and `Branch: none`. The worker records the full SHA and exact branch on their own lines as soon as they exist; the returned summary alone does not count. Children append findings as they establish them rather than composing one final write. Why: a child killed at minute four of five leaves nothing recoverable if it was holding everything for the end, and a clean harness teardown can otherwise reap the branch containing the real deliverable.
|
|
56
|
+
|
|
57
|
+
**4. Recover before relaunch.** When a result is missing or a run failed, check in this order:
|
|
58
|
+
|
|
59
|
+
1. the manifest;
|
|
60
|
+
2. the artifact paths on disk;
|
|
61
|
+
3. the harness's retained runs, for output, artifact paths, and handoff paths only — a retained run cannot reopen a worktree that cleanup already removed;
|
|
62
|
+
4. for a worktree worker, the exact child entry in the runtime handoff JSON and its patch. A patch is usable only when it belongs to that exact child and branch (matching the expected `Branch:` record), is nonempty, says `changed: true`, has no capture error, and carries the expected `baseCommit` that resolves as a commit. Inspect it and require `git apply --check` before any mutation. Empty, error, mismatched, or wrong-base patches are not recovery;
|
|
63
|
+
5. the artifact's **last own-line `Commit:`/`Branch:` pair only** as an untrusted candidate; earlier pairs are evidence, not candidates. For a claimed commit, require the `Commit:` value to be a full 40-character lowercase-hex SHA and verify with Git that it resolves to a commit (`git cat-file -t` and `git rev-parse --verify`). Require the pair's `Branch:` value to equal the exact expected branch from the handoff. If that branch ref still exists, resolve it and require its tip to equal the candidate tip; its absence after successful cleanup is allowed. Require the handoff's expected `baseCommit` to resolve as a commit, inspect exactly one linear `baseCommit..tip` chain, and validate the resulting tree/diff before integration. Never integrate from prose, an abbreviated or non-resolving SHA, branch text alone, or tip alone. A `none`/`none` pair is only the no-commit case. If these checks succeed, recover the full linear `baseCommit..tip` range, not only the tip: if tip is already an ancestor of parent `HEAD`, it is integrated; if parent `HEAD` equals `baseCommit`, use a fast-forward-only merge; if parent advanced from that same base, inspect and cherry-pick the ordered range. Stop on non-linear or ambiguous history or conflict rather than guessing, then verify the resulting diff/tree and record the ancestry/patch-equivalence proof in the manifest before cleanup;
|
|
64
|
+
6. a preserved worktree or ref, but only when cleanup refused and the harness says it was preserved;
|
|
65
|
+
7. `git fsck --no-reflogs --lost-found` only with that validated full SHA, and only to exact-match it — never browse or select dangling objects.
|
|
66
|
+
|
|
67
|
+
After applying a valid patch, verify the resulting diff/tree before any commit or report. An artifact for a worktree worker is usable only when its own-line `Commit:`/`Branch:` records are valid (`none`/`none` is valid when no commit was made). Re-dispatch only after this order, and only a track with no usable artifact, valid handoff patch, recorded commit object, or preserved worktree/ref. No patch plus no SHA does not license relaunch while a preserved worktree/ref exists. Why: the current harness normally captures a patch and then removes a cleanly handed-off worktree and branch, while preserved leftovers are exceptions; re-running a whole fan-out because one result did not come back pays the full cost again to rediscover work that is usually already on disk or in Git.
|
|
68
|
+
|
|
69
|
+
**Parent integration on receipt.** On the first turn a completed worktree result is in front of the parent — a completion wake, status poll, or user report — apply its validated handoff patch or integrate its validated full commit range before any other dispatch. This is completion-wake behavior, never a reason to block or wait on the launch turn; rule 2 remains intact.
|
|
70
|
+
|
|
71
|
+
**Full gate on the integrated tree.** After integrating, start the project's full gate (through the project's or machine's offload/heavy-run wrapper if its instructions name one; otherwise run the gate directly) in the background with a completion wake, and dispatch the independent reviewer on the same tree in parallel; record the tree SHA (`git rev-parse HEAD^{tree}`) and the gate result. The reviewer reports the gate as pending; the parent combines the gate result with the review verdict before landing. Never wait with sleep or poll loops. Why: the gate and the review are independent, so running them in sequence doubles the wait.
|
|
72
|
+
|
|
73
|
+
Artifacts are scratch, not knowledge. Anything worth keeping gets explicitly promoted into the repo, a concept, or a note; the run directory is disposable by design. For worktree workers, the Git commit and harness patch are the durable handoff records used before that promotion.
|
|
74
|
+
|
|
75
|
+
## Evidence anchors
|
|
76
|
+
|
|
77
|
+
Aggressive delegation buys speed by making the parent's context deliberately thin — which silently removes your ability to catch a child that is confidently wrong. You did not read the file, so you cannot feel the error.
|
|
78
|
+
|
|
79
|
+
**Children return claims with evidence anchors: a file path plus the quoted line carrying the claim.** Put this in the packet — it does not happen by default, and it is the half of the guard this skill owns.
|
|
80
|
+
|
|
81
|
+
Why anchors rather than trusting or re-reading: re-reading everything defeats the delegation, trusting everything scales confabulation with fan-out, and an anchor makes a spot-check cheap and constant per claim.
|
|
82
|
+
|
|
83
|
+
**The other half — not repeating an unverified claim as fact — is an always-on verification rule, not a swarm rule.** It lives in the base instructions (`agent-kernel`, under Verification) because it has to fire when nothing about the task looks like a fan-out: someone hands you a report, you are only asked to summarize, and the source was never yours to begin with. Tested 2026-08-18: stating it here did not make it fire; stating it in always-on context did. Do not re-add a copy of it to this skill — a duplicate that cannot fire only launders the obligation.
|
|
84
|
+
|
|
85
|
+
## What every child packet adds
|
|
86
|
+
|
|
87
|
+
`bc-dispatching-parallel-agents` defines the packet (scope, goal, constraints, evidence, output contract). Under `bc-delegate-investigation`, add these bullets:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
- Write your findings to <artifact path>. Append them as you establish them; do not hold
|
|
91
|
+
everything for a single write at the end.
|
|
92
|
+
- Anchor every claim: file path plus the quoted line that supports it.
|
|
93
|
+
- The returned summary is a summary of that file, never the only copy of your findings.
|
|
94
|
+
- If you are a worktree worker: immediately after each commit, append to the artifact
|
|
95
|
+
`Commit: <full 40-hex SHA> <subject>` and `Branch: <exact branch>` on their own,
|
|
96
|
+
start-of-line records. If you made no commit, write `Commit: none` and `Branch: none`.
|
|
97
|
+
The returned summary is not the only copy of those records.
|
|
98
|
+
- For implementation/testing: follow kernel Storage safety; run pytest through
|
|
99
|
+
the configured guarded runner or, if absent, plain `pytest` with `tmp_path`
|
|
100
|
+
for test fixtures and cleanup even on failure. Never use custom `--basetemp`. Run only these targeted checks: <test files or IDs, typecheck, lint>.
|
|
101
|
+
No browser/e2e tests and no full gate; the parent runs it on the integrated tree.
|
|
102
|
+
Why: fresh workers must not multiply full suites or unmanaged test roots.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Name the guarded runner from the project's or machine's instructions and docs, if configured. Fill the targeted checks with named test files or IDs; never paste the project's full gate into a packet, even when its validation page lists the gate. Why: a pasted gate is a full run per worker. The worktree requirement is scoped to worker packets; recon packets keep the first three bullets only.
|
|
106
|
+
|
|
107
|
+
**Test levels travel with the code** (load the `bc-tdd` skill, section Test levels):
|
|
108
|
+
|
|
109
|
+
- A worker packet never waives, narrows or forbids a tdd test level or its property library ("examples are enough", "no new dependency") unless it quotes the owner's approval. A parent that thinks a level is wrong for the task asks the owner. Why: a packet that overrides a level is a skip nobody approved, and the worker follows the packet.
|
|
110
|
+
- A review packet includes the worker's Test levels block, or the commits' `Test-levels:` trailers, and asks the reviewer to audit it against the diff. Why: a reviewer given only diff and spec never sees the levels, so nobody audits them.
|
|
111
|
+
- The parent's own commits of code changes carry the block too.
|
|
112
|
+
|
|
113
|
+
## Boundary
|
|
114
|
+
|
|
115
|
+
`bc-delegate-investigation` is for **investigation, analysis, and review** — reconnaissance, reading docs, cross-referencing, independent critique. Fan-out is cheap here because children only read.
|
|
116
|
+
|
|
117
|
+
For implementation fan-out, stop and use `bc-subagent-driven-development` or `bc-pipeline-to-done`. They already own worker packets, spec and standards review, worktree isolation, and rework loops. Why: a thinner parallel-implementation path competing with those will lose in ways nobody notices until something is merged.
|
|
118
|
+
|
|
119
|
+
Harness-specific mechanics, including the concrete dispatch syntax and observed failure modes, live in [pi.md](pi.md).
|