Repository navigation
chore(knowledge): warn on temporary project status in records - #10794
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision about the rule this warning enforces.
- No current record says a record must not carry project status, and
architecture:knowledge-contractsstill asks every Compatibility/readiness row to state "authority and implementation state"; the new warning flags that row inStatusDot.spec.md:44andList.spec.md:63. - The rule is proposed as INV32/DEC-20 in #10793, which also rewrites that row; what must be settled is whether this warning ships before that record is current or waits for it.
- An engineering owner records the decision by commenting
/approve-spec <full head SHA>on this pull request; the author may do so as an engineering owner.
Two non-blocking notes on the heuristic are inline: a gap-section line that names an FR/INV id stays silent whenever four other words remain, even when those words are themselves status, and a second "is … in progress" sentence about the system warns.
[Automated review]
There was a problem hiding this comment.
Approval waits on an engineering owner's decision about the rule this warning enforces, and one documentation fix is needed before it can merge.
- No current record says that records must not carry project status, and
architecture:knowledge-contractsstill asks each Compatibility/readiness row to state "authority and implementation state", which the warning flags inStatusDot.spec.md:44andList.spec.md:63; an engineering owner needs to settle whether the warning ships before the rule proposed in #10793 is current, and records that by commenting/approve-spec <full head SHA>(the author may do so as an engineering owner). - Miss:
docs/contributing/spec-writing.mdlines 180–186 saypnpm check:knowledge"does not check any rubric item, by design" (and #10793 extends that sentence to project status), so update that section to describe this advisory warning, and keep #10793 consistent with it, or drop the warning.
The gap-line case raised earlier now warns as described. One non-blocking note stands: a second "is … in progress" sentence about the system still warns (inline on lines 34–37).
[Automated review]
|
/approve-spec ffaad92 |
There was a problem hiding this comment.
Changes are needed before this can merge. The engineering owner's /approve-spec on this head settles that the advisory warning may ship now that INV32 and DEC-20 are current, so no owner decision is pending.
- Regression:
architecture:knowledge-contractsstill says "INV32 has no repository check (DEC-20)" in its INV32/DEC-20 verification row (line 1448) and in line 1503, so amend both lines in this pull request to describe the advisory warning (an engineering owner then approves that head with/approve-spec), or drop the warning. - Regression:
scripts/lib/knowledge-status-phrases.mjs:237-248letsStatus: not built yetand a gap line ending "not built yet" pass silently, and the tests atknowledge-status-phrases.test.mjs:47and:111-121lock that in, while INV32 allows only a status line that says the record is still in progress and a gap line that states no build status, so report status phrases on those lines too and flip the two tests. - Regression: on
mainthe check warns on INV32's own text indocs/architecture/knowledge-contracts.md(line 505, a quote that wraps across lines, and line 1408, DEC-20's sentence about the allowed status line), so carry quotes and code spans across wrapped lines and count only aStatus:line or a standalone in-progress line as the status line. - Miss:
docs/contributing/spec-writing.mdlines 220–226 saypnpm check:knowledgedoes not check project status (R7) by design, so update that section to describe the advisory warning.
Non-blocking: STATUS_PHRASES covers 6 of the 12 example phrases INV32 lists, and the description's counts predate INV32 (on main the check now prints 8 warnings, 3 of them false).
[Automated review]
|
/approve-spec 3de3d0e |
There was a problem hiding this comment.
Changes are needed before this can merge. The engineering owner's /approve-spec on this head settles that the advisory warning may ship under INV32 and DEC-20, so no owner decision is pending; four points remain:
- Regression:
architecture:knowledge-contractsstill says "INV32 has no repository check (DEC-20)" in its INV32/DEC-20 verification row (line 1448) and at line 1503, so amend both lines in this pull request to describe the advisory warning, as the record already does for INV31's--basewarning (an engineering owner then approves that head with/approve-spec), or drop the warning. - Regression:
scripts/lib/knowledge-status-phrases.mjs:237-248letsStatus: not built yetand a gap line ending "not built yet" pass silently, and the tests atknowledge-status-phrases.test.mjs:47and:111-121lock that in, while INV32 allows only a status line that says the record is still in progress and a gap line that states no build status, so report status phrases on those lines too and flip the two tests. - Regression: the check warns on INV32's own text in
docs/architecture/knowledge-contracts.md(line 505, a quote that wraps across lines, and line 1408, DEC-20's sentence about the allowed status line), so carry quotes and code spans across wrapped lines and count only aStatus:line or a standalone in-progress line as the status line. - Miss:
docs/contributing/spec-writing.mdlines 220–226 saypnpm check:knowledgedoes not check project status (R7) by design, so update that section to describe the advisory warning.
Non-blocking: STATUS_PHRASES covers 6 of the 12 example phrases INV32 lists, and the description's counts predate INV32 on main (the check now prints 8 warnings, 3 of them on compliant text).
[Automated review]
…s-warn # Conflicts: # scripts/check-knowledge.mjs
…rap; INV32's examples (red)
…wrap; the record describes the warning
|
/approve-spec a75428f |
There was a problem hiding this comment.
Approved pending CI: the CI workflow has not finished on this head yet, so wait for it to pass before merging.
The four points from the previous review are fixed: the knowledge-contracts verification row, its enforcement note and the spec-writing guide describe the advisory warning, status and gap lines are matched like any other line, and INV32's own wording no longer warns.
Two non-blocking suggestions:
- The amended record lines (
docs/architecture/knowledge-contracts.md:1450and:1505-1507) anddocs/contributing/spec-writing.md:227-229say the check warns on "each build-status or sequencing phrase in a spec or architecture record", but it reads only the phrases inSTATUS_PHRASES, underdocs/specs/anddocs/architecture/(for exampleAlertDialog.spec.md:56, "requirements not shipped yet", stays silent), so consider "each phrase in its list in records underdocs/specs/anddocs/architecture/". - The description says every further status line warns, but a second
Status:line warns only when it says "in progress" or holds a listed phrase, so either warn on everyStatus:line after the first or narrow the description.
[Automated review]
| Current enforcement gap: `pnpm check:knowledge` warns on each build-status | ||
| or sequencing phrase in a spec or architecture record (INV32) and does not | ||
| fail (DEC-20). Review against rubric item R7 decides each line. |
There was a problem hiding this comment.
Non-blocking: "warns on each build-status or sequencing phrase in a spec or architecture record" claims more than the check does. It warns on the phrases in STATUS_PHRASES, and only under docs/specs/ and docs/architecture/: docs/specs/components/AlertDialog/AlertDialog.spec.md:56 ("requirements not shipped yet") stays silent, and packages/native/specs/swift/library/tooltip.spec.md (an architecture record) is never read. Suggested: "warns on each phrase in its list in records under docs/specs/ and docs/architecture/". The same wording is in the verification row (line 1450) and docs/contributing/spec-writing.md:227-229.
| for (const [i, text] of [...prose].sort(([a], [b]) => a - b)) { | ||
| const found = matches(text, STATUS_PATTERNS); | ||
| if (STATUS_LINE.test(text) || isStandaloneInProgress(text)) { | ||
| if (statusLineSeen && IN_PROGRESS.test(text)) found.push('in progress'); |
There was a problem hiding this comment.
Non-blocking: a second status line warns only when it says "in progress". Status: in progress followed by Status: blocked on the design review. stays silent, though the description says every further status line warns and INV32 allows at most one status line. Pushing a hit for every Status: line after the first would match the description; otherwise narrow the description.
Maintainer impact
Records that state temporary project status ("no module exists yet", "Table is the first consumer, then Selector") are true the day they are written and false soon after. A reader deciding conformance then reads stale build status as a rule. This adds an advisory warning for it.
Intended invariant
architecture:knowledge-contractsINV32 and DEC-20: a spec or architecture record states behavior and decisions, not project status. At most one status line, which says only that the record is still in progress, is allowed; a requirement gap in the<FR or INV id> gap: <observable mismatch>form states no build status. DEC-20 rejects a failing check, so this is a warning only:pnpm check:knowledgestill fails only on the problems it failed on before.Change
scripts/lib/knowledge-status-phrases.mjsfinds build-status and sequencing phrases in a record body (case-insensitive, whole words). The lists sit at the top of the file:STATUS_PHRASEScovers all 12 examples INV32 lists (has not started,no code yet,no module exists,not built,not yet implemented,follow-up work,first consumer,first adopter,adoption order,adopts it first,lands before,phase 1) and close variants.Status:line, or a line that is only an in-progress statement ("Windowing is in progress."), counts. A status phrase on that line still warns (Status: not built yetwarns). A later status line warns when it says "in progress" or holds a listed phrase; a secondStatus:line with neither stays silent. An "in progress" inside a longer sentence, such as DEC-20's own sentence about the status line or "a drag in progress", is not a status line and is not read as status.FR7 gap: Table windows only inside its own viewport; not built yetwarns andFR7 gap: Table windows only inside its own viewportstays silent.BEHAVIOR_CONTEXTSnames behavior that shares words with a status phrase ("not built ahead of time", "target not built", "lands before the next frame", "fix lands before"); that text is not read.CHECKED_ROOTS(docs/specs/,docs/architecture/) andEXCLUDED_PATHS(docs/specs/*/plan.md: a plan orders work by design)."…",“…”) are not read, including a span or quote that wraps across lines within a paragraph (never past a blank line); fenced blocks, block quotes, headings, and frontmatter are not read.scripts/check-knowledge.mjsprints the hits after validation (a GitHub::warningannotation in Actions, a list locally), for the checkout--rootnames. Exit status is unchanged.architecture:knowledge-contracts: the INV32/DEC-20 verification row and the enforcement note describe the advisory warning (the way the record describes INV31's--basewarning);applies_toadds the module andverified_byadds its test.docs/contributing/spec-writing.md: "What is checked mechanically" sayspnpm check:knowledgeprints an advisory warning for project status (R7) and fails on no rubric item.Evidence
scripts/check-knowledge.test.mjspasses (171 tests across both files).check:knowledgealready reads.Hits on current main
pnpm check:knowledgeon this branch, merged withmain(4569027): 32 warnings in 18 records, exit 0. All 32 were read: each is build status or work order (for example "Implementation gap: not built", "is follow-up work", "List is its first adopter", "Phase 1 places the CLI's own docs", "staged for the next minor and not built"). None is on compliant text: INV32's own wording (a wrapped quote) and DEC-20's sentence about the status line no longer warn, and the behavior sentences that share words with a phrase (theme compilation "not built ahead of time", the icon-set reader's "package target not built yet", "lands before the next frame paints", the release rule "if the fix lands before final-patch lock") stay silent.docs/architecture/: interaction-modality, knowledge-contracts, react-component-runtime, template-authoringdocs/specs/AST-002, AST-018, AST-046 (4), AST-047 (2), AST-053, AST-057 (3), AST-103 (5)docs/specs/components/: Lightbox, List (2), ListItem, Resizable, SelectableCard (2), StatusDot (2), Tooltip (2)Scope
Components:
scripts/check-knowledge.mjs,scripts/lib/knowledge-status-phrases.mjs,architecture:knowledge-contracts,docs/contributing/spec-writing.mdWriting rubric results
architecture:knowledge-contracts(INV32/DEC-20 verification row, enforcement note,applies_to,verified_by) anddocs/contributing/spec-writing.md("What is checked mechanically"):Testing
npx vitest run scripts/lib/knowledge-status-phrases.test.mjs: the 7 new and flipped tests failed first, thenTests 20 passed (20).npx vitest run scripts/check-knowledge.test.mjs scripts/lib/knowledge-status-phrases.test.mjs:Tests 171 passed (171).pnpm check:knowledge: 32 warnings,Knowledge templates and records are aligned., exit 0.pnpm specs:for --diff origin/main: routesarchitecture:knowledge-contractsamong the records for the changed paths; the change keeps INV32/DEC-20's text unchanged and only describes the warning.eslintandprettier --checkon the changed files: clean.