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:
| Level | Method | When |
|---|---|---|
| Repository | File counts, manifest parity, JSON schema | Every clone |
| Session | Cursor Agent behavior smoke tests | Before phase work |
| Architect | Acceptance summary in RESPONSE_TEMPLATE §2 | Before freeze |
Quick Validation Commands
# 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.toolPHPUnit architecture tests (when permitted to run):
php artisan test tests/Architecture/EngineeringRuntimePlatformIntegrityTest.php \
tests/Architecture/EngineeringOperatingSystemIntegrityTest.php \
tests/Architecture/GovernanceDocumentationTest.phpRuntime Constraints (Rules)
Manifest: ENGINEERING_INDEX §5 · Contract: RuntimeConstraintContract
Artifacts: .cursor/rules/*.mdc, .cursor/rules/catalog/*.md
Validate
| Step | Expected |
|---|---|
Count .mdc files | 9 |
Count catalog .md (excl. README) | 11 |
Open 00-eos-authority.mdc | References docs/releases/, ENGINEERING_INDEX.md |
| Prompt agent to edit frozen path | Refusal aligned with freeze rules |
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Rules not applied | User Rules override | Disable conflicting user rules; use project rules |
| Missing rule file | Incomplete clone | git pull; verify .cursor/rules/ tracked |
| Agent ignores freeze | Scope not in globs | Check 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
| Step | Expected |
|---|---|
Manifest lists 10 skill-* IDs | Match directories |
| Each SKILL.md header | RuntimeProcedureContract + manifest pointer |
| Required sections | Purpose, Inputs, Outputs, Responsibilities, Forbidden Actions, Dependencies |
| Auto-invocation | Skill description in YAML frontmatter |
Example
User: Which ERP procedure covers architecture boundaries?
Expected: References skill-architecture and runtime/manifests/defaults/procedures-manifest.mdTroubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Skill not discovered | Wrong folder name | Match manifest directory exactly |
| Procedure approves freeze | Skill text error | Escalate — manifest forbidden actions |
Runtime Workflows (Workflow Skills)
Manifest: runtime/manifests/defaults/workflows-catalog.md · Contract: RuntimeWorkflowContract
Artifacts: .cursor/skills/{catalog-id}/SKILL.md
Validate
| Step | Expected |
|---|---|
| 10 workflow IDs in manifest | bootstrap … status |
| Frontmatter | disable-model-invocation: true |
| Report section | Format A or B declared |
Invoke /phase or phase skill | Agent follows workflow actions |
Example
User: /bootstrap with baseline v4.2-public-experience-platform
Expected: Format B report sections; no code changes unless authorizedTroubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Workflow auto-runs | Missing disable-model-invocation | Check workflow SKILL.md frontmatter |
| Wrong report format | Wrong workflow invoked | Use workflow-report to select format |
Legacy /commands/ path | Deprecated mirror | Use .cursor/skills/{id}/SKILL.md |
Runtime Delegation (Subagents)
Manifest: runtime/manifests/defaults/delegation-manifest.md · Contract: RuntimeDelegationContract
Artifacts: .cursor/agents/*-agent.md
Validate
| Step | Expected |
|---|---|
| 10 delegate files | Match manifest IDs |
| Readonly delegates | readonly: true — architecture, security, boundary, review |
| Launch readonly delegate + write task | delegation_guard denies |
| Escalation documented | No direct Architect channel |
Example
Launch delegate-architecture → readonly explore → compliance matrix output
Developer pastes to Architect (not delegate to ChatGPT)Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Readonly agent writes | Hook disabled | Enable hooks in Cursor settings |
| Wrong subagent_type | Frontmatter mismatch | Compare 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
| Step | Expected |
|---|---|
hooks.json schema | RuntimeEnforcementContract |
Shell smoke: git push | Denied |
Shell smoke: git commit --no-verify | Denied |
| MCP smoke (no mcp.json) | Denied by mcp_guard |
| Handler count | 4 |
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| All shell blocked | Handler parse error | Run python3 .cursor/hooks/shell_guard.py manually |
| Hooks not firing | Cursor hooks disabled | Enable in Cursor Settings |
| Cloud session differs | Known gap | See 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
| Step | Expected |
|---|---|
| 3 provider templates | All enabled: false |
No committed .cursor/mcp.json | Gitignored |
| MCP tool call without local config | Blocked |
| Enablement | Architect approval required |
Enable (after approval only)
- Copy
mcp.config.template.json→.cursor/mcp.json - Merge approved provider entries from
.cursor/mcp/providers/ - 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
| Mode | Artifact | Check |
|---|---|---|
| Local | Committed .cursor/ | Agent inherits project workspace |
| CLI | cli.json | Deny rules for push, .env |
| Cloud | environment.json | install command present; no secrets |
| Background | Parent mirror | Same .cursor/ as parent session |
See capability matrix in execution-manifest § Capability Matrix.
Runtime Contracts
Authority: contracts/runtime-contracts.md
| Contract | Quick check |
|---|---|
RuntimeConstraintContract | 9 rules + catalogs |
RuntimeProcedureContract | skills-manifest + 10 domain skills |
RuntimeWorkflowContract | commands-catalog + 10 workflow skills |
RuntimeDelegationContract | agents-manifest + 10 agents |
RuntimeEnforcementContract | enforcement-manifest + hooks.json |
RuntimeContextProviderContract | context-providers-manifest + templates |
RuntimeExecutionContract | execution-manifest + cli/environment JSON |
RuntimeAdapterContract | runtime-adapter-v1.json + adapter profile |
Runtime Adapter
Profile: adapters/cursor-adapter-v1/profile.md
Metadata: adapters/cursor-adapter-v1/manifest.json
| Check | Expected |
|---|---|
adapterVersion | Matches profile |
implementedContracts | 7 component contracts |
pendingContracts | [] |
| Manifest paths in JSON | All 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:
## 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.