Codegen recipes
Table of Contents
Recipes related to codegen — the model-driven C++ generator and the documentation scaffold. Some entries below appear in both this inventory and Documentation recipes because they operate on docs through codegen; the file's path tells you where it physically lives.
Scaffolding documents (via codegen)
These recipes drive generate_doc.sh — the codegen-side wrapper
that produces documents. They also appear in Documentation
recipes under "Authoring documents".
- How do I create a new doc? — generic flow for every doctype.
- How do I create a component overview? — component-specific flow.
- How do I create a recipe? — recipe-specific conventions and
inventory wiring; physically under
recipes/documentation/. - How do I create a memory? — memory-specific conventions;
physically under
recipes/documentation/.
Entity management (compass codegen entity)
These recipes cover the compass codegen entity sub-commands — entity-level
operations that resolve entities by name or UUID prefix without needing to
know model paths or component names.
- How do I list codegen entities? — enumerate entities by metatype; get short UUID for
compass show. - How do I show generated files for a codegen entity? — staleness icons and archetype template per output file.
- How do I generate a codegen entity? — regenerate all profiles;
--profileto restrict;--dry-runto preview paths. - How do I preview entity codegen changes as a diff? — generate to temp and show unified diff without writing.
- How do I diff generated files for an entity? — git diff of on-disk generated files after generation.
Running codegen
- How do I run codegen?
- How do I add a domain service? — edit the single service registry
(a codegen model) and regenerate; it is the one source for
service_vars.sh, the SQL users/roles/grants, and the.envcreds.
Regenerating entity layers
- How do I regenerate all layers for a domain entity? — master recipe; component-wide run with manual diff scoping.
- How do I regenerate the SQL layer for an entity? —
sqlprofile; writes toores.sql/. - How do I regenerate the C++ domain layer for an entity? —
domainprofile; POCOs, JSON I/O, table I/O. - How do I regenerate the C++ generator layer for an entity? —
generatorprofile; test-data generators. - How do I regenerate the C++ repository layer for an entity? —
repositoryprofile; sqlgen entities, mappers, CRUD. - How do I regenerate the C++ service layer for an entity? —
serviceprofile; business-logic service layer. - How do I regenerate the C++ protocol layer for an entity? —
protocolprofile; NATS request/response structs. - How do I regenerate the NATS eventing layer for an entity? —
nats-eventingprofile; event type headers. - How do I regenerate the NATS handler layer for an entity? —
nats-handlerprofile; NATS message handler class. - How do I regenerate the Qt UI layer for an entity? —
qtprofile; list, detail, history, delegate, validator, view-widget.