ari-layer-guardian
Enforce ARI's six-layer architecture and prevent dependency violations
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Enforce ARI's six-layer architecture and prevent dependency violations
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
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,
| 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" }
]
}]
}
}