Create an instruction
Add durable project guidance in Fractal and convert it to Code Agent rules.
Project rules begin as Fractal instructions. This keeps one canonical source while allowing each Code Agent to use its own native metadata and discovery path.
Create the source instruction
Read .fractal/skills/fractal/references/instructions.md, choose the
appropriate scope, and create a file such as:
.fractal/instructions/standards/my-feature.instruction.mdKeep the instruction focused: explain when it applies, what the agent must do, what it must avoid, and how the result is verified. Use current repository examples and preserve the Fractal frontmatter schema.
Convert the instruction
Read references/code-agents.md before producing an adapter.
| Provider | Derived file | Typical mapping |
|---|---|---|
| Claude Code | .claude/rules/my-feature.md or CLAUDE.md | Preserve body; use a rule for scoped guidance and CLAUDE.md only for always-on context. |
| Cursor | .cursor/rules/my-feature.mdc | Map scope to description, globs, and alwaysApply. |
| Copilot/VS Code | .github/instructions/my-feature.instructions.md | Map scope to applyTo; use AGENTS.md for portable baseline context. |
The adapter is disposable. If it drifts, update the Fractal instruction and recreate the adapter. Do not reverse-sync it automatically.
Validate
- Confirm the source file follows the Fractal instruction schema.
- Confirm the adapter is in a provider-supported directory.
- Confirm scope/globs match the intended files.
- Reload the Code Agent and test the instruction with a small, safe request.
- Mention the source and adapter paths in the change summary.
For a capability that needs ownership, todos, review, or evidence, create a Fractal task instead of encoding the whole process as a rule.