# AI agent defaults Templates that `buddy setup:ai` uses to wire a project up for whichever AI coding agent you use. Nothing here is read at runtime - it is scaffolding, in the same spirit as `storage/framework/defaults/ide/`. ``` ai/ ├── AGENTS.md starter guidance, copied to the project root if absent ├── claude/ │ └── launch.json Claude Code run configurations, copied to .claude/ └── skills/ the framework's agent skills (agentskills.io format) ``` ## Why the generated directories are not committed `AGENTS.md` is the one file every agent reads, so it lives in the project root and is committed - it is shared guidance, and it belongs in review. Everything else is per-developer. Which agent you use is a personal choice, so `.claude/`, `.codex/`, `.cursor/`, `.gemini/` and `.github/copilot-instructions.md` are gitignored and generated on demand: ```sh buddy setup:ai # pick an agent interactively buddy setup:ai claude # or name it buddy setup:ai claude --copy # copy the skills instead of symlinking them ``` ## Skills `skills/` holds the framework's agent skills, one directory per skill, each with a `SKILL.md` carrying `name` and `description` frontmatter. They document the framework subsystem by subsystem, so an agent can read the authoritative reference for a task instead of guessing at an API. `buddy setup:ai` writes one entry per skill into the agent's directory, and symlinks by default so skills stay in sync when you upgrade the framework. Pass `--copy` if you would rather edit them per project. ### Collections `stacks-native` is the starting point for native implementation. Its catalog maps every core package to a subsystem skill and source entrypoint. Its recipes cover model-driven migrations and protected CRUD; its capability reference records current driver evidence and limitations. The framework repository regenerates these references with `buddy docs:native-skills` and verifies them in CI with `buddy docs:native-skills:check`. Most bundled skills are **subsystem reference**: one per part of the framework, model-invoked, found by the agent from the task at hand. A smaller set are **engineering craft** skills that shape how the work happens rather than which package it touches: `stacks-flow` routes between them, and `stacks-grilling`, `stacks-codebase-design`, `stacks-tdd`, `stacks-domain-modeling`, `stacks-prototype`, `stacks-wizard`, `stacks-handoff` and `stacks-writing-for-agents` are the rest. Several are adapted from [mattpocock/skills](https://github.com/mattpocock/skills) (MIT), with credit in each `SKILL.md`. The current Matt Pocock refresh includes specs, dependency-linked tickets, implementation graphs, triage, wayfinding, research, PR writing, and optional productivity workflows. All 38 upstream skills have a recorded destination or Stacks-native substitute. Hooks stay on pickier and bun-git-hooks; imported workflows do not commit, publish, or start schedules without authorization. **Marketing** is a third collection: `stacks-marketing` routes over all 50 playbooks from [coreyhaines31/marketingskills](https://github.com/coreyhaines31/marketingskills). Each keeps its supporting references, templates, and original MIT notice. Names are distinct from runtime package skills. The shared workflow explains product context, verified claims, Stacks implementation, and optional connectors. `skills/stacks-flow/upstream-skills.json` records both source revisions and every source-to-Stacks mapping. Shared engineering rules, marketing guidance, and source manifests live inside skill directories so both symlink and `--copy` agent setups retain them. The docs site has matching marketing, engineering, and productivity pages plus an upstream-porting report. The prose skills are `stacks-humanizer` for broad editorial rewrites and `stacks-unslop` for contextual audits, minimal edits, and voice matching. They adapt [blader/humanizer](https://github.com/blader/humanizer) and [theclaymethod/unslop](https://github.com/theclaymethod/unslop), with attribution and revision details in each skill's `NOTICE.md`. They require no runtime scripts or extra dependencies. The `@stacksjs/defaults` build includes this entire `ai/` directory. New package-based apps and framework upgrades receive the skills through the managed defaults sync; vendored apps carry them directly. `buddy setup:ai` then exposes them through the existing agent setup mechanism. No remote skill installation is needed. Each skill also has a page in the documentation site, under `docs/skills/`, one per skill with a landing page per section. `tests/unit/skills-docs-contract.test.ts` fails when a skill gains or loses a page, so the two cannot drift apart. ### Adding your own To add a project-specific skill, or to shadow a bundled one, create `app/Skills//SKILL.md`. Read `stacks-writing-for-agents` before you do: it covers the frontmatter `validateSkill()` enforces, the invocation choice, and how to write a description that fires when it should. `@stacksjs/skills` searches `app/Skills` first and falls back to this directory, the same app-overrides-defaults model the rest of the framework uses, and `setup:ai` links the winner, so a project skill also wins in the agent's directory.