Refresh operator documentation and CLI help
This commit is contained in:
@@ -1,37 +1,40 @@
|
||||
# CommandKit ckprompt
|
||||
|
||||
`ckprompt` is the optional PromptKit integration for CommandKit. It adapts
|
||||
PromptKit engine configuration, native comparison, five catalogs, named
|
||||
inspection, requirements discovery and validation, and native smoke tests.
|
||||
Importing it does not install either command family.
|
||||
`ckprompt` adds PromptKit inspection and testing commands to Go applications
|
||||
that use CommandKit. Operators can list prompts, profiles, and backends, inspect
|
||||
their settings, discover required inputs, validate and preview requests, and
|
||||
run smoke tests.
|
||||
|
||||
The application chooses which commands to install. Importing the package alone
|
||||
does not install commands.
|
||||
|
||||
## Module
|
||||
|
||||
The module path is `go.maximumdirect.net/ckprompt`. This source uses Go 1.27.0,
|
||||
`go.maximumdirect.net/commandkit v0.4.0`, `go.maximumdirect.net/ckconfig v0.4.0`,
|
||||
`go.maximumdirect.net/configkit v1.1.0`, and `go.maximumdirect.net/promptkit v0.20.0`. See the
|
||||
[consumer guide](https://gitea.maximumdirect.net/eric/CommandKit/src/branch/main/docs/consumers/guide.md#promptkit-configuration-definitions-and-requirements)
|
||||
for callback, input, state, and acquisition contracts.
|
||||
The module path is `go.maximumdirect.net/ckprompt`. See the
|
||||
[consumer guide](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/consumers/guide.md#module-selection)
|
||||
for compatible releases, Go requirements, and the current source's dependency
|
||||
alignment requirement.
|
||||
|
||||
## Example
|
||||
|
||||
Add `ckprompt.ConfigScope(loadEngine)` to the scopes passed to
|
||||
`ckconfig.Command` when the application wants PromptKit engine configuration
|
||||
and native comparison in the `config` family. Install
|
||||
`ckprompt.Command(ckprompt.FromEngine(loadEngine))` separately for catalogs,
|
||||
named inspections, and requirements discovery. `FromEngine` supplies nine
|
||||
PromptKit-backed callbacks: four inspections and five catalogs. Applications
|
||||
may narrow, wrap, or replace them before capture or provide custom callbacks
|
||||
with `ckprompt.Suite`. Add concrete request validation, prepared-request preview,
|
||||
and smoke testing explicitly with `WithRequestValidation`,
|
||||
`WithRequestPreparation`, and `WithSmokeTesting`. Inspection,
|
||||
requirements, and catalog operations do not execute prompts or contact model
|
||||
providers; application loaders and callbacks retain their own effects. Smoke
|
||||
testing invokes the selected native PromptKit operation; the
|
||||
application retains ownership of client and configuration choices. See the
|
||||
[CLI reference](https://gitea.maximumdirect.net/eric/CommandKit/src/branch/main/docs/cli.md#promptkit-smoke-testing)
|
||||
for operator commands and report semantics. The maintained
|
||||
[composed example](examples/composed) shows complete application wiring.
|
||||
Pass your engine loader to `FromEngine` to add resource listings, inspection,
|
||||
and requirements discovery:
|
||||
|
||||
```go
|
||||
app, err := commandkit.New(identity, ckprompt.Command(ckprompt.FromEngine(loadEngine)))
|
||||
```
|
||||
|
||||
Add request validation, preview, and smoke tests with `WithRequestValidation`,
|
||||
`WithRequestPreparation`, and `WithSmokeTesting`. To expose engine configuration
|
||||
under `config`, add `ckprompt.ConfigScope(loadEngine)` to a `ckconfig.Suite`.
|
||||
The [integration guide](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/consumers/guide.md#promptkit-configuration-definitions-and-requirements)
|
||||
explains these choices; the [composed example](examples/composed) shows them together.
|
||||
|
||||
Inspection commands do not call the model. Smoke tests can use the application's
|
||||
configured client or network probes. Applications own engine setup, credentials,
|
||||
and any effects of their loaders and callbacks. See the
|
||||
[CLI reference](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/cli.md#promptkit-smoke-testing)
|
||||
for commands and results.
|
||||
|
||||
## License and attribution
|
||||
|
||||
|
||||
Reference in New Issue
Block a user