Documentation
README
Harness Step 1: 创建 AGENTS.md 与 docs/ 知识库
目标
为项目建立 agent 可读的知识库地基:
- 一份简短的
AGENTS.md(~100 行,作为"目录"而非百科全书) - 一套
docs/目录结构,存放真正的知识
核心原则:agent 看不到的东西就不存在。项目的业务定位、目标用户、解决的问题、架构决策、命名约定和技术选型,必须以文件形式存在于仓库中。
执行步骤
Step 1:扫描项目
按顺序收集项目信息,已知信息跳过,不要重复提问:
# 1. 项目根目录结构(2层)
find . -maxdepth 2 -not -path '*/node_modules/*' -not -path '*/.git/*' \
-not -path '*/__pycache__/*' -not -path '*/dist/*' -not -path '*/.next/*' | sort
# 2. 识别技术栈
cat package.json 2>/dev/null || cat pyproject.toml 2>/dev/null || \
cat go.mod 2>/dev/null || cat Cargo.toml 2>/dev/null || echo "未找到包管理文件"
# 3. 查看是否已有文档
ls -la *.md 2>/dev/null; ls -la docs/ 2>/dev/null
# 4. 查看 README(如有)
head -80 README.md 2>/dev/null || head -80 readme.md 2>/dev/null
This is the opening of the README. Read the full README on GitHub.