docs: 共有技能收归 meta 单一份并加工作区级笔记校验入口

- write-notes-like-deepseek 从三个子仓库的重复副本改为 meta 唯一副本
- 新增 .agents/scripts/verify-notes.ts,从 meta 视角一次校验四个笔记根
- workspace-layout 补「共有技能单一来源」的落位与理由
- .rgignore 排除 archived 历史快照
This commit is contained in:
cat-shark
2026-11-18 14:59:45 +08:00
parent a194477b65
commit f99e1e156d
27 changed files with 3767 additions and 11 deletions
@@ -0,0 +1,32 @@
# Agent Note: <标题>
Status: implemented
<!--
【维护提醒】
1. 现行法律契约:代码重构、改名或路径变更时,同批就地更新事实。禁止把 Decision 改写成另一个决定。
2. 时态纪律:严禁 ## Proposal / ## Plan / ## Acceptance criteria 等计划态标题;Decision 用现在时(门禁只拒标题)。
3. 归档契约:只插 Archived: YYYY-MM-DD 紧邻 Status: implemented。互链写在新笔记,不写进归档篇。
-->
## Problem
<动机:脱离方案也能独立成立。说明触发原因:什么破了、什么要变、不做会怎样>
## Decision
<已落地事实,全篇使用现在时描述。可插入 Package 拓扑 / 契约 / Schema 等业务自由小节>
## Alternatives considered
- **<备选 A>** — <先写其最强论据,再写为何被否>
- **<备选 B>** — <先写其最强论据,再写为何被否。不做/复用仅当当时真的权衡过才写,不要编>
## Consequences
- **收益**:<带来了什么确定性提升,无基线不写相对量词>
- **代价与已知上限**:<牺牲了什么,什么信号发生时必须重访该决定>
## Verification
<可选,现在时事实:如何证明该决定在当前代码库中依然生效。落到可确认表面——路径、量级、执行命令>
@@ -0,0 +1,38 @@
# Agent Note: <标题>
Status: proposed
<!--
【维护提醒】
1. 落地转 implemented 时的重写契约:## Proposal 改为现在时的 ## Decision;
## Acceptance criteria / ## Risks 折进 ## Consequences(或现在时的 ## Testing / ## Verification)。
2. 前提消失或不再推进 → 转 Status: rejected — <原因>,严禁归档 proposed。
3. Alternatives 必填:只记录真实考虑过的对手方案;「不做/复用」仅当当时真的权衡过才写。
-->
## Problem
<动机,脱离方案也能独立成立;写清背景、约束与失败条件>
## Proposal
<拟议改动,可用将来时;含关键设计、迁移步骤与开放问题>
## Alternatives considered
必填。只写当时真的权衡过的选项(没有过的不要编)。「不做 / 复用现状」可以是其中一档,但不是必填档。
每档一个候选,或 `### Why not <X>?` 子节:
- **<备选 A>** — <为何没选,先写它的最强论据再写否掉理由,一段一备选>
- **<备选 B>** — <同上>
需要结构化对比多个选项时,用标准 × 选项矩阵(Fit / 运维复杂度 / 团队技能 / 成本 / 锁定风险 / 实施时间)逐格打 ✓/⚠️/✗。被否项必带"为何否"。
## Acceptance criteria
<什么可观察状态算完成;含验证表面与门禁>
## Risks
<可能出什么问题、已知取舍与回滚条件>
@@ -0,0 +1,27 @@
# Agent Note: <标题>
Status: rejected — <一句话原因>
<!--
【维护提醒】
1. 冻结不动:不改写为对立面,不随代码演进更新事实;结论就在 Status 行。
2. 仅在"防止重犯"期间保留:被否方案依赖的旧技术/API 已彻底移除、后人绝无可能
再提时,把这一篇删掉。
3. 价值被新笔记吸收时,按 references/archiving.md 的合并删除流程处理。
-->
## Problem
<动机>
## Proposal
<曾拟议的方案,冻结保留>
## Alternatives considered
- **<备选>** — <为何当时考虑/为何最终否掉>
## Risks
<为何否掉、若重提需满足什么条件>
@@ -0,0 +1,40 @@
# 复制到宿主仓库的 workflow 目录后启用:
# GitHub → .github/workflows/verify-notes.yml
# Gitea → .gitea/workflows/verify-notes.yml(并把 github.* 换成 gitea.*)
# 默认项目级安装路径;使用其他路径时请同步修改下方命令。
name: Verify Agent Notes
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
- name: Verify note tree, format, and archive seals
env:
# HEAD is a no-op on a clean checkout. Compare against the pre-change
# commit: PR base, or the previous tip of the pushed branch.
# A new-branch push sends before=0000…; git show fails and the script
# skips append-only (seal-vs-disk still runs).
AGENT_NOTE_ARCHIVE_BASE_REF: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
node .agents/skills/write-notes-like-deepseek/scripts/verify-agent-note-tree.ts
node .agents/skills/write-notes-like-deepseek/scripts/verify-agent-note-format.ts
node .agents/skills/write-notes-like-deepseek/scripts/verify-archived-agent-notes.ts