/goaltestingmedium riskintermediatesafety D · 45 · open-endedForward Futurepre-dates current gate · under review

Add the logs you're missing

Audit the important code paths, add useful structured logs, and prove success and failure events fire with tests.

prompt
→ Claude
Review the system's logging and add missing coverage until every important path produces useful, tested logs.
claude-code · codex

Use this when

Use this when important user flows, service boundaries, background jobs, or failure paths are difficult to trace because the system's logging is incomplete or inconsistent.

How it runs

  1. Inventory the important paths and define the event, outcome, severity, correlation context, and fields each one should emit.
  2. Add structured logs to uncovered paths without duplicating events or adding low-value noise.
  3. Add tests for successful and failed outcomes, then inspect representative emitted logs for useful context.
  4. Verify redaction and repeat until every important path has tested coverage or a documented reason not to log.

Done when

Every important path emits useful, tested logs. Representative success and failure tests prove coverage without exposing sensitive data.

Why it works

Treating logging as testable coverage turns observability from scattered statements into a reviewable system requirement. Inspecting emitted events catches gaps that source review alone misses.

Implementation note

Never log credentials, tokens, secrets, or sensitive personal data. Prefer stable event names and structured fields over interpolated prose.

Source: Forward Future

More testing loops

Watch tests while you work

/loopnew

A passive watchdog loop that reruns your test suite every 15 minutes and surfaces failing tests with their error output.

prompt
→ Claude
/loop 15m run the test suite, and if anything fails, show me the failing tests and the error output
testinglow risk

Kill flaky tests

/loopnew

Run your test suite repeatedly, collect every intermittent failure, and fix or quarantine flaky tests until you get five consecutive green runs.

prompt
→ Claude
/loop run my test suite 20 times, collect every intermittent failure, fix or quarantine the flaky ones, and don't stop until you get 5 consecutive fully-green runs
testinghigh risk

Make all tests pass

/goalnew

Implement remaining code and run tests repeatedly until the full suite passes.

prompt
→ Claude
/goal finish the implementation and make all tests pass
testingmedium risk