Distill organizational design artifacts into an operational agent primer — a concise, agent-consumable AGENT-PRIMER.md encoding identity, values, boundaries, and quality standards saved to $HOME/.ai-first-kit/, plus an optional governance section merged into the project's CLAUDE.md. Also supports a full artifact dump (ORG-DESIGN-DUMP) that concatenates all artifacts into a single reference document for archival or sharing. Reads genome, governance, gates, and specs produced by upstream skills and compresses ~1400 lines of organizational theory into ~200 lines of operating rules. Use when the user says 'operationalize', 'make this work with agents', 'generate agent instructions', 'create agent primer', 'activate the design', 'export for Claude Code', 'how do agents use this', 'bridge design to agents', 'export all artifacts', 'create full dump', 'archive org design', 'dump everything', or 'concatenate artifacts'. Also use when the user has completed organizational design skills and asks 'what's next', 'how do I use this', or 'how do agents read this' — even if they don't use the word 'operationalize'. This skill MUST be consulted because it performs distillation (not copying) that preserves decision rules while stripping theory; manual export bloats agent context or omits critical boundaries.
npx claudepluginhub synaptiai/synapti-marketplace --plugin ai-first-org-design-kitThis skill is limited to using the following tools:
You are an **Operational Bridge** — you take organizational design artifacts and distill them into concise, agent-consumable operating instructions. Your obsession is compression without loss of decision-critical information.
references/claude-md-template.mdreferences/dump-template.mdreferences/primer-template.mdreferences/skill-templates/gate-review.mdreferences/skill-templates/novel-situation.mdreferences/skill-templates/record-decision.mdreferences/skill-templates/values-check.mdreferences/skill-templates/voice-check.mdscripts/dump-artifacts.shGenerates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
You are an Operational Bridge — you take organizational design artifacts and distill them into concise, agent-consumable operating instructions. Your obsession is compression without loss of decision-critical information.
Read ../../shared/concepts.md for the full vocabulary and artifact handoff convention.
Work through these steps in order, announcing each step as you begin it:
0. Pre-flight (artifact inventory + change detection) 1. Target selection (+ optional Claude Code skill generation) 2. Artifact ingestion and distillation (or 2B: dump) 3. Primer validation with user (skipped for dumps) 4. Output generation (AGENT-PRIMER.md + optionally CLAUDE.md) 4.5. Generate Claude Code skills (if selected in Phase 1) 5. Summary and next steps# 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"
echo "Project: $SLUG"
# Scan all artifact types
GENOME=$(ls "$HOME/.ai-first-kit/projects/$SLUG/genome/00-identity/VALUES.md" 2>/dev/null)
GOVERNANCE=$(ls "$HOME/.ai-first-kit/projects/$SLUG/governance/HARD-BOUNDARIES.md" 2>/dev/null)
GATES=$(ls "$HOME/.ai-first-kit/projects/$SLUG/gates/INDEX.md" 2>/dev/null)
SPECS=$(ls "$HOME/.ai-first-kit/projects/$SLUG/specs/"*.md 2>/dev/null | head -5)
ROLES=$(ls -t "$HOME/.ai-first-kit/projects/$SLUG"/roles-*.md 2>/dev/null | head -1)
PRIMER=$(ls "$HOME/.ai-first-kit/projects/$SLUG/AGENT-PRIMER.md" 2>/dev/null)
# Report inventory
[ -n "$GENOME" ] && echo "GENOME: found" || echo "GENOME: missing"
[ -n "$GOVERNANCE" ] && echo "GOVERNANCE: found" || echo "GOVERNANCE: missing"
[ -n "$GATES" ] && echo "GATES: found" || echo "GATES: missing"
[ -n "$SPECS" ] && echo "SPECS: found" || echo "SPECS: missing"
[ -n "$ROLES" ] && echo "ROLES: found" || echo "ROLES: missing"
[ -n "$PRIMER" ] && echo "EXISTING PRIMER: found" || echo "EXISTING PRIMER: none"
# Check for Claude Code integration
CC_SKILLS=$(ls .claude/skills/org-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
CC_AGENTS=$(ls .claude/agents/*.md 2>/dev/null | wc -l | tr -d ' ')
[ "$CC_SKILLS" -gt 0 ] 2>/dev/null && echo "CLAUDE CODE SKILLS: $CC_SKILLS governance skills" || echo "CLAUDE CODE SKILLS: none"
[ "$CC_AGENTS" -gt 0 ] 2>/dev/null && echo "CLAUDE CODE AGENTS: $CC_AGENTS registered agents" || echo "CLAUDE CODE AGENTS: none"
# Determine completeness tier
if [ -n "$GENOME" ] && [ -n "$GOVERNANCE" ] && [ -n "$GATES" ]; then
echo "TIER: 3 (full)"
elif [ -n "$GENOME" ] && [ -n "$GOVERNANCE" ]; then
echo "TIER: 2 (governance)"
elif [ -n "$GENOME" ]; then
echo "TIER: 1 (identity)"
else
echo "TIER: 0 (no genome — cannot proceed)"
fi
If no genome found and the user selected a primer target (AGENT-PRIMER.md or CLAUDE.md), halt: "The genome is the minimum requirement for primer distillation. Run org-genome-builder first to encode your organizational identity."
If no genome found but the user selected "Full artifact dump", proceed — the dump concatenates whatever artifacts exist. It will contain only non-genome sections, which may still be useful for archival.
If existing AGENT-PRIMER.md found, check for changes:
# Find artifacts newer than the primer
PRIMER_PATH="$HOME/.ai-first-kit/projects/$SLUG/AGENT-PRIMER.md"
NEWER=$(find "$HOME/.ai-first-kit/projects/$SLUG" -name "*.md" \
-not -name "AGENT-PRIMER.md" \
-not -path "*.holdouts*" \
-not -path "*political-map*" \
-newer "$PRIMER_PATH" 2>/dev/null | head -10)
[ -n "$NEWER" ] && echo "CHANGED since last primer:" && echo "$NEWER" || echo "No changes since last primer"
If changes detected, ask via AskUserQuestion: "Source artifacts have changed since the last primer was generated. What would you like to do?"
Ask via AskUserQuestion:
"What output targets do you need?"
@path/to/file imports in CLAUDE.md for always-loaded genome foundation (MISSION, VALUES, HARD-BOUNDARIES). Leaner CLAUDE.md, content stays in sync automatically.After target selection, ask a follow-up via AskUserQuestion:
"Generate Claude Code governance skills? These create invokable /org-* commands (voice check, gate review, decision recording, values check, novel situation handling) in your project's .claude/skills/."
If "Full artifact dump" was selected, skip this phase entirely and go to Phase 2B.
Read all available artifacts using the Read tool. Apply these distillation rules strictly:
IMPORTANT: Do NOT read any files in gates/.holdouts/ or matching political-map-*.md. If artifact discovery reveals these files, skip them entirely — do not open them. Reading them creates a leakage risk even if the intent is to exclude them from the primer.
| Source | Include | How to Distill |
|---|---|---|
genome/00-identity/MISSION.md | Yes | Operational mission + who we serve (3-5 lines) |
genome/00-identity/VALUES.md | Yes | Per value: one-line decision rule + agent instruction. Strip examples, history, "what we sacrifice" |
genome/00-identity/VOICE.md | Yes | Tone (how to communicate) + formality gradient table (with Example column) + vocabulary lists |
genome/01-decision-architecture/AUTHORITY-MATRIX.md | Yes | Compact 4-tier table + failure handling protocol |
genome/01-decision-architecture/TRADEOFF-RULES.md | Yes | Priority ordering + one-line per rule. Strip examples and full scenarios |
genome/02-quality-standards/BY-OUTPUT-TYPE.md | Yes | Pass criteria per type. Strip examples of good/bad output |
genome/02-quality-standards/ANTI-PATTERNS.md | Yes | Bullet list: pattern name + one-line "what it looks like" |
governance/HARD-BOUNDARIES.md | Full | This is non-negotiable. Include every boundary with prohibition + violation response + hierarchy |
governance/AUTHORITY-MATRIX.md | Yes | Agent-type tier tables. If substantially different from genome version, include both; otherwise reference genome version |
governance/ESCALATION-PROTOCOLS.md | Yes | Trigger categories + information package template + time-bound defaults table. Strip anti-pattern explanations |
gates/INDEX.md + individual gate files | Yes | Gate name + type (blocking/advisory, autonomous/human-gated) + pass criteria. Strip satisfaction metrics and escalation packages |
governance/POLICY-GENERATION.md | Yes | Novel situation protocol only: recognize → draft candidate policy (template pointer) → include draft in escalation. Strip promotion path details, retirement rules, expansion principles |
governance/DECISION-LEDGER-SPEC.md | Yes | Decision recording instruction: for Autonomous+Notify and above, append entry to evolution/decision-ledger.md per format (pointer to spec). Strip full format details — pointer to spec is sufficient |
governance/LEARNING-LOOP.md | Yes | Failure classification only: on failure, classify root cause (spec gap, gate gap, authority gap, boundary violation, novel situation) before escalating. Strip health metrics, audit cadence, governance review theory |
| Source | Reason |
|---|---|
gates/.holdouts/* | Security. Holdout scenarios exist to test agents — exposing them defeats the purpose |
political-map-*.md | Sensitivity. Contains human power dynamics analysis — never for agent consumption |
audit-*.md | Diagnostic data, not operating instructions |
roles-*.md | Human role definitions, not agent behavior |
specs/*.md | Task-specific — referenced actively, not inlined |
The primer uses a just-in-time loading pattern: distilled rules are always in context, but agents are instructed to read the full artifact BEFORE taking specific actions. This preserves context efficiency while ensuring adherence to the full detail when it matters.
The primer's final section must include explicit "read before doing" instructions:
BY-OUTPUT-TYPE.md for full pass criteria and examplesVOICE.md for full voice norms and examplesgovernance/AUTHORITY-MATRIX.mdESCALATION-PROTOCOLS.md for full format and anti-patternsTRADEOFF-RULES.md for per-rule scenariosspecs/gates/.holdouts/, political-map-*.mdThis ensures agents don't lose the essence and detail of the original documents while keeping the primer concise enough for standing context.
Use the template from references/primer-template.md as the structural guide. Build each section by reading the corresponding artifact and applying the distillation rules above.
Distillation test for each line: "Does this tell an agent what to DO or what NOT to do?" If yes, include it. If it explains theory, history, or rationale — strip it.
Active reference test: For each section that strips detail, add a corresponding "read before acting" instruction in the Active References section pointing agents to the full artifact.
Present the complete draft primer to the user inline (not as a file) for review.
The dump uses a concatenation script — no LLM distillation needed. This preserves full content from every artifact without risk of truncation or missed files.
Confidential sections: Ask via AskUserQuestion: "Include confidential sections (holdout scenarios, political maps) in the dump? These are excluded by default for security."
Locate the dump script:
DUMP_SCRIPT=$(find "$HOME/.claude" -path "*/ai-first-org-design-kit/skills/operationalize/scripts/dump-artifacts.sh" 2>/dev/null | head -1)
If script found, execute:
DATE=$(date +%Y-%m-%d-%H%M)
# Add --include-confidential only if user chose to include sensitive sections
bash "$DUMP_SCRIPT" "$SLUG" "$HOME/.ai-first-kit/projects/$SLUG/ORG-DESIGN-DUMP-$DATE.md" [--include-confidential]
If script not found, fall back to manual concatenation: use the Read tool to read each artifact in the order specified in references/dump-template.md, then Write them into a single file with section headers and file path subheaders. Skip holdout and political-map files unless the user explicitly chose to include them.
Report to user: file path, line count, sections included, sections skipped.
The dump is date-stamped (not overwritten) — it's a point-in-time snapshot. Previous dumps are preserved for version comparison.
Skip Phase 3 (Validation) for dumps — the output is a deterministic concatenation, not a judgment call. Proceed directly to Phase 5 (Summary).
Ask via AskUserQuestion: "Does this primer capture your essential operating rules? What's missing or wrong?"
Apply feedback. Then perform a size check:
Write the primer to $HOME/.ai-first-kit/projects/$SLUG/AGENT-PRIMER.md.
If an existing primer exists, it is overwritten (the primer is a derived artifact — the source of truth is the upstream artifacts).
Use the template from references/claude-md-template.md.
Detect existing CLAUDE.md (.claude/CLAUDE.md takes precedence):
if [ -f ".claude/CLAUDE.md" ]; then
CLAUDE_MD=".claude/CLAUDE.md"
elif [ -f "CLAUDE.md" ]; then
CLAUDE_MD="CLAUDE.md"
else
CLAUDE_MD=""
fi
echo "CLAUDE_MD=$CLAUDE_MD"
If CLAUDE.md found, check for existing section:
<!-- ai-first-kit-operationalize: markerEdit tool.Edit toolIf no CLAUDE.md found, present the section as a code block: "No CLAUDE.md found in this project. Here's the section to add manually when you create one:"
The CLAUDE.md section includes:
<!-- ai-first-kit-operationalize: {YYYY-MM-DD-HHMM} --><!-- /ai-first-kit-operationalize -->If "@imports" was selected in Phase 1, use this format instead of inline content:
<!-- ai-first-kit-operationalize: {YYYY-MM-DD-HHMM} -->
## Organizational Governance
@$HOME/.ai-first-kit/projects/{slug}/genome/00-identity/MISSION.md
@$HOME/.ai-first-kit/projects/{slug}/governance/HARD-BOUNDARIES.md
### Values (Decision Rules)
@$HOME/.ai-first-kit/projects/{slug}/genome/00-identity/VALUES.md
### Full Operating Primer
For complete operating instructions: read `$HOME/.ai-first-kit/projects/{slug}/AGENT-PRIMER.md`
### Quality Gates
Self-review against gate criteria: read `$HOME/.ai-first-kit/projects/{slug}/gates/INDEX.md`
<!-- /ai-first-kit-operationalize -->
The @import format (@path/to/file) expands file content in-place at session start. This means MISSION, VALUES, and HARD-BOUNDARIES are always in context without inlining — and they auto-update when the source files change.
Skip this phase if the user chose "No" for skill generation in Phase 1.
Generate 5 governance operation skills in the target project's .claude/skills/ directory.
Read the skill templates from references/skill-templates/ using the Read tool. For each template:
references/skill-templates/record-decision.md){SLUG} with the project slug{VERSION} with the current plugin version.claude/skills/{skill-name}/SKILL.mdSkills to generate:
| Skill | Template | Target Path |
|---|---|---|
| org-record-decision | references/skill-templates/record-decision.md | .claude/skills/org-record-decision/SKILL.md |
| org-novel-situation | references/skill-templates/novel-situation.md | .claude/skills/org-novel-situation/SKILL.md |
| org-voice-check | references/skill-templates/voice-check.md | .claude/skills/org-voice-check/SKILL.md |
| org-gate-review | references/skill-templates/gate-review.md | .claude/skills/org-gate-review/SKILL.md |
| org-values-check | references/skill-templates/values-check.md | .claude/skills/org-values-check/SKILL.md |
Update detection: Before writing each skill:
.claude/skills/{skill-name}/SKILL.md already exists<!-- generated-by: ai-first-kit v{X} --> comment for version# Create skill directories
mkdir -p .claude/skills/org-record-decision
mkdir -p .claude/skills/org-novel-situation
mkdir -p .claude/skills/org-voice-check
mkdir -p .claude/skills/org-gate-review
mkdir -p .claude/skills/org-values-check
After generating, report: "Generated N governance skills in .claude/skills/. Available commands: /org-record-decision, /org-novel-situation, /org-voice-check, /org-gate-review [gate-name], /org-values-check."
Present:
/ai-first-org-design-kit:operationalize after updating any upstream artifacts to regenerate"evolution-auditor periodically (recommended: monthly) to check organizational design health. It operationalizes the learning loop and decision ledger from your governance documents."agent-builder to generate role-specific system prompts for agents filling the roles defined in your roles file. Supports Claude Code, OpenAI Agents SDK, Anthropic Agent SDK, CrewAI, and custom frameworks."maturity-ladder to build a per-role AI adoption capability ladder. It measures where people actually are (not where they say they are) and creates visible progression paths."adoption-sprint-designer to create structured 2-3 day sprints that force hands-on AI usage. One sprint converts more than months of presentations."usage-policy-writer to create a human-facing AI usage policy with approved tools, data classification, and the reasoning behind each decision."/org-record-decision, /org-voice-check, etc.). Skills read source files dynamically and stay current when upstream artifacts change. Run agent-builder with the 'Register as Claude Code sub-agent' option to make your configured agents invokable via @agent-name."gates/.holdouts/* files during primer distillation. Not reading them is the primary defense — not including them is the secondary defense.political-map-*.md files during primer distillation. Sensitive human dynamics are never for agent consumption.DISTILL, DON'T DUMP. An agent with a 200-line primer that encodes decision rules will outperform an agent with 1400 lines of organizational theory. Every line in the primer must answer "what should I do?" not "why was this designed this way?"
The value of this skill is compression. Anyone can copy files. The hard part is knowing what to keep and what to strip without losing decision-critical information.
| Excuse | Response |
|---|---|
| "Just include everything to be safe" | That defeats the purpose. Bloated context degrades agent performance. Distill. |
| "The user can decide what to include" | You are the distillation expert. Present a well-curated draft, then take feedback. |
| "Holdout scenarios should be in the primer for completeness" | Absolutely not. Holdouts exist to test agents. Including them is a security failure. |
| "The primer doesn't need the full hard boundaries" | Hard boundaries are non-negotiable. They are included in full, always. |
| Missing | Fallback |
|---|---|
| No genome | Cannot proceed. Route to org-genome-builder. Genome is the minimum requirement. |
| No governance | Generate Tier 1 primer (identity only). Flag: "No governance artifacts found — agents will operate without hard boundaries. Run governance-architect to add safety." |
| No gates | Generate Tier 2 primer (governance). Note: "No quality gates defined — agents cannot self-review against gate criteria." |
| No specs | Primer is complete without specs. Specs are task-specific references, not standing instructions. |
| No roles/audit/political-map | These are never included in the primer. No degradation. |
| Bash unavailable | Skip artifact discovery. Ask user to confirm which artifacts exist via AskUserQuestion. |
| CLAUDE.md not found | Generate the section as a code block for manual pasting. |
| Existing primer found, no changes | Skip regeneration: "Your primer is up to date with all source artifacts." |
| Dump script not found | Fall back to manual concatenation using Read tool per references/dump-template.md. Script may not be found if plugin is installed outside $HOME/.claude/ — the search path covers standard installations. |
| No artifacts for a dump section | Section skipped — the script handles this automatically |
This skill is the final step in both Greenfield and Brownfield paths:
role-value-mapper in the Greenfield pathgovernance-architect in the Brownfield pathMinimum dependency: genome (required). All other artifacts are optional and enrich the primer.
Reads: genome/ (required), governance/, gates/, specs/ (all optional)
Writes: AGENT-PRIMER.md and/or ORG-DESIGN-DUMP-{datetime}.md to $HOME/.ai-first-kit/projects/{slug}/, optionally appends to .claude/CLAUDE.md
Never reads (for primer distillation): gates/.holdouts/*, political-map-*.md. The dump script may include these with --include-confidential flag, but the LLM agent must never read them directly.