team-wrap
Skill2 starsChanged 14 days agoMITView on GitHub
Use after the owner has merged a feature's PR — marks it shipped, captures lessons from its reviews and QA into .agent-team/lessons.md, and cleans up the worktree and branches.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- developerSkill
- engineering-guidelinesSkill
- marketingSkill
- pmSkill
- qaSkill
- reviewerSkill
- team-auditSkill
- team-buildSkill
- team-ideateSkill
- team-initSkill
- team-marketSkill
- team-statusSkill
- tech-leadSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- could be automatic: a setting could enforce it
- Very specific: line 16
Retro → lessons: Read this feature's review-*.md, qa-*.md and the status.md log, then .agent-team/lessons.md (create it from …
- Distinctive: line 27
Never delete a branch whose PR isn't merged, and never force-push.
- Distinctive: line 28
Never write a lesson that isn't backed by this feature's review, QA or status files.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
team-wrap <slug>
Closes a merged feature so the next one starts cleaner. Run it on a standard-tier session; it's short.
- On the default branch.
D=$(agent-team default-branch). If the checkout isn't on$D, stop and tell the owner.agent-team pull(instead ofgit pull: it first puts back any doc copydocs-pullwrote that nobody edited, then pulls--ff-onlyand brings in docs still waiting on anagent-team/metaPR). If it fails, stop and show the owner its message. - Check the merge. Read
pr:from.agent-team/features/<slug>/status.md(it arrived with the merge).gh pr view <pr> --json state,mergedAt. Not merged → stop: "merge the PR first". In a workspace (project.mdhas## Repos), everyrepo_prsentry andprmust be merged (gh pr view <n> -R <owner/repo> --json state,mergedAt; owner/repo fromagent-team repos); some unmerged → stop and list them. If the status already saysretro: done, skip to step 6. - Clean up:
agent-team cleanup <slug> --remote— removes this machine's worktree, the local branch and the merged remote branch. It refuses if that would lose anything (uncommitted changes, commits that are neither pushed nor in the merged PR): then stop and show the owner its message; use--forceonly if they say so. (Other machines' worktrees are cleaned when they rungit worktree prune.) - Mark it shipped:
agent-team status <slug> --set stage=merged owner=noneandagent-team idea <slug> --set shipped. - Retro → lessons. Read this feature's
review-*.md,qa-*.mdand thestatus.mdlog, then.agent-team/lessons.md(create it fromreferences/lessons-template.mdif missing). Add at most 3 lessons, only patterns likely to recur in future features of this product:- a Critical or Important finding that took more than one round, or the same kind of finding in several places;
- a QA bug whose cause is a project convention or a trap in the codebase;
- a task tagged
[fast]that had to escalate, and why; - a stop reason and what would have prevented it.
One line each: what to do or avoid, and why, ending
(<slug>). Skip anything already covered, one-off typos and things a linter catches. Nothing worth keeping → add nothing; that's a fine outcome. Keep the file ≤ 40 lines: when it would grow past that, merge similar lines and drop lessons that no longer hold. Thenagent-team status <slug> --set retro=done.
- Commit only agent-team files:
agent-team docs-commit -m "docs(<slug>): wrap up" --title "agent-team: docs" .agent-team/features/<slug> .agent-team/ideas.md .agent-team/lessons.md.agent-team docs-commitcommits from a temporary worktree — never on your local default branch — and pushes to$D, or, if$Dis protected, anagent-team/metaPR is still open, orproject.mdsetsdocs-push: pr-only, toagent-team/meta, opening or reusing its PR. - Tell the owner in two lines: the lessons added (or "none"), and "Run
team-market <slug>for outreach drafts."
Never
- Never delete a branch whose PR isn't merged, and never force-push.
- Never write a lesson that isn't backed by this feature's review, QA or status files.
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.

