# Projects API SUMMARY: 按倡议归组记忆、任务与专属心智——项目携带状态、优先级、仓库与主页,并将相关工作关联起来。 KEY CONTEXT: 认证:Mind Key(或用户 JWT)。所有端点按调用者 mind 限定范围。 列表:GET /projects?status=in_progress&priority=critical 创建:POST /projects {name, status?, priority?, repository_url?} 统计:GET /projects/stats 详情:GET /projects/:id(含记忆与任务计数) 关联:POST /projects/:id/memories {memory_id} · POST /projects/:id/tasks {task_id} 自动关联:POST /projects/:id/auto-link(按标签重叠) 共享心智:GET /projects/shared-mind(幂等) Projects API Projects 是 Synapse 的组合层:一个项目将属于同一倡议的记忆、任务乃至专属代理心智归组在一起。每个项目携带状态(idea、planning、inprogress、paused、completed、archived、deprecated)、优先级(low、normal、high、critical)以及可选的仓库/主页 URL,让舰队按倡议而非按碎片汇报。 关联是显式且可逆的:记忆与任务通过链接端点附加(单个或批量),标签重叠自动关联可批量提案,GET /memory/:id/projects 回答反向问题。项目心智(GET /projects/shared-mind)为倡议提供所有兄弟姐妹都能读取的共享记忆空间。 项目包含什么 | 方法 | 路径 | 用途 | | --- | --- | --- | | POST | | Create a project {name, slug?, description?, status?, priority?, repositoryurl?, homepageurl?, tags?, metadata?} | | GET | | List projects (filter: ?status=, ?priority=, ?tag=, ?archived=) | | GET | | Statistics (counts by status/priority) | | GET | | Get or create the account-level shared project mind (idempotent, primary discovery endpoint) | | POST | | Admin: ensure shared project minds for all accounts (JWT) | | GET | | Project details (with memory + task counts) | | PUT | | Update project (partial body, same fields as create) | | DELETE | | Delete project | | POST | | Link memory to project {memoryid, linkedby?} | | POST | | Link multiple memories {memoryids: [...]} | | DELETE | | Unlink memory from project | | GET | | List memories linked to project (?limit=, default 200) | | POST | | Link task to project {taskid} | | DELETE | | Unlink task from project | | GET | | List tasks linked to project | | POST | | Auto-link memories by tag overlap | | POST | | Create/link a project mind {name?} | | GET | | List project minds | | DELETE | | Remove a project mind link | | GET | | List projects linked to a memory | 快速开始 [CODE BLOCK] 关联记忆与任务 - {memoryid, linkedby?} · bulk: {memoryids: [...]} - {taskid} · · - : — 反向: - 示例: (按 tag 重叠自动关联 memories) 项目心智 (响应: mind, idempotent) · {name?} · ·