paseo-req-kit 1.14.0-beta.3 → 1.14.0-beta.5
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 +32 -0
- package/bin/req.mjs +14 -0
- package/contracts/cli-json.md +1 -1
- package/contracts/notifier-event.md +1 -1
- package/contracts/spec.md +1 -0
- package/contracts/state.md +3 -1
- package/contracts/usage-record.md +16 -2
- package/docs/guide//344/275/277/347/224/250/350/200/205/346/214/207/345/215/227.md +11 -1
- package/docs/guide//351/241/271/347/233/256/345/256/232/345/210/266/344/270/216/350/277/220/350/241/214/350/247/204/345/210/231.md +17 -1
- package/engine/prompts/00-shared-context.md +3 -2
- package/engine/prompts/06-code-review.md +12 -1
- package/engine/prompts/incremental.md +2 -0
- package/engine/src/activity.ts +21 -0
- package/engine/src/api.ts +44 -7
- package/engine/src/cli-args.ts +4 -1
- package/engine/src/code-review.ts +422 -0
- package/engine/src/codeowners.ts +87 -0
- package/engine/src/config-view.ts +10 -0
- package/engine/src/config.ts +27 -0
- package/engine/src/danger-guard.ts +180 -0
- package/engine/src/features.ts +1 -1
- package/engine/src/main.ts +13 -3
- package/engine/src/messages.ts +29 -0
- package/engine/src/outcomes.ts +145 -0
- package/engine/src/paseo-runtime.ts +9 -1
- package/engine/src/pipeline.ts +135 -6
- package/engine/src/preflight.ts +10 -1
- package/engine/src/records.ts +71 -0
- package/engine/src/reply.ts +30 -11
- package/engine/src/review-assets/code.css +93 -0
- package/engine/src/review-assets/code.html +43 -0
- package/engine/src/review-assets/code.js +402 -0
- package/engine/src/review.ts +98 -2
- package/engine/src/runtime.ts +2 -0
- package/engine/src/secret-scan.ts +177 -0
- package/engine/src/state.ts +30 -0
- package/engine/src/stats.ts +143 -9
- package/engine/src/watchdog.ts +38 -4
- package/package.json +1 -1
- package/paseo-plugin/client/data.ts +2 -2
- package/paseo-plugin/client/detail.tsx +7 -2
- package/paseo-plugin/client/nav.ts +5 -0
- package/paseo-plugin/client/review.tsx +16 -6
- package/paseo-plugin/client/stats.tsx +15 -0
- package/paseo-plugin/package.json +1 -1
- package/paseo-plugin/server/handlers.ts +1 -1
- package/paseo-plugin/shared/contracts.ts +11 -2
- package/site-dist/404.html +2 -2
- package/site-dist/assets/{app.BpC99f5a.js → app.TlOHPtfE.js} +1 -1
- package/site-dist/assets/changelog.md.DiGi8kHU.js +1 -0
- package/site-dist/assets/{changelog.md.m4cSU5e4.lean.js → changelog.md.DiGi8kHU.lean.js} +1 -1
- package/site-dist/assets/chunks/@localSearchIndexroot.Dk_-Yka5.js +1 -0
- package/site-dist/assets/chunks/{VPLocalSearchBox.CI43rhTA.js → VPLocalSearchBox.BUVNy7_o.js} +1 -1
- package/site-dist/assets/chunks/{theme.S6pNEF23.js → theme.BFeiG1US.js} +2 -2
- package/site-dist/assets/{guide_getting-started.md.a7iNP1Ky.js → guide_getting-started.md.UhkLCUoY.js} +1 -1
- package/site-dist/assets/{guide_getting-started.md.a7iNP1Ky.lean.js → guide_getting-started.md.UhkLCUoY.lean.js} +1 -1
- package/site-dist/assets/{guide_project.md.Csi5wiyt.js → guide_project.md.DIjDRoAq.js} +1 -1
- package/site-dist/assets/{guide_project.md.Csi5wiyt.lean.js → guide_project.md.DIjDRoAq.lean.js} +1 -1
- package/site-dist/assets/{guide_user.md.D9GpGJ7y.js → guide_user.md.UV0WxdJa.js} +1 -1
- package/site-dist/assets/{guide_user.md.D9GpGJ7y.lean.js → guide_user.md.UV0WxdJa.lean.js} +1 -1
- package/site-dist/assets/{reference_contracts_cli-json.md.BV1HtTmr.js → reference_contracts_cli-json.md.CCvKLasM.js} +1 -1
- package/site-dist/assets/{reference_contracts_cli-json.md.BV1HtTmr.lean.js → reference_contracts_cli-json.md.CCvKLasM.lean.js} +1 -1
- package/site-dist/assets/{reference_contracts_notifier-event.md.CCfrkm_A.js → reference_contracts_notifier-event.md.B9WqeZdO.js} +1 -1
- package/site-dist/assets/{reference_contracts_notifier-event.md.CCfrkm_A.lean.js → reference_contracts_notifier-event.md.B9WqeZdO.lean.js} +1 -1
- package/site-dist/assets/{reference_contracts_spec.md.BwwS0L_j.js → reference_contracts_spec.md.Dh5XczZL.js} +2 -2
- package/site-dist/assets/{reference_contracts_spec.md.BwwS0L_j.lean.js → reference_contracts_spec.md.Dh5XczZL.lean.js} +2 -2
- package/site-dist/assets/reference_contracts_state.md.STlqkPPS.js +1 -0
- package/site-dist/assets/{reference_contracts_usage-record.md.D5krNLW7.lean.js → reference_contracts_usage-record.md.MjVps4CA.js} +2 -2
- package/site-dist/assets/{reference_contracts_usage-record.md.D5krNLW7.js → reference_contracts_usage-record.md.MjVps4CA.lean.js} +2 -2
- package/site-dist/changelog.html +5 -5
- package/site-dist/guide/getting-started.html +5 -5
- package/site-dist/guide/how-it-works.html +4 -4
- package/site-dist/guide/index.html +4 -4
- package/site-dist/guide/install.html +4 -4
- package/site-dist/guide/maintainer.html +4 -4
- package/site-dist/guide/phases.html +4 -4
- package/site-dist/guide/project.html +6 -6
- package/site-dist/guide/user.html +5 -5
- package/site-dist/hashmap.json +1 -1
- package/site-dist/index.html +4 -4
- package/site-dist/reference/adr/0001-step-agents-under-origin-chat.html +4 -4
- package/site-dist/reference/adr/0002-no-directory-switch-in-chat.html +4 -4
- package/site-dist/reference/adr/0003-script-engine-not-hub.html +4 -4
- package/site-dist/reference/adr/0004-result-files.html +4 -4
- package/site-dist/reference/adr/0005-no-default-branch-local-commits-only.html +4 -4
- package/site-dist/reference/adr/0006-skill-install-targets.html +4 -4
- package/site-dist/reference/adr/0007-own-interview-skill.html +4 -4
- package/site-dist/reference/adr/0008-entries-do-not-call-entries.html +4 -4
- package/site-dist/reference/adr/0009-versioned-install-layout.html +4 -4
- package/site-dist/reference/adr/0010-generated-feature-overview.html +4 -4
- package/site-dist/reference/adr/0011-resume-after-completion.html +4 -4
- package/site-dist/reference/adr/0012-review-panel.html +4 -4
- package/site-dist/reference/adr/0013-no-release-tooling.html +4 -4
- package/site-dist/reference/adr/0014-notifier-slot.html +4 -4
- package/site-dist/reference/adr/0015-incremental-continue.html +4 -4
- package/site-dist/reference/adr/0016-upgrade-from-tags.html +4 -4
- package/site-dist/reference/adr/0017-use-paseo-capabilities.html +4 -4
- package/site-dist/reference/adr/0018-own-worktree-option.html +4 -4
- package/site-dist/reference/adr/0019-parallel-orchestration.html +4 -4
- package/site-dist/reference/adr/0020-scheduling-through-the-chat.html +4 -4
- package/site-dist/reference/adr/0021-npm-version-manager.html +4 -4
- package/site-dist/reference/adr/0022-develop-and-verify-phases.html +4 -4
- package/site-dist/reference/adr/0023-types-gate-slices.html +4 -4
- package/site-dist/reference/adr/0024-confirm-early-review-axes.html +4 -4
- package/site-dist/reference/adr/0025-joint-requirements.html +4 -4
- package/site-dist/reference/adr/0026-machine-records-and-api.html +4 -4
- package/site-dist/reference/adr/0027-paseo-plugin.html +4 -4
- package/site-dist/reference/adr/0028-external-integrations.html +4 -4
- package/site-dist/reference/adr/0029-requirements-from-cards.html +4 -4
- package/site-dist/reference/adr/0030-card-intake-process.html +4 -4
- package/site-dist/reference/adr/0031-fewer-interventions.html +4 -4
- package/site-dist/reference/adr/0032-npm-only-install.html +4 -4
- package/site-dist/reference/adr/0033-prototype-review-and-ui-check.html +4 -4
- package/site-dist/reference/adr/index.html +4 -4
- package/site-dist/reference/commands.html +4 -4
- package/site-dist/reference/config.html +4 -4
- package/site-dist/reference/contracts/cli-json.html +5 -5
- package/site-dist/reference/contracts/feature-files.html +4 -4
- package/site-dist/reference/contracts/index.html +4 -4
- package/site-dist/reference/contracts/notifier-event.html +6 -6
- package/site-dist/reference/contracts/result-file.html +4 -4
- package/site-dist/reference/contracts/spec.html +6 -6
- package/site-dist/reference/contracts/state.html +5 -5
- package/site-dist/reference/contracts/usage-record.html +6 -6
- package/site-dist/reference/contracts/verify.html +4 -4
- package/site-dist/reference/scope.html +4 -4
- package/skills/req/SKILL.md +2 -0
- package/skills/req/playbooks/incident.md +1 -1
- package/skills/spec-writing/SKILL.md +2 -1
- package/site-dist/assets/changelog.md.m4cSU5e4.js +0 -1
- package/site-dist/assets/chunks/@localSearchIndexroot.D6ywcTJ5.js +0 -1
- package/site-dist/assets/reference_contracts_state.md.EEBd_l2P.js +0 -1
- /package/site-dist/assets/{reference_contracts_state.md.EEBd_l2P.lean.js → reference_contracts_state.md.STlqkPPS.lean.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,o as d,c as u,j as l,a as e}from"./chunks/framework.B9qR_F1m.js";const k=JSON.parse('{"title":"给程序用的 JSON 输出:req api","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/cli-json.md","filePath":"reference/contracts/cli-json.md","lastUpdated":null}'),s={name:"reference/contracts/cli-json.md"};function i(o,n,a,r,c,p){return d(),u("div",null,[...n[0]||(n[0]=[l("div",null,[l("h1",{id:"给程序用的-json-输出-req-api",tabindex:"-1"},[e("给程序用的 JSON 输出:"),l("code",null,"req api"),e(),l("a",{class:"header-anchor",href:"#给程序用的-json-输出-req-api","aria-label":'Permalink to "给程序用的 JSON 输出:`req api`"'},"")]),l("p",null,[e("1.9.0 起。Paseo 插件和其他程序通过 "),l("code",null,"req api"),e(" 读取需求、执行管理操作,不直接读写状态文件。每个命令输出一行 JSON:")]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"{ "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"schema"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"1"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"kitVersion"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"1.9.0"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"data"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"}},"…"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," }")])])])]),l("p",null,"出错时退出码为 1:"),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"{ "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"schema"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"1"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"kitVersion"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"1.9.0"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"error"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"code"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"not_found"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"message"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"没有找到需求……"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," } }")])])])]),l("p",null,[l("code",null,"code"),e(":"),l("code",null,"bad_arguments"),e("(参数不对)、"),l("code",null,"not_found"),e("(目录或需求不存在)、"),l("code",null,"not_allowed"),e("(不允许的文件或命令)、"),l("code",null,"failed"),e("(其他错误)。")]),l("p",null,[l("code",null,"schema"),e(" 只在不兼容的修改时增加;新增字段不改变 "),l("code",null,"schema"),e(",读取方应忽略不认识的字段。")]),l("h2",{id:"命令",tabindex:"-1"},[e("命令 "),l("a",{class:"header-anchor",href:"#命令","aria-label":'Permalink to "命令"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"命令"),l("th",null,[l("code",null,"data")])])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"req api version")]),l("td",null,[l("code",null,"{ kitVersion, kitRoot, apiSchema, paseo, featuresDir }"),e(":"),l("code",null,"paseo"),e(" 是这个版本支持的 Paseo 范围")])]),l("tr",null,[l("td",null,[l("code",null,"req api list [--repo <目录>]")]),l("td",null,'这个仓库所有工作区中的需求,数组,每项见下面的"需求"')]),l("tr",null,[l("td",null,[l("code",null,"req api list --all")]),l("td",null,[e("本机记录过的所有需求("),l("a",{href:"./usage-record"},"需求索引"),e("),同上;目录已不在的 "),l("code",null,"present: false"),e("。1.14 起还包括:用 "),l("code",null,"--track"),e(" 登记、还在对齐中的需求("),l("code",null,"stage"),e(' 为"对齐中",没有 '),l("code",null,"spec.md"),e(" 时 "),l("code",null,"title"),e(" 取自 "),l("code",null,"alignment.md"),e("),以及索引里出现过的项目中没登记的需求")])]),l("tr",null,[l("td",null,[l("code",null,"req api status <需求> [--repo <目录>]")]),l("td",null,'一个需求的详情,见下面的"详情"')]),l("tr",null,[l("td",null,[l("code",null,"req api file <需求> <文件> [--repo <目录>]")]),l("td",null,[l("code",null,"{ featureDir, file, size, truncated, content }"),e(";只能读取功能目录中的文档(见下),最多 512 KB")])]),l("tr",null,[l("td",null,[l("code",null,"req api stats [--since 30d] [--month 2026-10]")]),l("td",null,[l("code",null,"req stats --json"),e(" 的内容,见 "),l("a",{href:"./usage-record"},"使用记录")])]),l("tr",null,[l("td",null,[l("code",null,"req api index [--rebuild <目录>…] [--prune]")]),l("td",null,[e("不带选项:索引的全部条目;"),l("code",null,"--rebuild"),e(":"),l("code",null,"{ scanned, registered, pruned, total }")])]),l("tr",null,[l("td",null,[l("code",null,"req api run <approve|stop|resume|verify|sync|reply|start> <需求> [--repo <目录>] [选项]")]),l("td",null,[l("code",null,"{ command, featureDir, ok, exitCode, message }"),e("。在 "),l("code",null,"--repo"),e("(默认当前目录)中执行与 "),l("code",null,"req <命令> <需求>"),e(" 完全相同的操作;"),l("code",null,"ok"),e(" 为 false 时退出码为 1。"),l("code",null,"start"),e("(1.14):在项目主目录中自动加 "),l("code",null,"--worktree"),e("(上次已建好工作区的接着用),并把进展发回登记时的对话")])]),l("tr",null,[l("td",null,[l("code",null,"req api models")]),l("td",null,[e("1.12 起。"),l("code",null,"{ current, choices, recommended }"),e(":本机配置中现在的 "),l("code",null,"agents"),e(";daemon 上能无人值守运行的选择("),l("code",null,"{ id, label, provider, profile }"),e(",Paseo profile 在前);按推荐的 "),l("code",null,"agents"),e("。连不上 daemon 时报错")])]),l("tr",null,[l("td",null,[l("code",null,"req api config [--repo <目录>] [--machine]")]),l("td",null,[e("1.12 起。"),l("code",null,"{ sources, ignored, error, repo, groups }"),e(":"),l("code",null,"sources"),e(" 是生效的配置文件("),l("code",null,"layer"),e(" 为 "),l("code",null,"machine"),e(" / "),l("code",null,"team"),e(" / "),l("code",null,"project"),e(",按叠加顺序);"),l("code",null,"groups"),e(" 按主题分组,每项 "),l("code",null,"{ key, label, description, display, value, setBy, scope, changed }"),e(":"),l("code",null,"display"),e(" 是用大白话写的值,"),l("code",null,"value"),e(" 中看起来像密钥的值和个人账号替换为 "),l("code",null,"••••"),e(","),l("code",null,"setBy"),e(" 是写了它的文件,"),l("code",null,"changed"),e(" 表示与默认值不同。配置有错误时 "),l("code",null,"error"),e(" 写明原因,值按各文件所写。"),l("code",null,"--machine"),e(" 不看项目配置")])]),l("tr",null,[l("td",null,[l("code",null,"req api set-agents --json <设置>")]),l("td",null,[e("1.12 起。"),l("code",null,"{ ok, message }"),e("。"),l("code",null,"<设置>"),e(" 是 "),l("code",null,"{ builder, reviewer, fallback }"),e("("),l("code",null,"fallback"),e(" 可以为 null),检查后写入本机配置的 "),l("code",null,"agents"),e(",原文件备份")])]),l("tr",null,[l("td",null,[l("code",null,"req api watchdog [--by plugin|factory] [--dry-run]")]),l("td",null,[e("1.13 起。"),l("code",null,"{ checked, resumed, failed, skipped }"),e(':把本机"运行中但后台进程已不在"的需求直接继续('),l("code",null,"req resume"),e(")。每个进程只继续一次,每个需求 24 小时内最多 3 次;"),l("code",null,"--by plugin"),e(" 同时记下插件在检查(流水线据此不再预约对话的定时检查)")])]),l("tr",null,[l("td",null,[l("code",null,"req api review-url <需求> [--repo <目录>] [--read-only] [--page check]")]),l("td",null,[e("1.13 起;"),l("code",null,"--page check"),e("(1.14)给出同一服务上的验收清单页地址(需要 "),l("code",null,"spec.md"),e(")。"),l("code",null,"{ url, readOnly }"),e(":这个需求的原型审查页地址(需要时在后台启动审查页的服务)。"),l("code",null,"--read-only"),e(" 的地址只能看,不能提交意见或确认方案。需求不在本机的需求索引中或还没有 "),l("code",null,"prototype/"),e(" 时报 "),l("code",null,"not_found")])])])]),l("p",null,[l("code",null,"<需求>"),e(" 的写法与 "),l("code",null,"req status"),e(" 相同:功能目录、目录名或名称中能唯一确定的一部分。需求在为它新建的工作区中开发时,"),l("code",null,"--repo"),e(" 写对话所在的目录或那个工作区都可以。")]),l("p",null,[l("code",null,"req api file"),e(" 能读取的文件:"),l("code",null,"spec.md"),e("、"),l("code",null,"alignment.md"),e("、"),l("code",null,"spec-review.md"),e("、"),l("code",null,"changes.md"),e("、"),l("code",null,"decisions.tsv"),e("、"),l("code",null,"design.md"),e("、"),l("code",null,"design-review.md"),e("、"),l("code",null,"preview.md"),e("、"),l("code",null,"contract.md"),e("、"),l("code",null,"diagnosis.md"),e("、"),l("code",null,"assessment.md"),e("、"),l("code",null,"implementation.md"),e("、"),l("code",null,"progress.md"),e("、"),l("code",null,"code-review.md"),e("、"),l("code",null,"handoff.md"),e("、"),l("code",null,"service-start.md"),e("、"),l("code",null,"verification.md"),e("、"),l("code",null,"report.md"),e("、"),l("code",null,"acceptance.md"),e("、"),l("code",null,"lessons.tsv"),e("。")]),l("h2",{id:"需求-list-的每一项",tabindex:"-1"},[e("需求("),l("code",null,"list"),e(" 的每一项) "),l("a",{class:"header-anchor",href:"#需求-list-的每一项","aria-label":'Permalink to "需求(`list` 的每一项)"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"字段"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"key")]),l("td",null,"需求在本机的标识(对话所在目录 + 功能目录)")]),l("tr",null,[l("td",null,[l("code",null,"project")]),l("td",null,"项目名:对话所在目录的目录名")]),l("tr",null,[l("td",null,[l("code",null,"repo")]),l("td",null,"需求所在的目录(有自己的工作区时是那个工作区)")]),l("tr",null,[l("td",null,[l("code",null,"sourceRepo"),e(" / "),l("code",null,"workspaceId")]),l("td",null,"有自己的工作区时:对话所在的目录、Paseo 工作区 ID;否则 null")]),l("tr",null,[l("td",null,[l("code",null,"featureDir"),e(" / "),l("code",null,"name"),e(" / "),l("code",null,"title")]),l("td",null,"功能目录、目录名、需求标题")]),l("tr",null,[l("td",null,[l("code",null,"type"),e(" / "),l("code",null,"profile"),e(" / "),l("code",null,"branch")]),l("td",null,[e("需求类型("),l("code",null,"defect"),e("、"),l("code",null,"refactor"),e("、"),l("code",null,"assessment"),e(" 或 null)、档位、分支")])]),l("tr",null,[l("td",null,[l("code",null,"stage")]),l("td",null,[e("与 "),l("code",null,"req list"),e(' 相同的阶段说明,如"开发中""等待确认方案""待验收"')])]),l("tr",null,[l("td",null,[l("code",null,"status")]),l("td",null,[e("状态文件的 "),l("code",null,"status"),e(";还没运行过为 null")])]),l("tr",null,[l("td",null,[l("code",null,"running")]),l("td",null,"后台进程是否在运行")]),l("tr",null,[l("td",null,[l("code",null,"phase")]),l("td",null,[l("code",null,"develop"),e(" / "),l("code",null,"verify")])]),l("tr",null,[l("td",null,[l("code",null,"attention")]),l("td",null,[e("需要人处理的事:"),l("code",null,"approval"),e("(确认方案)、"),l("code",null,"business"),e("(需求方决定)、"),l("code",null,"permission"),e("(1.13,步骤在等权限批准;"),l("code",null,"waiting.questions"),e(" 是要批准的操作,"),l("code",null,"waiting.agentId"),e(" 是那个 agent)、"),l("code",null,"interrupted"),e("(中断,可以继续)、"),l("code",null,"not_completed"),e("(结束但未完成)、"),l("code",null,"not_started"),e("(1.14,需求说明已确认超过 30 分钟、或已为它建好工作区,但流水线没有运行过);没有为 null")])]),l("tr",null,[l("td",null,[l("code",null,"waiting")]),l("td",null,[e("1.12 起。"),l("code",null,"attention"),e(" 不为 null 时:"),l("code",null,"since"),e("(从什么时候开始等)、"),l("code",null,"questions"),e("(需求方要回答的问题)、"),l("code",null,"reason"),e("(停止原因)、"),l("code",null,"card"),e("("),l("code",null,"{ system, id, url, requester }"),e(",从卡片开始的需求)、"),l("code",null,"canReply"),e("(能否用 "),l("code",null,"req api run reply <需求> <回复>"),e(" 把回复转给需求的对话)、"),l("code",null,"canStart"),e("(1.14,"),l("code",null,"not_started"),e(" 时为 true:可以用 "),l("code",null,"req api run start <需求>"),e(" 开始开发);否则为 null")])]),l("tr",null,[l("td",null,[l("code",null,"current")]),l("td",null,[e("正在运行的步骤 "),l("code",null,"[{ key, title, agentId }]")])]),l("tr",null,[l("td",null,[l("code",null,"updatedAt")]),l("td",null,"最近一次变化的时间")]),l("tr",null,[l("td",null,[l("code",null,"usage")]),l("td",null,[l("code",null,"{ steps, agentMinutes, inputTokens, outputTokens, costUsd }"),e(";没运行过为 null")])]),l("tr",null,[l("td",null,[l("code",null,"present")]),l("td",null,"目录是否还在")]),l("tr",null,[l("td",null,[l("code",null,"hasPrototype")]),l("td",null,[e("1.13 起。功能目录中有界面原型("),l("code",null,"prototype/"),e("),可以用原型审查页查看")])])])]),l("h2",{id:"详情-status",tabindex:"-1"},[e("详情("),l("code",null,"status"),e(") "),l("a",{class:"header-anchor",href:"#详情-status","aria-label":'Permalink to "详情(`status`)"'},"")]),l("p",null,'"需求"的全部字段,另加:'),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"字段"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"files")]),l("td",null,[e("功能目录中存在的、可以用 "),l("code",null,"req api file"),e(" 读取的文件")])]),l("tr",null,[l("td",null,[l("code",null,"run")]),l("td",null,[l("code",null,"{ attempt, startedAt, updatedAt, pid, phaseMode, stopReason, outcome, queuedSince, verifyAt, approval, originAgentId }"),e(";没运行过为 null")])]),l("tr",null,[l("td",null,[l("code",null,"steps")]),l("td",null,[e("每个步骤一项:"),l("code",null,"{ key, stepId, title, phase, attempt, round, agentId, startedAt, endedAt, minutes, outcome, result, error, usage }"),e(";"),l("code",null,"title"),e(' 是给人看的名称(如"代码评审(第 2 轮)"),'),l("code",null,"result"),e(' 是结论的文字(如"需要修改")')])]),l("tr",null,[l("td",null,[l("code",null,"gate")]),l("td",null,[e("质量门:状态文件中的 "),l("code",null,"gate")])]),l("tr",null,[l("td",null,[l("code",null,"estimate")]),l("td",null,[e("1.13 起。"),l("code",null,"{ basis, profile, typicalAgentMinutes, typicalTokens, usedAgentMinutes, usedTokens, leftMinutes, over }"),e(":按本机已完成的同档位需求(至少 3 个)的中位数估算;数据不够或已完成时为 null")])]),l("tr",null,[l("td",null,[l("code",null,"joint")]),l("td",null,[e("联合需求的其他仓库:"),l("code",null,"[{ name, slug, repo, sourceRepo, branch, workspaceId, gate }]")])]),l("tr",null,[l("td",null,[l("code",null,"external")]),l("td",null,[e("外部系统中的卡片(1.9.0 起):"),l("code",null,"[{ name, id, url, status, syncedAt, pending, lastError }]"),e(";"),l("code",null,"pending"),e(" 是等待补发的调用数")])])])])],-1),l("p",{class:"source-note"},[e("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/cli-json.md"},"contracts/cli-json.md"),e(" 生成。"),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/cli-json.md"},"在 GitHub 上编辑")],-1)])])}const g=t(s,[["render",i]]);export{k as __pageData,g as default};
|
|
1
|
+
import{_ as t,o as d,c as u,j as l,a as e}from"./chunks/framework.B9qR_F1m.js";const k=JSON.parse('{"title":"给程序用的 JSON 输出:req api","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/cli-json.md","filePath":"reference/contracts/cli-json.md","lastUpdated":null}'),s={name:"reference/contracts/cli-json.md"};function i(o,n,a,r,c,p){return d(),u("div",null,[...n[0]||(n[0]=[l("div",null,[l("h1",{id:"给程序用的-json-输出-req-api",tabindex:"-1"},[e("给程序用的 JSON 输出:"),l("code",null,"req api"),e(),l("a",{class:"header-anchor",href:"#给程序用的-json-输出-req-api","aria-label":'Permalink to "给程序用的 JSON 输出:`req api`"'},"")]),l("p",null,[e("1.9.0 起。Paseo 插件和其他程序通过 "),l("code",null,"req api"),e(" 读取需求、执行管理操作,不直接读写状态文件。每个命令输出一行 JSON:")]),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"{ "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"schema"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"1"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"kitVersion"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"1.9.0"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"data"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"}},"…"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," }")])])])]),l("p",null,"出错时退出码为 1:"),l("div",{class:"language-json vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"json"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"{ "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"schema"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"1"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"kitVersion"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"1.9.0"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"error"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"code"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"not_found"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),l("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"message"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),l("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"没有找到需求……"'),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," } }")])])])]),l("p",null,[l("code",null,"code"),e(":"),l("code",null,"bad_arguments"),e("(参数不对)、"),l("code",null,"not_found"),e("(目录或需求不存在)、"),l("code",null,"not_allowed"),e("(不允许的文件或命令)、"),l("code",null,"failed"),e("(其他错误)。")]),l("p",null,[l("code",null,"schema"),e(" 只在不兼容的修改时增加;新增字段不改变 "),l("code",null,"schema"),e(",读取方应忽略不认识的字段。")]),l("h2",{id:"命令",tabindex:"-1"},[e("命令 "),l("a",{class:"header-anchor",href:"#命令","aria-label":'Permalink to "命令"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"命令"),l("th",null,[l("code",null,"data")])])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"req api version")]),l("td",null,[l("code",null,"{ kitVersion, kitRoot, apiSchema, paseo, featuresDir }"),e(":"),l("code",null,"paseo"),e(" 是这个版本支持的 Paseo 范围")])]),l("tr",null,[l("td",null,[l("code",null,"req api list [--repo <目录>]")]),l("td",null,'这个仓库所有工作区中的需求,数组,每项见下面的"需求"')]),l("tr",null,[l("td",null,[l("code",null,"req api list --all")]),l("td",null,[e("本机记录过的所有需求("),l("a",{href:"./usage-record"},"需求索引"),e("),同上;目录已不在的 "),l("code",null,"present: false"),e("。1.14 起还包括:用 "),l("code",null,"--track"),e(" 登记、还在对齐中的需求("),l("code",null,"stage"),e(' 为"对齐中",没有 '),l("code",null,"spec.md"),e(" 时 "),l("code",null,"title"),e(" 取自 "),l("code",null,"alignment.md"),e("),以及索引里出现过的项目中没登记的需求")])]),l("tr",null,[l("td",null,[l("code",null,"req api status <需求> [--repo <目录>]")]),l("td",null,'一个需求的详情,见下面的"详情"')]),l("tr",null,[l("td",null,[l("code",null,"req api file <需求> <文件> [--repo <目录>]")]),l("td",null,[l("code",null,"{ featureDir, file, size, truncated, content }"),e(";只能读取功能目录中的文档(见下),最多 512 KB")])]),l("tr",null,[l("td",null,[l("code",null,"req api stats [--since 30d] [--month 2026-10]")]),l("td",null,[l("code",null,"req stats --json"),e(" 的内容,见 "),l("a",{href:"./usage-record"},"使用记录")])]),l("tr",null,[l("td",null,[l("code",null,"req api index [--rebuild <目录>…] [--prune]")]),l("td",null,[e("不带选项:索引的全部条目;"),l("code",null,"--rebuild"),e(":"),l("code",null,"{ scanned, registered, pruned, total }")])]),l("tr",null,[l("td",null,[l("code",null,"req api run <approve|stop|resume|verify|sync|reply|start> <需求> [--repo <目录>] [选项]")]),l("td",null,[l("code",null,"{ command, featureDir, ok, exitCode, message }"),e("。在 "),l("code",null,"--repo"),e("(默认当前目录)中执行与 "),l("code",null,"req <命令> <需求>"),e(" 完全相同的操作;"),l("code",null,"ok"),e(" 为 false 时退出码为 1。"),l("code",null,"start"),e("(1.14):在项目主目录中自动加 "),l("code",null,"--worktree"),e("(上次已建好工作区的接着用),并把进展发回登记时的对话")])]),l("tr",null,[l("td",null,[l("code",null,"req api models")]),l("td",null,[e("1.12 起。"),l("code",null,"{ current, choices, recommended }"),e(":本机配置中现在的 "),l("code",null,"agents"),e(";daemon 上能无人值守运行的选择("),l("code",null,"{ id, label, provider, profile }"),e(",Paseo profile 在前);按推荐的 "),l("code",null,"agents"),e("。连不上 daemon 时报错")])]),l("tr",null,[l("td",null,[l("code",null,"req api config [--repo <目录>] [--machine]")]),l("td",null,[e("1.12 起。"),l("code",null,"{ sources, ignored, error, repo, groups }"),e(":"),l("code",null,"sources"),e(" 是生效的配置文件("),l("code",null,"layer"),e(" 为 "),l("code",null,"machine"),e(" / "),l("code",null,"team"),e(" / "),l("code",null,"project"),e(",按叠加顺序);"),l("code",null,"groups"),e(" 按主题分组,每项 "),l("code",null,"{ key, label, description, display, value, setBy, scope, changed }"),e(":"),l("code",null,"display"),e(" 是用大白话写的值,"),l("code",null,"value"),e(" 中看起来像密钥的值和个人账号替换为 "),l("code",null,"••••"),e(","),l("code",null,"setBy"),e(" 是写了它的文件,"),l("code",null,"changed"),e(" 表示与默认值不同。配置有错误时 "),l("code",null,"error"),e(" 写明原因,值按各文件所写。"),l("code",null,"--machine"),e(" 不看项目配置")])]),l("tr",null,[l("td",null,[l("code",null,"req api set-agents --json <设置>")]),l("td",null,[e("1.12 起。"),l("code",null,"{ ok, message }"),e("。"),l("code",null,"<设置>"),e(" 是 "),l("code",null,"{ builder, reviewer, fallback }"),e("("),l("code",null,"fallback"),e(" 可以为 null),检查后写入本机配置的 "),l("code",null,"agents"),e(",原文件备份")])]),l("tr",null,[l("td",null,[l("code",null,"req api watchdog [--by plugin|factory] [--dry-run]")]),l("td",null,[e("1.13 起。"),l("code",null,"{ checked, resumed, failed, skipped }"),e(':把本机"运行中但后台进程已不在"的需求直接继续('),l("code",null,"req resume"),e(")。每个进程只继续一次,每个需求 24 小时内最多 3 次;"),l("code",null,"--by plugin"),e(" 同时记下插件在检查(流水线据此不再预约对话的定时检查)")])]),l("tr",null,[l("td",null,[l("code",null,"req api review-url <需求> [--repo <目录>] [--read-only] [--page check]")]),l("td",null,[e("1.13 起;"),l("code",null,"--page check"),e("(1.14)给出同一服务上的验收清单页地址(需要 "),l("code",null,"spec.md"),e("),"),l("code",null,"--page code"),e("(1.14)给出代码审查页地址(需要已经写过代码)。"),l("code",null,"{ url, readOnly }"),e(":这个需求的原型审查页地址(需要时在后台启动审查页的服务)。"),l("code",null,"--read-only"),e(" 的地址只能看,不能提交意见或确认方案。需求不在本机的需求索引中或还没有 "),l("code",null,"prototype/"),e(" 时报 "),l("code",null,"not_found")])])])]),l("p",null,[l("code",null,"<需求>"),e(" 的写法与 "),l("code",null,"req status"),e(" 相同:功能目录、目录名或名称中能唯一确定的一部分。需求在为它新建的工作区中开发时,"),l("code",null,"--repo"),e(" 写对话所在的目录或那个工作区都可以。")]),l("p",null,[l("code",null,"req api file"),e(" 能读取的文件:"),l("code",null,"spec.md"),e("、"),l("code",null,"alignment.md"),e("、"),l("code",null,"spec-review.md"),e("、"),l("code",null,"changes.md"),e("、"),l("code",null,"decisions.tsv"),e("、"),l("code",null,"design.md"),e("、"),l("code",null,"design-review.md"),e("、"),l("code",null,"preview.md"),e("、"),l("code",null,"contract.md"),e("、"),l("code",null,"diagnosis.md"),e("、"),l("code",null,"assessment.md"),e("、"),l("code",null,"implementation.md"),e("、"),l("code",null,"progress.md"),e("、"),l("code",null,"code-review.md"),e("、"),l("code",null,"handoff.md"),e("、"),l("code",null,"service-start.md"),e("、"),l("code",null,"verification.md"),e("、"),l("code",null,"report.md"),e("、"),l("code",null,"acceptance.md"),e("、"),l("code",null,"lessons.tsv"),e("。")]),l("h2",{id:"需求-list-的每一项",tabindex:"-1"},[e("需求("),l("code",null,"list"),e(" 的每一项) "),l("a",{class:"header-anchor",href:"#需求-list-的每一项","aria-label":'Permalink to "需求(`list` 的每一项)"'},"")]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"字段"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"key")]),l("td",null,"需求在本机的标识(对话所在目录 + 功能目录)")]),l("tr",null,[l("td",null,[l("code",null,"project")]),l("td",null,"项目名:对话所在目录的目录名")]),l("tr",null,[l("td",null,[l("code",null,"repo")]),l("td",null,"需求所在的目录(有自己的工作区时是那个工作区)")]),l("tr",null,[l("td",null,[l("code",null,"sourceRepo"),e(" / "),l("code",null,"workspaceId")]),l("td",null,"有自己的工作区时:对话所在的目录、Paseo 工作区 ID;否则 null")]),l("tr",null,[l("td",null,[l("code",null,"featureDir"),e(" / "),l("code",null,"name"),e(" / "),l("code",null,"title")]),l("td",null,"功能目录、目录名、需求标题")]),l("tr",null,[l("td",null,[l("code",null,"type"),e(" / "),l("code",null,"profile"),e(" / "),l("code",null,"branch")]),l("td",null,[e("需求类型("),l("code",null,"defect"),e("、"),l("code",null,"refactor"),e("、"),l("code",null,"assessment"),e(" 或 null)、档位、分支")])]),l("tr",null,[l("td",null,[l("code",null,"stage")]),l("td",null,[e("与 "),l("code",null,"req list"),e(' 相同的阶段说明,如"开发中""等待确认方案""待验收"')])]),l("tr",null,[l("td",null,[l("code",null,"status")]),l("td",null,[e("状态文件的 "),l("code",null,"status"),e(";还没运行过为 null")])]),l("tr",null,[l("td",null,[l("code",null,"running")]),l("td",null,"后台进程是否在运行")]),l("tr",null,[l("td",null,[l("code",null,"phase")]),l("td",null,[l("code",null,"develop"),e(" / "),l("code",null,"verify")])]),l("tr",null,[l("td",null,[l("code",null,"attention")]),l("td",null,[e("需要人处理的事:"),l("code",null,"approval"),e("(确认方案)、"),l("code",null,"business"),e("(需求方决定)、"),l("code",null,"permission"),e("(1.13,步骤在等权限批准;"),l("code",null,"waiting.questions"),e(" 是要批准的操作,"),l("code",null,"waiting.agentId"),e(" 是那个 agent)、"),l("code",null,"interrupted"),e("(中断,可以继续)、"),l("code",null,"not_completed"),e("(结束但未完成)、"),l("code",null,"not_started"),e("(1.14,需求说明已确认超过 30 分钟、或已为它建好工作区,但流水线没有运行过);没有为 null")])]),l("tr",null,[l("td",null,[l("code",null,"waiting")]),l("td",null,[e("1.12 起。"),l("code",null,"attention"),e(" 不为 null 时:"),l("code",null,"since"),e("(从什么时候开始等)、"),l("code",null,"questions"),e("(需求方要回答的问题)、"),l("code",null,"reason"),e("(停止原因)、"),l("code",null,"card"),e("("),l("code",null,"{ system, id, url, requester }"),e(",从卡片开始的需求)、"),l("code",null,"canReply"),e("(能否用 "),l("code",null,"req api run reply <需求> <回复>"),e(" 把回复转给需求的对话)、"),l("code",null,"canStart"),e("(1.14,"),l("code",null,"not_started"),e(" 时为 true:可以用 "),l("code",null,"req api run start <需求>"),e(" 开始开发);否则为 null")])]),l("tr",null,[l("td",null,[l("code",null,"current")]),l("td",null,[e("正在运行的步骤 "),l("code",null,"[{ key, title, agentId }]")])]),l("tr",null,[l("td",null,[l("code",null,"updatedAt")]),l("td",null,"最近一次变化的时间")]),l("tr",null,[l("td",null,[l("code",null,"usage")]),l("td",null,[l("code",null,"{ steps, agentMinutes, inputTokens, outputTokens, costUsd }"),e(";没运行过为 null")])]),l("tr",null,[l("td",null,[l("code",null,"present")]),l("td",null,"目录是否还在")]),l("tr",null,[l("td",null,[l("code",null,"hasPrototype")]),l("td",null,[e("1.13 起。功能目录中有界面原型("),l("code",null,"prototype/"),e("),可以用原型审查页查看")])])])]),l("h2",{id:"详情-status",tabindex:"-1"},[e("详情("),l("code",null,"status"),e(") "),l("a",{class:"header-anchor",href:"#详情-status","aria-label":'Permalink to "详情(`status`)"'},"")]),l("p",null,'"需求"的全部字段,另加:'),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"字段"),l("th",null,"含义")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"files")]),l("td",null,[e("功能目录中存在的、可以用 "),l("code",null,"req api file"),e(" 读取的文件")])]),l("tr",null,[l("td",null,[l("code",null,"run")]),l("td",null,[l("code",null,"{ attempt, startedAt, updatedAt, pid, phaseMode, stopReason, outcome, queuedSince, verifyAt, approval, originAgentId }"),e(";没运行过为 null")])]),l("tr",null,[l("td",null,[l("code",null,"steps")]),l("td",null,[e("每个步骤一项:"),l("code",null,"{ key, stepId, title, phase, attempt, round, agentId, startedAt, endedAt, minutes, outcome, result, error, usage }"),e(";"),l("code",null,"title"),e(' 是给人看的名称(如"代码评审(第 2 轮)"),'),l("code",null,"result"),e(' 是结论的文字(如"需要修改")')])]),l("tr",null,[l("td",null,[l("code",null,"gate")]),l("td",null,[e("质量门:状态文件中的 "),l("code",null,"gate")])]),l("tr",null,[l("td",null,[l("code",null,"estimate")]),l("td",null,[e("1.13 起。"),l("code",null,"{ basis, profile, typicalAgentMinutes, typicalTokens, usedAgentMinutes, usedTokens, leftMinutes, over }"),e(":按本机已完成的同档位需求(至少 3 个)的中位数估算;数据不够或已完成时为 null")])]),l("tr",null,[l("td",null,[l("code",null,"joint")]),l("td",null,[e("联合需求的其他仓库:"),l("code",null,"[{ name, slug, repo, sourceRepo, branch, workspaceId, gate }]")])]),l("tr",null,[l("td",null,[l("code",null,"external")]),l("td",null,[e("外部系统中的卡片(1.9.0 起):"),l("code",null,"[{ name, id, url, status, syncedAt, pending, lastError }]"),e(";"),l("code",null,"pending"),e(" 是等待补发的调用数")])])])])],-1),l("p",{class:"source-note"},[e("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/cli-json.md"},"contracts/cli-json.md"),e(" 生成。"),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/cli-json.md"},"在 GitHub 上编辑")],-1)])])}const g=t(s,[["render",i]]);export{k as __pageData,g as default};
|
|
@@ -21,4 +21,4 @@ import{_ as e,o as t,c as n,j as i,a as s}from"./chunks/framework.B9qR_F1m.js";c
|
|
|
21
21
|
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "requester"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"张广祥"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},",")]),s(`
|
|
22
22
|
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "card"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"system"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"ALM"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"id"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"CMASTER-BUSINESS#9902"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"url"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"null"),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," },")]),s(`
|
|
23
23
|
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "recipients"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": [{ "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"name"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"张广祥"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"accounts"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"um"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"ZHANGGX001"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," } }]")]),s(`
|
|
24
|
-
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),i("ul",null,[i("li",null,[i("code",null,"audience"),s(":"),i("code",null,"requester"),s(" 表示这件事要需求方处理或是给他的结果("),i("code",null,"blocked"),s("、"),i("code",null,"approval"),s("、"),i("code",null,"phase_done"),s("、"),i("code",null,"completed"),s(",而且需求从卡片开始、知道提出人);其余为 "),i("code",null,"team"),s(",发到群里即可。")]),i("li",null,[i("code",null,"requester"),s("、"),i("code",null,"card"),s(":从卡片开始的需求的提出人和卡片;其他需求为 null。")]),i("li",null,[i("code",null,"recipients"),s(":"),i("code",null,"audience"),s(" 为 "),i("code",null,"requester"),s(" 时是需求方本人;"),i("code",null,"accounts"),s(" 来自本机或团队配置的 "),i("code",null,"people"),s("(姓名 → 各种账号),没有写时为 "),i("code",null,"{}"),s(",模块可以改发到群。")])]),i("table",{tabindex:"0"},[i("thead",null,[i("tr",null,[i("th",null,"type"),i("th",null,"什么时候"),i("th",null,"details")])]),i("tbody",null,[i("tr",null,[i("td",null,[i("code",null,"milestone")]),i("td",null,[s("方案确定、开始验证、开始修复缺陷(配置 "),i("code",null,"notifyMilestones"),s(" 为 true 时,每次尝试各一次)")]),i("td",null,[i("code",null,"milestone"),s(":"),i("code",null,"design-settled"),s("、"),i("code",null,"code-reviewed"),s("、"),i("code",null,"fixing-defects"),s("、"),i("code",null,"handback-<n>"),s("(1.7.0 起,测试验证第 n 次把缺陷退回研发)")])]),i("tr",null,[i("td",null,[i("code",null,"blocked")]),i("td",null,"方案审核发现需要需求方决定的问题,流水线已暂停"),i("td",null,[i("code",null,"questions"),s("(字符串数组)、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"permission")]),i("td",null,"步骤 agent 在等待权限批准"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"agentTitle"),s("、"),i("code",null,"requests"),s("(字符串数组)")])]),i("tr",null,[i("td",null,[i("code",null,"failed")]),i("td",null,"流水线因错误中断(已自动重试过的临时错误除外)"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"reason"),s("、"),i("code",null,"logPath"),s("、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"completed")]),i("td",null,"流水线结束,报告已生成"),i("td",null,[i("code",null,"outcome"),s("("),i("code",null,"completed"),s("、"),i("code",null,"completed_with_issues"),s("、"),i("code",null,"not_completed"),s(")、"),i("code",null,"summary"),s("、"),i("code",null,"reportPath"),s('。"只做研发"时另有 '),i("code",null,"mode"),s("("),i("code",null,"develop-only"),s(")和 "),i("code",null,"handoffPath"),s(",报告是研发报告,需要人工测试")])]),i("tr",null,[i("td",null,[i("code",null,"approval")]),i("td",null,[s("1.8.0 起。方案确认点("),i("code",null,"designApproval"),s('):方案已通过审核,等待需求方确认"做完后会看到什么",还没有开始写代码')]),i("td",null,[i("code",null,"previewPath"),s("(要确认的内容)、"),i("code",null,"approveCommand"),s("(确认后继续的命令)、"),i("code",null,"resumeCommand"),s("(修改需求后继续的命令),都在发起的对话中执行")])]),i("tr",null,[i("td",null,[i("code",null,"phase_done")]),i("td",null,"1.7.0 起。分阶段执行时研发阶段已完成(代码已通过评审、提测说明已写好),流水线停在闸口等待测试验证。测试退回后再次修完也会发"),i("td",null,[i("code",null,"handoffPath"),s("(提测说明)、"),i("code",null,"mode"),s("("),i("code",null,"gated"),s(")、"),i("code",null,"verifyCommand"),s("(开始测试验证的命令,在发起的对话中执行)、"),i("code",null,"verifyAt"),s("(预约的开始时间,ISO 格式,没有为 null)、"),i("code",null,"handbacks"),s("(已退回的次数)")])]),i("tr",null,[i("td",null,[i("code",null,"alert")]),i("td",null,[s("1.12 起。接单器("),i("code",null,"req factory"),s(")自检没有通过(Paseo 连不上、agent 没有登录、额度用完、需求管理系统的命令不可用),暂停接新卡片;或者恢复正常。同样的问题只发一次。"),i("code",null,"feature.title"),s(' 为"接单器",'),i("code",null,"feature.dir"),s("、"),i("code",null,"repo"),s(" 为空")]),i("td",null,[i("code",null,"source"),s("("),i("code",null,"factory"),s(")、"),i("code",null,"machine"),s("、"),i("code",null,"problems"),s("(字符串数组,恢复时为空)、"),i("code",null,"recovered")])]),i("tr",null,[i("td",null,[i("code",null,"digest")]),i("td",null,[i("code",null,"req digest --notify"),s("(或由 "),i("code",null,"req digest --schedule"),s(" 创建的 Paseo 定时任务)发送项目的需求总览,1.6.0 起。"),i("code",null,"feature.title"),s(' 为"<项目> 需求总览",'),i("code",null,"text"),s(" 是完整的多行总览")]),i("td",null,[i("code",null,"features"),s(":每个需求的 "),i("code",null,"name"),s("、"),i("code",null,"title"),s("、"),i("code",null,"stage"),s("、"),i("code",null,"branch"),s("、"),i("code",null,"updatedAt"),s("、"),i("code",null,"usage"),s(";"),i("code",null,"recurringLessons"),s("(1.8.0 起):在两个以上需求的 "),i("code",null,"lessons.tsv"),s(" 中出现的问题类别,每项 "),i("code",null,"category"),s("、"),i("code",null,"features"),s("、"),i("code",null,"rules")])])])]),i("h2",{id:"兼容性",tabindex:"-1"},[s("兼容性 "),i("a",{class:"header-anchor",href:"#兼容性","aria-label":'Permalink to "兼容性"'},"")]),i("ul",null,[i("li",null,[s("同一 "),i("code",null,"schema"),s(" 内只增加字段,不删除、不改含义;模块应忽略不认识的字段和事件类型。")]),i("li",null,[s("不兼容的变化会提升 "),i("code",null,"schema"),s(",并在 "),i("code",null,"CHANGELOG.md"),s(' 的"升级须知"中说明。')])])],-1),i("p",{class:"source-note"},[s("本页由仓库中的 "),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/notifier-event.md"},"contracts/notifier-event.md"),s(" 生成。"),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/notifier-event.md"},"在 GitHub 上编辑")],-1)])])}const c=e(a,[["render",h]]);export{u as __pageData,c as default};
|
|
24
|
+
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),i("ul",null,[i("li",null,[i("code",null,"audience"),s(":"),i("code",null,"requester"),s(" 表示这件事要需求方处理或是给他的结果("),i("code",null,"blocked"),s("、"),i("code",null,"approval"),s("、"),i("code",null,"phase_done"),s("、"),i("code",null,"completed"),s(",而且需求从卡片开始、知道提出人);其余为 "),i("code",null,"team"),s(",发到群里即可。")]),i("li",null,[i("code",null,"requester"),s("、"),i("code",null,"card"),s(":从卡片开始的需求的提出人和卡片;其他需求为 null。")]),i("li",null,[i("code",null,"recipients"),s(":"),i("code",null,"audience"),s(" 为 "),i("code",null,"requester"),s(" 时是需求方本人;"),i("code",null,"accounts"),s(" 来自本机或团队配置的 "),i("code",null,"people"),s("(姓名 → 各种账号),没有写时为 "),i("code",null,"{}"),s(",模块可以改发到群。")])]),i("table",{tabindex:"0"},[i("thead",null,[i("tr",null,[i("th",null,"type"),i("th",null,"什么时候"),i("th",null,"details")])]),i("tbody",null,[i("tr",null,[i("td",null,[i("code",null,"milestone")]),i("td",null,[s("方案确定、开始验证、开始修复缺陷(配置 "),i("code",null,"notifyMilestones"),s(" 为 true 时,每次尝试各一次)")]),i("td",null,[i("code",null,"milestone"),s(":"),i("code",null,"design-settled"),s("、"),i("code",null,"code-reviewed"),s("、"),i("code",null,"fixing-defects"),s("、"),i("code",null,"handback-<n>"),s("(1.7.0 起,测试验证第 n 次把缺陷退回研发)")])]),i("tr",null,[i("td",null,[i("code",null,"blocked")]),i("td",null,"方案审核发现需要需求方决定的问题,流水线已暂停"),i("td",null,[i("code",null,"questions"),s("(字符串数组)、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"permission")]),i("td",null,"步骤 agent 在等待权限批准"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"agentTitle"),s("、"),i("code",null,"requests"),s("(字符串数组)")])]),i("tr",null,[i("td",null,[i("code",null,"failed")]),i("td",null,"流水线因错误中断(已自动重试过的临时错误除外)"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"reason"),s("、"),i("code",null,"logPath"),s("、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"completed")]),i("td",null,"流水线结束,报告已生成"),i("td",null,[i("code",null,"outcome"),s("("),i("code",null,"completed"),s("、"),i("code",null,"completed_with_issues"),s("、"),i("code",null,"not_completed"),s(")、"),i("code",null,"summary"),s("、"),i("code",null,"reportPath"),s('。"只做研发"时另有 '),i("code",null,"mode"),s("("),i("code",null,"develop-only"),s(")和 "),i("code",null,"handoffPath"),s(",报告是研发报告,需要人工测试")])]),i("tr",null,[i("td",null,[i("code",null,"approval")]),i("td",null,[s("1.8.0 起。方案确认点("),i("code",null,"designApproval"),s('):方案已通过审核,等待需求方确认"做完后会看到什么",还没有开始写代码')]),i("td",null,[i("code",null,"previewPath"),s("(要确认的内容)、"),i("code",null,"approveCommand"),s("(确认后继续的命令)、"),i("code",null,"resumeCommand"),s("(修改需求后继续的命令),都在发起的对话中执行")])]),i("tr",null,[i("td",null,[i("code",null,"phase_done")]),i("td",null,"1.7.0 起。分阶段执行时研发阶段已完成(代码已通过评审、提测说明已写好),流水线停在闸口等待测试验证。测试退回后再次修完也会发"),i("td",null,[i("code",null,"handoffPath"),s("(提测说明)、"),i("code",null,"mode"),s("("),i("code",null,"gated"),s(")、"),i("code",null,"verifyCommand"),s("(开始测试验证的命令,在发起的对话中执行)、"),i("code",null,"verifyAt"),s("(预约的开始时间,ISO 格式,没有为 null)、"),i("code",null,"handbacks"),s("(已退回的次数)")])]),i("tr",null,[i("td",null,[i("code",null,"alert")]),i("td",null,[s("1.12 起。接单器("),i("code",null,"req factory"),s(")自检没有通过(Paseo 连不上、agent 没有登录、额度用完、需求管理系统的命令不可用),暂停接新卡片;或者恢复正常。同样的问题只发一次。"),i("code",null,"feature.title"),s(' 为"接单器",'),i("code",null,"feature.dir"),s("、"),i("code",null,"repo"),s(" 为空")]),i("td",null,[i("code",null,"source"),s("("),i("code",null,"factory"),s(")、"),i("code",null,"machine"),s("、"),i("code",null,"problems"),s("(字符串数组,恢复时为空)、"),i("code",null,"recovered"),s("。1.14 起,步骤 agent 运行或开始运行危险命令("),i("code",null,"dangerGuard"),s(")时也发:"),i("code",null,"details.kind"),s(" 为 "),i("code",null,"danger"),s(",另有 "),i("code",null,"stepTitle"),s("、"),i("code",null,"command"),s("、"),i("code",null,"label"),s("、"),i("code",null,"ran"),s(";这时 "),i("code",null,"feature"),s("、"),i("code",null,"repo"),s(" 是那个需求的")])]),i("tr",null,[i("td",null,[i("code",null,"digest")]),i("td",null,[i("code",null,"req digest --notify"),s("(或由 "),i("code",null,"req digest --schedule"),s(" 创建的 Paseo 定时任务)发送项目的需求总览,1.6.0 起。"),i("code",null,"feature.title"),s(' 为"<项目> 需求总览",'),i("code",null,"text"),s(" 是完整的多行总览")]),i("td",null,[i("code",null,"features"),s(":每个需求的 "),i("code",null,"name"),s("、"),i("code",null,"title"),s("、"),i("code",null,"stage"),s("、"),i("code",null,"branch"),s("、"),i("code",null,"updatedAt"),s("、"),i("code",null,"usage"),s(";"),i("code",null,"recurringLessons"),s("(1.8.0 起):在两个以上需求的 "),i("code",null,"lessons.tsv"),s(" 中出现的问题类别,每项 "),i("code",null,"category"),s("、"),i("code",null,"features"),s("、"),i("code",null,"rules")])])])]),i("h2",{id:"兼容性",tabindex:"-1"},[s("兼容性 "),i("a",{class:"header-anchor",href:"#兼容性","aria-label":'Permalink to "兼容性"'},"")]),i("ul",null,[i("li",null,[s("同一 "),i("code",null,"schema"),s(" 内只增加字段,不删除、不改含义;模块应忽略不认识的字段和事件类型。")]),i("li",null,[s("不兼容的变化会提升 "),i("code",null,"schema"),s(",并在 "),i("code",null,"CHANGELOG.md"),s(' 的"升级须知"中说明。')])])],-1),i("p",{class:"source-note"},[s("本页由仓库中的 "),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/notifier-event.md"},"contracts/notifier-event.md"),s(" 生成。"),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/notifier-event.md"},"在 GitHub 上编辑")],-1)])])}const c=e(a,[["render",h]]);export{u as __pageData,c as default};
|
|
@@ -21,4 +21,4 @@ import{_ as e,o as t,c as n,j as i,a as s}from"./chunks/framework.B9qR_F1m.js";c
|
|
|
21
21
|
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "requester"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"张广祥"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},",")]),s(`
|
|
22
22
|
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "card"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"system"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"ALM"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"id"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"CMASTER-BUSINESS#9902"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"url"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"null"),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," },")]),s(`
|
|
23
23
|
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "recipients"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": [{ "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"name"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"张广祥"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},", "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"accounts"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": { "),i("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},'"um"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),i("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"ZHANGGX001"'),i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," } }]")]),s(`
|
|
24
|
-
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),i("ul",null,[i("li",null,[i("code",null,"audience"),s(":"),i("code",null,"requester"),s(" 表示这件事要需求方处理或是给他的结果("),i("code",null,"blocked"),s("、"),i("code",null,"approval"),s("、"),i("code",null,"phase_done"),s("、"),i("code",null,"completed"),s(",而且需求从卡片开始、知道提出人);其余为 "),i("code",null,"team"),s(",发到群里即可。")]),i("li",null,[i("code",null,"requester"),s("、"),i("code",null,"card"),s(":从卡片开始的需求的提出人和卡片;其他需求为 null。")]),i("li",null,[i("code",null,"recipients"),s(":"),i("code",null,"audience"),s(" 为 "),i("code",null,"requester"),s(" 时是需求方本人;"),i("code",null,"accounts"),s(" 来自本机或团队配置的 "),i("code",null,"people"),s("(姓名 → 各种账号),没有写时为 "),i("code",null,"{}"),s(",模块可以改发到群。")])]),i("table",{tabindex:"0"},[i("thead",null,[i("tr",null,[i("th",null,"type"),i("th",null,"什么时候"),i("th",null,"details")])]),i("tbody",null,[i("tr",null,[i("td",null,[i("code",null,"milestone")]),i("td",null,[s("方案确定、开始验证、开始修复缺陷(配置 "),i("code",null,"notifyMilestones"),s(" 为 true 时,每次尝试各一次)")]),i("td",null,[i("code",null,"milestone"),s(":"),i("code",null,"design-settled"),s("、"),i("code",null,"code-reviewed"),s("、"),i("code",null,"fixing-defects"),s("、"),i("code",null,"handback-<n>"),s("(1.7.0 起,测试验证第 n 次把缺陷退回研发)")])]),i("tr",null,[i("td",null,[i("code",null,"blocked")]),i("td",null,"方案审核发现需要需求方决定的问题,流水线已暂停"),i("td",null,[i("code",null,"questions"),s("(字符串数组)、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"permission")]),i("td",null,"步骤 agent 在等待权限批准"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"agentTitle"),s("、"),i("code",null,"requests"),s("(字符串数组)")])]),i("tr",null,[i("td",null,[i("code",null,"failed")]),i("td",null,"流水线因错误中断(已自动重试过的临时错误除外)"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"reason"),s("、"),i("code",null,"logPath"),s("、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"completed")]),i("td",null,"流水线结束,报告已生成"),i("td",null,[i("code",null,"outcome"),s("("),i("code",null,"completed"),s("、"),i("code",null,"completed_with_issues"),s("、"),i("code",null,"not_completed"),s(")、"),i("code",null,"summary"),s("、"),i("code",null,"reportPath"),s('。"只做研发"时另有 '),i("code",null,"mode"),s("("),i("code",null,"develop-only"),s(")和 "),i("code",null,"handoffPath"),s(",报告是研发报告,需要人工测试")])]),i("tr",null,[i("td",null,[i("code",null,"approval")]),i("td",null,[s("1.8.0 起。方案确认点("),i("code",null,"designApproval"),s('):方案已通过审核,等待需求方确认"做完后会看到什么",还没有开始写代码')]),i("td",null,[i("code",null,"previewPath"),s("(要确认的内容)、"),i("code",null,"approveCommand"),s("(确认后继续的命令)、"),i("code",null,"resumeCommand"),s("(修改需求后继续的命令),都在发起的对话中执行")])]),i("tr",null,[i("td",null,[i("code",null,"phase_done")]),i("td",null,"1.7.0 起。分阶段执行时研发阶段已完成(代码已通过评审、提测说明已写好),流水线停在闸口等待测试验证。测试退回后再次修完也会发"),i("td",null,[i("code",null,"handoffPath"),s("(提测说明)、"),i("code",null,"mode"),s("("),i("code",null,"gated"),s(")、"),i("code",null,"verifyCommand"),s("(开始测试验证的命令,在发起的对话中执行)、"),i("code",null,"verifyAt"),s("(预约的开始时间,ISO 格式,没有为 null)、"),i("code",null,"handbacks"),s("(已退回的次数)")])]),i("tr",null,[i("td",null,[i("code",null,"alert")]),i("td",null,[s("1.12 起。接单器("),i("code",null,"req factory"),s(")自检没有通过(Paseo 连不上、agent 没有登录、额度用完、需求管理系统的命令不可用),暂停接新卡片;或者恢复正常。同样的问题只发一次。"),i("code",null,"feature.title"),s(' 为"接单器",'),i("code",null,"feature.dir"),s("、"),i("code",null,"repo"),s(" 为空")]),i("td",null,[i("code",null,"source"),s("("),i("code",null,"factory"),s(")、"),i("code",null,"machine"),s("、"),i("code",null,"problems"),s("(字符串数组,恢复时为空)、"),i("code",null,"recovered")])]),i("tr",null,[i("td",null,[i("code",null,"digest")]),i("td",null,[i("code",null,"req digest --notify"),s("(或由 "),i("code",null,"req digest --schedule"),s(" 创建的 Paseo 定时任务)发送项目的需求总览,1.6.0 起。"),i("code",null,"feature.title"),s(' 为"<项目> 需求总览",'),i("code",null,"text"),s(" 是完整的多行总览")]),i("td",null,[i("code",null,"features"),s(":每个需求的 "),i("code",null,"name"),s("、"),i("code",null,"title"),s("、"),i("code",null,"stage"),s("、"),i("code",null,"branch"),s("、"),i("code",null,"updatedAt"),s("、"),i("code",null,"usage"),s(";"),i("code",null,"recurringLessons"),s("(1.8.0 起):在两个以上需求的 "),i("code",null,"lessons.tsv"),s(" 中出现的问题类别,每项 "),i("code",null,"category"),s("、"),i("code",null,"features"),s("、"),i("code",null,"rules")])])])]),i("h2",{id:"兼容性",tabindex:"-1"},[s("兼容性 "),i("a",{class:"header-anchor",href:"#兼容性","aria-label":'Permalink to "兼容性"'},"")]),i("ul",null,[i("li",null,[s("同一 "),i("code",null,"schema"),s(" 内只增加字段,不删除、不改含义;模块应忽略不认识的字段和事件类型。")]),i("li",null,[s("不兼容的变化会提升 "),i("code",null,"schema"),s(",并在 "),i("code",null,"CHANGELOG.md"),s(' 的"升级须知"中说明。')])])],-1),i("p",{class:"source-note"},[s("本页由仓库中的 "),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/notifier-event.md"},"contracts/notifier-event.md"),s(" 生成。"),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/notifier-event.md"},"在 GitHub 上编辑")],-1)])])}const c=e(a,[["render",h]]);export{u as __pageData,c as default};
|
|
24
|
+
`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),i("ul",null,[i("li",null,[i("code",null,"audience"),s(":"),i("code",null,"requester"),s(" 表示这件事要需求方处理或是给他的结果("),i("code",null,"blocked"),s("、"),i("code",null,"approval"),s("、"),i("code",null,"phase_done"),s("、"),i("code",null,"completed"),s(",而且需求从卡片开始、知道提出人);其余为 "),i("code",null,"team"),s(",发到群里即可。")]),i("li",null,[i("code",null,"requester"),s("、"),i("code",null,"card"),s(":从卡片开始的需求的提出人和卡片;其他需求为 null。")]),i("li",null,[i("code",null,"recipients"),s(":"),i("code",null,"audience"),s(" 为 "),i("code",null,"requester"),s(" 时是需求方本人;"),i("code",null,"accounts"),s(" 来自本机或团队配置的 "),i("code",null,"people"),s("(姓名 → 各种账号),没有写时为 "),i("code",null,"{}"),s(",模块可以改发到群。")])]),i("table",{tabindex:"0"},[i("thead",null,[i("tr",null,[i("th",null,"type"),i("th",null,"什么时候"),i("th",null,"details")])]),i("tbody",null,[i("tr",null,[i("td",null,[i("code",null,"milestone")]),i("td",null,[s("方案确定、开始验证、开始修复缺陷(配置 "),i("code",null,"notifyMilestones"),s(" 为 true 时,每次尝试各一次)")]),i("td",null,[i("code",null,"milestone"),s(":"),i("code",null,"design-settled"),s("、"),i("code",null,"code-reviewed"),s("、"),i("code",null,"fixing-defects"),s("、"),i("code",null,"handback-<n>"),s("(1.7.0 起,测试验证第 n 次把缺陷退回研发)")])]),i("tr",null,[i("td",null,[i("code",null,"blocked")]),i("td",null,"方案审核发现需要需求方决定的问题,流水线已暂停"),i("td",null,[i("code",null,"questions"),s("(字符串数组)、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"permission")]),i("td",null,"步骤 agent 在等待权限批准"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"agentTitle"),s("、"),i("code",null,"requests"),s("(字符串数组)")])]),i("tr",null,[i("td",null,[i("code",null,"failed")]),i("td",null,"流水线因错误中断(已自动重试过的临时错误除外)"),i("td",null,[i("code",null,"stepTitle"),s("、"),i("code",null,"reason"),s("、"),i("code",null,"logPath"),s("、"),i("code",null,"resumeCommand")])]),i("tr",null,[i("td",null,[i("code",null,"completed")]),i("td",null,"流水线结束,报告已生成"),i("td",null,[i("code",null,"outcome"),s("("),i("code",null,"completed"),s("、"),i("code",null,"completed_with_issues"),s("、"),i("code",null,"not_completed"),s(")、"),i("code",null,"summary"),s("、"),i("code",null,"reportPath"),s('。"只做研发"时另有 '),i("code",null,"mode"),s("("),i("code",null,"develop-only"),s(")和 "),i("code",null,"handoffPath"),s(",报告是研发报告,需要人工测试")])]),i("tr",null,[i("td",null,[i("code",null,"approval")]),i("td",null,[s("1.8.0 起。方案确认点("),i("code",null,"designApproval"),s('):方案已通过审核,等待需求方确认"做完后会看到什么",还没有开始写代码')]),i("td",null,[i("code",null,"previewPath"),s("(要确认的内容)、"),i("code",null,"approveCommand"),s("(确认后继续的命令)、"),i("code",null,"resumeCommand"),s("(修改需求后继续的命令),都在发起的对话中执行")])]),i("tr",null,[i("td",null,[i("code",null,"phase_done")]),i("td",null,"1.7.0 起。分阶段执行时研发阶段已完成(代码已通过评审、提测说明已写好),流水线停在闸口等待测试验证。测试退回后再次修完也会发"),i("td",null,[i("code",null,"handoffPath"),s("(提测说明)、"),i("code",null,"mode"),s("("),i("code",null,"gated"),s(")、"),i("code",null,"verifyCommand"),s("(开始测试验证的命令,在发起的对话中执行)、"),i("code",null,"verifyAt"),s("(预约的开始时间,ISO 格式,没有为 null)、"),i("code",null,"handbacks"),s("(已退回的次数)")])]),i("tr",null,[i("td",null,[i("code",null,"alert")]),i("td",null,[s("1.12 起。接单器("),i("code",null,"req factory"),s(")自检没有通过(Paseo 连不上、agent 没有登录、额度用完、需求管理系统的命令不可用),暂停接新卡片;或者恢复正常。同样的问题只发一次。"),i("code",null,"feature.title"),s(' 为"接单器",'),i("code",null,"feature.dir"),s("、"),i("code",null,"repo"),s(" 为空")]),i("td",null,[i("code",null,"source"),s("("),i("code",null,"factory"),s(")、"),i("code",null,"machine"),s("、"),i("code",null,"problems"),s("(字符串数组,恢复时为空)、"),i("code",null,"recovered"),s("。1.14 起,步骤 agent 运行或开始运行危险命令("),i("code",null,"dangerGuard"),s(")时也发:"),i("code",null,"details.kind"),s(" 为 "),i("code",null,"danger"),s(",另有 "),i("code",null,"stepTitle"),s("、"),i("code",null,"command"),s("、"),i("code",null,"label"),s("、"),i("code",null,"ran"),s(";这时 "),i("code",null,"feature"),s("、"),i("code",null,"repo"),s(" 是那个需求的")])]),i("tr",null,[i("td",null,[i("code",null,"digest")]),i("td",null,[i("code",null,"req digest --notify"),s("(或由 "),i("code",null,"req digest --schedule"),s(" 创建的 Paseo 定时任务)发送项目的需求总览,1.6.0 起。"),i("code",null,"feature.title"),s(' 为"<项目> 需求总览",'),i("code",null,"text"),s(" 是完整的多行总览")]),i("td",null,[i("code",null,"features"),s(":每个需求的 "),i("code",null,"name"),s("、"),i("code",null,"title"),s("、"),i("code",null,"stage"),s("、"),i("code",null,"branch"),s("、"),i("code",null,"updatedAt"),s("、"),i("code",null,"usage"),s(";"),i("code",null,"recurringLessons"),s("(1.8.0 起):在两个以上需求的 "),i("code",null,"lessons.tsv"),s(" 中出现的问题类别,每项 "),i("code",null,"category"),s("、"),i("code",null,"features"),s("、"),i("code",null,"rules")])])])]),i("h2",{id:"兼容性",tabindex:"-1"},[s("兼容性 "),i("a",{class:"header-anchor",href:"#兼容性","aria-label":'Permalink to "兼容性"'},"")]),i("ul",null,[i("li",null,[s("同一 "),i("code",null,"schema"),s(" 内只增加字段,不删除、不改含义;模块应忽略不认识的字段和事件类型。")]),i("li",null,[s("不兼容的变化会提升 "),i("code",null,"schema"),s(",并在 "),i("code",null,"CHANGELOG.md"),s(' 的"升级须知"中说明。')])])],-1),i("p",{class:"source-note"},[s("本页由仓库中的 "),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/notifier-event.md"},"contracts/notifier-event.md"),s(" 生成。"),i("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/notifier-event.md"},"在 GitHub 上编辑")],-1)])])}const c=e(a,[["render",h]]);export{u as __pageData,c as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{_ as s,o as t,c as i,j as l,a as e}from"./chunks/framework.B9qR_F1m.js";const k=JSON.parse('{"title":"spec.md","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/spec.md","filePath":"reference/contracts/spec.md","lastUpdated":null}'),a={name:"reference/contracts/spec.md"};function d(c,n,r,
|
|
1
|
+
import{_ as s,o as t,c as i,j as l,a as e}from"./chunks/framework.B9qR_F1m.js";const k=JSON.parse('{"title":"spec.md","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/spec.md","filePath":"reference/contracts/spec.md","lastUpdated":null}'),a={name:"reference/contracts/spec.md"};function d(c,n,u,r,o,h){return t(),i("div",null,[...n[0]||(n[0]=[l("div",null,[l("h1",{id:"spec-md",tabindex:"-1"},[e("spec.md "),l("a",{class:"header-anchor",href:"#spec-md","aria-label":'Permalink to "spec.md"'},"")]),l("p",null,[e("需求说明,由 "),l("code",null,"/req"),e("("),l("code",null,"spec-writing"),e(" skill)按模板 "),l("code",null,"skills/spec-writing/spec-template.md"),e(" 写成,需求方确认后交给流水线。")]),l("h2",{id:"头部",tabindex:"-1"},[e("头部 "),l("a",{class:"header-anchor",href:"#头部","aria-label":'Permalink to "头部"'},"")]),l("div",{class:"language-markdown vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"markdown"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#005CC5","--shiki-light-font-weight":"bold","--shiki-dark":"#79B8FF","--shiki-dark-font-weight":"bold"}},"# <需求名称>")]),e(`
|
|
2
2
|
`),l("span",{class:"line"}),e(`
|
|
3
3
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 状态:已确认(2026-10-12)")]),e(`
|
|
4
4
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 档位:标准")]),e(`
|
|
5
5
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 执行方式:连续")]),e(`
|
|
6
6
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 类型:新需求")]),e(`
|
|
7
7
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 版本:1")]),e(`
|
|
8
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 格式:req-kit/spec@1")])])])]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"行"),l("th",null,"谁读"),l("th",null,"规则")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"- 状态:")]),l("td",null,"引擎"),l("td",null,[e('以"已确认"开头才能启动流水线。正则:'),l("code",null,"^\\s*-\\s*状态\\s*[::]\\s*已确认")])]),l("tr",null,[l("td",null,[l("code",null,"- 档位:")]),l("td",null,"引擎"),l("td",null,[e('"快速"或"标准"(也接受 '),l("code",null,"quick"),e(" / "),l("code",null,"standard"),e(")。没有时用配置中的 "),l("code",null,"defaultProfile")])]),l("tr",null,[l("td",null,[l("code",null,"- 执行方式:")]),l("td",null,"引擎"),l("td",null,[e('"连续"、"分阶段"或"只做研发"(也接受 '),l("code",null,"continuous"),e(" / "),l("code",null,"gated"),e(" / "),l("code",null,"develop-only"),e(")。可以没有;没有时用配置中的 "),l("code",null,"phases.mode"),e(",启动参数 "),l("code",null,"--phases"),e(" 优先(1.7 起)")])]),l("tr",null,[l("td",null,[l("code",null,"- 类型:")]),l("td",null,[e("引擎(1.8 起)、"),l("code",null,"/req")]),l("td",null,[e("新需求 / 小改动 / 缺陷 / 重构 / 评估(也接受 "),l("code",null,"defect"),e("、"),l("code",null,"bug"),e("、"),l("code",null,"refactor"),e("、"),l("code",null,"assessment"),e(';"技术改进"同重构,"调研"同评估)。缺陷、重构、评估按各自的做法运行('),l("code",null,"engine/prompts/types/"),e("),配置 "),l("code",null,"requirementTypes"),e(" 可以关掉某个类型;其他写法按新需求处理")])]),l("tr",null,[l("td",null,[l("code",null,"- 联合开发:")]),l("td",null,"引擎(1.8 起)"),l("td",null,[e("这个需求还要改的其他仓库,写项目配置 "),l("code",null,"relatedRepos"),e(" 中的名称,最多两个,用顿号分开。可以没有。见 ADR 0025")])]),l("tr",null,[l("td",null,[l("code",null,"- 版本:")]),l("td",null,[l("code",null,"/req")]),l("td",null,"从 1 开始,每次修改需求加 1")]),l("tr",null,[l("td",null,[l("code",null,"- 格式:")]),l("td",null,[l("code",null,"/req"),e("、引擎(将来)")]),l("td",null,[l("code",null,"req-kit/spec@<n>"),e("。没有这一行的旧 spec 按 "),l("code",null,"req-kit/spec@1"),e(" 处理")])])])]),l("h2",{id:"正文中被引用的编号",tabindex:"-1"},[e("正文中被引用的编号 "),l("a",{class:"header-anchor",href:"#正文中被引用的编号","aria-label":'Permalink to "正文中被引用的编号"'},"")]),l("ul",null,[l("li",null,[e("功能需求 "),l("code",null,"FR-<n>"),e(",验收标准 "),l("code",null,"AC-<n>.<m>"),e(",规则 "),l("code",null,"BR-<n>"),e(",假设 "),l("code",null,"A-<n>"),e("。")]),l("li",null,[e("每条验收标准至少带一组具体的输入和期望输出(1.8 起由 "),l("code",null,"acceptance-criteria"),e("、需求说明审阅检查);方案的测试直接用这些例子作为期望值。")]),l("li",null,'流水线各步骤和最终报告按这些编号引用,编号一旦确认就不要重排;删除的需求保留编号并注明"已取消"。')]),l("h2",{id:"变更",tabindex:"-1"},[e("变更 "),l("a",{class:"header-anchor",href:"#变更","aria-label":'Permalink to "变更"'},"")]),l("ul",null,[l("li",null,"spec 的内容哈希记录在状态文件中。spec 在流水线中断后被修改,续跑时从方案设计重新开始。")])],-1),l("p",{class:"source-note"},[e("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/spec.md"},"contracts/spec.md"),e(" 生成。"),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/spec.md"},"在 GitHub 上编辑")],-1)])])}const m=s(a,[["render",d]]);export{k as __pageData,m as default};
|
|
8
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 格式:req-kit/spec@1")])])])]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"行"),l("th",null,"谁读"),l("th",null,"规则")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"- 状态:")]),l("td",null,"引擎"),l("td",null,[e('以"已确认"开头才能启动流水线。正则:'),l("code",null,"^\\s*-\\s*状态\\s*[::]\\s*已确认")])]),l("tr",null,[l("td",null,[l("code",null,"- 档位:")]),l("td",null,"引擎"),l("td",null,[e('"快速"或"标准"(也接受 '),l("code",null,"quick"),e(" / "),l("code",null,"standard"),e(")。没有时用配置中的 "),l("code",null,"defaultProfile")])]),l("tr",null,[l("td",null,[l("code",null,"- 执行方式:")]),l("td",null,"引擎"),l("td",null,[e('"连续"、"分阶段"或"只做研发"(也接受 '),l("code",null,"continuous"),e(" / "),l("code",null,"gated"),e(" / "),l("code",null,"develop-only"),e(")。可以没有;没有时用配置中的 "),l("code",null,"phases.mode"),e(",启动参数 "),l("code",null,"--phases"),e(" 优先(1.7 起)")])]),l("tr",null,[l("td",null,[l("code",null,"- 类型:")]),l("td",null,[e("引擎(1.8 起)、"),l("code",null,"/req")]),l("td",null,[e("新需求 / 小改动 / 缺陷 / 重构 / 评估(也接受 "),l("code",null,"defect"),e("、"),l("code",null,"bug"),e("、"),l("code",null,"refactor"),e("、"),l("code",null,"assessment"),e(';"技术改进"同重构,"调研"同评估)。缺陷、重构、评估按各自的做法运行('),l("code",null,"engine/prompts/types/"),e("),配置 "),l("code",null,"requirementTypes"),e(" 可以关掉某个类型;其他写法按新需求处理")])]),l("tr",null,[l("td",null,[l("code",null,"- 联合开发:")]),l("td",null,"引擎(1.8 起)"),l("td",null,[e("这个需求还要改的其他仓库,写项目配置 "),l("code",null,"relatedRepos"),e(" 中的名称,最多两个,用顿号分开。可以没有。见 ADR 0025")])]),l("tr",null,[l("td",null,[l("code",null,"- 引入问题的需求:")]),l("td",null,[l("code",null,"req stats"),e("、"),l("code",null,"req outcome"),e("(1.14 起)")]),l("td",null,'缺陷需求才写:引入这个问题的需求的目录名(或功能目录、标题)。记为那个需求"合并后发现的问题"。可以没有')]),l("tr",null,[l("td",null,[l("code",null,"- 版本:")]),l("td",null,[l("code",null,"/req")]),l("td",null,"从 1 开始,每次修改需求加 1")]),l("tr",null,[l("td",null,[l("code",null,"- 格式:")]),l("td",null,[l("code",null,"/req"),e("、引擎(将来)")]),l("td",null,[l("code",null,"req-kit/spec@<n>"),e("。没有这一行的旧 spec 按 "),l("code",null,"req-kit/spec@1"),e(" 处理")])])])]),l("h2",{id:"正文中被引用的编号",tabindex:"-1"},[e("正文中被引用的编号 "),l("a",{class:"header-anchor",href:"#正文中被引用的编号","aria-label":'Permalink to "正文中被引用的编号"'},"")]),l("ul",null,[l("li",null,[e("功能需求 "),l("code",null,"FR-<n>"),e(",验收标准 "),l("code",null,"AC-<n>.<m>"),e(",规则 "),l("code",null,"BR-<n>"),e(",假设 "),l("code",null,"A-<n>"),e("。")]),l("li",null,[e("每条验收标准至少带一组具体的输入和期望输出(1.8 起由 "),l("code",null,"acceptance-criteria"),e("、需求说明审阅检查);方案的测试直接用这些例子作为期望值。")]),l("li",null,'流水线各步骤和最终报告按这些编号引用,编号一旦确认就不要重排;删除的需求保留编号并注明"已取消"。')]),l("h2",{id:"变更",tabindex:"-1"},[e("变更 "),l("a",{class:"header-anchor",href:"#变更","aria-label":'Permalink to "变更"'},"")]),l("ul",null,[l("li",null,"spec 的内容哈希记录在状态文件中。spec 在流水线中断后被修改,续跑时从方案设计重新开始。")])],-1),l("p",{class:"source-note"},[e("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/spec.md"},"contracts/spec.md"),e(" 生成。"),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/spec.md"},"在 GitHub 上编辑")],-1)])])}const m=s(a,[["render",d]]);export{k as __pageData,m as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{_ as s,o as t,c as i,j as l,a as e}from"./chunks/framework.B9qR_F1m.js";const k=JSON.parse('{"title":"spec.md","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/spec.md","filePath":"reference/contracts/spec.md","lastUpdated":null}'),a={name:"reference/contracts/spec.md"};function d(c,n,r,
|
|
1
|
+
import{_ as s,o as t,c as i,j as l,a as e}from"./chunks/framework.B9qR_F1m.js";const k=JSON.parse('{"title":"spec.md","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/spec.md","filePath":"reference/contracts/spec.md","lastUpdated":null}'),a={name:"reference/contracts/spec.md"};function d(c,n,u,r,o,h){return t(),i("div",null,[...n[0]||(n[0]=[l("div",null,[l("h1",{id:"spec-md",tabindex:"-1"},[e("spec.md "),l("a",{class:"header-anchor",href:"#spec-md","aria-label":'Permalink to "spec.md"'},"")]),l("p",null,[e("需求说明,由 "),l("code",null,"/req"),e("("),l("code",null,"spec-writing"),e(" skill)按模板 "),l("code",null,"skills/spec-writing/spec-template.md"),e(" 写成,需求方确认后交给流水线。")]),l("h2",{id:"头部",tabindex:"-1"},[e("头部 "),l("a",{class:"header-anchor",href:"#头部","aria-label":'Permalink to "头部"'},"")]),l("div",{class:"language-markdown vp-adaptive-theme"},[l("button",{title:"Copy Code",class:"copy"}),l("span",{class:"lang"},"markdown"),l("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[l("code",null,[l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#005CC5","--shiki-light-font-weight":"bold","--shiki-dark":"#79B8FF","--shiki-dark-font-weight":"bold"}},"# <需求名称>")]),e(`
|
|
2
2
|
`),l("span",{class:"line"}),e(`
|
|
3
3
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 状态:已确认(2026-10-12)")]),e(`
|
|
4
4
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 档位:标准")]),e(`
|
|
5
5
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 执行方式:连续")]),e(`
|
|
6
6
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 类型:新需求")]),e(`
|
|
7
7
|
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 版本:1")]),e(`
|
|
8
|
-
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 格式:req-kit/spec@1")])])])]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"行"),l("th",null,"谁读"),l("th",null,"规则")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"- 状态:")]),l("td",null,"引擎"),l("td",null,[e('以"已确认"开头才能启动流水线。正则:'),l("code",null,"^\\s*-\\s*状态\\s*[::]\\s*已确认")])]),l("tr",null,[l("td",null,[l("code",null,"- 档位:")]),l("td",null,"引擎"),l("td",null,[e('"快速"或"标准"(也接受 '),l("code",null,"quick"),e(" / "),l("code",null,"standard"),e(")。没有时用配置中的 "),l("code",null,"defaultProfile")])]),l("tr",null,[l("td",null,[l("code",null,"- 执行方式:")]),l("td",null,"引擎"),l("td",null,[e('"连续"、"分阶段"或"只做研发"(也接受 '),l("code",null,"continuous"),e(" / "),l("code",null,"gated"),e(" / "),l("code",null,"develop-only"),e(")。可以没有;没有时用配置中的 "),l("code",null,"phases.mode"),e(",启动参数 "),l("code",null,"--phases"),e(" 优先(1.7 起)")])]),l("tr",null,[l("td",null,[l("code",null,"- 类型:")]),l("td",null,[e("引擎(1.8 起)、"),l("code",null,"/req")]),l("td",null,[e("新需求 / 小改动 / 缺陷 / 重构 / 评估(也接受 "),l("code",null,"defect"),e("、"),l("code",null,"bug"),e("、"),l("code",null,"refactor"),e("、"),l("code",null,"assessment"),e(';"技术改进"同重构,"调研"同评估)。缺陷、重构、评估按各自的做法运行('),l("code",null,"engine/prompts/types/"),e("),配置 "),l("code",null,"requirementTypes"),e(" 可以关掉某个类型;其他写法按新需求处理")])]),l("tr",null,[l("td",null,[l("code",null,"- 联合开发:")]),l("td",null,"引擎(1.8 起)"),l("td",null,[e("这个需求还要改的其他仓库,写项目配置 "),l("code",null,"relatedRepos"),e(" 中的名称,最多两个,用顿号分开。可以没有。见 ADR 0025")])]),l("tr",null,[l("td",null,[l("code",null,"- 版本:")]),l("td",null,[l("code",null,"/req")]),l("td",null,"从 1 开始,每次修改需求加 1")]),l("tr",null,[l("td",null,[l("code",null,"- 格式:")]),l("td",null,[l("code",null,"/req"),e("、引擎(将来)")]),l("td",null,[l("code",null,"req-kit/spec@<n>"),e("。没有这一行的旧 spec 按 "),l("code",null,"req-kit/spec@1"),e(" 处理")])])])]),l("h2",{id:"正文中被引用的编号",tabindex:"-1"},[e("正文中被引用的编号 "),l("a",{class:"header-anchor",href:"#正文中被引用的编号","aria-label":'Permalink to "正文中被引用的编号"'},"")]),l("ul",null,[l("li",null,[e("功能需求 "),l("code",null,"FR-<n>"),e(",验收标准 "),l("code",null,"AC-<n>.<m>"),e(",规则 "),l("code",null,"BR-<n>"),e(",假设 "),l("code",null,"A-<n>"),e("。")]),l("li",null,[e("每条验收标准至少带一组具体的输入和期望输出(1.8 起由 "),l("code",null,"acceptance-criteria"),e("、需求说明审阅检查);方案的测试直接用这些例子作为期望值。")]),l("li",null,'流水线各步骤和最终报告按这些编号引用,编号一旦确认就不要重排;删除的需求保留编号并注明"已取消"。')]),l("h2",{id:"变更",tabindex:"-1"},[e("变更 "),l("a",{class:"header-anchor",href:"#变更","aria-label":'Permalink to "变更"'},"")]),l("ul",null,[l("li",null,"spec 的内容哈希记录在状态文件中。spec 在流水线中断后被修改,续跑时从方案设计重新开始。")])],-1),l("p",{class:"source-note"},[e("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/spec.md"},"contracts/spec.md"),e(" 生成。"),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/spec.md"},"在 GitHub 上编辑")],-1)])])}const m=s(a,[["render",d]]);export{k as __pageData,m as default};
|
|
8
|
+
`),l("span",{class:"line"},[l("span",{style:{"--shiki-light":"#E36209","--shiki-dark":"#FFAB70"}},"-"),l("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}}," 格式:req-kit/spec@1")])])])]),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"行"),l("th",null,"谁读"),l("th",null,"规则")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"- 状态:")]),l("td",null,"引擎"),l("td",null,[e('以"已确认"开头才能启动流水线。正则:'),l("code",null,"^\\s*-\\s*状态\\s*[::]\\s*已确认")])]),l("tr",null,[l("td",null,[l("code",null,"- 档位:")]),l("td",null,"引擎"),l("td",null,[e('"快速"或"标准"(也接受 '),l("code",null,"quick"),e(" / "),l("code",null,"standard"),e(")。没有时用配置中的 "),l("code",null,"defaultProfile")])]),l("tr",null,[l("td",null,[l("code",null,"- 执行方式:")]),l("td",null,"引擎"),l("td",null,[e('"连续"、"分阶段"或"只做研发"(也接受 '),l("code",null,"continuous"),e(" / "),l("code",null,"gated"),e(" / "),l("code",null,"develop-only"),e(")。可以没有;没有时用配置中的 "),l("code",null,"phases.mode"),e(",启动参数 "),l("code",null,"--phases"),e(" 优先(1.7 起)")])]),l("tr",null,[l("td",null,[l("code",null,"- 类型:")]),l("td",null,[e("引擎(1.8 起)、"),l("code",null,"/req")]),l("td",null,[e("新需求 / 小改动 / 缺陷 / 重构 / 评估(也接受 "),l("code",null,"defect"),e("、"),l("code",null,"bug"),e("、"),l("code",null,"refactor"),e("、"),l("code",null,"assessment"),e(';"技术改进"同重构,"调研"同评估)。缺陷、重构、评估按各自的做法运行('),l("code",null,"engine/prompts/types/"),e("),配置 "),l("code",null,"requirementTypes"),e(" 可以关掉某个类型;其他写法按新需求处理")])]),l("tr",null,[l("td",null,[l("code",null,"- 联合开发:")]),l("td",null,"引擎(1.8 起)"),l("td",null,[e("这个需求还要改的其他仓库,写项目配置 "),l("code",null,"relatedRepos"),e(" 中的名称,最多两个,用顿号分开。可以没有。见 ADR 0025")])]),l("tr",null,[l("td",null,[l("code",null,"- 引入问题的需求:")]),l("td",null,[l("code",null,"req stats"),e("、"),l("code",null,"req outcome"),e("(1.14 起)")]),l("td",null,'缺陷需求才写:引入这个问题的需求的目录名(或功能目录、标题)。记为那个需求"合并后发现的问题"。可以没有')]),l("tr",null,[l("td",null,[l("code",null,"- 版本:")]),l("td",null,[l("code",null,"/req")]),l("td",null,"从 1 开始,每次修改需求加 1")]),l("tr",null,[l("td",null,[l("code",null,"- 格式:")]),l("td",null,[l("code",null,"/req"),e("、引擎(将来)")]),l("td",null,[l("code",null,"req-kit/spec@<n>"),e("。没有这一行的旧 spec 按 "),l("code",null,"req-kit/spec@1"),e(" 处理")])])])]),l("h2",{id:"正文中被引用的编号",tabindex:"-1"},[e("正文中被引用的编号 "),l("a",{class:"header-anchor",href:"#正文中被引用的编号","aria-label":'Permalink to "正文中被引用的编号"'},"")]),l("ul",null,[l("li",null,[e("功能需求 "),l("code",null,"FR-<n>"),e(",验收标准 "),l("code",null,"AC-<n>.<m>"),e(",规则 "),l("code",null,"BR-<n>"),e(",假设 "),l("code",null,"A-<n>"),e("。")]),l("li",null,[e("每条验收标准至少带一组具体的输入和期望输出(1.8 起由 "),l("code",null,"acceptance-criteria"),e("、需求说明审阅检查);方案的测试直接用这些例子作为期望值。")]),l("li",null,'流水线各步骤和最终报告按这些编号引用,编号一旦确认就不要重排;删除的需求保留编号并注明"已取消"。')]),l("h2",{id:"变更",tabindex:"-1"},[e("变更 "),l("a",{class:"header-anchor",href:"#变更","aria-label":'Permalink to "变更"'},"")]),l("ul",null,[l("li",null,"spec 的内容哈希记录在状态文件中。spec 在流水线中断后被修改,续跑时从方案设计重新开始。")])],-1),l("p",{class:"source-note"},[e("本页由仓库中的 "),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/spec.md"},"contracts/spec.md"),e(" 生成。"),l("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/spec.md"},"在 GitHub 上编辑")],-1)])])}const m=s(a,[["render",d]]);export{k as __pageData,m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as d,o,c as t,a3 as c}from"./chunks/framework.B9qR_F1m.js";const m=JSON.parse('{"title":"state.json","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/state.md","filePath":"reference/contracts/state.md","lastUpdated":null}'),r={name:"reference/contracts/state.md"};function a(s,e,n,i,l,u){return o(),t("div",null,[...e[0]||(e[0]=[c('<div><h1 id="state-json" tabindex="-1">state.json <a class="header-anchor" href="#state-json" aria-label="Permalink to "state.json""></a></h1><p>流水线的运行状态,位于 <code>docs/features/<目录>/.pipeline/state.json</code>,只由引擎写入,不提交。</p><h2 id="当前格式-version-1" tabindex="-1">当前格式:version 1 <a class="header-anchor" href="#当前格式-version-1" aria-label="Permalink to "当前格式:version 1""></a></h2><table tabindex="0"><thead><tr><th>字段</th><th>类型</th><th>含义</th></tr></thead><tbody><tr><td><code>version</code></td><td>number</td><td>格式版本。没有这个字段的文件按 1 处理</td></tr><tr><td><code>repo</code></td><td>string</td><td>仓库目录(绝对路径)</td></tr><tr><td><code>featureDir</code></td><td>string</td><td>功能目录(相对路径,<code>/</code> 分隔)</td></tr><tr><td><code>status</code></td><td><code>running</code> | <code>waiting_for_business</code> | <code>failed</code> | <code>completed</code> | <code>phase_done</code> | <code>waiting_for_approval</code></td><td>当前状态。<code>waiting_for_business</code> 表示等待需求方决定;<code>phase_done</code>(1.7.0 起)表示研发阶段已完成、停在闸口等待测试验证;<code>waiting_for_approval</code>(1.8.0 起)表示方案已通过审核、等待需求方确认 <code>preview.md</code>,<code>--approve</code> 继续。旧引擎把不认识的状态当作可以继续的中断:<code>phase_done</code> 继续时直接做验证,<code>waiting_for_approval</code> 继续时不经确认直接写代码</td></tr><tr><td><code>attempt</code></td><td>number</td><td>第几次从方案设计开始</td></tr><tr><td><code>specHash</code></td><td>string</td><td>启动时 spec.md 的 sha256</td></tr><tr><td><code>originAgentId</code></td><td>string | null</td><td>发起对话的 agent,通知发往这里</td></tr><tr><td><code>pid</code></td><td>number</td><td>流水线进程</td></tr><tr><td><code>startedAt</code> / <code>updatedAt</code></td><td>ISO 时间</td><td></td></tr><tr><td><code>results</code></td><td>object</td><td>已完成步骤的结果,键为步骤键(如 <code>code_review-r2</code>)</td></tr><tr><td><code>history</code></td><td>array</td><td>每次步骤执行的记录:agent、起止时间、结果、错误;<code>usage</code>(可选,1.3.0 起)为 agent 报告的用量:<code>inputTokens</code>、<code>cachedInputTokens</code>、<code>outputTokens</code>、<code>totalCostUsd</code>,agent 没有报告时为 null 或缺少;<code>leftRunning</code>(可选,1.11 起)为 true 表示失败时 agent 可能还在运行,下一次运行这一步时先看它;<code>reattached</code>(可选,1.11 起)为接着等上一次 agent 的次数</td></tr><tr><td><code>stopReason</code> / <code>outcome</code></td><td>string | null</td><td>停止原因;最终结论</td></tr><tr><td><code>stopKind</code></td><td>string | null</td><td>可选,1.12 起。停下等人的原因代码:必要的决定 <code>approval</code>(确认方案)、<code>phase_gate</code>(研发完成,等待测试)、<code>business</code>(需求方决定)、<code>reproduce</code>(缺陷复现不了);中断 <code>timeout</code>、<code>agent_error</code>、<code>invalid_result</code>、<code>transient</code>、<code>stopped</code>、<code>process_exit</code>、<code>budget</code>(1.13,用完 token 预算)、<code>other</code>。运行中或完成时为 null</td></tr><tr><td><code>budget</code></td><td>object</td><td>可选,1.13 起,配置了 <code>budget.tokens</code> 时。<code>{ allowance, warnedAt }</code>:停下前允许用到的 tokens(预算,每次用完后继续再加一份);已经提醒过的那一档</td></tr><tr><td><code>waitingPermission</code></td><td>object | null</td><td>可选,1.13 起。步骤 agent 在等权限批准时:<code>{ agentId, stepTitle, requests, since }</code>;没有在等时为 null</td></tr><tr><td><code>recoveries</code></td><td>array</td><td>可选,1.12 起。流水线自己处理掉的问题(最多保留 200 条):<code>at</code>、<code>key</code>(步骤键)、<code>kind</code>(<code>retry</code> 重试 / <code>reattach</code> 接着等上一次的 agent / <code>reuse_result</code> 沿用上一次 agent 的结果 / <code>extend_timeout</code> 超时后多等一轮 / <code>redo</code> 新开 agent 重做 / <code>fallback</code> 换备用模型 / <code>auto_resume</code> 预约自动继续 / <code>quota_wait</code> 预约在额度恢复后继续 / <code>self_answer</code> 方案审核的问题由 builder 自答 / <code>stop_scan</code> 打断了搜索大目录的命令,1.13 起)、<code>detail</code></td></tr><tr><td><code>dangers</code></td><td>array</td><td>可选,1.14 起。步骤 agent 运行(或开始运行)的危险命令(<code>dangerGuard</code>,最多保留 50 条):<code>at</code>、<code>key</code>(步骤键)、<code>stepTitle</code>、<code>command</code>、<code>label</code>(如"推送到远程仓库")、<code>ran</code>(发现时已经运行完为 true,正在运行、已打断为 false)、<code>agentId</code>、<code>callId</code>(同一个调用只处理一次)</td></tr><tr><td><code>secretScans</code></td><td>array</td><td>可选,1.14 起。改代码的步骤之后的密钥扫描(<code>secretScan</code>),每个步骤、每次尝试保留最新一次:<code>key</code>、<code>attempt</code>、<code>at</code>、<code>findings</code>(<code>{ file, line, commit, kind, preview }</code>,<code>preview</code> 里的值已遮住)、<code>fixRounds</code>、<code>passed</code></td></tr><tr><td><code>profile</code></td><td><code>quick</code> | <code>standard</code></td><td>档位</td></tr><tr><td><code>branch</code></td><td>string | null</td><td>工作分支,启动时确定</td></tr><tr><td><code>milestones</code></td><td>string[]</td><td>已发送的进展通知,续跑时不重复发送</td></tr><tr><td><code>incremental</code></td><td>object | null</td><td>可选,1.3.0 起。需求变更或回答问题后的继续:<code>fromAttempt</code>(接着哪一次)、<code>reason</code>、<code>baseCommit</code>(本次开始时的提交,评审看这之后的改动)、<code>hadImplementation</code>(上一次是否已写过代码)。第一次运行和 <code>--restart</code> 为 null</td></tr><tr><td><code>worktree</code></td><td>object | null</td><td>可选,1.5.0 起。用 <code>--worktree</code> 启动、在为需求新建的工作区中开发时:<code>workspaceId</code>(Paseo 工作区)、<code>sourceRepo</code>(对话所在的目录)。此时 <code>repo</code> 是新工作区的目录</td></tr><tr><td><code>schedules</code></td><td>array</td><td>可选,1.6.0 起。这次运行创建的 Paseo 定时任务:<code>id</code>、<code>kind</code>(<code>reminder</code> 提醒 / <code>auto-resume</code> 自动继续 / <code>watchdog</code> 定时检查)、<code>at</code>。下一次运行或暂停命令会取消它们</td></tr><tr><td><code>autoResumes</code></td><td>object | null</td><td>可选,1.6.0 起。<code>attempt</code>、<code>count</code>:这次尝试已经预约过几次自动继续</td></tr><tr><td><code>queuedSince</code></td><td>string | null</td><td>可选,1.6.0 起。正在排队(<code>maxConcurrentPipelines</code>)时为开始排队的时间</td></tr><tr><td><code>phases</code></td><td>object | null</td><td>可选,1.7.0 起。这次运行的执行方式:<code>mode</code>(<code>continuous</code> / <code>gated</code> / <code>develop-only</code>)、<code>environment</code>(<code>local</code> / <code>deployed</code>)、<code>defects</code>(<code>fix</code> / <code>handback</code> / <code>report</code>)。没有时按 <code>continuous</code>、<code>local</code>、<code>fix</code> 处理</td></tr><tr><td><code>phase</code></td><td><code>develop</code> | <code>verify</code></td><td>可选,1.7.0 起。当前阶段。用字符串而不是编号,以后增加阶段不用改格式</td></tr><tr><td><code>verifyAt</code></td><td>string | null</td><td>可选,1.7.0 起。<code>--verify-at</code>:研发完成后在这个时间开始测试验证</td></tr><tr><td><code>handbacks</code></td><td>number</td><td>可选,1.7.0 起。测试验证把缺陷退回研发阶段的次数(<code>defects</code> 为 <code>handback</code>),上限为档位的 <code>defectFix</code> 轮数</td></tr><tr><td><code>type</code></td><td><code>defect</code> | <code>refactor</code> | <code>assessment</code> | null</td><td>可选,1.8.0 起。spec 中"类型"对应的做法;新需求、小改动和配置关掉的类型为 null</td></tr><tr><td><code>codeBase</code></td><td>object | null</td><td>可选,1.8.0 起。<code>attempt</code>、<code>commit</code>:这次尝试在改动任何代码之前的提交,质量门的基线和范围检查从这里比较。尝试开始时就已经写过代码的旧记录为 <code>commit: null</code></td></tr><tr><td><code>joint</code></td><td>array | null</td><td>可选,1.8.0 起。联合需求(spec 的 <code>- 联合开发:</code>)中其他仓库的工作区:<code>name</code>(<code>relatedRepos</code> 中的名称)、<code>slug</code>(步骤键的后缀,如 <code>implement@backend</code>)、<code>sourceRepo</code>(切出工作区的那份检出)、<code>repo</code>(工作区目录)、<code>workspaceId</code>、<code>branch</code>、<code>specHash</code>(最近一次同步过去的 spec),以及这个仓库自己的 <code>codeBase</code> 和 <code>gate</code>(格式同顶层)。见 ADR 0025</td></tr><tr><td><code>approval</code></td><td>object | null</td><td>可选,1.8.0 起。方案确认点:<code>attempt</code>(哪一次尝试的方案)、<code>status</code>(<code>waiting</code> / <code>approved</code>)、<code>at</code>。需求变更后的新尝试需要重新确认</td></tr><tr><td><code>external</code></td><td>object | null</td><td>可选,1.9.0 起。外部系统中的卡片,按集成名称:<code>id</code>(卡片编号)、<code>url</code>、<code>status</code>(最近设置的状态)、<code>syncedAt</code>、<code>pending</code>(没有成功、等待补发的调用:<code>action</code> 为 <code>create</code> / <code>status</code>、<code>event</code>、<code>status</code>、<code>at</code>、<code>attempts</code>、<code>error</code>)。见 ADR 0028</td></tr><tr><td><code>pushed</code></td><td>array | null</td><td>可选,1.10 起。从卡片开始、配置了 <code>push</code> 的需求推送过的分支,每个仓库一条(主仓库在前):<code>repo</code>、<code>remote</code>、<code>branch</code>、<code>at</code>、<code>error</code>(成功时为 null;1.14 起,发现疑似密钥时不推送,<code>error</code> 写明原因)。见 ADR 0029</td></tr><tr><td><code>gate</code></td><td>object | null</td><td>可选,1.8.0 起。质量门:<code>baseline</code>(<code>attempt</code>、<code>commit</code>、<code>at</code>、<code>results</code>:每项检查改动前 <code>pass</code> / <code>fail</code>),<code>runs</code>(每次运行:<code>key</code> 步骤键、<code>attempt</code>、<code>at</code>、<code>checks</code>(<code>name</code>、<code>result</code>:<code>pass</code> / <code>fail</code> / <code>skipped</code>、<code>failedBefore</code>)、<code>newFailures</code>、<code>fixRounds</code>、<code>passed</code>)。各次运行的完整输出在 <code>.pipeline/checks/<步骤键>/</code></td></tr></tbody></table><p><code>schedules[].kind</code> 在 1.7.0 起还可能是 <code>verify-start</code>(<code>--verify-at</code> 预约的测试验证开始),1.8.0 起还可能是 <code>approval-continue</code>(方案确认超时后按方案继续,<code>designApproval.autoContinueHours</code>)。<code>history</code> 中每条步骤记录在 1.7.0 起有可选的 <code>phase</code>(<code>develop</code> / <code>verify</code>),用于按阶段统计用时与用量;没有时按研发阶段统计。</p><h2 id="迁移" tabindex="-1">迁移 <a class="header-anchor" href="#迁移" aria-label="Permalink to "迁移""></a></h2><p>只增加可选字段(缺少时按默认值处理,旧版本引擎读到也不出错)时不提升版本,以便回滚到旧版本后仍能继续已有的流水线;在上表中注明"可选"和起始版本即可。</p><p>引擎(<code>engine/src/state.ts</code>)中 <code>STATE_VERSION</code> 是当前版本,<code>STATE_MIGRATIONS[n]</code> 把第 n 版升级到第 n+1 版。增加必需字段或改变已有字段的含义时:</p><ol><li><code>STATE_VERSION</code> 加 1。</li><li>在 <code>STATE_MIGRATIONS</code> 中加一个从旧版本到新版本的函数,为旧文件补上默认值。</li><li>在 <code>engine/test/state.test.ts</code> 中加一条迁移测试,更新本文件。</li></ol></div><p class="source-note">本页由仓库中的 <a href="https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/state.md">contracts/state.md</a> 生成。<a href="https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/state.md">在 GitHub 上编辑</a></p>',2)])])}const h=d(r,[["render",a]]);export{m as __pageData,h as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as
|
|
1
|
+
import{_ as s,o as t,c as i,j as e,a as l}from"./chunks/framework.B9qR_F1m.js";const p=JSON.parse('{"title":"本机的需求索引与使用记录","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"reference/contracts/usage-record.md","filePath":"reference/contracts/usage-record.md","lastUpdated":null}'),d={name:"reference/contracts/usage-record.md"};function a(o,n,u,c,r,h){return t(),i("div",null,[...n[0]||(n[0]=[e("div",null,[e("h1",{id:"本机的需求索引与使用记录",tabindex:"-1"},[l("本机的需求索引与使用记录 "),e("a",{class:"header-anchor",href:"#本机的需求索引与使用记录","aria-label":'Permalink to "本机的需求索引与使用记录"'},"")]),e("p",null,[l("1.9.0 起,引擎在本机配置目录(默认 "),e("code",null,"~/.req-kit"),l(",可用 "),e("code",null,"REQ_KIT_HOME"),l(" 改变)下记两样东西。它们只在这台机器上,不提交进任何仓库,也不会自动发往任何地方。环境变量 "),e("code",null,"REQ_KIT_NO_RECORD=1"),l(" 时两样都不记(评估运行就是这样)。")]),e("h2",{id:"需求索引-index-key-json",tabindex:"-1"},[l("需求索引 "),e("code",null,"index/<key>.json"),l(),e("a",{class:"header-anchor",href:"#需求索引-index-key-json","aria-label":'Permalink to "需求索引 `index/<key>.json`"'},"")]),e("p",null,[l("每个在本机运行过的需求一个文件,记录它在哪里,供 "),e("code",null,"req api list --all"),l(" 和 Paseo 插件找到本机所有的需求。需求的阶段、进度仍然现场从功能目录读取(ADR 0010)。")]),e("div",{class:"language-json vp-adaptive-theme"},[e("button",{title:"Copy Code",class:"copy"}),e("span",{class:"lang"},"json"),e("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0","v-pre":""},[e("code",null,[e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"{")]),l(`
|
|
2
2
|
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "schema"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),e("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},"1"),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},",")]),l(`
|
|
3
3
|
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "key"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),e("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"3f2a9c1e5b7d4e8a"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},",")]),l(`
|
|
4
4
|
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "repo"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),e("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"/home/me/work/shop-sms-login"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},",")]),l(`
|
|
@@ -7,4 +7,4 @@ import{_ as n,o as i,c as t,j as e,a as l}from"./chunks/framework.B9qR_F1m.js";c
|
|
|
7
7
|
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "workspaceId"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),e("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"ws_123"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},",")]),l(`
|
|
8
8
|
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "project"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),e("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"shop"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},",")]),l(`
|
|
9
9
|
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"}},' "registeredAt"'),e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},": "),e("span",{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"}},'"2026-10-12T09:00:00.000Z"')]),l(`
|
|
10
|
-
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),e("p",null,[e("code",null,"key"),l(" 由对话所在的目录(没有自己的工作区时即 "),e("code",null,"repo"),l(")和功能目录算出。1.14 起:开始谈需求时("),e("code",null,"start-pipeline --feature <功能目录> --track"),l(")就登记,此时多一个可选字段 "),e("code",null,"chatAgentId"),l("(谈需求的对话),之后的登记保留它;新建需求自己的工作区时,条目改为指向那个工作区。目录里有 "),e("code",null,"spec.md"),l("、"),e("code",null,"alignment.md"),l(" 或 "),e("code",null,".pipeline/"),l(" 下的状态或登记标记时算作存在。")]),e("h2",{id:"新建工作区的记录-worktrees-key-json-1-14",tabindex:"-1"},[l("新建工作区的记录 "),e("code",null,"worktrees/<key>.json"),l("(1.14) "),e("a",{class:"header-anchor",href:"#新建工作区的记录-worktrees-key-json-1-14","aria-label":'Permalink to "新建工作区的记录 `worktrees/<key>.json`(1.14)"'},"")]),e("p",null,[l("用 "),e("code",null,"--worktree"),l(" 启动时,工作区一建好就写下:"),e("code",null,"{ schema, sourceRepo, featureDir, repo, workspaceId, branch, baseRef, createdAt, originAgentId }"),l('。之后的启动失败了,再次启动时在这个工作区里接着做,不再新建;插件据此把"工作区已建、开发没开始"的需求列进"等你处理"。'),e("code",null,"req index --rebuild"),l(" 为 1.9 之前运行过的需求补登,"),e("code",null,"req index --prune"),l(" 移除目录已不在的。")]),e("h2",{id:"使用记录-usage-runs-jsonl",tabindex:"-1"},[l("使用记录 "),e("code",null,"usage/runs.jsonl"),l(),e("a",{class:"header-anchor",href:"#使用记录-usage-runs-jsonl","aria-label":'Permalink to "使用记录 `usage/runs.jsonl`"'},"")]),e("p",null,"每次流水线运行(后台进程从开始到结束,包括停在等待确认、等待需求方、研发完成处)结束时追加一行:"),e("table",{tabindex:"0"},[e("thead",null,[e("tr",null,[e("th",null,"字段"),e("th",null,"含义")])]),e("tbody",null,[e("tr",null,[e("td",null,[e("code",null,"schema"),l(" / "),e("code",null,"kind")]),e("td",null,[e("code",null,"1"),l(" / "),e("code",null,'"run"')])]),e("tr",null,[e("td",null,[e("code",null,"machine"),l(" / "),e("code",null,"kitVersion")]),e("td",null,"主机名、req-kit 版本")]),e("tr",null,[e("td",null,[e("code",null,"requirement")]),e("td",null,[e("code",null,"{ key, project, name, title, type, profile }"),l(";从卡片开始的需求(1.10 起)另有 "),e("code",null,"requester"),l("(卡片的提出人)和 "),e("code",null,"source"),l("("),e("code",null,"{ system, id }"),l(")")])]),e("tr",null,[e("td",null,[e("code",null,"steps[].cachedInputTokens"),l(" / "),e("code",null,"steps[].agent")]),e("td",null,'1.13 起。输入中来自提示缓存的 tokens(agent 报告时);这一步用的 agent(Paseo profile 名,或 "provider/model")。更早的记录没有')]),e("tr",null,[e("td",null,[e("code",null,"run")]),e("td",null,[e("code",null,"{ startedAt, endedAt, attempt, phase, phaseMode, status, outcome, stopReason, stopKind, recoveries }"),l(";"),e("code",null,"status"),l(" 是运行结束时的状态,"),e("code",null,"outcome"),l(" 是完成时报告的结论;"),e("code",null,"stopKind"),l("(1.12 起)是停下等人的原因代码(见 "),e("a",{href:"./state"},"state.md"),l("),"),e("code",null,"recoveries"),l("(1.12 起)是这次运行中自动处理的次数,按种类,如 "),e("code",null,'{ "retry": 2 }'),l("。更早的记录没有这两项")])]),e("tr",null,[e("td",null,[e("code",null,"agents")]),e("td",null,[e("code",null,"{ builder, reviewer }"),l(":当时配置的 agent(如 "),e("code",null,"claude/opus(bypassPermissions)"),l(")")])]),e("tr",null,[e("td",null,[e("code",null,"steps")]),e("td",null,[l("这次运行中开始的步骤:"),e("code",null,"{ key, stepId, phase, attempt, round, startedAt, endedAt, minutes, outcome, inputTokens, outputTokens, costUsd }"),l(";agent 没有报告的用量为 null")])]),e("tr",null,[e("td",null,[e("code",null,"gate")]),e("td",null,[e("code",null,"{ runs, failed }"),l(":这次运行中质量门运行的次数、发现新失败的次数")])])])]),e("p",null,"不记录需求内容、代码和对话。"),e("h2",{id:"统计口径-req-stats",tabindex:"-1"},[l("统计口径("),e("code",null,"req stats"),l(") "),e("a",{class:"header-anchor",href:"#统计口径-req-stats","aria-label":'Permalink to "统计口径(`req stats`)"'},"")]),e("ul",null,[e("li",null,"一段时间的用量、步骤用时:结束时间在这段时间内的运行。"),e("li",null,'交付周期:需求第一次开始到完成(最后一次运行以"已完成"结束)的小时数,用这个需求的全部运行,算在完成的那段时间。'),e("li",null,"代码评审轮数、缺陷修复轮数:不同的(尝试、轮次、仓库)个数;评审分方向或评审小组的几个成员算一轮。"),e("li",null,"等待:相邻两次运行之间的间隔,按前一次结束时的状态归类:等待确认方案、等待需求方决定、研发完成到开始测试验证、中断到继续。"),e("li",null,[l("token 花在哪(1.13 起,"),e("code",null,"tokens"),l("):这段时间的步骤按 "),e("code",null,"stepId"),l("、按 "),e("code",null,"agent"),l(" 合计 token(输入 + 输出)和占比;返工("),e("code",null,"design_revise"),l("、"),e("code",null,"review_fix"),l("、"),e("code",null,"defect_fix"),l("、"),e("code",null,"reverify"),l(",以及 "),e("code",null,"design_review"),l("、"),e("code",null,"code_review"),l(" 第 2 轮起)的合计和占比;报告了 "),e("code",null,"cachedInputTokens"),l(" 的,算出输入中来自提示缓存的比例;已完成需求的 token 中位数(按档位)。")]),e("li",null,[l("停下等人的原因(1.12 起):这段时间结束的运行按 "),e("code",null,"stopKind"),l(" 计数;更早的记录按结束时的状态推断。确认方案、研发完成等待测试是必要的决定。")]),e("li",null,"无人工到提测的比例(1.12 起):这段时间有进展、已经研发完成或完成的需求中,所有运行都只停在必要决定处的比例。"),e("li",null,"自动处理的比例(1.12 起):自动处理的次数 ÷(自动处理的次数 + 以中断结束的运行数);需求方决定、缺陷复现不了不算中断。"),e("li",null,"
|
|
10
|
+
`),e("span",{class:"line"},[e("span",{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}},"}")])])])]),e("p",null,[e("code",null,"key"),l(" 由对话所在的目录(没有自己的工作区时即 "),e("code",null,"repo"),l(")和功能目录算出。1.14 起:开始谈需求时("),e("code",null,"start-pipeline --feature <功能目录> --track"),l(")就登记,此时多一个可选字段 "),e("code",null,"chatAgentId"),l("(谈需求的对话),之后的登记保留它;新建需求自己的工作区时,条目改为指向那个工作区。目录里有 "),e("code",null,"spec.md"),l("、"),e("code",null,"alignment.md"),l(" 或 "),e("code",null,".pipeline/"),l(" 下的状态或登记标记时算作存在。")]),e("h2",{id:"新建工作区的记录-worktrees-key-json-1-14",tabindex:"-1"},[l("新建工作区的记录 "),e("code",null,"worktrees/<key>.json"),l("(1.14) "),e("a",{class:"header-anchor",href:"#新建工作区的记录-worktrees-key-json-1-14","aria-label":'Permalink to "新建工作区的记录 `worktrees/<key>.json`(1.14)"'},"")]),e("p",null,[l("用 "),e("code",null,"--worktree"),l(" 启动时,工作区一建好就写下:"),e("code",null,"{ schema, sourceRepo, featureDir, repo, workspaceId, branch, baseRef, createdAt, originAgentId }"),l('。之后的启动失败了,再次启动时在这个工作区里接着做,不再新建;插件据此把"工作区已建、开发没开始"的需求列进"等你处理"。'),e("code",null,"req index --rebuild"),l(" 为 1.9 之前运行过的需求补登,"),e("code",null,"req index --prune"),l(" 移除目录已不在的。")]),e("h2",{id:"使用记录-usage-runs-jsonl",tabindex:"-1"},[l("使用记录 "),e("code",null,"usage/runs.jsonl"),l(),e("a",{class:"header-anchor",href:"#使用记录-usage-runs-jsonl","aria-label":'Permalink to "使用记录 `usage/runs.jsonl`"'},"")]),e("p",null,"每次流水线运行(后台进程从开始到结束,包括停在等待确认、等待需求方、研发完成处)结束时追加一行:"),e("table",{tabindex:"0"},[e("thead",null,[e("tr",null,[e("th",null,"字段"),e("th",null,"含义")])]),e("tbody",null,[e("tr",null,[e("td",null,[e("code",null,"schema"),l(" / "),e("code",null,"kind")]),e("td",null,[e("code",null,"1"),l(" / "),e("code",null,'"run"')])]),e("tr",null,[e("td",null,[e("code",null,"machine"),l(" / "),e("code",null,"kitVersion")]),e("td",null,"主机名、req-kit 版本")]),e("tr",null,[e("td",null,[e("code",null,"requirement")]),e("td",null,[e("code",null,"{ key, project, name, title, type, profile }"),l(";从卡片开始的需求(1.10 起)另有 "),e("code",null,"requester"),l("(卡片的提出人)和 "),e("code",null,"source"),l("("),e("code",null,"{ system, id }"),l(")")])]),e("tr",null,[e("td",null,[e("code",null,"steps[].cachedInputTokens"),l(" / "),e("code",null,"steps[].agent")]),e("td",null,'1.13 起。输入中来自提示缓存的 tokens(agent 报告时);这一步用的 agent(Paseo profile 名,或 "provider/model")。更早的记录没有')]),e("tr",null,[e("td",null,[e("code",null,"run")]),e("td",null,[e("code",null,"{ startedAt, endedAt, attempt, phase, phaseMode, status, outcome, stopReason, stopKind, recoveries }"),l(";"),e("code",null,"status"),l(" 是运行结束时的状态,"),e("code",null,"outcome"),l(" 是完成时报告的结论;"),e("code",null,"stopKind"),l("(1.12 起)是停下等人的原因代码(见 "),e("a",{href:"./state"},"state.md"),l("),"),e("code",null,"recoveries"),l("(1.12 起)是这次运行中自动处理的次数,按种类,如 "),e("code",null,'{ "retry": 2 }'),l("。更早的记录没有这两项")])]),e("tr",null,[e("td",null,[e("code",null,"agents")]),e("td",null,[e("code",null,"{ builder, reviewer }"),l(":当时配置的 agent(如 "),e("code",null,"claude/opus(bypassPermissions)"),l(")")])]),e("tr",null,[e("td",null,[e("code",null,"steps")]),e("td",null,[l("这次运行中开始的步骤:"),e("code",null,"{ key, stepId, phase, attempt, round, startedAt, endedAt, minutes, outcome, inputTokens, outputTokens, costUsd }"),l(";agent 没有报告的用量为 null")])]),e("tr",null,[e("td",null,[e("code",null,"gate")]),e("td",null,[e("code",null,"{ runs, failed }"),l(":这次运行中质量门运行的次数、发现新失败的次数")])])])]),e("p",null,"不记录需求内容、代码和对话。"),e("h3",{id:"运行之后的事-1-14-起",tabindex:"-1"},[l("运行之后的事(1.14 起) "),e("a",{class:"header-anchor",href:"#运行之后的事-1-14-起","aria-label":'Permalink to "运行之后的事(1.14 起)"'},"")]),e("p",null,[l("同一个文件里还有几种记录,都有 "),e("code",null,"schema"),l("(1)、"),e("code",null,"kind"),l("、"),e("code",null,"machine"),l("、"),e("code",null,"kitVersion"),l("、"),e("code",null,"at"),l(" 和 "),e("code",null,"requirement"),l("("),e("code",null,"{ key, project, name, title }"),l(","),e("code",null,"key"),l(" 与运行记录相同)。读运行记录的旧版本会跳过它们。")]),e("table",{tabindex:"0"},[e("thead",null,[e("tr",null,[e("th",null,[e("code",null,"kind")]),e("th",null,"何时写"),e("th",null,"字段")])]),e("tbody",null,[e("tr",null,[e("td",null,[e("code",null,"review")]),e("td",null,'插件代码审查页提交"退回修改"或"评审通过"'),e("td",null,[e("code",null,'review: { verdict: "approved" | "changes_requested", reviewer, items, head }'),l(":评审人、意见条数、评审的提交")])]),e("tr",null,[e("td",null,[e("code",null,"acceptance")]),e("td",null,"验收清单页提交"),e("td",null,[e("code",null,'acceptance: { verdict: "通过" | "不通过", reviewer, total, passed, failed, unchecked }')])]),e("tr",null,[e("td",null,[e("code",null,"merge")]),e("td",null,[e("code",null,"req stats"),l("、"),e("code",null,"req api stats"),l("、"),e("code",null,"req outcome"),l(" 发现需求的流水线文件("),e("code",null,"implementation.md"),l("、"),e("code",null,"report.md"),l(" 等)已经在主干("),e("code",null,"origin/HEAD"),l(",没有时 "),e("code",null,"origin/main"),l("、"),e("code",null,"main"),l(" 等)里;或者 "),e("code",null,"req outcome <需求> --merged")]),e("td",null,[e("code",null,'merge: { into, commit, mergedAt, how: "files" | "manual" }'),l(":"),e("code",null,"commit"),l("、"),e("code",null,"mergedAt"),l(" 是把它带进主干的那次提交(合并提交或压缩合并的提交);只看本机已有的分支,不 fetch")])]),e("tr",null,[e("td",null,[e("code",null,"issue")]),e("td",null,[l("缺陷需求的 spec 写了 "),e("code",null,"- 引入问题的需求:<目录名>"),l("(扫描时发现),或者 "),e("code",null,'req outcome <需求> --issue "<问题>"')]),e("td",null,[e("code",null,"issue: { text, by, id }"),l(":"),e("code",null,"by"),l(" 是那个缺陷需求的目录名,手动记的为 null;同一个 "),e("code",null,"id"),l(" 只算一次")])])])]),e("p",null,[l("每个需求的 "),e("code",null,"merge"),l(" 只记一次。评审和验收的全文在需求目录的 "),e("code",null,"code-review.md"),l("、"),e("code",null,"acceptance.md"),l(" 里,随需求分支提交;这里只记结论和数量,用于统计。")]),e("h2",{id:"统计口径-req-stats",tabindex:"-1"},[l("统计口径("),e("code",null,"req stats"),l(") "),e("a",{class:"header-anchor",href:"#统计口径-req-stats","aria-label":'Permalink to "统计口径(`req stats`)"'},"")]),e("ul",null,[e("li",null,"一段时间的用量、步骤用时:结束时间在这段时间内的运行。"),e("li",null,'交付周期:需求第一次开始到完成(最后一次运行以"已完成"结束)的小时数,用这个需求的全部运行,算在完成的那段时间。'),e("li",null,"代码评审轮数、缺陷修复轮数:不同的(尝试、轮次、仓库)个数;评审分方向或评审小组的几个成员算一轮。"),e("li",null,"等待:相邻两次运行之间的间隔,按前一次结束时的状态归类:等待确认方案、等待需求方决定、研发完成到开始测试验证、中断到继续。"),e("li",null,[l("token 花在哪(1.13 起,"),e("code",null,"tokens"),l("):这段时间的步骤按 "),e("code",null,"stepId"),l("、按 "),e("code",null,"agent"),l(" 合计 token(输入 + 输出)和占比;返工("),e("code",null,"design_revise"),l("、"),e("code",null,"review_fix"),l("、"),e("code",null,"defect_fix"),l("、"),e("code",null,"reverify"),l(",以及 "),e("code",null,"design_review"),l("、"),e("code",null,"code_review"),l(" 第 2 轮起)的合计和占比;报告了 "),e("code",null,"cachedInputTokens"),l(" 的,算出输入中来自提示缓存的比例;已完成需求的 token 中位数(按档位)。")]),e("li",null,[l("停下等人的原因(1.12 起):这段时间结束的运行按 "),e("code",null,"stopKind"),l(" 计数;更早的记录按结束时的状态推断。确认方案、研发完成等待测试是必要的决定。")]),e("li",null,"无人工到提测的比例(1.12 起):这段时间有进展、已经研发完成或完成的需求中,所有运行都只停在必要决定处的比例。"),e("li",null,"自动处理的比例(1.12 起):自动处理的次数 ÷(自动处理的次数 + 以中断结束的运行数);需求方决定、缺陷复现不了不算中断。"),e("li",null,[l("人工把关和合并后(1.14 起,"),e("code",null,"oversight"),l('):这段时间里的人工代码评审次数、退回修改次数、意见条数,验收次数和不通过次数;"第一次就通过"看每个需求最早的那次评审(验收),它在这段时间里并且是通过;合并进主干的需求数和"完成到合并"的小时数中位数;合并后发现的问题数和涉及的需求数。每个需求一项里的 '),e("code",null,"afterRun"),l(" 汇总它全部的这类记录("),e("code",null,"humanReviews"),l("、"),e("code",null,"sentBack"),l("、"),e("code",null,"lastReview"),l("、"),e("code",null,"acceptance"),l("、"),e("code",null,"acceptanceFailed"),l("、"),e("code",null,"mergedAt"),l("、"),e("code",null,"issues"),l(")。")]),e("li",null,[l("合并多台机器的导出时,同一机器、同一需求、同一开始时间的运行只算一次;同一个需求、同一种、同一时间的事件(问题按 "),e("code",null,"id"),l(")只算一次。"),e("code",null,"req stats --export"),l(" 同时导出这些需求的事件。")])]),e("p",null,[e("code",null,"req stats --json"),l(" 和 "),e("code",null,"req api stats"),l(" 输出同样的对象("),e("code",null,"schema: 1"),l("):"),e("code",null,"period"),l("、"),e("code",null,"machines"),l("、"),e("code",null,"active"),l("、"),e("code",null,"completed"),l("、"),e("code",null,"byType"),l("、"),e("code",null,"cycleHours"),l("、"),e("code",null,"steps"),l("、"),e("code",null,"rework"),l("、"),e("code",null,"waits"),l("、"),e("code",null,"usage"),l("、"),e("code",null,"tokens"),l("、"),e("code",null,"oversight"),l("、"),e("code",null,"byBuilder"),l("、"),e("code",null,"requirements"),l("(每个需求一项,字段与 "),e("code",null,"req stats --csv"),l(" 的列对应)。")])],-1),e("p",{class:"source-note"},[l("本页由仓库中的 "),e("a",{href:"https://github.com/yiyisf/paseo-req-kit/blob/main/contracts/usage-record.md"},"contracts/usage-record.md"),l(" 生成。"),e("a",{href:"https://github.com/yiyisf/paseo-req-kit/edit/main/contracts/usage-record.md"},"在 GitHub 上编辑")],-1)])])}const g=s(d,[["render",a]]);export{p as __pageData,g as default};
|