Rocky white paper: agentic eng MCP
Rocky white paper: devkit gateway, handbook agents vs skills, architecture profiles, senior workflow, measured token savings.
Version 1.0 | August 2026 Authors: Radjiv, hellozheat Repository: github.com/hellozheat/rocky Docs source: docs/ Reference: Public technical deep dive
Abstract
Rocky is an MCP server for agentic-assisted engineering. Your model still writes code in your repo. Rocky supplies a shared handbook (agents + rules + skills), one devkit gateway tool, graphify-first discovery, and a pre-PR quality gate with a clear ready / not_ready verdict.
It is assisted, not autonomous. The product value is less thrashing: shared conventions, structured tool JSON instead of pasted terminals, scoped tests, and a gate before humans review.
On a measured production React monorepo feature (same model, same task), midpoint session tokens moved from about 255k to about 89k (about 65% less). Discovery alone dropped about 89%. OpenRouter Sonnet 4.6 cost on that example moved from about $1.62 to about $0.85.
MCP endpoint: https://userocky.zheat.xyz/mcp Inspector: userocky.zheat.xyz/inspector License: MIT
Table of Contents
- Problem Statement
- Design Principles
- Architecture Overview
- The
devkitGateway - Handbook: Agents, Skills, Rules
- Architecture Profiles
- Senior Workflow
- Measured Value Report
- Token and Cost Economics
- Install and Security
- Clients and Prompts
- Solo Dev vs Team
- Limitations and Future Work
- Related Insights
- Appendices
1. Problem Statement
AI coding tools are fast. Much of what they generate still gets rejected: wrong conventions, inconsistent patterns, missing tests, structure a reviewer will not accept.
Without shared tooling, each session rediscovers the repo, re-guesses standards, and re-runs huge test and lint cycles. That burns two things: review time on bad output, and tokens regenerating it.
Typical without-Rocky path:
10-20+ file reads to "understand" the repo
Full test suite on every fix loop
Long yarn lint / yarn test logs pasted into chat
No structured ready / not_ready before PR
Solo prompts reinvented per projectRocky exists for that gap: team-grade handbook + small safe repo actions, even when you are solo and connecting a public server.
2. Design Principles
| Principle | Meaning |
|---|---|
| Agentic-assisted, not autonomous | Model edits your files; Rocky routes, briefs, and checks |
| One gateway | Prefer devkit + action over dozens of MCP tool schemas |
| Graphify before grep | Structure first; full-file reads last |
| Detect before impose | Match hexagonal / Next / API layout from the repo, do not force foreign trees |
| Agents short, skills deep | Front door stays small; templates load only when needed |
| Gate before PR | Lint, tests, review heuristics → ready / not_ready |
| Path-scoped safety | DEVKIT_ALLOWED_REPO_ROOTS + allowlisted safe-run commands |
| CI still wins | MCP does not replace your merge pipeline |
3. Architecture Overview
Rocky is an HTTP MCP server. Clients (Cursor, Claude Code, VS Code, ChatGPT) connect to /mcp. The server exposes resources, prompts, and tools.
┌────────────────────────────────────────────────────────────┐
│ Host (Cursor / Claude Code / VS Code / ChatGPT) │
│ Model still writes code in the user clone │
├────────────────────────────────────────────────────────────┤
│ MCP: https://userocky.zheat.xyz/mcp │
│ - Resources: devkit://how-it-works, handbook/..., caps │
│ - Prompts: start-task, review-code, before-pr, learn │
│ - Tools: devkit gateway (+ standalone debug twins) │
├────────────────────────────────────────────────────────────┤
│ Handbook (server-side) │
│ - 24 agents (~1,244 lines total on disk) │
│ - 26 skills (templates / checklists, on demand) │
│ - Rules (.mdc) for team conventions │
├────────────────────────────────────────────────────────────┤
│ Repo actions (when path allowlisted) │
│ - repo_lint, repo_test, test_gap_finder │
│ - change_scope_analyzer, pre_pr_quality_gate │
│ - optional repo_open_pr (needs GITHUB_TOKEN) │
└────────────────────────────────────────────────────────────┘Source docs: INSTALL.md, using-mcp-devkit-report.md, why-agents-and-skills-are-split.md.
4. The devkit Gateway
Listing dozens of MCP tools burns context on schemas. Rocky exposes a single `devkit` tool with an action field. The model learns operations from devkit://capabilities once, then reuses one schema.
Tradeoff: each call still sends the full devkit schema. On long sessions that is usually cheaper than 15+ separate tool definitions.
| Concern | Prefer |
|---|---|
| Handbook index | devkit → list_handbook (only when URI unknown) |
| Contract | devkit://how-it-works |
| Caps / composability | devkit://capabilities, devkit://tool-composability |
| Path policy | devkit://path-scope-policy |
| Quality gate | action: pre_pr_quality_gate |
| Scoped verify | repo_lint, repo_test |
Standalone tools (project-intelligence, pre-pr-quality-gate, …) duplicate gateway actions. Prefer devkit in chat. Use standalone tools for Inspector / debug.
Use structured: true on intelligence tools when the host parses JSON. That avoids re-parsing markdown.
5. Handbook: Agents, Skills, Rules
5.1 One sentence
Agents are the short front door; skills are the deep reference you load only when the task needs templates or long checklists.
Source: why-agents-and-skills-are-split.md.
5.2 Why split
| If everything lived in the agent | What happens |
|---|---|
| Long Vitest / Playwright / hexagonal templates | Every invoke loads thousands of tokens before your code |
| Duplicate front doors | Drift and wasted context |
| Prompt dumps all handbook URIs | Model treats the index as a reading list |
| With agent + skill split | What happens |
|---|---|
| Agent about 40-60 lines | Role, discovery, routing |
Skill under src/mcp/skills/*/SKILL.md | Examples load only when needed |
One React test agent + vitest-react skill | Single entry point |
Disciplined session: about 4k-6k tokens of handbook overhead, not the whole corpus.
5.3 Agent skeleton
Every agent shares:
| Section | Purpose |
|---|---|
| Frontmatter | name, description, optional skills: |
| Local project graph | graphify + optional Understand Anything |
| Do / Don't | What to enforce |
| Deep reference | Pointer to skill(s) |
| When invoked | Short checklist |
5.4 Snapshot counts (README)
Agents (24): architecture/app (react-hexagonal, nextjs-developer, node-api-developer, nestjs-hexagonal, fastapi-hexagonal, typescript-library-developer), testing/quality (vitest-writer, playwright-writer, storybook-writer, Nest/Python writers, tester-qa, pr-quality-gate, code-reviewer), discovery/workflow (codebase-discovery, graphify agents, coverage-and-review-workflow), support (product-owner, documentation-writer, code-simplifier, tailwind-ui-developer, k3s-devops).
Skills (26): stack build playbooks, testing/review, ops/security/perf, product/design.
Rules: team .mdc under src/mcp/rules/ (e.g. human-readable-code, codebase-conventions, react-components, tests).
5.5 Routing
devkit-start-task uses a router table (task area → agent + rules) and a cap: read at most 2-3 handbook resources. It does not embed all rule/agent URIs.
devkit-review-code points to exactly three: code-reviewer, human-readable-code, tests.
6. Architecture Profiles
Detect the user's repo before imposing structure. Prefer hexagonal when src/domain/ exists.
Source: architecture-profiles.md.
Detection order
app/+ Next.js deps → nextjs-app-router (nextjs-developer)src/domain/+src/application/→ hexagonal
- NestJS → nestjs-hexagonal - FastAPI / Python → fastapi-hexagonal - React UI → react-hexagonal
src/components/atoms+connected/→ layered-react-spa (legacy)- No
components/butsrc/routesor Express → node-api-only - Else: graphify + read neighbors. Do not force foreign layouts.
Hexagonal (preferred when present)
src/
├── domain/ # entities, ports, pure logic
├── application/ # use-cases / hooks / controllers / routes
└── infrastructure/ # adapters (api, db, email, …)Styling variants
| Profile | When |
|---|---|
| Tailwind | tailwindcss in package.json → tailwind-ui-developer |
| LESS modules | No Tailwind → match react-hexagonal + repo conventions |
7. Senior Workflow
End-to-end pipeline the handbook and MCP tools reinforce.
Source: senior-workflow.md.
flowchart LR
A[Connect Rocky MCP]
B[devkit-start-task]
C[codebase-discovery]
D[1 agent + 1-2 rules]
E[Edit user repo]
F[repo_test / repo_lint]
G[pre_pr_quality_gate]
A --> B --> C --> D --> E --> F --> G- Discover : graphify workflow,
list_handbookif needed,project_intelligence - Match conventions :
codebase-conventions,react-components,human-readable-code; pick stack agent - Implement : small reviewable diffs; read neighbors; no drive-by refactors
- Verify locally :
yarn lint:fix,yarn test,yarn buildin the target project - Pre-PR gate : fix blockers; address warnings; re-run until
verdict: "ready" - Open PR :
repo_open_prwhen asked and token configured; drafts OK for large changes
Example prompt:
Use Rocky: read devkit://how-it-works, list_handbook, and the matching stack agent.
Implement changes directly in this repo, then run pre_pr_quality_gate before we finish.
Do not only call MCP tools without editing files.8. Measured Value Report
Source: using-mcp-devkit-report.md. Same kind of agentic-assisted task: implement or fix something, add tests, get review-ready.
8.1 Side-by-side
| Without Rocky MCP | With Rocky MCP | |
|---|---|---|
| What the AI can use | Search, read files, terminal | Same + handbook + devkit actions |
| Conventions | Guess or old chat memory | Shared agents + rules |
| Discovery | Many greps + 10-20+ file reads | codebase-discovery + graphify summary |
| What to test | Manual hunt | test_gap_finder |
| Blast radius | Guess from diff | change_scope_analyzer |
| Run tests | Often full suite | Scoped repo_test when allowed |
| Lint feedback | Paste long logs | repo_lint summary |
| Before PR | Hope CI catches issues | pre_pr_quality_gate → ready / not_ready |
| Handbook tokens (disciplined) | N/A | About 4k-6k |
| Typical session (estimate) | About 150k-300k | About 70k-150k (about 40-50% less) |
| CI on merge | Your pipeline | Same. MCP does not replace CI |
8.2 Measured example (one production feature)
| Metric | Without MCP | With MCP | Notes |
|---|---|---|---|
| Vitest per check | About 29 s (321 tests) | About 10 s (3 scoped files) | Measured |
| Validation ×8 wait | About 232 s | About 77 s | Calculated from measured unit times |
| Discovery file reads | About 10-18 files | About 0-3 + tool JSON | |
| Tokens (midpoint) | About 255k | About 89k | About 65% less |
| Discovery tokens | About 125k | About 14k | About 89% less |
| OpenRouter Sonnet 4.6 | About $1.62 | About $0.85 | Same model; fewer tokens |
8.3 Tokens by phase (midpoint, thousands)
| Phase | Without | With | Reduction |
|---|---|---|---|
| Discovery | 125 | 14 | About 89% |
| Write tests | 70 | 48 | About 31% |
| Validate ×8 | 21 | 12 | About 43% |
| graphify read | 17 | 4 | About 76% |
| E2e / lint | 22 | 11 | About 50% |
| Total | About 255k | About 89k | About 65% |
Discovery 125 vs 14 is the story: briefing vs walking every room.
8.4 Sonnet 4.6 cost by phase (example)
OpenRouter list rates used in the report (May 2026): $3/M input, $15/M output on Claude Sonnet 4.6.
| Phase | Without $ | With $ |
|---|---|---|
| Discovery | About $0.50 | About $0.08 |
| Write tests | About $0.81 | About $0.59 |
| Validate ×8 | About $0.12 | About $0.08 |
| graphify read | About $0.05 | About $0.01 |
| E2e + lint | About $0.14 | About $0.09 |
| Total | About $1.62 | About $0.85 |
For dollar proof on your stack, compare two similar tickets on your Cursor/OpenRouter dashboard. Plans change; the relative shape matters more than a frozen price.
9. Token and Cost Economics
Source: token-cost-breakdown.md.
9.1 What saves tokens
- Router : read 2-3 handbook files, not 24 agents
- Gateway JSON :
test_gap_finder,change_scope_analyzer,repo_lintvs pasted terminals - Scoped tests : less log volume
- Graphify summary-first : not full
GRAPH_REPORT.mdin the thread - One gate before PR : cheaper than two style/lint review rounds
9.2 What wastes tokens
list_handbookthen reading every agent body (about 10k-25k+ tokens)- Ignoring the router and loading all skills
- Pasting
graphify-out/wholesale into chat - Full suite every message when scoped runs exist
9.3 Session bucket table (directional)
| Bucket | Without MCP | With Rocky MCP |
|---|---|---|
| Repo discovery | About 40k-80k | About 15k-30k |
| Handbook / process | 0 (ad hoc) | About 4k-6k (disciplined) |
| Test + lint logs | About 30k-60k | About 10k-25k |
| Implementation turns | About 80k-160k | About 40k-90k |
| Session total (mid) | About 150k-300k | About 70k-150k |
9.4 Relative step cost
| Step | Relative cost |
|---|---|
codebase-discovery + 1-2 agent/rule reads | Low |
list_handbook (only if URI unknown) | Medium (about 1.6k tokens) |
| Graphify wiki skim | Medium (one-time per repo) |
| Implement feature | High (your code) |
pre_pr_quality_gate | Medium |
repo_open_pr | Low |
10. Install and Security
Source: INSTALL.md.
Quick connect (hosted)
Claude Code
claude mcp add --transport http "rocky" https://userocky.zheat.xyz/mcpCursor (~/.cursor/mcp.json)
{
"mcpServers": {
"rocky": {
"url": "https://userocky.zheat.xyz/mcp"
}
}
}VS Code / ChatGPT: open userocky.zheat.xyz/mcp or paste the URL in MCP connector settings.
Deploy your own
git clone https://github.com/hellozheat/rocky.git
cd rocky
yarn install
yarn build
yarn deployRequirements: Node.js 20+, Yarn. Optional on user machines: graphify CLI; Understand Anything plugin.
Environment
| Variable | Purpose |
|---|---|
PORT / MCP_URL | HTTP server |
DEVKIT_HANDBOOK_ROOT | Override handbook root if needed |
DEVKIT_ALLOWED_REPO_ROOTS | Comma-separated path allowlist for repo tools |
GITHUB_TOKEN | Only if the server should run repo_open_pr |
Security checklist (production)
- No MCP login on
/mcpby default. Put your own reverse proxy or network controls in front if the URL is public. - Never commit
.envor tokens. - Prefer handbook-only public hosting: no
GITHUB_TOKEN, no broadDEVKIT_ALLOWED_REPO_ROOTS, unless you add auth in front. - If repo tools are enabled, set
DEVKIT_ALLOWED_REPO_ROOTSto the smallest set of git roots required. - `safe-run`: allowlisted commands only (
git,yarn,eslint,graphify, …), not a general shell.
11. Clients and Prompts
| Host | Status |
|---|---|
| Cursor | URL in mcp.json |
| Claude Code / Desktop | claude mcp add --transport http |
| VS Code / Insiders | MCP connector |
| ChatGPT (Developer Mode) | MCP connector |
| Inspector | userocky.zheat.xyz/inspector |
Built-in prompts:
| Prompt | Role |
|---|---|
devkit-start-task | Compact router; prime a task |
devkit-review-code | Fixed 3-resource review guidance |
devkit-before-pr | Gate checklist |
devkit-learn-the-stack | Onboarding |
12. Solo Dev vs Team
| Myth | Reality |
|---|---|
| Rocky is only for a private org server | Public handbook works for any repo you open in the host |
| You need the team's repo checked in | Handbook is server-side; your code stays local |
| Without a team you do not need conventions | Solo devs benefit more. You are your own reviewer |
Repo-scoped actions need DEVKIT_ALLOWED_REPO_ROOTS (or local stdio) pointing at your clone. That is path config, not team membership.
13. Limitations and Future Work
Current limits
- Model must follow the router. Over-reading the handbook erases the token win.
- Repo tools need path access. Handbook-only hosting cannot run
repo_teston your laptop clone without allowlisting (or local server). - Not a CI replacement. Merge gates stay in your pipeline.
- Measured numbers are one production feature. Directional for other stacks; re-measure on your tickets.
- No MCP auth by default. Operators must add proxy/network controls for exposed URLs.
Future directions
- Tighter graphify ↔ discovery integration in the gateway
- Broader stack agents as the handbook grows
- Clearer host-native attach of skills without dumping them into every turn
- Optional stronger auth modes for multi-tenant hosted Rocky
14. Related Insights
Shorter pieces derived from the same docs:
15. Appendices
Appendix A: Docs map
| Doc | Topic |
|---|---|
| INSTALL.md | Deploy, env, security |
| senior-workflow.md | Discover → PR pipeline |
| using-mcp-devkit-report.md | Value report + measured example |
| token-cost-breakdown.md | Gateway, graphify, handbook overhead |
| architecture-profiles.md | Detect stack before imposing layout |
| why-agents-and-skills-are-split.md | Handbook design |
Appendix B: Manager one-liner
Same model, about 40-50% fewer tokens on a typical feature when Rocky is connected and the model follows the router (estimate). On the measured example, about 65% fewer tokens and about $1.62 → $0.85 Sonnet cost.
Appendix C: Engineer checklist
- Connect Rocky; confirm MCP is green.
- Start with
devkit-start-taskor the README example prompt. - Read
codebase-discoveryonce per repo; pick one router row. - Use
repo_test/ scoped tests, not full suite every message. - Run
pre_pr_quality_gatebeforerepo_open_pr.
Rocky as documented in [github.com/hellozheat/rocky](https://github.com/hellozheat/rocky) `docs/`. Counts, prompts, and measured figures live with the source and may evolve without a new white-paper revision.
