gt-flow
Skill2 starsChanged 40 days agoMITView on GitHub
Graphite (gt) stacking decision and execution: diagnose coupling, honestly recommend when gt is overkill (plain branches / split-to-prs / sequential), and when chosen enforce commit-in-generation + two-phase handoff + backup refs so code is never lost. Use for gt/graphite/stack/submit --stack, execute-plan assembly, concurrent agents, or PR planning.
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-auditSkill
- agentic-reactorSkill
- agent-orchestratorSkill
- ai-optimizationSkill
- architecture-synthesisSkill
- audit-allow-buildsSkill
- audit-ide-dependenciesSkill
- author-workflow-skillSkill
- bdd-strategizerSkill
- chrome-extension-mv3Skill
- concurrent-cli-agentsSkill
- control-feederSkill
- control-graphSkill
- cursor-transcript-harvestSkill
- cv-promote-guardSkill
- devcontainer-hardenedSkill
- dual-copy-skill-publishSkill
- explore-repo-readonlySkill
- finder-reactorSkill
- fix-dependency-securitySkill
- fusion-sageSkill
- git-worktreesSkill
- grok-host-prepSkill
- higher-order-decision-architectSkill
- looperSkill
- master-plannerSkill
- mvu-refactor-planSkill
- odysseus-navigatorSkill
- project-editor-profileSkill
- react-client-expertSkill
- semantic-markup-cssSkill
- semantic-nameSkill
- session-unit-orderSkill
- shell-kernel-ontologySkill
- skill-rename-propagationSkill
- split-to-prsSkill
- src-tree-reorganizeSkill
- stellar-roadmapSkill
- stellar-spacemapSkill
- subagent-delegationSkill
- subagent-explore-reportSkill
- supply-chain-hardenSkill
- tauri-agenticSkill
- tauri-ipc-debugSkill
- tidy-commit-pushSkill
- upgrade-packagesSkill
- verification-cockpitSkill
- x-agent-resourcesSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 79
Commit where code was written
- Distinctive: line 82
Remove WT before rewriting that branch elsewhere
- Very specific: line 86
Keep execute-plan/…-pr-N-… style escape branches
- Distinctive: line 90
If any cannot be satisfied → simpler path + document why.
≈ “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
gt-flow
Load rule: Formal SoT. Long recipes → references/english-procedure.md only if needed.
// Tools
Git ≔ history + branches
gt ≔ stack graph + restack/submit UX
Worktree ≔ physical isolation (where)
// Compatible (gt ≥1.8.4+) but not seamless: branch checked out in ≤1 WT;
// gt refuses mutate branch owned by another WT; gt undo is per-WT.
// Axioms (zero-lost-code)
A1 Commit in generation env before teardown
A2 Push branches; record authoritative SHAs
A3 Tear down WT before mutating that branch ref elsewhere
A4 gt log before stack-wide commands
A5 Two-phase handoff: agent push → human primary shell gt/gh
A6 Backup refs before risky mutation
A7 Per-slice escape branches always exist
A8 Never cp from WT to integratePair: git-worktrees · split-to-prs · agent-orchestrator.
Decision procedure (always first)
1. Intent → planned slices (files each)
2. Coupling: overlap + core files → High|Med|Low
3. Context: primary authenticated shell? agent WT? gt present+auth?
4. Declare one of:
gt_recommended | gt_overkill | hybrid_handoff| Verdict | When | Next |
| gt_recommended | low coupling · clean boundaries · human in primary | single-WT gt recipe |
| gt_overkill | high core overlap · agent-only auth mismatch · tiny scope · max recoverability | plain PR / sequential / late gt split |
| hybrid_handoff | agent gen + human land (default ambitious agentic) | per-PR branches pushed → user fetch + gt/gh |
State 1-sentence rationale (coupling or context). Confirm with user before mutating stacks.
Coupling score
- High: heavy overlap on core (shared lib, central state, AGENTS, build configs) or >40% slices share 1–3 files
- Medium: some shared surface, clear new-module boundaries
- Low: clean functional splits
Mode cheat sheet
| Situation | Choice |
| independent PRs or high coupling | plain git or linear then gt split |
| stacked PRs, one thing, primary shell | gt single WT (sweet spot) |
| parallel independent + isolation | gt + multi WT + gt log discipline |
| agents + human submit | hybrid |
| late coupling discovery | gt fold or finish linear → gt split |
Zero-lost-code contract (always)
- Commit where code was written
- Push (
--force-with-leaseon resume) - Record
commit_sha - Remove WT before rewriting that branch elsewhere
gt logbefore sync/restack/submit/modify/create-on- Print Phase-1 agent cmds + Phase-2 primary cmds
refs/backup/…orbackup/…branches pre-risk- Keep
execute-plan/…-pr-N-…style escape branches - State/transcript survives for resume
- Hygiene after (git-worktrees disk-hygiene)
If any cannot be satisfied → simpler path + document why.
Command anchors
gt log | gt ls # ownership + stack — before stack-wide ops
gt create [-am] [--onto parent]
gt submit --stack | gt ss
gt sync · gt restack # from each WT that owns part of stack
gt modify -a · gt fold · gt split -c|-f|-h
gt undo # this WT only
gt track | untrack
gt up/down/top/bottom/checkoutAnti-patterns
| ¬ | Do |
| gt during high coupling agent thrash | hybrid or overkill path |
| assume agent shell has gt auth | handoff to primary |
| mutate branch checked out elsewhere | gt log; work from owner WT or --onto |
integrate via cp | commit+merge/cherry-pick |
| drop per-PR branches after linear | keep escape hatches |
Done when: explicit verdict + rationale; if shipping — SHAs pushed; handoff text for human shell if hybrid.
Recipes/recovery: references/english-procedure.md.
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.

