/loxihart-ai:running-drive-automationfrom loxihart-ai
Operates the Drive Automation Chain 1+2 system — a multi-agent Google Drive classification and routing pipeline backed by a Supabase audit trail. Activates when the user wants to classify, route, or organize Google Drive files; invoke the agent council; run the drive router; check for file drift; trigger smoke tests; view the Supabase audit log; or work with any component of the personal drive automation system. Also triggers on: organize my drive, run the council, classify these files, drive drift, agent council, chain 1, chain 2, drive router, run smoke test, check drive audit, council memo, n8n drive workflow, supabase drive, CrewAI council, fire up the council, batch classify, council throughput, asyncio parallel, drive pipeline, file routing, drive inbox. Always use this skill before touching any part of the drive automation system — even if the request seems simple (e.g., "check the audit log", "did the router run?"). NOTE: n8n MCP CONNECTION_ISSUE. Chain 1 manual-only at krosebrook.app.n8n.cloud.
Ships in loxihart-ai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
TL;DR: Chain 1 (n8n) classifies + routes incoming Drive files automatically.
Chain 2 (10 CrewAI crews in agent_council.py) performs deep per-file evaluation
and writes structured memos. Supabase logs every action. Smoke tests gate
production runs.
⚠ DEGRADED STATE ACTIVE — n8n MCP is CONNECTION_ISSUE. Chain 1 automatic trigger is unavailable via MCP. See DEGRADED MODE section before proceeding. Chain 2, Supabase, and Google Drive components are fully operational.
This block fires before any Chain 1 operation is attempted.
IF n8n MCP status = CONNECTION_ISSUE:
STOP. Do NOT attempt MCP tool calls to trigger or monitor Chain 1.
Do NOT simulate Chain 1 execution or fabricate routing results.
Chain 1 manual trigger path:
1. Navigate to https://krosebrook.app.n8n.cloud
2. Workflows → "Drive Router Chain 1"
3. Click "Execute workflow" (top-right button, lightning bolt icon)
4. Monitor execution in the Executions tab on the left sidebar
5. Verify results in Supabase: SELECT * FROM file_audit ORDER BY
created_at DESC LIMIT 20;
Chain 2, Supabase queries, Google Drive reads, and drift checks are
UNAFFECTED by this failure. Proceed with those operations normally.
"Just do it" override: If user explicitly says "try the n8n MCP anyway,"
attempt the call once and report the exact error. Do not retry silently.
| Component | Status | Notes |
|---|---|---|
| Chain 1 — Drive Router (auto trigger via MCP) | ❌ UNAVAILABLE | n8n MCP CONNECTION_ISSUE; use manual trigger at krosebrook.app.n8n.cloud |
| Chain 1 — Execution log monitoring via MCP | ❌ UNAVAILABLE | Check manually: n8n.cloud → Executions |
| Chain 1 — Webhook trigger (direct curl) | ✅ OPERATIONAL | curl to CHAIN1_WEBHOOK_URL still works; see Chain 1 section |
| Chain 2 — Agent Council (agent_council.py) | ✅ OPERATIONAL | Runs locally via Python; no n8n dependency |
| Chain 2 — Drift Check (--drift-check) | ✅ OPERATIONAL | Runs locally; reads Drive via API, writes to Supabase |
| Supabase audit log (file_audit, council_memos) | ✅ OPERATIONAL | Supabase MCP and direct SQL both available |
| Google Drive reads (classify, list, fetch) | ✅ OPERATIONAL | Google Drive MCP unaffected |
| Smoke Tests (partial) | ⚠ PARTIAL | [PASS] Chain 1 webhook reachable will FAIL if n8n is down; all other checks pass |
In DEGRADED MODE, the recommended workflow is:
Chain 1 webhook reachable);
treat this as expected, not a blocker for Chain 2 operationsWhat do you need?
├─ Route a batch of new files
│ ├─ n8n MCP operational ──────────────► Chain 1 — see §Golden Path: Chain 1
│ └─ n8n MCP CONNECTION_ISSUE ──────────► Chain 1 MANUAL — see §Manual Trigger
│
├─ Deep evaluation on files ────────────────► Chain 2 Council — FULLY OPERATIONAL
│ see §Golden Path: Council
│
├─ Check for file drift ────────────────────► Drift Watcher — FULLY OPERATIONAL
│ see §Golden Path: Drift
│
├─ Verify pipeline health ──────────────────► Smoke Tests — PARTIAL (1 expected FAIL)
│ see §Smoke Test Protocol
│
├─ View what happened to a file ────────────► Supabase audit — FULLY OPERATIONAL
│ see references/supabase-schema.md
│
├─ Understand crew roles/behavior ──────────► FULLY OPERATIONAL
│ see references/crews.md
│
├─ Configure n8n Chain 1 ───────────────────► Manual only while MCP down
│ see references/n8n-config.md
│ and §Manual Trigger below
│
└─ Apply asyncio throughput fix ────────────► FULLY OPERATIONAL
see references/asyncio-fix.md
| Component | Location | Purpose | MCP Status |
|---|---|---|---|
| Chain 1 — Drive Router | krosebrook.app.n8n.cloud → chain1_drive_router.n8n.json | Watches Drive, classifies files, routes to destination folders | ❌ MCP UNAVAILABLE — manual trigger available |
| Chain 2 — Agent Council | personal/drive-automation/agent_council.py | 10 CrewAI crews evaluate each file; produces structured memo | ✅ OPERATIONAL |
| Supabase Audit | personal/drive-automation/supabase_migration.sql | Schema: file_audit + council_memos tables | ✅ OPERATIONAL |
| Smoke Tests | personal/drive-automation/smoke_test.py | End-to-end validation; 1 FAIL expected in degraded mode | ⚠ PARTIAL |
| Drift Watcher | Embedded in agent_council.py | Detects files that moved or changed classification since last run | ✅ OPERATIONAL |
⚠ Lane rule: Personal drive automation uses a dedicated Supabase project. Never route through oorstbwcydxwiojrsoim (Loxihart). Verify .env SUPABASE_URL before any Supabase op.
⚠ Large-file rule: Files >3KB (agent_council.py 22K, chain1_drive_router.n8n.json 32K, supabase_migration.sql 7.6K, smoke_test.py 7.9K) must be pushed via git push locally — Zapier's github_create_or_update_file times out above 3KB.
CONNECTION CHECK — n8n MCP: CONNECTION_ISSUE Claude cannot trigger or monitor Chain 1 via MCP. Use direct webhook curl (path A, below) OR the manual UI trigger (path B). Both paths work regardless of MCP status.
# 1. Confirm Chain 1 is active in n8n dashboard
# https://krosebrook.app.n8n.cloud → Workflows → "Drive Router Chain 1"
# Status toggle must be: Active
# 2. Trigger via webhook (see references/n8n-config.md for full URL + auth headers)
curl -X POST <CHAIN1_WEBHOOK_URL> \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <N8N_WEBHOOK_TOKEN>" \
-d '{"trigger": "manual", "folder": "<DRIVE_INBOX_FOLDER_ID>"}'
# 3. Monitor execution in n8n Executions tab (manual, since MCP unavailable)
# https://krosebrook.app.n8n.cloud → Executions → filter by "Drive Router Chain 1"
# 4. Verify results in Supabase file_audit table (Supabase MCP: OPERATIONAL)
# SELECT * FROM file_audit ORDER BY created_at DESC LIMIT 20;
→ Full webhook config, auth, node map: references/n8n-config.md
1. Navigate to https://krosebrook.app.n8n.cloud
2. Workflows → "Drive Router Chain 1"
3. Click "Execute workflow" button (lightning bolt, top-right of editor)
4. Executions tab → watch the live run populate
5. When complete: verify in Supabase (see Path A, step 4)
# Pre-flight: run smoke tests first — NEVER skip
python personal/drive-automation/smoke_test.py
# Expected in DEGRADED MODE:
# [FAIL] Chain 1 webhook reachable ← expected, non-blocking in degraded mode
# [PASS] all other checks
# If any check other than Chain 1 webhook FAILs: stop and debug before proceeding.
# Build manifest
MANIFEST='{
"run_id": "'$(date +%Y-%m-%d-%H%M)'",
"items": [
{"file_id": "...", "name": "...", "mime_type": "...", "path": "..."}
]
}'
# POST to council endpoint
curl -X POST https://<COUNCIL_HOST>/council \
-H "Content-Type: application/json" \
-d "{\"manifest\": $MANIFEST}"
# Poll Supabase for memo results (Supabase MCP: OPERATIONAL)
# SELECT * FROM council_memos WHERE run_id = '<run_id>';
If batch > 5 files: Apply the asyncio parallel fix first → references/asyncio-fix.md
Council crew behavior: → references/crews.md
Or use the script wrapper: bash scripts/run_council.sh --manifest <path_to_manifest.json>
# Drift watcher runs inside agent_council.py when invoked with --drift flag
python personal/drive-automation/agent_council.py --drift-check
# Output: files flagged with [DRIFT] have changed classification or path since last run
# Review each DRIFT entry before re-routing — don't auto-re-route drift without review
# Results written to Supabase file_audit (Supabase MCP: OPERATIONAL for review)
Run before every production council batch. In DEGRADED MODE, 1 FAIL is expected.
cd personal/drive-automation/
python smoke_test.py
# Expected output — DEGRADED MODE (n8n MCP CONNECTION_ISSUE):
# [FAIL] Chain 1 webhook reachable ← EXPECTED in degraded mode; non-blocking for Chain 2
# [PASS] Supabase connection (personal project)
# [PASS] file_audit table exists
# [PASS] council_memos table exists
# [PASS] agent_council.py imports cleanly
# [PASS] Sample crew instantiation
# [PASS] Drift watcher init
# Expected output — FULLY OPERATIONAL (n8n MCP connected):
# [PASS] Chain 1 webhook reachable
# [PASS] Supabase connection (personal project)
# [PASS] file_audit table exists
# [PASS] council_memos table exists
# [PASS] agent_council.py imports cleanly
# [PASS] Sample crew instantiation
# [PASS] Drift watcher init
# STOP conditions:
# Any FAIL other than "Chain 1 webhook reachable" → debug before proceeding
# "Chain 1 webhook reachable" FAIL in FULLY OPERATIONAL mode → n8n is actually down
Before invoking the council on a real batch:
n8n MCP status checked. If CONNECTION_ISSUE, FAIL_IF block acknowledged. FAIL: Chain 1 triggered via MCP while n8n MCP is CONNECTION_ISSUE — use direct webhook curl or manual UI trigger per §Golden Path: Chain 1.
personal/drive-automation/ files are current in GitHub.
FAIL: Any of the 4 large files (agent_council.py, chain1_drive_router.n8n.json,
supabase_migration.sql, smoke_test.py) not pushed locally via git push —
do NOT use Zapier for files >3KB.
Supabase migration has run on personal project.
FAIL: file_audit or council_memos tables missing in personal Supabase project
→ run supabase_migration.sql against the personal project before proceeding.
.env SUPABASE_URL points to personal project (NOT oorstbwcydxwiojrsoim).
FAIL: SUPABASE_URL contains oorstbwcydxwiojrsoim → lane isolation violation;
stop immediately and correct the env var before any Supabase write.
smoke_test.py passes with 0 unexpected failures.
FAIL: Any PASS→FAIL other than "Chain 1 webhook reachable" in degraded mode
→ debug the specific failing component before running production batch.
Chain 1 n8n workflow is Active (manual UI check). FAIL: Chain 1 status is Inactive in n8n Cloud UI → activate before triggering or the webhook will be ignored regardless of trigger method.
If batch > 5 files: asyncio parallel fix applied.
FAIL: Batch >5 files submitted to Council without asyncio fix → ThreadPoolExecutor
default will exceed RPM cap; apply fix per references/asyncio-fix.md.
COUNCIL_HOST env var is set and /council endpoint is reachable.
FAIL: curl -I https://<COUNCIL_HOST>/council returns non-200 → Chain 2 cannot
receive the manifest; debug Council host before proceeding.
| File | Load when... |
|---|---|
references/crews.md | Running council; need to understand crew roles, tweak behavior, or debug a specific crew output |
references/n8n-config.md | Configuring Chain 1, debugging webhook, updating trigger conditions or node logic; required for CHAIN1_WEBHOOK_URL and auth headers |
references/supabase-schema.md | Querying audit log, running migrations, understanding table structure or RLS |
references/asyncio-fix.md | Batch > 5 files; applying or reverting parallel throughput improvement |
oorstbwcydxwiojrsoim).
Cross-contamination breaks audit trails.ThreadPoolExecutor at 5 workers.smoke_test.py must fully PASS before any production run
(in degraded mode: all checks except "Chain 1 webhook reachable"). One
unexpected FAIL = debug first.smoke_test.py uses [FAIL] Chain 1 webhook reachable as
a hard-stop signal, but in degraded mode this FAIL is expected and non-blocking
for Chain 2. The smoke test protocol in this skill annotates this explicitly,
but the smoke_test.py script itself does not distinguish between
CONNECTION_ISSUE (n8n MCP down) and n8n Cloud itself being down. A test FAIL
on this line requires manual confirmation of n8n Cloud health before proceeding.references/n8n-config.md contains the load-bearing CHAIN1_WEBHOOK_URL
and auth headers. If that reference file is absent, the direct webhook
curl in §Golden Path: Chain 1 cannot be completed without locating those
values in the n8n Cloud UI manually. Consider embedding the webhook URL
pattern (without the token) in this SKILL.md directly.[PASS] Chain 1 webhook reachable tests the webhook URL, not
the n8n MCP connection. If n8n Cloud itself goes down (not just MCP), this
test FAIL is no longer "expected and non-blocking" — it indicates Chain 1
cannot run at all, even via manual trigger. Manual confirmation of n8n Cloud
health status required when this check fails.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub krosebrook/loxihart-skills --plugin loxihart-ai37 skills in this plugin
/ai-agents-workflowBuilds and implements AI agents, automation workflows, and tool integrations — MCP servers (2025 async, OAuth, stateless spec), LangChain and CrewAI agents, multi-LLM orchestration, and no-code platforms. Use when the user mentions: MCP server, build an agent, tool integration, API orchestration, multi-LLM routing, OAuth flow, webhook, connect services, deploy a workflow, integrate external APIs. Not for conceptual architecture overviews (use orchestrating-ai- agents), not for production n8n incident ops (use operating-n8n-production), and not for pure no-code platform wiring (use workflow-automation).
/ai-solution-architectureDesign pre-sales technical architectures for AI/ML solutions targeting B2B enterprise clients. Use when scoping AI implementations, designing reference architectures, mapping integration patterns, estimating infrastructure requirements, or preparing technical proposals. Triggers on solution design, AI architecture, technical scoping, integration mapping, infrastructure sizing, pre-sales engineering for AI projects.Other plugins' skills for the same job
/applying-adversarial-reviewApplies Kyle's adversarial review methodology to consequential outputs. Forces every recommendation, audit, plan, or claim through three checks before shipping: a CLAIMS / COUNTEREXAMPLE / CONTRADICTIONS footer, [SOURCED] vs [GENERATED] provenance labeling, and an agreement-streak flag at three consecutive consequential agreements. Use when finishing an audit, writing a recommendation, delivering a plan, drafting a decision memo, or producing any high-stakes deliverable. Also triggers when explicitly asked to pressure-test, stress-test, steelman, play devil's advocate, fight an idea, or check for blind spots. Triggers on: adversarial review, anti-sycophancy, claims footer, stress test this, steelman this, pressure test, devil's advocate, am I missing anything, what could go wrong, sourced vs generated, agreement streak, push back on this, where am I wrong, review this PR, pull request review, code review, PR feedback.