> ## Documentation Index
> Fetch the complete documentation index at: https://docs.selftune.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage adjacent instruction files

> Import and export AGENTS.md, CLAUDE.md, Cursor rules, and Copilot instructions without treating them as Agent Skills.

SelfTune models repository instruction files as **adjacent instructions**, not as
Agent Skills. Their contents may look similar, but their placement and activation
rules are different. SelfTune preserves the exact UTF-8 bytes and records the
target harness instead of promising cross-tool semantic equivalence.

## Supported contracts

| Type                            | Supported harness | Placement                                | Activation                                                   |
| ------------------------------- | ----------------- | ---------------------------------------- | ------------------------------------------------------------ |
| `AGENTS.md`                     | Codex             | `AGENTS.md` at the selected project root | Codex directory instruction hierarchy                        |
| `CLAUDE.md`                     | Claude Code       | `CLAUDE.md` at the selected project root | Claude Code project/directory memory hierarchy               |
| Cursor project rule             | Cursor            | `.cursor/rules/<slug>.mdc`               | Explicitly Always, Auto Attached, Agent Requested, or Manual |
| Copilot repository instructions | GitHub Copilot    | `.github/copilot-instructions.md`        | Repository-wide custom instructions                          |

SelfTune rejects a type/harness combination that is not listed. It does not
silently export `CLAUDE.md` as Codex instructions or convert a Cursor rule into a
Skill.

## Import and validation

Imports require the exact declared project-relative path, non-empty valid UTF-8,
and a bounded file size. Cursor rules additionally require MDC frontmatter and an
explicit activation declaration. SelfTune checks that `alwaysApply`, `globs`, and
`description` agree with that declaration; it does not guess whether ambiguous
frontmatter means Manual or Agent Requested.

## Export, conflicts, updates, and Undo

An export plan is **Create** when the target does not exist, **Unchanged** when it
has the exact imported hash, or **Blocked conflict** when different bytes exist.
Replacing different bytes requires a separate explicit update after reviewing
both hashes. Undo restores the previous exact bytes, or removes the file when the
export created it.

## Privacy boundary

Instruction contents, project paths, validation detail, and rollback bytes stay
on the local device. This model does not add adjacent instruction contents to
Cloud manifests or hosted status receipts.

The placement and activation declarations follow the current official
[Cursor Rules](https://docs.cursor.com/context/rules-for-ai),
[Claude Code memory](https://docs.anthropic.com/en/docs/claude-code/memory), and
[GitHub Copilot custom instructions](https://docs.github.com/en/copilot/reference/custom-instructions-support)
documentation. SelfTune still validates only the narrower contracts listed on
this page.
