quicue.ca
Describe infrastructure as a dependency graph in CUE, check it, and export the views and formats other tools expect.
What this is
quicue.ca is a set of CUE schemas for describing infrastructure as a dependency graph. Each resource (a server, a container, a service) is a node with a type and a list of what it depends on. From that, CUE works out which layer each resource sits in, everything it depends on directly or indirectly, what fails if it goes down, and the order to deploy in. The same graph can also be exported as W3C linked data.
dns: #Resource & {
"@type": {LXCContainer: true, DNSServer: true}
depends_on: {router: true}
host: "node-1"
container_id: 101
}
Everything is computed when you run cue vet or cue export. There is no agent, state file or plugin system, and the output is plain JSON. If you also write down what the finished system must contain, any requirement not yet met shows up as a validation error, which gives you a running to-do list.
Overview
| Metric | Count |
|---|---|
| Modules | 12 |
| Decisions (ADRs) | 14 |
| KB Patterns | 16 |
| Insights | 14 |
| Semantic Types | 57 |
| Downstream Consumers | 3 |
| Deployed Sites | 7 |
Modules
| Module | Layer | Description |
|---|---|---|
| vocab | definition |
Core schemas: #Resource, #Action, #TypeRegistry, #ActionDef |
| patterns | definition |
Algorithms: graph, bind, deploy, health, SPOF, viz, TOON, OpenAPI, validation |
| templates | template |
29 platform-specific providers, each a self-contained CUE module |
| orche | orchestration |
Orchestration schemas: execution steps, federation, drift detection, Docker site bootstrap |
| boot | orchestration |
Bootstrap schemas: #BootstrapResource, #BootstrapPlan, credential collectors |
| wiki | projection |
#WikiProjection — MkDocs site generation from resource graphs |
| cab | reporting |
Change Advisory Board reports: impact, blast radius, runbooks |
| ou | interaction |
Role-scoped views: #InteractionCtx narrows #ExecutionPlan by role, type, name, layer. Hydra W3C JSON-LD export. |
| ci | ci |
Reusable GitLab CI templates for CUE validation, export, topology, impact |
| server | operations |
FastAPI execution gateway for running infrastructure commands |
| charter | constraint |
Constraint-first project planning: declare scope, evaluate gaps, track gates. SHACL gap report projection. |
| examples | value |
17 working examples from minimal 3-layer to full 30-resource datacenter |
Not just infrastructure
The analysis patterns (#BlastRadius, #ImpactQuery, #SinglePointsOfFailure, #DeploymentPlan) only see nodes and dependencies, not what the nodes represent. The question "what breaks if X goes down?" works the same way when X is a DNS server, a phase of a construction project, or a step in a business process.
| Domain | What the graph models | Live |
|---|---|---|
| IT infrastructure | 30 servers, containers, and services across 7 dependency layers | datacenter example |
| Construction management | Deep retrofit work packages for 270-unit community housing program | CMHC Retrofit |
| Energy efficiency | 17-service processing platform for Ontario Greener Homes | Greener Homes |
| Real estate operations | Transaction pipelines, referral networks, compliance workflows | maison-613 |
What it computes
| Pattern | What it answers |
|---|---|
#InfraGraph |
Which layer each resource is in, and everything it depends on |
#BindCluster |
Which platform provider handles each resource, with the commands filled in |
#ImpactQuery |
What breaks if a given resource goes down |
#BlastRadius |
What a change affects, and the order to roll it back |
#SinglePointsOfFailure |
Resources with no redundant alternative |
#HealthStatus |
How a simulated failure spreads through the graph |
#DeploymentPlan |
Deployment order, layer by layer, with checkpoints |
#ExecutionPlan |
All of the above in one result |
#Charter |
What the finished system must contain, and the milestones on the way |
#GapAnalysis |
What is still missing, what to do next, and which milestones are met |
See the Pattern Catalog for the full list and Charter for project planning.
Downstream Consumers
| Project | Domain | Patterns Used |
|---|---|---|
| homelab | Production infrastructure graph — multi-node cluster with ZFS storage, networking, and container orchestration | 14 |
| cmhc-retrofit | Construction program management (NHCF deep retrofit, Greener Homes processing platform) | 15 |
| maison-613 | Real estate operations — 7 graphs (transaction, referral, compliance, listing, operations, onboarding, client) | 14 |
Ecosystem Sites
| Site | Description |
|---|---|
| docs | MkDocs Material documentation site |
| demo | Operator dashboard — D3 graph, planner, resource browser |
| api | Static API showcase — 727 pre-computed JSON endpoints |
| cat | DCAT 3 data catalogue |
| kg | Knowledge graph framework spec |
| cmhc-retrofit | Construction program management showcase |
| maison613 | Real estate operations showcase |
Tests written as data
Instead of a separate test framework, expected results are written as ordinary CUE values next to the graph. CUE has to merge them with what it computed. If they disagree, for example if the graph says something other than docker is the root, cue vet fails:
// Expected results. These must agree with the computed graph or cue vet fails.
validate: valid: true
infra: roots: {"docker": true}
deployment: layers: [{layer: 0, resources: ["docker"]}, ...]
The checks live in the same language as the data, so there is no assertion library or test runner to maintain.
Quick Start
git clone https://github.com/quicue/quicue.ca.git
cd quicue.ca
# Validate schemas
cue vet ./vocab/ ./patterns/
# Run the datacenter example
cue eval ./examples/datacenter/ -e output.summary
# What breaks if the router goes down?
cue eval ./examples/datacenter/ -e output.impact."router-core"
# Export as JSON-LD
cue export ./examples/datacenter/ -e jsonld --out json
License
Apache 2.0