Summary
Add monorepo awareness to iloom so that AI agents can declare which packages they're working on, and il commands (test, lint, compile, build, dev-server) automatically scope themselves to those packages.
Context
iloom currently treats every project as a single unit. In monorepos (pnpm workspaces, yarn/npm workspaces), this means validation runs against ALL packages even when changes are isolated, dev servers can't target specific packages, and agents have no structured way to communicate which packages are relevant.
Design
The AI agent (swarm orchestrator or issue implementer) is the intelligence layer. It explores the monorepo, reads the issue, and writes two metadata fields via MCP tools:
packagesToRun: string[] — which package to launch a dev server for (MCP accepts singular, stored as array for future compat)
packagesToValidate: string[] — which packages to scope test/lint/compile/build to
A new "monorepo" capability (alongside "web" and "cli") gates all monorepo behavior. It's detected during il init and stored in package.iloom.json.
A dedicated iloom-monorepo-package-detector agent runs:
- Non-swarm mode: before implementation, to set both metadata fields
- Swarm mode: after swarm completion, called by the orchestrator for final validation setup
All il commands read from metadata. Auto-fix agents receive --append-system-prompt instructing them to use il commands. A user-prompt-submit hook reminds agents to update metadata when touching new packages.
The dev server command, when both web and monorepo capabilities are present, watches the metadata file and launches once packagesToRun is set.
Acceptance Criteria
- Agents can set monorepo package metadata via MCP tools
il test, il lint, il compile, il build scope to declared packages when metadata is set
il dev-server launches the correct package's dev server based on metadata
il init detects monorepos and sets the "monorepo" capability
- A dedicated detection agent runs at the right lifecycle points (before impl in non-swarm, after completion in swarm)
- Non-monorepo projects are completely unaffected
- Works with pnpm, yarn, and npm workspace package managers
Scope Boundaries
- v1 supports JavaScript/TypeScript monorepos only (pnpm + yarn/npm workspaces)
- Non-JS workspace extensions (Rust, Go, Python) are tracked separately
- Dev server supports one package at a time (reads
packagesToRun[0])
- No programmatic monorepo detection utility — the AI agent handles all detection intelligence
Summary
Add monorepo awareness to iloom so that AI agents can declare which packages they're working on, and il commands (test, lint, compile, build, dev-server) automatically scope themselves to those packages.
Context
iloom currently treats every project as a single unit. In monorepos (pnpm workspaces, yarn/npm workspaces), this means validation runs against ALL packages even when changes are isolated, dev servers can't target specific packages, and agents have no structured way to communicate which packages are relevant.
Design
The AI agent (swarm orchestrator or issue implementer) is the intelligence layer. It explores the monorepo, reads the issue, and writes two metadata fields via MCP tools:
packagesToRun: string[]— which package to launch a dev server for (MCP accepts singular, stored as array for future compat)packagesToValidate: string[]— which packages to scope test/lint/compile/build toA new
"monorepo"capability (alongside"web"and"cli") gates all monorepo behavior. It's detected duringil initand stored inpackage.iloom.json.A dedicated
iloom-monorepo-package-detectoragent runs:All il commands read from metadata. Auto-fix agents receive
--append-system-promptinstructing them to use il commands. A user-prompt-submit hook reminds agents to update metadata when touching new packages.The dev server command, when both
webandmonorepocapabilities are present, watches the metadata file and launches oncepackagesToRunis set.Acceptance Criteria
il test,il lint,il compile,il buildscope to declared packages when metadata is setil dev-serverlaunches the correct package's dev server based on metadatail initdetects monorepos and sets the"monorepo"capabilityScope Boundaries
packagesToRun[0])