Repository navigation
Description
Pass-three scope decision (critical review). Pass two declared per-property provenance a "confirmed must-have" and used it to force #203 to rung 2. Review demotes provenance to deferred until a real user asks (no customers yet — same discipline that parks #202). Decision: commit v1 (the resolved view), which needs only the evaluator and no new mechanism. Decouple it fully from #203 rung 2. The provenance view is deferred and remains gated on #203's deferred
deepMergeorigin data shipping first.
Problem
Once config is layered across environments (#203), "what is the effective, fully-resolved config for this component in this environment?" has no answer short of reading and mentally merging every layer. chant list shows inventory and chant graph shows edges — neither shows the resolved property bag for one instance in one stack.
Shape of the answer
A read-only describe that projects synthesis output for a single named component, scoped to a stack. Offline, source-only — no live calls (distinct from chant lifecycle diff --live, which queries the cloud). Two capabilities, separated by cost and now by commitment:
- Resolved view (v1 — committed). The final merged prop bag for a named composite/declarable in a stack, plus the resources it produces. Mostly projection over what the evaluator already computes. Works against rung-1 layered config (plain TypeScript spread) — needs nothing from design: static layered configuration (one composite, many environments) #203 beyond the example existing.
- Provenance view (deferred). Per-property attribution: which layer/file set each value, and what it overrode. Useful, but not committed — it consumes the per-key origin data only design: static layered configuration (one composite, many environments) #203 rung 2 (
deepMerge) can emit cheaply, and rung 2 is itself deferred on demand. Ships only after both a real provenance need and design: static layered configuration (one composite, many environments) #203 rung 2 land.
The #203 interaction (re-scoped)
v1 is independent of #203's merge model. It projects the evaluator's resolved props for a named component regardless of whether the layering was done by native spread (rung 1) or a blessed deepMerge (rung 2). So v1 is not blocked.
The provenance view is where the dependency lives:
- Rung 1 (native spread): no chant-controlled merge, so per-property origin would need invasive evaluator tracking through spreads/member-access. Not worth it speculatively.
- Rung 2 (blessed
deepMerge): chant performs the fold and records per-key origin almost for free.
Because provenance is deferred and rung 2 is deferred, the provenance view waits for both. No invasive evaluator origin-tracking is ever undertaken to force it earlier.
Command surface
Recommend a new chant describe command, not a flag on list — mirrors the inventory-vs-detail split (list = what exists, describe = everything about one thing).
chant describe <component> [--stack <name>] [--json]
chant describe <component> --explain # provenance, DEFERRED
chant describe <component> --diff <a> <b> # env comparison, deferred
Unit of description: any named export — a declarable or a composite instance — optionally filtered to a stack.
Out of scope / deferred
- Provenance view (
--explain) — deferred; gated on a real need + design: static layered configuration (one composite, many environments) #203 rung 2 (see above). - Environment diff (
--diff staging prod) — nice-to-have, deferred to a later task; not v1. - Anything live/cloud-touching — that's
chant lifecycle, notdescribe.
Tasks
Committed (v1)
T1 — Spec the resolved-view model + surface. Define exactly what "effective config" prints (props, produced resources, stack scoping), human + --json shapes, and confirm chant describe as a new command vs. a list extension.
- AC: written spec; command-surface decision recorded.
T2 — Implement resolved view (v1). Project the evaluator's resolved props/resources for a named component, optionally scoped to a stack; human-readable + --json; fully offline. Works against the #203 rung-1 layered example.
- AC:
chant describe <c> --stack <s>prints the effective config; no network; unit tests over the rung-1 layered example.
T3 — Docs + example. describe reference page; exercise it against the #203 rung-1 layered example.
- AC: page merged; example in CI.
Deferred
D1 — Provenance view. Gated on a real provenance need and #203 rung 2 shipping the per-key origin record. Render per-property attribution (winning layer + what it overrode) in --explain and --json.
- AC: recorded demand + design: static layered configuration (one composite, many environments) #203 rung 2 landed; then
--explainshows each property's source layer and overridden value;--jsoncarries the same; tests over the rung-2 layered example.
D2 — Environment diff mode. describe <c> --diff <a> <b> showing per-property differences between two stacks/envs. Only after v1 ships and demand is real.
- AC: diff output; tests.
Open decisions (flag for build phase)
- New
describecommand vslist --describe→ recommend new command. - Unit: composite instance only, or any declarable? → recommend any named export, stack-filterable.
- Reuse: how much of
list/ the build pipeline's resolved graph is shared vs. a new path → T1.
Sequencing
Depends on #203 rung 1 existing (so there is layered config to describe) — that is now the committed part of #203, so v1 is unblocked. The provenance view depends on the deferred #203 rung 2 and is itself deferred.
Umbrella: #198.
Activity
[-]research: describe / effective-config introspection command[/-][+]design: describe / effective-config introspection command[/+]chant-v0.1.17 (#264)