@andyqiu/codeforge 0.3.11 → 0.3.12
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/README.md +45 -3
- package/agents/codeforge.md +5 -4
- package/agents/coder-deep.md +3 -0
- package/agents/coder-quick.md +3 -0
- package/agents/coder.md +3 -0
- package/agents/planner.md +12 -8
- package/agents/reviewer.md +3 -0
- package/assets/adr-init/.github/pull_request_template.md +22 -0
- package/assets/adr-init/docs/adr/README.md +105 -0
- package/assets/adr-init/docs/adr/template.md +83 -0
- package/assets/adr-init/githooks/pre-commit.sh +46 -0
- package/assets/adr-init/githooks/pre-push.sh +23 -0
- package/assets/adr-init/scripts/adr-check.mjs +428 -0
- package/assets/adr-init/scripts/adr-index-sync.mjs +151 -0
- package/bin/codeforge.mjs +96 -3
- package/commands/adr-init.md +67 -0
- package/dist/adr-init.js +207 -0
- package/dist/index.js +1691 -580
- package/package.json +16 -5
- package/scripts/sync-agent-models.mjs +1 -1
- package/workflows/bugfix.yaml +3 -3
- package/workflows/feature-dev.yaml +3 -3
- package/workflows/parallel-explore.yaml +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andyqiu/codeforge",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "CodeForge — opencode 的零侵入扩展包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -57,16 +57,23 @@
|
|
|
57
57
|
"adr-check:strict": "cross-env ADR_STRICT=1 node ./scripts/adr-check.mjs",
|
|
58
58
|
"adr-index-sync": "node ./scripts/adr-index-sync.mjs",
|
|
59
59
|
"adr-index-check": "node ./scripts/adr-index-sync.mjs --check",
|
|
60
|
+
"adr-graph": "node ./scripts/adr-graph-gen.mjs",
|
|
61
|
+
"adr-graph-check": "node ./scripts/adr-graph-gen.mjs --check",
|
|
62
|
+
"adr-init": "node ./bin/codeforge.mjs adr-init",
|
|
60
63
|
"phases:all": "npm run phase0:check && npm run phase1:check && npm run phase15:check && npm run phase2:check && npm run phase3:check && npm run phase4:check",
|
|
61
64
|
"sync:models": "node ./scripts/sync-agent-models.mjs",
|
|
62
65
|
"sync:models:check": "node ./scripts/sync-agent-models.mjs --check",
|
|
63
66
|
"replay": "node ./scripts/codeforge-replay.mjs",
|
|
64
67
|
"release": "node ./scripts/release.mjs",
|
|
65
68
|
"release:dry": "node ./scripts/release.mjs --dry-run",
|
|
66
|
-
"publish:patch": "
|
|
67
|
-
"publish:minor": "
|
|
68
|
-
"publish:major": "
|
|
69
|
-
"publish:dry": "
|
|
69
|
+
"publish:patch": "bash ./scripts/publish.sh patch",
|
|
70
|
+
"publish:minor": "bash ./scripts/publish.sh minor",
|
|
71
|
+
"publish:major": "bash ./scripts/publish.sh major",
|
|
72
|
+
"publish:dry": "bash ./scripts/publish.sh --dry-run",
|
|
73
|
+
"publish:win:patch": "powershell -NoProfile -ExecutionPolicy Bypass -File ./scripts/publish.ps1",
|
|
74
|
+
"publish:win:minor": "powershell -NoProfile -ExecutionPolicy Bypass -File ./scripts/publish.ps1 -Minor",
|
|
75
|
+
"publish:win:major": "powershell -NoProfile -ExecutionPolicy Bypass -File ./scripts/publish.ps1 -Major",
|
|
76
|
+
"publish:win:dry": "powershell -NoProfile -ExecutionPolicy Bypass -File ./scripts/publish.ps1 -DryRun",
|
|
70
77
|
"prepublishOnly": "npm run build && npm run typecheck && npm test",
|
|
71
78
|
"prepare": "husky"
|
|
72
79
|
},
|
|
@@ -83,6 +90,7 @@
|
|
|
83
90
|
"@opencode-ai/sdk": "^1.15.0",
|
|
84
91
|
"@types/node": "^22.0.0",
|
|
85
92
|
"@vitest/coverage-v8": "^2.1.0",
|
|
93
|
+
"cross-env": "^10.1.0",
|
|
86
94
|
"husky": "^9.1.7",
|
|
87
95
|
"typescript": "^5.6.0",
|
|
88
96
|
"vitest": "^2.1.0"
|
|
@@ -98,7 +106,10 @@
|
|
|
98
106
|
"files": [
|
|
99
107
|
"dist/index.js",
|
|
100
108
|
"dist/index.d.ts",
|
|
109
|
+
"dist/adr-init.js",
|
|
110
|
+
"dist/adr-init.d.ts",
|
|
101
111
|
"agents/",
|
|
112
|
+
"assets/",
|
|
102
113
|
"bin/",
|
|
103
114
|
"commands/",
|
|
104
115
|
"workflows/",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* 设计原则:保留 frontmatter 中其他字段不动,仅替换目标 key。
|
|
16
16
|
*
|
|
17
17
|
* 关于 tier:
|
|
18
|
-
* - tier 是 ADR-
|
|
18
|
+
* - tier 是 ADR:model-tier-three-layer-escalation 模型难度分级字段(quick / balanced / deep / ultra)
|
|
19
19
|
* - 变体 agent(名字含 -quick / -deep / -ultra 后缀)不在 codeforge.json 的 agents 里,
|
|
20
20
|
* 本脚本只同步 base agent;变体由人工维护或后续 sync 脚本扩展生成。
|
|
21
21
|
* - 当 codeforge.json 未声明 tier 时,保留 .md 中现有 tier 值(不删),
|
package/workflows/bugfix.yaml
CHANGED
|
@@ -19,7 +19,7 @@ description: |
|
|
|
19
19
|
7. reviewer 沉淀 bugfix 经验回 KH
|
|
20
20
|
|
|
21
21
|
trigger: /debug
|
|
22
|
-
# ADR-
|
|
22
|
+
# ADR:workflow-on-decision-branching — 跨 step 反馈循环上限
|
|
23
23
|
max_loops: 3
|
|
24
24
|
|
|
25
25
|
steps:
|
|
@@ -61,7 +61,7 @@ steps:
|
|
|
61
61
|
description: 按 planner 选定的根因假设改代码,让复现测试变绿
|
|
62
62
|
inject_context:
|
|
63
63
|
forbid_direct_edit: true
|
|
64
|
-
# ADR-
|
|
64
|
+
# ADR:workflow-auto-feedback-loop: 完成 stage 后自动跑 npm test 自纠
|
|
65
65
|
# bugfix 失败本质是假设错——escalate 给 planner 重出根因假设,而不是 reviewer
|
|
66
66
|
auto_feedback:
|
|
67
67
|
test_cmd: "npm test"
|
|
@@ -79,7 +79,7 @@ steps:
|
|
|
79
79
|
args:
|
|
80
80
|
action: list
|
|
81
81
|
status: pending
|
|
82
|
-
# ADR-
|
|
82
|
+
# ADR:workflow-on-decision-branching: 三档决策驱动;BLOCK 回 planner 重出根因假设(与 auto_feedback escalate_to=planner 同语义)
|
|
83
83
|
on_decision:
|
|
84
84
|
APPROVE: continue # 进入"落地" step
|
|
85
85
|
REQUEST_CHANGES:
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# ──────────────────────────────────────────────────────────────
|
|
8
8
|
|
|
9
9
|
name: feature-dev
|
|
10
|
-
# ADR-
|
|
10
|
+
# ADR:workflow-on-decision-branching — 跨 step 反馈循环上限(reviewer→coder REQUEST_CHANGES 反复 goto 兜底)
|
|
11
11
|
max_loops: 3
|
|
12
12
|
version: 1.0.0
|
|
13
13
|
description: |
|
|
@@ -41,7 +41,7 @@ steps:
|
|
|
41
41
|
description: 严格按方案 stage 改动;测试失败立刻停下汇报
|
|
42
42
|
inject_context:
|
|
43
43
|
forbid_direct_edit: true
|
|
44
|
-
# ADR-
|
|
44
|
+
# ADR:workflow-auto-feedback-loop: 完成 stage 后自动跑 npm test 自纠(最多 3 轮,失败 escalate reviewer)
|
|
45
45
|
auto_feedback:
|
|
46
46
|
test_cmd: "npm test"
|
|
47
47
|
max_retries: 3
|
|
@@ -60,7 +60,7 @@ steps:
|
|
|
60
60
|
args:
|
|
61
61
|
action: list
|
|
62
62
|
status: pending
|
|
63
|
-
# ADR-
|
|
63
|
+
# ADR:workflow-on-decision-branching: 三档决策驱动 workflow 跳转
|
|
64
64
|
on_decision:
|
|
65
65
|
APPROVE: continue # 进入"落地" step
|
|
66
66
|
REQUEST_CHANGES:
|