agentleFS
ai-sdlc-frameworkai-sdlc-framework/ai-sdlc/.claude/skills/ai-sdlc-governance/SKILL.md

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

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
  1. Very specific:

    NEVER merge any pull request: Do not run gh pr merge, git merge into main, or any merge operation.

    line 11
  2. Very specific:

    NEVER close issues or PRs: Do not run gh pr close or gh issue close.

    line 13
  3. Distinctive:

    NEVER force push: Do not run git push --force or git push -f.

    line 14
  4. Distinctive:

    NEVER delete branches: Do not run git branch -D or git branch -d.

    line 15
  5. Distinctive:

    Before EVERY commit, run these checks and fix any failures:

    line 22
  6. Very specific:

    Before committing new .ts modules, verify:

    line 32
  7. Very specific:

    Every new src//*.ts file (not types.ts, index.ts) has tests somewhere

    line 33
  8. Distinctive:

    Run the relevant tests and confirm they pass before staging

    line 35
  9. Distinctive:

    Do NOT rely on CI to catch missing tests — check locally first.

    line 37
  10. Distinctive:

    Do NOT commit if any of these fail.

    line 39
  11. Very specific:

    When updating a feature branch with latest main: git fetch origin && git rebase origin/main

    line 44
  12. Very specific:

    After rebase with conflicts resolved: git push --force-with-lease origin HEAD:refs/heads/<branch> (a standalone command with the branch …

    line 45
  13. Very specific:

    Never use gh api pulls/N/update-branch with merge method.

    line 46
  14. Distinctive:

    Keep commit history linear — no merge commits on feature branches.

    line 47
  15. Very specific:

    Use conventional commits: feat:, fix:, test:, docs:, chore:, style:

    line 48
  16. Distinctive:

    When given a multi-step task, complete ALL steps before stopping:

    line 52
  17. Distinctive:

    Run typecheck, tests, lint, format — fix any failures

    line 57
  18. Distinctive:

    Commit with a conventional commit message

    line 58
  19. Distinctive:

    Create a PR if needed (but do NOT merge)

    line 60
  20. Distinctive:

    If blocked at any step, say which step you're stuck on and why.

    line 63
  21. Distinctive:

    Create PRs with descriptive titles and bodies

    line 67
  22. Distinctive:

    After pushing, tell the user the PR is ready for their review

    line 68
  23. Distinctive:

    If CI fails or reviews request changes, fix the issues and push again

    line 69
  24. Very specific:

    Use /fix-pr <number> to automatically gather and fix PR issues

    line 70
  25. Distinctive:

    NEVER merge — always wait for the human

    line 71
  26. Distinctive:

    When review agents post findings:

    line 75
  27. Distinctive:

    Use Vitest for all orchestrator and reference tests

    line 92
  28. Very specific:

    Run pnpm test from repo root for all packages

    line 94
  29. Very specific:

    Run pnpm --filter @ai-sdlc/orchestrator test for orchestrator only

    line 95

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AI-SDLC Governance Rules

Critical Rules — NEVER violate these

  1. NEVER merge any pull request. Do not run gh pr merge, git merge into main, or any merge operation. Only create or update PRs. The human merges.
  2. 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.md for recurring false positives.
  3. NEVER close issues or PRs. Do not run gh pr close or gh issue close. The human decides what to close.
  4. NEVER force push. Do not run git push --force or git push -f.
  5. NEVER delete branches. Do not run git branch -D or git branch -d.
  6. 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 fix

Test File Check

Before committing new .ts modules, verify:

  • Every new src/**/*.ts file (not types.ts, index.ts) has tests somewhere
  • Tests can be in a co-located .test.ts file 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-branch with 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:

  1. Research the task by reading relevant files
  2. Plan the approach (use EnterPlanMode for non-trivial tasks)
  3. Implement the changes
  4. Run typecheck, tests, lint, format — fix any failures
  5. Commit with a conventional commit message
  6. Push to the branch
  7. Create a PR if needed (but do NOT merge)
  8. 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.md with better calibration, don't dismiss reviews

Project Structure

  • orchestrator/ — core pipeline logic (TypeScript)
  • reference/ — framework reference implementation
  • dogfood/ — 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 files
  • spec/schemas/ — JSON schemas for YAML validation

Testing

  • Use Vitest for all orchestrator and reference tests
  • Coverage target: 80% patch coverage on PRs
  • Run pnpm test from repo root for all packages
  • Run pnpm --filter @ai-sdlc/orchestrator test for orchestrator only

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.