Skip to content

Add silent mode for nmr and configurable quality gates #279

Description

@williamthorsen

Parent: #277

Problem

Agents run lint commands as quality gates, but the full ESLint output floods the context window with noise. Additionally, the orchestrated-coder hardcodes quality gate commands, but not all projects use the same tools.

Context

The nmr CLI in @williamthorsen/node-monorepo-core executes workspace scripts via runCommand() with stdio: 'inherit'. The orchestrated-coder subagent runs quality gates after implementation but has no way to customize commands per project.

Solution

1. nmr --quiet flag (in node-monorepo-tools repo):

  • Parse --quiet / -q in cli.ts
  • In runner.ts, when quiet: capture stdout/stderr (pipe instead of inherit). On success: no output. On failure: print captured output.

2. qualityGates in preferences.yaml (in this repo):

  • Add qualityGates section to .agents/preferences.yaml with two subsections:
    • fix: mutating commands run before committing (lint auto-fix, format)
    • check: read-only verification commands (strict lint, typecheck, test)
  • Update orchestrated-coder to read qualityGates from .agents/preferences.yaml. If absent, fall back to current defaults.
qualityGates:
  fix:
    lint: nmr --quiet lint
    format: nmr --quiet fmt
  check:
    lintStrict: nmr --quiet lint:strict
    typecheck: tsgo --noEmit
    test: pnpm run test

Acceptance criteria

  • nmr --quiet produces no output on success, full output on failure
  • nmr --quiet works with any command (generic flag)
  • Tests cover quiet-mode success and failure paths
  • Orchestrated-coder reads qualityGates from .agents/preferences.yaml
  • Orchestrated-coder falls back to defaults when qualityGates is absent
  • Coder workflow: run fix commands → stage → run check commands → commit

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureAdded or improved external functionalityscope:agents

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions