Add scoped PromptKit flag aliases

This commit is contained in:
2026-11-07 04:27:28 +00:00
parent 644e6c365b
commit 0183022a28
13 changed files with 237 additions and 38 deletions

View File

@@ -574,6 +574,19 @@ controls the engine view and these flags are unavailable.
Catalog namespace filters remain separate; configuration inspection has no
resource namespace selectors.
### PromptKit convenience aliases
Applications that install `ckprompt.Declarations(suite)` provide scoped
convenience spellings for the enabled PromptKit commands. Each applicable
`--llm-NAME` flag also accepts `--NAME`; `--llm-input-text` additionally accepts
`--llm-input` and `--input` for literal text. Use `--llm-input-file` or
`--input-file` for a file reference. Canonical and alias spellings share the
same binding, including their occurrence order and explicit-value semantics.
Applications that install `ckprompt.Command(suite)` receive the canonical
spellings only. The aliases do not apply to application-owned commands unless
the application installs them separately.
## PromptKit prepared-request preview
When `Suite.PrepareRequest` is present, `ckprompt.Command(suite)` installs

View File

@@ -265,7 +265,9 @@ prepared-request preview, and smoke testing are separate capabilities, added
with `ckprompt.WithRequestValidation`, `ckprompt.WithRequestPreparation`, and
`ckprompt.WithSmokeTesting`. The suite has twelve independently optional
callbacks in total. `ckprompt.Command(suite)` creates only operations whose
callbacks are present; these capabilities can be installed independently. A
callbacks are present, with canonical flags. `ckprompt.Declarations(suite)`
returns the command and its scoped convenience aliases for installation with
other declarations. These capabilities can be installed independently. A
composed suite can enable the additional operations:
```go

View File

@@ -1,6 +1,6 @@
# Shared reporting and PromptKit v0.20.0 implementation plan
Status: implementation in progress; Stages 1–12 complete.
Status: implementation in progress; Stages 1–13 complete.
## Scope, authority, and execution
@@ -466,6 +466,11 @@ namespace membership or requirements-analysis correctness.
## Stage 13: Generated scoped aliases and complete-family installation
**Complete.** `Declarations` generates aliases from each command's selected
bindings; `Command` remains canonical-only. The root, ckconfig, and ckprompt
workspace suites passed with Go 1.27.0, including alias routing, occurrence
order, optional commands, help, completion, and conflict checks.
Add `Declarations(suite) []commandkit.Declaration`, assembling the canonical
family and generated exact-command `FlagAliasFor` rules. Retain `Command(suite)`
for canonical-only installation. Generate aliases from the selected flags and