feat(framework): superpowers enforcement, typecheck hook, file-ownership rules (#451)
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #451.
This commit is contained in:
@@ -151,11 +151,68 @@ When delegating work to subagents, you MUST select the cheapest model capable of
|
||||
|
||||
**Runtime-specific syntax**: See the runtime reference for how to specify model tier when spawning subagents (e.g., Claude Code Task tool `model` parameter).
|
||||
|
||||
## Superpowers Enforcement (Hard Rule)
|
||||
|
||||
Mosaic provides capabilities beyond basic code editing: **skills**, **hooks**, **MCP tools**, and **plugins**. These are not optional extras — they are force multipliers that agents MUST actively use when applicable. Under-utilization of superpowers is a framework violation.
|
||||
|
||||
### Skills
|
||||
|
||||
Skills are domain-specific instruction sets in `~/.config/mosaic/skills/` that encode best practices, patterns, and guardrails. They are loaded into agents via the runtime's skill mechanism (e.g., Claude Code slash commands, Pi `--skill` flag).
|
||||
|
||||
**Rules:**
|
||||
|
||||
1. Before starting implementation, scan available skills (`ls ~/.config/mosaic/skills/`) and load any that match the task domain.
|
||||
2. When a skill exists for the technology being used (e.g., `nestjs-best-practices` for NestJS work), you MUST load it.
|
||||
3. When spawning workers, include skill loading in the kickstart prompt.
|
||||
4. If you complete a task without loading a relevant available skill, that is a quality gap.
|
||||
|
||||
### Hooks
|
||||
|
||||
Hooks provide automated quality gates (lint, format, typecheck) that fire on file edits. They are configured in the runtime settings and run automatically.
|
||||
|
||||
**Rules:**
|
||||
|
||||
1. Do NOT bypass or suppress hook output. If a hook reports errors, fix them before proceeding.
|
||||
2. Hook failures are immediate feedback — treat them like failing tests.
|
||||
3. If a hook is consistently failing on valid code, report it as a framework issue rather than working around it.
|
||||
|
||||
### MCP Tools
|
||||
|
||||
MCP servers extend agent capabilities with external integrations (sequential-thinking, web search, memory, browser automation, etc.). Available MCP tools are listed at session start.
|
||||
|
||||
**Rules:**
|
||||
|
||||
1. **sequential-thinking** is REQUIRED for planning, architecture, and multi-step reasoning. Use it — do not skip structured thinking for complex decisions.
|
||||
2. **OpenBrain** (`capture`, `search`, `recent`) is the cross-agent memory layer. Capture discoveries and search for prior context at session start.
|
||||
3. When a task involves web research, browser testing, or external data, use the available MCP tools (web-search, chrome-devtools, web-reader) rather than asking the user to look things up.
|
||||
4. Check available MCP tools at session start and use them proactively throughout the session.
|
||||
|
||||
### Plugins (Runtime-Specific)
|
||||
|
||||
Runtime plugins (e.g., Claude Code's `feature-dev`, `pr-review-toolkit`, `code-review`) provide specialized agent capabilities like code review, architecture analysis, and test coverage analysis.
|
||||
|
||||
**Rules:**
|
||||
|
||||
1. After completing a significant code change, use code review plugins proactively — do not wait for the user to ask.
|
||||
2. Before creating a PR, use PR review plugins to catch issues early.
|
||||
3. When designing architecture, use planning/architecture plugins for structured analysis.
|
||||
|
||||
### Self-Evolution
|
||||
|
||||
The Mosaic framework should improve over time based on usage patterns:
|
||||
|
||||
1. When you discover a recurring pattern that should be codified, capture it to OpenBrain with `type: "framework-improvement"`.
|
||||
2. When a hook, skill, or tool is missing for a common task, capture the gap to OpenBrain with `type: "tooling-gap"`.
|
||||
3. When a framework rule causes friction without adding value, capture the observation to OpenBrain with `type: "framework-friction"`.
|
||||
|
||||
These captures feed the framework's continuous improvement cycle.
|
||||
|
||||
## Skills Policy
|
||||
|
||||
- Use only the minimum required skills for the active task.
|
||||
- Load skills that match the active task domain before starting implementation.
|
||||
- Do not load unrelated skills.
|
||||
- Follow skill trigger rules from the active runtime instruction layer.
|
||||
- Actively check `~/.config/mosaic/skills/` for applicable skills rather than passively waiting for them to be mentioned.
|
||||
|
||||
## Session Closure Requirement
|
||||
|
||||
|
||||
Reference in New Issue
Block a user