technicalpickles / technicalpickles/cq

Support pointing cq at a single arbitrary session jsonl file

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
11
Forks
1
Avg merge
4h 43m
Merged PRs (30d)
22

Description

The problem

cq only knows how to scan sources: directory roots shaped like <projects_dir>/<project>/**/*.jsonl (main, plus discovered cenv envs). There's no way to hand cq one specific transcript file that lives outside those roots, like one someone sent you, or one pulled from a different machine/backup.

Current workaround

collect_jsonl in src/indexer.rs recurses arbitrarily deep and picks up any *.jsonl under a source root regardless of naming, so you can fake it:

mkdir -p /tmp/cq-adhoc/adhoc
ln -s /path/to/session.jsonl /tmp/cq-adhoc/adhoc/session.jsonl
CQ_PROJECTS_DIR=/tmp/cq-adhoc cq sessions --all

Works, but it's not something you'd guess from the CLI, and it's easy to forget the file needs a directory level above it (a bare CQ_PROJECTS_DIR=/tmp/cq-adhoc pointed straight at the file won't scan, since scan_all expects one level of project dirs before it recurses).

Proposal

A direct way to index one file, something like:

cq sessions --file /path/to/session.jsonl

or a lighter-weight one-off source registration (cq sources add <path> / --source-path) that doesn't require the symlink dance. Either would remove the need to know the internal directory-shape requirement to do something that's really just "look at this one file."

Contributor guide

No contributing guide indexed for this repository

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 in src/indexer.rs, reading collect_jsonl and scan_all to understand the current source-root assumptions, then trace the cq sessions command's argument handling. Add a direct way to index one arbitrary session.jsonl file without the project-directory workaround, and verify that the selected transcript is scanned successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.