Skip to content

insights: choose which projects the review reads before the scan, and see the plan with --dry-run - #50

Merged
teocns merged 2 commits into
mainfrom
insights-repo-picker
Nov 17, 2026
Merged

teocns merged 2 commits into
mainfrom
insights-repo-picker

Conversation

@teocns

@teocns teocns commented Nov 17, 2026

Copy link
Copy Markdown
Member

Before and after:

  • Before, /insights:my-agentic-setup picked the 3 most active projects by itself after a scan of about 3 minutes, and only the page said which ones it had read. To read a different project the person had to know about an internal --only flag of a script, and a name it could not open failed late, after the slow steps. The page's list of busiest projects and the scan could also disagree: the page ranked by the folder a session started in, the scan also counted the repo the session edited.
  • After, the skill first lists the git repos with sessions in the last 30 days, busiest first (about half a minute, nothing written), then asks: "Your busiest 3 (Recommended)" or "Let me choose". Choosing shows one screen: keep which of the busiest 3, and add any of the next 4. A typed name that is the unique start of a folder name is taken and said; several or none is asked again; more than 5 is asked again. Names are checked by code before any step runs, so a repo the scan cannot open is refused up front with the names to give, and no run folder is made.
  • The skill takes real flags after the command: --dry-run, --only NAME (repeatable), --skip NAME (repeatable). With a flag given there is no question. --dry-run prints the plan and stops: the run folder it would make, the projects and why, the projects left out, every step with what it reads and writes, how many AI readers and a token estimate, and that nothing leaves the laptop. It writes nothing.
  • The list and the scan now rank with one function over one input: a session counts for the folder it started in and for each repo it changed from there (an edit, a commit). The rule is worked_in.py, used by the inventory, the list and the scan.
  • The Review tab says which projects were read, which repos with sessions were not, and how to change the choice in the command a member types (/insights:my-agentic-setup --only NAME; the name comes from the plugin's own plugin.json). A choice the person confirmed reads "your busiest 3, which you confirmed"; a different one reads "chosen by you".
  • Each run gets its own folder (~/agentic-setup/run-<date>-<time>/), made after the projects are chosen, so a second run no longer overwrites the first one's answers. A dry run names the folder it would make.

Example: /insights:my-agentic-setup --dry-run --only api-server prints the plan for that one project and exits.

Limits:

  • Where PyYAML is missing, the older project picker runs; its counts can differ from the list's.
  • A session's repos are found from its tool calls (a file it wrote or edited, a git or shell command that changes a repo) and a .git folder on disk. A repo deleted since is not found. Sub-agent logs below the first level are not read, by the list or the scan.
  • A name with no session in 30 days is refused unless it is a path to a git repo.
  • On a very large session history the list takes about 20 to 30 seconds.
  • A chosen project is read, but a repo with no commits has little to review.

Test:

  • cd plugins/insights/scripts/v15/engine/variants/views && uv run --no-project --with pyyaml python -m unittest test_view_built test_view_mylevel test_counts (45 tests, OK)

  • cd plugins/insights/scripts/v15/engine && uv run --no-project --with pyyaml python -I test_anatomy_projects.py (4 tests, OK)

  • Dry run on a throwaway home with one repo: HOME=$(mktemp -d) … with one session log, then cd plugins/insights/scripts && uv run --no-project --with pyyaml python -I run.py pre --dry-run --only NAME prints the plan and the /insights:my-agentic-setup hint, and writes nothing.

  • claude plugin validate . passes with the warnings it already had.

  • The sources this repository is published from have more tests (the list against the scan's pick with the same input, typed names, a repo below a start folder, a chosen repo opened or refused, one run folder per run, the frozen page snapshots); they pass and are not shipped here.

  • One change. I did not edit a version, a CHANGELOG.md, marketplace.json or kit.json.

  • Nothing personal: no names, no paths from my machine, no output of my own scan, no secrets.

No version change: nothing reaches members until a release.

… see the plan with --dry-run

The setup tool lists the git repos with sessions in the last 30 days, busiest first, and asks which to review
(the busiest 3 are the default) before anything is scanned. The skill takes --dry-run, --only NAME and --skip NAME.
The list and the scan rank projects by the same count. A chosen repo is checked, and opened by the scan, or refused
before any step. The Review tab says which projects were read and how to change the choice.

Scripts are copied from the sources this repo is published from. No version change.
@teocns
teocns merged commit abd1419 into main Nov 17, 2026
@teocns teocns mentioned this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant