This document shows how humans and agents should experience Tig.
Task: fix flaky scheduler test
Base: main@snapshot-100
Actor: Codex
- Tig creates a workspace.
- The agent reads relevant files through the API or local mount.
- The agent applies a patch.
- Tig records a snapshot.
- The agent runs tests.
- Tig records the run against the exact snapshot.
- The agent edits again if needed.
- Tig records another snapshot.
- The agent proposes a review unit from the latest passing snapshot.
- A human reviews and approves.
- Tig publishes the selected result.
Example state:
Attempt: codex-fix-scheduler
Workspace: codex-fix-scheduler
Snapshot s1: initial patch
Run: npm test scheduler -> failed
Snapshot s2: cleanup timers
Run: npm test scheduler -> passed
Review Unit: from s2 to main@snapshot-100
Goal: reduce API latency
Tig creates multiple attempts:
Attempt A: Claude
Strategy: cache expensive query
Result: tests pass, benchmark 15% faster
Attempt B: Codex
Strategy: add database index
Result: tests pass, benchmark 40% faster, migration required
Attempt C: human
Strategy: remove redundant fetch
Result: tests pass, benchmark 10% faster, smallest diff
The reviewer can compare:
- changed files
- test results
- benchmark results
- policy violations
- review risk
- implementation size
The selected attempt becomes a review unit. The others remain archived evidence.
A human should not need to learn agent-specific workflow.
tig workspace create billing-cleanup
The workspace can be mounted locally and opened in an editor. Tig captures snapshots automatically while the human works.
When ready:
Latest snapshot: s8
Latest passing snapshot: s6
Changed files: 5
Review suggestion: create review from s6
The human can choose a clean state without manually stashing, rebasing, or rewriting commits.
Security Fix Is Hidden Until Release
Workspace: private-security-hotfix
Policy: visible only to security team
The fix can be developed, tested, and reviewed privately.
Publication can later happen in stages:
- publish advisory to security projection
- publish patch to internal projection
- release package
- publish final source to public projection
The public projection does not expose the exploit details while the fix is still in progress.
Project: runtime-platform
/packages/sdk-public
/packages/orchestrator-private
/docs
/infra
The public projection includes:
/packages/sdk-public
/docs
/examples
It excludes:
/packages/orchestrator-private
/infra
/security
This lets a project be meaningfully open source without splitting into artificial repositories.
An agent or human may create many snapshots:
s1: first patch, tests fail
s2: second patch, tests pass
s3: refactor, tests fail
s4: debug logging, tests pass but messy
The review unit can be created from s2 instead of the latest state.
This is a key Tig behavior: the system preserves messy work but lets review use the best selected state.