ward-kdl: temporary spec-driven proving CLI (precursor to #62) #63

Closed
opened 2026-06-07 02:46:27 +00:00 by coilysiren · 0 comments
Owner

Summary

Stand up a temporary parallel CLI ward-kdl (cmd/ward-kdl/) to prove cli-guard's specverb engine against the live Forgejo API before the spec-driven path folds into ward proper (#62). Keeps the experiment out of the production binary.

Scope

  • cmd/ward-kdl/main.go mounts ward-kdl ops forgejo repo {get,create,delete} via specverb.Mount (whole path generated from the Guardfile), with audit Wrap, the SSM/AWS-SDK TokenResolver, and the engine-default scheme + redirect-safe client.
  • cmd/ward-kdl/forgejo.guardfile.kdl - committed, scheme-less base-url.
  • The 800KB vendor swagger.v1.json is never committed: resolved at runtime from $WARD_KDL_SPEC or the user cache, fetched on miss. *.swagger.v1.json gitignored.
  • Dry-run oracle test (skips when spec uncached) + opt-in live round-trip (WARD_KDL_LIVE_TEST=1).

Depends on the specverb ergonomics in cli-guard#88 (Mount, scheme default, redirect-safe client).

Out of scope

  • Folding into ward proper - that is #62.
  • Eliminating the hand-written main.go via codegen - follow-up.
## Summary Stand up a temporary parallel CLI `ward-kdl` (`cmd/ward-kdl/`) to prove cli-guard's `specverb` engine against the live Forgejo API before the spec-driven path folds into `ward` proper (#62). Keeps the experiment out of the production binary. ## Scope - `cmd/ward-kdl/main.go` mounts `ward-kdl ops forgejo repo {get,create,delete}` via `specverb.Mount` (whole path generated from the Guardfile), with audit `Wrap`, the SSM/AWS-SDK `TokenResolver`, and the engine-default scheme + redirect-safe client. - `cmd/ward-kdl/forgejo.guardfile.kdl` - committed, scheme-less base-url. - The 800KB vendor `swagger.v1.json` is never committed: resolved at runtime from `$WARD_KDL_SPEC` or the user cache, fetched on miss. `*.swagger.v1.json` gitignored. - Dry-run oracle test (skips when spec uncached) + opt-in live round-trip (`WARD_KDL_LIVE_TEST=1`). Depends on the specverb ergonomics in cli-guard#88 (Mount, scheme default, redirect-safe client). ## Out of scope - Folding into `ward` proper - that is #62. - Eliminating the hand-written `main.go` via codegen - follow-up.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#63
No description provided.