Deep Dive: Task Board
Build a complete Task Board application with multiple modules, entities, workflows, screens, tests, and governance policies.
1 Project Setup
Start with a fresh project:
prodara init task-board --template minimal
cd task-boardWe'll evolve this minimal project into a full multi-file Task Board with 4 specification files.
2 Product Declaration
Replace app.prd with the product declaration:
product task_board {
title: "Task Board"
version: "1.0.0"
modules: [board, platform]
}This declares a product with two modules: board for the core task management domain, and platform for cross-cutting concerns.
3 Domain Model
Create board.prd with entities and enums:
module board {
actor member {
title: "Team Member"
}
actor admin {
title: "Board Admin"
}
entity task {
task_id: uuid
title: string
description: optional<string>
status: task_status = backlog
assignee: optional
created_at: datetime
}
enum task_status {
backlog
todo
in_progress
review
done
}
enum task_error {
invalid_title
unauthorized
task_not_found
}
} 4 Workflows
Add workflows to board.prd:
capability task_management {
title: "Task Management"
}
workflow create_task {
capability: task_management
authorization { member: [task.create] }
writes { task }
returns { ok: task; error: task_error }
}
workflow move_task {
capability: task_management
authorization { member: [task.update] }
reads { task }
writes { task }
transitions {
task.status: backlog -> todo
task.status: todo -> in_progress
task.status: in_progress -> review
task.status: review -> done
}
returns { ok: task; error: task_error }
}
workflow delete_task {
capability: task_management
authorization { admin: [task.delete] }
writes { task }
returns { ok: task; error: task_error }
}5 Surfaces
Add screens to board.prd:
surface board_view {
kind: dashboard
title: "Task Board"
binds: task
actions: [do_create_task, do_move_task]
hooks { load: load_tasks }
}
surface task_detail {
kind: view
title: "Task Detail"
binds: task
actions: [do_move_task, do_delete_task]
}
action do_create_task { workflow: create_task }
action do_move_task { workflow: move_task }
action do_delete_task { workflow: delete_task }6 Governance
Create platform.prd with a constitution:
module platform {
constitution board_policies {
policies {
security {
authentication: required
authorization: required
}
testing {
tests_required: true
}
style {
indentation: 2
naming: camelCase
}
}
}
}7 Specification Tests
Add tests at the end of board.prd:
test create_task_auth {
target: create_task
expect {
authorization {
member: allowed
}
}
}
test move_task_transitions {
target: move_task
given { task.status: todo }
expect {
transition: "task.status: todo -> in_progress"
returns: ok
}
}8 Compile & Test
Run the full pipeline:
# Validate
prodara validate .
# Compile to Product Graph
prodara graph --output product-graph.json .
# Run tests
prodara test .
# Full build pipeline
prodara build .9 Semantic Diffing
Now make a change - add a priority field to the task entity - and see the incremental plan:
# First, compile to establish a baseline
prodara build .
# Now edit board.prd - add: priority: integer = 0
# Then generate the incremental plan
prodara plan --format json .The plan shows which nodes changed and which downstream artifacts are impacted, including the depth of impact propagation through the graph.
What's Next?
- Governance Reference - Constitution policies, security, privacy
- Agent Integration - Feed the Product Graph to AI agents
- API Reference - Use the compiler programmatically