Skip to content

feat: add OpenAPI, error spec, vector index, and a one-command runner#15

Closed
trqlmao wants to merge 1 commit into
mainfrom
docs/impl-ergonomics
Closed

feat: add OpenAPI, error spec, vector index, and a one-command runner#15
trqlmao wants to merge 1 commit into
mainfrom
docs/impl-ergonomics

Conversation

@trqlmao

@trqlmao trqlmao commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Draft for review. Closes the gap between AVP's turnkey crypto path and its wire/transport layer — the layer where most "implement it right first try" friction lives for humans and LLMs.

What's in it

Change File(s) Why
OpenAPI 3.1 of the HTTP/JSON profile openapi.yaml gRPC had proto/avp.proto; HTTP had only a prose route table. Now every path/method/status/error is machine-readable + stub-generatable. $refs the JSON Schema (no shape duplication).
Error body spec schema/avp.schema.json ($defs/Error), SPEC.md §6, IMPLEMENTING.md { error, code?, detail? } + a status→code table; states every non-2xx is terminal while a stale-version push is a 200 with conflict:true. All five reference servers already emit { error, detail? }, so code is additive and they stay conformant.
§11 conformance reword SPEC.md §11 Mapped each requirement to the vector that actually exists (Ed25519 → challenge signature; payload-AEAD epoch-tamper → rotation correctness) instead of implying standalone challenge/token + rotation vector files that don't.
Vector index vectors/index.json, vectors/README.md Machine-readable enumeration (file, kind, spec §, RFC anchors) so a harness doesn't hardcode filenames.
One-command runner Taskfile.yml, examples/README.md task test runs conformance + all five example suites, mirroring CI.

Cross-linked from README / IMPLEMENTING / llms.txt; recorded in CHANGELOG [Unreleased].

Verified

  • All 14 OpenAPI $refs resolve to schema $defs; Error def present.
  • schema/avp.schema.json, vectors/index.json parse as JSON; openapi.yaml, Taskfile.yml parse as YAML.
  • no-leak denylist scan clean on every changed file.
  • Reference servers' existing { error, detail? } bodies remain conformant to the new Error def.

Deliberately out of scope (follow-ups)

  • Dedicated auth-challenge.json + rotation.json vectors (would need real generated values, wired into the 5 example suites).
  • A gRPC reference example (proto/avp.proto has no running code today).
  • A full real-keys "golden transcript" end-to-end fixture (current examples/*.json are illustrative fakes).
  • SPEC.md §7 is still (reserved).

Notes

  • openapi.yaml uses external relative $ref into schema/avp.schema.json — valid OpenAPI 3.1 (2020-12 JSON Schema); some tooling may want a bundle step.
  • Taskfile.yml is go-task; each target needs only its own toolchain.

Close the gap between the turnkey crypto path and the wire/transport
layer, where most "get it right first try" friction lives for both
humans and LLMs implementing AVP.

- openapi.yaml: OpenAPI 3.1 description of the HTTP/JSON profile — every
  path, method, status code, and error response — referencing the JSON
  Schema shapes so the route surface is machine-readable and
  stub-generatable. The gRPC profile had proto/avp.proto; HTTP had only a
  prose route table.
- schema + SPEC §6: define the error body { error, code?, detail? } and a
  status→code table, and state that every non-2xx is terminal while a
  stale-version push is a 200 with conflict:true. The five reference
  servers already emit { error, detail? }; `code` is additive, so they
  stay conformant.
- SPEC §11: reword conformance to map each requirement to the vector that
  actually exists (Ed25519 anchors the challenge signature; the
  payload-AEAD epoch-tamper case anchors rotation correctness) instead of
  implying standalone challenge/token and rotation vector files that do
  not exist. Dedicated vectors for those paths are noted as welcome
  additions.
- vectors/index.json: machine-readable index of the vectors (file, kind,
  spec section, RFC anchors) so a harness can enumerate them without
  hardcoding filenames.
- Taskfile.yml: `task test` runs the conformance suite and every
  language's example tests in one command, mirroring the CI jobs.

Cross-linked from README, IMPLEMENTING.md, llms.txt, examples/README.md,
and vectors/README.md; recorded under CHANGELOG [Unreleased].
@trqlmao trqlmao marked this pull request as ready for review June 8, 2026 18:59
@trqlmao

trqlmao commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #16, which was stacked on this branch and merged to main with all four commits (the doc/wire-surface commit from this PR plus the conformance suite, the house-style em-dash fix, and the CLAUDE.md update). Nothing here is unmerged.

@trqlmao trqlmao closed this Jun 8, 2026
@trqlmao trqlmao deleted the docs/impl-ergonomics branch June 8, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant