ai-work-governance
БесплатноБез исполняемых скриптовНе проверенUse when designing AI agents that autonomously create work items (GitHub issues, tasks, PRs) without per-item human review. Covers strategic alignment gates…
от majesticlabs-dev★ 50 звёзд на GitHubОб этом скилле
AI Work Governance
Patterns for AI agents that file work items autonomously. Without these gates, agents create busy work that doesn't compound product value, flood queues, and leak sensitive data into issue trackers.
Design Principle
Governance lives in output schema and machine-enforced ceilings, not in process checklists. Human review gates erode within weeks without active discipline; machine gates run forever. Order of reliability: config-enforced ceilings > regex scans > schema field presence > agent self-checks > human review files > human per-item review. Design your system so it degrades gracefully to machine-only enforcement — the human layer is augmentation, not the critical path.
Budget Cap (Most Durable Gate)
A hard config-enforced ceiling is the single most important control. Even a fully unsupervised agent cannot cause catastrophic queue flooding if the cap holds.
Configuration
# In .agents.yml or equivalent config
ai_work_governance:
max_items_per_repo_per_cycle: 5 # hard ceiling per run — defend this number
reapproval_threshold: 3 # soft gate (see Human Approval section)
Enforcement
CYCLE_COUNT = count items filed this cycle for target_repo
If CYCLE_COUNT >= max_items_per_repo_per_cycle:
STOP — log: "Budget exhausted for {repo} this cycle ({CYCLE_COUNT}/{max})"
Do NOT file more items until next cycle
Defend the number. A cap of 5 means even a runaway agent creates at most 5 noise items per cycle — recoverable. A cap of 9999 is no cap. If you find yourself raising the ceiling to keep the agent productive, the agent prompt is wrong, not the cap.
Output Schema Gate (Field Presence)
Make alignment fields part of the agent's output format, not a post-generation check. If the agent can't populate the fields from its seeded context, it produces nothing — the gate is a constraint on generation, not a validation after the fact.
Required Output Schema
title: string
strategic_goal: string # agent must derive from approved context
capability: string # reusable capability, not one-off feature
measurable_outcome: string # specific metric, behavior, or artifact
sensitive_data_present: bool # explicit declaration
within_budget: bool # agent self-checks against config
Filing Logic
If any of [strategic_goal, capability, measurable_outcome] is empty:
REJECT — the agent had no context to work from
Log and skip, do not retry
If sensitive_data_present == true AND body still contains raw identifiers:
REJECT — scrub step failed
Why presence, not quality: Quality checks on field content require judgment the validator doesn't have. Presence checks are binary and reliable. Quality comes from the agent being seeded with good context — not from downstream validation.
Sensitive Data Scrub (Machine-Enforced)
Scan issue title, body, and frontmatter before filing. Regex runs automatically, no human needed.
Detection Patterns
SENSITIVE_PATTERNS = [
/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}\b/i, # email addresses
/\b\d{3}-\d{2}-\d{4}\b/, # SSN
/\b4[0-9]{12}(?:[0-9]{3})?\b/, # Visa card
/\b(?:password|secret|token|api_key)\s*[:=]\s*\S+/i, # credentials
/postgres:\/\/[^@]+@/, # DB connection strings
/-----BEGIN .* KEY-----/, # private keys
]
COMPANY_NAME_PATTERNS = [
# Populate from your customer list — any real company/person name in evidence
]
For each PATTERN in SENSITIVE_PATTERNS + COMPANY_NAME_PATTERNS:
If PATTERN matches item.title or item.body:
SCRUB — replace match with [REDACTED] or generalize
Log: "Sensitive data scrubbed: {pattern_type}"
Handling Customer Evidence
When an agent uses a customer conversation, support ticket, or production log as evidence:
- Generalize — rewrite the scenario as a product capability gap, not a client story
- Strip identifiers — no company names, user IDs, email addresses, or account numbers
- Verify — after scrubbing, confirm the issue still makes sense without the identifiers
EVIDENCE_SECTION = extract_evidence_from_body(item)
If EVIDENCE_SECTION contains client identifiers:
REWRITE as: "A user reported that [generalized scenario]..."
Do NOT include: "Acme Corp said that...", "[email protected] complained..."
Audit Ledger (Machine-Written)
Append one record per agent run to an immutable log. The machine writes it; humans may or may not read it, but the record survives either way.
Schema
{"ts": "ISO8601", "agent": "string", "repo": "string", "action": "filed|skipped|rejected", "item_id": "string|null", "reason": "string", "strategic_goal": "string"}
Write Pattern
RECORD = {
ts: NOW(),
agent: AGENT_NAME,
repo: TARGET_REPO,
action: "filed" | "skipped" | "rejected",
item_id
Установить ai-work-governance в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ai-work-governance?
Use when designing AI agents that autonomously create work items (GitHub issues, tasks, PRs) without per-item human review. Covers strategic alignment gates, sensitive data scrubbing, budget guardrails, and approval gate design. Not for manual issue creation or single-session task tracking — use backlog-manager or task-coordinator instead.
Как установить скилл ai-work-governance?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ai-work-governance запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic