Overview
The goal of this phase is to:Let anyone/AI know within minutes the project boundaries, authoritative entry points, how to run/verify, and where to enter modules and contracts。
The method is: first write Memory and the index skeleton to disk, and strictly enforce the hard rule that "indexes only navigate".
At the start, announce:"I am using the project-discover-memory-index skill to establish Discover's North Star (memory) and index skeleton (map layer)."
Output directory (standard persistence)
.aidlc/project/
memory/
structure.md
tech.md
product.md
glossary.md
components/
index.md
products/
index.md
Reminder: Do not create
.aidlc/project/contracts/**at this stage; the contract entry point will be navigated to via anchors on the module page.
Level-0: Memory writing constraints (must be short)
General hard rules
- Write only stable entry points and boundaries: Entry links > explanatory long-form text
- Avoid one-off delivery details: Detailed migration steps/detailed timing/field-level constraints are not written in project-level memory
- Links must be locatable: Prefer linking to specific files, specific jobs, and specific command entry points in the repository
- Gaps must be structured: Uniformly write to
## Evidence Gaps(缺口清单)
memory/structure.md minimal template
# 结构与入口(北极星)
## 项目形态
- 单体/多服务/Monorepo:<证据入口链接>
## 入口(可执行证据)
- 本地启动:<脚本/命令入口链接>
- 测试:<脚本/命令入口链接>
- 构建/发布:<CI job/脚本入口链接>
## 代码地图
- 组件地图:../components/index.md
- 业务地图(如有):../products/index.md
- Ops 入口(如有):../ops/index.md
## Evidence Gaps(缺口清单)
- 缺口:
- 期望补齐到的粒度:
- 候选证据位置:
- 影响:
memory/tech.md minimal template
# 技术栈与工程护栏
## 技术栈(稳定选择)
- 语言/框架:
- 数据库/缓存/消息:
## 质量门禁入口(可执行证据)
- lint:
- test:
- 安全扫描:
## NFR 入口
- 性能/可用性/成本/安全:../nfr.md(或外部权威链接)
## Evidence Gaps(缺口清单)
...
memory/product.md minimal template
# 业务边界(稳定语义)
## In / Out
- In:
- Out:
## 业务地图入口
- ../products/index.md(如有)
## 术语入口
- ./glossary.md
## Evidence Gaps(缺口清单)
...
memory/glossary.md minimal template
# 术语表(短)
| 术语 | 一句话定义 | 权威出处 |
|---|---|---|
| xxx | ... | <链接到模块页锚点/ADR/代码证据> |
Level-1: Index skeleton (map layer) constraints
Index hard rules (checkable)
components/index.mdandproducts/index.mdonly navigate- Forbidden in the index:
- invariant summaries
- fields/error codes/detailed flows
- "to be added/not found/TODO/to be confirmed"
- The index uses checkboxes as a progress panel, butmust notbe used as the basis for completion judgment (completion only depends on whether the module page meets the standard)
components/index.md minimal template (including dependency graph)
# Components Index(地图层:只导航)
| module | priority | owner | code_entry | api_contract | data_contract | ops_entry | status |
|--------|----------|-------|------------|--------------|---------------|-----------|--------|
| auth | P0 | team-x | `src/auth/` | [api](./auth.md#api-contract) | [data](./auth.md#data-contract) | [ops](../ops/index.md) | - [ ] |
## Dependencies(direct only)
```mermaid
graph LR
auth -->|API| user
order -->|Event| billing
> **维护规则**:只画**直接依赖**(一级调用),不画传递依赖;边标注交互方式(API/Event/DB)。
### `products/index.md` 最小模板(可选,但建议)
```markdown
# Products Index(业务地图:只导航)
> 建议收敛到 <= 6 个业务模块;这里不是功能清单。
| product | owner | entry | related_components | status |
|---|---|---|---|---|
| commerce | team-a | ./commerce.md | auth, order | - [ ] |
Red flag checklist
- Memory written as an "operations manual compendium" (project-level must be short)
- "to be added/not found/TODO" appears in the index (gaps should go into the module page or memory's Evidence Gaps)
- Module details are copied into the index (double-writing will inevitably drift)
Common mistakes
- Writing module page details first and then filling in the index (will induce index double-writing)
- Turning Products into a feature catalog of 20+ modules (the map becomes ineffective)