Skip to content

Lifecycle & Drift Detection

Tuff is built around capability lifecycle management, not just file installation.

The core loop is:

  1. create or add a capability into an agent
  2. record the install-time baseline
  3. allow the repo to customize the emitted files
  4. detect drift relative to the recorded baseline
  5. make that drift visible through listing, diffing, checking, and updates

This is the main reason Tuff exists. Teams need project-owned capabilities that can evolve without losing provenance, source metadata, or update behavior.

Git is still the system of record for repository history. Tuff adds a different layer of state.

Git can tell you that a file changed. Tuff also records:

  • which capability produced that file
  • which agent emitted it
  • which baseline version it came from
  • whether it was installed from a local source or git source
  • which upstream revision it was pinned to

That extra metadata is the part plain Git history does not carry.

It also means teams can relate capability version changes to downstream effects such as:

  • agent behavior changes
  • review outcomes
  • prompt quality shifts
  • performance or evaluation metrics tracked outside Tuff

Tuff does not replace Git. It versions the capability lifecycle metadata around the files Git is already storing.

Tuff models every tracked emitted file as up to three states:

VersionSource
BaselineContent recorded at last install, import, or update
LocalCurrent file in .agents/ or .claude/
UpstreamLatest file content from the git source, if the capability was installed from git

When Tuff compares local files against the recorded baseline, the common states are:

StateMeaning
cleanInstalled content matches the recorded baseline
modifiedLocal content differs from the recorded baseline
missingA tracked emitted file no longer exists

For local capabilities, the typical flow is:

Terminal window
tuff create skill my-skill
tuff list
tuff diff my-skill

Creation initializes tracking automatically. It uses the configured default agent; pass --agent claude to create the scaffold under .claude/ instead.

If the drift is intentional and should become the new baseline:

Terminal window
tuff update my-skill

Cleanup is explicit about file ownership. For a capability Tuff installed by copying files into an agent, delete only the generated agent files:

Terminal window
tuff delete my-skill

For a capability added from an existing .agents/ or .claude/ directory, remove Tuff tracking without touching the files:

Terminal window
tuff untrack my-skill

Both commands use the configured default agent unless -a/--agent is provided. delete refuses in-place added capabilities and requires --force for locally modified generated files. untrack removes the target lock entry and baseline while preserving the capability files and MCP configuration. The original source directory is never deleted by delete.

See the CLI Reference for cleanup flags and explicit agent selection.

For git-backed capabilities, Tuff can compare baseline, local, and upstream together:

Terminal window
tuff outdated
tuff diff rust-implement --upstream
tuff update rust-implement --check
tuff update rust-implement

The update path for git-sourced capabilities works like this:

LocalUpstreamBehavior
cleanunchangedNo-op
cleanchangedApply upstream, refresh baseline
modifiedunchangedKeep local state, report drift
modifiedchangedAttempt three-way merge
conflictchangedReport conflicts and preserve local files

If you want to replace the local customized copy with upstream output, use:

Terminal window
tuff update <id> --force
CommandPurpose
tuff listShow drift status and agent paths
tuff diff <id>Show local changes against baseline
tuff diff <id> --upstreamShow upstream changes against baseline
tuff checkFail CI when tracked files drift
tuff outdatedShow whether git-sourced capabilities have newer revisions
tuff update <id>Accept local edits or reconcile git-backed changes
tuff delete <id>Delete Tuff-generated files for the default agent
tuff untrack <id>Remove tracking while preserving files for the default agent

The important difference is not just that Tuff detects drift. It keeps the capability metadata attached to the emitted files for the whole lifecycle:

  • source
  • version
  • agent
  • baseline
  • scope
  • update path

That makes the capability observable over time instead of becoming another copied file in the repo.