Skip to content

feat(prime-agent): generate the kit's real USAi models.json from the catalog emitter (#362) - #385

Open
wz-gsa wants to merge 1 commit into
mainfrom
feat/prime-agent-models-json-362
Open

feat(prime-agent): generate the kit's real USAi models.json from the catalog emitter (#362)#385
wz-gsa wants to merge 1 commit into
mainfrom
feat/prime-agent-models-json-362

Conversation

@wz-gsa

@wz-gsa wz-gsa commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #362. Epic #357 MVP is now complete: the prime-agent kit ships a real, generated models.json instead of the placeholder.

What changed

  • prime-agent-config/models.json — regenerated by emitPrimeAgentModelsFromCatalog(catalog.json) (the USAi catalog: prime-agent emitter + shape/no-secret tests #361 emitter). 14 models, prime-agent array shape, apiKey: "USAI_API_KEY" (env-var NAME, no secret). The committed file is the emitter output byte-for-byte.
  • tests/models-json-regen.test.mjs — a byte-exact lockstep guard: asserts emitPrimeAgentModelsFromCatalog(catalog) == committed kit models.json, so CI fails if catalog.json changes without regenerating the kit file. Plus a 14-model/env-var-name assertion and a no-key-material scan on the shipped artifact.
  • spec.yaml — comment/description updated from "PLACEHOLDER" → "GENERATED by the USAi catalog prime-agent emitter, kept in lockstep by a regeneration test" (prose per AGENTS.md §9.3, no bare issue ref).

Verification (orchestrator, first-hand)

  • Emitter output == committed file (byte-identical).
  • Tamper check: perturbing one field of the kit models.json flips the regen test to FAIL — the guard has teeth.
  • make test-kits (44 + 14) · make validate-kits (7/7) · make validate — all green. No key-like material in the shipped file.

Dependency note

Both prerequisites are on main (emitter #361, kit skeleton #369), which is why this could land now. Remaining prime-agent kit work (real install / CA-bundle / kernel scripts + verify, #370#373) is live-test-heavy and tracked separately.

Refs #357 #362

AI-assisted (OpenCode).

…catalog emitter

Fifth step of the harness-neutral USAi catalog (issue #362,
epic #357). Replaces the prime-agent kit's
placeholder models.json (empty models[]) with the REAL config generated by the
USAi catalog prime-agent emitter — the emitter (#361) and the kit skeleton
(#369) are both now on main, so the artifact can be produced.

- files/home/prime-agent-config/models.json: regenerated by
  emitPrimeAgentModelsFromCatalog(catalog.json) — 14 models, prime-agent array
  shape, apiKey="USAI_API_KEY" (env-var NAME, no secret). The committed file IS
  the emitter output byte-for-byte.
- tests/models-json-regen.test.mjs (node --test, runs under make test-kits): a
  BYTE-EXACT lockstep guard asserting emitPrimeAgentModelsFromCatalog(catalog) ==
  the committed kit models.json (fails CI if catalog.json changes without
  regenerating the kit file), plus a 14-model/env-var-name check and a
  no-key-material scan on the shipped artifact.
- spec.yaml: updated the file's comment + description from "PLACEHOLDER" to
  "GENERATED by the USAi catalog prime-agent emitter, kept in lockstep by a
  regeneration test" (prose, per AGENTS.md §9.3 — no bare issue ref in the spec).

Verified: emitter output == committed file (byte-identical); a one-field
perturbation of the kit models.json flips the regen test to FAIL (guard has
teeth); make test-kits (44+14) + validate-kits (7/7) + validate all green;
no key-like material in the shipped file.

Refs #357 #362

Co-authored-by: OpenCode Agent <william.zujkowski@gsa.gov>
@wz-gsa
wz-gsa requested a review from a team as a code owner August 25, 2026 14:32
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.

USAi catalog: generate + commit the prime-agent models.json artifact

1 participant