skills/enrich/SKILL.md
Enrich a lightweight (iteration:future) bead into a self-contained, implementation-ready description
npx skillsauth add tmsjngx0/mindcontext-core enrichInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Promote a lightweight future-iteration bead to a self-contained, implementation-ready description. Uses the bead-enricher agent to explore the codebase and generate full 6-layer descriptions.
/plan-decompose created lightweight future tasks# Enrich a single bead
/enrich mindcontext-mgmt-nzas.3
# Enrich all ready (unblocked) future beads in an epic
/enrich --epic mindcontext-mgmt-nzas --ready
br show <bead-id>
Extract:
iteration:future is present)If the bead does NOT have iteration:future label:
⚠️ <bead-id> is not a lightweight bead. Already enriched?
Ask user to confirm before proceeding.
If the bead has unresolved blockers:
⚠️ <bead-id> has unresolved dependencies: <blocker-ids>
Enrich anyway? (enriched description may be inaccurate)
Launch bead-enricher as a background agent with:
Use subagent_type: "mindcontext-core:bead-enricher" and run_in_background: true.
Wait for completion with TaskOutput(task_id, block=true, timeout=180000).
Parse the enricher output. If TDD mode (two beads returned with ---BEAD-SEPARATOR---):
br create "Test: <title>" -t task -p 1 \
--parent <same-parent> \
--labels "type:test" \
-d "<test bead description>"
br update <bead-id> -d "<enriched impl description>"
br label remove <bead-id> "iteration:future"
br label add <bead-id> "type:impl"
br dep add <bead-id> <test-bead-id>
br update <bead-id> -p 2
Extract the test file path from the test bead description and the modified files from the impl description. Build the TIDY bead from this information — no enricher agent needed.
br create "Tidy: <title>" -t task -p 2 \
--parent <same-parent> \
--labels "type:tidy" \
-d "## Tidy Bead (Refactor Phase)
**Implementation Bead ID**: <bead-id>
**Test Bead ID**: <test-bead-id>
**Test File**: \`<test-file-path>\`
This bead runs AFTER implementation passes tests.
After tidy, ALL existing tests MUST still pass.
---
## Goal
Review and clean up <title> implementation for code quality.
## Actions
1. Run \`/simplify\` on modified files
2. Check file size (< 200 lines warning, < 300 hard limit)
3. Check function size (< 20 lines warning, < 30 hard limit)
4. Check nesting depth (≤ 2 ideal, 3 warning, 4+ fix)
5. Run linter
6. Remove dead code, unused imports
## Exit Criteria
\`\`\`bash
<typecheck/compile/lint command from project context>
<test run command from impl bead exit criteria>
\`\`\`
### Checklist
- [ ] /simplify run on all modified files
- [ ] No file exceeds 300 lines
- [ ] No function exceeds 30 lines
- [ ] Linter passes with no new warnings
- [ ] All existing tests still pass"
br dep add <tidy-bead-id> <bead-id>
Full TDD chain: TEST → IMPL → TIDY
If single bead (non-testable or skip-tdd):
br update <bead-id> -d "<enriched description>"
br label remove <bead-id> "iteration:future"
br label add <bead-id> "no-test:<reason>"
✅ Enriched <bead-id>: <title>
Description: lightweight → self-contained (<N> lines)
Test bead: <test-bead-id> (if created)
Tidy bead: <tidy-bead-id> (if created)
Labels: iteration:future → type:impl
Priority: P3 → P2
Chain: TEST → IMPL → TIDY
Ready: <yes/no>
When --epic <epic-id> --ready is provided:
iteration:future label:br list --parent <epic-id> --labels "iteration:future"
Filter to only those with no unresolved blockers (check deps)
Enrich each one sequentially (not parallel — enricher needs codebase context that may change between enrichments)
Report summary:
✅ Enriched <N> beads in <epic-id>:
- <bead-1>: <title> (+ test <test-id> + tidy <tidy-id>)
- <bead-2>: <title> (non-testable)
Remaining lightweight: <M> beads
git push or br synctools
Bootstrap a project to use mctx by injecting a managed block into AGENTS.md. Tool-agnostic guidance every agent reads. Runs `mctx init` and shows the diff. Use when starting a new project, onboarding a repo, or asked to "init mctx" / "add mctx guidance" / "set up AGENTS.md".
development
Test-Driven Development workflow following Kent Beck's methodology. Auto-loads when user asks about "tdd", "test driven", "red green refactor", "write tests first".
testing
Analyze current session and generate a self-contained context prompt for the next Claude session. Includes project context, decisions, next steps, and tech stack. Use when ending a work session.
tools
Summarize current project state after a long break. Analyzes recent git history, beads issues, and memory to produce a one-page orientation. Use when returning to a project cold, or when asking "what was I doing", "where did I leave off".