Data Model — Mission-Type Creatability (S-C)
Schema + graph deltas. No database; entities are doctrine models + DRG nodes/edges.
Entity changes
MissionType (src/doctrine/missions/models.py)
- Change: remove the
template_set: dict[str, str] | Nonefield.MissionTypeisfrozen, extra="forbid"— after removal, any YAML authoringtemplate_set:fails validation (the loud-fail, SC-002). - Retained:
schema_version,id,display_name,extends,action_sequence(unchanged —action_sequencesymmetry deferred to #2751). - Invariant: no
.stepsattribute — steps resolve separately viaMissionStepRepository.
MissionStep / MissionStepTemplateRef (models.py:87, :90-105)
- Unchanged shape; newly populated for the 3 types:
template: MissionStepTemplateRef(artifact_key, template_file). - Authoring contract (C-003 / DD-03):
artifact_key ∈ {"spec", "plan"}(shared runtime vocabulary —"spec"for creation,"plan"for/plan-setup);template_fileper-type-unique (NFR-006). - Ordering (FR-011): steps are ordered by
sequence_indexat the projection source (deterministic).
template_set projection (step_projection.py:88)
- Producer:
project_template_set(steps) -> dict[artifact_key, template_file] | None— now the only source (no persisted field, no raw-YAML fallback). - Consumers:
_resolve_template_set_slot(mission_type_profiles.py:744, cached per(mission_type, pack_context)) →ResolvedMissionType.template_set(@cached_property, name retained per C-006) →resolve_configured_template(resolver.py:395, signature unchanged).
DRG graph delta (Concern C)
New nodes
template:<mission>/<file>(kindTEMPLATE) viatemplate_catalog.template_urn— one per authored/existing steptemplateref. software-dev contributes 2 (template:software-dev/spec-template.md,template:software-dev/plan-template.md).- Distinct from the 16 bare
template:<name>exemplars (#2712), which stay untouched (template.graph.yaml,edges:[]).
New edges
action:<type>/<step> --instantiates--> template:<type>/<file>(Relation.INSTANTIATES), action-sourced → land inaction.graph.yaml.
Counts (NFR-002)
- N = every step carrying a
templateref across all four types (software-dev's 2 included). N is computed at the end of authoring (derived from FR-007), never pinned upfront. - Node delta = edge delta = N.
_EXPECTED_NODE_COUNT280 →280+N;_EXPECTED_EDGE_COUNT757 →757+N. - Orphans stay 10 (each new template node has an
instantiatesin-edge; the sourceaction:node already exists). Ceiling 14 untouched.
State / lifecycle
- No new state machine. The only lifecycle effect: the 3 types transition from uncreatable (
template_setprojectsNone→TemplateConfigurationError) to creatable (non-null projection) once their steps carryartifact_key:"spec"refs.