Deep Domain Knowledge + Information Processing Tasks + Underserved Users
| Pattern | Source | Use When |
| Decision tree router for skills | CrossBeam | Structured reference knowledge (legal, medical, compliance) |
| Two-phase human-in-the-loop | CrossBeam | Agent needs human judgment mid-workflow |
| Long-running agent on serverless | CrossBeam | Agent runs >5 min |
| Testing ladder with cost budgets | CrossBeam | Agent SDK dev ($0.01 → $15 progression) |
| 8-layer context assembly | PostVisit.ai | Multi-source knowledge, 1M context window |
| Prompt caching (78% savings) | PostVisit.ai | Multi-turn with stable system prompts |
| Tool-use reasoning pipeline | PostVisit.ai | Agent queries external APIs mid-reasoning |
| Spec-driven development | Elisa | Visual interfaces → AI code generation |
| Context chain between agents | Elisa | Multi-agent workflows needing coherence |
| Real-time WASM + AI | Conductr | Latency-sensitive AI collaboration |
| Hooks over prompts | everything-claude-code | 100% enforcement vs ~80% compliance |
| AgentShield security audit | everything-claude-code | Securing AI agent configurations |
Problem
California ADU permits: 90%+ first-submission rejection rate. Most rejections are administrative (missing signatures, wrong citations), not engineering. 6-month average delay, ~$30K cost.
Next.js 16 (Vercel) → Supabase Realtime
↓
Cloud Run (Express 5) → returns 202 immediately
↓
Vercel Sandbox (Agent SDK + claude_code preset)
↓
Claude Opus 4.6 (vision + web search + tools)
↓
Supabase (PostgreSQL + Realtime + Object Storage)
Why this stack: Agent runs 10-30 min. Serverless timeouts at 60-300s. GCP kills idle at ~5 min. Cloud Run persists, Vercel Sandbox gives filesystem access, detached mode survives drops, Supabase Realtime bridges sandbox→frontend.
Pattern: Decision Tree Router
Instead of stuffing all 28 legal reference files into context, classify each query first, load only 3-5 relevant files. Four-step routing: Lot type → Construction type → Situational modifiers (transit, coastal, fire, HOA) → Process stage.
Quick-reference thresholds embedded for fast lookup: JADU max 500 sq ft, ADU max 1,200 sq ft, Height 16/18/25 ft by type, Fee exemption ≤750 sq ft.
Takeaway
Generalizable to any domain with structured reference knowledge. Don't dump everything—route to what's relevant.
Pattern: Two-Phase Human-in-the-Loop
Phase 1 (~15 min, ~$3): Agent reads corrections → researches codes → generates questions → PAUSE.
Human step: Contractor answers via frontend form.
Phase 2 (~8 min, ~$3): Agent reads answers → generates response letter + scope + report.
Phase 1 outputs persisted to outputs table. Questions parsed into contractor_answers table with types (text, number, choice, measurement). Phase 2 reads both.
Pattern: Long-Running Agent on Serverless
| Problem | Solution |
| Serverless timeout (60-300s) | Cloud Run persistent process, returns 202 |
| GCP kills idle (~5 min) | Detached sandbox mode (detached: true) |
| Connection drops | Resilient polling (120 retries, 60 min max) |
| Frontend needs updates | Supabase Realtime, fire-and-forget logging |
Pattern: Testing Ladder with Cost Budgets
| Level | Time | Cost | What It Tests |
| L0 | 30s | $0.01 | SDK config, skill discovery |
| L1 | 2m | $0.50 | Single skill invocation |
| L2 | 3m | $1.00 | Task tool + bash + images |
| L3 | 7m | $5.00 | Multi-skill orchestration |
| L4 | 20m | $15.00 | Full real-data acceptance |
Haiku/Sonnet for L0-L2, Opus for L3+. Catch $0.01 bugs before $15 runs.
Pattern: Agent SDK Configuration
query({
options: {
tools: { type: 'preset', preset: 'claude_code' },
settingSources: ['project'],
permissionMode: 'bypassPermissions',
allowDangerouslySkipPermissions: true,
allowedTools: ['Skill','Task','Read','Write','Edit',
'Bash','Glob','Grep','WebSearch','WebFetch'],
model: 'claude-opus-4-6',
maxTurns: 80,
maxBudgetUsd: 15.00,
}
});
Gotchas: Skills not found → need settingSources: ['project']. Model init fails → use full alias 'claude-opus-4-6'. Wrong cwd → loads 13 skills instead of 6. Hangs on permissions → need both bypass flags.
Other Notable Patterns
- Rolling window subagents 1 page per subagent, 3 concurrent. Avoids >20 image limit.
- Two-layer skills Static state layer (28 files) + dynamic city layer (web research or pre-cached overlays).
- Pre-extracted PNG archives PDFs→PNGs once, .tar.gz, unpack in sandbox. Saves 5-10 min/run.
- Raw artifacts JSONB All intermediate files in one column. Frontend cherry-picks.
- Fire-and-forget logging Supabase inserts don't block agent. If logging fails, agent continues.
Key Files
| File | Why |
adu-skill-development/skill/california-adu/SKILL.md | Decision tree router pattern |
agents-crossbeam/src/utils/config.ts | Proven Agent SDK config factory |
server/src/services/sandbox.ts | Vercel Sandbox lifecycle (850 lines) |
agents-crossbeam/src/flows/corrections-analysis.ts | Phase 1 flow |
test-assets/correction-01/ | Complete agent run outputs |
Problem
Block-based tools (Scratch) have a ceiling — you can only do what predefined blocks allow. Text-based coding is intimidating for kids. No bridge exists between visual play and real production code.
This is far more than a Scratch clone. Elisa is a spec-driven agentic development environment for ages 8-14. Kids arrange blocks → blocks become a structured spec → Claude agents decompose the spec into a task DAG → multiple agents execute tasks in parallel → real code is generated, tested, committed to git, and deployed — including to physical ESP32 hardware.
Blockly Editor (React 19 + Vite)
↓ NuggetSpec JSON
Express Backend (WebSocket + REST)
↓
MetaPlanner (Claude Opus API → task DAG)
↓
AgentRunner × 3 concurrent (Claude Agent SDK)
↓ git commit per task
TestRunner (pytest / Jest auto-detect)
↓
DeployPhase (web server / ESP32 flash / portals)
↓ WebSocket events
Frontend (real-time streaming)
Pattern: Spec-Driven Development
The core paradigm flip. Code is a generated artifact, not the artifact itself. Kids specify what they want via blocks. The NuggetSpec is the intermediate representation — structured, validated, machine-readable. Agents translate spec → implementation.
interface NuggetSpec {
nugget: { goal, description, type }
requirements: [{ type, description }]
style?: { visual, personality }
agents: [{ name, role, persona }]
deployment: { target, auto_flash }
workflow: { review_enabled, testing_enabled, human_gates }
skills?: [{ id, name, prompt, category }]
devices?: [{ pluginId, instanceId, fields }]
}
Pattern: Parallel Agent Execution (DAG-Scheduled)
while (tasks_remaining) {
const ready = getReadyTasks() // no unfinished dependencies
for (const task of ready) launchTask(task)
await Promise.race([all_inflight_tasks])
}
Max 3 concurrent agents. DAG validated for cycles using Kahn's topological sort. Each task = one Agent SDK query() call: permissionMode: 'bypassPermissions', model: 'claude-opus-4-6', maxTurns: 25. Agent roles: Builder (writes code), Tester (writes/runs tests), Reviewer (code quality), Custom (user-defined).
Pattern: Context Chain Between Agents
Solves the "agent doesn't know what previous agent did" problem without token waste:
Agent 1 completes → summary written to nugget_context.md → Agent 2 reads context + structural digest (signatures only) → Agent 3 reads updated context.
No re-orientation. No dumping full source. Just summaries + structure.
Pattern: Device Plugin System
New hardware types added by dropping files — no code changes:
devices/{plugin-id}/
├── device.json # Manifest: board, capabilities, Blockly blocks
├── prompts/
│ └── agent-context.md # Injected into builder agent prompts
├── templates/ # MicroPython code generation templates
└── lib/ # Shared libraries flashed alongside user code
Four built-in plugins (ESP32 variants). Deploy ordering respects provides/requires DAG.
Frontend: One Hook Rules All
No Redux, no Zustand. All state in useBuildSession.ts: useReducer with typed discriminated union actions. WebSocket events dispatched as actions. 30+ WebSocket event types. UI phases: design → building → review → deploy → done.
Other Notable Patterns
- Teaching Engine Learning integrated into build process. Fast-path curriculum lookup, deduplication, age-appropriate (8-14) explanations.
- NarratorService Claude Haiku translates build events into kid-friendly commentary with 4 moods.
- Token Budget 500K tokens default. Warning at 80%, halt on exceed. Per-agent cost tracking.
- Content Safety Every agent prompt includes ages 8-14 safety section. Hardcoded restrictions.
- Permission Auto-Resolution Auto-approves safe ops (workspace-scoped writes). Escalates dangerous ops to user. Deny counter → escalate after 3.
What Makes This Exceptional
- Not a toy. Builds real MicroPython for ESP32 with sensors, LoRa, OLED.
- Multi-agent orchestration. DAG-scheduled parallel execution with context chain.
- Streaming everything. Agent output, serial monitor, test results — all real-time via WebSocket.
- Plugin architecture. New hardware via manifest + context file. No rebuild.
- Built by a road inspector. For his 12-year-old daughter. In 7 days.
Problem
Patients leave doctor visits confused. Research shows retention decreases with information volume. No mechanism to revisit discussions or ask follow-up questions grounded in actual visit data.
| Metric | Count |
| API endpoints | 111 |
| AI services | 15 |
| Vue components | ~30 |
| DB migrations | 22 |
| Feature tests | 262 (797 assertions) |
| Versioned prompts | 14 |
| Clinical scenarios | 12 |
| Commits | 349 |
Vue 3 SPA (patient + doctor views, Sanctum auth)
| SSE streaming
Laravel 12 (PHP 8.4) — 111 endpoints, 19 modules
|
15 AI Services → Claude Opus 4.6
| |
PostgreSQL 5 Medical APIs
(FHIR-aligned, (OpenFDA, RxNorm, DailyMed,
UUID PKs) NIH Clinical Tables, PubMed)
Pattern: 8-Layer Context Assembly
Each patient interaction assembles context across structured priority layers:
| Layer | Content | Cacheable |
| 1. System Prompt | Versioned markdown from prompts/ | Yes (5m TTL) |
| 2. Clinical Guidelines | ESC/AHA/NICE guidelines | Yes (5m TTL) |
| 3. Visit Data | SOAP note, transcript, observations | No |
| 4. Patient Record | Demographics, allergies, medications | No |
| 5. Health History | Observations 1-3 months, as trends | No |
| 6. Recent Visits | Last 3-5 visit summaries | No |
| 7. Device/Wearable | Apple Watch: HR, HRV, activity, sleep | No |
| 8. FDA Safety Data | Adverse events, drug labels (cached 24h) | Partially |
Every assembly call populates $tokenBreakdown — emitted to frontend via SSE for real-time cost visibility. Typical request: 60K-180K tokens.
Takeaway
Structure context in priority layers, don't dump everything. Track token usage per layer. Cache what's stable.
Pattern: Prompt Caching (78% Token Savings)
Stable blocks cached with CacheControlEphemeral (5m TTL). System prompts identical across requests. Cache read tokens count at 10% of input. First request creates cache (~10K tokens), subsequent requests read at ~1K tokens.
Pattern: Raw cURL Streaming (SDK Bypass)
Problem: Anthropic PHP SDK uses PSR-18 sendRequest() which buffers entire response. Streaming latency was 8-10s.
Solution: Raw curl_multi_exec with progressive SSE parsing. Yields thinking and text deltas immediately. Result: under 100ms per token. X-Accel-Buffering: no for nginx compatibility.
Pattern: Adaptive Thinking Budget
Regex-based effort classification — no AI needed for routing:
| Effort | Patterns | Budget | Latency |
| Low | "what is", "when is", "appointment" | 512 tokens | ~1-2s |
| Medium | (default) | 1,024 tokens | ~3-5s |
| High | "interactions", "side effects" | 2,000 tokens | ~5-10s |
| Max | "chest pain", "can't breathe", "suicidal" | 4,000 tokens | ~10-15s |
Safety patterns always match first. Regex handles 90%+ correctly.
Pattern: Tool-Use Agentic Loop
3 medical tools available during conversations:
| Tool | Data Source | Returns |
| check_drug_interaction | OpenFDA | Co-reported adverse events + label interaction warnings |
| get_lab_reference_range | Local JSON | Standard clinical ranges |
| get_drug_safety_info | OpenFDA + DailyMed | Boxed warnings, adverse reactions, dosing |
Agentic loop runs up to 5 iterations. Plan-Execute-Verify pipeline validates clinical responses against evidence.
Other Notable Patterns
- FHIR-Aligned Schema + Audit Trail. 22 models, UUID PKs, FHIR R4 resource types. Full audit trail: user, role, action, resource, IP, PHI access tracking.
- 3-Tier AI Comparison. Users switch Haiku/Sonnet/Opus in real-time. Each tier gets different context depth, thinking budget, and data access.
- Versioned Prompt Architecture. 14 prompts stored as markdown in
prompts/, loaded at runtime. Tracked in git. Reviewed in PRs.
- Save-First-Then-Transcribe. Recording chunks saved to S3 before transcription. WiFi drops during hospital use? Audio is safe.
- Escalation Detection. Keyword match on critical terms triggers immediate guidance. No 5-15s AI wait.
Development Timeline
| Day | Location | Key Work |
| 1 | Hospital | Research + scaffold, 67 tests by midnight |
| 2 | Hospital ward | First clinical eval with real patients |
| 3-4 | Cath lab | Coding between coronarography procedures |
| 5-6 | Brussels → SF flight | In-flight coding, demo video |
| 7 | San Francisco | Final polish, submitted 3:00 PM |
What Makes This Exceptional
- Tested in a real hospital. Actual clinical evaluations with consenting patients.
- 78% token savings. Prompt caching is production-grade thinking for a hackathon.
- Raw cURL streaming. Found and worked around SDK buffering bug. Under 100ms/token.
- Adaptive thinking. Simple questions fast (512 tokens), safety-critical deep (4K tokens).
- 262 tests in 7 days. With factory patterns and mocked AI. No excuses.
- 349 commits. Coded between hospital shifts and on a transatlantic flight.
Creative Award
Asep Bagja Priandana (Musician/Engineer, Indonesia)
Repo: Not public yet
Problem
Musicians want AI collaboration during live performance and composition — but current AI music tools are offline batch processors. No tool exists for real-time, latency-sensitive AI interaction with live musical input.
Conductr is a real-time AI music collaboration tool. The musician plays — chords, melodies, rhythms — and Claude responds with complementary musical parts in real-time. Not generating music from text prompts. Actual musical dialogue.
MIDI Input (WebMIDI API)
↓ real-time
C/WASM Audio Engine (low-latency DSP)
↓
Claude API (musical analysis + response generation)
↓
Multi-track Output (synthesized instruments)
Why C/WASM: JavaScript's garbage collector creates audio glitches. C compiled to WebAssembly gives deterministic, low-latency audio processing in the browser — no GC pauses, no buffer underruns.
Key Technical Decisions
- Phrase-level buffering. Accumulates musical phrases, not individual notes, before sending to AI. Balances context quality with latency.
- Musical quantization. AI-generated responses snapped to beat grid. Output aligns to musical time, not wall-clock time.
- WebMIDI for input. Standard protocol means any hardware controller works — keyboards, drum pads, wind controllers.
- Multi-track generation. Claude generates full arrangements across multiple instrument tracks, creating the effect of jamming with a full band.
Patterns Worth Noting
| Pattern | Description | Reusable When |
| WASM for latency-critical AI | C → WebAssembly for deterministic timing | Real-time AI (gaming, robotics, live media) |
| Phrase-level buffering | Accumulate input into meaningful chunks | AI needs context but latency matters |
| Musical quantization | AI output snapped to temporal grid | Any time-aligned AI generation |
Note
No public repo available. Architecture details reconstructed from Anthropic announcement and hackathon presentation coverage. This section will be expanded when the repo goes public.
Why It Won Creative Award
- Novel interaction paradigm. AI as real-time collaborator, not batch tool.
- C/WASM for browser audio. Engineering choice that makes real-time possible.
- Domain expertise. Built by a working musician who understands what performers need.
- Live performance viable. Not a demo — designed for stage use.
Not an app — infrastructure. A production-grade configuration system for Claude Code: 14 agents, 56+ skills, 33 commands, hooks, rules, MCP configs, and AgentShield security framework. Cross-platform (Claude Code, Cursor, OpenCode, Codex). 50K+ stars, 6K+ forks.
| Metric | Count |
| Specialized agents | 14 |
| Domain skills | 56+ |
| Slash commands | 33 |
| Hook event types | 7 types, 10+ validators |
| Language rule families | 6 (TS, Python, Go, Swift, C++, Java) |
| MCP server configs | 14 |
| Security rules (AgentShield) | 102 |
Pattern: Agent Specialization
14 agents, each scoped to a domain with specific tools and model preferences:
| Agent | Purpose | Model |
| planner | Feature decomposition + risk analysis | Opus |
| architect | System design + scalability | Opus |
| code-reviewer | Quality + security review | Sonnet |
| security-reviewer | Vulnerability detection | Opus |
| tdd-guide | Test-driven development | Sonnet |
| build-error-resolver | Compilation fixes | Sonnet |
| e2e-runner | Playwright test generation | Sonnet |
| refactor-cleaner | Dead code removal | Sonnet |
| doc-updater | Documentation sync | Sonnet |
| database-reviewer | PostgreSQL/Supabase optimization | Sonnet |
| go-reviewer | Go-specific review | Sonnet |
| python-reviewer | Python quality | Sonnet |
| chief-of-staff | Orchestration + delegation | Opus |
Key design: Agents fire proactively based on context. Code just written? code-reviewer fires. Build failed? build-error-resolver fires. Opus for thinking, Sonnet for execution.
Pattern: Hook-Based Enforcement (100% vs ~80%)
Rules say "don't push without review." Hooks guarantee it. The core insight: prompts get ~80% compliance. Hooks get 100%.
PreToolUse Hooks (block or warn)
| Hook | Behavior |
| Dev server blocker | Blocks npm run dev outside tmux |
| Git push reminder | Reminds to review before push |
| Strategic compact | Suggests /compact every ~50 tool calls |
PostToolUse Hooks (react after)
| Hook | Behavior |
| Prettier format | Auto-formats JS/TS after edits |
| TypeScript check | Runs tsc --noEmit after TS edits |
| console.log warning | Catches debug statements |
Lifecycle Hooks
| Event | Purpose |
| SessionStart | Load previous context, detect package manager |
| PreCompact | Save state before context compaction |
| SessionEnd | Persist state + extract reusable patterns |
| Stop | Audit for leftover debug statements |
All hooks in Node.js (not bash) for cross-platform compatibility. Exit code 2 = block.
Pattern: AgentShield (102-Rule Security Audit)
Purpose-built security framework for AI agent configurations. Different threat model than traditional app security:
| Threat | AgentShield Response |
| Hardcoded secrets | Scan source for API keys, passwords, tokens |
| Prompt injection | Detect malicious instructions in external content |
| Path traversal | Validate file path access boundaries |
| Supply chain attacks | Audit dependencies and MCP servers |
| Privilege escalation | Restrict shell execution access |
| Transitive injection | Flag compromised external documentation |
Multi-layer defense: Tool permissions → Path restrictions → Sandboxing → Rules + validation.
Pattern: Skills as Knowledge Codex
56+ skills organized as markdown knowledge bases — not executable tools. They provide methodology, patterns, and step-by-step procedures. Categories: coding standards, framework patterns, database, DevOps, business, architecture.
Skills are read-only. They shape how agents think. Version them in git. Review them in PRs. Never hardcode knowledge into agent prompts.
Pattern: Continuous Learning Pipeline
Session ends
↓ evaluate-session.js (SessionEnd hook)
Pattern extraction
↓
Instincts written to ~/.claude/instincts/
↓
Next session loads instincts
↓
/evolve command clusters + organizes
Markdown-as-database: All state stored as markdown files. Human-readable, git-trackable, zero dependencies.
Pattern: Multi-Platform Installation
| Target | Install Path | Method |
| Claude Code | ~/.claude/ | install.sh typescript |
| Cursor | ./.cursor/ | install.sh --target cursor |
| OpenCode | ./.opencode/ | Plugin system |
| Codex | ./.codex/ | Compatibility layer |
Also available via npm: npx ecc-install typescript python golang
What Makes This Exceptional
- Not an app — infrastructure. The meta-layer that makes every other Claude Code project better.
- Hooks over prompts. 100% enforcement vs ~80% compliance. Architecture > instructions.
- AgentShield. First security framework designed specifically for AI agent configurations. 102 rules.
- 50K+ stars. Organic adoption validates the approach.
- Multi-platform. Same source → Claude Code, Cursor, OpenCode, Codex.
- Continuous learning. Session → pattern extraction → instincts → next session. No database needed.
- Markdown-as-database. Everything human-readable, git-trackable, zero dependencies.