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

# Approval Review

> Learn how TeamCopilot approval review works for skills and workflows, including snapshots, diffs, and restore flows.

TeamCopilot uses approval review to decide when a skill or workflow version is trusted enough for regular use.

```mermaid theme={null}
flowchart LR
    A[Edit skill or workflow] --> B[Build current snapshot]
    B --> C{Matches approved snapshot?}
    C -->|Yes| D[Resource remains approved]
    C -->|No| E[Show approval diff]
    E --> F[Engineer reviews files]
    F --> G{Approve or restore?}
    G -->|Approve| H[Store new approved snapshot]
    G -->|Restore| I[Revert to last approved snapshot]
```

## What approval means

Approval is tied to the current filesystem snapshot of the resource.

When a resource is approved, TeamCopilot records:

* the approved snapshot hash
* the number of files in the approved version
* who approved it
* when it was approved

If the resource changes after approval, the current code is no longer considered approved until it is reviewed again.

## Who can approve

Only engineers can review and approve the current version of a skill or workflow.

This is the control point that separates authorship from trust. A user can create or edit a resource, but approval is still a deliberate step.

## What the review screen shows

The approval review page is meant to answer:

* what changed
* which files were added, modified, or deleted
* whether there are binary files
* whether anything was ignored in the diff
* whether the current version matches the approved snapshot

For many resources, the diff is enough to review in text. If a resource has a large file tree or binary-heavy changes, a screenshot may help, but it is not required for the general case.

## What happens after approval

Once a resource is approved:

* the current snapshot is stored as the trusted version
* permissions can be managed normally
* approved content can be used by the agent runtime

If the resource changes later, TeamCopilot treats it as pending again until reviewed.

```mermaid theme={null}
sequenceDiagram
    participant E as Engineer
    participant UI as Approval review page
    participant B as Backend
    participant S as Snapshot store

    E->>UI: Open review page
    UI->>B: Request current and approved snapshots
    B->>S: Load last approved snapshot
    B-->>UI: Diff + approval state
    E->>UI: Approve or restore
    UI->>B: Submit action
    B->>S: Update approved snapshot or restore files
```

## Restore to approved version

The review flow can restore a resource back to the last approved snapshot.

This is useful when:

* a change was accidental
* a review failed and you want to revert quickly
* the approved version is still the desired baseline

## Relationship to permissions

Permissions and approval are separate:

* approval says whether the current version is trusted
* permissions say who can view or run it

You generally want both:

* approve the resource before wider use
* then decide whether access should be restricted or open to everyone
