git-tbd-for-sdd
Skill0 starsChanged 2 months agoMITView on GitHub
Apply Trunk-Based Development with SDD integration. Short-lived
- Commits and pushes
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- code-backend-nestjsSkill
- code-frontend-library-reactSkill
- doc-changelog-generationSkill
- doc-design-generationSkill
- doc-domain-generationSkill
- doc-guardrail-generationSkill
- doc-policy-generationSkill
- doc-readme-generationSkill
- git-worktrees-useSkill
- openspec-generate-baselineSkill
- openspec-init-configSkill
- security-auditSkill
- skill-masterSkill
- skill-test-evalsSkill
- test-cypress-cucumberSkill
- test-nestjs-jest-testing-moduleSkill
- test-nestjs-supertestSkill
- test-playwright-cucumberSkill
- test-react-testing-librarySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 98
Place it in .husky/pre-commit or a CI job.
≈ “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
Git TBD for SDD
Trunk-based development with a spec-first overlay for SDD (Specification-Driven Development). Branches are short-lived,
main is the only integration point, and specs merge before the code that
implements them.
Use this skill when: deciding how to branch, commit, open a PR, cut a release, or handle a hotfix.
Skip this skill when: working locally with no intent to push, or on throwaway experiments.
Core rules
mainis the only integration point. Every branch merges back tomain.- Branches are short-lived — hours to 2–3 days. Never more than a week.
- Branch prefixes are contractual:
feat/*→ code + the spec it implements onlyspec/*→docs/specs/**onlydocs/*→docs/**exceptdocs/specs/epic/*→ temporary integration branch, ≤ 6 weeks; features branch from it and PR back to it, not tomain
- A new spec merges to
mainbefore its implementation branch starts. - Specs discovered mid-feature go to
docs/specs/_inbox/. Promotion to canonical is a deliberate act in aspec/*branch. - Releases are cut from
mainor from a short-livedrelease/*branch — never from a feature branch.
Branch model
main ──●──●──●──●──●──●──●──► (trunk, always deployable)
╲ ╲ ╱ ╱
feat feat release/*
(hours–days)Two flows you will use daily
Feature (code):
git switch main && git pull
git switch -c feat/STORY-NNN-slug
# code + the STORY-NNN spec only
git commit -m "feat(scope): ..."
git push -u origin feat/STORY-NNN-slug # PR → mainSpec (before the feature):
git switch main && git pull
git switch -c spec/STORY-NNN-draft
# write docs/specs/.../STORY-NNN/story.md
git commit -m "docs(spec): add STORY-NNN"
git push -u origin spec/STORY-NNN-draft # PR → mainReferences
Load only the file you need. Each is standalone.
| Topic | Load when… | File |
| Branch model | Onboarding, or redesigning the flow | references/branch-model.md |
| Spec Branch (SDD + TBD) | Separating spec authoring from implementation | references/spec-branch.md |
| Commit conventions | Writing a commit message | references/commits.md |
| PR discipline | Opening or reviewing a PR | references/pr.md |
| Release from trunk | Cutting a release without a branch | references/release-from-trunk.md |
| Release branches | Maintaining frozen versions with hotfixes | references/release-branches.md |
| Hotfix flow | Fixing production urgently | references/hotfix.md |
| Feature flags | Merging incomplete work safely | references/feature-flags.md |
| Rollback | Reverting a bad release | references/rollback.md |
| Epic branches | Batching features with joint regression before main | references/epic-branch.md |
Enforcement (optional but recommended)
Reject any spec/* branch that touches files outside docs/specs/:
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" == spec/* ]] && git diff --name-only main | grep -qv '^docs/specs/'; then
echo "spec/* only touches docs/specs/"; exit 1
fiPlace it in .husky/pre-commit or a CI job. One-directional, cheap, effective.
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.

