Skip to content

feat!: remove the greeting and recent-greetings - #377

Merged
BenSheridanEdwards merged 7 commits into
mainfrom
feat/remove-greeting
Nov 17, 2026
Merged

BenSheridanEdwards merged 7 commits into
mainfrom
feat/remove-greeting

Conversation

@BenSheridanEdwards

@BenSheridanEdwards BenSheridanEdwards commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Why does this feature exist?

The to-do app is the reference feature. Retire the greeting and recent-greetings together.

This is one idea because the greeting and recent-greetings code, their specs and their PRDs must go together: check:docs fails when a PRD links a deleted spec or its Covers glob matches no file, and the greeting route records into recent-greetings, so neither feature can be removed alone.

Ben approved the size exception on 14 Nov 2026 at 20:35 GMT.

What changed?

App renders TodosPage for every path, including /greeting; appRouter mounts only todos. Remove both retired slices, reports, specs, PRDs and six baselines. Record the consumer contract through todos.add, update policy fixtures and sync verification skills.

84 files: 66 hand-written files (+126/-1246, 1372 changed lines), 11 generated files (+19/-275, 294 changed lines), seven PNG files (six deleted baselines, one added proof).

Guarded paths from node scripts/enforcement-approval.mjs --git origin/main HEAD:

  • docs/prd/greeting.md: deletes retired product intent.
  • docs/prd/recent-greetings.md: deletes retired product intent.
  • docs/NORTH_STAR.md: names the to-do app as the runnable example.
  • oxlint.config.ts: updates the public-surface diagnostic example.
  • tooling/oxlint-plugin-policy.js: updates custom-hook and status-union diagnostic examples.

Do not merge until the approver ticks the enforcement sign-off at the current head.

Behavioural Proof (with video and screenshots)

  • Video: not required for this static route removal; the real-browser journey checks adding, marking done and deleting.
  • Screenshots: real Chromium after adding through the API.
    To-do page after adding through the API
  • Behaviour tests: router procedure-set, retired HTTP procedure returning 404, and retired /greeting showing the to-do form all failed before removal. All 19 E2E tests pass after removal.
  • E2E mapping: apps/web/e2e/todos.spec.ts; shared accessibility keeps its existing to-do scan.

Verification Summary

  • Head commit: 14246ca
  • North Star commit: f9e2a59
  • PRDs checked: docs/prd/todos.md
  • PRD impact: No behaviour change: only greeting tests leave the shared accessibility spec
  • Commands run: pnpm install --frozen-lockfile; normal merge of origin/main (a0a8ff64515b003e2d0dc00c9f0887d47c366757); pnpm verify, pnpm e2e through the normal pre-push hook under the Studio heavy-suite limiter; targeted benchmark and Oxlint rechecks (514 tests).
  • Results: final full run passed 85 suites / 3,189 tests, contract consumer/provider, seven integration tests, coverage:changed, build and size; pnpm e2e passed all 19 tests. Earlier timing failures passed targeted rechecks; final full run passed. One trial inclusion conflict resolved by retaining todos domain and rules expectations while removing retired greeting domains. ADR 0127 rules, shared web import, tests and architecture pins retained.
  • Pre-commit per-step timings (seconds, all pass): typecheck 5.583; Biome 5.215; Oxlint 12.644; styles 5.330; anti-slop 8.003; suppressions 8.963; architecture 9.401; Fallow 8.941; secrets 4.046. Every step is below 30 seconds (ADR 0062).
  • Definition of Done: local verification and E2E passed at this head after merging current main; normal non-force push completed with hooks enabled. Hosted checks pending; enforcement approval remains for Ben.
  • pnpm verify
  • pnpm e2e
  • Behaviour is covered by the E2E map when user-visible behaviour changed.
  • Logic is unit-tested where logic changed.
  • Accessibility considered and verified for interactive/UI changes.
  • The diff follows .agents/project/ARCHITECTURE.md and CONVENTIONS.md; no new architectural decision.
  • No gates were bypassed or weakened.
  • Known risks: greeting clients now receive 404; every web path renders to-dos. Rollback: revert the removal commits together. Enforcement approval remains for Ben; no merge is authorised.

PRD Behaviours to Review

  • docs/prd/todos.md: Says so when the list fails to load. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Marks a to-do done and active again, in place. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Edits a title in place, normalised. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Deletes a to-do at once. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Clears every done to-do, whatever the filter, and only while one is done. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Keeps the done to-dos and says so when clearing fails. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Shows only the latest failure, until the next change starts. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Says so when the list fails to load after a change. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Reads the list when the page opens and after each successful change. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Shows loading until the list arrives. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Loads an empty list and adds a normalised title. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Rejects blank and too-long titles. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Filters to active or done to-dos and back to all. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Hides a newly done to-do from Active. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Shows an empty message for an unmatched filter. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.
  • docs/prd/todos.md: Passes the automated accessibility scan. Evidence: existing to-do E2E and accessibility specs pass; to-do implementation unchanged.

PR Proof Law

  • I followed .agents/project/PR_QUALITY.md and .agents/skills/pr-quality-contract/SKILL.md.

@github-actions github-actions Bot added confidence: red A required gate is failing or pending, or evidence is unavailable. confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. and removed confidence: red A required gate is failing or pending, or evidence is unavailable. labels Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is behind main and conflicts with it, so it cannot be brought up to date automatically. It needs a manual rebase: merge main into it (or rebase it on main), resolve the conflicts, and push. A merge keeps the sign-off and the body's head commit; a rebase does not.

@github-actions github-actions Bot added confidence: red A required gate is failing or pending, or evidence is unavailable. confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. and removed confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. confidence: red A required gate is failing or pending, or evidence is unavailable. labels Nov 14, 2026
@github-actions github-actions Bot added confidence: red A required gate is failing or pending, or evidence is unavailable. confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. and removed confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. confidence: red A required gate is failing or pending, or evidence is unavailable. labels Nov 14, 2026
@github-actions github-actions Bot added confidence: red A required gate is failing or pending, or evidence is unavailable. confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. and removed confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. confidence: red A required gate is failing or pending, or evidence is unavailable. labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Enforcement sign-off

Ran at Tuesday, the 17th of November, at 9:22 am on commit 14246ca.

This PR changes gated enforcement or product intent, so it needs sign-off.

File What changed How it affects
docs/NORTH_STAR.md Rewrites the 2 sections What it is, Non-goals; Adds product requirements foundation. The TypeScript, React and tRPC to-do app is the runnable example that gives every gate real, - The to-do app is an example for the gates, not a product feature set.; Removes product requirements foundation. The TypeScript, React and tRPC greeting app is the runnable example that gives every gate real, - The greeting is an example for the gates, not a product feature set. Product intent now includes foundation. The TypeScript, React and tRPC to-do app is the runnable example that gives every gate real, - The to-do app is an example for the gates, not a product feature set. instead of foundation. The TypeScript, React and tRPC greeting app is the runnable example that gives every gate real, - The greeting is an example for the gates, not a product feature set.; implementation and behaviour tests must follow the revised intent
docs/prd/greeting.md Adds the section (introduction); Removes the 3 sections Greeting, Intent, Behaviours; Removes product requirements - **Result:** the reference result, 'apps/', - **Decision:** [ADR 0045](../../.agents/decisions/0045-prds-state-intent-and-link-their-specs.md), - **Covers:** 'apps/web/src/routes/greeting/**', 'apps/api/src/features/greeting/**', A visitor types a name and the page greets them by it. The greeting is the and 24 more Product intent now includes the retained requirements instead of - **Result:** the reference result, 'apps/', - **Decision:** [ADR 0045](../../.agents/decisions/0045-prds-state-intent-and-link-their-specs.md), - **Covers:** 'apps/web/src/routes/greeting/**', 'apps/api/src/features/greeting/**', A visitor types a name and the page greets them by it. The greeting is the and 24 more; implementation and behaviour tests must follow the revised intent
docs/prd/recent-greetings.md Adds the section (introduction); Removes the 3 sections Recent greetings, Intent, Behaviours; Removes product requirements - **Result:** the reference result, 'apps/', - **Decision:** [A second api feature proves feature isolation on the real tree](../../.agents/decisions/0107-a-second-api-feature-proves-feature-isolation-on-the-real-tree.md), - **Covers:** 'apps/api/src/features/recent-greetings/**', 'apps/web/src/routes/recent-greetings/**', API clients can record greeted names and read the ten most recent names. and 18 more Product intent now includes the retained requirements instead of - **Result:** the reference result, 'apps/', - **Decision:** [A second api feature proves feature isolation on the real tree](../../.agents/decisions/0107-a-second-api-feature-proves-feature-isolation-on-the-real-tree.md), - **Covers:** 'apps/api/src/features/recent-greetings/**', 'apps/web/src/routes/recent-greetings/**', API clients can record greeted names and read the ten most recent names. and 18 more; implementation and behaviour tests must follow the revised intent
oxlint.config.ts Rewrites the check reactDoctorRules: definition "Object.fromEntries(\\n Object.entries(RECOMMENDED_RULES)\\n .filter(([name]) => !Object.hasOwn(singleOwnerRules, name))\\n .filter(\\n ([name, severity]) =>\\n severity !== 'warn' ||\\n !(\\n unusedFrameworkPrefixes.some((prefix) => name.startsWith('react-doctor/${prefix}')) ||\\n unusedFrameworkRules.some((rule) => name === 'react-doctor/${rule}')\\n ),\\n )\\n .map(([name]) => [name, 'error']),\\n);\\n\\nexport default {\\n categories: {\\n correctness: 'off',\\n suspicious: 'off',\\n pedantic: 'off',\\n perf: 'off',\\n style: 'off',\\n restriction: 'off',\\n nursery: 'off',\\n },\\n plugins: ['react', 'unicorn', 'typescript', 'jsx-a11y', 'oxc', 'jest'],\\n options: { respectEslintDisableDirectives: false },\\n jsPlugins: [\\n {\\n name: 'better-tailwindcss',\\n specifier: import.meta.resolve('eslint-plugin-better-tailwindcss'),\\n },\\n fileURLToPath(new URL('./tooling/oxlint-plugin-policy.js', import.meta.url)),\\n fileURLToPath(new URL('./tooling/oxlint-plugin-naming.js', import.meta.url)),\\n {\\n name: doctor.meta.name,\\n specifier: fileURLToPath(new URL('./tooling/oxlint-plugin-react-doctor.js', import.meta.url)),\\n },\\n ],\\n settings: {\\n 'react-doctor': { portedRuleMode: 'curated' },\\n 'better-tailwindcss': {\\n cwd: fileURLToPath(new URL('./apps/web', import.meta.url)),\\n entryPoint: fileURLToPath(new URL('./packages/ui/src/styles.css', import.meta.url)),\\n },\\n },\\n ignorePatterns: [\\n '**/dist/**',\\n 'coverage/**',\\n 'vendor/**',\\n 'playwright-report/**',\\n 'test-results/**',\\n '.cache/**',\\n ],\\n rules: {\\n ...generalRules,\\n 'no-else-return': ['error', { allowElseIf: false }],\\n 'no-param-reassign': ['error', { props: true }],\\n 'policy/no-loops': 'error',\\n 'policy/no-hand-written-globs': 'error',\\n },\\n overrides: [\\n {\\n files: [\\n 'apps/web/src/**/*.{ts,tsx}',\\n 'packages/ui/src/**/*.{ts,tsx}',\\n 'showcase/*/web/src/**/*.{ts,tsx}',\\n ],\\n excludeFiles: ['**/*.test.{ts,tsx}', '**/*.spec.{ts,tsx}'],\\n rules: {\\n 'better-tailwindcss/enforce-consistent-class-order': 'error',\\n 'better-tailwindcss/no-unknown-classes': 'error',\\n 'better-tailwindcss/no-conflicting-classes': 'error',\\n 'better-tailwindcss/no-duplicate-classes': 'error',\\n 'better-tailwindcss/no-deprecated-classes': 'error',\\n 'better-tailwindcss/enforce-shorthand-classes': 'error',\\n 'better-tailwindcss/no-concatenated-classes': 'error',\\n },\\n },\\n {\\n files: ['{apps,packages}/*/src/**/*.{ts,tsx}', 'showcase/*/*/src/**/*.{ts,tsx}'],\\n rules: {\\n 'policy/no-let': 'error',\\n 'policy/no-mutation': 'error',\\n 'policy/no-classes': 'error',\\n 'policy/no-switch': 'error',\\n 'no-lonely-if': 'error',\\n 'no-nested-ternary': 'error',\\n 'unicorn/no-array-for-each': 'error',\\n 'unicorn/no-array-sort': 'error',\\n 'unicorn/no-array-reverse': 'error',\\n 'unicorn/prefer-array-find': 'error',\\n 'unicorn/prefer-array-some': 'error',\\n 'unicorn/prefer-array-flat': 'error',\\n 'unicorn/prefer-object-from-entries': 'error',\\n ...reactDoctorRules,\\n 'react/rules-of-hooks': 'error',\\n 'react/exhaustive-deps': 'error',\\n 'react/error-boundaries': 'error',\\n 'react/globals': 'error',\\n 'react/immutability': 'error',\\n 'react/incompatible-library': 'error',\\n 'react/preserve-manual-memoization': 'error',\\n 'react/purity': 'error',\\n 'react/refs': 'error',\\n 'react/set-state-in-effect': 'error',\\n 'react/set-state-in-render': 'error',\\n 'react/static-components': 'error',\\n 'react/use-memo': 'error',\\n 'react/void-use-memo': 'error',\\n 'react/unsupported-syntax': 'error',\\n 'react-doctor/prefer-function-component': 'error',\\n 'policy/one-component-per-file': 'error',\\n 'policy/no-large-comments': 'error',\\n 'policy/use-ui-primitives': 'error',\\n 'policy/no-arbitrary-styles': 'error',\\n 'policy/state-and-effects-in-hooks': 'error',\\n 'policy/handler-names': 'error',\\n 'policy/callback-prop-names': 'error',\\n 'policy/pages-in-routes': 'error',\\n 'policy/file-matches-export': 'error',\\n 'policy/folder-names': 'error',\\n 'policy/role-named-folders': 'error',\\n 'policy/test-beside-subject': 'error',\\n 'policy/slice-isolation': 'error',\\n 'policy/procedure-input-schema': 'error',\\n 'policy/form-uses-effect-schema': 'error',\\n 'policy/one-status-from-hooks': 'error',\\n 'policy/test-unwraps-values': 'error',\\n 'policy/test-imports-the-type': 'error',\\n 'policy/message-uses-its-limit': 'error',\\n 'policy/reexport-only-from-index': 'error',\\n 'policy/keep-rejections': 'error',\\n 'max-depth': ['error', 4],\\n 'no-restricted-imports': [\\n 'error',\\n {\\n patterns: [\\n {\\n group: [\\n '**/features/*/*',\\n '**/shared/*/*',\\n '**/routes/*/*',\\n '**/api-client/*',\\n '!**/features/*/index.ts',\\n '!**/routes/*/index.ts',\\n ],\\n message:\\n 'Import the module through its public surface, for example '../../features/name-input' or './features/greeting/index.ts' in the api.',\\n },\\n ],\\n },\\n ],\\n },\\n },\\n {\\n files: ['{apps,packages}/*/src/**/*.{ts,tsx}', 'showcase/*/*/src/**/*.{ts,tsx}'],\\n excludeFiles: ['{apps,showcase/*}/web/src/main.tsx'],\\n rules: { 'no-restricted-globals': ['error', 'document', 'window'] },\\n },\\n {\\n files: ['{apps,showcase/*}/web/e2e/**/*.ts'],\\n rules: { 'policy/test-unwraps-values': 'error' },\\n },\\n {\\n // Naming and file names, ported from Biome's override (ADR 0126).\\n files: ['{apps,packages}/*/src/**', 'showcase/*/*/src/**'],\\n rules: {\\n 'naming/naming-convention': 'error',\\n 'unicorn/filename-case': ['error', { cases: { camelCase: true, pascalCase: true } }],\\n },\\n },\\n ],\\n};" becomes "Object.fromEntries(\\n Object.entries(RECOMMENDED_RULES)\\n .filter(([name]) => !Object.hasOwn(singleOwnerRules, name))\\n .filter(\\n ([name, severity]) =>\\n severity !== 'warn' ||\\n !(\\n unusedFrameworkPrefixes.some((prefix) => name.startsWith('react-doctor/${prefix}')) ||\\n unusedFrameworkRules.some((rule) => name === 'react-doctor/${rule}')\\n ),\\n )\\n .map(([name]) => [name, 'error']),\\n);\\n\\nexport default {\\n categories: {\\n correctness: 'off',\\n suspicious: 'off',\\n pedantic: 'off',\\n perf: 'off',\\n style: 'off',\\n restriction: 'off',\\n nursery: 'off',\\n },\\n plugins: ['react', 'unicorn', 'typescript', 'jsx-a11y', 'oxc', 'jest'],\\n options: { respectEslintDisableDirectives: false },\\n jsPlugins: [\\n {\\n name: 'better-tailwindcss',\\n specifier: import.meta.resolve('eslint-plugin-better-tailwindcss'),\\n },\\n fileURLToPath(new URL('./tooling/oxlint-plugin-policy.js', import.meta.url)),\\n fileURLToPath(new URL('./tooling/oxlint-plugin-naming.js', import.meta.url)),\\n {\\n name: doctor.meta.name,\\n specifier: fileURLToPath(new URL('./tooling/oxlint-plugin-react-doctor.js', import.meta.url)),\\n },\\n ],\\n settings: {\\n 'react-doctor': { portedRuleMode: 'curated' },\\n 'better-tailwindcss': {\\n cwd: fileURLToPath(new URL('./apps/web', import.meta.url)),\\n entryPoint: fileURLToPath(new URL('./packages/ui/src/styles.css', import.meta.url)),\\n },\\n },\\n ignorePatterns: [\\n '**/dist/**',\\n 'coverage/**',\\n 'vendor/**',\\n 'playwright-report/**',\\n 'test-results/**',\\n '.cache/**',\\n ],\\n rules: {\\n ...generalRules,\\n 'no-else-return': ['error', { allowElseIf: false }],\\n 'no-param-reassign': ['error', { props: true }],\\n 'policy/no-loops': 'error',\\n 'policy/no-hand-written-globs': 'error',\\n },\\n overrides: [\\n {\\n files: [\\n 'apps/web/src/**/*.{ts,tsx}',\\n 'packages/ui/src/**/*.{ts,tsx}',\\n 'showcase/*/web/src/**/*.{ts,tsx}',\\n ],\\n excludeFiles: ['**/*.test.{ts,tsx}', '**/*.spec.{ts,tsx}'],\\n rules: {\\n 'better-tailwindcss/enforce-consistent-class-order': 'error',\\n 'better-tailwindcss/no-unknown-classes': 'error',\\n 'better-tailwindcss/no-conflicting-classes': 'error',\\n 'better-tailwindcss/no-duplicate-classes': 'error',\\n 'better-tailwindcss/no-deprecated-classes': 'error',\\n 'better-tailwindcss/enforce-shorthand-classes': 'error',\\n 'better-tailwindcss/no-concatenated-classes': 'error',\\n },\\n },\\n {\\n files: ['{apps,packages}/*/src/**/*.{ts,tsx}', 'showcase/*/*/src/**/*.{ts,tsx}'],\\n rules: {\\n 'policy/no-let': 'error',\\n 'policy/no-mutation': 'error',\\n 'policy/no-classes': 'error',\\n 'policy/no-switch': 'error',\\n 'no-lonely-if': 'error',\\n 'no-nested-ternary': 'error',\\n 'unicorn/no-array-for-each': 'error',\\n 'unicorn/no-array-sort': 'error',\\n 'unicorn/no-array-reverse': 'error',\\n 'unicorn/prefer-array-find': 'error',\\n 'unicorn/prefer-array-some': 'error',\\n 'unicorn/prefer-array-flat': 'error',\\n 'unicorn/prefer-object-from-entries': 'error',\\n ...reactDoctorRules,\\n 'react/rules-of-hooks': 'error',\\n 'react/exhaustive-deps': 'error',\\n 'react/error-boundaries': 'error',\\n 'react/globals': 'error',\\n 'react/immutability': 'error',\\n 'react/incompatible-library': 'error',\\n 'react/preserve-manual-memoization': 'error',\\n 'react/purity': 'error',\\n 'react/refs': 'error',\\n 'react/set-state-in-effect': 'error',\\n 'react/set-state-in-render': 'error',\\n 'react/static-components': 'error',\\n 'react/use-memo': 'error',\\n 'react/void-use-memo': 'error',\\n 'react/unsupported-syntax': 'error',\\n 'react-doctor/prefer-function-component': 'error',\\n 'policy/one-component-per-file': 'error',\\n 'policy/no-large-comments': 'error',\\n 'policy/use-ui-primitives': 'error',\\n 'policy/no-arbitrary-styles': 'error',\\n 'policy/state-and-effects-in-hooks': 'error',\\n 'policy/handler-names': 'error',\\n 'policy/callback-prop-names': 'error',\\n 'policy/pages-in-routes': 'error',\\n 'policy/file-matches-export': 'error',\\n 'policy/folder-names': 'error',\\n 'policy/role-named-folders': 'error',\\n 'policy/test-beside-subject': 'error',\\n 'policy/slice-isolation': 'error',\\n 'policy/procedure-input-schema': 'error',\\n 'policy/form-uses-effect-schema': 'error',\\n 'policy/one-status-from-hooks': 'error',\\n 'policy/test-unwraps-values': 'error',\\n 'policy/test-imports-the-type': 'error',\\n 'policy/message-uses-its-limit': 'error',\\n 'policy/reexport-only-from-index': 'error',\\n 'policy/keep-rejections': 'error',\\n 'max-depth': ['error', 4],\\n 'no-restricted-imports': [\\n 'error',\\n {\\n patterns: [\\n {\\n group: [\\n '**/features/*/*',\\n '**/shared/*/*',\\n '**/routes/*/*',\\n '**/api-client/*',\\n '!**/features/*/index.ts',\\n '!**/routes/*/index.ts',\\n ],\\n message:\\n 'Import the module through its public surface, for example '../../features/name-input' or './features/todos/index.ts' in the api.',\\n },\\n ],\\n },\\n ],\\n },\\n },\\n {\\n files: ['{apps,packages}/*/src/**/*.{ts,tsx}', 'showcase/*/*/src/**/*.{ts,tsx}'],\\n excludeFiles: ['{apps,showcase/*}/web/src/main.tsx'],\\n rules: { 'no-restricted-globals': ['error', 'document', 'window'] },\\n },\\n {\\n files: ['{apps,showcase/*}/web/e2e/**/*.ts'],\\n rules: { 'policy/test-unwraps-values': 'error' },\\n },\\n {\\n // Naming and file names, ported from Biome's override (ADR 0126).\\n files: ['{apps,packages}/*/src/**', 'showcase/*/*/src/**'],\\n rules: {\\n 'naming/naming-convention': 'error',\\n 'unicorn/filename-case': ['error', { cases: { camelCase: true, pascalCase: true } }],\\n },\\n },\\n ],\\n};" The Vendored lint rules executes the replacement checks shown above; approval is required for these changed decision rules
tooling/oxlint-plugin-policy.js Rewrites the check stateAndEffectsInHooks: definition "{\\n meta: {\\n type: 'problem',\\n messages: {\\n outsideHook:\\n 'Move '{{hook}}' into a named custom hook (for example 'useGreeting' in ' +\\n ''useGreeting.ts') and call that hook here. State, effects, server state and form ' +\\n 'state live only in 'use*' hooks.',\\n reexport:\\n 'Call '{{hook}}' inside a named custom hook instead of re-exporting it. A re-export ' +\\n 'hides the hook from this rule.',\\n },\\n schema: [],\\n },\\n create(context) {\\n if (isTestFile(context.filename)) {\\n return {};\\n }\\n\\n const hookNames = new Map();\\n const hookNamespaces = new Map();\\n\\n const restrictedHook = (callee) => {\\n if (callee.type === 'Identifier') {\\n return hookNames.get(callee.name);\\n }\\n\\n if (\\n callee.type === 'MemberExpression' &&\\n callee.object.type === 'Identifier' &&\\n callee.property.type === 'Identifier' &&\\n hookNamespaces.get(callee.object.name)?.has(callee.property.name)\\n ) {\\n return callee.property.name;\\n }\\n\\n return undefined;\\n };\\n\\n return {\\n ExportNamedDeclaration(node) {\\n const hooks = STATE_AND_EFFECT_HOOKS.get(node.source?.value);\\n\\n (hooks ? node.specifiers : []).forEach((specifier) => {\\n const hook = specifier.local.name ?? specifier.local.value;\\n\\n if (hooks.has(hook)) {\\n context.report({ node: specifier, messageId: 'reexport', data: { hook } });\\n }\\n });\\n },\\n ExportAllDeclaration(node) {\\n if (STATE_AND_EFFECT_HOOKS.has(node.source.value)) {\\n context.report({ node, messageId: 'reexport', data: { hook: node.source.value } });\\n }\\n },\\n ImportDeclaration(node) {\\n const hooks = STATE_AND_EFFECT_HOOKS.get(node.source.value);\\n\\n if (!hooks) {\\n return;\\n }\\n\\n node.specifiers.forEach((specifier) => {\\n if (specifier.type !== 'ImportSpecifier') {\\n hookNamespaces.set(specifier.local.name, hooks);\\n } else if (hooks.has(importedName(specifier))) {\\n hookNames.set(specifier.local.name, importedName(specifier));\\n }\\n });\\n },\\n CallExpression(node) {\\n const hook = restrictedHook(node.callee);\\n\\n if (!hook) {\\n return;\\n }\\n\\n const owner = context.sourceCode.getAncestors(node).findLast(isFunctionNode);\\n\\n const name = owner ? functionName(owner) : null;\\n\\n if (!(name && HOOK_NAME.test(name))) {\\n context.report({ node, messageId: 'outsideHook', data: { hook } });\\n }\\n },\\n };\\n },\\n};" becomes "{\\n meta: {\\n type: 'problem',\\n messages: {\\n outsideHook:\\n 'Move '{{hook}}' into a named custom hook (for example 'useTodos' in ' +\\n ''useTodos.ts') and call that hook here. State, effects, server state and form ' +\\n 'state live only in 'use*' hooks.',\\n reexport:\\n 'Call '{{hook}}' inside a named custom hook instead of re-exporting it. A re-export ' +\\n 'hides the hook from this rule.',\\n },\\n schema: [],\\n },\\n create(context) {\\n if (isTestFile(context.filename)) {\\n return {};\\n }\\n\\n const hookNames = new Map();\\n const hookNamespaces = new Map();\\n\\n const restrictedHook = (callee) => {\\n if (callee.type === 'Identifier') {\\n return hookNames.get(callee.name);\\n }\\n\\n if (\\n callee.type === 'MemberExpression' &&\\n callee.object.type === 'Identifier' &&\\n callee.property.type === 'Identifier' &&\\n hookNamespaces.get(callee.object.name)?.has(callee.property.name)\\n ) {\\n return callee.property.name;\\n }\\n\\n return undefined;\\n };\\n\\n return {\\n ExportNamedDeclaration(node) {\\n const hooks = STATE_AND_EFFECT_HOOKS.get(node.source?.value);\\n\\n (hooks ? node.specifiers : []).forEach((specifier) => {\\n const hook = specifier.local.name ?? specifier.local.value;\\n\\n if (hooks.has(hook)) {\\n context.report({ node: specifier, messageId: 'reexport', data: { hook } });\\n }\\n });\\n },\\n ExportAllDeclaration(node) {\\n if (STATE_AND_EFFECT_HOOKS.has(node.source.value)) {\\n context.report({ node, messageId: 'reexport', data: { hook: node.source.value } });\\n }\\n },\\n ImportDeclaration(node) {\\n const hooks = STATE_AND_EFFECT_HOOKS.get(node.source.value);\\n\\n if (!hooks) {\\n return;\\n }\\n\\n node.specifiers.forEach((specifier) => {\\n if (specifier.type !== 'ImportSpecifier') {\\n hookNamespaces.set(specifier.local.name, hooks);\\n } else if (hooks.has(importedName(specifier))) {\\n hookNames.set(specifier.local.name, importedName(specifier));\\n }\\n });\\n },\\n CallExpression(node) {\\n const hook = restrictedHook(node.callee);\\n\\n if (!hook) {\\n return;\\n }\\n\\n const owner = context.sourceCode.getAncestors(node).findLast(isFunctionNode);\\n\\n const name = owner ? functionName(owner) : null;\\n\\n if (!(name && HOOK_NAME.test(name))) {\\n context.report({ node, messageId: 'outsideHook', data: { hook } });\\n }\\n },\\n };\\n },\\n};"; Rewrites the check oneStatusFromHooks: definition "{\\n meta: {\\n type: 'problem',\\n messages: {\\n status:\\n \\"Return one 'status' union from '{{hook}}' in place of {{fields}} from '{{root}}', for example '{ status: 'loading' } | { status: 'failed' } | { status: 'loaded'; greetings }', so the page renders exactly one state.\\",\\n },\\n schema: [],\\n },\\n create(context) {\\n if (isSpecFile(context.filename)) {\\n return {};\\n }\\n\\n const check = (node) => {\\n const object = unwrapChain(returnedObject(node));\\n const owner = context.sourceCode.getAncestors(node).findLast(isFunctionNode);\\n const fn = node.type === 'ArrowFunctionExpression' ? node : owner;\\n const hook = fn ? functionName(fn) : null;\\n\\n if (object?.type !== 'ObjectExpression' || !(hook && HOOK_NAME.test(hook))) {\\n return;\\n }\\n\\n const reads = object.properties\\n .filter((property) => property.type === 'Property')\\n .map((property) => statusField(context, property.value))\\n .filter(Boolean);\\n\\n [...new Set(reads.map(({ root }) => root))]\\n .map((root) => [\\n root,\\n [...new Set(reads.filter((read) => read.root === root).map(({ field }) => field))],\\n ])\\n .filter(([, fields]) => fields.length > 1)\\n .forEach(([root, fields]) => {\\n context.report({\\n node: object,\\n messageId: 'status',\\n data: { hook, root, fields: fields.map((field) => '\\\\'${field}\\\\'').join(', ') },\\n });\\n });\\n };\\n\\n return { ReturnStatement: check, ArrowFunctionExpression: check };\\n },\\n};" becomes "{\\n meta: {\\n type: 'problem',\\n messages: {\\n status:\\n \\"Return one 'status' union from '{{hook}}' in place of {{fields}} from '{{root}}', for example '{ status: 'loading' } | { status: 'failed' } | { status: 'loaded'; todos }', so the page renders exactly one state.\\",\\n },\\n schema: [],\\n },\\n create(context) {\\n if (isSpecFile(context.filename)) {\\n return {};\\n }\\n\\n const check = (node) => {\\n const object = unwrapChain(returnedObject(node));\\n const owner = context.sourceCode.getAncestors(node).findLast(isFunctionNode);\\n const fn = node.type === 'ArrowFunctionExpression' ? node : owner;\\n const hook = fn ? functionName(fn) : null;\\n\\n if (object?.type !== 'ObjectExpression' || !(hook && HOOK_NAME.test(hook))) {\\n return;\\n }\\n\\n const reads = object.properties\\n .filter((property) => property.type === 'Property')\\n .map((property) => statusField(context, property.value))\\n .filter(Boolean);\\n\\n [...new Set(reads.map(({ root }) => root))]\\n .map((root) => [\\n root,\\n [...new Set(reads.filter((read) => read.root === root).map(({ field }) => field))],\\n ])\\n .filter(([, fields]) => fields.length > 1)\\n .forEach(([root, fields]) => {\\n context.report({\\n node: object,\\n messageId: 'status',\\n data: { hook, root, fields: fields.map((field) => '\\\\'${field}\\\\'').join(', ') },\\n });\\n });\\n };\\n\\n return { ReturnStatement: check, ArrowFunctionExpression: check };\\n },\\n};" The Lint config executes the replacement checks shown above; approval is required for these changed decision rules

@BenSheridanEdwards: tick to approve.

  • Approve these enforcement changes at 14246ca ticked by Ben Sheridan Edwards at Tuesday, the 17th of November, at 9:21 am (@BenSheridanEdwards)

@github-actions github-actions Bot added confidence: red A required gate is failing or pending, or evidence is unavailable. confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. and removed confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap. confidence: red A required gate is failing or pending, or evidence is unavailable. labels Nov 16, 2026
@BenSheridanEdwards

Copy link
Copy Markdown
Owner Author

Paused for the day (17 Nov, 07:5x GMT). Stopped at head 14246ca: all required checks green except the enforcement-approval box, which is waiting for Ben's tick at this head. Next: Ben ticks the box, a quick Opus re-review, then merge. Any further main merge moves the box and needs a fresh tick.

@BenSheridanEdwards
BenSheridanEdwards merged commit b6b5631 into main Nov 17, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

confidence: amber Required gates passed, with an E2E, PRD, unit coverage or import blast-radius gap.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant