Status:
draft v0.1 — body sourced from TriGraph spec entity. Docs-mirror file added by docs lane to surface ratified specs that lacked an on-disk mirror.SPEC-088: Agent Preflight Discipline and Reflexive Rule Gates
SPEC-088 v0.1 — Agent Preflight Discipline and Reflexive Rule Gates
Status: draft for immediate Frank/Samantha/Donna review Author: Candi, governance/methodology Origin: Frank mandate captured by Samantha in journal #82, signalf6812482-8ff9-49f3-8f0b-ef7c916652ca
Related: SPEC-085, SPEC-063, SPEC-078, SPEC-081, SPEC-059, SPEC-060, ADR #52
Summary
This SPEC turns four recurring agent anti-patterns into explicit operating discipline:- doc-skip
- memory-skip
- brute-force hacking / diagnostic bypass
- asking permission instead of acting
Problem
Journal #82 records a concrete failure chain from Samantha’s Render session:- Render/Neo4j plan sizing was copied from stale or adjacent context instead of checked against current vendor docs.
- Existing memory and resume notes already pointed to relevant context, including the Render API key path and sizing feedback, but were not applied before action.
- Black-box edge probing substituted for direct Render API inventory.
- The agent asked whether to file a postmortem even though postmortem-on-error was already an unconditional rule.
Taxonomy
The parent failure is preflight-skip: acting before checking the minimum source that should govern the action.A. Doc-Skip
Definition: The agent relies on training memory, neighboring examples, or inferred vendor behavior when a primary source exists and the action depends on a current external fact. Applies before:- vendor/cloud/IaC mutations
- plan/tier/limit/cost/resource sizing choices
- API/SDK/protocol/version-sensitive work
- auth/OAuth/security configuration
- generated deployment files such as Render Blueprints, Terraform, Helm, Docker Compose, GitHub Actions, or Cloudflare config
- official docs, API schema, CLI help, or live provider API inventory
- current date-aware where the fact can change
- citation or explicit note of what was checked
B. Memory-Skip
Definition: The agent fails to query Prism memory, resume notes, journals, or recent feedback before an action that is historical, architectural, previously-postmortemed, or project-specific. Applies before:- continuing a resumed lane
- touching a surface with known postmortems
- changing cloud/deploy/install/signaling/memory/governance behavior
- asking the operator for a fact likely to exist in handoff, secrets notes, journal, or memory
- repeating a diagnosis path already tried in prior sessions
Render plan tier, Neo4j sizing, OAuth redirect, API key path, or Blueprint pserv port.
C. Diagnostic Bypass / Brute-Force Hacking
Definition: The agent keeps probing, retrying, renaming, or changing parameters after a direct source of truth exists or after the real blocker is access/info rather than implementation. Rules:D. Permission Reflex
Definition: The agent asks whether to do a mandatory or clearly assigned action instead of doing it. Rules:- file a postmortem for every detected error
- ACK and act on non-empty signal drains
- checkpoint or wrap at lifecycle close
- record a journal/delta when handing off substantive work
- update TODOs when work is completed or new work is discovered
- signal the correct lane owner when a cross-lane answer is needed
Risk Tiers
Low risk:- read-only file inspection
- local tests
- formatting or docs copy that does not alter doctrine
- code changes to shared behavior
- MCP verb behavior
- dashboard behavior
- docs/spec changes with methodology impact
- production-state mutation
- cloud/vendor resource provisioning
- security/auth/OAuth/secrets changes
- governance/authority changes
- deploy/install path changes
- multi-agent coordination/routing changes
Reflexive Enforcement Design
Phase 0 is normative text only. Phase 1+ adds guardrails.Phase 1 — Prompt and BIOS Surface
Add a compact rule block to BIOS/methodology surfaces:- external-current fact -> docs/API first
- project/historical fact -> Prism memory first
- two failed probes -> stop and identify missing source of truth
- unconditional methodology trigger -> do it, do not ask
Phase 2 — Pre-Tool Self-Check
Add an agent-side checklist/method fragment that fires before high-risk tools or production mutations:Phase 3 — Telemetry and Warnings
Ring 5 records and surfaces:- actions taken after no recent recall in high-risk contexts
- repeated probe loops
want me to/should Ipermission-reflex language before unconditional actions- postmortems that cite doc-skip or memory-skip
- operator corrections from SPEC-060 once
prism_operator_inputlands
Phase 4 — Contract Integration
Agent Role Contracts include preflight obligations by role and risk tier. Repeated violations affect role-binding standing per SPEC-085, not the canonical role globally.Immediate Rule Additions
These rules are effective as governance guidance immediately on SPEC creation, pending ratification into templates/Agent Contracts:- Docs-before-current-external-facts: If a fact can change outside the repo and controls a production/cloud/API/IaC decision, check the official source before acting.
- Memory-before-project-history: If the question is how Prism has handled something before, or a surface has recent postmortems, query Prism memory before git/SQL/probing.
- Two-probe stop: More than two failed probes of the same unknown requires naming the missing source of truth before continuing.
- API-over-edge: Provider API/CLI/logs beat black-box edge checks for provider state. Edge checks confirm symptoms only.
- Postmortems-first: Every detected error gets a postmortem; never ask permission to file one.
- Do-not-ask-for-mandated-actions: If the queue, signal, methodology, or operator mandate clearly assigns the next action, execute and report.
- Root-cause-before-cosmetic-change: Do not rename formats, swap delimiters, or tweak configs as experiments without a named root cause.
- Cite-the-preflight: High-risk session deltas, journals, PRs, or signals must name the doc/API/memory source used for the preflight.
Acceptance Criteria
- ADR #52 records the SPEC-vehicle decision.
- SPEC-088 exists as the durable vehicle.
- Immediate rules are captured as memory for current agents.
- TODOs exist for BIOS/method-fragment update, telemetry hook design, and Agent Contract integration.
- Samantha receives TaskCompleted/StatusUpdate with the rule set and vehicle decision.
- Frank receives a concise report of what changed and what remains to implement.
Open Implementation Work
- Add a method fragment for high-risk preflight checks.
- Add BIOS/template wording during the next governed template sweep.
- Add telemetry rules for two-probe loops and permission-reflex phrases.
- Fold preflight obligations into Agent Role Contracts when that SPEC lands.
- Consider dashboard panels: doc-skip incidents, memory-skip incidents, repeated-probe loops, permission-reflex corrections.
References
- Journal #82
b71b5fd3-b031-4034-86cc-763146005d0b - SPEC-085 Constitutional Governance Vocabulary and Rights Model
- SPEC-063 Postmortem + Retrospective Discipline
- SPEC-060 Operator-Experience Memory Capture
- SPEC-059 Tri-Graph Memory Activation
- SPEC-081 Structured Large Payload Pattern
feedback_memory_first_for_historicalfeedback_postmortem_on_every_errorfeedback_continue_through_milestonesfeedback_size_for_full_capability

