An assistant can return a readable paragraph while silently mixing packets or omitting evidence. Build a fixed sequence: validate the packet, form a request, obtain a draft, validate the response, and present a review note. The offline version lets you perform each step on paper or in local text. If you use the optional Python example, it checks response structure only. Nothing in this route sends a request to a provider or evaluates a model's engineering ability.
Teaching contract v1, not any provider's API schema:
request = {
"request_id": "practice-01", "packet_id": "k1-v1",
"task": "Read only. Cite evidence. Return one bounded triage note.",
"source_lines": {"S1": "...", "R1": "..."},
"tools_allowed": []
}
response fields:
packet_id, status, claim, evidence, uncertainty, human_check
status: candidate_issue | no_issue_in_excerpt | unresolved
evidence: nonempty list of existing source-line IDs
No source edits, execution instructions or invented tool results.An API is an agreed way for software to exchange a request and response. Your request identifies the job and carries the approved data; the response carries a result or an error. Authentication, when a real service is introduced, establishes the caller's identity or permission to use that service. It is separate from the engineering question and belongs in an approved adapter or secret manager, never in packet text, fixtures or shared transcripts. The core exercise has no authentication because it makes no network call.
HTTP success and engineering correctness are different checks. A real adapter would first inspect the transport outcome and then decode the documented response body before applying this local contract. A successfully delivered response may still have missing evidence or a false claim. Use RFC 9110, June 2022 for HTTP semantics and RFC 8259, December 2017 for JSON syntax. Neither defines a model vendor's endpoint, authentication flow or response fields; consult that vendor's applicable documentation only if you add an approved adapter.
# snippet
import json
def validate_note(raw, packet_id, source_lines):
note = json.loads(raw)
required = {"packet_id", "status", "claim", "evidence",
"uncertainty", "human_check"}
if not isinstance(note, dict) or set(note) != required:
raise ValueError("wrong response fields")
for key in required - {"evidence"}:
if not isinstance(note[key], str) or not note[key].strip():
raise ValueError("missing text: " + key)
if note["packet_id"] != packet_id:
raise ValueError("wrong packet")
if note["status"] not in {
"candidate_issue", "no_issue_in_excerpt", "unresolved"
}:
raise ValueError("unknown status")
refs = note["evidence"]
if not isinstance(refs, list) or not refs:
raise ValueError("missing evidence")
if any(not isinstance(ref, str) or ref not in source_lines
for ref in refs):
raise ValueError("unknown source reference")
return note
# Call manually with a synthetic draft and its exact packet.
# Returning a note checks structure, not truth or safety.This deliberate partial snippet defines a helper without invoking it or printing PASS. For optional manual use, set raw to your synthetic response's JSON text and source_lines to the complete K1 line-ID-to-text mapping, then call validate_note(raw, "k1-v1", source_lines). A conforming response returns the parsed note; malformed JSON or an invalid field raises an error. This checks the local response contract, not model performance or engineering correctness.
For a worked synthetic wiring example, imagine a draft for packet demo-v1 citing line A1 from that same packet. The validator can accept the shape if all fields are present. The human still has to read A1 and decide whether it supports the claim. Keep the original draft and any validation error so that a repair does not erase what failed. The snippet is supplied for learner inspection and optional local use; no execution result is claimed.
Using K1, write the source-line map, request card and a draft response without copying the known answer into the request. Inspect the fields manually or with the optional validator. Then annotate each stage with what it can and cannot establish. Add an optional MCP or multi-agent branch only as a separate diagram on paper; the main path must still finish when that branch is unavailable.
Input validation proves the intended bounded packet was selected. Response validation proves packet identity, field shape and reference existence. A human source check establishes whether the reset claim follows from S1 and R2-R3. None of these steps alone proves full RTL correctness. Optional MCP access must remain read-only and allowlisted; an optional team follows the same response contract. Missing optional integrations must not block the offline route.
This fabricated response demonstrates the local contract, not a model result. Its six JSON fields would be: packet_id "k1-v1"; status "candidate_issue"; claim "Enable gates the reset assignment. With prior q=1, rst_n=0 and en=0 at the edge, S1 requires q=0 but R2 skips assignment."; evidence ["S1", "R2", "R3"]; uncertainty "This paper trace covers the supplied excerpt only; no simulation or complete design review was performed."; human_check "Independently trace R2-R3 with these edge values and compare with S1 before deciding any source change." Supply the complete K1 source-line map when checking its references. A valid shape is only the first gate; the receiving engineer still needs to reproduce the conditional trace from the packet.