context-hygiene

Solid

Nightly context trim for ACTIVE_PRIORITIES and the dated SESSION_LOG schema. Archives before removal, uses content-hash compare-and-swap, and refuses unknown shapes.

AI & Automation 18 stars 5 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
43
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# /context-hygiene This is the sole bounded compaction exception to the Session Log chronicle. It runs only when invoked, never while the framework is being installed or tested against a real vault. ## Precondition 1. Read `vault/memory/SESSION_LOG.md` and `vault/memory/ACTIVE_PRIORITIES.md`. 2. Hash both exact byte streams with SHA-256. 3. Run: ```text node daemons/nightly-context-hygiene.mjs --root <aigent-root> ``` Green means no edit is needed. Red permits only the bounded archive below. Unreadable or unfamiliar content is a failure, not permission to rewrite. ## Session Log archive The executable target schema uses newest-first dated H2 blocks. A canonical block starts with `## YYYY-MM-DD - title` and contains one nonempty occurrence of each field: - `Objective` - `Completed` - `Decisions` - `Open threads` - `Next action` Archival rules: - Keep the newest five live dated blocks. - Move older whole blocks to `vault/memory/SESSION_LOG_ARCHIVE_<YYYY-MM-DD>.md`. - Preserve source text and order. - Preserve frontmatter, title, schema guidance, and archive links. - Dedupe by exact dated heading plus block hash. - Refuse a block whose boundary cannot be determined without judgment. ## Active Priorities archive The mechanically checkable live shape contains: - exactly one `## Operating Mode: <mode>` heading; - one to five live bullet priorities under `## Tier 1`, `## Tier 2`, or `## Tier 3` headings; - no placeholder priority; - one valid `Last reviewed: YYYY...

Details

Author
wrg32786
Repository
wrg32786/aigent-os
Created
2 months ago
Last Updated
3 days ago
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category