ECC/tests
Hiroshi Tanaka c2950121c9
feat(session): LLM-powered session summary via claude -p (#2388)
Replace mechanical text extraction in session-end.js and pre-compact.js
with LLM-generated summaries using `claude -p`. Summaries now capture
design decisions, resolved bugs, changed files, and carry-over context
rather than just truncated user message snippets.

- Add scripts/lib/llm-summary.js: generateSessionSummary, extractConversationText,
  getContextRemainingPct, getContextThreshold, getLLMModel
- Update scripts/hooks/session-end.js: trigger LLM when context < 20% or
  every 50 messages (env-configurable via ECC_LLM_SUMMARY_*)
- Update scripts/hooks/pre-compact.js: generate LLM summary right before
  compaction and write it to the active session .tmp file
- Add tests/lib/llm-summary.test.js: 18 unit tests
- Update tests/hooks/hooks.test.js: 3 integration tests for new behaviour

Recursion guard: sets ECC_SKIP_LLM_SUMMARY=1 in subprocess env so Stop
hooks fired by the claude -p subprocess do not re-enter summarisation.
Requires no ANTHROPIC_API_KEY — reuses Claude Code's own authentication.

Co-authored-by: Hiroshi Tanaka <hiroshi_tanaka@MBAM3.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 15:55:01 -07:00
..
ci Merge pull request #2241 from itkdm/feat/add-vue-ecosystem 2026-06-15 14:07:31 -04:00
commands fix: accept crlf command frontmatter 2026-04-30 03:41:18 -04:00
docs release: 2.0.0 — the agent harness operating system 2026-06-09 21:40:40 -04:00
hooks feat(session): LLM-powered session summary via claude -p (#2388) 2026-06-29 15:55:01 -07:00
integration fix(hooks): avoid escaped quotes in plugin bootstrap 2026-05-19 05:15:42 -04:00
lib feat(session): LLM-powered session summary via claude -p (#2388) 2026-06-29 15:55:01 -07:00
scripts fix(tests): resolve 10 failing tests on Windows (#2307) 2026-06-29 15:54:49 -07:00
__init__.py Small changes 2026-04-12 12:34:45 +05:30
codex-config.test.js fix(codex): broaden context7 config checks 2026-03-29 00:26:16 -04:00
conftest.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
opencode-config.test.js fix: namespace opencode command agents 2026-04-05 14:21:57 -07:00
opencode-plugin-hooks.test.js feat(opencode): 全面升级OpenCode集成 (#2251) 2026-06-15 14:01:34 -04:00
opencode-tools.test.js feat(opencode): 全面升级OpenCode集成 (#2251) 2026-06-15 14:01:34 -04:00
plugin-manifest.test.js fix: add plugin cache health check (#2249) 2026-06-15 14:01:25 -04:00
run-all.js feat: worktree-lifecycle service (deterministic conflict prediction + safe GC) (#2164) 2026-06-07 13:00:08 +08:00
test_astraflow_provider.py feat: add Astraflow provider support 2026-05-11 23:21:46 -04:00
test_atlas_provider.py feat: add Atlas Cloud as LLM/AI provider (#2279) 2026-06-18 16:29:11 -04:00
test_builder.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
test_claude_provider.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
test_executor.py Small changes 2026-04-12 12:34:45 +05:30
test_invariant_runner.py fix: sanitize subprocess call in runner.py (#2149) 2026-06-15 13:49:45 -04:00
test_provider_tools.py fix: harden openai-compatible provider responses 2026-05-18 01:04:28 -04:00
test_resolver.py feat: add Atlas Cloud as LLM/AI provider (#2279) 2026-06-18 16:29:11 -04:00
test_templates.py docs: salvage focused stale PR contributions 2026-05-11 05:31:12 -04:00
test_types.py feat: add Astraflow provider support 2026-05-11 23:21:46 -04:00