|
| 1 | +# 01 — 项目信息 |
| 2 | + |
| 3 | +## 基本信息 |
| 4 | + |
| 5 | +| 项目 | DevCodex | |
| 6 | +|------|----------| |
| 7 | +| **npm 包名** | `@vextjs/devcodex` | |
| 8 | +| **当前版本** | 0.0.2 | |
| 9 | +| **许可证** | AGPL-3.0-or-later | |
| 10 | +| **仓库地址** | https://github.com/vextjs/devcodex | |
| 11 | +| **官网** | https://devcodex.dev | |
| 12 | +| **Issues** | https://github.com/vextjs/devcodex/issues | |
| 13 | + |
| 14 | +## 技术栈 |
| 15 | + |
| 16 | +| 分类 | 技术 | 说明 | |
| 17 | +|------|------|------| |
| 18 | +| **运行时** | Node.js ≥ 18 | CLI 运行环境 | |
| 19 | +| **语言** | JavaScript(CJS) | 无 TypeScript,无编译步骤 | |
| 20 | +| **包管理** | npm | 使用 `npm link` 本地开发 | |
| 21 | +| **Node 版本管理** | Volta | 项目已锁定版本 | |
| 22 | +| **CLI 框架** | 原生(无框架) | `process.argv` 手动解析 | |
| 23 | +| **文件操作** | `fs`、`path`(内置模块) | 无第三方依赖 | |
| 24 | +| **Dev 依赖** | `canvas ^3.2.3` | 资产图片生成用 | |
| 25 | + |
| 26 | +## 产品定位 |
| 27 | + |
| 28 | +DevCodex 是"AI 开发规范注入器": |
| 29 | + |
| 30 | +1. **核心产物**:`.github/agents/`、`.github/skills/`、`.github/instructions/` 等 Markdown 规范文件 |
| 31 | +2. **安装器**:`index.js` CLI,将规范文件复制到目标项目 |
| 32 | +3. **目标用户**:使用 GitHub Copilot Agent 的开发团队 |
| 33 | + |
| 34 | +## 版本策略 |
| 35 | + |
| 36 | +| 类型 | 规则 | |
| 37 | +|------|------| |
| 38 | +| **MAJOR**(x.0.0) | 工作流或架构破坏性变更 | |
| 39 | +| **MINOR**(0.x.0) | 新增工作流、新增 Skill、新增指令集 | |
| 40 | +| **PATCH**(0.0.x) | Bug 修复、文字修正、工具改进 | |
| 41 | + |
| 42 | +- `CHANGELOG.md` 记录所有版本变更 |
| 43 | +- `changelogs/vX.Y.Z.md` 存放详细变更日志 |
| 44 | +- `plugin.json` 中的 `version` 字段必须与 `package.json` 保持同步 |
| 45 | + |
| 46 | +## 当前开发模式 |
| 47 | + |
| 48 | +> **状态:本地开发模式**(npm link 激活) |
| 49 | +
|
| 50 | +``` |
| 51 | +e:\MySelf\devcodex\ ← 源码目录(修改在这里) |
| 52 | + ↓ devcodex update(同步命令) |
| 53 | +e:\MySelf\.github\ ← 已安装到 MySelf 工作区 |
| 54 | +``` |
| 55 | + |
| 56 | +### 开发工作流 |
| 57 | + |
| 58 | +```bash |
| 59 | +# 第一次初始化(已完成,无需重复) |
| 60 | +cd e:\MySelf\devcodex |
| 61 | +npm link # 将 devcodex 命令链接到全局 |
| 62 | + |
| 63 | +# 日常开发循环 |
| 64 | +# 1. 在 e:\MySelf\devcodex\ 修改规范文件(agents/skills/instructions 等) |
| 65 | +# 2. 同步到 MySelf 工作区(必须执行) |
| 66 | +cd e:\MySelf |
| 67 | +devcodex update # 同步到 E:\MySelf\.github\(Agent 读取来源) |
| 68 | + |
| 69 | +# 3. 同步到 MySelf 的 .devcodex\(实时验证效果用) |
| 70 | +# 将 devcodex 项目的 profile/config 同步到 MySelf 工作区的 .devcodex\ |
| 71 | +xcopy /E /Y e:\MySelf\devcodex\.devcodex\profile\ e:\MySelf\.devcodex\profile\ |
| 72 | + |
| 73 | +# 4. 新建 Chat 会话(Ctrl+N)验证最新规范是否生效 |
| 74 | +# 无需重启 VS Code,新会话会重新加载 .github\ 下的所有文件 |
| 75 | + |
| 76 | +# 验证安装状态 |
| 77 | +devcodex status |
| 78 | +``` |
| 79 | + |
| 80 | +### 关键路径对应关系 |
| 81 | + |
| 82 | +| 源码位置 | 安装后位置 | 说明 | |
| 83 | +|---------|-----------|------| |
| 84 | +| `devcodex/agents/` | `.github/agents/` | Agent 定义文件 | |
| 85 | +| `devcodex/skills/` | `.github/skills/` | Skill 文件 | |
| 86 | +| `devcodex/instructions/` | `.github/instructions/` | 全局指令 | |
| 87 | +| `devcodex/prompts/` | `.github/prompts/` | Prompt 模板 | |
| 88 | +| `devcodex/hooks/` | `.github/hooks/` | Agent Hooks | |
| 89 | + |
| 90 | +> ⚠️ **每次修改规范文件后都必须执行 `devcodex update`**,否则 VS Code 中的 DevCodex Agent 读取的仍是旧版本。修改后重新开启一个 Chat 会话让 VS Code 重新加载文件。 |
| 91 | +
|
| 92 | +## 发布流程 |
| 93 | + |
| 94 | +```bash |
| 95 | +# 1. 更新版本 |
| 96 | +npm version patch|minor|major |
| 97 | + |
| 98 | +# 2. 更新 plugin.json version 字段(手动同步) |
| 99 | + |
| 100 | +# 3. 运行审计工具 |
| 101 | +node tools/v5-full-audit.js |
| 102 | + |
| 103 | +# 4. 发布 |
| 104 | +npm publish --access restricted |
| 105 | +``` |
| 106 | + |
| 107 | +## 授权层级 |
| 108 | + |
| 109 | +| 层级 | 说明 | |
| 110 | +|------|------| |
| 111 | +| **Free** | dev(非高级子类型)、fix-default、analyze、audit(非 audit-project)、chat | |
| 112 | +| **Pro** | database / optimization / scenario-test / incident / fix-security / audit-project / self-fix / resume / plan | |
0 commit comments