symfonic.capabilities.knowledge.assembly¶
assembly ¶
The seam between this capability and the prompt compiler.
One function, and it returns a mapping rather than a compiler object. That is
the whole design: the composition root โ which is allowed to see both
capabilities โ turns the spec into a PromptContribution; this package never
imports the prompting package, so neither capability can quietly start
depending on the other's internals.
A mapping is also what makes the alignment testable. tests/capabilities/
knowledge/test_prompting_seam.py holds both halves at once and compiles a
real prompt from a real spec, so a vocabulary drift shows up as a red test
rather than as a runtime ValueError in an adopter's deployment.
contribution_spec ¶
Project a validated declaration into compiler-ready keyword values.
Validation runs first and unconditionally. A spec is the last moment this capability controls, so emitting one for a declaration it would have refused would move the refusal into the compiler, where the error message can no longer explain which bridge got it wrong.
Enum members are emitted as their string values. The prompt contract's
layers, tiers, and scopes are StrEnums over the same strings, so the
composition root's conversion is total by construction.