CCContextCleanLocal-first log cleaner

Diagnostic checklist

A seven-step review before asking AI to debug an error

The useful middle ground is not simply "paste less." It is a repeatable review that preserves causal evidence, adds facts missing from the log, and removes only context you can justify removing.

1

Define the failure boundary

Write down the command, route, test, build step, or user action that failed. A log without the triggering action is difficult to interpret.

Verification: Could another developer reproduce the same action?

2

Find the first cause candidate

Start at the first explicit compiler error, exception, failed assertion, missing module, or non-zero command. Later failures may only be consequences.

Verification: Did you preserve the earliest meaningful failure rather than only the final summary?

3

Preserve location and causality

Keep the application file, line number, component, job, Docker instruction, and every distinct caused-by exception that connects the symptom to code.

Verification: Can the reader identify where the failure entered application code?

4

Remove only defensible noise

Reduce exact duplicates, successful setup narration, transfer progress, cache messages, and unrelated warnings. Do not delete context merely because it is long.

Verification: Can you explain why every removed category is irrelevant to this diagnosis?

5

Add the missing human context

State the expected behavior, environment, recent change, and checks already completed. These facts rarely appear in the stack trace.

Verification: Does the request explain what changed and what should have happened?

6

Perform a privacy review

Search for credentials, cookies, customer identifiers, private hosts, signed URLs, payloads, and confidential code. Replace values with meaningful placeholders.

Verification: Would publishing this exact excerpt in a public issue be acceptable?

7

Request one outcome

Ask for the likely root cause, next diagnostic step, smallest safe fix, or reproduction plan. Avoid asking for all of them at once.

Verification: Can the answer be evaluated against one clear task?

Stop and collect more evidence when

  • The failure cannot be reproduced consistently.
  • The cleaned excerpt no longer contains a source location or causal exception.
  • The answer depends on versions, environment variables, generated files, or request data not included in the report.
  • The proposed fix involves a broad dependency upgrade, security change, or data migration without supporting evidence.