Pkc Session

Open or close an isolated second-brain write session (worktree + PR). Use before capturing or materializing when multiple agents share one knowledge remote.

spillwavesolutions c698e81 1.3 KB Updated

File contents

pkc-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 project-knowledge-capture \
  --host claude-code

Export SECOND_BRAIN_ROOT and BRAIN_SESSION_ID from the JSON. All writes go to that bundle via scripts/pkc_*.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.

spillwavesolutions/project-knowledge-capture/tree/main/skills/pkc-session commit c698e810e4

Frequently asked questions

npx skillmds@latest add spillwavesolutions/pkc-session