Skip to content

Use semantic log file name in workspace instead of raw.log #12

@STRRL

Description

@STRRL

Summary

Currently, the workspace builder (pkg/analyzer/workspace/builder.go) always writes the raw log content to a fixed filename raw.log. This loses the semantic meaning of the original log file name, which could provide useful context to the LLM agent during analysis.

Current Behavior

  • WriteRawLog() always writes to raw.log regardless of the original file name
  • The system prompt in pkg/analyzer/analyzer.go references raw.log as a hardcoded path
  • NewBuilder does not receive the original file name

Proposed Behavior

  • Pass the original log file name (or a sanitized version) into NewBuilder
  • Write the log content using a semantically meaningful name derived from the source, e.g. hdfs-datanode.log, apache-access.log
  • Fall back to raw.log if no source name is available
  • Update the system prompt to reference the actual file name
  • Update AGENTS.md.tmpl if it references raw.log

Motivation

When the LLM agent sees raw.log, it has no context about what system or service produced the logs. A semantic file name like hadoop-namenode.log immediately tells the agent what it's looking at, potentially improving analysis quality.

Files to Change

  • pkg/analyzer/workspace/builder.go — accept and use source file name
  • pkg/analyzer/analyzer.go — pass original file path, update system prompt
  • cmd/lapp/debug.go — pass original file path to builder
  • pkg/analyzer/workspace/templates/AGENTS.md.tmpl — update if it references raw.log
  • Tests in pkg/analyzer/workspace/builder_test.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions