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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/pm-dispatch/references/triage-duties.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- UTC 3 倍数时的轮次记录报 24h 流量:卡新建/关闭/净增,合并 PR 数,open p1,引 L2 审核新卡数。
- 析取 ①全裸(无 `pm:*`/`needs-user-decision`/`area:*`);② `pm:queue` 无 `area:*`(仅多车道仓);
- ③ `area:*` 无 pm-state;④ `pm:queue`+`area:*` 无 `priority:*`;②③④ 只取 `updated_at` 早于 ~2min。
- 排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 记录。
- 排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 与 `eval-run` 记录。
- 析取 ⑤:窗内新建且 `pm:queue`/`priority:*` 与建卡同分钟,谁打都首触;人定的级只补不改。
- 首触定级与五析取 sweep 每 fire 跑到清空,先于旧卡重验:⛔ 无每轮预算、无逐卡豁免评论。
- 五析取由 `node scripts/pm/first-touch-sweep.mjs --since=ISO` 照原文全量跑,⛔ 不手敲窄化或截断。
Expand Down
2 changes: 0 additions & 2 deletions .claude/skills/scenario-eval/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ nohup pnpm --filter @objectstack/scenarios run-scenarios \
数据集问题不进这个数。真泄露还是评分误判,照 §6 先分清。
- **收口**:§6 的每条发现都有了去向(卡号或已报的私密渠道)即由本席关 `completed`;
⛔ 不为等修复开着,修复的回测进下一轮。上一轮的记录不 supersede:每张都是它那个 sha 上的一次测量。
- **分诊扫描还不认 `eval-run`**(排除名单只列 `qa-run`):在它补进之前,记录在立单的同一轮关闭;
当轮关不了,就告诉分诊席这是一张记录、不是待分诊的卡。
- 记录立好后给维护者一句话:链接 + 两行 Reading。

## 6. 发现 —— 各归各主
Expand Down
2 changes: 1 addition & 1 deletion docs/NORTH-STAR.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Area boundaries, one `area:*` per card:

**Priority**:
1. Security and data integrity always come first and do not wait for the road.
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; a wrong sentence in a shipped skill or document is a Bug too, and so is a shipped feature slow enough to hurt its use; Feature = a new capability or an extension; Task = teaching new content, tooling, CI, evals, a pure refactor or technical debt, and operations and verification work (a staging read, a one-off data fix, a maintainer-action card). An experience problem whose fix needs no new interface or capability is a Bug, graded by the UX rule below; one that needs it is split off as a separate Feature. A record card or an anchor card takes no type and no grade, and an epic or a tracking card (`pm:epic`, `tracking`) takes no type either: types go only on cards with work to do. A bug found during development is typed card by card, not by its epic: a problem in the feature being built, whose code has not merged, gets no card and is fixed in that feature's card and PR; once that feature has merged but is not yet released it is a Bug under that epic, graded by the table (usually p2 or p3, since no user has met it yet; raised when it blocks a release); a problem found in another, shipped feature is an ordinary Bug, its area that of the broken feature, graded by the table, and it hangs under this epic with a `Blocked-by:` line only when it blocks the epic. 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 a 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, or higher by the blocker rule below. Severity has four levels:
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; a wrong sentence in a shipped skill or document is a Bug too, and so is a shipped feature slow enough to hurt its use; Feature = a new capability or an extension; Task = teaching new content, tooling, CI, evals, a pure refactor or technical debt, and operations and verification work (a staging read, a one-off data fix, a maintainer-action card). An experience problem whose fix needs no new interface or capability is a Bug, graded by the UX rule below; one that needs it is split off as a separate Feature. A record card or an anchor card takes no type and no grade, and an epic or a tracking card (`pm:epic`, `tracking`) takes no type either: types go only on cards with work to do. A record card (`qa-run`, `eval-run`) takes no area either. A bug found during development is typed card by card, not by its epic: a problem in the feature being built, whose code has not merged, gets no card and is fixed in that feature's card and PR; once that feature has merged but is not yet released it is a Bug under that epic, graded by the table (usually p2 or p3, since no user has met it yet; raised when it blocks a release); a problem found in another, shipped feature is an ordinary Bug, its area that of the broken feature, graded by the table, and it hangs under this epic with a `Blocked-by:` line only when it blocks the epic. 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 a 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, or higher by the blocker rule below. 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.
Expand Down
37 changes: 25 additions & 12 deletions scripts/pm/check-half-states.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3823,12 +3823,23 @@ export const PM_STATE_LABELS = [
*/
export const TRACKING_ANCHOR_LABEL = 'tracking';

/**
* The run-record kinds: one card per completed run, kept as evidence and never
* work — `qa-run` (`checklist-test` §4) and `eval-run` (`scenario-eval` §5).
* By rule a run record takes no area, no type and no grade
* (`docs/NORTH-STAR.md`, Grading step one), so the patrol rows that ask for one
* of those exempt it: H13, H74 and H78 here, and the first-touch sweep's
* exclusion list (`first-touch-sweep.mjs`). One spelling, four readers: a new
* record kind is one edit here.
*/
export const RUN_RECORD_LABELS = Object.freeze(['qa-run', 'eval-run']);

/**
* Labels whose NORMAL shape is area-without-pm-state, excluded by the
* sweep's own protocol text (SKILL.md, Backlog sweep): flagging them would
* report the protocol's design as a defect.
*/
export const H13_EXEMPT_LABELS = [TRACKING_ANCHOR_LABEL, 'status:parked', 'qa-run'];
export const H13_EXEMPT_LABELS = [TRACKING_ANCHOR_LABEL, 'status:parked', ...RUN_RECORD_LABELS];

/**
* H13 threshold — "one sweep cycle": the triage Routine fires HOURLY and its
Expand Down Expand Up @@ -4095,11 +4106,11 @@ export const BLOCKING_DEPENDENT_LIST_CAP = 5;
export const GRADE_LADDER = Object.freeze(['priority:p0', 'priority:p1', 'priority:p2', 'priority:p3']);

/**
* Cards that by rule take NO grade — a generated anchor and a seat-registry
* post. An ungraded card of either kind that something waits on is not a
* grading gap, so H78 stays silent on it.
* Cards that by rule take NO grade — a generated anchor, a seat-registry
* post and a run record. An ungraded card of any of these kinds that something
* waits on is not a grading gap, so H78 stays silent on it.
*/
export const GRADELESS_CARD_LABELS = Object.freeze([TRACKING_ANCHOR_LABEL, 'pm:seat']);
export const GRADELESS_CARD_LABELS = Object.freeze([TRACKING_ANCHOR_LABEL, 'pm:seat', ...RUN_RECORD_LABELS]);

/**
* The rung a card's grade sits on (0 = the top), or null when it carries no
Expand Down Expand Up @@ -8387,7 +8398,7 @@ export const H74_POPULATION_LABELS = Object.freeze(['pm:queue', 'pm:blocked']);
* `pm:queue,tooling`, identity label `platform-checklist-watchdog`). Read by
* its identity label the way `queue-flake-anchor` is, because the identity
* label is the machine's and is never graded off, while the title is one
* template's wording. Tracking anchors, epics, seat posts, QA runs, parked
* template's wording. Tracking anchors, epics, seat posts, run records, parked
* cards and both machine anchors are never first-touched the way a lane card
* is, so their silence is the design. Census 2026-11-03 of every
* `.github/workflows/**` template that files a card: only this one applies
Expand All @@ -8399,7 +8410,7 @@ export const H74_EXEMPT_LABELS = Object.freeze([
TRACKING_ANCHOR_LABEL,
'pm:epic',
'pm:seat',
'qa-run',
...RUN_RECORD_LABELS,
'status:parked',
'queue-flake-anchor',
'platform-checklist-watchdog',
Expand Down Expand Up @@ -8562,7 +8573,7 @@ export function h74QueuedWithoutTriageAudit(issue, commentBodies, parent) {
'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: ⛔ ' +
'never a label, comment or body written from this script. Exempt by design: `tracking`, `pm:epic`, ' +
'`pm:seat`, `qa-run`, `status:parked`, `queue-flake-anchor` and `platform-checklist-watchdog` carriers; a non-fleet card (human ' +
'`pm:seat`, `qa-run`, `eval-run`, `status:parked`, `queue-flake-anchor` and `platform-checklist-watchdog` carriers; a non-fleet card (human ' +
'author, no seat signature); a main-red anchor card; a sub-issue inheriting its parent\'s domain or grade.'
);
}
Expand Down Expand Up @@ -26257,12 +26268,12 @@ export const SELF_TEST_BATTERIES = Object.freeze({
// unreadable inputs, the text, the band and the wiring; H19's full-discharge
// sentence both ways; the grade ladder; the cycle finder over rings, chains
// and a 4000-card ring; and the retirement of H14/H15 read off the registry.
'H77-H81 blocking relation read from the lines': 102,
'H77-H81 blocking relation read from the lines': 103,
// Registered with the first-touch audit row, pin just under the count: the
// firing case with both record shapes as its positive controls, the body
// channel, every exemption beside a non-exempt twin, the population edges,
// the three thread states, the text, the summary pair and the band.
'H74 first-touch audit': 46,
'H74 first-touch audit': 61,
// Registered with the premise-freshness row, pin just under the count: the measured timeline firing, its
// before-open / open / local / unanchored controls, the UNJUDGED leg, the cap, the text and the band.
'H75 premise freshness': 15,
Expand Down Expand Up @@ -27899,6 +27910,7 @@ async function selfTest() {
t('H13: status:parked exemption (its normal shape IS this one)', h13AreaWithoutPmState(labelledCard(['area:workflow', 'status:parked'], hoursAgo(200)), NOW), null);
t('H13: tracking exemption', h13AreaWithoutPmState(labelledCard(['area:fleet', 'tracking'], hoursAgo(200)), NOW), null);
t('H13: qa-run exemption', h13AreaWithoutPmState(labelledCard(['area:package', 'qa-run'], hoursAgo(200)), NOW), null);
t('H13: eval-run exemption — a run record of either kind, read from the one record list', `${h13AreaWithoutPmState(labelledCard(['area:ai', 'eval-run'], hoursAgo(200)), NOW)}/${H13_EXEMPT_LABELS.includes('eval-run')}`, 'null/true');
t('H13: no area label is out of scope however bare', h13AreaWithoutPmState(labelledCard(['bug'], hoursAgo(200)), NOW), null);
// The routing reading moved from `domain:*` to `area:*`: a card carrying
// only the old lane label is unrouted (the sweep's ① owns it), not H13's.
Expand Down Expand Up @@ -29585,6 +29597,7 @@ async function selfTest() {
b(BATTERY_REL, 'H78: only the dependents graded ABOVE are named', `${row78(graded(5, 'p2'), [graded(5, 'p2'), cards78[1], cards78[2]]).includes('graded BELOW 1 of them: #10 (`priority:p1`).')}/${row78(graded(5, 'p2'), [graded(5, 'p2'), cards78[1], cards78[2]]).includes('#11 (')}`, 'true/false');
b(BATTERY_REL, 'H78: an UNGRADED blocker sits below every rung', row78(carded(5, ['pm:queue']), [carded(5, ['pm:queue']), cards78[2]]).includes('no grade label on a card that 1 open card(s) name'), true);
b(BATTERY_REL, '⛔ H78: …except a generated anchor and a seat post, which take no grade', `${h78(carded(5, ['tracking']), [carded(5, ['tracking']), cards78[1]])}/${h78(carded(5, ['pm:seat']), [carded(5, ['pm:seat']), cards78[1]])}`, 'null/null');
b(BATTERY_REL, '⛔ H78: …and a run record of either kind (`qa-run`, `eval-run`), which takes no grade either', ['qa-run', 'eval-run'].map((kind) => h78(carded(5, [kind]), [carded(5, [kind]), cards78[1]])).join('/'), '/');
b(BATTERY_REL, 'H78 control: …while an anchor that DOES carry a lower grade is reported like any card', typeof h78(carded(5, ['tracking', 'priority:p3']), [carded(5, ['tracking', 'priority:p3']), cards78[1]]), 'string');
b(BATTERY_REL, '⛔ H78: an UNGRADED dependent contributes nothing', h78(cards78[0], [cards78[0], carded(10, ['pm:blocked'], 'Blocked-by: #5')]), null);
b(BATTERY_REL, '⛔ H78: a card nothing waits on is silent, whatever its grade', h78(graded(99, 'p3'), [...cards78, graded(99, 'p3')]), null);
Expand Down Expand Up @@ -29726,7 +29739,7 @@ async function selfTest() {
b(BATTERY74, 'H74 thread states: UNREADABLE fires UNJUDGED, never clean', row74(null).startsWith(UNJUDGED_MARKER) && isUnjudgedFinding(row74(null)) && row74(null).includes('not empty'), true);
b(BATTERY74, 'H74 population: `pm:blocked` is spoken about too, and the row names it', row74([], { labels: [{ name: 'pm:blocked' }, { name: 'domain:spec' }] }).startsWith('`pm:blocked` with'), true);
b(BATTERY74, '⛔ H74 population: a `pm:dispatched` card is out of scope (its claim is H2\'s subject)', h74([], { labels: [{ name: 'pm:dispatched' }, { name: 'domain:spec' }] }), null);
for (const exempt of ['tracking', 'pm:epic', 'pm:seat', 'qa-run', 'status:parked', 'queue-flake-anchor', 'platform-checklist-watchdog']) {
for (const exempt of ['tracking', 'pm:epic', 'pm:seat', 'qa-run', 'eval-run', 'status:parked', 'queue-flake-anchor', 'platform-checklist-watchdog']) {
b(BATTERY74, `⛔ H74 exempt: a \`${exempt}\` carrier is silent`, h74([], { labels: [{ name: 'pm:queue' }, { name: exempt }] }), null);
}
b(BATTERY74, 'H74 exempt control: the same card with an unrelated label beside `pm:queue` still fires', typeof h74([], { labels: [{ name: 'pm:queue' }, { name: 'tooling' }] }), 'string');
Expand Down Expand Up @@ -29758,7 +29771,7 @@ async function selfTest() {
b(BATTERY74, 'H74 inherit reader: a null, undefined or sentinel parent inherits nothing, never a crash', [h74InheritsFromParent(card74(), null), h74InheritsFromParent(card74(), undefined), h74InheritsFromParent(card74(), H74_PARENT_UNREADABLE), h74InheritsFromParent(card74(), { labels: undefined })].some(Boolean), false);
b(BATTERY74, '⛔ H74 population: a closed card, a PR row, an unreadable `labels` and a missing row are all silent, none a crash', [h74([], { state: 'closed' }), h74([], { pull_request: {} }), h74([], { labels: undefined }), h74QueuedWithoutTriageAudit(undefined, [])].every((v) => v === null), true);
b(BATTERY74, 'H74 population: a null body is no crash and no record — the card still fires on an empty thread', typeof h74([], { body: null }), 'string');
b(BATTERY74, 'H74 exempt list: the constant carries exactly the filing card\'s six labels plus the watchdog anchor\'s identity label', [...H74_EXEMPT_LABELS].sort().join(), ['platform-checklist-watchdog', 'pm:epic', 'pm:seat', 'qa-run', 'queue-flake-anchor', 'status:parked', 'tracking'].join());
b(BATTERY74, 'H74 exempt list: the constant carries exactly the filing card\'s six labels, the watchdog anchor\'s identity label and the second run-record kind', [...H74_EXEMPT_LABELS].sort().join(), ['eval-run', 'platform-checklist-watchdog', 'pm:epic', 'pm:seat', 'qa-run', 'queue-flake-anchor', 'status:parked', 'tracking'].join());
// The watchdog anchor as fleet-patrols.yml files it: App author, `pm:queue,tooling` routing, identity label. Its
// title does NOT open the main-red regex (no colon before `red on main`), so the identity label is what exempts it.
const WATCHDOG74 = { title: 'check:platform-checklist is red on main', user: APP74, body: 'os-platform-checklist-watchdog\n\nThe gate is red on main.' };
Expand Down
Loading
Loading