CLI that generates structured architectural policy files (policy.md) for AI coding agents. Optimized for Svelte 5 Runes and modern frontend patterns.
╔═╗ ╔═╗ ╔═╗ ╔╗╔ ╔╦╗ ─── ╔═╗ ╦═╗ ╔═╗ ╦ ╦
╠═╣ ║ ╦ ║╣ ║║║ ║ ─── ╠═╣ ╠╦╝ ║ ╠═╣
╩ ╩ ╚═╝ ╚═╝ ╝╚╝ ╩ ─── ╩ ╩ ╩╚═ ╚═╝ ╩ ╩
architecture scaffolding for svelte
AI Agents (like Cursor, Windsurf, or Gemini) perform better when constrained by a strict, declarative architecture policy. This tool automates the creation of those constraints, ensuring your AI assistant follows professional engineering standards.
- Feature-Sliced (FSD): Scalable enterprise pattern organized by business domains.
- Modular Layered: Classic technical layering (components, hooks, services).
- Flat Layered: Direct and minimal hierarchy for rapid development.
- Atomic Design: Organizes UI components by complexity (atoms → molecules).
- UI Library: Strict patterns for high-quality, publishable UI packages.
bun installRun the interactive wizard to generate your policy:
bun run src/bin.ts initinit: start the interactive configuration wizard.validate [path]: check if an existingpolicy.mdcomplies with the schema.registry list: list all available architectural templates.
The generated .ai/policy.md acts as the Single Source of Truth for:
- Layer Rules: Who can import from whom.
- File Conventions: Naming, extensions, and exports.
- Implementation Rules:
is/has/canprefix for booleans.- typed errors (no raw strings).
- extracted magic numbers (*.constants.ts).
# Run tests
bun test
# Run in development mode
bun run src/bin.ts <command>built with precision for the svelte ecosystem.