diff --git a/.agents/skill-sources.json b/.agents/skill-sources.json index f5fa483..9b3803f 100644 --- a/.agents/skill-sources.json +++ b/.agents/skill-sources.json @@ -41,21 +41,6 @@ "SKILL.md": "2b3223a02c386d1263e1b08343cb8eb3a53e444cdafb1d79e26c8ec2a8fcad28" } }, - { - "name": "grill-me", - "repository": "https://github.com/mattpocock/skills", - "revision": "5beb35b040e3de97e54fa9e386d7e42d15c295c2", - "path": "skills/productivity/grill-me", - "tree": "3df14e2d3a89459bf300614be9247e3ce74798f8", - "installedFrom": "official upstream (pinned revision)", - "license": "MIT", - "codexAdaptation": "Replace Claude Skill-tool call with reading ../grilling/SKILL.md; synchronization restores the upstream Claude entry point.", - "files": { - "LICENSE": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5", - "SKILL.md": "14b78da25bb1f4fd8cfb3183440a0f490e93dad0d94a390cc8e8fb0f073b50d7", - "agents/openai.yaml": "c061e39c3e0f9d865fb1b97556d485704af2a8a58f4b8221a8917a5c2074a32b" - } - }, { "name": "grilling", "repository": "https://github.com/mattpocock/skills", @@ -239,6 +224,19 @@ "rules/server-parallel-nested-fetching.md": "ad5d9656984d4a959997a2367bf59cc6632297b4634a1dd13a087939d83f30b3", "rules/server-serialization.md": "f4c7d68b29c82381baad059c4a7f09e868e71ec9c3115a26ad3ae7d24c0dfe1f" } + }, + { + "name": "frontend-design", + "repository": "https://github.com/anthropics/skills", + "revision": "dbd4588f9e1033efb41dad4bef2f7947c8993d44", + "path": "skills/frontend-design", + "tree": "d79e2a5bb4df4a386c2adcdd9ab8709bba28c3f6", + "installedFrom": "Official upstream", + "license": "Apache-2.0", + "files": { + "LICENSE.txt": "0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594", + "SKILL.md": "d91970639e9f5c37682ac7ab60094d35f1c7c1f38d731bd56396563aee10c1d3" + } } ] } diff --git a/.agents/skills/codex-review/SKILL.md b/.agents/skills/codex-review/SKILL.md new file mode 100644 index 0000000..f4ea41c --- /dev/null +++ b/.agents/skills/codex-review/SKILL.md @@ -0,0 +1,37 @@ +--- +name: codex-review +description: Run an independent cross-model review with Codex on the current task branch or design, then triage its findings. Use when AGENTS.md requires an independent reviewer (T2, CI or guard changes) or when the user asks for a Codex review; not for self-review of T0/T1 work. +--- + +# Codex review + +Codex reviews; you (the implementer) prepare the package, run it, and triage. Codex never edits files. + +## 1. Prepare +- Work is committed on your task branch inside your worktree: review a commit, not a dirty tree. +- `git fetch origin`; rebase onto `origin/main` if it moved. Record the reviewed SHA: `git rev-parse HEAD`. +- Write a short brief in `.tmp//review-brief.md`: goal, non-goals, task size, invariants and boundaries touched, acceptance criteria. Facts only: no claims that the change is correct, minimal or safe. + +## 2. Run (read-only, from the worktree root) +Code: +```sh +codex exec -s read-only -c model_reasoning_effort="high" "$(cat .tmp//review-brief.md) + +You are an independent reviewer of the changes on this branch against origin/main (git diff origin/main...HEAD). Follow AGENTS.md: its Review rules, task-size table and financial invariants. Read the code and tests yourself; trust no summary. Check correctness, regressions, security, tenant isolation, concurrency, idempotency, migrations and test adequacy as relevant. Report findings only, ordered by severity, each with: P0/P1/P2, file:line, a concrete failing scenario, actual versus required behavior. Say explicitly if you found nothing blocking. Do not modify files." +``` +Design (no diff yet): same command, but replace the diff sentence with "review this design for the repository" and append the design text or its `.tmp` path. + +Save Codex's final message to `.tmp//review-.md` (redirect stdout, or `--output-last-message` where supported). Never overwrite an earlier review file. + +## 3. If Codex cannot run +Not installed, config or sandbox error, usage limit: report the error once, do not loop. Fall back to a fresh read-only subagent (or a fresh session) given the same brief and SHA, and label the reviewer as fallback. Your own re-read is not an independent review. + +## 4. Triage every finding +- **Accept**: reproduce it (a failing test where feasible), then fix. +- **Reject**: cite code or test evidence (file:line) showing why it does not apply. +- **Human decision**: policy, product or financial-semantics questions go to the user; do not resolve them by changing requirements. + +Fix accepted findings in one wave, rerun the affected checks, and review the new SHA again. At most two correction rounds; then stop and hand the remaining findings to the user. + +## 5. Report (PR Review section) +Reviewer (Codex, model and effort, or fallback), reviewed SHA, a findings table with disposition, and open human decisions. diff --git a/.agents/skills/frontend-design/LICENSE.txt b/.agents/skills/frontend-design/LICENSE.txt new file mode 100644 index 0000000..f433b1a --- /dev/null +++ b/.agents/skills/frontend-design/LICENSE.txt @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/.agents/skills/frontend-design/SKILL.md b/.agents/skills/frontend-design/SKILL.md new file mode 100644 index 0000000..a533345 --- /dev/null +++ b/.agents/skills/frontend-design/SKILL.md @@ -0,0 +1,71 @@ +--- +name: frontend-design +description: Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. +license: Complete terms in LICENSE.txt +--- + +# Frontend Design + +Approach this as the design lead at a design studio known for giving every client a distinct visual identity that is not mistaken for anyone else's. This client has already rejected proposals that felt cliché or templated, and is paying for a distinctive point of view: make deliberate, opinionated choices about palette, typography, and layout that are specific to this brief, and take aesthetic risk if justified. + +## Ground your designs in the subject matter + +If the brief does not identify what the product or subject matter is, identify it yourself before designing, and confirm with the client. You can come up with one concrete subject, the design's audience, and the design's primary job, as a proposal. If there's any information in your memory about the client's preferences or context about what they're building, use that as a hint. The subject's industry, subject matter, materials, and vernacular are where distinctive visual choices come from — a design for a toy for girls aged 8–11 will be very aesthetically different from a dashboard for financial analysts. Build with the brief's real content and subject matter throughout. + +## Design principles + +For web designs, the hero is the first thing viewers will see. Open with the most characteristic thing in the subject's world, in the form that is most appropriate: a headline, an image, an animation, a live demo, an interactive moment, or other treatments. Be deliberate with your choice: a big number with a small label, supporting stats, and a gradient accent is the default treatment, so only use it if that's truly the best option. + +Typography carries the personality of the page. You don't need a different typeface for display or headline text and body content: use one family or two, and if two, make them clearly distinct. + +Choose your typefaces deliberately, not the default families you would reach for on any other project, and set a clear type scale following the default guidance of The Elements of Typographic Style with intentional weights, widths, and spacing. When type is used as a headline or visual element, use the type treatment itself as an active part of the design, not a neutral delivery vehicle for the content. + +Default to line lengths of less than 80 characters. Serif typefaces can have slightly longer line lengths; give serif body text slightly more line-height than a sans-serif. + +Avoid these default typographic treatments; they are the commonest tells of a generated page: +- Accenting just a single word or phrase in a headline, like putting one word in italic/bold or a different color. +- Using all caps for labels. +- Adding unnecessary typographic labels above content. + +Visual structure is information. Structural devices like outlines, borders, numbering, eyebrows, dividers, labels, etc., encode useful information about the content rather than decorate it. Many generic designs use numbered markers (01 / 02 / 03), but that's only appropriate if the content actually is a sequence — like a stepped process or a timeline. Before adding numbered markers, check the content really is a sequence. + +Use non-user-triggered motion sparingly and deliberately, only to draw attention. A single orchestrated moment — one page-load sequence or one reveal — lands better than scattered effects; fade-and-slide-up entrances on each section and hover transitions on every card are the generic default and read as AI-generated. Motion that answers a person's action (opening, expanding, confirming) is welcome when it shows what changed. + +Consider written content carefully. Often a design brief may not contain real content, and it's up to you to come up with copy and placeholder content. Copy can make a design feel as templated as the design itself. See the below section on writing for more guidance. + +## Process: plan, review against the brief, build, critique + +For calibration, AI-generated design right now clusters around some traits: +1. a warm cream background (near #F4F1EA) with a high-contrast serif display and a terracotta or warm-clay accent (often near #D97757 — Anthropic's own Claude-interaction accent, so on a user's brief it reads as a tell); +2. a near-black background with a single bright acid-green or vermilion accent; +3. a broadsheet-style layout with hairline rules, zero border-radius, and dense newspaper-like columns; +4. the SaaS-card kit: content chopped into identical rounded cards, one border-radius on everything regardless of hierarchy, the same soft grey shadow (rgba(0,0,0,.1)) under each, and gradient washes as decoration; +5. template chrome that appears whatever the subject: a tracked-out ALL-CAPS eyebrow label above every heading; meta strings joined with middle dots ('A · B · C'); labels built as 'WORD — fragment' with a spaced em dash; tinted near-black (#0B0B0B, #111) standing in for black; a monospace face for small data labels; a '→' appended to link and button text. + +All traits are legitimate for some briefs, but they are defaults rather than choices, and they appear regardless of subject. Where the brief pins down a visual direction, follow it exactly — the brief's own words always win, including when it asks for one of these looks. Where it leaves an axis free, don't spend that freedom on one of these defaults. As with a hired human designer, there's often a careful balance between doing what you're good at and taking each project as a chance to experiment and learn. + +Work in two passes. First, brainstorm a short design plan based on the client's design brief: create a compact token system with color, type, layout, and principles. +- Color: describe the core base palette as 4–6 named hex values. +- Type: the typefaces and their roles. +- Layout: a layout concept, using one-sentence prose descriptions and ASCII wireframes to ideate and compare. Include alignment guidance; should the content be left aligned, center aligned, justified? +- Principles: the high-level guidance for what makes this page unique. + +Then review that plan against the brief before building: if any part of it reads like the generic default you would produce for any similar page (work through a similar prompt to see if you arrive somewhere similar) rather than a choice made for this specific brief — revise that part, say what you changed and why. Only after you've confirmed the relative uniqueness of your design plan should you start to write the code, following the revised plan. + +When writing the code, be careful of structuring your CSS selector specificities. It's easy to generate CSS classes that cancel each other out (especially with a type-based selector like .section and an element-based selector like .cta). This can happen often with padding/margin between sections. + +## Restraint and self-critique + +Spend your boldness in one place. Let one element be the memorable thing, keep everything around it quiet and disciplined, and cut any decoration that does not serve the brief. Build to a quality floor without announcing it: responsive down to mobile, visible keyboard focus, reduced motion respected, visually accessible, harmonious color palettes. Critique your own work as you build, taking screenshots to review if your environment supports it — a picture is worth 1000 tokens. Consider Chanel's advice: before leaving the house, take a look in the mirror and remove one accessory. Human creatives have memory and always try to do something new, so if you have a space to quickly jot down notes about what you've tried, it can help you in future passes. + +## More on writing in design + +Words appear in a design for one reason: to make it easier to understand and use. They are design content, not decoration. Bring the same intentionality and minimalism to copywriting that you would bring to spacing and color. Before writing anything, ask what the design needs to say, and how it can best be said to help the person navigate the experience. + +Write from the end user's perspective. Name things by what users will understand in simple language, not by how the system is built. A user manages notifications, not webhook config. Describe what something is or does in plain terms rather than selling it. Being specific and legible to new users is always better than being clever. + +Use active voice as default. A CTA says exactly what happens when it is used: "Save changes," not "Submit." An action keeps the same name through the whole flow, so the button that says "Publish" produces a toast that says "Published." The vocabulary of an interface is the signposting for someone navigating the product. Cohesion and consistency are how people learn their way around. + +Treat failure and emptiness as moments for direction, not mood. Explain what went wrong and how to fix it, in the interface's voice rather than a person's. Errors don't apologize, and they are never vague about what happened. An empty screen is an invitation to act. + +Keep the tone conversational: plain verbs, sentence case, no filler, with tone matched to the brand and the audience. Let each written element do exactly one job. diff --git a/.agents/skills/grill-me/LICENSE b/.agents/skills/grill-me/LICENSE deleted file mode 100644 index f1dd2c0..0000000 --- a/.agents/skills/grill-me/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Matt Pocock - -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/.agents/skills/grill-me/SKILL.md b/.agents/skills/grill-me/SKILL.md deleted file mode 100644 index ba9931e..0000000 --- a/.agents/skills/grill-me/SKILL.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: grill-me -description: A relentless interview to sharpen a plan or design. -disable-model-invocation: true ---- - -Read [../grilling/SKILL.md](../grilling/SKILL.md) and follow it. diff --git a/.agents/skills/grill-me/agents/openai.yaml b/.agents/skills/grill-me/agents/openai.yaml deleted file mode 100644 index 4d6fb0c..0000000 --- a/.agents/skills/grill-me/agents/openai.yaml +++ /dev/null @@ -1,5 +0,0 @@ -interface: - display_name: "Grill Me" - short_description: "Sharpen a plan through interview" -policy: - allow_implicit_invocation: false diff --git a/.agents/skills/ship-pr/SKILL.md b/.agents/skills/ship-pr/SKILL.md new file mode 100644 index 0000000..3e7381a --- /dev/null +++ b/.agents/skills/ship-pr/SKILL.md @@ -0,0 +1,38 @@ +--- +name: ship-pr +description: Prepare a finished task branch for a pull request (rebase, guards, pre-PR checks, review prerequisites, PR description from the template) and push or open the PR only after explicit user authorization. Use when a T1/T2 task is done; T0 changes may use it too. +--- + +# Ship a PR + +Never push, open or merge a PR without the user's explicit go-ahead in this session. Merging is always the human's. + +## 1. Bring the branch up to date +- In the task worktree, the tree is clean and everything is committed. +- `git fetch origin && git rebase origin/main`. On a conflict in migrations, financial code or anything you cannot resolve with certainty, stop and report. + +## 2. Guards +- New migrations: the number follows the latest on `origin/main`, the journal entry is appended with a newer `when`. Run `node scripts/check-migration-history.mjs origin/main HEAD`. +- `node scripts/check-pr-review-signals.mjs origin/main HEAD`. If it lists T2-area files but the task was classified lower, reclassify and meet the T2 obligations before continuing. Treat a CI or guard change as needing an independent review. + +## 3. Checks +Run the pre-PR set and any size-specific checks from AGENTS.md *Verification commands*. Any FAIL stops here. Report every planned check as PASS, FAIL or NOT RUN with the reason. + +## 4. Review prerequisites +- T1: `ponytail-review` of your own diff. +- T2, CI or guard changes: `codex-review` on the current HEAD. If commits landed after that review, review again. +- Auth, tenancy, billing/payments or secrets: also run `/security-review` in Claude Code. + +## 5. PR description +Write `.tmp//pr.md` from `.github/pull_request_template.md`, including the review guide. Use only evidence from commands you actually ran; hosted CI is NOT RUN until the PR exists. Title: a Conventional Commit line. + +## 6. Ask, then ship +Show the user the branch, title and a three-line summary, and ask to push and open the PR. Only after a yes: +```sh +git push -u origin / # always an explicit branch, never a bare push +gh pr create --base main --head / --title "" --body-file .tmp/<task-slug>/pr.md +``` +(or the host's GitHub tools). Report the PR URL. Watch checks (`gh pr checks`) only if asked; never merge. + +## 7. After the merge +When the user confirms the merge: remove the worktree with `git worktree remove`, delete the local branch, and delete the task's `.tmp` files. diff --git a/.claude/skills/codex-review/SKILL.md b/.claude/skills/codex-review/SKILL.md new file mode 100644 index 0000000..f4ea41c --- /dev/null +++ b/.claude/skills/codex-review/SKILL.md @@ -0,0 +1,37 @@ +--- +name: codex-review +description: Run an independent cross-model review with Codex on the current task branch or design, then triage its findings. Use when AGENTS.md requires an independent reviewer (T2, CI or guard changes) or when the user asks for a Codex review; not for self-review of T0/T1 work. +--- + +# Codex review + +Codex reviews; you (the implementer) prepare the package, run it, and triage. Codex never edits files. + +## 1. Prepare +- Work is committed on your task branch inside your worktree: review a commit, not a dirty tree. +- `git fetch origin`; rebase onto `origin/main` if it moved. Record the reviewed SHA: `git rev-parse HEAD`. +- Write a short brief in `.tmp/<task-slug>/review-brief.md`: goal, non-goals, task size, invariants and boundaries touched, acceptance criteria. Facts only: no claims that the change is correct, minimal or safe. + +## 2. Run (read-only, from the worktree root) +Code: +```sh +codex exec -s read-only -c model_reasoning_effort="high" "$(cat .tmp/<task-slug>/review-brief.md) + +You are an independent reviewer of the changes on this branch against origin/main (git diff origin/main...HEAD). Follow AGENTS.md: its Review rules, task-size table and financial invariants. Read the code and tests yourself; trust no summary. Check correctness, regressions, security, tenant isolation, concurrency, idempotency, migrations and test adequacy as relevant. Report findings only, ordered by severity, each with: P0/P1/P2, file:line, a concrete failing scenario, actual versus required behavior. Say explicitly if you found nothing blocking. Do not modify files." +``` +Design (no diff yet): same command, but replace the diff sentence with "review this design for the repository" and append the design text or its `.tmp` path. + +Save Codex's final message to `.tmp/<task-slug>/review-<n>.md` (redirect stdout, or `--output-last-message` where supported). Never overwrite an earlier review file. + +## 3. If Codex cannot run +Not installed, config or sandbox error, usage limit: report the error once, do not loop. Fall back to a fresh read-only subagent (or a fresh session) given the same brief and SHA, and label the reviewer as fallback. Your own re-read is not an independent review. + +## 4. Triage every finding +- **Accept**: reproduce it (a failing test where feasible), then fix. +- **Reject**: cite code or test evidence (file:line) showing why it does not apply. +- **Human decision**: policy, product or financial-semantics questions go to the user; do not resolve them by changing requirements. + +Fix accepted findings in one wave, rerun the affected checks, and review the new SHA again. At most two correction rounds; then stop and hand the remaining findings to the user. + +## 5. Report (PR Review section) +Reviewer (Codex, model and effort, or fallback), reviewed SHA, a findings table with disposition, and open human decisions. diff --git a/.claude/skills/frontend-design/LICENSE.txt b/.claude/skills/frontend-design/LICENSE.txt new file mode 100644 index 0000000..f433b1a --- /dev/null +++ b/.claude/skills/frontend-design/LICENSE.txt @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/.claude/skills/frontend-design/SKILL.md b/.claude/skills/frontend-design/SKILL.md new file mode 100644 index 0000000..a533345 --- /dev/null +++ b/.claude/skills/frontend-design/SKILL.md @@ -0,0 +1,71 @@ +--- +name: frontend-design +description: Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. +license: Complete terms in LICENSE.txt +--- + +# Frontend Design + +Approach this as the design lead at a design studio known for giving every client a distinct visual identity that is not mistaken for anyone else's. This client has already rejected proposals that felt cliché or templated, and is paying for a distinctive point of view: make deliberate, opinionated choices about palette, typography, and layout that are specific to this brief, and take aesthetic risk if justified. + +## Ground your designs in the subject matter + +If the brief does not identify what the product or subject matter is, identify it yourself before designing, and confirm with the client. You can come up with one concrete subject, the design's audience, and the design's primary job, as a proposal. If there's any information in your memory about the client's preferences or context about what they're building, use that as a hint. The subject's industry, subject matter, materials, and vernacular are where distinctive visual choices come from — a design for a toy for girls aged 8–11 will be very aesthetically different from a dashboard for financial analysts. Build with the brief's real content and subject matter throughout. + +## Design principles + +For web designs, the hero is the first thing viewers will see. Open with the most characteristic thing in the subject's world, in the form that is most appropriate: a headline, an image, an animation, a live demo, an interactive moment, or other treatments. Be deliberate with your choice: a big number with a small label, supporting stats, and a gradient accent is the default treatment, so only use it if that's truly the best option. + +Typography carries the personality of the page. You don't need a different typeface for display or headline text and body content: use one family or two, and if two, make them clearly distinct. + +Choose your typefaces deliberately, not the default families you would reach for on any other project, and set a clear type scale following the default guidance of The Elements of Typographic Style with intentional weights, widths, and spacing. When type is used as a headline or visual element, use the type treatment itself as an active part of the design, not a neutral delivery vehicle for the content. + +Default to line lengths of less than 80 characters. Serif typefaces can have slightly longer line lengths; give serif body text slightly more line-height than a sans-serif. + +Avoid these default typographic treatments; they are the commonest tells of a generated page: +- Accenting just a single word or phrase in a headline, like putting one word in italic/bold or a different color. +- Using all caps for labels. +- Adding unnecessary typographic labels above content. + +Visual structure is information. Structural devices like outlines, borders, numbering, eyebrows, dividers, labels, etc., encode useful information about the content rather than decorate it. Many generic designs use numbered markers (01 / 02 / 03), but that's only appropriate if the content actually is a sequence — like a stepped process or a timeline. Before adding numbered markers, check the content really is a sequence. + +Use non-user-triggered motion sparingly and deliberately, only to draw attention. A single orchestrated moment — one page-load sequence or one reveal — lands better than scattered effects; fade-and-slide-up entrances on each section and hover transitions on every card are the generic default and read as AI-generated. Motion that answers a person's action (opening, expanding, confirming) is welcome when it shows what changed. + +Consider written content carefully. Often a design brief may not contain real content, and it's up to you to come up with copy and placeholder content. Copy can make a design feel as templated as the design itself. See the below section on writing for more guidance. + +## Process: plan, review against the brief, build, critique + +For calibration, AI-generated design right now clusters around some traits: +1. a warm cream background (near #F4F1EA) with a high-contrast serif display and a terracotta or warm-clay accent (often near #D97757 — Anthropic's own Claude-interaction accent, so on a user's brief it reads as a tell); +2. a near-black background with a single bright acid-green or vermilion accent; +3. a broadsheet-style layout with hairline rules, zero border-radius, and dense newspaper-like columns; +4. the SaaS-card kit: content chopped into identical rounded cards, one border-radius on everything regardless of hierarchy, the same soft grey shadow (rgba(0,0,0,.1)) under each, and gradient washes as decoration; +5. template chrome that appears whatever the subject: a tracked-out ALL-CAPS eyebrow label above every heading; meta strings joined with middle dots ('A · B · C'); labels built as 'WORD — fragment' with a spaced em dash; tinted near-black (#0B0B0B, #111) standing in for black; a monospace face for small data labels; a '→' appended to link and button text. + +All traits are legitimate for some briefs, but they are defaults rather than choices, and they appear regardless of subject. Where the brief pins down a visual direction, follow it exactly — the brief's own words always win, including when it asks for one of these looks. Where it leaves an axis free, don't spend that freedom on one of these defaults. As with a hired human designer, there's often a careful balance between doing what you're good at and taking each project as a chance to experiment and learn. + +Work in two passes. First, brainstorm a short design plan based on the client's design brief: create a compact token system with color, type, layout, and principles. +- Color: describe the core base palette as 4–6 named hex values. +- Type: the typefaces and their roles. +- Layout: a layout concept, using one-sentence prose descriptions and ASCII wireframes to ideate and compare. Include alignment guidance; should the content be left aligned, center aligned, justified? +- Principles: the high-level guidance for what makes this page unique. + +Then review that plan against the brief before building: if any part of it reads like the generic default you would produce for any similar page (work through a similar prompt to see if you arrive somewhere similar) rather than a choice made for this specific brief — revise that part, say what you changed and why. Only after you've confirmed the relative uniqueness of your design plan should you start to write the code, following the revised plan. + +When writing the code, be careful of structuring your CSS selector specificities. It's easy to generate CSS classes that cancel each other out (especially with a type-based selector like .section and an element-based selector like .cta). This can happen often with padding/margin between sections. + +## Restraint and self-critique + +Spend your boldness in one place. Let one element be the memorable thing, keep everything around it quiet and disciplined, and cut any decoration that does not serve the brief. Build to a quality floor without announcing it: responsive down to mobile, visible keyboard focus, reduced motion respected, visually accessible, harmonious color palettes. Critique your own work as you build, taking screenshots to review if your environment supports it — a picture is worth 1000 tokens. Consider Chanel's advice: before leaving the house, take a look in the mirror and remove one accessory. Human creatives have memory and always try to do something new, so if you have a space to quickly jot down notes about what you've tried, it can help you in future passes. + +## More on writing in design + +Words appear in a design for one reason: to make it easier to understand and use. They are design content, not decoration. Bring the same intentionality and minimalism to copywriting that you would bring to spacing and color. Before writing anything, ask what the design needs to say, and how it can best be said to help the person navigate the experience. + +Write from the end user's perspective. Name things by what users will understand in simple language, not by how the system is built. A user manages notifications, not webhook config. Describe what something is or does in plain terms rather than selling it. Being specific and legible to new users is always better than being clever. + +Use active voice as default. A CTA says exactly what happens when it is used: "Save changes," not "Submit." An action keeps the same name through the whole flow, so the button that says "Publish" produces a toast that says "Published." The vocabulary of an interface is the signposting for someone navigating the product. Cohesion and consistency are how people learn their way around. + +Treat failure and emptiness as moments for direction, not mood. Explain what went wrong and how to fix it, in the interface's voice rather than a person's. Errors don't apologize, and they are never vague about what happened. An empty screen is an invitation to act. + +Keep the tone conversational: plain verbs, sentence case, no filler, with tone matched to the brand and the audience. Let each written element do exactly one job. diff --git a/.claude/skills/grill-me/LICENSE b/.claude/skills/grill-me/LICENSE deleted file mode 100644 index f1dd2c0..0000000 --- a/.claude/skills/grill-me/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Matt Pocock - -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/.claude/skills/grill-me/SKILL.md b/.claude/skills/grill-me/SKILL.md deleted file mode 100644 index 3947ff9..0000000 --- a/.claude/skills/grill-me/SKILL.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: grill-me -description: A relentless interview to sharpen a plan or design. -disable-model-invocation: true ---- - -Call the Skill tool with "grilling". diff --git a/.claude/skills/grill-me/agents/openai.yaml b/.claude/skills/grill-me/agents/openai.yaml deleted file mode 100644 index 4d6fb0c..0000000 --- a/.claude/skills/grill-me/agents/openai.yaml +++ /dev/null @@ -1,5 +0,0 @@ -interface: - display_name: "Grill Me" - short_description: "Sharpen a plan through interview" -policy: - allow_implicit_invocation: false diff --git a/.claude/skills/ship-pr/SKILL.md b/.claude/skills/ship-pr/SKILL.md new file mode 100644 index 0000000..3e7381a --- /dev/null +++ b/.claude/skills/ship-pr/SKILL.md @@ -0,0 +1,38 @@ +--- +name: ship-pr +description: Prepare a finished task branch for a pull request (rebase, guards, pre-PR checks, review prerequisites, PR description from the template) and push or open the PR only after explicit user authorization. Use when a T1/T2 task is done; T0 changes may use it too. +--- + +# Ship a PR + +Never push, open or merge a PR without the user's explicit go-ahead in this session. Merging is always the human's. + +## 1. Bring the branch up to date +- In the task worktree, the tree is clean and everything is committed. +- `git fetch origin && git rebase origin/main`. On a conflict in migrations, financial code or anything you cannot resolve with certainty, stop and report. + +## 2. Guards +- New migrations: the number follows the latest on `origin/main`, the journal entry is appended with a newer `when`. Run `node scripts/check-migration-history.mjs origin/main HEAD`. +- `node scripts/check-pr-review-signals.mjs origin/main HEAD`. If it lists T2-area files but the task was classified lower, reclassify and meet the T2 obligations before continuing. Treat a CI or guard change as needing an independent review. + +## 3. Checks +Run the pre-PR set and any size-specific checks from AGENTS.md *Verification commands*. Any FAIL stops here. Report every planned check as PASS, FAIL or NOT RUN with the reason. + +## 4. Review prerequisites +- T1: `ponytail-review` of your own diff. +- T2, CI or guard changes: `codex-review` on the current HEAD. If commits landed after that review, review again. +- Auth, tenancy, billing/payments or secrets: also run `/security-review` in Claude Code. + +## 5. PR description +Write `.tmp/<task-slug>/pr.md` from `.github/pull_request_template.md`, including the review guide. Use only evidence from commands you actually ran; hosted CI is NOT RUN until the PR exists. Title: a Conventional Commit line. + +## 6. Ask, then ship +Show the user the branch, title and a three-line summary, and ask to push and open the PR. Only after a yes: +```sh +git push -u origin <type>/<slug> # always an explicit branch, never a bare push +gh pr create --base main --head <type>/<slug> --title "<title>" --body-file .tmp/<task-slug>/pr.md +``` +(or the host's GitHub tools). Report the PR URL. Watch checks (`gh pr checks`) only if asked; never merge. + +## 7. After the merge +When the user confirms the merge: remove the worktree with `git worktree remove`, delete the local branch, and delete the task's `.tmp` files. diff --git a/AGENTS.md b/AGENTS.md index 8880c4e..ddcc825 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -70,7 +70,7 @@ Report each check as PASS, FAIL or NOT RUN with command, scope, counts and reaso Default to creating no new files. The deliverable is the code and tests the task needs; plans, reviews and evidence go in the chat, commit message or PR description. -- **Temporary files** live only in one ignored directory per task: `.tmp/<task-slug>/` (`engineering-workflow` uses `.tmp/agent-workflows/<task-slug>/`). Never write to the `.tmp/` root or to tracked paths. Keep at most `plan.md`, one `review-<n>.md` per review and one compact verification summary (commands, exit codes, pass/fail counts, short failure excerpts). `engineering-workflow` has its own fixed set, listed in its SKILL.md step 3: `state.json`, `plan.md`, immutable reviewer reports, `verification.json`, `final-checks.json` and at most one compact `handoff.md`. A task worktree (`.tmp/<task-slug>/worktree`, or `.claude/worktrees/<name>` when the host creates it) is a checkout, not an artifact: remove it only with `git worktree remove` after its branch is merged or abandoned. Do not save full test-runner JSON, duplicate logs, source snapshots or diff copies; Git already holds them. Overwrite your own working files instead of versioning them; reviewer reports stay immutable. In `engineering-workflow`, a file recorded in `state.json` changes only through the state helper's next checkpoint, and none is edited or deleted otherwise before final human disposition. +- **Temporary files** live only in one ignored directory per task: `.tmp/<task-slug>/` (`engineering-workflow` uses `.tmp/agent-workflows/<task-slug>/`). Never write to the `.tmp/` root or to tracked paths. Keep at most `plan.md`, one `review-<n>.md` per review (plus its `review-brief.md`), a `pr.md` draft and one compact verification summary (commands, exit codes, pass/fail counts, short failure excerpts). `engineering-workflow` has its own fixed set, listed in its SKILL.md step 3: `state.json`, `plan.md`, immutable reviewer reports, `verification.json`, `final-checks.json` and at most one compact `handoff.md`. A task worktree (`.tmp/<task-slug>/worktree`, or `.claude/worktrees/<name>` when the host creates it) is a checkout, not an artifact: remove it only with `git worktree remove` after its branch is merged or abandoned. Do not save full test-runner JSON, duplicate logs, source snapshots or diff copies; Git already holds them. Overwrite your own working files instead of versioning them; reviewer reports stay immutable. In `engineering-workflow`, a file recorded in `state.json` changes only through the state helper's next checkpoint, and none is edited or deleted otherwise before final human disposition. - **Cleanup:** a task's `.tmp` files are its resume source. Delete them only when the task is finalized (PR merged or rejected, or the human approved or rejected the result and the handoff is delivered) or the user explicitly abandons it. A paused or `HUMAN_APPROVAL` workflow is not finalized. At the end of each session, list what remains and why; if deletion is blocked, say so. Never read or reuse another task's `.tmp` directory unless asked; resuming a named workflow counts as asked. - **Permanent docs:** create a new Markdown file only when the user asks or a new subsystem has no owning document; otherwise edit the owning document. No per-round, per-review or per-checkpoint reports in `docs/`, and no run logs appended to `docs/verification.md` (it owns commands). A durable human decision gets one short entry in `docs/decisions/` (context, decision, consequences; one page at most). - **Size limits:** plan ≤200 lines; review = findings only, ≤150 lines; decision entry ≤1 page. Needing more is a signal to split the task. @@ -84,11 +84,11 @@ Use skills conditionally and in proportion to the task. Load only the relevant e For vendored skills, load the repository copy from `.agents/skills/<name>/SKILL.md` in Codex or `.claude/skills/<name>/SKILL.md` in Claude Code. Same-name global skills can coexist or take precedence in a host's selector; read the local file explicitly when necessary. Do not combine competing versions. Codex uses `$skill-name`; Claude Code uses `/skill-name`. - **Autonomous orchestration (explicit requests only):** For a requested end-to-end, reviewed high-risk workflow, use local `engineering-workflow` (`$engineering-workflow` in Codex, `/engineering-workflow` in Claude Code). It coordinates planning, fresh independent review, verification, bounded corrections and human approval. Follow all financial/sandbox rules above. Do not auto-trigger it for routine tasks or allow it to auto-commit/push/activate money movement. Its temporary handoffs belong under ignored `.tmp/agent-workflows/`. -- **Planning:** Inspect the repository and relevant documentation first. For T2 tasks, or T1 tasks with unresolved product decisions, use `grilling` when important design decisions or trade-offs remain unresolved. Ask focused questions with recommendations; discover facts independently. Keep the plan and acceptance criteria in the chat or the task's `.tmp` directory; record durable decisions in `docs/decisions/` (see [Files and artifacts](#files-and-artifacts)). Obtain approval before implementing unresolved high-risk decisions. When the user asks for a single approval at the end (for example a design-only task), list the open decisions with recommendations instead of interviewing round by round. Skip grilling and unnecessary planning for trivial or well-specified tasks. `grill-me` remains an explicit interview entry point; once an interview begins, follow its confirmation gate. +- **Planning:** Inspect the repository and relevant documentation first. For T2 tasks, or T1 tasks with unresolved product decisions, use `grilling` when important design decisions or trade-offs remain unresolved. Ask focused questions with recommendations; discover facts independently. Keep the plan and acceptance criteria in the chat or the task's `.tmp` directory; record durable decisions in `docs/decisions/` (see [Files and artifacts](#files-and-artifacts)). Obtain approval before implementing unresolved high-risk decisions. When the user asks for a single approval at the end (for example a design-only task), list the open decisions with recommendations instead of interviewing round by round. Skip grilling and unnecessary planning for trivial or well-specified tasks. - **Implementation:** For T1/T2 code changes, apply `ponytail`. Reuse existing components, utilities, services and conventions; choose the smallest complete implementation without speculative abstractions or unnecessary dependencies. Preserve correctness, security, validation, error handling and domain invariants. Check affected callers and integrations; add focused tests for meaningful new logic. Its session mode does not make trivial tasks require extra ceremony. - **Debugging:** Use `systematic-debugging` when non-trivial bugs, recurring failures, unexpected behavior or difficult test failures require investigation: reproduce, gather evidence, test hypotheses, then verify the root-cause fix with a regression. Skip it for trivial fixes with an established cause. - **Database work:** Use `supabase-postgres-best-practices` for PostgreSQL queries, indexes, schema design, transactions, concurrency, locking, connections or performance. Read only relevant rules, apply PostgreSQL-general guidance, and never assume Supabase infrastructure or APIs. Preserve the financial/database invariants above. -- **Review:** For T1/T2 changes, apply `ponytail-review` as an additional quality review, alongside applicable domain-specific review skills and the existing payment checklist. Trace the complete affected flow, including correctness, regressions, security, concurrency, performance, tests and unnecessary complexity. T2 requires an independent reviewer: the other model (after Claude Code implements, `codex review --base main` for a diff or `codex exec -s read-only` with the design text for a design; after Codex implements, a fresh Claude Code session or read-only reviewer subagent) or, failing that, a fresh context. Give the reviewer the task brief, acceptance criteria and the diff or design, not your conclusions or claims about scope. Put a findings summary in the PR. Report concrete findings before fixing them; the review itself changes no code. +- **Review:** For T1/T2 changes, apply `ponytail-review` as an additional quality review, alongside applicable domain-specific review skills and the existing payment checklist. Trace the complete affected flow, including correctness, regressions, security, concurrency, performance, tests and unnecessary complexity. T2 and CI or guard changes require an independent reviewer: run the local `codex-review` skill (Codex, read-only, against `origin/main`; it covers designs too and falls back to a fresh read-only subagent when Codex cannot run). Give the reviewer the task brief, acceptance criteria and the diff or design, not your conclusions or claims about scope. Changes touching auth, tenancy, billing/payments or secrets also get Claude Code's built-in `/security-review`. Put a findings summary in the PR. Report concrete findings before fixing them; the review itself changes no code. - **Audit:** Use `ponytail-audit` for explicit repository-wide audits or major audit tasks. Do not run a whole-repository audit for each implementation. - **Verification:** Select checks by task size from [Verification commands](#verification-commands) during planning. Require Docker-backed integration tests for migrations, PostgreSQL/Redis integrations, brokers or multi-service runtime changes; Docker is optional for UI, documentation and logic sufficiently covered by unit tests. Run Docker integration through `pnpm test:integration:docker`, which also removes its own spec byproducts from `.tmp/` after a passing run; a direct `pnpm test:integration` leaves them behind. Docker runs use fresh run-owned resources and free ports; never reuse existing databases, volumes or containers, or run global Docker cleanup. Report each planned check as PASS, FAIL or NOT RUN with its command, scope and reason. Unavailable Docker leaves affected boundaries unverified without blocking unrelated work. Resolve blocking findings and record valuable lessons in existing owning documents or casebook conventions. @@ -96,6 +96,7 @@ Skill provenance, synchronization and discovery checks are documented in [AI wor ## Frontend skills +- `frontend-design` sets the visual direction (typography, palette, layout identity) when building new UI or reshaping existing UI; skip it for small fixes inside an established design. Keep its output within `docs/ui-signature.md` conventions once those are set. - `vercel-react-best-practices` is vendored like the other skills: use it for T1/T2 React/Next.js behavior, data-fetching, rendering or performance work, and read only the `rules/` files the task needs. Skip it for copy or styling-only changes. - Browser verification: when the host has a browser tool (`agent-browser`, or the desktop app's built-in browser), use it to check user-facing interaction or layout against `pnpm dev:web` on localhost. Otherwise report browser verification as NOT RUN. Do not install browser tooling automatically or touch production data. @@ -103,7 +104,7 @@ Skill provenance, synchronization and discovery checks are documented in [AI wor - One branch per task from freshly fetched `origin/main`, without upstream tracking so a bare `git push` cannot target `main`: `git fetch origin`, then `git worktree add --no-track -b <type>/<slug> .tmp/<slug>/worktree origin/main` (or use a worktree the host creates in `.claude/worktrees/`). Types: `feat/`, `fix/`, `chore/`, `docs/`; the slug does not repeat the type (`docs/heading-fix`, not `docs/docs-heading-fix`). If the branch or worktree already exists, choose a new slug unless the user asked you to resume that task. Never commit to `main`. - Commit locally on the task branch when a checkpoint passes its checks, using Conventional Commits. A user instruction not to commit overrides this, and `engineering-workflow` runs keep their own no-automatic-commit rule. -- Push, PR creation and merge need explicit user authorization in the session. Merging is always the human's decision: squash merge after required checks pass. +- Prepare and open PRs with the local `ship-pr` skill. Push, PR creation and merge need explicit user authorization in the session. Merging is always the human's decision: squash merge after required checks pass. - Fill the PR description from the [template](.github/pull_request_template.md), including the **review guide** (what to read carefully, what is mechanical, where you are least confident, any removed or weakened tests): size, invariants touched, checks with PASS/FAIL/NOT RUN, unverified boundaries, review and temporary files. Evidence lives there, not in `docs/`. - CI's *Review signals* job labels PRs touching T2 paths `t2-area` (the label wins over a smaller claimed size) and PRs changing CI or guard scripts `guard-change` (independent review, no T2 reading). It fails on focused tests and on new skips other than the env-gated suite alias or a `// allow-skip: <reason>` comment; every allowed skip is listed for human approval. Never weaken a test to make a check pass. - Hosted CI counts only for the exact head SHA, read from the run (for example `gh pr checks`); never infer it from local runs. It is a merge gate, not a pre-PR gate: before a push it is reported as NOT RUN. diff --git a/docs/AI_WORKFLOW.md b/docs/AI_WORKFLOW.md index 1984ba6..23f5645 100644 --- a/docs/AI_WORKFLOW.md +++ b/docs/AI_WORKFLOW.md @@ -15,7 +15,7 @@ AI tools help inspect code, trace transaction boundaries, draft changes and run ## Optional autonomous orchestration pilot -On explicit request, use the **locally authored** [`engineering-workflow`](../.agents/skills/engineering-workflow/SKILL.md) skill to coordinate planning, independent plan/code reviews, bounded corrections and human acceptance. It is separate from the eight pinned vendored skills in `skill-sources.json`: do not add it to that upstream manifest or edit upstream content. The Codex and Claude copies are identical and checked by `node scripts/check-engineering-workflow.mjs`. The existing `.tmp/` ignore rule holds scoped plans and review handoffs; no new permanent per-run audit reports are required by this pilot. +On explicit request, use the **locally authored** [`engineering-workflow`](../.agents/skills/engineering-workflow/SKILL.md) skill to coordinate planning, independent plan/code reviews, bounded corrections and human acceptance. It is separate from the eight pinned vendored skills in `skill-sources.json`: do not add it to that upstream manifest or edit upstream content. The Codex and Claude copies are identical and checked by `node scripts/check-engineering-workflow.mjs`, which also mirrors the two other local skills: `codex-review` (cross-model review and triage) and `ship-pr` (rebase, guards, checks and an authorized PR). The existing `.tmp/` ignore rule holds scoped plans and review handoffs; no new permanent per-run audit reports are required by this pilot. The first Fintech pilot is **DESIGN_ONLY** against the local R2-B2 Run A design brief: independent review may correct the plan but cannot implement B2-A, create migrations, activate financial scopes, push or deploy. If the host cannot run a genuinely fresh independent reviewer, mark the review blocked and hand off to a separate session. The skill is instructions only, not a background job or guaranteed native-agent launcher. @@ -42,12 +42,12 @@ The approach is an original adaptation inspired by [Superpowers subagent-driven | `ponytail` | [DietrichGebert/ponytail@09c434ab](https://github.com/DietrichGebert/ponytail/tree/09c434ab73ca43761c5d8b0c5d341926c2fba710/skills/ponytail) | Existing `~/.agents/skills/ponytail`; matched upstream | | `ponytail-review`, `ponytail-audit` | [DietrichGebert/ponytail@09c434ab](https://github.com/DietrichGebert/ponytail/tree/09c434ab73ca43761c5d8b0c5d341926c2fba710/skills) | Official upstream | | `grilling` | [mattpocock/skills@5beb35b0](https://github.com/mattpocock/skills/tree/5beb35b040e3de97e54fa9e386d7e42d15c295c2/skills/productivity/grilling) | Existing `~/.agents/skills/grilling`; matched upstream | -| `grill-me` | [mattpocock/skills@5beb35b0](https://github.com/mattpocock/skills/tree/5beb35b040e3de97e54fa9e386d7e42d15c295c2/skills/productivity/grill-me) | Official upstream | | `systematic-debugging` | [obra/superpowers@bb92a777](https://github.com/obra/superpowers/tree/bb92a77741419a4ab5f06e711a283343f1ada0c3/skills/systematic-debugging) | Existing local tree; all 11 files matched upstream | | `supabase-postgres-best-practices` | [supabase/agent-skills@c9be0e93](https://github.com/supabase/agent-skills/tree/c9be0e931b7930f7d02126d04774d904c381e7d7/skills/supabase-postgres-best-practices) | Existing local tree; all 36 files matched upstream | | `vercel-react-best-practices` | [vercel-labs/agent-skills@063bee94](https://github.com/vercel-labs/agent-skills/tree/063bee94c3f4df8453406c830b0a7df0f2860278/skills/react-best-practices) | Official upstream; compiled `AGENTS.md` omitted and a `LICENSE` note added (see manifest adaptations) | +| `frontend-design` | [anthropics/skills@dbd4588f](https://github.com/anthropics/skills/tree/dbd4588f9e1033efb41dad4bef2f7947c8993d44/skills/frontend-design) | Official upstream | -[Source manifest](../.agents/skill-sources.json) records full commit/tree IDs, original paths and SHA-256 hashes (UTF-8, LF line endings). Each skill carries its upstream MIT `LICENSE`; those licenses apply to the vendored skills, not the application. Vercel's repository declares MIT but ships no `LICENSE` file, so that skill's `LICENSE` is a repository-authored note pointing to the declared terms. Its compiled 108 KB `AGENTS.md` is not vendored, because hosts can auto-load a nested `AGENTS.md` as directory instructions. Original attribution and supporting resources are preserved. The sole host adaptation replaces Grill Me's Claude `Skill`-tool call with a relative link to `grilling/SKILL.md` in the Codex copy. Synchronization restores the original Claude entry point. Its upstream `disable-model-invocation: true` and `agents/openai.yaml` policy keep `grill-me` explicit-only on both hosts. +[Source manifest](../.agents/skill-sources.json) records full commit/tree IDs, original paths and SHA-256 hashes (UTF-8, LF line endings). Each skill carries its upstream license file (MIT `LICENSE`, or Apache-2.0 `LICENSE.txt` for `frontend-design`); those licenses apply to the vendored skills, not the application. Vercel's repository declares MIT but ships no `LICENSE` file, so that skill's `LICENSE` is a repository-authored note pointing to the declared terms. Its compiled 108 KB `AGENTS.md` is not vendored, because hosts can auto-load a nested `AGENTS.md` as directory instructions. Original attribution and supporting resources are preserved. Both hosts receive identical copies; `grill-me` was removed because `grilling` already covers its trigger phrases. The two additional skills retain all supporting files; their descriptions are narrowed for focused discovery. Systematic Debugging's four phases are preserved, with its two Superpowers TDD/verification calls mapped to existing repository tests and verification, so no extra skills are required. Postgres guidance applies without Supabase; read relevant rules on demand. The optional upstream `find-polluter.sh` helper requires Bash and a suitable test command; it is not run automatically. Licenses were retrieved from the pinned official revisions. @@ -66,7 +66,7 @@ To reuse this setup in another repository, copy both skill trees, the manifest a The setup machine has global `ponytail`, `grilling`, `systematic-debugging` and `supabase-postgres-best-practices` under `~/.agents/skills/`, with existing Claude junctions. Plugin caches also contain Systematic Debugging in Superpowers and Postgres Best Practices in Supabase. Global configuration remains unchanged. [Codex can list duplicate names](https://learn.chatgpt.com/docs/build-skills#where-codex-loads-local-skills), and [Claude's name resolution depends on scope](https://code.claude.com/docs/en/skills#where-skills-live); do not assume repository precedence or load a plugin equivalent alongside its local copy. Shared routing tells agents to read the local file explicitly if needed. -In a fresh session launched from this repository, inspect Codex's skill selector (or app-server `skills/list` with this checkout in `cwds` and `forceReload: true`), and Claude Code's `/` command menu. Confirm all eight skills, including `grill-me`, and inspect the resolved local paths. Use Claude's `/memory` to confirm that `AGENTS.md` is imported. Hosts may cache skills until the next turn or a fresh session. Discovery alone does not prove conditional activation; check these cases without changing application files: +In a fresh session launched from this repository, inspect Codex's skill selector (or app-server `skills/list` with this checkout in `cwds` and `forceReload: true`), and Claude Code's `/` command menu. Confirm all eight vendored skills and the three local ones, and inspect the resolved local paths. Use Claude's `/memory` to confirm that `AGENTS.md` is imported. Hosts may cache skills until the next turn or a fresh session. Discovery alone does not prove conditional activation; check these cases without changing application files: | Request | Expected routing | | --- | --- | @@ -74,7 +74,6 @@ In a fresh session launched from this repository, inspect Codex's skill selector | "Implement this agreed non-trivial change with these acceptance criteria." | `ponytail`, relevant domain skills/checks, then `ponytail-review`; no redundant interview | | "Review this change and its affected callers." | `ponytail-review` plus applicable domain review; report findings before fixes | | "Audit the repository's correctness and complexity." | `ponytail-audit`; report only | -| `$grill-me` in Codex or `/grill-me` in Claude Code | Explicit entry point delegates to `grilling` | | "Fix this spelling error in the README." | Direct edit and proportionate verification; no interview or audit | | "Investigate a recurring test failure whose cause is unknown." | `systematic-debugging` as the investigation skill; reproduce, test hypotheses and verify a regression | | "Correct this typo; the exact cause is already established." | Direct fix; no debugging investigation or Postgres skill | diff --git a/scripts/check-engineering-workflow.mjs b/scripts/check-engineering-workflow.mjs index f144ff1..bcd3f8f 100644 --- a/scripts/check-engineering-workflow.mjs +++ b/scripts/check-engineering-workflow.mjs @@ -37,4 +37,14 @@ const ledgerScript = (await readFile(join(root, 'scripts/engineering-workflow-st for (const marker of ['sourceFingerprint', 'BLOCKED_EVIDENCE_CHANGED', 'correctionRoundsUsed', 'rebaseline']) { assert(ledgerScript.includes(marker), `Missing checkpoint/resume guard: ${marker}`); } -console.log('engineering-workflow v1.1: 6 files mirrored; checkpoint/resume guards verified'); +// Other locally authored skills: one SKILL.md each, identical on both hosts. +for (const name of ['codex-review', 'ship-pr']) { + const [a, b] = await Promise.all(['.agents', '.claude'].map(async (host) => { + const dir = join(root, host, 'skills', name); + assert.deepEqual(await readdir(dir), ['SKILL.md'], `Unexpected files: ${host}/skills/${name}`); + return (await readFile(join(dir, 'SKILL.md'), 'utf8')).replaceAll('\r\n', '\n'); + })); + assert.equal(a, b, `Codex and Claude copies differ: ${name}`); + assert.match(a, new RegExp(`^---\nname: ${name}\ndescription: .+\n---`), `Bad frontmatter: ${name}`); +} +console.log('engineering-workflow v1.1: 6 files mirrored; checkpoint/resume guards verified; codex-review and ship-pr mirrored'); diff --git a/scripts/sync-agent-skills.mjs b/scripts/sync-agent-skills.mjs index fc57a41..95e38c1 100644 --- a/scripts/sync-agent-skills.mjs +++ b/scripts/sync-agent-skills.mjs @@ -27,19 +27,11 @@ async function filesAt(directory) { return files.sort(); } -// Only the Codex entry point needs to replace Claude's Skill-tool invocation. -function claudeCopy(name, file, source) { - if (name !== 'grill-me' || file !== 'SKILL.md') return source; - const codexCall = 'Read [../grilling/SKILL.md](../grilling/SKILL.md) and follow it.'; - assert(source.toString('utf8').includes(codexCall), 'Missing Grill Me adapter'); - return Buffer.from(source.toString('utf8').replace(codexCall, 'Call the Skill tool with "grilling".')); -} - for (const skill of manifest.skills) { const source = join(root, '.agents/skills', skill.name); const target = join(root, '.claude/skills', skill.name); const files = Object.keys(skill.files).sort(); - assert(files.includes('SKILL.md') && files.includes('LICENSE'), `Incomplete skill: ${skill.name}`); + assert(files.includes('SKILL.md') && files.some((file) => /^LICENSE(\.txt)?$/.test(file)), `Incomplete skill: ${skill.name}`); assert.deepEqual(await filesAt(source), files, `Unrecorded source files: ${skill.name}`); const copies = []; for (const file of files) { @@ -47,7 +39,7 @@ for (const skill of manifest.skills) { // Normalize line endings so Git's Windows checkout policy does not break integrity checks. assert.equal(hash(data.toString('utf8').replaceAll('\r\n', '\n')), skill.files[file], `Source changed; review provenance and update its hash: ${skill.name}/${file}`); - copies.push([file, claudeCopy(skill.name, file, data)]); + copies.push([file, data]); } if (!check) await mkdir(target, { recursive: true }); const existing = await filesAt(target);