Background
Split from #64. The core existing-project support and .ralphrc configuration are now complete. This issue captures the monorepo-specific features that were proposed but not yet implemented.
Proposed Features
1. MONOREPO_SERVICES configuration in .ralphrc
Add support for declaring service boundaries in .ralphrc:
# Example .ralphrc additions
MONOREPO_SERVICES="api,web,shared,workers"
MONOREPO_ROOT="services/"
Use case: Projects with multiple services (e.g., services/api/, services/web/, packages/shared/) where Ralph needs awareness of the structure.
2. Monorepo-aware PROMPT.md template
Add guidance in the generated PROMPT.md for:
- Service boundary detection: Help Ralph understand which service it's modifying
- Cross-service change handling: When changes in one service require updates to another (e.g., shared types, API contracts)
- Scoped testing: Run tests only for affected services
Example additions to PROMPT.md:
## Monorepo Guidelines
- This project contains multiple services: {{SERVICES}}
- When modifying shared code, check for impacts in dependent services
- Run service-specific tests: `npm test --workspace={{service}}`
3. Service-scoped Ralph execution (optional)
Allow running Ralph on a specific service:
This would:
- Set working context to that service
- Adjust PROMPT.md scope dynamically
- Run only relevant tests
Questions to evaluate
Before implementing, consider:
- Is this needed? Do users actually run Ralph at repo root for monorepos, or do they
cd into each service?
- Complexity vs. value: Would simple documentation suffice, or does Ralph need code changes?
- Alternative: Could this be solved with multiple
.ralph/ directories (one per service)?
Related
Background
Split from #64. The core existing-project support and
.ralphrcconfiguration are now complete. This issue captures the monorepo-specific features that were proposed but not yet implemented.Proposed Features
1.
MONOREPO_SERVICESconfiguration in.ralphrcAdd support for declaring service boundaries in
.ralphrc:Use case: Projects with multiple services (e.g.,
services/api/,services/web/,packages/shared/) where Ralph needs awareness of the structure.2. Monorepo-aware PROMPT.md template
Add guidance in the generated PROMPT.md for:
Example additions to PROMPT.md:
3. Service-scoped Ralph execution (optional)
Allow running Ralph on a specific service:
This would:
Questions to evaluate
Before implementing, consider:
cdinto each service?.ralph/directories (one per service)?Related