Production-ready AI Builder Agent API that turns idea inputs into deterministic, execution-ready build plans.
Simple to install. Cheap to run. Amazing to use. Built to work.
It combines GitHub + Reddit research signals, benchmark scoring, and strict quality gates to produce:
- executable blueprint artifacts
- implementation task breakdowns
- rollout/rollback and test plans
- deterministic proof data (
planHash,qualityScore,timeToFirstWowMs)
Most AI planning tools stop at prompt text. InayanBuilderBot focuses on a narrower, high-value outcome:
Deterministic Magic Run: one API call that executes
Scout -> Benchmark -> Blueprint -> Execution Task List
with reproducible output structure, evidence citations, and pre-ship quality checks.
- Simple to install:
npm ci && npm run setup:auto && npm run dev:auto - Cheap to run: Node + Express, low infrastructure requirements, optional local-first mode
- Amazing to use: one-click Magic Run and recompile diff flow
- Built to work: strict schemas, proof metrics, tests, CI, and security checks
Endpoint: POST /api/v1/masterpiece/magic-run
What it guarantees:
- deterministic sorting + hashing (
planHash) for reproducibility - hard schema validation for blueprint and execution tasks
- quality scoring with auto-repair attempts before final output
- project memory updates for better future recompiles
- research-evidence attachment for major decisions
Primary output fields:
timeToFirstWowMsplanHashqualityScoreblueprintexecutionBridgeevaluationmarkdownPlan
Execution output now includes Playwright-focused E2E planning artifacts by default:
tests/e2e/magic-run.spec.tstests/e2e/deploy-targets.spec.tsplaywright.config.ts
Related endpoints:
POST /api/v1/masterpiece/recompileGET /api/v1/masterpiece/magic-run/demoPOST /api/v1/masterpiece/finish/runGET /api/v1/projects/:projectKey/memoryGET /api/v1/product/focus
Real-system execution mode (/api/v1/masterpiece/pipeline/run with runExternal=true + EXTERNAL_INDEXING_MODE=openclaw) now includes a repo completion stage:
external_release_four_repos_check- emits
release_summary.hard_failuresandrelease_summary.env_blocked_checks - emits
dependency_hintwhen a repo fails from missing local install dependencies (e.g. missingvite)
POST /api/v1/masterpiece/magic-runPOST /api/v1/masterpiece/finish/runPOST /api/v1/masterpiece/recompileGET /api/v1/masterpiece/magic-run/demoPOST /api/v1/masterpiece/pipeline/runPOST /api/v1/masterpiece/buildGET /api/v1/product/focusGET /api/v1/projects/:projectKey/memory
POST /api/v1/scout/runPOST /api/v1/benchmark/runGET /api/v1/github/capabilitiesPOST /api/v1/github/researchGET /api/v1/reddit/capabilitiesPOST /api/v1/reddit/searchPOST /api/v1/research/fusion(supports deterministic selectors)
POST /api/v1/chat/replyPOST /api/v1/chat/reply/stream(SSE)GET /api/v1/chat/providersGET /api/v1/chat/historyGET /api/v1/chat/sessionsGET /api/v1/chat/sessions/:sessionId
GET /api/v1/indexing/capabilitiesPOST /api/v1/indexing/syncPOST /api/v1/indexing/readinessPOST /api/v1/indexing/dashboard-scoutPOST /api/v1/index/refreshGET /api/v1/index/search?q=...GET /api/v1/index/statsGET /api/v1/index/gap-hotspotsGET /api/v1/setup/statusPOST /api/v1/setup/onboardGET /api/v1/runsGET /health
git clone https://github.com/smanthey/InayanBuilderBot.git
cd InayanBuilderBot
npm ci
npm run setup:auto
npm run setup:index:shared
npm run dev:auto
## Public Push Policy
- Branch policy: `main` is the public release line.
- Run before every push:
```bash
npm run public:safety:check- Full policy: docs/PUSH-RULES.md
Health and checks:
```bash
npm run lint
npm run security:check
npm run mcp:health
npm test
npm run test:e2e
macOS shortcut: double-click launch.command.
curl -X POST http://localhost:3030/api/v1/masterpiece/magic-run \
-H 'Content-Type: application/json' \
-H 'x-api-key: local-dev-key' \
-d '{
"productName": "InayanBuilder",
"userGoal": "Generate deterministic, implementation-ready AI product plans",
"stack": ["node", "typescript", "postgres", "react"],
"constraints": {
"budgetUsd": 5000,
"deadlineDays": 14,
"teamSize": 2
},
"timeoutTier": "fast",
"deterministic": true,
"idempotencyKey": "demo-run-001"
}'Expected response highlights:
productFocus: "deterministic_magic_run"planHash: "..."qualityScore: <number>timeToFirstWowMs: <number>executionBridge.tasks[]with owner, estimate, dependencies, acceptance criteria
Use this to generate the production finishing system (quality architecture + human-like E2E + UX loop + release gate + repo coverage) with benchmarked OSS exemplars:
curl -X POST http://localhost:3030/api/v1/masterpiece/finish/run \
-H 'Content-Type: application/json' \
-H 'x-api-key: local-dev-key' \
-d '{
"productName": "InayanBuilder",
"userGoal": "Finish all sellable repos with production-grade quality and human-like E2E",
"stack": ["node", "typescript", "postgres", "react", "playwright"],
"focusRepos": [
"autopay_ui",
"capture",
"CaptureInbound",
"FoodTruckPass",
"veritap_2026",
"quantfusion",
"InayanBuilderBot",
"pingmyself",
"Madirectory"
],
"timeoutTier": "standard",
"benchmarkTopK": 12,
"minStars": 500
}'Expected output highlights:
qualityArchitecturehumanLikeE2EStandarduxUiImprovementLoopgapHotspots(learned from latest rolling completion-gap report)repoCriticalFlowCoveragereleaseGatebestOpenSourceExemplarsexecutionBridge.tasksplanHash,timeToFirstWowMs
Use this to inspect what the builder currently treats as the highest-frequency break patterns from real repo completion runs:
curl -X GET http://localhost:3030/api/v1/index/gap-hotspots \
-H 'x-api-key: local-dev-key'Expected output highlights:
hotspots.topSections[](e.g.queue_retry,observability,auth)hotspots.topIssues[](e.g.FORBIDDEN_PATTERN,MULTITENANT_BASELINE_MISSING)hotspots.reportPathandhotspots.totalRepos
Use this to validate and improve actual repos (not just plan generation):
curl -X POST http://localhost:3030/api/v1/masterpiece/pipeline/run \
-H 'Content-Type: application/json' \
-H 'x-api-key: local-dev-key' \
-d '{
"productName": "Repo Completion Sweep",
"userGoal": "Find hard failures across active repos and classify env-blocked checks",
"stack": ["node", "express", "postgres"],
"queries": ["repo reliability checks", "dashboard chat ai builder"],
"runExternal": true,
"runGithubResearch": false,
"runRedditResearch": false
}'Look for:
stageResults[].stage == "external_release_four_repos_check"stageResults[].detail.release_summarystageResults[].detail.dependency_hint
Output quality is enforced by design:
- strict Zod schemas for blueprint and execution tasks
- required implementation sections (API contracts, migrations, tests, rollout/rollback)
- auto-repair for failing quality criteria
- request caps for budget and timeout tiering (
fast,standard,deep) - idempotency key replay support
- pipeline-stage caching for GitHub/Reddit research to speed repeat runs
Per-project memory is persisted and reused in recompiles:
- accepted decisions
- rejected options + reasons
- hard constraints
- decision history and latest
planHash
This reduces rework and keeps iteration stateful.
Research is native to the product:
- GitHub repo + issues/code-answer evidence
- Reddit fallback-chain signal collection and ranking
- fusion leaderboard that blends benchmark + research evidence
- citation attachment for major planning decisions
- deterministic source selection (
useLatestRuns=false+ run/query selectors) for reproducible fusion outputs
See: docs/RESEARCH_AND_BENCHMARKS.md
See also: docs/FINISHING-PROCESS.md
InayanBuilderBot now pairs with the claw-architect completion loop for repo-level execution readiness:
- confidence-scored section status (
complete,incomplete,partial,gap) - evidence-backed findings (file + matched signal snippets)
- prioritized
research_backloggeneration for remaining gaps - issue-level evidence bundles for faster autofix planning
- optional link-suppressed mode for private/internal runs
Example (from claw-architect):
npm run repo:completion:gap -- --repo veritap_2026 --no-research-linksUse this mode when you want clear completion status and exact missing sections without emitting GitHub/Reddit URLs in output artifacts.
Core:
BUILDERBOT_API_KEYALLOWED_ORIGINEXTERNAL_INDEXING_MODE(builtin|auto|openclaw)MAGIC_RUN_MAX_BUDGET_USD(optional cap)SQLITE_INDEX_ENABLED(1by default)INAYAN_DB_PATH(default:.data/inayan-index.db)INAYAN_E2E_MOCK_MODE(1only for deterministic local/CI Playwright runs)CODE_INDEX_DIR(shared jCodeMunch index directory for all local agents)
GitHub:
GITHUB_TOKENGITHUB_PERSONAL_ACCESS_TOKEN(optional alias)
Chat providers:
OPENAI_API_KEYDEEPSEEK_API_KEYANTHROPIC_API_KEYorCLAUDE_API_KEYGEMINI_API_KEYorGOOGLE_API_KEY
Reddit intelligence:
REDDIT_USER_AGENTREDDIT_DEFAULT_SUBREDDITSREDDIT_REQUEST_TIMEOUT_MSREDDIT_AUTH_PROFILES(optional)
Setup and MCP details:
- Express API + middleware hardening (
helmet, rate-limits, API key auth) - data persistence in
.data/for runs, memory, and chat sessions - SQLite index store for repos, evidence, snapshots, query cache, and project memory (
.data/inayan-index.db) - secret handling + security checks in CI
- Docker support via
Dockerfileanddocker-compose.yml
See:
Repeatable flow from tutorial videos and research to a shippable builder: add YouTube URLs to claw-architect, run youtube:index:auto and youtube:index:to-brief, then Reddit/search and repo:completion:gap --repo InayanBuilderBot; run inayan:full-cycle --until-repo InayanBuilderBot until no gaps. See docs/RUNBOOK.md.
Use InayanBuilderBot with claw-architect for a single pipeline from video URLs to research and content-ready briefs:
- In claw-architect:
npm run content-creator:pipeline— runs YouTube index → brief → Reddit search → builder research agenda. Producesdocs/INAYAN-BUILDER-VIDEO-SPEC.mdand research reports. - InayanBuilderBot:
POST /api/v1/reddit/search,POST /api/v1/research/fusion,POST /api/v1/masterpiece/magic-run— deepen research and get blueprints. - claw-architect: use the brief to drive copy or script generation (goal API,
aicreator,copy_lab_run). See claw-architectdocs/CONTENT-CREATOR.md.
docs/RUNBOOK.md— Mission Control integration, env contract, pipeline.docs/UPDATE_NOTES.mddocs/RESEARCH_AND_BENCHMARKS.mddocs/GAP_ANALYSIS.mddocs/ONBOARDING.mddocs/AI_SEARCH_DISCOVERABILITY.md
This README is intentionally written for both human readers and AI retrieval systems:
- stable product naming (
InayanBuilderBot,Deterministic Magic Run) - endpoint-first sections for machine parsing
- explicit keyword coverage (
AI builder agent,deterministic planning,GitHub research,Reddit research,execution bridge) - concise run commands and reproducible outputs
For maintainers, see: docs/AI_SEARCH_DISCOVERABILITY.md
MIT - see LICENSE