Cratis AI setup for your repository
Use the Cratis CLI to install Cratis AI when your team needs shared coding agent guidance in a repository. For one developer using one coding tool, a native plugin avoids a repository-managed copy. Choose that channel first, then select guidance for the work your repository actually does.
Pick a channel
Section titled “Pick a channel”| You want | Use | What you get |
|---|---|---|
| One consistent setup for a repository, its team, and several coding tools | cratis ai install (this page) |
Rules and skills selected by profile, plus prompts, agents, hooks, and harness adapters to commit with the repository |
| Cratis skills in one tool on your own machine | The tool’s native plugin, or the public skills subset | Skills only; no repository ownership tracking |
| Cratis guidance in Pi, pinned to a package version | @cratis/pi |
Skills, rules, prompts, agents, and quality hooks |
Choose the CLI path if you want to review and commit guidance with the code. Choose Cratis AI profiles before installing: application, framework-contributor, and documentation profiles serve different work. Cratis AI distribution explains versioning and rollback for each channel.
The installed guidance has four forms. Rules are standing instructions, either
universal or scoped to paths such as **/*.cs. Skills are task workflows the
agent loads when needed. Prompts provide reusable instructions such as
new-vertical-slice; agents define subagents for delegated work. Together,
these files form the guidance corpus.
Complete repository setup
Section titled “Complete repository setup”Install the Cratis CLI first. By default, AI commands
that read the corpus use git and network access to download the current
default branch of Cratis/AI, including for
status and dry runs. For offline use or a fixed revision, supply a local
checkout with --source <path> or CRATIS_AI_SOURCE. Keep that checkout at the
revision you intend to use; .cratis/ai.json does not pin it.
-
From the repository root, preview what would be written:
Terminal window cratis ai install --dry-runWith interactive input, the CLI asks you to pick harnesses (your coding tools), profiles, and languages. The choices come from the source corpus’s
.cratis/ai/manifest.json. Review the proposed files and Model Context Protocol (MCP) server registrations before writing them. -
Run the same command without
--dry-runto apply your selection. When input is redirected,--harnessesand--profilesare required. For example, this installs C# application and documentation guidance for all six harnesses:Terminal window cratis ai install \--harnesses claude,codex,copilot,cursor,opencode,pi \--profiles cratis/application/csharp,cratis/documentation \--languages csharp,typescriptKeep only the harnesses you use. Include
--languageseven though it is optional: language-scoped rules depend on that selection. The C# profile includes React-related guidance, so the example also liststypescript. -
Check the result:
Terminal window cratis ai statusIt prints your selection, the installed and available corpus revisions, and locally changed managed files. Check that the selection is the one you intended and that no unexpected changes are reported. Use the same
--sourcehere if you installed from a local checkout. -
Commit
.cratis/ai.json,.cratis/ai.manifest.json, the.cratis/ai/tree, and the harness adapters (AGENTS.md,CLAUDE.md,.claude/,.pi/and so on). A checkout then carries the same guidance and adapters for the team.
To confirm the agent sees the guidance, start your coding tool from the
repository root and ask which Cratis skills it can use. Look for names such
as cratis-arc-command and cratis-chronicle-projection.
What the installer writes
Section titled “What the installer writes”The CLI copies the selected corpus into .cratis/ai/, records each installed
file and its hash in .cratis/ai.manifest.json, and creates native adapters for
each selected harness. Most adapters are symbolic links into .cratis/ai/, so
every tool reads the same copy. The agent harness guide
lists what each harness receives.
Pi is configured directly from the managed copy. The managed cratis-rules
extension puts the universal rules from .cratis/ai/rules into the system
prompt, and cratis-path-guidance attaches path-scoped rules and skill hints the
first time a matching file is touched. You do not need the @cratis/pi package
as well.
Share project-specific guidance
Section titled “Share project-specific guidance”Put guidance that belongs to this repository alone in
.cratis/ai/rules/project.md. When it covers several concerns, keep that file a
short index and give each concern its own file:
.cratis/ai/rules/├── project.md└── project/ ├── build-and-test.md ├── architecture.md ├── security.md └── deployment.mdproject.md tells harnesses that read one context file to read every concern.
Native rule adapters and Pi’s rules extension discover the concern files
directly. The CLI creates AGENTS.md and CLAUDE.md as links to project.md
when those paths are free.
If AGENTS.md or CLAUDE.md already exists as your own file, the CLI leaves it
alone. Check that your existing file directs the agent to
.cratis/ai/rules/project.md; add that instruction if it is missing.
Moving from a legacy project file
Section titled “Moving from a legacy project file”The installer recognizes .cratis/PROJECT.md, .ai/PROJECT.md, and
.agents/PROJECT.md. When no concern directory exists, it can split the
selected project file at its level-two headings into project.md and concern
files, leaving the original in place. Review the split and update references
before retiring the legacy file. Run cratis ai update again after that
migration.
Maintain the installation
Section titled “Maintain the installation”cratis ai status # read-only; exits non-zero if a managed file was editedcratis ai update --dry-run # what an update would changecratis ai update # take the current corpus for the recorded selectioncratis ai uninstall # remove unchanged Cratis-managed content and adaptersupdate re-reads .cratis/ai.json and uses the current default branch unless
you supply --source or CRATIS_AI_SOURCE. To change the selection, run
install again with new options.
An edited managed file blocks update or uninstall before writes. Review the
reported paths and move any project-specific guidance to your own files.
--force permits replacing or removing edited managed corpus files; it does
not permit overwriting your files or changed MCP entries.
Because status exits non-zero on local edits, you can use it in CI to catch
drift. For a rollback, update from a local checkout at a known-good source
commit; the installed revision is recorded in .cratis/ai.manifest.json.
Updates and rollback covers that procedure
and the native channels.
Choose the integration that fits your repository
Section titled “Choose the integration that fits your repository”Managed by Cratis
Section titled “Managed by Cratis”Use cratis ai install when several people or several coding tools work in the
repository, or when you want the guidance reviewed and committed like code.
It manages a shared corpus and adapters, with profile selection and conflict
checks on update and uninstall. What a tool loads still depends on its native
adapter; the agent harness guide lists those differences.
Native plugin or marketplace
Section titled “Native plugin or marketplace”Use a native plugin when one developer wants Cratis skills in one tool without
setting up a shared corpus. The Claude Code, Codex, GitHub Copilot, and Cursor
plugins from Cratis/AI deliver skills from its default branch. The separate
Cratis/AI.Distribution offers a tagged subset of passive skills, not the full
corpus. @cratis/pi also contributes rules, prompts, agents, a subagent tool,
and quality hooks, and is versioned on npm. These native channels do not create
.cratis/ai, configure other harnesses, or provide CLI ownership checks. The
agent harness guide has the commands.
Contribute and verify skills
Section titled “Contribute and verify skills”Skills are authored and reviewed in Cratis/AI.
A skill can carry a verification.json with an example input and assertions
that the skill contains the guidance that input needs. Those assertions are
static checks, not model runs or assessments of writing quality. Separate
checks compile supported Screenplay examples and run their specifications
where required. To assess how an agent uses a skill, give it a real task and
review the output.