Skip to content

feat: Improve claude log preprocessing command #1786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

litt3
Copy link
Contributor

@litt3 litt3 commented Jul 21, 2025

Makes some small improvements to the batch preprocessing claude command:

  • additional search patterns
  • usage help if user doesn't specify log directory
  • formatting + cleanup

@litt3 litt3 self-assigned this Jul 21, 2025
Signed-off-by: litt3 <[email protected]>
@litt3 litt3 changed the title feat: Improve claude preprocessing command feat: Improve claude log preprocessing command Jul 21, 2025
@litt3 litt3 marked this pull request as ready for review July 21, 2025 19:41
Copy link
Collaborator

@samlaf samlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I feel like every claude command should be accompanied by a 5 min loom video where its author shows how to use it and explains the reasoning behind the command.

#### Profile 1: Test Failures
For standard test output failures:
```bash
rg --line-number --ignore-case --json -C 5 -- "^[-]{3} FAIL:|\\s+FAIL\$|\\s+FAIL\\t|\\[FAILED\\]|panic: test timed out" "<original_log_directory>/analysis/shards/" > "<original_log_directory>/analysis/search_results/test_failures_search.jsonl"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question I have is how do we make these files more readable for humans. I would want to request comments that explain what this is doing so that a human can improve on it in the future, but I'm assuming if we put comments here they will be ingested by the LLM, and potentially take some context needlessly, or worse confuse it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I intentionally didn't leave comments on what these commands are specifically doing. It ends up looking like a regurgitation of the rg docs, which generally isn't very helpful to claude, and it introduces content duplication.

Is it just these explicit rg commands that you find unreadable, or do you think the document in general suffers from poor readability? IMO the document itself ought to be digestible (and if it isn't, then this needs more work), but it's not the end of the world if a specific command like this is tailored for an agent. While not as easily accessible as a comment, it's also not too hard to just ask claude to summarize what such a command is doing, if an engineer wants to understand specifics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants