Skip to content

Commit 3f6aad4

Browse files
committed
chore: regenerate assets without counts, clean npm package
1 parent c163d49 commit 3f6aad4

104 files changed

Lines changed: 6596 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug Report
3+
about: 报告 DevCodex 工作流或规范行为错误
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## 问题描述
10+
11+
<!-- 简要描述发生了什么 -->
12+
13+
## 复现步骤
14+
15+
1. 使用的 Agent(`@dev` / `@fix` / `@audit` 等):
16+
2. 触发的操作:
17+
3. 期望行为:
18+
4. 实际行为:
19+
20+
## 环境
21+
22+
- DevCodex 版本:
23+
- VS Code 版本:
24+
- GitHub Copilot 版本:
25+
- OS:
26+
27+
## 附加信息
28+
29+
<!-- 截图、日志、相关文件路径等 -->
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Feature Request
3+
about: 建议新增工作流、Skill 或规范改进
4+
title: "[FEAT] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## 需求描述
10+
11+
<!-- 你希望解决什么问题? -->
12+
13+
## 建议方案
14+
15+
<!-- 你设想的实现方式 -->
16+
17+
## 影响范围
18+
19+
- [ ] 新增 Agent
20+
- [ ] 新增 / 修改 Skill
21+
- [ ] 修改 Instructions
22+
- [ ] 修改 Prompts
23+
- [ ] 其他:
24+
25+
## 优先级
26+
27+
- [ ] P0 — 阻碍正常使用
28+
- [ ] P1 — 重要但有 workaround
29+
- [ ] P2 — Nice to have

‎.gitignore‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Runtime data (AI-generated during usage, not committed)
5+
data/violations.md
6+
data/pending-fixes.md
7+
8+
# OS
9+
.DS_Store
10+
Thumbs.db
11+
12+
# Editor
13+
.vscode/
14+
*.swp
15+
*.swo
16+
17+
# Logs
18+
*.log
19+
npm-debug.log*
20+
21+
# Build
22+
dist/
23+
*.tgz
24+
25+
# Assets (placeholder files)
26+
assets/*.placeholder
27+
28+
# Local env
29+
.env
30+
.env.local

‎.mcp.json‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "https://json.schemastore.org/mcp-servers.json",
3+
"_comment": "v5.0 占位配置,v5.1 实现 MCP Server 后更新 command/url 字段并设 disabled: false",
4+
"servers": {
5+
"devcodex-memory": {
6+
"type": "stdio",
7+
"command": "node",
8+
"args": ["${PLUGIN_ROOT}/mcp/memory-server.js"],
9+
"disabled": true,
10+
"tools": ["memory_read", "memory_write", "memory_list"],
11+
"resources": ["memory://sessions/**"]
12+
},
13+
"devcodex-violations": {
14+
"type": "stdio",
15+
"command": "node",
16+
"args": ["${PLUGIN_ROOT}/mcp/violations-server.js"],
17+
"disabled": true,
18+
"tools": ["violation_log", "violation_query", "violation_stats"]
19+
},
20+
"devcodex-auth": {
21+
"type": "http",
22+
"url": "https://auth.devcodex.dev/mcp",
23+
"disabled": true,
24+
"tools": ["token_validate", "token_refresh", "tier_check"]
25+
}
26+
}
27+
}

‎.npmignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Dev tools (not needed by plugin users)
2+
assets/README.md
3+
data/
4+
node_modules/
5+
*.tgz

‎CHANGELOG.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Changelog
2+
3+
All notable changes to DevCodex will be documented in this file.
4+
5+
## [1.0.0] — 2026-04-03
6+
7+
### Added
8+
9+
- **Plugin 架构**:完整的 GitHub Copilot Agent Plugin 骨架(plugin.json + 目录结构)
10+
- **8 个工作流 Agents**:dev / fix / audit / analyze / self-fix / chat / resume / plan
11+
- **34 个 Skills**:
12+
- 核心 Skills(7):compliance / memory / report / cp-gate / intent / summary / plan
13+
- dev 子类型(8):default / refactor / database / init / optimization / scenario-test / docs / plan-review
14+
- fix 子类型(3):default / incident / security
15+
- audit 目标类型(8):common / dimensions / tech-design / requirements / project / report / document / execution-guide
16+
- 其他(8):analyze-research / self-fix-auto / api-verification / document-sync / impact-review / routing / load-profile / token-check
17+
- **11 个 Instructions**:00-safety(P2 全局)/ 01-common / 02-output-paths + 10~17 工作流规则
18+
- **20 个 Prompt 模板**:v4 templates/ 全量迁移 + token-setup 新增
19+
- **2 个 Hooks**:UserPromptSubmit(Token验证)/ Stop(记忆写入)
20+
- **Token 授权系统**:Free / Pro / Enterprise 三层,7天离线缓存
21+
- **v4→v5 迁移工具**:`tools/v4-to-v5-migration.js`
22+
23+
### Notes
24+
25+
- v4(ai-dev-guidelines)继续并行维护,v5 为独立 Plugin
26+
- MCP Server 动态数据层计划在 v5.1 实现(当前为占位配置)
27+
28+
## [0.0.1] — 2026-04-03
29+
30+
- npm 占位包发布(devcodex),保留包名

‎MIGRATION.md‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# v4 → v5 迁移指南
2+
3+
> 从 `ai-dev-guidelines v4` 迁移到 `DevCodex v5 Plugin`
4+
5+
## 概述
6+
7+
v4 是手动配置的规范目录,v5 是 GitHub Copilot Agent Plugin,安装即用。
8+
**v4 不需要删除**,两者可并行运行。
9+
10+
## 主要变化
11+
12+
| 维度 | v4 | v5 |
13+
|------|----|----|
14+
| 分发方式 | 手动克隆目录 | VS Code Plugin 一键安装 |
15+
| 激活方式 | 修改 VS Code settings,手动引用路径 | Plugin 平台自动注入 Instructions |
16+
| 工作流触发 | 读取 RULES.md 后手动路由 | `@dev` / `@audit` 等 Agent 触发 |
17+
| 记忆系统 | 手写到项目目录 | memory.skill 自动管理 |
18+
| 多租户 | `tenants/<id>/specs/` 手动路径覆盖 | `instructions/tenants/<id>/` 自动优先级覆盖 |
19+
20+
## 内容映射
21+
22+
v4 的每个 specs 文件都已 1:1 映射到 v5:
23+
24+
| v4 文件 | v5 对应组件 |
25+
|---------|------------|
26+
| `specs/safety.md` | `instructions/00-safety.instructions.md`(自动注入,不可覆盖)|
27+
| `specs/common.md` | `instructions/01-common.instructions.md` |
28+
| `specs/dev/README.md` | `agents/dev.agent.md` + `instructions/10-dev.instructions.md` |
29+
| `specs/dev/<sub>.md` | `skills/dev/dev-<sub>.skill.md` |
30+
| `specs/audit/<dim>.md` | `skills/audit/audit-<dim>.skill.md` |
31+
| `templates/*.md` | `prompts/*.prompt.md` |
32+
33+
完整映射规则见技术方案 §2.10。
34+
35+
## 多租户迁移
36+
37+
如果你有 `tenants/<id>/specs/*.md` 覆盖文件:
38+
39+
**手动方式**:
40+
```
41+
# 将每个 specs/*.md 转换为 instructions 格式
42+
cp tenants/acme/specs/common.md instructions/tenants/acme/01-common.instructions.md
43+
# 在文件头添加 frontmatter:
44+
---
45+
applyTo: "**"
46+
priority: 3
47+
tenant: acme
48+
---
49+
```
50+
51+
**自动方式**(v5.0 工具):
52+
```bash
53+
node tools/v4-to-v5-migration.js --tenant acme --src path/to/v4
54+
```
55+
56+
## 记忆文件位置
57+
58+
v4 的记忆文件写入项目 profile 目录。v5 的 memory.skill 默认写入:
59+
```
60+
<project-root>/.copilot/memory/
61+
```
62+
63+
## 常见问题
64+
65+
**Q: v4 的 RULES.md 预检步骤还需要手动执行吗?**
66+
A: 不需要。v5 的 Hooks(pre-message)自动完成时间获取和 Token 验证;00-safety.instructions.md 自动注入安全底线。
67+
68+
**Q: 自定义的 v4 specs 规范能直接用在 v5 吗?**
69+
A: 需要转换为 Instructions 格式(添加 YAML frontmatter),使用迁移工具可自动完成。
70+
71+
**Q: v5 的 Token 在哪里设置?**
72+
A: 在 VS Code 中运行 Prompt `/token-setup`,或手动设置环境变量 `DEVCODEX_TOKEN=<your-token>`。

‎README.md‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# DevCodex
2+
3+
> **AI 辅助开发规范助手** — GitHub Copilot Agent Plugin v1.0
4+
5+
[![npm](https://img.shields.io/npm/v/devcodex)](https://www.npmjs.com/package/devcodex)
6+
[![License](https://img.shields.io/badge/license-AGPL--3.0-blue)](LICENSE)
7+
8+
DevCodex 将 [ai-dev-guidelines v4](https://github.com/vextjs/ai-dev-guidelines) 的完整规范体系打包为标准 GitHub Copilot Agent Plugin,在 VS Code 中一键安装即用,提供:
9+
10+
- **8 个工作流 Agents**(dev / fix / audit / analyze / self-fix / chat / resume / plan)
11+
- **34 个 Skills**(含核心技能、各工作流子类型技能、跨工作流公共技能)
12+
- **11 个 Instructions**(全局安全底线 + 通用约束 + 8 个工作流规则)
13+
- **20 个 Prompt 模板**(需求/技术方案/实施计划/报告等)
14+
15+
## 安装
16+
17+
在 VS Code 命令面板(`Ctrl+Shift+P`)执行:
18+
19+
```
20+
GitHub Copilot: Install Plugin
21+
```
22+
23+
搜索 **DevCodex** 安装。安装后在 Copilot Chat 中使用 `@dev`、`@audit` 等触发工作流。
24+
25+
## 快速开始
26+
27+
```
28+
# 开发新功能
29+
@dev 我需要开发一个用户登录模块
30+
31+
# 修复线上事故
32+
@fix 生产环境出现 OOM,需要紧急修复
33+
34+
# 审计技术方案
35+
@audit 请审查这份技术方案文档
36+
37+
# 分析代码(Free)
38+
@analyze 分析这段代码的性能问题
39+
```
40+
41+
详细说明见 [MIGRATION.md](MIGRATION.md)。
42+
43+
## 授权层级
44+
45+
| 层级 | 价格 | 包含 |
46+
|------|------|------|
47+
| **Free** | 免费 | @analyze + @chat,20次/天 |
48+
| **Pro** | 订阅制 | 全部 8 Agents + 34 Skills,无限制 |
49+
| **Enterprise** | 联系我们 | Pro + 多租户 Instructions 定制 |
50+
51+
获取 Token:[devcodex.dev](https://devcodex.dev)
52+
53+
## 架构
54+
55+
```
56+
Plugin(静态知识层) MCP Server(动态数据层,v5.1)
57+
├── instructions/ ├── memory-server
58+
├── agents/ ├── violations-server
59+
├── skills/ └── auth-server
60+
└── prompts/
61+
```
62+
63+
v5.0 Plugin 本地运行,离线可用(Free 层永久可用,Pro 层 7 天离线缓存)。
64+
65+
## v4 升级
66+
67+
已使用 v4 (`ai-dev-guidelines`) 的用户请参阅 [MIGRATION.md](MIGRATION.md)。
68+
69+
## 贡献 & 支持
70+
71+
- Issues:[github.com/vextjs/devcodex/issues](https://github.com/vextjs/devcodex/issues)
72+
- 安全漏洞:见 [SECURITY.md](SECURITY.md)
73+
- 商业授权:见 [LICENSE.md](commercial/LICENSE.md)
74+
75+
## License
76+
77+
[AGPL-3.0](LICENSE) — 开源免费使用;商业闭源部署请购买商业授权。

‎RULES.md‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# DevCodex v5 — 使用入口
2+
3+
> GitHub Copilot Agent Plugin · publisher: Rocky · version: 1.0.0
4+
5+
## 安装
6+
7+
在 VS Code Copilot Chat 的 Plugins 页面搜索 **DevCodex** 并安装,或通过命令面板:
8+
```
9+
GitHub Copilot: Install Plugin → DevCodex
10+
```
11+
12+
## 工作流 Agents(Pro 层)
13+
14+
| 触发方式 | Agent | 用途 |
15+
|---------|-------|------|
16+
| `@dev` | dev.agent | 开发(新功能/重构/数据库/初始化/优化/测试/文档/方案评审)|
17+
| `@fix` | fix.agent | 修复(常规Bug/线上事故/安全漏洞)|
18+
| `@audit` | audit.agent | 审计(规范文件/技术方案/需求文档/项目工程/报告/文档)|
19+
| `@self-fix` | self-fix.agent | 规范自修复(自动检测并修正 AI 行为偏差)|
20+
| `@resume` | resume.agent | 恢复(断点续接中断任务,还原上下文)|
21+
| `@plan` | plan.agent | 规划(制定执行计划,含 CP 确认关卡)|
22+
23+
## 免费 Agents(Free 层)
24+
25+
| 触发方式 | Agent | 用途 |
26+
|---------|-------|------|
27+
| `@analyze` | analyze.agent | 分析(单轮代码/需求/架构研究)|
28+
| `@chat` | chat.agent | 问答(轻量对话,无工作流开销)|
29+
30+
## 安全底线
31+
32+
`00-safety.instructions.md` 全局自动注入,包含 S01~S06 六条不可覆盖的安全规则:
33+
- **S01** 破坏性操作需确认 · **S02** 禁止硬编码凭据 · **S03** 禁止编造规范
34+
- **S04** 禁止整文件覆写 · **S05** 记忆+报告自动写入 · **S06** 禁止危险命令
35+
36+
## 授权
37+
38+
- **Free**:`@analyze` + `@chat`,20次/天
39+
- **Pro**:全部 8 Agents + 34 Skills,无次数限制
40+
- **Enterprise**:Pro + 多租户 Instructions 定制
41+
42+
设置 Token:`DEVCODEX_TOKEN=<your-token>` 或运行 `/token-setup`
43+
44+
## 相关文档
45+
46+
- [迁移指南 v4→v5](MIGRATION.md) · [定价](commercial/PRICING.md)
47+
- [GitHub 仓库](https://github.com/vextjs/devcodex) · [授权服务](https://auth.devcodex.dev)

‎SECURITY.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
|---------|-----------|
7+
| v1.x | ✅ |
8+
| < v1.0 | ❌ |
9+
| < v4.0 | ❌ |
10+
11+
## Reporting a Vulnerability
12+
13+
如果你发现了安全漏洞,请**不要**公开 GitHub Issue,而是:
14+
15+
1. 发送邮件至 `security@devcodex.dev`
16+
2. 邮件包含:漏洞描述、复现步骤、受影响版本、建议修复方案(可选)
17+
3. 我们会在 48 小时内响应,并在修复后通知你
18+
19+
## Security Disclosure Policy
20+
21+
- 我们遵循 90 天披露政策
22+
- 修复后会在 [Releases](https://github.com/vextjs/devcodex/releases) 发布安全公告
23+
- CVE 编号申请视严重程度决定

0 commit comments

Comments
 (0)