Skip to Content

File & JSON schemas

Exact fields and byte caps for pitafix.project-capture/1, CAPTURE.md, pitafix.trace/1, pitafix.tree/1, pitafix.blueprint/1, and agents/tasks/*.md.

View .md~1.6k tokens

Every file below is validated by PitaFix's Go runtime with regular-file checks (symlinks and escaping paths are refused) and hard byte caps.

Size limits

ArtifactSchema ID / LocationCap
Project capture config.pitafix/capture.json (pitafix.project-capture/1)256 KiB
Capture playbook.pitafix/CAPTURE.md64 KiB
Level-0 trace NDJSON line$PITAFIX_TRACES_DIR/<run>/trace.ndjson (pitafix.trace/1)64 MiB / line
Normalized UI treeartifacts/*.tree.json (pitafix.tree/1)128 MiB
Markdown task fileagents/tasks/*.md512 KiB / file (8,000 chars ## Result, max 2,000 files)
MCP serialized replypitafix mcp2 MiB

1. .pitafix/capture.json (pitafix.project-capture/1)

Lives in <repo>/.pitafix/capture.json or sidecar <PITAFIX_DATA_DIR>/projects/<rootCommit>/capture/capture.json. Parsed with DisallowUnknownFields().

FieldTypeRequiredDescription
schemastringYesAlways "pitafix.project-capture/1".
commandstring[]YesArgv executed with recorder environment variables.
kindstringNo"web", "native", "mobile", or "trace".
namestringNoDisplay label for the capture setup.
workDirstringNoRepo-relative working directory for command.
diffScopedbooleanNotrue when the script honors PITAFIX_DIFF_SCOPED, PITAFIX_AFFECTED_JOURNEYS, and PITAFIX_CHANGED_FILES.
livebooleanNotrue when the script supports PITAFIX_LIVE=1 hand-over via POST /v1/sessions/{id}/hold.
allowedHostsstring[]NoUp to 64 bare external DNS hostnames (no scheme, port, or wildcard); requires one-time human approval.
runInCopybooleanNoDeclared optional flag (reserved for git-archive copy execution).
timeoutSecondsintegerNoExecution timeout in seconds (default 900, max 21600).

2. Level-0 trace (pitafix.trace/1)

Write one folder per run under $PITAFIX_TRACES_DIR/<unique-run-id>/ (or .pitafix/traces/) containing trace.ndjson, artifacts/*.png, and artifacts/*.tree.json. Give each capture a unique run ID (already-ingested run IDs are skipped idempotently).

Record typeFields
metaschema: "pitafix.trace/1", run, commit, dirty, source, dataSource, proofLevel, core, driver?, facets, clock?
journeyid, name, intent?, role?, expectedOutcome?, section?, sourceRefs?, seed?
stepid, seq, journey?, t?, dur?, status, error?, action, nav?, screen?, artifacts?: [{ kind, phase?, path, sha256?, w?, h?, format?, redaction? }], counters?, depth?, parentStepId?, group?, attempt?, replayPath?, proofLevel?
attributionstep, file, symbol?, lines? (for example "511F,512P"), line?, count?, confidence?, tier, source, flags?, commit?, repo?
endstatus, error? (missing end marks a crashed or in-progress run)
{"type":"meta","schema":"pitafix.trace/1","run":"r_20261130_android_home","commit":"$PITAFIX_COMMIT","source":"test","dataSource":"fixture","proofLevel":"rendered-fixture","core":{"id":"project-capture","version":"1.0"},"facets":{"platform":"android","deviceModel":"Pixel 8"}}
{"type":"journey","id":"home","name":"Open home"}
{"type":"step","id":"st_1","seq":1,"journey":"home","status":"passed","action":{"kind":"launch","actor":"script"},"screen":{"name":"Home","identity":{"method":"manual","key":"/home"}},"artifacts":[{"kind":"screenshot","phase":"after","path":"artifacts/0001.png","sha256":"<sha256>","w":1080,"h":2400}]}
{"type":"attribution","step":"st_1","file":"shared/src/commonMain/kotlin/HomeScreen.kt","lines":"12F,13F","tier":"composable","source":"coverage"}
{"type":"end","status":"passed"}

3. Normalized UI tree (pitafix.tree/1)

{
  "schema": "pitafix.tree/1",
  "w": 1080,
  "h": 2400,
  "root": {
    "name": "HomeScreen",
    "role": "button",
    "label": "Checkout",
    "id": "checkout-cta",
    "file": "shared/src/commonMain/kotlin/HomeScreen.kt",
    "line": 42,
    "bounds": { "x": 48, "y": 1960, "w": 984, "h": 112 },
    "children": []
  }
}
  • w, h, and bounds use screenshot pixels; file is repo-relative; line is the 1-based call site.

4. Blueprint manifest (pitafix.blueprint/1)

Root file blueprint.json inside a blueprint directory or .zip/.tar.gz archive (stored immutably under <PITAFIX_DATA_DIR>/blueprints/<id>/<version>/ and SHA-256 verified on every load; symlinks and non-local paths are refused):

FieldTypeDescription
schemastring"pitafix.blueprint/1"
id, name, versionstringRequired bundle identity and version
author, descriptionstringOptional metadata
commitobjectformat, maxSubjectLength?, noBody?, noTrailingPeriod?, noToolTrailers?, types?, allowAreaOmission?, joinMultiple?, hookTemplate?, guidelinesDoc?, examples?
agentsobjectrootFile?, noClaudeMd?, copilotPointer?, skillsDir?, claudeSkillsSymlink?, settingsTemplate?, prSkill?
stacksmap<string, Stack>name, detect?, agentsTemplate?, packages?, templates?, skills?, subagents?, gates?: [{ id, label, command[], when? }], passes?: [{ name, prompt, on }], capture?: { dir?, attributionMiddleware? }
modulesmap<string, Module>name, appliesTo?, default?, path, description?
planSeedmap<string, PlanSeed[]>Starter { area, objective? } rows

5. Markdown task files (agents/tasks/*.md)

Written into <repo>/agents/tasks/<number>-<slug>.md with images in agents/tasks/images/ (reopened history archived as <number>-<slug>.done-N.md). Completion steps live in Work tasks & epics.

---
comment: 12
id: c_01...
screen: "Checkout"
type: bug        # optional: task | bug | feature
status: open     # set to "done" when finished
commit: abc1234  # optional
---

On this page