land-and-archive
Skill6 starsChanged 51 days agoMITView on GitHub
The land step for a finished ticket: merge the branch, record evidence, archive the ticket with maestro ticket archive, delete the merged branch, and remove the worktree unless it is a lane. Use when a ticket has passed its gates and is ready to become real.
In this repository24 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- atomic-reportSkill
- board-validateSkill
- data-modelSkill
- delivery-hygieneSkill
- dev-reportSkill
- dev-setupSkill
- frontend-qualitySkill
- gcSkill
- git-branchSkill
- orchestration-healthSkill
- orchestratorSkill
- pipeline-qualitySkill
- plan-updateSkill
- project-planSkill
- release-gateSkill
- repo-auditSkill
- scaleSkill
- security-reviewSkill
- swarmSkill
- test-coverageSkill
- tpmSkill
- trackerSkill
- worktree-cleanupSkill
The file
Files
Land and Archive
The closing ritual for a ticket. Run it only after the release gate is green and any human
gate is cleared. On tickets routed through principal-delivery (pd), pd decides whether
to land; this skill executes that decision — it never makes it.
Steps
- Confirm the gate. Tests green, QA passed, evidence in hand. Don't land on a red or
unverified gate (see the
release-gateskill). - Land the branch on the default branch. Resolve it — don't assume
main:git fetch origin git remote set-head origin -a # in case the clone skipped setting origin/HEAD default_branch=$(git symbolic-ref --short refs/remotes/origin/HEAD | sed 's@^origin/@@')- Fast path (your own repo, non-protected default branch): merge (squash for a clean history if that's the project convention), then push.
- Protected default branch: push the branch, open a PR, merge once checks are green. Merge with admin override only where the project explicitly allows it and local gates are green.
- Rebase onto
origin/$default_branchfirst if it moved; resolve conflicts and re-run the gate before the final push — never force-push over an unresolved conflict.
- Capture evidence on the ticket: the merge commit SHA and the test result. This is what
archive.jsonpreserves. Archive the ticket with the guarded writer — never by editing the files yourself:
maestro ticket archive <id> --board {{BOARD}}/data.json --archive {{BOARD}}/archive.json \ --evidence "merged <sha>: <what was verified>" --done-at <YYYY-MM-DD>It moves the ticket out of
data.jsonand intoarchive.jsonin one locked, validated, atomic write — both files or neither. Reading the two files, editing them and writing them back is how a concurrent writer's ticket disappears without an error, and how a ticket ends up in both files or in neither.data.jsonshould only ever show live work.Exit 2 means another writer got there first — run the same command again. Exit 1 means the request was wrong; fix it rather than retrying.
- Clean up (see the
worktree-cleanupskill):- Always delete the merged branch, locally and on the remote.
- Remove the worktree only when it is not a lane. A lane worktree hosts the next ticket in its queue; keep it and re-base it for that ticket instead.
- Unblock dependents. Any ticket whose
depends_onis now fullydonebecomes eligible — the next orchestrator run will see it.
Do it promptly
Land finished work when it's finished — don't let merged-in-spirit branches linger unmerged or done tickets sit unarchived. A stale branch diverges from the default branch; an unarchived done ticket lies about the board's state.
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.

