> For AI agents: the complete documentation index is available at https://tackup.dev/llms.txt, the full documentation bundle is available at https://tackup.dev/llms-full.txt.

# Sync and status

`tack sync` turns the selection into links and docs mounts. `tack status` and `tack doctor` read
what is on disk against that plan. This page is the full set of rules;
[Check health](https://tackup.dev/docs/guides/check-health.md) is the short version.

## Preview and apply

`tack sync` previews the selected resource links and the attached docs mounts together. `--no-docs`
leaves the mounts out; `--no-adapters` plans only the docs mounts of a project. The plan's `options`
echoes `--adapter`, `--require-capability`, `--include-optional`, `--no-docs` and `--source` when
given, and the `Next` command repeats them, with `--no-adapters`, so applying it writes exactly what
the preview showed. Add `--apply` to plan again and write; the response carries the plan it applied together
with the outcome of each action.

```sh
# Preview one project explicitly.
tack sync --project tack

# From a registered active worktree, sync its project.
tack sync
tack sync --apply

# Preview every project and the user target.
tack sync --all

# Limit the target or the adapters.
tack sync --project tack --apply
tack sync --user --apply
tack sync --adapter claude --adapter codex --adapter cursor --apply

# Include optional dependencies, or plan without adapters or docs.
tack sync --include-optional
tack sync --project tack --no-adapters
tack sync --project tack --no-docs

# Plan only the links and docs mounts of one source.
tack sync --all --source team
```

These also preview before they write: `tack source add`, `tack project add`,
`tack project refresh`, `tack project remove`, `tack source remove`, `tack adapter enable`,
`tack adapter disable`, `tack state clean`, `tack state clean --pending` and `tack state reset`.
`tack project add --apply` registers the project, then syncs it as `tack sync --project NAME --apply`
does. Picks, docs attachments and settings, `tack profile enable` and `disable`, and
`tack extension enable` and `disable` take effect at once.

[Projects and selection](https://tackup.dev/docs/reference/selection.md#selectors) describes which targets a sync covers.
`tack sync --adapter claude --user --apply` limits one sync to an enabled adapter; sync refuses an
adapter that is not enabled and names `tack adapter enable`, which previews enabling it and linking it
on every target.

`--require-capability command-links` blocks every unit whose adapter cannot link commands; such a
unit plans no work and reports `capability: { _tag: "blocked" }`. Each plan unit also states which
kinds its adapter delivers, such as `delivery: { skill: "delivered", command: "unsupported" }`; a
selected resource of an unsupported kind is not linked for that adapter.

## One source

`--source SOURCE` limits a sync to one source, named by its label or its registration ID. It plans
that source's links and docs mounts, and the sources skill of each namespace that lists the source
or still holds one of its links. Every other link, mount and sources skill stays as it is, even with
a change pending. Each decision is still made from the whole selection: a name the source shares
with another source's selected resource is a collision, so the existing link of that name is
removed. The plan reports only the warnings that concern the source: a quarantined resource or an
unhealthy registration of another source is left out, and `no-adapters-enabled` appears only when
the source has a selected resource. A source no registration matches fails with `source-not-found`,
and a label two registrations share with `source-label-ambiguous`.

`tack source add --apply` runs this sync, over every project and the user target, for the source it
registers. Its preview shows the same plan.

## How links are written

Each link is relative text computed from the real directory that contains it, which is where the
operating system resolves it. An agent folder or home reached through a symbolic link, such as
dotfiles managed by stow or chezmoi, still links to the source. `tack status` and planning observe
links the same way, so a link that only resolves lexically is reported as drift.

An alias between agent folders inside a root, such as `.claude/skills -> ../.agents/skills`, is
recognized when it is a relative link to a real directory inside the same target. Adapters that
reach one physical directory share one link: one adapter writes it and holds its record, the others
report it as `matching` with a `sharing` entry, and a plan unit lists the alias under
`directoryAliases`. A dangling alias, an alias to a file, an absolute alias, and an alias that leaves
the target stay `destination-directory-conflict`. Two resources with one name in the shared
directory stay a collision. Cleanup and `tack adapter disable` remove a link only with a record,
and a removal preview names the other adapters that reach the directory in `alsoReachedBy`; the
next sync restores any link that is still selected.

A project does not link a skill or command that the same adapter links for the user: agents in the
project load it from the user's folder, so they list it once. The plan unit names such resources in
`linkedForUser`, and the text view shows each as `skip … linked for the user`. A project link made
before the user pick is removed with the reason `linked-for-user`, and `tack status` lists the
resource as undelivered with that reason. After the user pick is removed, the next project sync
links the resource into the project again. A resource of another source with the same name is not
affected.

## The sources skill

Each sync also writes a skill that tells agents which sources stand behind the links, and how to
edit them. A project gets `tack-sources`; the user's own links get `tack-user-sources`. Tack writes
each one in its state directory, under `generated/`, never in a source or a project, and links it
into every enabled adapter's skills folder like a selected skill. A namespace gets one once it links
at least one skill, command or docs resource of a healthy source, and an enabled adapter links
skills there. A project's skill leaves out a skill or command that the project leaves to the user's
link ([How links are written](#how-links-are-written)), so a source linked only for the user is listed in
`tack-user-sources` alone, unless the project also mounts its docs.

Each skill has its own fixed description. Both ask an agent to load the skill before it reads,
follows, edits or adds a linked skill or command. The project's one also covers the docs in
`.tack/docs`, and says that its mounts are symbolic links that `find -type f`, `grep -r` and
`git ls-files` do not enter. The body lists each source with a linked resource, by name:

- its `description` from `tack.yaml`, or a line that says it has none;
- its real path, where the `tack.yaml` is, and its `maintainers`;
- in a project, each of its docs mounts by name and path, such as
  `.tack/docs/<registration-id>/runbooks`;
- a Guidance block: every `guidance` entry in declaration order, its `when` in bold and its body as
  a quote, or a line that says the source declares none.

When a source's guidance bodies pass 2,048 bytes together, its block keeps every `when` and names
the `tack.yaml` that holds the bodies. Past about 8 KB in all, the skill shows less of one source at
a time, the largest first: its bodies by reference, then one line with its path, docs mounts and
`when` lines, then one bare line, until the body fits. [Source format](https://tackup.dev/docs/reference/tack-yaml.md#description-and-guidance)
describes both keys.

The plan's `sourcesSkills` lists each skill with its `namespace`, its `path`, the hash of its
`inputs` and its `state`: `current` when the copy on disk is the text sync would write, `stale`
when a source, a description, maintainers or guidance changed since, and `missing`. `--apply` rewrites
each copy that is not current, then links. Do not edit it: the next sync rewrites it. A source skill
named `tack-sources` or `tack-user-sources` is quarantined with `skill-name-reserved`.

## Why a link is removed

A `link-remove` action names why the link goes in `reason`, which the text view prints beside the
resource:

| Reason             | Meaning                                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------ |
| `deselected`       | No choice, enabled profile or default selects the resource any more.                                   |
| `source-unhealthy` | Still chosen, but its source cannot be read, such as a `tack.yaml` with an unknown key.                |
| `quarantined`      | Still chosen, but the catalog quarantined the resource, such as a `SKILL.md` that no longer validates. |
| `blocked`          | A required dependency is blocked; the action names its `blockers`.                                     |
| `collision`        | Another selected resource has the same name.                                                           |
| `linked-for-user`  | The same adapter links it for the user.                                                                |
| `source-missing`   | The recorded source was deleted or moved, so the link no longer resolves.                              |
| `replace`          | The link is rewritten for the same name, followed by its `link-create`.                                |

When sync also warns with `profile-layer-unresolved`, a `deselected` can come from a broken profile
file. Run the `tack check` it names before you apply.

Fix the source or the file and the next sync links a `source-unhealthy` or `quarantined` resource
again.

A link whose recorded source was deleted or moved still belongs to Tack when its text is exactly the
text Tack writes for its record. A sync then replaces it if the resource is still selected, or
removes it with `source-missing`; `tack state clean` and `tack state clean --pending` remove it too.
A dangling link with any other text is not Tack's and is never removed.

## Links changed outside Tack

A recorded link that was changed outside Tack, such as one pointed at a copy of the skill inside the
repository, is left in place. While its resource is selected, sync reports it as
`managed-link-drift`. Once the resource is deselected or gone from its source, sync releases it: the
plan carries an `evidence-retire` action with reason `released`, counted under `release`, the text
view notes it once as `release PATH … changed outside Tack, no longer managed`, and applying it
forgets the record without touching the link. A dangling link with foreign text is released the
same way. Until then `tack status` reports the destination as `evidence-changed`. A changed link
whose name two selected resources collide on stays `managed-link-drift` until the collision is
resolved. A recorded link that is absent is retired with reason `absent`.

## Links Tack adopts

A link Tack has no record of that is exactly the link Tack would write, with identical text that
resolves to the selected source, is adopted. A link committed to a repository arrives this way in
every other clone. The plan carries a `link-adopt` action, counted under `adopt`, the text view
shows it as `adopt PATH … already linked, record only`, and applying it records the link without
touching it. `tack status` reports it as `unrecorded` until then; afterwards it is like any link
Tack created.

Any other entry in the way, such as a link with other text, a file or a folder, stays a
`foreign-destination` conflict: Tack never replaces it. The conflict names what is there and, in
`expectedTarget`, the link text Tack would write. `git rm` the entry when the repository commits it,
or move it away, and ignore Tack's links in `.gitignore`; then sync.

## Adapters

Turn adapters on and off independently. Each half does its whole job, so both preview:
`tack adapter enable` plans the setting and the links of the named adapters on every target, and
`tack adapter disable` plans the removal of the adapter's links. `tack adapter enable` never removes
an adapter:

```sh
tack adapter enable claude codex cursor           # preview the setting and the links
tack adapter enable claude codex cursor --apply
tack adapter
tack adapter disable cursor                       # preview cleanup and disablement
tack adapter disable cursor --apply
```

`tack adapter` lists the enabled adapters, not every known one. An adapter is machine-wide, so both
previews cover every project and the user target. The enable preview counts the links per adapter
and target, as `tack sync --all` does; a hand-made entry in the way stays a `foreign-destination`
conflict, the rest links, and the setting is recorded. Like every cleanup view (`tack state clean`, `tack state
reset`, `tack source remove`, `tack project remove`, `tack project refresh`), the disable preview
counts the actions per adapter and target, such as `cursor → user · 5 to remove` and
`cursor → app (3 roots) · 36 to remove`, then lists the first 10 actions; `--details` lists them
all. After a settled `--apply`, its `Next` is `tack status --all`.

[Agent support](https://tackup.dev/docs/agent-support.md) lists every adapter's folders and what each agent reads.

## Status

`tack status` reports source, project, selection, delivery, destination and pending-removal health
for the selected scope.

```sh
tack status
tack status --project tack
tack status --user
```

Status classifies each destination by the decision sync would make for the same scope, so after a
successful `tack sync --apply` every destination reports `matching`. Pass `--include-optional` to
inspect what `tack sync --include-optional` delivers; without it, optional links report drift
because a plain sync would remove them. Status covers the same targets and links sync acts on: a
missing or unhealthy project root is reported on its project (`root-missing`, `root-unhealthy`) and
lists no destinations, and the built-in skill links of a user target with a fixed profile, which
sync leaves as they are, are not listed. Status also lists each [sources skill](#the-sources-skill) under
`sourcesSkills`, and one that is `stale` or `missing` makes it partial with `sources-skill-stale`:
run `tack sync` to rewrite it. The help of `tack status` says what each link state means
and what to run.

## Doctor

`tack doctor` is the one read-only health report. It is machine-wide, works before `tack init`,
never prompts, fetches or repairs, and changes no file. It runs one check per area: `release`,
`state`, `adapters`, `sources`, `imports`, `profiles`, `profile-definitions`,
`unregistered-dependency-source`, `projects`, `links`, `docs`, `scripts` and `extensions`. The
`docs` and `scripts` checks run only while their extension is on.

- **`extensions`** fails when an enabled extension needs a package that is not installed beside
  Tack, or is at another version, and names the install command. It is a warning when an extension
  is off while a registered source declares what it handles, and names
  `tack extension enable ID`.
- **`scripts`** warns when a retained script run record cannot be read and names
  `tack script history`, which lists it; it fails when the history cannot be listed, and is skipped
  when no run is retained.
- **`sources`** groups quarantined candidates per source, telling declaration problems from other
  ones, and names `tack catalog` as the next command.
- **`projects`** reads where doctor runs: with no project registered, a Git repository there is a
  warning that names `tack project add NAME`; a worktree of a registered project that refresh has
  not added is a warning that names `tack project refresh --project NAME`, because that worktree has
  no links.
- **`links`** fails on drift, foreign entries and pending removals, and only warns on a hand-made
  entry: a file or folder that was at a destination before Tack linked there, which `tack status`
  tags `hand-made` (`destination-hand-made`). Tack keeps it and links everything else. The warning
  names `tack pick exclude SOURCE:NAME --kind KIND --project NAME` to keep yours on purpose, which
  unlinks Tack's resource for every agent of that project.

Each check has an outcome of `ok`, `warning`, `failed` or `skipped`, a message and, when a cause is
known, the exact command that addresses it, as a preview unless the operation is immediate. It never
guesses `--all`, and carries `--state-dir` when you chose the state directory.

Warnings and skipped checks exit `0`. A failed check exits `1` and still carries the whole report,
plus one `doctor-check-failed` diagnostic per failed check. A missing state is a warning with
`tack init` as its next step, and the checks that need state are skipped. A state with no enabled
adapter is an `adapters` warning that also names `tack init`. A state written by a newer Tack fails
the `state` check. An unreadable or corrupt state is a persistence failure that exits `3`, because
the report could not be trusted. `tack status` stays the report of one selection; its problems and
repair hints agree with doctor.

## Clean up

`tack state clean` removes the links Tack manages from a selected target. `tack state clean --pending`
retries pending removals, agent links and docs mounts alike. Both need `--apply` to change files.

```sh
tack state clean --project tack
tack state clean --project tack --apply
tack state clean --pending --user --apply
```

`tack state reset` plans the removal of every managed link and state record. With `--apply` it runs
that cleanup and deletes the state only after the cleanup settles, with the files the extensions
keep in the state directory's `extensions` folder, such as the script run history, whether they are
on or off.
[Remove a source, a project or Tack](https://tackup.dev/docs/guides/remove.md) walks through each removal.

## Next

- [Automation](https://tackup.dev/docs/reference/automation.md): the JSON envelope, diagnostic codes and exit codes.
- [Projects and selection](https://tackup.dev/docs/reference/selection.md): what a sync delivers.
