specverb M0: runtime engine (Build, Swagger-2.0 reader, expansion table, generic action, --dry-run) #87
Labels
No labels
burndown-2026-06
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/cli-guard#87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The M0 runtime engine of the spec-driven verb design (the
specverbpackage), the second half of the M0 milestone after the KDL Guardfile parser landed in #86. Builds a guarded*cli.Commandtree at runtime from a parsed Guardfile plus an embedded Swagger 2.0 spec, with one generic action backing every verb.Companion to the design + checkpoint on #75.
Scope (M0)
swagger.go) - reads only what the proving ops need: method, path, operationId, ordered path params, and the request-body schema's scalar fields (resolving a one-hop#/definitions$ref). Fails closed on a non-2.0 spec. Full kin-openapiopenapi2conv2.0 -> 3.x is M1.expansion.go) -(verb, resource) -> {cliGroup, cliLeaf, operationId}. Deny-by-default: no row, no mount. The set of rows is the M0 allowlist. M0 covers the forgejo repo read/create/delete trio.Build(Config)(specverb.go) - resolves eachcangrant to a concrete op and mounts a guarded leaf under the consumer'sverb.Wrap. Fails closed: an unresolvable grant is an error, never a silently dropped verb. Returns the Guardfile group's leaf command (e.g.forgejo) for the consumer to mount.request.go) - path-param positionals, request-body scalars promoted to typed flags (required schema field -> required flag, unset optional omitted from the body), header-token auth via an injectedTokenResolver(keeps the AWS SDK out of cli-guard), a--dry-runpreview that prints the resolved request with the secret redacted and fires nothing, and live response rendering through therespfmt--query/--outputrail.Out of scope (named follow-ups, not silent gaps)
--yesdestructive-confirm and the rest of the fanatical-UX pass - M2 (the descriptor already carriesDestructive).TokenResolverand the live diff against coily's hand-writtenrepo create- M1, in ward viago.mod replace.Done
specverb/{specverb,swagger,expansion,request}.go+specverb/specverb_test.go+ testdata (faithful minimal Swagger 2.0 spec + the proving Guardfile).--dry-run(no wire, no secret resolve, redacted preview), live create (auth header, body, unset-optional omission), live delete (path-param fill, 204 confirmation), positional-arg-count validation, and composition under the realverb.Wrapaudit pipeline.make test/make vet/make lintgreen;godoc-current.txtregenerated; FEATURES + features-detail updated.