Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 51 additions & 16 deletions .egg/schemas/yaml-tasks.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@
"title": "YAML Tasks Schema",
"description": "Schema for the structured yaml-tasks appendix in plan documents. This schema defines the machine-readable format that accompanies human-readable plan prose.",
"type": "object",
"required": ["phases"],
"anyOf": [
{ "required": ["slices"] },
{ "required": ["phases"] }
],
"properties": {
"slices": {
"type": "array",
"description": "Implementation slices with their tasks. Canonical top-level key (post-#2137); each slice is independently implementable and gets its own integration branch, agent team, BRC consensus, and PR.",
"minItems": 1,
"items": {
"$ref": "#/$defs/slice"
}
},
"phases": {
"type": "array",
"description": "Implementation phases with their tasks",
"description": "Legacy alias for 'slices' (pre-#2137). Accepted for backward compatibility; new plans should emit 'slices'. When both keys are present, 'slices' wins.",
"minItems": 1,
"items": {
"$ref": "#/$defs/phase"
"$ref": "#/$defs/slice"
}
},
"pr": {
Expand All @@ -27,53 +38,77 @@
"description": {
"type": "string",
"description": "PR description/body explaining the context and changes"
},
"test_plan": {
"type": "string",
"description": "Test plan for the PR — which automated tests cover the changes and the manual steps a reviewer takes to verify them. Strongly recommended."
},
"manual_steps": {
"type": "string",
"description": "Manual steps required before merge (e.g. migrations, config changes) or after merge (e.g. deployments, cache invalidation)."
},
"context_title": {
"type": "string",
"description": "Optional title for the dedicated context PR (#2548). When omitted, the context PR reuses 'pr.title'."
},
"context_description": {
"type": "string",
"description": "Optional description for the dedicated context PR (#2548). When omitted, the context PR reuses 'pr.description'."
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"$defs": {
"phase": {
"slice": {
"type": "object",
"description": "An implementation phase containing tasks",
"description": "An implementation slice containing tasks. Each slice is independently implementable with its own integration branch, agent team, BRC consensus, and PR.",
"required": ["id", "name", "tasks"],
"properties": {
"id": {
"oneOf": [
{
"type": "integer",
"minimum": 1,
"description": "Phase number (e.g., 1, 2, 3)"
"description": "Slice number (e.g., 1, 2, 3)"
},
{
"type": "string",
"pattern": "^(phase-)?[0-9]+$",
"description": "Phase identifier (e.g., '1' or 'phase-1')"
"pattern": "^(slice-|phase-)?[0-9]+$",
"description": "Slice identifier (e.g., '1', 'slice-1', or 'phase-1')"
}
],
"description": "Unique phase identifier"
"description": "Unique slice identifier"
},
"name": {
"type": "string",
"description": "Human-readable phase name",
"description": "Human-readable slice name",
"minLength": 1
},
"goal": {
"type": "string",
"description": "What this phase achieves"
"description": "What this slice achieves"
},
"dependencies": {
"type": "string",
"description": "What must be completed before this phase"
"description": "The single parent slice this slice depends on, written as a 'slice-<N>' id (e.g. 'slice-1'). The slice DAG is a forest, so a slice has at most one parent — this is one id, not a list. The parser also tolerates a 'depends_on' alias; that alias is intentionally NOT in this schema, since a prescriptive schema teaches only the canonical key."
},
"serialized_chain_order": {
"type": "array",
"description": "When a would-be multi-parent slice is serialised into a chain (the slice DAG must be a forest), the chosen upstream order recorded as 'slice-<N>' ids (#2137). The parser also tolerates a comma-separated string, but an array is the canonical shape.",
"items": {
"type": "string"
},
"default": []
},
"exit_criteria": {
"type": "string",
"description": "How we know this phase is complete"
"description": "How we know this slice is complete"
},
"tasks": {
"type": "array",
"description": "Tasks in this phase",
"description": "Tasks in this slice",
"minItems": 1,
"items": {
"$ref": "#/$defs/task"
Expand All @@ -84,12 +119,12 @@
},
"task": {
"type": "object",
"description": "A task within a phase",
"description": "A task within a slice",
"required": ["id", "description", "acceptance"],
"properties": {
"id": {
"type": "string",
"description": "Task identifier in TASK-{phase}-{number} format",
"description": "Task identifier in TASK-{slice}-{number} format",
"pattern": "^[Tt][Aa][Ss][Kk]-[0-9]+-[0-9]+$"
},
"description": {
Expand Down
8 changes: 4 additions & 4 deletions docs/templates/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,21 @@ slices:
[Criteria for completion]
role: coder # Optional: coder | tester | documenter
files:
- [path/to/file]
- "[path/to/file]"
- id: TASK-1-2
description: |-
[Task description]
acceptance: |-
[Criteria for completion]
role: tester
files:
- [path/to/test_file]
- "[path/to/test_file]"
- id: 2
name: |-
[Phase Name]
goal: |-
[What this phase achieves]
dependencies: [1]
dependencies: "slice-1"
tasks:
- id: TASK-2-1
description: |-
Expand All @@ -120,7 +120,7 @@ slices:
[Criteria for completion]
role: coder
files:
- [path/to/file]
- "[path/to/file]"
```

> **YAML safety**: Always use block scalars (`|-`) for `name`, `goal`,
Expand Down
Loading
Loading