Valenar Docs Codegen Rules
This page explains how Valenar docs should describe Content/, Generated/,
and the compiler without inventing syntax, ownership, or provenance.
Current Source Of Truth Split
Valenar v2 currently has one source-authority pipeline for game definitions:
examples/valenar-v2/Content/*.secsis the designer-facing source of truth for schema-owned Valenar rows and catalog metadata.examples/valenar-v2/Generated/Valenar.V2.Generated.csprojrunssecsc, emits compiler-owned C# intoobj/**/SecsGenerated, and compiles that output.examples/valenar-v2/Generated/ValenarHostIds.csis the only retained checked-in.csfile. It is explicit host-owned runtime ID metadata, not schema or catalog authority.
What Docs May Claim
Docs may say all of the following:
Content/is the source of truth for compiler-owned Valenar schema rows and catalog metadata.- Compiler-emitted files live under
Generated/obj/**/SecsGeneratedand includeSecsModule.g.cs,Hashes.g.cs, row-family outputs, catalog sidecars, author enums, travel encounter definitions, and config defaults. - The checked-in
Generated/root is intentionally tiny: the project file plusValenarHostIds.cs. ValenarHostIds.csmay be cited only as host-owned runtime/relation ID metadata.
Docs must not say any of the following unless a committed design doc proves it:
- that a nonexistent keyword or clause is committed source syntax
- that
candidate_builder,with builder, orfrom collection ... with builder ...are committed or reserved.secssyntax - that a retired checked-in generated file remains a source of authority
- that a fabricated
.secsfile exists to justify provenance - that fabricated provenance, source links, or source relationships are acceptable documentation shortcuts
- that host-owned runtime helpers are evidence of approved source syntax
- that retired files such as
ResourceDefinitions.cs,RecipeDefinitions.cs,ItemDefinitions.cs,SkillProfiles.cs,FeatureDefinitions.cs,Activities.cs,CombatEncounterCatalog.cs,SettlementRole.cs,TerritoryKnowledgeTypes.cs, orValenarConfigDefaults.csmay return as checked-in Generated authorities - that runtime helper names such as
CandidateBuilderId,CandidateBuilderDelegate, orSelectorSource.FromCollection(...)are live.secslanguage forms
Live Behavior Vocabulary
When docs describe behavior surfaces, use the live vocabulary from the current design docs:
activitypolicyon_action
Do not invent alternate behavior keywords or treat older placeholder words as committed syntax.
Generic SECS patterns stay: definition or data references, generic mechanic
activities, and typed args. Valenar spell variants remain SpellDefinition
data routed through one generic Activity_CastSpell, not one activity per
spell.
Node or composed spellcrafting remains deferred proposal-only material unless a committed design doc says otherwise. Do not present it as live source syntax or canon.
Generated Headers
When a Generated/ file cites a source relationship, only these header shapes
are valid:
// Source: <relative-path-to-.secs-file>// auto-generatedor// Source: auto-generated ...// Retained host/catalog surface: no schema rows.
Docs should quote the retained marker exactly when explaining the single checked-in Valenar host-owned surface. Do not use retired hand-written Generated markers for Valenar v2.
Patterns Docs Can Reference
Compiler-emitted files are expected to follow stable lowering patterns already
present in obj/**/SecsGenerated.
- templates lower to static classes with contract helpers and registration
- declarations live in compiler-emitted row-family
.g.csfiles - ids and hashes live in compiler-emitted
Hashes.g.cs - systems, events, activities, and on-actions are registered through
compiler-emitted
SecsModule.g.cs - reflection is not part of the expected generated shape
Documentation Rules
- Prefer committed docs under
docs/design/when describing language or lowering contracts. - Treat compiler output as current executable output, not as independent language authority.
- Treat
Content/as the source for schema-owned Valenar definitions. - If a runtime surface has no committed source syntax yet, say that directly.
Do not fill the gap with invented
.secsforms.