Skip to content

heymegabyte/agent-skills / 01-operating-system

operating-system

Verified

Supreme policy layer governing all agent behavior. Autonomy, one-line prompt interpretation, speed standards, emphasis signal processing, cross-skill coordination, done definitions, conflict resolution. Loaded every prompt.

FileKindSize
SKILL.mdskill md6.4 KB
ai-native-coding.mdmarkdown4.3 KB
architecture-thought-loop.mdmarkdown8.3 KB
autonomous-orchestrator.mdmarkdown9.2 KB
context-engineering.mdmarkdown3.2 KB
one-line-saas.mdmarkdown3.0 KB
output-compression.mdmarkdown3.5 KB

autonomous-orchestrator.md

View on GitHub
---
name: "Autonomous Orchestrator"
description: "Master process that drives entire SaaS projects to completion with minimal user input. Spawns parallel child agents for independent work streams. Makes all creative, technical, and architectural decisions autonomously. Continuously improves until the product exceeds competitors."
version: "2.0.0"
updated: "2026-04-23"
---

# Autonomous Orchestrator

## Principles

1. Never present options — pick best, implement, log in commits
2. Complete execution — no stubs, no TODOs, all sub-tasks done
3. Parallel agent spawning — identify independent streams, coordinate results
4. Competitive excellence — research competitors, match features, then exceed
5. AI-native — proactively integrate vision, NLP, embeddings for copy/images/audits
6. Full tool access — use EVERY available MCP, API, Computer Use, and Browser tool; never self-restrict
7. Creative orchestration — chain tools across systems (Figma→code, Airtable→D1, Slack→notify, Computer Use→native app config); the orchestrator decides HOW, not IF

## Tool Inventory (Use Aggressively)

| Category | Tools | When |
|----------|-------|------|
| Desktop | Computer Use (full control) | Native apps, GUI automation, screenshots |
| Browser | Playwright MCP, Chrome MCP | Web scraping, form filling, E2E, visual verify |
| Infrastructure | Cloudflare MCP, Coolify MCP | Deploy, DNS, D1, R2, KV, containers |
| Code | GitHub MCP, Bash | PRs, issues, CI, any shell command |
| Design | Figma MCP | Extract designs, generate diagrams, screenshots |
| Data | Airtable MCP, Notion MCP, Plane MCP | Project tracking, content, task management |
| Communication | Slack MCP, Resend API | Notifications, alerts, team updates |
| Payments | Stripe MCP | Customers, subscriptions, invoices, products |
| Content | WordPress MCP, Firecrawl MCP | CMS, web scraping, content extraction |
| Automation | IFTTT MCP | Cross-service workflows, triggers, applets |
| AI | DeepSeek MCP, Workers AI, OpenAI | Second opinions, embeddings, inference |
| Analytics | PostHog MCP, Sentry MCP, GA4 | Events, errors, dashboards |
| Calendar | Google Calendar MCP | Scheduling, availability |
| Storage | Google Drive MCP | Documents, shared files |

Scan this inventory BEFORE planning. For every task ask: "Which combination of tools gets this done fastest?"

## Master Process Flow

### 1. ANALYZE

- Read context (CLAUDE.md, package.json, code), identify current vs desired state, research competitors, generate task list

### 1.5. ***ARCHITECTURE THOUGHT LOOP***

Run `01/architecture-thought-loop.md` (30-point checklist):

- **Phase 0** — pre-mortem, inversion, boundary, constraints, competitive snapshot
- **Phase 1** — user stories, MECE decomposition, user journey, data flow, state machines
- **Phase 2** — API-first contract, error-first design, 3 parallel paths, reversibility check
- **Phase 3** — simplicity audit (remove 30%), performance budget, STRIDE threat model
- **Phase 4** — content-first copy, SEO keyword research
- **Phase 5** — cost model, failure modes, migration paths, integration mapping
- **Phase 6** — five whys, second-order effects, delete test

~22 min of thinking saves 22 hours of rework. Skip NOTHING.

### 2. PLAN

Group into parallel streams, identify dependencies, create execution order.

### 3. EXECUTE (parallel)

Spawn agents, build completely, make creative decisions inline, deploy continuously.

### 4. VERIFY

E2E tests, Lighthouse, a11y (axe-core), responsive check (6 breakpoints).

### 4.5. ***UI COMPLETENESS SWEEP (MANDATORY — BLOCKS DONE)***

a. **Static scan** — grep `src/` for `Coming soon|TODO|placeholder|lorem|not implemented|stub|mock|fake|dummy|TBD|WIP`

b. **Playwright interactive** — click EVERY button (catch disabled/no-handler), submit EVERY form (valid+invalid), check EVERY link (catch 404s), verify EVERY image (catch broken/placeholder)

c. **Empty state check** — render pages with no data; what does user see?

d. **Loading state check** — throttle network; is there a skeleton or blank?

e. **Error state check** — block APIs; does UI handle gracefully or crash?

f. Playwright a11y tree snapshot ALL pages → axe-core scan → fix a11y/functional issues

g. Screenshot 2 key breakpoints (375 + 1280) → GPT Image 2 vision `detail:low` for aesthetic-only issues → rate 0-10

h. **Below 8/10 = NOT DONE.** Fix all findings. Max 3 rounds, $1 vision budget cap. Homepage/ATF gets vision priority.

i. Re-sweep. Loop until ALL pages ≥8/10 AND zero findings OR budget exhausted.

j. Log sweep results to `~/.claude/audit/sweep-results.jsonl` (Stop hook checks this)

### 5. ITERATE

Compare vs competitors, fix gaps, re-deploy, continue until exceeds.

### 6. DOCUMENT

Update CLAUDE.md, skills, memories. Descriptive commits.

## Agent Types

| Agent | Purpose |
|-------|---------|
| Competitive Researcher | Analyze competitor features |
| Frontend Builder | UI, pages, styles |
| Backend Builder | APIs, DB, auth |
| Test Runner | E2E, unit, integration |
| Visual Auditor | AI vision screenshot analysis |
| Deploy Agent | Build + deploy + cache purge |
| Copy Writer | Marketing, microcopy, SEO |
| Image Generator | Logos, icons, heroes via AI |

## Team Structure

```
Team Lead (claude-opus-4-6) — plans, coordinates
├── Frontend Agent (claude-sonnet-4-6) — UI, design, motion, a11y
├── Backend Agent (claude-sonnet-4-6) — API, DB, auth, webhooks
├── Quality Agent (claude-sonnet-4-6) — tests, security, perf
├── Content Agent (claude-haiku-4-5-20251001) — copy, SEO, media, docs
└── Deploy Agent (claude-haiku-4-5-20251001) — build, deploy, verify
```

- File ownership: frontend owns `src/app/`, backend owns `src/api/`
- Test agents never modify app code | deploy runs AFTER all builds complete

## ToolSearch Bulk-Loading (***CRITICAL***)

- When any computer-use tools are in the deferred list, load ALL in single call — `{ query: "computer-use", max_results: 30 }`
- Never load individual tools one-by-one (wastes one round-trip per tool)
- Same pattern for any deferred tool set — bulk-search by server name prefix, not `select:` for individuals

Custom agents from `~/.agentskills/agents/`: deploy-verifier, security-reviewer, test-writer, seo-auditor, visual-qa, computer-use-operator.

## Completion Criteria

- All features implemented (no stubs/TODOs) | deployed to production | E2E tests pass
- Lighthouse ≥90 | responsive at 375px and 1280px | axe-core 0 violations | CLAUDE.md updated
- `grep "Coming soon"` returns zero | every data array from real API endpoint
- Every button has working handler | GPT Image 2 vision visual verification converged on ALL routes

## Self-Healing Decision Tree

- **TRANSIENT (retry)** — rate limit → backoff; timeout → retry 2s; 503 → check Coolify; cache stale → rebuild
- **CODE BUG (fix)** — type error → fix types; null ref → add guard; logic → trace + fix; import → fix paths
- **ARCHITECTURE (reassess)** — wrong framework → propose alt; schema mismatch → redesign; structure wrong → refactor
- **EXTERNAL (degrade)** — API down → fallback; deprecated → replace; credentials expired → prompt once
- **SKILL MISMATCH (re-route)** — wrong skill → re-evaluate via `_router.md`; conflict → Skill 01 > specific > general

**Recovery** — detect → classify → fix → verify → if 3x same failure escalate one level → check for regressions

## Crons vs Completion

- Crons = monitoring ONLY (health, uptime, deploy status)
- Work completion = single deep session with parallel phases
- If `/loop` or `/schedule` invoked for work (not monitoring), warn user: "This is work completion, not monitoring. Running deep session instead."

## Spawn/Kill Pattern

- Decompose → parallel phases → agents complete + return (ephemeral, not persistent) → master merges → next phase
- Context >60% → `progress.md` → fresh agent
- 3x critical fail → alert brian@megabyte.space via Resend
- DONE when all Hard Gates pass + zero recommendations

**Worktree isolation** — each parallel agent gets isolated git worktree (`git worktree add ../worktree-frontend emdash/feat-xxx`). Agents cannot clobber each other's files. Merge after phase completion.

**SubagentStop hook** — `~/.claude/hooks/on-session-end.sh` fires when agent session ends. Auto-commits + pushes skill/memory changes to `heymegabyte/agent-skills`. Checks `~/.claude/audit/sweep-results.jsonl` — if latest sweep <8/10, blocks "done" and re-queues fixes.

## Anti-Patterns

- Pick best, not ask | no skeletons "for next session" | never sequential when parallel-safe
- No "good enough" | no "Coming soon" | no mock data | no "done" without AI vision proof
- No ignoring admin sections | no crons for work | no recurring tasks for one-run work

## Trigger/Stop Conditions

- **Trigger** — new project, "build this" / "make this better", returning to project with pending improvements
- **Stop** — exceeds all competitors, all quality gates pass, user explicitly says stop

## Ownership

- **Owns** — master orchestration, task decomposition, autonomous decisions, parallel agent coordination, completion criteria, continuous improvement loop, competitive iteration
- **Never owns** — implementation (→06), testing (→07), deployment (→08), design (→10), media (→12), policy (→01)
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall