Appearance
np-critic-economy (audit-surface module)
Module file, not a spawnable agent, and opt-in. Like the other critic modules it carries
module: truein its frontmatter and is loaded viaReadby the parentnp-criticspawn. Unlike them, it is conditional: the orchestrator injects it only when the resolved Economy mode isfullorultra. Atofforlitethe module never loads and the critic produces no economy findings.lib/agents.cjs::loadAgentrejects it for direct spawning, andloop-audit-tool-use --agent np-critic-economyis rejected too.
| Attribute | Value |
|---|---|
Frontmatter module: | true |
| Tier metadata | haiku (legacy — informational only, no spawn happens) |
| Tier override | swarm.critic.economy_tier (default haiku) |
| Loaded by | np-critic, but only at economy mode full/ultra |
| Defines | the Economy category set, severities, the ultra escalation, and the completeness boundaries |
Role
The Economy axis is the "wrote-too-much" reviewer. The other three axes guard against under-delivery — is the code correct, tested, and complete? This one guards against the opposite: code that should not exist as written. It reads the executor's diff and the task's files_modified and flags speculative abstraction, hand-rolled stdlib, duplicated platform or dependency capability, and verbose logic that condenses without losing clarity.
It is one half of the broader Economy axis. The other half is prevention: the climb-the-ladder discipline that np-executor applies before it writes, which is on from lite upward. This module is the after check, and it costs a round, so it stays opt-in (full/ultra).
Audit surface
| Check | Detail |
|---|---|
| Over-engineering | Speculative flexibility, options, or layers the task did not ask for; abstraction with a single call site |
| Stdlib-reinvention | Hand-rolled logic the language standard library already provides (Array.reduce, optional chaining, built-in validators) |
| Native-duplication | Re-implementing a framework helper or an installed dependency that already does the job |
| Shrinkable | Verbose logic that collapses to a clearer form without losing readability or an edge case |
Output schema
The Economy module does not produce its own output. Its findings appear inside the parent np-critic's merged JSON. Economy-axis category enum:
over-engineering, stdlib-reinvention, native-duplication, shrinkable, critic-error.
Each category routes to the Executor / Build-Fixer for simplification per the findings routing table. critic-error is reserved for hard-stop conditions and routes to stuck.
Completeness boundaries
This is the part that keeps economy honest. Trimming code is dangerous if it deletes the things completeness requires, so the module never treats any of these as removable:
| Never flag | Why |
|---|---|
| Tests and assertions | Coverage is completeness (Rule 3), not bloat. Test code belongs to np-critic-tests, not here. |
| Input validation at trust boundaries | A guarded boundary is doing Rule 1, not over-building. |
| Error handling and edge cases | Handling the unhappy path is the whole point of Rule 1. |
| Security and access-control checks | These are correctness, owned by the security review. |
When economy and completeness conflict, completeness wins. The axis removes what was over-built; it never removes what completeness needs.
Ultra mode
At ultra, the orchestrator appends Economy mode: ultra to the spawn prompt and the module raises its sensitivity: it lowers the shrinkable bar, hunts for reuse across the whole repo rather than just the diff, and flags single-use abstractions harder. The trade is more rounds for a leaner result. Dial back to full (or lite) when the extra rounds cost more than they save.
Relation to /np:simplify-review
/np:simplify-review is the manual twin of this axis. The np-simplifier agent applies the same rubric and the same boundaries to a diff or a whole worktree on demand, without running the loop. The two stay in lockstep: a finding the manual command surfaces is a finding this critic would have raised at full/ultra, and the reverse.
Source
agents/np-critic-economy.md in the source tree.
