Back to skills
SKILL.md
Continuous Alignment
ASecurityAutonomous continuous alignment and self-evolving project intelligence engine. Distills session transcripts, enforces a 200-line budget on AGENTS.md, manages path-scoped rules, records living ADRs, and compiles roadmap visualizers via Antigravity hooks. Trigger via /align or /evolve.
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added September 3, 2026
Works with
Security analysis
100/100Pro scans all 10 files and shows the line behind each finding
npx -y skills add ksprashu/agent-skill-forge --skill continuous-alignment --agent claude-codeAre you the author of Continuous Alignment?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ksprashu-continuous-alignment)---
name: continuous-alignment
description: Autonomous continuous alignment and self-evolving project intelligence engine. Distills session transcripts, enforces a 200-line budget on AGENTS.md, manages path-scoped rules, records living ADRs, and compiles roadmap visualizers via Antigravity hooks. Trigger via /align or /evolve.
---
# Continuous Alignment & Project Evolution Engine
Maintain a growing, self-evolving vision, mission, direction, rules, and operational instructions for your software project as development progresses.
---
## π― Goal
Prevent architectural drift and context rot by continuously distilling session insights, enforcing a strict 200-line token budget on root `AGENTS.md`, cascading path-scoped rules to `.agents/rules/*.md`, compiling living Architectural Decision Records (MADRs), and maintaining an interactive SVG roadmap.
---
## ποΈ 4-Tier Memory Topology
```
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tier 1: Hot Invariants (`AGENTS.md` / `GEMINI.md`) β
β β’ Capped at max 200 lines (~1,500 tokens) β
β β’ Fast-path commands, negative constraints, root gotchas β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Tier 2: Path-Scoped Rules (`.agents/rules/*.md`) β
β β’ Subsystem rules progressively loaded via path proximity β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Tier 3: Strategic Direction (`docs/VISION.md`, `docs/ROADMAP.md`) β
β β’ Living roadmap, milestone tracking, glowing SVG branching visualizer β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Tier 4: Architectural Decision Records (`.gemini/knowledge/ADRs/`) β
β β’ MADR formatted records capturing context, decisions, and trade-offs β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
---
## π Operational Workflows
### 1. Autonomous Turn Distillation (Antigravity `Stop` Hook)
When an agent turn completes, Antigravity executes `skills/continuous-alignment/scripts/distill_session.py`:
1. Reads the turn execution `transcript.jsonl`.
2. Extracts verified user constraints, error troubleshooting fixes, and CLI commands.
3. Appends deduplicated entries to `.gemini/knowledge/memories.jsonl`.
4. Triggers rule consolidation and living roadmap synchronization.
### 2. Manual Alignment Trigger (`/align` or `/evolve`)
To manually reconcile project instructions, review living ADRs, or prune outdated rules:
```bash
# 1. Distill recent session learnings
python skills/continuous-alignment/scripts/distill_session.py
# 2. Synchronize AGENTS.md and enforce 200-line budget limit
python skills/continuous-alignment/scripts/sync_agents_rules.py
# 3. Compile living ADRs, VISION.md, and ROADMAP.md
python skills/continuous-alignment/scripts/compile_roadmap.py
```
### 3. Context Pulse Inspection (`PreInvocation` Hook)
Inspect the active workspace invariants and recommended commands injected before model turns:
```bash
python skills/continuous-alignment/scripts/sync_agents_rules.py --pulse
```
### 4. Multi-Agent Work Swarm Milestone Distillation
When executing under the `work` skill, each completed milestone emits an adversarial review and auditor `handoff.md`. The continuous alignment engine automatically distills architectural decisions, verified interface contracts, and negative constraints into living MADRs (`.gemini/knowledge/ADRs/`) and path-scoped rules (`.agents/rules/*.md`), ensuring cross-generation coherence across Orchestrator successions.
---
## π‘οΈ Key Guarantees
- **Zero Third-Party Dependencies**: Pure Python standard library (`json`, `re`, `hashlib`, `tempfile`).
- **Sub-Second Execution**: Hook execution completes in $< 150\text{ms}$.
- **Zero Token Waste**: Strict 200-line budget cap prevents context bloat in root instruction files.
- **Project Tool Isolation**: Scopes external service dependencies (databases, hosting, deployment) under workspace `.agents/plugins/<name>/mcp_config.json`, preventing global configuration clutter and ambient tool pollution.
Files in this skill
- SKILL.md
- references/hook_protocol.md
- references/memory_schema.json
- scripts/compile_roadmap.py
- scripts/distill_session.py
- scripts/sync_agents_rules.py
- tests/fixtures/sample_transcript.jsonl
- tests/test_compile_roadmap.py
- tests/test_distill.py
- tests/test_sync_rules.py
Attribution
Comments
Loading commentsβ¦