Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
120 changes: 64 additions & 56 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,76 @@
## 变更描述
## Change summary

<!-- 用一两段说明这个 PR 改了什么、为什么改。遵循 ci-cd-and-quality.md 的
Proof before trust:PR 文本不是修改成立的证据,检查清单与 CI 才是。 -->
<!-- Explain in one or two paragraphs what this PR changes and why. Follow the
proof-before-trust rule in ci-cd-and-quality.md: PR prose is not evidence
that a change works; the checklist and CI are. -->

**What**(改了什么):
**What** (what changed):

**Why**(为什么改 / 解决什么问题):
**Why** (why it changed / what problem it addresses):

**Changes**(关键改动点,按文件或模块列出):
**Changes** (key changes, by file or module):

---

## 未验证项
## Not verified

<!-- 声明本 PR 没有验证到的范围:没跑的路由、没构建或没启动的平台与环境、没覆盖的
构建模式、没有复现步骤的行为。确实没有遗留项时写 None.。
这是范围声明,不是证据:它不能替代任何检查,门禁全绿也不会让它变得多余。 -->
<!-- State the scope this PR did not verify: routes not run, platforms or
environments not built or started, build modes not covered, and behaviors
without reproduction steps. Write None. only when nothing remains
unverified. This is a scope declaration, not evidence: it cannot replace
any check, and an all-green gate does not make it unnecessary. -->

**Not verified**(没验证什么):
**Not verified** (what was not verified):

---

## 完成检查项

<!-- 合并前逐项核对。GitHub 拥有 PR/CI 状态;本清单只是让提交者自己先过一遍。 -->

### 本地质量检查

- [ ] `npm run verify:static` 通过(build / package:check / check / check:lock / lint / format:check / docs:check / agent:context:check / complexity:gate / verify:packages)
- [ ] `npm run test:product` 通过(或按改动路由跑 `npm run agent:verify -- <路径>`)
- [ ] 改了依赖或 lockfile 时:`npm run check:lock` 通过、根 `package-lock.json` 已同步、`npm audit --omit=dev --audit-level=high` 无漏洞
- [ ] 改了子包(`dsh/dsh-nmg` 等)时:`npm run verify:packages` 通过(frozen-lockfile install + build),`pnpm-lock.yaml`/lockfile 随 package.json 同步
- [ ] 文档改动跑过 `npm run docs:check`;决策/设计改动遵循 doc-maintenance 规范
- [ ] `## 未验证项` 已填写(无遗留项时写 `None.`);非平凡改动已携带决策记录
- [ ] 新代码方法圈复杂度不超阈值(CodeFactor / `npm run complexity:gate`)
- [ ] 未提交可再生产物:`dist/`、`dsh/dsh-nmg/lib/`、`src/prompts/nmg-prompts.generated.ts`、`.nmg-search-scope` 不入库(见 `docs/decisions/rejected/2026-09-02-track-build-artifacts-in-git.md`)

### RCP(Repository Control Plane)

<!-- 逐项给出可执行命令:模板是操作层检查表,照命令跑完即完成该项自证。
命令细节见 skills/repo-development/SKILL.md 的
"Repository Control Plane beyond agent:verify" 节。 -->

- [ ] 首个实质写入前已在 `repo-development` 黑板登记 in-flight goal:
`nmg board put repo-development "goal=…; approach=…; scope=…" --agent <id> --kind goal`(已 resolve)
- [ ] 改动路由的 reconcile 已通过并写入证据:
`npm run agent:verify -- <改动路径>`(或 `nmg-rcp reconcile <contract> --apply --workspace-ready`)
→ `.nmg/verification/latest.json` 覆盖改动路由
- [ ] CI 全绿是用 RCP 观察确认的,不是人肉轮询:
`nmg-rcp forge-status --pr <PR号>` 的 checks 全为 SUCCESS
- [ ] 只提交本 PR 拥有的文件;未吞并行 Agent 的暂存/工作树改动
(`git status --short` 核对无他人文件)

### CI 完成确认

<!-- 用 RCP/forge 观察确认,不逐个 job 轮询。RCP 节的
`nmg-rcp forge-status --pr <PR号>` 是权威读法;下面两项是其补充。
CI 从 push 到全部检查完成通常约一分半,可稍等后 `nmg-rcp forge-status --pr <PR号>` 复查,
不要按固定时长人工反复轮询或把“看起来在跑”当作“已通过”。 -->

- [ ] `nmg-rcp forge-status --pr <PR号>` 的 `All checks passed` 为 SUCCESS
(或 CI Status Snapshot `.nmg-ci/status.json`:`conclusion: "success"` 且 `failures: []`)
- [ ] CodeFactor 通过
- [ ] Static job 通过(含 `verify:static` 全部子检查 + Dependency audit;audit 因上游新 advisory 失败时,先 `npm audit fix` 再更新 `package-lock.json` 提交,不要改 audit 门槛)

> CI Status Snapshot 是 GitHub 状态的只读观察(`authority: observation-only`),
> 不是授权或合并决定;合并仍需显式操作。
## Completion checklist

<!-- Review each item before merging. GitHub owns PR/CI status; this checklist
is only a submitter-side preflight. -->

### Local quality checks

- [ ] `npm run verify:static` passes (build / package:check / check / check:lock / lint / format:check / docs:check / agent:context:check / complexity:gate / verify:packages)
- [ ] `npm run test:product` passes (or run `npm run agent:verify -- <path>` for the changed route)
- [ ] If dependencies or a lockfile changed: `npm run check:lock` passes, the root `package-lock.json` is synchronized, and `npm audit --omit=dev --audit-level=high` reports no vulnerabilities
- [ ] If a subpackage changed (such as `dsh/dsh-nmg`): `npm run verify:packages` passes (frozen-lockfile install + build), and `pnpm-lock.yaml`/the lockfile matches `package.json`
- [ ] For documentation changes, `npm run docs:check` was run; decision/design changes follow the doc-maintenance rules
- [ ] `## Not verified` is filled in (write `None.` if nothing remains); non-trivial changes include a decision record
- [ ] New code methods stay within the cyclomatic-complexity threshold (CodeFactor / `npm run complexity:gate`)
- [ ] No reproducible build artifacts are committed: do not check in `dist/`, `dsh/dsh-nmg/lib/`, `src/prompts/nmg-prompts.generated.ts`, or `.nmg-search-scope` (see `docs/decisions/rejected/2026-09-02-track-build-artifacts-in-git.md`)

### RCP (Repository Control Plane)

<!-- Each item gives an executable command: this is an operational checklist;
running the command completes the submitter's self-check for that item.
See the "Repository Control Plane beyond agent:verify" section in
skills/repo-development/SKILL.md for command details. -->

- [ ] Before the first substantive write, register an in-flight goal on the `repo-development` board:
`nmg board put repo-development "goal=…; approach=…; scope=…" --agent <id> --kind goal` (then resolve it)
- [ ] Reconcile the changed route successfully and record evidence:
`npm run agent:verify -- <path>` (or `nmg-rcp reconcile <contract> --apply --workspace-ready`)
→ `.nmg/verification/latest.json` covers the changed route
- [ ] Confirm all-green CI through RCP observation, not manual polling:
checks from `nmg-rcp forge-status --pr <PR number>` are all SUCCESS
- [ ] Commit only files owned by this PR; do not absorb another Agent's staged or working-tree changes
(check with `git status --short`)

### CI completion confirmation

<!-- Use RCP/forge observation to confirm completion; do not poll individual
jobs. `nmg-rcp forge-status --pr <PR number>` in the RCP section is the
authoritative view; the items below are supplementary. CI usually takes
about 90 seconds from push to completion. Wait briefly, then recheck with
`nmg-rcp forge-status --pr <PR number>`; do not repeatedly poll by a fixed
timer or treat "looks like it is running" as "passed." -->

- [ ] `All checks passed` from `nmg-rcp forge-status --pr <PR number>` is SUCCESS
(or CI Status Snapshot `.nmg-ci/status.json` has `conclusion: "success"` and `failures: []`)
- [ ] CodeFactor passes
- [ ] The Static job passes (all `verify:static` subchecks + Dependency audit; if the audit fails due to a new upstream advisory, run `npm audit fix`, update and commit `package-lock.json`; do not change the audit threshold)

> CI Status Snapshot is a read-only observation of GitHub status
> (`authority: observation-only`), not authorization or a merge decision;
> merging still requires an explicit action.
32 changes: 32 additions & 0 deletions .github/pull_request_template.terms.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2
terms:
- term: pull-request completion checklist
aliases: [完成检查项]
definition: >-
The pre-merge list in the pull-request template that the author walks through before merging: local quality commands, Repository Control Plane evidence writes, and CI observation. It is a submitter-side ordering of checks, not evidence that a check passed, and it does not replace CI.
pull request 模板里合并前由提交者自己逐项核对的清单:本地质量命令、Repository Control Plane 证据写入、以及 CI 观察。它是提交者侧的检查顺序,不是某项检查已通过的证据,也不替代 CI。
owner: .github/pull_request_template.md
anchor: Completion checklist
status: canonical
- term: CI completion confirmation
aliases: [CI 完成确认]
definition: >-
Reading CI to completion through an observer such as a forge-status check or a CI status snapshot whose conclusion and failure list are recorded, instead of polling individual jobs or treating "looks like it is running" as "passed". A status snapshot is observation-only and does not authorize or decide a merge.
通过 forge-status 检查或记录着结论与失败列表的 CI 状态快照等观察手段把 CI 读到完成,而不是逐个 job 轮询、也不把"看起来在跑"当作"已通过"。状态快照只是观察,不构成授权,也不决定合并。
owner: .github/pull_request_template.md
anchor: CI completion confirmation
status: canonical
- term: guardrail bookkeeping in the template
aliases: [模板中的护栏记账]
definition: >-
The template requirement that a non-trivial change carries a decision record and that the not-verified section is always filled, with the literal `None.` when nothing was left unverified; the template states the declaration's own limits and does not make an all-green gate sufficient.
模板要求:非平凡改动必须携带决策记录,且未验证项段落始终要填,确实没有遗留时写 `None.`。模板自身声明了该声明的作用边界,门禁全绿也不会让它变得多余。
owner: .github/pull_request_template.md
anchor: Not verified
status: canonical
references:
- unverified surface
- Repository Control Plane
- in-flight goal entry
- gate
- evidence
68 changes: 68 additions & 0 deletions .github/pull_request_template.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## 变更描述

<!-- 用一两段说明这个 PR 改了什么、为什么改。遵循 ci-cd-and-quality.md 的
Proof before trust:PR 文本不是修改成立的证据,检查清单与 CI 才是。 -->

**What**(改了什么):

**Why**(为什么改 / 解决什么问题):

**Changes**(关键改动点,按文件或模块列出):

---

## 未验证项

<!-- 声明本 PR 没有验证到的范围:没跑的路由、没构建或没启动的平台与环境、没覆盖的
构建模式、没有复现步骤的行为。确实没有遗留项时写 None.。
这是范围声明,不是证据:它不能替代任何检查,门禁全绿也不会让它变得多余。 -->

**Not verified**(没验证什么):

---

## 完成检查项

<!-- 合并前逐项核对。GitHub 拥有 PR/CI 状态;本清单只是让提交者自己先过一遍。 -->

### 本地质量检查

- [ ] `npm run verify:static` 通过(build / package:check / check / check:lock / lint / format:check / docs:check / agent:context:check / complexity:gate / verify:packages)
- [ ] `npm run test:product` 通过(或按改动路由跑 `npm run agent:verify -- <路径>`)
- [ ] 改了依赖或 lockfile 时:`npm run check:lock` 通过、根 `package-lock.json` 已同步、`npm audit --omit=dev --audit-level=high` 无漏洞
- [ ] 改了子包(`dsh/dsh-nmg` 等)时:`npm run verify:packages` 通过(frozen-lockfile install + build),`pnpm-lock.yaml`/lockfile 随 package.json 同步
- [ ] 文档改动跑过 `npm run docs:check`;决策/设计改动遵循 doc-maintenance 规范
- [ ] `## 未验证项` 已填写(无遗留项时写 `None.`);非平凡改动已携带决策记录
- [ ] 新代码方法圈复杂度不超阈值(CodeFactor / `npm run complexity:gate`)
- [ ] 未提交可再生产物:`dist/`、`dsh/dsh-nmg/lib/`、`src/prompts/nmg-prompts.generated.ts`、`.nmg-search-scope` 不入库(见 `docs/decisions/rejected/2026-09-02-track-build-artifacts-in-git.md`)

### RCP(Repository Control Plane)

<!-- 逐项给出可执行命令:模板是操作层检查表,照命令跑完即完成该项自证。
命令细节见 skills/repo-development/SKILL.md 的
"Repository Control Plane beyond agent:verify" 节。 -->

- [ ] 首个实质写入前已在 `repo-development` 黑板登记 in-flight goal:
`nmg board put repo-development "goal=…; approach=…; scope=…" --agent <id> --kind goal`(已 resolve)
- [ ] 改动路由的 reconcile 已通过并写入证据:
`npm run agent:verify -- <改动路径>`(或 `nmg-rcp reconcile <contract> --apply --workspace-ready`)
→ `.nmg/verification/latest.json` 覆盖改动路由
- [ ] CI 全绿是用 RCP 观察确认的,不是人肉轮询:
`nmg-rcp forge-status --pr <PR号>` 的 checks 全为 SUCCESS
- [ ] 只提交本 PR 拥有的文件;未吞并行 Agent 的暂存/工作树改动
(`git status --short` 核对无他人文件)

### CI 完成确认

<!-- 用 RCP/forge 观察确认,不逐个 job 轮询。RCP 节的
`nmg-rcp forge-status --pr <PR号>` 是权威读法;下面两项是其补充。
CI 从 push 到全部检查完成通常约一分半,可稍等后 `nmg-rcp forge-status --pr <PR号>` 复查,
不要按固定时长人工反复轮询或把“看起来在跑”当作“已通过”。 -->

- [ ] `nmg-rcp forge-status --pr <PR号>` 的 `All checks passed` 为 SUCCESS
(或 CI Status Snapshot `.nmg-ci/status.json`:`conclusion: "success"` 且 `failures: []`)
- [ ] CodeFactor 通过
- [ ] Static job 通过(含 `verify:static` 全部子检查 + Dependency audit;audit 因上游新 advisory 失败时,先 `npm audit fix` 再更新 `package-lock.json` 提交,不要改 audit 门槛)

> CI Status Snapshot 是 GitHub 状态的只读观察(`authority: observation-only`),
> 不是授权或合并决定;合并仍需显式操作。
31 changes: 31 additions & 0 deletions .pi/skills/omnimemeval-eval/SKILL.terms.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2
terms:
- term: config-driven benchmark workflow
aliases: [配置驱动的基准工作流]
definition: >-
Running and resuming the official OmniMemEval suites through one checked-in configuration file that owns common arguments, per-suite official options, and environment-file selection, so the command line never reconstructs parameters; a runner-owned flag such as a library, env, version, or replay switch stays out of the config and a one-off canary copies the config instead of adding a CLI flag.
通过一份签入仓库的配置文件运行与续跑官方 OmniMemEval 套件:该文件拥有公共参数、各套件官方选项与环境文件选择,命令行因此从不重建参数;库、env、版本或 replay 这类 runner 自有标志不进配置,一次性 canary 复制配置而不是新增 CLI 标志。
owner: .pi/skills/omnimemeval-eval/SKILL.md
anchor: Configure once
status: canonical
- term: benchmark resume by result directory
aliases: [按结果目录续跑]
definition: >-
Continuing an interrupted official run by pointing at its exact existing result directory, from which the runner infers suite and version and then rejects membership or configured-parameter drift before delegating; a similar-looking directory name is not a valid target and the official pipeline resumes its own checkpoints.
指向既有且确切的结果目录来继续被中断的官方运行;runner 从中推断套件与版本,并在委托前拒绝归属不符或配置参数漂移。相似的目录名不是合法目标,续跑由官方流水线从自己的检查点完成。
owner: .pi/skills/omnimemeval-eval/SKILL.md
anchor: Resume
status: canonical
- term: run-manual boundary
aliases: [操作手册边界]
definition: >-
The rule that the skill's boundaries section keeps official parsing, prompts, scoring, checkpoints and reports upstream, keeps NMG evidence audits separate from the official run, forbids a suite-specific NMG wrapper or direct invocation of the five official scripts for normal runs, and places historical scores and incident narratives in the experiments area rather than in this operating manual.
该 skill 的边界章节所立的规则:官方解析、提示词、打分、检查点与报告保持在上游;NMG 证据审计与官方运行分离;常规运行禁止套件专属 NMG wrapper、也禁止直接调用五个官方脚本;历史分数与事故叙述放在实验区,不写进这份操作手册。
owner: .pi/skills/omnimemeval-eval/SKILL.md
anchor: Boundaries
status: canonical
references:
- benchmark venv
- embedding profile
- QPP
- evidence
Loading
Loading