Charter
quicue.ca/charter — constraint-first project planning via CUE unification.
Declare what "done" looks like. Build the graph incrementally. cue vet tells you what's missing. When it passes, the charter is satisfied.
The gap between constraints and data IS the remaining work.
Schemas
#Charter#Gate#GapAnalysis#Milestone#InfraCharter
How It Works
A charter is a set of CUE constraints that the project graph must eventually satisfy. You declare scope (what must exist), gates (checkpoints along the way), and let CUE compute the delta.
import "quicue.ca/charter"
_charter: charter.#Charter & {
name: "NHCF Deep Retrofit"
scope: {
total_resources: 18
root: "nhcf-agreement"
required_resources: {"rideau-design": true, "gladstone-design": true}
required_types: {Assessment: true, Design: true, Retrofit: true}
min_depth: 3
}
gates: {
"assessment-complete": {
phase: 1
requires: {"site-audit": true, "energy-model": true}
}
"design-complete": {
phase: 3
requires: {"rideau-design": true, "gladstone-design": true}
depends_on: {"assessment-complete": true}
}
}
}
Gap Analysis
#GapAnalysis takes a charter and a graph, and computes what's missing:
| Field | Type | Description |
|---|---|---|
complete |
bool |
true when all constraints are satisfied |
missing_resources |
{[string]: true} |
Named resources not yet in the graph |
missing_types |
{[string]: true} |
Required types not represented |
depth_satisfied |
bool |
Graph reaches min_depth |
gate_status |
{[name]: {satisfied, missing, ready}} |
Per-gate evaluation |
unsatisfied_gates |
{[name]: {missing}} |
Gates not yet met |
next_gate |
string |
Lowest-phase unsatisfied gate |
When gaps.complete == true, the charter is satisfied. When it's false, the missing fields tell you exactly what to build next.
Scope constraints
The scope block supports five constraint types, all optional:
| Constraint | Type | Meaning |
|---|---|---|
total_resources |
int & >0 |
Minimum resource count |
root |
string \| {[string]: true} |
Named root(s) that must exist as graph roots |
required_resources |
{[string]: true} |
Resources that must exist by name |
required_types |
{[string]: true} |
Types that must be represented |
min_depth |
int & >=0 |
Minimum graph depth |
Live integrations
Charter is used across five downstream projects, each a different domain shape:
| Project | Graph | Nodes | Gates | Domain |
|---|---|---|---|---|
| cmhc-retrofit NHCF | Project delivery | 18 | 5 | Construction PM |
| cmhc-retrofit Greener Homes | Service topology | 17 | 5 | IT platform |
| maison-613 Transaction | Deal phases | 16 | 6 | Real estate |
| maison-613 Compliance | Obligation graph | 12 | 4 | Regulatory |
| homelab | Infrastructure | 50 | 2 | Homelab |