@rowansenne/workflow-run 0.29.0 → 0.30.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/CHANGELOG.md +17 -0
- package/README.md +45 -841
- package/dev/SKILL.md.tpl +8 -7
- package/dev/references/bug.md +1 -0
- package/dev/references/clarification-template.md +40 -0
- package/dev/references/clarify.md +40 -36
- package/dev/references/delivery.md +1 -1
- package/dev/references/planning.md +14 -14
- package/dev/references/preflight.md +1 -1
- package/dev/references/requirement-template.md +2 -2
- package/dev/skill.json +6 -0
- package/docs/architecture.html +628 -0
- package/docs/development.md +221 -0
- package/docs/docnexus-integration-plan.md +56 -0
- package/docs/full-install.html +491 -0
- package/docs/installation.md +211 -0
- package/docs/integrations.md +160 -0
- package/docs/team-guide.md +166 -0
- package/docs/workflows.md +129 -0
- package/package.json +4 -2
- package/workflow/SKILL.md.tpl +1 -1
- package/workflow/lib/artifact-finalize.mjs +20 -11
- package/workflow/lib/artifact-model.mjs +2 -2
- package/workflow/lib/code-snapshot.mjs +8 -2
- package/workflow/lib/run-gates.mjs +20 -20
- package/workflow/lib/runs.mjs +5 -4
- package/workflow/references/architecture.md +1 -1
- package/workflow/references/execution.md +10 -2
- package/workflow/references/requirements.md +3 -2
- package/workflow/references/runs.md +5 -5
- package/workflow/references/templates.md +2 -2
- package/workflow/scripts/artifact.mjs +1 -1
- package/workflow/scripts/pr-desc.mjs +2 -2
- package/workflow/scripts/requirement.mjs +2 -2
- package/workflow/scripts/review-handoff.mjs +4 -3
- package/workflow/scripts/template.mjs +3 -2
|
@@ -25,7 +25,7 @@ export function buildDescription(root, branch, base, workspace = loadWorkspace(r
|
|
|
25
25
|
const view = branchView(root, branch, workspace);
|
|
26
26
|
const texts = new Map(workspace.artifacts.map((a) => [a.path, a.text]));
|
|
27
27
|
const read = (a) => a ? texts.get(a.path) : null;
|
|
28
|
-
const { requirement, delivery, review, plan, tech, release } = view.latest;
|
|
28
|
+
const { clarification, requirement, delivery, review, plan, tech, release } = view.latest;
|
|
29
29
|
const L = [];
|
|
30
30
|
const add = (title, body) => { if (body) L.push(`## ${title}`, '', body, ''); };
|
|
31
31
|
|
|
@@ -57,7 +57,7 @@ export function buildDescription(root, branch, base, workspace = loadWorkspace(r
|
|
|
57
57
|
add('影响面', keep(section(s, '影响面')));
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const docs = [['需求文档', requirement], ['方案', plan], ['交付说明', delivery], ['审查报告', review], ['技术方案', tech], ['上线方案', release]]
|
|
60
|
+
const docs = [['澄清清单', clarification], ['需求文档', requirement], ['方案', plan], ['交付说明', delivery], ['审查报告', review], ['技术方案', tech], ['上线方案', release]]
|
|
61
61
|
|
|
62
62
|
.filter(([, a]) => a).map(([label, a]) => `- ${label}:\`${a.cite ?? a.path}\`${a.wiki?.url ? `(wiki:${a.wiki.url})` : a.wiki ? `(wiki pageId ${a.wiki.pageId})` : ''}`);
|
|
63
63
|
add('相关文档', docs.length ? docs.join('\n') : null);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// 用法(在项目根执行;--root 可指定项目根;--branch 缺省为当前 git 分支):
|
|
16
16
|
// requirement.mjs which [--branch b] # 当前分支绑定的需求;没绑定时给出建议名、最近的需求(文档仓库模式还列出其他项目的需求)
|
|
17
17
|
// requirement.mjs bind [--name <需求名>] [--branch b] [--base m] # 绑定(没有就新建);不给 --name 按分支名生成
|
|
18
|
-
// requirement.mjs path <plan|delivery|review|tech|release> [--branch b] # 本次落盘的文件路径(文件名固定;已有时上一版复制到
|
|
18
|
+
// requirement.mjs path <clarification|requirement|plan|delivery|review|tech|release> [--branch b] # 本次落盘的文件路径(文件名固定;已有时上一版复制到
|
|
19
19
|
// # workflow-run/tmp/old-artifacts/<种类>_v<N>.md,输出 previous)
|
|
20
20
|
// requirement.mjs sync [<需求目录或其中的文件> | --all] # 按目录里的文件重建 meta.json;指定了目录 / 文件时确认新版本号、输出归档了哪些上一版;
|
|
21
21
|
// # 文档仓库模式下带上提交提示
|
|
@@ -41,7 +41,7 @@ function currentBranch(root) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
// ------------------------------------------------------------------ CLI
|
|
44
|
-
const USAGE = '用法: requirement.mjs which | bind [--name <需求名>] | path <plan|delivery|review|tech|release> | sync [<目录|文件> | --all] | pending | list | config [--project <名>] [--commit-prompt on|off] [--local] (通用:--root <项目根> --branch <分支>)';
|
|
44
|
+
const USAGE = '用法: requirement.mjs which | bind [--name <需求名>] | path <clarification|requirement|plan|delivery|review|tech|release> | sync [<目录|文件> | --all] | pending | list | config [--project <名>] [--commit-prompt on|off] [--local] (通用:--root <项目根> --branch <分支>)';
|
|
45
45
|
|
|
46
46
|
function main(argv) {
|
|
47
47
|
let root = process.cwd();
|
|
@@ -6,7 +6,7 @@ import { spawnSync } from 'node:child_process';
|
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { readRun } from '../lib/runs.mjs';
|
|
8
8
|
import { readProfile } from '../lib/project.mjs';
|
|
9
|
-
import {
|
|
9
|
+
import { snapshotReader, assertSnapshot, hash } from '../lib/code-snapshot.mjs';
|
|
10
10
|
import { isDev, assertValidation, reviewInputs } from '../lib/run-gates.mjs';
|
|
11
11
|
import { scope } from './review-scope.mjs';
|
|
12
12
|
|
|
@@ -14,12 +14,13 @@ export function handoff(root, { branch, id, depth = '标准', capabilities = nul
|
|
|
14
14
|
const { req, run } = readRun(root, branch, id);
|
|
15
15
|
if (!['feature', 'bug', 'review'].includes(run.kind) || ['completed', 'cancelled'].includes(run.status)) throw new Error('只有进行中的开发/审查运行可生成交接材料');
|
|
16
16
|
if (req.meta.pending_finalization) throw new Error('先恢复待完成的产物收尾');
|
|
17
|
+
const getSnapshot = snapshotReader(root, run);
|
|
17
18
|
if (isDev(run)) {
|
|
18
19
|
if (run.stage !== (run.kind === 'feature' ? 'F7' : 'B5')) throw new Error('请先完成验证并进入审查阶段');
|
|
19
|
-
assertValidation(root, req, run);
|
|
20
|
+
assertValidation(root, req, run, undefined, getSnapshot);
|
|
20
21
|
}
|
|
21
22
|
if (!['快审', '标准', '深审'].includes(depth)) throw new Error('审查深度须为快审 / 标准 / 深审');
|
|
22
|
-
const snapshot =
|
|
23
|
+
const snapshot = getSnapshot();
|
|
23
24
|
const reviewScope = scope(root, { base: run.scope?.base ?? 'main', exclude: run.scope?.exclude ?? [] });
|
|
24
25
|
if (!reviewScope.ok) throw new Error(reviewScope.error);
|
|
25
26
|
assertSnapshot(root, run, snapshot);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// node .agents/skills/workflow/scripts/template.mjs draft <模板> [--from <样例.md | ->] [--force]
|
|
11
11
|
// node .agents/skills/workflow/scripts/template.mjs check <模板> [--file <草稿>]
|
|
12
12
|
// node .agents/skills/workflow/scripts/template.mjs save <模板> [--file <草稿>]
|
|
13
|
-
// <模板>:requirement | tech | release | plan | delivery | review | checklist,或 <skill>[/<模板文件名>](如 create-tech-md-doc/template.md)
|
|
13
|
+
// <模板>:clarification | requirement | tech | release | plan | delivery | review | checklist,或 <skill>[/<模板文件名>](如 create-tech-md-doc/template.md)
|
|
14
14
|
// draft:把当前生效的模板复制成草稿;还没有模板(或 --from)时按样例抽骨架(make-template.mjs)。草稿已存在时不覆盖,--force 重来
|
|
15
15
|
// check:草稿本身的格式问题、与当前模板相比的章节变化、拿最近几份已生成文档按新旧模板各跑一次 lint-doc 看影响
|
|
16
16
|
// save:check 无错误后给出写入知识库的 capture 指引(写入后重新运行 resolve.mjs template 确认生效)
|
|
@@ -25,6 +25,7 @@ import { skeleton } from './make-template.mjs';
|
|
|
25
25
|
import { collect } from './artifacts.mjs';
|
|
26
26
|
|
|
27
27
|
const ALIASES = {
|
|
28
|
+
clarification: ['dev', 'clarification-template.md'],
|
|
28
29
|
requirement: ['dev', 'requirement-template.md'],
|
|
29
30
|
tech: ['create-tech-md-doc', 'template.md'],
|
|
30
31
|
release: ['create-release-md-doc', 'template.md'],
|
|
@@ -34,7 +35,7 @@ const ALIASES = {
|
|
|
34
35
|
checklist: ['project-review', 'checklist.md'],
|
|
35
36
|
};
|
|
36
37
|
// 模板 → 用它生成的产物种类(artifacts.mjs 的 KINDS),用来找已生成的文档试跑
|
|
37
|
-
const PRODUCES = { 'create-tech-md-doc/template.md': 'tech', 'create-release-md-doc/template.md': 'release', 'dev/requirement-template.md': 'requirement', 'dev/plan-template.md': 'plan', 'dev/delivery-template.md': 'delivery', 'project-review/report.md': 'review' };
|
|
38
|
+
const PRODUCES = { 'create-tech-md-doc/template.md': 'tech', 'create-release-md-doc/template.md': 'release', 'dev/clarification-template.md': 'clarification', 'dev/requirement-template.md': 'requirement', 'dev/plan-template.md': 'plan', 'dev/delivery-template.md': 'delivery', 'project-review/report.md': 'review' };
|
|
38
39
|
const SAMPLE_DOCS = 5;
|
|
39
40
|
|
|
40
41
|
const rel = (root, p) => path.relative(root, p).split(path.sep).join('/');
|