-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Problem
Discord thread/session context can grow unbounded, driving token cost up and eventually degrading reliability.
Goal
Implement native sciClaw Discord archive + recall so live prompt context remains bounded while preserving continuity via retrieved archived snippets.
Why this is separate from existing issues
Current open issues (#73, #71, #67) do not cover archive/trim/recall memory control for Discord token consumption.
Phased Delivery Plan
Phase 1 (Smallest Fully Functional Chunk) START HERE
- phase-1(mvp): auto-archive+trim with manual lexical recall for Discord #82 auto-archive + safe trim + manual lexical recall (CLI)
- feat(config): add Discord archive+recall settings and validation #75 config defaults/validation
- feat(archive): add sciClaw session adapter and markdown archive pipeline #76 session adapter + archive pipeline
- feat(trim): add safe retention policy for archived Discord sessions #77 trim policy
- feat(cli): add 'sciclaw archive discord' operational command group #80 CLI surface (minimum commands for list/run/recall)
Success criteria:
- Long Discord sessions stop unbounded growth.
- Archived context is retrievable by operators/users via recall command.
- End-to-end integration tests pass for archive->trim->recall path.
Phase 2 (Automatic Recall in Agent Loop)
- feat(agent-loop): trigger auto-archive and inject bounded recall for Discord #79 auto-archive trigger hardening + bounded auto-recall injection per Discord turn
Success criteria:
- Retrieved snippets are injected automatically with strict size caps.
- Fail-open behavior verified when recall/index fails.
Phase 3 (Quality and Ops Hardening)
- feat(semantic): add hybrid lexical+vector recall index for Discord archives #78 hybrid lexical+vector retrieval and reranking
- feat(doctor+docs): add archive health checks and Discord memory runbook #81 doctor checks + runbook + tuning docs
Success criteria:
- Recall relevance improvements over lexical-only baseline.
- Operators have health checks and troubleshooting docs.
Child Issues
- phase-1(mvp): auto-archive+trim with manual lexical recall for Discord #82 phase-1(mvp): auto-archive+trim with manual lexical recall for Discord
- feat(config): add Discord archive+recall settings and validation #75 feat(config): add Discord archive+recall settings and validation
- feat(archive): add sciClaw session adapter and markdown archive pipeline #76 feat(archive): add sciClaw session adapter and markdown archive pipeline
- feat(trim): add safe retention policy for archived Discord sessions #77 feat(trim): add safe retention policy for archived Discord sessions
- feat(semantic): add hybrid lexical+vector recall index for Discord archives #78 feat(semantic): add hybrid lexical+vector recall index for Discord archives
- feat(agent-loop): trigger auto-archive and inject bounded recall for Discord #79 feat(agent-loop): trigger auto-archive and inject bounded recall for Discord
- feat(cli): add 'sciclaw archive discord' operational command group #80 feat(cli): add 'sciclaw archive discord' operational command group
- feat(doctor+docs): add archive health checks and Discord memory runbook #81 feat(doctor+docs): add archive health checks and Discord memory runbook
TDD/Integration Contract
This epic is blocked unless each phase includes:
- Deterministic integration fixtures using realistic Discord session histories.
- End-to-end tests for the exact phase behavior.
- Failure-mode tests proving fail-open chat behavior.
- Non-Discord regression coverage.
Reactions are currently unavailable