MCAF: Solution Governance
Trigger On
- bootstrap or rewrite a repo-wide
AGENTS.md
- add project-local
AGENTS.md files for a multi-project solution
- clarify rule precedence, skill routing, or maintainability policy placement
Value
- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer
Do Not Use For
- writing feature specs or ADR content
- code-level refactoring without a governance change
Inputs
- current repo topology and module roots
- existing root or local
AGENTS.md files
- actual build, test, format, and analyze commands
- the active stack when commands or tooling are platform-specific
Quick Start
- Read the nearest
AGENTS.md and confirm scope and constraints.
- Run this skill's
Workflow through the Ralph Loop until outcomes are acceptable.
- Return the
Required Result Format with concrete artifacts and verification evidence.
Workflow
- Identify the solution root and any project or module roots that need their own
AGENTS.md.
- Keep the root file global:
- shared workflow
- shared commands
- rule precedence
- global skill list
- maintainability-limit keys
- Keep local files narrow:
- project purpose
- entry points
- boundaries
- local commands
- applicable skills
- stricter local constraints
- Resolve overlap explicitly. Local rules may be stricter or more specific, never silently weaker.
- When the stack is .NET, record:
- the test framework
- the runner model (
VSTest or Microsoft.Testing.Platform)
- the repo-root
.editorconfig as the analyzer config owner
- Put numeric maintainability limits in
AGENTS.md, not in framework prose or skill bodies.
Deliver
- one clear root
AGENTS.md
- local
AGENTS.md files only where boundaries justify them
- explicit precedence rules and skill-routing guidance
Validate
- root and local responsibilities are not duplicated blindly
- local files do not weaken root policy
- maintainability keys are present and named consistently
- an agent can tell which
AGENTS.md to read first for any path
Ralph Loop
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
- Plan first (mandatory):
- analyze current state
- define target outcome, constraints, and risks
- write a detailed execution plan
- list final validation skills to run at the end, with order and reason
- Execute one planned step and produce a concrete delta.
- Review the result and capture findings with actionable next fixes.
- Apply fixes in small batches and rerun the relevant checks or review steps.
- Update the plan after each iteration.
- Repeat until outcomes are acceptable or only explicit exceptions remain.
- If a dependency is missing, bootstrap it or return
status: not_applicable with explicit reason and fallback path.
Required Result Format
status: complete | clean | improved | configured | not_applicable | blocked
plan: concise plan and current iteration step
actions_taken: concrete changes made
validation_skills: final skills run, or skipped with reasons
verification: commands, checks, or review evidence summary
remaining: top unresolved items or none
For setup-only requests with no execution, return status: configured and exact next commands.
Load References
- read
references/rule-precedence.md first
- use
references/project-agents-template.md only when creating a local file
- use
references/dotnet-agents-pattern.md when the solution stack is .NET
Example Requests
- "Set up AGENTS for this mono-repo."
- "Set up AGENTS for this .NET solution."
- "Split governance between the solution root and each service."
- "Move maintainability limits into AGENTS and make precedence explicit."
1---2name: mcaf-solution-governance3description: Set up or refine solution-level governance for MCAF repositories: root and project-local `AGENTS.md`, rule precedence, solution topology, skill routing, and maintainability-limit policy placement. Use when bootstrapping a repo, restructuring a multi-project solution, or tightening agent rules.4---56# MCAF: Solution Governance78## Trigger On910- bootstrap or rewrite a repo-wide `AGENTS.md`11- add project-local `AGENTS.md` files for a multi-project solution12- clarify rule precedence, skill routing, or maintainability policy placement1314## Value1516- produce a concrete project delta: code, docs, config, tests, CI, or review artifact17- reduce ambiguity through explicit planning, verification, and final validation skills18- leave reusable project context so future tasks are faster and safer1920## Do Not Use For2122- writing feature specs or ADR content23- code-level refactoring without a governance change2425## Inputs2627- current repo topology and module roots28- existing root or local `AGENTS.md` files29- actual build, test, format, and analyze commands30- the active stack when commands or tooling are platform-specific3132## Quick Start33341. Read the nearest `AGENTS.md` and confirm scope and constraints.352. Run this skill's `Workflow` through the `Ralph Loop` until outcomes are acceptable.363. Return the `Required Result Format` with concrete artifacts and verification evidence.3738## Workflow39401. Identify the solution root and any project or module roots that need their own `AGENTS.md`.412. Keep the root file global:42 - shared workflow43 - shared commands44 - rule precedence45 - global skill list46 - maintainability-limit keys473. Keep local files narrow:48 - project purpose49 - entry points50 - boundaries51 - local commands52 - applicable skills53 - stricter local constraints544. Resolve overlap explicitly. Local rules may be stricter or more specific, never silently weaker.555. When the stack is .NET, record:56 - the test framework57 - the runner model (`VSTest` or `Microsoft.Testing.Platform`)58 - the repo-root `.editorconfig` as the analyzer config owner596. Put numeric maintainability limits in `AGENTS.md`, not in framework prose or skill bodies.6061## Deliver6263- one clear root `AGENTS.md`64- local `AGENTS.md` files only where boundaries justify them65- explicit precedence rules and skill-routing guidance6667## Validate6869- root and local responsibilities are not duplicated blindly70- local files do not weaken root policy71- maintainability keys are present and named consistently72- an agent can tell which `AGENTS.md` to read first for any path7374## Ralph Loop7576Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.77781. Plan first (mandatory):79 - analyze current state80 - define target outcome, constraints, and risks81 - write a detailed execution plan82 - list final validation skills to run at the end, with order and reason832. Execute one planned step and produce a concrete delta.843. Review the result and capture findings with actionable next fixes.854. Apply fixes in small batches and rerun the relevant checks or review steps.865. Update the plan after each iteration.876. Repeat until outcomes are acceptable or only explicit exceptions remain.887. If a dependency is missing, bootstrap it or return `status: not_applicable` with explicit reason and fallback path.8990### Required Result Format9192- `status`: `complete` | `clean` | `improved` | `configured` | `not_applicable` | `blocked`93- `plan`: concise plan and current iteration step94- `actions_taken`: concrete changes made95- `validation_skills`: final skills run, or skipped with reasons96- `verification`: commands, checks, or review evidence summary97- `remaining`: top unresolved items or `none`9899For setup-only requests with no execution, return `status: configured` and exact next commands.100101## Load References102103- read `references/rule-precedence.md` first104- use `references/project-agents-template.md` only when creating a local file105- use `references/dotnet-agents-pattern.md` when the solution stack is .NET106107## Example Requests108109- "Set up AGENTS for this mono-repo."110- "Set up AGENTS for this .NET solution."111- "Split governance between the solution root and each service."112- "Move maintainability limits into AGENTS and make precedence explicit."