Commit graph

2 commits

Author SHA1 Message Date
Fred Amaral
5ae0fe0104
refactor: remove project-local persistence layer
Removes all features that saved session data to .ring/ folders in user projects. This includes artifact indexing (SQLite FTS5), context usage tracking, learning extraction, continuity ledgers, outcome inference, and automated session tracking.

Deleted infrastructure: 7 hooks, 4 skills, 2 commands, artifact-index lib (SQLite), compound_learnings lib, outcome-inference lib, shared utilities (ledger-utils, context-check, get-context-usage), tests, and documentation.

Updated: hooks.json (removed PostToolUse/PreCompact/Stop hooks), session-start.sh (removed ledger loading), hook-utils.sh (removed .ring directory functions), test files (removed context/ledger tests).
X-Lerian-Ref: 0x1
2026-01-15 00:07:53 -03:00
Fred Amaral
82f698a8bb
test(shell): add bash test suite for utility scripts
Add 62 tests covering the shell utility scripts:

- json_escape(): special char escaping, unicode, RFC 8259 compliance
- json_string(): wrapping and escaping combined
- get_json_field(): field extraction, validation, injection prevention
- get_project_root()/get_ring_state_dir(): path resolution, permissions
- output_hook_result/context/empty(): hook output formatting
- estimate_context_usage(): turn count to percentage calculation
- increment_turn_count(): atomic increment with flock verification
- reset_turn_count(): reset with file creation
- update_context_usage(): state persistence
- get_context_warning()/get_warning_level(): threshold-based warnings

Tests use isolated temp directories and include concurrent access tests
to verify file locking behavior under parallel execution.
2025-12-28 00:14:51 -03:00