Topogram Model
Topogram Model
Section titled “Topogram Model”Topogram is a living app map that separates durable intent from stack realization.
Status: current Audience: humans and agents learning Topogram concepts Use when: you need the core model before editing specs, generators, extractors, or docs.
Topogram is a living app map. It keeps app intent, contracts, ownership, runtime topology, rules, and proof in one validated workspace so humans and agents can reason from bounded context before changing code.
The map can be authored directly, copied from a template, or extracted from a brownfield app as reviewable candidates. Once validated, it can drive generated outputs, maintained-app guidance, contracts, migration proposals, and agent query packets.
Source
Section titled “Source”topo/ contains .tg statements and markdown documents. The parser flattens
the folder tree into one graph, so folders are a human and agent convention.
Start with topogram init when you want a maintained repo or empty topo/
workspace. topogram init --adopt-sdlc also adopts enforced SDLC. Use
topogram copy when you want to copy a starter template into a generated
project.
Common statement kinds:
actor,role,term,domainentity,shape,enumrule,capability,orchestration,verificationwidget,region_contract,layout_contract,design_contract,design_realization_setjourney,workflowprojectiondecision- SDLC kinds:
pitch,requirement,acceptance_criterion,task,plan,bug
Project Config
Section titled “Project Config”topogram.project.json declares:
- workspace path, usually
./topo; - output ownership, generated or maintained;
- topology runtimes;
- generator bindings;
- runtime relationships such as
uses_apianduses_database; - ports and stack-specific runtime settings.
Contracts And Surfaces
Section titled “Contracts And Surfaces”Projection type describes the contract or surface:
ui_contractowns semantic UI: screens, layout usage, screen region overrides, widget bindings, behavior, visibility, navigation, and design tokens.region_contractandlayout_contractdefine reusable semantic work areas and templates. They are not DOM, SwiftUI, Android, or CSS layout trees.web_surface,ios_surface, andandroid_surfacerealize a UI contract for a concrete platform.design_contractowns design-system scope, supported platforms, package identity, surfaces, and token names.design_realization_setmaps shared semantic widgets to platform component refs and behavior support. The graph is a work map, not a framework render tree.api_contractowns API endpoints and wire contracts.db_contractowns database tables, columns, relations, indexes, and lifecycle intent.cli_surfaceowns command-line commands, options, effects, and examples.
Journeys
Section titled “Journeys”journey records describe ordered workflows for users, maintainers, and agents.
They use repeated step { ... } and alternate { ... } blocks so the graph can
preserve sequence, branch points, commands, expected outcomes, and related
capabilities or surfaces.
Canonical journeys are graph-native .tg statements. Markdown journey text is
supporting material or an import/reconcile draft until it is reviewed and
promoted into a journey record.
Workflows
Section titled “Workflows”workflow records describe app-owned state machines and process flows. They use
ordered state { ... } and transition { ... } blocks so agents can inspect
states, events, guards, linked capabilities, and verification targets without
reading source code or Markdown prose first.
Workflow-native extractors emit reviewable workflow candidates. Adoption turns
reviewed candidates into canonical workflow records under topo/; subsequent
query slice --workflow ... packets provide focused context for maintained
workflow changes and drift review.
Runtimes
Section titled “Runtimes”Topology runtimes are deployable or generated units:
web_surfaceapi_servicedatabaseios_surfaceandroid_surface
Runtimes bind projections to generators. Generators receive normalized contracts and write stack-specific output.
Ownership
Section titled “Ownership”Generated outputs can be replaced only when their generated sentinel is present. Maintained outputs are never overwritten; Topogram can still emit contracts, reports, checks, and migration proposals for maintained apps.