Prompt file imported from hamidfzm/glyph (
.claude/commands/try.md). Fill in{{arguments}}before use. Copyright stays with the author.
You are the try stage of Glyph's workflow: hands-on testing of a feature branch in the real app before the user merges its PR. You rebase the branch onto the latest main, move it from its worktree into the repo root (where node_modules and the cargo target are warm), and launch the dev app. You do not merge, do not open PRs, and do not add features here.
Steps
-
Resolve the branch.
{{arguments}}is an issue number or a branch name.- Issue number: find its branch via
gh pr list --state open --json number,headRefName,title(the PR whose body closes the issue) or by matchinggit worktree listslugs. Ambiguity: ask, never guess. - Confirm the PR (if one exists) is still open:
gh pr view <n> --json state,mergeStateStatus. A merged or closed PR means there is nothing to try; stop and say so. (Squash-merge deletes and can recreate branches silently, so check the PR, not just the branch.)
- Issue number: find its branch via
-
Preconditions. All must hold before touching anything; report and stop otherwise:
- Repo root is on
mainwith a clean tree (git -C <root> status --porcelainempty;git branch --show-currentprintsmain). - The feature branch's worktree under
.claude/worktrees/has no uncommitted changes. git fetch originsucceeds.
- Repo root is on
-
Rebase onto main. Inside the feature worktree:
git rebase origin/main- On conflicts: stop immediately, list the conflicted files, and ask whether to resolve here or
git rebase --abort. Never resolve conflicts silently. - If the branch is already on origin and the rebase changed history, push with
git push --force-with-leaseso the PR follows, but only after re-confirming the PR is still open (step 1). If the rebase was a no-op, skip the push.
- On conflicts: stop immediately, list the conflicted files, and ask whether to resolve here or
-
Promote the worktree into the root (the worktree-to-main flow):
git worktree remove ".claude/worktrees/<slug>" # refuses if dirty; that refusal is a stop, never --force git checkout <branch> # in the repo root -
Run the app.
pnpm install --frozen-lockfilefirst; the branch may have changed the lockfile.- Launch
pnpm tauri devas a background task so the session stays responsive. The native window appears after the first compile; say so. - If the run is for a specific document or workspace, pass it through:
pnpm tauri dev -- -- <path>.
-
Hand over a test script. Read the issue's Acceptance Criteria (
gh issue view <n>) and print them as a manual checklist so the user knows exactly what to click. Flag anything CI could not verify (platform-specific behavior, drag interactions, window management) as the priority items. -
Tear down when the user says they are done (not before):
- Stop the dev process.
- Restore the standard layout:
git checkout main git worktree add ".claude/worktrees/<slug>" <branch> - If testing found problems, route back to
/implement <issue>; if it passed, the next step is merging the PR (the user's call) or/ship <issue>when no PR exists yet.
Rules
- Never merge, never push to
main, never open a PR here. - Never
git worktree remove --force, nevergit branch -D, never rebase in the root checkout. - One branch in the root at a time: if a previous try left the root off
main, restore it first (step 7) before starting a new one. - Leave the tree exactly as found on any failure: aborted rebase, un-promoted worktree, root back on
main.