diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 11cbbd7..dfcc3df 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 with: repository: cursor/plugins - ref: f5bdd6826fd0a0d9cbc4347134c3a74a200b9d9d + ref: 2cbf58508f40de470d7490b55c51d71241928fa2 path: .upstream/cursor-plugins sparse-checkout: pstack - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 diff --git a/README.md b/README.md index 0862234..86cb4fc 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ claude plugin install mstack@mstack Plugin skills are namespaced, for example `/mstack:meta-mode`, and the agents appear as `mstack:meta-agent` and `mstack:comment-reviewer`. Run `claude plugin details mstack` to see the inventory and its projected token -cost; the 50 skill descriptions add about 3,000 tokens to every session. +cost; the 53 skill descriptions add about 3,100 tokens to every session. `claude plugin marketplace update mstack` picks up new releases, because the plugin `version` tracks the npm version. @@ -420,7 +420,7 @@ target directory and restores backups if a commit fails. ## Included skills -The current bundle contains 50 skills. It includes the 47 entries in the +The current bundle contains 53 skills. It includes the 50 entries in the portable pstack tree and three skills adapted from `mattpocock/skills`: - Engineering principles for boundaries, domain modelling, idempotence, @@ -431,6 +431,8 @@ portable pstack tree and three skills adapted from `mattpocock/skills`: workflow. - `meta-mode` for routing a multi-step task through the capabilities available in the current harness. +- `benchmark-checklist` and `correct` for vetting a measured number and for + fixing repeated agent mistakes at the repository level. The bundle includes the pstack workflow and principle names. `meta-mode` is the portable replacement for pstack's `poteto-mode`; it describes capabilities and @@ -465,7 +467,7 @@ To check the complete skill trees against both pinned upstreams, run: npm run skill-baseline -- --check --source /path/to/pstack --matt-source /path/to/mattpocock-skills ``` -This checks every file in all 50 skill trees, including references, playbooks, +This checks every file in all 53 skill trees, including references, playbooks, and scripts. It also checks tools moved out of skill directories. Local additions and intentional upstream omissions are recorded explicitly. Both source checkouts must be clean and at their pinned commits. `npm test` checks diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index e4cff5b..09ab580 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -5,7 +5,7 @@ The skills in this repository are adapted from the `pstack` plugin in [`cursor/plugins`](https://github.com/cursor/plugins/tree/main/pstack/skills), with the current complete snapshot pinned at commit -[`7366ac128bdf95f45e6734f412b49a4031800169`](https://github.com/cursor/plugins/commit/7366ac128bdf95f45e6734f412b49a4031800169). +[`2cbf58508f40de470d7490b55c51d71241928fa2`](https://github.com/cursor/plugins/commit/2cbf58508f40de470d7490b55c51d71241928fa2). The first port of selected skills was pinned at commit [`799151d91b6e12ee7dbd09f708eec108d7de9b3b`](https://github.com/cursor/plugins/commit/799151d91b6e12ee7dbd09f708eec108d7de9b3b). @@ -32,10 +32,11 @@ Adapted upstream skill names: - `principle-build-the-lever` The bundle also includes these principles from the current upstream tree, pinned -at commit [`7366ac128bdf95f45e6734f412b49a4031800169`](https://github.com/cursor/plugins/commit/7366ac128bdf95f45e6734f412b49a4031800169): +at commit [`2cbf58508f40de470d7490b55c51d71241928fa2`](https://github.com/cursor/plugins/commit/2cbf58508f40de470d7490b55c51d71241928fa2): - `principle-attack-the-premise` - `principle-encode-lessons-in-structure` +- `principle-explain-the-number` - `principle-exhaust-the-design-space` - `principle-experience-first` - `principle-foundational-thinking` @@ -54,7 +55,7 @@ Cursor-only commands or paths. The remaining pstack workflow skills are included under their original names. The portable bundle renames `poteto-mode` to `meta-mode` and `poteto-agent` to -`meta-agent`. The source inventory is recorded in `profiles/skills.json`. +`meta-agent`. The `poteto-help` skill is not included. The source inventory is recorded in `profiles/skills.json`. Source commits and renames are recorded in `profiles/upstreams.json`. The non-skill upstream artifacts are retained as follows: diff --git a/agents/meta-agent.md b/agents/meta-agent.md index 4182e2f..10049f2 100644 --- a/agents/meta-agent.md +++ b/agents/meta-agent.md @@ -1,6 +1,6 @@ --- name: meta-agent -description: Routing target for `/meta-mode` and requests for the mstack workflow. Resume an existing `meta-agent` for the conversation rather than spawning a sibling. Read the `meta-mode` skill's `SKILL.md` in full before any work, including its playbook map. +description: Routing target for `/meta-mode` and requests for the mstack workflow. Spawn a fresh `meta-agent` for each new task, and resume one only when the new work needs state that lives in that agent, such as its local checkout, its uncommitted changes, or a process it still runs, as meta-mode's Subagents section lists. Read the `meta-mode` skill's `SKILL.md` in full before any work, including its playbook map. --- # Meta subagent diff --git a/docs/guide/01-setup.md b/docs/guide/01-setup.md index fa40e47..86c417f 100644 --- a/docs/guide/01-setup.md +++ b/docs/guide/01-setup.md @@ -21,7 +21,7 @@ Run: /setup-mstack ``` -[`/setup-mstack`](../../skills/setup-mstack/SKILL.md) detects the models you have access to, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `~/.config/mstack/models.json`, the portable configuration every mstack skill reads. +[`/setup-mstack`](../../skills/setup-mstack/SKILL.md) detects the models you have access to, asks for a reasoning budget, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `~/.config/mstack/models.json`, the portable configuration every mstack skill reads. You only override what you care about. To restore a role to the parent chat model, set it to `inherit-parent` or run `/setup-mstack` again. Setup preserves other choices and Harness overrides. @@ -33,10 +33,21 @@ At the end of setup, `/setup-mstack` looks for a shared verification contract, a If it finds neither a reusable verification workflow nor a repository driver, setup offers once to run [`/create-verification-skill`](../../skills/create-verification-skill/SKILL.md). When you accept, the generator writes `.harness/verify//contract.md`, its feature map, and thin discovery wrappers. It proves one feature in the real app before handing over the result. Model setup alone does not start the app or create a team policy. -You can run `/create-verification-skill` yourself any time. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers the proof. For a team using both native pstack and mstack, follow [the mixed-Harness adoption guide](./11-mixed-harness.md) to add the shared project workflow and CI checks. +Say no and setup moves on. You can run `/create-verification-skill` yourself any time. [Verify and ship](./06-verify-and-ship.md#create-a-project-verification-skill) covers the proof. For a team using both native pstack and mstack, follow [the mixed-Harness adoption guide](./11-mixed-harness.md) to add the shared project workflow and CI checks. + +If you're new to mstack, say yes. An agent that can check its own work keeps going until the check passes. An agent that can't hands every result back to you to check by hand. Of everything in this guide, the verification skill pays off the most. After setup, start a new session. The model configuration applies to new sessions. +## Keep the cost in check + +mstack spends extra tokens on subagents and review panels. That's the price of the rigor. To spend fewer: + +- Rerun `/setup-mstack` and pick a smaller reasoning budget or cheaper models. A strong model in the main chat with cheaper, faster models in the code roles is a good split. +- Set a role to `inherit-parent` so it runs on the chat's own model. +- Shorten a panel list. Each entry runs one subagent. +- Save `/meta-mode` for work that needs rigor. A small, obvious edit doesn't. + ## Run your first task Pick something real but small, and describe it the way you'd describe it to a colleague: @@ -47,6 +58,6 @@ Pick something real but small, and describe it the way you'd describe it to a co Watch the todo list. Its first items are the matched playbook's steps copied in, the Feature playbook for this prompt. If `/meta-mode` skips a step, the step stays in the list with `skip: `, so you can see what it chose not to do. -From here you can type normal follow-ups. `/meta-mode` is sticky. It stays on for the conversation until you opt out by saying so. +From here you can type normal follow-ups. `/meta-mode` stays active for the current task and fades as the chat moves on. When it fades, start the next task with `/meta-mode`, or pin it for the whole chat if your Harness can pin a skill or mode. Mid-chat, "new task" makes it match a fresh playbook. Next: [Route work through `/meta-mode`](./02-meta-mode.md). diff --git a/docs/guide/02-meta-mode.md b/docs/guide/02-meta-mode.md index a538838..13f3838 100644 --- a/docs/guide/02-meta-mode.md +++ b/docs/guide/02-meta-mode.md @@ -37,6 +37,37 @@ You don't write a spec. You say what's wrong or what you want, plus anything you That's a Bug fix prompt. "repro first" is a real constraint, not politeness, and the playbook honors it. Watch the todo list fill with the Bug fix steps. A skipped step stays visible with `skip: `. +## What goes in a prompt + +A useful prompt carries up to five things, and each one fits in a sentence: + +- **The goal.** Say what's wrong, or what you want. +- **The done check.** It must be able to pass or fail. "Make it better" and "work on it for an hour" aren't checks. +- **The proof you want to see.** Ask for the real command output, a video of the flow, the stored value, or a before-and-after number. +- **What you already know.** A symptom, a repro step, a log line, or a link saves the agent a search. +- **The real constraints.** "repro first", "don't change any code yet", "zero behavior change", and "let me review before proceeding" each change what the agent does. + +Here's one prompt with all five: + +```text +/meta-mode the csv export drops its last row since yesterday's deploy. failing job id is 4812. repro first, then fix. done means the 60k-row fixture exports every row. show me the row counts before and after. +``` + +Two things are worth leaving out: + +- **The how.** Say what to achieve, and leave the agent room to find a better path than the one you'd pick. The same goes for a list of skills, covered in the pitfall below. +- **Your theory of the cause, at first.** A stated guess narrows the search to wherever you pointed. Let the agent restate the problem before you share your hunch. + +For a noisy report, such as a long thread or a vague bug, make the restatement the first step: + +```text +/meta-mode read this thread. restate the underlying issue in your own words, in plain english. don't change any code yet. +``` + +A misreading shows up in the restatement, before any code exists. Correct it there, and it costs you one message instead of one wrong fix. + +## Follow up short + When the conversation already carries the context, the prompt shrinks to almost nothing. All of these are enough: ```text @@ -51,7 +82,7 @@ continue keep going until done ``` -Short works because the mode is sticky and the playbook holds the structure. Your words carry the intent, and the skill carries the rigor. +Short works because the playbook holds the structure, and `/meta-mode` stays active for the current task. [Set up mstack](./01-setup.md#run-your-first-task) says what to do when it fades. Your words carry the intent, and the skill carries the rigor. ## Switch tasks with "new task" @@ -63,15 +94,17 @@ A long chat accumulates context from the last task. When you change subjects, sa "new task" tells `/meta-mode` to re-match rather than continue the prior playbook. "don't change any code yet" pins this one to Investigation. Without those two phrases, a mode mid-Feature tends to treat your question as the next feature step. -## Give parallel work its own worktree +## Give parallel work its own machine + +If you run several agents against one repository on one computer, they will fight over the working tree, the ports, and the build output. The cleanest isolation is a worker on its own machine or remote environment, when the active Harness offers one. Each gets its own branch, so it can install dependencies, run your app, and record the result without touching your machine. Ask the parent chat to hand the work to remote workers. -If you run several agents against one repository, they will fight over the working tree. Ask for isolation up front: +When the work has to stay local, ask for a worktree up front: ```text /meta-mode new task. branch off in a fresh worktree, then port the parser change there. ``` -Each task in its own branch and worktree means no agent stomps another's files. The [Opening a PR playbook](../../skills/meta-mode/playbooks/opening-a-pr.md) already works from a worktree for code changes, so mostly you only say this when a specific base or location matters. +Each task in its own branch and worktree means no agent stomps another's files. Worktrees cost disk and machine resources, so a laptop runs only a handful at once. The [Opening a PR playbook](../../skills/meta-mode/playbooks/opening-a-pr.md) already works from a worktree for code changes, so mostly you only say this when a specific base or location matters. Worktrees accumulate. When disk gets tight, ask: diff --git a/docs/guide/03-understand.md b/docs/guide/03-understand.md index f009465..49e8506 100644 --- a/docs/guide/03-understand.md +++ b/docs/guide/03-understand.md @@ -1,9 +1,21 @@ # Understand the code before changing it -Editing code you don't understand is how subtle regressions ship. mstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic. +Editing code you don't understand is how subtle regressions ship, and that's as true for the agent as for you. Agents usually fail in one of two ways. They misread what you want, or they don't have the context to do the work right. [What goes in a prompt](./02-meta-mode.md#what-goes-in-a-prompt) handles the first. This page handles the second. + +mstack gives you four ways in. `/how` explains what the code does now. `/why` digs up the reasons it's shaped that way. `/teach` blends both into one explanation. `/recall` rebuilds your own recent context on a topic. Each one also makes the agent explain itself in words you can check. That's how you supervise an agent that may know the code better than you do. ![A detective studies a machine blueprint with a magnifying glass while robots fetch case files; the evidence board behind her links clues under /how and /why.](./images/understanding.jpg) +## Start with a read-only investigation + +When the cause is unclear, ask for findings, not a fix: + +```text +/meta-mode investigate why background jobs time out every few hours. give me what we know, what data you used, and your best hypotheses. don't change any code yet. +``` + +"don't change any code yet" routes this to the [Investigation playbook](../../skills/meta-mode/playbooks/investigation.md). It runs `/how`, adds `/why` for questions about motivation, and returns a cited explanation. For a choice between options, it returns a recommendation with a trade-offs table. Asking "what data you used" makes the agent separate its evidence from its guesses. When the findings point at a fix, start the fix as a new task. + ## Trace behavior with `/how` ```text @@ -30,13 +42,27 @@ The two compose naturally. `do why first then how` is a perfectly good prompt wh [`/teach`](../../skills/teach/SKILL.md) is for when a summary isn't enough. It runs `/how` and `/why`, for a small change maybe just one of them, and weaves the findings into a plain explanation that builds up diagram by diagram. The "convince me" framing is worth stealing. It turns the explanation into an argument you can poke at instead of a tour. +It works on the agent's own choices too: + +```text +/teach me why you implemented it this way and not with a queue. what did you trade off, and why? +``` + +Teaching helps the agent as much as you. An agent that has to explain its work must read the code and back each claim with evidence, instead of stating it confidently and moving on. + ## Rebuild your own context with `/recall` ```text /recall catch me up on the export work from last week ``` -[`/recall`](../../skills/recall/SKILL.md) mines your own recent chats plus the shared record (issues, prior fixes, errors still firing) and hands back a brief on where things stand and what's next. Use it when you're returning to a topic cold. If you want to resume one specific chat, that's the Session pickup playbook below, not `/recall`. +[`/recall`](../../skills/recall/SKILL.md) mines your own recent chats plus the shared record (issues, prior fixes, errors still firing) and hands back a brief on where things stand and what's next. Your old chats hold context that a fresh agent lacks, so start new work on an old topic by loading it first, then hand over the new input: + +```text +/recall my work on the virtualized list from yesterday, then read this bug report. +``` + +If you want to resume one specific chat, that's the Session pickup playbook below, not `/recall`. ## Take over prior work with Session pickup diff --git a/docs/guide/04-design.md b/docs/guide/04-design.md index 8af310c..af4e252 100644 --- a/docs/guide/04-design.md +++ b/docs/guide/04-design.md @@ -2,6 +2,8 @@ One attempt at a hard design locks in the first shape the model thought of. `/architect` settles types and boundaries before implementation. `/arena` runs several attempts at the same brief and merges the best parts. `/interrogate` has other models try to break the result. When the job is coverage rather than design synthesis, `/swarm` fans out slices or races and aggregates their results. +The two most common design mistakes are taking the agent's first design and polishing a plan that no code has tested. This page fixes both. You plan through code: prototypes answer the open questions, a README or tutorial sets the target, and the written plan comes last. + ![Three robots draft competing bridge models at their own tables under /architect, /arena, and /interrogate panels, while a judge robot with a clipboard inspects skeptically.](./images/design.jpg) ## Settle the shape with `/architect` @@ -18,6 +20,8 @@ By default it proceeds straight from the synthesized design into implementation. /architect with checkpoint. stop and show me before implementing. ``` +The design isn't sacred once code starts. If implementation shows the same workaround in unrelated places, or types that only compile with `any` or forced casts, `/architect` treats that as proof the design is wrong. It scraps the sketch and starts over instead of patching around it. + ## Fan out attempts with `/arena` ```text @@ -66,6 +70,52 @@ Reach for it when parallelism buys coverage or lets independent checks race. `/a Read the dismissals too. The lead is a pragmatic senior engineer, not an oracle, and you can override it. +## Prototype instead of debating + +Never take the first design. Ask for a few, and pick from evidence you can see: + +```text +/meta-mode prototype a few options for the new dropdown menu. take screenshots or videos for me to compare. +``` + +The [Prototype playbook](../../skills/meta-mode/playbooks/prototype.md) builds throwaway sketches in a scratch directory, puts the variants behind one switcher, drives each one, and captures screenshots or timings. It also works for behavior and algorithms, not just UI. Prototypes are planning with code. They let the agent answer its own open questions by running something instead of asking you, and they leave room for an option you wouldn't have thought of. + +The same idea scales up to a real design. Pair `/architect` with prototypes and keep a review gate: + +```text +/meta-mode we need rate limiting for external webhooks. /architect it first, and answer open questions with prototypes. let me review before proceeding. +``` + +Don't spend reviewers on an abstract plan. `/interrogate` belongs on a diff. Point adversarial review at a plan with no code behind it and the reviewers invent theoretical risks and edge cases that will never happen. Let prototypes settle the questions, then review what got built. + +## Write the README first for shared code + +For a package or API that other code will use, start with the doc a user would read: + +```text +/meta-mode write a tutorial for how i would use the new config package first. then /teach me why it beats the current one. +``` + +Writing the tutorial first forces the caller's view. You describe the API to a hypothetical user and work back to the implementation. The doc also becomes a concrete target the agent checks its own work against. Name [`/technical-writing`](../../skills/technical-writing/SKILL.md) when the doc itself matters, so a tutorial stays a tutorial instead of drifting into reference and explanation at once. + +## Plan after the design settles + +mstack has no planning skill, on purpose. When you do want a written plan, ask for it once the design is settled: + +```text +/meta-mode turn this design into a plan. small verifiable PRs, each with its own verification steps. +``` + +The [Multi-phase plan playbook](../../skills/meta-mode/playbooks/multi-phase-plan.md) settles any remaining open questions by prototype, then writes one section per PR, each ending in proof that the change works. A passing test suite alone doesn't count as that proof. The plan is the deliverable. The playbook doesn't implement it, and it names which execution playbook should run it next. + +For a migration, state the bar in the prompt: + +```text +/meta-mode plan the migration of our ui library to the new styling system. small verifiable PRs, each with visual regression checks. the result must match the original exactly, bugs included. +``` + +"bugs included" keeps the migration from quietly fixing things on the way, which would make the old and new output impossible to compare. For a project that spans many days, you can commit the plan to the repo for a while so other agents see the work in progress. Delete it when the work lands. + ## How much design work does a task deserve? You might be wondering whether every change needs this. No. Most changes need none of it. A rough ladder: @@ -74,7 +124,9 @@ You might be wondering whether every change needs this. No. Most changes need no - A change that crosses function boundaries or moves ownership earns `/architect`, which brings `/arena` with it. - A standalone decision where independent attempts would help, like naming, formats, or an algorithm, is `/arena` directly. - A coverage matrix, set of parallel checks, or race with declared arms is `/swarm`. +- An open question you could answer by running something, like a layout, a timing, or an approach, gets a prototype, not a debate. - A contested design that's expensive to reverse gets `/architect`, then `/interrogate` before shipping. +- Work that spans several PRs gets a plan, written after the design settles. `/meta-mode` already applies this ladder. Boundary-crossing work triggers `/architect` on its own, so you reach for these directly mainly when you want more or less scrutiny than the default. diff --git a/docs/guide/05-build-and-clean.md b/docs/guide/05-build-and-clean.md index 3584869..05551e2 100644 --- a/docs/guide/05-build-and-clean.md +++ b/docs/guide/05-build-and-clean.md @@ -32,6 +32,14 @@ Each of these routes to its playbook ([Bug fix](../../skills/meta-mode/playbooks For sustained improvement of one number, there's the [Hillclimb playbook](../../skills/meta-mode/playbooks/hillclimb.md). Give it the metric, a target, and a floor on attempts, and it loops one hypothesis at a time with a frozen measurement harness. It keeps wins and reverts everything else. +Both perf playbooks run [`/benchmark-checklist`](../../skills/benchmark-checklist/SKILL.md) on their numbers. Perf issue vets its baseline and every number after it, and Hillclimb vets its harness before freezing it. [Verify and ship](./06-verify-and-ship.md#vet-a-measured-number-with-benchmark-checklist) shows when to type it yourself. + +Sometimes you want the cause before any fix. For a live symptom, such as a leak, an idle CPU spin, or a visual glitch, the [Runtime forensics playbook](../../skills/meta-mode/playbooks/runtime-forensics.md) instruments the running process. For a profile you already captured, the [Trace forensics playbook](../../skills/meta-mode/playbooks/trace-forensics.md) reads the artifact and maps the hot frame to source. Both return a diagnosis, not a fix: + +```text +/meta-mode here's a cpuprofile from the slow startup. tell me where the time goes and which source lines own it. no fix yet. +``` + ## Write the failing test first with `/tdd` When a bug has a cheap local test path, the whole prompt can be two words: diff --git a/docs/guide/06-verify-and-ship.md b/docs/guide/06-verify-and-ship.md index 457ea79..f9e407c 100644 --- a/docs/guide/06-verify-and-ship.md +++ b/docs/guide/06-verify-and-ship.md @@ -1,6 +1,8 @@ # Verify the result and open a PR -"It compiles" is not evidence. The [Prove It Works principle](../../skills/principle-prove-it-works/SKILL.md) makes the agent check the real artifact before it reports success, and your job is to make "the real artifact" checkable. This page covers stating a finish condition, generating a verification skill for your app, opening the PR, and driving it to merged. +"It compiles" is not evidence. The [Prove It Works principle](../../skills/principle-prove-it-works/SKILL.md) makes the agent check the real artifact before it reports success, and your job is to make "the real artifact" checkable. This page covers stating a finish condition, vetting a measured number, generating a verification skill for your app, opening the PR, and driving it to merged. + +Verification is the slowest step in most agent work, because it's the step that usually waits on a human. Make the agent able to do it, and you stop being the bottleneck. Skip it, and running more agents only gets you more unchecked work to review. ![A prototype plane flies a real test course while she times it with a stopwatch and robots film and checklist the run; the terminal reads verify: pass, evidence: captured.](./images/verification.jpg) @@ -17,13 +19,35 @@ Now the agent has three checks it can run, not a mood to satisfy. When the reply Match the check to the change: - A CLI change runs the real command. -- A UI change walks the changed flow in the running app. +- A UI change walks the changed flow in the running app. When it must match a reference pixel for pixel, the [Visual parity playbook](../../skills/meta-mode/playbooks/visual-parity.md) diffs screenshots against a frozen baseline instead of judging by eye. - A parser or migration replays a saved input. - A perf change compares before and after profiles. - A storage change reads back the written value. +Ask for the proof as an artifact you can inspect yourself: the failing test and then the passing one, a before-and-after video, the trace, the screenshot. If the fix already merged, ask for the same check again on main. An artifact beats a plausible explanation, because you can challenge it without replaying the whole run. + For a small diff you don't fully trust, [`/blast-radius`](../../skills/blast-radius/SKILL.md) finds what it could break elsewhere. It picks the one fact the change is safe because of and proves it by running code instead of writing an essay about it. +## Vet a measured number with `/benchmark-checklist` + +A before-and-after number is the easiest evidence to get wrong by accident. A warm cache, a debug build on one side, or work that never ran inside the timed region can each produce a convincing speedup. Before you report or act on a number, type: + +```text +/benchmark-checklist vet the export speedup before it goes in the pr +``` + +[`/benchmark-checklist`](../../skills/benchmark-checklist/SKILL.md) asks seven questions and wants evidence from a run for each: + +1. What limits the number, and why isn't it double? +2. Did every side run tuned the way production runs? +3. Does the result break a physical limit, like disk bandwidth or core count? +4. Did anything error or return wrong output? +5. Does it reproduce over alternating runs, with a median and a range? +6. Does it matter end to end, on the path a user waits on? +7. Did the work actually happen inside the timed region? + +The verdict comes back as faster, slower, no measurable difference, or inconclusive, with the run count, range, and limiter. It says inconclusive when it can't name the limiter or a side ran untuned. `/meta-mode` already runs the checklist inside the Perf issue and Hillclimb playbooks, so you type it yourself when you measured something outside them, or when someone else's number looks too good. It's the working form of the [Explain the Number principle](../../skills/principle-explain-the-number/SKILL.md). + ## Create a project verification skill The UI bullet above hides a real requirement. The agent needs a scripted way to drive your app. If your project has one, great. If not, run: @@ -40,11 +64,32 @@ The generator then renders thin `verify-` wrappers for the configured Harne Before handing over the result, the generator launches an isolated instance, runs Doctor, drives one feature, captures evidence, and cleans up. The evidence must survive cleanup. One successful feature does not prove every mapped path or every Harness. A missing required capability remains a reported gap. -A [`/swarm`](../../skills/swarm/SKILL.md) can split a full pass by feature-map entry. Give concurrent drivers separate instances, ports, and data directories. When the app cannot isolate them, keep one coordinator driving serially. +From then on, "verify it in the app" is a step any agent can execute, in this repo, with no setup conversation. Name it in the prompt when you want the proof in a specific form: + +```text +/meta-mode build the bulk-archive action. use /verify- to verify your changes and show me a video and screenshots as proof. +``` + +```text +/meta-mode repro this with /verify-. if it repros on main, fix it and show me a video as proof. +``` + +Once the verify skill works, a [`/swarm`](../../skills/swarm/SKILL.md) can split a full pass by feature-map entry and aggregate the results. Give concurrent drivers separate instances, ports, and data directories. When the app cannot isolate them, keep one coordinator driving serially. A swarm of verifiers also confirms a perf win over a big enough sample, or fuzzes the app for regressions before a PR ships. + +Treat the verification skill as infrastructure, not a one-off. Commit it, so every person and every agent on the team drives the app the same way. Then [build the lever](../../skills/principle-build-the-lever/SKILL.md). When agents keep writing throwaway scripts to click through the app, ask for a small control CLI that the skill calls instead. Agents spend fewer tokens, and every run becomes repeatable. A CLI that agents use well has these traits: + +- A few composable commands, each doing real work, rather than many thin ones. +- A `--dry-run` option on anything destructive. +- Subcommands that reveal features gradually instead of all at once. +- Error messages that say what to do instead. +- Rich `--help` text. +- Machine-readable output, such as JSON. + +While you're there, make the dev setup repeatable too: seeded data, test users, and one command that brings the environment up the same way every time. ## Keep the verification skill honest -Apps change and feature maps rot. When yours drifts, run: +Apps change and feature maps rot. Run this at least once a day, ideally from a scheduled automation so nobody has to remember: ```text /maintain-verification-skill diff --git a/docs/guide/07-overnight.md b/docs/guide/07-overnight.md index 1f304d9..b98d900 100644 --- a/docs/guide/07-overnight.md +++ b/docs/guide/07-overnight.md @@ -1,9 +1,20 @@ # Run work while you sleep -This is the payoff for everything before it. An agent you can trust to verify its own work is an agent you can leave alone with a hard task. What makes that safe isn't hope. It's a checkable finish condition, an isolated worktree, and a decision log you audit in the morning. +This is the payoff for everything before it. An agent you can trust to verify its own work is an agent you can leave alone with a hard task. What makes that safe isn't hope. It's a checkable finish condition, an isolated worktree or remote worker, and a decision log you audit in the morning. ![She waves goodnight from the door while robots keep the factory running, one updating a DECISION LOG wall board under a BUILD LOOP ACTIVE sign.](./images/overnight.jpg) +## Earn the trust before the loop + +A loop you don't trust just produces unchecked work faster, and the mess compounds with every iteration. Before you leave one running, check that it has earned it: + +- You've done the task once by hand, or watched an agent do it, so you know what good looks like. +- The agent has the tools and signals you'd use yourself: the verification skill, the profiler, the logs. +- Every stage proves its work and can stop the line when the work misses the bar. +- You've read a few transcripts and turned the repeated failures into tools, skills, or checks. + +Make the loop autonomous only after all four hold. Until then, run it while you watch. + ## The overnight contract A good handoff has the goal, the finish condition, permissions, and an escape hatch. It doesn't need to be long: @@ -26,6 +37,8 @@ Walk through what each line buys you: Because you'll review this work after stepping away, `/meta-mode` routes it through [`/figure-it-out`](../../skills/figure-it-out/SKILL.md), which designs the run's phases before any code and wires in the decision log. +To stop a run on purpose, tell the agent to pause, or that you're about to go offline or restart the Harness. The [Pause safely playbook](../../skills/meta-mode/playbooks/pause-safely.md) finishes or backs out of the current step, commits a work-in-progress checkpoint, and writes a resume note. A fresh chat picks the work up from that note through the Session pickup playbook. Saying "keep going" never triggers a pause. + ## What the loop does all night ```mermaid @@ -58,7 +71,7 @@ Before the skill hands back its summary, it spawns a reviewer on a different mod The contract above drives one task to one finish condition. Some nights hold more, a queue of independent changes or a whole program. Three playbooks scale the same trust up. -[Autopilot-full](../../skills/meta-mode/playbooks/autopilot-full.md) runs a queue of independent PRs to merged. Each PR gets one owner agent that carries it from build through merge, and no owner merges on its own verdict. A swarm of fresh verifiers checks every merge-ready head, and only a clean verdict authorizes the merge: +[Autopilot-full](../../skills/meta-mode/playbooks/autopilot-full.md) runs a queue of independent PRs to merged. Each PR gets one owner agent that carries it from build through merge, and no owner merges on its own verdict. A swarm of fresh verifiers starts a round at the owner's code-ready head and again at every later push that changes the patch. Only a clean verdict on the patch that merges authorizes the merge: ```text /meta-mode full autopilot on this queue. each item is independent. i want them merged by morning. @@ -76,6 +89,32 @@ The contract above drives one task to one finish condition. Some nights hold mor /meta-mode orchestrate the store migration. own it until every package is converted and merged. i'll check in twice a day. ``` +## Run many projects in parallel + +A coordinator agent with a persistent thread, such as a Harness project or a long-lived session, directs subagents and doesn't write code itself. When the Harness runs subagents remotely, the work continues when your laptop is closed. That's the shape the Orchestrate playbook expects. Start your prompts to the coordinator with `/meta-mode`, and the subagents it spawns follow the playbooks. + +A few habits help: + +- Give each body of work its own coordinator thread, such as a feature, a migration, a perf push, or a tech-debt cleanup. Several can run side by side. +- Point the coordinator at related finished chats and notes. They become context for every agent under it. +- Give each PR a verification swarm before it merges, and let Autopilot-stack or Autopilot-full carry the queue. +- Ask the coordinator for a plan backed by data, and have it answer open questions with prototypes before it asks you. + +One prompt can carry a whole program, from research through execution: + +```text +/meta-mode refactor this repo so its architecture is more agent friendly. use /correct and /architect on past commits and review comments to find the mistakes agents make most here. use /recall for context from past chats. answer open questions with prototypes instead of asking me. come back with a plan backed by real data. once i approve it, run it with autopilot-stack or autopilot-full, and ask me which. +``` + +## Let loops start themselves + +Every loop above still waits for you to start it. A scheduled or event-driven automation removes that step. Software maintenance splits into stages that suit this well: triage a report, reproduce it, fix it, verify the fix. Two rules keep such a line trustworthy: + +- Every stage can stop the line. Triage can decide the report is expected behavior, repro can fail to reproduce it, and the fixer can judge the change too risky. Each of those outcomes is useful, because it keeps bad work from reaching the next stage, where it costs more to undo. +- Every stage hands over evidence. Repro attaches screenshots and video of the broken state, and the fix attaches before-and-after proof. A human can then check that the agent fixed the right thing before reading a line of code. + +mstack ships this as a dormant [automation pack](../../automations/benny/README.md) for Slack issue reports. One automation triages each report. The other reproduces confirmed bugs and may prepare a small draft fix. Point an agent at its [`FOR_AGENTS.md`](../../automations/benny/FOR_AGENTS.md) and name the target repository to set it up. + **Pitfall:** a duration is not a finish condition. "work on this for 4 hours" gives the agent nothing to check, and you'll wake up to four hours of motion instead of a result. Give the loop a predicate that can pass or fail. Next: [Steer with principle names](./08-principles.md). diff --git a/docs/guide/08-principles.md b/docs/guide/08-principles.md index 9d4e918..03f9d5d 100644 --- a/docs/guide/08-principles.md +++ b/docs/guide/08-principles.md @@ -1,6 +1,6 @@ # Steer with principle names -mstack ships 23 principles as individual skills. `/meta-mode` reads their index at the start of every multi-step task, applies the ones the task triggers, and names each applied principle in its reply along with the decision it changed. +mstack ships 24 principles as individual skills. `/meta-mode` reads their index at the start of every multi-step task, applies the ones the task triggers, and names each applied principle in its reply along with the decision it changed. You don't invoke principles. You use their names to steer. Each name points at a complete rule the agent has already read, so one phrase redirects the work more precisely than a paragraph of instructions. @@ -26,7 +26,7 @@ separate before serializing shared state. give each attempt its own worktree, no Each phrase lands because the rule behind it is specific. The agent still has to say, in its reply, which decision the rule changed. A principle citation with no decision behind it is the tell that it name-dropped instead of applying. -## The 23, briefly +## The 24, briefly The core principles decide how much to build and when to rethink the design: @@ -39,7 +39,7 @@ The core principles decide how much to build and when to rethink the design: - [Outcome-Oriented Execution](../../skills/principle-outcome-oriented-execution/SKILL.md) converges rewrites on the target design instead of preserving throwaway compatibility states. - [Experience First](../../skills/principle-experience-first/SKILL.md) chooses the user's result over implementation convenience. - [Exhaust the Design Space](../../skills/principle-exhaust-the-design-space/SKILL.md) builds two or three competing prototypes when there's no precedent. -- [Build the Lever](../../skills/principle-build-the-lever/SKILL.md) builds the script that does or proves the work, so a reviewer can rerun it. +- [Build the Lever](../../skills/principle-build-the-lever/SKILL.md) builds the script that does or proves the work, so a reviewer can rerun it. When an agent keeps doing the same thing by hand, have it write the tool or skill it wishes it had. If a script can do a step the same way every time, use the script, and save agents for the judgment calls. The architecture principles decide where state, validation, and compatibility live: @@ -56,6 +56,7 @@ The verification principles define what counts as proof: - [Fix Root Causes](../../skills/principle-fix-root-causes/SKILL.md) reproduces and traces to the cause before changing code. - [Sequence Work into Verifiable Units](../../skills/principle-sequence-verifiable-units/SKILL.md) ends each small unit in a check before starting the next. - [Test Behavior, Not Implementation](../../skills/principle-test-behavior-not-implementation/SKILL.md) calls the code the way its users do and asserts a literal expected value, and deletes a test that would still pass if every imported function returned `undefined`. +- [Explain the Number](../../skills/principle-explain-the-number/SKILL.md) names what limits a measured number and rules out that it measured something else, before anyone trusts or reports it. [`/benchmark-checklist`](../../skills/benchmark-checklist/SKILL.md) turns it into seven questions you answer from real runs. The delegation principles keep parallel work sane: @@ -64,7 +65,7 @@ The delegation principles keep parallel work sane: And one meta principle: -- [Encode Lessons in Structure](../../skills/principle-encode-lessons-in-structure/SKILL.md) turns advice you've repeated twice into a lint, check, or script. +- [Encode Lessons in Structure](../../skills/principle-encode-lessons-in-structure/SKILL.md) turns advice you've repeated twice into a lint, check, or script. [`/correct`](../../skills/correct/SKILL.md) applies it to a whole repo, as shown in [Make it yours](./09-make-it-yours.md#fix-the-environment-with-correct). Don't memorize the list. Skim it now, then come back when you catch the agent doing something a name here would have prevented. That's how the vocabulary sticks. diff --git a/docs/guide/09-make-it-yours.md b/docs/guide/09-make-it-yours.md index 5d4ebea..26b7ee9 100644 --- a/docs/guide/09-make-it-yours.md +++ b/docs/guide/09-make-it-yours.md @@ -1,6 +1,8 @@ # Make it yours -meta-mode is one person's style. The machinery underneath, playbooks, routing, model roles, works just as well wearing yours. This page covers generating a personal mode, capturing lessons from a session, authoring a focused skill, and testing a skill change before you trust it. +meta-mode is one person's style. The machinery underneath, playbooks, routing, model roles, works just as well wearing yours. This page covers generating a personal mode, capturing lessons from a session, fixing the repo so agents stop repeating mistakes, authoring a focused skill, and testing a skill change before you trust it. + +Start smaller than you think. You don't need many skills on day one, or even this whole plugin. Prompt plainly, watch where agents fail, and add a skill or a check when the same failure shows up twice. ## Generate your own mode with `/automate-me` @@ -28,6 +30,25 @@ Right after a task that taught you something, run: [`/reflect`](../../skills/reflect/SKILL.md) sends the transcript to three parallel reviewers, then a synthesizer sorts the proposals into `Accepted`, `Rejected`, and `Backlog` and waits for your approval before any skill changes. Approve a proposal only if it would change a future decision. One weird session is an anecdote, not a rule. +## Fix the environment with `/correct` + +When you correct agents for the same mistake again and again, the fix belongs in the repo, not in your next prompt. Rank the options by how well they hold: + +1. Make the mistake impossible with architecture or a better data structure. +2. Block it with types, or with a lint or CI check whose error names the fix. +3. Catch it with a test. +4. Write it down as a doc or agent rule. Nothing fails when an agent skips a rule, so this comes last. + +Human review isn't on the list. A reviewer who must catch the same mistake on every PR is the problem this fixes. [`/correct`](../../skills/correct/SKILL.md) does the work: + +```text +/correct agents keep calling the database client directly instead of going through the repository layer +``` + +It reads recent commits, reverts, review comments, and comments that explain workarounds, then groups the mistakes into classes. A class counts once it has happened twice. It fixes the most frequent classes one commit each, at the highest level that works, and proves each new check fails on a real past mistake. It also keeps a table in the agent instruction file that pairs each rule with what enforces it, so a rule that nothing enforces shows up as a repeat. The reply lists each class with its evidence, the level chosen, and why a higher level didn't work. + +Run it with no argument and it finds the classes from history on its own. `/reflect` and `/correct` split the work. `/reflect` improves skills from one session. `/correct` changes the repo so a mistake class can't come back. Pair it with `/architect` when the fix is a new boundary. [Run many projects in parallel](./07-overnight.md#run-many-projects-in-parallel) has a prompt that does both across a whole repo. + ## Author a focused skill When you already know the workflow you want to capture: @@ -52,16 +73,28 @@ Skills aren't the only prose you ship. For docs, RFCs, readmes, PR descriptions, ## Test a skill change blind -A skill edit affects every future session, so test it like the experiment it is: +A skill edit affects every future session, so test it like the experiment it is. The same goes for adopting someone else's skill. Check that it makes the agent better on your work before you keep it. ```text /meta-mode run the eval playbook on this skill change. same task for both variants, candidates stay blind. ``` +When a skill keeps missing and you know what it should do, change and test it in one task: + +```text +/meta-mode update the review skill so it flags missing migrations, and eval the change. +``` + +Asking for the eval up front keeps the edit honest. A fix written from one bad session tends to overfit that session, and over many edits the skill drifts. The eval catches the drift before it ships. + The [Eval playbook](../../skills/meta-mode/playbooks/eval.md) is built around one failure mode, the observer effect. An agent that knows it's being evaluated behaves differently. So candidate agents get an organic-looking task in sanitized directories, never the words "eval" or "candidate", and never each other's existence. One judge scores all outputs under neutral labels, and chain-following gets graded from which files each candidate actually read, not from what it claims. Read every output yourself before accepting the verdict. If you disagree with the judge, suspect the rubric before you suspect your judgment. +## Build a bot UI with `/make-bot-ui` + +One situational skill is for Grok Bot users. [`/make-bot-ui`](../../skills/make-bot-ui/SKILL.md) builds a small page whose buttons wake a bot over a webhook routine. For example, you could swipe through a review queue and have each swipe ask the bot to act on that item. A server on your machine holds the webhook's sender key, so the key never reaches the browser or the chat. The skill also covers exposing the page on Tailscale. + **Pitfall:** don't edit a skill mid-task because it's misbehaving. Fix it in its own PR and keep the task moving. A skill edit that ships tangled into feature work is invisible to review and impossible to evaluate. Next: [Recipes and pitfalls](./10-recipes-and-pitfalls.md). diff --git a/docs/guide/10-recipes-and-pitfalls.md b/docs/guide/10-recipes-and-pitfalls.md index 6477791..685a65d 100644 --- a/docs/guide/10-recipes-and-pitfalls.md +++ b/docs/guide/10-recipes-and-pitfalls.md @@ -12,6 +12,30 @@ use /how first to understand how this initialization works. then use /why to fig Mechanics first, history second. Each skill's report tells you which sources it searched, so you know what the answer is grounded in. +## Restate a noisy report before touching code + +```text +/meta-mode read this thread. restate the underlying issue in your own words, in plain english. don't change any code yet. +``` + +A misreading shows up in the restatement, where it costs one message to correct. Keep your own theory to yourself until the agent has stated its own. + +## Prototype before you pick + +```text +/meta-mode prototype a few options for the settings layout. put them behind a switcher and send me screenshots of each. +``` + +You pick from things that run, not from descriptions. The agent answers its own layout and timing questions along the way. + +## Turn a settled design into a plan + +```text +/meta-mode turn this design into a plan. small verifiable PRs, each with its own proof. +``` + +Ask only after the design settles. The plan is the deliverable, and it names the playbook that will execute it. + ## Get a second opinion on a design ```text @@ -44,6 +68,30 @@ The qualifiers do real work. "don't change anything yet" keeps it read-only, and "if there's a cheap test path" matters. Forcing a test through brittle mocks proves less than running the real command, and the playbook is allowed to say so. +## Repro and fix a report with proof + +```text +/meta-mode repro this with /verify-. if it repros on main, fix it and show me a video as proof. +``` + +"if it repros on main" lets the run stop early when the bug is already gone. The video lets you check the fix before you read the diff. + +## Vet a number before you post it + +```text +/benchmark-checklist vet this 40% speedup before it goes in the pr description +``` + +You get faster, slower, no measurable difference, or inconclusive, with the run count, the range, and what limits the number. + +## Stop correcting the same mistake + +```text +/correct agents keep adding new config flags without registering them in the schema +``` + +The fix lands in the repo as architecture, a type, a lint, or a test, so the next agent can't make the mistake. + ## Keep a run honest while you're away ```text @@ -82,7 +130,13 @@ That's the whole prompt. [`/bro`](../../skills/bro/SKILL.md) restates the last m - **Enumerating skills in the prompt.** "use /how then /architect then /arena" reorders steps the playbook already sequences. State the goal and constraints. Name a skill only to override a default. - **A vague finish condition.** "make it better" gives `/loop` nothing to check. Give a command or artifact that can pass or fail. -- **Parallel agents in one worktree.** They overwrite each other and the diff becomes archaeology. Say "own worktree per attempt" and the isolation is free. +- **Leading with your theory of the cause.** The agent searches wherever you pointed. Ask it to restate the problem first, then share your hunch. +- **Taking the first design.** One attempt locks in the first shape the model thought of. Ask for prototypes or `/architect` and pick from evidence. +- **Polishing an abstract plan.** Adversarial review of a plan with no code behind it invents risks that will never happen. Settle the open questions with prototypes, then review what got built. +- **Parallel agents in one worktree.** They overwrite each other and the diff becomes archaeology. Run them on separate machines, or say "own worktree per attempt". +- **Looping before you trust the loop.** A loop that can't verify its own work only makes unchecked work faster. Get the verification skill working first. +- **Trusting an unvetted number.** A warm cache or a skipped code path can fake a speedup. Run `/benchmark-checklist` before the number goes anywhere. +- **Correcting the same mistake by hand.** A correction in chat helps one run. `/correct` fixes the repo so no later run repeats it. - **Using `/arena` for coverage.** `/arena` repeats one design or code brief, then picks a base and grafts the best parts. `/swarm` partitions slices or declared race arms and aggregates one report. - **Accepting every review comment.** Bots and humans both file real catches and noise in one list. `/interrogate` sorts findings into act-on and dismissed buckets with reasons, and you can override either way. - **Treating `auto` as a model slug.** `auto` requests the Harness default; `inherit-parent` requests the chat model through documented native inheritance. A new CLI process needs `--parent-model ` to use the chat model. [Setup](./01-setup.md) covers the roles. diff --git a/docs/guide/README.md b/docs/guide/README.md index 2ef4495..ebcfdb5 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -6,13 +6,13 @@ Here's what you'll learn: 1. [Set up mstack](./01-setup.md). Install the plugin and pick your models. 2. [Route work through `/meta-mode`](./02-meta-mode.md). Give it a goal and watch it pick a playbook. -3. [Understand the code](./03-understand.md). `/how`, `/why`, `/teach`, and `/recall` before you edit anything. -4. [Design the change](./04-design.md). `/architect`, `/arena`, `/swarm`, and `/interrogate` before code locks in a shape. +3. [Understand the code](./03-understand.md). A read-only investigation, then `/how`, `/why`, `/teach`, and `/recall` before you edit anything. +4. [Design the change](./04-design.md). `/architect`, `/arena`, `/swarm`, `/interrogate`, prototypes, and plans before code locks in a shape. 5. [Build and clean the change](./05-build-and-clean.md). The build playbooks, `/tdd`, `/unslop`, and `/no-comments`. -6. [Verify and ship](./06-verify-and-ship.md). Prove behavior on the real app, then open a focused PR and drive it to merged. -7. [Run work while you sleep](./07-overnight.md). An overnight contract, a decision log you can audit, and the playbooks that scale past one agent. -8. [Steer with principle names](./08-principles.md). The 23 names that redirect an agent mid-task. -9. [Make it yours](./09-make-it-yours.md). Your own mode, plus how to test a skill change. +6. [Verify and ship](./06-verify-and-ship.md). Prove behavior on the real app, vet numbers with `/benchmark-checklist`, then open a focused PR and drive it to merged. +7. [Run work while you sleep](./07-overnight.md). Trust before loops, an overnight contract, a decision log you can audit, and coordinator threads and automations that scale past one agent. +8. [Steer with principle names](./08-principles.md). The 24 names that redirect an agent mid-task. +9. [Make it yours](./09-make-it-yours.md). Your own mode, `/correct` for repeated mistakes, and how to test a skill change. 10. [Recipes and pitfalls](./10-recipes-and-pitfalls.md). Prompts to copy and mistakes to skip. 11. [Mix pstack and mstack in one repository](./11-mixed-harness.md). Share verification facts, isolate work, and check evidence across Harnesses. diff --git a/docs/skill-integrity.md b/docs/skill-integrity.md index e76202a..a09855c 100644 --- a/docs/skill-integrity.md +++ b/docs/skill-integrity.md @@ -42,7 +42,7 @@ lock. It leaves adapted content untouched. Artifact synchronization preserves its existing transaction behavior and never refreshes skill baselines. The earlier `canonicalSkills` block in `profiles/upstream-manifest.json` still -checks the 47 pstack entry documents. When changing one of those entries, update +checks the 50 pstack entry documents. When changing one of those entries, update that existing target digest in the same review. The new manifest covers the complete trees and the three Matt Pocock skills alongside that check. diff --git a/docs/upstream-sync-2cbf585.md b/docs/upstream-sync-2cbf585.md new file mode 100644 index 0000000..d107e6c --- /dev/null +++ b/docs/upstream-sync-2cbf585.md @@ -0,0 +1,61 @@ +# Upstream sync to pstack 2cbf585 + +The pstack pin moves from `f5bdd68` to +[`2cbf585`](https://github.com/cursor/plugins/commit/2cbf58508f40de470d7490b55c51d71241928fa2). +This is a selective port. mstack keeps its portable adapters, its role-based +model configuration, and its own autopilot policy. + +## Ported + +- New skills `benchmark-checklist` and `principle-explain-the-number`, which + vet a measured number before anyone reports or acts on it. `meta-mode` + triggers the checklist on a benchmark and indexes the principle. The Perf + issue and Hillclimb playbooks run it. +- New skill `correct`, which fixes repeated agent mistakes at the highest level + that works: architecture, types, lint, tests, then docs. +- `architect` assumes the next contributor is an agent, and + `design-red-flags.md` gains four red flags: split ownership, two ways to do + one task, importable internals, and a hand-synced list. +- Fresh subagents by default in `meta-mode`, a one-hour audit tick in the + autopilots and the multi-phase plan (`check-plan.mjs` pins it, with a new + test), an owner pushes after every verifiable unit, `children.tsv`, status + messages only for new tracked changes, and the full-autonomy wording for + decisions the grant covers. +- `agents/meta-agent.md` now tells callers to spawn a fresh agent per task, and a test keeps it consistent with `meta-mode`. +- Opening a PR: `##` section headings, a built-in PR tool first, and the + "Size and stacks" and "Readiness" wording. +- Perf issue replaces its eight strategy families with seven mantras tried in + order. Hillclimb orders hypotheses by them. +- `swarm` briefs name exact SHAs and measurement method, and a result without + them is respawned once, then recorded as a gap. A worker reports every + provable issue. +- `technical-writing` drops its fetch-date source lines. `typescript-best-practices` + takes the schema-first cast guidance. +- The upstream guide refresh for `/correct`, `/benchmark-checklist`, prompting + tips, and the 24 principles. The `/poteto-help` sections are removed. The Cursor-specific wording is + rewritten through replacements in `profiles/upstreams.json`. The four guide + pages that carry mstack's mixed-Harness and verification-contract text were + merged by hand, and their reviewed digests are recorded in + `profiles/upstream-manifest.json`. + +## Not ported + +- Upstream `poteto-help` (and the guide sections that describe it). The skill needs the repository README and guide pages, which the default installer does not ship, and it has not been exercised by a model in mstack. `profiles/upstreams.json` records it under `omitSkills`, and `check-upstream` and `skill-baseline` skip it with that reason. +- Model slug and `pstack-models.mdc` changes in `arena`, `architect`, `how`, + `why`, `interrogate`, `reflect`, `setup-mstack`, and the `meta-mode` task + defaults. mstack reads roles from `~/.config/mstack/models.json`, and the + reasoning budget is already handled by `model-budget.mjs`. +- The `log.sh` header-append fix. mstack's Node logger already creates the file + exclusively. +- Prompt pruning that mstack's skills had already taken or rewrote, such as + `blast-radius`, `tdd`, `unslop`, and the five affected principles. +- Upstream's rule that lets an owner skip a second rebase when a later trunk move is textually clean and touches disjoint paths. Disjoint files can still break each other, so the owner rebases again and waits for CI. +- Upstream's removal of the `/goal` arm in Autopilot-full, Autopilot-stack, and the multi-phase plan. mstack is portable and relied on the goal for restart recovery, so on the operator's go the root writes the program objective (queue and order, verification rule, who merges, done condition) to `program.md` beside the decision trail, and to the Harness's goal mechanism when it has one. Every audit tick re-reads it with the playbook, and its done condition ends the recurring wake. `check-plan.mjs` pins the objective and has a test. +- `profiles/legacy-skill-digests.json`. It records released tags used to + recognize unmodified old installs and has no entry for a new skill. + +## Verification + +The repository tests cover packaging, inventory, link and frontmatter checks, +the `check-plan` cadence, and both source baselines. They do not show that a +model follows the new instructions. diff --git a/profiles/skill-manifest.json b/profiles/skill-manifest.json index 1dd8a6b..d94fbbe 100644 --- a/profiles/skill-manifest.json +++ b/profiles/skill-manifest.json @@ -1,15 +1,15 @@ { "version": 1, "sources": { - "pstack": "f5bdd6826fd0a0d9cbc4347134c3a74a200b9d9d", + "pstack": "2cbf58508f40de470d7490b55c51d71241928fa2", "mattpocock/skills": "6654f6b60cd9d5be8b54c6fafe44346dabeb3b76" }, "files": { "skills/architect/references/design-red-flags.md": { "upstream": "pstack", "source": "skills/architect/references/design-red-flags.md", - "sourceDigest": "905066f9bbac81c573c2b325be47751d2c0f9325e0a0772bd4384e82dafe9336", - "targetDigest": "905066f9bbac81c573c2b325be47751d2c0f9325e0a0772bd4384e82dafe9336" + "sourceDigest": "d0e639e4cc588ec865f930d3a4111faad60987ae36925917e319d7ceca7c69ce", + "targetDigest": "d0e639e4cc588ec865f930d3a4111faad60987ae36925917e319d7ceca7c69ce" }, "skills/architect/references/rationale-template.md": { "upstream": "pstack", @@ -26,13 +26,13 @@ "skills/architect/SKILL.md": { "upstream": "pstack", "source": "skills/architect/SKILL.md", - "sourceDigest": "897a59beaa3cab107d98c256206e062cc4a5e9421a45b9d462fbded19291fea5", - "targetDigest": "cc8a035aa7a2aa417676c4e364b86f4a3e2b85748bf2d0916402105b011a1083" + "sourceDigest": "741901140ee382ebf93263a7ed03c6ee3719e578416d81afcd195876fa16c496", + "targetDigest": "76c299297a79236fa519d401716a6ad1845ecc1a3f4fdff2aa052309261651aa" }, "skills/arena/SKILL.md": { "upstream": "pstack", "source": "skills/arena/SKILL.md", - "sourceDigest": "8d431f7b1aa19daf6300366fc876c4d1aadac06417ec5502407345ffaf4e90d9", + "sourceDigest": "e3a1f6c49a08b7e0b92134e53300d146f1f22ba83386d2019926e736df421851", "targetDigest": "f100383e190b806567015d2cbbaf90b9a1b0151ae60b08aa6185fc6eca3c9552" }, "skills/automate-me/SKILL.md": { @@ -41,10 +41,16 @@ "sourceDigest": "1510979b0b71b54284427a19c09918f8b1fdfc168f9b7f9e30098793a5ec88ef", "targetDigest": "6ab6c4c4a4b50a7cb182149408bd1758229d4386fbb8b1a66cf6927847b02c27" }, + "skills/benchmark-checklist/SKILL.md": { + "upstream": "pstack", + "source": "skills/benchmark-checklist/SKILL.md", + "sourceDigest": "6a767e788a60428fa14e645ee10fe2e49896e514ff654f668b1d824deb9038e8", + "targetDigest": "3fc701eecd146557b75c0e7d26929ca5d5469632def12ef032109710ae23c1c0" + }, "skills/blast-radius/SKILL.md": { "upstream": "pstack", "source": "skills/blast-radius/SKILL.md", - "sourceDigest": "20cb2945f5fe62055166f745107274af5f19428ca033e53a9b8bc69650d3ded1", + "sourceDigest": "5f02db9101ccf26c20254718f0fcd5c2c7ac5d4292b0e0923d0944ac47237aff", "targetDigest": "72113714dc5e7ef634a8b220e3a8dacea7b0e82d1f24136c13e04013749ef41a" }, "skills/bro/SKILL.md": { @@ -73,6 +79,12 @@ "sourceDigest": "2c20617f87ec8af6a434859f381b2f061a69b530444e74eb39e78bb016a6d1e2", "targetDigest": "2033d2660df023eddc9a72d840daf997bbbe15e9e768228948dbde906e03cf80" }, + "skills/correct/SKILL.md": { + "upstream": "pstack", + "source": "skills/correct/SKILL.md", + "sourceDigest": "bf482bacc972b3f124a4af8bf9364b4b3e280cb5845e44c326ea4f4565e5c904", + "targetDigest": "b7af9686e96f242ddd7d0c12731dd8c4347f4eff1c6d404dc87403d87076d492" + }, "skills/create-verification-skill/references/feature-map-example/create-note.md": { "upstream": "pstack", "source": "skills/create-verification-skill/references/feature-map-example/create-note.md", @@ -127,7 +139,7 @@ "skills/figure-it-out/SKILL.md": { "upstream": "pstack", "source": "skills/figure-it-out/SKILL.md", - "sourceDigest": "e041c64a39f1084a20e60ee99762c4dbd3ec8be56ed33fd68ea867b8bd8bd3e4", + "sourceDigest": "0eb9485f0e7d84fee56b5d0f0af0faf4635e3ca87c8cba3970c01293b76ecc19", "targetDigest": "37c25a3c0b354da74e33a2a291fc21e62140304eee2447ed73400bc2759402ec" }, "skills/how/references/explainer-prompt.md": { @@ -139,19 +151,19 @@ "skills/how/references/explorer-prompt.md": { "upstream": "pstack", "source": "skills/how/references/explorer-prompt.md", - "sourceDigest": "3a6965276d23be7d8da6c305bfd5d7bf29d2aef09e5dae4119463ac72022a02d", - "targetDigest": "3a6965276d23be7d8da6c305bfd5d7bf29d2aef09e5dae4119463ac72022a02d" + "sourceDigest": "a3b44a6e5bb16a6d4d1cac19db8ed5322ffd5f5f5d45baca4e73990ca096f8be", + "targetDigest": "a3b44a6e5bb16a6d4d1cac19db8ed5322ffd5f5f5d45baca4e73990ca096f8be" }, "skills/how/SKILL.md": { "upstream": "pstack", "source": "skills/how/SKILL.md", - "sourceDigest": "06b714dbd830bc829bfb89e33a1c39daf6d72ea412e488ea9d65f5f33b885a0c", + "sourceDigest": "d31805589c7f6a63a6db6c9fadebbd79fb9660682cf1654e9b2e5e1e7cd30bc0", "targetDigest": "a3e2acb068e126bad1ddadb4b16bb14154d5687fffc8ce2fe8209660b83c2e4b" }, "skills/interrogate/references/code-quality-review.md": { "upstream": "pstack", "source": "skills/interrogate/references/code-quality-review.md", - "sourceDigest": "623d3d8122d075c303b562783b471a732992e84166b318f85ab6d6c118b13304", + "sourceDigest": "79162fda183eafd40d51661fbb5e151c7ba250f89e506ba17f5bd135dcbd50a8", "targetDigest": "79162fda183eafd40d51661fbb5e151c7ba250f89e506ba17f5bd135dcbd50a8" }, "skills/interrogate/references/lead-judgment.md": { @@ -163,19 +175,19 @@ "skills/interrogate/references/reviewer-prompt.md": { "upstream": "pstack", "source": "skills/interrogate/references/reviewer-prompt.md", - "sourceDigest": "a397cc61102add709803d917fb23d726920525bf23e7c06dc4ed0b5cbeb00e54", + "sourceDigest": "e0598e254792b56de39bb16b1e6db559b03a522fdc54b98f942d254090920ae6", "targetDigest": "e0598e254792b56de39bb16b1e6db559b03a522fdc54b98f942d254090920ae6" }, "skills/interrogate/references/rubric.md": { "upstream": "pstack", "source": "skills/interrogate/references/rubric.md", - "sourceDigest": "59e9b7cc4556e735e1b859a7dd1f7637b013a2426a84825ac1c51979942c158a", + "sourceDigest": "a85aa801abbaf14434f00579440abc0d8e2723227ba8bf57de7cca8d6e7d2f25", "targetDigest": "a85aa801abbaf14434f00579440abc0d8e2723227ba8bf57de7cca8d6e7d2f25" }, "skills/interrogate/SKILL.md": { "upstream": "pstack", "source": "skills/interrogate/SKILL.md", - "sourceDigest": "2867910309e81411123ae4edca68ffca5795e66521d3f3bc0876f6213b542fb9", + "sourceDigest": "59d498c3e9848a24b2d105eb3f05b808aa4152adf4cb1de7bbb6aff4f4cd9b68", "targetDigest": "ab2508809da00eac47444b102cd7d11730f15b2476cd6cd947e330cc08814e78" }, "skills/maintain-verification-skill/SKILL.md": { @@ -205,25 +217,25 @@ "skills/meta-mode/playbooks/autopilot-full.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/autopilot-full.md", - "sourceDigest": "2042a89a0399b5fe700110bc03746899536c10f0df186e9fb15bbd4a2f6dfce5", - "targetDigest": "80b6f7d54b4430a1ee416ff2da72330bc480243afebab85a488b77b7bc8ab7d2" + "sourceDigest": "05ca30a16242c19d0c78ba1e88cca66f858d75252cb154fd740099fe292de802", + "targetDigest": "d7ef34b2d3bd55294d237fc71325f1c1d878337fd2c418e63d98c41f6d57e497" }, "skills/meta-mode/playbooks/autopilot-stack.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/autopilot-stack.md", - "sourceDigest": "60e0d997f7b369004a02089c71b9091d3f8e9bc0b4a3c1142598380faa7722fd", - "targetDigest": "33c6e9c2e2db8b62bbe3f394eb7161a2895cbe4bcd915cbbc28db69250d4fafa" + "sourceDigest": "007c0a3b12011954a224f54773ef4ad7b75918be0a311914c1b51ad4e794c1e5", + "targetDigest": "e822c24e34738087a24f65abc218d31c8c3c08436e7ee04d5c67fd00fc596a03" }, "skills/meta-mode/playbooks/babysit.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/babysit.md", - "sourceDigest": "51be21872152f97612d37258273269b88212b6696432d25d678cac30f02f4157", + "sourceDigest": "a0346c37c2313f36a863b80f66ee7b98059c2242adf74fc7b3e48abdb9ec6f5a", "targetDigest": "d52fed9c782e79df75e2e0f4f6344bc764e7aded1e5b8ac880ffdcc69dc9768f" }, "skills/meta-mode/playbooks/bug-fix.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/bug-fix.md", - "sourceDigest": "e958c67d5454fc12d76ec645b50dfd85c423082aac13a49e2913ef2815948216", + "sourceDigest": "018bbc146ae19145caa6c7e70591fee081b64447dda1c1c4b681c9974d928b13", "targetDigest": "8872387c8893159c2557929af3c2b35270b245ace9aa04b76f3d8f622b526d2d" }, "skills/meta-mode/playbooks/eval.md": { @@ -235,14 +247,14 @@ "skills/meta-mode/playbooks/feature.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/feature.md", - "sourceDigest": "430dae0fd736554ff7dffc3ef0644c9f0c845e25742f69e598c35b9b89660301", + "sourceDigest": "3a62cc4a8cbcf144bb9dd05f05420a15be0d38b784d3b141bb730a5852f50a62", "targetDigest": "f9ac3784c615c1e84d40ec30ede16872988dcb8364d480343e4d98b7961f06c2" }, "skills/meta-mode/playbooks/hillclimb.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/hillclimb.md", - "sourceDigest": "bc1fc4052c1ee918a56115a219cbcbbc4c147fa1a8080e77c7d58068eecac299", - "targetDigest": "1581e5ef7551e1495b7737bf344612707540ee96e69755e1c8e729b25617608a" + "sourceDigest": "244f289898fe67a458065e90fe8217c916c5acf61cdee8975ade3f9831a12e91", + "targetDigest": "656c3f4c2e78d227e90eda89f4262f251db7f4e6f1e8ad13095cc9f1d86564e5" }, "skills/meta-mode/playbooks/investigation.md": { "upstream": "pstack", @@ -253,14 +265,14 @@ "skills/meta-mode/playbooks/multi-phase-plan.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/multi-phase-plan.md", - "sourceDigest": "b823e05b64bbef84ae5169717c5fab1d9ab5079625996271e3aa7abcdce7b8ad", - "targetDigest": "b4771a313aa64ea72edec9133aa4f88795ee755f78240952fdc1f19d450f62a4" + "sourceDigest": "27d310e3fc3937a60b8fcbe1318f9d249a7477a722907bf85b3e4eb3dc436b11", + "targetDigest": "2eb71a5ddd294add838ca5d4bde67c431a925a6c6f3cfe686228b2fbc3b03cf9" }, "skills/meta-mode/playbooks/opening-a-pr.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/opening-a-pr.md", - "sourceDigest": "b173ff9638ff62f91f6813c1a0ed3417cdf9f6545a659be0c1fb1f42130e0e66", - "targetDigest": "81cc0748aa97accbee24b743fd03852f20f31722c857569e2b7030d8dcea071f" + "sourceDigest": "ab40de7163c1c6e274f46ee559b2e53ef45673703f601f13f4931c199e6fb90f", + "targetDigest": "a44b4ea2e72e5249eb0ebe26fe9d64317285cc9eb2fd84382e50329e30fc89be" }, "skills/meta-mode/playbooks/orchestrate.md": { "upstream": "pstack", @@ -271,14 +283,14 @@ "skills/meta-mode/playbooks/pause-safely.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/pause-safely.md", - "sourceDigest": "7d5fc10e144265f1b35f8157926541e738c1de64b6a85b3e61b51cf268c3dffd", + "sourceDigest": "77968cfe5f4a71a8cd33e0ae8ffcdbd88dd693a212c240457773e6c40c96c21d", "targetDigest": "50f1fa76fcdbf92db5a772a0470a128850c960c9eb68156846cc4f5a503f863b" }, "skills/meta-mode/playbooks/perf-issue.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/perf-issue.md", - "sourceDigest": "b2ee9aed1466583361cb61b4e8d79ebb3b61f7f9f6540be7633852afacab1d89", - "targetDigest": "708f59dbe6d969ef8388b575b0b4a614133fb24e207541184eb0d3b62f8e0bb3" + "sourceDigest": "2b88ad0f880e4d4d755ac19fe52414d6631d6baa816d060f53cf0a7429d7e14a", + "targetDigest": "c452f37e6461e22eb5accf5231a92c1fee17813e702a815207cab614cf52c3e4" }, "skills/meta-mode/playbooks/prototype.md": { "upstream": "pstack", @@ -289,7 +301,7 @@ "skills/meta-mode/playbooks/refactoring.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/refactoring.md", - "sourceDigest": "53bac1f1fe886600dd1991b5511b7975e6a206168038f9d282d88e45408e93cf", + "sourceDigest": "50f4f7d3d301551f8b8a57c3303c99958c5ca630ae0d0051823b6987c0eb5b96", "targetDigest": "81761553c8cb8a76beb38184b2c2f2a0d419aa64c987cc7896f4771cd7d4e021" }, "skills/meta-mode/playbooks/runtime-forensics.md": { @@ -307,7 +319,7 @@ "skills/meta-mode/playbooks/shipping.md": { "upstream": "pstack", "source": "skills/poteto-mode/playbooks/shipping.md", - "sourceDigest": "c301902136e0a9a0a55403c35374f6f5738e501aee66c27458dc197b87557550", + "sourceDigest": "19f3f6803a7bbe9ff04f624b03e3b55f07ac0a05e991aa00d5fe51239b920b2a", "targetDigest": "d898c5b32402a3e22a213311d33527423c57cb81b050c8e1e36d42cd2d85a24c" }, "skills/meta-mode/playbooks/trace-forensics.md": { @@ -347,8 +359,8 @@ "skills/meta-mode/SKILL.md": { "upstream": "pstack", "source": "skills/poteto-mode/SKILL.md", - "sourceDigest": "b3c505602b82fb3641a3983e9c46fb974881faa12ece1af804fae27afb7be532", - "targetDigest": "32363f67837dfe03bc5fd1b58ba940f2cfde2dfe46bce808416ad7cd4f63fd90" + "sourceDigest": "404c0ef4a78e93451b2ab555ca532e7197b5cf87de29205b6f7109dbee5d9c4d", + "targetDigest": "08d339fcc5315f9e24bf2f810d3b3505bd98efb6930e30a2a4d4769575197024" }, "skills/no-comments/SKILL.md": { "upstream": "pstack", @@ -392,6 +404,12 @@ "sourceDigest": "58903529d733b1c1a7c9ccf127d45ef3c7d0d9f0b81164a4dc6b80efe6f2912b", "targetDigest": "3013367ce42fabb55799ffbcc51ad20b2ae7ec1b898bad4ac4ceaa2f093edbe1" }, + "skills/principle-explain-the-number/SKILL.md": { + "upstream": "pstack", + "source": "skills/principle-explain-the-number/SKILL.md", + "sourceDigest": "5aac99e7ce0bb1b37e2579acf4fe88c32a1456d9d46afd4a57cfe1df9092e89c", + "targetDigest": "0a5cb3579a30e4da9d1635f5ceb11f773e551ec8626ac9c38b5db3985d3ac26b" + }, "skills/principle-fix-root-causes/SKILL.md": { "upstream": "pstack", "source": "skills/principle-fix-root-causes/SKILL.md", @@ -407,7 +425,7 @@ "skills/principle-guard-the-context-window/SKILL.md": { "upstream": "pstack", "source": "skills/principle-guard-the-context-window/SKILL.md", - "sourceDigest": "9f60e2c79b35f865cb103462f9128c6760b70f603475d1e535e5930f61840f66", + "sourceDigest": "d2cef147862576e3d709b7afc149d85196245e8338b9c7eef337c95fba412b3e", "targetDigest": "7a0a9540d4c0e8053ace79628d0a493444a82d1bbe1d8e94c8e561606c3d2912" }, "skills/principle-laziness-protocol/SKILL.md": { @@ -443,19 +461,19 @@ "skills/principle-never-block-on-the-human/SKILL.md": { "upstream": "pstack", "source": "skills/principle-never-block-on-the-human/SKILL.md", - "sourceDigest": "d82bce9ab9193249d1ec0d514202d89602f0fd3d312174d622c2dd222bae5a2e", + "sourceDigest": "f2764bb9338cbfc788c903cf4b9cd0a5f4042d3a04dd6d59cbd525d9beaadd0a", "targetDigest": "90cd48f4082367fe70fc1659fec5a8d0e76a40cb7f9be4797b4b460cec28a4dd" }, "skills/principle-outcome-oriented-execution/SKILL.md": { "upstream": "pstack", "source": "skills/principle-outcome-oriented-execution/SKILL.md", - "sourceDigest": "beedcaed75572a6a1662d47f16da203c2bd2c9dbffbbd678d4ba187d67b7e670", + "sourceDigest": "10eb91633aa570355ba4bb37088fcade2b22e498df7a58edc749e65bc5a78e2d", "targetDigest": "922ade1be5f671575b3c93367c3d08c9dbb2f7444a42bacbfb834656724d61ac" }, "skills/principle-prove-it-works/SKILL.md": { "upstream": "pstack", "source": "skills/principle-prove-it-works/SKILL.md", - "sourceDigest": "ae13d287984a5864312b6286899d4ee2b60f8272b5e5e8fcc586a7c3ea51020b", + "sourceDigest": "ec79a15025bac8d33d62011c54f3b612733fd2a024e623b531b3637aa75070e2", "targetDigest": "69fe19f428387ffbdf60d81fa6817272f1f88bc30ec7cd7edad408ce607ff39c" }, "skills/principle-redesign-from-first-principles/SKILL.md": { @@ -473,7 +491,7 @@ "skills/principle-sequence-verifiable-units/SKILL.md": { "upstream": "pstack", "source": "skills/principle-sequence-verifiable-units/SKILL.md", - "sourceDigest": "761390804ee36c32f5338d8db47ec54463d40ff96dbb296dfafabcd5f2593eec", + "sourceDigest": "2ccbbacc56ace5afdfb8670cef19d7bd009fb2a0033b9a741cbdf2b6baf72187", "targetDigest": "bc512996a3f226d1964444341e3fab1bda7f1b2928b136ab406ac4486150430f" }, "skills/principle-subtract-before-you-add/SKILL.md": { @@ -513,13 +531,13 @@ "skills/reflect/references/divergent-reviewer.md": { "upstream": "pstack", "source": "skills/reflect/references/divergent-reviewer.md", - "sourceDigest": "7da0334ce282e6d8d7349c0cff14ffbd10a91a756c0b5c3ccc97291f57b8bed6", + "sourceDigest": "221dfc0abf7cbcd25e1da3cd87323f5d1050fc3bf652e096d093584e183c98fb", "targetDigest": "6b21c64302826cea77c539f2be4bab2188be2821c1caaec536c16ef94f4ad99d" }, "skills/reflect/references/judgment-reviewer.md": { "upstream": "pstack", "source": "skills/reflect/references/judgment-reviewer.md", - "sourceDigest": "917bb2ad21240a42b440aeb2a17766092e09f70d0982417b2f4caa6d74f27164", + "sourceDigest": "a40ecb9b28bd2a3491e11a541157fe58efe158e0eda7b61a5006c14590aabe61", "targetDigest": "eafa6b19333572c21daeebe1506bda066d7dd44f0b0e0f9185ba8b54b2d10a93" }, "skills/reflect/references/synthesizer.md": { @@ -531,19 +549,19 @@ "skills/reflect/references/tooling-reviewer.md": { "upstream": "pstack", "source": "skills/reflect/references/tooling-reviewer.md", - "sourceDigest": "8c74ebf7811801d634db7ab609b097d77ea00ab77bb4b258d69bd96e671cfa39", + "sourceDigest": "bc49ced90fa81eaba3083b88aeb430d900a6d8f14ff40c1d6b52263bacfc77b6", "targetDigest": "c154b4f948cf470d099acd1770925aa1506edf17ba54de833af16c8d8528bc34" }, "skills/reflect/SKILL.md": { "upstream": "pstack", "source": "skills/reflect/SKILL.md", - "sourceDigest": "6a4d4ccaace9ce88c3e268fcbedf3cfd40e527162a5e5aad6de8edbaf5e2b83f", + "sourceDigest": "36efa48cc4ec2ba6f8131651aae24c6321682b098ed47a1069a7509462bf4a84", "targetDigest": "5478382b85614482fdf8799c9b0113d0c12c6595ee1003aa62c91f6288b91089" }, "skills/setup-mstack/SKILL.md": { "upstream": "pstack", "source": "skills/setup-pstack/SKILL.md", - "sourceDigest": "5acdc3db4f15f3e9b81fb56eab7f17cdccde1a11a40053ed7743f7467729c8a9", + "sourceDigest": "125dd0c8f588782cfb271efae8f97a0719e43e79f56b3495c095f460bcee6389", "targetDigest": "ede1efcab2c6503521faed92ab691df87dd92b48e33c66cc57d72d4ea4c5ff82" }, "skills/show-me-your-work/references/decision-log-template.tsv": { @@ -555,26 +573,26 @@ "skills/show-me-your-work/scripts/log.mjs": { "upstream": "pstack", "source": "skills/show-me-your-work/scripts/log.sh", - "sourceDigest": "1601bc18f9aba0af3f5d6375e4f2d5dc6102334d1bca935026c0e3547cdadbbf", + "sourceDigest": "a65a4bc5fb7cdeadbdb7b7ff1ca4682f4d9c42420942b2977cd17b46c4ac338e", "targetDigest": "1fa4184750bee4a37aedd1a9e7461f4d2bc121830b7724857fa5fbe2fb3c43f7", "reason": "The Node implementation replaces the Bash logger for Windows portability." }, "skills/show-me-your-work/SKILL.md": { "upstream": "pstack", "source": "skills/show-me-your-work/SKILL.md", - "sourceDigest": "831e85ba3f84f38bf338cd03e6af050fea357752e25a825e334c99f59d7f2077", + "sourceDigest": "bcff5f7f9fd23f92c12b251f9cd6b947e9485e1055cfacb6fdd9cae0789d7550", "targetDigest": "1464cc0dbe44a03df3250456260de8fdfa8535b80e10abaaf9e5b121637919cd" }, "skills/swarm/SKILL.md": { "upstream": "pstack", "source": "skills/swarm/SKILL.md", - "sourceDigest": "d578d877c3b8b9de7163f52579c4683337a940acc0fbe4496a498f5d3b27df30", - "targetDigest": "c24493812f03e0165cdbb3dd19e16d376742afe3b07f92cc48575f27883ae729" + "sourceDigest": "bdcee4168e22428036e93d7cdeec3f391dbc4132f927f6db2540328c22db0273", + "targetDigest": "93f49f135adb52278200670929eef76f03edb6995f5f3c074a690441a38d4e95" }, "skills/tdd/SKILL.md": { "upstream": "pstack", "source": "skills/tdd/SKILL.md", - "sourceDigest": "011cab0ecc04a3632121efb493ae4d60aa282a9b72c66de74dd8ad7e4313e05a", + "sourceDigest": "eeb868e2dfebee528d730a67d7b17498fac4bb85dec2e38bc5c5176aca4d5d2f", "targetDigest": "4930d09f2ca2dd47487c66d21d82bd376e35cd70bb8e42bfad5e19506c2ca2df" }, "skills/teach/SKILL.md": { @@ -586,14 +604,14 @@ "skills/technical-writing/SKILL.md": { "upstream": "pstack", "source": "skills/technical-writing/SKILL.md", - "sourceDigest": "6d6d9e625ae412ee8f36df8deb6fd9203d7c6acca776d5ee3cabbb9126f8b84c", - "targetDigest": "a450d685f477833640054828477fff97e1fd4ffb396a845b512d131b633c1919" + "sourceDigest": "f5c512ffeec70bc4e0dee50f7bb4c26742e1be77967a6e8b15d1921e1c209ceb", + "targetDigest": "b83d616480d74381acdc5accb65a409c01095b71abc7dc02b6cadc496138dc81" }, "skills/typescript-best-practices/references/patterns.md": { "upstream": "pstack", "source": "skills/typescript-best-practices/references/patterns.md", - "sourceDigest": "62e9cd32d2fa066a35d0d1349aac22dce31a48ad7d5eaf142570770cfe707384", - "targetDigest": "4f5ef6f9ab4d158910249aa375d14f939d46ec4441a9750060cef54e26691682" + "sourceDigest": "faa1362055374452efccac1b629677c61acfb0bcc6c4e3311836b5715638ee18", + "targetDigest": "d1b52ded45e285c9a0b7d720dbe896cecab845731e280906dc05128c57e9c1f9" }, "skills/typescript-best-practices/SKILL.md": { "upstream": "pstack", @@ -604,7 +622,7 @@ "skills/unslop/SKILL.md": { "upstream": "pstack", "source": "skills/unslop/SKILL.md", - "sourceDigest": "c6d2572294d933a428211921069e9a248490e9b466ca59437cb4d9de248600ca", + "sourceDigest": "195411d320b5b328f9f642baf59757ed19aaf0931c0838740e0aca273d538dc1", "targetDigest": "290a10a90e52f080fdf0f225f043088990b5cd8d8b8307c800a91cfeb1568aa4" }, "skills/why/references/epistemics.md": { @@ -682,7 +700,7 @@ "skills/why/SKILL.md": { "upstream": "pstack", "source": "skills/why/SKILL.md", - "sourceDigest": "222b93789754ba6ee901835137184acdca667f7e47c523bcc85aca86675fb249", + "sourceDigest": "2a852ec8680920109d2b56538b027c52867896a597250ac5d18a13e0b42e5b06", "targetDigest": "873aedc86d1321093e9a195ac8bff1783241b309a1d33808ab74f181c4b8f22d" }, "skills/writing-for-agents/SKILL-MECHANICS.md": { @@ -714,14 +732,14 @@ "tools/meta-mode/check-plan.mjs": { "upstream": "pstack", "source": "skills/poteto-mode/scripts/check-plan.mjs", - "sourceDigest": "4f5118edf719b481983dc87dfadd5b4b5473d05aad04a7ba65191ff9c73faf1b", - "targetDigest": "ae99ad15b22971829cf2f2517c862d695546411813a307bba55674b6b94a1445", + "sourceDigest": "4f9432d9989880b6afc2bdda503d5b12a9d07d357ecf31936b7ab5e83bc80523", + "targetDigest": "093d6a6d987aa6e63560e45840eef4379a472278e0a7e5ad3542025891341809", "reason": "Runtime tools are packaged separately from portable skill instructions." }, "tools/meta-mode/check-plan.test.mjs": { "upstream": null, "reason": "Local portability guidance or implementation; review alongside its owning skill.", - "targetDigest": "773d1e6582d8245d38c8d2deeff585ce0a9e9e9b293ba8d69f1c7b0e176a315b" + "targetDigest": "cd81a473955c5cf2f3481654b2c993d28313263cb1cecf09856954b07681fe6b" }, "tools/meta-mode/check-playbooks.mjs": { "upstream": null, @@ -896,6 +914,24 @@ "source": "skills/productivity/writing-for-agents/agents/openai.yaml", "sourceDigest": "eacb24b2a618cfb81dacb0416f4fdd75ddf3a8060f8ddb99aae1b1e301907e4b", "reason": "Upstream UI metadata is specific to its skill packaging; mstack uses its shared frontmatter and per-Harness adapters." + }, + "pstack:skills/poteto-help/references/prompting.md": { + "upstream": "pstack", + "source": "skills/poteto-help/references/prompting.md", + "sourceDigest": "463f450c44a60afd001a2f69fdf8a5dea174351f339369b12ec3c41515e564d3", + "reason": "Needs the repository README and guide pages, which the default installer does not ship, and has not been exercised by a model in mstack." + }, + "pstack:skills/poteto-help/references/recipes.md": { + "upstream": "pstack", + "source": "skills/poteto-help/references/recipes.md", + "sourceDigest": "1872323419a3e5c7783b1933f7a180ca26c25a6e1f4ec83bd65e091ebbfb812b", + "reason": "Needs the repository README and guide pages, which the default installer does not ship, and has not been exercised by a model in mstack." + }, + "pstack:skills/poteto-help/SKILL.md": { + "upstream": "pstack", + "source": "skills/poteto-help/SKILL.md", + "sourceDigest": "5fc65e4c30c52edcde690d18904e3a8cf6ba6c2424c672d1a5cb6d29ab28645c", + "reason": "Needs the repository README and guide pages, which the default installer does not ship, and has not been exercised by a model in mstack." } } } diff --git a/profiles/skills.json b/profiles/skills.json index 21ffdf8..4fd8aef 100644 --- a/profiles/skills.json +++ b/profiles/skills.json @@ -3,9 +3,11 @@ "architect", "arena", "automate-me", + "benchmark-checklist", "blast-radius", "bro", "codebase-design", + "correct", "create-verification-skill", "diagnosing-bugs", "figure-it-out", @@ -21,6 +23,7 @@ "principle-encode-lessons-in-structure", "principle-exhaust-the-design-space", "principle-experience-first", + "principle-explain-the-number", "principle-fix-root-causes", "principle-foundational-thinking", "principle-guard-the-context-window", diff --git a/profiles/upstream-manifest.json b/profiles/upstream-manifest.json index bad87d5..046cea8 100644 --- a/profiles/upstream-manifest.json +++ b/profiles/upstream-manifest.json @@ -1,102 +1,49 @@ { "source": "https://github.com/cursor/plugins/tree/main/pstack", - "commit": "f5bdd6826fd0a0d9cbc4347134c3a74a200b9d9d", - "artifacts": { - "agents": { - "agents/comment-reviewer.md": "c0fd0383008da45fc78cfac17b9007d62c42f87ad1c8d5c2fb658b1fd01f7c82", - "agents/meta-agent.md": "98bfec1538a77982d5e5e2534c69de6b64077c172d0a4108fd9da7b36c95b5cb" - }, - "automations": { - "automations/benny/FOR_AGENTS.md": "9e86916edf7fdddf3325dac869d947d5cab767ee40f1b5eaf5d16e31f2a5322a", - "automations/benny/README.md": "339fa6a5e1b07dbd708e87bc423e31e25ab3ac7e4292b80d3330abe992ee3245", - "automations/benny/skills/reproduce-and-fix-issues/references/control-adapter.md": "58b0615d2fca895f9a20df83266e280042b0d585b5f2fd324e2094a682fd846b", - "automations/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md": "1e5c7c8522daec3e43fcc2e73ceb97289ded65b552949ce65a11cc8eb3d2b6ee", - "automations/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md": "c90eae00abcdec71a58fa8d60f2c495b082a526ad50b8e8e494837609129bf29", - "automations/benny/skills/reproduce-and-fix-issues/SKILL.md": "2cb174442390be10cb7e7767e89bb1e94fda4d014426c40888397ad8286060ff", - "automations/benny/skills/setup-benny/SKILL.md": "c5bbca8d97cc6975d34e84c42ac4fd59e04c7f77892e0af534b3e58ca0fd43df", - "automations/benny/skills/triage-issue-reports/references/routing.example.md": "e5e53013692568cf69da8e8b302fff929fe2fbc9aec1a4651fd7997e2c7a4025", - "automations/benny/skills/triage-issue-reports/SKILL.md": "92a17e4d2927457541b7e903f6def93e79e22f886c4b821c56bb5c9797db4193", - "automations/benny/templates/configuration.example.yaml": "13e24b4ce9b9a0913916e85fe3b080b88d45f8e55dccfe8ae38e0751a997b6f5", - "automations/benny/templates/reproduce-automation-prompt.md": "71ec574f1844e379394ae4ef14c48d7df10afbaa319d395c788d7f856f0e6899", - "automations/benny/templates/triage-automation-prompt.md": "e0bba594547834f013ec805915610eb597e7929efe3ffbe85ae00339ee16d474" - }, - "guide": { - "docs/guide/01-setup.md": "6786c9090de6092d87836214b690e2b5640ddc7f34b19c0b9e2af794fcc17e7e", - "docs/guide/02-meta-mode.md": "c169bbee5eae6ea6b16ea4d3df1442b05031778b20eb9af8cc19c1a7bac5282a", - "docs/guide/03-understand.md": "5db58a1fc2cc7bf1843945fcc7d93eba4f73e26fde5cd097d006be641fe5883e", - "docs/guide/04-design.md": "216bc41d25e3481333acfffef4ea486ce8dabcc5dfa736d16eb0afd979aa03a1", - "docs/guide/05-build-and-clean.md": "40a1d2b189e8a889022934d23dd79c661edbd13ee27b2f496543f8d8d03bac17", - "docs/guide/06-verify-and-ship.md": "53a6bc8b3e850e34c4d8b1785a488eb7fbcbfe94ed588aeeaca252a5eb6e442c", - "docs/guide/07-overnight.md": "060294d4dbda952e3211e285f75e471c8d454d7705767b42377c4e1963841ad2", - "docs/guide/08-principles.md": "4dba3340352310e432905a27dd70552b4e034bb7d37a55dcab59a4b378e59ef1", - "docs/guide/09-make-it-yours.md": "04b21905a0a152ea9e57dcbecf25112112a1e7584037feabf501132f2d8cc64c", - "docs/guide/10-recipes-and-pitfalls.md": "56b6e1360c070029ac26ec39f00f7c6c587f1203255682808ae93b3176f90746", - "docs/guide/images/design.jpg": "b8ed07427f6a0c37dd8ba97961fc0eb5071efeee6c4a230648bdb7547f6f2a8f", - "docs/guide/images/overnight.jpg": "4b4405e4df8925c5b3abbe702f681af0f3b1f5f32271b599f95717f578f1a0c8", - "docs/guide/images/recipes.jpg": "9fa2d51b476635712737795ddef81806efaa0086bb3bfa9f9f45695d9ab0f8e8", - "docs/guide/images/router.jpg": "525843055a4efd2b10acc50a8652fd02b0834ea733a8a2f895c1eb89036017da", - "docs/guide/images/understanding.jpg": "b60587e9a9bbe2550e93be9819cf0cd4acf77d90fac769a0c43d82bd8e34e279", - "docs/guide/images/verification.jpg": "2a76b52007a1cd2866ba67fd47d7d9ef3e1118bb5a09c4665eee8c3f161bd09a", - "docs/guide/README.md": "e76f2e20364a4021707394b0557751e3aa81be2c819b19aaa705de08086515a5" - }, - "meta-mode-tools": { - "tools/meta-mode/bootstrap.ts": "d9d39f235da5512de6122f1ff28584b3a0120b170f5447a7a5868f7cf187d12a", - "tools/meta-mode/bun.lock": "6413513594536785c3fd52b14934dd52d1ce179ad3ffe99d77535f5b637435a2", - "tools/meta-mode/check-plan.mjs": "ddcdb05af01b37d7513b2017d44e29c30bdaa79ca360c5913d701c16dde70907", - "tools/meta-mode/orch/orch.test.ts": "174b86d21ff51ccd28d1a8c938cb2e0c6fa287b209d4ca6c03932fcb1b53372e", - "tools/meta-mode/orch/orch.ts": "f091687df627a0b75fabd54af58945a9cd6c7039ef0622012ac9ed60cd8ec434", - "tools/meta-mode/orch/store.ts": "0eae7cf69282e827b1227166f2e32cee3560f2f3e65b3f1f2faf6fb83d3b4c5b", - "tools/meta-mode/package.json": "c7ac7fd69bb925415cdc15cd636567304ee40f8d665986e45ed8c0ee658f6caf", - "tools/meta-mode/watch-pr/cli.test.ts": "a35592b4c6da96caf8d47987e9cd503fab6c7774ab87d11a43f24b4b5df2a9d1", - "tools/meta-mode/watch-pr/cli.ts": "89c08863089181a232be782c4b2ed90a1552f44aeecb0dcb7aac2c623620e680", - "tools/meta-mode/watch-pr/fakes.test-helper.ts": "e53e31b7f03068063f53a99a3591b052aaed66e4e2b196b3a364980f60324ab1", - "tools/meta-mode/watch-pr/github.test.ts": "0cbce011050522938523e36bb42a260e92b812dcd2076930fa681672ad316b24", - "tools/meta-mode/watch-pr/github.ts": "d1bbbafbe8e2c703c84da2029de7f2c4011412512f8cf65a42100f46bcb92c8a", - "tools/meta-mode/watch-pr/policy.test.ts": "a9fedb25feefd1f57ef6a662f80c99018690170a3a8070773a08eaf694d1d3d9", - "tools/meta-mode/watch-pr/policy.ts": "68d240505852cf23c9b2dea463342e9e61243f486b3cc86c735d140f9ee7be49", - "tools/meta-mode/watch-pr/render.ts": "2b709e86628d5b8fdb61f860e60ababc342b0626c67576305442cf548283a604", - "tools/meta-mode/watch-pr/tsconfig.json": "1ecccc72320b086c63ce3f73c959896fd747363e63553b3b1136296ea4069e45", - "tools/meta-mode/watch-pr/types.compile.ts": "621af4c9a664fbf699a9737efccdc248abb416df8819c9dc5f824beae2b9b1d6", - "tools/meta-mode/watch-pr/types.ts": "64ba6221e3bfe61bbb292337d199cdec6309455477280efb060203dba34e0e91", - "tools/meta-mode/watch-pr/watch-pr": "a17825c7862730dd7c897c1ac076971c0f11d2f9ff8fe37c4a74ebc6db92d549", - "tools/meta-mode/worktree-audit.sh": "9f14b5f4f70a6ada93778e49701f854796b11776edccb9f73816ee2a8b8b623c" - } - }, + "commit": "2cbf58508f40de470d7490b55c51d71241928fa2", "canonicalSkills": { "architect": { - "source": "897a59beaa3cab107d98c256206e062cc4a5e9421a45b9d462fbded19291fea5", - "target": "cc8a035aa7a2aa417676c4e364b86f4a3e2b85748bf2d0916402105b011a1083" + "source": "8c46078c04ee70fc4f35a9f82a364e49b78992c43625873c82f0635054dc89bd", + "target": "76c299297a79236fa519d401716a6ad1845ecc1a3f4fdff2aa052309261651aa" }, "arena": { - "source": "648697e237871e279e66166fd070dc272c73a310ababe7498c89713414ed4a14", + "source": "6cc5f63b9212d91d25a10670f8a5eba8665278013ae0e066d18a25f87b710447", "target": "f100383e190b806567015d2cbbaf90b9a1b0151ae60b08aa6185fc6eca3c9552" }, "automate-me": { "source": "c80a6024fa6bebfa6875975c74293415fa6f729087377998751dc1343c865e75", "target": "6ab6c4c4a4b50a7cb182149408bd1758229d4386fbb8b1a66cf6927847b02c27" }, + "benchmark-checklist": { + "source": "6a767e788a60428fa14e645ee10fe2e49896e514ff654f668b1d824deb9038e8", + "target": "3fc701eecd146557b75c0e7d26929ca5d5469632def12ef032109710ae23c1c0" + }, "blast-radius": { - "source": "20cb2945f5fe62055166f745107274af5f19428ca033e53a9b8bc69650d3ded1", + "source": "5f02db9101ccf26c20254718f0fcd5c2c7ac5d4292b0e0923d0944ac47237aff", "target": "72113714dc5e7ef634a8b220e3a8dacea7b0e82d1f24136c13e04013749ef41a" }, "bro": { "source": "aa329d0ceeeecb6822a7174ad76bb07a7826a3c52ceb6a588dec4138815084bb", "target": "8b822d47b9299627f5e4fe42684a031105792c8531443da1ae3423adfa2de96f" }, + "correct": { + "source": "bf482bacc972b3f124a4af8bf9364b4b3e280cb5845e44c326ea4f4565e5c904", + "target": "b7af9686e96f242ddd7d0c12731dd8c4347f4eff1c6d404dc87403d87076d492" + }, "create-verification-skill": { "source": "644f2551403c1bca01a2855b34611b6e7be0ce0dc5b204514c376c0f6a6e6ac4", "target": "eca219cac2808714d6aa3090fd3065d1da6a579d432f277aef334f1ca0dfe770" }, "figure-it-out": { - "source": "982f2c1024a3a24f6417426ad8e8a3e027fe6210a8a442308fb85073f8f3f6ef", + "source": "cd4c13cfc6553c5ff32458ab1f1a72a83548510f0bba77ca8d6c3846f0da09a4", "target": "37c25a3c0b354da74e33a2a291fc21e62140304eee2447ed73400bc2759402ec" }, "how": { - "source": "06b714dbd830bc829bfb89e33a1c39daf6d72ea412e488ea9d65f5f33b885a0c", + "source": "6492ea0d986c9763d649c665fb331a3b555444c486616136b748ca6c945045b5", "target": "a3e2acb068e126bad1ddadb4b16bb14154d5687fffc8ce2fe8209660b83c2e4b" }, "interrogate": { - "source": "8aef2c35f2282bbc2636e10b4b52fe41ed5d00c86e775e82fbf8771b2b07f9be", + "source": "08a284d1c40dcfc49df5e33dcd5edac4dbb94664976eda174f3fdc15aad92873", "target": "ab2508809da00eac47444b102cd7d11730f15b2476cd6cd947e330cc08814e78" }, "maintain-verification-skill": { @@ -108,8 +55,8 @@ "target": "2f04984c34d64ad8119eac43f24298d480528b14a9876d672aee0c942aa0c2da" }, "meta-mode": { - "source": "d5817d996f6da294c86cacb2bd1b0c40c85968844a6afd194fe69efa8654878f", - "target": "32363f67837dfe03bc5fd1b58ba940f2cfde2dfe46bce808416ad7cd4f63fd90" + "source": "2e09a945cbe289dd85448f4a51eeac8c0c3893904decaab9413a33babf96ca08", + "target": "08d339fcc5315f9e24bf2f810d3b3505bd98efb6930e30a2a4d4769575197024" }, "no-comments": { "source": "5c5b0882297d704c3a9720c52b7a793c68b013eaf717989f0945624efdfe2b05", @@ -139,6 +86,10 @@ "source": "58903529d733b1c1a7c9ccf127d45ef3c7d0d9f0b81164a4dc6b80efe6f2912b", "target": "3013367ce42fabb55799ffbcc51ad20b2ae7ec1b898bad4ac4ceaa2f093edbe1" }, + "principle-explain-the-number": { + "source": "5aac99e7ce0bb1b37e2579acf4fe88c32a1456d9d46afd4a57cfe1df9092e89c", + "target": "0a5cb3579a30e4da9d1635f5ceb11f773e551ec8626ac9c38b5db3985d3ac26b" + }, "principle-fix-root-causes": { "source": "ba4cd38da1dcc8fe5432feb64457cba95594736a9b21b2ebf8f8c52aee068707", "target": "2f48a508674c8b9f3339aba95929079af54fb7fbd367b4eb45175388f1e170f9" @@ -148,7 +99,7 @@ "target": "e69eea824d81c4bb32cbcdb26513bf964882daeeb647bb99210978e86bec1a49" }, "principle-guard-the-context-window": { - "source": "9f60e2c79b35f865cb103462f9128c6760b70f603475d1e535e5930f61840f66", + "source": "d2cef147862576e3d709b7afc149d85196245e8338b9c7eef337c95fba412b3e", "target": "7a0a9540d4c0e8053ace79628d0a493444a82d1bbe1d8e94c8e561606c3d2912" }, "principle-laziness-protocol": { @@ -172,15 +123,15 @@ "target": "4464cc1a0a2366ff8249659c30f525dba6206947f037f07f5931238ed0e96f82" }, "principle-never-block-on-the-human": { - "source": "d82bce9ab9193249d1ec0d514202d89602f0fd3d312174d622c2dd222bae5a2e", + "source": "f2764bb9338cbfc788c903cf4b9cd0a5f4042d3a04dd6d59cbd525d9beaadd0a", "target": "90cd48f4082367fe70fc1659fec5a8d0e76a40cb7f9be4797b4b460cec28a4dd" }, "principle-outcome-oriented-execution": { - "source": "beedcaed75572a6a1662d47f16da203c2bd2c9dbffbbd678d4ba187d67b7e670", + "source": "10eb91633aa570355ba4bb37088fcade2b22e498df7a58edc749e65bc5a78e2d", "target": "922ade1be5f671575b3c93367c3d08c9dbb2f7444a42bacbfb834656724d61ac" }, "principle-prove-it-works": { - "source": "ae13d287984a5864312b6286899d4ee2b60f8272b5e5e8fcc586a7c3ea51020b", + "source": "ec79a15025bac8d33d62011c54f3b612733fd2a024e623b531b3637aa75070e2", "target": "69fe19f428387ffbdf60d81fa6817272f1f88bc30ec7cd7edad408ce607ff39c" }, "principle-redesign-from-first-principles": { @@ -192,7 +143,7 @@ "target": "30cc80284a90bb5d94cde5a3533a8a27755832c2c4e638f8e3b97bbf8ba94924" }, "principle-sequence-verifiable-units": { - "source": "761390804ee36c32f5338d8db47ec54463d40ff96dbb296dfafabcd5f2593eec", + "source": "2ccbbacc56ace5afdfb8670cef19d7bd009fb2a0033b9a741cbdf2b6baf72187", "target": "bc512996a3f226d1964444341e3fab1bda7f1b2928b136ab406ac4486150430f" }, "principle-subtract-before-you-add": { @@ -212,23 +163,23 @@ "target": "be67c9e064a2b6d2ec52e915c19f6507f9f389a112e9961eb93b3c793b565e70" }, "reflect": { - "source": "6a4d4ccaace9ce88c3e268fcbedf3cfd40e527162a5e5aad6de8edbaf5e2b83f", + "source": "902cd959ff2a894c44f462b58057afac676fb83fb0c56c2fc3c853db95e02205", "target": "5478382b85614482fdf8799c9b0113d0c12c6595ee1003aa62c91f6288b91089" }, "setup-mstack": { - "source": "a11137437e12831c73f228f449bdfefab487bf7e2c69a4b306189e8fb1e6ab3e", + "source": "388d2a0869504ef9943f34b217d0d7a3ca13fdaaeea2327078104d3efb807ce3", "target": "ede1efcab2c6503521faed92ab691df87dd92b48e33c66cc57d72d4ea4c5ff82" }, "show-me-your-work": { - "source": "831e85ba3f84f38bf338cd03e6af050fea357752e25a825e334c99f59d7f2077", + "source": "bcff5f7f9fd23f92c12b251f9cd6b947e9485e1055cfacb6fdd9cae0789d7550", "target": "1464cc0dbe44a03df3250456260de8fdfa8535b80e10abaaf9e5b121637919cd" }, "swarm": { - "source": "32440570076df5a124d679e0419e5b03c1d405365bb443552789338427a8ce7b", - "target": "c24493812f03e0165cdbb3dd19e16d376742afe3b07f92cc48575f27883ae729" + "source": "f1d3a129f80f2e54d134f0216e5d7f6dd5043b3da245e2af38a94946f9f38153", + "target": "93f49f135adb52278200670929eef76f03edb6995f5f3c074a690441a38d4e95" }, "tdd": { - "source": "011cab0ecc04a3632121efb493ae4d60aa282a9b72c66de74dd8ad7e4313e05a", + "source": "eeb868e2dfebee528d730a67d7b17498fac4bb85dec2e38bc5c5176aca4d5d2f", "target": "4930d09f2ca2dd47487c66d21d82bd376e35cd70bb8e42bfad5e19506c2ca2df" }, "teach": { @@ -236,19 +187,19 @@ "target": "5a85664f8cce57429af0d8c060a20d8740579867f0976f4981032e8855cab2b5" }, "technical-writing": { - "source": "6d6d9e625ae412ee8f36df8deb6fd9203d7c6acca776d5ee3cabbb9126f8b84c", - "target": "a450d685f477833640054828477fff97e1fd4ffb396a845b512d131b633c1919" + "source": "f5c512ffeec70bc4e0dee50f7bb4c26742e1be77967a6e8b15d1921e1c209ceb", + "target": "b83d616480d74381acdc5accb65a409c01095b71abc7dc02b6cadc496138dc81" }, "typescript-best-practices": { "source": "28f9e61710e205f6f3c5476f333483cff0e988f6a5b639e2faad536344b40c5e", "target": "02b41b2cbb0ac43940b8f4df8b54c55f1aac0a68890a9379f9b006b2a8f1f4a0" }, "unslop": { - "source": "c6d2572294d933a428211921069e9a248490e9b466ca59437cb4d9de248600ca", + "source": "195411d320b5b328f9f642baf59757ed19aaf0931c0838740e0aca273d538dc1", "target": "290a10a90e52f080fdf0f225f043088990b5cd8d8b8307c800a91cfeb1568aa4" }, "why": { - "source": "222b93789754ba6ee901835137184acdca667f7e47c523bcc85aca86675fb249", + "source": "073fb39adb2de6d07a6cfbaf98a35b6397be974ff9fe3bb26dc46f7065a04114", "target": "873aedc86d1321093e9a195ac8bff1783241b309a1d33808ab74f181c4b8f22d" } }, @@ -299,24 +250,85 @@ "reason": "Route native Benny verification and maintenance through the shared canonical contract and feature map." }, "docs/guide/01-setup.md": { - "source": "6786c9090de6092d87836214b690e2b5640ddc7f34b19c0b9e2af794fcc17e7e", - "target": "b67fd0a7950464e1094225a2f85add0714849c1daab6c5289ad7bbc653baa536", + "source": "058974e262eed41d2c24428109127898d3a6c403538570e7add515c4089d0d84", + "target": "780ae4284b48e26032e0e70844d918ade5cd6ffebd6c301784c4432d4b7ac980", "reason": "Document one canonical verification contract and the mixed pstack/mstack project workflow." }, "docs/guide/03-understand.md": { - "source": "5db58a1fc2cc7bf1843945fcc7d93eba4f73e26fde5cd097d006be641fe5883e", - "target": "1fd73edc1cdde214e82b4b116ba3b1d3ec1dcae18e1ef019de99ee12439c3cf1", + "source": "c7dce3a9b1f1c0de8c00084453a3a18b69f0ad0c6616592b584e2d19add69ebd", + "target": "72e10ba5cac7e7510de58bf4669121f820343304f5050c4bc219dd00668c05f9", "reason": "Point session pickup at the portable project-local resume checkpoint." }, "docs/guide/06-verify-and-ship.md": { - "source": "53a6bc8b3e850e34c4d8b1785a488eb7fbcbfe94ed588aeeaca252a5eb6e442c", - "target": "e99e7108a757eee96397ebb79c6bbbc6f30084a35eb32d98f8de2e2b9c1aad18", + "source": "e3a8259f2b2450692e43d607848f5a85a7cee894490452968391079e52a8ac50", + "target": "5fd91e770e7805455668b44d4f39f767498dc5ff6d4f10a9cfbe9de9d0631ac5", "reason": "Document one canonical verification contract and the mixed pstack/mstack project workflow." }, "docs/guide/README.md": { - "source": "e76f2e20364a4021707394b0557751e3aa81be2c819b19aaa705de08086515a5", - "target": "e9c7b7d96995ed268034310e38b36721f3379cabe69d1e135cb9eab54d9ee2ad", + "source": "4b0d617c745e1ff33274bea1c1bc1274f3e23514455bec97affc9e9951f2350b", + "target": "234cc31995332fdc898f1814d611b7cbcd6b2c1915e793dbb75883dd31b8c030", "reason": "Document one canonical verification contract and the mixed pstack/mstack project workflow." } + }, + "artifacts": { + "agents": { + "agents/comment-reviewer.md": "c0fd0383008da45fc78cfac17b9007d62c42f87ad1c8d5c2fb658b1fd01f7c82", + "agents/meta-agent.md": "51f3791434b848cf8881d5d3e1cfcde502cf92f694c1d8748a65ca9603b33b3e" + }, + "automations": { + "automations/benny/FOR_AGENTS.md": "9e86916edf7fdddf3325dac869d947d5cab767ee40f1b5eaf5d16e31f2a5322a", + "automations/benny/README.md": "339fa6a5e1b07dbd708e87bc423e31e25ab3ac7e4292b80d3330abe992ee3245", + "automations/benny/skills/reproduce-and-fix-issues/references/control-adapter.md": "58b0615d2fca895f9a20df83266e280042b0d585b5f2fd324e2094a682fd846b", + "automations/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md": "1e5c7c8522daec3e43fcc2e73ceb97289ded65b552949ce65a11cc8eb3d2b6ee", + "automations/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md": "c90eae00abcdec71a58fa8d60f2c495b082a526ad50b8e8e494837609129bf29", + "automations/benny/skills/reproduce-and-fix-issues/SKILL.md": "2cb174442390be10cb7e7767e89bb1e94fda4d014426c40888397ad8286060ff", + "automations/benny/skills/setup-benny/SKILL.md": "c5bbca8d97cc6975d34e84c42ac4fd59e04c7f77892e0af534b3e58ca0fd43df", + "automations/benny/skills/triage-issue-reports/references/routing.example.md": "e5e53013692568cf69da8e8b302fff929fe2fbc9aec1a4651fd7997e2c7a4025", + "automations/benny/skills/triage-issue-reports/SKILL.md": "92a17e4d2927457541b7e903f6def93e79e22f886c4b821c56bb5c9797db4193", + "automations/benny/templates/configuration.example.yaml": "13e24b4ce9b9a0913916e85fe3b080b88d45f8e55dccfe8ae38e0751a997b6f5", + "automations/benny/templates/reproduce-automation-prompt.md": "71ec574f1844e379394ae4ef14c48d7df10afbaa319d395c788d7f856f0e6899", + "automations/benny/templates/triage-automation-prompt.md": "e0bba594547834f013ec805915610eb597e7929efe3ffbe85ae00339ee16d474" + }, + "guide": { + "docs/guide/01-setup.md": "058974e262eed41d2c24428109127898d3a6c403538570e7add515c4089d0d84", + "docs/guide/02-meta-mode.md": "681343e7135540ecd0125c83209e602c5e646534b89c2a6029cc29d4dc2455fd", + "docs/guide/03-understand.md": "c7dce3a9b1f1c0de8c00084453a3a18b69f0ad0c6616592b584e2d19add69ebd", + "docs/guide/04-design.md": "83f10b418a0f4d6ec0d7b536918d395fbcdf853f640d5dcbc1f7394a8f3d68ca", + "docs/guide/05-build-and-clean.md": "af91971988478ed0e53775d7f14f59e40ef7093b524d21df4f0b7917121b4f23", + "docs/guide/06-verify-and-ship.md": "e3a8259f2b2450692e43d607848f5a85a7cee894490452968391079e52a8ac50", + "docs/guide/07-overnight.md": "b66d8726a888fa8ed2f1b488fc1ca14ac67eab892ff655878bd09bacdcdefabc", + "docs/guide/08-principles.md": "cd8f9466703489b9eab7f5b54e8dce6101c212f045dfe7f519f0e7e2fbf60857", + "docs/guide/09-make-it-yours.md": "bd1031fe054c60f34f4b7450ababf827d48a2bd216ae874587c9f7511f193639", + "docs/guide/10-recipes-and-pitfalls.md": "99117ae3a94ae3047caf09efc5e2106c61179abd392f35007c7b82d1aff4dffe", + "docs/guide/images/design.jpg": "b8ed07427f6a0c37dd8ba97961fc0eb5071efeee6c4a230648bdb7547f6f2a8f", + "docs/guide/images/overnight.jpg": "4b4405e4df8925c5b3abbe702f681af0f3b1f5f32271b599f95717f578f1a0c8", + "docs/guide/images/recipes.jpg": "9fa2d51b476635712737795ddef81806efaa0086bb3bfa9f9f45695d9ab0f8e8", + "docs/guide/images/router.jpg": "525843055a4efd2b10acc50a8652fd02b0834ea733a8a2f895c1eb89036017da", + "docs/guide/images/understanding.jpg": "b60587e9a9bbe2550e93be9819cf0cd4acf77d90fac769a0c43d82bd8e34e279", + "docs/guide/images/verification.jpg": "2a76b52007a1cd2866ba67fd47d7d9ef3e1118bb5a09c4665eee8c3f161bd09a", + "docs/guide/README.md": "4b0d617c745e1ff33274bea1c1bc1274f3e23514455bec97affc9e9951f2350b" + }, + "meta-mode-tools": { + "tools/meta-mode/bootstrap.ts": "d9d39f235da5512de6122f1ff28584b3a0120b170f5447a7a5868f7cf187d12a", + "tools/meta-mode/bun.lock": "6413513594536785c3fd52b14934dd52d1ce179ad3ffe99d77535f5b637435a2", + "tools/meta-mode/check-plan.mjs": "4f9432d9989880b6afc2bdda503d5b12a9d07d357ecf31936b7ab5e83bc80523", + "tools/meta-mode/orch/orch.test.ts": "174b86d21ff51ccd28d1a8c938cb2e0c6fa287b209d4ca6c03932fcb1b53372e", + "tools/meta-mode/orch/orch.ts": "f091687df627a0b75fabd54af58945a9cd6c7039ef0622012ac9ed60cd8ec434", + "tools/meta-mode/orch/store.ts": "0eae7cf69282e827b1227166f2e32cee3560f2f3e65b3f1f2faf6fb83d3b4c5b", + "tools/meta-mode/package.json": "c7ac7fd69bb925415cdc15cd636567304ee40f8d665986e45ed8c0ee658f6caf", + "tools/meta-mode/watch-pr/cli.test.ts": "a35592b4c6da96caf8d47987e9cd503fab6c7774ab87d11a43f24b4b5df2a9d1", + "tools/meta-mode/watch-pr/cli.ts": "89c08863089181a232be782c4b2ed90a1552f44aeecb0dcb7aac2c623620e680", + "tools/meta-mode/watch-pr/fakes.test-helper.ts": "e53e31b7f03068063f53a99a3591b052aaed66e4e2b196b3a364980f60324ab1", + "tools/meta-mode/watch-pr/github.test.ts": "0cbce011050522938523e36bb42a260e92b812dcd2076930fa681672ad316b24", + "tools/meta-mode/watch-pr/github.ts": "d1bbbafbe8e2c703c84da2029de7f2c4011412512f8cf65a42100f46bcb92c8a", + "tools/meta-mode/watch-pr/policy.test.ts": "a9fedb25feefd1f57ef6a662f80c99018690170a3a8070773a08eaf694d1d3d9", + "tools/meta-mode/watch-pr/policy.ts": "68d240505852cf23c9b2dea463342e9e61243f486b3cc86c735d140f9ee7be49", + "tools/meta-mode/watch-pr/render.ts": "2b709e86628d5b8fdb61f860e60ababc342b0626c67576305442cf548283a604", + "tools/meta-mode/watch-pr/tsconfig.json": "1ecccc72320b086c63ce3f73c959896fd747363e63553b3b1136296ea4069e45", + "tools/meta-mode/watch-pr/types.compile.ts": "621af4c9a664fbf699a9737efccdc248abb416df8819c9dc5f824beae2b9b1d6", + "tools/meta-mode/watch-pr/types.ts": "64ba6221e3bfe61bbb292337d199cdec6309455477280efb060203dba34e0e91", + "tools/meta-mode/watch-pr/watch-pr": "d955603be6cc0e8b8ffcec722f635192b2261410b1f2929abea94480e47eb5d4", + "tools/meta-mode/worktree-audit.sh": "9f14b5f4f70a6ada93778e49701f854796b11776edccb9f73816ee2a8b8b623c" + } } } diff --git a/profiles/upstreams.json b/profiles/upstreams.json index da55191..d075527 100644 --- a/profiles/upstreams.json +++ b/profiles/upstreams.json @@ -1,12 +1,15 @@ { "pstack": { "repository": "https://github.com/cursor/plugins/tree/main/pstack", - "commit": "f5bdd6826fd0a0d9cbc4347134c3a74a200b9d9d", + "commit": "2cbf58508f40de470d7490b55c51d71241928fa2", "renames": { "poteto-mode": "meta-mode", "setup-pstack": "setup-mstack", "poteto-agent": "meta-agent" }, + "omitSkills": { + "poteto-help": "Needs the repository README and guide pages, which the default installer does not ship, and has not been exercised by a model in mstack." + }, "artifacts": { "agents": { "source": "agents", @@ -101,6 +104,50 @@ { "from": "Writing a skill matches the [Authoring or modifying a skill playbook](../../skills/meta-mode/playbooks/authoring-a-skill.md), which routes through Cursor's built-in `create-skill`, validates the frontmatter and links, and ships the result through the Opening a PR playbook.", "to": "Writing a skill matches the [Authoring or modifying a skill playbook](../../skills/meta-mode/playbooks/authoring-a-skill.md), which routes through the active Harness's skill-authoring flow, validates the frontmatter and links, and ships the result through the Opening a PR playbook." + }, + { + "from": "Short works because the playbook holds the structure, and a Custom Mode keeps `/meta-mode` in context on every turn. [Set up mstack](./01-setup.md#run-your-first-task) shows how to start one.", + "to": "Short works because the playbook holds the structure, and `/meta-mode` stays active for the current task. [Set up mstack](./01-setup.md#run-your-first-task) says what to do when it fades." + }, + { + "from": "The cleanest isolation is a [cloud subagent](https://cursor.com/docs/subagents#cloud-subagents). Each one gets its own VM and branch, so it can install dependencies, run your app, and record video of the result without touching your machine. Type `/in-cloud` before the task, or ask the parent chat to hand work to cloud subagents.", + "to": "The cleanest isolation is a worker on its own machine or remote environment, when the active Harness offers one. Each gets its own branch, so it can install dependencies, run your app, and record the result without touching your machine. Ask the parent chat to hand the work to remote workers." + }, + { + "from": "an isolated worktree or cloud agent, and a decision log", + "to": "an isolated worktree or remote worker, and a decision log" + }, + { + "from": "or that you're about to go offline or restart Cursor.", + "to": "or that you're about to go offline or restart the Harness." + }, + { + "from": "A [Cursor Project](https://cursor.com/blog/projects) gives one coordinator agent a persistent thread. The coordinator doesn't write code. It directs subagents, which run in the cloud by default, so the work continues when your laptop is closed. That's the shape the Orchestrate playbook expects.", + "to": "A coordinator agent with a persistent thread, such as a Harness project or a long-lived session, directs subagents and doesn't write code itself. When the Harness runs subagents remotely, the work continues when your laptop is closed. That's the shape the Orchestrate playbook expects." + }, + { + "from": "- Give each body of work its own Project, such as a feature, a migration, a perf push, or a tech-debt cleanup. Several can run side by side.\n- Drag related chats into the Project, finished ones included. They become context for every agent in it.", + "to": "- Give each body of work its own coordinator thread, such as a feature, a migration, a perf push, or a tech-debt cleanup. Several can run side by side.\n- Point the coordinator at related finished chats and notes. They become context for every agent under it." + }, + { + "from": "One prompt can carry a whole Project, from research through execution:", + "to": "One prompt can carry a whole program, from research through execution:" + }, + { + "from": "Run them as cloud agents, or say \"own worktree per attempt\".", + "to": "Run them on separate machines, or say \"own worktree per attempt\"." + }, + { + "from": "## Load the TypeScript rules by name\n\n[`typescript-best-practices`](../../skills/typescript-best-practices/SKILL.md) turns the type-system principles into concrete rules: discriminated unions, `unknown` at boundaries, exhaustive variants, schema-derived types. It doesn't load on its own, so type `/typescript-best-practices` when a task touches `.ts` or `.tsx` files.", + "to": "## Let the TypeScript rules load themselves\n\n[`typescript-best-practices`](../../skills/typescript-best-practices/SKILL.md) has no slash command in your workflow. It loads whenever the agent touches a `.ts` or `.tsx` file and turns the type-system principles into concrete rules: discriminated unions, `unknown` at boundaries, exhaustive variants, schema-derived types." + }, + { + "from": "## Ask how without starting the work\n\n```text\n/poteto-help how do i get meta-mode to stay on every turn?\n```\n\nYou get an answer, a prompt to send, and a link to the source. Nothing runs until you send that prompt.\n\n", + "to": "" + }, + { + "from": "When you're stuck, or can't tell which skill fits, type [`/poteto-help`](../../skills/poteto-help/SKILL.md) with your question:\n\n```text\n/poteto-help which skill should i use to review this branch?\n```\n\nIt answers, hands you a prompt to send, and links the skill or guide page the answer came from. It doesn't start the work, because a mstack run spends real tokens, so you send the prompt when you're ready. It runs only when you type it.\n\n", + "to": "" } ] }, diff --git a/scripts/agent-format.test.mjs b/scripts/agent-format.test.mjs index b2d75c1..7809283 100644 --- a/scripts/agent-format.test.mjs +++ b/scripts/agent-format.test.mjs @@ -103,3 +103,16 @@ test("round-trips actual agent files and escaped strings through Python's standa }); assert.equal(result.status, 0, result.stderr); }); + +test("the routing agent description matches meta-mode's fresh-subagent rule", () => { + const agent = readFileSync(new URL("../agents/meta-agent.md", import.meta.url), "utf8"); + const description = agent.match(/^description: (.*)$/m)?.[1] ?? ""; + const skill = readFileSync(new URL("../skills/meta-mode/SKILL.md", import.meta.url), "utf8"); + assert.match(skill, /\*\*Fresh subagents by default\.\*\*/); + assert.match(description, /Spawn a fresh `meta-agent` for each new task/); + assert.doesNotMatch(description, /Resume an existing/); + // The reuse cases come from meta-mode's own list, so the two files cannot drift apart. + const cases = skill.match(/costly to move: (its [^,]+), (its [^,]+), or (a process it still runs)/); + assert.ok(cases, "meta-mode no longer lists the reuse cases"); + for (const reuse of cases.slice(1)) assert.ok(description.includes(reuse), `description omits "${reuse}"`); +}); diff --git a/scripts/check-upstream.mjs b/scripts/check-upstream.mjs index 6fe8b83..ac596b5 100644 --- a/scripts/check-upstream.mjs +++ b/scripts/check-upstream.mjs @@ -150,8 +150,9 @@ for (const problem of provenanceProblems) { } const renames = pstack.renames ?? {}; +const omitSkills = pstack.omitSkills ?? {}; const expected = readdirSync(sourceSkills, { withFileTypes: true }) - .filter((entry) => entry.isDirectory()) + .filter((entry) => entry.isDirectory() && omitSkills[entry.name] === undefined) .map((entry) => profilePath(renames[entry.name] ?? entry.name, `skill rename for ${entry.name}`, { allowRoot: false })) .sort(); const targetSkills = resolveInside(targetRoot, "skills", "target skills directory"); @@ -372,7 +373,7 @@ if (strict) artifactProblems += adaptationProblems.length; } else { const canonicalProblems = []; for (const sourceName of readdirSync(sourceSkills, { withFileTypes: true }) - .filter((entry) => entry.isDirectory()) + .filter((entry) => entry.isDirectory() && omitSkills[entry.name] === undefined) .map((entry) => entry.name)) { const targetName = renames[sourceName] ?? sourceName; const entry = canonicalSkills[targetName]; diff --git a/scripts/skill-baseline-lib.mjs b/scripts/skill-baseline-lib.mjs index 630d821..0ce73c6 100644 --- a/scripts/skill-baseline-lib.mjs +++ b/scripts/skill-baseline-lib.mjs @@ -133,7 +133,18 @@ export function buildBaseline(root, sourceRoots) { ); const usedMoves = new Set(); const usedOmissions = new Set(); + const omittedSkills = upstreams[name].omitSkills ?? {}; + const usedSkillOmissions = new Set(); for (const [sourceSkill, targetSkill] of Object.entries(skills)) { + const skillReason = omittedSkills[sourceSkill.split("/").at(-1)]; + if (skillReason !== undefined) { + if (typeof skillReason !== "string" || !skillReason.trim()) throw new Error(`${sourceSkill}: skill omission requires a reason`); + for (const source of filesUnder(sourceRoot, sourceSkill)) { + manifest.omitted[`${name}:${source}`] = { upstream: name, source, sourceDigest: contentDigest(sourceRoot, source), reason: skillReason }; + } + usedSkillOmissions.add(sourceSkill.split("/").at(-1)); + continue; + } if (owners.has(targetSkill)) throw new Error(`Multiple sources own skill ${targetSkill}`); owners.add(targetSkill); if (!existsSync(inside(sourceRoot, `${sourceSkill}/SKILL.md`))) throw new Error(`${sourceSkill}: missing source SKILL.md`); @@ -166,6 +177,7 @@ export function buildBaseline(root, sourceRoots) { } for (const path of Object.keys(spec.moves ?? {})) if (!usedMoves.has(path)) throw new Error(`${path}: stale move rule`); for (const path of Object.keys(spec.omit ?? {})) if (!usedOmissions.has(path)) throw new Error(`${path}: stale omission rule`); + for (const skill of Object.keys(omittedSkills)) if (!usedSkillOmissions.has(skill)) throw new Error(`${skill}: stale skill omission rule`); } const expectedSkills = json(root, "profiles/skills.json").skills; if (JSON.stringify([...owners].sort()) !== JSON.stringify([...expectedSkills].sort())) throw new Error("Skill sources do not cover the declared skill inventory"); diff --git a/skills/architect/SKILL.md b/skills/architect/SKILL.md index 8935d57..adca3a5 100644 --- a/skills/architect/SKILL.md +++ b/skills/architect/SKILL.md @@ -33,7 +33,7 @@ Use the active mstack model configuration's `candidate` role for architect runne Design it twice. Require at least two structurally distinct candidates before synthesis, even when the first looks sufficient. This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape. -Screen every candidate against [`references/design-red-flags.md`](references/design-red-flags.md) before synthesis. Reject or revise shallow modules, information leakage, temporal decomposition, and pass-through methods. +Screen every candidate against [`references/design-red-flags.md`](references/design-red-flags.md) before synthesis. Assume the next contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Prefer the design where a change that looks right from one file is right for the whole repo. Compare viable candidates on interface depth. Prefer the design that hides more complexity behind a smaller, simpler public surface. A rich interface can keep call chains short by concentrating capability instead of scattering it across layers. diff --git a/skills/architect/references/design-red-flags.md b/skills/architect/references/design-red-flags.md index 32cb240..f8503c9 100644 --- a/skills/architect/references/design-red-flags.md +++ b/skills/architect/references/design-red-flags.md @@ -31,3 +31,27 @@ Group code around domain knowledge and ownership. Methods that run at different A pass-through method forwards the same arguments to another method with the same shape. It adds a layer without hiding complexity. Remove it or move responsibility to the module that can complete the operation. Keep a forwarding boundary only when it adds policy, adaptation, or a distinct abstraction. + +## Split ownership + +More than one module writes the same state or keeps its own copy of it. An agent that edits one writer can't see the others, so their rules diverge. + +Give each piece of state one owner. Other modules read it or ask the owner to change it. + +## Two ways to do one task + +The design supports more than one way to do the same task. An agent copies whichever way it finds first, so every way keeps gaining callers. + +Keep one way. Move callers off the others and delete them in the same change. + +## Importable internals + +A caller can import a module's internals. An agent takes the shortest path that compiles, so it imports them directly and they become part of the interface. + +Make internals unreachable from outside the module, so an import from outside fails the build. + +## Hand-synced list + +Two or more places list the same items, and adding an item means editing every list. An agent that sees one list updates only that one. + +Keep one list and derive the others from it. If a list can't be derived, make the build fail when the lists disagree. diff --git a/skills/benchmark-checklist/SKILL.md b/skills/benchmark-checklist/SKILL.md new file mode 100644 index 0000000..04cc322 --- /dev/null +++ b/skills/benchmark-checklist/SKILL.md @@ -0,0 +1,39 @@ +--- +name: benchmark-checklist +description: "Vet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you run a benchmark or report a speedup or regression you measured." +--- + +# Benchmark checklist + +Use this when you produce a performance number: a PR's before and after, a regression claim, a hillclimb harness, or a library or config choice. [Explain the Number](../principle-explain-the-number/SKILL.md) says why. Answer each question below with evidence from a run, not from a guess about the code. + +For a quick ballpark the user asked for, one run is enough. Still check questions 4 and 7, and say that it is one run. Skip the rest unless that run looks wrong. A choice between options is never a ballpark. + +## Before you run anything + +- Write down the claim you expect to make, in the words you would ship ("export is 30% faster at p50 on the 60k-row dataset"). The questions test that sentence. +- Read the measurement script. Note what it times, what it counts, and what it ignores. +- Check the system load and the core count, for example with `uptime` and `nproc` or the platform equivalent. If the machine is busy, find out what is running. If you cannot stop it, interleave the sides so both see the same noise, and say so in the report. +- The tools named below are Linux and macOS examples. On Windows, `$env:NUMBER_OF_PROCESSORS`, `Get-CimInstance Win32_Processor`, `Get-Counter`, Process Explorer, and WPR or ETW give the same evidence. On any platform, the evidence names the tool and the run it came from. + +## The questions + +1. **Why not double?** Name the limiter. Profile in a run you do not report, because profilers and tracers slow the work down. Use CPU per process (`top`, `pidstat`), a profiler for the runtime (`node --cpu-prof`, `py-spy`, `perf`), I/O wait, and syscall counts (`strace -c` on Linux). Then map the hot spot to source. Watch the load generator too. If it saturates first, you measured the load generator. If a change did not move the number, the limiter explains why, so find it before you call the change useless. +2. **Was it tuned?** Run every side the way production runs it: release builds, production flags and env, batching and transaction settings, connection pools, caches as warm or cold as production sees them, and the same versions and data. If one side runs on defaults, you compared configurations, not implementations. A limiter that is a setting, such as a commit per row, a debug build, or a missing index, means that side is untuned. Tune it and measure again before you pick a winner. If you cannot tune it, do not pick a winner from that run. Narrowing the claim to the code as it ships today does not fix this when the user is choosing what to adopt, because they adopt the option, not today's settings. +3. **Did it break limits?** Do the arithmetic. Compare bytes per second with disk and network bandwidth, and operations per second times the cost per operation with the cores you have. Compare the time saved with the time the changed piece took. Removing a piece that takes 10% of the run can make the run at most about 11% faster. A result past a limit means the run measured something other than the work, such as a cache, a no-op, or a bug. +4. **Did it error?** Count failures and non-success responses, and check that the outputs are correct, not just present. Errors behave differently from successes. Rejections are often fast, and timeouts and retries are slow. If the script does not count errors, add the count. +5. **Does it reproduce?** Run each side at least 5 times, and alternate the sides (A, B, A, B, and so on) so that warmup, lazy initialization, caches, and drift do not favor one side. Report the median and the range. Treat a gap smaller than the run-to-run variation as no measurable difference. When the call is close, use a rank-sum test or the harness's own statistics. +6. **Does it matter?** Next to any micro result, measure the end-to-end path a user waits on, with realistic data sizes and concurrency. Report the micro result as a share of the whole. A helper that takes 1% of a request can make the request at most 1% faster, however fast the helper gets. +7. **Did it even happen?** Confirm the work ran inside the timed region. The request reached the server, the rows were written, the bytes were read, and the code used the result. Lazy code (generators nobody iterates, promises nobody awaits, results the JIT can discard) and timeouts all produce numbers for work that never happened. + +## Report + +- Lead with the verdict: faster, slower, no measurable difference, or inconclusive. +- Give the number with its unit, the run count, the range, and the limiter. For example, "p50 41 ms → 33 ms, median of 7 runs per side, range 32 to 35 ms after, bound by JSON parsing on one core." +- Call the verdict inconclusive when you claim a difference but cannot name the limiter, when a side ran untuned, or when you could not check questions 4 and 7. Name the gap. +- Keep a PR body to one primary number, per the **Opening a PR** playbook. Put the runs, the range, and the limiter evidence in a linked artifact or a notes file. + +## How this fits the other perf material + +- The **Perf issue** playbook finds and fixes slowness, and the performance mantras in its step 2 generate the fixes. This skill vets its baseline before the playbook plans from it, and every number after that. +- The **Hillclimb** playbook loops on one metric. This skill vets its harness before the harness is frozen. The frozen harness then prints error and work counts, so each keep-or-revert checks questions 4 and 7 for free. diff --git a/skills/correct/SKILL.md b/skills/correct/SKILL.md new file mode 100644 index 0000000..a7ccc5e --- /dev/null +++ b/skills/correct/SKILL.md @@ -0,0 +1,31 @@ +--- +name: correct +description: "Find the mistakes agents keep repeating in this repo and make each one impossible. Try architecture first, then types, then a lint whose error names the fix, then a test, and write docs last. Prove each check fails on a real past mistake. Repeat this each time the operator corrects you. Use for /correct." +--- + +# Correct + +The operator keeps correcting agents in this repo for the same mistakes. Change the repo so the next agent can't make them. + +Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Design the repo so a change that looks right from one file is right for the whole repo. + +## Find the mistake classes + +First, read recent commits, reverts, review comments, agent instruction files, and comments that explain workarounds. Group the mistakes into classes. A class counts once it has happened twice. + +## Fix each class at the highest level that works + +1. **Eliminate it with architecture.** Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy. +2. **Enforce it with types so the bad state can't be written.** If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more. +3. **Test the behavior.** Fix or delete any test that would still pass if every function it calls returned nothing. +4. **Write docs or agent rules last, only for judgment calls.** Nothing fails when an agent skips them. + +## Fix and prove + +Then fix the most frequent classes now, one commit each. Prove each new check fails on a real past mistake. Run the same command locally and in CI. Exceptions go on the offending line with a reason, an expiry date, and a human's approval. + +## Keep the rule table + +Last, keep a table in the agent instruction file that pairs each rule with what enforces it. When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that's a repeat, so fix it at the highest level in the same change. Drop a rule once its mistake can't happen. + +**Reply:** each class with its evidence, the level you picked, and why a higher level didn't work. diff --git a/skills/how/references/explorer-prompt.md b/skills/how/references/explorer-prompt.md index 8b898d9..9b4b059 100644 --- a/skills/how/references/explorer-prompt.md +++ b/skills/how/references/explorer-prompt.md @@ -4,7 +4,7 @@ Build each explorer subagent's prompt from this template. Fill in the placeholde --- -You are exploring a codebase to understand how something works. Gather facts: trace code paths, read implementations, map components. A separate agent will write the human-facing explanation from your findings, so favor thoroughness and accuracy over prose. +You are exploring a codebase to understand how something works. Gather facts. Trace code paths, read implementations, map components. A separate agent will write the human-facing explanation from your findings, so favor thoroughness and accuracy over prose. Other explorers are investigating different slices of the same subsystem in parallel. Don't try to cover everything. Focus on your assigned angle and go deep. diff --git a/skills/meta-mode/SKILL.md b/skills/meta-mode/SKILL.md index 4e60127..eb4cdac 100644 --- a/skills/meta-mode/SKILL.md +++ b/skills/meta-mode/SKILL.md @@ -29,7 +29,7 @@ The Principles section below grounds every trigger. In your reply, name each pri Remaining triggers: - Nontrivial change, architecture decision, or "are we sure?" → the **how** skill. -- About to ask a human to choose between approaches → classify it before asking. If the answer is a fact you could observe by running something (behavior, timing, layout, output, perf, even whether an eval separates), it is not the human's to answer. Sketch it via the Prototype playbook (`playbooks/prototype.md`) and let the result decide. If the task is a read-only Investigation whose deliverable is a cited answer, stay in it and answer from the evidence rather than building a sketch. Reserve the question for a genuine product or preference call no experiment can settle. +- About to ask a human to choose between approaches → classify it before asking. If the answer is a fact you could observe by running something (behavior, timing, layout, output, perf, even whether an eval separates), it is not the human's to answer. Sketch it via the Prototype playbook (`playbooks/prototype.md`) and let the result decide. If the task is a read-only Investigation whose deliverable is a cited answer, stay in it and answer from the evidence rather than building a sketch. Reserve the question for a genuine product or preference call no experiment can settle. Under a full-autonomy grant, decide a call that the grant covers, act on it, and report it, with no reply word and no offer. Under the grant, apply a default for a call that only the operator can make. Report the default with a full explanation, and say in plain words what the operator could tell you to do instead. The operator answers in their own words. Never give a shorthand token to type back. Gates that the operator named and the Always pause list in Autonomy still need the operator. - Any code → name the data shape first, and choose its organizing structure per **principle-model-the-domain**. - Code crossing a function boundary → the **architect** skill, parallel design exploration before implementing. - Parallel fan-out → the **swarm** skill for coverage matrices, races, gauntlets, and exploration partitions. Use **arena** for design or code bakeoffs with base selection and grafting. @@ -40,6 +40,7 @@ Remaining triggers: - Before commit → the active Harness cleanup command. - Before review → the **no-comments** skill (`/no-comments`). - Shipping UI / IDE / CLI → use the matching control skill exposed by the active Harness. For bug fixes, reproduce first on the same surface yourself. Hand to the user only under the narrow Bug fix step 1 exception. +- Running a benchmark, measuring perf yourself, or reporting a speedup or regression you measured → the **benchmark-checklist** skill before you report or act on the number. - Any PR-status request → the **Babysit** playbook (`playbooks/babysit.md`). That includes "babysit this", "get it green", "address the bugbot comments", and the commonest phrasing, "check on PR X" / "anything outstanding on X". Never triggered by merely opening a PR. Declare its mode before polling. The playbook's step 1 owns the request-to-mode mapping. Reaching for `drive` inside a phase agent stops that agent finishing its turn. - Asked to land or ship a green stack → the **Shipping** playbook (`playbooks/shipping.md`). Green is not safe. Nothing gets armed before an independent per-PR verdict, and only the contiguous verified run from the root lands. - Bugbot or the agentic security review commented → skeptical posture. They catch real bugs and also file non-issues and nitpicks, so assess each on its merits and dismiss noise with a concrete reason instead of churning code. Triage fix / dismiss / ask per `references/bugbot-triage.md`. @@ -101,6 +102,7 @@ Read the leaf skill in full for any principle you apply. Each entry names when i - **Fix Root Causes** (**principle-fix-root-causes**). Debugging. Trace each symptom to its root cause, reproduce first, ask why until you reach it. - **Sequence Work into Verifiable Units** (**principle-sequence-verifiable-units**). Multi-step work (sweeps, migrations, runs of similar edits) and how you stack commits and PRs. Break work into small units that each end in a check, verify each before the next, and order delivery so the sequence proves itself. - **Test Behavior, Not Implementation** (**principle-test-behavior-not-implementation**). Writing, changing, or keeping a test. Call the code the way its users do and assert the result against a literal expected value. If the test would still pass when every imported function returns `undefined`, rewrite the assertion or delete the test. +- **Explain the Number** (**principle-explain-the-number**). Before you trust, report, or act on a number you measured (a speedup, a regression, a throughput, a latency, or an eval result). Find what limits it, and rule out that it measured something other than the work you think. **Delegation** @@ -145,7 +147,9 @@ cycle when a fixed-size workflow needs more workers. `interrogate` instead runs one reviewer per entry. CLI fanout via `--all-models` requires `--read-only`; launch writable workers individually with separate worktrees. -You own every subagent's work. Review the diff and write your own summary, don't pass through what it said. Interrupt-chained resumes silently drop directives, so fire a fresh subagent with consolidated scope rather than trusting a "done" summary. A second opinion is the same prompt against a different model. Agreement is high-signal. +You own every subagent's work. Review the diff and write your own summary, don't pass through what it said. A second opinion is the same prompt against a different model. Agreement is high-signal. + +**Fresh subagents by default.** Give new work to a fresh subagent with consolidated scope, meaning the original brief, every later directive, and the prior agent's report and branch. This holds for a fix round, a follow-up, a retry, and the next queue item. Resume, message, or queue a follow-up on an existing subagent only when the new work strictly needs state that lives in that agent and is costly to move: its local checkout, its uncommitted changes, or a process it still runs, such as a dev server, a simulator, or a babysit watcher. A stop or hold order to a running agent is not reuse. A role such as a PR owner outlives its agent. Once that agent returns, a fresh agent takes the role's next round. Interrupt-chained resumes silently drop directives, so fire a fresh subagent with consolidated scope rather than trusting a "done" summary. ## Writing the reply diff --git a/skills/meta-mode/playbooks/autopilot-full.md b/skills/meta-mode/playbooks/autopilot-full.md index dbf0749..2e489dd 100644 --- a/skills/meta-mode/playbooks/autopilot-full.md +++ b/skills/meta-mode/playbooks/autopilot-full.md @@ -2,12 +2,12 @@ **You own the verdicts, never the PRs. One owner runs each PR from build to merge, and nothing merges without your clean swarm verdict.** For "autopilot this queue", "full autopilot", and one-owner-per-PR programs. Orchestrate runs a standing program whose coordinator lands verified work itself and whose workers never merge. Here each PR's owner carries the whole lifecycle through the merge, and the root keeps only verification, countersigns, and audits. -1. **Mark the operator's items and honor state-then-wait.** Items the operator names stay with the operator. The operator reviews and clicks, and no owner merges one. When the operator asks for the protocol or the plan to be stated, deliver the statement and stop. Execution starts only on the operator's explicit go. On that go, arm a `/goal` with the full program objective. The goal continues across turns until the queue is done. -2. **Spawn one owner per PR with the full lifecycle and an early trail.** Resolve the forge once for the program. GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr ...` for PR create, edit, view, watch, and merge operations. Otherwise stay on `gh` and record the fallback. Never require Graphite (`gt`). One remote worker per PR owns the build, first push, ready PR, proof on the real artifact, review-comment triage, prose cleanup with `unslop`, the **no-comments** skill, a rebase onto current trunk, the babysit loop to green (`playbooks/babysit.md`), and the merge itself. Every owner starts a `decisions.tsv` trail per the **show-me-your-work** skill, pushes its first branch snapshot, and opens the PR ready, never draft. Open the PR before self-proof so the URL, decisions, and checks form a durable trail. Keep `decisions.tsv` uncommitted and return it with the reports. As soon as a subagent starts, the owner records its ID, expected runtime of at least the longest past run of that kind, and state in a local `children.tsv`. The owner rebases before the code-ready report and babysit, whether or not trunk has drifted. Fix rounds keep that merge base. Rebase again only at merge prep, on a `git merge-tree` conflict with trunk, or on a CI failure caused by a change on trunk. After cleanup, report the code-ready head SHA and the SHA of every later push that changes the patch. Self-proof, CI, and babysit run in parallel with the swarm. Report merge-ready with the head SHA when they finish. Before a push starts a round, run the repository's required pre-review checks on the committed head. A hook pass is not proof. Publish a rebase only to the owner's branch with `git push --force-with-lease` after an `ls-remote` check. Never force-push a shared branch. The merge is the one step an owner may not take alone. Step 4 gates it. +1. **Mark the operator's items and honor state-then-wait.** Items the operator names stay with the operator. The operator reviews and clicks, and no owner merges one. When the operator asks for the protocol or the plan to be stated, deliver the statement and stop. Execution starts only on the operator's explicit go. On that go, record the program objective: the queue and its order, the items the operator named, the verification rule, who merges, and the done condition. Write it to `program.md` beside the root's `decisions.tsv` (the work directory, or `.audit/-program.md`), uncommitted, and also to the active Harness's goal or objective mechanism when it has one. It stays in force across turns until its done condition holds. +2. **Spawn one owner per PR with the full lifecycle and an early trail.** Resolve the forge once for the program. GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr ...` for PR create, edit, view, watch, and merge operations. Otherwise stay on `gh` and record the fallback. Never require Graphite (`gt`). Prefer the run's built-in PR tool for the operations it supports, as in Opening a PR, and use the resolved forge CLI for the rest. One remote worker per PR owns the build, first push, ready PR, proof on the real artifact, review-comment triage, prose cleanup with `unslop`, the **no-comments** skill, a rebase onto current trunk, the babysit loop to green (`playbooks/babysit.md`), and the merge itself. Every owner starts a `decisions.tsv` trail per the **show-me-your-work** skill, pushes its first branch snapshot, and opens the PR ready, never draft. After that, the owner pushes its branch again after every verifiable unit (hooks on, a WIP commit is fine). Open the PR before self-proof so the URL, decisions, and checks form a durable trail. Keep `decisions.tsv` uncommitted and return it with the reports. As soon as a subagent starts, the owner records its ID, expected runtime of at least the longest past run of that kind, and state in a local `children.tsv`. The owner rebases before the code-ready report and babysit, whether or not trunk has drifted. Fix rounds keep that merge base. Rebase again only at merge prep, on a `git merge-tree` conflict with trunk, or on a CI failure caused by a change on trunk. After cleanup, report the code-ready head SHA and the SHA of every later push that changes the patch. Self-proof, CI, and babysit run in parallel with the swarm. Report merge-ready with the head SHA when they finish. Before a push starts a round, run the repository's required pre-review checks on the committed head. A hook pass is not proof. Publish a rebase only to the owner's branch with `git push --force-with-lease` after an `ls-remote` check. Never force-push a shared branch. The merge is the one step an owner may not take alone. Step 4 gates it. 3. **Run owners in true parallel and never stack.** Many owners at once when PRs are self-contained: one writer per branch, disjoint files, cross-PR drift absorbed by rebase. Only genuinely overlapping work serializes. Self-contained PRs branch straight off main, and sequenced work is merge-then-branch. One exception: an owner that must split a genuinely dependent change may hold a short private base-branch stack. 4. **Swarm-verify each round before its merge.** A round starts at the code-ready head SHA and at every later push that changes the patch. At that SHA, fan out parallel independent verifiers per the **swarm** skill and aggregate to one verdict. Merge requires a clean verdict whose lane results remain valid for the merge-ready head under `playbooks/shipping.md`. Audit the merge-ready receipts before the verdict. The lanes re-run the gates at that SHA and prove the load-bearing behavior on the real surface through its runtime driver. Audit the diff in two or more independent review lanes, each with the full brief and a main focus such as consumer parity, lifetimes and races, or data and config safety. Distrust the PR body. **Regression lane against trunk.** Run the same load-bearing scenario on current trunk. If trunk does not have the feature, record that fact and gate the behavior the diff adds plus the end state the user waits for instead of pretending trunk can produce it. The live lane is the floor, and a verdict without it is not clean. No merge without the root's clean verdict. Send every proven finding to the owner in one fix-forward, including defects filed as notes. For each behavior finding, request a red test covering every site with the same defect, or a repro receipt when no test can show it. Carry that defect into the next round's brief. The new head gets a fresh swarm and verdict, except for results that remain valid under the patch-id rule in `playbooks/shipping.md`. -5. **On a clean verdict the owner merges and takes the next item.** The owner merges only from a head freshly rebased onto trunk. Merge prep starts only after the round's lanes have started and ends with a rebase onto current trunk immediately before merge. The owner reports the new head SHA. CI must pass on that head, and the patch-id rule in `playbooks/shipping.md` decides whether the round's verdict still holds. If trunk moves again before the merge, the patch-id rule in `playbooks/shipping.md` governs re-verification. A new head voids the verdict unless the shipping playbook's patch-id or build-output reuse rule preserves the affected lane results. The owner squash-merges its own PR through the resolved forge and picks up its next self-contained item from the queue. The operator's full-autonomy grant plus the root's clean verdict is the merge authorization that babysitting alone never has. Operator-named items stop at merge-ready and wait for the operator's click. -6. **Run the root layer.** A genuinely new raise of a pinned gate or budget value (a limit CI only lets tighten) needs your fresh countersign, granted only after verifier proof. When the operator's grant covers approvals, the countersign is the approval. The owner records it in the form the tool's approval contract permits, with a pointer to the countersign. A lane verifies that record. The root never bypasses a forge-enforced approval. Absorbing values that already landed on main is drift, not a raise. Run an audit tick over all owners roughly every 30 minutes. A local root arms each tick as a real terminal `/loop`. The loop uses a monitored-shell 30-minute sleep and emits an output-notification sentinel. A cloud root uses the existing cloud-sleeper wake chain instead. Never leave the cadence to memory or lossy completion notifications. At each tick, re-read `/meta-mode/playbooks/autopilot-full.md` from the active skill installation, then re-read the armed `/goal`. Audit the operation against both. Fix drift during that tick. Probe each owner with a generic liveness or status check, and collect the decision trails. Count only side effects as progress: commits, pushes, PR or check deltas, and store reports. Treat a lane that errors or passes its expected runtime without a side effect as stuck. Stand it down and dispatch a replacement at once. Do not wait for a polite return. Each tick checks the platform's agent list when available and every owner's `children.tsv`. Whether or not stopping succeeds, record the child as stuck and replace it if its work is still needed. Apply the same rule to stalled replacements. The root takes both steps when the owner cannot. Before a replacement writes, revoke the old writer's access or give the replacement an isolated write target. A stall neither proves nor drops the work. When merges batch, run a retro pass and a post-merge bot-comment sweep. Stop the recurring audit only when no delegated work remains, even after the last merge. +5. **On a clean verdict the owner merges, and a fresh owner takes the next item.** The owner merges only from a head freshly rebased onto trunk. Merge prep starts only after the round's lanes have started and ends with a rebase onto current trunk immediately before merge. The owner reports the new head SHA. CI must pass on that head, and the patch-id rule in `playbooks/shipping.md` decides whether the round's verdict still holds. If trunk moves again before the merge, the patch-id rule in `playbooks/shipping.md` governs re-verification, and the owner rebases again, reports the new head SHA, and waits for CI to pass on it. A new head voids the verdict unless the shipping playbook's patch-id or build-output reuse rule preserves the affected lane results. The owner squash-merges its own PR through the resolved forge and returns. A fresh owner picks up the next self-contained item from the queue, per meta-mode's Subagents section. The operator's full-autonomy grant plus the root's clean verdict is the merge authorization that babysitting alone never has. Operator-named items stop at merge-ready and wait for the operator's click. +6. **Run the root layer.** A genuinely new raise of a pinned gate or budget value (a limit CI only lets tighten) needs your fresh countersign, granted only after verifier proof. When the operator's grant covers approvals, the countersign is the approval. The owner records it in the form the tool's approval contract permits, with a pointer to the countersign. A lane verifies that record. The root never bypasses a forge-enforced approval. Absorbing values that already landed on main is drift, not a raise. Run an audit tick over all owners every hour. On the operator's go, arm a recurring hourly wake that runs this tick. Use the active Harness's native loop or scheduled wake (`/loop 1h` where it exists), or a persistent local process with a saved log. Never leave the cadence to memory or lossy completion notifications. At each tick, re-read `/meta-mode/playbooks/autopilot-full.md` from the active skill installation and the program objective of step 1, and audit the operation against both. After a restart or context compaction, the objective file is how the root recovers the queue, order, and done condition. Fix drift during that tick. Probe each owner with a generic liveness or status check, and collect the decision trails. Count only side effects as progress: commits, pushes, PR or check deltas, and store reports. Treat a lane that errors or passes its expected runtime without a side effect as stuck. Stand it down and dispatch a replacement at once. Do not wait for a polite return. The tick judges an owner by the pushed branch and the decision trail that step 2 requires, and it replaces an owner whose agent cannot start a turn. Each tick checks the platform's agent list when available and every owner's `children.tsv`. Whether or not stopping succeeds, record the child as stuck and replace it if its work is still needed. Apply the same rule to stalled replacements. The root takes both steps when the owner cannot. Before a replacement writes, revoke the old writer's access or give the replacement an isolated write target. A stall neither proves nor drops the work. When merges batch, run a retro pass and a post-merge bot-comment sweep. Stop the recurring audit only when the objective's done condition holds and no delegated work remains, even after the last merge. 7. **Stand down instantly on the operator's stop.** The operator's hold or stand-down reaches every owner as a zero-writes order immediately. Owners hold their briefs until the operator releases them. -**Reply:** the queue with each PR's owner, state, and head SHA. Each verdict and the swarm that produced it. What merged and what each owner took next. Countersigns granted and why. Open operator gates. Where the collected decision trails live. +**Reply:** the queue with each PR's owner, state, and head SHA. Each verdict and the swarm that produced it. What merged and what each fresh owner took next. Countersigns granted and why. Open operator gates. Where the collected decision trails live. diff --git a/skills/meta-mode/playbooks/autopilot-stack.md b/skills/meta-mode/playbooks/autopilot-stack.md index ad9c9ad..d4fa9c2 100644 --- a/skills/meta-mode/playbooks/autopilot-stack.md +++ b/skills/meta-mode/playbooks/autopilot-stack.md @@ -2,12 +2,12 @@ **You own the stack, never the landing. Build and verify the queue with full autonomy, then hand the operator one linear base-branch stack to review and land.** The sibling of **Autopilot-full**. -1. **Run the owner loop unchanged.** Resolve the forge once for the program. GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr ...` for PR create, edit, view, watch, and merge operations. Otherwise stay on `gh` and record the fallback. Never require Graphite (`gt`). One remote worker per PR owns its change end to end: build, first push, a ready PR opened before self-proof, self-proof, review-comment triage, prose cleanup with `unslop`, the **no-comments** skill, and babysit to green per `playbooks/babysit.md`. Owners parallelize when the work is self-contained. Every owner starts a `decisions.tsv` trail per the **show-me-your-work** skill, pushes its first branch snapshot, and opens the PR ready, never draft. Keep the trail uncommitted and return it in the report. Owners also keep the `children.tsv` defined in Autopilot-full step 2. -2. **Audit on the wake chain.** The root runs an audit tick roughly every 30 minutes. A local root arms each tick as a real terminal `/loop`. The loop uses a monitored-shell 30-minute sleep and emits an output-notification sentinel. A cloud root uses the existing cloud-sleeper wake chain instead. Never leave the cadence to memory or lossy completion notifications. At each tick, re-read `/meta-mode/playbooks/autopilot-stack.md` from the active skill installation, then re-read the armed `/goal`. Audit the operation against both. Fix drift during that tick. Probe each owner with a generic liveness or status check. Count only side effects as progress: commits, pushes, PR or check deltas, and store reports. Treat a lane that passes its expected runtime without a side effect as stuck. Stand it down and dispatch a replacement at once. Do not wait for a polite return. Apply Autopilot-full step 6's replacement safeguards to every stack owner and replacement child. Revoke the old writer's access or give the replacement an isolated write target before it writes. Check all children and stop the recurring audit only under Autopilot-full step 6's completion condition. -3. **Hold the operator gates.** State-then-wait, so a request to state the plan is not a go. On the operator's explicit go, arm a `/goal` with the full program objective. The goal continues across turns until the chain is done. On the operator's stop, every owner takes an immediate zero-writes hold. +1. **Run the owner loop unchanged.** Resolve the forge once for the program. GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, use `origin pr ...` for PR create, edit, view, watch, and merge operations. Otherwise stay on `gh` and record the fallback. Never require Graphite (`gt`). Prefer the run's built-in PR tool for the operations it supports, as in Opening a PR, and use the resolved forge CLI for the rest. One remote worker per PR owns its change end to end: build, first push, a ready PR opened before self-proof, self-proof, review-comment triage, prose cleanup with `unslop`, the **no-comments** skill, and babysit to green per `playbooks/babysit.md`. Owners parallelize when the work is self-contained. Every owner starts a `decisions.tsv` trail per the **show-me-your-work** skill, pushes its first branch snapshot, and opens the PR ready, never draft. After that, the owner pushes its branch again after every verifiable unit (hooks on, a WIP commit is fine). Keep the trail uncommitted and return it in the report. Owners also keep the `children.tsv` defined in Autopilot-full step 2. +2. **Audit on a real loop.** The root runs an audit tick every hour. On the operator's go, the root arms the recurring hourly wake of Autopilot-full step 6. Never leave the cadence to memory or lossy completion notifications. At each tick, re-read `/meta-mode/playbooks/autopilot-stack.md` from the active skill installation and the program objective of step 3, and audit the operation against both. Fix drift during that tick. Probe each owner with a generic liveness or status check. Count only side effects as progress: commits, pushes, PR or check deltas, and store reports. Treat a lane that passes its expected runtime without a side effect as stuck. Stand it down and dispatch a replacement at once. Do not wait for a polite return. Apply Autopilot-full step 6's replacement safeguards to every stack owner and replacement child. Revoke the old writer's access or give the replacement an isolated write target before it writes. Check all children and stop the recurring audit only under Autopilot-full step 6's completion condition. +3. **Hold the operator gates.** State-then-wait, so a request to state the plan is not a go. On the operator's explicit go, record the program objective as in Autopilot-full step 1: the queue and its order, the verification rule, who lands (the operator), and the done condition, in `program.md` and the Harness's goal mechanism when it has one. On the operator's stop, every owner takes an immediate zero-writes hold. 4. **Verify each round.** The owner reports its code-ready head SHA after cleanup, and STACK-READY with the exact head SHA when its loop is green. The owner babysits only its own PR. Owner-invoked babysitting does not traverse another owner's branch and is exempt from the stack-wide frontier and singleton rules; those rules still govern an independent babysitter. The root verifies each round per Autopilot-full step 4, using STACK-READY in place of merge-ready. Nothing enters the stack unverified. 5. **Append on a clean verdict, never ship.** No owner merges, arms auto-merge, or closes. A clean verdict appends the PR to the one linear base-branch stack, in verified order or an order the operator specified. -6. **Single writer on topology, parallel writers on builds.** Owners push only their own branches and report the tip, current base, and intended parent. The root is the only topology writer. To append a PR, fetch the intended parent, rebase the child branch onto that exact parent tip, push with `--force-with-lease` only after an `ls-remote` check, and set the PR base to the parent branch. Create it with `origin pr create --status open --base ` or `gh pr create --base ` according to the resolved forge. Retarget an existing PR with `origin pr edit --base ` or `gh pr edit --base `. Only the root PR targets trunk. Never submit or register the chain through `gt`. +6. **Single writer on topology, parallel writers on builds.** Owners push only their own branches and report the tip, current base, and intended parent. The root is the only topology writer. To append a PR, fetch the intended parent, rebase the child branch onto that exact parent tip, push with `--force-with-lease` only after an `ls-remote` check, and set the PR base to the parent branch. Create it with `origin pr create --status open --base ` or `gh pr create --base ` according to the resolved forge. Retarget an existing PR with `origin pr edit --base ` or `gh pr edit --base `. Prefer the run's built-in PR tool for the operations it supports, as in Opening a PR, and use the resolved forge CLI for the rest. Only the root PR targets trunk. Never submit or register the chain through `gt`. 7. **Absorb drift at the root, then re-verify what moved.** The root fetches current trunk and rebases the chain from bottom to top. When a rebase surfaces conflicts in an owner's files, that owner fixes its own slice and the root pushes the result. A rebase rewrites every SHA above it and voids verdicts at the old SHAs. Apply the patch-id rule in `playbooks/shipping.md` at each verdict SHA. Any result that is no longer valid goes back through step 4 before delivery. Re-run mergeability and CI after every rewritten push even when the patch-id is unchanged. The countersign rule is unchanged from Autopilot-full. A genuinely new pin raises a stop for the root's fresh countersign. Absorbing drift of landed values is not a raise. 8. **Deliver the chain.** The deliverable is one linear chain of verified PRs, reviewable bottom-up in the resolved forge, every link carrying its verifier verdict in the PR body or a comment. The operator reviews and lands it, with their own clicks or by arming merge-when-ready. diff --git a/skills/meta-mode/playbooks/hillclimb.md b/skills/meta-mode/playbooks/hillclimb.md index 5ef9399..7004c57 100644 --- a/skills/meta-mode/playbooks/hillclimb.md +++ b/skills/meta-mode/playbooks/hillclimb.md @@ -5,9 +5,9 @@ Core discipline: one change, one measurement, keep or revert. Never stack untested changes, and never claim a win from code inspection (the **prove-it-works** principle skill). 1. Ground the workload and architecture before choosing the metric. Run the **how** skill over the target, name the realistic workload dimensions that can move the result (data size, history, state, concurrency), and select a case that reproduces the user's complaint. If no case reproduces it, fix the repro instead of hillclimbing. Then fix one metric, the direction that counts as better, and a checkable stop predicate that pairs a target with a floor on attempts so a lucky early win can't end the run (the example "at least 50% better than baseline and at least 10 iterations" is this shape). Use the user's numbers when given, otherwise agree them. -2. Build the measurement harness, prove its sensitivity, then freeze it (the **build-the-lever** principle skill). Run contrasting realistic workloads and confirm the target case reproduces the symptom while easier cases separate as expected. If the harness cannot distinguish them, revise the workload or metric. Once frozen, one repeatable command emits the metric, sampled enough to clear the noise (median of N, not a single run). Record the baseline metric and a green run of the regression gate (the tests that must keep passing) before any change. +2. Build the measurement harness, prove its sensitivity, then freeze it (the **build-the-lever** principle skill). Run contrasting realistic workloads and confirm the target case reproduces the symptom while easier cases separate as expected. If the harness cannot distinguish them, revise the workload or metric. Vet the harness with the **benchmark-checklist** skill before you freeze it, and make it print its error count and a count of the work done. Once frozen, one repeatable command emits the metric, sampled enough to clear the noise (median of N, not a single run). Record the baseline metric and a green run of the regression gate (the tests that must keep passing) before any change. 3. Open the decision log via the **show-me-your-work** skill. A `decision.tsv`, one row per attempt: id, hypothesis, change, before, after, delta, tests, verdict (kept or reverted), note. Read it before each attempt. Keep it out of the tree (gitignored). -4. Ground each hypothesis in the architecture model from step 1, so it names a specific mechanism ("defer X off the boot path because it blocks first paint"), not "try memoizing something". +4. Ground each hypothesis in the architecture model from step 1, so it names a specific mechanism ("defer X off the boot path because it blocks first paint"), not "try memoizing something". For a perf metric, order hypotheses by the performance mantras in step 2 of the Perf issue playbook (`playbooks/perf-issue.md`). Borrow only their order, not that step's stop rule. 5. Loop, one hypothesis per iteration: - Hand the change to a subagent using the mstack `implementer` role (default `inherit-parent`) with a tight scope. Supervise and review the diff rather than typing it (the **guard-the-context-window** principle skill). When several independent hypotheses are live, fan them to parallel subagents, each in its own worktree (the **separate-before-serializing-shared-state** principle skill). - Measure before and after with the frozen harness, and run the regression gate. diff --git a/skills/meta-mode/playbooks/multi-phase-plan.md b/skills/meta-mode/playbooks/multi-phase-plan.md index 0a27f26..aa7bb2b 100644 --- a/skills/meta-mode/playbooks/multi-phase-plan.md +++ b/skills/meta-mode/playbooks/multi-phase-plan.md @@ -32,15 +32,15 @@ Tests alone are not sufficient verification. A PR is verified only when its unit ### Arm the program - [ ] State the protocol and this plan to the operator, then stop. Start execution only on the operator's explicit go. -- [ ] On the operator's go, arm a `/goal` with this exact text. "" -- [ ] Read these from the active skill installation at program start. Re-read them at every tick. +- [ ] On the operator's go, write the program objective to `program.md` beside the decision trail (the work directory, or `.audit/-program.md`), uncommitted, and also to the active Harness's goal or objective mechanism when it has one. It names the plan path, the PR ids in order, the verification rule, who merges, and the done condition. A restarted or compacted session recovers the program from it. +- [ ] Read these from the active skill installation at program start. Re-read them and the program objective at every tick. - [ ] `/meta-mode/playbooks/.md` - [ ] `/swarm/SKILL.md` - [ ] For a repository-owned control skill, `git show origin/main:`. For an installed control skill, read ``. - [ ] `/meta-mode/playbooks/opening-a-pr.md` - [ ] `/` -- [ ] Arm the 30-minute audit tick. In a local session, a real terminal `/loop`. In a cloud root, a cloud-sleeper wake chain. Never leave the cadence to memory. -- [ ] Use this tick prompt, verbatim. "Re-read the execution playbook from the active skill installation and the armed /goal. Audit the operation against both and fix drift in this tick. Probe every active lane and judge progress by side effects only. Stand down a stuck lane and dispatch its replacement now. Then post a short status message only for tracked changes not reported earlier, such as a PR opened, code-ready head, round started or closed, verdict, merge, stuck agent and action taken, blocker added or cleared, or operator decision. Name those changes without repeating unchanged tables or blockers. With no new change, end the turn without reply text. Either way, append a decision-log row naming the reported items or none." +- [ ] On the operator's go, arm the audit tick to run every hour with the tick prompt below. Use the active Harness's native loop or scheduled wake (`/loop 1h` where it exists), or a persistent local process with a saved log. Never leave the cadence to memory. The tick ends the recurring wake only when the objective's done condition holds. +- [ ] Use this tick prompt, verbatim. "Re-read the execution playbook from the active skill installation and the program objective. Audit the operation against both and fix drift in this tick. Probe every active lane and judge progress by side effects only. Stand down a stuck lane and dispatch its replacement now. Then post a short status message only for tracked changes not reported earlier, such as a PR opened, code-ready head, round started or closed, verdict, merge, stuck agent and action taken, blocker added or cleared, or operator decision. Name those changes without repeating unchanged tables or blockers. With no new change, end the turn without reply text. Either way, append a decision-log row naming the reported items or none." - [ ] On the operator's hold or stand-down, send every owner a zero-writes order at once. ### Spawn owners @@ -54,8 +54,8 @@ Tests alone are not sufficient verification. A PR is verified only when its unit ### PR mechanics, for every PR -- [ ] Resolve the forge once. Default to `gh`; if `command -v origin` succeeds and Origin can resolve the repository, use `origin pr` for every PR operation. Record any fallback to `gh`. Never require `gt`. -- [ ] Open the PR ready, never draft, with `origin pr create --status open --base ` or `gh pr create --base ` according to the resolved forge. A stack child targets its parent branch. +- [ ] Resolve the forge once. Default to `gh`; if `command -v origin` succeeds and Origin can resolve the repository, use `origin pr` for every PR operation the run's built-in PR tool does not cover, as in **Opening a PR**. Record any fallback to `gh`. Never require `gt`. +- [ ] Open the PR ready, never draft, per **Opening a PR**. Use the run's built-in PR tool when it has one, else `origin pr create --status open --base ` or `gh pr create --base ` according to the resolved forge. A stack child targets its parent branch. - [ ] Run the repo's lint and typecheck once before the PR-facing push. Push with hooks on. - [ ] Run `unslop` before each commit and `no-comments` before review. - [ ] Triage every Bugbot and security-reviewer comment per `../references/bugbot-triage.md`. diff --git a/skills/meta-mode/playbooks/opening-a-pr.md b/skills/meta-mode/playbooks/opening-a-pr.md index 4a10c37..b845a92 100644 --- a/skills/meta-mode/playbooks/opening-a-pr.md +++ b/skills/meta-mode/playbooks/opening-a-pr.md @@ -10,23 +10,26 @@ Invoked at the end of every other playbook. **Titles.** Use Conventional Commits in the form `type(scope): subject`. Use `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, or `perf` as the type. Use the changed area, such as `mstack` or `meta-mode`, as the scope. Keep the subject short and imperative. Name a real symbol when one carries the change. For example, `fix(mstack): retarget opening-a-pr babysit trigger`. Do not add a trailing period. -**Descriptions.** The PR body is a briefing, not the lab notebook. A reviewer who has the diff should learn why the change exists, what is out of scope, and how you proved the change works. The squash commit body is the PR body. If the body would make the squash commit longer than about 40 lines, cut the body. +**Descriptions.** The PR body is a briefing, not the lab notebook. A reviewer who has the diff should learn why the change exists, what it leaves out, what it could break, and how you proved it works, in under a minute. Write short, simple sentences with few identifiers. Do not write walls of text. The squash commit body is the PR body. If the body would make the squash commit longer than about 40 lines, cut the body. -Use these sections in order. Drop a section when it has nothing to say. +Put each section under a `##` heading, not a bold lead-in, so the sections stand apart. Use these sections in order. Drop a section when it has nothing to say. -- `## Why`. State the intent and approach in one or two short paragraphs. Do not list SHAs or rebase genealogy. Do not add a "based on main" preamble. -- `## Scope`. Use bullets to list real symbols and paths. Name both sides of a rename or retarget. State what is in and out only when the boundary matters. Do not write a file-by-file essay. -- `## Tradeoffs`. Name only rejected alternatives that a reviewer would otherwise ask about. Skip this section when there was no real choice. -- `## Blast Radius`. In one to three sentences, name who or what the change touches and why the change is safe or risky. State the continuing cost if main stays red without the fix. -- `## Verification`. Name each real run path and its outcome. For a performance change, report one primary number with its unit in `before → after` form. Link the arena or swarm directory for the remaining evidence. Do not include sample-size methodology, swarm recitals, or metric tables. +- `## Why` gives the problem and the approach in one to three short sentences. Do not list SHAs or rebase genealogy. Do not add a "based on main" preamble. +- `## What changed` has one to three short bullets. Name a real symbol or path only when it carries the change. Name both sides of a rename or retarget. +- `## Scope` always names what the PR covers and what it deliberately leaves out, for example a related follow-up or a known gap. Use one to three short items. Do not list symbols or paths, and do not write a file-by-file essay. +- `## Tradeoffs` names only rejected alternatives that a reviewer would otherwise ask about. Skip this section when there was no real choice. +- `## Blast Radius` gives one or two sentences on who or what the change touches and why that is safe or risky. If main is red, state the cost of leaving it red. +- `## Verification` has one to three bullets. Each bullet names a real run path and its outcome. For a performance change, report one primary number with its unit in `before → after` form. Link the arena or swarm directory for the remaining evidence. Do not include sample-size methodology, swarm recitals, or metric tables. -After these sections, attach videos or screenshots when they prove a claim. Do not paste full SHAs, swarm or arena lane recitals, lever-correction essays, file-by-file checklists, or "CLEAN" verdicts. Put these details in a linked artifact. Do not use `## Summary` or `## Test plan` boilerplate. A commit body does not restate its subject. +After these sections, attach videos or screenshots when they prove a claim. Do not paste full SHAs, swarm or arena lane recitals, lever-correction essays, file-by-file checklists, or "CLEAN" verdicts. Put these details in a linked artifact. A commit body does not restate its subject. **Forge.** Resolve the forge before the first PR operation and keep that choice for create, edit, view, watch, and merge. GitHub CLI (`gh`) is the default. If `command -v origin` succeeds and Origin can resolve the repository, prefer `origin pr ...`. If Origin is absent or cannot resolve the repository, stay on `gh` and record the fallback. Do not require Graphite (`gt`). -**Size and stacks.** Prefer five narrow PRs to one large PR. A stack is a base-branch chain. The root PR targets trunk. Each child branch rebases onto its parent's exact tip and its PR targets the parent branch. Create a child with `origin pr create --status open --base ` or `gh pr create --base ` according to the resolved forge. Retarget an existing child with `origin pr edit --base ` or `gh pr edit --base `. Branch from trunk only for independent work. Rebase on trunk before substantial stack work. +**Built-in PR tool.** When the run provides a built-in PR tool, create, edit, retarget, and mark ready through it, never through a forge CLI. Its own instructions say how. A PR made with the CLI misses what the tool tracks, such as a description later runs can edit. Use the resolved forge for everything the tool does not cover, and for every PR operation when the run has no such tool. -**Readiness.** Open every PR ready, never as a draft. With Origin, pass `--status open`. With `gh`, omit `--draft`. Cloud-agent PR tools default to draft, so set `draft: false` on every PR creation call. If a PR still opens as a draft, run `origin pr ready ` or `gh pr ready ` according to the resolved forge. Run `origin pr view ` or `gh pr view ` before you refer to PR status. +**Size and stacks.** Prefer five narrow PRs to one large PR. A stack is a base-branch chain. The root PR targets trunk. Each child branch rebases onto its parent's exact tip and its PR targets the parent branch. Without a built-in PR tool, create a child with `origin pr create --status open --base ` or `gh pr create --base ` according to the resolved forge, and retarget an existing child with `origin pr edit --base ` or `gh pr edit --base `. Branch from trunk only for independent work. Rebase on trunk before substantial stack work. + +**Readiness.** Open every PR ready, never as a draft. A built-in PR tool can default to draft, so set `draft: false` on every creation call through it. With Origin, pass `--status open`. With `gh`, omit `--draft`. If a PR still opens as a draft, mark it ready through the PR tool, or run `origin pr ready ` or `gh pr ready ` according to the resolved forge. Run `origin pr view ` or `gh pr view ` before you refer to PR status. **Babysit.** Opening a PR does not start a babysit. Post the URL and keep building. Finish the phase or stack first. Run a separate babysit pass only when the user asks for one after the whole stack exists. A babysit for each new PR stalls the build and spends checks on commits that later waves restart. Push back when feedback drifts from intent. diff --git a/skills/meta-mode/playbooks/perf-issue.md b/skills/meta-mode/playbooks/perf-issue.md index cae4fcd..b9ab725 100644 --- a/skills/meta-mode/playbooks/perf-issue.md +++ b/skills/meta-mode/playbooks/perf-issue.md @@ -2,17 +2,18 @@ **You own the measurement story. Plan, review, verify the numbers.** Tie every fix to a measurement, don't read source instead of measuring. -1. Capture a baseline trace via the matching control skill. +1. Capture a baseline trace via the matching control skill. Vet the baseline, and each later number, with the **benchmark-checklist** skill. 2. `how` to ground hypotheses. Don't claim a perf ceiling without running it first. - Most fixes come from eight strategy families. Use them as hypothesis generators, not a checklist. A family earns an attempt only when the trace shows the signal it names. - - **Elimination.** Before optimizing the hot path, ask whether it needs to exist: a computation nobody consumes, a feature gate that's always off for this user, a sync that redundantly mirrors state, a legacy path kept "just in case". The trace shows what's slow, never that it's deletable, so this family needs the `how` pass, not the profiler. - - **Divide and conquer.** The dominant cost scales with input size. Split the work so each piece touches less (chunk, shard, prune the search space) or so independent pieces run in parallel. - - **Caching.** The same computation or fetch repeats on identical inputs. Store and reuse the result. Name what invalidates it before claiming the win. - - **Indirection.** The hot path does expensive work a cheaper intermediate could absorb: an index instead of a scan, a queue that shifts work off the interactive thread, a handle that lets a cheaper implementation swap in. Add the hop only when it removes more from the critical path than it adds. - - **Batching.** Many small operations each pay a fixed overhead (RPC, query, syscall, draw call). Coalesce them to pay the overhead once per batch. - - **Redundancy.** The wait hangs on one slow instance or attempt. Duplicate the work (replicas, hedged requests, speculative execution) and take the fastest result. The trace has to show the wait dominates and the system has headroom. - - **Lazy evaluation.** Cost lands on results that are never used or not needed yet (eager init on the boot path, rendering offscreen items). Defer the work until first use. - - **Scheduling.** The work must happen, but not during the interactive moment. Move it to where nobody is waiting: idle callbacks, a background warmup after boot, precompute before the user arrives, cleanup after the frame commits. The win is perceived latency, so measure the interactive path, not total work done. + Try the performance mantras in order, cheapest first: + 1. Don't do it. Stop work whose result nothing uses rather than cheapening it. + 2. Do it, but don't do it again. + 3. Do it less. + 4. Do it later. + 5. Do it when they're not looking. + 6. Do it concurrently. + 7. Do it cheaper. + + When an earlier mantra meets the target, stop. 3. Plan the fix from the trace. If it crosses a function boundary, `architect` first. Delegate implementation to a subagent using the mstack `implementer` role (default `inherit-parent`). Review the diff. Capture a post-fix trace. Apply the **sequence-verifiable-units** principle skill, verifying each attempt before trying the next. 4. Parse and compare the artifacts (JSON to sqlite, diff). "Inconclusive" or wrong-surface is not a pass. Flag it. diff --git a/skills/principle-explain-the-number/SKILL.md b/skills/principle-explain-the-number/SKILL.md new file mode 100644 index 0000000..72454b4 --- /dev/null +++ b/skills/principle-explain-the-number/SKILL.md @@ -0,0 +1,22 @@ +--- +name: principle-explain-the-number +description: "Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think." +--- + +# Explain the Number + +A measured number is a claim about a system. Before you trust it, report it, or act on it, find what limits it and rule out that it measured something else. + +**Why:** A run that went wrong still prints a plausible number. Requests that failed, a cache that skipped the work, code that never ran, a side left on default settings, and run-to-run noise all produce results that look fine. If you cannot say why the number is not twice as good, you do not know what you measured. + +**Pattern:** + +- **Ask "why not double?"** Name the resource or code path that bounds the result, such as a core, a lock, the disk, the network, or the load generator itself. Get it from a profile or from system counters taken during a run, then map it to source. A guess from reading the code is not a limiter. +- **List what else the number could be measuring, and rule out each one with evidence.** The usual suspects are errors, skipped or cached work, an untuned side, noise, and a piece too small to matter end to end. +- **Keep the evidence with the number.** Put the run count, the spread, and the limiter in the notes or a linked artifact, so a reader can check the claim. + +For a performance number, run the full procedure with the [benchmark-checklist](../benchmark-checklist/SKILL.md) skill. For an eval result, ask the same of the trials: did every run do the task, does the gap hold across trials and models, and does the scenario matter. + +You skipped this when the evidence behind a number has no run count, no spread, or no named limiter, or when the time saved is larger than the time the changed piece took. + +Distinct from [Prove It Works](../principle-prove-it-works/SKILL.md), which checks that an output is real. This checks that a measured number means what you say it means. diff --git a/skills/swarm/SKILL.md b/skills/swarm/SKILL.md index 413c057..5bc7771 100644 --- a/skills/swarm/SKILL.md +++ b/skills/swarm/SKILL.md @@ -36,7 +36,7 @@ If a worker drops out, proceed with N-1 and note it. ## Phase C: Aggregate -Read the terminal results. Discard any result that omits or mismatches the SHAs or method parameters required by its brief and rerun that worker once. After a second miss, record a gap. A gap does not count as a pass. For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Use first pass, rank all, or best-of. Do not paste raw worker dumps. +Read the terminal results. Discard any result that omits or mismatches the SHAs or method parameters required by its brief and respawn that worker once. After a second miss, record a gap. A gap does not count as a pass. For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Use first pass, rank all, or best-of. Do not paste raw worker dumps. Keep a compact result table, one-line evidenced issues, and explicit gaps or dropouts. diff --git a/skills/technical-writing/SKILL.md b/skills/technical-writing/SKILL.md index 9a48f33..8ac3ce4 100644 --- a/skills/technical-writing/SKILL.md +++ b/skills/technical-writing/SKILL.md @@ -47,8 +47,6 @@ Use the compass on a whole document or on one sentence. Don't mix modes: no reference tables inside a tutorial, no tutorial hand-holding inside reference, no arguing inside a how-to. Split and link instead. -Source: diataxis.fr, fetched 2026-07-18. - ## Write sentences to the reader (Google developer style) - Talk to the reader as "you", in the present tense. "Will" only for things that genuinely happen later. @@ -63,8 +61,6 @@ Source: diataxis.fr, fetched 2026-07-18. - Numbered lists for sequences, bullets for everything else. Introduce a list with a complete sentence. Keep items parallel. - Code goes in code font. UI elements go in bold. Use serial commas. Drop "etc." and say up front that a list is partial. -Source: developers.google.com/style, fetched 2026-07-18. - ## Make statements load one at a time (STE rules) - One instruction per sentence. One thought per sentence everywhere else. @@ -76,8 +72,6 @@ Source: developers.google.com/style, fetched 2026-07-18. - Write procedures as direct commands, never as narration and never in the passive: "Install the component", not "the component must be installed". - Avoid "-ing" words where you can. They take too many grammatical jobs and breed misreadings. -Source: asd-ste100.org (Issue 9, 2025), fetched 2026-07-18. The numbered rules and dictionary live in the spec PDF. The principles above are the transferable core. - ## Leave no sentence open to two readings (Global English) - Keep words like "only" and "not" next to the word they change: "only fails on growth" and "fails only on growth" say different things. @@ -93,8 +87,6 @@ Source: asd-ste100.org (Issue 9, 2025), fetched 2026-07-18. The numbered rules a - Call each thing by one name, everywhere. A doc that says "the gate", "the ratchet", and "the budget check" for one thing teaches three things. Rewording an unchanged sentence between edits costs the same way. Don't churn what didn't change. - Skip idioms, colloquialisms, Latin abbreviations, and metaphors. A non-native reader, a translator, and an agent all parse plain constructions best. -Source: Kohl, The Global English Style Guide (SAS Press). Guideline text fetched from the Internet Archive and the SAS sample chapter, 2026-07-18. - ## Voice and repo specifics - Apply the **unslop** skill to every doc this skill touches. That skill owns the slop-pattern catalog: AI vocabulary, filler, hedging, formatting tells. diff --git a/skills/typescript-best-practices/references/patterns.md b/skills/typescript-best-practices/references/patterns.md index 955c3d1..54f9711 100644 --- a/skills/typescript-best-practices/references/patterns.md +++ b/skills/typescript-best-practices/references/patterns.md @@ -165,31 +165,38 @@ Use `safeParse` when failure is an expected branch. Use the equivalent inference Every `as` is a potential runtime crash. Cast only after the type system has verified the claim. ```ts +import { z } from "zod"; + // Don't const user = data as User; -// Do. Validate fields and construct the result without an object cast. -type User = { id: string; role: "admin" | "member" }; +// Don't +function isUser(data: unknown): data is User { + return typeof data === "object" && data !== null && "id" in data; +} + +// Do +const userSchema = z.object({ id: z.string(), name: z.string() }); +type User = z.infer; function parseUser(data: unknown): User { - if (typeof data !== "object" || data === null) { - throw new Error("expected object"); - } - if (!("id" in data) || typeof data.id !== "string") { - throw new Error("expected id"); - } - if (!("role" in data) || (data.role !== "admin" && data.role !== "member")) { - throw new Error("expected admin or member role"); - } - return { id: data.id, role: data.role }; + return userSchema.parse(data); } ``` +When the type comes first, annotate the validator with the type it proves. The compiler then rejects a validator that proves less than the type. Remove `name` from the object below and the assignment fails to compile. + +```ts +type User = { id: string; name: string }; + +const userSchema: z.ZodType = z.object({ id: z.string(), name: z.string() }); +``` + When refactoring an `as` out of existing code, identify why TypeScript can't infer: - Missing discriminant: add one, switch to a discriminated union. - Overly wide source type (e.g. `Record`): narrow it. -- Untyped boundary: add a parse function or schema. +- Untyped boundary: parse with the schema that owns the shape. Add a schema only where none exists. - Genuinely inexpressible: use a branded type or `satisfies`. ## Narrowing hierarchy diff --git a/tools/meta-mode/check-plan.mjs b/tools/meta-mode/check-plan.mjs index 87a020e..a132491 100644 --- a/tools/meta-mode/check-plan.mjs +++ b/tools/meta-mode/check-plan.mjs @@ -17,7 +17,7 @@ const SUB_BLOCKS = [ "Merge.", ]; const PROGRAM_H3 = ["Arm the program", "Spawn owners", "PR mechanics", "Verdict and merge", "Boot recipe"]; -const PROGRAM_MARKERS = ["/goal", "git show origin/main:", /30[- ]minute/, "status message"]; +const PROGRAM_MARKERS = ["git show origin/main:", "program objective", "every hour", "status message"]; const HOW_TO_READ_MARKERS = [ "One box is one unit of work", "names the evidence", @@ -110,8 +110,7 @@ else { } } for (const marker of PROGRAM_MARKERS) { - const ok = marker instanceof RegExp ? marker.test(bodyText(program)) : bodyText(program).includes(marker); - if (!ok) fail(program.n, `Program checklist lacks "${marker}"`); + if (!bodyText({ body: program.body.filter((l) => !l.code) }).includes(marker)) fail(program.n, `Program checklist lacks "${marker}"`); } } diff --git a/tools/meta-mode/check-plan.test.mjs b/tools/meta-mode/check-plan.test.mjs index 01909a3..857c51f 100644 --- a/tools/meta-mode/check-plan.test.mjs +++ b/tools/meta-mode/check-plan.test.mjs @@ -106,3 +106,23 @@ test("a closing delimiter indented four spaces does not close the example", () = const result = run(`${skeleton}\n\`\`\`yaml\nmessage: “code”\n \`\`\`\nstill inside: “code”\n\`\`\`\n`); assert.equal(result.code, 0, result.out); }); + +for (const marker of ["program objective", "every hour"]) { + test(`the program checklist must keep "${marker}"`, () => { + assert.ok(skeleton.includes(marker), `the shipped skeleton lacks "${marker}"`); + const result = run(skeleton.replaceAll(marker, "removed")); + assert.equal(result.code, 1); + assert.match(result.out, new RegExp(`Program checklist lacks "${marker}"`)); + }); +} + +for (const marker of ["program objective", "every hour"]) { + test(`"${marker}" inside a fenced example does not satisfy the program checklist`, () => { + const fence = "`".repeat(3); + const example = ["## Program checklist", "", `${fence}text`, marker, fence, ""].join("\n"); + const fenced = skeleton.replaceAll(marker, "removed").replace("## Program checklist\n", `${example}\n`); + const result = run(fenced); + assert.equal(result.code, 1); + assert.match(result.out, new RegExp(`Program checklist lacks "${marker}"`)); + }); +}