Files
stack/packages/forge/pipeline/rails/dynamic-composition.md
Mos (Agent) 10689a30d2
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
feat: monorepo consolidation — forge pipeline, MACP protocol, framework plugin, profiles/guides/skills
Work packages completed:
- WP1: packages/forge — pipeline runner, stage adapter, board tasks, brief classifier,
  persona loader with project-level overrides. 89 tests, 95.62% coverage.
- WP2: packages/macp — credential resolver, gate runner, event emitter, protocol types.
  65 tests, 96.24% coverage. Full Python-to-TS port preserving all behavior.
- WP3: plugins/mosaic-framework — OC rails injection plugin (before_agent_start +
  subagent_spawning hooks for Mosaic contract enforcement).
- WP4: profiles/ (domains, tech-stacks, workflows), guides/ (17 docs),
  skills/ (5 universal skills), forge pipeline assets (48 markdown files).

Board deliberation: docs/reviews/consolidation-board-memo.md
Brief: briefs/monorepo-consolidation.md

Consolidates mosaic/stack (forge, MACP, bootstrap framework) into mosaic/mosaic-stack.
154 new tests total. Zero Python — all TypeScript/ESM.
2026-03-30 19:43:24 +00:00

90 lines
4.2 KiB
Markdown

# Dynamic Composition Rules
## Principle
Only relevant specialists participate. A Go Pro doesn't sit in on a TypeScript project.
## Cross-Cutting Agents — ALWAYS PRESENT
Contrarian + Moonshot participate in EVERY debate at EVERY level. No exceptions.
They are the two extremes that push the boundaries of thinking.
## Board — ALWAYS STATIC
CEO, CTO, CFO, COO + Contrarian + Moonshot. Every brief. No exceptions.
## Planning 1 — Selected by Brief Analyzer (NOT the Board)
After Board approval, the Brief Analyzer (Sonnet) determines technical composition.
### Selection Heuristics
| Signal in Brief | Include |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Any brief (always) | Software Architect |
| Any brief (always) | Security Architect — security is cross-cutting; implicit requirements are the norm, not the exception |
| Deploy, infrastructure, scaling, monitoring | Infrastructure Lead |
| Database, data models, migrations, queries | Data Architect |
| UI, frontend, user-facing changes | UX Strategist |
### Minimum Composition
Planning 1 always has at least: Software Architect + Security Architect + Contrarian + Moonshot.
The Brief Analyzer adds others as needed.
## Planning 2 — Selected by Planning 1
The ADR specifies which specialists participate.
### Selection Heuristics
Parse the ADR for:
| Signal in ADR | Include |
| ----------------------------------------- | ---------------- |
| TypeScript / .ts files | TypeScript Pro |
| JavaScript / .js / Node.js | JavaScript Pro |
| Go / .go files | Go Pro |
| Rust / .rs / Cargo | Rust Pro |
| Solidity / .sol / EVM | Solidity Pro |
| Python / .py | Python Pro |
| SQL / Prisma / database queries | SQL Pro |
| LangChain / RAG / embeddings / agents | LangChain/AI Pro |
| NestJS / @nestjs | NestJS Expert |
| React / JSX / components | React Specialist |
| React Native / Expo | React Native Pro |
| HTML / CSS / responsive | Web Design |
| Design system / components / interactions | UX/UI Design |
| Blockchain / DeFi / smart contracts | Blockchain/DeFi |
| Docker / Compose / Swarm | Docker/Swarm |
| CI / pipeline / Woodpecker | CI/CD |
## Planning 3 — ALWAYS FIXED
Task Distributor + Context Manager. Every brief.
## Planning 2 — ALWAYS includes Contrarian + Moonshot alongside selected specialists
## Planning 3 — ALWAYS FIXED
Task Distributor + Context Manager + Contrarian + Moonshot.
## Review — Selected by task language
Code Reviewer (always) + Security Auditor (always) + the Language Specialist that matches the task's primary language.
(Contrarian and Moonshot do NOT participate in Review — that's evidence-based, not debate.)
If PR changes API endpoints → API Documentation Specialist also reviews.
## Documentation — Selected by change type
After Test passes, before Deploy:
| Signal | Include |
| ------------------------------------------ | ---------------------------------- |
| API endpoint changes | API Documentation Specialist |
| New architecture, setup steps, or patterns | Developer Documentation Specialist |
| User-facing feature changes | User Documentation Specialist |
Documentation completeness is enforced at the Deploy gate.