zchee / zchee/ganja-code

compact-plus algorithm for /compact

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

idea verdict:park
Dominant language
Rust
Stars
2
Forks
0
Avg merge
1h
Merged PRs (30d)
17

Description

What it does

Brings the approach of compact-plus (https://github.com/u-ichi/compact-plus) to /compact: before compaction the transcript is backed up and a state file is written; after it, the state file is injected back.

Source

ganja-code-za2o (the compact-plus algorithm for /compact).

The bead is closed when this issue is published, with its external reference pointing here (#38).

File and line references in this issue are to main as of 75a7a92.

Against the three criteria

  • Direction (README): The README says nothing about compaction.
  • Today's terminal users: Compaction today is a summary prompt (crates/ganja-core/src/session.rs:232-279). ganja already has the PreCompact and SessionStart hook events (crates/ganja-core/src/hook.rs:122-140).
  • Evidence: The bead holds only the URL, so which part would come into ganja is undecided. Product text is ganja-original by the 2026-09-02 ruling, and MIT text brought in would need a THIRD_PARTY_NOTICES.md entry.

Depends on

Related to #89 (a related edge, not blocking).

Verdict

  • Verdict: park
  • Reopens: at the next landing that touches compaction (compact_if_needed, the summary prompt).
  • Exception to the probe rule: no.
  • Date: 2026-09-19
  • Verdict ticket: #42

Theme: #56

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 with crates/ganja-core/src/session.rs:232-279 and crates/ganja-core/src/hook.rs:122-140 to understand current compaction and hook events, then review the linked compact-plus source. The issue is explicitly parked because the imported behavior and product scope are undecided; completion criteria are not defined until that scope is settled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.