---
name: upstream-scout
description: Scan every project related to one of our watchthelight-labs projects (or all of them) for what changed since the last run, find brand-new related projects, read the changes deeply enough to judge whether they matter to us, write them up in the public research repo, file user logs from labs issues, and credit and link new research in the matching labs repo's README. Trigger: /upstream-scout [target ...|all] [--quick] [--scheduled] [--since ISO], "scout upstream", "what's new in related repos", "check WhateverXe / NullMoth / mt76 for news". Also run by /legion-check (quick) and by the daily scheduled task.
---
Run these in order, without asking, and report briefly at the end (actionable items first). Same steps on Windows, macOS and a cloud run.
Where things are
- Project root (private project-legion):
$LEGION_ROOT, else the first that exists ofC:\Users\Hackintosh,~/Hackintosh,~/src/project-legion,~/project-legion. It holdsresearch/upstream/watchlist.json(what to follow, edit by hand),state.json(cursors),redaction-map.json(private, never published) andscripts/upstream/scan.py. - Research repo (public):
~/src/research(clonewatchthelight-labs/researchif missing). Write-ups go toscout/<target>/<YYYY-MM-DD>.md, run reports toscout/reports/<YYYY-MM-DD>.md, logs tologs/throughtools/ingest.py. - Labs checkouts:
~/src/<repo>(clone if missing). Commit aswatchthelight <admin@watchthelight.org>, lowercase, no AI attribution, no em dashes. - Targets and their labs repo, credit section and keywords: in the watchlist (
xe,nvgfx,mt7925-wifi,mt7925-wifi-native,mt7925-bt,legion-efi,cpu-power,audio,i2c,ite-kbd,cbmr).
-
Prepare.
git pull --rebasethe project root, the research repo and every labs checkout you will touch (two machines and the GitHub Action push too). Targets: the arguments, elseall. With--scheduled, drop a target whoselast_run(scan.py status) is under 20 h old; if none are left, stop quietly. -
Collect.
python scripts/upstream/scan.py collect --target T ... [--quick] [--since ISO] --out <scratch>/deltas.json.--quick(from legion-check) means default branch only, no PRs, small discovery, and skip step 5. Read the deltas file, not the console. -
Triage. Per target, drop noise: commits flagged
noise, dependency bumps, CI, translations, README typo fixes, issues that only matched one generic keyword. Keep releases, commits whose title or keywords touch our hardware or our open problems, merged PRs with keyword hits, issues with keyword hits, every discovery candidate, and every labs issue with new comments from other people. -
Read deeply. For each kept item:
- Commits and releases:
gh api repos/R/compare/<cursor-sha-or-tag>...<new>(or the commit / release body); read the diff of the files that matter, not just titles. - Discovery candidates: README, recent commits, licence, whether it runs on real hardware or is a stub.
- Issues and threads: the full thread.
Map each one against what is open on our side: open issues in the target's labs repo (
gh issue list -R watchthelight-labs/<repo>), the tracker Issues sheet (python scripts/tracker.py show), open watchthelight loops for the project (search_memory). Answer for each: what changed, does it unblock, contradict or duplicate something of ours, can we use it (licence: anything markedno_code, and any ChefKiss code, is ideas only, never code), and how sure we are (High / Medium / Low / Unverified, as CLAUDE.md defines). With more than 5 kept items, spread the reading over parallel subagents (up to 8), each returning that structured answer. - Commits and releases:
-
Web sweep (skip with
--quick). One subagent per target with changes or candidates, about 5 searches from the target'sdiscovery.weblist plus what step 4 raised, limited to the window: InsanelyMac, r/hackintosh, Dortania's bugtracker, GitHub discussions, forks with new commits. Same structured answer. -
Classify every finding:
noise,notable(worth knowing),actionable(we should do something: test, port, answer, change a claim),new project(a related repo we didn't know). File discovery verdicts:scan.py seen OWNER/REPO related|noise --target T --note "..."; add arelatedone to the target'srelatedlist in the watchlist with relation andcredited: falseuntil step 8 credits it. -
Record.
- Write-up per target with findings:
scout/<target>/<date>.mdin the research repo: what changed, why it matters to us (or doesn't), confidence, and a link for every claim (commit, release, issue, thread). No findings, no file. - Logs: for each labs issue in the deltas with new comments that carry code or attachments,
python ~/src/research/tools/ingest.py --map <root>/research/upstream/redaction-map.json --issue <url> [--machine <vendor-model slug>]. Pick the slug from the issue's machine field (asus-tuf-gaming-b850-plus-wifistyle) when the user has no machine inmachines.jsonyet. A refused file stops that post: look, fix the redactor if it missed a pattern, never hand-edit around it. - Tracker:
python scripts/tracker.py add-research "<topic>" "<claim>" --url <url> --source-type <GitHub commit|release|issue|forum> --confidence <...> --notes "upstream-scout <date>"for every notable or actionable finding. - Labs issues: when a finding bears on an open issue of ours, comment there (short, humanized, link to the source and the write-up).
- watchthelight: one note per run, "Upstream scout : " (scope project:legion-hackintosh), type open_loop when anything is actionable, else fact; echo the receipt.
- Write-up per target with findings:
-
Credit (auto-publish, Bash's standing decision):
- Every new project we learned from gets an entry in the target's credit section (
credit.headingin the watchlist), in that section's style (tablerow orbulletsline; follow the existing entries' wording and length). If the labs repo has no credit section yet, add## Creditsbefore## Licence. - A credited project with a new capability that matters to us gets its entry updated (e.g. "internal eDP support since 0.4.0").
- A README or docs claim the finding makes false gets corrected (status lines, "nobody has", "not possible").
- Mirrors in
alsoget the same change (NvGfxdocs/XE.md; for XeGfx edits alsogit subtree pull --prefix gpu/xegfx https://github.com/watchthelight-labs/XeGfx.git mainin the NvGfx xe checkout). - Before each push:
python ~/.claude/skills/humanize/scripts/slop_lint.py <file>when it exists, elsepython <root>/scripts/upstream/lint_public.py <file>; zero hard hits. Then commit, push, and setcredited: truein the watchlist. - Every public commit URL goes into the report.
- Every new project we learned from gets an entry in the target's credit section (
-
Finish.
scan.py commit <deltas.json>(cursors move only now).scan.py export-public ~/src/research/scout/watchlist.json,python ~/src/research/tools/index.py,python ~/src/research/tools/privacy_check.py --map <root>/research/upstream/redaction-map.json --fix(must end with 0 problems before any push).- Run report
scout/reports/<date>.md: targets and windows, actionable first, then notable, new projects with verdicts, logs ingested, public edits (commit links), API calls and errors. - Commit and push the research repo and the project root (
research/upstream/watchlist.json,state.json; neverdeltas/). - Report to Bash in a few lines: actionable items with links, then counts.
Rules
- Public text (credits, comments, write-ups, reports): clear and human, no em dashes, no hype; say what we learned and link it. Never publish an identity: logs only through
ingest.py, and the privacy check passes before every research-repo push. - Never run or build third-party code from a finding before an audit in
research/repository-audits/(CLAUDE.md). - A finding is not a fact until it is reproduced; keep the confidence honest.
- If
ghhits the rate limit, finish with what was collected, note it in the report, and do not move the cursors of targets that were not fully scanned (runscan.py commiton a deltas file trimmed to the finished targets).