Plan Schema¶
Reference for the plan.json file structure.
Overview¶
A plan.json file contains:
meta: Project metadata
summary: Calculated progress statistics
phases: Array of phases, each containing tasks
Minimal Example¶
{
"meta": {
"project": "My Project",
"version": "1.0.0",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
},
"summary": {
"total_phases": 1,
"total_tasks": 1,
"completed_tasks": 0,
"overall_progress": 0
},
"phases": [
{
"id": "0",
"name": "Setup",
"description": "Initial setup",
"status": "pending",
"progress": { "completed": 0, "total": 1, "percentage": 0 },
"tasks": [
{
"id": "0.1.1",
"title": "Initialize project",
"status": "pending",
"depends_on": [],
"tracking": {}
}
]
}
]
}
Full Schema¶
See examples/complex.json for a complete example with all optional fields.
Meta Object¶
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Project name |
|
string |
Yes |
Plan version (semver) |
|
string |
Yes |
ISO 8601 creation timestamp |
|
string |
Yes |
ISO 8601 last update timestamp |
|
string |
No |
Path to business plan document |
Summary Object¶
Automatically calculated by pv when saving:
Field |
Type |
Description |
|---|---|---|
|
integer |
Number of phases |
|
integer |
Total tasks across all phases |
|
integer |
Number of completed tasks |
|
number |
Percentage complete (0-100) |
Phase Object¶
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Unique phase identifier |
|
string |
Yes |
Phase name |
|
string |
Yes |
Phase description |
|
string |
Yes |
pending, in_progress, completed, blocked, skipped |
|
object |
Yes |
Calculated progress for this phase |
|
array |
Yes |
Array of task objects |
Special Phase IDs¶
deferred: Tasks postponed for later consideration99: Bug tracking phase (convention)
Task Object¶
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Unique task ID (format: |
|
string |
Yes |
Task title |
|
string |
Yes |
pending, in_progress, completed, blocked, skipped |
|
string |
No |
Agent type for the task |
|
array |
Yes |
Array of task IDs this task depends on |
|
object |
Yes |
Timestamps for started_at and completed_at |
|
string |
No |
critical, high, medium, low |
|
integer |
No |
Estimated time to complete |
|
array |
No |
Nested subtask objects |
Task ID Format¶
Task IDs follow the pattern phase.section.task:
0.1.1 -> Phase 0, section 1, task 1
1.2.3 -> Phase 1, section 2, task 3
99.1.5 -> Bugs phase, section 1, task 5
Valid Statuses¶
Status |
Meaning |
|---|---|
|
Not started |
|
Currently being worked on |
|
Finished successfully |
|
Cannot proceed |
|
Intentionally skipped |
Auto-Calculated Fields¶
When saving a plan (via any edit command), pv automatically:
Updates
meta.updated_atto current timestampRecalculates
progressfor each phaseRecalculates the
summarytotalsUpdates phase
statusbased on task completion
Validation¶
Use pv validate to check your plan.json against the schema:
$ pv validate
plan.json is valid
$ pv validate --json
{"valid": true, "path": "plan.json"}
Invalid plans show the specific error:
$ pv validate
Validation failed for plan.json:
'status' is a required property
Path: phases.0.tasks.0
Agent Types¶
Agent types are flexible strings. Common conventions:
Type |
Use Case |
|---|---|
|
Default, general tasks |
|
Python backend development |
|
Frontend/UI development |
|
Git operations, PR management |
|
Documentation tasks |
|
Architecture decisions |
|
Testing tasks |
Any kebab-case string is valid: ^[a-z][a-z0-9-]*$
Example Files¶
The repository includes example plans:
examples/simple.json: Basic project with 3 phases, 5 tasksexamples/complex.json: Full-featured example with priorities, estimates, decisions
Explore them:
pv -f examples/simple.json
pv -f examples/complex.json summary