Knowledge Portal · engineering documentation

Skip to content

ERP Runtime Validation Guide

Version: 1.0 · ERP: v1.0 · Adapter: Cursor Adapter v1
Purpose: Manual and command-line validation of ERP runtime layers
Checklist: docs/acceptance-checklist.md
Architecture tests (automated): Run separately — not modified in Phase 11-10


Overview

Runtime validation confirms the committed adapter workspace (.cursor/) matches canonical manifests. Validation has three levels:

LevelMethodWhen
RepositoryFile counts, manifest parity, JSON schemaEvery clone
SessionCursor Agent behavior smoke testsBefore phase work
ArchitectAcceptance summary in RESPONSE_TEMPLATE §2Before freeze

Quick Validation Commands

bash
# Rule count
ls .cursor/rules/*.mdc | wc -l    # expect 9

# Skill artifacts (10 procedures + 10 workflows)
find .cursor/skills -name SKILL.md | wc -l    # expect 20

# Delegates
ls .cursor/agents/*-agent.md | wc -l    # expect 10

# Hooks
cat .cursor/hooks.json | python3 -m json.tool

# Adapter metadata
cat adapters/cursor-adapter-v1/manifest.json | python3 -m json.tool

PHPUnit architecture tests (when permitted to run):

bash
php artisan test tests/Architecture/EngineeringRuntimePlatformIntegrityTest.php \
  tests/Architecture/EngineeringOperatingSystemIntegrityTest.php \
  tests/Architecture/GovernanceDocumentationTest.php

Runtime Constraints (Rules)

Manifest: ENGINEERING_INDEX §5 · Contract: RuntimeConstraintContract
Artifacts: .cursor/rules/*.mdc, .cursor/rules/catalog/*.md

Validate

StepExpected
Count .mdc files9
Count catalog .md (excl. README)11
Open 00-eos-authority.mdcReferences docs/releases/, ENGINEERING_INDEX.md
Prompt agent to edit frozen pathRefusal aligned with freeze rules

Troubleshooting

SymptomCauseFix
Rules not appliedUser Rules overrideDisable conflicting user rules; use project rules
Missing rule fileIncomplete clonegit pull; verify .cursor/rules/ tracked
Agent ignores freezeScope not in globsCheck rule globs in .mdc frontmatter

Runtime Procedures (Domain Skills)

Manifest: runtime/manifests/defaults/procedures-manifest.md · Contract: RuntimeProcedureContract
Artifacts: .cursor/skills/{domain}/SKILL.md

Validate

StepExpected
Manifest lists 10 skill-* IDsMatch directories
Each SKILL.md headerRuntimeProcedureContract + manifest pointer
Required sectionsPurpose, Inputs, Outputs, Responsibilities, Forbidden Actions, Dependencies
Auto-invocationSkill description in YAML frontmatter

Example

text
User: Which ERP procedure covers architecture boundaries?
Expected: References skill-architecture and runtime/manifests/defaults/procedures-manifest.md

Troubleshooting

SymptomCauseFix
Skill not discoveredWrong folder nameMatch manifest directory exactly
Procedure approves freezeSkill text errorEscalate — manifest forbidden actions

Runtime Workflows (Workflow Skills)

Manifest: runtime/manifests/defaults/workflows-catalog.md · Contract: RuntimeWorkflowContract
Artifacts: .cursor/skills/{catalog-id}/SKILL.md

Validate

StepExpected
10 workflow IDs in manifestbootstrap … status
Frontmatterdisable-model-invocation: true
Report sectionFormat A or B declared
Invoke /phase or phase skillAgent follows workflow actions

Example

text
User: /bootstrap with baseline v4.2-public-experience-platform
Expected: Format B report sections; no code changes unless authorized

Troubleshooting

SymptomCauseFix
Workflow auto-runsMissing disable-model-invocationCheck workflow SKILL.md frontmatter
Wrong report formatWrong workflow invokedUse workflow-report to select format
Legacy /commands/ pathDeprecated mirrorUse .cursor/skills/{id}/SKILL.md

Runtime Delegation (Subagents)

Manifest: runtime/manifests/defaults/delegation-manifest.md · Contract: RuntimeDelegationContract
Artifacts: .cursor/agents/*-agent.md

Validate

StepExpected
10 delegate filesMatch manifest IDs
Readonly delegatesreadonly: true — architecture, security, boundary, review
Launch readonly delegate + write taskdelegation_guard denies
Escalation documentedNo direct Architect channel

Example

text
Launch delegate-architecture → readonly explore → compliance matrix output
Developer pastes to Architect (not delegate to ChatGPT)

Troubleshooting

SymptomCauseFix
Readonly agent writesHook disabledEnable hooks in Cursor settings
Wrong subagent_typeFrontmatter mismatchCompare to agents-manifest Native type column

Runtime Enforcement (Hooks)

Manifest: runtime/manifests/defaults/enforcement-manifest.md · Contract: RuntimeEnforcementContract
Artifacts: .cursor/hooks.json, .cursor/hooks/*.py

Validate

StepExpected
hooks.json schemaRuntimeEnforcementContract
Shell smoke: git pushDenied
Shell smoke: git commit --no-verifyDenied
MCP smoke (no mcp.json)Denied by mcp_guard
Handler count4

Troubleshooting

SymptomCauseFix
All shell blockedHandler parse errorRun python3 .cursor/hooks/shell_guard.py manually
Hooks not firingCursor hooks disabledEnable in Cursor Settings
Cloud session differsKnown gapSee execution-manifest cloud parity checklist

Runtime Context Providers (MCP)

Manifest: runtime/manifests/defaults/context-providers-manifest.md · Contract: RuntimeContextProviderContract
Artifacts: .cursor/mcp/mcp.config.template.json, .cursor/mcp/providers/*.json

Validate

StepExpected
3 provider templatesAll enabled: false
No committed .cursor/mcp.jsonGitignored
MCP tool call without local configBlocked
EnablementArchitect approval required

Enable (after approval only)

  1. Copy mcp.config.template.json.cursor/mcp.json
  2. Merge approved provider entries from .cursor/mcp/providers/
  3. Bind secrets via environment variables — never commit

Runtime Execution

Manifest: runtime/manifests/defaults/execution-manifest.md · Contract: RuntimeExecutionContract
Artifacts: .cursor/cli.json, .cursor/environment.json

Validate by mode

ModeArtifactCheck
LocalCommitted .cursor/Agent inherits project workspace
CLIcli.jsonDeny rules for push, .env
Cloudenvironment.jsoninstall command present; no secrets
BackgroundParent mirrorSame .cursor/ as parent session

See capability matrix in execution-manifest § Capability Matrix.


Runtime Contracts

Authority: contracts/runtime-contracts.md

ContractQuick check
RuntimeConstraintContract9 rules + catalogs
RuntimeProcedureContractskills-manifest + 10 domain skills
RuntimeWorkflowContractcommands-catalog + 10 workflow skills
RuntimeDelegationContractagents-manifest + 10 agents
RuntimeEnforcementContractenforcement-manifest + hooks.json
RuntimeContextProviderContractcontext-providers-manifest + templates
RuntimeExecutionContractexecution-manifest + cli/environment JSON
RuntimeAdapterContractruntime-adapter-v1.json + adapter profile

Runtime Adapter

Profile: adapters/cursor-adapter-v1/profile.md
Metadata: adapters/cursor-adapter-v1/manifest.json

CheckExpected
adapterVersionMatches profile
implementedContracts7 component contracts
pendingContracts[]
Manifest paths in JSONAll files exist

Future adapters add a new profile under docs/development/adapters/ without amending ERP Core vendor paths.


Validation Report Template (for Architect)

Paste to Architect as Text Context after manual validation:

markdown
## ERP Runtime Validation Summary

**Date:** YYYY-MM-DD
**Adapter:** cursor-adapter-v1 · 1.0.0
**Mode:** Local | CLI | Cloud

| Layer | Result | Notes |
|---|---|---|
| Constraints | Pass / Fail | |
| Procedures | Pass / Fail | |
| Workflows | Pass / Fail | |
| Delegation | Pass / Fail | |
| Enforcement | Pass / Fail | |
| Context Providers | Pass / Fail | |
| Execution | Pass / Fail | |
| Contracts / Adapter | Pass / Fail | |

**Blocking issues:** None | [list]

Architect records this in RESPONSE_TEMPLATE §2 ERP Runtime Validation.


ERP Runtime Validation Guide v1.0 — manual validation companion. Automated tests documented in docs/planning/archive/erp-freeze-preparation.md.

ZAIXOS Knowledge Portal — public engineering docs at /docs · Staff operations at /admin