Skip to main content

Spec corpus

The spec corpus (specs/) contains the governing specifications for factory-encore. Each spec lives in its own directory as NNN-slug/spec.md with YAML frontmatter. The directory name equals the frontmatter id.

Spec inventory

IDTitleDomainKindStatus
000-factory-kernelFactory kernel: spec-spine governance and the resilient CI surfacegovernancegovernanceapproved
001-module-manifest-schemaModule manifest schema: declarative service composition and the module taxonomygeneratorarchitectureapproved
002-encore-generator-coreEncore generator core: copy-base + select-driver + merge-configgeneratorfeatureapproved
003-user-management-moduleUser-management: the reference Encore service modulegeneratorfeatureapproved
004-dual-app-generatorDual-app generator: two independent Encore apps (external + staff, both rauthy OIDC)generatorfeatureapproved
005-architecture-doc-governanceArchitecture documentation governance: human docs as derived views of the owning specsgeneratorgovernanceapproved
006-factory-schema-lockstepGenerator/baseline lockstep: pin the generator to template-encore's frozen invariantsgeneratorarchitectureapproved

Closed taxonomies

Domains and kinds are closed enums declared in spec-spine.toml:

Domains: governance, generator

Kinds: governance, architecture, feature

Adding a new domain or kind requires editing spec-spine.toml and passing the corpus lint.

Spec frontmatter fields

Every spec declares the following in its YAML frontmatter:

FieldRequiredDescription
idYesUnique identifier matching the directory name.
titleYesHuman-readable title.
statusYesLifecycle status (draft, approved, deprecated).
createdYesCreation date (ISO 8601).
ownerYesAuthor/owner identifier.
kindYesOne of the closed kind taxonomy values.
domainYesOne of the closed domain taxonomy values.
riskYesRisk level (low, medium, high).
implementationYesImplementation status (pending, in-progress, complete).
depends_onYesArray of spec IDs this spec depends on.
code_aliasesNoArray of code-level aliases for grep/search.
summaryYesMulti-line summary of the spec's purpose.
establishesNoArray of file paths this spec establishes (owns).

Key specs explained

000-factory-kernel

The governance kernel. It adopts spec-spine over the corpus and stands up the OAP resilient CI surface. The terminal ci-gate aggregates the governance gate, the generator test gate, the lockstep gate, and an AI PR review that passes with a visible notice on a Claude API failure (never a silent green).

002-encore-generator-core

The single-app generator: setup-app.ts performs copy-base, select-driver, merge-config, and optional module composition. It reuses copyTemplateBase and setAuthDriver as composable primitives.

004-dual-app-generator

The dual-app generator: setup-dual-app.ts produces two independent Encore applications (public + internal) from a single invocation. It reuses the core primitives from spec 002.

006-factory-schema-lockstep

The cross-repo lockstep. A committed lockfile (baseline.lock.json) pins the template-encore ref, core services, module catalog membership, and SHA-256 of frozen app-invariant spec hashes. The lockstep gate refuses any silent upstream drift.