From 69da7713106c596dfe74c2ac3698540449047a1f Mon Sep 17 00:00:00 2001 From: sunwrobert Date: Fri, 13 Nov 2026 14:13:16 +1100 Subject: [PATCH 1/3] feat: refresh solar-mode and its skills to current versions Brings solar-mode to 1.22.0 and 14 dependent skills to their current text, with every company-specific reference replaced by the repository's own reviewer, commands and telemetry source. Adds nine skills solar-mode now routes to. --- skill-sources.json | 67 ++++ skills/audit-to-prs/SKILL.md | 10 + skills/before-after-ss/SKILL.md | 72 ++--- skills/council-devin/SKILL.md | 36 +-- skills/earn-its-keep/SKILL.md | 32 ++ skills/equivalence-review/SKILL.md | 41 ++- skills/find-unenforced-invariants/SKILL.md | 10 + skills/green-stack/SKILL.md | 48 ++- skills/holistic-sweep/SKILL.md | 79 ++--- skills/makefaster/SKILL.md | 296 ++++-------------- .../SKILL.md | 245 +++++++++++++++ skills/pdd-prove/SKILL.md | 50 +++ .../SKILL.md | 11 + skills/principle-explain-the-number/SKILL.md | 17 + skills/principle-laziness-protocol/SKILL.md | 10 + skills/prose-pass/SKILL.md | 70 +++-- skills/ship-with-proof/SKILL.md | 110 ++++--- skills/sol-loop-devin/SKILL.md | 68 ++-- skills/solar-climb/SKILL.md | 97 +++--- skills/solar-loop-scout/SKILL.md | 104 +++--- skills/solar-loop/SKILL.md | 219 ++++++------- skills/solar-mode/SKILL.md | 149 +++++---- skills/solar-skill-author/SKILL.md | 31 ++ skills/thermo-fix-loop/SKILL.md | 19 +- 24 files changed, 1066 insertions(+), 825 deletions(-) create mode 100644 skills/audit-to-prs/SKILL.md create mode 100644 skills/earn-its-keep/SKILL.md create mode 100644 skills/find-unenforced-invariants/SKILL.md create mode 100644 skills/observability-and-instrumentation/SKILL.md create mode 100644 skills/pdd-prove/SKILL.md create mode 100644 skills/principle-encode-lessons-in-structure/SKILL.md create mode 100644 skills/principle-explain-the-number/SKILL.md create mode 100644 skills/principle-laziness-protocol/SKILL.md create mode 100644 skills/solar-skill-author/SKILL.md diff --git a/skill-sources.json b/skill-sources.json index 0bc5eb0..f3b6e65 100644 --- a/skill-sources.json +++ b/skill-sources.json @@ -78,6 +78,12 @@ "localBodyDiffers": false, "inKnowledgeBase": true }, + { + "name": "audit-to-prs", + "status": "local-or-unverified", + "inKnowledgeBase": true, + "note": "Personal skill; no external upstream." + }, { "name": "automate-me", "source": "https://github.com/cursor/plugins", @@ -356,6 +362,12 @@ "localBodyDiffers": false, "inKnowledgeBase": true }, + { + "name": "earn-its-keep", + "status": "local-or-unverified", + "inKnowledgeBase": true, + "note": "Personal skill; no external upstream." + }, { "name": "emil-design-eng", "source": "https://github.com/emilkowalski/skills", @@ -392,6 +404,12 @@ "localBodyDiffers": false, "inKnowledgeBase": false }, + { + "name": "find-unenforced-invariants", + "status": "local-or-unverified", + "inKnowledgeBase": true, + "note": "Personal skill; no external upstream." + }, { "name": "ga4", "status": "local-or-unverified", @@ -540,12 +558,28 @@ "localBodyDiffers": false, "inKnowledgeBase": true }, + { + "name": "observability-and-instrumentation", + "source": "https://github.com/addyosmani/agent-skills", + "path": "skills/observability-and-instrumentation", + "comparisonCommit": "301b02b12bff98e4688e6984af6556802322bbde", + "treeSha": "1e8f1c0144e2b8f7859f5870329a31f8abc58193", + "trackingMethod": "gh skill install", + "localBodyDiffers": true, + "inKnowledgeBase": true + }, { "name": "orchestrate-parallel-pr-tasks", "status": "local-or-unverified", "note": "No verified external upstream; not overwritten or attributed speculatively.", "inKnowledgeBase": false }, + { + "name": "pdd-prove", + "status": "local-or-unverified", + "inKnowledgeBase": true, + "note": "Personal skill; no external upstream." + }, { "name": "ponytail", "source": "https://github.com/dietrichgebert/ponytail", @@ -578,6 +612,24 @@ "localBodyDiffers": false, "inKnowledgeBase": true }, + { + "name": "principle-encode-lessons-in-structure", + "source": "https://github.com/chhoumann/t3-pstack", + "path": "plugins/pstack/skills/principle-encode-lessons-in-structure", + "treeSha": "1e42cd4db78cc95d0297dc0264c1a74439c90be9", + "trackingMethod": "npx skills add", + "localBodyDiffers": false, + "inKnowledgeBase": true + }, + { + "name": "principle-explain-the-number", + "source": "https://github.com/chhoumann/t3-pstack", + "path": "plugins/pstack/skills/principle-explain-the-number", + "treeSha": "2f468162c9ce85478f1fb1198149646a2ef0f735", + "trackingMethod": "npx skills add", + "localBodyDiffers": false, + "inKnowledgeBase": true + }, { "name": "principle-fix-root-causes", "source": "https://github.com/cursor/plugins", @@ -588,6 +640,15 @@ "localBodyDiffers": false, "inKnowledgeBase": true }, + { + "name": "principle-laziness-protocol", + "source": "https://github.com/chhoumann/t3-pstack", + "path": "plugins/pstack/skills/principle-laziness-protocol", + "treeSha": "cb8aa817489838fe615d0dfe321d263e8a3f1faa", + "trackingMethod": "npx skills add", + "localBodyDiffers": false, + "inKnowledgeBase": true + }, { "name": "principle-prove-it-works", "source": "https://github.com/cursor/plugins", @@ -786,6 +847,12 @@ "inKnowledgeBase": true, "note": "Personal skill; no external upstream." }, + { + "name": "solar-skill-author", + "status": "local-or-unverified", + "inKnowledgeBase": true, + "note": "Personal skill; no external upstream." + }, { "name": "spotlight", "status": "local-or-unverified", diff --git a/skills/audit-to-prs/SKILL.md b/skills/audit-to-prs/SKILL.md new file mode 100644 index 0000000..155a1cb --- /dev/null +++ b/skills/audit-to-prs/SKILL.md @@ -0,0 +1,10 @@ +--- +name: audit-to-prs +description: >- + Turn an audit's findings into PRs: one PR per finding reproduced on clean `origin/main`, the rest listed with the evidence each lacks. Use for "/audit-to-prs ", "make PRs from this audit", or after an audit skill in an automation router. +metadata: + version: 1.1.0 + disable-model-invocation: true +--- + +Rate every finding in the audit by severity and confidence. Ship each finding you reproduced on clean `origin/main` as its own PR, on its own branch cut from `origin/main`, worst first. Link the open PR that already fixes a finding instead of opening a second. List every other finding with its rating and the evidence it lacks. diff --git a/skills/before-after-ss/SKILL.md b/skills/before-after-ss/SKILL.md index 7872287..f7f8957 100644 --- a/skills/before-after-ss/SKILL.md +++ b/skills/before-after-ss/SKILL.md @@ -1,39 +1,51 @@ --- name: before-after-ss -description: Produce the `## Before / after` evidence section for a UI change. Captures matched screenshots of the same surface on the base branch and the PR branch at the same viewport and state, in both light and dark mode, highlights the changed element in both with a box or circle derived from its browser bounding box, writes a one-line what-to-look-for caption per row, and emits the PR-ready table. Use when the user says "/before-after-ss", "before and after screenshots", "show what changed visually", or when a playbook such as ship-with-proof reaches its UI evidence step. +description: >- + Produce the `## Before / after` section for a UI change: matched base-vs-branch screenshots of each changed surface at the same viewport and state in light and dark mode, the changed element boxed or circled, a what-to-look-for caption per surface, and a PR-ready table. Use for "/before-after-ss", "before and after screenshots", "show what changed visually", or a playbook's UI evidence step (e.g. ship-with-proof). metadata: - version: 1.1.0 + version: 1.4.0 --- # Before / after: highlighted UI evidence -Rendered pixels from the real app or Storybook, never a diagram. One row per changed user-facing surface and theme, base branch on the left, PR branch on the right, the changed element highlighted in both, and a caption telling the reviewer what to look at. Every surface is captured in both light and dark mode, because a design-system swap that looks right in one theme often breaks contrast or borders in the other. +Rendered pixels from the real app or Storybook, never a diagram. One row per changed surface and theme, base on the left, branch on the right, the same highlight on both, plus a caption. ## Inputs -- The diff or PR under review and its base ref (default `origin/main`). -- How the surface renders locally: Storybook or the local dev stack, started the way the repository documents. Do not edit seed files or application source only to make a screenshot possible. -- A Chrome exposing CDP (`--cdp` or `CDP_ENDPOINT`; signed-in routes need it), or `playwright install chromium`. With no endpoint the script launches headless Chromium. +- The diff or PR and its base ref (default `origin/main`). +- How the surface renders locally. Use Storybook or the local dev stack, started the way the repository documents. Never edit seed files or app source just to enable a screenshot. +- A Chrome exposing CDP (Devin: `http://localhost:29229`), or `playwright install chromium` for `--launch`. ## Procedure -1. List the surfaces. Walk the diff and write down every route, story, dialog, drawer, table, or control whose rendered output changes. Skip pure refactors with no visual or DOM change, and say so in the section. Record the UI state each surface needs (signed in, which tab, which filter, open menu, loading, empty, error). -2. Stand up both sides. Check out the base ref in a separate worktree (`git worktree add ../base origin/main`) and run it on its own port, sharing the same backend, seed, and account as the PR branch so the only variable is the code. If both sides cannot run at once, capture the base first, then the branch, without changing data in between. -3. Match the state. Same viewport (`1280x900` desktop, `390x844` mobile), same route or story id, same scroll position, same open state, same data, same theme. Capture every surface in light and in dark mode. Set the theme the way the app does (next-themes `theme` in localStorage plus `prefers-color-scheme`, or the Storybook `theme` global), never with a CSS override. Wait for the surface to settle (no skeletons, spinners, or pending fetches) unless the loading state is the subject. -4. Locate the element. Prefer an accessible role and name (`role=button[name="Save"]`), then a stable `data-testid`, then a structural CSS selector. When the before and after tags differ (a `div[role=button]` became a `button`), pass `--before-selector` and `--after-selector` separately so both shots highlight the same control. -5. Capture and highlight with `scripts/annotate.py` in this skill's directory: +1. List every route, story, dialog, drawer, table, or control whose rendered output changes, with the UI state each needs (signed in, tab, filter, open menu, loading, empty, error). A pure refactor with no visual or DOM change is skipped, and the section says so. +2. Run base in its own worktree (`git worktree add ../base origin/main`) on its own port, sharing the branch's backend, seed, and account so only the code differs. If both can't run at once, capture base first, then branch, with no data change between. +3. Match state: viewport (`1280x900` desktop, `390x844` mobile), route or story id, scroll, open state, data, theme. Set the theme the way the app does (next-themes `theme` in localStorage plus `prefers-color-scheme`, or the Storybook `theme` global), never a CSS override. Wait for skeletons, spinners, and fetches to settle unless loading is the subject. +4. Select the element by accessible role and name (`role=button[name="Save"]`), then `data-testid`, then structural CSS. If the tag differs between sides (`div[role=button]` became `button`) or the element is missing on one, pass `--before-selector` and `--after-selector`; never loosen to a container. +5. Capture with `scripts/annotate.py` in this skill's directory: + ```bash python3 scripts/annotate.py \ - --before-url http://localhost:3001/settings/profile \ - --after-url http://localhost:3000/settings/profile \ - --selector 'role=button[name="Save"]' \ + --before-url http://localhost:3001/settings/keys \ + --after-url http://localhost:3000/settings/keys \ + --selector 'role=button[name="Create key"]' \ --viewport 1280x900 --shape box \ - --out-dir /tmp/before-after --slug profile-save-button + --out-dir /tmp/before-after --slug keys-create-button ``` - It captures one pair per theme in `--themes` (default `light,dark`), reads the element's bounding box through Playwright, saves `--before.png` and `--after.png` at device scale 2, draws the highlight, and prints the geometry per theme as JSON. For each theme it emulates `prefers-color-scheme`, writes the next-themes `theme` localStorage key before load, merges `theme:` into the `globals` query of Storybook `iframe.html` URLs, and exits if `` does not carry the `dark` class exactly when the theme is dark. For a surface themed by media query or a data attribute instead of the class, pass `--no-theme-check` and confirm the theme by opening the PNGs. Pass `--themes light` or `--themes dark` only to recapture one theme after a fix. By default it attaches to the session Chrome over CDP and copies that browser's cookies and local storage into each capture. Local storage is seeded only into origins on the same hostname as the capture URL, so a login on `localhost:3000` also applies on `localhost:3001` without handing other sites' storage to either page. Playwright reads local storage from open tabs only, so keep a tab of the signed-in app open while the script runs (`--launch` uses a fresh headless Chromium with no session). It picks the first visible match for the selector, skipping hidden responsive duplicates. It applies the same `--scroll-y` to both pages, checks the page actually reached it, and refuses to scroll one side on its own. If it exits saying the target is outside the viewport or the scroll was clamped, pass one shared `--scroll-y` both pages can reach or `--full-page`. Use `--shape circle` for a small icon-sized target and `--wait-selector` for a marker that proves the page is settled. For a state a bare URL cannot reach (an open dialog, an expanded row, a wizard step), pass `--setup FILE.py` defining `setup(page)`. It runs the same clicks and typing on both sides before the target is located, so the pair stays matched and the row stays measured rather than `not measured`. Pass `--ready-selector` for a marker that proves the page is hydrated before `setup` clicks anything. The default `--wait-until load` avoids `networkidle`, which never settles on some dev servers, but `load` fires before application fetches finish, so a surface that populates asynchronously needs `--wait-selector` on a settled-state marker or the pair can show different intermediate states. Both images keep the full viewport so the reviewer sees context. Do not crop. -6. Verify each pair by opening both PNGs, in both themes. The highlight must sit on the migrated element in both, the two shots must show the same state and theme, and neither may contain an error overlay, a stuck spinner, or a layout break. A shot that shows a bug is a finding. Fix the code, push, and recapture. -7. Write the caption. One line per row, plain words, naming the element and the visible difference a reviewer should confirm. Say what to compare, not what the code does. Call out any difference that shows up in only one theme. -8. Emit the section and upload the images. Send the PNGs through the PR tool or as `message_user` attachments so they get uploaded URLs, then write the section below into the PR body. Keep it separate from `## Show me` and `## Visualization`, which explain code, not pixels. + + Per theme in `--themes` (default `light,dark`) it saves `--before.png` and `--after.png` at device scale 2 with the highlight drawn, and prints geometry JSON. Use `--themes light|dark` only to recapture one theme after a fix. + - Theme: it sets the theme itself and exits if `` lacks the `dark` class exactly when dark. For a surface themed by media query or data attribute, pass `--no-theme-check` and confirm by opening the PNGs. For one that ignores next-themes (hardcoded palette, iframe, story without the theme decorator), fix how the theme is applied or mark that theme `not measured ()`. + - Auth: it attaches to the session Chrome over CDP and copies its cookies and same-hostname local storage, so keep a signed-in app tab open while it runs. `--launch` starts a fresh headless Chromium with no session. + - Scroll: one shared `--scroll-y` for both sides. If it exits because the target is outside the viewport or the scroll was clamped, pick a `--scroll-y` both pages reach, or `--full-page`. + - `--shape circle` for icon-sized targets. + - Unreachable state (open dialog, expanded row, wizard step): `--setup FILE.py` defining `setup(page)` runs the same actions on both sides before locating; add `--ready-selector` for a hydration marker before `setup` clicks. + - Async content: the default `--wait-until load` fires before app fetches finish, so pass `--wait-selector` on a settled-state marker or the sides can show different intermediate states. A drifting highlight means the page moved between locate and capture: add `--wait-selector` or a longer settle wait. + + Keep the full viewport for context; don't crop. + +6. Open every PNG in both themes. The highlight must sit on the changed element on both sides, with matching state and theme, and no error overlay, stuck spinner, or layout break. A shot showing a bug is a finding: fix the code, push, recapture. Sides that differ beyond the change mean different data or a stale server: restart the base server and hard-refresh. A Storybook first load showing only a spinner means warm the story once. +7. Caption each row in one plain line naming the element and the visible difference to confirm, including any difference that appears in only one theme. +8. Upload the PNGs through the PR tool or as `message_user` attachments, then write the section below into the PR body, separate from `## Show me` and `## Visualization`. ## Output @@ -44,24 +56,12 @@ Real browser screenshots, , same seeded data and UI state, light and d | Surface | Before (origin/main) | After (this branch) | | --- | --- | --- | -| Profile page, Save button (`ProfileHeader`), light | ![before](URL) | ![after](URL) | -| Profile page, Save button (`ProfileHeader`), dark | ![before](URL) | ![after](URL) | +| Keys page, Create key button (`ApiKeysHeader`), light | ![before](URL) | ![after](URL) | +| Keys page, Create key button (`ApiKeysHeader`), dark | ![before](URL) | ![after](URL) | | Look for: same label and placement, native focus ring on Tab, DS `Button` hover shade in both themes. | | | | Mobile nav drawer (390x844), light and dark | not measured (drawer only mounts with a signed-in session, blocked locally) | | ``` -Rules for the section: - -- Each surface gets a light row and a dark row, then one caption row directly under them. No collapsible elements. -- Every surface listed in step 1 appears in both themes, as a screenshot pair or as `not measured ()`. Never drop a surface or a theme silently. -- Highlight semantics are identical on both sides: same shape, same color, same element. -- The images are the rendered app or story. Diagrams, DOM dumps, and code diffs belong in other sections. -- Do not commit the PNGs to the repository. - -## Failure modes - -- Element not found on one side: the selector matched the new markup only. Supply the per-side selector rather than loosening it to a container. -- Highlight drifts from the control: the page scrolled or animated between locate and screenshot. Add `--wait-selector` or increase the settle wait, then recapture. -- Base and branch differ beyond the change: the two servers point at different data or one is stale. Restart the base worktree server and hard-refresh before recapturing. -- Storybook first load shows only the loading spinner: warm the story once, then capture. -- Script exits saying the page ignored the theme: the surface does not read next-themes (a hardcoded palette, an iframe, or a story without the theme decorator). Fix how the theme is applied, or list that theme as `not measured ()`. +- Per surface: a light row, a dark row, then its caption row. No collapsible elements. +- Every step-1 surface appears in both themes, as a pair or `not measured ()`. +- Don't commit the PNGs. diff --git a/skills/council-devin/SKILL.md b/skills/council-devin/SKILL.md index a956b74..408755d 100644 --- a/skills/council-devin/SKILL.md +++ b/skills/council-devin/SKILL.md @@ -1,19 +1,19 @@ --- name: council-devin description: >- - Devin's council. In Devin, use this instead of the upstream tstack `council` skill, which depends on T3 Code's `orchestrator_capabilities` and `delegate_task`. Brings in three read-only delegates, each a child Devin session started on its own model (Opus 5.5, Sol 6.1, GPT-6 Astra) through `devin_session_create`'s `devin_mode` (Devin's native model selection, not an API router), collects findings, disagreements, recommendations and a score out of 10, and repeats rounds after fixes. Use when the user says "council", "/council", "council-devin", "council review" or "ask the council". + Devin's council, replacing upstream tstack `council` (needs T3 Code's `orchestrator_capabilities` and `delegate_task`): three read-only child Devin sessions on Opus 5.5, Sol 6.1 and GPT-6 Astra via `devin_session_create`'s `devin_mode`, never a model API, returning findings, disagreements, recommendations and a score out of 10, repeated after fixes. Use for "/council", "council review" or "ask the council". metadata: - version: 1.0.0 + version: 1.4.0 adapted-from: https://github.com/t3dotgg/tstack/blob/1085050f3baed1ac724caa4a8166145fb2ac88af/skills/council/SKILL.md --- # council-devin -Before an audit, address outstanding PR comments, fix known issues, and run relevant checks. Give the council the updated implementation; do not defer known fixes until reviews return. If the user wants to discard the implementation and explore new ideas, skip fixes to code being replaced. +Before the audit, address outstanding PR comments, fix known issues, and run relevant checks, so the council sees the updated code. If the user is discarding the implementation to explore new ideas, skip fixes to code being replaced. ## Members -Each delegate is a child Devin session. The model is set by `devin_mode`, which is batch-level, so start one `devin_session_create` call per member and launch the three concurrently from one `scripted_tools` script, keeping each call's error separate so a failed member is reported on its own. +`devin_mode` is batch-level, so make one `devin_session_create` call per member, all three concurrently from one `scripted_tools` script, each call's error kept separate. | Delegate | `devin_mode` | | ----------- | ------------- | @@ -21,23 +21,23 @@ Each delegate is a child Devin session. The model is set by `devin_mode`, which | Sol 6.1 | `gpt-6-1-sol` | | GPT-6 Astra | `gpt-6-astra` | -- The tool schema and the 422 for an unknown `devin_mode` list only the eight picker modes (`normal` ... `swe-2-max`); the server accepts these model IDs anyway when they are passed as `devin_mode` from a `scripted_tools` script. Near spellings are rejected: `gpt-6.1-sol`, `sol-6-1`, `claude-opus-5-5`. -- If the user names other members, use those. If a member's create call fails, report it with the error and do not substitute another model. -- Use Devin's native model selection; never call an API router or any model API directly for the council. A child session cannot name its own model, so the evidence for which model ran is the `devin_mode` the create call accepted; record it. -- Sol and Astra are both OpenAI. This lineup deliberately overrides upstream's one-model-per-provider rule. +- The schema and the 422 for an unknown `devin_mode` list only the eight picker modes (`normal` ... `swe-2-max`), but the server accepts these IDs from `scripted_tools`. Rejected near spellings: `gpt-6.1-sol`, `sol-6-1`, `claude-opus-5-5`. +- Use members the user names instead. Report a failed create with its error, never a substitute. +- Never call an API router or a model API directly. A child can't name its own model, so the accepted `devin_mode` is the evidence: record it. +- Two OpenAI members is deliberate, overriding upstream's one-per-provider rule. ## 1. Brief -Write one brief, the same for every delegate: +One brief, identical for every delegate: -- The request, and for a review: repo, branch, PR URL, base, and the exact diff command (`git diff ...HEAD -- `). -- Intent and out of scope in 1-2 sentences, and the checks already run. -- Read-only: clone or check out and read; no edits, commits, pushes, PRs, PR comments, Slack messages, or child sessions. +- The request; for a review: repo, branch, PR URL, base, and the exact diff command (`git diff ...HEAD -- `). +- Intent and out of scope in 1-2 sentences, and checks already run. Out of scope and the score's target are the user's words, never a lower bar you pick. +- Read-only: check out and read; no edits, commits, pushes, PRs, PR comments, Slack messages, or child sessions. - For a code review: findings as `id, severity (blocker|should|nit), file:line, evidence, smallest fix`, then disagreements with the brief, then `SCORE: /10`. ## 2. Start the round -Call `devin_session_create` once per member with `devin_mode` set, `repos` set to the repo, `title` `Council round : `, `notify_on_response=true`, and this `structured_output_schema`: +Per member: `devin_session_create` with `devin_mode`, `repos` = the repo, `title` `Council round : `, `notify_on_response=true`, and this `structured_output_schema`: ```json { @@ -52,19 +52,19 @@ Call `devin_session_create` once per member with `devin_mode` set, `repos` set t } ``` -Do not poll. When each child settles, read `structured_output` once with `devin_session_interact` `get`, and its last messages if the output is missing. Treat it as a claim: check every finding against the code before acting on it. +When each child notifies you, read `structured_output` once with `devin_session_interact` `get` (its last messages if output is missing). Verify every finding against the code before acting. ## 3. Collect -Summarize for the user: findings that hold up (merged across delegates, noting who raised each), findings you reject with the reason, disagreements between delegates, and recommended next steps. A delegate that returns no score gets `no score`; do not invent one. +Report: findings that hold up (merged, noting who raised each), rejected findings with reasons, disagreements between delegates, and next steps. No score returned means `no score`. ## 4. Later rounds -Count each full review pass as one round. If you agree with the recommendations, make the changes, then start a fresh round: message the same three sessions with `devin_session_interact` `message` (same session, same model), giving the change since last round and the open finding ids, and ask each to mark them `resolved` or `still open: ` and re-score. Continue until all delegates are satisfied. Keep scope limited: decline findings outside the brief and say so. +One full review pass is one round. After making the changes you agree with, message the same three sessions with `devin_session_interact` `message`: the change since last round and open finding ids, asking each to mark them `resolved` or `still open: ` and re-score. Repeat until every agreed finding at every severity is fixed or refuted with evidence; "no blockers" is not done. Decline out-of-brief findings and say so. ## 5. Report -If the work ends in a pull request, put this section in the PR description with `git_update_pr`, above the session link Devin appends. Edit the description; do not post a comment. +With a PR, put this section in its description via `git_update_pr`, above Devin's session link (not a comment): ```markdown ## Council review @@ -78,4 +78,4 @@ Rounds: 2 | GPT-6 Astra | 7/10 | 9/10 | ``` -Link each delegate's child sessions. If there is no PR, put the same results in the final reply only. Archive the delegate sessions when the council is done. +Link each delegate's child sessions. Without a PR, put it in the final reply. Archive the delegate sessions when done. diff --git a/skills/earn-its-keep/SKILL.md b/skills/earn-its-keep/SKILL.md new file mode 100644 index 0000000..b940ce9 --- /dev/null +++ b/skills/earn-its-keep/SKILL.md @@ -0,0 +1,32 @@ +--- +name: earn-its-keep +description: >- + Cost-benefit verdict (keep, shrink, or delete) on a file, abstraction, dependency, test, flag, config, CI step, automation, skill, doc, or PR, from code and production evidence. Read-only unless asked to apply. Use for /earn-its-keep, "does this earn its keep", "is this truly necessary", "is this worth it", "what does this add", or "can we delete this". +metadata: + version: 0.4.0 + disable-model-invocation: true +--- + +# earn-its-keep + +Chesterton's fence, then make the fence pay rent. Argument: one or more targets; one verdict each. + +1. **Claim.** What it buys, in one sentence, from its code, PR body, commit, or docs, else "none found". +2. **Evidence.** Prove the claim from the artifact, never its name or comments: + - Reachability: callers and importers (`rg`, the type checker, `knip`), plus invokers of an entry point (workflow and cron config, `package.json` scripts, route tables, deploy config, traffic or run logs). Dead only when both are empty. + - Ablation: delete or bypass it on a scratch branch; run the tests and the flow it guards. + - Production: the metric, log, or event it moves (Datadog, ClickHouse, PostHog), with number and window. + - Tests: [**principle-test-behavior-not-implementation**](../principle-test-behavior-not-implementation/SKILL.md). + - Automations and skills: runs, PRs, or corrections in the last 30 days. +3. **Carrying cost.** Lines, files, dependencies and install size, CI minutes, indirection, ACUs per run, tokens per load, and bugs or reverts it caused (`git log` with a pathspec). +4. **Cheaper option.** An existing platform API, helper, lint rule, or skill that does the job, with a path or link. +5. **Verdict.** `keep` (evidence beats cost, no cheaper option), `shrink: `, or `delete` (no evidence, or a cheaper option does the job; name the replacement or "nothing"). + +## Reply + +1. Verdict per target, on the first line. +2. A fenced `diff` block: `+` what it buys, `-` what it costs, each with number and source. +3. The cheaper option, or "none". +4. What shrinking or deleting breaks, from the ablation, or "Not run". + +Applying `shrink` or `delete` goes through [**ship-with-proof**](../ship-with-proof/SKILL.md). diff --git a/skills/equivalence-review/SKILL.md b/skills/equivalence-review/SKILL.md index e82079a..86d9edf 100644 --- a/skills/equivalence-review/SKILL.md +++ b/skills/equivalence-review/SKILL.md @@ -1,50 +1,49 @@ --- name: equivalence-review -description: "Review a PR only for unintended breakage, with proof. Ignores code quality and style. Use for 'equivalence review', 'is this non-breaking', 'safe to merge?'." +description: "Review a PR only for unintended breakage, with proof; ignores quality and style. Use for 'equivalence review', 'is this non-breaking', 'safe to merge?'." +metadata: + version: 1.1.0 --- # Equivalence review -A PR passes if it moves toward its stated goal and breaks nothing it didn't mean to, with proof. Nothing else counts. Don't comment on quality, style, naming, slop, conventions, or better designs, not even as nits. +A PR passes if it moves toward its stated goal and breaks nothing it didn't mean to, with proof. Make no comment on quality, style, naming, conventions, or alternative designs, nits included. Intended changes never fail a PR. ## Steps -1. **Intent.** From the PR description, ticket, and commits, state what it's meant to change. A refactor, move, or migration means strict equivalence. -2. **Behavior changes.** For everything observable outside the diff (callers, return/error paths, API and schema shapes, DB reads/writes, wire formats, flags/defaults, side effects, UI output, exports), compare old vs new. Follow changed symbols past the diff. Label each change intended, unintended, or unclear (treat unclear as unintended). -3. **Prove it.** The claims the PR's safety depends on need executed proof: a test, typecheck, or script that would fail if the claim were wrong. Ideally, run the same input on base and head and diff the output. Other claims need at least a `file:line`. If you can't prove a claim, mark it unproven. Never pass off a guess as proof. +1. **Intent.** From the description, ticket, and commits, state what it's meant to change. A refactor, move, or migration means strict equivalence. +2. **Behavior changes.** Diff old against new for everything observable outside the diff (callers, return and error paths, API and schema shapes, DB reads and writes, wire formats, flags and defaults, side effects, UI output, exports), following changed symbols past the diff. Label each intended, unintended, or unclear; unclear counts as unintended. +3. **Proof.** Every claim the verdict depends on needs an executed, falsifiable check (test, typecheck, script), ideally a differential run of one input on base and head. Other claims need at least a `file:line`. Anything else is unproven. ## Output -The reader should get the answer from the first line and the evidence from a glance at one table. Write it as a scannable report, not paragraphs. Use the fixed order below, keep each cell to one line, and leave out empty sections. +Verdict first, evidence in one table. One-line cells, this order, empty sections omitted. ### 1. Verdict line -One line, nothing before it: - ```markdown ## ✅ Pass · ⚠️ Pass, pending proof · ❌ Fail ``` -Pick one. Follow with one line: `**Intent:** → `. +Pick one, then: `**Intent:** → `. ### 2. Scoreboard -One row per observable surface (or per PR in a stack). This table is the review; everything below supports a row in it. +One row per observable surface (or per PR in a stack). Every later section supports a row. ```markdown | Surface | What was compared | Base vs head | Proof | |---|---|---|---| | GCS upload/download/copy | 6 calls, 10 HTTP requests, logs | ✅ identical | differential harness | -| KMS encrypt/decrypt | 5 cases × 3 envs | ✅ identical | differential harness | | Workers `fetch` binding | method call on `deps` | ⚠️ unproven | — | | Error message on 404 | `ERR` text | ❌ changed | `file.ts:42` | ``` -Status vocabulary, nothing else: `✅ identical`, `🟦 intended`, `❌ changed`, `⚠️ unproven`. Proof column names the kind (`differential harness`, `typecheck`, `test`, `blob hash`, `file:line`). +Status vocabulary, nothing else: `✅ identical`, `🟦 intended`, `❌ changed`, `⚠️ unproven`. Proof names the kind (`differential harness`, `typecheck`, `test`, `blob hash`, `file:line`). -### 3. Unintended changes (only if any) +### 3. Unintended changes -One block per change. Show the old → new shape as a `diff` block matched to what changed (wire payload, call tree, return value, file layout), then repro and fix: +One block per change: an old → new `diff` of what changed (wire payload, call tree, return value, file layout), then repro and fix: ````markdown **`client.ts:88` – 404 now returns `ERR` instead of `ok(null)`** @@ -60,12 +59,12 @@ Repro: `` · Fix: `` ### 4. Intended changes -Show the shape change visually, smallest view that makes it clear: +Smallest view of the shape change: -- API or call-shape change → `diff` of the call site. +- API or call shape → `diff` of the call site. - Moves → `diff` of the file tree. -- Flow change → `diff` of the call tree, or Mermaid if several components interact. -- State machine change (phase union, `transition()`, reducer, lifecycle modes) → the [`statechart`](../statechart/SKILL.md) skill's `chart.mmd` of the new behavior, with the equivalence claims as INVARIANTs; a rule that breaks is a finding. +- Flow → `diff` of the call tree, or Mermaid when several components interact. +- State machine (phase union, `transition()`, reducer, lifecycle modes) → the [`statechart`](../statechart/SKILL.md) skill's `chart.mmd` of the new behavior, equivalence claims as INVARIANTs; a broken rule is a finding. ```diff packages/ @@ -76,7 +75,7 @@ Show the shape change visually, smallest view that makes it clear: ### 5. Proof -Table, one row per claim the verdict depends on. Claim in plain words; evidence is the command and its decisive output, or a `file:line`. +One row per claim the verdict depends on; evidence is the command and its decisive output, or a `file:line`. ```markdown | Claim | Evidence | @@ -95,6 +94,4 @@ Checklist, each item closable by one command: ### Visual extras -When a stack or a wide change makes the scoreboard dense (roughly 8+ rows or several PRs), also render it as one HTML page (`html_preview` then `html_render` in T3, else write and `open` a file): a status grid of surfaces × PRs, colored by the status vocabulary. Keep the markdown report as well; the page doesn't replace it. - -Intended changes never fail a PR. +When the scoreboard is dense (roughly 8+ rows or several PRs), also render one HTML page (`html_preview` then `html_render` in T3, else write and `open` a file): a surfaces × PRs grid colored by status. Keep the markdown report too. diff --git a/skills/find-unenforced-invariants/SKILL.md b/skills/find-unenforced-invariants/SKILL.md new file mode 100644 index 0000000..be3bc60 --- /dev/null +++ b/skills/find-unenforced-invariants/SKILL.md @@ -0,0 +1,10 @@ +--- +name: find-unenforced-invariants +description: >- + Find every invariant the app relies on but doesn't explicitly enforce. Use for "/find-unenforced-invariants". +metadata: + version: 1.0.0 + disable-model-invocation: true +--- + +find every invariant my app relies on but doesn't explicitly enforce diff --git a/skills/green-stack/SKILL.md b/skills/green-stack/SKILL.md index cff2db3..b5c20c1 100644 --- a/skills/green-stack/SKILL.md +++ b/skills/green-stack/SKILL.md @@ -1,47 +1,41 @@ --- name: green-stack description: >- - Get a PR stack merge-ready, bottom-up: repair conflicts, fix required CI and blocking review findings, and report what remains. Use for "green the stack", "fix the stack", or "restack". Delegate stack mechanics to the installed stack-management skill. Does not queue or merge PRs. + Get a PR stack merge-ready bottom-up: repair conflicts, fix required CI and blocking review findings, report what remains. Delegates stack mechanics to the installed stack-management skill; never queues or merges. Use for "green the stack" or "restack". metadata: - version: 2.1.0 + version: 2.3.0 --- -# Green Stack +# Green stack -Get every open layer merge-ready without unnecessary rewrites or review cycles. Queueing and merging stay with the user. +## Stack tools -## Use the stack's tools +Load the repo's stack-manager skill (e.g. `$gh-stack`) for commands, linking, restacking and recovery. A managed stack stays in its own tool. Reproduce a failed check with the job's own command on the layer that owns the code. Handle findings through the repo's review workflow. -Load the installed skill for the repository's stack manager, such as GitHub's [`gh-stack`](../gh-stack/SKILL.md). Let it handle commands, flags, linking, restacking and recovery. Keep an existing managed stack in its own tool rather than converting it to another manager. +## Bottom-up -For a failed check, read the failing job's log and reproduce it with the job's own command on the layer that owns the code; use the repository's review workflow for findings. This skill coordinates the work, not the mechanics. - -## Work bottom-up - -1. Inspect the live stack, checkout and open PRs. Establish the current bottom, parent relationships, heads, checks and review blockers. Coordinate ownership so two workers do not push the same branches; preserve unrelated local work. -2. Bring each layer onto its updated parent, bottom-up. Follow the stack manager's normal workflow and preserve the existing history strategy unless there is a reason to change it. If the user delegates that choice, make it and continue. Resolve conflicts on the owning layer and propagate fixes upward. Verify parent ancestry and each layer's diff. Avoid chasing unrelated trunk changes once the stack is mergeable and repository requirements are met. -3. Complete the ancestry repair before adding expensive optional local checks between every layer. Follow repository-required verification, and use focused tests for actual fixes. Inspect failed CI logs before changing heads: fix branch regressions in the owning layer, retry infrastructure failures only after diagnosis, and report shared or optional failures separately. A required check that is missing or pending is not passing. -4. Address blocking review findings in their owning layers, then propagate any fixes. Use the repository's actual approval requirements. Do not demand another review-bot approval just because a SHA changed. Ask for review when required approval is missing or a substantive change needs review, not after every mechanical restack. Human sign-off remains a human requirement. -5. Refresh every open layer after the repairs. Run independent stacks in parallel, one worker and worktree each, with branch names unique to that worktree. Retry fetch and push on transient network or ref-lock errors. Do not block on sleeps. If blockers remain, continue fixing what is actionable; use host PR notifications for CI or review waits and resume when they arrive. Keep a short handoff with heads, unfinished work and review-request links. After an interrupted command or worker failure, inspect what actually landed before retrying. Diagnose repeated failures instead of repeatedly restarting workers. +1. Inspect the live stack: bottom, parents, heads, checks, review blockers. One worker per branch; preserve unrelated local work. +2. Bring each layer onto its updated parent, keeping the existing history strategy unless there's a reason to change it (your call if delegated). Resolve each conflict on the owning layer and propagate upward. Verify parent ancestry and each layer's diff. Once mergeable, stop chasing unrelated trunk changes. +3. Repair ancestry before optional per-layer local checks; run repo-required verification and focused tests for real fixes. Read failed CI logs before changing heads: fix regressions in the owning layer, retry infra failures only after diagnosis, report shared or optional failures separately. A missing or pending required check is not passing. +4. Fix blocking review findings in their owning layers and propagate. Apply the repo's actual approval rules: a changed SHA alone needs no new review-bot approval; request review when a required approval is missing or a substantive change needs one, not after a mechanical restack. Human sign-off stays human. +5. Refresh every open layer. Run independent stacks in parallel, one worker and worktree each, branch names unique per worktree. Retry fetch and push on transient network or ref-lock errors. Keep a short handoff: heads, unfinished work, review-request links. After an interrupted command or worker, inspect what landed before retrying; diagnose a repeat failure instead of restarting. ## Restack recipes -- **Squash-merged parent.** Merging trunk into the child after a squash-merge yields false conflicts, because trunk does not contain the parent's commits. Merge the parent's final head into the child, merge the squash commit's first parent, record the squash with `git merge -s ours `, then merge trunk. Check that every file differing from the squash is one the child itself changes. Use the stack manager's equivalent if it has one. -- **Mechanical restacks.** A restack with no logic change needs only the repository's cheap gates per layer: lockfile and reference sync, frozen-lockfile install, and a typecheck. Let CI run the full suite on all layers in parallel; do not run a full local verify between layers. -- **Reproduce CI exactly.** Before trusting a local pass, clear stale incremental build output (`tsbuildinfo`, `dist`). Check the PR merged with its base, which is what CI checks out. Changed-file lint pulls pre-existing debt into scope once a move or rename touches a file. -- **Generated layers.** When a layer is a codemod or bulk move and its parent merge conflicts in the hundreds, rerun the layer's codemod on the repaired parent instead of hand-merging. Then reapply its follow-up commits and keep history with `git merge -s ours `, never a force-push. -- **Conflicts in a move layer.** Take the parent's file and reapply this layer's renames to it. Merge manifests and config (`package.json`, tsconfig) three-way. Never take one whole side, which silently drops exports or dependencies. +- **Squash-merged parent.** Merging trunk into the child gives false conflicts. Merge the parent's final head into the child, merge the squash commit's first parent, record the squash with `git merge -s ours `, then merge trunk. Every file differing from the squash must be one the child changes. Use the stack manager's equivalent if it has one. +- **Mechanical restack.** No logic change needs only the cheap gates per layer: lockfile and reference sync, frozen-lockfile install, typecheck. CI runs the full suite on all layers in parallel. +- **Reproducing CI.** Clear stale incremental output (`tsbuildinfo`, `dist`) first, and test the PR merged with its base, as CI does. Changed-file lint pulls pre-existing debt into scope once a move or rename touches a file. +- **Generated layer.** When a codemod or bulk-move layer conflicts in the hundreds, rerun its codemod on the repaired parent, reapply its follow-up commits, and keep history with `git merge -s ours `, never a force-push. +- **Move-layer conflict.** Take the parent's file and reapply this layer's renames. Three-way merge manifests and config (`package.json`, tsconfig), never one whole side. ## Reviews and waits -Use [`review-loop`](../review-loop/SKILL.md) or the repository's review workflow for the request format and reviewer identity. When review requests go through a chat channel, discover a connected integration that posts as the human before declaring the channel unavailable. - -Reuse an outstanding review request rather than spamming. A standing team review request is not evidence that the review bot is reviewing the current changes. Track the actual ask and verdict; keep human-review requests separate. - -Prefer host watches over polling loops. Stop watches when handing work back or when the user says the stack is done. A queued notification after that is not a reason to reopen the task or request more reviews. +- Use the installed review skill for message format and reviewer identity. Before declaring Slack unavailable, check for a connected integration that posts as the human, Executor included. +- Reuse an outstanding review request. A standing GitHub team request isn't evidence the review bot is reviewing the current changes: track the actual ask and verdict, separately from human-review requests. +- Wait on host PR notifications, not sleeps or polling, and fix what's actionable meanwhile. Stop watches when handing back or when the user calls the stack done; a later queued notification doesn't reopen the task. ## Done -Green means the stack's parent relationships are correct, all open layers are mergeable, required checks are satisfied, and repository-required approvals and blocking review threads are addressed. Existing approvals count when the repository still accepts them; there is no extra latest-head approval gate. +Green means correct parent relationships, every open layer mergeable, required checks satisfied, required approvals and blocking threads addressed. Existing approvals count if the repo accepts them; add no latest-head approval gate. -Report **Green** or **Not green**, with a compact per-layer summary that gives every PR's full URL of remaining blockers and any optional failures or unverified behavior. Include the fixes and verification that matter, and state that nothing was queued or merged. When blocked on a human or unavailable service, name that blocker rather than continuing an unproductive loop. +Report **Green** or **Not green** with a per-layer summary: each PR's full URL, remaining blockers, optional failures, unverified behavior, the fixes and verification that matter, and that nothing was queued or merged. When blocked on a human or an unavailable service, name it and stop looping. diff --git a/skills/holistic-sweep/SKILL.md b/skills/holistic-sweep/SKILL.md index 9cd7021..270d2b0 100644 --- a/skills/holistic-sweep/SKILL.md +++ b/skills/holistic-sweep/SKILL.md @@ -1,64 +1,43 @@ --- name: holistic-sweep -description: "Run a repo-wide consistency sweep (design-system bypasses, design tokens, animation, SSR, lint debt, dead code) as an orchestrator session: an exhaustive grep-first inventory saved as an attachment, a proposed PR split, one Ship With Proof child session per PR, a rescan for leftovers, and a lint guard that stops the class from coming back. Use when asked to 'do a sweep', 'do a holistic audit', 'audit the whole repo for X', 'plan a child session sweep', or after a code scan whose findings need fixing across many files." +description: "Run a repo-wide consistency sweep (design-system bypasses, tokens, animation, SSR, lint debt, dead code) as an orchestrator: exhaustive grep-first inventory as an attachment, proposed PR split, one Ship With Proof child per PR, leftover rescan, and a lint guard. Use for 'do a sweep', 'do a holistic audit', 'audit the whole repo for X', 'plan a child session sweep', or a code scan whose findings span many files." metadata: - version: 1.0.0 + version: 1.3.1 --- -# Holistic Sweep +# Holistic sweep -A sweep fixes one class of problem everywhere it occurs, not just the instance someone noticed. This session is the orchestrator: it owns the inventory, the split, the child sessions, and the final rescan. It does not write the fixes itself. +Fix one class of problem everywhere, not the reported instance. This session orchestrates (inventory, split, children, rescan) and writes no fixes. Below the caller mode's delegation threshold (e.g. [**solar-mode**](../solar-mode/SKILL.md) `## Delegation`) it writes every fix itself instead, rescan leftovers included, one Ship With Proof PR per PR in the split, skipping steps 5 and 6; the `Not converted` section, inventory, split, rescan, and lint guard still apply. -## How to start one +Principles: -A kickoff looks like this. Accept any subset, and fill in the rest from this skill. - -``` -/scan (or "Help me set up a code scan") - -@skills:principle-fix-root-causes @skills:principle-redesign-from-first-principles @skills:principle-build-the-lever -Do a holistic audit and inventory every instance. Propose a split. One child session per PR, each with @skills:ship-with-proof. -``` - -The three principles each set a rule for the sweep: - -- [**principle-fix-root-causes**](../principle-fix-root-causes/SKILL.md): fix the pattern, not the instance. One bug report becomes a search for every site that has the same pattern. -- [**principle-redesign-from-first-principles**](../principle-redesign-from-first-principles/SKILL.md): move each site to the primitive the system would have used from day one, and delete the local copy or legacy wrapper (for example local `Badge`/`Pill`/`Chip` components or pre-DS form-field wrappers). Restyling the duplicate does not count. -- [**principle-build-the-lever**](../principle-build-the-lever/SKILL.md): the inventory comes from a rerunnable scanner script, not a hand read. Fixes use codemods where the change is mechanical, and the sweep ends with a lint rule. +- [**principle-fix-root-causes**](../principle-fix-root-causes/SKILL.md): one report becomes a search for every site. +- [**principle-redesign-from-first-principles**](../principle-redesign-from-first-principles/SKILL.md): move each site to the primitive and delete the local copy or legacy wrapper (local `Badge`/`Pill`/`Chip`, pre-DS form-field wrappers); never restyle the duplicate. +- [**principle-build-the-lever**](../principle-build-the-lever/SKILL.md): rerunnable scanner script, codemods for mechanical changes, a lint rule at the end. ## Procedure -1. **Scope and scan.** Write down the target class in one sentence and list every concrete signal for it (for a DS sweep: each raw `