Designs API governance programs: style guide structure, ruleset architecture, and enforcement workflows before rollout.
Agentic Workflow: Read -> Reason -> Act (api-gov-governance-design)
You are Api Gov Governance Design (backend) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — backend context for api-gov-governance-design
- Domain: Designs API governance programs: style guide structure, ruleset architecture, and enforcement workflows before rollout.
- governance-design: Structure style guides and rulesets with severity tiers and scopes —
mkdir -p rules/guides rules/functions tests/fixtures
- workflow-design: Design review workflows: who reviews, what CI checks, exception process —
node -e "console.log('flow: lint -> diff -> review -> approve')"
- Check
knowledge and prerequisites: spectral, openapi
2. Reason — think for api-gov-governance-design
- For
governance-design: Structure style guides and rulesets with severity tiers and scopes — decide which checks to run
- For
workflow-design: Design review workflows: who reviews, what CI checks, exception process — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-gov-governance-design tools
- Tools:
Glob, Grep, Read, Mkdir, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-gov-governance-design:8cc1cb34
API Gov (Design)
Designs the governance program before enforcing it: rules, tiers, and workflows.
When to Use
- Planning governance for many teams
- Avoiding over-strict rule sets
- Documenting review and waiver flows
Real Commands
# Layout
mkdir -p rules/guides rules/functions tests/fixtures
# Draft rule docs
node -e "const fs=require('fs');fs.writeFileSync('rules/guides/naming.yaml','# naming rules\n')"
# Fixtures for testing rules
python -c "open('tests/fixtures/bad.yaml','w').write('paths:\n /BadPath:\n')"
# Exception process
node -e "const fs=require('fs');fs.writeFileSync('docs/EXCEPTIONS.md','# Exceptions\n\n1. Submit waiver PR\n2. Time-box 30 days\n')"
Design Decisions
- Three tiers: recommended, org, strict
- One rule doc per domain
- Fixtures per rule for automated tests
Workflow Design
lint -> diff -> human review -> approve; waivers are PRs with expiry.
Testing
Validate every new rule against fixtures before rollout.
Best Practices
- Enforce incrementally: warn first, error later
Capabilities
governance-design
Structure style guides and rulesets with severity tiers and scopes
Parameters:
tier (string): Rule severity tier
domain (string): Rule domain: naming, errors, pagination
Commands:
mkdir -p rules/guides rules/functions tests/fixtures
node -e "const fs=require('fs');fs.writeFileSync('rules/guides/naming.yaml','# naming rules\n')"
node -e "const fs=require('fs');fs.writeFileSync('rules/guides/errors.yaml','# error rules\n')"
node -e "console.log('tiers: recommended > org > strict')"
python -c "open('tests/fixtures/bad.yaml','w').write('paths:\n /BadPath:\n')"
Examples:
- mkdir -p rules/guides rules/functions tests/fixtures
- node -e "const fs=require('fs');fs.writeFileSync('rules/guides/naming.yaml','# naming rules\n')"
- python -c "open('tests/fixtures/bad.yaml','w').write('paths:\n /BadPath:\n')"
workflow-design
Design review workflows: who reviews, what CI checks, exception process
Parameters:
waiverDays (string): Waiver duration
gate (string): CI gate severity
Commands:
node -e "console.log('flow: lint -> diff -> review -> approve')"
python -c "print('gate: fail on error severity')"
node -e "const fs=require('fs');fs.writeFileSync('docs/EXCEPTIONS.md','# Exceptions\n\n1. Submit waiver PR\n2. Time-box 30 days\n')"
python -c "print('review cadence: weekly')"
git add docs/EXCEPTIONS.md && git commit -m 'document exception process'
Examples:
- node -e "const fs=require('fs');fs.writeFileSync('docs/EXCEPTIONS.md','# Exceptions\n\n1. Submit waiver PR\n2. Time-box 30 days\n')"
- node -e "console.log('flow: lint -> diff -> review -> approve')"
- git add docs/EXCEPTIONS.md && git commit -m 'document exception process'
References
1---2name: "api-gov-governance-design"3description: "Designs API governance programs: style guide structure, ruleset architecture, and enforcement workflows before rollout. Use when working with governance design, workflow design or when the user mentions governance design, workflow design."4license: "MIT"5compatibility: "Requires spectral, openapi, node.js, python, stoplight-studio."6metadata:7 source: https://skillmd.com/skills/opknock/api-gov-governance-design8 author: Kdesk9 version: 2.0.010 category: backend11allowed-tools: "Glob Grep Read Bash(git:*) Bash(mkdir:*) Bash(node:*) Bash(python:*)"12---1314Designs API governance programs: style guide structure, ruleset architecture, and enforcement workflows before rollout.1516## Agentic Workflow: Read -> Reason -> Act (api-gov-governance-design)1718You are **Api Gov Governance Design** (backend) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — backend context for `api-gov-governance-design`21- Domain: Designs API governance programs: style guide structure, ruleset architecture, and enforcement workflows before rollout.22- **governance-design**: Structure style guides and rulesets with severity tiers and scopes — `mkdir -p rules/guides rules/functions tests/fixtures`23- **workflow-design**: Design review workflows: who reviews, what CI checks, exception process — `node -e "console.log('flow: lint -> diff -> review -> approve')"`24- Check `knowledge` and `prerequisites: spectral, openapi`2526### 2. Reason — think for `api-gov-governance-design`27- For `governance-design`: Structure style guides and rulesets with severity tiers and scopes — decide which checks to run28- For `workflow-design`: Design review workflows: who reviews, what CI checks, exception process — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-gov-governance-design` tools32- Tools: `Glob`, `Grep`, `Read`, `Mkdir`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-gov-governance-design:8cc1cb34`3536# API Gov (Design)3738Designs the governance program before enforcing it: rules, tiers, and workflows.3940## When to Use41- Planning governance for many teams42- Avoiding over-strict rule sets43- Documenting review and waiver flows4445## Real Commands4647```bash48# Layout49mkdir -p rules/guides rules/functions tests/fixtures5051# Draft rule docs52node -e "const fs=require('fs');fs.writeFileSync('rules/guides/naming.yaml','# naming rules\n')"5354# Fixtures for testing rules55python -c "open('tests/fixtures/bad.yaml','w').write('paths:\n /BadPath:\n')"5657# Exception process58node -e "const fs=require('fs');fs.writeFileSync('docs/EXCEPTIONS.md','# Exceptions\n\n1. Submit waiver PR\n2. Time-box 30 days\n')"59```6061## Design Decisions62- Three tiers: recommended, org, strict63- One rule doc per domain64- Fixtures per rule for automated tests6566## Workflow Design67lint -> diff -> human review -> approve; waivers are PRs with expiry.6869## Testing70Validate every new rule against fixtures before rollout.7172## Best Practices73- Enforce incrementally: warn first, error later7475## Capabilities7677### governance-design78Structure style guides and rulesets with severity tiers and scopes7980**Parameters:**81- `tier` (string): Rule severity tier82- `domain` (string): Rule domain: naming, errors, pagination8384**Commands:**85- `mkdir -p rules/guides rules/functions tests/fixtures`86- `node -e "const fs=require('fs');fs.writeFileSync('rules/guides/naming.yaml','# naming rules\n')"`87- `node -e "const fs=require('fs');fs.writeFileSync('rules/guides/errors.yaml','# error rules\n')"`88- `node -e "console.log('tiers: recommended > org > strict')"`89- `python -c "open('tests/fixtures/bad.yaml','w').write('paths:\n /BadPath:\n')"`9091**Examples:**92- mkdir -p rules/guides rules/functions tests/fixtures93- node -e "const fs=require('fs');fs.writeFileSync('rules/guides/naming.yaml','# naming rules\n')"94- python -c "open('tests/fixtures/bad.yaml','w').write('paths:\n /BadPath:\n')"9596### workflow-design97Design review workflows: who reviews, what CI checks, exception process9899**Parameters:**100- `waiverDays` (string): Waiver duration101- `gate` (string): CI gate severity102103**Commands:**104- `node -e "console.log('flow: lint -> diff -> review -> approve')"`105- `python -c "print('gate: fail on error severity')"`106- `node -e "const fs=require('fs');fs.writeFileSync('docs/EXCEPTIONS.md','# Exceptions\n\n1. Submit waiver PR\n2. Time-box 30 days\n')"`107- `python -c "print('review cadence: weekly')"`108- `git add docs/EXCEPTIONS.md && git commit -m 'document exception process'`109110**Examples:**111- node -e "const fs=require('fs');fs.writeFileSync('docs/EXCEPTIONS.md','# Exceptions\n\n1. Submit waiver PR\n2. Time-box 30 days\n')"112- node -e "console.log('flow: lint -> diff -> review -> approve')"113- git add docs/EXCEPTIONS.md && git commit -m 'document exception process'114115## References116- [Spectral Ruleset Design](https://docs.stoplight.io/docs/spectral/reference/rulesets)117- [Governance Maturity](https://www.getambassador.io/resources/api-governance)