The Canonical Governance Engine & Architecture Specification for AI Coding Agent Skills.
Enforces the 12 Structural Rules of TidyFactor Skills across Google Antigravity, Claude Code, Cursor, OpenAI Codex, and Windsurf.
- Overview & Philosophy
- The Architecture: Progressive Disclosure
- The 12 Structural Rules of TidyFactor Skills
- Commands & Operational Workflows
- The Contextual Decision Layer (CDL)
- Tooling & Integrity Validation Suite
- Cross-Agent Distribution & Synchronization
- Installation & Usage
- License & Credits
tidyfactor-skill-architect is the foundational governance layer that establishes standard operating procedures for creating, auditing, expanding, and packaging AI Coding Agent Skills.
Traditional AI skills often suffer from:
- Context Window Pollution: Massive, monolithic markdown files that dump thousands of tokens on startup.
- Execution Hallucinations: Prompt ambiguity where the agent attempts to "guess" rather than follow deterministic paths.
- Multi-Agent Drift: Divergent behaviors across different AI coding environments (Antigravity vs. Claude Code vs. Cursor).
- Syntax & Frontmatter Failures: Unquoted strings or malformed YAML breaking IDE autocomplete and discovery indexing.
A skill must behave as a high-speed deterministic router, loading only the minimal necessary context at the exact moment it is required.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Session Discovery Layer β
β SKILL.md Frontmatter (name + description) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β (Trigger Matched)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Dispatcher Layer (Router) β
β SKILL.md (~350 tokens, Anti-triggers, Scope) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β (Intent Identified)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Command Layer (Router Link) β
β references/commands/<command>.md β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββ¬βββββββββββββββ
β (Loads Workflow) β (Injects Memory)
βΌ βΌ
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ
β Workflow Layer β β Memory Layer β
β Ordered Execution Steps β β Pure Technical Constraints β
β + Validation Checklist β β Schemas, Patterns, Tables β
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ
Every skill created, audited, or packaged within the TidyFactor ecosystem strictly adheres to the 12 Structural Rules:
| # | Rule | Core Mandate | Failure Mode Prevented |
|---|---|---|---|
| 1 | Dispatcher Discipline |
SKILL.md is strictly a router (~350 tokens). Zero in-line instructions. |
Token bloat & memory exhaustion at session boot. |
| 2 | One Workflow = One Outcome | 1 workflow produces exactly 1 tangible deliverable with a ## Validation checklist. |
Ambiguous multi-tasking and incomplete executions. |
| 3 | Operational Memory | Pure technical facts, schemas, and schemas. Zero marketing narrative. | AI hallucinating promotional text into production code. |
| 4 | No Empty Structures | Clean, flat file hierarchies. No single-file folders (memory.md vs memory/). |
Deep directory nesting and navigation overhead. |
| 5 | Philosophy Isolation | Brand philosophy and rationale live solely in memory/philosophy.md (unreferenced). |
Agents outputting promotional fluff instead of code. |
| 6 | Trigger-Justified Growth | Files are added strictly upon verifiable triggers (Size, Branch, Variant, CDL). | Premature folder explosion and architecture sprawl. |
| 7 | Quality Bar & Native Tooling | Deterministic operations encapsulated in tools/ wrapping native tools (node, python). |
Unreliable LLM regex replacements & flaky bash scripts. |
| 8 | Cross-Platform Parity & SemVer SSOT | 100% behavioral parity across all agent platforms; atomic metadata sync. | Agent version drift and silent breaking changes. |
| 9 | Platform Compatibility & YAML Invariants | Valid YAML parsing (yaml.safe_load()), description β€ 1024 chars, mandatory double quotes "...". |
Silent failure in IDE slash (/) command autocomplete. |
| 10 | Tool Permission Declaration | Explicit declaration of tool languages, mutation abilities, and network scope in SKILL.md. |
Security blind spots and unprompted file overwrites. |
| 11 | Memory Freshness | Required <!-- last-verified: YYYY-MM-DD --> marker with |
Stale API references, deprecated flags, and broken specs. |
| 12 | Skill vs MCP Boundary | Static decision logic lives in skills; dynamic APIs & databases delegate to MCP. | Skill bloat and duplicated live-data implementations. |
tidyfactor-skill-architect exposes 4 core operational commands:
- Trigger:
"Build me a skill for X"/"Turn this workflow into a TidyFactor skill" - Loads:
references/workflows/create-skill.md+references/memory/spec.md+references/memory/growth-rule.md+assets/skill-md-skeleton.md - Output: Fully scaffolded, compliant skill directory with valid YAML frontmatter, dispatcher
SKILL.md, and initial workflow.
- Trigger:
"Audit this skill"/"Check if this skill follows TidyFactor rules" - Loads:
references/workflows/audit-skill.md+references/memory/spec.md - Output: 12-rule compliance scorecard (
Score: X/12), list of violations, and exact automated file-level remediations.
-
Trigger:
"Test this skill"/"Generate test scenarios" -
Loads:
references/workflows/test-skill.md+references/memory/spec.md -
Output: Populates
tests/scenarios.mdwith$\ge 3$ distinct evaluation prompts (happy-path, edge-case, anti-trigger rejection).
- Trigger:
"Should I add a new file/folder to this skill?" - Loads:
references/memory/growth-rule.md - Output: Deterministic decision (
SPLIT,EXPAND, orREJECT) based on quantitative line count and lifecycle triggers.
For complex skills where execution depends on interdependent architectural choices (e.g. tidyfactor-styler, tidyfactor-next), the Skill Architect codifies the CDL Pattern:
- Thin Arbitration Protocol (
memory/decision-points.md): Defines triggers, boolean skip conditions, and pointers to existing SSOT catalogs. - Pre-flight Brief & Cache (
briefcommand /.tidyfactor/<skill>-brief.md): Gathers decisions once per project, saving them to disk so downstream commands execute silently without asking repetitive questions. - Single-Round Batching & Safe Defaults: Unresolved ambiguities are batched into 1 single round (max 3 questions). Any overflow defaults to safe conventions.
- Decision Alignment Axis: Evaluates generated code against Axis 7 (
D- Decision Alignment) during pre-emit self-critique.
The skill includes a dedicated deterministic verification engine:
# Run the 11-point automated integrity validator
python tools/validate_skill.py-
[1]SemVer Synchronization: Verifiespackage.json,.tidyfactor,brand.json, andCHANGELOG.mdshare identical versions. -
[2]License Consistency: Ensures standard Apache-2.0 license file exists. -
[3]Referenced File Integrity: Checks that all paths referenced inSKILL.mdexist on disk. -
[4]Validation Checklists: Confirms every workflow file contains a## Validation checklist. -
[5]Leak Prevention: Audits for leaked local machine absolute paths. -
[6]Token Budget Gate: Asserts dispatcherSKILL.mdis within ~350 token budget (max 500). -
[7]Memory Freshness Gate: Enforces<!-- last-verified: YYYY-MM-DD -->marker within$\le 180$ days. -
[8]Strict YAML Frontmatter Validation: Executesyaml.safe_load()to ensure frontmatter is syntactically valid anddescriptionis properly quoted and$\le 1024$ chars. -
[9]Tooling Scope Declaration: Verifies Rule 10 declaration whentools/exist. -
[10]Test Scenario Suite: Assertstests/scenarios.mdcontains$\ge 3$ test cases. -
[11]MCP Boundary: Checks that skills interacting with MCP document boundary logic.
When packaging or releasing with node tools/build-skill.js, the builder automatically compiles the distribution archive and synchronizes across all 5 target environments:
Skills-LAB/tidyfactor-skill-architect/ (SSOT)
βββ π¦ dist/tidyfactor-skill-architect.skill
βββ π¦ dist/tidyfactor-skill-architect-vX.Y.Z.skill
βββ π .agents/skills/tidyfactor-skill-architect/ (Local Agent Wrapper)
βββ π ~/.gemini/config/skills/tidyfactor-skill-architect/ (Global Gemini/Antigravity)
βββ π /mnt/skills/user/tidyfactor-skill-architect/ (Claude / Unix Environment)
# Add directly to your active agent workspace
npx @tidyfactor/cli-skill-architect
# Or install globally
npm install -g @tidyfactor/skill-architectClone or copy into your agent's skill root:
# Google Antigravity & Gemini IDE
cp -r tidyfactor-skill-architect ~/.gemini/config/skills/
# Local Project Agent Wrapper
cp -r tidyfactor-skill-architect .agents/skills/- License: Apache-2.0
- Engineered by: TidyFactor Ecosystem & Alwkala Digital Agency
- Contact:
hello@tidyfactor.com|+201016656899