Add native configuration display
This commit is contained in:
22
docs/cli.md
22
docs/cli.md
@@ -125,6 +125,28 @@ empty value was explicitly supplied, so a scope callback can map those inputs to
|
||||
its own ConfigKit load policy. Help and invalid syntax do not call scope
|
||||
providers.
|
||||
|
||||
### Show effective configuration
|
||||
|
||||
`config show` writes the provider's native effective YAML for one scope. Its
|
||||
default scope is `app`; `--format yaml` is accepted and YAML is the only initial
|
||||
format. Single-scope output is passed through unchanged, without a CommandKit
|
||||
header or document marker.
|
||||
|
||||
```text
|
||||
example config show
|
||||
example config show --scope promptkit
|
||||
example config show --scope all
|
||||
```
|
||||
|
||||
`--scope all` acquires every selected scope and checks each effective writer
|
||||
before writing output. It then emits one YAML document per scope in discovery
|
||||
order, with a `# scope: NAME` comment after each document marker. Existing native
|
||||
markers and leading comments are retained; documents without a marker receive
|
||||
one. Scope labels containing line control characters are quoted to keep them on
|
||||
one comment line. A provider failure leaves the output stream empty. A rendering
|
||||
or output failure may leave an aggregate prefix, and the outcome reports
|
||||
incomplete report delivery.
|
||||
|
||||
## Outcome status
|
||||
|
||||
CommandKit usage failures use status `2`; operational failures use status `1`.
|
||||
|
||||
@@ -4,9 +4,9 @@ CommandKit currently contains adopted repository policies, accepted architectura
|
||||
decisions, implementation plans, identity and outcome primitives, typed command
|
||||
declarations, an instance-owned registry, a Cobra-backed routing and parsing
|
||||
adapter, public `App.Execute` coordination, and generated help/version commands.
|
||||
Configuration suite registration, scope discovery, ConfigKit integration, and
|
||||
validation are implemented; other configuration and PromptKit operations remain
|
||||
pending. The
|
||||
Configuration suite registration, scope discovery, ConfigKit integration,
|
||||
validation, and native effective YAML display are implemented; other
|
||||
configuration and PromptKit operations remain pending. The
|
||||
[README](../README.md) provides project orientation; the
|
||||
[documentation policy](policy/documentation.md#canonical-ownership) assigns
|
||||
canonical documentation owners.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Initial CommandKit implementation plan
|
||||
|
||||
Status: implementation underway; Stages 1-8 complete and Stages 9-14 pending.
|
||||
Status: implementation underway; Stages 1-9 complete and Stages 10-14 pending.
|
||||
|
||||
Date: 2026-10-07.
|
||||
|
||||
@@ -606,7 +606,7 @@ development orientation, and CLI reference describe the implemented boundary.
|
||||
|
||||
## Stage 9: implement native effective YAML display
|
||||
|
||||
**Status:** pending. **Prerequisite:** Stage 8.
|
||||
**Status:** complete. **Prerequisite:** Stage 8.
|
||||
|
||||
1. Implement `config show`; its only initial format is yaml (default and explicit).
|
||||
Single scope writes Effective.WriteEffective directly to Out with no envelope,
|
||||
@@ -633,6 +633,16 @@ labels and native values. Cover an already marked native document, missing/null/
|
||||
empty structures, a second acquisition failure with no prefix, and a writer failure
|
||||
after output begins. These protect selected behavior, not encoder whitespace.
|
||||
|
||||
**Completion evidence:** installed `config show` when a scope declares it, with
|
||||
YAML as its only format. Single-scope output passes through the native effective
|
||||
writer; aggregate output acquires and checks every view before emitting framed
|
||||
native documents in scope order. Existing markers, leading comments and YAML
|
||||
directives are retained, including explicit document termination where needed
|
||||
between directive-bearing documents. Checks cover native single-scope bytes,
|
||||
aggregate document decoding and values, invalid formats, acquisition failure with
|
||||
empty output, and incomplete delivery after a writer failure. `go test ./...`
|
||||
passes; README, development orientation, and CLI reference describe the feature.
|
||||
|
||||
## Stage 10: implement source inventory reports
|
||||
|
||||
**Status:** pending. **Prerequisite:** Stage 9.
|
||||
|
||||
Reference in New Issue
Block a user