Status:
draft · Version 0.2 · Filed 2026-04-25SPEC-039: NYI Runtime Contract — Stub/Placeholder Signaling for Prism Verbs
Version
0.2Status
draftOrigin
The constitution (PRISM.md, CLAUDE.md, AGENTS.md) referenceshd_exec as the
session-pickup verb. Six markdown files describe its contract. Zero source
files implement it. Two-year-old hanging chad. The methodology layer made a
promise the runtime never kept; agents and vibe-coding callers had no signal
this was vapor until they tried to call it.
This spec establishes a dual-layer signal: (1) every stub/placeholder verb
returns a canonical “not yet implemented” runtime response that any caller
recognizes; (2) every stub carries a grep-able source-level marker; (3)
prism_audit surfaces both. Methodology promises are now backed by runtime
teeth — or they explicitly self-declare as vapor.
§1 — Canonical Response Shape
A verb that is declared but not yet implemented MUST return:status and code are required. verb is required. tracking_spec is
required if a spec exists for the eventual implementation; otherwise
tracking_issue must point to a tracker entry. message is required and
must answer: what would a caller have expected this verb to do?
Wire-level mappings:
- MCP / JSON-RPC: structured response with
status: "not_yet_implemented", result is the payload above. NOT an exception — callers should be able to introspect without try/except. - HTTP / REST: status
501 Not Implemented, body is the canonical payload above. Standard HTTP semantics — meets caller expectations. - gRPC: status code
UNIMPLEMENTED(12), trailer carries serialized canonical payload.
§2 — Source-Level Marker Convention
Every stub function MUST carry a marker comment on the line above its declaration:| Language | Marker |
|---|---|
| Python | # PRISM-NYI: <reason> [tracking: SPEC-XXX] |
| TypeScript / JavaScript | // PRISM-NYI: <reason> [tracking: SPEC-XXX] |
| Shell (bash/zsh) | # PRISM-NYI: <reason> [tracking: SPEC-XXX] |
| PowerShell | # PRISM-NYI: <reason> [tracking: SPEC-XXX] |
| Markdown (constitution refs) | inline *(PRISM-NYI — tracking: SPEC-XXX)* |
PRISM-NYI) across all source
types. tracking is mandatory; <reason> is one-line.
§3 — Helper API
Python (added tomcp/server.py or a new mcp/nyi.py module):
prismNyiResponse() helper.
Shell: helpers not provided (stubs in shell should be vanishingly rare); use
the comment marker + exit 78 (advisory exit code, not standard errno but
distinguishable from 0/1/2).
Decision Q1 (input validation in stub verbs): stubs do NOT validate
their inputs. The decorator returns the canonical payload immediately
without running any validation logic. Validation belongs to the real
implementation when it ships.
§4 — prism_audit Integration
prism_audit is currently a dispatch verb that returns an instruction string
to the calling agent (mcp/server.py:2939-2951). Extend it to actually
audit the source tree:
prism_audit returns
exit_status: "ok" when every stub has a tracking_spec AND every
constitution reference to an unimplemented verb carries the *(PRISM-NYI — SPEC-XXX)* annotation. Returns exit_status: "fail" (and a non-zero
exit code when invoked via CLI) when ANY stub is untracked OR ANY
constitution ref is unmarked. Tracked stubs are advisory; untracked
stubs and unmarked constitution refs are blocking.
A constitution reference to an unimplemented verb that LACKS the
*(PRISM-NYI — tracking: SPEC-XXX)* annotation is also surfaced as a
rules_reminders entry of severity warn on subsequent prism_start.
§5 — Verification
- Calling a verb decorated with
@prism_nyi(...)returns the canonical payload with all required fields. - Calling a stub verb with deliberately malformed inputs (e.g.,
hd_exec(pid=42)) returns the SAME canonical NYI payload — no validation interception (per Q1 decision). prism_auditlists everyPRISM-NYImarker inmcp/,backend/,cli/,bin/.prism_auditreturnsexit_status: "fail"when an untracked stub exists or a constitution ref lacks the annotation.- After SPEC-040 ships and removes
hd_exec’s NYI marker,prism_auditno longer lists it understubs_in_sourceandexit_statusflips back took(assuming no other untracked stubs). - HTTP wire test: a REST call to an NYI endpoint returns
501with the canonical body. - gRPC wire test: an UNIMPLEMENTED status carries the canonical payload in trailer metadata.
§6 — Decisions
- Q1 (input validation in stubs): SKIPPED / settled — orthogonal to the dual-signal architecture (return code + source marker) which already addresses the “don’t forget” goal. Stubs do not validate inputs; validation logic belongs to the real implementation.
- Q2 (audit failure mode): HYBRID. Tracked stubs (with
tracking_spec) are advisory. Untracked stubs AND constitution refs missing the marker causeprism_auditto returnexit_status: "fail"and non-zero CLI exit. Forces every stub to be either implemented or explicitly declared. - Q3 (marker token):
PRISM-NYI. Namespaced (won’t false-positive on grep), brand-consistent withPRISM_AGENT_IDENTITY/prism_*, self-documenting. Applied across all source types per §2.

