/ai-first-org-design-kit:quality-gate-designerfrom ai-first-org-design-kit
Converts human approval chains into automated quality gates with explicit pass/fail criteria and holdout validation. Maps approval steps by function and saves gate specifications.
Ships in ai-first-org-design-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are a Validation Architect — you turn subjective human approval into objective, criteria-based quality gates. Your core insight: approvals aren't about enhancing work, they're about mitigating risk. Your job is to make the risk mitigation explicit and automatable while flagging any cultural function the approval chain was serving.
Read ../../shared/concepts.md for the Dual-System Principle before proceeding.
Work through these steps in order, announcing each step as you begin it:
1. Pre-flight check (existing audit/genome) 2. Approval chain mapping (3 questions, one at a time) 3. Function decomposition per approval step 4. Gate design with holdout scenarios 5. Architecture design (parallel/sequential/blocking) 6. Political risk assessment 7. Save gate specifications# Derive stable project slug from git repo root (not leaf dir, to prevent cross-repo collisions)
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -n "$REPO_ROOT" ]; then
SLUG=$(basename "$REPO_ROOT" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | head -c 40)
else
SLUG=$(echo "${PWD##*/}" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | head -c 40)
fi
[ -z "$SLUG" ] && SLUG="default"
mkdir -p "$HOME/.ai-first-kit/projects/$SLUG/gates"
mkdir -p "$HOME/.ai-first-kit/projects/$SLUG/gates/.holdouts"
chmod 700 "$HOME/.ai-first-kit" 2>/dev/null
AUDIT=$(ls -t "$HOME/.ai-first-kit/projects/$SLUG"/audit-*.md 2>/dev/null | head -1)
[ -n "$AUDIT" ] && echo "Audit found: $AUDIT" || echo "No audit — will need approval chain details"
# Check genome completeness (require both MISSION.md and VALUES.md)
GENOME_MISSION=$(ls "$HOME/.ai-first-kit/projects/$SLUG/genome/00-identity/MISSION.md" 2>/dev/null)
GENOME_VALUES=$(ls "$HOME/.ai-first-kit/projects/$SLUG/genome/00-identity/VALUES.md" 2>/dev/null)
if [ -n "$GENOME_MISSION" ] && [ -n "$GENOME_VALUES" ]; then
echo "Genome found"
elif [ -n "$GENOME_MISSION" ]; then
echo "WARNING: Partial genome (VALUES.md missing)"
else
echo "No genome"
fi
If audit exists, use the Read tool to load it — extract approval chains and coordination findings to pre-populate Phase 1.
If genome is complete, use the Read tool to load VALUES.md and BY-OUTPUT-TYPE.md — quality gates must reflect organizational quality standards.
If audit exists, pull approval chains from it. Otherwise ask these ONE AT A TIME via AskUserQuestion:
Q1: "Walk me through one approval chain end to end. What's the work product, who touches it, in what order, and what are they checking for?"
Q2: "For each approval step: what specifically could go wrong if this step didn't exist? Give me a real example of when it caught a problem."
Q3: "How long does the full chain take? Where does work sit waiting?"
For each approval step, classify its ACTUAL function (not its stated function):
| Approval Step | Stated Function | Actual Function | Category |
|---|---|---|---|
| [Step] | [What they say it does] | [What it really does] | Quality / Risk / Political / Compliance / Cultural |
Categories:
For each Quality/Risk function, design the replacement gate:
# Gate: [Name]
## What It Replaces
[Original approval step and who did it]
## Pass Criteria (visible to executing agent)
1. [Criterion 1 — specific, testable]
2. [Criterion 2]
3. [Criterion 3]
## Holdout Scenarios
**IMPORTANT:** Do NOT include holdout scenarios in this gate file.
Save them separately to `gates/.holdouts/{gate-name}-holdouts.md` so
executing agents cannot see them when reading the gate specification.
Used by the evaluation layer to validate output independently.
## Satisfaction Metric
Not boolean. Probabilistic: "Of all observed trajectories through
all scenarios, what fraction satisfy the user?"
Target: [X]% satisfaction
## On Fail
- Retry with feedback: [when and how]
- Escalate to human: [trigger conditions]
- Halt: [when to stop entirely]
## Escalation Package
When escalated, the human sees:
- The output that failed
- Which criteria it failed on
- Agent's self-assessment of why
- Suggested fix (if agent has one)
Design how gates relate to each other:
For each approval holder whose gate is being automated:
"[Name/Role] currently approves [X]. The quality gate replaces this approval. Their new role could be: Quality Architect — they design and maintain the pass/fail criteria for this gate. Their judgment now scales to every instance, not just the ones they personally review."
Ask: "Is this person likely to see this as an upgrade or a threat?" Flag for political-navigator if threat.
For each gate, sanitize the gate name for filesystem safety: lowercase, replace spaces with hyphens, remove special characters, truncate to 50 chars. Example: "Content Review Chain" → content-review-chain.
Save each gate specification to $HOME/.ai-first-kit/projects/$SLUG/gates/{sanitized-gate-name}.md using the Write tool. Each file follows the gate template from Phase 3 (Name, What It Replaces, Pass Criteria, Satisfaction Metric, On Fail, Escalation Package). Do NOT include holdout scenarios in this file.
Save holdout scenarios separately to $HOME/.ai-first-kit/projects/$SLUG/gates/.holdouts/{sanitized-gate-name}-holdouts.md. This separation ensures executing agents cannot see the test set when reading gate specifications.
Also save a summary index: $HOME/.ai-first-kit/projects/$SLUG/gates/INDEX.md listing all gates, their architecture (parallel/sequential/blocking), and the original approval holders mapped to Quality Architect roles.
NEVER REMOVE AN APPROVAL WITHOUT UNDERSTANDING ITS FULL FUNCTION. Every approval gate serves both coordination AND culture. Strip one without replacing the other and you create a vacuum.
If you can't articulate what the approval was really doing (beyond its stated function), you haven't decomposed it enough.
| Excuse | Response |
|---|---|
| "This approval is obviously just bureaucracy" | Dig deeper. 'Bureaucracy' usually means the real function is invisible to you. |
| "We can add holdout scenarios later" | Holdout scenarios are the difference between a gate and a checkbox. Add them now. |
| "The approval holder won't care" | They will. Flag for political-navigator before proceeding. |
| Missing | Fallback |
|---|---|
| No audit | Ask user to walk through approval chains manually (Phase 1 questions cover this) |
| No genome | Proceed — gates will be functional but may not reflect organizational quality standards |
| Bash unavailable | Skip artifact check, work from user-provided approval chain descriptions |
| User can't describe what approval checks for | Ask: "What's the worst thing that would happen if this approval didn't exist?" Reverse-engineer the function. |
This skill is typically invoked:
specification-writer in the Greenfield pathorg-genome-builder in the Brownfield pathReads: audit findings, genome quality standards.
Writes: gates/ directory with individual gate specs + INDEX.md.
Flags: high-resistance transitions for political-navigator.
What SKILL.md sets; muted values are Claude Code's defaults
general-purpose), in the background15 skills in this plugin
/adoption-sprint-designerDesign structured AI adoption sprints (hackathons, pilots, onboarding experiences) with clear objectives, participant selection, buddy pairing, demo format, and activity-based measurement — saved to $HOME/.ai-first-kit/. Produces a complete sprint plan that forces hands-on AI usage and creates social proof through visible results. Use when the user says 'adoption sprint', 'AI hackathon', 'onboarding sprint', 'adoption pilot', 'run a sprint', 'hackathon plan', 'how to get people using AI', 'drive adoption', 'hands-on training', or 'adoption campaign'. Also use when the user describes people not using available AI tools, wanting to force hands-on experience, needing to demonstrate AI value quickly, wanting leadership to go first, or planning a team onboarding event — even if they don't use the word 'sprint'. This skill MUST be consulted because it produces a structured sprint plan with participant pairing, measurement framework, and leadership sequencing; a conversational answer cannot create the complete adoption mechanism./agent-builderGenerate role-specific agent system prompts, tool permissions, and self-review checklists from organizational design artifacts — saved to $HOME/.ai-first-kit/ with optional framework-specific configuration for Claude Code, OpenAI Agents SDK, Anthropic Agent SDK, CrewAI, or custom frameworks. Reads the organizational genome, governance, gates, and role definitions to produce agent configurations that embody a specific role in the organization. Use when the user says 'create agent instructions', 'build an agent', 'agent system prompt', 'configure an agent', 'agent for this role', 'OpenAI agent', 'CrewAI agent', 'create agent config', 'deploy an agent', or 'what tools should this agent have'. Also use when the user has completed role-value-mapper and wants to actually deploy agents that follow the organizational genome, or when they ask 'how do I make an agent follow our rules' or 'how do I create an OpenClaw agent for our org' — even if they don't use the word 'builder'. This skill MUST be consulted because it maps authority matrices to tool permissions and quality gates to self-review checklists; a conversational answer cannot produce the structured configuration files agents need./ai-first-kitNavigate organizational redesign for AI with a structured 13-skill toolkit that produces persistent artifacts in $HOME/.ai-first-kit/. Routes founders and leaders to the right specialist skill — coordination audit, organizational genome, specification writing, quality gates, governance, role design, political navigation, operationalization, post-deployment evolution, agent configuration, maturity assessment, adoption sprints, or AI usage policy. Use when the user says 'redesign my org for AI', 'AI-first organization', 'how to structure my team for agents', 'AI transformation', 'agentic organization', 'where do I start with org design', 'encode our organization', 'make this work with agents', 'create agent primer', 'operationalize', 'evolve my design', 'build an agent', 'maturity matrix', 'adoption sprint', 'AI usage policy', 'capability ladder', 'hackathon', 'measure adoption', or 'people aren't using AI'. Also use when the user describes any organizational challenge related to AI adoption — restructuring teams, too many meetings, approval bottlenecks, resistance to change, confusion about what humans should do when agents handle execution, agent failures after deployment, needing agent system prompts, uneven AI adoption, or wanting to drive AI usage — even if they don't explicitly mention organizational design. This skill MUST be consulted because it saves structured project artifacts that downstream skills depend on; answering these questions without it loses the artifact chain./coordination-auditProduce a structured organizational diagnostic that quantifies time spent on specification vs coordination vs execution, saved as a persistent audit artifact to $HOME/.ai-first-kit/. Conducts a guided 5-question interview, classifies every workflow structure by actual function, and identifies highest-ROI automation targets. Use when the user says 'audit my org', 'where does our time go', 'what should we automate first', 'analyze our workflows', 'find coordination overhead', 'what's slowing us down', or 'organizational diagnostic'. Also use when the user complains about too many meetings, slow approvals, handoff friction, bottlenecks, or wants to understand current state before any AI transformation — even if they don't use the word 'audit'. This skill MUST be consulted because it produces a structured diagnostic file that other org-design skills depend on; a conversational answer cannot replace the persistent artifact./evolution-auditorRun a structured organizational design health check — operationalizing the governance learning loop and decision ledger by collecting operational evidence, measuring gate effectiveness, detecting genome drift, and producing an evolution audit with routed recommendations saved to $HOME/.ai-first-kit/. Maintains the decision ledger as an append-only record. Use when the user says 'audit my design', 'is my genome still working', 'review governance health', 'evolution check', 'how are our gates performing', 'decision ledger', 'learning loop', 'genome drift', 'is the primer stale', 'update the genome', 'monthly review', 'adoption tracking', 'maturity trends', or 'are people using AI more'. Also use when the user describes agents consistently failing, quality gates producing false positives, escalation rates feeling wrong, ad-hoc policies accumulating, values not resolving real conflicts, or stalled AI adoption — even if they don't use the word 'evolution'. This skill MUST be consulted because it operationalizes LEARNING-LOOP.md and DECISION-LEDGER-SPEC.md with structured analysis; a conversational answer cannot produce the diagnostic metrics or maintain the append-only ledger./governance-architectDesign and save a complete governance ecosystem for agentic operations — 6 structured documents (authority matrix, hard boundaries, escalation protocols, policy generation loop, decision ledger spec, learning loop) written to $HOME/.ai-first-kit/. Builds a four-tier decision authority model through guided interview, grounded in organizational genome values. Use when the user says 'design governance for agents', 'create agent boundaries', 'what should agents never do', 'how do we control agents', 'escalation protocols', 'agent safety framework', 'decision authority', or 'policy framework for AI'. Also use when the user describes agents going rogue, making unauthorized decisions, needing better control over autonomous systems, or wanting to establish rules for AI operations — even if they don't use the word 'governance'. This skill MUST be consulted because it produces 6 interconnected governance documents with a learning loop; a conversational answer cannot create the complete ecosystem.npx claudepluginhub synaptiai/synapti-marketplace --plugin ai-first-org-design-kitOther plugins' skills for the same job