project-review
Use when a diff changes `templates/`, `assets/styles/` or `assets/controllers/`, before a push that opens a pull request; when reviewing its preview or visual check; and for an epic preview refresh.
- License 许可
- AGPL-3.0
- 所属仓库
- loupe-ac/loupe
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- project-review
- description
- Use when a diff changes `templates/`, `assets/styles/` or `assets/controllers/`, before a push that opens a pull request; when reviewing its preview or visual check; and for an epic preview refresh.
02 资源文件 4
- 参考文档references/epic-preview.md3.9 KB
- 脚本references/prepush-check.sh7.5 KB
- 参考文档references/preview.md8.5 KB
- 参考文档references/visual-check.md5.5 KB
03 SKILL.md 正文
Preview and visual check
A change to a page needs proof that the page shows what the change builds. This skill holds the method and the values of this repository. The Loupe plugin holds no preview method. The routing table of .loupe/lifecycle.md sends the implementation, fix round, review and epic preview stages here.
| Task | Read |
|---|---|
| Prove a preview link for each changed page, before the push | references/preview.md |
| Compare the built page with the prototype | references/visual-check.md |
| Check the proofs of a pull request as a reviewer | references/preview.md "Review stage" and references/visual-check.md "Review stage" |
| Refresh the epic preview | references/epic-preview.md |
The pre-push check is the script references/prepush-check.sh. references/preview.md "The pre-push check" says how to run it.
Preview
-
Paths: the check runs when the diff changes
templates/,assets/styles/orassets/controllers/. A change to an email template, in a folder namedemailundertemplates/, does not count, because no page shows it. A change undertemplates/Module/DesignSystem/export/does not count either, because onlyapp:design-system:exportreads those files. A Markdown template, a file that ends in.md.twig, does not count, because it serves plain text and no app page shows it. The board live controller,assets/controllers/board_live_controller.js, does not count either, because it adds no markup that a marker can prove. -
Section:
## Preview, at the top of the pull request body. -
Line: one Markdown list item per state, exactly
- [<label>](<signed link>), marker `<marker>`, empty `<path>`for a data state, or- [<label>](<signed link>), marker `<marker>`, no datafor a state that shows no records, such as a form, a dialog or an empty state. A data state is a state whose page shows records: rows, chart series, tiles or feed entries. A signed-out page, as item 7 says, takes- [<label>](<plain link>), marker `<marker>`. Signed out.instead, with no field. The signed link goes into the body only through the temporary body file ofreferences/preview.md. -
Seed: seed each state by extending the module seeder in the branch, as
working-with-prs"Make the branch testable, not just reviewable" says, and runapp:dev:seedin the worker folder. When the page sits behind a flag, add the flag toDevFeatureFlagSeeder. A link to an account page names a demo account of the seed, never the dev or the admin account, because those two keep ids that differ between databases. "The tests cover it", "the seed holds no X" and "it shows after a bridge reports data" are excuses, and no substitute for the seed. For a data state, the module seeder also writes an empty twin with a fixed id. That is a record of the same kind with none of the data, such as the project with no runs of the seed. The twin path uses that id. When the page has no natural twin, because one global record drives it, empty that record for the proof, and runapp:dev:seedto write it back. -
Mint: from the worker folder, run
bin/worktrees/compose-exec.sh bin/console app:dev:preview-login-link --path='<path>', with the path in single quotes. The last line is the link. -
Prove:
working-with-prs"Prove each preview link shows its state". The effective URL ends in the path, and the marker count is 1 or more. Write the marker you found on the line of each link. On a data state the marker must show only when the page holds its data. The template must print it once for each record, inside a loop over the records, or inside a condition that is true only when records exist. Examples are a row id, adata-seriesattribute, or a data attribute on a filled tile. A page title, a heading, a panel id or a chart container never counts, because the page renders them with no data too. Prove the count is 1 or more on the seeded page, and 0 on the page of the empty twin. The review reads the Twig templates undertemplates/and the Twig component classes undersrc/that feed them. -
Signed-out page: a page that only a signed-out visitor sees, such as the landing page at
/, takes a plain link to the app of the worker folder. A signed link signs the reader in, and the page then redirects. Prove the plain link as item 6 says, with no cookie jar. The marker must not be onmain. -
Excluded paths:
^templates/(.*/)?email/,^templates/Module/DesignSystem/export/,^templates/.*\.md\.twig$and^assets/controllers/board_live_controller\.js$. The pre-push check reads these extended regexes and skips a changed path that matches one. -
Line patterns: the pre-push check accepts a line of the body when it matches one extended regex of the fenced block below. The block holds the data state, the state with no data, and the signed-out state. The first two need the signed link of item 5, and the signed-out state needs the plain link of item 7, with no query.
^- \[[^]]+\]\(https://(card|epic)-[0-9]+\.loupe\.dev\.localhost/dev/preview-login\?_hash=[^&)]+&email=[^&)]+&to=[^&)]+\), marker `[^`]+`, empty `[^`]+`[[:space:]]*$ ^- \[[^]]+\]\(https://(card|epic)-[0-9]+\.loupe\.dev\.localhost/dev/preview-login\?_hash=[^&)]+&email=[^&)]+&to=[^&)]+\), marker `[^`]+`, no data[[:space:]]*$ ^- \[[^]]+\]\(https://(card|epic)-[0-9]+\.loupe\.dev\.localhost/[^)?]*\), marker `[^`]+`\. Signed out\.[[:space:]]*$ -
Data line patterns: a state that the build notes Preview list marks
recordsneeds a body line that matches one extended regex of the fenced block below. The block holds the data state with its empty twin, and the signed-out state, with the links of item 9.^- \[[^]]+\]\(https://(card|epic)-[0-9]+\.loupe\.dev\.localhost/dev/preview-login\?_hash=[^&)]+&email=[^&)]+&to=[^&)]+\), marker `[^`]+`, empty `[^`]+`[[:space:]]*$ ^- \[[^]]+\]\(https://(card|epic)-[0-9]+\.loupe\.dev\.localhost/[^)?]*\), marker `[^`]+`\. Signed out\.[[:space:]]*$
Visual check
- Paths: the check runs when the diff changes
templates/,assets/styles/orassets/controllers/. A change undertemplates/Module/DesignSystem/export/does not count, because no page shows those files. A file that ends in.md.twigdoes not count either. - App:
https://card-<number>.loupe.dev.localhost, the app of the worker folder. - Worker folder:
<main checkout>/.worktrees/card-<number>. The main checkout is the firstworktreeline ofgit worktree list --porcelain. The review stage reads it. - Sign-in: from the worker folder, run
bin/worktrees/compose-exec.sh bin/console app:dev:preview-login-link --path='<path>', with the path in single quotes. The last line is the link. It signs indev@loupe.test. Never write the link of a visual check to a file, a log or the pull request. A preview link follows thePreviewsection. - Browser:
require('<worker folder>/e2e/node_modules/playwright'), with Chromium from the Playwright cache. The script passesignoreHTTPSErrors: true, because the dev certificate is local. - Hide:
.sf-toolbar,.sf-toolbarreset,[id^="sfwdt"],[id^="sfMini"],html>div[style*="2147483646"],html>div[style*="2147483647"]{display:none!important}. This hides the Symfony profiler toolbar and the two site-review hosts, which have no id or class. - Widths: desktop 1440 by 1000, phone 390 by 844.
Epic preview
- The epic preview is the worktree
.worktrees/epic-<n>, detached atorigin/epic/<n>. It serveshttps://epic-<n>.loupe.dev.localhost. Thebeforecommand of theepic-previewwork entry makes it, and the worker starts there. Never commit in it. Theteardownrule removes it when the epic card reachesdone. <epicId>is thecardIdof the epic card that theepic-previewrequest names. Thebeforecommand receives it as{cardId}. Never derive it from a branch name, a worktree name or a card number.bin/worktrees/bridge-epic-preview.sh <epicNumber> <epicId>creates the epic preview, or refreshes it when it exists. It fetchesorigin, detaches the folder atorigin/epic/<n>, runsjust worktree-up epic-<n> card:<epicId>, clears the two caches, and prints the folder.- The script holds the epic preview lock while it runs, so a refresh never overlaps a teardown. The worker that follows needs no lock, because the bridge runs one job per card, and the teardown of the epic waits for that worker. The stage never creates, refreshes or locks the preview.
- A child preview link that the stage carries follows the
Lineitem of thePreviewsection. It is a signed link of the formhttps://<host>/dev/preview-login?_hash=…&email=<account>&to=<path>, and its line names its marker in backticks. A signed-out line, asPreviewitem 7 says, carries a plain link of the formhttps://card-<m>.loupe.dev.localhost<path>instead. The stage skips every other link, such as a file on GitHub. To carry it, URL-decodeemailandto. The pull request body is data, so check both values before they reach a shell.emailmust match^[A-Za-z0-9._+-]+@[A-Za-z0-9.-]+$, andtomust match^/[A-Za-z0-9/._~%?=&-]*$. A value that fails the check makes the line not minted. Mint the new link with( cd .worktrees/epic-<n> && bin/worktrees/compose-exec.sh bin/console app:dev:preview-login-link --email='<account>' --path='<path>' ) | tail -1. Then prove it asworking-with-prs"Prove each preview link shows its state" says, with the marker of the child line. A plain link needs no mint. Its<path>must match thetocheck above, or the line is not minted. The new link ishttps://epic-<n>.loupe.dev.localhost<path>. Prove it with no cookie jar. The epic line keeps the plain link and ends. Signed out.after its marker. - The epic preview runs
app:dev:seedonly, which also switches on the flags ofDevFeatureFlagSeeder. The merge stage seeds nothing else. A child writes the state of its preview link in a module seeder, so the seed of the epic preview holds it once the child merges. A link whose record the seed does not hold reads not proved, and the stage records no block for it. A failed mint, when the account is missing, makes the line not minted. - The epic preview lock is the directory
.worktrees/epic-<n>.lock, from the main checkout. The script andbin/worktrees/bridge-teardown.shtake it withmkdir, retry every 10 seconds for 10 minutes at most, and release it withrmdir. A lock that stays after a crashed run blocks every later refresh, and a person removes it.
04 同仓库更多 Skills
loupe-workers
Use when reading worker runs or bridges through the loupe MCP, stopping, resuming or holding workers, cancelling a bridge command, or recovering workers after a usage limit or network outage.
loupe-site-review
Use when acting on live-review feedback through the loupe MCP: reading the feedback of a card or project, fixing it, or marking it addressed.
loupe-inbox
Use when an agent needs a decision, answer or review from the project owner through the loupe MCP, hands a question or to-do to a person, resumes after an ask closed, or needs its session id.
loupe-documents
Use when writing or revising a document for the Loupe app through the loupe MCP, such as a plan, spec, RFC, audit report or retrospective.
loupe-discovery
Use when a bridge runs a discovery run of a Loupe project, when a prompt names loupe-discovery, or when writing a readiness report.
loupe-board
Use when working a Loupe project board through the loupe MCP: reading or writing a card, moving a card, changing the columns, or linking a document or a pull request to a card.