Add pre-compact hook to auto-trigger /compound workflow
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #250 by @mvanhorn — closed without merging
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- developer-experience, tooling
Research direction
Start by reading plugins/compound-engineering/commands/workflows/compound.md, especially the existing auto-invoke triggers noted in the issue. Then investigate how the plugin registers hooks that run before context compaction or session end. Done means compoundable sessions are detected, user preferences control prompting or auto-run, trivial sessions are skipped, and the existing command is invoked correctly.
Written by the indexing model from the issue text.
Description
Feature Request
Add a hook that triggers before context compaction (or session end) to check if there's anything worth compounding, and if so, automatically run the /workflows:compound command.
Motivation
The /workflows:compound command captures valuable knowledge - solved problems, learnings, patterns discovered - but requires manual invocation. By the time you think to run it, the context may have already been compacted or the session ended, losing that valuable context.
A pre-compact hook would ensure knowledge gets captured at the optimal moment - when the full context is still available and fresh.
Proposed Behavior
- Trigger: Before context compaction or session end
- Check: Analyze the session for compoundable content:
- Problems that were solved
- Significant debugging sessions
- Pattern discoveries or learnings
- Non-trivial fixes with root cause analysis
- Action: If compoundable content is detected, prompt to run
/workflows:compound(or auto-run based on user preference)
Acceptance Criteria
- Hook triggers before context compaction
- Intelligently detects if session contains compoundable material
- Respects user preference (prompt vs auto-run)
- Doesn't trigger for trivial sessions (simple Q&A, quick fixes)
- Works with the existing
/workflows:compoundcommand
Context
Discussed in the Every Discord. This aligns with the core plugin philosophy: "Each unit of engineering work should make subsequent units of work easier—not harder."
Currently, the /workflows:compound command has auto-invoke trigger phrases like "that worked" and "it's fixed", but a pre-compact hook would provide a safety net for capturing knowledge before context is lost.
Related
/workflows:compoundcommand:plugins/compound-engineering/commands/workflows/compound.md- Existing auto-invoke triggers (lines 166-169 in compound.md)
- Dominant language
- TypeScript
- Stars
- 25.6k
- Forks
- 2.1k
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 170
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EveryInc/compound-engineering-plugin
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EveryInc/compound-engineering-plugin#2085 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
EveryInc/compound-engineering-plugin#795 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 80/100
EveryInc/compound-engineering-plugin#2084 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
EveryInc/compound-engineering-plugin#2083 ·
Maintainers usually reply within 1 day
-
Host support: DeepSeek Harness (dsh)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
EveryInc/compound-engineering-plugin#2072 ·
Maintainers usually reply within 1 day
All issues in EveryInc/compound-engineering-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
hurttlocker/o8#6535 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
area: backend bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
snapotter-hq/SnapOtter#4856 ·
Maintainers usually reply within 1 day
-
bug follow-up
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spellshift/realm#2509 ·
Maintainers usually reply within 1 day