ai-sdlc-governance
Skill394 starsChanged 8 months agoApache-2.0View on GitHub
AI-SDLC project governance rules, workflow expectations, and pre-commit checklist. Loaded automatically at session start.
- Deletes or force-pushes
- Commits and pushes
In this repository2 other files it gives its agents.
- spec/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. About 0 are common, 18 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
11
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 11
NEVER merge any pull request: Do not run gh pr merge, git merge into main, or any merge operation.
- Very specific: line 13
NEVER close issues or PRs: Do not run gh pr close or gh issue close.
- Distinctive: line 14
NEVER force push: Do not run git push --force or git push -f.
- Distinctive: line 15
NEVER delete branches: Do not run git branch -D or git branch -d.
- Distinctive: line 22
Before EVERY commit, run these checks and fix any failures:
- Very specific: line 32
Before committing new .ts modules, verify:
- Very specific: line 33
Every new src//*.ts file (not types.ts, index.ts) has tests somewhere
- Distinctive: line 35
Run the relevant tests and confirm they pass before staging
- Distinctive: line 37
Do NOT rely on CI to catch missing tests — check locally first.
- Distinctive: line 39
Do NOT commit if any of these fail.
- Very specific: line 44
When updating a feature branch with latest main: git fetch origin && git rebase origin/main
- Very specific: line 45
After rebase with conflicts resolved: git push --force-with-lease origin HEAD:refs/heads/<branch> (a standalone command with the branch …
- Very specific: line 46
Never use gh api pulls/N/update-branch with merge method.
- Distinctive: line 47
Keep commit history linear — no merge commits on feature branches.
- Very specific: line 48
Use conventional commits: feat:, fix:, test:, docs:, chore:, style:
- Distinctive: line 52
When given a multi-step task, complete ALL steps before stopping:
- Distinctive: line 57
Run typecheck, tests, lint, format — fix any failures
- Distinctive: line 58
Commit with a conventional commit message
- Distinctive: line 60
Create a PR if needed (but do NOT merge)
- Distinctive: line 63
If blocked at any step, say which step you're stuck on and why.
- Distinctive: line 67
Create PRs with descriptive titles and bodies
- Distinctive: line 68
After pushing, tell the user the PR is ready for their review
- Distinctive: line 69
If CI fails or reviews request changes, fix the issues and push again
- Very specific: line 70
Use /fix-pr <number> to automatically gather and fix PR issues
- Distinctive: line 71
NEVER merge — always wait for the human
- Distinctive: line 75
When review agents post findings:
- Distinctive: line 92
Use Vitest for all orchestrator and reference tests
- Very specific: line 94
Run pnpm test from repo root for all packages
- Very specific: line 95
Run pnpm --filter @ai-sdlc/orchestrator test for orchestrator only
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
AI-SDLC Governance Rules
Critical Rules — NEVER violate these
- NEVER merge any pull request. Do not run
gh pr merge,git mergeinto main, or any merge operation. Only create or update PRs. The human merges. - Dismiss PR reviews only with documented reason. You may dismiss reviews when they failed due to infrastructure issues (e.g., API credit exhaustion) or when findings are documented false positives. Always include a clear explanation in the dismissal message. Prefer updating
.ai-sdlc/review-policy.mdfor recurring false positives. - NEVER close issues or PRs. Do not run
gh pr closeorgh issue close. The human decides what to close. - NEVER force push. Do not run
git push --forceorgit push -f. - NEVER delete branches. Do not run
git branch -Dorgit branch -d. - NEVER run destructive git operations. No
git reset --hard,git checkout -- .,git restore ..
These rules are also enforced technically via .claude/hooks/enforce-blocked-actions.sh and .ai-sdlc/agent-role.yaml blockedActions.
Pre-Commit Checklist
Before EVERY commit, run these checks and fix any failures:
pnpm build # TypeScript compilation — catches type errors
pnpm test # All tests must pass
pnpm lint # ESLint — no errors allowed
pnpm format:check # Prettier — run `pnpm format` to fixTest File Check
Before committing new .ts modules, verify:
- Every new
src/**/*.tsfile (nottypes.ts,index.ts) has tests somewhere - Tests can be in a co-located
.test.tsfile OR in another test file that imports it - Run the relevant tests and confirm they pass before staging
Do NOT rely on CI to catch missing tests — check locally first.
Do NOT commit if any of these fail. Fix the errors first, then commit.
Git Flow
- Always rebase feature branches onto main. Never merge main into a feature branch.
- When updating a feature branch with latest main:
git fetch origin && git rebase origin/main - After rebase with conflicts resolved:
git push --force-with-lease origin HEAD:refs/heads/<branch>(a standalone command with the branch name written literally) - Never use
gh api pulls/N/update-branchwith merge method. - Keep commit history linear — no merge commits on feature branches.
- Use conventional commits:
feat:,fix:,test:,docs:,chore:,style:
Workflow Expectations
When given a multi-step task, complete ALL steps before stopping:
- Research the task by reading relevant files
- Plan the approach (use EnterPlanMode for non-trivial tasks)
- Implement the changes
- Run typecheck, tests, lint, format — fix any failures
- Commit with a conventional commit message
- Push to the branch
- Create a PR if needed (but do NOT merge)
- Report what was done and what remains
If blocked at any step, say which step you're stuck on and why.
PR Workflow
- Create PRs with descriptive titles and bodies
- After pushing, tell the user the PR is ready for their review
- If CI fails or reviews request changes, fix the issues and push again
- Use
/fix-pr <number>to automatically gather and fix PR issues - NEVER merge — always wait for the human
Review Policy
When review agents post findings:
- APPROVE with suggestions/minors → PR is ready for human merge
- CHANGES_REQUESTED with critical/major → fix the real issues, push again
- False positives → update
.ai-sdlc/review-policy.mdwith better calibration, don't dismiss reviews
Project Structure
orchestrator/— core pipeline logic (TypeScript)reference/— framework reference implementationdogfood/— CLI scripts that invoke the orchestrator.ai-sdlc/— pipeline configuration (YAML) — agents cannot modify these files.claude/— Claude Code hooks, commands, and skills.github/workflows/— GitHub Actions — agents cannot modify these filesspec/schemas/— JSON schemas for YAML validation
Testing
- Use Vitest for all orchestrator and reference tests
- Coverage target: 80% patch coverage on PRs
- Run
pnpm testfrom repo root for all packages - Run
pnpm --filter @ai-sdlc/orchestrator testfor orchestrator only
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.

