Add Cobra-backed command parsing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Initial CommandKit implementation plan
|
||||
|
||||
Status: implementation underway; Stages 1-3 complete and Stages 4-14 pending.
|
||||
Status: implementation underway; Stages 1-4 complete and Stages 5-14 pending.
|
||||
|
||||
Date: 2026-10-07.
|
||||
|
||||
@@ -294,7 +294,7 @@ preparation parses supplied values without enforcing omitted required values.
|
||||
|
||||
## Stage 4: implement the internal Cobra adapter
|
||||
|
||||
**Status:** pending. **Prerequisite:** Stage 3.
|
||||
**Status:** complete. **Prerequisite:** Stage 3.
|
||||
|
||||
1. Create `internal/cobra` with neutral tree/flag/operand declarations and fresh
|
||||
per-run binding factories. A bridge declaration contains path metadata,
|
||||
@@ -338,6 +338,12 @@ parser causes without scanning their object graphs.
|
||||
unknown flags, boolean spellings, last-wins/repetition, help with missing required
|
||||
inputs, and fresh consecutive parses. Confirm the root does not import Cobra/pflag.
|
||||
|
||||
**Completion evidence:** internal adapter and root-to-adapter integration tests
|
||||
cover command routing, local flags, interspersed operands, `--`, boolean presence
|
||||
and explicit false, repeated raw values, help parsing, group failures, and fresh
|
||||
parse state. `go test ./...` passes; the root package's direct imports include
|
||||
only the internal adapter and not Cobra or pflag.
|
||||
|
||||
## Stage 5: implement invocation and diagnostic delivery
|
||||
|
||||
**Status:** pending. **Prerequisite:** Stage 4.
|
||||
|
||||
Reference in New Issue
Block a user