NAC_Blockchain/memory/README.md

91 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# NAC项目记忆系统
## 简介
这是NAC项目的持久化知识库系统记录项目开发过程中的所有关键信息避免重复错误和知识丢失。
## 目录结构
- **documents/** - 文档知识库:记录每个阅读过的文档的核心思想和特点
- **problems/** - 问题解决方案库:记录出现过的问题和解决方案
- **decisions/** - 设计决策日志:记录重要的设计决策和原因
- **principles/** - NAC核心原则库记录NAC项目的核心原则和约束
- **tools/** - 记忆管理工具:查询、添加、导出记录的工具脚本
## 快速开始
### 查询记忆
```bash
# 查询CBPP相关知识
python tools/query.py --keyword "CBPP"
# 查询所有问题
python tools/query.py --type problem
# 查询术语映射
python tools/query.py --term "Contract"
```
### 添加记录
```bash
# 记录文档
python tools/add.py document --title "文档标题" --path "/path/to/doc"
# 记录问题
python tools/add.py problem --title "问题标题" --solution "解决方案"
# 记录决策
python tools/add.py decision --title "决策标题" --decision "决策内容"
```
## 使用原则
1. **实时记录**:每次阅读文档、解决问题、做决策时立即记录
2. **详细描述**:记录要详细,包含上下文和原因
3. **建立关联**:记录之间要建立关联关系
4. **定期维护**:每周审查和更新记录
## 核心功能
### 1. 文档知识库
记录每个文档的:
- 核心概念和定义
- 关键技术特点
- 与其他文档的关联
### 2. 问题解决方案库
记录每个问题的:
- 问题描述和错误信息
- 根本原因分析
- 解决方案和预防措施
### 3. 设计决策日志
记录每个决策的:
- 决策内容和原因
- 替代方案和影响范围
### 4. NAC核心原则库
记录NAC的
- 六大核心原则
- 术语映射表
- 禁止事项清单
## 记录统计
- 文档记录:查看 `documents/index.json`
- 问题记录:查看 `problems/index.json`
- 决策记录:查看 `decisions/index.json`
- 原则记录:查看 `principles/index.json`
## 维护日志
- 2026-02-07创建记忆系统
- 2026-02-07导入CBPP白皮书核心知识
- 2026-02-07记录CBPP投票机制混淆问题
## 详细文档
参见:`../docs/NAC_Memory_System_Design.md`