Skip to content

design: describe / effective-config introspection command #204

Closed

Description

@lex00

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 deepMerge origin 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:

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

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.

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 describe command vs list --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

  1. changed the title [-]research: describe / effective-config introspection command[/-] [+]design: describe / effective-config introspection command[/+] on Jun 6, 2026
  2. added a commit that references this issue on Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions