Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume",
"hooks": [
{
"type": "command",
"command": "continuum hook session-start --project \"${CLAUDE_PROJECT_DIR}\"",
"timeout": 15,
"statusMessage": "Loading Continuum context"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "continuum hook session-end --project \"${CLAUDE_PROJECT_DIR}\"",
"timeout": 60,
"statusMessage": "Recording Continuum handoff"
}
]
}
]
}
}
41 changes: 41 additions & 0 deletions .claude/skills/continuum/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: continuum
description: >-
Shared project memory across AI agents. Use when resuming work, when asked what
was happening, when running low on context, or to hand work to another AI.
---

## Continuum Shared Memory

This project uses Continuum, a local shared memory across AI coding agents.

At the start of a task, read the current context before asking the user to
re-explain anything:

- `.continuum/current.md` — where the work stands
- `.continuum/latest_handoff.md` — what the previous agent left for you

If the Continuum MCP server is connected, prefer its tools over reading files:
`get_startup_context` first, then `search_memory` and `expand_memory` for
targeted detail. Do not load full history by default.

## Recording progress

Record progress with the `save_progress` tool (or `continuum save "<what you
did> | <next step>"`), so the next session or a different agent continues
instead of starting over. Record:

- whenever the user asks you to save
- when you finish something worth not losing
- when you notice you are running low on context, before you run out, not after

You are the only one who can see how much context you have left, so this is
your call to make rather than something Continuum can detect for you.

If you already know the state and the next action, pass them. If you do not,
call `save_progress` with no arguments and Continuum writes the summary from
what it has recorded. Check `get_latest_handoff` first when you are unsure
whether something is already recorded, so you are not writing a handoff after
every message.

To hand work to a different AI, use `list_agents` and `ask_agent`.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ dist/
build/
*.egg-info/
.continuum/
# Written by `continuum install`, and they name one machine's project path, so
# committing them would break the next clone. Narrowed to the generated files:
# anything else a contributor puts in these directories stays trackable.
.codex/config.toml
.gemini/settings.json
.claude/settings.local.json
.claude/scheduled_tasks.lock

# Output from unrelated local tooling
brag-output/
Expand Down
8 changes: 7 additions & 1 deletion continuum/integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,14 @@ def claude_hooks(store: "MemoryStore") -> dict:
These are what make Continuum part of the workflow rather than a command to
remember: the agent starts already knowing where the work stands, and the
handoff is written whether or not anyone remembers to ask for it.

The project is referenced through Claude Code's own variable rather than
written as an absolute path. `.claude/settings.json` is shared team
configuration that Continuum merges into rather than owns, so baking one
machine's home directory into it would either break every other clone or
force the whole file out of version control.
"""
project = store.project.as_posix()
project = "${CLAUDE_PROJECT_DIR}"
return {
"SessionStart": [
{
Expand Down
24 changes: 24 additions & 0 deletions tests/test_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,30 @@ def test_windsurf_and_cline_rules_are_written(self):


class ClaudeHookTest(unittest.TestCase):
def test_the_hook_commands_name_no_particular_machine(self):
# .claude/settings.json is shared team configuration that Continuum
# merges into rather than owns. An absolute path baked in here either
# breaks every other clone or forces the whole file out of version
# control, which is what it did.
import tempfile as _tempfile

from continuum.integrations import claude_hooks

with _tempfile.TemporaryDirectory() as temporary:
store = MemoryStore(Path(temporary) / "repo")
store.initialize(100000, 0.8)
hooks = claude_hooks(store)
commands = [
hook["command"]
for phase in ("SessionStart", "SessionEnd")
for entry in hooks[phase]
for hook in entry["hooks"]
]
self.assertTrue(commands)
for command in commands:
self.assertIn("${CLAUDE_PROJECT_DIR}", command)
self.assertNotIn(str(store.project), command)

def test_hooks_are_added_without_disturbing_existing_ones(self):
with tempfile.TemporaryDirectory() as temporary:
store = fresh_store(temporary)
Expand Down