Repository navigation
docs: add agent rules for screenshots in pull requests - #6
Merged
Merged
Conversation
A pull request that changes how fctl.sh 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 `npm run dev` or `wrangler dev`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kalaspuff
pushed a commit
to hyperstructure/fctl
that referenced
this pull request
Oct 18, 2026
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 `screenshots` skill says how.
## What changed
- **AGENTS.md**: a pull request that changes how fctl 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, and
when to show before and after or after alone.
- Taking them with Playwright against `cargo xtask dev`, using a short
script that signs in as the dev owner, asks for reduced motion and seeds
`Math.random`, so the foundry scene draws the same frame on every load.
- 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 #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
- **Screenshot script.** Ran the skill's setup and script verbatim in a
fresh directory against `cargo xtask dev`:
- the project page (light, 1440 px), a session page with its live socket
(dark, 390 px), and the floor;
- two runs of the floor are pixel-identical (without the seed they
differed by 63 pixels, in the foundry scene).
- **Before screenshots.** Ran `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").
- **Reference rewriting.** Ran gh 2.102's own code
(`internal/attachments` in 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.
- **Upload in a session.** `gh pr edit 35 --attach probe.png` printed
"unsupported authentication type" and left the pull request as it was.
`POST https://uploads.github.com/user-attachments/assets` with the
session's token returned 404.
- **Not verified:** an upload with a person's token. None is reachable
from the session.
Also filed: #41. `cargo xtask dev` doesn't install `worker-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
---------
Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
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:47
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.sh 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. These are the same rules as hyperstructure/fctl#43 adds there.What changed
gh pr edit --attachand 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.npm run dev(the landing page) ornpm run build && npx wrangler dev(docs and legal pages), using a short script that asks for reduced motion and seedsMath.random.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 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
npm run check,npm testandnpm run buildpass. Biome's one note is the existing deprecation notice inbiome.json.wrangler dev, built with fctl's docs.Math.random. With it,mainfrom a worktree on port 5175 and this branch on 5174 are pixel-identical.Refs hyperstructure/fctl#40
Made in fctl session https://app.fctl.sh/s/ses_01M56CE8ANDXBDMB930CSXN186