Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Problem Statement
When a Ticket run or Spec run implements a change that touches rendered UI, HTML, CSS, templates, or visual layout, the resulting pull request body almost never includes before-and-after screenshots or recordings unless the issue body explicitly commands it, even when the agent captures screenshots into /tmp during implementation to inspect its own work.
Three gaps in the Factory skills and Day shift skills cause this:
- Test output satisfies the
## Evidenceslot inthirdshift-prandpr: The PR template uses a single- **Before:** <screenshot/output/failing test run>/**After:** <screenshot/output/passing test run>slot and tells the agent to show the failing and passing test "using pseudocode". Because the agent already has test output in context when it reaches the PR step, it fills the slot with test output or DOM measurements instead of visual captures. - No documented headless mechanism to host
/tmpscreenshots or recordings for GitHub PR bodies:gh pr createandgh pr editcannot upload local files togithub.com/user-attachments/assets/...(which requires browser session cookies), and committing PR-evidence images to the repository bloats git history or triggers unnecessary full-suite test selection. Agents have no standard recipe to turn/tmp/*.pngor/tmp/*.gifinto permanent HTTPS URLs that render inline in GitHub Markdown. - The "Before" state is already overwritten when the PR skill runs: By the time the agent reads
thirdshift-pr(orpr), the Worktree and built binary already reflect the After state on the Issue branch or Spec branch, and neither the implementation skill nor the bug-diagnosis skill instructs the agent to capture the unpatched baseline before editing code.
Solution
Update the Factory skills (thirdshift-pr, thirdshift-implement, thirdshift-diagnosing-bugs) and their Day shift counterparts (pr, implement, diagnosing-bugs), following the writing-for-agents discipline, and regenerate thePrompts and skills page:
- Upfront Before and After visual capture during implementation and bug diagnosis: Instruct the agent that when a task touches rendered UI, HTML, CSS, templates, or visual layout and a headless browser is available, it captures
/tmp/before-*.png(or.giffor interactive/animated flows) against the unpatched baseline before editing code, and captures matching/tmp/after-*.png(or.gif) from the same viewport and state when verifying the change (1440×900desktop, plus390×844mobile when responsive layout is affected). - Separate Execution Evidence from Visual Evidence in the PR body: Restructure
## Evidenceinthirdshift-prandprso real failing-before and passing-after execution output (removing "using pseudocode") is always required, and embedded Before and After screenshots or.gifrecordings (and) are a separate required item whenever the change is visual and a headless browser is available. - Inline detached-worktree fallback and secret git-pushed Gist hosting recipe in
thirdshift-prandpr: If/tmp/before-*was not captured before editing (for instance, during a Spec review), instruct the agent to capture Before from the Base branch commit using a temporary detached worktree in/tmpand clean it up afterward. Provide the exact shell workflow to publish/tmp.pngand.gifcaptures via a secret git-pushed Gist (gh gist create,git clone, copy binary files, commit, push, and embedhttps://gist.githubusercontent.com/<owner>/<gist-id>/raw/<commit-sha>/<filename>) so images and animations render natively in GitHub PR bodies without committing binary blobs to the repository branch.
User Stories
- As the Day shift reviewing a pull request from a Ticket run or Spec run that changes rendered UI, I want to see embedded Before and After
.pngscreenshots in## Evidence, so that I can verify the visual change at a glance without checking out the Issue branch locally. - As the Day shift reviewing an interactive, animated, or multi-step UI change, I want to see embedded Before and After
.gifrecordings in## Evidence, so that I can see the motion or interaction inline in GitHub Markdown (since raw non-attachment video URLs do not render inline players on GitHub). - As the Day shift reviewing a responsive UI change, I want to see both desktop (
1440×900) and mobile (390×844) Before and After captures when responsive layout is affected, so that mobile regressions are caught before merge. - As the Day shift reviewing any pull request, I want
## Evidenceto show actual failing-before and passing-after test or command output rather than pseudocode, and to keep execution evidence distinct from visual evidence so passing tests never substitute for screenshots on UI changes. - As an agent running the implement session or bug diagnosis session on a visual issue, I want clear upfront instructions to capture
/tmp/before-*against the unpatched baseline before changing code and/tmp/after-*from the identical state and viewport after the change, so that both artifacts are ready when writing the PR body. - As an agent running
thirdshift-pr(including during a Spec review where implementation happened in earlier sessions), I want a fallback instruction to capture the Before state from the Base branch in a temporary detached/tmpworktree if/tmp/before-*is not already present, so that Before evidence is never skipped. - As an agent running
thirdshift-prorpr, I want a concrete, copyable shell workflow to host binary.pngand.giffiles in a secret git-pushed Gist and construct rawgist.githubusercontent.comURLs pinned to the Gist commit SHA, so that images render reliably in GitHub pull requests without leaving stale branches or binary blobs in the repository. - As a maintainer reading the public Prompts and skills page, I want the generated Factory skills section to stay in sync with the updated embedded Factory skills.
Implementation Decisions
- Apply to both Factory skills and Day shift skills: Update
thirdshift-pr,thirdshift-implement, andthirdshift-diagnosing-bugsalongside their Day shift counterparts (pr,implement, anddiagnosing-bugs) so headless sessions and interactive sessions share the same standard. - Keep
Session prompttemplates andGLOSSARY.mdunchanged:thirdshift's compiled prompts already invoke the implement, diagnosing-bugs, and PR skills (including in Spec review); no new domain terms or ADRs are needed. - Follow
writing-for-agentsprinciples:- Co-locate the visual evidence rules, detached-worktree fallback, and secret git-pushed Gist recipe directly under
### Evidencein the PR skills rather than splitting into a separate reference file. - Keep the upfront capture step in the implementation and bug-diagnosis skills to a tight, positive 2-sentence instruction with a clear completion criterion (
/tmp/before-*and/tmp/after-*captured at matching viewports and states when the change is visual). - Frame instructions positively: state the exact target behavior (embed
andfrom a secret git-pushed Gist; keep repository branches free of PR-evidence media files).
- Co-locate the visual evidence rules, detached-worktree fallback, and secret git-pushed Gist recipe directly under
- Separate Execution and Visual slots in the PR template:
- In
## Evidence, separate execution evidence (actual command/test output before and after, removing"using pseudocode") from visual evidence (andscreenshots or.gifrecordings when the change is visual and a headless browser is available).
- In
- Standardize the secret git-pushed Gist hosting workflow:
- Because
gh gist createrejects binary files over the REST API, instruct the agent to create a secret Gist with a placeholder text file (gh gist create --desc "..."), clone its git URL into a temporary/tmpdirectory, copy the/tmp/before-*and/tmp/after-*.pngor.giffiles into the clone, commit and push them, read the Gist owner andHEADcommit SHA, remove the temporary clone, and embedhttps://gist.githubusercontent.com/<gist-owner>/<gist-id>/raw/<commit-sha>/<filename>.
- Because
- Standardize the detached-worktree fallback for missing
Beforecaptures:- When writing the PR body for a visual change where
/tmp/before-*was not captured beforehand, instruct the agent to create a temporary detached worktree at the Base branch (git worktree add --detach /tmp/before-wt <base>), capture/tmp/before-*from the same viewport and state, and remove the temporary worktree (git worktree remove --force /tmp/before-wt).
- When writing the PR body for a visual change where
- Regenerate the Prompts and skills page:
- Run the prompt/skills page generator so the checked-in HTML fragment reflects the updated embedded Factory skills.
Testing Decisions
- What makes a good test: Verify external, observable contracts—that all embedded Factory skills are valid UTF-8, include their required frontmatter and credits where applicable, and match the generated Prompts and skills page fragment byte-for-byte without drift.
- Modules and seams to test:
- Use the existing
prompts_pagetest seam (UPDATE_PROMPTS=1 cargo test prompts_pageandcargo test --bin thirdshift prompts_page) to regenerate and verify the checked-in Prompts and skills page against the embeddedskills/directory. - Run the existing skill and packaging unit/integration tests (
cargo test --bin thirdshift skills::testsandcargo test --test packaging) and site checks (scripts/affected-tests main) to confirm the updated skills and generated site page pass all checks.
- Use the existing
Out of Scope
- Changes to the Rust binary, CLI subcommands,
Session promptfunctions, orscripts/affected-tests. - Downloading or proxying inbound private-repo
github.com/user-attachments/assets/...URLs referenced inside issue bodies (.thirdshift-issue.md). - External cloud object storage (S3/R2) or orphan media branches in the target repository.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
JacobStephens2 commentedon Nov 4, 2026
Retrospective findings from host run traces (
local,lima:thirdshift,thirdshift.app,stephens.page,test,orchestrate,dev)Checking
~/.thirdshift/logsacross the configured hosts and the last 100 PRs inJacobStephens2/thirdshift(plus 60 inEducational-Travel-Adventures/tourbot) shows why screenshots aren't appearing in Ticket-run PR bodies even when agents already capture them during implementation:thirdshiftPRs, only 3 (#1603,#1616,#1624) embeddedimages—and in all 3 cases, the GitHub issue body explicitly instructed the agent to put screenshots in the PR body (#1598: "Screenshot the new view into the PR body";#1614: "Show Console Inbox and Waterfall screenshots in documentation";#1623: "Include before and after screenshots in the PR body.").thirdshiftUI Ticket runs embed screenshots, even when the agent takes screenshots into/tmpduring implementation.Root causes
1.
skills/thirdshift-pr/SKILL.md(and.agents/skills/pr/SKILL.md) makes test output satisfy the## Evidenceslotskills/thirdshift-pr/SKILL.md:skills/thirdshift-implement/SKILL.mdalready requires the agent to collect red/green test runs andscripts/affected-testsoutput, the agent already has test output in context when it reaches/thirdshift-prand uses it to satisfy<screenshot/output/failing test run>.skills/thirdshift-pr/SKILL.mdmade## Test seams,## Review coverage, and## Unaddressed findingsrequired sections with concrete completion criteria, compliance across traces was ~100%.2. Agents have no documented mechanism to turn a local
/tmp/*.pnginto an HTTPS URL that renders ingh pr creategh pr create --body-file/gh pr editcannot upload local files togithub.com/user-attachments/assets/.... Traces across hosts show agents repeatedly taking screenshots into/tmp/*.png, visually inspecting them withRead, and then replacing them with prose or DOM measurements in the PR body because they have no way to attach/tmp/*.png:local(kolotammaman/saint-partyissues#2,#5,#7,#8):2-20261027T004403-0400~FOtBADqy1eyaEg9L-implement.logs.jsonl,5-20261027T014658-0400~9D8wO3R2zWDSaO2l-implement.logs.jsonl, and7-20261027T030633-0400~6b0wN6m5Y37kI5xV-implement.logs.jsonl, the agent launched headless Chrome, saved/tmp/sp-shots/1-revealed.png,/tmp/sp-shots/2-voted.png,/tmp/sp7/run/host.png, and/tmp/sp7/run/editor.png, and calledReadon each PNG to verify layout. When writing/tmp/sp-pr-body.mdand/tmp/sp7/pr.md, it replaced the screenshots with prose ("headless Chrome over DevTools, emulating a 390×844 mobile viewport... scrollWidth was 390") and markdown tables.[email protected](JacobStephens2/chart35issue#335):335-20261026T171031-0400~nbwqdhASB4anUhYG-implement.logs.jsonl, the agent addedawait page.screenshot({ path: process.env.CHART35_HINT_SCREENSHOT })and ranCHART35_HINT_SCREENSHOT=/tmp/chart35-335-hint-mobile.png node scripts/cycle-start-hint-browser-smoke.mjs, inspected the screenshot, and then wrote only text test assertions in the PR body.jstephens@dev(Educational-Travel-Adventures/tourbotissue#2006):2006-20261103T104301-0500~nj4p6oaLzt1OQcen-implement.logs.jsonl, the agent extracted the Playwright screenshot attachment to/tmp/tourbot-2006-after.png, noted "I've inspected the 625px screenshot", and then wrote onlynpx playwright testpass counts into/tmp/tourbot-2006-pr.md.jstephens@orchestrate(JacobStephens2/thirdshiftissue#1262&Educational-Travel-Adventures/orchestrationissue#783):1262-20261024T160201+0000~NvY58JsRptj4z1cM-implement.logs.jsonl("make the stages console web ui view able to take all or nearly the full width of the viewport"), the agent wrote/tmp/ts1262/measure.cjslaunching Playwright Chromium against/?page=stages, measured bounding boxes in JS instead of callingpage.screenshot(), and put the pixel numbers into/tmp/pr-1262.md.783-20261027T155002-0400~r7FOtn59FyMYn4Rn-implement.logs.jsonl, the agent rendered 6 PNGs into/tmp/issue-783-render-mb4o/*.png, then had to rungh pr list --limit 60 --jq '... scan("!\\[[^]]*\\]\\(([^)]+)\\)")'to discover how any prior PR had linked an image. Finding only 1 match in 60 PRs (#1577, which committeddocs/evidence/issue-1571/desktop.pngand linked?raw=true), it committeddocs/evidence/orchestration-783/*.pngand linkedhttps://github.com/.../blob/<sha>/docs/evidence/...?raw=true.3. The "Before" state is already overwritten by the time
/thirdshift-pris readsrc/prompt.rs(prompts/fresh.md) andskills/thirdshift-implement/SKILL.mdonly direct the agent toskills/thirdshift-pr/SKILL.mdafter implementation, commits, andthirdshift-code-revieware finished.<base>(or extracting<base>files into a scratch directory, as the agent inorchestration#783had to script by hand) and rebuilding.4.
scripts/affected-testspenalizesdocs/screenshots/**with a full Rust suite runscripts/affected-tests, committing files underdocs/screenshots/issue-<n>/*.pnghits theelse: areas.add("full")fallback (Conservative full-suite selection).#1603(#1598), committingdocs/screenshots/issue-1598/overview-{1440,390}.pngforced a full Rust test suite run (2050.14 s/ 34 minutes).#1624(#1623), to stay inside the fastsitetest area, the agent committed its 6 PR-evidence screenshots undersite/screenshots/issue-1623/*.png, which causessite_deployto deploy PR evidence images to the live site.5. Related finding: private-repo
github.com/user-attachments/assets/...URLs in.thirdshift-issue.mdreturn404tocurljstephens@devintourbot/commands/pickup/2064-20261104T143301-0500~AW2zZTf18bILm8MY-implement.logs.jsonl, the agent tried to fetch the issue's attached screenshot (curl --fail --location ... https://github.com/user-attachments/assets/8ba4089a-0f06-4bd5-ac44-1344d844d5c0 --output /tmp/issue-2064.png), gotHTTP 404becauseuser-attachmentson private repos requires browser session/auth cookies, and had to proceed without seeing the issue's screenshot.Proposed changes for this issue
docs/screenshots/issue-<n>/<name>.pngreferenced viahttps://raw.githubusercontent.com/<owner>/<repo>/<head-sha>/docs/screenshots/issue-<n>/<name>.png) and exemptdocs/screenshots/**inscripts/affected-testsso it adds no test area of its own;/tmp/*.pngand receive a permanent HTTPS URL without committing binary blobs intomain.skills/thirdshift-implement/SKILL.md(andskills/thirdshift-diagnosing-bugs/SKILL.md):1440×900and mobile390×844when responsive) against the unpatched baseline before/during reproduction, and capture the matching After screenshot when verifying the fix.skills/thirdshift-pr/SKILL.mdand.agents/skills/pr/SKILL.md:## Evidenceso passing test output does not replace/on UI changes, and remove the "using pseudocode" instruction for test evidence.prompts/andsite/prompts/index.htmlwithUPDATE_PROMPTS=1 cargo test prompts_page.