Docs/Reference/Manifest Schema

Manifest Schema

The manifest at .pu/manifest.json is the single source of truth for workspace state. It is managed by the daemon; do not edit it directly.

All fields use camelCase JSON serialization. Optional fields are omitted when null or false.

Root object

{
  "version": 1,
  "projectRoot": "/path/to/project",
  "worktrees": {},
  "agents": {},
  "createdAt": "2026-03-08T00:00:00Z",
  "updatedAt": "2026-03-08T12:00:00Z"
}
FieldTypeDescription
versionnumberSchema version (currently 1)
projectRootstringAbsolute path to the project
worktreesmap<string, WorktreeEntry>Worktrees keyed by worktree ID
agentsmap<string, AgentEntry>Root-level agents keyed by agent ID
createdAtdatetimeWhen the workspace was initialized
updatedAtdatetimeLast modification timestamp

WorktreeEntry

FieldTypeRequiredDescription
idstringyesFormat: wt-{8chars}
namestringyesHuman-readable name (git branch slug)
pathstringyesAbsolute path to worktree directory
branchstringyesGit branch name, typically pu/{name}
baseBranchstringnoBase branch (e.g., "main")
statusWorktreeStatusyesLifecycle state
agentsmap<string, AgentEntry>yesAgents in this worktree
createdAtdatetimeyesISO 8601
mergedAtdatetimenoWhen the worktree was merged

WorktreeStatus

ValueDescription
activeWorktree is in use
mergingMerge in progress
mergedSuccessfully merged
failedMerge or operation failed
cleanedWorktree removed and cleaned up

AgentEntry

FieldTypeRequiredDescription
idstringyesFormat: ag-{8chars}
namestringyesHuman-readable name
agentTypestringyesclaude, codex, opencode, or terminal
statusAgentStatusyesCurrent state
promptstringnoInitial prompt text
startedAtdatetimeyesWhen the agent was spawned
completedAtdatetimenoWhen the agent exited
exitCodenumbernoProcess exit code
errorstringnoError message if failed
pidnumbernoOS process ID
sessionIdstringnoUUID v4 session identifier (claude agents)
suspendedboolnoWhether the agent is suspended
suspendedAtdatetimenoWhen suspended
commandstringnoShell command used to spawn
planModeboolnoWhether spawned in plan/architect mode
triggerNamestringnoBound trigger definition name
triggerSeqIndexnumbernoCurrent position in trigger sequence
triggerStateTriggerStatenoTrigger execution state
triggerTotalnumbernoTotal actions in trigger sequence
gateAttemptsnumbernoGate retry count
noTriggerboolnoSkip auto-triggers for this agent

AgentStatus

ValueDescription
streamingActive, producing output
waitingAlive but idle, or suspended
brokenProcess exited

TriggerState

ValueDescription
activeTrigger sequence in progress
gatingEvaluating a gate command
completedAll actions executed successfully
failedSequence stopped due to failure

Persistence

  • Writes: Atomic via temp file, fsync, rename
  • Locking: Advisory exclusive lock via fs4 during updates
  • Watching: macOS app uses GCD DispatchSource with 50ms debounce

Example

{
  "version": 1,
  "projectRoot": "/Users/jono/myproject",
  "worktrees": {
    "wt-abc12345": {
      "id": "wt-abc12345",
      "name": "fix-auth",
      "path": "/Users/jono/myproject/.pu/worktrees/wt-abc12345",
      "branch": "pu/fix-auth",
      "baseBranch": "main",
      "status": "active",
      "agents": {
        "ag-xyz98765": {
          "id": "ag-xyz98765",
          "name": "Claude",
          "agentType": "claude",
          "status": "streaming",
          "prompt": "Fix the authentication bug in login.ts",
          "startedAt": "2026-03-08T12:05:00Z",
          "pid": 12345,
          "sessionId": "550e8400-e29b-41d4-a716-446655440000"
        }
      },
      "createdAt": "2026-03-08T12:00:00Z"
    }
  },
  "agents": {
    "ag-root1111": {
      "id": "ag-root1111",
      "name": "Researcher",
      "agentType": "claude",
      "status": "waiting",
      "prompt": "Research the codebase structure",
      "startedAt": "2026-03-08T11:00:00Z",
      "sessionId": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
      "planMode": true
    }
  },
  "createdAt": "2026-03-01T00:00:00Z",
  "updatedAt": "2026-03-08T12:05:30Z"
}