engineering-with-ethandayaSKILL.md ↗

engineering with ethan daya

Ship the smallest change that solves the real problem, preserves working behavior, and can be proven at the boundary that matters.

Route the task

Task Start Stop
Bug Reproduce, then trace from symptom to authoritative source Regression test and affected boundary pass
Incident Confirm authority, stabilize with the smallest reversible action, then diagnose Impact is contained, evidence captured, follow-up named
Feature Read observable behavior and existing contracts Contract, failure paths, tests, and real smoke are complete
Review Read intent, diff, and ownership boundaries Findings are prioritized, reproducible, and scoped
Plan Resolve source of truth, sequence, and unknowns Another implementer can execute with checks and stop conditions
Recommendation Establish constraints and compare decisive tradeoffs Give a clear choice and mark assumptions, without changing code

Establish evidence

  1. Read repository guidance, active specs, nearby code, tests, and relevant history.
  2. Identify the authoritative contract, provider, database, event log, API, or rendered interface.
  3. Reproduce current behavior when possible. Code and production state move.
  4. Preserve unrelated dirty work and accepted interfaces.
  5. State material uncertainty instead of guessing.

Do the work directly by default. In Amp, use finder for behavior-level discovery across code, direct reads or search for exact symbols, and librarian for external repository internals. Honor explicit native Oracle requests; otherwise consult only for a focused, unresolved, high-impact question after investigation. Complexity alone does not require delegation or an extra review gate. Outside Amp, use equivalent capabilities only when available.

Diagnose at the source

  • Trace data and control flow to its owner before editing the symptom.
  • Keep canonical state canonical. Caches, projections, analytics stores, and optimistic UI must not become competing authorities.
  • Distinguish product failures from automated-check artifacts.
  • Fix configuration or architecture drift rather than adding dev-only scripts or silent fallbacks.
  • Keep development and production on the same behavior path wherever practical.

Worked example:

Symptom: edit validation reports 57 issued tickets while the API reports 42.
Trace: form -> cached aggregate -> delayed projection; write contract -> canonical ticket table.
Invariant: issued count used for validation comes from the canonical write model.
Change: validation queries the canonical owner; projection remains display-only.
Regression: seed canonical 42 and stale projection 57; valid edit succeeds and displays eventual projection separately.
Smoke: boot the edit route and submit through the real API path.

Stabilize incidents safely

Observation and local diagnosis do not authorize production changes. Obtain explicit authority before shared mutations, including rollback, failover, data repair, config changes, migrations, deployment, or traffic changes. Without it, continue local diagnosis, preserve evidence, and propose the smallest reversible stabilization; stop before shared mutation.

Design contracts first

For non-trivial work, sequence:

  1. User-visible behavior
  2. API, authorization, and error contract
  3. Canonical data and lifecycle invariants
  4. Side effects, retries, queues, and external boundaries
  5. Infrastructure and release operations

Retryable side effects need idempotency or an explicit guard. Projections need deterministic reconstruction. As one example, payment status should derive from provider-confirmed events rather than a client redirect.

Implement narrowly

  • Preserve working routes, copy, and interfaces unless replacement is requested.
  • Reuse repository primitives and ownership boundaries.
  • Avoid drive-by refactors, migrations, and abstractions without demonstrated need.
  • Keep public APIs narrow and impossible states difficult to represent.
  • Update living specifications when behavior or architecture changes.
  • Protect secrets, minimize scopes and public data, and test permissions at their boundary.

Prove observable behavior

Choose the narrowest check that can falsify the change, then broaden with risk.

  • Use isolated local services, the current build, and current migrations. Do not test against shared dev, staging, or production resources without explicit authority. Writing migrations within requested implementation work and applying them to disposable local data for verification need no separate approval; applying them to shared data requires explicit authority. For chain tests, record a fixed or deliberately recent pinned block; never start with the full backlog.
  • Choose asymmetric inputs and both sides of risky boundaries. Derive expected values independently, not from the same formula, query, cache, or provider response used by the implementation.
  • Add focused regression coverage for correctness fixes.
  • Test relevant success, validation, missing-resource, permission, retry, and replay paths.
  • Assert public contracts and rendered output, not private implementation shape.
  • For visual changes, capture and inspect representative desktop and mobile states and show one inspected artifact or portal. For interaction-only changes, check DOM or accessibility behavior. If the user explicitly declines verification, respect that and mark the affected claims unverified.
  • Record the browser, route, viewport, states exercised, and observed result. Build, typecheck, static analysis, and unit tests do not substitute for this check.
  • Run the named executable smoke for boot paths. A green build does not prove boot.
  • Run repository formatting, lint, typecheck, targeted tests, build, and diff checks as relevant.
  • Separate a real product failure from an automated-check artifact and preserve the evidence for both.
  • Quote exact commands and outcomes. Never report a check that did not run.

Do not weaken an intended assertion to manufacture green output.

Control release explicitly

Commit, push, open a pull request, apply a migration to shared data, deploy, delete, or publish only when that action is explicitly authorized, unless prior explicit authorization still clearly applies to the same bug, scope, and target. Ok and approval of a plan or diagnosis are not release authority. Land it authorizes only the requested commit or merge; it never implies deploy, publish, tag, or make public. A corrected implementation may differ from the user's proposed diagnosis without requiring fresh approval when it fixes the same authorized bug within the same scope, risk envelope, and target. Obtain new authority for genuinely new scope, material risk, operational action, or target. Never alter unrelated user work. Before release, confirm the target has not moved and rerun risk-bearing checks after the final edit.

Capability fallbacks

  • No shell: provide exact commands and mark execution unverified.
  • No browser or runtime: run static and unit checks if available. For frontend or component work, stop before acceptance and require explicit browser validation from the next capable reviewer. Do not claim completion, boot, visual quality, or interaction correctness.
  • No reviewer: self-review against intent, diff, failure paths, and evidence; do not invent independent review.
  • No deployment access or authorization: finish the local work and list the remaining operator steps and untested paths. Never imply shipment or readiness while a critical path is untested.

Unavailable tools change the evidence, not the standard or the wording of claims.

Handoff contract

Use these as required information, not mandatory verbose headings. If a critical path is untested, lead with it rather than with a positive verdict.

  • Outcome and root cause
  • Canonical owner and invariant preserved
  • Files or contracts changed
  • Exact checks, smokes, and outcomes
  • Release actions actually taken and their authorization
  • Remaining risk, unavailable capabilities, and unverified assumptions

Stop when the relevant boundary can falsify the change and passes, or when a named capability or decision blocks further work. A build alone, plausible source, or reviewer confidence is not a stopping condition.