feat: cowork modes — persistent memory for non-coding work#1311
feat: cowork modes — persistent memory for non-coding work#1311thedotmack wants to merge 10 commits intomainfrom
Conversation
…mode skill - Add lazy session initialization in observation endpoint for Cowork environments where UserPromptSubmit hook doesn't fire - Add Python version auto-detection in ChromaMcpManager (probes 3.13→3.10) - Add matcher "*" to UserPromptSubmit hook for defense-in-depth - Add /mode slash command to list and switch modes via settings API - Add cowork.json mode with 6 knowledge-work observation types and 7 concepts - Add cowork--chill.json behavioral variant for selective recording - Add make-mode skill for guided custom mode creation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New set-mode skill: full mode activation (settings + project instructions + worker restart) in one command - Updated make-mode skill: added Step 6 for creating mode CLAUDE.md files focused on human-primary agent relationship - Mode CLAUDE.md files are standalone project instructions with no claude-mem internal references - set-mode installs mode instructions via <claude-mem-mode> tags in the project's CLAUDE.md (idempotent on mode switches) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… sync Reverted ChromaMcpManager.ts python detection change (unrelated to cowork). Rebuilt worker-service.cjs from clean source without pro code contamination. Added --ignore-scripts to bun install in sync-marketplace to stop tree-sitter-cli from re-downloading its binary on every sync. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Review — feat: cowork modesThis is a solid feature addition that broadens the audience for claude-mem considerably. The architecture is clean and the documentation is excellent. A few things worth addressing before merge: Bugs
The skill references a JSON skeleton but the placeholder text is never filled in — the LLM has no structure to follow for 33 prompt fields and will likely produce inconsistent output. The
Security
If Code Quality
Any of these calls can throw, which would surface as an unhandled 500 from the observation endpoint. A try/catch with log-and-continue would keep the endpoint resilient — observation failure should not block the user's workflow. Also: the synthetic prompt string
The parent Minor
The Folder Context card on the main landing page was replaced with Cowork Modes. Folder Context is an existing core feature — removing it from the main nav hurts discoverability. Consider expanding the CardGroup rather than swapping.
This fixes tree-sitter but will silently skip all post-install scripts for all current and future deps. Worth adding an inline comment explaining why the flag is needed so it does not get removed later.
Step 5 writes to Positive Notes
|
xkonjin
left a comment
There was a problem hiding this comment.
Automated review focus: bugs, security issues, and test coverage.
Snapshot: 13 files changed, +980/-119 lines.
Key findings:
- Hardcoded password-like assignment found. Use secrets manager.
- Debug statements present. Remove or guard behind a debug flag.
- Source changes without corresponding tests. Please add or update tests to cover new/changed logic.
Suggestions:
- Add targeted unit tests for edge cases and error handling.
- Consider adding CI checks for secret scanning and dependency pinning.
When CLAUDE_PLUGIN_ROOT is unset (SessionStart bug #24529), hooks now check the marketplace cache directory before falling back to the dev path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
/set-mode now uses ${CLAUDE_SKILL_DIR}/../../ to resolve mode files and
worker-cli.js. /mode command discovers modes from cache, marketplace,
and dev paths. Fixes compatibility with marketplace cache installs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CursorHooksInstaller now shows generic path guidance instead of a specific marketplace path. BranchManager comment updated to reference MARKETPLACE_ROOT variable instead of hardcoded path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
worker-cli now resolves plugin root via: CLAUDE_PLUGIN_ROOT env var, __dirname-based detection, cache directory scan, then marketplace fallback. Fixes worker restart from cache-installed plugins. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cache directory is owned by the plugin system, not the plugin itself. Strip the 3rd-tier cache scan from all 8 hook commands, worker-cli.js _resolvePluginRoot(), and mode.md discovery list. Resolution is now: CLAUDE_PLUGIN_ROOT → marketplace fallback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Adds a mode system for non-coding knowledge workers — writers, researchers, analysts, project managers — so they get persistent memory across Claude Code sessions without any developer-oriented noise.
cowork.json): 6 observation types (creation, research, transformation, decision, discovery, automation) and 7 concepts tuned for knowledge work instead of software engineeringcowork--chill.json): Low-noise variant that only records work painful to rediscover/set-modeskill: Full mode activation — updates settings, installs mode-specific CLAUDE.md project instructions, restarts worker. Single command:/set-mode cowork/make-modeskill: Guided interview that creates custom modes for any domain (sales, academic research, legal review, etc.) — no code changes needed/modecommand: List available modes and switch between themUserPromptSubmitmay not firecowork-modes.mdx) with setup guide, FAQ, and examples targeting non-developer usersBug fixes
matcherfield toUserPromptSubmithook inhooks.jsonTest plan
/modelists all available modes with active indicator/set-mode coworkactivates cowork mode, updates settings, restarts worker/set-mode codeswitches back without regression/make-modewalks through interview and produces valid mode JSONcowork--chillvariant inherits parent observation types/conceptsUserPromptSubmitdoesn't firenpm run build-and-syncsucceeds without tree-sitter errors🤖 Generated with Claude Code