home / skills / terrylica / cc-skills / bootstrap-monorepo

bootstrap-monorepo skill

/plugins/itp/skills/bootstrap-monorepo

This skill helps you bootstrap a polyglot monorepo from scratch, wiring Python, Rust, and Bun with autonomous 9-phase workflows.

npx playbooks add skill terrylica/cc-skills --skill bootstrap-monorepo

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.7 KB
---
name: bootstrap-monorepo
description: Autonomous polyglot monorepo bootstrap meta-prompt. TRIGGERS - new monorepo, polyglot setup, scaffold Python+Rust+Bun, monorepo from scratch.
allowed-tools: Read
---

# Bootstrap Polyglot Monorepo

This skill redirects to the canonical reference in mise-tasks.

→ **See**: [mise-tasks/references/bootstrap-monorepo.md](../mise-tasks/references/bootstrap-monorepo.md)

## When to Use This Skill

Use this skill when:

- Starting a new polyglot monorepo from scratch
- Setting up Python + Rust + Bun/TypeScript project structure
- Need autonomous 9-phase bootstrap workflow (includes release setup)
- Want Pants + mise integration for affected detection

## Stack

| Tool      | Responsibility                                                         |
| --------- | ---------------------------------------------------------------------- |
| **mise**  | Runtime versions (Python, Node, Rust) + environment variables          |
| **Pants** | Build orchestration + native affected detection + dependency inference |

## Quick Commands

```bash
# After bootstrap, use these Pants commands:
pants --changed-since=origin/main test    # Test affected
pants --changed-since=origin/main lint    # Lint affected
pants tailor                               # Generate BUILD files
pants list ::                              # List all targets
```

## Related Skills

- `itp:mise-tasks` - Task orchestration and affected detection (Level 11)
- `itp:mise-configuration` - Environment and tool version management
- `itp:semantic-release` - Release automation (Phase 8 reference)

---

## Troubleshooting

| Issue                      | Cause                      | Solution                                          |
| -------------------------- | -------------------------- | ------------------------------------------------- |
| Pants not found            | Not installed              | Install via `brew install pantsbuild/tap/pants`   |
| mise not loading           | Shell hook not configured  | Configure mise shell hook in ~/.zshrc             |
| BUILD files not generated  | Missing `pants tailor`     | Run `pants tailor` to generate BUILD files        |
| Affected detection empty   | No base branch set         | Ensure `origin/main` exists and is up to date     |
| Python version mismatch    | mise vs Pants conflict     | Align Python version in mise.toml and pants.toml  |
| Rust targets not found     | Pants Rust backend missing | Enable Rust backend in pants.toml                 |
| Node/Bun not detected      | Not in mise tools          | Add to mise.toml: `node = "latest"` or `bun`      |
| Dependency inference fails | Missing imports in source  | Ensure explicit imports, run `pants tailor` again |

Overview

This skill bootstraps a polyglot monorepo that scaffolds Python, Rust, and Bun/TypeScript projects with an autonomous 9-phase workflow. It integrates mise for runtime/version management and Pants for build orchestration and affected detection. The goal is a repeatable, CI-friendly monorepo structure ready for development and automated releases.

How this skill works

The skill runs a multi-phase bootstrap that creates workspace layout, tool configuration, and CI-ready metadata. It configures mise to pin runtimes and environment variables, enables Pants backends for Python, Rust, and Node/Bun, and scaffolds BUILD files and package manifests. It also wires semantic-release-compatible hooks and affected-change detection so only impacted targets are tested and released.

When to use it

  • Starting a new polyglot monorepo from scratch
  • Scaffolding Python + Rust + Bun/TypeScript projects together
  • Needing automated affected-target testing and linting in CI
  • Implementing Pants-driven build orchestration with mise-managed runtimes
  • Setting up a repeatable bootstrap that includes release automation

Best practices

  • Pin runtime versions in mise.toml and mirror them in pants.toml to avoid mismatches
  • Run pants tailor immediately after bootstrap to generate BUILD files for legacy patterns
  • Use --changed-since=origin/main with Pants for fast affected-only test and lint runs
  • Enable required Pants backends (Rust, Node) explicitly in pants.toml to surface language targets
  • Add mise shell hook to user shells so toolchains load consistently in CI and dev environments

Example use cases

  • Create a new company monorepo combining backend Python services, Rust libraries, and frontend Bun apps
  • Bootstrap an open-source project that needs reproducible runtimes and CI that tests only changed targets
  • Migrate several language-specific repos into a single monorepo while retaining per-language build tooling
  • Set up a developer sandbox where mise controls Python/Node/Rust versions and Pants runs affected tests and linters

FAQ

How do I test only what changed?

Use Pants with a base ref, e.g. pants --changed-since=origin/main test and pants --changed-since=origin/main lint to run tests and linters for affected targets only.

What if Pants or mise is not found in my environment?

Install Pants (brew or package) and add the mise shell hook to your shell config. Ensure mise is configured in mise.toml and tools are declared so runtimes install automatically.