@@ -234,32 +234,69 @@ Combine with `AGENTS.md` instructions (see below).
234234
235235### Cursor and Windsurf
236236
237- Cursor and Windsurf don't support lifecycle hooks. Use the client's system prompt / instructions file :
237+ Cursor and Windsurf don't support lifecycle hooks. Use rules files instead :
238238
239- | Client | Instructions file |
240- | -------- | ----------------- |
241- | Cursor | ` .cursorrules ` |
242- | Windsurf | ` .windsurfrules ` |
239+ | Client | Rules location |
240+ | -------- | --------------------- |
241+ | Cursor | ` .cursor/rules/*.mdc ` |
242+ | Windsurf | ` .windsurfrules ` |
243243
244- Add these instructions:
244+ #### Cursor Rules Setup
245245
246+ Create ` .cursor/rules/agent-mcp-stack.mdc ` with "Always Apply" mode:
247+
248+ ``` yaml
249+ ---
250+ description : Agent MCP stack integration
251+ globs : *
252+ alwaysApply : true
253+ ---
254+
255+ # Agent MCP Stack
256+
257+ # # Default behavior in every chat
258+
259+ Treat `agent-comm`, `agent-knowledge`, and `agent-tasks` as default infrastructure
260+ for this repository. Do not wait for the user to restate this.
261+
262+ At the start of each new chat/session :
263+
264+ 1. Bootstrap `agent-comm` (`comm_register`, join `general`, send one-line intent, then `comm_inbox`).
265+ 2. Use `agent-knowledge` first for recall/session context when it can help
266+ (especially prior decisions, errors, tool usage, and related sessions).
267+ 3. Check `agent-tasks` before creating work (`task_list`), and keep task
268+ state/artifacts/comments current when work spans more than one step.
269+
270+ If an MCP server is unavailable, report it briefly and continue with local tools;
271+ retry MCP usage after restoring connectivity.
246272```
247- You have access to agent-knowledge MCP tools — a shared knowledge base synced via git.
248273
249- Available tools: knowledge_list, knowledge_read, knowledge_write, knowledge_search,
250- knowledge_recall, knowledge_sessions, knowledge_config, knowledge_sync,
251- knowledge_link, knowledge_unlink, knowledge_links, knowledge_graph
274+ Optionally create ` .cursor/rules/session-wrapup-knowledge.mdc ` for session wrap-up:
275+
276+ ``` yaml
277+ ---
278+ description : Save session learnings to knowledge base
279+ globs : *
280+ alwaysApply : false
281+ ---
252282
253- Categories: projects, people, decisions, workflows, notes
283+ # Session Wrap-up
254284
255- Use knowledge_search for semantic + keyword search across all entries.
256- Use knowledge_recall for scoped search (errors, plans, configs, tools, files, decisions).
257- Use knowledge_link/knowledge_unlink to manage relationships between entries.
258- Use knowledge_graph to explore connections from any entry via BFS traversal.
285+ Before ending a session, save non-obvious learnings to agent-knowledge :
259286
260- Dashboard: http://localhost:3423
287+ 1. `knowledge_search` for existing entries that overlap with this session's work.
288+ 2. `knowledge_write` new entries for decisions, architecture changes, or error patterns
289+ that aren't already captured.
290+ 3. `knowledge_link` related entries together.
291+
292+ Categories : projects (project context), decisions (trade-offs made), workflows (processes),
293+ notes (everything else).
261294```
262295
296+ #### Windsurf
297+
298+ Add equivalent instructions to ` .windsurfrules ` in your project root.
299+
263300---
264301
265302## Knowledge Base Setup
@@ -457,11 +494,11 @@ If your session data is in a non-standard location, use `EXTRA_SESSION_ROOTS` to
457494
458495## Client Comparison
459496
460- | Feature | Claude Code | Cursor | OpenCode | Cline | Continue.dev | Aider | Windsurf |
461- | -------------------- | ----------- | ------------ | ------------- | ---------- | ------------ | -------------- | -------------- |
462- | MCP stdio transport | Yes | Yes | Yes | Yes | Yes | -- | Yes |
463- | Session reading | Yes (JSONL) | Yes (JSONL) | Yes (SQLite) | Yes (JSON) | Yes (JSON) | Yes (MD/JSONL) | -- |
464- | Lifecycle hooks | Yes (JSON) | No | Yes (plugins) | No | No | -- | No |
465- | Session auto-distill | Yes | Yes | Yes | Yes | Yes | Yes | -- |
466- | System prompt file | CLAUDE.md | .cursorrules | AGENTS.md | -- | -- | -- | .windsurfrules |
467- | REST API fallback | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
497+ | Feature | Claude Code | Cursor | OpenCode | Cline | Continue.dev | Aider | Windsurf |
498+ | -------------------- | ----------- | -------------------- | ------------- | ---------- | ------------ | -------------- | -------------- |
499+ | MCP stdio transport | Yes | Yes | Yes | Yes | Yes | -- | Yes |
500+ | Session reading | Yes (JSONL) | Yes (JSONL) | Yes (SQLite) | Yes (JSON) | Yes (JSON) | Yes (MD/JSONL) | -- |
501+ | Lifecycle hooks | Yes (JSON) | No | Yes (plugins) | No | No | -- | No |
502+ | Session auto-distill | Yes | Yes | Yes | Yes | Yes | Yes | -- |
503+ | System prompt file | CLAUDE.md | .cursor/rules/ \* .mdc | AGENTS.md | -- | -- | -- | .windsurfrules |
504+ | REST API fallback | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
0 commit comments