Repository navigation
Closed as not planned
Labels
needs:complianceThis means the issue will auto-close after 2 hours.This means the issue will auto-close after 2 hours.
Description
Task: Event collector and user feedback tracking
Description
Implement the event collection layer that subscribes to opencode's event bus to capture quality-relevant signals. This includes session events, LSP diagnostics, command execution, and inferred user feedback (accept, revert, redo, edit-after-apply). The collector aggregates signals and triggers the scoring engine.
Acceptance Criteria
-
packages/opencode/src/quality/collector.tscreated - Subscribes to
Session.Event.Updated— captures model_id, provider_id, tokens, cost, tool results, errors per assistant message - Subscribes to
Session.Event.Diff— captures file changes (additions, deletions) for correctness signals - Subscribes to
LSPClient.Event.Diagnostics— snapshots diagnostic state before/after response for static analysis delta - Detects revert signals from
Session.Info.revertpopulation — updates feedback score retroactively - Detects redo signals via prompt similarity heuristic (same topic within short time window)
- Detects edit-after-apply via file change tracking (user edits files AI just modified)
- All feedback signals trigger retroactive score update in SQLite via scorer
-
packages/opencode/src/quality/index.tscreated — public API, initializes collector viaInstance.state(), exposesQuality.init()andQuality.dispose() - Quality system initialized during project bootstrap when
quality.enabledis true - All event subscriptions cleaned up on dispose
Technical Details
- Use
Bus.subscribe()for event subscriptions following existing patterns - Store LSP diagnostic snapshots in memory (Map<path, Diagnostic[]>) to compute deltas
- For redo detection: hash prompt topics and compare against last N prompts — simple substring/keyword overlap, not full semantic similarity
- For edit-after-apply: track which files were modified by the last AI response, watch for user modifications to same files within a time window (e.g., 60 seconds)
- Initialize in
packages/opencode/src/quality/index.tsusingInstance.state(init, dispose)pattern
Dependencies
- Task 001: SQLite storage layer
- Task 002: Quality configuration
- Task 003: Scoring engine
Effort Estimate
- Size: L
- Hours: 8-10
- Parallel: false (depends on 001-003)
Metadata
Metadata
Assignees
Labels
needs:complianceThis means the issue will auto-close after 2 hours.This means the issue will auto-close after 2 hours.
Activity
github-actions commentedon Feb 11, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to follow one of these templates within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Feb 11, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.