project-discover-memory-index

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

project-discover-memory-index(Step2+3:Level-0 Memory + Level-1 索引骨架)

project-discover-memory-index (Step2+3: Level-0 Memory + Level-1 Index Skeleton)

概览

Overview

这一阶段的目标是:让任何人/AI 在几分钟内知道项目边界、权威入口、怎么跑/怎么验、从哪里进入模块与契约
方法是:先把 Memory 与索引骨架落盘,并严格执行“索引只导航”的硬规则。
开始时宣布:「我正在使用 project-discover-memory-index 技能建立 Discover 的北极星(memory)与索引骨架(地图层)。」
The goal of this phase is: Let anyone/AI understand the project boundaries, authoritative entries, how to run/verify, and where to access modules and contracts within a few minutes.
The method is: first persist the Memory and index skeleton to disk, and strictly implement the hard rule of "index only for navigation".
Announce at the beginning: "I am using the project-discover-memory-index skill to build the North Star (memory) and index skeleton (map layer) for Discover."

输出目录(标准落盘)

Output Directory (Standard Persistence)

.aisdlc/project/
  memory/
    structure.md
    tech.md
    product.md
    glossary.md
  components/
    index.md
  products/
    index.md
提醒:本阶段不要创建
.aisdlc/project/contracts/**
;契约入口将通过模块页锚点跳转。
.aisdlc/project/
  memory/
    structure.md
    tech.md
    product.md
    glossary.md
  components/
    index.md
  products/
    index.md
Note: Do not create
.aisdlc/project/contracts/**
at this stage; contract entries will be redirected via module page anchors.

Level-0:Memory 写法约束(必须短)

Level-0: Memory Writing Constraints (Must be short)

通用硬规则

General Hard Rules

  • 只写稳定入口与边界:入口链接 > 解释性长文
  • 避免一次性交付细节:详细迁移步骤/详细时序/字段级约束不写在项目级 memory
  • 链接必须可定位:优先链接到仓库内具体文件、具体 job、具体命令入口
  • 缺口必须结构化:统一写到
    ## Evidence Gaps(缺口清单)
  • Only write stable entries and boundaries: Entry links > long explanatory texts
  • Avoid one-time delivery of details: Detailed migration steps/detailed timing/field-level constraints are not written in project-level memory
  • Links must be locatable: Prioritize links to specific files, specific jobs, specific command entries in the repository
  • Gaps must be structured: Uniformly written to
    ## Evidence Gaps

memory/structure.md
最小模板

memory/structure.md
Minimum Template

markdown
undefined
markdown
undefined

结构与入口(北极星)

结构与入口(北极星)

项目形态

项目形态

  • 单体/多服务/Monorepo:<证据入口链接>
  • 单体/多服务/Monorepo:<证据入口链接>

入口(可执行证据)

入口(可执行证据)

  • 本地启动:<脚本/命令入口链接>
  • 测试:<脚本/命令入口链接>
  • 构建/发布:<CI job/脚本入口链接>
  • 本地启动:<脚本/命令入口链接>
  • 测试:<脚本/命令入口链接>
  • 构建/发布:<CI job/脚本入口链接>

代码地图

代码地图

  • 组件地图:../components/index.md
  • 业务地图(如有):../products/index.md
  • Ops 入口(如有):../ops/index.md
  • 组件地图:../components/index.md
  • 业务地图(如有):../products/index.md
  • Ops 入口(如有):../ops/index.md

Evidence Gaps(缺口清单)

Evidence Gaps(缺口清单)

  • 缺口:
    • 期望补齐到的粒度:
    • 候选证据位置:
    • 影响:
undefined
  • 缺口:
    • 期望补齐到的粒度:
    • 候选证据位置:
    • 影响:
undefined

memory/tech.md
最小模板

memory/tech.md
Minimum Template

markdown
undefined
markdown
undefined

技术栈与工程护栏

技术栈与工程护栏

技术栈(稳定选择)

技术栈(稳定选择)

  • 语言/框架:
  • 数据库/缓存/消息:
  • 语言/框架:
  • 数据库/缓存/消息:

质量门禁入口(可执行证据)

质量门禁入口(可执行证据)

  • lint:
  • test:
  • 安全扫描:
  • lint:
  • test:
  • 安全扫描:

NFR 入口

NFR 入口

  • 性能/可用性/成本/安全:../nfr.md(或外部权威链接)
  • 性能/可用性/成本/安全:../nfr.md(或外部权威链接)

Evidence Gaps(缺口清单)

Evidence Gaps(缺口清单)

...
undefined
...
undefined

memory/product.md
最小模板

memory/product.md
Minimum Template

markdown
undefined
markdown
undefined

业务边界(稳定语义)

业务边界(稳定语义)

In / Out

In / Out

  • In:
  • Out:
  • In:
  • Out:

业务地图入口

业务地图入口

  • ../products/index.md(如有)
  • ../products/index.md(如有)

术语入口

术语入口

  • ./glossary.md
  • ./glossary.md

Evidence Gaps(缺口清单)

Evidence Gaps(缺口清单)

...
undefined
...
undefined

memory/glossary.md
最小模板

memory/glossary.md
Minimum Template

markdown
undefined
markdown
undefined

术语表(短)

术语表(短)

术语一句话定义权威出处
xxx...<链接到模块页锚点/ADR/代码证据>
undefined
术语一句话定义权威出处
xxx...<链接到模块页锚点/ADR/代码证据>
undefined

Level-1:索引骨架(地图层)约束

Level-1: Index Skeleton (Map Layer) Constraints

索引硬规则(可检查)

Index Hard Rules (Verifiable)

  • components/index.md
    products/index.md
    只做导航
  • 禁止在索引中出现:
    • 不变量摘要
    • 字段/错误码/详细流程
    • “待补/未发现/TODO/待确认”
  • 索引用复选框做进度面板,但不得作为完成判断依据(完成只看模块页是否达标)
  • components/index.md
    and
    products/index.md
    only for navigation
  • Prohibit the following content in the index:
    • Invariant summary
    • Fields/error codes/detailed processes
    • "To be filled/Not found/TODO/To be confirmed"
  • The index uses checkboxes as a progress panel, but must not be used as a basis for completion judgment (completion only depends on whether the module page meets the standards)

components/index.md
最小模板(含依赖图)

components/index.md
Minimum Template (Including Dependency Graph)

markdown
undefined
markdown
undefined

Components Index(地图层:只导航)

Components Index(地图层:只导航)

modulepriorityownercode_entryapi_contractdata_contractops_entrystatus
authP0team-x
src/auth/
apidataops- [ ]
modulepriorityownercode_entryapi_contractdata_contractops_entrystatus
authP0team-x
src/auth/
apidataops- [ ]

Dependencies(direct only)

Dependencies(direct only)

mermaid
graph LR
  auth -->|API| user
  order -->|Event| billing

> **维护规则**:只画**直接依赖**(一级调用),不画传递依赖;边标注交互方式(API/Event/DB)。
mermaid
graph LR
  auth -->|API| user
  order -->|Event| billing

> **Maintenance Rule**: Only draw **direct dependencies** (first-level calls), do not draw transitive dependencies; edges mark interaction methods (API/Event/DB).

products/index.md
最小模板(可选,但建议)

products/index.md
Minimum Template (Optional, but Recommended)

markdown
undefined
markdown
undefined

Products Index(业务地图:只导航)

Products Index(业务地图:只导航)

建议收敛到 <= 6 个业务模块;这里不是功能清单。
productownerentryrelated_componentsstatus
commerceteam-a./commerce.mdauth, order- [ ]
undefined
建议收敛到 <= 6 个业务模块;这里不是功能清单。
productownerentryrelated_componentsstatus
commerceteam-a./commerce.mdauth, order- [ ]
undefined

红旗清单

Red Flag List

  • Memory 写成“操作手册大全”(项目级必须短)
  • 索引里出现“待补/未发现/TODO”(缺口应进模块页或 memory 的 Evidence Gaps)
  • 在索引里复制模块细节(双写必漂移)
  • Memory is written as a "complete operation manual" (project-level memory must be short)
  • "To be filled/Not found/TODO" appears in the index (gaps should be entered in the module page or Evidence Gaps of memory)
  • Copy module details in the index (double writing will definitely cause drift)

常见错误

Common Mistakes

  • 先写模块页细节再补索引(会诱发索引双写)
  • 把 Products 变成 20+ 个模块的功能目录(地图失效)
  • Write module page details first and then supplement the index (will induce index double writing)
  • Turn Products into a function directory of more than 20 modules (the map becomes invalid)