核心理念:代码是廉价的,正确的需求才是无价的。
在写代码前,强制 AI 进行"7轮深度调研",生成标准化《开发指导书》,让 AI 一次把代码写对。Before writing code, force AI to conduct a "7-round deep survey" to generate a standardized "Development Guide" and get the code right the first time.
一、核心概念1. Core Concepts
1.1 什么是 Vibe Coding?1.1 What is Vibe Coding?
Vibe Coding 是 AI 辅助编程的新范式,强调「提示词先行」(Prompt First)。传统开发中常遇到的问题:Vibe Coding is a new paradigm for AI-assisted programming, emphasizing "Prompt First". Common problems in traditional development:
- AI 猜错需求:你只说了一句"做个记账 App",AI 就开始瞎写AI guesses wrong: You only said "make a记账 App", and AI starts writing randomly
- 代码难以维护:没有规划,AI 写出来的代码像面条一样缠绕Code hard to maintain: No planning, AI code becomes spaghetti
- 重复踩坑:同样的问题,每次开发都要重新给 AI 解释Repeated pitfalls: Same problems, need to explain to AI every time
1.2 本项目的独特价值1.2 Unique Value
🌐 通用性增强Universal Compatibility
摆脱对特定 IDE 依赖,纯文本 SKILL.md,任何 AI 都能读No IDE dependency, plain text SKILL.md, works with any AI
💾 零依赖记忆Zero-Dependency Memory
vibe_memory.py 零依赖,不需要数据库或复杂环境vibe_memory.py with no dependencies, no database needed
🚀 自动化导出Automated Export
export-claude 功能,打通从需求调研到代码生成最后一公里export-claude bridges the gap between requirements and code
二、三层架构设计2. Three-Layer Architecture
┌─────────────────────────────────────────────────────────┐ │ 第一层:认知层 (SKILL.md) —— 🧠 大脑 │ │ • 7 轮结构化调研逻辑 │ │ • 文档生成模板 │ │ • 非侵入式规范 │ ├─────────────────────────────────────────────────────────┤ │ 第二层:记忆层 (vibe_memory.py) —— 💾 记忆 │ │ • 存储历史:项目归档到 .vibe/history/ │ │ • 检索经验:自动查找历史项目 │ │ • 格式化导出:转换为 Claude Code / Codex 格式 │ ├─────────────────────────────────────────────────────────┤ │ 第三层:执行层 (AGENTS.md) —— 🤖 手臂 │ │ • 纯执行,不关心需求怎么调研出来的 │ │ • 只关心 AGENTS.md 里的指令 │ └─────────────────────────────────────────────────────────┘
三、7 轮深度调研方法论3. 7-Round Deep Survey
3.1 调研流程3.1 Survey Flow
每次只问 1 个问题,等用户回答后再问下一个:Ask only 1 question at a time, wait for user's answer before asking the next:
| 轮次Round | 主题Topic | 核心问题Core Question | 记录字段Field |
|---|---|---|---|
| Q1 | 项目概览Overview | "请用一句话描述你想做什么?""Describe what you want in one sentence?" | overview |
| Q2 | 目标用户Audience | "谁会使用这个产品?""Who will use this product?" | audience |
| Q3 | 核心功能Features | "列出最核心的 3-5 个功能""List the 3-5 core features" | features |
| Q4 | 技术偏好Tech Pref | "有偏好的技术栈吗?""Any preferred tech stack?" | tech_pref |
| Q5 | UI/UX 风格UI/UX | "界面风格偏好?""Interface style preference?" | ui_style |
| Q6 | 部署环境Deploy | "打算部署在哪里?""Where do you plan to deploy?" | deploy_env |
| Q7 | 约束与边界Constraints | "有什么特殊限制?""Any special constraints?" | constraints |
3.2 AI 自主决策规则3.2 AI Self-Decision Rules
- 用户回答模糊时 → 主动追问具体细节Unclear answer → Proactively ask for details
- 用户说"随便"或"你决定" → 记录为 AI 自主决策,并在文档中标注User says "whatever" or "you decide" → Mark as AI self-decision
- 用户中途跳过 → 标记为 ⏭️ 跳过,继续下一个User skips → Mark as ⏭️ skipped
3.3 生成《开发指导书》3.3 Generate Development Guide
调研完成后,AI 自动生成标准化 guide.md,包含 8 个章节:After survey, AI generates standardized guide.md with 8 chapters:
- 需求定义:Must Have + Nice to Have + Out of Scope
- 技术架构:技术栈选型 + 项目结构 + 关键依赖
- UI/UX 规范:设计风格 + 响应式要求
- 开发计划:分步执行,每步 10-30 分钟可完成
- 开发约束:铁律 + 编码规范 + 特殊约束
- 历史经验:相似项目参考 + 已知坑点
- 变更记录:记录所有变更
- AI 决策记录:供用户审查
四、Memory Bank 记忆系统4. Memory Bank System
4.1 目录结构(非侵入式)4.1 Directory Structure (Non-Invasive)
project/ ├── .vibe/ # 本技能的工作目录(隔离的) │ ├── guide.md # 统一开发指导文档 │ ├── client-profile.md # 客户长期偏好 │ ├── history/ # 历史项目归档 │ │ └── 2026-04-21_记账app/ │ └── session-log.md # 当前会话的调研记录 ├── memory-bank/ # Claude Code 专用格式 ├── AGENTS.md # Claude Code 入口文件 └── ... (用户原有的项目文件) # 本技能绝不触碰
4.2 相似项目检索算法4.2 Similar Project Retrieval
使用纯 Python 实现的零依赖检索:Zero-dependency retrieval using pure Python:
# Recall: query 中有多少比例的词出现在目标文档中 intersection = query_tokens & content_tokens recall = len(intersection) / len(query_tokens) jaccard = len(intersection) / len(query_tokens | content_tokens) score = recall * 0.7 + jaccard * 0.3
4.3 跨项目客户画像4.3 Cross-Project Client Profile
client-profile.md 记录用户的长期偏好,跨项目复用,包括技术偏好、UI 偏好、历史统计等。client-profile.md records long-term user preferences for cross-project reuse, including tech preferences, UI preferences, and historical stats.
五、与 Hermes Agent 的结合5. Integration with Hermes Agent
5.1 兼容平台5.1 Compatible Platforms
| AI 助理 | 安装方式Installation | 兼容性Compatibility |
|---|---|---|
| Claude Code | 放入 .claude/skills/Put in .claude/skills/ | ✅ 完全兼容Full |
| Codex CLI | 放入项目根目录Project root | ✅ 完全兼容Full |
| Cursor | 放入 .cursor/rules/Put in .cursor/rules/ | ✅ 完全兼容Full |
| ChatGPT | 直接粘贴内容Paste content | ✅ 完全兼容Full |
| Gemini | 直接粘贴内容Paste content | ✅ 完全兼容Full |
| Hermes Agent | 通过 skill_view 加载Via skill_view | ✅ 完全兼容Full |
六、与其他框架的对比6. Comparison with Other Frameworks
6.1 vs DeerFlow6.1 vs DeerFlow
| 维度Dimension | Vibe-Coding-Universal | DeerFlow |
|---|---|---|
| 核心关注点Focus | 需求工程(写代码前)Requirements Engineering | 深度研究(生成报告)Deep Research |
| 方法论Methodology | 7轮结构化调研7-Round Survey | 多Agent协作研究Multi-Agent Research |
| 输出物Output | guide.md 开发指导书Development Guide | 结构化研究报告Research Report |
| 记忆系统Memory | Memory Bank + 客户画像Client Profile | 向量数据库检索Vector DB |
| 适用场景Use Case | AI 辅助编程Coding | 深度内容研究Content Research |
6.2 核心差异6.2 Core Differences
Vibe-Coding-Universal 的优势's Advantages:
- 更轻量:纯 Markdown + 零依赖 PythonLighter: Pure Markdown + Zero-dependency Python
- 更专注:聚焦于"写代码前"的需求澄清More focused: On requirements clarification before coding
- 更通用:任何 AI 都能加载使用More universal: Any AI can load and use
七、关键洞察与实践建议7. Key Insights & Recommendations
7.1 核心价值7.1 Core Value
- Prompt First:在写代码前强制进行需求调研,避免"AI 瞎写"Force requirements survey before coding
- Single Source of Truth:一份 guide.md 作为开发唯一真理来源One guide.md as the single source of truth
- 记忆复用:跨项目复用客户偏好和历史经验Cross-project preference and experience reuse
- 零门槛:任何 AI 都能加载使用Zero threshold, any AI can use
7.2 实践建议7.2 Recommendations
- 新项目启动:先加载 SKILL.md,再描述需求New project: Load SKILL.md first, then describe requirements
- 需求澄清:认真回答 7 轮调研,减少 AI 猜测Requirements: Answer the 7 rounds carefully
- 经验积累:完成项目后归档,充实记忆库Experience: Archive completed projects to enrich memory
- 定期回顾:检查 guide.md 的变更记录,持续优化Review: Check guide.md changes regularly
八、相关资源8. Resources
- GitHub: https://github.com/mage0535/vibe-coding-universal
- 相关项目:
- EnzeD/vibe-coding - Memory Bank 核心理念Core Concept
- tukuaiai/vibe-coding-cn - 四阶段×十二原则方法论4-Phase × 12-Principle Methodology
📌 学习总结Summary
Vibe-Coding-Universal 是一个轻量、通用、可扩展的 AI 辅助编程框架。通过 7 轮结构化调研和 Memory Bank 记忆系统,它有效解决了"AI 听不懂人话"的痛点,是 AI 编程时代的重要方法论工具。Vibe-Coding-Universal is a lightweight, universal, extensible AI-assisted programming framework. Through 7-round structured surveys and Memory Bank, it effectively solves the problem of "AI not understanding humans" and is an important methodological tool for the AI programming era.