chore: push all design docs, V2 plan specs, and current working state

Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2,
AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code
changes across packages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
AirCoding
2026-06-12 17:12:29 +08:00
parent 8f55c962bb
commit ae44be31d5
364 changed files with 46779 additions and 2812 deletions

View File

@@ -0,0 +1,42 @@
#!/usr/bin/env python3
"""PreCompact hook — block Claude Code's built-in auto-compact.
Only active in projects that have opted in (AirContext/ exists). Otherwise
Claude's default auto-compact behaviour is preserved untouched.
Manual `/compact` is always allowed; auto-triggered compaction is rejected so
AirContext's rule-driven compactor is the only thing that mutates the chain.
"""
from __future__ import annotations
import json
import os
import sys
from pathlib import Path
def main() -> int:
raw = sys.stdin.read() or "{}"
try:
payload = json.loads(raw)
except json.JSONDecodeError:
payload = {}
cwd = payload.get("cwd") or os.environ.get("CLAUDE_PROJECT_DIR") or os.getcwd()
if not (Path(cwd) / "AirContext").exists():
return 0 # project hasn't opted in; let Claude do whatever it wants
trigger = payload.get("trigger") or payload.get("compact_trigger")
if trigger == "auto":
print(json.dumps({
"decision": "block",
"reason": (
"AirContext: auto-compact disabled by user policy. "
"Custom rule-driven compaction handles this out-of-band."
)
}))
return 0
return 0 # manual /compact passes through
if __name__ == "__main__":
sys.exit(main())