terraphim / terraphim/terraphim-ai

feat: sessions files and sessions by-file subcommands

Open
#611 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
62
Forks
5
Avg merge
2h 27m
Merged PRs (30d)
1

Description

Feature Request

Add file-level tracking to the sessions subcommand group:

sessions files <session-id>

List files touched by a specific session, extracted from tool invocations in the JSONL data.

Extraction targets:

  • Read tool -> tool_input.file_path
  • Edit tool -> tool_input.file_path
  • Write tool -> tool_input.file_path
  • MultiEdit tool -> tool_input.file_path
  • NotebookEdit tool -> tool_input.notebook_path
  • Glob tool -> tool_input.path
  • Grep tool -> tool_input.path

Output:

  • Categorize as "read" vs "written" (Edit/Write/MultiEdit/NotebookEdit = written)
  • Support --json for programmatic use
  • Default: human-readable table
sessions by-file <file-path>

List sessions that touched a given file path (substring match).

Output:

  • Session ID, topic, read/write mode
  • Support --json
Context

terraphim-agent already parses JSONL session files for sessions search, sessions list, and sessions stats. This extends extraction to the tool_input fields for file path tracking.

A temporary bridge script exists at scripts/session-files.py in the cto-executive-system project. This upstream implementation would supersede it.

Proposed CLI
terraphim-agent sessions files <session-id> [--json]
terraphim-agent sessions by-file <file-path> [--json]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing sessions search, list, and stats implementations that parse JSONL session files, then compare them with scripts/session-files.py in the cto-executive-system project. Trace how tool_input fields are extracted and how CLI output supports human-readable and JSON formats. Done means both proposed subcommands report the requested read/write file and session information with --json support.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.