sac-session
Open or close an isolated second-brain write session (worktree + PR). Use before scanning or materializing architecture when multiple agents share one knowledge remote.
- License 许可
- MIT
- 最近更新
- 2026-09-20
- Stars
- ★ 1
- Forks
- 2
01 前言 Front Matter
- name
- sac-session
- description
- Open or close an isolated second-brain write session (worktree + PR). Use before scanning or materializing architecture when multiple agents share one knowledge remote.
03 SKILL.md 正文
sac-session
When
- More than one agent or machine writes the shared second brain
- The current project worktree is not the knowledge repo
- The user asks to isolate writes, open a knowledge PR, or avoid clobbering main
Open
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/brain_session.py" open \
--repo . \
--bundle knowledge \
--actor "${SECOND_BRAIN_IDENTITY:?claim an identity first}" \
--plugin system-architecture-capture \
--host claude-code
Export SECOND_BRAIN_ROOT and BRAIN_SESSION_ID from the JSON. All writes go to that bundle via scripts/sac_*.py.
Close
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/brain_session.py" close \
--repo . \
--session "${BRAIN_SESSION_ID}"
Pushes to whatever remote the checkout already has and opens a PR when gh is available. Never force-push. Never invent a remote URL.
Rules
- Read shared truth from main. Overlay this session only.
- Do not pack other agents' open branches.
- Public examples use fictional lumenfield-detector and northstar-console only.
- See
docs/ISOLATION.md.
04 同仓库更多 Skills
sac-search
Full-text search over SAC architecture knowledge concepts.
sac-scan
Run deterministic architecture scanners (packages, containers, IaC, K8s, CI/CD, identity) against a code root without writing knowledge.
sac-reverse-engineer
End-to-end reverse-engineer one or more git repositories into a SAC architecture knowledge graph (packages, services, IaC, CI/CD, IAM, identity, topology). Plan breadth-first, then fan out area walkers. Primary entry skill for SAC.
sac-retrieve
Query-time retrieval of SAC architecture context without contaminating the parent. Spawn architecture-retriever for topology (Service, ApiContract, Package, Runtime, Pipeline, IdentityProvider, blast radius). Do not run sac_search or sac_pack in the parent. Consume only the retrieval card.
sac-plan
Breadth-first reverse-engineering plan — map monorepo/multi-repo roots, rank focus areas, emit deep-dive checklists. Pause here before spawning area walkers. Not query-time retrieve.
sac-pack
Build progressive disclosure context packs (default 2-hop) for precise LLM queries over architecture knowledge.