Add invocation coordination and diagnostics

This commit is contained in:
2026-10-07 13:30:24 +00:00
parent f206c531f1
commit c3448a2ebe
5 changed files with 462 additions and 3 deletions

View File

@@ -3,7 +3,8 @@
CommandKit currently contains adopted repository policies, accepted architectural
decisions, implementation plans, identity and outcome primitives, typed command
declarations, an instance-owned registry, and a Cobra-backed routing and parsing
adapter. Public invocation coordination is not implemented yet. The
adapter, plus public `App.Execute` coordination for custom commands. Generated
help/version rendering and standard command families remain pending. The
[README](../README.md) provides project orientation; the
[documentation policy](policy/documentation.md#canonical-ownership) assigns
canonical documentation owners.

View File

@@ -1,6 +1,6 @@
# Initial CommandKit implementation plan
Status: implementation underway; Stages 1-4 complete and Stages 5-14 pending.
Status: implementation underway; Stages 1-5 complete and Stages 6-14 pending.
Date: 2026-10-07.
@@ -346,7 +346,7 @@ only the internal adapter and not Cobra or pflag.
## Stage 5: implement invocation and diagnostic delivery
**Status:** pending. **Prerequisite:** Stage 4.
**Status:** complete. **Prerequisite:** Stage 4.
Add `func (a *App) Execute(ctx context.Context, args []string, streams Streams) Outcome`.
It consumes argv without the executable name. Use the supplied nonnil context;
@@ -393,6 +393,12 @@ warning-only success; diagnostic failure after operation failure retains both;
report failure marks incomplete delivery; no duplicate root diagnostics; no process
exit. Include a consecutive run that omits previously supplied flags/operands.
**Completion evidence:** external-package tests exercise real parsing and dispatch,
typed state freshness, usage and input-check causes, domain outcomes, warning-only
success, completed diagnostic suppression, checked short writes, and combined
operation/delivery failures. `go test ./...` passes. Report-writing implementations
will set `ReportIncomplete` when introduced with the standard reports.
## Stage 6: complete help and version
**Status:** pending. **Prerequisite:** Stage 5.