agentleFS
pitimonpitimon/claude-governance/skills/governance-setup/SKILL.md

governance-setup

Skill4 starsChanged 6 months agoMITView on GitHub

Initialize governance framework in the current project. Use when: setting up a new project with governance, adding governance to an existing project, or when the user asks to "set up governance", "initialize governance", or "add governance". Creates DOMAIN.md, docs/adr/, and optionally installs rules to ~/.claude/rules/.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. chrbailey/promptspeak-mcp-server★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use /governance-setup when setting up a new project or adding governance to an existing one.

    line 18
  2. Very specific:

    Not needed if the project already has DOMAIN.md and docs/adr/.

    line 20
  3. Distinctive:

    Check if governance artifacts already exist:

    line 24
  4. Very specific:

    If DOMAIN.md doesn't exist, ask the user: "What is this project about?

    line 36
  5. Very specific:

    Create docs/adr/ if it doesn't exist.

    line 48
  6. Very specific:

    Create docs/adr/ADR-001-adopt-governance-framework.md as the first ADR documenting the decision to adopt governance.

    line 54
  7. Distinctive:

    Ask the user: "Would you like to create a DATA-CLASSIFICATION.md for tracking data sensitivity levels?

    line 58
  8. Very specific:

    If yes, copy from ${CLAUDE_PLUGIN_ROOT}/examples/DATA-CLASSIFICATION.md.example and customize:

    line 60
  9. Distinctive:

    Ask about data elements the project handles

    line 62
  10. Distinctive:

    Document AI/LLM data flows if applicable

    line 64
  11. Distinctive:

    Ask: "Does your team use multiple AI tools?

    line 70
  12. Very specific:

    Ask the user: "Would you like to install governance rules to ~/.claude/rules/?

    line 82
  13. Very specific:

    If they choose to install, copy from the plugin's examples/rules/ directory:

    line 90
  14. Distinctive:

    Ask if they want to add a governance section to their project's CLAUDE.md.

    line 98

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

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

Governance Setup

Initialize the governance framework in the current project. Guide the user through each step with confirmations.

Scope and When to Use

Use /governance-setup when setting up a new project or adding governance to an existing one. This is a one-time initialization — it creates DOMAIN.md, the ADR directory, and optionally installs rules.

Not needed if the project already has DOMAIN.md and docs/adr/. For ongoing checks, use /governance-check or the governance-reviewer agent.

Prerequisites

Check if governance artifacts already exist:

  • DOMAIN.md in project root
  • docs/adr/ directory
  • ~/.claude/rules/governance.md

Report what exists and what will be created.

Workflow

1. Create DOMAIN.md

If DOMAIN.md doesn't exist, ask the user: "What is this project about? Briefly describe the main entities/domain objects."

Then generate a DOMAIN.md using the template from the plugin's examples/DOMAIN.md.example, customized with the user's entities. Include:

  • Core entities with fields, types, constraints
  • Invariants for each entity
  • API contract rules (if applicable)
  • Data standards

2. Set Up ADR Directory

Create docs/adr/ if it doesn't exist. Copy the ADR template:

mkdir -p docs/adr

Create docs/adr/ADR-001-adopt-governance-framework.md as the first ADR documenting the decision to adopt governance.

3. Create Data Classification (Optional)

Ask the user: "Would you like to create a DATA-CLASSIFICATION.md for tracking data sensitivity levels? (Recommended for projects handling PII or credentials)"

If yes, copy from ${CLAUDE_PLUGIN_ROOT}/examples/DATA-CLASSIFICATION.md.example and customize:

  • Ask about data elements the project handles
  • Set appropriate classification levels (Public/Internal/Confidential/Restricted)
  • Document AI/LLM data flows if applicable

Reference: OWASP DSGAI07.

3.5. Create Shadow AI Policy (Optional)

Ask: "Does your team use multiple AI tools? Would you like to document an approved AI tools policy?"

If yes, copy from ${CLAUDE_PLUGIN_ROOT}/examples/shadow-ai-policy.md and customize:

  • List approved AI tools and their data access levels
  • Define prohibited patterns (unsanctioned tools)
  • Set review cadence

Reference: OWASP DSGAI03.

4. Install Rules (Optional)

Ask the user: "Would you like to install governance rules to ~/.claude/rules/? This enables fitness function checks across all your projects."

Options:

  • "Yes — install all 5 rules (governance, coding-style, git-workflow, testing, security)"
  • "Just governance rule"
  • "Skip — I'll manage rules myself"

If they choose to install, copy from the plugin's examples/rules/ directory:

cp ${CLAUDE_PLUGIN_ROOT}/examples/rules/*.md ~/.claude/rules/

5. Update CLAUDE.md (Optional)

Ask if they want to add a governance section to their project's CLAUDE.md. If yes, add:

## Decision Autonomy (Three Loops Model)

### Out-of-Loop (AI executes autonomously)

- Code formatting, linting fixes
- Import organization, unused variable removal
- Simple bug fixes with clear root cause

### On-the-Loop (AI proposes, human approves)

- New feature implementation (use Plan Mode)
- API endpoint changes
- Refactoring > 3 files

### In-the-Loop (Human decides, AI assists)

- Architecture decisions
- Security model changes
- Breaking changes

6. Summary

Print a summary of what was created:

Governance initialized:
- DOMAIN.md — domain model (edit to match your entities)
- docs/adr/ — architecture decision records
- docs/adr/ADR-001 — governance adoption record
- DATA-CLASSIFICATION.md — data sensitivity inventory (if created)
- ~/.claude/rules/ — fitness function rules (if installed)

Next steps:
1. Edit DOMAIN.md to define your actual entities
2. Review DATA-CLASSIFICATION.md for data handling compliance
3. Run /governance-check to verify your project
4. Use /spec-driven-dev for new features
5. Use /create-adr to record decisions

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.