aodw-skill 0.11.0 → 0.13.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.
Files changed (48) hide show
  1. package/.aodw-next/01-core/ai-knowledge-rules.md +35 -2
  2. package/.aodw-next/01-core/aodw-constitution.md +22 -3
  3. package/.aodw-next/01-core/git-discipline.md +11 -0
  4. package/.aodw-next/01-core/test-discipline.md +2 -0
  5. package/.aodw-next/02-workflow/autopilot-protocol.md +4 -1
  6. package/.aodw-next/02-workflow/environment-roles.md +106 -0
  7. package/.aodw-next/02-workflow/orca-multi-session.md +4 -4
  8. package/.aodw-next/02-workflow/rt-manager.md +64 -0
  9. package/.aodw-next/02-workflow/shared-verification-host.md +103 -0
  10. package/.aodw-next/02-workflow/sub-agent-driven-profile.md +2 -1
  11. package/.aodw-next/04-auditors/aodw-development-auditor-rules.md +2 -6
  12. package/.aodw-next/04-auditors/aodw-full-auditor-rules.md +2 -6
  13. package/.aodw-next/README.md +168 -7
  14. package/.aodw-next/SKILL.md +4 -1
  15. package/.aodw-next/manifest.yaml +19 -1
  16. package/.aodw-next/templates/environments.template.md +54 -0
  17. package/.aodw-next/templates/lessons.template.md +7 -0
  18. package/.aodw-next/templates/orca-handoff-template.md +2 -1
  19. package/.aodw-next/templates/release/checklist.template.md +29 -0
  20. package/.aodw-next/templates/release/notes.template.md +22 -0
  21. package/.aodw-next/templates/release/plan.template.md +15 -0
  22. package/.aodw-next/templates/release/retro-index.template.md +8 -0
  23. package/.aodw-next/templates/release/retro-topic.template.md +33 -0
  24. package/.aodw-next/templates/rt-lite.template.md +1 -0
  25. package/.aodw-next/templates/shared-verification-host-profile.template.md +50 -0
  26. package/.aodw-next/tools/rel-plan.mjs +203 -0
  27. package/AODW_Adapters/README.md +22 -126
  28. package/AODW_Adapters/agents/AGENTS.md +11 -0
  29. package/AODW_Adapters/antigravity/.agent/rules/aodw-next.md +2 -72
  30. package/AODW_Adapters/claude/CLAUDE.md +2 -72
  31. package/AODW_Adapters/copilot/.github/copilot-instructions.md +3 -0
  32. package/AODW_Adapters/cursor/.cursor/rules/aodw-next.mdc +3 -75
  33. package/AODW_Adapters/openclaw/SKILL.md +3 -106
  34. package/README.md +60 -22
  35. package/bin/aodw.js +351 -333
  36. package/bin/commands/update.js +387 -0
  37. package/bin/commands/verify.js +420 -0
  38. package/bin/utils/lock.js +343 -0
  39. package/bin/utils/path-guard.js +449 -0
  40. package/bin/utils/release.js +36 -0
  41. package/bin/utils/tool-entries.js +506 -0
  42. package/package.json +8 -2
  43. package/.aodw-next/templates/aodw-kernel-loader-template.md +0 -71
  44. package/AODW_Adapters/cursor/.cursor/commands/README.md +0 -37
  45. package/AODW_Adapters/cursor/.cursor/rules/aodw-autopilot-continue.mdc +0 -42
  46. package/AODW_Adapters/openclaw/AGENTS.md +0 -142
  47. package/bin/processors/index.js +0 -98
  48. package/bin/update-adapters-from-template.js +0 -76
@@ -1,42 +0,0 @@
1
- ---
2
- description: Autopilot+GRV 续跑——CONTINUE 立即下一 V,禁止停问是否继续
3
- alwaysApply: true
4
- ---
5
-
6
- # Autopilot + GRV 续跑硬规则
7
-
8
- 当当前 RT 的 `meta.yaml` 含 `autopilot: true`,且 `rt-lite.md` §1.5 **G/R/V 已用户确认**(`grv_user_confirmed: true` 或 §1.5 明确「已确认」)时,本规则**覆盖**协同门禁里「每步先问用户」的停顿习惯。
9
-
10
- ## 必须立刻续跑(禁止停问)
11
-
12
- 本轮输出含 **`CONTINUE`**(或用户/脚本刚写入 `.last-signal=CONTINUE`)时:
13
-
14
- 1. **禁止**问「要不要继续 / 要不要做下一 V / 要不要提交」
15
- 2. **立即**执行:
16
- ```bash
17
- bash .aodw-next/tools/rt-grv-continue.sh --rt <RT-ID> --signal CONTINUE
18
- ```
19
- 3. 按脚本打印的「外层续跑指令」读下一未勾选 V + `loop-prompt.md`,开下一轮
20
- 4. 一轮只做一个 V;验收通过再更新 `rt-plan` / `state.json` / `execution-log`
21
- 5. 本轮结束必须再输出 **CONTINUE** / **DONE** / **blocked** 三选一,并再次调用 `rt-grv-continue.sh --signal …`
22
-
23
- ## 必须停(允许且应当交还用户)
24
-
25
- - 输出 **`DONE`**:收口摘要后停止
26
- - 输出 **`blocked`** 或触发 §9.6 熔断:只给 A/B/C/D,禁止静默改 GRV 继续做
27
- - `iteration >= max_iterations`:脚本会改为 `blocked`
28
-
29
- ## 与协同门禁的关系
30
-
31
- | 场景 | 行为 |
32
- |------|------|
33
- | Autopilot + GRV 已确认 + implementing | 实现/验收/续跑**不问**;用 CONTINUE 驱动 |
34
- | Autopilot 但 GRV 未确认 | **禁止**写业务代码;先共写 §1.5 |
35
- | 非 Autopilot | 仍走协同门禁(方案确认、提交确认等) |
36
- | blocked / DONE | 必须交还用户 |
37
-
38
- ## 信号语义(与 loop-prompt / goal-spec 一致)
39
-
40
- - **CONTINUE**:还有未勾选 V,或本 V 未过验收需再一轮(同 V 重试也算 CONTINUE)
41
- - **DONE**:全部 V 勾选且对应 R 验收通过
42
- - **blocked**:契约失效、熔断、达上限、或无法在不改 GRV 下继续
@@ -1,142 +0,0 @@
1
- ---
2
- name: aodw-agents
3
- version: "{VERSION}"
4
- description: AODW 项目级 Agent 指引。说明规范目录结构与开发流程。
5
- ---
6
-
7
- # AODW-Next 项目级 Agent 指引
8
-
9
- 本文档为 OpenClaw 平台上的 AI Agent 提供项目级的工作指引。
10
-
11
- ## 1. 规范目录结构
12
-
13
- AODW 规范文件位于项目根目录下的 `.aodw-next/` 目录中:
14
-
15
- ```
16
- .aodw-next/
17
- ├── manifest.yaml # 规则索引与元数据(渐进式加载)
18
- ├── 01-core/ # 核心宪章(最高优先级)
19
- │ ├── aodw-constitution.md # 主宪章(必须首先读取)
20
- │ ├── ai-interaction-rules.md # AI 交互规则
21
- │ ├── ai-knowledge-rules.md # 知识管理规则
22
- │ ├── csf-thinking-framework.md # CSF 思维框架
23
- │ └── ...
24
- ├── 02-workflow/ # 工作流程
25
- │ ├── rt-manager.md # RT 生命周期管理
26
- │ ├── spec-full-profile.md # 完整 Spec 档案
27
- │ ├── spec-lite-profile.md # 简化 Spec 档案
28
- │ └── ...
29
- ├── 03-standards/ # 编码标准
30
- │ ├── ai-coding-rules.md # AI 编码规则
31
- │ └── ...
32
- ├── 04-auditors/ # 审计官
33
- │ ├── aodw-requirement-auditor-rules.md
34
- │ ├── aodw-development-auditor-rules.md
35
- │ └── aodw-full-auditor-rules.md
36
- ├── 05-tooling/ # 工具初始化
37
- │ └── ai-tools-init-rules.md
38
- └── 06-project/ # 项目特化文件(用户生成)
39
- ├── ai-overview.md # 项目概览(技术栈、架构)
40
- ├── modules-index.yaml # 模块索引
41
- └── tools-status.yaml # 工具状态
42
- ```
43
-
44
- ## 2. 规则索引系统
45
-
46
- 所有规则的元数据定义在 `manifest.yaml` 中。每个规则文件包含:
47
- - `summary_preferred`: 是否使用摘要模式
48
- - `load_when`: 加载时机标签
49
- - `priority`: 优先级(critical/high/medium)
50
- - `size_kb`: 文件大小(token 优化)
51
-
52
- Agent 应根据当前任务阶段,从 manifest 中查询需要加载的规则文件。
53
-
54
- ## 3. 开发流程概览
55
-
56
- AODW 定义了文档驱动的开发流程:
57
-
58
- ### 3.1 创建 RT (Request Ticket)
59
- - 命令:`npx aodw-skill new`
60
- - 生成 RT-ID(如 `RT-20250123-001`)
61
- - 创建 feature 分支
62
- - 执行 Intake 流程(需求澄清)
63
-
64
- ### 3.2 决策模式
65
- - **Spec-Full**: 完整规范流程(复杂功能)
66
- - **Spec-Lite**: 简化规范流程(小改动)
67
- - **Spec-Lite Autopilot**: 在 `rt-lite.md` 外还必须具备 7 件套:`meta.yaml`、`rt-plan.md`、`state.json`、`loop-prompt.md`、`execution-log.md`、`autopilot-preflight.md`
68
- - **Autopilot 续跑**: GRV 已确认后,轮末输出 `CONTINUE`/`DONE`/`blocked` 并执行 `bash .aodw-next/tools/rt-grv-continue.sh --rt <RT-ID> --signal …`;exit 0 则立即下一 V,禁止问「要不要继续」
69
-
70
- ### 3.3 分析阶段
71
- - 影响分析 (impact.md)
72
- - 不变量检查 (invariants.md)
73
- - 技术方案设计
74
-
75
- ### 3.4 实现阶段
76
- - 代码实现
77
- - 测试编写
78
- - 模块文档更新
79
-
80
- ### 3.5 验证阶段
81
- - 文档与代码一致性检查
82
- - RT 完整性验证
83
-
84
- ### 3.6 完成阶段
85
- - 合并分支
86
- - 知识蒸馏
87
- - 更新 RT 状态
88
-
89
- ## 4. 核心检查点
90
-
91
- ### 4.1 分支管理
92
- - 所有代码修改必须在 feature 分支进行
93
- - 严禁在 main/master 分支直接修改
94
-
95
- ### 4.2 Plan 批准
96
- - Plan 完成后必须执行 CSF 审查
97
- - 未获批准前不得开始修改代码
98
-
99
- ### 4.3 提交确认
100
- - 代码完成后展示 git status 和 diff
101
- - 询问用户确认后再提交
102
-
103
- ## 5. Agent 行为准则
104
-
105
- ### 5.1 语言要求
106
- - 使用中文进行所有交互和文档编写
107
-
108
- ### 5.2 上下文加载
109
- - 必须首先读取 `.aodw-next/01-core/aodw-constitution.md`
110
- - 根据任务阶段按需加载其他规则
111
- - 遵循 token 优化原则
112
-
113
- ### 5.3 质量标准
114
- - 遵循编码规范(见 `03-standards/`)
115
- - 执行相应的审计流程(见 `04-auditors/`)
116
- - 保持文档与代码同步
117
-
118
- ## 6. 常用命令参考
119
-
120
- ```bash
121
- # 初始化项目
122
- npx aodw-skill init
123
-
124
- # 创建新 RT
125
- npx aodw-skill new
126
-
127
- # 初始化开发工具
128
- npx aodw-skill init-tools
129
-
130
- # 更新 AODW
131
- npx aodw-skill update
132
-
133
- # 启用 guard hook
134
- npx aodw-skill enable-guard-hook
135
- ```
136
-
137
- ## 7. 获取帮助
138
-
139
- - 项目概览:`.aodw-next/06-project/ai-overview.md`
140
- - 模块索引:`.aodw-next/06-project/modules-index.yaml`
141
- - 主宪章:`.aodw-next/01-core/aodw-constitution.md`
142
- - 规则索引:`.aodw-next/manifest.yaml`
@@ -1,98 +0,0 @@
1
- import fs from 'fs-extra';
2
- import path from 'path';
3
- import os from 'os';
4
-
5
- export class BaseProcessor {
6
- constructor(sourcePath, targetPath) {
7
- this.sourcePath = sourcePath;
8
- this.targetPath = targetPath;
9
- }
10
-
11
- async process() {
12
- const content = await fs.readFile(this.sourcePath, 'utf8');
13
- const processed = this.transform(content);
14
- await fs.ensureDir(path.dirname(this.targetPath));
15
- await fs.writeFile(this.targetPath, processed, 'utf8');
16
- }
17
-
18
- transform(content) {
19
- return content;
20
- }
21
-
22
- // Helper to inject or replace frontmatter
23
- injectFrontmatter(content, key, value) {
24
- const frontmatterRegex = /^---\n([\s\S]*?)\n---/;
25
- const match = content.match(frontmatterRegex);
26
-
27
- if (match) {
28
- let fm = match[1];
29
- if (!fm.includes(`${key}:`)) {
30
- fm += `\n${key}: ${value}`;
31
- return content.replace(frontmatterRegex, `---\n${fm}\n---`);
32
- }
33
- return content; // Key already exists, don't overwrite
34
- } else {
35
- return `---\n${key}: ${value}\n---\n\n${content}`;
36
- }
37
- }
38
- }
39
-
40
- export class AntigravityProcessor extends BaseProcessor {
41
- transform(content) {
42
- // Replace template placeholders
43
- let processed = content.replace(/\{\{REF_PREFIX\}\}/g, '');
44
- // Replace AODW_DIR placeholder (Next version - fixed to .aodw-next)
45
- processed = processed.replace(/\{\{AODW_DIR\}\}/g, '.aodw-next');
46
-
47
- // For Rules: Inject trigger: always_on (for kernel loader)
48
- if (this.targetPath.includes('.agent/rules') && /aodw(-next)?\.md$/.test(this.targetPath)) {
49
- processed = this.injectFrontmatter(processed, 'trigger', 'always_on');
50
- } else if (this.targetPath.includes('.agent/rules')) {
51
- // For other rules: Inject trigger: model_decision
52
- processed = this.injectFrontmatter(processed, 'trigger', 'model_decision');
53
- }
54
- return processed;
55
- }
56
- }
57
-
58
- export class CursorProcessor extends BaseProcessor {
59
- transform(content) {
60
- // Replace template placeholders: @ for Cursor
61
- let processed = content.replace(/\{\{REF_PREFIX\}\}/g, '@');
62
- // Replace AODW_DIR placeholder (Next version - fixed to .aodw-next)
63
- processed = processed.replace(/\{\{AODW_DIR\}\}/g, '.aodw-next');
64
-
65
- // For Rules (.mdc): Inject globs and alwaysApply
66
- if (this.targetPath.endsWith('.mdc')) {
67
- processed = this.injectFrontmatter(processed, 'globs', '*');
68
- processed = this.injectFrontmatter(processed, 'alwaysApply', 'true');
69
- processed = this.injectFrontmatter(processed, 'description', 'AI 编排开发工作流 (AODW) — Kernel Loader');
70
- processed = this.injectFrontmatter(processed, 'tags', 'aodw, kernel');
71
- }
72
- return processed;
73
- }
74
- }
75
-
76
- export class ClaudeProcessor extends BaseProcessor {
77
- transform(content) {
78
- // Replace template placeholders: empty for Claude
79
- let processed = content.replace(/\{\{REF_PREFIX\}\}/g, '');
80
- // Replace AODW_DIR placeholder (Next version - fixed to .aodw-next)
81
- processed = processed.replace(/\{\{AODW_DIR\}\}/g, '.aodw-next');
82
- // Claude uses standard markdown, no frontmatter needed
83
- return processed;
84
- }
85
- }
86
-
87
- export class OpenClawProcessor extends BaseProcessor {
88
- transform(content) {
89
- // Replace template placeholders: empty for OpenClaw
90
- let processed = content.replace(/\{\{REF_PREFIX\}\}/g, '');
91
- // Replace AODW_DIR placeholder (Next version - fixed to .aodw-next)
92
- processed = processed.replace(/\{\{AODW_DIR\}\}/g, '.aodw-next');
93
- // Replace VERSION placeholder with actual version
94
- processed = processed.replace(/\{VERSION\}/g, '0.7.27');
95
- // OpenClaw uses YAML frontmatter + markdown
96
- return processed;
97
- }
98
- }
@@ -1,76 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * 从模板更新适配器文件 (AODW Next 版本)
5
- *
6
- * 这个脚本用于从统一模板 `templates/.aodw-next/templates/aodw-kernel-loader-template.md`
7
- * 生成各个平台的适配器文件到 `templates/AODW_Adapters/` 目录
8
- *
9
- * 使用方法:
10
- * node cli/bin/update-adapters-from-template.js
11
- */
12
-
13
- import fs from 'fs-extra';
14
- import path from 'path';
15
- import { fileURLToPath } from 'url';
16
- import {
17
- AntigravityProcessor,
18
- CursorProcessor,
19
- ClaudeProcessor
20
- } from './processors/index.js';
21
-
22
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
23
- const ROOT_DIR = path.join(__dirname, '../..');
24
-
25
- // 模板路径 (Next 版本)
26
- const SOURCE_TEMPLATE = path.join(ROOT_DIR, 'templates/.aodw-next/templates/aodw-kernel-loader-template.md');
27
-
28
- // 目标适配器路径
29
- const TARGET_ADAPTERS = path.join(ROOT_DIR, 'templates/AODW_Adapters');
30
-
31
- // 安装文件(使用 Processor)
32
- async function installFile(source, target, processorClass) {
33
- const processor = new processorClass(source, target);
34
- await processor.process();
35
- console.log(` ✓ Generated: ${path.relative(ROOT_DIR, target)}`);
36
- }
37
-
38
- async function updateAdapters() {
39
- console.log('🔄 Updating adapters from template (AODW Next)...\n');
40
-
41
- // 检查模板是否存在
42
- if (!fs.existsSync(SOURCE_TEMPLATE)) {
43
- console.error(`❌ Template not found: ${SOURCE_TEMPLATE}`);
44
- process.exit(1);
45
- }
46
-
47
- console.log(`📄 Source template: ${path.relative(ROOT_DIR, SOURCE_TEMPLATE)}\n`);
48
-
49
- // Antigravity
50
- console.log('📦 Updating Antigravity adapter...');
51
- const antigravityTarget = path.join(TARGET_ADAPTERS, 'antigravity/.agent/rules/aodw-next.md');
52
- await fs.ensureDir(path.dirname(antigravityTarget));
53
- await installFile(SOURCE_TEMPLATE, antigravityTarget, AntigravityProcessor);
54
-
55
- // Cursor
56
- console.log('\n📦 Updating Cursor adapter...');
57
- const cursorTarget = path.join(TARGET_ADAPTERS, 'cursor/.cursor/rules/aodw-next.mdc');
58
- await fs.ensureDir(path.dirname(cursorTarget));
59
- await installFile(SOURCE_TEMPLATE, cursorTarget, CursorProcessor);
60
-
61
- // Claude
62
- console.log('\n📦 Updating Claude adapter...');
63
- const claudeTarget = path.join(TARGET_ADAPTERS, 'claude/CLAUDE.md');
64
- await fs.ensureDir(path.dirname(claudeTarget));
65
- await installFile(SOURCE_TEMPLATE, claudeTarget, ClaudeProcessor);
66
-
67
- console.log('\n✅ All adapters updated successfully!');
68
- console.log('\n📝 Note: These files are fallback files for CLI installation.');
69
- console.log(' CLI will use the template directly if available.');
70
- console.log(' AODW Next version uses: .aodw-next/');
71
- }
72
-
73
- updateAdapters().catch(err => {
74
- console.error('❌ Error:', err);
75
- process.exit(1);
76
- });