diff --git a/.claude/skills/pm-dispatch/SKILL.md b/.claude/skills/pm-dispatch/SKILL.md index f81741bfcce..f197bb6797d 100644 --- a/.claude/skills/pm-dispatch/SKILL.md +++ b/.claude/skills/pm-dispatch/SKILL.md @@ -114,18 +114,18 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → L1 审核 → | assignee 已设 | 已认领/在飞,不是你的就永不碰;离手恒走释放 —— 三因 = 改路由(限未派发)、前提证伪、弃飞无接管,去向 = 新标签态或车道;在飞卡跟到 MERGED,⛔ 不静默摘 assignee;入停放态(queue/blocked/hold)同笔摘 | | `pm:dispatched` | 已派发(派发评论记轮次),恒带 assignee;与摘 `pm:queue` 同一次标签写入成对落地 | | `needs-user-decision` | 决定待做:永不派发、永不代答;维护者的决策收件箱,只挂决策卡(issue)、⛔ 永不挂 PR,只由人工裁 | -| `pm:on-hold` | 决定已做且答案是暂不做:不派发不催;仅当带机器可读 `Restart-when:` 行才合法;入态同笔降 `priority:p3`,原级记 `Restart-grade:` | +| `pm:on-hold` | 决定已做且答案是暂不做:不派发不催;仅当带机器可读 `Restart-when:` 行才合法;入态 ⛔ 不降级,级只反映严重度 | | `pm:blocked` + 正文行 `Blocked-by: #N` | 等上游:选择期跳过,#N 关单(PR 则合并,关而未合并不放)时由解锁扫描或 `scheduled-full-run-card.yml` 放回;工已完而被门禁卡住的同用本态;双通道行首 `Blocked-by:` 指向无 `Ruled:` 的 open `needs-user-decision` 卡 ⇒ ⛔ 不派发,直至其 `Ruled:` | | `pm:awaiting-maintainer` | 决定已做,只剩一次 GitHub 之外的人工动作:不派发不催;与其它 pm 状态标签互斥;入态恒带行首 `Maintainer-action:` 行(细则见 `references/state-machine.md`),无行即半态 | -| `pm:blocking` | 有 open 下游依赖者(自 `Blocked-by:` 索引推导的缓存,⛔ 不手工挂);进选择全序 | +| `pm:blocking` | 挡着在派 area 里的 open 卡(自 `Blocked-by:` 索引推导的缓存,⛔ 不手工挂);⛔ 不抬级、不插队 | | `pm:retriage` | 向分诊提问(改判、跨域 PR 指定车道、改路由、拆卡、裁 dev 报告留下的分叉;既裁冲突砍项与整树席改标归执行席 ⛔ 不问),定车道与改路由限未派发卡,异议评论写明所求;与现行 `pm:*` 并存、⛔ 不摘原标;带本标签的 `pm:queue` 卡跳过派发 | | `finding` | 立卡三类内待首次定级,定级即离标;三类外关 not planned;不占队列不进收件箱 | | `tooling` | 修复落在门禁/脚本/workflow/技能/席位协议/PM 工具面而非产品包;分诊首触打,与 `domain:*` 同笔;三具名读者 = 候选查询排除、首触即关、普查半态行 | | `target:` | ⛔ 不再作发版阻塞标记:阻塞卡只升 `priority:p0`,窗与回落见 `references/filing-gate.md` 定级判据 | -| `pm:epic`(父单或 sub-issue) | 已由 epic PM 保留;其它 PM 永不取;⛔ 永不与 `pm:queue` 同挂 | +| `pm:epic`(父单或 sub-issue) | 子专题,只由维护者开;已由 epic PM 保留;其它 PM 永不取;⛔ 永不与 `pm:queue` 同挂 | | `pm:seat` | 座位登记贴:协议载体,不是待分诊的工作 | | `priority:p0` | 插队:同轮立即派发,越过 `batch`、深度等待(`LOCK_DEPTH_HOLD`)与一切并发上限;无槽即暂停低级在飞 dev 腾位(机制 `references/execution-duties.md`);⛔ 不豁免重叠检查(`references/area-lease.md`)与认领协议 | -| `area:*` | 功能轴:每卡恰一个;分诊首触打,与 `domain:*` 同笔;工具卡打它所护的轴;⛔ 不回填存量。四读者:维护者按轴看板;定级继承该轴清单项;父单分组;候选顺序,即「功能点位次」= 父单在「Features on the road」上的次序;同轴可多卡在飞,排队照重叠检查 | +| `area:*` | 产品大专题:每张公开卡恰一个,本仓安全卡不打;车队卡立卡席打,分诊首触补齐复核,与 `domain:*` 同笔;存量回填只在维护者授权的专题下。四读者:维护者按专题看板;定级读北极星「Product areas」该专题核心功能;父单分组;取卡序 = 维护者点名的专题 | | open PR 引用该单 | 已实现,L1 审核中 | | merged PR 带 `Fixes #n` | 完成(GitHub 关单) | @@ -138,7 +138,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → L1 审核 → - declared≠enforced 观察类 ⇒ 转 enforce-or-remove 通道;真 won't-fix 候选 ⇒ 逐卡进决策箱。 - 派发与折叠检查时读半状态巡查锚的 H17 触发文件索引,与本次派发文件面求交。 - 相交 ⇒ 按该 hold 评论的 rider/restart 条款处置:点名该单,顺手活列为申报过的增项。 -- 关闭即在同一笔摘掉 `pm:*` 状态标;`domain:*`、`area:*` 与类型标签留下,归属不是状态。 +- 关闭即在同一笔摘掉 `pm:*` 状态标;`domain:*`、`area:*` 与 issue type 留下,归属不是状态。 - `state_reason` 与关闭理由一致:撤单/不做 ⇒ `not_planned`,重复 ⇒ `duplicate` + `duplicate_of`。 - `Blocked-by:` 行是机器可 grep 的反向索引,一遍读喂三个职责,⛔ 只做第一件。 - 三职责:上游关单放回解锁卡;按解锁扇出排序;在合并后的 ref 上重验回队卡文件面。 @@ -170,7 +170,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → L1 审核 → | `domain:skills` | 规则文本:`AGENTS.md`+`CLAUDE.md`+`.claude/**`(含本文件)+`skills/**`+`docs/adr/**`+`docs/NORTH-STAR.md`;非门禁的 `scripts/pm/**`(PM 循环工具);governed 面的治理执行文件:`.github/CODEOWNERS` + SUBJECT 是 governed 面本身的门禁/审计(现为 `scripts/pm/check-governed-merges.mjs`) | | `domain:spec` | `packages/spec` 整包:schema 形状、`contracts/**`、退役行为半边、strictness 台账;describe/JSDoc/墓碑散文/错误 guidance 与 alias 表;`packages/spec/scripts/**`、`packages/spec/docs/**` 及按锚定规则的例外归本域的工具链(域边界枚举与席内分派见 `references/lanes/spec.md`) | | `domain:ui` | `ui/**` 全部代码:`@object-ui/*` 库与 `ui/apps/*`、`ui/packages/types` 与 schema 语料、`ui/scripts` 与门禁工具、文档随所记录的面走;`packages/console`(dist 由 `pnpm console:build` 生成 ⛔ 不手改);协议恒归 `domain:spec`,受管面归 `domain:skills`;详见 `references/lanes/ui.md` | -| `domain:cloud` | 涉 cloud 即整卡归 cloud PM(`repo:cloud` 席):读或改 cloud 代码、生产方或带 cloud 半边;本仓车道 ⛔ 不认领;只缺事实读数者留车道敲信箱;cloud PM 跟到关卡,余下本仓活写明 cloud 事实后另立卡;判据见 `references/cross-repo-coordination.md`、`references/lanes/cloud.md` | +| `domain:cloud` | 涉 cloud(专题打 `area:cloud`)即整卡归 cloud PM(`repo:cloud` 席):读或改 cloud 代码、生产方或带 cloud 半边;本仓车道 ⛔ 不认领;只缺事实读数者留车道敲信箱;cloud PM 跟到关卡,余下本仓活写明 cloud 事实后另立卡;判据见 `references/cross-repo-coordination.md` | | `security` · `l2-review` · `eval`(车道,无 `domain:*` 标签) | 本仓安全公告(私有仓卡归该仓车道,cloud 即上行);席位 `security#N` 见 `references/lanes/security.md`;永不公开的规则只住 `references/security-findings.md`。L2 席、AI 评测席见 `references/lanes/l2-review.md`、`references/lanes/eval.md` | | `repo:objectstack`(全仓调度,无 `domain:*` 标签) | 跨各域按区认领本仓卡,多席以区租约分工;`domain:*` 仍定文件归属;cloud 与安全公告除外;见 `references/lanes/objectstack.md` | | (无固定归属,按落点分诊) | `packages/apps/*`、`examples/*`(归它演练的子系统,测试基建见 devx 行)、`docs/audits/**` | @@ -241,7 +241,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → L1 审核 → - ②:决策默认锚在所属 issue(分析发评论,中文;挂 `needs-user-decision`、退出活动队列)。 - 无自然锚才单开 `[Decision] <一句话>` 卡;分析模板见 `references/decision-analysis.md`。 - 落卡与呈报必带 `Governing text:`(AGENTS.md/ADR/spec docblock/lint 规则);选项与之冲突者非决策卡。 -- 协议为基准:spec 与代码不一致默认改代码对齐;改协议单独立卡,⛔ 不作缺陷卡的选项。 +- 协议为基准:spec 与代码不一致默认改代码;改协议、新增公开面另立卡,⛔ 不作 `Bug` 选项。 - ③:人工答复到手,四件同笔:鲜度门/状态转换同笔/`Blocked-by:` 活性现验/条件已判即判。 - 鲜度门 = 录前重读晚于正文最后编辑的评论;案例与机械两旗见 `references/dispatch-runbook.md`。 - 一条裁决已记录的权威载体 = 总监席每场收工的摘要台账(卡、权威、方向、状态转移)。 @@ -272,7 +272,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → L1 审核 → 交维护者拍板。 - 分歧推荐序按拉动定向:有实测拉动 ⇒ 荐长远形态一次付清;零拉动 ⇒ 荐不扩散。 - 防错轴破余下平局向响亮/结构性;安全/权限边界与破坏性难逆动作恒在人工地板。 -- ⛔ 此序只排推荐:分歧块照旧升级,四棱同向 ⛔ 不构成代裁许可。 +- ⛔ 此序只排推荐、不扩修复范围:分歧块照旧升级,四棱同向 ⛔ 不构成代裁许可。 - 长远合理性权重恒 ≥50%:推荐以长远的读数领起,四轴冲突时其余各轴合起来投不翻它。 - 权重只排推荐不授权:读缩小特例与契约增生,⛔ 不背书投机扩张、不放行人工地板事。 - 四维分析从业务角度写;四棱是四轴的卡面序列化,一一对应,是人工裁决的输入。 diff --git a/.claude/skills/pm-dispatch/references/area-lease.md b/.claude/skills/pm-dispatch/references/area-lease.md index f0a16896b08..ca37dc31153 100644 --- a/.claude/skills/pm-dispatch/references/area-lease.md +++ b/.claude/skills/pm-dispatch/references/area-lease.md @@ -5,7 +5,7 @@ ## 分不分区,动态定 - 坐席、每次交接或换班时席位重判三件:分不分、分几区、边界;⛔ 不沿用上一班的表。 -- 分区阈值(经验):可认领 p1/p2 ≥15 张且跨 ≥3 个互不相干的模块簇;不足即照常按卡认领。 +- 分区阈值(经验):可认领卡 ≥15 张且跨 ≥3 个互不相干的模块簇;不足即照常按卡认领。 - 边界按卡触及的文件与包聚类,让两区极少改同一函数;⛔ 不按卡标题或词汇分。 - 排空的区并入邻区,积压即再拆(「比如增加分区」),⛔ 不抬一容器 2 dev 的并行验证上限。 - 租约表(区→路径→线程会话)住座位贴,任一列变或线程轮换即重写,为唯一记录。 @@ -21,7 +21,7 @@ 3. 维护者在每条新席线程亲写一句授权行:auto mode 只认本线程维护者原话,转述与点选不算。 - 席线程:「审批人批准后的 Tier H PR 你可以自主落地」 - 授权行只解 auto mode 的拦截,⛔ 不改 AGENTS.md 第 14 条的落地档;区线程无授权行。 -4. W0:各区首小时交席位一份关/并/改级/呈裁清单,同时即开首张 p1。 +4. W0:各区首小时交席位一份关/并/改级/呈裁清单,同时即开首张卡(p0/p1 先)。 - 清单经维护者过目后落笔:定级照 SKILL.md 域车道(自分诊例外住 `triage-duties.md`)。 ## 区内规则 @@ -43,7 +43,7 @@ - 席线程只协调,⛔ 不读 diff 与日志;ACCEPT 欠的自读(`contract-review.md`、〈路径分叉〉)除外。 所落 PR 欠的红检查读日志(`platform-readings.md`)派子代理读,一读兼守本条与该文。 - 每区恒 2 dev,空即补;逐位上张 PR 入合并队列才领下张,此前跑修复轮;Tier H 或待裁 PR 让位。 -- 席每轮逐区查;⛔ 不单做 p3:只搭同文件 p1/p2 PR(每 PR ≤5 卡);转制时已领未动的 p3 释放。 +- 席每轮逐区查;取卡照点名范围次序,p0/p1 插队;p3 留收口或搭同文件 PR 成批(每 PR ≤5 卡)。 - 同函数互相牵连的卡合一 PR,准入照 `execution-duties.md` 折叠五门,额度墙亦照该文。 - 留道:修法已清的卡碰 `ui/**`、`packages/spec/**` 仍在本道开发、本席 L1/L2;他道席在线只通知 「如果车道有人在线,只需要通知他就可以。」本条先于条款②行(`execution-duties.md`)、 diff --git a/.claude/skills/pm-dispatch/references/coordinator.md b/.claude/skills/pm-dispatch/references/coordinator.md index 1b9675c62d4..e07a0f7635f 100644 --- a/.claude/skills/pm-dispatch/references/coordinator.md +++ b/.claude/skills/pm-dispatch/references/coordinator.md @@ -14,7 +14,7 @@ ## 二、跨车道取卡(coordinator 每次唤醒读) -- 取卡面 = 本项目各车道 open 的 `priority:p1`/`priority:p2` 卡;候选判据照 `execution-duties.md`。 +- 取卡面 = 各车道 open 卡:p0/p1 先,再点名 area 或子专题的下一张;判据照 `execution-duties.md`。 - 每张卡交其车道的席位线程;车道无席位线程而座位贴空着 ⇒ 先开席位线程再交卡。 - 维护者 ⛔ 不逐卡点名车道:车道读卡的 `domain:*`;S/M 分流见 `dispatch-runbook.md` 卡线程节。 @@ -23,7 +23,7 @@ - 卡线程上限全项目一个数,由维护者按项目言明;未言明取各席 `batch` 之和。 - 席位攒批交候选,一线程一行:卡/PR、标题、级别、effort、汇报区、要读文件、续做分支。 - 派发令全文随行;⛔ 不等自己的槽位;区与卡线程 ⛔ 不直找 coordinator,经席位。 -- coordinator 一批开完、一次回全部 id:p1 先于 p2,同级先到先开;满即排队,交回或合入即释放。 +- coordinator 一批开完、一次回全部 id:p0/p1 先,余照点名次序;满即排队,交回或合入即释放。 - 槽位只算在建的线程:等人(授权批准、决策卡)或等席位 L1/L2 审核的卡线程不占槽。 - S 卡的席内子代理只计该席 `batch`,不计本上限。 diff --git a/.claude/skills/pm-dispatch/references/cross-repo-coordination.md b/.claude/skills/pm-dispatch/references/cross-repo-coordination.md index 7c0f3b7c839..685f46dcea7 100644 --- a/.claude/skills/pm-dispatch/references/cross-repo-coordination.md +++ b/.claude/skills/pm-dispatch/references/cross-repo-coordination.md @@ -1,7 +1,7 @@ # 多仓协调 - 依赖方向固定:`objectstack`(后端与 `ui/`,`packages/spec` 唯一契约)→ `cloud`、`hotcrm`、`mobile`。 -- 多车道仓 `objectstack`:中央分诊唯一生产 `domain:*`/type/定级,定级例外见 triage-duties 自分诊。 +- 多车道仓 `objectstack`:唯中央分诊产 `domain:*`;type/级照 filing-gate,例外见 triage-duties 自分诊。 - 单车道仓 `cloud`、`objectos`、`hotcrm`、`mobile`、`www.objectos.ai`;未来新仓默认此类。 - 单车道仓 `repo:*` 席自理机械三务,⛔ 不产 `domain:*`;决策卡入本仓收件箱,不落 objectstack。 - 机械三务 = 自扫 sweep、自打 `type`、自做首触(含 `finding`;业务理由归召唤的总监席)。 @@ -31,7 +31,7 @@ - 规则 3:联动杂事立单,不靠记忆。 - 已验收 PR 的产物流向另一仓,接受该 PR 的执行席立即在消费仓立后续单,带 `Blocked-by:`。 - 规则 4:纵向拆分,一个分诊 PM + N 个执行 PM;一人恰一车道,一车道可坐多席。 -- 多车道仓:分诊唯一生产路由/type/查重/shadow/`duplicate_of`;执行席永不路由裸卡,定级见上。 +- 多车道仓:分诊唯一生产路由/查重/shadow/`duplicate_of`;执行席永不路由裸卡,type 与级见上。 - 执行座位信任标签,只在本车道认领;误标挂 `pm:retriage`+异议同笔,整树归本席者席改标。 - 突发积压调频率或 `batch`,持续积压按仓拆席走 PR;⛔ 不跨车道借调。 - 维护者直派通道:当面指挥的 PM 会话直接路由,只对明示指挥的卡成立。 diff --git a/.claude/skills/pm-dispatch/references/decision-analysis.md b/.claude/skills/pm-dispatch/references/decision-analysis.md index f2871620855..d7380c9245f 100644 --- a/.claude/skills/pm-dispatch/references/decision-analysis.md +++ b/.claude/skills/pm-dispatch/references/decision-analysis.md @@ -25,7 +25,7 @@ - 防 AI 犯错轴写清出错时谁看到什么:响亮拒绝,还是静默泄露。 - 推荐 + 置信缺口:只荐一,余各一句不取理由;盲区明说,⛔ 不因此另荐;⛔ 不沿用他席推荐。 - 推荐先只按①得出:终态句写两年后该能力的平台样子与主流平台建模,点名参照。 -- ②③④ 与工作量只调时序分期 ⛔ 不翻字母;契约迁就实现、分期半量 ⛔ 不作推荐。 +- ②③④与工作量只调时序分期 ⛔ 不翻字母;契约迁就实现、分期半量(缺陷除外)⛔ 不荐。 - ①读数相近而工作量差 ≥3× 推荐须点名;翻字母只凭维护者卡上另裁,唯④新增门禁例外。 - 自检行「只看①选 X;②③④ 是否翻转:否 / 是(理由)」,答是不改字母,唯④新增门禁例外。 - 裁后执行段:写明裁定之后怎么执行,让维护者只裁方向不背执行。 diff --git a/.claude/skills/pm-dispatch/references/dispatch-runbook.md b/.claude/skills/pm-dispatch/references/dispatch-runbook.md index 6fc2d93383a..0e0b6865566 100644 --- a/.claude/skills/pm-dispatch/references/dispatch-runbook.md +++ b/.claude/skills/pm-dispatch/references/dispatch-runbook.md @@ -1,10 +1,5 @@ # 派发与收集运行细则 -## 车道取卡全序与 `pm:blocking` - -- 级别半边:p1–p3 是分诊已裁的显式排序;无级末位是分诊缺口,不是一个已裁的低优先级。 -- `pm:blocking` 的写入与摘除都在分诊轮 sweep,依赖者全关即摘。 - ## 紧急卡直接分诊 - 授权面不含派发:⛔ 不写码、不认领、不派发。 @@ -150,6 +145,11 @@ - 改法明确=目标不变,只换落点/修法或收至读数所证:评论记原前提、读数与改法再改正文。 - 卡项与既裁冲突 ⇒ 席砍该项再派 ⛔ 不问分诊;行首 `Ruling-ref:` 引既裁出处,原话逐字。 - 其余砍范围/降级/关卡归人工地板 ⛔ 不借改卡裁;读数落认领 `Premise:` 行,PR 结论限实测。 +- 范围评审:`Source: fleet` 计划命中工作量判据任一或 ≥2 PR ⇒ 派发前过;余源与已裁路线免。 +- 隔离 agent(`CONTRACT_REVIEW_TIER`)评,只拿卡与计划 ⛔ 不拿席位推荐;三问:最小改动、超出项、 + 每项谁要的(路行、专题卡号、裁决或真实客户原话)。结论落卡一行,diff 超出即 REWORK: + `Scope-review: 照做 | 砍到最小 | 拆分 · 最小项 · 超出项及出处`。无出处 ⇒ 只派最小项, + 余拆 `Feature` 卡(⛔ 不算「砍半」);最小项不触人工地板即免决策卡;L2 仍只审契约。 - subagent 读 PM 容器本地检出的 agent 定义与技能文本,不读 `origin/main`:过期则整批过期。 - 每批派发前:`git -C fetch origin main && git -C checkout --detach origin/main`。 - 游离 HEAD 使停止钩子跳过分支块,⛔ 不快进会话分支;只拒与切换冲突的脏改动,不拒分叉。 @@ -172,7 +172,7 @@ - 衍生 sub-issue:认领席同笔写父卡域与优先级、附查重词后派发;父卡 checklist 评论记一行。 - 无主阻塞项:只做 `Blocked-by:` 点名的那一张,做完即回,⛔ 不顺手接第二张。 - 无主阻塞项的契约面(含 `packages/spec`)按 `contract-review.md` 欠达档 L2 记录。 -- 在飞阻塞项:等待者在阻塞卡留行点名自卡;父卡 p0/p1 ⇒ 产品阻塞卡同笔升同级,沿链重复 +- 在飞阻塞项:等待者在阻塞卡留行点名自卡;级 ⛔ 不沿链继承,唯挡别仓 p1 者取该 p1 的级 ## 停摆复位梯度 diff --git a/.claude/skills/pm-dispatch/references/execution-duties.md b/.claude/skills/pm-dispatch/references/execution-duties.md index 497d40f01bf..2de6f494fb6 100644 --- a/.claude/skills/pm-dispatch/references/execution-duties.md +++ b/.claude/skills/pm-dispatch/references/execution-duties.md @@ -47,14 +47,14 @@ - 分诊预见的后续工作是一张卡,触发条件落地时立卡;⛔ 分诊一句话永不授权无卡编辑。 - 阻塞项无主 ⇒ 被挡席认领做掉,不限大小;在该卡走完整认领、尊重其热文件串行队。 - 阻塞项在飞 ⇒ 等;卡 PR 叠未合 PR 或 `Blocked-by:` 未合的,合前 ⛔ 不开线程(维护者令除外)。 -- 取卡前置 = `docs/NORTH-STAR.md`「Priority」第 3 条(含豁免):本车道队列开放 P0/P1 取卡时现读。 +- 取卡次序 = `docs/NORTH-STAR.md`「Priority」第 3 条:本车道队列开放 P0/P1 取卡时现读。 - 开放 = 未派发(无 `pm:dispatched`、无 assignee);在飞的 P0/P1 不挡任何候选,只余取卡全序。 - 取卡全序:维护者直派插队卡(出处三件)> 契约面卡(判据见 `references/lanes/spec.md`)> 标签序。 -- 标签序:`priority:p0` > `pm:blocking` > 功能点位次 > p1 > p2 > p3 > 无级。 -- 云车道企业版卡:取卡序 = `cloud/ROADMAP.md` 的档位与行序,⛔ 席位不在单卡上另调顺序。 -- 改序即改该表,由维护者或代其改并链裁决;改法见其「Maintaining this file」,⛔ 不抄表行。 -- `pm:blocking` 级内先按解锁扇出(从 `Blocked-by:` 反向索引现算,⛔ 扇出数不落标签)。 -- 全序每级现读/现算,零逐卡维护;无级/缺 `Path:` 轮报记分诊缺口。 +- 标签序:`priority:p0` > p1(任何 area,含暂停)> 维护者点名的 area 或子专题里的下一张 > 无级。 +- 云车道同按专题派,⛔ 不按 `cloud/ROADMAP.md` 行序;细则照 `lanes/cloud.md` 所指的 cloud 仓文件。 +- 点名范围内:子专题照其子卡次序与 `Blocked-by:`;无子专题先 p2 后 p3;级只决定插队。 +- `pm:blocking` 的写入与摘除都在分诊轮 sweep,依赖者全关即摘。 +- 全序每级现读/现算,零逐卡维护;无级/无 area/无 type 轮报记分诊缺口。 - 同级先非车队卡(作者非 `Bot` 且首行非席位签名),再 `Bug`、卡龄;⛔ 不升级、不越 p0。 - 一车道多席按全序交替取卡:席 1 奇位、席 2 偶位;只为破交替才发 `split`;认领戳仲裁。 - 空闲杂务:无卡可认领或等分诊的车道席对本车道卡做下四件;⛔ 不定级,自分诊例外照旧。 diff --git a/.claude/skills/pm-dispatch/references/filing-gate.md b/.claude/skills/pm-dispatch/references/filing-gate.md index 4a41cdbef55..35fea6d29c2 100644 --- a/.claude/skills/pm-dispatch/references/filing-gate.md +++ b/.claude/skills/pm-dispatch/references/filing-gate.md @@ -6,22 +6,33 @@ > 之前封号的时候讨论过 issue 和 pr 应该使用 claude app 创建,名称应该是 claude(bot) - 立卡只为四类,正文首行写立卡门类别 ①–④;⛔ 其余一律不立卡,不论它叫什么。 +- 首行并写 `Source: maintainer | topic #N | fleet`:`maintainer` = 维护者自立,或引其原话带链接; + `topic` = 他开或确认的专题子卡;余与无正面证据者皆 `fleet`;测试 agent 立卡亦带座位签名。 - ① 有具名落点或复现的产品缺陷,即 `pm:queue` 的定义;其内的 `finding` 限三类且带 `reach:`。 - ① 含用户可见的体验缺陷,与功能缺陷同等:界面上稳定复现、落点具名、预期不凭审美。 -- ⛔ 不是卡:纯审美偏好、重设计与新功能提议(走 ②)、无用户可见代价的性能观察。 +- ⛔ 不是卡:纯审美偏好、重设计与新功能提议(立 `Feature`)、无用户可见代价的性能观察。 - 判例:仪表盘刷新按钮独占一行、首屏白占约 120px ⇒ 立;「配色换个好看的」⇒ 不立。 - `reach:` 二选一:公开入口(HTTP/界面/`os validate`/保存)实测一次错误结果;或具名真实生产者。 - 两种例外照立,要点首条「先测可达性」:发版固化的错误文字;维护者直派。 - ⛔ 不经本门:安全发现(含可能泄露数据),不论多确凿;去向只照 `security-findings.md`。 -- ② 只有维护者能做的决定,落卡即带「维护者速读」与四棱块。 -- ③ 维护者直派的任务,正文引其原话;④ 协调节点:跨仓/跨层父单与它的逐层子单。 +- ② 只有维护者能做的决定,落卡带「维护者速读」与四棱块;车队 `Feature` 归此,免决策箱。 +- ③ 维护者直派的任务,正文引其原话;④ 跨仓/跨层协调父单(`tracking`,非 `pm:epic`)及子单。 - 增改 pm 规则的卡只在维护者点名时立(归 ③,正文引点名原话);⛔ 席位自提不立。 +- 新接口/协议键/元数据类型/审计种类/新能力另立 `Feature` 卡,⛔ 不作 `Bug` 选项,分诊拆。 +- ⛔ 当前值(冻结、暂停、重点、只做 p1、并发)不进技能,只住座位贴与项目记忆; + 单卡裁决只住该卡;唯常设规则进技能,须维护者明言长期有效或由他合并该规则 PR。 +- 技能 PR 正文逐条引来源;引文读作临时(先/暂时/这次/现在)或只对一席说 ⇒ L1、L2 退回。 +- 卡号、评论 id 与带日期的引文 ⛔ 不进技能正文;规则的出处只住落地它的 PR。 - ⛔ 不是卡:席位自己的失误、协议观察与「记住这条」,它们进座位贴或收班简报。 - 「搭下个碰 X 的 PR」不算 `carrier:`;已落地工作欠的后续照立卡,⛔ 不按「不是卡」压下。 - ⛔ 不是卡:丢卡重建(除非自身即 ①–④)、sweep 每 fire 重导的 pin/bump/卫生提醒。 - ⛔ 不是卡:既有卡一条评论能承载的指针/知会/请求;那条评论即其记录。 - UI 卡写明所需通用块或 spec 契约门;要产品命名 widget/dialog/hook/命名空间的卡退回重立。 - POST 前正文答四件:类别、业务理由、动手的读者(哪席哪步)、查重查询与命中数(含已关)。 +- 车队立的卡(席位、代立发现、清单、分诊)建卡带 area、type、级与正文定级行,缺一拒收。 +- 维护者或外部人立的卡由分诊首触补齐 area 与 type;人定的级 ⛔ 不改,分诊与各席同此。 +- 改级前读现级末次 `labeled` 事件:带 `performed_via_github_app` 或 bot actor 才算车队,余人定。 +- 对人定的级有异议 ⇒ 只在卡上评论一行理由;级与卡的状态 ⛔ 不动。 - 业务理由:谁受益、什么场景、不做会怎样;③ 以原话代,④ 承父单;分诊 ⛔ 不代写。 - 清楚且合北极星方向 ⇒ 照常定级入队;与「What gets built」不符或无受益者 = 站不住。 - 缺失或站不住 ⇒ `Triage: returned` 退回立卡人,留 `finding`,改后再读;⛔ 不代写不关卡。 @@ -40,33 +51,22 @@ ## 定级判据(北极星「Priority」的执行说明) -- p0:`main` 或合并队列红;发版阻塞卡只在发版窗内升 p0(⛔ 不打 `target:`),发版后回 p1。 -- p1:数据静默错或丢;安全边界;用户完不成核心任务且无绕行;发版所需的协议增项。 -- p2:有绕行的用户可见缺陷;普通协议增项;挡他卡的流程或工具卡(`pm:blocking`,不沿链继承)。 -- p3(默认):评审 nit、尾巴、落地后的文档与技能跟进、其余流程改进;真实用户可撞 ⇒ p2。 -- 协议增项:修复改 spec 接受/声明面(含 ADR-0087 转换窗)或 `/meta` 读存删门的收答,宽窄皆算。 -- REST/数据门收窄亦算;措辞、文档、账本、CLI 旗、lint/verify 导出、门不变的服务行为不算。 -1. 次序:影响行 → 第 2 条降档 → 第 7 条一次升档 → 第 8 条重点调档 → 末判发版窗 p0。 - 定级评论带一行:谁 · 哪门 · 多频 · 实测或读码。 -2. 降一档:仅最高权限或宿主开发者可触、经罕见配置或需非默认部署/驱动;不低于 p3。 - 提权、跨租户、不可恢复丢失不降;⛔ 无「无现用者」第二档:客户少,现用不证明什么。 -3. 读码得出且写明机制的发现与实测者同按影响定级;⛔ 无证据上限。 -4. 安全边界:卡写得出「低权/外部者经步骤 X 读写或动作越出授权」才算,否则按普通缺陷。 -5. 核心任务:北极星「Features on the road」中清单项为 P0/P1 的行;表外不算。 -6. 绕行:同角色、同门、不改数据模型,且报错或文档点名;「找管理员」「改库」不算。 -7. 真实用户可撞:默认配置照出货文档/技能,错或卡住;带处方响亮拒绝不算(北极星第 4 条)。 -8. 重点(清单住 `lanes/triage.md`)内:有具名客户或用户效果 ⇒ p1,无直接效果 ⇒ p2。 - 重点外:比影响行降一档;维护者裁定的级不动;p0(main 红、队列停摆、安全急务)本条不动。 - 只在首触与再分诊时用,⛔ 不回扫 open 存量(另需维护者一句)。 -9. 清单断言缺陷(产品对、清单错)按 p2 修,不继承项档;发版窗内挡验收判定带 `pm:blocking`。 - 项档继承只适用真实产品断;「平台测试清单反复变红,肯定要修啊」(维护者)。 -- 清单项三态 ①:项会 fail ⇒ 断,继承其 `priority`;⛔「有人在等」不是定级判据。 -- ② 项的标题/场景断言该能力而 steps 到不了那条路径 ⇒ 补步骤并继承该项档 ⛔ 不降 p3。 -- ③ 无项断言该能力 ⇒ 缺项补账本、北极星第 2 条 p3;②最常见,`area:*` 继承后成规模。 +- 表 ⛔ 本文不抄:本仓照北极星(大专题、核心功能与界线在「Product areas」,Bug 表、安全表 + 与补充规则在「Priority」第 2 条);cloud 以其仓 `docs/strategy/core-functions.md` 为准,两步同此。 +- 第一步先判仓库(病根在平台 ⇒ 在 objectstack 修),再定 `area:*` 与 issue type(定义见第 2 条)。 +- 第二步定级照第 2 条:只有 `Bug` 与安全卡查表;`fleet` 源 `Feature`(含体验类)定 p3。 +- 「具名客户」只指真实外部用户,定级评论写谁说了什么;测试 agent 自建应用的需求不算。 +- 读码得出且写明机制的发现与实测者同按表定级;⛔ 无证据上限。 +- 清单项会 fail、标题断言该能力而 steps 到不了(补步骤)、无项断言(补账本):一律查表, + 核心功能 ⇒ 断;⛔ 不继承清单项的 `priority`。 +- 清单断言缺陷(产品对、清单错)按 p2 修;发版窗内挡验收判定带 `pm:blocking`。 + 「平台测试清单反复变红,肯定要修啊」(维护者)。 +- 挡住别仓 p1 的卡取该 p1 的级,`Feature` 亦然;此外级 ⛔ 不沿链继承,「有人在等」不升级。 +- p0 照北极星;发版阻塞卡只在发版窗内升 p0(⛔ 不打 `target:`),发版后回查表所得的级。 +- 定级行:`area · type · severity · reach · evidence (measured or read)`;公开卡 ⛔ 不写安全机制。 - 假绿(仪器):绿线被读作「已核对」而实际没核对 ⇒ 一次人眼捕获即一次实测代价。 - 「Instruments serve the fleet」的四种答案 ⛔ 不压成两条;假红的标准代价形态是席位顺从它。 -- 北极星第 4 条只认出货面(`skills/**`、产品文档),⛔ 不含 `.claude/**` 内部协议。 -- 它认的是一句说错的话,⛔ 不是一句缺席的话;缺句按覆盖不足走北极星第 2 条。 +- 北极星「Priority」第 4 条只认出货面(`skills/**`、产品文档)说错的话,⛔ 不含 `.claude/**`。 ## 读数判据(判据的可达半径与零) diff --git a/.claude/skills/pm-dispatch/references/l1-review-checklist.md b/.claude/skills/pm-dispatch/references/l1-review-checklist.md index 76a2b907950..55b6ee29c72 100644 --- a/.claude/skills/pm-dispatch/references/l1-review-checklist.md +++ b/.claude/skills/pm-dispatch/references/l1-review-checklist.md @@ -14,7 +14,7 @@ ## 范围与 changeset -- 三条判据:无 `content/docs/releases/` 改动、用户可见改动有 changeset、无与卡无关的文件。 +- 无 `content/docs/releases/` 改动、用户可见改动有 changeset、无卡外或超 `Scope-review:` 的文件。 - 种类非 `none` 或带 `(narrowing)`:`Skills-docs:` 行在且属实;`follow-up owed` 立卡改 `#N`;缺 ⇒ REWORK。 - changeset/CHANGELOG、`content/docs/**`、`apps/docs/**`:逐句核 diff,ACCEPT 点名所核句,⛔ 不起子代理。 - Tests/docs-only 按仓库分流:本仓库走 `skip-changeset` 标签,⛔ 不走空 changeset。 diff --git a/.claude/skills/pm-dispatch/references/lanes/cloud.md b/.claude/skills/pm-dispatch/references/lanes/cloud.md index 3543f5693c0..c3a0eae1628 100644 --- a/.claude/skills/pm-dispatch/references/lanes/cloud.md +++ b/.claude/skills/pm-dispatch/references/lanes/cloud.md @@ -11,18 +11,9 @@ ## 常设承诺 -- 首触先行:每轮巡查先清 cloud 仓 open 卡中无 `pm:*` 状态或无 `priority:*` 者,清空后才认领。 -- 逐张定级(判据照 `filing-gate.md`),并落 `pm:queue` 或 `pm:blocked`+`Blocked-by:`,或附理由关卡。 -- 排除同 `triage-duties.md` 析取排除行与决策卡;缺件卡补齐照 `filing-gate.md` 单车道仓条。 -- 立卡即完整:本车道立的每张卡建卡同笔带 `priority:*` 与 pm 状态,不留首触欠账。 -- 取卡序:企业版卡按 `cloud/ROADMAP.md` 档位与行序(`execution-duties.md` 取卡节),⛔ 不抄表行。 -- 企业版卡一律挂作 cloud 仓企业版父单的 sub-issue(该父单上的维护者裁决)。 -- 优先级:只派 p1(维护者令,安全卡照下行按级派);p2/p3 卡留在队列,⛔ 不派。 -- 安全卡照常按级入队派修落地,⛔ 无常设停派(维护者令);余照 `security-findings.md` §6、§9。 +- 首触、定级、取卡序、企业版与安全卡规则见 cloud 仓 `docs/strategy/triage-rules.md` 与 + `docs/strategy/core-functions.md`;⛔ 本文件不抄。 - 卡阻于 objectstack 卡 ⇒ 挂 `pm:blocked` 或认领它的本车道席敲阻塞卡车道席 `Request: assist`。 - 阻塞卡未认领或停车改敲 `triage#1`;每张阻塞卡一次,轮记列明敲了谁;不限级(维护者令)。 - 兜底:分诊日对账见 cloud 卡无状态逾 4 h ⇒ 写信本车道各席;分诊 ⛔ 不代打标签。 - 发版板(窗内升 `priority:p0`)在 cloud 仓的生产者是本车道(`seat-post-protocol.md` 发版板节)。 -- CI 分钟三条入派发令与 Go 词(维护者令):① `pr_ready` 前容器跑类型检查与受影响测试,命令 - 与结果入报告;② ready 后的修改并一次 push;合 main 照 cloud `AGENTS.md` 第 7 条(先于通用纪律); - ③ `ci:full` 只给 pin 轮次、改 `.github/workflows/**` 与改仓根文件的 PR(cloud `AGENTS.md` 第 7 条)。 diff --git a/.claude/skills/pm-dispatch/references/lanes/director.md b/.claude/skills/pm-dispatch/references/lanes/director.md index 1be13af8225..727e48ed4e0 100644 --- a/.claude/skills/pm-dispatch/references/lanes/director.md +++ b/.claude/skills/pm-dispatch/references/lanes/director.md @@ -70,7 +70,7 @@ ## 职责四:发版板与总表 -- 每周首场复读 `cloud/ROADMAP.md`呈维护者:已关仍标开发中、open 企业版卡缺行、表序逆卡级。 +- 每周首场复读 `cloud/ROADMAP.md`呈维护者:已关仍标开发中、open 企业版卡缺行;不作取卡序。 - 云仓表漂移检查脚本落地后复读即跑它;是呈报非门禁,⛔ 不加 CI 检查、workflow、脚本。 - 发版板(窗内升 `priority:p0`)主仓归本席;判据二元,⛔ 不做优先级渐变:不修它,RC 能不能发。 - 判阻塞四类:① 用户今天就撞的已发布面缺陷;② 公开契约 declared≠enforced。 diff --git a/.claude/skills/pm-dispatch/references/lanes/hotcrm.md b/.claude/skills/pm-dispatch/references/lanes/hotcrm.md index a4c2dd9d8f7..b8cb01c8e55 100644 --- a/.claude/skills/pm-dispatch/references/lanes/hotcrm.md +++ b/.claude/skills/pm-dispatch/references/lanes/hotcrm.md @@ -6,17 +6,10 @@ - 本席为姊妹仓执行座位:在 hotcrm 仓认领、派发、L1 审核、落地。 - ⛔ 不产 `domain:*`;机械三务(含首触定级)按 cross-repo-coordination.md 单车道仓条自理。 - -## 范围 - -- `objectstack-ai/hotcrm` 全仓:元数据优先的 CRM 样板工程,不入 spec 依赖链。 -- 应用即展品,不是功能实验场 —— 收卡第一问恒为这张卡展现哪项平台能力。 -- 边界:平台相关的功能在平台中实现。 -- 建设 hotcrm 时发现的平台能力缺口,立普通平台卡到 objectstack(渲染器在其 `ui/`)。 -- 那是 file-at-destination、非缝卡、待分诊;hotcrm 侧同笔挂 `pm:blocked` 加 `Blocked-by:` 回链。 -- ⛔ 永不在 hotcrm 内绕行:绕行把平台缺口藏进样板,展品从此示范错误写法。 -- `repo:hotcrm` 缝标签只给真协调卡,跨仓次序即卡的实质。 -- hotcrm 自己的卡(含决策卡)都住 hotcrm 仓:issue 住在修复落地的仓,决策入本仓收件箱。 +- hotcrm 的规则住 hotcrm 仓,⛔ 本文不抄:`AGENTS.md`(Scope;Product, priorities and the development + process;Platform Upgrades)与 `docs/PRIORITIES.md`(专题、首触、定级、阶段 × 文档)。 +- 跨仓机制照 `cross-repo-coordination.md` 规则 1 与多车道仓条,⛔ 本文不另写:平台缺口卡的立法 + 与 `Blocked-by:` 回链、`repo:hotcrm` 缝标签只给真协调卡、平台卡的 `domain:*` 归分诊。 ## 常设承诺 @@ -25,29 +18,4 @@ - 手工半边:开新派发前整车道全交集读 open 卡。 - 逐张核 `pm:dispatched` 与 `pm:in-review` 的交付 PR 是否已合并或关闭,先处置半状态。 - ⛔ 无锚不等于免检。 -- 展现平台能力:样板演示的能力必须真实兑现,declared 等于 enforced 在展品里双倍重要。 -- 展品撒谎等于教每个照抄的 AI 撒谎。 -- 发现 declared 不等于 enforced 先问生产者在哪;生产者在平台 ⇒ 上游卡。 -- 不扩散需求:创业阶段聚焦原则全额适用,四维框架的不扩散那一轴是本车道首要过滤器。 -- 框架单源在 SKILL.md 〈升级与决策〉,⛔ 不另抄。 -- 投机功能形状不入队:走决策箱或关 not planned;定级按 filing-gate.md,理由落卡,维护者可否决。 -- 双版本兼容:hotcrm 必须在 objectstack 社区版可运行,部署到 objectos 企业版时获得企业能力。 -- 操作判据:hotcrm 元数据只可依赖社区能力面,企业特性恒为增强,⛔ 永不硬依赖。 -- 会 break 社区版运行的卡定义上是错范围,回分诊。 -- 该仓有 changeset 流:`changeset-check.yml` 门住每个到 main 或 develop 的 PR。 -- 判据是本 PR 新增的 `.changeset/*.md`,对 base sha 求 diff,存量不算。 -- 两条法定豁免任选:`skip-changeset` 标签,或空 frontmatter 的 changeset 声明本 PR 零发布。 -- ⛔ 判据不是包的发布状态:该仓 `private: true`,门照设不误。 -- 无发版板:标签清单无 `target:*`。 -- 发版 = `changeset version` 一次消化存量,加 `v*.*.*` tag 触发 release.yml。 -- 依赖是已发布的 `@objectstack/*` 包,逐包定版号,非 git pin。 -- ⇒ 平台侧修复必须先发版、再在此升版号才到得了展品。 -- 上游卡对本道的解锁判据是已发布,不是已合并。 - pm 状态机词表各仓统一,幂等创建在 `scripts/pm/ensure-pm-labels.sh`,对 hotcrm 实跑是落地步骤。 - -## 席内判断 - -- 平台缺口卡是本席最常见的联动产出:立卡在平台仓、无 assignee、普通卡待分诊。 -- 平台仓卡的 `domain:*` 与 type 归分诊;本仓卡 type 随机械三务自打;催办不代裁。 -- 展品价值判据:一张卡若既不展现平台能力、也不修真实缺陷,默认不做。 -- 拿不准升决策箱,⛔ 不自裁。 diff --git a/.claude/skills/pm-dispatch/references/lanes/objectstack.md b/.claude/skills/pm-dispatch/references/lanes/objectstack.md index 7ff6ab8ed43..3a5b0a9a696 100644 --- a/.claude/skills/pm-dispatch/references/lanes/objectstack.md +++ b/.claude/skills/pm-dispatch/references/lanes/objectstack.md @@ -7,7 +7,7 @@ - 席位 `repo:objectstack#N`,可多席、多账号;签名、座位贴、信箱、坐席与收班同他席。 - 每席照 area-lease.md 分区运作:区线程、L1 线程、区内落地;本文只写全仓与多席特有者。 - ⛔ 非单车道仓席:cross-repo-coordination.md 单车道仓条、seat-lifecycle.md 单车道仓行不适用。 -- 首触、定级与 `domain:*` 仍归分诊(`triage-duties.md`);本车道 ⛔ 不产、不改 `domain:*`。 +- 首触与 `domain:*` 归分诊(`triage-duties.md`);本车道立卡带 area/type/级,⛔ 不产、不改 `domain:*`。 - ⛔ 不给卡挂 `repo:objectstack` 标签:按仓认卡;该标签已退流通,H14 仍作缝卡读。 ## 范围 diff --git a/.claude/skills/pm-dispatch/references/lanes/qa.md b/.claude/skills/pm-dispatch/references/lanes/qa.md index 826fa69dc3d..1b0a654ab55 100644 --- a/.claude/skills/pm-dispatch/references/lanes/qa.md +++ b/.claude/skills/pm-dispatch/references/lanes/qa.md @@ -23,7 +23,7 @@ ## 边界 - ⛔ 不派 `os-dev`、不改产品代码、不开 PR;§3 清单修订同断言缺陷立卡交该项车道。 -- 抽出的缺陷卡照常进分诊首触,⛔ 不定级、不入队;安全发现只照 `../security-findings.md`。 +- 抽出的缺陷卡带 area、type、级,照常进首触,⛔ 不入队;安全发现只照 `../security-findings.md`。 - QA 波次(发版候选全量、维护者点名目标)另由维护者触发;本席只跑 §6 例行与场景半边。 - 技能文本归 `domain:skills`、RUNNER 归 `domain:devx`;本席见文本问题以 `finding` 报,⛔ 不自改。 - GitHub 写只走 checklist-test §4 写入门;推维护者只限需其出手,⛔ 无周报聊天表。 diff --git a/.claude/skills/pm-dispatch/references/lanes/skills.md b/.claude/skills/pm-dispatch/references/lanes/skills.md index b6e71dbaf33..0da82ab4fe7 100644 --- a/.claude/skills/pm-dispatch/references/lanes/skills.md +++ b/.claude/skills/pm-dispatch/references/lanes/skills.md @@ -24,12 +24,12 @@ - Tier H 受管 PR 恒 draft 等维护者的字;flip 或 arm 前跑 `check-governed-merges --pr N` 定档。 - 档位从 `--tier` 推导引用;pm-dispatch 根恒契约审核档;条款②闸门照现行。 - 棘轮逐行付账,⛔ re-wrap 筹行;砍点逐条核幸存,被砍内容若在别处无家,砍掉就是丢规则。 -- 「Instruments serve the fleet」答不出的 finding ⇒ 建议 p3 或不做,⛔ 不自入队;定级归分诊。 +- 「Instruments serve the fleet」答不出 ⇒ `Suggested-grade: p3` 或建议不做,⛔ 不自入队;级归分诊。 - 内部指令面中文,机器判据恒英文;认领前重读全线程;标签写 read-modify-write 加回读。 - QA 波次何时开轮只住 `qa.md`;`qa#1` 的 §6 例行与场景半边逐开发波跑,不是波次。 ## 席内判断 -- 技能文本改动的 L1/L2 审核先问谁在读这一行:无具名读者的新增是 token 税。 +- 技能文本改动的 L1/L2 审核先问谁读这行(无具名读者 = token 税),再核来源(`filing-gate.md`)。 - 每条经验自含失效模式与边界;⛔ 操作文本不引 issue 编号,id-lint 机械强制。 - 本车道的 SKILL.md 热文件链是 fold-or-serial 最常命中的现场,链首认领就是答题处。 diff --git a/.claude/skills/pm-dispatch/references/lanes/spec.md b/.claude/skills/pm-dispatch/references/lanes/spec.md index fd1200de2b1..8fa2431a6ea 100644 --- a/.claude/skills/pm-dispatch/references/lanes/spec.md +++ b/.claude/skills/pm-dispatch/references/lanes/spec.md @@ -22,11 +22,11 @@ - 契约面 = 「改动前后同一份输入的接受/拒绝结果变了」;判定逐字节不变 ⇒ 辅助面。 - 契约面五形任一命中:收紧、放宽、公开导出面增删、declared ≠ enforced、退役。 - 辅助面的 changeset 恒 patch,默认 sweep-first;第二刀问「它误导了 AI 吗」。 -- 误导 ⇒ P2 保留;不误导 ⇒ 关 not planned,或搭下一个触碰它的 PR 的 Acceptance notes。 +- 误导 ⇒ `Suggested-grade:` 交分诊;不误导 ⇒ 关 not planned,或搭下个碰它的 PR 的 Acceptance notes。 - 放宽接受集或扩大公开面的卡,不论多小,即条款②;收窄仍是契约面,不触条款②。 - 收窄不触发条款②,但按 `yes` 申报恒不是错误;⛔ 个案裁决不改本行。 - 机器面改围契约的仪器,与辅助面不交,⛔ 不碰 `packages/spec/src/**/*.zod.ts` 与 strictness 台账。 -- 机器面卡只按北极星「Instruments serve the fleet」的那一问评级。 +- 机器面卡照北极星「Instruments serve the fleet」那一问写 `Suggested-grade:`,级归分诊。 - 拿不准 FLAG 回分诊,⛔ 不自设判据;档位随面走,表在 SKILL.md 模型分档,⛔ 不另抄。 ## 常设承诺 diff --git a/.claude/skills/pm-dispatch/references/lanes/triage.md b/.claude/skills/pm-dispatch/references/lanes/triage.md index 424e8c2059e..122fdee3b25 100644 --- a/.claude/skills/pm-dispatch/references/lanes/triage.md +++ b/.claude/skills/pm-dispatch/references/lanes/triage.md @@ -11,8 +11,8 @@ - ⑥车道不动:p1 卡在无席车道逾 4h;点名升级逾 6h 无答且回收需其一句;open PR 逾 6h 未更新, 先敲其席(无信箱按名)过下轮无答且回收需其一句;待裁或被具名 `Blocked-by:`、`status:parked` 卡、所骑栈阻者与信箱、Version PR 不算。⑦席位或子代理被拒、需人做的动作,⛔ 不代做。 -- 定级见 `filing-gate.md`;重点 = 四主题(中文客户/安装升级/性能与安全/MCP)与未暂停的专题; - 席位自开的专题经维护者在父单确认才算,新见者记轮次记录;增删主题须维护者确认。 +- 定级见 `filing-gate.md`(两步、查表);派发次序 = 维护者点名的 area 或子专题,级只决定插队。 + 子专题(临时 `pm:epic`)只由维护者开,其下的卡按内容打 area;见席位自开者记轮次记录。 - sweep 加推导 `pm:queue`/`pm:blocked` 无审计评论卡(豁免照 H74 行),照未定级首触补审计并报数。 - 每轮扫 `pm:dispatched` 卡与非信箱 open PR,进展=head 提交/非分诊评论/其席改标,非 `updated_at`。 - 进展逾 3h 即敲认领席 `Request: progress`,下轮读答复,无答列轮次记录;两轮无答视为掉线。 @@ -21,4 +21,4 @@ - 分诊不套用于自身或余席,⛔ 不当全车队令转述、不问维护者其范围。 - 转述的全车队或对分诊的令只认维护者在分诊会话所说,或分诊座位贴所记对本席的裁决。 - 转述令属分诊职责的后果照记(下班席入轮次记录、卡回队列),⛔ 不扩展该令。 -- 安全发现:即推 ① 后转交归属席即止(`security.md` 座位);有公开卡只定 `security`+p1,余不判。 +- 安全发现:即推 ① 后转交归属席即止(`security.md` 座位);`security` 标签 ⛔ 不定级,照安全表。 diff --git a/.claude/skills/pm-dispatch/references/seat-lifecycle.md b/.claude/skills/pm-dispatch/references/seat-lifecycle.md index 83bf24c63df..63bbb566ab2 100644 --- a/.claude/skills/pm-dispatch/references/seat-lifecycle.md +++ b/.claude/skills/pm-dispatch/references/seat-lifecycle.md @@ -49,15 +49,15 @@ ## Epic 子树车道 -- 专题 = 父单 + 里程碑表 + 负责车道(立卡车道):它拆卡并保持表现值;⛔ 无默认专题席。 +- 子专题 = 维护者开的父单 + 里程碑表 + 负责车道:它拆卡并保持表现值;⛔ 无默认专题席。 - 表四列 `Milestone | Child | Blocked-by | Lane`,一里程碑一组行,子卡格 `#` 加一句话。 -- 父单挂 `tracking` + `area:*`,无 pm 状态标签与 `pm:epic`,永不派发;决策锚在子卡。 +- 父单挂 `tracking`+`area:*`,无 pm 状态标签,永不派发;决策锚在子卡;`pm:epic` 限维护者所开。 - 子卡一律 `sub_issue_add` 挂父单、住车道队列,默认无 `pm:epic`;先后只写子卡 `Blocked-by:`。 - 滚动拆卡:只当前里程碑是卡,余为表行;其子卡全关,负责车道或专题席在父单贴拆分小结。 - 小结列下批卡、车道、边与代价;维护者 go 才立新子卡,no-go 走暂停;无答即候,非停摆。 - 旧规预立、未起工的下批子卡挂 `pm:on-hold`,`Restart-when:` 指小结的 go;go 前 ⛔ 不派发。 -- 专题次序 = 路线图表(云:`cloud/ROADMAP.md`;本仓列每日看板,直至有表);⛔ 无每账号上限。 -- 暂停:父单 `pm:on-hold` + `Restart-when:`(原话+理由);同笔未起工子卡同挂。 +- 专题次序:两仓都按专题派,次序 = 维护者点名;⛔ 无每账号上限。 +- 暂停:父单 `pm:on-hold` + `Restart-when:`(原话+理由);同笔未起工子卡同挂,级不动。 - 在飞子卡逐卡呈维护者:默认 L2 PASS 者落地,余停手转 `pm:on-hold`。 - 父单留检查点评论(发运/冻结件现状/风险);重启新读它后按表重拆,仍成立的旧卡可重开。 - 总览单列暂停专题(天数、`Restart-when`);逾 30 天问一次,不续则父单连余卡关 not_planned。 diff --git a/.claude/skills/pm-dispatch/references/state-machine.md b/.claude/skills/pm-dispatch/references/state-machine.md index 3329572c892..e6ed8fa21d1 100644 --- a/.claude/skills/pm-dispatch/references/state-machine.md +++ b/.claude/skills/pm-dispatch/references/state-machine.md @@ -14,7 +14,7 @@ - 合法性:正文或评论带 `Restart-when: closed #N`,由 `Blocked-by:` 同遍解锁扫描点火。 - 或带 `Restart-when: <一行可执行判据>`;两种拼写之外的 hold ⛔ 不合法。 - hold 评论写明日期、理由与出处(维护者裁或座位定级),⛔ 不设第二个标签区分两者。 -- 入 hold 同笔降 `priority:p3`,`Restart-when:` 行尾记 ` · Restart-grade: pN`;重启复原,跟踪卡/专题同。 +- 入 hold ⛔ 不降级(级只反映严重度);存量行尾的 ` · Restart-grade: pN` 即原级,照它复原。 - 冻结(freeze)裁决与 `pm:on-hold`+`Restart-when:` 同笔落地;只写评论不挂标 = 半状态。 - 机会主义重启的触发文件走 `Restart-touch: <仓内相对路径>`,一行一路径,值须为 tracked 文件。 - 该行大小写敏感、行锚定,与另两行同双通道,喂 H17 触发文件索引;存量 hold ⛔ 不迁移。 diff --git a/.claude/skills/pm-dispatch/references/triage-duties.md b/.claude/skills/pm-dispatch/references/triage-duties.md index 17bd1e6c569..6813d8b45bf 100644 --- a/.claude/skills/pm-dispatch/references/triage-duties.md +++ b/.claude/skills/pm-dispatch/references/triage-duties.md @@ -16,7 +16,7 @@ - 析取 ①全裸(无 `pm:*`/`needs-user-decision`/`domain:*`);② `pm:queue` 无 `domain:*`(仅多车道仓); - ③ `domain:*` 无 pm-state;④ `pm:queue`+`domain:*` 无 `priority:*`;②③④ 只取 `updated_at` 早于 ~2min。 - 排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 记录。 -- 析取 ⑤:窗内新建且 `pm:queue`/`priority:*` 与建卡同分钟,照未分诊首触;⛔ 不凭 actor。 +- 析取 ⑤:窗内新建且 `pm:queue`/`priority:*` 与建卡同分钟,谁打都首触;人定的级只补不改。 - 首触定级与五析取 sweep 每 fire 跑到清空,先于旧卡重验:⛔ 无每轮预算、无逐卡豁免评论。 - 五析取由 `node scripts/pm/first-touch-sweep.mjs --since=ISO` 照原文全量跑,⛔ 不手敲窄化或截断。 - 排序:每轮清空时最新优先,清不空起最老优先;半状态积压 ②③④ 恒最老、P0 嫌疑先行。 @@ -43,8 +43,8 @@ - 或实测拖慢车队开发:正确源上假红/假绿、反复重跑、同因丢 L1/L2 轮;卡须具名实例。 - `pm:queue` 也收恢复不变量的 finding、test-only pin,与实现未被裁错的说明书脱节(修文档)。 - 入 `pm:queue` 前读最新转换评论(dispatch-runbook 状态提取):hold/冻结/裁决 ⇒ 分诊自补半状态。 -- 自补 = 同笔 `pm:on-hold`+原文 `Restart-when:`+降 p3;写不出可执行判据才挂 `pm:retriage` 问车道。 -- `needs-user-decision` = 设计卡、feature/契约形状提案、需要 appetite 的多周程序;只挂 issue。 +- 自补 = 同笔 `pm:on-hold`+原文 `Restart-when:`;写不出可执行判据才挂 `pm:retriage` 问车道。 +- `needs-user-decision` = 设计卡、契约形状提案、需要 appetite 的多周程序;只挂 issue。 - 先例已定新键/值/导出名非契约形状提案;分诊审计 ⛔ 不自加门,唯语义/形状真分歧呈人。 - 碰迁移形状或删已发布能力也进决策箱;说明书脱节不进:有裁定出处才是 (b),否则改文档。 - 决策卡速读居四棱块之上、同题,用业务语言先讲事情与选项,末句只问一字:A/B/C 或是否。 @@ -56,24 +56,24 @@ - (c) 元数据 = 由写它的人以外的人存储并再作者化的键:React prop 不是,存储的视图配置是。 - 三类同欠 `reach:`,分诊只把关不测;观察、休眠、零拉动 ⛔ 不立卡、不进收口卡、无配额。 - 缺 `reach:` 且非例外 ⇒ 定 `priority:p3`,并入收口卡或清扫卡,⛔ 不单独派发、不因此关卡。 -- p3 首触标准:仅对已定 p3;`filing-gate.md` 定级第 2、3 条胜之,⛔ 不及其〈读数判据〉半径外。 +- p3 首触标准:仅对已定 p3;`filing-gate.md` 定级判据胜之,⛔ 不及其〈读数判据〉半径外。 关条中且留条不中 ⇒ 关 not_planned、写理由,胜本文与该文诸不关条;余皆留。关条:无客户/ 用户影响(仅 pin、ADR/jsdoc 措辞、内部重构、测试标题改写);读数过时、已取代或已交付; 按 `reach:` 两形无一可测的边角(如双持有者边缘、路径段内换行)。留条:用户可见缺陷、 已发布文档/技能、安全项、维护者直派、open PR 承载或席位已接、不可逆或有硬时限。 - 先修复:正文被 sanitizer 截断的卡不可派发,评论修复指令后跳过。 - 停摆指令判据必须比其它分类更硬(双读取),事后证伪同处公开作废。 -- `type`(Bug/Feature/Task)立单者可预填、分诊校正;新卡即时打,存量卡 ⛔ 不回填、下次碰到补。 -- 判据:违背已声明契约 ⇒ `Bug`,扩大接受集/公开面越出已声明 ⇒ `Feature`,其余 ⇒ `Task`。 -- 定级按北极星「Priority」1–3 条;首行 `Path: <定义项> | <清单项 id/缺项> | P<路步> | none`。 -- 定义项取北极星「What gets built」或仪器卡的车队决定;无则关;`none` 非分诊缺口。 -- 「无则关」= 首触即关 not_planned,带理由与入队三门,⛔ 不定 p3、不 hold;下行同此。 -- 所入车道队列 P0/P1 未派时,三门皆无的 p2/p3 `tooling` 卡同样关;「Priority」第 3 条豁免除外。 +- 首触复核 area、type(中继 `issue_patch` 写)、级与 `Source:`(核不出即 `fleet`),错即改并留原值。 +- 维护者或外部人立的卡首触补齐(照 `filing-gate.md`);日对账 fire 扫无 `area:*` 的公开卡补齐。 +- 预授权 `Feature` 免裁:`Source: topic` 子卡、北极星路行已断言能力、既裁执行、有先例新键。 +- 余 `fleet` 源者 ⛔ 不派发、不立决策卡、不自动关;分诊每周列单,维护者挑、并专题或关。 +- `Bug` 只修到卡面症状消失、同 PR 文档改成实情并写明未覆盖处;长远序只在其内排形状。 +- 所入车道队列 P0/P1 未派时,三门皆无的 p2/p3 `tooling` 卡首触即关;挡住在派工作的 p2 除外。 - 路由属分诊技术判断,⛔ 不升级哪个仓的问题;父单永不派发,`pm:epic` 卡 `pm:retriage` 即答。 - 算涉 cloud:亦含托管面(objectos-runtime)、修复待其改动的 `Blocked-by:` cloud 卡、病因在 cloud。 - 不算涉 cloud:修复与验收全在本仓,只在 cloud 测得或只缺其事实读数;仅引 cloud 卡作历史。 - 父单已有子结构的:父单挂 `tracking`,分诊逐个展开子卡路由、补 `Blocked-by:` 排序。 -- 跨层功能点(≥2 层)立父单带 `area:*`+`tracking`+清单项级,逐层子单按 `Blocked-by:` 排。 +- 跨层功能点(≥2 层)的协调父单挂 `area:*`+`tracking`、⛔ 非 `pm:epic`;逐层子单各自定级。 - 每张留一条英文审计评论(`Triage: lands in …; rationale: …`),可选带 `Size/model suggestion:` 行。 - 改作者可写面(种类非 `none` 或带 `(narrowing)`)的卡,首触 done-when 写 skills + docs + eval 三项。 - ADR/技能文本携带注记 ⛔ 不挂实施卡,每实施 PR 一 `domain:skills` 卡;ADR 由落地席合并后立。 @@ -86,11 +86,11 @@ - 首触答责任三问:谁的代码出险/有正路否/谁可达且有人用否;据答改卡范围、域与路由。 - 三类外不可逆或有硬时限(发版即固化、只被消费的文件、过窗不可补)⇒ 不关,报维护者。 - 三类外首触关闭只清门前存量,关 not planned(不等批准可否决重开);三类内无证据拒收。 -- 三类内再过时前提检查,三选一:晋级 / 关闭 not planned / hold;判级只在此轮,不在立单时。 +- 三类内再过时前提检查,三选一:晋级 / 关闭 not planned / hold;级在立卡时已定,此轮复核。 - ⛔ 带 `pm:dispatched`/assignee/open 或 merged PR 引用的卡不动;例外:关卡行、下两行、锚卡首触。 - 分诊活性复查:认领逾一天无自有产出(commit/PR/评论)⇒ 敲一次,首行键 `Owned-24h re-check:`。 - 敲门后 `RECLAIM_AFTER_HOURS = 12` 小时无答复 ⇒ 兄弟席一笔中继释放;无则轮次记录交总监。 -- 人工地板(恒呈维护者):功能新增;ADR;协议/公开契约变化;破坏性或难回滚动作。 +- 人工地板(恒呈维护者):非预授权的功能新增;ADR;协议/公开契约变化;破坏性或难回滚动作。 - 人工地板同含:安全/权限边界;门禁削弱(降阈/删必查/抬上限/跳测);新增运行时第三方依赖; - 花费/配额/舰队形态/默认模型档位;新增必需门禁/hook/棘轮(卡具名所守契约与预期捕获)。 - 地板同含:发版与对外发布;对外承诺;卡的命运(关 not planned、非 hold 的降级、撤回、砍半); diff --git a/AGENTS.md b/AGENTS.md index fb2c92aa7c5..6ffc16292f0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -206,8 +206,8 @@ See `ui/AGENTS.md` for the app-id / localStorage / auth gotchas. 7. **One Zod source per metadata type.** Each type (`view`, `flow`, `agent`, …) has exactly one schema in `packages/spec/src/{domain}/`. Environment-overlay opt-in lives only in `allowEnvironmentOverlay` on `DEFAULT_METADATA_TYPE_REGISTRY` — no parallel whitelists. See ADR-0005, amended by ADR-0131 C5. -8. **North Star alignment.** Read `docs/NORTH-STAR.md` before structural changes. If a change doesn't advance a row of - its *Features on the road* ladder, graded by its *Priority* — it probably shouldn't ship. +8. **North Star alignment.** Read `docs/NORTH-STAR.md` before structural changes. If a change doesn't advance a core + feature of its *Product areas* or a *Features on the road* row, graded by *Priority* — it probably shouldn't ship. 9. **`OS_` env-var prefix + structure.** All ObjectStack-owned env vars MUST start with `OS_`, then follow **`OS_{DOMAIN}_{FEATURE}[_QUALIFIER]`** where `DOMAIN` is the subsystem (`AUTH`, `SEARCH`, `CORS`, `CLOUD`, `DATABASE`, `CLUSTER`, `MCP`, `SSO`, …) so related vars group together (cf. `OS_AUTH_*`, `OS_CORS_*`). Pick the diff --git a/ROADMAP.md b/ROADMAP.md index 94b973f10e7..97a58b892c9 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,16 +1,16 @@ # ObjectStack Roadmap -> **Last updated:** 2026-11-08 -> **Source of truth:** the *Features on the road* table in -> [docs/NORTH-STAR.md](docs/NORTH-STAR.md). That table is the roadmap: its order is the -> priority, and editing it is editing priority. This page is a short public summary of it -> and decides nothing on its own. Where the two disagree, the North Star wins. +> **Last updated:** 2026-11-18 +> **Source of truth:** the *Product areas* and *Features on the road* sections of +> [docs/NORTH-STAR.md](docs/NORTH-STAR.md). Priority comes from its grading rules and the +> areas the maintainer names, not from the order of rows. This page is a short public summary +> of it and decides nothing on its own. Where the two disagree, the North Star wins. ObjectStack is measured by one road: a new AI developer, with a human accepting, starts from `npm create objectstack`, writes metadata, runs it locally, has verification reject what is wrong, publishes and installs it into an environment, connects an agent over MCP to complete one real business operation, and iterates once on a customer request. The -road is walked every week; the first step that breaks is the current P0. Security and +road is walked every week; the first step that breaks goes ahead of other work. Security and data integrity come first and do not wait for the road. ## Now @@ -42,8 +42,8 @@ The first three steps of the road, where an application is written, run and chec restarts, bringing the customer's existing data in, and structural changes that a dev boot heals safely while production takes no liberties. -The order above follows the table. Which step is P0 at any moment is decided by the -weekly walk, not by this page. +The grouping above follows the steps of the road, not an order of work. Which step is +broken at any moment is decided by the weekly walk, not by this page. ## Commercial editions @@ -53,7 +53,7 @@ framework. Their roadmap is published at [objectos.ai](https://objectos.ai), not ## Where the details live - **Open work:** [issues](https://github.com/objectstack-ai/objectstack/issues), filtered - by the `area:*` labels for one feature axis and by `priority:*` for order. + by the `area:*` labels for one product area and by `priority:*` for what jumps the queue. - **Release targets:** [milestones](https://github.com/objectstack-ai/objectstack/milestones) and the `target:*` labels. - **What has shipped:** each package's own `CHANGELOG.md`; for the view layer under `ui/`, diff --git a/docs/NORTH-STAR.md b/docs/NORTH-STAR.md index 6a810ac14b3..de2658cb1e3 100644 --- a/docs/NORTH-STAR.md +++ b/docs/NORTH-STAR.md @@ -8,112 +8,166 @@ **What counts as done**: an application built on the protocol is done only once it has passed verification — the checklist items its metadata maps to pass in one run, and `objectstack verify` is green on it. A delivery that has not passed verification does not count as done. -**The one measure: the road**: a new AI developer (a human accepting alongside) starts from `npm create objectstack`: write metadata → run it locally and see it → verification loudly rejects what is wrong and lets through what is right → publish and install into an environment → connect an agent (MCP in the community edition) and have it complete one real business operation in the application → iterate once on a one-sentence customer request. Walk it for real every week, and the result lands as a run record. The first step that breaks is the current P0; one that runs through but gives a wrong result is graded by "Priority" rule 2. The four promises are each kept by a step: ① AI can write it · ②③ it executes · ④ you own it · ⑤ agents can operate it; the sixth step, ⑥, closes the loop. - -**Features on the road**: the features the platform has to deliver, one per line, arranged by the steps of that road; top to bottom is the order — this table is the roadmap, and editing it is editing priority. Each row reads `axis · feature (in business language) · checklist area · item ids`, and one feature is a whole strip from protocol through runtime to the frontend; every item in `docs/qa/platform-checklist/` belongs to exactly one row here (an item not yet written is marked "checklist item to be written"). An id without a prefix belongs to the checklist area before it; one from another area is written in full. - -**① Set out: start a project with `npm create objectstack`, write metadata** - -- devpath · One command starts a project: scaffolded, installed, verification passes, the console's first screen paints · cli · scaffold-first-run, scaffold-console-first-paint -- devpath · The build is the author's first gate: errors carry a location, artifacts and statistics come out · cli · build-own-contract -- devpath · Code snippets written into metadata have boundaries: hook and action bodies refuse out-of-bounds spellings · cli · hook-body-extraction-gates -- studio · Build objects, fields, lists, forms and record pages without writing code · studio-authoring · object-designer-roundtrip, view-authoring-live, record-page-roundtrip -- studio · Custom pages: block composition, page variables and page-level actions, three source tiers · studio-authoring · custom-page-render-and-blocks, page-variables-and-actions, custom-page-source-tiers -- studio · Draft first, then publish: publishing is atomic, and conflicts and invalid drafts are refused on the spot · studio-authoring · draft-publish-lifecycle, authoring-validation-not-persisted -- studio · Studio's judgements and boundaries: expressions agree with the engine, the permission matrix can be edited, the registry decides what can change at runtime · studio-authoring · expression-editors, permission-matrix-editor-ux, org-override-registry-gate -- studio · An administrator writes Markdown documents in the UI and adds them to the menu (books included), published as a portal by audience · studio-authoring + platform-core · doc-on-app-menu, platform-core.docs-audience-gate, platform-core.docs-portal-render - -**② Run it locally and see it — every capability an end user uses in the application is needed for the first time at this step** - -- devpath · One command runs the application: health and readiness both pass, the database choice is honest, port and staleness are both said out loud · cli + platform-core · dev-boot-contract, platform-core.boot-health, platform-core.runtime-config-boot-read -- devpath · Seed data lands in the database as written, and a replay adds nothing and loses nothing · platform-core · seed-integrity, seed-mode-matrix -- devpath · You can sign in, and the shell remembers: navigation, built-in apps, favourites and recents, theme, keyboard shortcuts, the back key · platform-core · console-login, nav-surfaces-render, builtin-apps-nav-render, shell-nav-personalization, theme-mode-persistence, keyboard-shortcut-surface, url-overlay-contract, home-admin-cluster-links, console-installability-indicators, app-management-toggle -- devpath · Platform settings change in the UI: a change really takes effect, leaves a trace, and secrets are stored only as handles · platform-core · settings-hub-roundtrip -- devpath · Telemetry and lifecycle data are reclaimed by retention period, and an object declared as archived is never hot-deleted · platform-core · lifecycle-retention-sweep -- devpath · The metadata registry is readable from outside, and only a writable package can be changed · platform-core · metadata-registry-serving, metadata-authoring-roundtrip -- records · A record is created, seen, changed and deleted, and another can be made from it · records-forms · crud-roundtrip, record-clone-contract -- records · Every field type renders, accepts input and persists, and a wrong value is refused on the spot · records-forms · field-type-matrix, field-type-constraints, field-unique-enforcement, encrypted-field-behavior -- records · Lists get work done: filter, search, sort, paginate, saved views, inline editing, export, bulk · records-forms · list-view-capabilities, view-type-gallery, adhoc-filter-sort-builder, grid-personalization, saved-view-management, bulk-select-all-matching -- records · Kanban, calendar and Gantt can be dragged; they are not pictures · records-forms · kanban-drag-persistence, calendar-interactions, gantt-interactions -- records · Forms work: layout, dirty-data guard, conditional visibility and required rules, cascading options · records-forms · form-view-gallery, form-dirty-guard, conditional-rules-header, conditional-rules-grid, cascading-options, cascading-multilevel-and-clear, field-group-visible-when -- records · Master and detail save together, related lists paginate on the server, and a lookup picker creates a new record in passing · records-forms · master-detail-atomic-save, related-list-server-pagination, lookup-picker-create-new -- records · Write rules are honoured on the server: a collision is loud, an edit can be undone, and what changed is visible · records-forms · validation-rule-type-matrix, object-hook-lifecycle, delete-behavior-matrix, concurrent-edit-conflict, record-edit-undo, field-history-tracking -- records · Actions and collaboration on a record: buttons sit where they are declared, the parameter contract is honoured at dispatch, discussion and @-mentions · records-forms · action-location-matrix, action-param-widgets, upload-guard-blocks-confirm, record-discussion-mentions -- records · Search finds it: across fields, scoped to a field, consistent with permissions, pinyin, fresh at once; global search and the command palette take the same road · search · cross-field-object-search, field-scoped-narrowing, rls-both-personas, pinyin-flag-both-sides, freshness-and-empty, console-global-search, command-palette-navigation -- records · Shared option sets: several objects reuse one set of options · records-forms · picklist-shared-across-objects -- access · Row-level and field-level permissions are right on both sides: a restricted member sees only their own, what should be read-only is read-only, and what should be invisible is not returned to the frontend · access-security · rls-both-sides, scope-depth-asymmetry, fls-mask-and-strip -- access · Create, read, update and delete are honoured cell by cell, a permission change shows at once, and the self-check endpoint agrees with the server · access-security · crud-permission-matrix, permission-matrix-edit-loop, me-permissions-aggregation-parity -- access · The write path holds: read-only fields are stripped, a forged or transferred owner is refused, and default visibility can only be tightened · access-security · write-path-guards, owd-save-gate -- access · Sharing: the default baseline, rules that widen, manual sharing of a single record, suggested bindings · access-security · owd-sharing-matrix, sharing-rules-widen, record-share-grant-revoke, sharing-rule-authoring-ui, suggested-binding-loop -- access · Anonymous cannot get in: every API family refuses uniformly, and before any resource is resolved; having no active organization is also a legal state · access-security · anonymous-deny-surfaces, no-active-org-session-semantics -- access · The small doors opened to the outside: public forms and share links, revocable and leak-free · access-security · public-form-intake, share-link-capability-tokens, share-link-landing-page -- access · Explainable and auditable: access explanations attributed layer by layer, an audit log browser, record views leave a trace, and the platform administrator identity itself holds · access-security · record-access-explain, audit-log-browser, record-view-read-audit, platform-owner-email-anchor -- identity · Sign-in methods switch on and off by configuration, and what is advertised really works · identity-auth · auth-method-matrix, sso-enforced-first-paint, phone-signin-surfaces -- identity · The first install has an owner: zero-user first run, the sign-up gate, email verification · identity-auth · first-run-owner-bootstrap, self-signup-gate, email-verification-loop -- identity · You can get back in and change things yourself: forgotten password, profile changes, sessions you can see and revoke · identity-auth · self-service-password-reset, self-service-profile-password, session-list-revoke -- identity · Two-factor authentication: enable, verify, backup codes, disable · identity-auth · two-factor-enrollment-reveal, two-factor-verify-to-activate, two-factor-backup-codes, two-factor-disable-lifecycle -- identity · Organizations, teams and business units, and the administrator's user operations · identity-auth · org-membership-team-management, teams-bu-membership, invitation-scope-gates, workspace-org-switch, admin-lifecycle-operations, identity-import-wizard -- identity · External identity: OAuth consent and linked social accounts · identity-auth · oauth-app-consent-loop, linked-accounts-social -- workflow · An approval runs to completion: joint sign-off, quorum, dynamic approvers, timeout escalation, out-of-office delegation · approvals · per-group-signoff, quorum-m-of-n, dynamic-approver-routing, sla-escalation, ooo-delegation-reroute, approver-resolution-matrix -- workflow · Approvals are done in the UI: the inbox, record-page buttons, a keyboard flow, pending counts, notifications that deep-link · approvals · inbox-metadata-actions, viewer-gating-submitter-side, record-page-decisions, inbox-keyboard-flow, pending-count-surfaces, account-app-entry, setup-nav-entry, notification-deep-link -- workflow · Every approval action is backed by the server-side state machine, and the one-click email action takes the same road · approvals · decision-action-matrix, decision-only-via-service, status-mirror-field, email-action-token-door -- workflow · Flows run: node types, trigger types, the run tree and logs · automation · flow-node-type-matrix, trigger-type-matrix, flow-run-step-nesting, flow-runs-page-test-trigger, trigger-status-contract -- workflow · Flow errors, pauses and schedules: try/catch, screen flows, resuming after a cold restart, rollups and time-based triggers, the toggle is the brake · automation · flow-error-handling, screen-flow-roundtrip, durable-suspend-restart, rollup-summary-filter, time-relative-trigger, flow-toggle-kill-switch -- reports · Charts paint, every type is there, empty data is handled gracefully, a wrong key is loud; drill-through works and global filters refetch · dashboards · chart-first-paint, chart-type-matrix, empty-null-bucket-boundaries, strict-widget-rejects-stray-keys, drill-through-range, global-filters-rescope -- reports · Reports you build, save and own yourself, and that send themselves on schedule · dashboards · dataset-report-authoring, saved-report-ownership, report-schedule-dispatch-delivery -- reports · The business numbers add up: the system overview and the analytics cube · dashboards · system-overview-live-counts, cube-query -- files · Upload and download work, and permissions follow the parent record · attachments-storage · presigned-upload-roundtrip, download-authz-both-sides, read-inherits-parent-rls, attach-requires-parent-edit -- files · A file's lifetime and the file cell in a form: submit, tombstone, reap, resume; size and type are checked again on the server · attachments-storage · sys-file-status-pipeline, orphan-tombstone-reap, upload-session-abort, inline-grid-receipt-cells, field-accept-maxsize-server-enforced -- i18n · The whole application speaks the customer's language, Studio switches with it, and notifications land in the right language too · i18n · surface-matrix, studio-follows-app-locale, notification-localized-and-clears -- api · The query contract: operators, parameters, aggregates and date windows all have known answers · api-backend · query-contract-matrix, aggregate-contract-matrix, date-range-preset-matrix, filter-comparand-conformance -- api · Bulk and the write door answer row by row; the error envelope and the route ledger: every code is registered, and what is mounted is what really runs · api-backend · bulk-write-contract, batch-transactional-discovery, error-envelope-ledger, route-ledger-live-parity -- api · A self-declared API endpoint mounts as a real URL and can be tried on the spot in the developer console · api-backend · declarative-endpoint-execution, api-console-discovery-execute -- api · The REST surface's construction contract: switches decide what mounts and which verbs pass, timing opens to administrators only · api-backend · rest-crud-config-contract, rest-batch-config-contract, rest-metadata-config-contract, rest-route-generation-tombstones, api-methods-verb-gate, server-timing-admin-gated -- api · The formula engine: every standard-library function gives a known answer, and a wrong expression is stopped at build time · api-backend · formula-stdlib-matrix, formula-gates -- api · Connect to external systems: connectors land declaratively, a broken one degrades alone, auth and command allowlists, callable from a flow · integration-system + automation · connector-declarative-boot, connector-degraded-recovery, connector-stdio-default-deny, connector-spec-path-no-escape, connector-descriptor-audit, connector-auth-kind-application, flow-connector-picker, automation.connector-dispatch-matrix -- api · An external data source plugs in and is used as your own objects; secrets can be neither written in nor read out · integration-system + cli · external-datasource-federated-read, external-schema-introspection, external-schema-drift-gate, external-schema-browser-ui, datasource-admin-lifecycle, datasource-credential-refusal-matrix, cli.datasource-introspect-codegen -- api · Send out, take in: webhooks, scheduled jobs, email templates, inbox delivery and subscription preferences, the bell's read state · integration-system + platform-core · webhook-lifecycle, job-scheduled-run, email-template-render, notify-inbox-delivery, notification-preference-suppression, platform-core.notification-center - -**③ Verify: loudly reject what is wrong, let through what is right** - -- devpath · `objectstack verify`'s verdicts are a closed set, and only a failure exits non-zero; the quality suite runs on a real application · cli · verify-verdict-exit-mapping, qa-suite-execution -- devpath · Health check and deprecation scan: every item has an owner and can state a prescription · cli · doctor-health-report, doctor-deprecation-scan -- devpath · Lint severities are a closed set, and only an error blocks; a misused command is loud · cli · lint-severity-exit-contract, flag-command-error-ux -- api · Wrong metadata is refused at the author's door, with a prescription · api-backend · enforce-or-remove-authoring-gates, retired-def-refusal -- i18n · A wrong translation key is refused at both doors, and the build gate can go red · i18n · strict-translation-key-rejection, build-gates-hold -- studio · A health check of existing metadata: every non-compliance reported with its location · studio-authoring · metadata-diagnostics-sweep - -**④ Publish and install into an environment** - -- devpath · Pack as a plugin: the manifest is enforced at the packaging boundary · cli · plugin-manifest-build-contract -- devpath · Install it: compatibility, namespaces, enable, disable and uninstall, with the same lifecycle on the REST side · platform-core + api-backend · manifest-install-contract, package-lifecycle-enable-disable, api-backend.package-rest-lifecycle -- devpath · Install from the marketplace: it installs with or without a control plane, and the UI does not lie · platform-core · marketplace-install-local-lifecycle, marketplace-console-honesty -- devpath · Migration: see the plan before acting, an interrupted one can say the next step, and an old spelling gets a fix · cli + platform-core · migrate-plan-apply-json, migrate-meta-codemod, migrate-duplicates-inventory, platform-core.interrupted-migration-boot-report -- devpath · A packaged object can be extended but not changed, and every enable and disable is recorded on the activation ledger · platform-core + access-security · packaged-object-extend-only, activation-ledger-registration-home, activation-ledger-row-contract, access-security.activation-write-operator-gate -- workflow · Packaged flows and actions: disabling is durable, refused while depended on, cloneable, and both doors are equally strict · automation + api-backend + access-security · packaged-flow-disable-durable, packaged-flow-subflow-disable-refusal, packaged-flow-clone-contract, setup-packaged-automation-board, api-backend.packaged-action-disabled-dispatch, api-backend.action-activation-door-contract, access-security.packaged-flow-write-door-parity -- access · An installed package carries the capabilities and permission sets it declares, and a read-only package locks Studio · access-security + studio-authoring · capability-declaration-lifecycle, packaged-permission-set-lifecycle, readonly-package-locks-studio, studio-authoring.packaged-automation-studio-lock -- studio · Packaged views and dashboards are the class that can be edited directly · studio-authoring · packaged-display-class-direct-edit -- devpath · You own it: the definitions are diffable in your repository, and the whole ontology can be exported and run self-hosted without us · platform-core + cli · ontology-export-roundtrip, artifact-reproducible-build, standalone-boot-no-cloud (checklist item to be written) - -**⑤ Connect an agent (MCP in the community edition) and have it complete one real business operation** - -- ai · agent / tool / skill metadata can be written and listed, and a retired key gets a prescription · ai · agent-tool-skill-metadata-roundtrip -- ai · The MCP surface switches as documented: both the HTTP and the stdio road fail closed · ai · mcp-http-surface, mcp-stdio-fail-closed -- ai · What an agent can do is what the application really can do: an action is exposed first, an expression is validated on the spot · ai · mcp-run-action-exposure-gate, mcp-validate-expression -- ai · Skill instructions are projected onto MCP prompts · ai · skill-instructions-mcp-prompts -- ai · What the community edition lacks it honestly says it lacks, and the UI puts up no empty shell · ai · open-edition-honest-degradation, console-ai-surface-gating -- identity · Give an agent a personal key: shown once, revocable and restorable · identity-auth · api-key-ui-lifecycle - -**⑥ Iterate once on a one-sentence customer request** - -- studio · The first-run loop: create a package → create an object → records → an app → publish → end user, zero code and zero restarts · studio-authoring · first-run-loop -- records · Bring the customer's existing data in: encoding, mapping, transforms, undo and cancel · records-forms · import-wizard-encoding-and-hints, named-import-mapping, import-job-undo-cancel, import-transform-matrix -- devpath · Structural changes an iteration brings: a dev boot self-heals only the safe part, and production takes no liberties · cli · dev-automigrate-policy +**The one measure: the road**: a new AI developer (a human accepting alongside) starts from `npm create objectstack`: write metadata → run it locally and see it → verification loudly rejects what is wrong and lets through what is right → publish and install into an environment → connect an agent (MCP in the community edition) and have it complete one real business operation in the application → iterate once on a one-sentence customer request. Walk it for real every week, and the result lands as a run record. The first step that breaks, and one that runs through but gives a wrong result, are graded by "Priority" rule 2; the road is the builder's path, so a step that breaks with no workaround is Broken × builders, p1. The four promises are each kept by a step: ① AI can write it · ②③ it executes · ④ you own it · ⑤ agents can operate it; the sixth step, ⑥, closes the loop. + +**Product areas**: the work is split into six standing product areas, plus two areas that are not product; every public card carries exactly one `area:*` label. Security is an area of its own and lives only in the private security channel. An area is split by what the user feels is broken, not by whether the code sits in the frontend or the backend; which layer the code is in is what `domain:*` decides, and it only decides who changes which files. An area is a standing label and opens no issue; its core features are listed here. A sub-epic is a temporary `pm:epic` issue that the maintainer opens when the business needs one and closes when it is done; a card under a sub-epic takes its `area:*` by its content, and dispatch follows the parent link. Only AI is in development today; the others are relatively stable. The cloud repository follows these rules with its own areas and core features. + +| Area | What it covers | Core features | Status | +|:--|:--|:--|:--| +| `area:ai` AI | asking for data, writing data, MCP, AI chat, product skills, evals and scenario cards | ① asking for data returns the right numbers and holds row- and field-level permissions ② answers use labels and units and never expose internal values ③ writing data (changing records, running actions, moving approvals) passes permissions and confirmation; an overstep is stopped and leaves a trace ④ what MCP exposes is what the application really can do ⑤ what the skills say matches what the platform does | in development | +| `area:build` Building | starting a project, writing and verifying metadata, building in Studio, the CLI | ① one command creates a project and runs it ② wrong metadata is loudly refused with a prescription ③ Studio builds objects, fields, views, forms and pages ④ draft to publish is atomic | stable | +| `area:data` Data and permissions | records, search, the numbers in queries and reports, query performance, files, row- and field-level permissions, sign-in and organizations, audit | ① records are created, read, updated and deleted; fields accept input and persist, a wrong value is refused on the spot, master and detail save together ② list filtering, sorting, pagination, bulk actions and search give the right results ③ queries, aggregates, reports and dashboards add up; a query runs in the database and is not truncated when the data is large ④ row- and field-level permissions are right on both the frontend and the backend, and file permissions follow the record ⑤ anonymous cannot get in; sign-in, password recovery, two-factor authentication, sessions that can be revoked ⑥ organizations, members, invitations, SSO and SCIM; the audit log can be browsed and access can be explained | stable, core | +| `area:workflow` Flows and integration | flows, approvals, notifications, printing, scheduled jobs, the API, external data and connectors | ① flows and approvals run to completion ② notifications arrive and scheduled jobs run on time ③ the API works as documented ④ external data and connectors plug in, and a sync loses nothing | stable | +| `area:ux` Experience | whether it looks right, is easy to use and gives feedback; i18n, mobile, the shell and navigation, page load | ① one design system, one consistent layout ② every write gives feedback ③ an error speaks plainly and gives the reason ④ the main operations can be done on a phone ⑤ a Chinese interface shows no stray English ⑥ common pages paint their first screen within an acceptable time (threshold to be set) | stable | +| `area:package` Packages and install | addressing by package, installing, enabling, disabling and uninstalling packages, seed data, upgrades and migrations, release notes | ① a package installs, enables, disables and uninstalls, and once disabled every surface says the same ② seed data lands exactly as written ③ an upgrade shows its plan first and loses no data ④ every release has release notes, and a breaking change has a migration guide | stable | +| Security (no label) | security cards in the private security channel | graded by the security table below; the grade is recorded only in the security channel | private | +| `area:fleet` Fleet | CI, tests, lint tools, PM tools, the fleet's internal skills, governance scripts | no core features; graded by which decision of the fleet will differ once it lands ("Instruments serve the fleet") | not product | +| `area:cloud` Cloud-related | any card related to the cloud repository: a card that needs to read cloud code, or a change that serves only the hosted edition | follows the cloud cards | not product | + +Area boundaries, one `area:*` per card: +- The result is wrong or the thing cannot be done ⇒ the area of that feature; it can be done but looks wrong, is hard to use, cannot be understood or gives no feedback ⇒ `area:ux`. i18n and mobile go to `area:ux` even when the thing cannot be done. +- Data and permissions inside the application (sign-in, organizations and search included) ⇒ `area:data`; across systems (the API, syncs, connectors) and step by step (flows, approvals, notifications, schedules) ⇒ `area:workflow`. A permission bypassed always goes to `area:data`, whether or not the door is MCP. +- Writing metadata ⇒ `area:build`; installing, upgrading and releasing packages ⇒ `area:package`. +- Slow: a slow query, a query not pushed down, data truncated because it is large ⇒ `area:data`; a slow page load ⇒ `area:ux`; any other slowness goes to the area of its feature. +- A card related to the cloud repository (it needs to read cloud code, or its change serves only the hosted edition, a problem that appears only in the hosted environment included) always goes to `area:cloud`, in place of its product area, and is graded all the same. +- Product skills (the `skills/` shipped to users), evals and scenario cards ⇒ `area:ai`; CI, test tools, PM tools and the fleet's internal skills ⇒ `area:fleet`. +- A security hole opens no public issue and carries no `area:*`: it goes to the private security channel, and the grading line of a public card never describes a security mechanism. +- A card that fits no area: triage says so on the card and reports it to the maintainer, and never opens a new area itself. + +**Features on the road**: the features the platform has to deliver, one per line, grouped by product area; each row names the step of the road it serves. The table is the feature map, not an order: grading reads the core features above, and dispatch order comes from the areas and sub-epics the maintainer names. Each row reads `step · feature (in business language) · checklist area · item ids`, and one feature is a whole strip from protocol through runtime to the frontend; every item in `docs/qa/platform-checklist/` belongs to exactly one row here (an item not yet written is marked "checklist item to be written"). An id without a prefix belongs to the checklist area before it; one from another area is written in full. The steps: ① set out: start a project with `npm create objectstack`, write metadata · ② run it locally and see it, where every capability an end user uses in the application is needed for the first time · ③ verify: loudly reject what is wrong, let through what is right · ④ publish and install into an environment · ⑤ connect an agent (MCP in the community edition) and have it complete one real business operation · ⑥ iterate once on a one-sentence customer request. + +**`area:ai` AI** + +- ⑤ · agent / tool / skill metadata can be written and listed, and a retired key gets a prescription · ai · agent-tool-skill-metadata-roundtrip +- ⑤ · The MCP surface switches as documented: both the HTTP and the stdio road fail closed · ai · mcp-http-surface, mcp-stdio-fail-closed +- ⑤ · What an agent can do is what the application really can do: an action is exposed first, an expression is validated on the spot · ai · mcp-run-action-exposure-gate, mcp-validate-expression +- ⑤ · Skill instructions are projected onto MCP prompts · ai · skill-instructions-mcp-prompts +- ⑤ · What the community edition lacks it honestly says it lacks, and the UI puts up no empty shell · ai · open-edition-honest-degradation, console-ai-surface-gating + +**`area:build` Building** + +- ① · One command starts a project: scaffolded, installed, verification passes, the console's first screen paints · cli · scaffold-first-run, scaffold-console-first-paint +- ① · The build is the author's first gate: errors carry a location, artifacts and statistics come out · cli · build-own-contract +- ① · Code snippets written into metadata have boundaries: hook and action bodies refuse out-of-bounds spellings · cli · hook-body-extraction-gates +- ① · Build objects, fields, lists, forms and record pages without writing code · studio-authoring · object-designer-roundtrip, view-authoring-live, record-page-roundtrip +- ① · Custom pages: block composition, page variables and page-level actions, three source tiers · studio-authoring · custom-page-render-and-blocks, page-variables-and-actions, custom-page-source-tiers +- ① · Draft first, then publish: publishing is atomic, and conflicts and invalid drafts are refused on the spot · studio-authoring · draft-publish-lifecycle, authoring-validation-not-persisted +- ① · Studio's judgements and boundaries: expressions agree with the engine, the permission matrix can be edited, the registry decides what can change at runtime · studio-authoring · expression-editors, permission-matrix-editor-ux, org-override-registry-gate +- ① · An administrator writes Markdown documents in the UI and adds them to the menu (books included), published as a portal by audience · studio-authoring + platform-core · doc-on-app-menu, platform-core.docs-audience-gate, platform-core.docs-portal-render +- ② · One command runs the application: health and readiness both pass, the database choice is honest, port and staleness are both said out loud · cli + platform-core · dev-boot-contract, platform-core.boot-health, platform-core.runtime-config-boot-read +- ② · The metadata registry is readable from outside, and only a writable package can be changed · platform-core · metadata-registry-serving, metadata-authoring-roundtrip +- ② · The formula engine: every standard-library function gives a known answer, and a wrong expression is stopped at build time · api-backend · formula-stdlib-matrix, formula-gates +- ③ · `objectstack verify`'s verdicts are a closed set, and only a failure exits non-zero; the quality suite runs on a real application · cli · verify-verdict-exit-mapping, qa-suite-execution +- ③ · Health check and deprecation scan: every item has an owner and can state a prescription · cli · doctor-health-report, doctor-deprecation-scan +- ③ · Lint severities are a closed set, and only an error blocks; a misused command is loud · cli · lint-severity-exit-contract, flag-command-error-ux +- ③ · Wrong metadata is refused at the author's door, with a prescription · api-backend · enforce-or-remove-authoring-gates, retired-def-refusal +- ③ · A health check of existing metadata: every non-compliance reported with its location · studio-authoring · metadata-diagnostics-sweep +- ⑥ · The first-run loop: create a package → create an object → records → an app → publish → end user, zero code and zero restarts · studio-authoring · first-run-loop + +**`area:data` Data and permissions** + +- ② · Platform settings change in the UI: a change really takes effect, leaves a trace, and secrets are stored only as handles · platform-core · settings-hub-roundtrip +- ② · Telemetry and lifecycle data are reclaimed by retention period, and an object declared as archived is never hot-deleted · platform-core · lifecycle-retention-sweep +- ② · A record is created, seen, changed and deleted, and another can be made from it · records-forms · crud-roundtrip, record-clone-contract +- ② · Every field type renders, accepts input and persists, and a wrong value is refused on the spot · records-forms · field-type-matrix, field-type-constraints, field-unique-enforcement, encrypted-field-behavior +- ② · Lists get work done: filter, search, sort, paginate, saved views, inline editing, export, bulk · records-forms · list-view-capabilities, view-type-gallery, adhoc-filter-sort-builder, grid-personalization, saved-view-management, bulk-select-all-matching +- ② · Kanban, calendar and Gantt can be dragged; they are not pictures · records-forms · kanban-drag-persistence, calendar-interactions, gantt-interactions +- ② · Forms work: layout, dirty-data guard, conditional visibility and required rules, cascading options · records-forms · form-view-gallery, form-dirty-guard, conditional-rules-header, conditional-rules-grid, cascading-options, cascading-multilevel-and-clear, field-group-visible-when +- ② · Master and detail save together, related lists paginate on the server, and a lookup picker creates a new record in passing · records-forms · master-detail-atomic-save, related-list-server-pagination, lookup-picker-create-new +- ② · Write rules are honoured on the server: a collision is loud, an edit can be undone, and what changed is visible · records-forms · validation-rule-type-matrix, object-hook-lifecycle, delete-behavior-matrix, concurrent-edit-conflict, record-edit-undo, field-history-tracking +- ② · Actions and collaboration on a record: buttons sit where they are declared, the parameter contract is honoured at dispatch, discussion and @-mentions · records-forms · action-location-matrix, action-param-widgets, upload-guard-blocks-confirm, record-discussion-mentions +- ② · Search finds it: across fields, scoped to a field, consistent with permissions, pinyin, fresh at once; global search and the command palette take the same road · search · cross-field-object-search, field-scoped-narrowing, rls-both-personas, pinyin-flag-both-sides, freshness-and-empty, console-global-search, command-palette-navigation +- ② · Shared option sets: several objects reuse one set of options · records-forms · picklist-shared-across-objects +- ② · Row-level and field-level permissions are right on both sides: a restricted member sees only their own, what should be read-only is read-only, and what should be invisible is not returned to the frontend · access-security · rls-both-sides, scope-depth-asymmetry, fls-mask-and-strip +- ② · Create, read, update and delete are honoured cell by cell, a permission change shows at once, and the self-check endpoint agrees with the server · access-security · crud-permission-matrix, permission-matrix-edit-loop, me-permissions-aggregation-parity +- ② · The write path holds: read-only fields are stripped, a forged or transferred owner is refused, and default visibility can only be tightened · access-security · write-path-guards, owd-save-gate +- ② · Sharing: the default baseline, rules that widen, manual sharing of a single record, suggested bindings · access-security · owd-sharing-matrix, sharing-rules-widen, record-share-grant-revoke, sharing-rule-authoring-ui, suggested-binding-loop +- ② · Anonymous cannot get in: every API family refuses uniformly, and before any resource is resolved; having no active organization is also a legal state · access-security · anonymous-deny-surfaces, no-active-org-session-semantics +- ② · The small doors opened to the outside: public forms and share links, revocable and leak-free · access-security · public-form-intake, share-link-capability-tokens, share-link-landing-page +- ② · Explainable and auditable: access explanations attributed layer by layer, an audit log browser, record views leave a trace, and the platform administrator identity itself holds · access-security · record-access-explain, audit-log-browser, record-view-read-audit, platform-owner-email-anchor +- ② · Sign-in methods switch on and off by configuration, and what is advertised really works · identity-auth · auth-method-matrix, sso-enforced-first-paint, phone-signin-surfaces +- ② · The first install has an owner: zero-user first run, the sign-up gate, email verification · identity-auth · first-run-owner-bootstrap, self-signup-gate, email-verification-loop +- ② · You can get back in and change things yourself: forgotten password, profile changes, sessions you can see and revoke · identity-auth · self-service-password-reset, self-service-profile-password, session-list-revoke +- ② · Two-factor authentication: enable, verify, backup codes, disable · identity-auth · two-factor-enrollment-reveal, two-factor-verify-to-activate, two-factor-backup-codes, two-factor-disable-lifecycle +- ② · Organizations, teams and business units, and the administrator's user operations · identity-auth · org-membership-team-management, teams-bu-membership, invitation-scope-gates, workspace-org-switch, admin-lifecycle-operations, identity-import-wizard +- ② · External identity: OAuth consent and linked social accounts · identity-auth · oauth-app-consent-loop, linked-accounts-social +- ② · Charts paint, every type is there, empty data is handled gracefully, a wrong key is loud; drill-through works and global filters refetch · dashboards · chart-first-paint, chart-type-matrix, empty-null-bucket-boundaries, strict-widget-rejects-stray-keys, drill-through-range, global-filters-rescope +- ② · Reports you build, save and own yourself, and that send themselves on schedule · dashboards · dataset-report-authoring, saved-report-ownership, report-schedule-dispatch-delivery +- ② · The business numbers add up: the system overview and the analytics cube · dashboards · system-overview-live-counts, cube-query +- ② · Upload and download work, and permissions follow the parent record · attachments-storage · presigned-upload-roundtrip, download-authz-both-sides, read-inherits-parent-rls, attach-requires-parent-edit +- ② · A file's lifetime and the file cell in a form: submit, tombstone, reap, resume; size and type are checked again on the server · attachments-storage · sys-file-status-pipeline, orphan-tombstone-reap, upload-session-abort, inline-grid-receipt-cells, field-accept-maxsize-server-enforced +- ② · The query contract: operators, parameters, aggregates and date windows all have known answers · api-backend · query-contract-matrix, aggregate-contract-matrix, date-range-preset-matrix, filter-comparand-conformance +- ⑤ · Give an agent a personal key: shown once, revocable and restorable · identity-auth · api-key-ui-lifecycle +- ⑥ · Bring the customer's existing data in: encoding, mapping, transforms, undo and cancel · records-forms · import-wizard-encoding-and-hints, named-import-mapping, import-job-undo-cancel, import-transform-matrix + +**`area:workflow` Flows and integration** + +- ② · An approval runs to completion: joint sign-off, quorum, dynamic approvers, timeout escalation, out-of-office delegation · approvals · per-group-signoff, quorum-m-of-n, dynamic-approver-routing, sla-escalation, ooo-delegation-reroute, approver-resolution-matrix +- ② · Approvals are done in the UI: the inbox, record-page buttons, a keyboard flow, pending counts, notifications that deep-link · approvals · inbox-metadata-actions, viewer-gating-submitter-side, record-page-decisions, inbox-keyboard-flow, pending-count-surfaces, account-app-entry, setup-nav-entry, notification-deep-link +- ② · Every approval action is backed by the server-side state machine, and the one-click email action takes the same road · approvals · decision-action-matrix, decision-only-via-service, status-mirror-field, email-action-token-door +- ② · Flows run: node types, trigger types, the run tree and logs · automation · flow-node-type-matrix, trigger-type-matrix, flow-run-step-nesting, flow-runs-page-test-trigger, trigger-status-contract +- ② · Flow errors, pauses and schedules: try/catch, screen flows, resuming after a cold restart, rollups and time-based triggers, the toggle is the brake · automation · flow-error-handling, screen-flow-roundtrip, durable-suspend-restart, rollup-summary-filter, time-relative-trigger, flow-toggle-kill-switch +- ② · Bulk and the write door answer row by row; the error envelope and the route ledger: every code is registered, and what is mounted is what really runs · api-backend · bulk-write-contract, batch-transactional-discovery, error-envelope-ledger, route-ledger-live-parity +- ② · A self-declared API endpoint mounts as a real URL and can be tried on the spot in the developer console · api-backend · declarative-endpoint-execution, api-console-discovery-execute +- ② · The REST surface's construction contract: switches decide what mounts and which verbs pass, timing opens to administrators only · api-backend · rest-crud-config-contract, rest-batch-config-contract, rest-metadata-config-contract, rest-route-generation-tombstones, api-methods-verb-gate, server-timing-admin-gated +- ② · Connect to external systems: connectors land declaratively, a broken one degrades alone, auth and command allowlists, callable from a flow · integration-system + automation · connector-declarative-boot, connector-degraded-recovery, connector-stdio-default-deny, connector-spec-path-no-escape, connector-descriptor-audit, connector-auth-kind-application, flow-connector-picker, automation.connector-dispatch-matrix +- ② · An external data source plugs in and is used as your own objects; secrets can be neither written in nor read out · integration-system + cli · external-datasource-federated-read, external-schema-introspection, external-schema-drift-gate, external-schema-browser-ui, datasource-admin-lifecycle, datasource-credential-refusal-matrix, cli.datasource-introspect-codegen +- ② · Send out, take in: webhooks, scheduled jobs, email templates, inbox delivery and subscription preferences, the bell's read state · integration-system + platform-core · webhook-lifecycle, job-scheduled-run, email-template-render, notify-inbox-delivery, notification-preference-suppression, platform-core.notification-center + +**`area:ux` Experience** + +- ② · You can sign in, and the shell remembers: navigation, built-in apps, favourites and recents, theme, keyboard shortcuts, the back key · platform-core · console-login, nav-surfaces-render, builtin-apps-nav-render, shell-nav-personalization, theme-mode-persistence, keyboard-shortcut-surface, url-overlay-contract, home-admin-cluster-links, console-installability-indicators, app-management-toggle +- ② · The whole application speaks the customer's language, Studio switches with it, and notifications land in the right language too · i18n · surface-matrix, studio-follows-app-locale, notification-localized-and-clears +- ③ · A wrong translation key is refused at both doors, and the build gate can go red · i18n · strict-translation-key-rejection, build-gates-hold + +**`area:package` Packages and install** + +- ② · Seed data lands in the database as written, and a replay adds nothing and loses nothing · platform-core · seed-integrity, seed-mode-matrix +- ④ · Pack as a plugin: the manifest is enforced at the packaging boundary · cli · plugin-manifest-build-contract +- ④ · Install it: compatibility, namespaces, enable, disable and uninstall, with the same lifecycle on the REST side · platform-core + api-backend · manifest-install-contract, package-lifecycle-enable-disable, api-backend.package-rest-lifecycle +- ④ · Install from the marketplace: it installs with or without a control plane, and the UI does not lie · platform-core · marketplace-install-local-lifecycle, marketplace-console-honesty +- ④ · Migration: see the plan before acting, an interrupted one can say the next step, and an old spelling gets a fix · cli + platform-core · migrate-plan-apply-json, migrate-meta-codemod, migrate-duplicates-inventory, platform-core.interrupted-migration-boot-report +- ④ · A packaged object can be extended but not changed, and every enable and disable is recorded on the activation ledger · platform-core + access-security · packaged-object-extend-only, activation-ledger-registration-home, activation-ledger-row-contract, access-security.activation-write-operator-gate +- ④ · Packaged flows and actions: disabling is durable, refused while depended on, cloneable, and both doors are equally strict · automation + api-backend + access-security · packaged-flow-disable-durable, packaged-flow-subflow-disable-refusal, packaged-flow-clone-contract, setup-packaged-automation-board, api-backend.packaged-action-disabled-dispatch, api-backend.action-activation-door-contract, access-security.packaged-flow-write-door-parity +- ④ · An installed package carries the capabilities and permission sets it declares, and a read-only package locks Studio · access-security + studio-authoring · capability-declaration-lifecycle, packaged-permission-set-lifecycle, readonly-package-locks-studio, studio-authoring.packaged-automation-studio-lock +- ④ · Packaged views and dashboards are the class that can be edited directly · studio-authoring · packaged-display-class-direct-edit +- ④ · You own it: the definitions are diffable in your repository, and the whole ontology can be exported and run self-hosted without us · platform-core + cli · ontology-export-roundtrip, artifact-reproducible-build, standalone-boot-no-cloud (checklist item to be written) +- ⑥ · Structural changes an iteration brings: a dev boot self-heals only the safe part, and production takes no liberties · cli · dev-automigrate-policy **Priority**: 1. Security and data integrity always come first and do not wait for the road. -2. The road broken, or a capability on the checklist broken ⇒ P0/P1; data silently wrong or lost ⇒ P1, subject to the grading rules' reach discount; any other run that goes wrong ⇒ P2; neither on the road nor on the checklist ⇒ p3 or not taken on. Grading reads "Features on the road": change that table to change priority, ⛔ never re-grade card by card — except for one re-grade pass when the grading rules themselves change, and none otherwise. -3. While a lane's queue still holds an open P0/P1, that lane dispatches no p2/p3 tooling card or contract-hygiene card, except a p2 `pm:blocking` card that such a P0/P1 names on its `Blocked-by:` line, which is not held because it unblocks that P0/P1; a process or tooling card that blocks other work is P2 and carries `pm:blocking`; it does not inherit priority up the chain. +2. Grading is two steps, and a card enters the queue only once both are done. **Step one, repository, area and type**: judge the repository first (a platform root cause is fixed in this repository, wherever it shows up), then give the card its `area:*` (above) and its GitHub issue type. Bug = a capability already shipped is broken, and a wrong sentence in a shipped skill or document is a Bug too; Feature = a new capability or an extension; Task = teaching new content, tooling, CI, evals. A record card or an anchor card takes no type and no grade. A card hangs under a sub-epic only when the maintainer has opened one; otherwise its `area:*` is enough to enter the queue. **Step two, the grade**: only Bug cards and security cards are graded by the two tables below, and UX problems by the UX rule below. A Feature that improves UX defaults to p2 when its source is the maintainer or a topic (an epic he opened or confirmed); a fleet-sourced Feature, UX included, is p3 and, unless pre-authorised, goes on the weekly list, which triage owns; any other Feature never enters p1 (unless it blocks another repository's p1, below) and is done in its area's order; a Task defaults to p3, and only rises to p2 when it blocks work being dispatched. Severity has four levels: + - **Severe**: a security overreach, or data silently wrong, lost or leaked across tenants. "Data wrong" means only that a stored value is wrong or lost; a value read back and shown wrongly is Impeded. + - **Broken**: a core feature of the area table cannot be done, and there is no workaround. + - **Impeded**: there is a workaround (same role, same entry point, named by the error or the documentation); a feature that is not core cannot be done; an error that cannot be understood. + - **Cosmetic**: looks wrong, wording, consistency, small experience. + + Severity is crossed with how often the broken thing is hit (reach). A UX problem is graded by the UX rule below, and the Cosmetic row is that rule written out, so no UX problem is p3: + + | Severity | End users, daily | Builders, often (on the build, install and upgrade path) | Administrators, often | Rare configuration or developers only | + |:--|:--|:--|:--|:--| + | Severe · data wrong | p1 | p1 | p1 | p2 (still p1 when unrecoverable or cross-tenant) | + | Broken | p1 | p1 | p2 | p2 | + | Impeded | p2 | p2 | p2 | p3 | + | Cosmetic (a UX problem: the UX rule) | p2 (p1 on a core feature every user hits every time) | p2 | p2 | p2 | + + A security problem is not graded by reach but by who can trigger it, who gains and what they get: an attacker walks the path few people walk on purpose, so a rare path lowers no risk. When an administrator acts normally but a third party gains (an administrator's routine change lets someone reach data their role does not grant), look up the party that gains. The security hole itself goes to the private security channel, and this table is used there too: + + | Who can trigger it | Gets other people's data, escalates privilege, crosses tenants | Leaks only metadata, or affects only themselves | + |:--|:--|:--| + | Anonymous or an outsider | p1 | p2 | + | An ordinary member | p1 | p2 | + | An administrator or the host developer | p2 (still p1 when escalating to platform administrator or crossing tenants) | p3 | + + Also: + - The UX rule, for `area:ux` and for an experience problem in any other area: a UX problem on a core feature that every user hits every time is p1; every other UX problem is p2. UX has no p3. + - A wrong sentence in a shipped skill or document is a Bug, with the reach "builders, often", because AI copies it into what it writes. + - "Someone is waiting" raises no grade. A card that blocks another carries `pm:blocking` only when the blocked card is in an area being dispatched, and the grade is not inherited up the chain — except that a card blocking another repository's p1 takes that card's grade, a Feature included. + - A p3 with no effect on users (review nits, internal comments, wording) is closed at first touch and never queued. + - p0 is time, not severity, and only these: main or the merge queue red, a release blocker inside the release window, a security hole being exploited in production. + - The grading comment carries one line: area · type · severity · reach · evidence (measured, or read from the code). + - A card is not re-graded card by card: one re-grade pass when these grading rules change, none otherwise; a card in flight (dispatched or claimed) may be raised, never lowered. +3. The grade only decides whether a card jumps the queue; what is dispatched is decided by the area. A seat takes its next card in this order: ① p0, dispatched in the same round, past every concurrency cap ② p1, ahead of the next card of the area being dispatched, whatever area it belongs to, a held or paused area included ③ the next card of the area being dispatched, in the order of the areas and sub-epics the maintainer names, and inside one by its own child order and `Blocked-by:` ④ inside an area, p2 and p3 are only a reference: p2 first, p3 left for the close-out or batched; in an area with no sub-epic, p2 before p3, and at the same grade the card opened first goes first. A paused area no longer demotes its cards to p3: the grade reflects severity, not whether the area is being dispatched; an ordinary card in a paused area is not dispatched, and a real p1 in it still jumps the queue. Triage reads the open p1 cards once a week, and when there are more than ten re-checks whether they were graded too high. 4. Because AI writes it and AI uses it: the ontology must be writable by AI — what is wrong must be loudly refused with a prescription, never silently stored; and usable by people and agents — declared objects, actions and agent / tool / skill metadata are honoured at runtime, what the MCP surface exposes is what the application really can do, and an agent that oversteps is stopped by permissions and leaves a trace. The half people use has a standard too: an author who writes not one line of UI code gets a UI that looks as if a designer had handled it — one design system, one layout; looking wrong is as much a defect as failing to render, and is refused at the "see it" step. One wrong sentence in the documentation and skills written for AI is a product defect. **Stage posture**: speed over compatibility. Few people use it: a retirement takes effect at once, with no transition window and no alias double-spelling; compatibility layers, migration windows and the like default to p3; keys declared but not honoured are retired in batches per release, not one card per key. diff --git a/docs/qa/platform-checklist/areas/access-security.json b/docs/qa/platform-checklist/areas/access-security.json index 1218174446b..c6d57620bd7 100644 --- a/docs/qa/platform-checklist/areas/access-security.json +++ b/docs/qa/platform-checklist/areas/access-security.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "access-security", - "axis": "access", + "axis": "data", "title": "Access, permissions, RLS/FLS, write-path guards", "items": [ { diff --git a/docs/qa/platform-checklist/areas/api-backend.json b/docs/qa/platform-checklist/areas/api-backend.json index cdee8512e20..07b93819160 100644 --- a/docs/qa/platform-checklist/areas/api-backend.json +++ b/docs/qa/platform-checklist/areas/api-backend.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "api-backend", - "axis": "api", + "axis": "workflow", "title": "REST / batch / formula / build-time gates", "items": [ { diff --git a/docs/qa/platform-checklist/areas/attachments-storage.json b/docs/qa/platform-checklist/areas/attachments-storage.json index 93aec4b5fe1..d23621c3ff9 100644 --- a/docs/qa/platform-checklist/areas/attachments-storage.json +++ b/docs/qa/platform-checklist/areas/attachments-storage.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "attachments-storage", - "axis": "files", + "axis": "data", "title": "Attachments & storage — presigned/chunked upload, signed-URL downloads, parent-derived access, sys_file lifecycle", "fixtures": { "$comment": "AREA-LEVEL standing fixtures. An item opts in with fixtures.provisioning = { use: \"\", why: \"…\" }; the recipe is written ONCE here so four items do not carry four drifting copies of the same twenty-call sequence. Recipes are runtime-provisioned (no repo file is touched, nothing to seed, nothing to un-seed beyond the teardown line) and every call below is grounded in framework source at the cited file:line — replay them literally, and if one 4xxs, re-read the citation before assuming the recipe rotted.", diff --git a/docs/qa/platform-checklist/areas/cli.json b/docs/qa/platform-checklist/areas/cli.json index 304e708eeed..6f217c26d0f 100644 --- a/docs/qa/platform-checklist/areas/cli.json +++ b/docs/qa/platform-checklist/areas/cli.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "cli", - "axis": "devpath", + "axis": "build", "title": "CLI — os dev/build/migrate/verify/test boot, load, execution & exit-code contracts, scaffold first-run, flag/command error UX", "fixtures": { "$comment": "AREA-LEVEL standing fixtures (README \"Area-level `fixtures`\"; shape copied from qa-scratch-authz in areas/attachments-storage.json). An item opts in with fixtures.provisioning = { use: KEY, why: … }. This area's one recipe is not runtime-provisioned like the others: it RESTORES a committed database into two new files, so nothing in the repo or on a live boot is touched and the teardown line is the whole cleanup. Every call cites the file and symbol that grounds it; replay the calls literally, and if one answers differently re-read the citation before assuming the recipe rotted.", diff --git a/docs/qa/platform-checklist/areas/dashboards.json b/docs/qa/platform-checklist/areas/dashboards.json index d0d8f92997b..36d0e4f069e 100644 --- a/docs/qa/platform-checklist/areas/dashboards.json +++ b/docs/qa/platform-checklist/areas/dashboards.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "dashboards", - "axis": "reports", + "axis": "data", "title": "Dashboards, reports, analytics", "items": [ { diff --git a/docs/qa/platform-checklist/areas/i18n.json b/docs/qa/platform-checklist/areas/i18n.json index c5d154bad2e..adfed75d846 100644 --- a/docs/qa/platform-checklist/areas/i18n.json +++ b/docs/qa/platform-checklist/areas/i18n.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "i18n", - "axis": "i18n", + "axis": "ux", "title": "Internationalization", "items": [ { diff --git a/docs/qa/platform-checklist/areas/identity-auth.json b/docs/qa/platform-checklist/areas/identity-auth.json index 35c0de4bfb6..314d8a953b0 100644 --- a/docs/qa/platform-checklist/areas/identity-auth.json +++ b/docs/qa/platform-checklist/areas/identity-auth.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "identity-auth", - "axis": "identity", + "axis": "data", "title": "Auth, login, identity", "items": [ { diff --git a/docs/qa/platform-checklist/areas/integration-system.json b/docs/qa/platform-checklist/areas/integration-system.json index 46afc969f6a..2506cfb3138 100644 --- a/docs/qa/platform-checklist/areas/integration-system.json +++ b/docs/qa/platform-checklist/areas/integration-system.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md. FIXTURE MAP for this area (all in-repo, CI-deterministic): the showcase ships four declarative connectors (examples/app-showcase/src/system/connectors/index.ts — rest/openapi/mcp provider-bound instances + one enabled:false catalog descriptor), an outbound webhook (src/automation/webhooks — shipped inactive), a cron job (src/automation/jobs — showcase_health_sweep), an email template (src/system/emails — showcase_task_done_email) and two notify flows (src/automation/flows).", "area": "integration-system", - "axis": "api", + "axis": "workflow", "title": "Integration & system services — connectors, webhooks, jobs, email templates, notifications", "items": [ { diff --git a/docs/qa/platform-checklist/areas/platform-core.json b/docs/qa/platform-checklist/areas/platform-core.json index e66b0cd0610..7e92df6836a 100644 --- a/docs/qa/platform-checklist/areas/platform-core.json +++ b/docs/qa/platform-checklist/areas/platform-core.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "platform-core", - "axis": "devpath", + "axis": "package", "title": "Platform core — boot, health, console shell, metadata pipeline", "items": [ { diff --git a/docs/qa/platform-checklist/areas/records-forms.json b/docs/qa/platform-checklist/areas/records-forms.json index 14ca4f5cbc7..6962a2f8be3 100644 --- a/docs/qa/platform-checklist/areas/records-forms.json +++ b/docs/qa/platform-checklist/areas/records-forms.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "records-forms", - "axis": "records", + "axis": "data", "title": "Records, lists, detail pages, forms", "fixtures": { "$comment": "AREA-LEVEL standing fixtures. An item opts in with fixtures.provisioning = { use: \"\", why: \"…\" }; the recipe is written ONCE here so several items do not carry drifting copies of the same sequence. Recipes are runtime-provisioned (no repo file is touched, nothing to seed, nothing to un-seed beyond the teardown line) and every call below is grounded in framework source at the cited file:line — replay them literally, and if one 4xxs, re-read the citation before assuming the recipe rotted.", diff --git a/docs/qa/platform-checklist/areas/search.json b/docs/qa/platform-checklist/areas/search.json index 5c32dcc9da5..7c81a28a344 100644 --- a/docs/qa/platform-checklist/areas/search.json +++ b/docs/qa/platform-checklist/areas/search.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "search", - "axis": "records", + "axis": "data", "title": "Record search — $search executor, field scoping, RLS composition, pinyin recall, freshness", "fixtures": { "$comment": "AREA-LEVEL standing fixtures. An item opts in with fixtures.provisioning = { use: \"\", why: \"…\" }; the recipe is written ONCE here so several items do not carry drifting copies of the same call sequence. Recipes are runtime-provisioned (no repo file is touched, nothing to seed) and every call is grounded in framework source at the cited file:line — replay them literally, and if one 4xxs, re-read the citation before assuming the recipe rotted. Shape copied from qa-scratch-authz in areas/attachments-storage.json (#7716/#7670).", diff --git a/docs/qa/platform-checklist/areas/studio-authoring.json b/docs/qa/platform-checklist/areas/studio-authoring.json index c5d30bbd60a..2a4bca15d69 100644 --- a/docs/qa/platform-checklist/areas/studio-authoring.json +++ b/docs/qa/platform-checklist/areas/studio-authoring.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "studio-authoring", - "axis": "studio", + "axis": "build", "title": "Studio authoring — the admin/maker loop: packages, objects, views, record pages, draft→publish", "items": [ { diff --git a/docs/qa/platform-checklist/areas/ux-conventions.json b/docs/qa/platform-checklist/areas/ux-conventions.json index 462839896bf..e8c3d2acfee 100644 --- a/docs/qa/platform-checklist/areas/ux-conventions.json +++ b/docs/qa/platform-checklist/areas/ux-conventions.json @@ -1,7 +1,7 @@ { "$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.", "area": "ux-conventions", - "axis": "records", + "axis": "ux", "title": "Cross-cutting UX conventions — every write answers, every disabled control explains itself, labels over machine names (console and Studio)", "items": [ { diff --git a/scripts/pm/check-half-states.mjs b/scripts/pm/check-half-states.mjs index e3a714add2e..a1b55a00b0b 100644 --- a/scripts/pm/check-half-states.mjs +++ b/scripts/pm/check-half-states.mjs @@ -200,7 +200,8 @@ * unparseable timestamp reports as a finding, never as fresh (#4690: * "could not read the input" must not look like "input is clean"). * H11 the important-parked inventory — a card carrying an importance signal - * (native type `Bug`, or a `bug` / `security` / `priority:*` label) + * (native type `Bug`, or a `security` / `priority:*` label; the old `bug` + * type label is read only on a card with no native type, until it retires) * sitting in `pm:blocked` or `pm:on-hold` and open past the threshold. * Maintainer concern, 2026-08-16, verbatim: 「我担心的优先的,重要的问 * 题,比如bug 被放进 blocked 或者 on-hold 没人理会」. Distinct from H10 @@ -3653,11 +3654,16 @@ export const PARKED_STATE_LABELS = ['pm:blocked', 'pm:on-hold', AWAITING_MAINTAI /** * H11 — null when clean, else the finding sentence. * - * Importance is read from BOTH the native issue type (`Bug`, object or string - * shape — REST serializes it as an object) and the label vocabulary - * (`bug` / `security` / any `priority:*`), because the triage protocol only - * types new cards and deliberately does not backfill the stock — a label-only - * reading would hide exactly the older cards most at risk of being forgotten. + * Importance is read from the native issue type FIRST (`Bug`, object or string + * shape — REST serializes it as an object): triage sets a type on every public + * card at first touch, and the stock is typed under the backfill the maintainer + * authorised, so the type is the primary signal. The `bug` LABEL is one of the + * old type labels and is read only as a TRANSITIONAL fallback, on a card that + * carries no native type at all — kept until those labels retire, so an older + * card the backfill has not reached is not hidden meanwhile. Once a card is + * typed the type is the answer: a `bug` label left on a `Feature` or `Task` + * card is not an importance signal. `security` and any `priority:*` label are + * not type labels and are read unconditionally. * Age is `created_at` ("open longer than", per the card); an unreadable * timestamp flags rather than reading as fresh (#4690 direction, same as H10). */ @@ -3669,7 +3675,8 @@ export function h11ImportantParked(issue, nowMs = Date.now()) { const signals = []; if (typeName === 'Bug') signals.push('type:Bug'); for (const l of labels) { - if (l === 'bug' || l === 'security' || l.startsWith('priority:')) signals.push(l); + // TRANSITIONAL: the `bug` label speaks only for a card with no native type. + if (l === 'bug' ? !typeName : l === 'security' || l.startsWith('priority:')) signals.push(l); } if (signals.length === 0) return null; const created = Date.parse(issue.created_at ?? ''); @@ -8351,7 +8358,7 @@ export function h74QueuedWithoutTriageAudit(issue, commentBodies, parent) { 'and none of the older `Triage:` record openings. The card is invisible to both sides: every triage sweep ' + 'disjunct keys on a MISSING label and this card has them all, while the lane side reads 「无分诊审计评论 ⛔ ' + '不得认领」 and stops — each waits for the other and nothing rings. Remedy, triage side: audit it in THIS ' + - 'round exactly as an ungraded card (first touch: domain, grade, type, `Path:`), and count it in the round ' + + 'round exactly as an ungraded card (first touch: domain, area, type, grade), and count it in the round ' + 'record. Lane side: a seat that would otherwise pull this card rings `Request: triage · #n · first-touch ' + 'audit` on the triage mailbox in the same round (`record-recognisers.mjs --mailbox-keys` prints the shape) ' + '— ⛔ never a silent wait, and never a report to the maintainer in the mailbox\'s place. Report-only: ⛔ ' + @@ -27473,6 +27480,14 @@ async function selfTest() { t('H11: type Bug + on-hold past threshold -> finding', typeof h11ImportantParked(parkedCard(['pm:on-hold'], { type: { name: 'Bug' } }), NOW), 'string'); t('H11: type as plain string is read too', typeof h11ImportantParked(parkedCard(['pm:on-hold'], { type: 'Bug' }), NOW), 'string'); t('H11: bug label + blocked -> finding', typeof h11ImportantParked(parkedCard(['bug', 'pm:blocked']), NOW), 'string'); + // The native type is the primary signal; the `bug` label is a transitional + // fallback that speaks only for a card with no native type at all. + t('H11: ⛔ a `bug` label left on a typed Task card is not a signal — the native type decides', h11ImportantParked(parkedCard(['bug', 'pm:on-hold'], { type: { name: 'Task' } }), NOW), null); + t('H11: …nor on a typed Feature card, the plain-string shape included', h11ImportantParked(parkedCard(['bug', 'pm:blocked'], { type: 'Feature' }), NOW), null); + t('H11: a typed Bug card that still carries the `bug` label names the type…', h11row(parkedCard(['bug', 'pm:on-hold'], { type: { name: 'Bug' } }), NOW).includes('type:Bug sitting'), true); + t('H11: …once — the label is not listed beside it', h11row(parkedCard(['bug', 'pm:on-hold'], { type: { name: 'Bug' } }), NOW).includes('+ bug'), false); + t('H11: a typed Task card is still read for its `security` label', typeof h11ImportantParked(parkedCard(['bug', 'security', 'pm:on-hold'], { type: 'Task' }), NOW), 'string'); + t('H11: …and for its `priority:*` label, which is the only signal the row names', h11row(parkedCard(['bug', 'priority:p2', 'pm:blocked'], { type: 'Task' }), NOW).includes('important card parked: priority:p2 sitting'), true); t('H11: security label + on-hold -> finding', typeof h11ImportantParked(parkedCard(['security', 'pm:on-hold']), NOW), 'string'); t('H11: priority:p1 + blocked -> finding', typeof h11ImportantParked(parkedCard(['priority:p1', 'pm:blocked']), NOW), 'string'); t('H11: …and the finding names the parked state', h11row(parkedCard(['bug', 'pm:blocked']), NOW).includes('pm:blocked'), true); diff --git a/scripts/pm/check-skill-line-ratchet.mjs b/scripts/pm/check-skill-line-ratchet.mjs index 7e01065eb60..cbabe141293 100644 --- a/scripts/pm/check-skill-line-ratchet.mjs +++ b/scripts/pm/check-skill-line-ratchet.mjs @@ -1759,7 +1759,11 @@ export const CEILINGS = new Map([ // 「各条规则的出处叙事、事故复盘 根本不重要啊,不需要写入skills啊」) — provenance dates, // ruling citations and incident narrative left; every rule stayed. Landed count, // headroom 0, same convention (lowering is always legitimate). - ['.claude/skills/pm-dispatch/references/lanes/hotcrm.md', 53], + // Lowered 53 → 21: each repository's rules live in that repository, so the + // product content left for hotcrm's own AGENTS.md and docs/PRIORITIES.md. One + // pointer there and one to cross-repo-coordination.md stayed, beside the + // shared seat mechanics. Landed count, headroom 0, same convention. + ['.claude/skills/pm-dispatch/references/lanes/hotcrm.md', 21], // repo:mobile lane charter — the on-demand seat for the native shell that // hosts the Console (maintainer choice 2026-11-02, verbatim: "Register, seat // on demand (Recommended)"). A NEW file, so this is an added row and no other @@ -1937,7 +1941,11 @@ export const CEILINGS = new Map([ // whose workload names `lanes/cloud.md`. A NEW file, so this is an added // row and no other row moves; set at the landed line count (headroom 0, // same convention as every lane charter above). - ['.claude/skills/pm-dispatch/references/lanes/cloud.md', 28], + // Lowered 28 → 19 on the same ground as the hotcrm charter: cloud's first + // touch, grading, take order, enterprise and security rules are one pointer + // to the cloud repo; the cross-repo mechanics stayed. Landed count, + // headroom 0, same convention. + ['.claude/skills/pm-dispatch/references/lanes/cloud.md', 19], // repo:objectstack lane charter: the whole-repo dispatch lane, several seats on several // accounts, each running area-lease mode and splitting areas through the lease tables on // their seat posts (#33959; ruling of record: the maintainer, 2026-11-15, verbatim in that diff --git a/scripts/pm/ensure-pm-labels.sh b/scripts/pm/ensure-pm-labels.sh index 5eed3fb559e..4b4f9b76367 100644 --- a/scripts/pm/ensure-pm-labels.sh +++ b/scripts/pm/ensure-pm-labels.sh @@ -245,7 +245,8 @@ for R in objectstack-ai/objectstack objectstack-ai/objectui objectstack-ai/cloud # only: a p0 card still obeys the same-file serial queue and the claim # protocol (SKILL.md state model, 「优先是排序,不是豁免」). Set by the triage # seat when it grades a card; removed by triage when the grade changes. Named - # consumers: the lane pull order (p0 > pm:blocking > 功能点位次 > p1 > p2 > p3; + # consumers: the lane pull order (p0, then p1 from any area, then the next + # card of the area or sub-epic the maintainer named, p2 before p3 inside it; # references/execution-duties.md 取卡全序) — which is also where a release # blocker sits, as p0 inside the release window — and the half-state sweep's # H10 (stale unclaimed p0) and H11 (important card parked) in @@ -284,10 +285,13 @@ for R in objectstack-ai/objectstack objectstack-ai/objectui objectstack-ai/cloud # pm:blocking is a derived CACHE, never hand state (maintainer opinion # 2026-08-13, superseding the earlier derived-only-no-stored-label ruling): # the triage sweep writes/removes it from the Blocked-by: reverse index, and - # it comes off when every dependent closes. Named consumers: the lane queue - # pull order (p0 > blocking > 功能点位次 > p1 > p2 > p3; execution-duties.md 取卡全序) - # and list-page scans. A hand-set instance is mislabeling — the sweep - # corrects it against the index. + # it comes off when every dependent closes. Since 2026-11-18 it is NOT a rank + # of the pull order and raises no grade (「有人在等」 is not a grading + # criterion): a card carries it only when the card it blocks is in an area + # being dispatched. Named consumers: the seat pulling inside that area, which + # reads it as "this card unblocks dispatched work" (execution-duties.md + # 取卡全序 orders by `Blocked-by:`), and list-page scans. A hand-set instance + # is mislabeling — the sweep corrects it against the index. gh label create pm:blocking -R "$R" -c 8250df -d "Derived cache from the Blocked-by reverse index: open card with open dependents — never hand-set" 2>/dev/null || true # pm:retriage is a QUESTION put to the triage seat (a re-grade, a lane for a # cross-domain PR, a re-route, a split, a disposition fork a dev report left @@ -631,57 +635,102 @@ gh label create status:parked -R objectstack-ai/objectui -c cfd3d7 -d "Parked # file-path evidence — not this script's. gh label create domain:ui -R objectstack-ai/objectui -c bfd4f2 -d "objectui ui lane: all objectui code — library, apps, packages/types, .github/, scripts/, docs" 2>/dev/null || true -# The FEATURE AXIS — `area:*`, one per card, eleven values. It is the PLANNING -# axis: priority is judged on it, and `domain:*` beside it decides only which -# seat may claim which files. The eleven values are the North Star definition -# line ("What gets built") plus the road it measures, so the axis and the -# product definition cannot drift apart without one of them being edited. -# The eleven were put to the maintainer on the charter card and confirmed there -# (2026-09-21) with ONE amendment: the API/integration value was shortened to -# `area:api`, its customer capability (可对外的 API 与集成) unchanged. ⛔ The -# longer spelling this replaced is deliberately NOT written here — the retired -# name must not survive a `git grep` as though it were still a value. The -# maintainer's sentence is quoted verbatim on that card's ruling comment. -# -# Triage applies it at FIRST GRADING, in the same label write as `domain:*` and -# `priority:*`; a filer may pre-apply it; a tooling card carries the area it -# PROTECTS (a card that protects no area is not filed at all). ⛔ No backfill of -# the existing backlog — a card gets its area when it is next touched. +# The PRODUCT AREA — `area:*`, one per public card, eight values. It is the +# PLANNING axis: an area is chosen by what the user feels is broken, never by +# file or layer, and `domain:*` beside it decides only which seat may edit +# which files. Six values are the standing product areas (ai, build, data, +# workflow, ux, package); two are not product (fleet: the fleet's own tooling; +# cloud: any card related to the cloud repository — it needs to read cloud +# code, or its change serves only the hosted edition — and such a card takes +# area:cloud in place of its product area; a seat with cloud access filters on +# it). What each area covers, its core-feature list and the boundaries +# between areas live in docs/NORTH-STAR.md ("Product areas") and are ⛔ not +# copied here: the -d strings below are a label hover, not the definition. +# Maintainer ruling 2026-11-18, verbatim: 「立一张专题卡,开始执行」, given on +# the plan that named this set; the rollout epic's body quotes the exchange. +# +# ⛔ Two values that deliberately do not exist in THIS repository's set. +# Security: a security problem here is a private advisory and carries no +# `area:*` (cloud is a private repository and its set below does have +# area:security). Performance: slowness goes to the area of what is slow — a +# slow query is data, a slow page load is ux. +# +# A card the fleet files carries it from its filer, together with the card's +# GitHub issue type (Bug / Feature / Task: a native type, not a label, so this +# file creates nothing for it) and its grade, or the filing gate refuses the +# card. On a maintainer's or an outsider's card triage applies both at FIRST +# TOUCH — step one of grading, in the same label write as `domain:*` — and it +# reviews what a fleet filer set. The repository is judged before the area: a +# platform root cause is fixed here, wherever it showed up. A card that fits no +# area is said so on the card and reported to the maintainer — ⛔ never a new +# row here. The existing backlog is backfilled only under an epic the +# maintainer authorised. # # Four named consumers (SKILL.md 状态模型, 「一个标签存在当且仅当有具名读者」): -# the maintainer's board view by area; triage grading, where the card's priority -# is inherited from the checklist item in that area; the parent-card grouping -# for a cross-layer feature point; and the execution seat's candidate order. -# The checklist end of that inheritance is machine-readable: every -# docs/qa/platform-checklist/areas/*.json carries a top-level `axis` naming one -# of these eleven values. -# -# TWO repos, deliberately, and not the per-repo loop above: a feature point -# spans 协议 → 运行时 → 前端, which is objectstack plus objectui. cloud is -# parked (North Star "Not now"), objectos is the docs/site repo, and hotcrm is the -# exemplar APP — its cards are app cards, and a platform gap found there is -# filed in the platform repo, where it gets its area. Widening the loop is a -# vocabulary decision, not a maintenance edit. +# the maintainer's board view by area; triage grading, which reads that area's +# core-feature list in the North Star to tell a broken core feature from an +# impeded one; the parent-card grouping; and the execution seat's pull order, +# where the area or sub-epic the maintainer named decides what is dispatched +# after p0 and p1 (references/execution-duties.md 取卡全序). The checklist end +# is machine-readable: every docs/qa/platform-checklist/areas/*.json carries a +# top-level `axis` naming the product area most of its items serve. +# +# ⛔ RETIRED 2026-11-18, on the header's terms — row absent, label OBJECT left +# exactly as it is: area:records, area:access, area:reports, area:identity, +# area:api, area:files, area:i18n, area:studio and area:devpath, the +# feature-axis values this set replaces. The objects area:auth, area:automation +# and area:formula never had a row here and are left alone the same way. Open +# cards carry these until the backfill moves each one to its new area; deleting +# the objects afterwards is the maintainer's call, never a side effect of this +# file. area:ai and area:workflow keep their names under new meanings, and +# area:data gains its first row, so on those three `--reconcile` is what +# rewrites the live description (default mode leaves an existing object alone). +# +# TWO repos, each with its OWN set, and not the per-repo loop above: the eight +# rows here and cloud's nine further down. The objectui repository no longer +# exists — its code is this repository's ui/ tree — so the two-repo loop this +# block used to be is gone. objectos is the docs/site repo. hotcrm is a +# product whose rules, areas included, live in its own repository; it has no +# rows here, and a platform gap found there is filed here, where it gets this +# repository's area. Widening this to another repository is a vocabulary +# decision, not a maintenance edit. # # ⚠️ Every -d below is ≤100 characters (`check:pm-label-desc-cap`), and each -# names the CUSTOMER capability rather than the packages that implement it — -# the axis is read by the maintainer planning product, not by a seat routing -# files. One colour family (`c2e0c6` … `0e8a16` are taken; the axis uses one -# shade of its own, `d2dae2`, so an area label is recognisable at a glance in a -# label list that already carries `domain:*` in `bfd4f2`). -for R in objectstack-ai/objectstack objectstack-ai/objectui; do - gh label create area:records -R "$R" -c d2dae2 -d "Business objects, records, the views that show data, usable forms, search" 2>/dev/null || true - gh label create area:access -R "$R" -c d2dae2 -d "Permissions that actually hold — RLS/FLS, sharing model, write-path guards" 2>/dev/null || true - gh label create area:workflow -R "$R" -c d2dae2 -d "Approvals and automation — the work that runs without a person driving it" 2>/dev/null || true - gh label create area:reports -R "$R" -c d2dae2 -d "Business reporting — dashboards, reports, the numbers a manager reads" 2>/dev/null || true - gh label create area:identity -R "$R" -c d2dae2 -d "Login and identity — sign-up, sessions, organization membership, SSO" 2>/dev/null || true - gh label create area:api -R "$R" -c d2dae2 -d "The API a customer can call, and integrations — REST, connectors, webhooks, jobs" 2>/dev/null || true - gh label create area:files -R "$R" -c d2dae2 -d "Files — upload, download, signed URLs, access derived from the parent record" 2>/dev/null || true - gh label create area:i18n -R "$R" -c d2dae2 -d "The customer's own language, across UI, metadata and notifications" 2>/dev/null || true - gh label create area:studio -R "$R" -c d2dae2 -d "Changing a running app without code — authoring, publish, docs and the portal" 2>/dev/null || true - gh label create area:ai -R "$R" -c d2dae2 -d "AI-native — agent / tool / skill metadata, and the MCP surface an agent drives" 2>/dev/null || true - gh label create area:devpath -R "$R" -c d2dae2 -d "The road — create, dev, verify, publish/install, connect an agent, iterate" 2>/dev/null || true -done +# names what the CUSTOMER gets rather than the packages that implement it — the +# area is read by the maintainer planning product, not by a seat routing files. +# One shade of its own, `d2dae2`, so an area label is recognisable at a glance +# in a label list that already carries `domain:*` in `bfd4f2`. +gh label create area:ai -R objectstack-ai/objectstack -c d2dae2 -d "AI: asking for data, writing data, MCP, AI chat, product skills, evals and scenario cards" 2>/dev/null || true +gh label create area:build -R objectstack-ai/objectstack -c d2dae2 -d "Building apps: starting a project, writing and verifying metadata, Studio, the CLI" 2>/dev/null || true +gh label create area:data -R objectstack-ai/objectstack -c d2dae2 -d "Data and permissions: records, search, query and report numbers, files, sign-in, orgs, audit" 2>/dev/null || true +gh label create area:workflow -R objectstack-ai/objectstack -c d2dae2 -d "Flows and integration: flows, approvals, notifications, print, schedules, the API, connectors" 2>/dev/null || true +gh label create area:ux -R objectstack-ai/objectstack -c d2dae2 -d "Experience: looks right, easy to use, gives feedback; i18n, mobile, navigation, page load" 2>/dev/null || true +gh label create area:package -R objectstack-ai/objectstack -c d2dae2 -d "Packages and install: install, enable, disable, uninstall, seed data, upgrades, release notes" 2>/dev/null || true +gh label create area:fleet -R objectstack-ai/objectstack -c d2dae2 -d "Not product — the fleet's own tooling: CI, tests, lint, PM tools, internal skills, governance" 2>/dev/null || true +gh label create area:cloud -R objectstack-ai/objectstack -c d2dae2 -d "Not product — related to the cloud repo: needs to read cloud code, or serves only the hosted edition" 2>/dev/null || true + +# The cloud repository's OWN product areas — nine values, one per cloud card. +# ⛔ This file is not their definition: what each area covers, cloud's core +# functions and its grading rules live in the cloud repository +# (docs/strategy/core-functions.md and docs/strategy/triage-rules.md), and the +# pm-dispatch skill only points there. The rows sit here because this script +# is the one place the fleet's label vocabulary is created and reconciled, for +# every repo; the -d strings are the cloud seat's own wording, copied. +# +# All nine label objects already exist on cloud — created by first use, grey +# and with no description — so the default create-only mode changes nothing +# there and `--reconcile` is what gives them this colour and these +# descriptions. Same shade as the eight above: an area is an area in either +# repository's label list. +gh label create area:control -R objectstack-ai/cloud -c d2dae2 -d "云控制台:注册登录、组织与成员、套餐与计费、平台邮件、开发者版" 2>/dev/null || true +gh label create area:environment -R objectstack-ai/cloud -c d2dae2 -d "云环境:环境运行时、域名路由、租户库、pin 升级、推送" 2>/dev/null || true +gh label create area:marketplace -R objectstack-ai/cloud -c d2dae2 -d "市场与发布:市场装应用、发布者上架与审核、套件、连接的运行时" 2>/dev/null || true +gh label create area:ai -R objectstack-ai/cloud -c d2dae2 -d "云端 AI:托管的 AI 搭建、问数、写数、MCP 入口" 2>/dev/null || true +gh label create area:enterprise -R objectstack-ai/cloud -c d2dae2 -d "企业版:安装升级、许可证、登录、已发版企业功能、企业版新功能" 2>/dev/null || true +gh label create area:security -R objectstack-ai/cloud -c d2dae2 -d "云端安全:鉴权、跨组织、密钥、隐私删除" 2>/dev/null || true +gh label create area:ops -R objectstack-ai/cloud -c d2dae2 -d "运维与上线:备份、告警、厂商额度、生产密钥与配置、上线验收" 2>/dev/null || true +gh label create area:fleet -R objectstack-ai/cloud -c d2dae2 -d "车队工具:CI、测试工具、部署流水线、PM 流程(不是产品)" 2>/dev/null || true +gh label create area:ux -R objectstack-ai/cloud -c d2dae2 -d "体验:控制台和环境里的慢、难用、步骤多、难懂、界面不一致" 2>/dev/null || true # No `target:` family. A release blocker is `priority:p0` inside the # release window and nothing else (pm-dispatch references/filing-gate.md diff --git a/scripts/pm/first-touch-sweep.mjs b/scripts/pm/first-touch-sweep.mjs index 636e7ea0629..bf4ce2d7336 100644 --- a/scripts/pm/first-touch-sweep.mjs +++ b/scripts/pm/first-touch-sweep.mjs @@ -38,7 +38,8 @@ * ③ a `domain:*` with no pm state (`PM_EXCLUSIVE_STATE_LABELS`, `needs-user-decision` included); * ④ `pm:queue` + `domain:*` with no `priority:*`; * ⑤ created inside the window (`--since`) and carrying `pm:queue` or a `priority:*` that was applied in the same - * minute the card was created — first-touch as untriaged, ⛔ never judged by who applied it. + * minute the card was created — listed whoever applied it; the touch it is owed adds area and type, and a + * grade a person set stays (`references/filing-gate.md`: the hand-set grade). * * ②③④ take only cards whose `updated_at` is older than `SETTLE_MS` (~2 min): a card being labelled right now is * mid-write, not owed. ⑤ needs a window; without `--since` it is NOT RUN, the verdict is PARTIAL and the exit 4 — @@ -47,6 +48,15 @@ * Report-only: ⛔ this file writes nothing. Each hit is a card triage owes a first touch this fire; the order of the * touches (newest first when the sweep clears, oldest first when it does not) is triage's, not this file's. * + * ## The area backstop — a sixth row, daily, and NOT part of the verdict + * + * Every public card carries exactly one `area:*`, set at filing or at triage's first touch. The backstop is the + * daily read that catches the card neither reached (`AREA_BACKSTOP_PHRASE`, pinned like the disjunctions): every + * open card of the same walk that carries no `area:*`, with the sweep's own exclusions plus `security` — a security + * card owes no area. It rides the walk already paid for, so it costs no request. ⛔ It is a DAILY duty, not a + * first-touch debt: it is printed after the five rows and never enters the `owed` set, the verdict or the exit code, + * so a board that is mid-backfill does not turn every fire's sweep into FOUND. + * * ## Exit codes — capture them BEFORE any pipe * * 0 the walk is complete and all five ran; the lines say what each disjunction found (zero or more) @@ -92,6 +102,10 @@ export const TRIAGE_RULE_PHRASES = Object.freeze([ '不等 ⇒ 报 `sweep INCOMPLETE`', ]); +/** The daily backstop's sentence in the same rule file (the self-test pins it), and the labels that owe no area. */ +export const AREA_BACKSTOP_PHRASE = '日对账 fire 扫无 `area:*` 的公开卡'; +export const AREA_BACKSTOP_LIST_CAP = 30; + /** The multi-lane boards (`cross-repo-coordination.md`: 「多车道仓 `objectstack`」); ② runs on these alone. */ export const MULTI_LANE_REPOS = Object.freeze(['objectstack-ai/objectstack']); export const MULTI_LANE_RULE_PATH = '.claude/skills/pm-dispatch/references/cross-repo-coordination.md'; @@ -108,7 +122,7 @@ export const DISJUNCTIONS = Object.freeze({ 2: 'pm:queue with no domain:* (multi-lane board)', 3: 'domain:* with no pm state', 4: 'pm:queue + domain:* with no priority:*', - 5: 'created in the window with pm:queue / priority:* applied in the creation minute', + 5: 'created in the window with pm:queue / priority:* applied in the creation minute (the touch adds area and type; a grade a person set stays)', }); // --------------------------------------------------------------------------- @@ -139,6 +153,16 @@ export function classify(issue, { repo, nowMs }) { return hits; } +/** + * The area backstop: an open card that carries no `area:*`. The sweep's exclusions apply, and a `security` card owes + * none — it is graded in the private channel and carries no area by rule. Pure. + */ +export function lacksArea(issue) { + const labels = labelsOf(issue); + if (labels.some((l) => EXCLUDED_LABELS.includes(l) || l === 'security')) return false; + return !labels.some((l) => l.startsWith('area:')); +} + /** ⑤'s first half: created at or after the window's start, not excluded, carrying `pm:queue` or a `priority:*`. Pure. */ export function fifthCandidate(issue, { sinceMs }) { if (!Number.isFinite(sinceMs)) return false; @@ -232,7 +256,8 @@ export async function sweep({ repo, nowMs, sinceMs = NaN, get }) { } const hits = new Set(Object.values(found).flat().map((i) => i.number)); - return { repo, nowMs, sinceMs, pages, enumerated: issues.length, totalCount, complete: why.length === 0, why, found, fifthRun, hits, unjudged }; + const noArea = issues.filter(lacksArea); + return { repo, nowMs, sinceMs, pages, enumerated: issues.length, totalCount, complete: why.length === 0, why, found, fifthRun, hits, unjudged, noArea }; } export function renderText(r) { @@ -253,6 +278,9 @@ export function renderText(r) { lines.push(`${marks[d]} ${DISJUNCTIONS[d]}: ${cards.length}`); for (const c of cards) lines.push(` #${c.number} · updated ${String(c.updated_at ?? '').slice(0, 16)}Z · ${String(c.title ?? '').slice(0, 100)}`); } + const bare = (r.noArea ?? []).map((i) => i.number).sort((a, b) => a - b); + const listed = bare.length > AREA_BACKSTOP_LIST_CAP ? `the first ${AREA_BACKSTOP_LIST_CAP} of them (--json lists all)` : 'all of them'; + lines.push(`area backstop (daily, not part of the verdict) — open cards with no area:*: ${bare.length}${bare.length ? ` · ${listed}: ${bare.slice(0, AREA_BACKSTOP_LIST_CAP).map((n) => `#${n}`).join(' ')}` : ''}`); lines.push(verdictLine(r)); return lines.join('\n'); } @@ -268,6 +296,7 @@ export function renderJson(r) { fifth_run: r.fifthRun, disjunctions: { 1: ids(1), 2: ids(2), 3: ids(3), 4: ids(4), 5: ids(5) }, owed: [...r.hits].sort((a, b) => a - b), + no_area: (r.noArea ?? []).map((i) => i.number).sort((a, b) => a - b), verdict: verdictLine(r), }; } @@ -374,11 +403,12 @@ function rearmThroughProxy(args) { const SELF_TEST_BATTERIES = Object.freeze({ 'the rule text: every phrase this file is built from is in the file that writes it': 3, 'the classifier: ①–④ exactly as written — ① is not "no labels", ③ is asked, exclusions first, ②③④ settle': 16, - 'the fifth: created in the window, pm:queue or priority:* applied in the creation minute, never by actor': 7, + 'the fifth: created in the window, pm:queue or priority:* applied in the creation minute, whoever applied it — the touch it is owed adds area and type and keeps a grade a person set': 8, 'the walk: every page, pull requests dropped, the count checked — INCOMPLETE on any gap, never clean': 10, 'the CLI: what a typo must never mean, and the exits a patrol reads': 9, + 'the area backstop: an open card with no area:* is listed daily, and never moves the first-touch verdict': 9, }); -const SELF_TEST_BATTERY_FLOOR = 5; +const SELF_TEST_BATTERY_FLOOR = 6; const UNATTRIBUTED_BATTERY = '(unattributed)'; const batteryCases = new Map(); let openBattery = null; @@ -429,7 +459,7 @@ export async function selfTest() { t('exclusions come first: tracking, status:parked, pm:seat, qa-run', ['tracking', 'status:parked', 'pm:seat', 'qa-run'].map((x) => c([x]).length), [0, 0, 0, 0]); t('labels compare case-insensitively', c(['Domain:Skills', 'PM:Queue']), [4]); - battery('the fifth: created in the window, pm:queue or priority:* applied in the creation minute, never by actor'); + battery('the fifth: created in the window, pm:queue or priority:* applied in the creation minute, whoever applied it — the touch it is owed adds area and type and keeps a grade a person set'); { const SINCE = Date.parse('2026-11-14T20:00:00Z'); const born = card(9, ['pm:queue', 'domain:ui', 'priority:p2'], { created_at: '2026-11-14T21:10:07Z' }); @@ -438,6 +468,7 @@ export async function selfTest() { t('…no window, no candidate', fifthCandidate(born, { sinceMs: NaN }), false); t('…an excluded card is not', fifthCandidate(card(9, ['pm:queue', 'pm:seat'], { created_at: born.created_at }), { sinceMs: SINCE }), false); t('⭐ pm:queue applied in the creation minute is ⑤, whoever applied it', sameMinuteLabelled(born, [{ event: 'labeled', label: { name: 'pm:queue' }, created_at: '2026-11-14T21:10:59Z', actor: { login: 'objectstack-fleet[bot]' } }])); + t('⭐ …a person\'s hand in the creation minute is ⑤ as well: the card is listed for area and type, and the sweep says the grade stays', [sameMinuteLabelled(born, [{ event: 'labeled', label: { name: 'priority:p2' }, created_at: '2026-11-14T21:10:30Z', actor: { login: 'os-warren', type: 'User' }, performed_via_github_app: null }]), DISJUNCTIONS[5].includes('a grade a person set stays')], [true, true]); t('…a priority applied a minute later is a touch, not ⑤', sameMinuteLabelled(born, [{ event: 'labeled', label: { name: 'priority:p2' }, created_at: '2026-11-14T21:11:00Z' }]), false); t('…another label in the minute is not ⑤', sameMinuteLabelled(born, [{ event: 'labeled', label: { name: 'domain:ui' }, created_at: '2026-11-14T21:10:08Z' }]), false); } @@ -479,6 +510,22 @@ export async function selfTest() { t('⭐ a ⑤ card whose events cannot be read is UNJUDGED and the run INCOMPLETE', [unread.complete, unread.unjudged], [false, [77]]); } + battery('the area backstop: an open card with no area:* is listed daily, and never moves the first-touch verdict'); + { + t('the backstop sentence is a substring of triage-duties.md (a reworded rule reds here)', readFileSync(new URL(TRIAGE_RULE_PATH, REPO_ROOT), 'utf8').includes(AREA_BACKSTOP_PHRASE)); + t('a routed, graded, queued card with no area:* is listed', lacksArea(card(1, ['domain:spec', 'pm:queue', 'priority:p2']))); + t('…and the same card carrying one is not', lacksArea(card(1, ['domain:spec', 'pm:queue', 'priority:p2', 'area:data'])), false); + t('the label compares case-insensitively', lacksArea(card(1, ['Area:UX'])), false); + t('⛔ a security card owes no area', lacksArea(card(1, ['security', 'pm:queue'])), false); + t('the sweep\'s exclusions apply here too: tracking, status:parked, pm:seat, qa-run', ['tracking', 'status:parked', 'pm:seat', 'qa-run'].map((x) => lacksArea(card(1, [x]))), [false, false, false, false]); + const rows = [card(41, ['domain:spec', 'pm:queue', 'priority:p2', 'area:build']), card(42, ['domain:spec', 'pm:queue', 'priority:p2']), card(43, ['security', 'domain:server', 'pm:queue', 'priority:p1'])]; + const get = async (p) => (p.startsWith('/search') ? { status: 200, json: { total_count: 3, incomplete_results: false } } : { status: 200, json: p.endsWith('page=1') ? rows : [] }); + const r = await sweep({ repo: REPO, nowMs: NOW, sinceMs: Date.parse('2026-11-14T20:00:00Z'), get }); + t('the walk lists exactly the card with no area', [r.noArea.map((i) => i.number), renderJson(r).no_area], [[42], [42]]); + t('⭐ …and it is NOT a first-touch debt: nothing is owed and the verdict is CLEAN', [[...r.hits], verdictLine(r), sweepExit(r)], [[], 'sweep CLEAN — no card owed a first touch', EXIT_OK]); + t('the text names the count and the card, after the five rows and before the verdict', renderText(r).split('\n').slice(-2)[0], 'area backstop (daily, not part of the verdict) — open cards with no area:*: 1 · all of them: #42'); + } + battery('the CLI: what a typo must never mean, and the exits a patrol reads'); { t('an unknown flag is refused', parseOptions(['--sinse=2026-11-14T00:00:00Z']).ok, false); diff --git a/scripts/pm/fleet-write/execute.mjs b/scripts/pm/fleet-write/execute.mjs index 79bb0cfb1ec..a060baceb81 100644 --- a/scripts/pm/fleet-write/execute.mjs +++ b/scripts/pm/fleet-write/execute.mjs @@ -850,6 +850,13 @@ export function requestLanded(req, { status, json } = {}) { return { ok: false, why: `HTTP ${status}, but the answer lists ${listed.length ? listed.join(', ') : 'no requested reviewers'} — ${missing.join(', ')} not requested (the endpoint answers the pull with its pending review requests, so a login it lacks was not written; read the pull on the board before anything else)` }; } } + // The issue type (`issue_patch` with `type`): the answer is the issue; a type it does not name did not land. + if (typeof req.typed === 'string') { + const named = typeof json?.type?.name === 'string' ? json.type.name : null; + if (named !== req.typed) { + return { ok: false, why: `HTTP ${status}, but the answer names ${named === null ? 'no issue type' : `the issue type ${named}`} — ${req.typed} not set (the endpoint answers the issue itself, so a type it does not name was not written)` }; + } + } // The labels leg (header): the answer is the pull's whole label set; a name sent and not listed did not land. if (Array.isArray(req.labelled)) { const listed = labelNames(json); @@ -1998,6 +2005,8 @@ export function resultOf(req, json, status = null) { if (Number.isInteger(json.number)) bits.push(`#${json.number}`); else if (Number.isInteger(json.id)) bits.push(`id ${json.id}`); if (typeof json.html_url === 'string') bits.push(json.html_url); + // An `issue_patch` that set the type prints it as the platform names it. + if (typeof req.typed === 'string') bits.push(`· type ${json.type?.name ?? 'none'}`); // The assignees leg's row prints the assignees as the platform lists them (header). if (Array.isArray(req.assigned)) bits.push(`· assignees ${assigneeLogins(json).join(', ') || 'none'}`); // The governed-review request's row prints the pull's pending requests as the platform lists them (header). @@ -2582,7 +2591,7 @@ export async function executeFleetWrite({ payload: raw, sender, token, api = DEF const SELF_TEST_BATTERIES = Object.freeze({ 'the sender gate: write, maintain and admin pass; read, triage, none and a stranger are refused with zero writes': 9, - 'the requests: every op becomes the endpoint, verb and body the table declares, with the App token': 7, + 'the requests: every op becomes the endpoint, verb and body the table declares, with the App token': 10, 'the run: actions in order, stop at the first failure, later actions never attempted': 6, 'the idempotent removal: a 404 on a directed label DELETE is success': 2, 'the GraphQL ops: the node id first, then the mutation; an errors array is a failure': 5, @@ -2737,6 +2746,14 @@ export async function selfTest() { [`POST /repos/${REPO}/issues/2/assignees`, { assignees: ['u'] }], [`PATCH /repos/${REPO}/issues/2`, { state: 'closed', state_reason: 'not_planned' }], ]); + const TYPE_PATCH = `PATCH /repos/${REPO}/issues/3`; + const typeAnswer = (name) => ({ status: 200, json: { number: 3, html_url: 'https://github.test/i/3', type: name === null ? null : { name } } }); + const setType = (answer, more = []) => run(base([{ op: 'issue_patch', issue: 3, type: 'Bug' }, ...more]), { ...allowed, [TYPE_PATCH]: answer, [`POST /repos/${REPO}/issues/1/comments`]: { status: 201, json: { id: 78 } } }, { file: paceFile }); + const typed = await setType(typeAnswer('Bug')); + t('issue_patch with a type is ONE PATCH of the issue carrying the name, and its row prints the type the platform answered', [typed.exit, writes(typed.seen).map((s) => [s.call, s.body]), typed.rows[0].result], [EXIT_OK, [[TYPE_PATCH, { type: 'Bug' }]], '#3 https://github.test/i/3 · type Bug']); + const untyped = await setType(typeAnswer(null), [{ op: 'comment', issue: 1, body: 'after' }]); + t('⛔ a 200 whose answer names no type, or another one, is a FAILED action naming the type not set — and the stroke stops there', [untyped.exit === EXIT_OK, untyped.rows[0]?.result.includes('Bug not set'), writes(untyped.seen).length, requestLanded({ verb: 'PATCH', path: '/x', typed: 'Bug' }, typeAnswer('Task')).why.includes('the issue type Task')], [false, true, 1, true]); + t('…and an issue_patch that sends no type is not judged for one', requestLanded({ verb: 'PATCH', path: '/x' }, typeAnswer(null)).ok, true); const pr = await run(base([{ op: 'pr_create', title: 'T', head: 'h', base: 'main' }, { op: 'issue_create', title: 'I', body: 'B', labels: ['l'] }]), { ...allowed, [`POST /repos/${REPO}/pulls`]: { status: 201, json: { number: 9, html_url: 'https://github.test/p/9' } }, diff --git a/scripts/pm/fleet-write/ops.mjs b/scripts/pm/fleet-write/ops.mjs index 1d10ff6808f..463dd6ec08e 100644 --- a/scripts/pm/fleet-write/ops.mjs +++ b/scripts/pm/fleet-write/ops.mjs @@ -2943,6 +2943,13 @@ export const TARGET_REPO_SHAPE = new RegExp(`^${TARGET_OWNER}/[A-Za-z0-9_.-]+$`) * neither; `shape` on a `str` holds it to a pattern, named by `what` * (`branch`, `mailbox_branch_delete`'s, alone). */ +/** + * The native issue types a seat may set — the three `docs/NORTH-STAR.md` "Priority" rule 2 grades by. The organization's + * issue-types endpoint answers this integration 403, so the names are a closed list here and never read from it; a + * name the organization does not define is the platform's 422, a FAILED action. + */ +export const ISSUE_TYPES = Object.freeze(['Bug', 'Feature', 'Task']); + export const FIELDS = Object.freeze({ issue: Object.freeze({ kind: 'int' }), pull: Object.freeze({ kind: 'int' }), @@ -2959,6 +2966,8 @@ export const FIELDS = Object.freeze({ team_reviewers: Object.freeze({ kind: 'list', max: MAX_LOGINS_PER_ACTION, itemMax: MAX_LOGIN_CHARS }), state: Object.freeze({ kind: 'enum', values: Object.freeze(['open', 'closed']) }), state_reason: Object.freeze({ kind: 'enum', values: Object.freeze(['completed', 'not_planned', 'duplicate', 'reopened']) }), + // The native issue type, by NAME (`issue_patch` alone): the three the grading rules name, and nothing else. + type: Object.freeze({ kind: 'enum', values: ISSUE_TYPES }), target_repo: Object.freeze({ kind: 'enum', values: TRANSFER_TARGETS }), run_id: Object.freeze({ kind: 'int' }), workflow: Object.freeze({ kind: 'enum', values: WORKFLOW_DISPATCH_ALLOWLIST }), @@ -3262,12 +3271,14 @@ export const OPS = Object.freeze({ issue_patch: Object.freeze({ permission: 'issues', required: Object.freeze(['issue']), - optional: Object.freeze(['title', 'body', 'state', 'state_reason']), - atLeastOne: Object.freeze(['title', 'body', 'state', 'state_reason']), + optional: Object.freeze(['title', 'body', 'state', 'state_reason', 'type']), + atLeastOne: Object.freeze(['title', 'body', 'state', 'state_reason', 'type']), + // `type` is the native issue type by name (`ISSUE_TYPES`), PATCHed on the issue with the rest. The answer is the + // issue, so the request carries `typed`: a 2xx whose answer names another type, or none, is a FAILED action. requests: (a, repo) => { const body = {}; - for (const k of ['title', 'body', 'state', 'state_reason']) if (k in a) body[k] = a[k]; - return [{ verb: 'PATCH', path: issues(repo, a.issue), body }]; + for (const k of ['title', 'body', 'state', 'state_reason', 'type']) if (k in a) body[k] = a[k]; + return [{ verb: 'PATCH', path: issues(repo, a.issue), body, ...('type' in a ? { typed: a.type } : {}) }]; }, }), issue_create: Object.freeze({ diff --git a/scripts/pm/fleet-write/validate.mjs b/scripts/pm/fleet-write/validate.mjs index 954b592ca25..600895094cb 100644 --- a/scripts/pm/fleet-write/validate.mjs +++ b/scripts/pm/fleet-write/validate.mjs @@ -1107,7 +1107,7 @@ export function payloadInStepEnv(text) { const SELF_TEST_BATTERIES = Object.freeze({ 'the envelope: four keys, every one required, nothing else admitted': 9, 'the fields: request_id shape and cap, the one organization, the session id': 8, - 'the actions: count, the closed op list, closed keys per op, typed values': 30, + 'the actions: count, the closed op list, closed keys per op, typed values': 33, 'the platform ceilings: ten top-level properties and under 64KB, pinned with their source': 6, 'refused by construction: no row reaches a merge, a review, a ref, contents, a workflow, a release or an org endpoint': 24, "the mailbox_branch_delete row: pull and a claude/mailbox-* branch and nothing else, any other name refused before the dispatch and never echoed; ONE bodiless DELETE of that one ref, carrying the pull and the branch to the executor's fences; contents write, a literal grant, so the mint widens nothing; and it rides the close stroke": 6, @@ -1245,7 +1245,10 @@ export async function selfTest() { t('a label named twice is refused', refuses(one({ op: 'labels_add', issue: 1, labels: ['a', 'a'] }), 'twice')); t('eleven assignees is refused', refuses(one({ op: 'assign', issue: 1, assignees: Array.from({ length: 11 }, (_, i) => `u${i}`) }), 'over its cap of 10')); t('an unknown state is refused', refuses(one({ op: 'issue_patch', issue: 1, state: 'archived' }), 'must be one of "open", "closed"')); - t('issue_patch with nothing to change is refused', refuses(one({ op: 'issue_patch', issue: 1 }), 'at least one of title, body, state, state_reason')); + t('issue_patch with nothing to change is refused', refuses(one({ op: 'issue_patch', issue: 1 }), 'at least one of title, body, state, state_reason, type')); + t('issue_patch: a type is one of Bug, Feature, Task — alone or beside the other keys', [validatePayload(one({ op: 'issue_patch', issue: 1, type: 'Bug' })).ok, validatePayload(one({ op: 'issue_patch', issue: 1, type: 'Task', state: 'closed', state_reason: 'completed' })).ok, validatePayload(one({ op: 'issue_patch', issue: 1, type: 'Feature', title: 't' })).payload.actions[0]], [true, true, { op: 'issue_patch', issue: 1, title: 't', type: 'Feature' }]); + t('⛔ …any other type is refused naming the three: another name, another case, empty, a number, an object', ['Epic', 'bug', 'BUG', '', 7, { name: 'Bug' }, null].map((type) => refuses(one({ op: 'issue_patch', issue: 1, type }), 'actions[0].type must be one of "Bug", "Feature", "Task"')), [true, true, true, true, true, true, true]); + t('⛔ …and no other op takes a type: the key is unknown on a create and on a label write', [refuses(one({ op: 'issue_create', title: 't', body: 'b', type: 'Bug' }), 'type'), refuses(one({ op: 'labels_add', issue: 1, labels: ['a'], type: 'Bug' }), 'type')], [true, true]); t('pr_request_reviewers with neither list is refused', refuses(one({ op: 'pr_request_reviewers', pull: 1 }), 'at least one of reviewers, team_reviewers')); // pr_update_branch: the sha is judged HERE, before the dispatch — a short one never reaches the platform's 422. t('pr_update_branch: a short sha is refused before the dispatch, naming the full shape', refuses(one({ op: 'pr_update_branch', pull: 1, expected_head_sha: SHA.slice(0, 7) }), 'full 40-hex commit sha')); @@ -1272,7 +1275,7 @@ export async function selfTest() { labels_remove: { issue: 1, labels: ['a'] }, assign: { issue: 1, assignees: ['u'] }, unassign: { issue: 1, assignees: ['u'] }, - issue_patch: { issue: 1, state: 'closed', state_reason: 'completed' }, + issue_patch: { issue: 1, state: 'closed', state_reason: 'completed', type: 'Bug' }, issue_create: { title: 't', body: 'b', labels: ['l'], assignees: ['u'] }, pr_create: { title: 't', head: 'h', base: 'main', body: 'b', assignees: ['u'], labels: ['l'] }, pr_request_reviewers: { pull: 1, reviewers: ['u'] }, diff --git a/scripts/pm/label-write.mjs b/scripts/pm/label-write.mjs index 3f336a37699..7c2c6ded3da 100644 --- a/scripts/pm/label-write.mjs +++ b/scripts/pm/label-write.mjs @@ -319,6 +319,30 @@ * applies the existing `needs-user-decision`, so it is refused like it. The * relay's own adding ops (`fleet-write/dispatch.mjs`: `labels_add`, `pr_create`, * `issue_create`) ask this same `refuseKindLabels` before they send. + * + * ## The hand-set grade — a `priority:*` a person set is not changed by this tool + * + * A maintainer changed a card's grade on GitHub and triage changed it back. + * `references/filing-gate.md` now says 「人定的级 ⛔ 不改」, and tells a person's + * hand from the fleet's by an ALLOW-LIST read off the label event itself: the + * newest `labeled` event of the grade the card carries is the fleet's only when + * it carries `performed_via_github_app` or its actor is a bot + * (`objectstack-fleet[bot]` through the relay, `github-actions[bot]` from a + * workflow). Every other event is a person's — and so is a grade with no + * `labeled` event at all, or an events read the platform did not answer: + * what cannot be shown to be the fleet's is not treated as the fleet's. + * + * So a write whose target changes the card's set of `priority:*` labels reads + * the card's events first (one extra GET per 100 events, only on such a write; + * a first grade on an ungraded card reads nothing), and a grade a person set + * is REFUSED at step ② (exit 2) with zero writes. `unlabeled` events are not + * read: GitHub drops the app field on them, so the removing half of a session's + * own stroke reads like a hand. The one way through is the rule's own: the + * maintainer has ruled, and the comment folded into the write (`--comment-file`) + * carries a `Ruling-ref:` line citing his words. To disagree without a ruling, + * leave one line with the reason on the card as a comment, and nothing else: + * the grade and the card's state stay. ⛔ This is the seat's label door and claims nothing about the + * others: a write that reaches the board another way is not judged here. */ import process from 'node:process'; @@ -571,6 +595,78 @@ export function refuseStatelessWrite({ state = 'open', closes = false, kind = KI ); } +/** Where the hand-set grade rule is written, and the phrase this file quotes from it (header: the hand-set grade). */ +export const HAND_SET_RULE_PATH = '.claude/skills/pm-dispatch/references/filing-gate.md'; +export const HAND_SET_RULE = '人定的级 ⛔ 不改'; +export const GRADE_LABEL_PREFIX = 'priority:'; +export const RULING_REF_KEY = 'Ruling-ref:'; +/** The grade read walks at most this many pages of a card's events (100 a page); a card with more is an incomplete read. */ +export const GRADE_EVENT_PAGE_CAP = 10; + +const gradeKeys = (labels) => dedupe((labels ?? []).map(labelKey).filter((l) => typeof l === 'string' && l.startsWith(GRADE_LABEL_PREFIX))).sort(); + +/** The grades a write CHANGES: every `priority:*` the card carries, when the target's set of them differs. An ungraded card changes none. */ +export function gradesChanged({ current = [], target = [] } = {}) { + const carried = gradeKeys(current); + return carried.length === 0 || carried.join() === gradeKeys(target).join() ? [] : carried; +} + +/** The allow-list (header): a label event is the fleet's only with an app on it or a bot for an actor. */ +export function isFleetLabelEvent(event) { + return Boolean(event?.performed_via_github_app) || event?.actor?.type === 'Bot'; +} + +/** A `Ruling-ref:` line in the folded comment: at a line start, with something after the key. */ +export function hasRulingRef(text) { + return String(text ?? '').split(/\r?\n/u).some((line) => line.startsWith(RULING_REF_KEY) && line.slice(RULING_REF_KEY.length).trim() !== ''); +} + +/** + * The hand-set grade (header), asked of the grades ONE write changes. Returns the refusal sentence, or null. + * + * grades `gradesChanged`'s answer — the carried `priority:*` labels, as `labelKey` spells them. + * events the card's issue events, oldest first as the platform lists them; null when the read did not answer or + * ran past `GRADE_EVENT_PAGE_CAP`. Only `labeled` events are read (header: why not `unlabeled`). + * rulingRef the folded comment carries a `Ruling-ref:` line — the maintainer's ruling, cited; nothing is refused. + */ +export function refuseHandSetGrade({ grades = [], events = null, rulingRef = false, ref = 'the card' } = {}) { + if (grades.length === 0 || rulingRef) return null; + const rule = `${HAND_SET_RULE_PATH}: 「${HAND_SET_RULE}」`; + const exits = + 'A grade a person set stays. To disagree, leave one line with the reason on the card as a comment, and nothing else: the grade ' + + `and the card's state stay as they are; where the maintainer has already ruled, fold the comment into this write (\`--comment-file\`) with a \`${RULING_REF_KEY}\` line citing his words.`; + if (!Array.isArray(events)) { + return ( + `the write changes the grade of ${ref} and the card's label events could not be read in full (${GRADE_EVENT_PAGE_CAP} pages at most), so ` + + `nothing shows the fleet set ${grades.map((g) => `\`${g}\``).join(', ')} — ${rule}. ${exits}` + ); + } + const byHand = []; + for (const grade of grades) { + const set = events.filter((e) => e?.event === 'labeled' && labelKey(e?.label?.name) === grade).at(-1); + if (set && isFleetLabelEvent(set)) continue; + byHand.push( + set + ? `\`${grade}\` (set by \`${set.actor?.login ?? 'an unread actor'}\` at ${set.created_at ?? 'an unread time'}: actor type ${set.actor?.type ?? 'unread'}, no \`performed_via_github_app\`)` + : `\`${grade}\` (no \`labeled\` event for it on the card)`, + ); + } + if (byHand.length === 0) return null; + return `the write changes the grade of ${ref}, and ${byHand.join(' and ')} is not the fleet's label event — ${rule}. ${exits}`; +} + +/** The card's issue events for the grade read, or null when a page did not answer or the cap was reached with more to come. */ +async function readLabelEvents({ doCall, base }) { + const all = []; + for (let page = 1; page <= GRADE_EVENT_PAGE_CAP; page += 1) { + const r = await doCall('events-list', `${base}/events?per_page=100&page=${page}`, {}); + if (r.verdict !== 'ok' || !Array.isArray(r.json)) return null; + all.push(...r.json); + if (r.json.length < 100) return all; + } + return null; +} + /** Where the kind rule is written, and the three phrases of it this file quotes (header: the kind rule). */ export const KIND_RULE_PATH = '.claude/skills/pm-dispatch/SKILL.md'; export const KIND_RULE_STATES_ON_ISSUES = 'issue 上的信号'; @@ -1219,6 +1315,25 @@ export async function runLabelWrite(options, deps = {}) { return result(EXIT_USAGE, { stoppedAt: 2, refusal: stateless }); } + // The hand-set grade (header) — asked only of a write that changes a grade the card carries: one events read, then. + const grades = gradesChanged({ current: currentLabels, target: labels.target }); + if (grades.length) { + let folded = ''; + try { + folded = options.commentFile ? (deps.readText ?? ((p) => readFileSync(p, 'utf8')))(options.commentFile) : ''; + } catch { + folded = ''; // an unreadable comment file cites nothing here; the fold below reports the file itself + } + const rulingRef = hasRulingRef(folded); + const handSet = refuseHandSetGrade({ grades, events: rulingRef ? [] : await readLabelEvents({ doCall, base }), rulingRef, ref: `${repo}#${issue}` }); + if (handSet) { + record(`[${stamp()}] ② REFUSED — ${handSet}`); + record(`[${stamp()}] ⛔ NOTHING WAS WRITTEN.`); + return result(EXIT_USAGE, { stoppedAt: 2, refusal: handSet }); + } + record(`[${stamp()}] ② grade — ${render(grades)} ${rulingRef ? `changes under the comment's \`${RULING_REF_KEY}\` line` : "was set by the fleet (its newest `labeled` event carries an app or a bot actor)"}.`); + } + // ── `--comment-file`: the comment (and `--land`) folded into this ONE stroke, RELAY-ONLY (header) ── if (options.commentFile) { const readText = deps.readText ?? ((p) => readFileSync(p, 'utf8')); @@ -2058,6 +2173,7 @@ function reportPrerequisite(r) { /** Which op a (method, path) pair is — the same routing the live path uses. */ export function classifyOp(method, path) { + if (/\/issues\/\d+\/events(\?|$)/.test(path)) return 'events-list'; if (/\/issues\/comments\/\d+$/.test(path)) return 'comment-read'; if (/\/issues\/\d+\/comments(\?|$)/.test(path)) return 'comments-list'; if (/\/branches\//.test(path)) return 'branch-read'; @@ -2096,6 +2212,9 @@ export function fakeBoard(initial = {}) { comments: [...(initial.comments ?? [])], branches: { ...(initial.branches ?? {}) }, pulls: [...(initial.pulls ?? [])], + // The card's issue events (the hand-set grade read). A fixture that names none is a board the FLEET labelled: + // one bot `labeled` event per label it carries, so only a fixture that says so has a grade set by hand. + events: initial.events ?? null, serverNow: initial.serverNow ?? null, // 'issue' (default) | 'pull' | 'unreadable' — what step ①'s card object says the target is. kind: initial.kind ?? 'issue', @@ -2140,6 +2259,13 @@ export function fakeBoard(initial = {}) { return wrap(h.status, h.json ?? { message: 'canned' }, h.rateRemaining ?? 5000); } + if (op === 'events-list') { + const all = board.events ?? board.labels.map((name) => ({ event: 'labeled', label: { name }, actor: { login: RELAY_COMMENT_AUTHOR, type: 'Bot' }, performed_via_github_app: null, created_at: '2026-01-01T00:00:00Z' })); + const query = new URLSearchParams(path.slice(path.indexOf('?') + 1)); + const size = Number(query.get('per_page') ?? 100); + const page = Number(query.get('page') ?? 1); + return wrap(200, all.slice((page - 1) * size, page * size)); + } if (op === 'comment-read') { const id = Number(path.slice(path.lastIndexOf('/') + 1)); const c = board.comments.find((x) => x.id === id); @@ -2421,6 +2547,7 @@ const REAL_TRANSPORT_BATTERY = "the real transport: a comment-bearing stroke (a const KIND_BATTERY = 'the kind rule: no pm state added to a pull request, no `pm:awaiting-merge` added to an issue, a removal never refused, an unreadable kind refused — on both write paths, before the transport'; const LAND_DOGFOOD_BATTERY = "the --land dogfood gate: a `!` title or a `(narrowing)` arm lands only on a trusted newest os-dev-report whose dogfood_battery names the head or a first-parent ancestor reached over merges of the base alone; every NOT MEASURED refuses before any send; an unmarked pull is not judged"; const STATELESS_BATTERY = 'the stateless write: an OPEN card never loses its last pm state unless the same write adds a state or needs-user-decision or closes it, a parked card never keeps an assignee a state or assignee move left there, a release stays legal — before the transport, zero writes'; +const HAND_SET_BATTERY = "the hand-set grade: a `priority:*` whose newest `labeled` event is not the fleet's (no app, no bot actor) is never changed — refused at step ② with zero writes unless the folded comment cites a `Ruling-ref:`"; const SELF_TEST_BATTERIES = Object.freeze({ 'the re-exec guard: the name this tool sets, and the patrol name that must not silence it': 11, 'the arithmetic: union, difference, and the two idempotent no-ops': 12, @@ -2439,8 +2566,9 @@ const SELF_TEST_BATTERIES = Object.freeze({ [REAL_TRANSPORT_BATTERY]: 5, [STATELESS_BATTERY]: 19, [LAND_DOGFOOD_BATTERY]: 50, + [HAND_SET_BATTERY]: 23, }); -const SELF_TEST_BATTERY_FLOOR = 17; +const SELF_TEST_BATTERY_FLOOR = 18; const UNATTRIBUTED_BATTERY = '(unattributed)'; const batteryCases = new Map(); @@ -2992,6 +3120,54 @@ export async function selfTest() { } // ── the `--land` dogfood battery gate ──────────────────────────────────── + battery(HAND_SET_BATTERY); + { + const labeled = (name, actor, type, app = null, at = '2026-11-18T10:00:00Z', event = 'labeled') => ({ event, label: { name }, actor: { login: actor, type }, performed_via_github_app: app, created_at: at }); + const HAND = labeled('priority:p1', 'os-warren', 'User'); + const RELAY = labeled('priority:p1', RELAY_COMMENT_AUTHOR, 'Bot'); + const WORKFLOW = labeled('priority:p1', 'github-actions[bot]', 'Bot'); + const SESSION = labeled('priority:p1', 'os-warren', 'User', { slug: 'claude' }); + const hs = (events, extra = {}) => refuseHandSetGrade({ grades: ['priority:p1'], events, ref: 'o/r#7', ...extra }); + t('a regrade changes the carried grade; an added domain, an ungraded card and an unchanged set change none', [gradesChanged({ current: ['priority:p1', 'pm:queue'], target: ['priority:p3', 'pm:queue'] }), gradesChanged({ current: ['priority:p1'], target: ['priority:p1', 'domain:ui'] }), gradesChanged({ current: ['pm:queue'], target: ['pm:queue', 'priority:p2'] })], [['priority:p1'], [], []]); + t('…a second grade beside the carried one, and the carried one taken off, are changes too', [gradesChanged({ current: ['priority:p2'], target: ['priority:p2', 'priority:p1'] }), gradesChanged({ current: ['Priority:P2'], target: [] })], [['priority:p2'], ['priority:p2']]); + t('the allow-list: the relay bot, a workflow bot and a session writing through an app are the fleet', [RELAY, WORKFLOW, SESSION].map(isFleetLabelEvent), [true, true, true]); + t('⭐ …and a user actor with no app is a person, whoever the login is', isFleetLabelEvent(HAND), false); + const refused = hs([RELAY, { ...HAND, created_at: '2026-11-18T15:18:00Z' }]); + t('⭐ a grade whose NEWEST labeled event is a person\'s is REFUSED, naming the label, the login and the time', typeof refused === 'string' && ['`priority:p1`', '`os-warren`', '2026-11-18T15:18:00Z', 'o/r#7'].every((s) => refused.includes(s))); + t('…quoting the rule and where it lives, naming the one exit, and parking the card in no state', [HAND_SET_RULE, HAND_SET_RULE_PATH, RULING_REF_KEY, 'pm:awaiting-maintainer'].map((s) => String(refused).includes(s)), [true, true, true, false]); + t('a grade the fleet set — by the relay, by a workflow, by a session through an app — passes', [hs([RELAY]), hs([WORKFLOW]), hs([SESSION])], [null, null, null]); + t('the newest event decides: a person\'s grade the fleet later re-set is the fleet\'s', hs([HAND, { ...RELAY, created_at: '2026-11-18T16:00:00Z' }]), null); + t('⭐ an `unlabeled` event is not read: a session\'s own removal carries no app and must not read as a hand', hs([RELAY, labeled('priority:p1', 'os-bill', 'User', null, '2026-11-18T16:00:00Z', 'unlabeled')]), null); + t('another label\'s event says nothing about this grade', typeof hs([RELAY, labeled('priority:p2', 'os-warren', 'User')]), 'object'); + t('⭐ a grade with NO labeled event is not shown to be the fleet\'s: refused', String(hs([labeled('pm:queue', RELAY_COMMENT_AUTHOR, 'Bot')])).includes('no `labeled` event')); + t('⭐ an events read that did not answer is refused too, never passed', String(hs(null)).includes('could not be read in full')); + t('a `Ruling-ref:` line passes it, and the key must open a line and cite something', [hs([HAND], { rulingRef: true }), hasRulingRef('seat sig\nRuling-ref: 6982855148 「改回去」'), hasRulingRef('see Ruling-ref: x'), hasRulingRef('Ruling-ref: ')], [null, true, false, false]); + t('two carried grades are each asked: one by hand refuses the write', typeof refuseHandSetGrade({ grades: ['priority:p1', 'priority:p2'], events: [RELAY, labeled('priority:p2', 'hotlong', 'User')] }), 'string'); + + const REGRADE = ['--repo', 'o/r', '--issue', '7', '--add', 'priority:p3', '--remove', 'priority:p1']; + const CARD = { labels: ['pm:queue', 'priority:p1'] }; + const writes = (r) => r.fake.calls.filter((c) => c.method !== 'GET').length; + const byHand = await driveOffline(REGRADE, { ...CARD, events: [HAND] }); + t('⭐ end to end: regrading a card whose grade a person set is exit 2 at step ② with ZERO writes', [byHand.exit, byHand.res.stoppedAt, writes(byHand), byHand.fake.board.labels], [EXIT_USAGE, 2, 0, ['pm:queue', 'priority:p1']], byHand.text); + const byFleet = await driveOffline(REGRADE, CARD); + t('…the same regrade of a grade the fleet set lands and reads back, after ONE events read', [byFleet.exit, byFleet.fake.board.labels, byFleet.fake.calls.filter((c) => c.op === 'events-list').length], [EXIT_OK, ['pm:queue', 'priority:p3'], 1], byFleet.text); + const first = await driveOffline(['--repo', 'o/r', '--issue', '7', '--add', 'priority:p2,domain:ui'], { labels: ['pm:queue'], events: [] }); + t('a first grade on an ungraded card, and a write that touches no grade, read no events', [first.exit, first.fake.calls.filter((c) => c.op === 'events-list').length, (await driveOffline(['--repo', 'o/r', '--issue', '7', '--add', 'domain:ui'], { ...CARD, events: [HAND] })).fake.calls.filter((c) => c.op === 'events-list').length], [EXIT_OK, 0, 0]); + const long = Array.from({ length: 100 }, () => labeled('pm:queue', RELAY_COMMENT_AUTHOR, 'Bot')); + const paged = await driveOffline(REGRADE, { ...CARD, events: [RELAY, ...long, HAND] }); + t('⭐ the newest event is found on a later page: 101 events before it, two reads, refused', [paged.exit, paged.fake.calls.filter((c) => c.op === 'events-list').length], [EXIT_USAGE, 2]); + const dead = await driveOffline(REGRADE, { ...CARD, hooks: { 'events-list': [{ status: 502 }] } }); + t('an events read answered 502 is exit 2 with zero writes — never a guess', [dead.exit, writes(dead)], [EXIT_USAGE, 0]); + const relayRoute = { requested: 'dispatch', transport: 'dispatch', reason: 'self-test: relay', error: null, session: 'session_01ABCDEFGHJKMNPQRSTVWXYZ' }; + const RELAY_REGRADE = ['--repo', 'objectstack-ai/objectstack', ...REGRADE.slice(2)]; + const viaRelay = await driveOffline(RELAY_REGRADE, { ...CARD, events: [HAND] }, { route: relayRoute, relay: 'success' }); + t('…on the relay transport too: refused by THIS rule before the dispatch, nothing sent', [viaRelay.exit, viaRelay.sent.length, String(viaRelay.res.refusal).includes(HAND_SET_RULE)], [EXIT_USAGE, 0, true]); + const relayed = await driveOffline(RELAY_REGRADE, CARD, { route: relayRoute, relay: 'success' }); + t('…control: the same relay regrade of a fleet-set grade is ONE dispatch, exit 0', [relayed.exit, relayed.sent.length], [EXIT_OK, 1], relayed.text); + t('structural: the plain write and the fold both pass the one predicate — it sits before the fold in runLabelWrite', String(runLabelWrite).indexOf('refuseHandSetGrade(') > 0 && String(runLabelWrite).indexOf('refuseHandSetGrade(') < String(runLabelWrite).indexOf('foldStroke(')); + t('the quoted rule is a substring of the file it names', readFileSync(new URL(HAND_SET_RULE_PATH, REPO_ROOT), 'utf8').includes(HAND_SET_RULE)); + } + battery(LAND_DOGFOOD_BATTERY); { const SESSION = 'session_01ABCDEFGHJKMNPQRSTVWXYZ';