Repository navigation
docs: add agent rules for screenshots in pull requests - #43
Merged
kalaspuff merged 3 commits intoOct 18, 2026
Merged
Conversation
A pull request that changes how fctl looks shows it with screenshots in its description: before and after, or after alone for something new. They are attached with `gh pr edit --attach`, never committed, and replaced when a later commit changes what they show. The screenshots skill says how to take them with Playwright against `cargo xtask dev`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The foundry scene picks its lanes with Math.random, so even with reduced motion two loads of the floor drew different frames. Seeded, before and after differ only where the change does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
kalaspuff
deleted the
fctl/17-let-s-add-add-a-brief-agents-md-instruct
branch
October 18, 2026 02:46
kalaspuff
pushed a commit
to hyperstructure/fctl-site
that referenced
this pull request
Oct 18, 2026
A pull request that changes how fctl.sh looks now shows it with screenshots in its description, and keeps them current. AGENTS.md says so in one bullet, and a new `screenshots` skill says how. These are the same rules as hyperstructure/fctl#43 adds there. ## What changed - **AGENTS.md**: a pull request that changes how fctl.sh looks shows it with screenshots: before and after when it changes something that exists, after alone when it adds something. When a later commit changes what a screenshot shows, the agent replaces it. Screenshots are attached with `gh pr edit --attach` and never committed. - **`.claude/skills/screenshots`**: which changes need screenshots (the landing page, how docs and legal pages render, the 404 page, design tags), and when to show before and after or after alone. - Taking them with Playwright against `npm run dev` (the landing page) or `npm run build && npx wrangler dev` (docs and legal pages), using a short script that asks for reduced motion and seeds `Math.random`. - Running `main` from a worktree for the before screenshots. - Attaching them with `gh pr edit --attach` in a before/after table. - Keeping them current: retake and replace them in the same turn, with the commit they show named in the description. - The `commit` and `pull-requests` skills point to it. ## Why `gh --attach`, and what doesn't work yet Screenshots are never committed. gh 2.99 added `--attach` to `gh pr create`, `gh pr edit` and `gh pr comment`: it uploads a file the way dragging it into GitHub's editor does. That works with a person's token, but not in an fctl session. Sessions have the GitHub App's installation token: gh refuses it ("unsupported authentication type"), and GitHub's upload endpoint answers 404. Until hyperstructure/fctl#40 is decided and done, the skill tells agents in sessions to take and check the screenshots anyway, describe them in words, and say that the session can't attach them. ## How I verified it - **Checks.** `npm run check`, `npm test` and `npm run build` pass. Biome's one note is the existing deprecation notice in `biome.json`. - **Screenshot script.** Ran the skill's script verbatim: - the landing page in both themes at 1440 and 390 px; - a docs page and the privacy policy through `wrangler dev`, built with fctl's docs. - **Reduced motion.** Without it, the hero is still fading in when the screenshot is taken. - **The seed.** Without it, two loads of the landing page differ in about 7.5% of their pixels: the foundry scene picks its lanes with `Math.random`. With it, `main` from a worktree on port 5175 and this branch on 5174 are pixel-identical. - **Reference rewriting.** gh 2.102's own code rewrites both cells of the example table to the upload URLs (run in hyperstructure/fctl#43). - **Not verified:** an upload with a person's token. None is reachable from the session. Refs hyperstructure/fctl#40 Made in fctl session https://app.fctl.sh/s/ses_01M56CE8ANDXBDMB930CSXN186 Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A pull request that changes how fctl looks now shows it with screenshots in its description, and keeps them current. AGENTS.md says so in one bullet, and a new
screenshotsskill says how.What changed
gh pr edit --attachand never committed..claude/skills/screenshots: which changes need screenshots, and when to show before and after or after alone.cargo xtask dev, using a short script that signs in as the dev owner, asks for reduced motion and seedsMath.random, so the foundry scene draws the same frame on every load.mainfrom a worktree for the before screenshots.gh pr edit --attachin a before/after table.commitandpull-requestsskills point to it.Why
gh --attach, and what doesn't work yetScreenshots are never committed. gh 2.99 added
--attachtogh pr create,gh pr editandgh pr comment: it uploads a file the way dragging it into GitHub's editor does. That works with a person's token, but not in an fctl session. Sessions have the GitHub App's installation token: gh refuses it ("unsupported authentication type"), and GitHub's upload endpoint answers 404. Until #40 is decided and done, the skill tells agents in sessions to take and check the screenshots anyway, describe them in words, and say that the session can't attach them.How I verified it
cargo xtask dev:main's web app from a worktree on port 5175 against the same control plane. Before and after differed only in a session's relative time ("2m" against "3m").internal/attachmentsin cli/cli) on the skill's example description. Both table cells point at the uploads, an image uploaded earlier is left alone, and nothing is appended.gh pr edit 35 --attach probe.pngprinted "unsupported authentication type" and left the pull request as it was.POST https://uploads.github.com/user-attachments/assetswith the session's token returned 404.Also filed: #41.
cargo xtask devdoesn't installworker-build, which a fresh sandbox needs, and the skill points there.Refs #40
hyperstructure/fctl-site#6 adds the same rules for fctl.sh.
Made in fctl session https://app.fctl.sh/s/ses_01M56CE8ANDXBDMB930CSXN186