$npx -y skills add DSB-117/brainblast --skill brainblast-fleetAutonomous VTI sourcing. Discovers popular repositories that depend on a target SDK, fans out a fleet of subagents to scout each one for silent footguns, proves every candidate RED→GREEN, auto-promotes the proven ones into the corpus, logs results to the shared ledger so other fl
| 1 | # Brainblast Fleet |
| 2 | |
| 3 | The autonomous successor to hand-dropping candidates. You (the orchestrating |
| 4 | agent) run this skill; it **fans out a fleet of subagents** — one per repository — |
| 5 | to do the scouting, then the deterministic engine proves, promotes, submits, and |
| 6 | logs. The model doing the reasoning is **whatever agent is running Brainblast** |
| 7 | (this one) — no API key is requested. |
| 8 | |
| 9 | The non-negotiable invariant: **only traps that prove RED→GREEN through the |
| 10 | existing checkers ever land.** Subagents propose; `proveFinding` disposes. |
| 11 | |
| 12 | Run from `packages/core/`. Five phases. |
| 13 | |
| 14 | ## Phase 0 — Pick targets |
| 15 | |
| 16 | If the user named SDKs/protocols, use them. Otherwise read the work-orders the |
| 17 | last run left — `cat ../../fleet/REPORT.md` or `datasets/COVERAGE.md` — and target |
| 18 | the **uncovered classes** and **thin cells**, freshness-first (recently-shipped |
| 19 | or high-download SDKs, where models are most stale). |
| 20 | |
| 21 | ## Phase 1 — Discover (deterministic) |
| 22 | |
| 23 | For each target SDK: |
| 24 | |
| 25 | ```bash |
| 26 | npm run fleet:discover -- --sdk <pkg> --limit 10 --min-stars 200 |
| 27 | ``` |
| 28 | |
| 29 | Writes `fleet/worklist.json` (popular dependent repos, ranked by stars, already |
| 30 | filtered against the shared ledger so you don't re-scout what another fleet did). |
| 31 | Read it. If it's empty, the ledger says everything popular here is already done — |
| 32 | pick another SDK. |
| 33 | |
| 34 | ## Phase 2 — Scout (fan out the subagent fleet) |
| 35 | |
| 36 | For each repo in the worklist, **spawn a subagent** (the `Agent` tool, |
| 37 | `general-purpose`). Launch them in parallel batches (e.g. 3–5 at a time). Give |
| 38 | each subagent EXACTLY this contract: |
| 39 | |
| 40 | > Scout `<owner/repo>` for a **silent integration footgun** in its use of |
| 41 | > `<sdk>`: code where the happy path compiles and runs but does the wrong thing |
| 42 | > (an insecure-default flag, a zeroed fee/amount, a skipped verification, a wrong |
| 43 | > constant). Shallow-clone read-only (`git clone --depth 1`) into a temp dir. |
| 44 | > For each real footgun you find that fits an existing brainblast checker |
| 45 | > (`object-arg-property-forbidden-literal` is the workhorse — an options-object |
| 46 | > property set to a forbidden string/number/boolean literal), write a candidate |
| 47 | > Finding to `fleet/candidates/<id>.json` following `fleet/README.md`. The |
| 48 | > `vulnerable` fixture must contain the forbidden value; the `fixed` fixture must |
| 49 | > set a safe literal (so it PASSES). Set `class`. **Capture provenance from the |
| 50 | > real code** — the registry requires it: record the exact `git rev-parse HEAD` of |
| 51 | > the shallow clone and, in the candidate's `provenance`, set `sourceRef` to |
| 52 | > `github.com/<owner>/<repo>/blob/<that-sha>/<path>` and `evidence` to the verbatim |
| 53 | > vulnerable line as it appears in the file. Without a real, fetchable sourceRef + |
| 54 | > evidence the finding can only enter the repo seed corpus, never the registry. |
| 55 | > **Do not fabricate** — if the repo has no provable footgun, write nothing and |
| 56 | > report "clean". Return: repo, the candidate ids you wrote (or "clean"), and a |
| 57 | > one-line note per finding. |
| 58 | |
| 59 | Collect each subagent's report (repo → candidate ids / clean). |
| 60 | |
| 61 | ## Phase 3 — Prove + promote (deterministic gate) |
| 62 | |
| 63 | ```bash |
| 64 | npm run fleet |
| 65 | ``` |
| 66 | |
| 67 | This proves every candidate RED→GREEN, **auto-promotes the proven** into `packs/`, |
| 68 | regenerates the corpus + storefront, and prints the scoreboard. Candidates that |
| 69 | don't reproduce are reported DRAFT and never land — that is the safety rail that |
| 70 | makes autonomous sourcing safe. Then confirm integrity: |
| 71 | |
| 72 | ```bash |
| 73 | npm run sla # must be green (100% reproduce) before anything is submitted |
| 74 | ``` |
| 75 | |
| 76 | ## Phase 4 — Submit + log |
| 77 | |
| 78 | **Submit via the git-less API (the standard default). No push, no branch, no PR.** |
| 79 | The corpus is grown by POSTing each proven candidate to the registry's `/api/vti` |
| 80 | ingest, which **re-proves it RED→GREEN server-side** and inserts it into the corpus |
| 81 | database. The client is never trusted; a non-reproducing or secret-bearing |
| 82 | submission is rejected with reasons. Ingest is **idempotent** — resubmitting an |
| 83 | existing trap returns `duplicate: true` and no-ops, so it is safe to re-run. |
| 84 | |
| 85 | **The registry requires verified provenance — it only accepts REAL finds.** Each |
| 86 | submission must include `provenance.sourceRef` (a commit-pinned GitHub URL, e.g. |
| 87 | `github.com/owner/repo/blob/<40-hex-sha>/path` — a branch ref is rejected) and |
| 88 | `provenance.evidence` (a verbatim snippet of the vulnerable line). The server |
| 89 | fetches that exact file at that exact commit and confirms the evidence is present; |
| 90 | if it 404s or the line is |