codify-principle

Generates five-layer governance artifacts from new design principle text.

5|9|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/ajenchen/design-system --skill codify-principle-ajenchen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codify-principle
Source: https://github.com/ajenchen/design-system/tree/main/.agents/skills/codify-principle
Command: npx skills add https://github.com/ajenchen/design-system --skill codify-principle-ajenchen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a newly stated design principle into enforceable governance normally requires manually writing canonical rules, hooks, audit dimensions, scaffolds, and memory entries across many files, which is error-prone and often skipped. This Skill automates that principle-to-artifact pipeline so a single sentence becomes a fully landed, verifiable rule. ## Core Features & Use Cases - Five-layer artifact generation: Converts principle text into SSOT canonical markdown, spec frontmatter traits, enforcement hook scaffolds with tests, audit dimensions, and governance memory entries, each placed via a Level 1-9 rule-placement taxonomy. - Mandatory benchmarking: Requires at least three world-class design system comparisons (Polaris, Material, Carbon, Atlassian, Ant) for cross-component principles before codification, failing closed when evidence is insufficient. - Authority-classified commits: Separates engineering-auto decisions from product/UI/UX decisions, produces per-layer evidence receipts, and commits each layer separately with tsc and hook-test verification. - Use Case: A user says "all form-like components must support controlled and uncontrolled dual-mode"; the Skill parses scope and type, benchmarks three design systems, drafts the canonical rule, hook, audit dimension, scaffold update, and memory entry, then applies and verifies each layer. ## Quick Start Tell the agent "I want to add a new design principle: every form component must support controlled and uncontrolled modes" and let it generate and verify all five artifact layers.

Frequently Asked Questions about codify-principle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a new design principle into enforceable rules?

State the principle in natural language, such as "all form components must support dual-mode". The Skill parses scope and type, benchmarks against world-class design systems, then generates canonical rule text, hooks, audit dimensions, scaffolds, and memory entries across five layers.

What artifacts does the codify-principle pipeline generate?

It generates five layers: SSOT canonical markdown in the rules or references directory, spec frontmatter traits, a shell hook scaffold with smoke tests, a new audit dimension for periodic verification, and a governance memory entry with index update.

When should I use codify-principle versus ensure-canonical?

Use codify-principle when creating a brand-new principle from scratch, since it generates all five artifact layers. Use ensure-canonical for enforcing or strengthening hooks and audits on principles that already exist in the canonical rules.

Does codifying a principle require benchmarking against other design systems?

Yes, cross-component principles require comparison against at least three world-class design systems such as Polaris, Material, Carbon, Atlassian, or Ant Design. If evidence remains insufficient after research, the principle is not codified and the benchmark gap is documented.

What happens if a generated hook or commit fails verification?

Each layer is committed separately and verified with tsc compilation, hook tests, and a content-quality audit. If any check fails, the workflow returns to that phase to fix the issue rather than bypassing the failure.