Skip to content

Commit e97b0d2

Browse files
fix(codemode): run inline, never dispatch parallel subagents (#120)
User feedback (twice): codemode should be a single inline agent. Makes it a hard rule (Iron Law: RUN INLINE - NEVER DISPATCH PARALLEL SUBAGENTS), rewrites the loading discipline to read load-bearing files inline + programmatic extraction for breadth, and strips the Phase 2 fan-out-agents instruction.
1 parent 0c5bd3b commit e97b0d2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

skills/codemode/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ A disciplined protocol for understanding a codebase before acting on it. When in
1212

1313
```
1414
PRESENT THE PLAN BEFORE LOADING ANY FILES
15+
RUN INLINE - NEVER DISPATCH PARALLEL SUBAGENTS
1516
```
1617

1718
Announce the skill (`Using hyperstack:codemode - <purpose>`), then show the loading plan and the proposed scope. Do not read files or write code until the scope is confirmed. Scope decides what gets loaded; loading the wrong thing wastes the context budget.
@@ -53,7 +54,7 @@ If no scope is given, propose one from the repo signals and confirm before Phase
5354

5455
Do NOT stuff the main context by reading every file. The main context is for the *synthesis*, not the raw dump. Two rules:
5556

56-
1. **Fan out, don't inhale.** For broad reading, dispatch parallel read-only agents (`Explore` / `general-purpose`) - one per subsystem - and keep their conclusions, not their file contents. Read whole files into the main context only for the few load-bearing ones (entry points, core abstractions, anything fragile).
57+
1. **Single inline agent - NEVER parallel subagents.** Run codemode entirely in the current context, yourself, sequentially. Do NOT dispatch `Explore` / `general-purpose` / any subagents, and do NOT fan out. Keep the main context lean the right way: read only the load-bearing files whole (entry points, core abstractions, anything fragile), and use programmatic extraction (`rg`/`fd`/git) for breadth - never by delegating to agents.
5758
2. **Tier the context** (hot / warm / cold / never):
5859
- **Hot:** entry points, core modules, type definitions, config, the request itself.
5960
- **Warm:** the changed surface, recent verification results, targeted skill/MCP outputs.
@@ -70,7 +71,7 @@ Each phase produces a short summary, presented before the next. Scale each to th
7071
Guess the full file/dir layout from cheap signals (`git ls-files`, `fd`, manifests, language histogram). Exclude build artifacts and caches (`node_modules/`, `dist/`, `.git/`, `__pycache__/`, `.next/`). Present an annotated tree: what exists, what is in scope, what is excluded and why.
7172

7273
### Phase 2 - File Loading
73-
Load the in-scope logic per the loading discipline above (fan-out agents + targeted whole-file reads), prioritising entry points, core modules, config, and type definitions; deprioritising tests, fixtures, generated files. Present: what was loaded, what was skipped, and the approximate context cost. Stop loading well before the budget is exhausted - leave room to think.
74+
Load the in-scope logic per the loading discipline above (targeted whole-file reads + programmatic extraction, all inline - no subagents), prioritising entry points, core modules, config, and type definitions; deprioritising tests, fixtures, generated files. Present: what was loaded, what was skipped, and the approximate context cost. Stop loading well before the budget is exhausted - leave room to think.
7475

7576
### Phase 3 - Dependency Graph
7677
Build who-imports-what / who-calls-what / who-owns-what. Present a compact UTF-8 graph or an adjacency table (padded, aligned). Name the coupling: which modules are leaf islands, which are hubs everything depends on.

0 commit comments

Comments
 (0)