Draft
Conversation
…ta fields and MCP tools - Add optional packagesToRun and packagesToValidate string array fields to MetadataFile, WriteMetadataInput, and LoomMetadata (with empty-array defaults) - Register set_package_to_run MCP tool (single string stored as single-element array) - Register set_packages_to_validate MCP tool (string array stored directly) - Both tools warn but don't fail when package paths don't exist on disk - Use !== undefined guard in writeMetadata to allow clearing arrays to empty - Fix specific error handling (SyntaxError vs ENOENT) in MCP tool catch blocks - Also fix missing swarmTeamName conditional spread in writeMetadata
- Add 'monorepo' to ProjectCapability union type and Zod schema - Auto-detect monorepo from pnpm-workspace.yaml and package.json workspaces field in ProjectCapabilityDetector - Update iloom-framework-detector agent template to recognize monorepo markers - Update init-prompt.txt to include monorepo as a project type option - Add helpful error message in open command for monorepo-only projects - Add docs for project capabilities including monorepo in iloom-commands.md - Fix type-safe mock casts in ProjectCapabilityDetector tests
78064ee to
49452b7
Compare
…s from metadata When packagesToValidate is set in loom metadata, il test, il lint, il compile, and il build now scope commands to only those packages using the detected package manager's filter syntax (pnpm --filter, npm --workspace, yarn workspaces foreach). - Add packages option to RunScriptOptions and buildMonorepoFilterArgs helper - ScriptCommandBase reads packagesToValidate from MetadataManager and passes to runScript - CompileCommand.execute override updated with same scoping logic - ValidationRunner accepts packagesToValidate in ValidationOptions and passes to all steps - Auto-fix Claude agents receive --append-system-prompt instructing them to use il commands - finish.ts reads packagesToValidate from metadata and passes to runValidations - Packages missing the target script are gracefully skipped via --if-present flag - Tests updated and new monorepo scoping tests added to ValidationRunner.test.ts
…gration - Add `iloom-monorepo-package-detector` agent template that explores workspace structure and calls MCP tools to set packagesToRun and packagesToValidate - Add IS_MONOREPO template variable to PromptTemplateManager derived from project capabilities - Wire detection agent in ignite.ts for both non-swarm (runs before implementation) and swarm (orchestrator calls after completion) workflows - Add IS_MONOREPO-conditioned detection step in issue-prompt.txt Todo Lists (swarm step 6.5, non-swarm step 15.5) and pre-implementation instruction block - Add IS_MONOREPO-conditioned Step 5.2.8 in swarm-orchestrator-prompt.txt for post-swarm detection - Add monorepo package reminder to UserPromptSubmit handlers in iloom-hook.js - Exclude detection agent from standard agent auto-loading in all three load sites - Update ignite.test.ts with new exclusion glob pattern - Document monorepo detection workflow in docs/iloom-commands.md
When both web and monorepo capabilities are present, il dev-server now watches the loom metadata file instead of launching immediately. Once packagesToRun is populated by the detection agent, the dev server launches from the correct package subdirectory. Key behaviors: - Detects web+monorepo capabilities and enters watch mode - Uses fs.watch with 15s polling fallback for reliability - Times out after 60s with an actionable error message - Concurrency-safe (isChecking guard prevents overlapping reads) - Only suppresses ENOENT and SyntaxError in catch (not all errors) - Validates package path is relative to prevent path traversal - Falls back to root-level launch when monorepo capability is absent - Tracks is_monorepo on devServer.started telemetry event
…ection agent, and dev server watching - Metadata fields (packagesToRun, packagesToValidate) with MCP tools (#939) - Monorepo capability auto-detection during il init (#940) - Scoped il test/lint/compile/build to declared packages (#942) - Package detection agent for non-swarm and swarm workflows (#943) - Dev server metadata watching for monorepo package target (#944) - Fix MCP tool name mismatches (camelCase -> snake_case) and add tools to swarm allowedTools - Add monorepo guide, README section, and command reference docs Fixes #938
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #938
Epic: Monorepo Package-Aware Commands
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])This PR was created automatically by iloom.