Vibe Coding Guide β
Vibe coding = talking to an AI agent like a senior dev on your team β but only works when the agent has memory, guardrails, and the right skills loaded. CodyMaster provides all three.
What changed in v5.1.0 β
Before diving into the loop, here is what v5.1.0 adds to the vibe coding experience:
| Feature | What it means for you |
|---|---|
| Intelligent Skill Selection | Chains auto-pick top-3 relevant skills per task β no more overloaded context |
cm mcp-serve | One command to connect any MCP client (Goose, Claude Desktop, Cursor) |
cm_natural | Tell the agent "remember thatβ¦" in plain English β it persists to SQLite |
cm bench | Measure before/after improvement β not just vibes |
The Daily Loop β
Orient β Pick skill β Execute in slices β Remember β Gate β Ship1. Orient (< 2 min) β
Open any session with:
# Check what you were doing
cat .cm/CONTINUITY.md
# Or via MCP tool (if connected)
# cm_resolve("cm://memory/working")CONTINUITY.md holds: active goal, current phase, last 3 decisions, and next actions. This is your 200-token context reload β no need to re-explain the codebase.
If .cm/ is missing, initialize it:
cm index skeleton # generates .cm/skeleton.md (instant codebase map)
cm continuity init # creates .cm/CONTINUITY.md2. Pick the Right Skill β
CodyMaster has 68+ skills. You almost never need more than 2β3 at once.
SkillsBench research finding: 2β3 focused skills β +18.6pp task improvement. 4+ skills β only +5.9pp.
| What you're doing | Skill(s) to invoke |
|---|---|
| New feature from scratch | cm-brainstorm-idea β cm-planning β cm-execution |
| Bug fix | cm-debugging β cm-tdd |
| PR review | cm-code-review β cm-quality-gate |
| Content / copy | cm-content-factory β cm-ads-tracker |
| Refactor safely | cm-refactoring-patterns β cm-tdd |
| UI work | cm-refactoring-ui β cm-ux-heuristics |
| Any multi-step task | cm-skill-chain (auto-selects the right pipeline) |
Shortcut: just describe your task to cm chain auto:
cm chain auto "fix the login timeout bug"
# β auto-selects: debugging β tdd β quality-gate (top 3 by relevance score)3. Execute in Thin Slices β
The #1 vibe coding mistake: giant prompts. Keep each agent turn to one behavior + one verification.
Good slice:
"Add the `selectTopSkills` function to skill-chain.ts.
It takes (taskTitle, chain, maxSkills=3), returns ChainStep[].
Mandatory steps always first. Optional steps ranked by BM25 overlap. Test it."Bad slice:
"Refactor the whole skill system to be smarter about context"For 3+ independent tasks, use Mode E TRIZ-Parallel (cm-execution) to dispatch subagents concurrently β each gets its own scope, each self-validates.
4. Remember (NLI β plain English) β
After any important decision, tell the agent in plain English:
remember that we use insertLearning() not raw SQL for all memory writes
remember that rootDir in tsconfig is ./src β keep all TS source under src/
important: never load more than 3 skills at once per taskThe cm_natural MCP tool routes these to SQLite automatically. Future sessions retrieve them with:
what did we learn about TypeScript?
what did we learn about security?You can also write directly:
# Via MCP tool
cm_memory_write(content="use insertLearning() not raw SQL", scope="project", importance="high")
# Via CLI (learnings JSON)
cm learnings add "use insertLearning() not raw SQL" --scope project5. Gate Before Moving On β
Never leave a slice "probably working":
npm run test:gate # full quality gate
npm run test:gate:kit # faster kit subset
npm run gate:secrets # secret scan before pushIf gate fails β fix now, not later. Technical debt compounds fast in vibe coding.
6. Ship β
cm chain advance <exec-id> "summary of what was done" # update context bus
git add -p # review what's staged
git commit -m "feat: ..."
cm mcp-serve --print-config # check MCP clients are connectedConnecting Your Agent Host (v5.1+) β
Claude Desktop β
cm mcp-serve --print-config
# β copy the "Claude Desktop config" block into claude_desktop_config.jsonGoose β
cm mcp-serve --print-config
# β copy the "Goose config" block into ~/.config/goose/config.yaml extensionsManual / any stdio MCP client β
cm mcp-serve --project /path/to/your/repoOnce connected, the agent has access to all 15 MCP tools β memory, context bus, budget checks, skill resolution.
Common Use Cases β
Fix a bug end-to-end β
# 1. Start the bug-fix chain
cm chain start bug-fix "login timeout after 30s on slow connections"
# 2. Invoke debugging skill
# β reads CONTINUITY.md, loads .cm/skeleton.md
# β identifies root cause, proposes fix
# 3. Write the fix + tests (cm-tdd)
# β TDD: failing test first, then implementation
# 4. Quality gate
npm run test:gate
# 5. Advance chain
cm chain advance <id> "fixed: token refresh was not resetting the idle timer"
# 6. cm-quality-gate runs automatically as last stepShip a new feature β
# 1. Brainstorm first (don't skip this)
# β @cm-brainstorm-idea: analyze current codebase, define problem, compare 3 options
# 2. Write the plan
# β @cm-planning: creates openspec/changes/[feature]/tasks.md + design.md
# 3. Execute
cm chain start feature-development "add payment retry flow"
# β Intelligent Skill Selection picks: planning + execution + quality-gate
# (brainstorm-idea is optional, scored low since plan already exists)
# 4. Each step: implement β test β advanceCode review before merge β
# Review the last N commits
cm chain start code-review "review payment retry feature before merge"
# Dispatch reviewer subagent:
# β reads diff, checks spec compliance, flags security issues
# β runs cm-quality-gate
# If clean β merge
git checkout main && git merge feature/payment-retryContext-switch without losing work β
# Before switching:
# 1. Note what you were doing
cat .cm/CONTINUITY.md # read current state
# 2. Save any learnings
# "remember that the retry logic needs exponential backoff, not fixed delay"
# 3. Gate
npm run test:gate
# When you come back:
cat .cm/CONTINUITY.md # instantly restored β Active Goal, Next Actions
# β pick up where you left off at ~200 tokens, not 2,000Multi-session long project β
Use cm chain status <id> to see pipeline progress across sessions:
π Chain: feature-development | Status: in_progress
Step 1: planning β
done "tasks.md created, 12 tasks"
Step 2: tdd β
done "auth tests passing"
Step 3: execution β³ active
Step 4: quality-gate β¬ pendingContext bus (.cm/context-bus.json) keeps step outputs available β cm-execution can read exactly which files cm-planning created instead of re-scanning the repo.
Anti-Patterns β
| Pattern | Why it fails | Fix |
|---|---|---|
| Giant prompt with full context | Exceeds token budget, degrades quality | Use L0 index + cm_budget_check |
| Load all 68 skills at once | SkillsBench: -2.9pp with monolithic loading | Let cm chain auto pick top 3 |
| Skip tests "it's just a one-liner" | One-liners break CI too | npm run test:gate is < 30 sec |
| Context-switch without saving | Next session re-discovers everything | Update CONTINUITY.md before switching |
| Accept AI output without verification | "Performative agreement" β silent regressions | Run the gate, read the diff |
| Commit secrets | Secret in git = permanent exposure | npm run gate:secrets before every push |
| Monolithic feature slice | Hard to review, hard to debug | Max 3 tasks per batch in cm-execution |
Token Budget Tips β
# Check budget before a big task
cm_budget_check(category="implementation", estimated_tokens=8000)
# Use L0 summaries instead of full files
cm_resolve("cm://memory/learnings") # L0: ~300 tokens
cm_resolve("cm://memory/learnings", 1) # L1: ~800 tokens
cm_resolve("cm://memory/learnings", 2) # L2: full SQLite query
# Trim context bus after each chain step
cm chain advance <id> "summary" # advance also trims stale bus entriesBenchmark Your Setup (New in v5.1) β
Don't assume CodyMaster is helping β measure it:
# Run all 3 eval suites: tdd-regression, token-efficiency, memory-retention
cm bench
# Run a specific suite
cm bench --suite tdd-regression --runs 5
# Save results
cm bench --output reports/baseline-$(date +%Y%m%d).jsonCompare with-codymaster vs baseline columns to see your actual improvement. See CodyBench methodology.
Quick Reference Card β
cm chain auto "describe task" # start best-fit pipeline
cm chain status # see all active chains
cm chain advance <id> "summary" # complete step, move forward
cm mcp-serve --print-config # get config for Goose / Claude Desktop
cm bench # run A/B eval suites
cm dashboard start # open kanban at localhost:6969
cm index skeleton # regenerate .cm/skeleton.md
cat .cm/CONTINUITY.md # restore session context
npm run test:gate # quality gate (must pass before merge)