fix: complete work session intelligence port#26
Merged
Steffen025 merged 2 commits intomainfrom Feb 21, 2026
Merged
Conversation
Adds isTrivialMessage() to work-tracker.ts that detects: - Greetings (hi, hello, hey, guten morgen, etc.) - Acknowledgments (ok, thanks, sure, etc.) - Ratings (8, 9/10, etc.) - Farewells (bye, ciao, tschüss, etc.) - Short messages (<25 chars) unless they are commands Gates both session creation paths in pai-unified.ts: - chat.message handler (line ~362) - event handler message.updated (line ~644) Phase 1 of #24 — filtering only. Future phases: - Phase 2: Full conversation capture (assistant responses) - Phase 3: ISC population and items/ structure Fixes #24
7 tasks
Phase 2: Capture full assistant responses to THREAD.md Phase 3: Bridge ISC criteria from algorithm-tracker to session ISC.json Phase 4: Write effort level + budget to META.yaml on session creation Phase 5: Remove 200-char truncation from user messages in THREAD.md Work sessions now capture complete conversation threads, ISC criteria from the Algorithm's TodoWrite, and effort level classification. Fixes #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #24 — Work sessions were empty shells: no assistant responses, always-empty ISC.json, truncated user messages, no effort classification.
This PR ports the work session intelligence from Daniel Miessler's original PAI system to PAI-OpenCode.
Changes (5 Phases)
Phase 1: Trivial Message Filtering
isTrivialMessage()— regex-based filtering for greetings, acknowledgments, ratings, farewells/) and code snippets bypass filteringPhase 2: Assistant Response Capture
THREAD.mdas**Assistant:** {content}Phase 3: ISC Criteria Bridge
algorithm-tracker.tsnow callsupdateISC()fromwork-tracker.tswhen TodoWrite firescriteriaandanti_criteriabased onISC-Anamingtotal,completed, andupdated_atPhase 4: Effort Level in META
detectEffortLevel()effort_level:andeffort_budget:to sessionMETA.yamleffort_level: Standard/effort_budget: <2minPhase 5: Full User Messages
.substring(0, 200)truncation from both THREAD.md append sitesBefore vs After
[]Files Changed
.opencode/plugins/pai-unified.ts— Phases 1, 2, 4, 5.opencode/plugins/handlers/work-tracker.ts— Phase 1 (isTrivialMessage) + Phase 3 (updateISC enhancement).opencode/plugins/handlers/algorithm-tracker.ts— Phase 3 (ISC bridge)Testing
All changes are non-blocking (try/catch with fileLog). Bun build passes clean for all 3 files. No new dependencies added.
Thanks to @Deezinor for the detailed issue report and phased proposal.