ari-layer-guardian
Enforce ARI's six-layer architecture and prevent dependency violations
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Enforce ARI's six-layer architecture and prevent dependency violations
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Discord slash commands, approval routing, channel policy, button interaction patterns for OpenClaw/ARI Discord integration
Obsidian vault integration patterns โ vault-analyzer.ts, /ari-vault-* commands, morning briefing snippet, PARA structure, read-only enforcement
OpenClaw plugin development patterns โ hooks, manifest structure, plugin SDK, APEX/CODEX enforcement
NOVA's P1 PayThePryce pipeline โ market signal ingest, card detection, price monitoring, script generation, thumbnail generation, video assembly, approval gate
CHASE's P2 Pryceless Solutions pipeline โ lead discovery, 5-criteria audit, LLM qualification, Prompt Forge 4-pass lock, demo generation, outreach approval gate
NOVA's thumbnail generation pipeline โ Ideogram V3 via Fal.ai (primary) + DALL-E 3 fallback, 4-variant strategy, Pokemon TCG copyright rules,
Based on SOC occupation classification
| name | ari-layer-guardian |
| description | Enforce ARI's six-layer architecture and prevent dependency violations |
| triggers | ["check layer violations","validate architecture","import check","layer compliance"] |
Enforce ARI's strict six-layer architecture (ADR-004) and prevent dependency violations that could compromise security.
6. Interfaces (CLI) โ Can import: 5, 1
โ
5. Execution (Ops) โ Can import: 4, 1
โ
4. Strategic (Governance) โ Can import: 3, 1
โ
3. Core (Agents) โ Can import: 2, 1
โ
2. System (Router) โ Can import: 1
โ
1. Kernel (Security) โ Can import: NOTHING (self-contained)
| Layer | Directory | Components |
|---|---|---|
| 6 | src/cli/ | Commands, CLI interface |
| 5 | src/ops/ | Daemon, launchd |
| 4 | src/governance/ | Council, Arbiter, Overseer |
| 3 | src/agents/ | Core, Guardian, Planner, Executor, Memory |
| 2 | src/system/ | Router, Storage |
| 1 | src/kernel/ | Gateway, Sanitizer, Audit, EventBus, Config, Types |
# Find potential violations
grep -r "from '\.\./governance" src/agents/
grep -r "from '\.\./agents" src/system/
grep -r "from '\.\./system" src/kernel/
// โ
CORRECT: System importing from Kernel
import { EventBus } from '../kernel/event-bus.js';
// โ
CORRECT: Agents importing from Kernel
import type { Message } from '../kernel/types.js';
// โ
CORRECT: Governance importing from Agents
import { Guardian } from '../agents/guardian.js';
// โ WRONG: Kernel importing from System
import { Router } from '../system/router.js';
// โ WRONG: Agents importing from Governance
import { Council } from '../governance/council.js';
// โ WRONG: System importing from Agents
import { Executor } from '../agents/executor.js';
Layer violations can:
When reviewing or writing code:
Instead of direct imports, use EventBus:
// Instead of importing from higher layer:
// โ import { Council } from '../governance/council.js';
// Use EventBus:
// โ
this.eventBus.emit('governance:vote_required', { proposal });
// โ
this.eventBus.on('governance:vote_result', (result) => { ... });
Add ESLint rule to enforce:
{
"rules": {
"no-restricted-imports": ["error", {
"patterns": [
// Kernel cannot import anything
{ "from": "../system/*", "importNames": ["*"], "message": "Kernel cannot import from System" }
]
}]
}
}