review-in-worktree
Skill5 starsChanged 3 months agoMITView on GitHub
Use this skill when reviewing code isolated in a Git worktree outside a Govard-managed project directory (for example Maestro merge-request review trees under /tmp), when "govard tool" cannot find the project configuration, or when asked to run Govard-managed commands against a detached review tree.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- brainstormingSkill
- diagnosing-superpowersSkill
- diagram-studioSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- govard-laravelSkill
- govard-magentoSkill
- govard-symfonySkill
- govard-toolboxSkill
- govard-wordpressSkill
- maestro-designSkill
- magento2-backend-devSkill
- magento2-code-reviewSkill
- magento2-dev-coreSkill
- magento2-frontend-devSkill
- magento2-hyva-devSkill
- magento2-linterSkill
- magento2-performance-auditSkill
- magento2-security-scanSkill
- php-dev-coreSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
If the branch under review belongs to a Govard project that is already up (govard up ran in the real checkout), resolve the environment …
- Very specific: line 30
Verify with govard status before anything else.
- Distinctive: line 36
Only when the review must execute code and no owning environment exists:
- Very specific: line 75
Never point GOVARD_PROJECT_DIR at production or shared staging checkouts.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Reviewing in Detached Worktrees
Why Govard Commands Fail Here
govard tool … resolves the project from a .govard.yml found upward from
the current directory and dispatches into that project's running app
container. A bare review worktree (created with git worktree add for a
merge request) carries neither the config nor a running environment, so
project-routed Govard commands fail by design.
Option 1 — Point at the Owning Checkout (preferred, read-only intent)
If the branch under review belongs to a Govard project that is already up
(govard up ran in the real checkout), resolve the environment from there:
GOVARD_PROJECT_DIR=/path/to/real-checkout govard statusVerify with govard status before anything else. Treat this as read-only
context for your review; never run mutations (migrations, cache flushes,
indexers) against the owning project's database because a review asked for it.
Option 2 — Bootstrap a Throwaway Config
Only when the review must execute code and no owning environment exists:
govard init # detects the framework, writes .govard.yml in the worktree
govard up # brings up an isolated stack named after this directoryClean up afterwards so review trees do not leak containers:
govard down && git worktree remove ../<worktree>Option 3 — Static Analysis Only (most MR reviews)
Most automated reviews only need the diff, repository history, and the domain
skills (magento2-code-review, magento2-linter guidance). Prefer this
when the reviewer has no container rights or the MR is not meant to run.
Container-free analysis is available for this case. govard audit run no longer
needs a container when the check itself does not:
# Works on a bare worktree: no stack, no .govard.yml, no Docker.
govard audit run --checks integrity --scope project --format json
# A module inside a project, or a detached review tree:
govard audit run --checks integrity --mode module_in_project --format jsonIt reports composer manifest/lock problems and Magento module/DI wiring problems
(govard-integrity findings) and is a different body of evidence from lint —
never present it as a substitute for --checks lint, which does need Docker.
Exit codes: 0 clean, 1 findings, 3 a required capability is missing
(--error-json prints the versioned envelope). Review the integrity.json
artifact referenced by the run result for the exact finding list.
Guardrails
- Never point
GOVARD_PROJECT_DIRat production or shared staging checkouts. - A worktree shares the repository with its main checkout: rebases or
git worktree removeaffect both — coordinate before cleaning up. - Database state is per project, not per worktree: two worktrees of one project share data through the same stack.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

