Skip to content

Commit 1d7e6fb

Browse files
committed
feat(pm): count outside demand in the daily summary and put human-opened cards first within a priority
The director's daily summary gains an outside-demand line with three numbers read at summary time: cards opened in the window by human accounts, their share of the window's closed cards, and the open human-opened cards with no pm:* state, each with its age. The candidate order breaks a same-level tie by author before Bug and age; it never raises a card's priority and never jumps p0. Every App author counts as the fleet. h67ReadOrder, the only scripts/pm reader that sorts candidates by priority, takes the same leg between rank and age; the H67 self-test pins it on two cards of one priority. Both ratcheted texts stay at their ceilings: director.md folds its one-bullet boundary section into the charter, execution-duties.md merges the two action-surface lines. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAjYZRbZ8TG8TRzG5zd
1 parent 390bd2a commit 1d7e6fb

3 files changed

Lines changed: 42 additions & 18 deletions

File tree

‎.claude/skills/pm-dispatch/references/execution-duties.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
- 每张候选读全文 + 全部评论,写派发词前做决策复读:评论读到最后一页。
1212
- 维护者裁决逐字引入派发词裁决分区作约束,无则写明无裁决。
1313
- 派发前做前提过时检查,裁决同罪,三面都查:动作面、卡引用面、工作项面。
14-
- 动作面:`git log --oneline -20 -- <paths>`。
15-
- 裁决实施卡的动作面再核被点名的动作在 `origin/main` 上还没被做掉。
14+
- 动作面:`git log --oneline -20 -- <paths>`;裁决实施卡再核点名动作在 `origin/main` 上尚未做掉。
1615
- 卡引用面:裁决/卡片点名的每张 issue 逐个读当前 open/closed/assignee。
1716
- 引用读到的现状,⛔ 不引用裁决写作时的描述。
1817
- 工作项面:卡片与分诊评论列的每条工作项逐条对树核验是否仍未完成,⛔ 不对卡核验。
@@ -52,7 +51,8 @@
5251
- 取卡全序:维护者直派插队卡(出处三件)> 契约面卡(判据见 `references/lanes/spec.md`)> 标签序。
5352
- 标签序:`priority:p0` > `pm:blocking` > 功能点位次 > `target:` 板上项 > p1 > p2 > p3 > 无级。
5453
- `pm:blocking` 级内先按解锁扇出(从 `Blocked-by:` 反向索引现算,⛔ 扇出数不落标签)。
55-
- 全序每级现读/现算,零逐卡维护;同级先 `Bug` 再卡龄;无级/缺 `Path:` 轮报记分诊缺口。
54+
- 全序每级现读/现算,零逐卡维护;无级/缺 `Path:` 轮报记分诊缺口。
55+
- 同级先非车队作者(`user.type` 非 `Bot`)卡,再 `Bug`,再卡龄;⛔ 不升级、不越 `priority:p0`。
5656
- 一车道多席按全序交替取卡:席 1 奇位、席 2 偶位;只为破交替才发 `split`;认领戳仲裁。
5757
- 空闲杂务:无卡可认领或等分诊的车道席对本车道卡做下四件;⛔ 不定级,自分诊例外照旧。
5858
- ① 交付卫生:交付卡补收尾记录;离手摘 `pm:*` 同笔设下一态;`Blocked-by:` 全关即重验回队。

‎.claude/skills/pm-dispatch/references/lanes/director.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- 开场读一次服役档记入会话审计行,读法见 `../platform-readings.md`;⛔ 不因档位拒裁停三职。
1919
- 双射 carve-out:一张 `pm:seat` 座位贴,四段照旧;状态块逐场一行,各记己锚,⛔ 无占席人。
2020
- 不占 `domain:*` 车道,范围按职责标签跨车道跨仓;永不认领 backlog、永不写码。
21+
- 改 skill、指令或治理文本归 skills 席;出裁决、清复审标、清点待人工清单归本席。
2122
- 项目内卡线程报 `needs_decision` ⇒ 席位写四维分析加推荐,并入决裁批次呈维护者人工裁。
2223
- 维护者令「必须人工决裁」撤销「有把握自己决定」;⛔ 无裁决线程、代裁、置信门。
2324
- 本席任何形态都纯召唤制,⛔ 无任何 routine;分诊席默认同项目召唤,职责见 `triage.md`。
@@ -70,7 +71,10 @@
7071

7172
## 职责四:每日摘要、发版板与总表
7273

73-
- 每日摘要:在飞/待裁/待落地/撞墙、等复审逾 24h 的 PR、发版板、无卡 fork PR。
74+
- 每日摘要:在飞/待裁/待落地/撞墙、复审逾 24h 的 PR、发版板、无卡 fork PR、外部需求行。
75+
- 外部需求行一行三数,摘要时现查并贴查询;非车队 = 作者 `user.type` 非 `Bot` 的人工账号。
76+
- ① 窗内非车队开卡数;② 窗内关卡中非车队所开占比;③ open 无 `pm:*` 非车队卡逐张带龄。
77+
- 查法:①② 取 `since` 窗起的全态列表,③ 取 open 全量;皆排 PR,本地按 `user.type` 与标签求。
7478
- 座位贴与在飞活性复查归本摘要,见 `../dispatch-runbook.md` 巡查常设项与 `../triage-duties.md`。
7579
- 发版板 `target:<major>` 主仓归本席;判据二元,⛔ 不做优先级渐变:不修它,RC 能不能发。
7680
- 判阻塞四类:① 用户今天就撞的已发布面缺陷;② 公开契约 declared≠enforced。
@@ -80,7 +84,3 @@
8084
- 见新 tag 族发布 ⇒ 在 cloud 与每个应用仓立平台版本 bump 单;单张封顶,已有则追评刷新。
8185
- bump 单等待卡清单 = hold 索引(`Restart-when:`/`Blocked-by:` 点名该发布的 open 卡),查询落正文。
8286
- 车队总表随本摘要重生成,坐席/接管/收班同笔;一席一行,⛔ 不手改;见 `../project-forms.md`。
83-
84-
## 与 skills 席的分界
85-
86-
- 改 skill、指令或治理文本归 skills 席;出裁决、清复审标、清点待人工清单归本席。

‎scripts/pm/check-half-states.mjs‎

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17391,14 +17391,18 @@ export function h66ReleasedNonDispatchableRemainder(issue, commentRows) {
1739117391
// force is OLDEST FIRST. The cards a seat will reach for next are exactly the
1739217392
// cards this row must have read. So the plan sorts by the two legs of that
1739317393
// order this file can see for free off the label page — the priority rank, then
17394-
// card AGE — and the cap eats the tail a seat reaches LAST.
17394+
// the AUTHOR (a human-opened card before a fleet-opened one), then card AGE —
17395+
// and the cap eats the tail a seat reaches LAST.
1739517396
//
1739617397
// ⛔ It models the full 取卡全序 only in part, and says so rather than implying
1739717398
// otherwise: `target:` board membership is a board read this file does not
17398-
// make, and the same-priority 「先 `Bug`」 tiebreak is not taken. An unreadable
17399-
// `created_at` sorts LAST rather than first (#4690's direction on every
17400-
// timestamp here), with `number` as a total-order tiebreak so two runs over one
17401-
// board agree.
17399+
// make, and the same-priority 「先 `Bug`」 tiebreak is not taken. The author leg
17400+
// IS taken: within one rank a card opened by a human account sorts before one
17401+
// an App (`user.type` `Bot`, every `[bot]` login) opened, and ⛔ it never lifts a
17402+
// card out of its rank. An unreadable author reads as the fleet's, ⛔ never
17403+
// promoted. An unreadable `created_at` sorts LAST rather than first (#4690's
17404+
// direction on every timestamp here), with `number` as a total-order tiebreak
17405+
// so two runs over one board agree.
1740217406
// ---------------------------------------------------------------------------
1740317407

1740417408
/**
@@ -17506,7 +17510,8 @@ export function h67SpeaksAbout(issue) {
1750617510

1750717511
/**
1750817512
* Which candidates this run buys a page for, and which it defers — OLDEST
17509-
* FIRST, by the two legs of 取卡全序 this file can read for free.
17513+
* FIRST, by the legs of 取卡全序 this file can read for free: rank, then a
17514+
* human author before an App author, then age.
1751017515
*
1751117516
* ⛔ The opposite of `h66BuyOrder`, deliberately, and the header carries the
1751217517
* argument: H66 chases a fresh write, this one chases the card a dispatching
@@ -17518,7 +17523,7 @@ export function h67SpeaksAbout(issue) {
1751817523
* what gets READ AT ALL is where a silent hole would live, and a plan the
1751917524
* self-test can drive offline is the only kind that can be pinned.
1752017525
*
17521-
* @param {{ number?: number, created_at?: string, labels?: object[] }[]} issues
17526+
* @param {{ number?: number, created_at?: string, labels?: object[], user?: object }[]} issues
1752217527
* @param {number} [cap]
1752317528
* @returns {{ read: object[], deferred: object[] }}
1752417529
*/
@@ -17529,13 +17534,21 @@ export function h67ReadOrder(issues, cap = H67_TIMELINE_READ_CAP) {
1752917534
const at = H67_SELECTION_ORDER_LABELS.findIndex((l) => labels.includes(l));
1753017535
return at === -1 ? H67_SELECTION_ORDER_LABELS.length : at;
1753117536
};
17537+
// A human account before the fleet, inside one rank only; unread reads as fleet.
17538+
const fleet = (issue) => {
17539+
const author = artefactAuthor(issue);
17540+
return author && !author.isApp ? 0 : 1;
17541+
};
1753217542
const age = (issue) => {
1753317543
const parsed = Date.parse(issue?.created_at ?? '');
1753417544
return Number.isFinite(parsed) ? parsed : Infinity;
1753517545
};
1753617546
const ordered = [...rows].sort(
1753717547
(a, b) =>
17538-
rank(a) - rank(b) || age(a) - age(b) || Number(a?.number ?? 0) - Number(b?.number ?? 0),
17548+
rank(a) - rank(b) ||
17549+
fleet(a) - fleet(b) ||
17550+
age(a) - age(b) ||
17551+
Number(a?.number ?? 0) - Number(b?.number ?? 0),
1753917552
);
1754017553
const limit = Number.isFinite(cap) && cap > 0 ? Math.floor(cap) : 0;
1754117554
return { read: ordered.slice(0, limit), deferred: ordered.slice(limit) };
@@ -25069,8 +25082,9 @@ export const SELF_TEST_BATTERIES = Object.freeze({
2506925082
// `Part of` card must never read as a candidate for closing, and an OPEN PR
2507025083
// must stand the row down. A listing whose discriminators quietly stopped
2507125084
// being asserted would still print rows, and every one of them would read as
25072-
// 「close this」, which is the one thing the card forbids.
25073-
'H67 queued merged-delivery reading': 142,
25085+
// 「close this」, which is the one thing the card forbids. Pinned AT the count
25086+
// since the read order took the author leg, so the same-priority pair cannot go.
25087+
'H67 queued merged-delivery reading': 156,
2507425088
// Registered with the decorated ownership-marker reading (#18680); the pin
2507525089
// sits just under the count on its neighbours' grounds. What this battery
2507625090
// floors is a WIDENING of the two markers' READING, so the FIRING CONTROLS
@@ -35897,6 +35911,16 @@ Doubles as the fire's **write self-check** (step 0). \`201\` is not the reading.
3589735911
b(BATTERY67, 'H67 order: `priority:p0` is reached FIRST, whatever its age', order67(CAND67, 4), '3,2,1,4');
3589835912
b(BATTERY67, 'H67 order: …then OLDEST-FIRST among equals, which is the order in force', order67(CAND67.filter((i) => i.number !== 3), 3), '2,1,4');
3589935913
b(BATTERY67, 'H67 order: ⛔ an unreadable `created_at` sorts LAST, ⛔ never promoted', order67([CAND67[3], CAND67[1]], 2), '2,4');
35914+
const human67 = { login: 'outside-user', type: 'User' };
35915+
const fleet67 = { login: 'objectstack-fleet[bot]', type: 'Bot' };
35916+
const PAIR67 = [
35917+
{ number: 21, created_at: '2026-08-01T00:00:00Z', labels: [{ name: 'priority:p2' }], user: fleet67 },
35918+
{ number: 22, created_at: '2026-09-20T00:00:00Z', labels: [{ name: 'priority:p2' }], user: human67 },
35919+
];
35920+
b(BATTERY67, '⭐ H67 order: within ONE priority a human-opened card is reached before an OLDER fleet-opened one', order67(PAIR67, 2), '22,21');
35921+
b(BATTERY67, 'H67 order: …and the author leg is the ONLY reason — two fleet cards of that priority stay oldest-first', order67([PAIR67[0], { ...PAIR67[1], user: fleet67 }], 2), '21,22');
35922+
b(BATTERY67, '⛔ H67 order: the author leg never lifts a card OUT of its priority, and never past p0', order67([{ ...PAIR67[1], labels: [{ name: 'priority:p3' }] }, PAIR67[0], { ...PAIR67[0], number: 23, labels: [{ name: 'priority:p0' }] }], 3), '23,21,22');
35923+
b(BATTERY67, 'H67 order: every App author is the fleet\'s (`github-actions[bot]` too), and an unreadable author ⛔ is never promoted', order67([{ ...PAIR67[1], user: { login: 'github-actions[bot]', type: 'Bot' } }, { ...PAIR67[1], number: 24, user: undefined }, PAIR67[0]], 3), '21,22,24');
3590035924
b(BATTERY67, 'H67 order: `pm:blocking` ranks above p1, as the selection order does', order67([{ number: 8, created_at: '2026-09-10T00:00:00Z', labels: [{ name: 'priority:p1' }] }, { number: 9, created_at: '2026-09-11T00:00:00Z', labels: [{ name: 'pm:blocking' }] }], 2), '9,8');
3590135925
b(BATTERY67, 'H67 order: ⭐ it is the OPPOSITE of H66\'s, and that is the point', order67(CAND67.filter((i) => i.number !== 3 && i.number !== 4), 2) === h66BuyOrder(CAND67.filter((i) => i.number !== 3 && i.number !== 4).map((i) => ({ ...i, updated_at: i.created_at })), 2).buy.map((i) => i.number).join(','), false);
3590235926
b(BATTERY67, 'H67 cap: the rest are DEFERRED, ⛔ not dropped silently', h67ReadOrder(CAND67, 2).deferred.map((i) => i.number).join(','), '1,4');

0 commit comments

Comments
 (0)