Original Reddit post

If you use Claude Code and delegate work to subagents, you’ve probably noticed: they have no idea what your project looks like. They don’t know your CLAUDE.md rules, your module boundaries, or your coding conventions. Claude just asks them to “reduce complexity in a router file” and it’ll dump helper functions right there instead of putting them in your helpers/ or services/ module. It’ll add comments. It’ll slap # noqa on linting errors instead of fixing them. I got tired of cleaning up after them, so I built Agent Runway — a Claude Code plugin that fixes this in two ways: 1. Prevention — On every subagent spawn, it intercepts the Agent tool call and injects your project’s architectural context into the subagent’s prompt. The subagent now knows your directory structure, what each module is for, what’s forbidden where, and your CLAUDE.md rules. No configuration needed — it auto-discovers everything. 2. Self-correction — After every file write, it validates the code against your project’s conventions and module boundaries. If something’s wrong, it tells the agent to fix it before moving on. The agent self-corrects without human intervention. Here’s what a subagent sees before its task: === AGENT RUNWAY: ARCHITECTURAL CONTEXT === Project: my-project Module Boundaries: - routers/ -> HTTP route/endpoint definitions. NO: helper functions, business logic - services/ -> Business logic and orchestration. NO: route definitions - helpers/ -> Shared utility functions - tests/ -> Test suite. NO: production code CLAUDE.md Rules (MANDATORY): - DO NOT LEAVE ANY COMMENTS IN THE CODE - ALWAYS put business logic in services/, NOT in routers/ === END ARCHITECTURAL CONTEXT === I tested it side-by-side: same task, same project, with and without the plugin. Without it, the agent created 1 file with everything dumped in the router. With it, the agent created 4 files in the right modules (router, services, helpers, models). Zero violations. How it works technically: - SessionStart hook scans your project and caches an architectural map - PreToolUse hook on the Agent tool modifies the subagent’s prompt via updatedInput - PostToolUse hooks on Write/Edit validate conventions and module boundaries - Convention checking covers 13 languages and 60+ lint suppression patterns Install: /plugin marketplace add rennf93/agent-runway /plugin install agent-runway@rennf93 Zero config. Works out of the box. All validation defaults to warn mode (non-blocking). Block mode is opt-in. GitHub: https://github.com/rennf93/agent-runway Free and open source (MIT). v1.0.0, 45 tests passing. Would love feedback… especially if you hit false positives or have a specific language’s edge cases you’d like to see handled by the plugin. submitted by /u/PA100T0

Originally posted by u/PA100T0 on r/ClaudeCode