diff --git a/README.md b/README.md index 550e2f52..30475c9f 100644 --- a/README.md +++ b/README.md @@ -244,8 +244,8 @@ acceptance; they do not accept it. ### Context and Skills admission -Mission Control includes 70 repository-local skills: nine native control-plane -integration skills and 61 vendored from +Mission Control includes 118 repository-local skills: nine native Mission Control +skills and 109 vendored from [`jaydubya818/skillz`](https://github.com/jaydubya818/skillz) at a pinned source revision. For non-trivial work, agents start with `mission-control-delivery`; `poteto-mode` then selects the smallest applicable workflow and specialist set. diff --git a/docs/plans/2026-11-06-refresh-skillz-catalog.md b/docs/plans/2026-11-06-refresh-skillz-catalog.md new file mode 100644 index 00000000..4da23c2a --- /dev/null +++ b/docs/plans/2026-11-06-refresh-skillz-catalog.md @@ -0,0 +1,75 @@ +--- +title: Refresh the Mission Control Skillz catalog +type: chore +status: complete +date: 2026-11-06 +--- + +# Refresh the Skillz catalog + +The repository contains 73 Skillz skills and nine native Mission Control +skills. Its catalog documentation still records the original 61-skill import. +Skillz commit `44df27bc06f11d76d9f490c76578f222e254be6f` contains 109 skills. + +## Outcome + +Make all 109 upstream skills discoverable in the repository, including the 36 +missing skills. Preserve the nine native skills, supporting files, licenses, +and the current governance and publication boundaries. Update the FDLC Mission +Control page to explain the catalog and link to the complete download. + +## Execution + +1. Inspect catalog discovery, frontmatter parsing, lint, and source provenance. +2. Record the before state and exact upstream revision. +3. Refresh the vendored directories and record source hashes. +4. Resolve compatibility with the latest upstream metadata and descriptions. +5. Verify inventory, source integrity, parser round-trips, lint, and discovery. +6. Update the catalog docs and FDLC page, then verify the page in a browser. +7. Publish only within the user-authorized release scope and repository rules. + +The initial compatibility check rejected 39 latest-source entries. The user +approved preserving upstream files and updating compatibility on November 6, +and explicitly authorized production deployment. The parser now preserves +`disable-model-invocation` independently of `user-invocable`. The linter accepts +task-led descriptions as well as activation conditions. The minimum score of +80 and dangerous-instruction checks are unchanged. + +## Work boundaries + +- Blocking first steps. Inventory and compatibility evidence precede imports. +- Independent workstreams. The catalog and FDLC page are separate checkouts. +- Shared mutable state. No live Convex registry, installation, activation, + Factory Version, runtime contract, or policy is changed. +- Smallest safe decomposition. One agent performs the work sequentially, per + the user's tool mapping. Parallel agent exploration is skipped. +- Architecture exploration is skipped. This follows the existing vendored + catalog and context-tools parsing boundary. + +## Acceptance + +- All 109 upstream skills are present with recorded provenance. +- The 36 missing names are included and all nine native skill trees survive. +- Supporting references and license notices remain with their skills. +- The parser and structural quality gate accept the chosen import format. +- The minimum score remains 80 and dangerous-instruction checks still apply. +- The FDLC page distinguishes catalog availability from qualification and + execution authority. +- No external registry import or production control-plane mutation occurs. + +## Verification + +- Context-tools: 223 tests pass across seven files, including the complete + catalog inventory, source hashes, parser round-trips, and quality checks. +- Context-tools build and typecheck pass. +- Repository skill lint: 119 documents, zero errors, 85 advisory warnings, + average score 92. Every document meets the minimum score of 80. +- Factory documentation consistency passes. The nine native skill directories + have no changes. +- The FDLC page passes typecheck, lint, 66 unit tests, 29 rendered tests, + both builds, and browser checks for both runtimes. Browser review also + confirms the Skills navigation anchor clears the sticky header. + +Implementation and local qualification are complete. Publication follows the +approved PR and production release process. No live registry import is part of +this release. diff --git a/docs/skills/skillz-catalog.md b/docs/skills/skillz-catalog.md index e199d513..784297b9 100644 --- a/docs/skills/skillz-catalog.md +++ b/docs/skills/skillz-catalog.md @@ -1,13 +1,39 @@ # Skillz catalog -Mission Control vendors the complete 61-skill catalog from the public -[`jaydubya818/skillz` v2.2.0 release](https://github.com/jaydubya818/skillz/releases/tag/v2.2.0) -at commit `0e05992144bb71237fdd46e1a0aa4bf2cb9d5739`. +Mission Control vendors the complete 109-skill catalog from the +[`jaydubya818/skillz` 2.7.0 source snapshot](https://github.com/jaydubya818/skillz/tree/44df27bc06f11d76d9f490c76578f222e254be6f) +at commit `44df27bc06f11d76d9f490c76578f222e254be6f`. The imported directories live under `skills/`, alongside Mission Control's native API integration skills. This is the authoritative location for local `mc-context scan` discovery and governed repository import. +The November 6 refresh adds 36 missing skills to the 73 already present and +updates the existing imported skills to the same source revision. The nine +native Mission Control skill directories are preserved. + +## Added skills + +- Production engineering: `api-and-interface-design`, `ci-cd-and-automation`, + `deprecation-and-migration`, `frontend-ui-engineering`, + `observability-and-instrumentation`, `performance-optimization`, and + `security-and-hardening`. +- Continuity and decisions: `adr-verbatim`, `create-readonly-db-role`, `handoff`, + `prompt-for-others`, and `risky-changes`. +- Agent-Native workflows: `an`, `rewind`, `turn-into-app`, `visual-edit`, + `visual-plan`, `visual-recap`, and `webmcp`. +- Bounded orchestration: `efficient-fable`, `efficient-frontier`, + `efficient-orchestrator`, `plow-ahead`, `quick-recap`, and `stay-within-limits`. +- Planning and verification: `benchmark-checklist`, `correct`, + `create-formal-verification-skill`, `in-your-own-words`, `ketchup`, + `maintain-formal-verification-skill`, `poteto-help`, + `principle-explain-the-number`, `sharpen`, `thermo-nuclear-review`, and + `thermos`. + +Optional connectors and host capabilities remain prerequisites for the skills +that use them. Catalog inclusion does not install those capabilities or prove +that a skill is qualified for a Mission Control execution profile. + ## Runtime policy Do not preload the entire catalog. For non-trivial work, start with @@ -24,10 +50,28 @@ commit. Mission Control accepts their portable Agent Skills frontmatter at the context-tools parsing boundary instead of rewriting each source file into the legacy flat format. +The parser preserves `disable-model-invocation` as a boolean independent of +`user-invocable`. These are [Claude Code invocation controls](https://code.claude.com/docs/en/skills#control-who-invokes-a-skill), +not grants of Mission Control execution authority. Mission Control's deterministic +YAML subset accepts the literal values `true` and `false` for both fields. + +The description linter accepts activation conditions, task-led descriptions +such as "Review API contracts", read-only summaries with a named scope, and +slash-command routing. This follows the [Agent Skills description guidance](https://agentskills.io/specification#description-field) +without requiring one fixed English trigger phrase. Empty or unscoped +descriptions still fail. Length warnings, malformed-field errors, +dangerous-instruction checks, and the minimum score of 80 remain in force. + +[`skillz-source.json`](skillz-source.json) records the source revision and a +SHA-256 content digest for each imported skill tree. The catalog regression +checks detect missing skills, changed supporting files, and source drift. +These digests do not grant trust, qualification, activation, or execution +authority. + The source repository is a mixed-license collection. Per-skill license files and notices are preserved inside the imported directories. Review the source repository's -[`LICENSES.md`](https://github.com/jaydubya818/skillz/blob/v2.2.0/LICENSES.md) +[`LICENSES.md`](https://github.com/jaydubya818/skillz/blob/44df27bc06f11d76d9f490c76578f222e254be6f/LICENSES.md) before redistributing an individual skill outside this collection. ## Verification @@ -37,9 +81,17 @@ Run the focused compatibility checks after updating the catalog: ```bash pnpm --filter @mission-control/context-tools test pnpm --filter @mission-control/context-tools build -node scripts/skill-lint.mjs +node scripts/skill-lint.mjs --min-score 80 ``` -The expected repository inventory is 70 skill directories, comprising 61 +The expected repository inventory is 118 skill directories, comprising 109 vendored skills and 9 native Mission Control integration skills, plus the root `SKILL.md` document. + +The focused tests run offline. `mc-context scan` and +`scripts/import-repo-skills.mjs` write to the configured Convex deployment. +Run them only for an explicitly authorized registry import. Updating repository +files does not update a live registry or activate a Factory Version. + +Download the full source collection and read runtime installation instructions +on the [Factory Skills page](https://fdlc.ai/factory-skills). diff --git a/docs/skills/skillz-source.json b/docs/skills/skillz-source.json new file mode 100644 index 00000000..ea1675e8 --- /dev/null +++ b/docs/skills/skillz-source.json @@ -0,0 +1,127 @@ +{ + "repository": "https://github.com/jaydubya818/skillz", + "commit": "44df27bc06f11d76d9f490c76578f222e254be6f", + "version": "2.7.0", + "skills": { + "adr-verbatim": "5dff562fa8499de0055151dffd6303c95a9aceb419b26a940a7223690e4508db", + "agent-watchdog": "ddb4007e3cacbc8fb3c8356995776e0a1e98de97b498dc1863aa157e9312b422", + "an": "29290903a054b6f246df14ea46454475abf324fceaf274d63a8266d4a4516033", + "api-and-interface-design": "d8d54687c6788adb40d58ab566a34930a73eed8ae6cd878d1aed7202300de8d2", + "architect": "eabe90185b8bef120831d2156e5ccc6bc1b544411dae2ed1ab48a2fbe3348a1e", + "arena": "f5445345589a255dd5faf110a1fa71f32315eb17b771e28cf72381d11a9e4082", + "automate-me": "6c84dddcd9d454cb3d802c44f93bd934da0b9bdffd50aba7d75ce5f77879386a", + "babysit": "c352829affc5e86c25f0eb6d24138064ea02197a409db5b707fa3de349dadc6d", + "before-and-after": "331233f988c2e71f3da2bd72611f2a47aa0577e6f32e9202fe33724776088879", + "benchmark-checklist": "faa09a41a6193737976f516528bd2a419fe48ea4aebd7587b2dd3e38be584046", + "blast-radius": "e41db21f0ea359ae3595301c3044b93cac0d8ae05566b71b73c78e0dc16d17af", + "bro": "4e58c2801bc5313c6105e8524d1330a72fb439a05ab0af963aa2311eefd0bfae", + "ci-cd-and-automation": "d20bdd94c8590f23e047fda9b3a9c81fa719a62e3d533aebbefea5fe64d2681b", + "code-structure": "e681d84759ebed0e8a909240cab65aab13bc383f537ee251f7be7078b61c4543", + "correct": "c78ab3db4f91075fd0f912f5f96b3787b0b722058ab43131ddd8e873fc182002", + "create-formal-verification-skill": "3bbfaca699315e37189fafbc1fac2a677536ff52dfa1544b5728454ba01ad44c", + "create-readonly-db-role": "9f555b34639479776b38ef0bfb3d23bc70f14f07b21df8e1a9d71a72e20e0ed3", + "create-verification-skill": "2869d95a11df4763176440a02e6c8b30ad93cca75a558d6ced0b9f371405aa81", + "deprecation-and-migration": "c67a83be8357f1a70573b4d5b43e8bf88418b54e47333134e3ab918ea89269d1", + "deslop": "e93afa948e7952cb2b74bdb37c0f84dd7ecb1c5101d5acb28e3b1d0944ee5378", + "efficient-fable": "a024674340e9153bb2d03d9ab5ab82fbfd93ac63ff1fbd10fd519623b588cd66", + "efficient-frontier": "bd34ed3608dfd03ff4ff953953143a2afc3566ed4aad1bbfa7f48540e6b8d9cb", + "efficient-orchestrator": "1ccf692655660770d2d55f638fb86b3c60287d090f844d48b41df6f844e7a7cc", + "evidence-driven-testing": "8f9e9f345e2055e3957c584e0090a193e268c3cb71bfe0777773ffbaf675e5f3", + "factory": "be593fcbc3c730543bec4068cbe09d8d46d2d35ae4095fcd581e93e0357c620d", + "factory-babysit-pr": "32a5c002f9e39f70a3fa46f8c2c558b76df1db701069f520e221ff4538cabac7", + "factory-collect": "60fd5db89ac0275182743f7a75a17e27f05d5b2e1e9536964de60b6623173e4f", + "factory-human-digest": "1464041e3c0caf5b9144e6574fa04cbe81f397f9dfdb259c17fa04f10661b25e", + "factory-lookback": "5ffa63c5f0e423b353908ad37961541409256b8d6747fd01e75778aac7d6a713", + "factory-recover": "e329fd0732b4d38efea102ec3bcc58a78dfce084a8d76f38ac73f7e54e5dd56f", + "factory-review-prs": "e595bbe05bbf5f46868fbfa0396dedbb2ca381fbfafc579c45e4f7e7aced8644", + "factory-ship": "db70fe71cf7a8f3880d99d07dce797019d3752eea8e4156d946a9eef53dd498c", + "factory-watchdog": "0cb05f6e07a9388553cdb85e2fa65abd0194d78f12d47f843de830468f3b89fb", + "figure-it-out": "f7b9180a68ccb8ec9b54dac0db86b3a2c5921d419263bfaba8e0bbd40bd0319d", + "fix-ci": "2419d525781a2e14a9251e0310ae62588c46388f131d181b95923e331dfb83a7", + "fix-merge-conflicts": "ea1a9eb5daa67e25114911e641eb1079c0cd1bd046bec451dd3f847bbac44fb9", + "frontend-ui-engineering": "e8339672c70bc132b3f4668c9d9844dc885063d0b457a960fdf7073dcf4c501d", + "get-pr-comments": "e4656012eadbb0e1ea4082b2b3152dd6e7b98abff4cbd71097f2f20df8fd90cd", + "greploop": "66a14c5139a1af3e7ec532df47cff551e1c35f7fd4e9c132fd39e6e77b47935b", + "greploop-apps": "fe7a35f96f08a3f174e8e5ab0e63ae94c69c25df50c352688ce1fdd3adc56b83", + "handoff": "7bbd4fc3ceb708348632256479835912ae2947800abde78d66c242d8e7ad869c", + "how": "d7a10cc0ae36138ce425b5e77299cc3bd1ddac5004aa809ac888647f9f85d78b", + "in-your-own-words": "af53ffb1bf31f81b5ade048a0208f4249a1254feee39f8a5dfa4820e77cfe8a9", + "interrogate": "803b040364c9f14478c817b6dc102f1778bf61e2631ab8b9d2d1959bdd3960c7", + "ketchup": "d5e81388d3f4a3ee7ebc745b222eda23b33ff6bc06e2f2ba9e318327de5056c1", + "maintain-formal-verification-skill": "59d97af215064a12e83b501ce85d440d99c7f3a67a5a47359cf60a95a35e477c", + "maintain-verification-skill": "8724be2d9e81376bfee774cfb55ff314876c2d610ac2a1f8962b46f1892a5e37", + "make-pr-easy-to-review": "7ee167a2dd8f008df87e266a6d758213626c24541b53afbe9a286149ae8d0c34", + "mission-control-delivery": "178bbe715174b3644ca19399c7f36027ebf633523a7e9c69405300c4f65fd6f7", + "new-feature": "cda66122a8bb385c43f80e1ae710a68ece54f755de6d30f41e7500d89cddcb25", + "no-comments": "0503753ddb93badc31296a28809458e5e4db4802d48d38d5fa119fd8e7cb1d49", + "observability-and-instrumentation": "324458621453c3db25d03263ba2b624d6721afaf517e34b4ff1d10d3138c9a56", + "performance-optimization": "0a1d2d575dc1ff1393f95991560db010f3b2abd1036a96ecddd15ee2639ae48e", + "plan-arbiter": "683745bde2d853fb47095fbbe409f61002467e4b5f8c017ef36c86e1fc93ef2f", + "plow-ahead": "1e71a6cf9309337f828634e6bccf9c02e2c2939b46595130a27c98abab376187", + "poteto-help": "bd8371d991445f69e20bd488b403fd5d9d581930d66425cdbc1a94c1302cc129", + "poteto-mode": "9022f99cea65dfa4dbac6a2f641a1562d298f50e3384f3046b8a2b4ed01d76d8", + "principle-attack-the-premise": "0149637962d55d75055642220e973b3cfe6ad8dad55f111455d2591de03ef818", + "principle-boundary-discipline": "ea50d6763eb7a2f5403dcfff265854f0fb98f5619768699fefff3d5b7f4a1238", + "principle-build-the-lever": "64a4fba97ac5f80460948200aef42b20f5e6a4eff2eb0006fa7926571ff11286", + "principle-encode-lessons-in-structure": "ff9e3322458b169fdac42d60cad781b5fec03111b6f9f1e47ad051c5b80c9480", + "principle-exhaust-the-design-space": "ccb79b116e9d5cff1a7e30a78a95af74612443b656b7d0811e02738e0d104fee", + "principle-experience-first": "9c575cdb029dba9e7889bd603783a68ee4d47221e090963ea00a4dea97d8507f", + "principle-explain-the-number": "d82a76e448cea99f6f7540d85bc6b01f386f10f12a7684ecac2b5afe9c7abd09", + "principle-fix-root-causes": "fca7cf493720e9ebd22055245e023b0834694b724afa6554794f3b27d7197385", + "principle-foundational-thinking": "5e28987a1942bd98eb65215e2095c5f5b019b569d878b88c2c863711220c447c", + "principle-guard-the-context-window": "280e51a17132fe0172c3aa4760d7a6374cc9fa4c7fcbaa530c70802e2ba3610b", + "principle-laziness-protocol": "d65eed10c45f25de501ad0acc1c7308cad161870d2b67f67b67b52bab8ee12c4", + "principle-make-operations-idempotent": "ca020c10eff3f283544b05740db3de8198e5e4676304ca4486dd13a12beca918", + "principle-migrate-callers-then-delete-legacy-apis": "afa4a0aad46094f618066aa39b0de13c8ee9caf15df99aa438a4df1141172b6e", + "principle-minimize-reader-load": "44f49da525f732bd07bbd7bbc4e85d4e0b1bcf21e892145273cb349bb1fa378e", + "principle-model-the-domain": "5165835bea5184f1bf0a34bd4422dda2c4a72799203d07adf456b5c5efdb5565", + "principle-never-block-on-the-human": "989b6e0af8627f1e8d468122eec5ad44c9e388eb5a7fed198fc7ad213012dd7a", + "principle-outcome-oriented-execution": "1ff89154dc526550228b74625ceb74175f6c822dfa2abbf3881bb66dbb82f31a", + "principle-prove-it-works": "8d7f5e2b06fa40b6ab3077da946b63721c59efab8d6c23ea1b1d17975753f83c", + "principle-redesign-from-first-principles": "c51b0f23399d6e78e69a347758d0ad338fce9a7df5ff5a87937b98785b09bfa1", + "principle-separate-before-serializing-shared-state": "244d80b0fd444fa9287b00db978ccbc672ba55a8eb3cc16aad9df4cf435aaef7", + "principle-sequence-verifiable-units": "7c5f24390fd2c1a9c1945418d995364cc05fc0cde62f5fc128a2a548dcea25ee", + "principle-subtract-before-you-add": "3acab0d5d79a9d397cb504aa74670aac319419b6c02e04920f6adc97e4eadba2", + "principle-test-behavior-not-implementation": "b014ada23a50fae873f98f1bc12e0e40e0a758f84cdd22b1c35f1fbaf6013084", + "principle-type-system-discipline": "502beb28355235f50c61aa992e7243540ff75a5668a80635a6558ee4e522f499", + "prompt-for-others": "4c70ebfeb42831656ce6f765ab659893f9fb8889e1b10a0b17886f3d32bea90d", + "quick-recap": "03bee75384cbf174cebe9bd66f833ea8e7bfa3a804dc040f93ef904dfda58f26", + "read-the-damn-docs": "3836644e9ee2249db518a313e27d0eced07e661a4e0510b92ae0e38a76db49dd", + "recall": "8b9239796bd0fe75d8f4b0f4e8a906a75222eb89ad3be27e30859b528ca34f92", + "reflect": "539a6ac28124ce3ce61cd6c2fa99bdb247585667a13e4fa8fa72c0cb5f921dd9", + "rewind": "504ea58df291d1fd988c8e78b2cb491448f0b24292ef4f915e785c565a3b0189", + "risky-changes": "e5e9fb41ca7fbabbcb914d947e74ed8fa5bb71a460973bf390e1dc4ed7df2436", + "security-and-hardening": "f7f6d8a96ccc16b68b4b51b708aa8538c8779911eb6f428fb6ee16b102dcf641", + "setup-jstack": "1d5bacc467c2a82c8ff5b6fef459a7d9bef40f031547d3d05ad82bb68a1093b4", + "sharpen": "fe2f3345de62c844c5b7ff67a104446bd22ea2c155470b3bccbf146a51379067", + "show-me-your-work": "b2a099e5f7447b322d013540e4924af578c2103e0e6726fe8081c3e4277aa76a", + "stay-within-limits": "09f300b74cd1cf54f64539e53eefb696def91c9d454cf9864089b6981c4a1115", + "swarm": "f0a567b1c3e13edda29f01ecb895fd55fa8907eb505b3d06fba1d2b24c6d4865", + "tdd": "839111b138065f87a6d73bc188ec5c819d76fb86e643efc43b5ece2cbc9a7b3f", + "teach": "1f8d7a083654b2b89a1ef2050aa892335d18315deeebbaa972171a69d71076a1", + "technical-writing": "ef50a46871dad8a4b029c5c9ef49a00a5147602498252e93a9e9d0a112555cad", + "thermo-nuclear-code-quality-review": "3323bb9356c5aabd75d07da44432d4d12cf73ac43ab1ff73d0d3d6ae995b5c30", + "thermo-nuclear-review": "b17d721638587d63522a620ea476b52b02c0a2a29e260f7ac3f2caada9ace6bf", + "thermos": "1a5239fd19538e347ee2e93f08a46f6a3c199000d680f1cf16d4df9244258cc5", + "turn-into-app": "2e5d56984f7ca3e849d22fc74d1c4fb0308a8c4804439ed14e6e59832de4b2d7", + "typescript-best-practices": "9819131a94c87408adf0d800d021ab604cb623b1a3183fc01962ada786f88ac9", + "unslop": "8ee8c1ca00be5fa2348460aaba6df5747a60575bd741fb994f29d0c5a60fc488", + "visual-edit": "74cc18810e802b6dd9186dfe8ae85a0838c0659aebb488f8a14be453229b83b8", + "visual-plan": "d840a7621e4221950c8336babe9e95a18e6c4566f750771ae255e170e9776d76", + "visual-recap": "320c7d70590581f0d21d902d335910b50c28fce4bb48a344b3c2c245a4c8d8f7", + "webmcp": "8eaed90337709d3bc3a5f4a8c9dc8655140fa7ea46e46d40304ae247cd29f780", + "what-did-i-get-done": "5590e898495d3d67ef8697db0dbdf8f60ed092b7b7c49f700c6aca3c4fe2d8b1", + "why": "37454f39cf12370f5bd2f62642c2acbba77d9d2432fc5a3e9727e019220b34ad" + }, + "nativeSkills": [ + "mission-control-budget-control", + "mission-control-heartbeat", + "mission-control-record-memory", + "mission-control-register-agent", + "mission-control-request-approval", + "mission-control-run-logging", + "mission-control-submit-deliverable", + "mission-control-task-lifecycle", + "workspace-handoff-checklist" + ] +} diff --git a/packages/context-tools/src/__tests__/skillFrontmatter.test.ts b/packages/context-tools/src/__tests__/skillFrontmatter.test.ts index 24cecc5b..1c58b254 100644 --- a/packages/context-tools/src/__tests__/skillFrontmatter.test.ts +++ b/packages/context-tools/src/__tests__/skillFrontmatter.test.ts @@ -107,6 +107,23 @@ body`; expect(fm.compatibility).toBeUndefined(); }); + it.each([true, false])("preserves disable-model-invocation: %s independently of user-invocable", (disabled) => { + const markdown = `---\nname: explicit-skill\ndescription: Run bounded orchestration when explicitly requested.\ndisable-model-invocation: ${disabled}\nuser-invocable: false\n---\n`; + const frontmatter = parseSkillFrontmatter(markdown); + expect(frontmatter.disableModelInvocation).toBe(disabled); + expect(frontmatter.userInvocable).toBe(false); + expect(parseSkillFrontmatter(serializeSkillFrontmatter(frontmatter))).toEqual(frontmatter); + }); + + it.each(["yes", "TRUE", "", "\n - true", "\n nested: true"])("rejects invalid invocation control: %j", (value) => { + const markdown = `---\nname: explicit-skill\ndescription: Run bounded orchestration when explicitly requested.\ndisable-model-invocation: ${value}\n---\n`; + expect(() => parseSkillFrontmatter(markdown)).toThrow(SkillFrontmatterError); + }); + + it("leaves absent invocation control unspecified", () => { + expect(parseSkillFrontmatter("---\nname: demo\ndescription: Review repository changes.\n---\n").disableModelInvocation).toBeUndefined(); + }); + it("normalizes portable Agent Skills metadata", () => { const md = `--- name: portable-skill diff --git a/packages/context-tools/src/__tests__/skillLint.test.ts b/packages/context-tools/src/__tests__/skillLint.test.ts index 35c90729..f0d8a48d 100644 --- a/packages/context-tools/src/__tests__/skillLint.test.ts +++ b/packages/context-tools/src/__tests__/skillLint.test.ts @@ -193,6 +193,31 @@ owner: team expect(rules(mk(description))).toEqual([]); }); + it.each([ + "Design API contracts, compatibility, and duplicate-safe mutations.", + "Audit, monitor, compare, or repair another agent's session or PR when asked.", + "Review security or harden sensitive trust boundaries with abuse-case tests.", + "Read-only summary of configured work needing human decisions.", + "Use /efficient-fable for efficient-orchestrator on supported hosts.", + "Use a red, yellow, or green status line for compact agent completion reports.", + ])("accepts task-oriented routing: %s", (description) => { + const result = lintSkill(mk(description)); + expect(result.findings.filter((finding) => finding.severity === "error")).toEqual([]); + expect(result.score).toBe(90); + }); + + it.each(["Review", "Helpful tooling for everyone.", "A general-purpose assistant.", "Read-only summary."])("rejects unscoped routing: %s", (description) => { + expect(rules(mk(description))).toContain("activation-language-missing"); + }); + + it("still rejects malformed metadata and dangerous instructions with task-oriented routing", () => { + const markdown = mk("Review repository changes before release.").replace("owner: team", "owner: team\ndisable-model-invocation: yes") + "\nsudo reboot\n"; + const result = lintSkill(markdown); + expect(result.findings.map((finding) => finding.rule)).toContain("frontmatter-invalid"); + expect(result.findings.map((finding) => finding.rule)).toContain("dangerous-instruction"); + expect(result.score).toBeLessThan(80); + }); + it("is skipped when the description is missing entirely", () => { const md = `--- name: a-skill diff --git a/packages/context-tools/src/__tests__/skillzCatalog.test.ts b/packages/context-tools/src/__tests__/skillzCatalog.test.ts new file mode 100644 index 00000000..73a9446c --- /dev/null +++ b/packages/context-tools/src/__tests__/skillzCatalog.test.ts @@ -0,0 +1,58 @@ +import { createHash } from "node:crypto"; +import { readdirSync, readFileSync } from "node:fs"; +import { join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { describe, expect, it } from "vitest"; +import { lintSkill } from "../skillLint.js"; +import { parseSkillFrontmatter, serializeSkillFrontmatter } from "../skillFrontmatter.js"; + +const root = fileURLToPath(new URL("../../../../", import.meta.url)); +const source = JSON.parse(readFileSync(join(root, "docs/skills/skillz-source.json"), "utf8")) as { + skills: Record; + nativeSkills: string[]; +}; + +function directoryHash(directory: string): string { + const hash = createHash("sha256"); + function files(current: string, prefix = ""): string[] { + return readdirSync(current, { withFileTypes: true }).flatMap((entry) => { + const relative = prefix + entry.name; + return entry.isDirectory() ? files(join(current, entry.name), relative + "/") : [relative]; + }); + } + for (const file of files(directory).sort()) { + hash.update(file).update("\0").update(readFileSync(join(directory, file))).update("\0"); + } + return hash.digest("hex"); +} + +describe("pinned Skillz catalog", () => { + it("contains all 109 upstream skills and all nine native skills", () => { + const expected = [...Object.keys(source.skills), ...source.nativeSkills].sort(); + expect(Object.keys(source.skills)).toHaveLength(109); + expect(source.nativeSkills).toHaveLength(9); + const actual = readdirSync(join(root, "skills"), { withFileTypes: true }) + .filter((entry) => entry.isDirectory()) + .map((entry) => entry.name).sort(); + expect(actual).toEqual(expected); + }); + + it("preserves every vendored skill and supporting file from the recorded source", () => { + for (const [name, expected] of Object.entries(source.skills)) { + expect(directoryHash(join(root, "skills", name)), name).toBe(expected); + } + }); + + it("parses, round-trips, and quality-checks every upstream skill", () => { + for (const name of Object.keys(source.skills)) { + const path = join(root, "skills", name, "SKILL.md"); + const markdown = readFileSync(path, "utf8"); + const frontmatter = parseSkillFrontmatter(markdown); + expect(frontmatter.name).toBe(name); + expect(parseSkillFrontmatter(serializeSkillFrontmatter(frontmatter))).toEqual(frontmatter); + const lint = lintSkill(markdown, { path }); + expect(lint.findings.filter((finding) => finding.severity === "error"), name).toEqual([]); + expect(lint.score, name).toBeGreaterThanOrEqual(80); + } + }); +}); diff --git a/packages/context-tools/src/skillFrontmatter.ts b/packages/context-tools/src/skillFrontmatter.ts index 7c1b82a8..50f8618a 100644 --- a/packages/context-tools/src/skillFrontmatter.ts +++ b/packages/context-tools/src/skillFrontmatter.ts @@ -48,6 +48,7 @@ export interface SkillFrontmatter { readonly license?: string; readonly allowedTools?: string; readonly userInvocable?: boolean; + readonly disableModelInvocation?: boolean; readonly metadata?: Readonly>; } @@ -64,6 +65,7 @@ const OPTIONAL_SKILL_FIELDS = [ "license", "allowed-tools", "user-invocable", + "disable-model-invocation", "metadata", ] as const; @@ -438,6 +440,7 @@ export function validateRawFrontmatter(raw: RawFrontmatter): { license?: string; allowedTools?: string; userInvocable?: boolean; + disableModelInvocation?: boolean; metadata?: Readonly>; } = {}; @@ -572,20 +575,24 @@ export function validateRawFrontmatter(raw: RawFrontmatter): { } } - const userInvocable = raw.entries["user-invocable"]; - if (userInvocable !== undefined) { - const scalar = expectScalar(userInvocable, "user-invocable"); + for (const [field, resultField] of [ + ["user-invocable", "userInvocable"], + ["disable-model-invocation", "disableModelInvocation"], + ] as const) { + const entry = raw.entries[field]; + if (entry === undefined) continue; + const scalar = expectScalar(entry, field); if (typeof scalar !== "string") { issues.push(scalar); } else if (scalar !== "true" && scalar !== "false") { issues.push({ - field: "user-invocable", + field, kind: "invalid", - message: `"user-invocable" must be "true" or "false", got "${scalar}"`, - line: userInvocable.line, + message: `"${field}" must be "true" or "false", got "${scalar}"`, + line: entry.line, }); } else { - result.userInvocable = scalar === "true"; + result[resultField] = scalar === "true"; } } @@ -682,6 +689,9 @@ export function serializeSkillFrontmatter(fm: SkillFrontmatter): string { if (fm.userInvocable !== undefined) { lines.push(`user-invocable: ${fm.userInvocable}`); } + if (fm.disableModelInvocation !== undefined) { + lines.push(`disable-model-invocation: ${fm.disableModelInvocation}`); + } lines.push("---"); const block = lines.join("\n") + "\n"; // Guarantee the canonical form round-trips. diff --git a/packages/context-tools/src/skillLint.ts b/packages/context-tools/src/skillLint.ts index 277a1c30..e95edb15 100644 --- a/packages/context-tools/src/skillLint.ts +++ b/packages/context-tools/src/skillLint.ts @@ -63,6 +63,10 @@ const DESCRIPTION_MAX_CHARS = 500; const BODY_MAX_LINES = 500; const ACTIVATION_RE = /\b(use (this skill )?when|use (this skill )?before|use for|invoke when|apply when|trigger|activates? when)\b/i; +const TASK_DESCRIPTION_RE = /^(?:add|audit|build|capture|check|compare|configure|create|design|edit|investigate|isolate|monitor|prepare|preserve|proceed|read|record|resume|retire|retrieve|review|separate|ship|triage|validate|write),?\s+\S/i; +const READ_ONLY_DESCRIPTION_RE = /^read-only summary (?:of|for)\s+\S/i; +const USE_DESCRIPTION_RE = /^use (?:\/[a-z][a-z0-9-]*|an?|the)\s+\S/i; +const ROUTING_PATTERNS = [ACTIVATION_RE, TASK_DESCRIPTION_RE, READ_ONLY_DESCRIPTION_RE, USE_DESCRIPTION_RE]; const DANGEROUS_RE = /rm -rf|curl[^|]*\|\s*(ba)?sh|sudo\s|chmod 777/; @@ -147,12 +151,12 @@ function lintFrontmatter(raw: RawFrontmatter, opts: SkillLintOptions, findings: const description = raw.entries.description; if (description !== undefined && typeof description.value === "string" && description.value.trim() !== "") { const text = description.value; - if (!ACTIVATION_RE.test(text)) { + if (!ROUTING_PATTERNS.some((pattern) => pattern.test(text.trim()))) { findings.push({ rule: "activation-language-missing", severity: "error", message: - 'description must state when to activate the skill (e.g. "Use this skill when ...", "Apply when ...")', + 'description must state an activation condition, a task (e.g. "Review API contracts"), or a slash command', line: description.line, }); } diff --git a/skills/adr-verbatim/LICENSE b/skills/adr-verbatim/LICENSE new file mode 100644 index 00000000..aa4c3084 --- /dev/null +++ b/skills/adr-verbatim/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 David Ondrej + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/skills/adr-verbatim/SKILL.md b/skills/adr-verbatim/SKILL.md new file mode 100644 index 00000000..2addc192 --- /dev/null +++ b/skills/adr-verbatim/SKILL.md @@ -0,0 +1,47 @@ +--- +name: adr-verbatim +description: "Record approved decisions as concise architecture decision records." +license: MIT +metadata: + author: David Ondrej and Skillz contributors + source: davidondrej/skills + source-commit: 8aa01cf45110ae378bdf5c319cd41ac8fdbdf448 + adaptation: curated-rewrite + owner: software-factory + risk: low + capabilities: davidondrej,decision-records +--- + +# Record an approved decision + +Preserve the user's decision and its conditions without turning conversation +noise or an agent's suggestion into a requirement. Use when asked to create an +ADR or record an approved decision. Researching an old decision is a separate +task. + +1. Identify the stated or approved decision in the source conversation or + document. Distinguish approved scope from proposals and unanswered questions. + Ask only when the decision itself is unclear. If approval is absent, keep + the record proposed rather than marking it accepted. +2. Find the project's established ADR repository, directory, template, and + naming convention. Do not assume the current checkout owns the records. + Follow the existing sequence. Recheck filename availability before writing + so another author's record is never overwritten. +3. Write the decision in plain English. Preserve meaning, boundaries, priority, + and exceptions. Include rationale or alternatives only when supported by + the source. Do not invent consequences to fill a template. +4. Record status, decision date, and an appropriate source reference when known. + If the original date is unknown, distinguish the recording date from the + decision date. Use exact quotations only when requested or when exact scope + depends on the wording. +5. Check each statement against its source and show the saved path and record. + +Without an established template, a title, status, date, and short decision +paragraph are enough. A changed decision usually needs a new ADR that identifies +the superseded record. Preserve the old record and follow the project's process +for updating its status. Correct an existing record when the user asks for a +correction. An agent's newer interpretation does not supersede an approved +decision. + +Use repository isolation and publication rules. Recording a decision does not +authorize implementing it, publishing private discussion, or unrelated changes. diff --git a/skills/adr-verbatim/agents/openai.yaml b/skills/adr-verbatim/agents/openai.yaml new file mode 100644 index 00000000..62b33e3a --- /dev/null +++ b/skills/adr-verbatim/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Record a decision" + short_description: "Record approved architecture decisions" + default_prompt: "Use $adr-verbatim to record this approved decision in the project's ADR format." diff --git a/skills/agent-watchdog/SKILL.md b/skills/agent-watchdog/SKILL.md index 32a0716e..093ad038 100644 --- a/skills/agent-watchdog/SKILL.md +++ b/skills/agent-watchdog/SKILL.md @@ -1,6 +1,15 @@ --- name: agent-watchdog -description: Use when asked to watch, babysit, audit, review, compare, or fix another agent's work from a Codex session ID, Claude Code session/transcript, chat/thread link, PR, branch, log, or pasted run summary. Monitor until the other agent is done or blocked, reconstruct what the user asked, independently investigate the same problem to form your own hypotheses and approach, inspect what the agent actually changed and verified, compare the two investigations, report gaps and add-on directions, and optionally make scoped fixes when the user authorizes repair. +description: "Audit, monitor, compare, or repair another agent's session or PR when asked." +license: MIT +compatibility: "Works in Claude Code, Codex, Cursor, and Agent Skills-compatible harnesses when the required host tools are available." +metadata: + author: Builder.io + source: BuilderIO/skills + source-commit: f4f10b8d513476c24bd995ceac5294bcdd6ee15c + owner: software-factory + risk: medium + capabilities: builderio,agent-review --- # Agent Watchdog diff --git a/skills/agent-watchdog/agents/openai.yaml b/skills/agent-watchdog/agents/openai.yaml index 860b5a4a..257b12b3 100644 --- a/skills/agent-watchdog/agents/openai.yaml +++ b/skills/agent-watchdog/agents/openai.yaml @@ -1,4 +1,4 @@ interface: display_name: "Agent Watchdog" - short_description: "Audit another agent session and fix gaps." - default_prompt: "Use $agent-watchdog to watch or audit an agent session, then report or fix gaps." + short_description: "Audit agent work and repair verified gaps" + default_prompt: "Use $agent-watchdog for this task and return a verified result." diff --git a/skills/an/LICENSE b/skills/an/LICENSE new file mode 100644 index 00000000..dafdc4ad --- /dev/null +++ b/skills/an/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Builder.io + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/skills/an/SKILL.md b/skills/an/SKILL.md new file mode 100644 index 00000000..5bf98b12 --- /dev/null +++ b/skills/an/SKILL.md @@ -0,0 +1,107 @@ +--- +name: an +description: "Operate granted Agent-Native apps through Dispatch MCP; use for /an." +license: MIT +compatibility: "Requires the Agent-Native Dispatch MCP connector and a host that supports MCP Apps or returned links." +metadata: + author: Builder.io + source: BuilderIO/skills + source-commit: f4f10b8d513476c24bd995ceac5294bcdd6ee15c + owner: software-factory + risk: medium + capabilities: builderio,agent-native-apps + visibility: exported +--- + +# Agent-Native Apps + +Use `/an ` to open an Agent-Native app beside the conversation and keep +the app's live UI and the agent's actions in the same workflow. The first +argument is the Dispatch app id. For example, `/an slides` opens the Slides +editor. After it opens, the user can sign in in that browser surface and ask +for new decks or focused edits in ordinary language. + +## Open the app + +For a known app, call Dispatch's `open_app` with an inline surface: + +```json +{ + "app": "slides", + "path": "/", + "embed": true, + "chrome": "full" +} +``` + +The MCP App response is the preferred handoff for Claude, Claude Desktop, +Claude Cowork, ChatGPT, ChatGPT desktop, Codex, and other compatible hosts. Keep +the returned open link as the fallback for a host that cannot render MCP Apps +inline. Do not claim that a browser opened unless the host rendered the inline +surface or its browser tool confirmed the returned URL. + +If the app name is missing or uncertain, call `list_apps` first and use the +exact granted app id. If the requested app is not listed, explain that it must +be granted in Dispatch's Agents access settings. Do not invent a URL, use a +localhost URL, or route around the Dispatch grant. + +## Work in the opened app + +Prefer direct app tools when the host exposes them. After opening an app, call +`list-host-webmcp-tools` when available, then use `run-host-webmcp-tool` +with the exact listed name and origin. Page-local tools reflect current app +state and selection, so use `view-screen` before selection-dependent edits +and read back writes. + +You are the model doing the work: when the user asks for new content — a +design, a deck, a form, a document — author it yourself and save it with the +app's create/update tools. Never hand off authoring to the app's own agent +when those tools exist, and never wait on an in-app question form; it answers +back through that app's own chat, not to you. + +Use `ask_app` only when the host has no direct page tools, the requested +capability is not exposed, the task needs the app agent's interpretation or +multi-step specialist reasoning, or a direct call fails and needs recovery. +Dispatch's unified `/mcp` endpoint still exposes generic cross-app verbs; a +direct app MCP connection or page WebMCP surface is where named app actions +appear. + +The app's MCP `instructions` name its key tools (generated from the app's own +list); follow those names verbatim and use `tool-search` for anything else — +never guess a tool name. + +1. Call `view-screen` before any selection-dependent edit and use the ids it + returns; never guess an id from a title, index, or stale context. +2. If `view-screen` returns a `selection` and `nextRequiredAction`, make + that call directly with the smallest atomic change; do not regenerate a + whole artifact for a focused edit. +3. Read the result back with the app's matching read action and report what + changed. A queued `ask_app_status` task is not proof an edit completed. + +## Authentication and host behavior + +The Dispatch MCP connector identifies the calling agent, while the embedded app +uses the user's browser session. Let the user complete sign-in in the rendered +Agent-Native browser surface. Never request, copy, or store passwords, OAuth +codes, cookies, or access tokens. + +The generic Agent-Native plugin registers Dispatch at +`https://dispatch.agent-native.com/mcp` for hosts that support plugin MCP +configuration. ChatGPT custom connectors use the same URL with OAuth. After +installing or changing a connector, reload Claude/Cowork/ChatGPT or reconnect +and rescan the MCP server if the new tools or inline surface are not visible. + +## Failure handling + +- If `open_app` succeeds but no inline surface appears, show its returned + link and say that this host does not expose an embedded browser here. +- After an app loads, check for `list-host-webmcp-tools` before delegating. If + it is available, use the exact returned tool name and origin for direct work. +- If `ask_app` cannot reach Slides, check that Slides is granted in + Dispatch and that the connector is authenticated, then retry once with the + exact app id `slides`. +- If screen state has no deck or selection, describe that state instead of + fabricating context. Ask the user to open a deck or select an element when + the requested edit depends on it. +- Treat a successful open link, a queued task, or a tool acknowledgment as + navigation/task setup only. Confirm a write with the app's readback action. diff --git a/skills/an/agents/openai.yaml b/skills/an/agents/openai.yaml new file mode 100644 index 00000000..bf9552d6 --- /dev/null +++ b/skills/an/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Agent-Native Apps" + short_description: "Operate Agent-Native apps through Dispatch" + default_prompt: "Use $an for this task and return a verified result." diff --git a/skills/api-and-interface-design/LICENSE b/skills/api-and-interface-design/LICENSE new file mode 100644 index 00000000..d67778ad --- /dev/null +++ b/skills/api-and-interface-design/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Addy Osmani + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/skills/api-and-interface-design/SKILL.md b/skills/api-and-interface-design/SKILL.md new file mode 100644 index 00000000..ca905573 --- /dev/null +++ b/skills/api-and-interface-design/SKILL.md @@ -0,0 +1,68 @@ +--- +name: api-and-interface-design +description: "Design API contracts, compatibility, and duplicate-safe mutations." +license: MIT +metadata: + author: Addy Osmani and Skillz contributors + source: addyosmani/agent-skills + source-commit: 301b02b12bff98e4688e6984af6556802322bbde + adaptation: curated-rewrite + owner: software-factory + risk: high + capabilities: addyosmani,api-and-interface-design +--- + +# API and interface design + +Define the contract before implementing or changing a public API. Start with +existing callers, schema conventions, authorization rules, and retry behavior. +A module-local refactor needs only the contract that crosses its boundary. + +## Work from consumer behavior + +1. Identify callers and independently deployed versions. Record required + behavior, including ordering, nullability, defaults, errors, and observable + quirks. A type-compatible change can still break a consumer. +2. Specify inputs, outputs, validation, resource ownership, and failure cases + using the repository's schema or interface format. Separate caller input + from server-owned fields. Do not accept roles, prices, ownership, or state + transitions just because the request matches a type. +3. Validate untrusted data where it enters, including provider responses and + persisted data whose invariants are not guaranteed. Typed internal calls + do not need repeated shape validation; business invariants still apply. +4. Define stable machine-readable errors and appropriate transport semantics. + Keep internal details out of public responses. Follow existing conventions + for validation errors and access-denied versus not-found behavior. +5. Bound list queries. Specify a maximum page size, stable ordering with a + tie-breaker, cursor or offset behavior, and what concurrent writes do to + pagination. Do not promise a consistent snapshot unless it exists. +6. Specify partial-update behavior for omitted values, explicit nulls, empty + collections, and concurrent edits. Use version checks or transactions where + stale writes could overwrite another actor's work. +7. Prefer compatible extensions, but test real consumers. Optional fields and + new enum values can break strict decoders. Existing public versioning and + migration commitments take precedence over a preference for one version. + +## State changes and retries + +For operations with side effects, read +[retry and idempotency rules](references/idempotency.md). Apply these when +implementing payments, provisioning, webhook processing, or replayable jobs. +An accepted idempotency header alone does not make retrying safe. + +Document which failures are retryable, who retries, the bounded retry policy, +and how callers discover an operation's status after a lost response. Payment +amounts need an explicit currency and representation, such as integer minor +units with currency-specific precision. Do not use floating-point arithmetic +for ledger values or trust client-supplied totals. + +## Verify the contract + +Exercise the real boundary with representative consumers. Cover malformed +inputs, unauthorized and cross-tenant access, missing resources, pagination +edges, concurrent updates, and duplicate delivery where applicable. Verify +response bodies as well as status codes. Keep contract documentation next to +the implementation and identify any consumers that could not be checked. + +Return the contract changes, compatibility evidence, and unresolved decisions. +Designing an API does not authorize publishing it or migrating live consumers. diff --git a/skills/api-and-interface-design/agents/openai.yaml b/skills/api-and-interface-design/agents/openai.yaml new file mode 100644 index 00000000..79d43ff9 --- /dev/null +++ b/skills/api-and-interface-design/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Api And Interface Design" + short_description: "Design contracts and safe retries" + default_prompt: "Use $api-and-interface-design for this task and report the evidence and remaining limits." diff --git a/skills/api-and-interface-design/references/idempotency.md b/skills/api-and-interface-design/references/idempotency.md new file mode 100644 index 00000000..a9ed950b --- /dev/null +++ b/skills/api-and-interface-design/references/idempotency.md @@ -0,0 +1,33 @@ +# Retry and idempotency rules + +Use one stable key per intent, reused across attempts. Generate it at the +initiating client or event, not inside the retry loop. Two legitimate purchases +with identical amounts still need distinct intent identifiers. + +- Scope the key by tenant or principal and operation. Authorize every request, + including replays, before returning a saved response. +- Atomically claim the scoped key with a uniqueness constraint or equivalent + primitive. A separate lookup followed by a write allows concurrent winners. +- Store a fingerprint of the normalized, effect-relevant request. Reject the + same key with a different payload; do not replay another request's result. +- Model pending, succeeded, failed, and unknown outcomes explicitly. A timeout + or a crash after an external call is not proof that the effect failed. +- Choose a documented response for an in-flight duplicate, such as conflict, + a pending status resource, or a bounded wait. Expiring a lease does not prove + the previous worker stopped or that a provider did nothing. +- Commit a local effect and its deduplication record in the same transaction + where possible. For external effects, propagate a stable provider key and + reconcile provider state after uncertain outcomes. An outbox makes dispatch + durable but still requires an idempotent consumer or provider. +- Retain records for the longest permitted retry or replay window. Explicitly + reject or reconcile older replays; do not assume provider key retention + matches local retention. State how terminal failures and key expiry behave. +- Store only response data needed for replay, under the same access and + retention controls as the underlying resource. + +Prove these cases against the actual persistence mechanism: concurrent same-key +requests produce one effect; changed-payload reuse fails; keys cannot leak +across tenants; a lost response is recoverable; and a crash between provider +success and local acknowledgment does not cause a second charge. For services +without provider idempotency or a reliable status query, report that limitation +and require reconciliation instead of claiming exactly-once execution. diff --git a/skills/architect/SKILL.md b/skills/architect/SKILL.md index f4e77480..a6b7cd44 100644 --- a/skills/architect/SKILL.md +++ b/skills/architect/SKILL.md @@ -5,8 +5,8 @@ license: MIT metadata: author: jstack-maintainers source: michael-denyer/pstack-claude - source-version: "0.9.30" - source-commit: 45f768349a6d7d7e71509fee3f5bccfad54b3bad + source-version: "0.9.130" + source-commit: d88063f3355a5ecff0e6dbb890a11bab4b08bc2e owner: software-factory risk: medium capabilities: jstack,multi-agent-workflow @@ -16,7 +16,13 @@ metadata: On Codex, Cursor, or another non-Claude runtime, read the [runtime mapping](../poteto-mode/references/harness-tools.md), including its per-skill notes, before following this skill. -Design before implementing. Sketch types, function signatures, class shapes, and module boundaries with `not implemented` bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch. If implementation proves the sketch wrong, throw it out and redesign. +On GitHub Copilot, read the [platform mapping](../poteto-mode/references/copilot-tools.md), including its per-skill notes, before following this skill. + +On Muse, read the [platform mapping](../poteto-mode/references/muse-tools.md), including its per-skill notes, before following this skill. + +On Antigravity, read the [platform mapping](../poteto-mode/references/agy-tools.md), including its per-skill notes, before following this skill. + +Sketch types, function signatures, class shapes, and module boundaries with `not implemented` bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch. ## Start @@ -30,25 +36,23 @@ Open a todolist with one entry per phase before starting. ## Phase A: Ground the problem -Build a real mental model of every system the new code touches. Run the **how** skill over the relevant subsystems. - -Naming a file isn't grounding. Produce the traced model `how` prescribes. If the design redefines ownership or layering, also run the **why** skill on the existing shape so the rationale becomes a constraint, not a guess. +Build a real mental model of every system the new code touches. Run the **how** skill over the relevant subsystems. Naming a file isn't grounding. Produce the architectural explanation `how` prescribes. If the design redefines ownership or layering, also run the **why** skill on the existing shape so the rationale becomes a constraint, not a guess. Skip Phase A only when the work is genuinely greenfield with no surrounding system to integrate. ## Phase B: Sketch -Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`. +Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. -Use your configured architect runners (defaults in [Models](#models)). +Take the runners from the `architect runners` line in `jstack-models.md`, in place of the `arena runners` line. If the sheet or that line is missing, use the defaults in [Models](#models). Alias and rejected entries follow the runner rules in the **arena** skill's Phase A. 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. -Arena returns one synthesized design package. The synthesis decision populates the rationale's "Synthesis decision" section. +Arena returns one synthesized design package. Its synthesis decision fills the rationale's "Synthesis decision" section. ## Phase C: Agree (opt-in) @@ -62,9 +66,11 @@ If the human pushes back on the shape (in a checkpoint or after the fact), treat ## Phase D: Implement against the sketch -Replace `not implemented` bodies with code, pseudocode with logic. The synthesized sketch is the contract. +Replace `not implemented` bodies with code, pseudocode with logic. The synthesized sketch is the contract. Deviations from it are signal to surface, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching. -Deviations from the sketch are signal worth surfacing, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching. +Before closing each implementation unit or handing its contract to the next worker, compare accepted deviations with the saved behavior contracts, interfaces, and responsibility assignments. Once the appropriate owner or review process accepts a change, update the affected parts of the existing sketch and rationale. Record the acceptance source there. A change from raising an error to returning a refusal must update the outcome contract before the next unit begins. + +For a local deviation that leaves the shared contract intact, record the decision and why the design still holds; a local variable rename need not rewrite the architecture. Keep unaccepted changes and unresolved disagreements visible. Do not call the unit reconciled while the next worker would receive contradictory instructions, or edit the specification merely to justify what was implemented. Use the existing design artifact rather than a parallel record per unit. Repeated structural deviations still trigger Phase E. ## Phase E: Scrap when the architecture is wrong @@ -79,7 +85,7 @@ The signal is a *pattern*, not single instances. Tells: - Callers having to know the abstraction's internal rules to use it. - Two or more independent Phase D deviations of the same shape across the implementation. -Use judgment. A few edge cases don't condemn an architecture. Some problems are legitimately complex; complexity in the data is not complexity in the design. +Use judgment. A few edge cases don't condemn an architecture. Some problems are legitimately complex. Complexity in the data is not complexity in the design. When you scrap: @@ -90,10 +96,14 @@ When you scrap: ## Outputs -The caller's usage is written first and the type sketch derived from it. One file with new types and signatures for small changes; module map plus type definitions for larger work. The rationale ships alongside, shaped per `references/rationale-template.md`, including the usage sketch and the synthesis decision. +The caller's usage is written first and the type sketch derived from it. One file with new types and signatures for small changes. Module map plus type definitions for larger work. The rationale ships alongside, shaped per `references/rationale-template.md`, including the usage sketch and the synthesis decision. ## Models -Role defaults originate from the upstream `plugins/pstack/models.json`. Refresh them through `scripts/vendor_jstack.py` after reviewing the upstream change. A matching role line in `~/.claude/jstack-models.md` overrides each at runtime; see `/setup-jstack`. +Role defaults originate from the upstream `plugins/pstack/models.json`. Refresh them through `scripts/vendor_jstack.py` after reviewing the upstream change. A matching role line in the `jstack-models.md` override sheet overrides each at runtime; `/setup-jstack` writes it and lists its path per runtime. + +- architect runners: `opus`, `fable`, `sonnet`, `haiku` + +## Reasoning effort -- architect runners: `claude-opus-5`, `claude-fable-5-1`, `claude-sonnet-5` +A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort. diff --git a/skills/architect/references/design-red-flags.md b/skills/architect/references/design-red-flags.md index 32cb2408..f8503c95 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/architect/references/rationale-template.md b/skills/architect/references/rationale-template.md index 1ddd5054..9ccea423 100644 --- a/skills/architect/references/rationale-template.md +++ b/skills/architect/references/rationale-template.md @@ -8,11 +8,11 @@ The prose that ships alongside the type sketch. One page. Sentence-case headings ## Usage (caller's view) -*Write this first, before the type sketch. Show the README or quickstart the consumer reads, plus two or three realistic call sites in their own code. What they import, what they call, what comes back. The type sketch in [Shape](#shape) is derived from this. The two must agree; when they diverge, reconcile the sketch to the usage, not the reverse. The caller's experience is the spec. The types serve it.* +*Write this first, before the type sketch. Show the README or quickstart the consumer reads, plus two or three realistic call sites in their own code. What they import, what they call, what comes back. The type sketch in [Shape](#shape) is derived from this. The two must agree. When they diverge, reconcile the sketch to the usage, not the reverse. The caller's experience is the spec. The types serve it.* ## Shape -*The recommended architecture. Data structures first; then how data flows through the signatures. Name the load-bearing decisions. State which invariants are encoded in types, where validation lives, and what the system deliberately does not do. Judge interface depth explicitly. State what complexity the public surface hides, what remains exposed to callers, and why the interface is no larger than needed. Cite the principle behind each decision (e.g., `per boundary-discipline`); don't restate it.* +*The recommended architecture. Data structures first. Then how data flows through the signatures. Name the load-bearing decisions. State which invariants are encoded in types, where validation lives, and what the system deliberately does not do. Judge interface depth explicitly. State what complexity the public surface hides, what remains exposed to callers, and why the interface is no larger than needed. Cite the principle behind each decision (e.g., `per boundary-discipline`). Don't restate it.* ## Synthesis decision @@ -26,6 +26,10 @@ The prose that ships alongside the type sketch. One page. Sentence-case headings *Required. Name at least one concrete alternative shape, with one line on why it lost. Judge each alternative on interface depth, not implementation simplicity alone. Name the complexity it exposes to callers and the complexity it hides. Two or three alternatives belong here when the design space had real contenders. One is fine when the constraints forced the answer, with the conclusion phrased as "this was the only viable shape because..." Avoid listing flavors of the same shape. This section covers design alternatives the chosen shape considered and rejected, not other runner candidates.* +## Implementation reconciliation + +*During implementation, record accepted deviations and their acceptance sources here, and update the affected usage, outcome contracts, signatures, and ownership in this design. Record why local deviations leave the shared contract valid. Keep unaccepted changes unresolved. Reconcile before closing a unit or handing its contract to the next worker.* + ## Open questions and risks *Things you noticed during the sketch that the human needs to weigh in on, and risks worth flagging before implementation starts. Phrase as questions, not assertions, so the human's answer is the resolution rather than a comment.* diff --git a/skills/architect/references/runner-prompt.md b/skills/architect/references/runner-prompt.md index d2daeee4..b1ad21ae 100644 --- a/skills/architect/references/runner-prompt.md +++ b/skills/architect/references/runner-prompt.md @@ -1,20 +1,20 @@ # Architect runner prompt -The orchestrator passes this file through to every parallel candidate runner during Phase B and fills in the variable inputs around it: the task, the Phase A grounding artifacts, the isolated working directory, and the path to write outputs. The working directory is a git worktree when available, otherwise a per-runner subdirectory under the sketch dir; what matters is independence between candidates. +The orchestrator passes this file through to every parallel candidate runner during Phase B and fills in the variable inputs around it: the task, the Phase A grounding artifacts, the isolated working directory, and the path to write outputs. The working directory is a git worktree when available, otherwise a per-runner subdirectory under the sketch dir. What matters is independence between candidates. -You are producing one candidate design in architect's parallel exploration. Read the **architect** skill in full first; that's the workflow you're inside. Output a candidate design package: type sketch, function signatures, module map, and prose rationale shaped per [`rationale-template.md`](rationale-template.md). +You are producing one candidate design in architect's parallel exploration. Read the **architect** skill in full first. That's the workflow you're inside. Output a candidate design package: type sketch, function signatures, module map, and prose rationale shaped per [`rationale-template.md`](rationale-template.md). Apply the following discipline. The orchestrator compares candidates on these axes to pick a base. -- Caller's usage first. Write the README-style usage and two or three real call sites before the types, then derive the type sketch from them. The usage is the spec; the two must agree, so reconcile the sketch to the usage, not the reverse. -- Data structures first. Get the core types right and the code becomes obvious. Trace each dominant access pattern through the proposed structure; if the answer is "we'll add a map / index / cache later," the structure is wrong. -- Interface depth. Compare the capability hidden behind the public surface relative to the size of that surface. Prefer a simple interface that pulls complexity into the callee, even when the implementation becomes less simple. Do not put transport or wire types on the public surface; parse into domain types behind the interface. +- Caller's usage first. Write the README-style usage and two or three real call sites before the types, then derive the type sketch from them. The usage is the spec. The two must agree, so reconcile the sketch to the usage, not the reverse. +- Data structures first. Get the core types right and the code becomes obvious. Trace each dominant access pattern through the proposed structure. If the answer is "we'll add a map / index / cache later," the structure is wrong. +- Interface depth. Compare the capability hidden behind the public surface relative to the size of that surface. Prefer a simple interface that pulls complexity into the callee, even when the implementation becomes less simple. Do not put transport or wire types on the public API. Parse into domain types behind the interface. - Shared state: if two actors might both write, ask "what happens?" If the answer isn't "nothing," default to per-actor state with a merge at the read boundary, per the **separate-before-serializing-shared-state** principle skill. - Make boundaries visible. `not implemented` errors for bodies, `// TODO` pseudocode for tricky logic, doc comments stating intent and invariants. A reader should trace data from input to output by reading types and signatures alone. - Encode invariants in types: hard-to-misuse types > runtime checks > prose comments, per the **encode-lessons-in-structure** principle skill. -- Validate at boundaries, trust types inside, per the **boundary-discipline** principle skill. Business logic as pure functions; the shell stays thin. +- Validate at boundaries, trust types inside, per the **boundary-discipline** principle skill. Business logic as pure functions. The shell stays thin. - Single source of truth per invariant. Derive instead of sync. - Idempotent state transitions where applicable, per the **make-operations-idempotent** principle skill. Ask what happens if the operation runs twice or crashes halfway. - Short call chains. If tracing the flow needs more than three files, flatten the hierarchy, per the **laziness-protocol** and **minimize-reader-load** principle skills. -You are one of several runners, each on a different model. Produce the best design your model can make; don't hedge against the others. Differences between candidates are the signal used to pick a base and graft. Converging on a safe-looking middle defeats the exploration. +You are one of the parallel runners, each on a different model. Produce the best design your model can make. Don't hedge against the others. Differences between candidates are the signal used to pick a base and graft. Converging on a safe-looking middle defeats the exploration. diff --git a/skills/arena/SKILL.md b/skills/arena/SKILL.md index 3ab2845d..2124c1f7 100644 --- a/skills/arena/SKILL.md +++ b/skills/arena/SKILL.md @@ -5,8 +5,8 @@ license: MIT metadata: author: jstack-maintainers source: michael-denyer/pstack-claude - source-version: "0.9.30" - source-commit: 45f768349a6d7d7e71509fee3f5bccfad54b3bad + source-version: "0.9.130" + source-commit: d88063f3355a5ecff0e6dbb890a11bab4b08bc2e owner: software-factory risk: medium capabilities: jstack,multi-agent-workflow @@ -16,73 +16,60 @@ metadata: On Codex, Cursor, or another non-Claude runtime, read the [runtime mapping](../poteto-mode/references/harness-tools.md), including its per-skill notes, before following this skill. -Fan out N parallel attempts at the same task. Read every candidate end to end. Pick the strongest as the base. Graft the best ideas from the others into it. Verify the synthesized result. +On GitHub Copilot, read the [platform mapping](../poteto-mode/references/copilot-tools.md), including its per-skill notes, before following this skill. -## Start +On Muse, read the [platform mapping](../poteto-mode/references/muse-tools.md), including its per-skill notes, before following this skill. -Open a todolist with one entry per phase before launching anything. +On Antigravity, read the [platform mapping](../poteto-mode/references/agy-tools.md), including its per-skill notes, before following this skill. -1. Frame -2. Fan out -3. Cross-judge -4. Pick -5. Graft -6. Verify +Open a todolist with one entry per phase (Frame, Fan out, Cross-judge, Pick, Graft, Verify) before launching anything. ## Phase A: Frame -The N candidates will receive the same prompt, so the prompt is the contract. +Every candidate gets the same prompt, so the prompt is the contract. 1. State the artifact each candidate is producing. -2. Derive the rubric. State what success looks like for *this* task, then turn it into 3-6 concrete gradeable criteria. The rubric is the picker's tool in Phase D; candidates only see the task. -3. Pick the runners. Use `arena runners` from `~/.claude/jstack-models.md` when present. Otherwise run one each on the defaults in [Models](#models). Spawn more when the arena covers multiple design directions. Same model N times when the work is generation-bound rather than judgment-sensitive. -4. Assign output paths. Each candidate writes to its own location (a git worktree where possible, otherwise `/tmp/arena-/candidate-/`), per the **separate-before-serializing-shared-state** principle skill. +2. Derive the rubric, 3-6 concrete gradeable criteria for what success looks like on *this* task. It is the picker's tool in Phase D. Candidates only see the task. +3. Pick the runners. Use the `arena runners` line in `jstack-models.md`. If the sheet or that line is missing, run one each on the defaults in [Models](#models). An `auto` or `inherit-parent` entry in this line means the parent model, so omit `model` for it. If the `Agent` tool rejects a configured entry, run that seat on its family's default and say so. Families go by model name, such as Opus, Fable, or Sonnet. If the family has no default, or the `Agent` tool rejects that default, use the closest valid slug of the same family from its error message, or drop the seat and say so when there is none. If dropped seats leave fewer than two runners, add runners until there are two, or one when the line has one entry. Run each added runner on a remaining runner's model, or omit `model` so it runs on the parent model when none remain, and say so. Spawn more runners when the arena covers multiple design directions. Use the same model N times when the work is generation-bound rather than judgment-sensitive. Pick each subagent's reasoning level for the job, per the Subagents section of the **poteto-mode** skill. +4. Give each candidate its own output location (a git worktree where possible, otherwise `/tmp/arena-/candidate-/`), per the **separate-before-serializing-shared-state** principle skill. ## Phase B: Fan out -Spawn all N subagents in one message with `run_in_background: true`, each with the task, the path to the shared grounding, its own output path, and instructions to produce both the artifact and a short rationale. +Spawn all N subagents in one message with `run_in_background: true`, each with the task, the path to the shared grounding, its own output path, and instructions to produce the artifact and a short rationale naming the alternatives it considered and what it rejected. -Each rationale names the alternatives the candidate considered and what it rejected. - -If a candidate fails to produce output, proceed with N-1 and note the dropout in the synthesis record. +If a candidate produces no output, proceed with N-1 and note the dropout. ## Phase C: Cross-judge -After all Phase B candidates complete, choose one model from the `arena cross-judge pool` in `~/.claude/jstack-models.md` when present. Otherwise choose from the runner defaults in [Models](#models). Prefer a different model family from the parent's. Spawn one readonly judge subagent on that model. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Don't spawn the judge while candidates are still writing. +After all Phase B candidates complete, choose one model from the `arena cross-judge pool` line in `jstack-models.md`. If the sheet or that line is missing, choose from the runner defaults in [Models](#models). Spawn one readonly judge subagent. The judge is never from the parent's family, as Phase A step 3 defines families. Try only the entries from another family, in pool order. An `auto` or `inherit-parent` entry is the parent model, so it never judges. If the `Agent` tool rejects an entry, use a valid slug of the same model at the closest level or speed from the error message, or move to the next entry when there is none. If no entry from another family runs, try the default pool's entries from another family the same way. If none of those runs, skip the judge, pick the base alone in Phase D, and say so. If you do not know the parent's model, try the pool's real slugs in pool order and say that the family check did not run. The judge sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with your reading in Phase D. Don't spawn it while candidates are still writing. ## Phase D: Pick a base -Read every candidate end to end before picking. - -Score each candidate against the rubric criterion by criterion, not on holistic feel. Compare against the cross-judge. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding. +Read every candidate end to end before picking. Score each against the rubric criterion by criterion, not on holistic feel, and compare with the cross-judge when Phase C ran one. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding. -Pick the base on which candidate a future maintainer can extend most easily without breaking invariants. Prefer the cleaner boundary or smaller surface area when two feel tied, per the Laziness Protocol. - -Record the pick and the reason in a short synthesis note alongside the base artifact, including the cross-judge's verdict. +Pick the base a future maintainer can extend most easily without breaking invariants. When two feel tied, prefer the cleaner boundary or smaller API, per the Laziness Protocol. ## Phase E: Graft -Walk each losing candidate once more and identify what is worth porting into the base. The signal is usually one or two things per candidate, not most of it. - -Fold each graft in by hand, per the **redesign-from-first-principles** principle skill. Don't paste mechanically. The result has to remain coherent under one mental model. +Walk each losing candidate once more for what is worth porting into the base, usually one or two things per candidate, not most of it. Fold each graft in by hand, per the **redesign-from-first-principles** principle skill, so the result stays coherent under one mental model. Don't paste mechanically. -Record what was grafted, from which candidate, and what was rejected and why. - -When N candidates converge on the same shape, that is a strong agreement signal. Note the convergence in the record and ship the consensus shape. No graft is needed. When N candidates wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence. +If the candidates converge on one shape, that is strong agreement. Note it and ship the consensus shape. No graft is needed. If they wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence. ## Phase F: Verify -The synthesized artifact has to hold up under the same scrutiny as any other output, per the **prove-it-works** principle skill. - -If verification surfaces a problem the arena did not catch, either Phase A was wrong (re-frame and re-run) or one candidate caught it and you missed the graft (go back to Phase E). Don't paper over. +Verify the synthesized artifact like any other output, per the **prove-it-works** principle skill. If verification finds a problem the arena missed, either Phase A was wrong (re-frame and re-run) or a candidate caught it and you missed the graft (go back to Phase E). Don't paper over it. ## Outputs -One synthesized artifact. One short synthesis note alongside, naming the base, the grafts (with source candidate), the rejections, the dropouts if any, and the verification result. +One synthesized artifact, with a short synthesis note alongside naming the base and why, the cross-judge's verdict or that Phase C skipped the judge, each graft with its source candidate, what was rejected and why, any convergence or dropouts, and the verification result. ## Models -Role defaults originate from the upstream `plugins/pstack/models.json`. Refresh them through `scripts/vendor_jstack.py` after reviewing the upstream change. A matching role line in `~/.claude/jstack-models.md` overrides each at runtime; see `/setup-jstack`. +Role defaults originate from the upstream `plugins/pstack/models.json`. Refresh them through `scripts/vendor_jstack.py` after reviewing the upstream change. A matching role line in the `jstack-models.md` override sheet overrides each at runtime; `/setup-jstack` writes it and lists its path per runtime. + +- arena runners: `opus`, `fable`, `sonnet`, `haiku` +- arena cross-judge pool: `opus`, `fable`, `sonnet`, `haiku` + +## Reasoning effort -- arena runners: `claude-opus-5`, `claude-fable-5-1`, `claude-sonnet-5` -- arena cross-judge pool: `claude-opus-5`, `claude-fable-5-1`, `claude-sonnet-5` +A role value in the override sheet may name a reasoning effort after its model, as in `opus @xhigh`. Levels on Claude Code: `low`, `medium`, `high`, `xhigh`, `max`. Which ones apply depends on the model. A value without `@` takes the sheet's `default effort` line, a level or `session`, and `session` when the sheet has no such line. On Claude Code, `session` sets no effort. On other runtimes, follow the platform mapping for `session`. Strip the suffix before reading the model: `inherit-parent` or `auto` still omits `model` at every level, and a model name is passed as `model`. Pass the level as the dispatch's effort field and keep the `subagent_type` you would otherwise use. That is `effort` on the Claude Code `Agent` call and `reasoning_effort` on Codex's `spawn_agent`. On Muse it is `effort` on a Workflow child; a `subagent_spawn` dispatch keeps the session's effort. diff --git a/skills/automate-me/SKILL.md b/skills/automate-me/SKILL.md index 7069b1b7..1220a46f 100644 --- a/skills/automate-me/SKILL.md +++ b/skills/automate-me/SKILL.md @@ -5,8 +5,8 @@ license: MIT metadata: author: jstack-maintainers source: michael-denyer/pstack-claude - source-version: "0.9.30" - source-commit: 45f768349a6d7d7e71509fee3f5bccfad54b3bad + source-version: "0.9.130" + source-commit: d88063f3355a5ecff0e6dbb890a11bab4b08bc2e owner: software-factory risk: medium capabilities: jstack,engineering-workflow @@ -16,38 +16,44 @@ metadata: On Codex, Cursor, or another non-Claude runtime, read the [runtime mapping](../poteto-mode/references/harness-tools.md), including its per-skill notes, before following this skill. +On GitHub Copilot, read the [platform mapping](../poteto-mode/references/copilot-tools.md), including its per-skill notes, before following this skill. + +On Muse, read the [platform mapping](../poteto-mode/references/muse-tools.md), including its per-skill notes, before following this skill. + +On Antigravity, read the [platform mapping](../poteto-mode/references/agy-tools.md), including its per-skill notes, before following this skill. + A guided flow for turning the user's working conventions into a skill agents will follow. Creating or editing a user-scoped skill requires the user's explicit choice of user scope; otherwise keep the output project-local. The output is one `-mode` skill tailored to them (e.g. `jay-mode`, `priya-mode`). -This skill orchestrates three others: an inline mining pass (see step 1), the `plugin-dev:skill-development` skill (authoring), and the **unslop** skill (prose discipline). It sequences them; it doesn't replace them. +This skill orchestrates three others: an inline mining pass (see step 1), the **plugin-dev:skill-development** skill (authoring), and the **unslop** skill (prose discipline). It sequences them. It doesn't replace them. ## Flow ### 0. Check for an existing skill -Look recursively for `.claude/skills/**/*-mode/SKILL.md` and `~/.claude/skills/*-mode/SKILL.md` matching the user's handle. Mode skills can live in a personal category directory (`.claude/skills//`), not only at the top level. If one exists, confirm intent with `AskUserQuestion` (unless they already said "update my skill" or similar): +Look recursively for `.claude/skills/**/*-mode/SKILL.md` and `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/*-mode/SKILL.md` matching the user's handle. Mode skills can live in a personal category directory (`.claude/skills//`), not only at the top level. If one exists, confirm intent with `AskUserQuestion` (unless they already said "update my skill" or similar): - Update the existing skill (default for repeat runs) -- Start fresh (rare; ask why before doing it) +- Start fresh (rare, ask why before doing it) Update mode changes the rest of the flow: - Step 1 mines only history since the skill was last edited (`git log -1 --format=%cI `). - Step 2 asks what's changed or missing, not what to capture from zero. -- Step 4 edits the existing file in place. Preserve sections the user hasn't contradicted; revise ones with new evidence; add new sections only for genuinely new rules. +- Step 4 edits the existing file in place. Preserve sections the user hasn't contradicted. Revise ones with new evidence. Add new sections only for genuinely new rules. ### 1. Mine their history -Locate the active workspace's transcripts before fanning out. Claude Code stores them at `~/.claude/projects//*.jsonl`, where `` is the workspace's working directory with `/` → `-`. Use only that path. Don't glob across `~/.claude/projects/`. That crosses workspace boundaries and reads private chats from unrelated projects. +Locate the active workspace's transcripts before fanning out. Claude Code stores them at `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects//*.jsonl`. Run `node /skills/reflect/scripts/claude-project-dir.mjs` to print this session's directory rather than building `` by hand. Use only that path. Don't glob across `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/`. That crosses workspace boundaries and reads private chats from unrelated projects. -Survey recent agent conversations within that scope for recurring patterns. Run multiple parallel subagents across slices of history (e.g. last 2-4 weeks, split into 3 slices so each has enough material). Each slice mining subagent reads transcripts from the workspace-scoped path the parent provides, looks for the signals below, and returns a short structured list of patterns it saw with evidence pointers. Default signals worth hunting: +Survey recent agent conversations within that scope for recurring patterns. Run multiple parallel subagents across slices of history (e.g. last 2-4 weeks, split into 3 slices so each has enough material). Pick each subagent's reasoning level for the job, per the Subagents section of the **poteto-mode** skill. Each slice mining subagent reads transcripts from the workspace-scoped path the parent provides, looks for the signals below, and returns a short structured list of patterns it saw with evidence pointers. Default signals worth hunting: - Response preferences (length, tone, format, "dumb it down" corrections) - Delegation habits (subagents, models, specialized workflows, parallelism) -- Verification posture (what "done" means; unit tests vs live repro; reviewers) +- Verification posture (what "done" means, unit tests vs live repro, reviewers) - Code and prose discipline (style, principles cited, lint/format tools) - Process conventions (worktrees, commits, PRs, review/merge tooling) - Meta preferences (fixing skills mid-task, proposing new ones) -Cross-check across slices before elevating a signal. Patterns seen in 2+ slices are high-confidence; lone signals are weak and usually get dropped. +Cross-check across slices before elevating a signal. Patterns seen in 2+ slices are high-confidence. Lone signals are weak and usually get dropped. ### 2. Ask the user directly @@ -62,7 +68,7 @@ Don't dump 20 questions. Group the combined signals into sections. Common ones (use only what applies): - **Response style**: length, tone, format. -- **Autonomy**: how much to do without asking; MCP tool use. +- **Autonomy**: how much to do without asking, MCP tool use. - **Understand first**: which skills to reach for when scoping or investigating a change. - **Subagents**: default, parallelism, model-to-task, specialized workflows. - **Prose / code discipline**: principles, lint tools, style guides. @@ -70,23 +76,23 @@ Group the combined signals into sections. Common ones (use only what applies): - **Process**: git worktrees, commits, PRs, review/merge tooling. - **Skills**: skill-authoring habits, fix-the-skill-first, proposing new skills. -The **poteto-mode** skill shows the shape. Read it for granularity. Don't copy its content; the user's rules are not the same as poteto-mode's. +The **poteto-mode** skill shows the shape. Read it for granularity. Don't copy its content. The user's rules are not the same as poteto-mode's. ### 4. Draft the skill Use the **plugin-dev:skill-development** skill to author the skill. Placement: -- Path: preserve an existing mode skill's category. For a new mode, use `.claude/skills//-mode/SKILL.md` when the repo has an established personal category for that handle; otherwise default to `.claude/skills/-mode/SKILL.md` in the project (or `~/.claude/skills/-mode/` if the user prefers a personal skill). +- Path: preserve an existing mode skill's category. For a new mode, use `.claude/skills//-mode/SKILL.md` when the repo has an established personal category for that handle. Otherwise default to `.claude/skills/-mode/SKILL.md` in the project (or `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/-mode/` if the user prefers a personal skill). - Handle: the user's first name or chosen identifier. - Frontmatter `description`: trigger on their name + `/-mode` + "work in their style", not on generic keywords like "write code" or "review PR". -- Frontmatter formatting: follow `plugin-dev:skill-development`'s YAML rules. Keep `description` as one YAML scalar; quote it or use `description: >-` with indented continuation lines when punctuation or wrapping requires it. +- Frontmatter formatting: follow `plugin-dev:skill-development`'s YAML rules. Keep `description` as one YAML scalar. Quote it or use `description: >-` with indented continuation lines when punctuation or wrapping requires it. - Frontmatter `disable-model-invocation: true` by default. Opt out only if the user explicitly wants their mode to apply on every turn. ### 5. Iterate on prose Apply the **unslop** skill and `plugin-dev:skill-development`'s writing guidelines to every line. -Show the draft to the user and take feedback. Expect multiple iterations. Cut ruthlessly; a mode skill is not a manual. +Show the draft to the user and take feedback. Expect multiple iterations. Cut ruthlessly. A mode skill is not a manual. ### 6. Land it @@ -110,5 +116,5 @@ Run a description-optimization loop only if the skill's trigger accuracy turns o ## When not to use - User wants a task-specific skill (not working conventions): `plugin-dev:skill-development` alone, no mining required. -- User wants to capture one narrow workflow (e.g. "how I write commit messages"): that's a regular skill, not a mode skill. +- User wants to capture one narrow workflow (e.g. "how I write commit messages"). That's a regular skill, not a mode skill. diff --git a/skills/babysit/SKILL.md b/skills/babysit/SKILL.md index dca9fc82..33d22764 100644 --- a/skills/babysit/SKILL.md +++ b/skills/babysit/SKILL.md @@ -5,8 +5,8 @@ license: MIT metadata: author: jstack-maintainers source: michael-denyer/pstack-claude - source-version: "0.9.30" - source-commit: 45f768349a6d7d7e71509fee3f5bccfad54b3bad + source-version: "0.9.130" + source-commit: d88063f3355a5ecff0e6dbb890a11bab4b08bc2e owner: software-factory risk: medium capabilities: jstack,pull-request-workflow @@ -16,6 +16,12 @@ metadata: On Codex, Cursor, or another non-Claude runtime, read the [runtime mapping](../poteto-mode/references/harness-tools.md), including its per-skill notes, before following this skill. +On GitHub Copilot, read the [platform mapping](../poteto-mode/references/copilot-tools.md), including its per-skill notes, before following this skill. + +On Muse, read the [platform mapping](../poteto-mode/references/muse-tools.md), including its per-skill notes, before following this skill. + +On Antigravity, read the [platform mapping](../poteto-mode/references/agy-tools.md), including its per-skill notes, before following this skill. + Claude Code analog of Cursor's built-in `/babysit`. The implementation is a loop over `gh` CLI plus the Claude Code `loop` skill for pacing. Inside poteto-mode, the **Babysit** playbook ([`../poteto-mode/playbooks/babysit.md`](../poteto-mode/playbooks/babysit.md)) supersedes this skill: it owns mode declaration, the merge frontier, stack safety, and the `watch-pr` watcher. This skill stays the standalone `/babysit` entry point for a single PR outside a poteto-mode run. diff --git a/skills/before-and-after/SKILL.md b/skills/before-and-after/SKILL.md index 84d04e54..2f43b8da 100644 --- a/skills/before-and-after/SKILL.md +++ b/skills/before-and-after/SKILL.md @@ -1,131 +1,171 @@ --- name: before-and-after -description: Capture before/after screenshots of pages, elements, or images. Use when UI changes need visual comparison or pull-request evidence. +description: Use when attaching screenshots or recordings to a GitHub PR. license: LICENSE -compatibility: Requires Node.js for capture. Upload and PR integration require network access and authenticated provider tooling. +compatibility: Requires Node.js, agent-browser for capture, and authenticated gh with --attach support for publication. metadata: + source-commit: 8306d34f459b6704e08e6adb5829fcddb0dc3557 author: vercel-labs - version: "2.0.0" + version: "3.0.0" owner: software-factory risk: medium capabilities: visual-evidence,pr-evidence -allowed-tools: >- - Bash(npx @vercel/before-and-after *) Bash(before-and-after *) - Bash(which before-and-after) Bash(*/upload-and-copy.sh *) - Bash(curl -s -o /dev/null -w *) Bash(gh pr view *) Bash(gh pr edit *) - Bash(vercel inspect *) Bash(vercel whoami) Bash(which vercel) Bash(which gh) --- -# Before-After Screenshot Skill +# Add visual media to a PR -> **Package:** `@vercel/before-and-after` -> Never use `before-and-after` (wrong package). +Use `agent-browser` to create the screenshots or recordings. This skill only owns the GitHub PR attachment workflow. -## Agent Behavior Rules +Resolve `FORMAT` to the absolute path of `scripts/format.mjs` inside this installed skill. Run the examples from the target repository. Reuse suitable media already captured in the task. Local evidence requests require no upload. Publish or edit a PR only within the user's existing authorization. Creating temporary comments for video uploads also requires that authorization. -**DO NOT:** -- Switch branches or stash another task's changes. Use an isolated worktree for - any baseline server already authorized by the task. -- Use `--full` unless user explicitly asks for full page / full scroll capture +Before publication, check `gh pr edit --help` and, for video-table comments, `gh pr comment --help` for `--attach`. Older versions may lack it. If unavailable, deliver the local media and formatted block, or use a user-authorized upload capability. Do not install or upgrade gh automatically, send local paths to a remote PR, or fall back to a public host without authorization. Current flag behavior is documented in the [GitHub CLI manual](https://cli.github.com/manual/gh_pr_edit). -**DO:** -- Use `--markdown` when user wants PR integration or markdown output -- Use `--mobile` / `--tablet` if user mentions phone, mobile, tablet, responsive, etc. -- Reuse before captures, baseline URLs, and revision information already - established in the task. Confirm that they show the relevant behavior and - match the after capture's viewport and starting state. -- Treat the current state as after only when the task context establishes it. - If the before state remains ambiguous after checking available context, ask - for the missing baseline. Do not ask again for a URL when a valid image pair - or earlier baseline is already available. +## Capture -## Capture and delivery +1. Load the version-matched core instructions with `agent-browser skills get core --full` and follow them for sessions, navigation, page state, screenshots, and recordings. +2. If a Vercel URL is protected, load `agent-browser skills get protected-vercel-deployments --full`. Do not reproduce its authentication workflow here. +3. Save media under the repository with paths that contain no whitespace, for example: -1. Use an installed `before-and-after` CLI or `npx @vercel/before-and-after`. -2. For remote URLs, check access when needed. A 401/403 indicates protection. - Existing image pairs do not require a URL or deployment access check. -3. Capture missing images with `before-and-after "" ""`. -4. When the task calls for uploaded evidence or PR markdown, run - `before-and-after before.png after.png --markdown` once. For local capture - requests, deliver the files without uploading them. -5. Append the markdown to the PR when PR integration is part of the task. + ```text + captures/desktop-before.png + captures/desktop-after.png + captures/mobile-before.png + captures/mobile-after.png + ``` -Resolve bundled script paths relative to this skill's directory, not the -project working directory. Reuse earlier evidence instead of recapturing it. +The formatter supports PNG, JPEG, GIF, WebP, MP4, MOV, and WebM files. Use an `--after` file without a matching `--before` file for a net-new preview. -## Quick Reference +### Screen recordings -```bash -# Basic usage -before-and-after +`agent-browser record start` creates a fresh browser context. It preserves cookies and local storage, but an origin-scoped header used to open a protected Vercel Preview may not carry into that new context. Before recording a protected Preview: -# With selector -before-and-after url1 url2 ".hero-section" +1. Load `agent-browser skills get protected-vercel-deployments --full`. +2. Start the recording context on a blank page. +3. Apply the authentication method from that skill inside the recording context. +4. Navigate to the Preview only after authentication is active, then trim the navigation lead-in if necessary. -# Different selectors for each -before-and-after url1 url2 ".old-card" ".new-card" +Do not assume that a page which worked before `record start` will remain authenticated after it. -# Viewports -before-and-after url1 url2 --mobile # 375x812 -before-and-after url1 url2 --tablet # 768x1024 -before-and-after url1 url2 --full # full scroll +Agent-browser `0.35.2` and `0.36.0` capture at a hardcoded 10 fps with no CLI or environment override. Inspect the installed version and its recording reference rather than assuming this stays true in later releases. Preserve the source cadence when transcoding: changing the container to 30 or 60 fps only duplicates frames and does not make motion smoother. For animation evidence that requires a higher real frame rate, use a genuinely higher-cadence capture path instead of upsampling agent-browser output. -# From existing images -before-and-after before.png after.png --markdown +### Equal-height image pairs -# Via npx (use full package name!) -npx @vercel/before-and-after url1 url2 -``` +GitHub vertically centers a shorter image inside a Markdown table cell. For full-page before/after screenshots, make both files the same pixel height so their top edges align: + +1. Open both pages at the same viewport and state. +2. Read `document.documentElement.scrollHeight` in both sessions. +3. Append bottom-only space to the shorter page until both scroll heights match, then take both `--full` screenshots. + +The padding may be transparent or use the capture tool's default canvas. Never add space above the page. For component or section comparisons, capture the same scoped region instead of padding unrelated page content. -| Flag | Description | -|------|-------------| -| `-m, --mobile` | Mobile viewport (375x812) | -| `-t, --tablet` | Tablet viewport (768x1024) | -| `--size ` | Custom viewport | -| `-f, --full` | Full scrollable page | -| `-s, --selector` | CSS selector to capture | -| `-o, --output` | Output directory (default: ~/Downloads) | -| `--markdown` | Upload images & output markdown table | -| `--upload-url ` | Custom upload endpoint (default: 0x0.st) | +Use raw `agent-browser eval` for this DOM-only adjustment; do not add an image-processing dependency to this skill. Confirm the resulting files have equal pixel dimensions before publishing. -## Image Upload +## Format + +Pass one `--before` and `--after` pair for each comparison. Repeat `--label` to identify multiple pairs: ```bash -# Default (0x0.st - no signup needed) -./scripts/upload-and-copy.sh before.png after.png --markdown +node "$FORMAT" \ + --before captures/desktop-before.png \ + --after captures/desktop-after.png \ + --before captures/mobile-before.png \ + --after captures/mobile-after.png \ + --label Desktop \ + --label Mobile \ + > /tmp/before-and-after.md +``` + +For an after-only preview: -# GitHub Gist -IMAGE_ADAPTER=gist ./scripts/upload-and-copy.sh before.png after.png --markdown +```bash +node "$FORMAT" \ + --after captures/new-page.png \ + > /tmp/before-and-after.md ``` -## Vercel Deployment Protection +Add `--attribution ""` to prefix the block with a `> Before/after by ` line when the PR should credit who produced the evidence. -If `.vercel.app` URL returns 401/403: +Images render in tables. Local videos initially render on their own lines so `gh --attach` can upload them and expose their final attachment URLs. Before/after video tables use the two-step workflow below because `gh --attach` does not rewrite local references inside `