jvibe 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/JVIBE.md ADDED
@@ -0,0 +1,75 @@
1
+ <!-- JVIBE:START -->
2
+ # JVibe Instructions
3
+
4
+ 这是 JVibe 文档驱动开发系统的 AI 入口文档。
5
+
6
+ ## 何时使用 JVibe 工作流
7
+
8
+ 当用户请求涉及以下场景时,自动使用对应的 JVibe Skill 或 Agent:
9
+
10
+ | 场景 | 使用 |
11
+ |------|------|
12
+ | 新项目初始化 | `/JVibe:init` |
13
+ | 需求分析、功能规划 | `planner` agent |
14
+ | 代码实现、TODO 完成 | `developer` agent |
15
+ | 代码审查、规范检查 | `reviewer` agent |
16
+ | 文档状态同步 | `doc-sync` agent |
17
+ | 查看项目状态 | `/JVibe:status` |
18
+ | 生成 PR 描述 | `/JVibe:pr` |
19
+
20
+ ## 核心概念
21
+
22
+ ### 1. 文档体系
23
+
24
+ JVibe 使用两类文档:
25
+
26
+ **CORE-DOCS(4个固定核心文档)**:
27
+ - `docs/core/规范文档.md` - 入口和索引
28
+ - `docs/core/项目文档.md` - 架构与模块边界
29
+ - `docs/core/功能清单.md` - **功能状态唯一来源(SoT)**
30
+ - `docs/core/附加材料.md` - 规范索引
31
+
32
+ **PROJECT-DOCS(按需创建)**:
33
+ - `docs/project/*.md` - API文档、数据库文档等
34
+ - 必须在规范文档中注册
35
+
36
+ ### 2. 单一事实来源(SoT)
37
+
38
+ **重要**:功能状态只在 `功能清单.md` 中维护!
39
+
40
+ 状态推导规则:
41
+ ```
42
+ TODO 完成情况 → 功能状态
43
+ ┌─────────────────────────────────────┐
44
+ │ 完成数 / 总数 │ 推导状态 │ 状态符号 │
45
+ ├─────────────────┼────────────┼─────────────┤
46
+ │ 0 / N │ 未开始 │ ❌ │
47
+ │ 1~(N-1) / N │ 开发中 │ 🚧 │
48
+ │ N / N │ 已完成 │ ✅ │
49
+ └─────────────────────────────────────────────┘
50
+ ```
51
+
52
+ ### 3. 开发流程
53
+
54
+ ```
55
+ 需求分析 → 功能拆解 → 技术设计 → 编码实现 → 代码审查 → 文档同步
56
+ ```
57
+
58
+ ## Agent 职责
59
+
60
+ | Agent | 职责 | 可写文件 |
61
+ |-------|------|----------|
62
+ | **planner** | 需求分析、功能拆解、创建 F-XXX 条目 | 功能清单.md |
63
+ | **developer** | 代码实现、逐项完成 TODO、勾选完成项 | 功能清单.md + 源代码 |
64
+ | **reviewer** | 代码审查、规范检查、PR 描述生成 | 只读 |
65
+ | **doc-sync** | 状态推导、统计更新、格式检查 | 项目文档.md |
66
+
67
+ ## 重要提示
68
+
69
+ 1. **先读文档再开发**:开发前先阅读 `规范文档.md` 了解项目结构
70
+ 2. **遵循 SoT 原则**:功能状态只更新 `功能清单.md`
71
+ 3. **查阅附加材料**:开发前检查 `附加材料.md` 中的相关规范
72
+ 4. **注册 PROJECT-DOCS**:新建项目文档必须在规范文档中注册
73
+
74
+ 保持此管理块,以便 `jvibe upgrade` 更新指令。
75
+ <!-- JVIBE:END -->
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JVibe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,175 @@
1
+ # JVibe
2
+
3
+ > 文档驱动的 AI 辅助开发系统
4
+
5
+ [![npm version](https://badge.fury.io/js/jvibe.svg)](https://badge.fury.io/js/jvibe)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ---
9
+
10
+ ## 📌 什么是 JVibe?
11
+
12
+ JVibe 是一个**文档驱动的 AI 辅助开发系统**,专为 Claude Code 设计。它提供:
13
+
14
+ - 🤖 **4 个专业 Agent**:需求规划、代码开发、代码审查、文档同步
15
+ - 📝 **结构化文档体系**:CORE-DOCS(4个核心文档)+ PROJECT-DOCS(按需扩展)
16
+ - 🔄 **自动化 Hooks**:自动加载上下文、同步功能状态、输出统计信息
17
+ - 🎯 **单一事实来源**:功能状态只在功能清单中维护(SoT 原则)
18
+
19
+ ---
20
+
21
+ ## 🚀 快速开始
22
+
23
+ ### 安装
24
+
25
+ ```bash
26
+ # 全局安装
27
+ npm install -g jvibe
28
+
29
+ # 或使用 npx
30
+ npx jvibe init
31
+ ```
32
+
33
+ ### 初始化项目
34
+
35
+ ```bash
36
+ cd your-project
37
+ jvibe init
38
+
39
+ # 或最小化安装(仅 Core 文档)
40
+ jvibe init --mode=minimal
41
+ ```
42
+
43
+ ### 开始使用
44
+
45
+ ```bash
46
+ # 在 Claude Code 中运行
47
+ /JVibe:init # 创建项目文档
48
+ /JVibe:status # 查看项目状态
49
+ /JVibe:pr # 生成 PR 描述
50
+ ```
51
+
52
+ ---
53
+
54
+ ## 📂 项目结构
55
+
56
+ 运行 `jvibe init` 后,你的项目将包含:
57
+
58
+ ```
59
+ your-project/
60
+ ├── .claude/ # Claude Code 配置
61
+ │ ├── agents/ # 4 个 Sub-Agents
62
+ │ ├── commands/ # 3 个 JVibe Skills
63
+ │ ├── hooks/ # 3 个自动化 Hooks
64
+ │ └── settings.json
65
+
66
+ ├── docs/
67
+ │ ├── core/ # CORE-DOCS(4个固定核心文档)
68
+ │ │ ├── 规范文档.md # 入口和索引
69
+ │ │ ├── 项目文档.md # 架构与模块边界
70
+ │ │ ├── 功能清单.md # 功能状态唯一来源(SoT)
71
+ │ │ └── 附加材料.md # 规范索引
72
+ │ │
73
+ │ └── project/ # PROJECT-DOCS(按需创建)
74
+ │ └── README.md
75
+
76
+ └── .gitignore
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 📚 文档体系
82
+
83
+ ### CORE-DOCS vs PROJECT-DOCS
84
+
85
+ | 维度 | CORE-DOCS | PROJECT-DOCS |
86
+ |------|-----------|--------------|
87
+ | **结构** | 所有项目相同 | 按需创建 |
88
+ | **数量** | 固定 4 个 | 可变(0~N) |
89
+ | **注册** | 自动存在 | 必须在规范文档中注册 |
90
+
91
+ ### 单一事实来源(SoT)
92
+
93
+ 功能状态只在 `功能清单.md` 中维护:
94
+
95
+ ```
96
+ TODO 完成情况 → 功能状态
97
+ ┌─────────────────────────────────────┐
98
+ │ 完成数 / 总数 │ 状态符号 │
99
+ ├─────────────────┼─────────────┤
100
+ │ 0 / N │ ❌ │
101
+ │ 1~(N-1) / N │ 🚧 │
102
+ │ N / N │ ✅ │
103
+ └─────────────────────────────────────┘
104
+ ```
105
+
106
+ ---
107
+
108
+ ## 🤖 Agent 架构
109
+
110
+ | Agent | 职责 | 模型 |
111
+ |-------|------|------|
112
+ | **planner** | 需求分析、功能拆解 | Sonnet |
113
+ | **developer** | 代码实现、TODO 完成 | Sonnet |
114
+ | **reviewer** | 代码审查、规范检查 | Sonnet |
115
+ | **doc-sync** | 状态推导、统计更新 | Haiku |
116
+
117
+ ---
118
+
119
+ ## 🔧 CLI 命令
120
+
121
+ | 命令 | 说明 |
122
+ |------|------|
123
+ | `jvibe init` | 初始化 JVibe 项目 |
124
+ | `jvibe init --mode=minimal` | 最小化初始化(仅 Core 文档) |
125
+ | `jvibe init --force` | 强制覆盖已存在的配置 |
126
+ | `jvibe upgrade` | 升级到最新版本 |
127
+ | `jvibe upgrade --check` | 仅检查更新 |
128
+ | `jvibe status` | 查看项目配置状态 |
129
+ | `jvibe validate` | 验证项目配置 |
130
+
131
+ ---
132
+
133
+ ## 🎯 核心原则
134
+
135
+ JVibe 基于以下原则设计:
136
+
137
+ - **SOLID**:单一职责、开闭原则、里氏替换、接口隔离、依赖倒置
138
+ - **DRY**:避免重复,功能状态只在一处维护
139
+ - **KISS**:保持简单,状态推导规则清晰明确
140
+ - **YAGNI**:只实现当前需要的功能
141
+
142
+ ---
143
+
144
+ ## 📖 文档
145
+
146
+ - [快速开始指南](docs/GETTING_STARTED.md)
147
+ - [CLI 命令参考](docs/CLI_COMMANDS.md)
148
+ - [架构说明](docs/ARCHITECTURE.md)
149
+ - [CORE vs PROJECT 文档](docs/CORE_VS_PROJECT_DOCS.md)
150
+ - [贡献指南](docs/CONTRIBUTING.md)
151
+
152
+ ---
153
+
154
+ ## 🤝 贡献
155
+
156
+ 欢迎贡献!请查看 [贡献指南](docs/CONTRIBUTING.md)。
157
+
158
+ 1. Fork 本仓库
159
+ 2. 创建分支 `git checkout -b feature/improvement`
160
+ 3. 提交变更 `git commit -m 'feat: 添加新功能'`
161
+ 4. 推送分支 `git push origin feature/improvement`
162
+ 5. 创建 Pull Request
163
+
164
+ ---
165
+
166
+ ## 📄 许可证
167
+
168
+ [MIT](LICENSE)
169
+
170
+ ---
171
+
172
+ ## 🔗 相关链接
173
+
174
+ - [Claude Code 官方文档](https://docs.anthropic.com/claude-code)
175
+ - [OpenSpec](https://github.com/openspec/openspec) - 灵感来源
package/bin/jvibe.js ADDED
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * JVibe CLI - 文档驱动的 AI 辅助开发系统
5
+ *
6
+ * 用法:
7
+ * jvibe init [--mode=full|minimal] 初始化项目
8
+ * jvibe upgrade 升级到最新版本
9
+ * jvibe status 查看项目状态
10
+ * jvibe validate 验证项目配置
11
+ */
12
+
13
+ const { Command } = require('commander');
14
+ const pkg = require('../package.json');
15
+
16
+ const program = new Command();
17
+
18
+ program
19
+ .name('jvibe')
20
+ .description('JVibe - 文档驱动的 AI 辅助开发系统')
21
+ .version(pkg.version);
22
+
23
+ // init 命令
24
+ program
25
+ .command('init')
26
+ .description('初始化 JVibe 项目')
27
+ .option('--mode <type>', '模式: full(完整)或 minimal(最小)', 'full')
28
+ .option('--force', '强制覆盖已存在的文件', false)
29
+ .action(async (options) => {
30
+ const init = require('../scripts/init');
31
+ await init(options);
32
+ });
33
+
34
+ // upgrade 命令
35
+ program
36
+ .command('upgrade')
37
+ .description('升级到最新版本')
38
+ .option('--check', '仅检查更新,不执行升级', false)
39
+ .action(async (options) => {
40
+ const upgrade = require('../scripts/upgrade');
41
+ await upgrade(options);
42
+ });
43
+
44
+ // status 命令
45
+ program
46
+ .command('status')
47
+ .description('查看项目 JVibe 配置状态')
48
+ .action(async () => {
49
+ const status = require('../scripts/status');
50
+ await status();
51
+ });
52
+
53
+ // validate 命令
54
+ program
55
+ .command('validate')
56
+ .description('验证项目 JVibe 配置')
57
+ .action(async () => {
58
+ const validate = require('../scripts/validate');
59
+ await validate();
60
+ });
61
+
62
+ program.parse();
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "jvibe",
3
+ "version": "1.0.0",
4
+ "description": "文档驱动的 AI 辅助开发系统 - Doc-driven AI-assisted development system for Claude Code",
5
+ "main": "bin/jvibe.js",
6
+ "bin": {
7
+ "jvibe": "./bin/jvibe.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"No tests yet\""
11
+ },
12
+ "files": [
13
+ "bin/",
14
+ "scripts/",
15
+ "lib/",
16
+ "template/",
17
+ "JVIBE.md",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "keywords": [
22
+ "claude",
23
+ "claude-code",
24
+ "ai",
25
+ "development",
26
+ "documentation",
27
+ "doc-driven",
28
+ "vibe-coding",
29
+ "agents",
30
+ "cli"
31
+ ],
32
+ "author": "9963KK",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/9963KK/VibeCoding-Tech.git"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/9963KK/VibeCoding-Tech/issues"
40
+ },
41
+ "homepage": "https://github.com/9963KK/VibeCoding-Tech#readme",
42
+ "dependencies": {
43
+ "chalk": "^4.1.2",
44
+ "commander": "^11.1.0",
45
+ "fs-extra": "^11.2.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=16.0.0"
49
+ }
50
+ }
@@ -0,0 +1,118 @@
1
+ /**
2
+ * JVibe Init Script
3
+ * 初始化项目的 JVibe 配置
4
+ */
5
+
6
+ const fs = require('fs-extra');
7
+ const path = require('path');
8
+ const chalk = require('chalk');
9
+
10
+ const TEMPLATE_DIR = path.join(__dirname, '../template');
11
+
12
+ /**
13
+ * 初始化 JVibe 项目
14
+ * @param {Object} options - 初始化选项
15
+ * @param {string} options.mode - 模式: 'full' 或 'minimal'
16
+ * @param {boolean} options.force - 是否强制覆盖
17
+ */
18
+ async function init(options = {}) {
19
+ const mode = options.mode || 'full';
20
+ const force = options.force || false;
21
+ const cwd = process.cwd();
22
+
23
+ console.log(chalk.blue('\n🚀 正在初始化 JVibe...\n'));
24
+
25
+ try {
26
+ // 1. 检查是否已存在 JVibe 配置
27
+ const claudeDir = path.join(cwd, '.claude');
28
+ if (await fs.pathExists(claudeDir) && !force) {
29
+ console.log(chalk.yellow('⚠️ 检测到已存在 .claude/ 目录'));
30
+ console.log(chalk.yellow(' 使用 --force 选项强制覆盖'));
31
+ return;
32
+ }
33
+
34
+ // 2. 复制 .claude/ 目录
35
+ console.log(chalk.gray(' 复制 .claude/ 配置...'));
36
+ await fs.copy(
37
+ path.join(TEMPLATE_DIR, '.claude'),
38
+ claudeDir,
39
+ { overwrite: force }
40
+ );
41
+
42
+ // 3. 复制文档目录
43
+ if (mode === 'full') {
44
+ console.log(chalk.gray(' 复制 docs/ 文档模板...'));
45
+ await fs.copy(
46
+ path.join(TEMPLATE_DIR, 'docs'),
47
+ path.join(cwd, 'docs'),
48
+ { overwrite: force }
49
+ );
50
+ } else {
51
+ // minimal 模式只复制 core 文档
52
+ console.log(chalk.gray(' 复制 docs/core/ 核心文档...'));
53
+ await fs.ensureDir(path.join(cwd, 'docs'));
54
+ await fs.copy(
55
+ path.join(TEMPLATE_DIR, 'docs/core'),
56
+ path.join(cwd, 'docs/core'),
57
+ { overwrite: force }
58
+ );
59
+ }
60
+
61
+ // 4. 更新 .gitignore
62
+ const gitignorePath = path.join(cwd, '.gitignore');
63
+ const jvibeIgnore = '\n# JVibe\n.claude/settings.local.json\n';
64
+
65
+ if (await fs.pathExists(gitignorePath)) {
66
+ const content = await fs.readFile(gitignorePath, 'utf-8');
67
+ if (!content.includes('.claude/settings.local.json')) {
68
+ console.log(chalk.gray(' 更新 .gitignore...'));
69
+ await fs.appendFile(gitignorePath, jvibeIgnore);
70
+ }
71
+ } else {
72
+ console.log(chalk.gray(' 创建 .gitignore...'));
73
+ await fs.copy(
74
+ path.join(TEMPLATE_DIR, '.gitignore'),
75
+ gitignorePath
76
+ );
77
+ }
78
+
79
+ // 5. 添加版本信息到 settings.json
80
+ const settingsPath = path.join(claudeDir, 'settings.json');
81
+ if (await fs.pathExists(settingsPath)) {
82
+ const settings = await fs.readJson(settingsPath);
83
+ settings.jvibe = {
84
+ version: require('../package.json').version,
85
+ installedAt: new Date().toISOString(),
86
+ mode: mode
87
+ };
88
+ await fs.writeJson(settingsPath, settings, { spaces: 2 });
89
+ }
90
+
91
+ // 6. 输出成功信息
92
+ console.log(chalk.green('\n✅ JVibe 初始化完成!\n'));
93
+
94
+ console.log(chalk.white('已创建:'));
95
+ console.log(chalk.gray(' - .claude/agents/ (4 个 Sub-Agents)'));
96
+ console.log(chalk.gray(' - .claude/commands/ (3 个 JVibe Skills)'));
97
+ console.log(chalk.gray(' - .claude/hooks/ (3 个自动化 Hooks)'));
98
+ console.log(chalk.gray(' - .claude/settings.json'));
99
+
100
+ if (mode === 'full') {
101
+ console.log(chalk.gray(' - docs/core/ (4 个核心文档)'));
102
+ console.log(chalk.gray(' - docs/project/ (项目文档目录)'));
103
+ } else {
104
+ console.log(chalk.gray(' - docs/core/ (4 个核心文档)'));
105
+ }
106
+
107
+ console.log(chalk.yellow('\n📝 下一步:'));
108
+ console.log(chalk.white(' 1. 在 Claude Code 中运行 /JVibe:init 创建项目文档'));
109
+ console.log(chalk.white(' 2. 运行 /JVibe:status 查看项目状态'));
110
+ console.log(chalk.white(' 3. 开始使用自然语言描述你的需求!\n'));
111
+
112
+ } catch (error) {
113
+ console.error(chalk.red('\n❌ 初始化失败:'), error.message);
114
+ process.exit(1);
115
+ }
116
+ }
117
+
118
+ module.exports = init;
@@ -0,0 +1,98 @@
1
+ /**
2
+ * JVibe Status Script
3
+ * 查看项目的 JVibe 配置状态
4
+ */
5
+
6
+ const fs = require('fs-extra');
7
+ const path = require('path');
8
+ const chalk = require('chalk');
9
+
10
+ /**
11
+ * 显示 JVibe 状态
12
+ */
13
+ async function status() {
14
+ const cwd = process.cwd();
15
+
16
+ console.log(chalk.blue('\n📊 JVibe 项目状态\n'));
17
+
18
+ try {
19
+ // 1. 检查 .claude 目录
20
+ const claudeDir = path.join(cwd, '.claude');
21
+ if (!await fs.pathExists(claudeDir)) {
22
+ console.log(chalk.red('❌ 未检测到 JVibe 配置'));
23
+ console.log(chalk.yellow(' 请运行 jvibe init 初始化项目\n'));
24
+ return;
25
+ }
26
+
27
+ // 2. 读取版本信息
28
+ const settingsPath = path.join(claudeDir, 'settings.json');
29
+ let settings = {};
30
+ if (await fs.pathExists(settingsPath)) {
31
+ settings = await fs.readJson(settingsPath);
32
+ }
33
+
34
+ const jvibeInfo = settings.jvibe || {};
35
+
36
+ console.log(chalk.white('配置信息:'));
37
+ console.log(chalk.gray(` 版本: ${jvibeInfo.version || '未知'}`));
38
+ console.log(chalk.gray(` 模式: ${jvibeInfo.mode || '未知'}`));
39
+ console.log(chalk.gray(` 安装时间: ${jvibeInfo.installedAt || '未知'}`));
40
+ if (jvibeInfo.upgradedAt) {
41
+ console.log(chalk.gray(` 升级时间: ${jvibeInfo.upgradedAt}`));
42
+ }
43
+
44
+ // 3. 检查各组件状态
45
+ console.log(chalk.white('\n组件状态:'));
46
+
47
+ // Agents
48
+ const agentsDir = path.join(claudeDir, 'agents');
49
+ const agents = await fs.pathExists(agentsDir)
50
+ ? (await fs.readdir(agentsDir)).filter(f => f.endsWith('.md'))
51
+ : [];
52
+ console.log(chalk.gray(` Agents: ${agents.length > 0 ? chalk.green('✓') : chalk.red('✗')} (${agents.length} 个)`));
53
+
54
+ // Commands
55
+ const commandsDir = path.join(claudeDir, 'commands');
56
+ const commands = await fs.pathExists(commandsDir)
57
+ ? (await fs.readdir(commandsDir)).filter(f => f.endsWith('.md'))
58
+ : [];
59
+ console.log(chalk.gray(` Commands: ${commands.length > 0 ? chalk.green('✓') : chalk.red('✗')} (${commands.length} 个)`));
60
+
61
+ // Hooks
62
+ const hooksDir = path.join(claudeDir, 'hooks');
63
+ const hooks = await fs.pathExists(hooksDir)
64
+ ? (await fs.readdir(hooksDir)).filter(f => f.endsWith('.sh'))
65
+ : [];
66
+ console.log(chalk.gray(` Hooks: ${hooks.length > 0 ? chalk.green('✓') : chalk.red('✗')} (${hooks.length} 个)`));
67
+
68
+ // 4. 检查文档状态
69
+ console.log(chalk.white('\n文档状态:'));
70
+
71
+ const docsDir = path.join(cwd, 'docs');
72
+ const coreDir = path.join(docsDir, 'core');
73
+ const projectDir = path.join(docsDir, 'project');
74
+
75
+ if (await fs.pathExists(coreDir)) {
76
+ const coreDocs = (await fs.readdir(coreDir)).filter(f => f.endsWith('.md'));
77
+ console.log(chalk.gray(` Core 文档: ${coreDocs.length >= 4 ? chalk.green('✓') : chalk.yellow('⚠')} (${coreDocs.length}/4 个)`));
78
+ } else {
79
+ console.log(chalk.gray(` Core 文档: ${chalk.red('✗')} (未创建)`));
80
+ }
81
+
82
+ if (await fs.pathExists(projectDir)) {
83
+ const projectDocs = (await fs.readdir(projectDir))
84
+ .filter(f => f.endsWith('.md') && !f.endsWith('.example'));
85
+ console.log(chalk.gray(` Project 文档: ${chalk.green('✓')} (${projectDocs.length} 个)`));
86
+ } else {
87
+ console.log(chalk.gray(` Project 文档: ${chalk.gray('-')} (未创建)`));
88
+ }
89
+
90
+ console.log('');
91
+
92
+ } catch (error) {
93
+ console.error(chalk.red('\n❌ 读取状态失败:'), error.message);
94
+ process.exit(1);
95
+ }
96
+ }
97
+
98
+ module.exports = status;