agentic-flow-kit 0.4.0 → 0.6.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/README.md +3 -0
- package/modules/gates/dotnet-ca/check-architecture.sh +23 -5
- package/modules/hosts/omp/agents/implementer.md +47 -6
- package/modules/hosts/omp/agents/independent-reviewer.md +44 -5
- package/modules/hosts/omp/agents/ui-verifier.md +43 -6
- package/modules/hosts/opencode/agents/implementer.md +47 -1
- package/modules/hosts/opencode/agents/independent-reviewer.md +44 -1
- package/modules/hosts/opencode/agents/ui-verifier.md +43 -1
- package/modules/hosts/opencode/commands/build.md +74 -7
- package/modules/hosts/opencode/commands/deploy.md +51 -6
- package/modules/hosts/opencode/commands/design.md +36 -6
- package/modules/hosts/opencode/commands/gate-checklist.md +77 -0
- package/modules/hosts/opencode/commands/maintain.md +70 -6
- package/modules/hosts/opencode/commands/new-task.md +59 -6
- package/modules/hosts/opencode/commands/plan.md +35 -6
- package/modules/hosts/opencode/commands/review.md +41 -6
- package/modules/hosts/opencode/commands/source-sync-check.md +89 -0
- package/modules/hosts/opencode/commands/sync-hosts.md +66 -0
- package/modules/hosts/opencode/commands/test.md +58 -8
- package/modules/hosts/trae/agents/implementer.md +46 -2
- package/modules/hosts/trae/agents/independent-reviewer.md +44 -1
- package/modules/hosts/trae/agents/ui-verifier.md +41 -3
- package/modules/hosts/trae/commands/wf-build.md +74 -7
- package/modules/hosts/trae/commands/wf-deploy.md +51 -6
- package/modules/hosts/trae/commands/wf-design.md +36 -6
- package/modules/hosts/trae/commands/wf-gate-checklist.md +78 -0
- package/modules/hosts/trae/commands/wf-maintain.md +70 -6
- package/modules/hosts/trae/commands/wf-new-task.md +59 -6
- package/modules/hosts/trae/commands/wf-plan.md +35 -6
- package/modules/hosts/trae/commands/wf-review.md +41 -6
- package/modules/hosts/trae/commands/wf-source-sync-check.md +90 -0
- package/modules/hosts/trae/commands/wf-sync-hosts.md +67 -0
- package/modules/hosts/trae/commands/wf-test.md +58 -7
- package/modules/hosts/trae/hooks/post-edit-check.cjs +3 -2
- package/modules/hosts/trae/hooks/pre-shell-check.cjs +40 -9
- package/modules/hosts/trae/hooks.json +1 -1
- package/modules/hosts/zcode/agents/implementer.md +47 -6
- package/modules/hosts/zcode/agents/independent-reviewer.md +44 -5
- package/modules/hosts/zcode/agents/ui-verifier.md +43 -5
- package/package.json +6 -3
- package/src/add-gate.mjs +5 -3
- package/src/cli.mjs +15 -2
- package/src/doctor.mjs +245 -15
- package/src/gate-dotnet-ca.test.mjs +124 -0
- package/src/init.mjs +79 -17
- package/src/init.test.mjs +84 -2
- package/src/pack.test.mjs +24 -0
- package/src/render.mjs +64 -4
- package/src/run-tests.mjs +7 -11
- package/src/sync-hosts.mjs +194 -0
- package/src/sync-hosts.test.mjs +170 -0
- package/src/sync.mjs +65 -20
- package/src/sync.test.mjs +52 -0
- package/src/trae-hooks.test.mjs +115 -0
- package/templates/AGENTS.md +2 -1
- package/templates/_agents/board/index.html +32 -3
- package/templates/_agents/commands/build.md +22 -1
- package/templates/_agents/commands/design.md +2 -0
- package/templates/_agents/commands/gate-checklist.md +91 -0
- package/templates/_agents/commands/maintain.md +2 -3
- package/templates/_agents/commands/plan.md +4 -1
- package/templates/_agents/commands/review.md +1 -0
- package/templates/_agents/commands/source-sync-check.md +103 -0
- package/templates/_agents/commands/sync-hosts.md +79 -0
- package/templates/_agents/commands/test.md +4 -2
- package/templates/_agents/hooks/check-pairing-incremental.sh +20 -7
- package/templates/_agents/notes/runtime-env.md +1 -1
- package/templates/_agents/roles/implementer.md +2 -0
- package/templates/_agents/roles/independent-reviewer.md +2 -0
- package/templates/_agents/roles/ui-verifier.md +2 -0
- package/templates/_agents/rule-budgets.txt +1 -1
- package/templates/_agents/scripts/agg-delegations.cjs +39 -30
- package/templates/_agents/scripts/agg-delegations.test.mjs +32 -0
- package/templates/_agents/scripts/check-loop.mjs +763 -0
- package/templates/_agents/scripts/check-loop.sh +5 -808
- package/templates/_agents/scripts/check-loop.test.mjs +1102 -0
- package/templates/_agents/scripts/confirm-doc.mjs +228 -0
- package/templates/_agents/scripts/confirm-doc.test.mjs +321 -0
- package/templates/_agents/scripts/doctor.test.mjs +371 -0
- package/templates/_agents/scripts/ensure-board.mjs +30 -3
- package/templates/_agents/scripts/fill-intent.mjs +59 -0
- package/templates/_agents/scripts/fill-intent.test.mjs +73 -0
- package/templates/_agents/scripts/fill-plan.mjs +60 -0
- package/templates/_agents/scripts/fill-plan.test.mjs +67 -0
- package/templates/_agents/scripts/fill-spec.mjs +52 -0
- package/templates/_agents/scripts/fill-spec.test.mjs +61 -0
- package/templates/_agents/scripts/gate-checklist.mjs +194 -0
- package/templates/_agents/scripts/gate-checklist.test.mjs +204 -0
- package/templates/_agents/scripts/gen-wiki-board.mjs +38 -24
- package/templates/_agents/scripts/gen-wiki-board.test.mjs +18 -0
- package/templates/_agents/scripts/gen-workflow-index.mjs +4 -2
- package/templates/_agents/scripts/gen-workflow-metrics.mjs +12 -3
- package/templates/_agents/scripts/kb-search.mjs +25 -9
- package/templates/_agents/scripts/kb-search.test.mjs +38 -8
- package/templates/_agents/scripts/source-sync-check.mjs +145 -0
- package/templates/_agents/scripts/source-sync-check.test.mjs +244 -0
- package/templates/_agents/scripts/verify-wiki-consistency.mjs +46 -23
- package/templates/_agents/scripts/verify.mjs +8 -10
- package/templates/_agents/scripts/verify.test.mjs +13 -1
- package/templates/_agents/scripts/wf-journal.mjs +158 -0
- package/templates/_agents/scripts/wf-journal.test.mjs +150 -0
- package/templates/_agents/scripts/workflow-board-server.mjs +73 -17
- package/templates/_agents/scripts/workflow-board-server.test.mjs +136 -0
- package/templates/_agents/scripts/workflow-enums.mjs +70 -0
- package/templates/_agents/scripts/workflow-enums.test.mjs +110 -0
- package/templates/_agents/scripts/workflows-check.mjs +260 -0
- package/templates/_agents/scripts/workflows-check.test.mjs +267 -0
- package/templates/_agents/workflow-enums.txt +19 -0
- package/templates/_agents/workflows/_TEMPLATE.md +75 -0
- package/templates/_agents/workflows/pipeline-closing.md +29 -0
- package/templates/_agents/workflows/source-sync-repair.md +30 -0
- package/templates/_agents/workflows/steps//347/244/272/344/276/213-/351/203/250/347/275/262/351/252/214/350/257/201.md +10 -0
- package/templates/_agents/workflows//347/244/272/344/276/213-/345/271/266/350/241/214/345/256/236/347/216/260/350/257/204/345/256/241.md +16 -0
- package/templates/_githooks/pre-commit +16 -1
- package/templates/workflow/README.md +1 -1
- package/templates/_agents/cache/kb-index.json +0 -1
- package/templates/_agents/scripts/check-loop.test.sh +0 -1042
|
@@ -87,6 +87,38 @@ const runAgg = (root) => spawnSync(process.execPath, [path.join(root, '.agents',
|
|
|
87
87
|
fs.rmSync(root, { recursive: true, force: true });
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
// ---- 场景 4-5:扩容门口径(2026-09-27 board-kb-p1 对齐 delegations.md:返工 0 / 无主兜底 / 连续两月)----
|
|
91
|
+
// 纯函数经 module.exports require(isMain 守卫后 import 不执行 main)
|
|
92
|
+
import { createRequire } from 'node:module';
|
|
93
|
+
const requireCjs = createRequire(import.meta.url);
|
|
94
|
+
const { metrics, gateMonth, expansionVerdict } = requireCjs(path.join(SCRIPT_DIR, 'agg-delegations.cjs'));
|
|
95
|
+
|
|
96
|
+
// 场景 4:审查反例——30 任务、2 主兜底、平均返工 0.25(旧口径四门全过,声明口径下必须 ❌)
|
|
97
|
+
{
|
|
98
|
+
const rows = [
|
|
99
|
+
...Array.from({ length: 22 }, (_, i) => ({ scope: '委派', result: '一次通过' })),
|
|
100
|
+
...Array.from({ length: 6 }, (_, i) => ({ scope: '委派', result: '返工×1' })),
|
|
101
|
+
{ scope: '委派', result: '主兜底' }, { scope: '委派', result: '主兜底' },
|
|
102
|
+
];
|
|
103
|
+
const m = metrics(rows);
|
|
104
|
+
const g = gateMonth(m);
|
|
105
|
+
check('场景 4:反例(2 主兜底 + 平均返工 0.25)门3 返工=0 ❌', g.items.find((i) => i.no === 3).ok === false, JSON.stringify(g.items));
|
|
106
|
+
check('场景 4:反例门4 主兜底=0 ❌ 且 monthOk=false(声明口径下不达标)',
|
|
107
|
+
g.items.find((i) => i.no === 4).ok === false && g.monthOk === false, `monthOk=${g.monthOk}`);
|
|
108
|
+
const good = metrics([{ scope: '自做', result: '一次通过' }, { scope: '委派', result: '一次通过' }]);
|
|
109
|
+
const g2 = gateMonth(good);
|
|
110
|
+
check('场景 4:返工 0 + 无主兜底月 → 口径项全 ✅(样本护栏项单独列出)',
|
|
111
|
+
g2.items.filter((i) => i.kind === '口径').every((i) => i.ok === true) && g2.items.find((i) => i.no === 1).ok === false,
|
|
112
|
+
JSON.stringify(g2.items));
|
|
113
|
+
}
|
|
114
|
+
// 场景 5:连续两月判定四态
|
|
115
|
+
{
|
|
116
|
+
check('场景 5:本月+上月均达标 → ✅ 可扩容', expansionVerdict(true, true, false, []).includes('✅'));
|
|
117
|
+
check('场景 5:本月达标、上月无数据 → ⚠️ 1/2', expansionVerdict(true, undefined, true, []).includes('⚠️'));
|
|
118
|
+
check('场景 5:本月达标、上月未达标 → ⚠️ 1/2', expansionVerdict(true, false, false, []).includes('⚠️'));
|
|
119
|
+
check('场景 5:本月未达标 → ❌ 且列出未达标项号', expansionVerdict(false, true, false, [{ no: 3, ok: false }, { no: 4, ok: false }]).match(/❌.*3\+4/));
|
|
120
|
+
}
|
|
121
|
+
|
|
90
122
|
console.log(`\n合计: PASS ${pass} / FAIL ${fail}`);
|
|
91
123
|
if (fail) {
|
|
92
124
|
console.log(`\n${USAGE}`);
|