Skip to content

matthewyjiang/rho-pstack

v0.3.0MIT

Matt's design-first engineering workflow: an attributed Rho port of pstack and thermos.

architect

Sketch caller usage, types, signatures and module ownership before nontrivial implementation. Compare distinct designs, then implement only within the requested scope.

blast-radius

Trace what a change could break beyond its diff and prove the load-bearing safety assumptions through real code. Use before risky changes or shipping.

correct

Turn recurring agent mistakes into structural prevention: architecture, types, actionable lint, then behavior tests. Use after a repeated correction or when asked to harden the workflow.

how

Explain subsystem architecture, runtime flow, placement, ownership, or layering before changing code. Use for how-does-this-work questions and grounding a nontrivial design.

interrogate

Optional adversarial cross-model review to challenge a design or find blind spots, using per-call agent models or host delegation. Report unavailable model selection honestly; thermos remains the portable combined PR review.

principle-boundary-discipline

Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions.

principle-build-the-lever

Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun.

principle-experience-first

Apply when product, UX, or feature-scope tradeoffs come up. Choose user delight over implementation convenience; ship fewer polished features over more rough ones.

principle-explain-the-number

Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think.

principle-fix-root-causes

Apply when debugging. Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate.

principle-guard-the-context-window

Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads.

principle-make-operations-idempotent

Apply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of partial prior runs.

principle-migrate-callers-then-delete-legacy-apis

Apply when introducing a new internal API while old callers still exist. Migrate callers and delete the old API in the same wave instead of preserving compatibility layers.

principle-minimize-reader-load

Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope.

principle-model-the-domain

Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.

principle-separate-before-serializing-shared-state

Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.

principle-sequence-verifiable-units

Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer.

principle-subtract-before-you-add

Apply when sequencing an addition, refactor, or rewrite. Remove dead code, redundant validators, and stub references first, then build on the simpler base.

principle-test-behavior-not-implementation

Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.

principle-type-system-discipline

Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.

prove-it-works

Verify task outputs through the actual artifact or real user path before declaring completion. Use after implementation, fixes, migrations, or delegated work.

pstack

Lightweight entry point for Matt’s general engineering workflow. Route nontrivial tasks to design, proof, relevant principles, and thermos for every PR; no autonomy or merge-policy changes.

sharpen

Frame a task before starting: expert methods, real user outcome, useful constraints, and an independent check. Use when a request is vague, overconstrained, or ready to execute.

show-me-your-work

Keep an evidence-linked decision trail for long or multi-phase work, then audit it against this Rho conversation and actual artifacts. Local by default; no automatic commits.

thermo-nuclear-code-quality-review

Deep maintainability audit for code-judo simplification, structural regressions, file growth, spaghetti, types, boundaries, canonical layers, and atomicity. Used as the quality lens of thermos; use thermos for the combined review on every PR.

thermo-nuclear-review

Comprehensive diff-scoped correctness and security audit for bugs, cross-module breakage, developer-experience regressions, feature-gate leaks, and unintended risk. Used as the deep-audit lens of thermos; use thermos for the combined review on every PR.

thermos

The single combined PR review: run the correctness/security and code-quality lens agents in parallel, falling back to Rho's built-in reviewer, then synthesize evidence-backed findings.

why

Investigate design rationale, historical constraints, regressions, postmortems, or data-backed thresholds. Separate cited facts from inference; use how for runtime behavior.