{"id":257,"date":"2026-02-11T17:47:03","date_gmt":"2026-02-11T17:47:03","guid":{"rendered":"https:\/\/bina-meira.co.il\/?p=257"},"modified":"2026-02-11T17:47:03","modified_gmt":"2026-02-11T17:47:03","slug":"night-research-110-ai-agents-investigate-my-projects-while-i-sleep","status":"publish","type":"post","link":"https:\/\/bina-meira.co.il\/?p=257","title":{"rendered":"Night Research: 110 AI Agents Investigate My Projects While I Sleep"},"content":{"rendered":"<article>\n<p><img decoding=\"async\" src=\"https:\/\/bina-meira.co.il\/wp-content\/uploads\/2026\/02\/night-research-sleeping.jpg\" alt=\"AI agents working while you sleep\" style=\"width:100%;border-radius:12px;margin-bottom:24px;\" \/><\/p>\n<p><strong>What if 110 AI agents could investigate your entire project portfolio while you sleep?<\/strong><\/p>\n<p>I build a lot of things. WhatsApp bots, CRM dashboards, video processing pipelines, insurance automation tools &mdash; dozens of projects accumulating in my home directory. Some are thriving. Some are abandoned mid-thought. Some probably have security issues nobody noticed.<\/p>\n<p>The problem isn't building. It's <em>knowing what you've built<\/em>.<\/p>\n<p>So I built <strong>Night Research<\/strong> &mdash; an autonomous multi-agent system that investigates my 10 most recent projects using a pyramid swarm of ~110 AI agents, generates a full portfolio report, and sends me a WhatsApp summary. All while I sleep.<\/p>\n<h2>The Architecture: A Pyramid That Flattened Into Something Better<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/bina-meira.co.il\/wp-content\/uploads\/2026\/02\/night-research-hero.jpg\" alt=\"Night Research pyramid architecture\" style=\"width:100%;border-radius:12px;margin:24px 0;\" \/><\/p>\n<p>The original vision was a clean 3-tier pyramid:<\/p>\n<ul>\n<li><strong>Tier 0:<\/strong> Main orchestrator<\/li>\n<li><strong>Tier 1:<\/strong> 10 project agents (one per project)<\/li>\n<li><strong>Tier 2:<\/strong> 100 question agents (10 per project)<\/li>\n<\/ul>\n<p>Each project agent would spawn its own question agents. Beautiful hierarchy. One problem: <strong>subagents can't spawn subagents<\/strong> in Claude Code. Only one level of nesting is allowed.<\/p>\n<p>This could have killed the project. Instead, it made it better.<\/p>\n<p>The redesigned architecture uses a <strong>2-phase fan-out<\/strong> from the main orchestrator:<\/p>\n<ol>\n<li><strong>Phase 1 &mdash; Discovery:<\/strong> 10 Explore agents each understand one project and generate 10 tailored questions<\/li>\n<li><strong>Phase 2 &mdash; Investigation:<\/strong> ~100 Explore agents each answer one question with evidence from the actual source code<\/li>\n<li><strong>Phase 3 &mdash; Synthesis:<\/strong> Main agent combines everything into per-project reports + a portfolio analysis<\/li>\n<li><strong>Phase 4 &mdash; Delivery:<\/strong> WhatsApp summary hits my phone<\/li>\n<\/ol>\n<p>The main orchestrator now has <em>full visibility<\/em> into all 100+ answers and can do cross-project analysis that nested agents never could.<\/p>\n<h2>How It Actually Works<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/bina-meira.co.il\/wp-content\/uploads\/2026\/02\/night-research-swarm.jpg\" alt=\"Swarm intelligence architecture\" style=\"width:100%;border-radius:12px;margin:24px 0;\" \/><\/p>\n<h3>Step 1: Find the Projects<\/h3>\n<p>A bash command scans my home directory for the 10 most recently modified directories that look like real projects (they have <code>.git\/<\/code>, <code>CLAUDE.md<\/code>, or <code>package.json<\/code>). System directories like Desktop, Downloads, and Library are filtered out.<\/p>\n<h3>Step 2: Discovery Agents Go Deep<\/h3>\n<p>Each discovery agent reads the project's CLAUDE.md, package.json, README, and directory structure. It determines purpose, tech stack, status, and complexity. Then it generates <strong>10 specific questions<\/strong> tailored to what it found.<\/p>\n<p>Not generic questions like &quot;Is the code well-tested?&quot; &mdash; but specific ones like &quot;The project has 3 test files in __tests__\/ but none for the API routes in src\/routes\/ &mdash; what's the test coverage gap?&quot;<\/p>\n<h3>Step 3: 100 Question Agents Investigate<\/h3>\n<p>Each question agent uses Glob, Grep, and Read to investigate one specific question. They cite files, rate their confidence, and note side findings. They run on the <strong>haiku<\/strong> model for speed and cost efficiency.<\/p>\n<h3>Step 4: Synthesis<\/h3>\n<p>The main orchestrator groups all answers by project, writes per-project reports with risk assessments, then synthesizes a portfolio-level final report with cross-project insights and prioritized recommendations.<\/p>\n<h2>The Secret Sauce: Zero Traditional Code<\/h2>\n<p>Here's what makes this wild: <strong>the entire system has zero lines of traditional code<\/strong>. No JavaScript. No Python. No build step.<\/p>\n<p>It's all natural language:<\/p>\n<ul>\n<li><code>CLAUDE.md<\/code> &mdash; orchestration rules and execution flow<\/li>\n<li><code>prompts\/discovery-agent.md<\/code> &mdash; prompt template for Phase 1 agents<\/li>\n<li><code>prompts\/question-agent.md<\/code> &mdash; prompt template for Phase 2 agents<\/li>\n<\/ul>\n<p>The &quot;programming language&quot; is English with structured output delimiters (<code>=== SECTION ===<\/code>). The &quot;runtime&quot; is Claude Code itself.<\/p>\n<h2>Cost: ~$2.50 Per Portfolio Audit<\/h2>\n<table style=\"width:100%;border-collapse:collapse;margin:24px 0;\">\n<thead>\n<tr style=\"background:#f0f0f0;\">\n<th style=\"padding:10px;border:1px solid #ddd;text-align:left;\">Component<\/th>\n<th style=\"padding:10px;border:1px solid #ddd;text-align:left;\">Count<\/th>\n<th style=\"padding:10px;border:1px solid #ddd;text-align:left;\">Model<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:10px;border:1px solid #ddd;\">Discovery agents<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">10<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">Sonnet<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:10px;border:1px solid #ddd;\">Question agents<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">~100<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">Haiku<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:10px;border:1px solid #ddd;\">Synthesis<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">1<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">Opus<\/td>\n<\/tr>\n<tr style=\"font-weight:bold;\">\n<td style=\"padding:10px;border:1px solid #ddd;\">Total<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">~111 agents<\/td>\n<td style=\"padding:10px;border:1px solid #ddd;\">~$2.50<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Key Learnings<\/h2>\n<p><strong>Constraints breed better design.<\/strong> The subagent nesting limitation forced a cleaner architecture with better observability. The main orchestrator sees everything.<\/p>\n<p><strong>Model stratification matters.<\/strong> Using Sonnet for discovery (needs reasoning) and Haiku for questions (just reading files) cuts cost ~60% with minimal quality loss.<\/p>\n<p><strong>Structured output > JSON for agents.<\/strong> The <code>=== SECTION ===<\/code> format is a sweet spot &mdash; human-readable but machine-parseable. JSON is too fragile when agents generate it.<\/p>\n<p><strong>Read-only by design, not by instruction.<\/strong> Using Explore agents (which lack Write\/Edit tools) enforces read-only at the platform level. Prompt instructions alone aren't enough.<\/p>\n<h2>What's Next<\/h2>\n<p>Night Research is the foundation for something bigger: <strong>autonomous portfolio intelligence<\/strong>. Run it nightly, track trends over time, get alerted when a project needs attention.<\/p>\n<p>Because the best time to audit your projects is while you're dreaming about the next one.<\/p>\n<hr \/>\n<p><em>Built with Claude Code. The entire project &mdash; architecture, prompts, documentation, images, and this blog post &mdash; was created in a single conversation session.<\/em><\/p>\n<p><em>Check it out: <a href=\"https:\/\/github.com\/aviz85\/night-research\">github.com\/aviz85\/night-research<\/a><\/em><\/p>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>What if 110 AI agents could investigate your entire project portfolio while you sleep? I built a pyramid swarm system that does exactly that.<\/p>\n","protected":false},"author":1,"featured_media":256,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=257"}],"version-history":[{"count":1,"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions\/258"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=\/wp\/v2\/media\/256"}],"wp:attachment":[{"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bina-meira.co.il\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}