For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: 为城市生命线项目创建仓库内的对话记忆库,并建立每次任务前读取、结束后更新、定期整理长期记忆的协作规则。
Architecture: 使用根目录 AGENTS.md 作为项目级入口,使用 memory/ 保存索引、长期记忆和按日期聚合的会话记录。全部采用 Markdown,不进入 Vite 构建,不增加运行时依赖。
Tech Stack: Markdown、Git、PowerShell 静态验证
Spec: docs/superpowers/specs/2026-08-14-project-memory-design.md
Files:
AGENTS.mdmemory/README.mdInterfaces:
docs/superpowers/specs/2026-08-14-project-memory-design.mdProduces: 后续协作者可执行的读取、写入、整理和隐私规则
[x] Step 1: 创建 AGENTS.md
写明以下强制流程:任务开始读取 memory/index.md 和 memory/long-term.md;必要时读取最近会话;任务结束更新当天会话文件与索引;稳定决策写入长期记忆;禁止记录敏感信息。
memory/README.md包含目录职责、会话记录模板、五次会话整理周期、20 KB 整理阈值、归档规则和敏感信息边界。
Run:
Test-Path AGENTS.md
Test-Path memory/README.md
rg -n "memory/index.md|memory/long-term.md|每次|敏感|5 次|20 KB" AGENTS.md memory/README.md
Expected: 两个 Test-Path 均输出 True,rg 命中读取、更新、隐私和整理规则。
Files:
memory/index.mdmemory/long-term.mdmemory/sessions/2026-08-14.mdtask_plan.mdprogress.mdInterfaces:
Produces: 后续对话可直接读取的项目上下文与会话历史
[x] Step 1: 创建 memory/index.md
记录项目名称、技术栈、核心入口、动态路由特征、当前已知风险、长期记忆链接和会话索引。
memory/long-term.md记录已经确认的稳定事实:项目定位、技术架构、启动方式、后端代理依赖、记忆库更新约定和敏感信息规则。
memory/sessions/2026-08-14.md记录本次项目探索、启动服务说明、记忆库设计决策、创建/修改文件、验证情况和后续待办。
将 task_plan.md 的记忆库创建阶段标记完成,并在 progress.md 记录实施结果。
Run:
Get-ChildItem memory -Recurse -File | Select-Object FullName
rg -n "VITE_BAIDU_MAP_AK\s*=|Bearer\s+[A-Za-z0-9]|password\s*=|token\s*=" AGENTS.md memory
Expected: 列出四个记忆文件;敏感信息扫描无匹配。
Run:
git status --short
git diff --stat
Expected: 仅出现规划文档、AGENTS.md、memory/ 和当前规划记录,不出现 src/、package.json 或 Vite 配置变更。