docs: align CODEGEN.md/TESTGEN.md with the codebase

CODEGEN.md:
- replace the stale "Manifest schema" (allowed_inputs/actions/cost_budget/
  decision_log_ref, a dotted leaf name) with the real registry shape and note
  the body writer does not author it
- document ctx.timers (and that ctx.admin is built-in-only) and the
  request.meta resume cache, both used by the authoritative seed set
- correct acceptance criteria: INTEGRATION is not hard-rejected (inferred /
  fidelity-gated); note which items the parser actually enforces; compile ->
  ast.parse
- fix the SemIf URL, the structured-state claim (state is a string here), the
  config_vars/CONTRACT relationship, and defer llm_bridge_* names to the catalog

TESTGEN.md:
- separate the only static check (ast.parse) from execution (exit 0); state
  that stdlib-only/inline-fixtures/hermeticity are required but not verified
- clarify contract.json is handed to the test writer as context

README.md: fix the same stale manifest field list.

tests/test_codegen.py: add guards for the runtime surface and against the
stale manifest fields returning.
This commit is contained in:
gabby committed 2026-10-07 11:30:58 +00:00
1 parent dff4849947
commit e64354e78d
4 files changed
+105 -45

No files matched your search

+18
View File
@@ -146,6 +146,24 @@ def test_contract_directs_request_arguments_and_output():
assert "No work at import time" in text
def test_skill_contract_documents_runtime_surface():
"""CODEGEN.md must document the ActionContext surface a body can rely on
(ctx.timers for scheduling) and the request.meta resume cache — both are
used by the authoritative seed set, so a body writer needs them."""
text = read_skill_contract()
assert "ctx.timers" in text
assert "request.meta" in text
def test_skill_contract_has_no_stale_manifest_fields():
"""The old manifest schema (allowed_inputs/actions/cost_budget/
decision_log_ref, a dotted leaf name) described fields the registry never
had; keep it out of the body contract."""
text = read_skill_contract()
for stale in ("allowed_inputs", "decision_log_ref", "cost_budget", "Manifest schema"):
assert stale not in text
def test_body_directives_require_query_arguments_and_output():
"""The prompt directives (used by the first, retry, and regen prompts) must
echo the query->arguments and real-output requirements, not just CODEGEN.md."""