NAC_Blockchain/memory/QUICK_REFERENCE.md

138 lines
3.1 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记忆系统快速参考卡
## 🚀 最常用命令
### 查询知识
```bash
cd /home/ubuntu/nac-workspace/memory
# 搜索关键词
python3 tools/query.py --keyword "CBPP"
# 查询术语
python3 tools/query.py --term "Contract"
# 列出所有问题
python3 tools/query.py --type problem
```
### 添加记录
```bash
# 快速添加问题
python3 tools/add.py problem \
--title "问题标题" \
--description "描述" \
--solution "解决方案"
```
### 导出报告
```bash
# 导出完整报告
python3 tools/export.py --output report.md
```
## 📚 核心原则速查
### CBPP共识
-**参与即共识** - 无需投票机制
-**规则验证** - 不是节点协商
-**宪法收据** - 交易合法性证明
### 术语映射
| 错误 | 正确 | 说明 |
|------|------|------|
| Token | Asset | 强调实物资产支撑 |
| Contract | Certificate | 强调合规性和法律效力 |
| Balance | Holdings | 强调资产所有权 |
| PoW/PoS | CBPP | NAC原生共识 |
### 架构原则
-**四层架构**: L0-L1-L2-L3
-**OpCode命名**: 全部UPPER_CASE
-**哈希算法**: 统一使用Blake3
-**代码保留**: 永远不删除代码
## ⚠️ 常见错误
### 错误1: 混淆治理投票和共识机制
- **问题**: 认为CBPP共识需要投票
- **正确**: CBPP共识不需要投票治理才需要投票
- **参考**: P001
### 错误2: 使用以太坊术语
- **问题**: 使用Token、Contract等术语
- **正确**: 使用Asset、Certificate等NAC术语
- **参考**: principles/terminology.json
### 错误3: 删除"未使用"的代码
- **问题**: 删除暂未使用的接口和函数
- **正确**: 保留所有代码,它们是为未来预留的
- **参考**: ARCH_004
## 🔍 快速查找
### 查找文档
```bash
# CBPP白皮书
cat documents/CBPP_WhitePaper_v1.json | jq '.core_concepts'
# 宪政区块链设计
cat documents/Constitutional_Blockchain_Design.json | jq '.core_philosophy'
```
### 查找原则
```bash
# 共识原则
cat principles/consensus.json | jq '.principles'
# 术语映射
cat principles/terminology.json | jq '.mappings'
# 架构原则
cat principles/architecture.json | jq '.principles'
```
### 查找问题
```bash
# 所有问题
cat problems/index.json | jq '.problems'
# 特定问题
cat problems/P001_CBPP_Voting_Confusion.json
```
## 📝 工作流程检查清单
### 开始新任务前
- [ ] 查询相关文档知识
- [ ] 查询相关问题历史
- [ ] 查询相关设计决策
- [ ] 查询术语映射
### 阅读新文档后
- [ ] 立即记录核心思想
- [ ] 补充详细信息
- [ ] 建立文档关联
### 遇到问题时
- [ ] 先查询问题库
- [ ] 使用已有解决方案
- [ ] 解决后立即记录
### 做重要决策时
- [ ] 记录决策内容
- [ ] 说明决策理由
- [ ] 列出替代方案
- [ ] 评估影响范围
## 🎯 记忆系统目标
**避免重复错误** - 每个问题只解决一次
**保持知识连续性** - 不因任务切换而遗忘
**提高开发效率** - 快速查找历史知识
**建立团队共识** - 统一术语和原则
---
*快速参考卡 - 打印后贴在显眼位置!*