@genesislcap/ai-assistant 15.71.0-FUI-2650.1 → 15.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/ai-assistant.api.json +0 -97
  2. package/dist/ai-assistant.d.ts +0 -65
  3. package/dist/chat-driver.cjs +0 -18031
  4. package/dist/chat-driver.cjs.map +4 -4
  5. package/dist/chat-driver.mjs +0 -18024
  6. package/dist/chat-driver.mjs.map +4 -4
  7. package/dist/custom-elements.json +6856 -9696
  8. package/dist/dts/chat-driver-node.d.ts +0 -2
  9. package/dist/dts/chat-driver-node.d.ts.map +1 -1
  10. package/dist/dts/index.d.ts +0 -1
  11. package/dist/dts/index.d.ts.map +1 -1
  12. package/dist/dts/react.d.ts +0 -10
  13. package/dist/esm/chat-driver-node.js +0 -6
  14. package/dist/esm/index.js +0 -3
  15. package/dist/react.cjs +0 -7
  16. package/dist/react.mjs +0 -6
  17. package/package.json +17 -24
  18. package/scripts/smoke-chat-driver-node.mjs +0 -15
  19. package/dist/dts/code-review/code-review.types.d.ts +0 -76
  20. package/dist/dts/code-review/code-review.types.d.ts.map +0 -1
  21. package/dist/dts/code-review/code-reviewer.agent.d.ts +0 -77
  22. package/dist/dts/code-review/code-reviewer.agent.d.ts.map +0 -1
  23. package/dist/dts/code-review/code-reviewer.prompt.d.ts +0 -23
  24. package/dist/dts/code-review/code-reviewer.prompt.d.ts.map +0 -1
  25. package/dist/dts/code-review/gate.d.ts +0 -44
  26. package/dist/dts/code-review/gate.d.ts.map +0 -1
  27. package/dist/dts/code-review/index.d.ts +0 -27
  28. package/dist/dts/code-review/index.d.ts.map +0 -1
  29. package/dist/dts/code-review/review-changes.d.ts +0 -70
  30. package/dist/dts/code-review/review-changes.d.ts.map +0 -1
  31. package/dist/dts/code-review/rules/context-trigger-map.d.ts +0 -6
  32. package/dist/dts/code-review/rules/context-trigger-map.d.ts.map +0 -1
  33. package/dist/dts/code-review/rules/context.registry.d.ts +0 -123
  34. package/dist/dts/code-review/rules/context.registry.d.ts.map +0 -1
  35. package/dist/dts/code-review/rules/fui-ai-extensions.d.ts +0 -13
  36. package/dist/dts/code-review/rules/fui-ai-extensions.d.ts.map +0 -1
  37. package/dist/dts/code-review/rules/fui-blotter.d.ts +0 -16
  38. package/dist/dts/code-review/rules/fui-blotter.d.ts.map +0 -1
  39. package/dist/dts/code-review/rules/fui-chart.d.ts +0 -20
  40. package/dist/dts/code-review/rules/fui-chart.d.ts.map +0 -1
  41. package/dist/dts/code-review/rules/fui-column-defs.d.ts +0 -21
  42. package/dist/dts/code-review/rules/fui-column-defs.d.ts.map +0 -1
  43. package/dist/dts/code-review/rules/fui-components.d.ts +0 -9
  44. package/dist/dts/code-review/rules/fui-components.d.ts.map +0 -1
  45. package/dist/dts/code-review/rules/fui-criteria.d.ts +0 -32
  46. package/dist/dts/code-review/rules/fui-criteria.d.ts.map +0 -1
  47. package/dist/dts/code-review/rules/fui-custom-renderer.d.ts +0 -15
  48. package/dist/dts/code-review/rules/fui-custom-renderer.d.ts.map +0 -1
  49. package/dist/dts/code-review/rules/fui-dashboard.d.ts +0 -19
  50. package/dist/dts/code-review/rules/fui-dashboard.d.ts.map +0 -1
  51. package/dist/dts/code-review/rules/fui-dialogs.d.ts +0 -19
  52. package/dist/dts/code-review/rules/fui-dialogs.d.ts.map +0 -1
  53. package/dist/dts/code-review/rules/fui-entity-management.d.ts +0 -19
  54. package/dist/dts/code-review/rules/fui-entity-management.d.ts.map +0 -1
  55. package/dist/dts/code-review/rules/fui-error-boundary.d.ts +0 -9
  56. package/dist/dts/code-review/rules/fui-error-boundary.d.ts.map +0 -1
  57. package/dist/dts/code-review/rules/fui-eventing.d.ts +0 -8
  58. package/dist/dts/code-review/rules/fui-eventing.d.ts.map +0 -1
  59. package/dist/dts/code-review/rules/fui-flexlayout.d.ts +0 -17
  60. package/dist/dts/code-review/rules/fui-flexlayout.d.ts.map +0 -1
  61. package/dist/dts/code-review/rules/fui-flyout-panel.d.ts +0 -10
  62. package/dist/dts/code-review/rules/fui-flyout-panel.d.ts.map +0 -1
  63. package/dist/dts/code-review/rules/fui-form-component.d.ts +0 -9
  64. package/dist/dts/code-review/rules/fui-form-component.d.ts.map +0 -1
  65. package/dist/dts/code-review/rules/fui-formatters.d.ts +0 -12
  66. package/dist/dts/code-review/rules/fui-formatters.d.ts.map +0 -1
  67. package/dist/dts/code-review/rules/fui-foundation-comms.d.ts +0 -10
  68. package/dist/dts/code-review/rules/fui-foundation-comms.d.ts.map +0 -1
  69. package/dist/dts/code-review/rules/fui-global-filters.d.ts +0 -33
  70. package/dist/dts/code-review/rules/fui-global-filters.d.ts.map +0 -1
  71. package/dist/dts/code-review/rules/fui-import-surface.d.ts +0 -37
  72. package/dist/dts/code-review/rules/fui-import-surface.d.ts.map +0 -1
  73. package/dist/dts/code-review/rules/fui-inline-editing.d.ts +0 -10
  74. package/dist/dts/code-review/rules/fui-inline-editing.d.ts.map +0 -1
  75. package/dist/dts/code-review/rules/fui-layout.d.ts +0 -7
  76. package/dist/dts/code-review/rules/fui-layout.d.ts.map +0 -1
  77. package/dist/dts/code-review/rules/fui-notifications.d.ts +0 -12
  78. package/dist/dts/code-review/rules/fui-notifications.d.ts.map +0 -1
  79. package/dist/dts/code-review/rules/fui-primitives.d.ts +0 -26
  80. package/dist/dts/code-review/rules/fui-primitives.d.ts.map +0 -1
  81. package/dist/dts/code-review/rules/fui-rapid-grid-pro.d.ts +0 -18
  82. package/dist/dts/code-review/rules/fui-rapid-grid-pro.d.ts.map +0 -1
  83. package/dist/dts/code-review/rules/fui-redux-store.d.ts +0 -8
  84. package/dist/dts/code-review/rules/fui-redux-store.d.ts.map +0 -1
  85. package/dist/dts/code-review/rules/fui-reporting.d.ts +0 -19
  86. package/dist/dts/code-review/rules/fui-reporting.d.ts.map +0 -1
  87. package/dist/dts/code-review/rules/fui-styling.d.ts +0 -15
  88. package/dist/dts/code-review/rules/fui-styling.d.ts.map +0 -1
  89. package/dist/dts/code-review/rules/fui-trade-form.d.ts +0 -13
  90. package/dist/dts/code-review/rules/fui-trade-form.d.ts.map +0 -1
  91. package/dist/dts/code-review/submit-code-review.tool.d.ts +0 -12
  92. package/dist/dts/code-review/submit-code-review.tool.d.ts.map +0 -1
  93. package/dist/dts/code-review/unified-diff.d.ts +0 -7
  94. package/dist/dts/code-review/unified-diff.d.ts.map +0 -1
  95. package/dist/dts/code-review/verdict.d.ts +0 -23
  96. package/dist/dts/code-review/verdict.d.ts.map +0 -1
  97. package/dist/dts/components/code-review-result/code-review-result.d.ts +0 -26
  98. package/dist/dts/components/code-review-result/code-review-result.d.ts.map +0 -1
  99. package/dist/esm/code-review/code-review.types.js +0 -6
  100. package/dist/esm/code-review/code-reviewer.agent.js +0 -167
  101. package/dist/esm/code-review/code-reviewer.prompt.js +0 -103
  102. package/dist/esm/code-review/gate.js +0 -93
  103. package/dist/esm/code-review/index.js +0 -28
  104. package/dist/esm/code-review/review-changes.js +0 -123
  105. package/dist/esm/code-review/rules/context-trigger-map.js +0 -20
  106. package/dist/esm/code-review/rules/context.registry.js +0 -772
  107. package/dist/esm/code-review/rules/fui-ai-extensions.js +0 -306
  108. package/dist/esm/code-review/rules/fui-blotter.js +0 -596
  109. package/dist/esm/code-review/rules/fui-chart.js +0 -669
  110. package/dist/esm/code-review/rules/fui-column-defs.js +0 -862
  111. package/dist/esm/code-review/rules/fui-components.js +0 -245
  112. package/dist/esm/code-review/rules/fui-criteria.js +0 -538
  113. package/dist/esm/code-review/rules/fui-custom-renderer.js +0 -612
  114. package/dist/esm/code-review/rules/fui-dashboard.js +0 -604
  115. package/dist/esm/code-review/rules/fui-dialogs.js +0 -588
  116. package/dist/esm/code-review/rules/fui-entity-management.js +0 -1014
  117. package/dist/esm/code-review/rules/fui-error-boundary.js +0 -244
  118. package/dist/esm/code-review/rules/fui-eventing.js +0 -628
  119. package/dist/esm/code-review/rules/fui-flexlayout.js +0 -860
  120. package/dist/esm/code-review/rules/fui-flyout-panel.js +0 -432
  121. package/dist/esm/code-review/rules/fui-form-component.js +0 -898
  122. package/dist/esm/code-review/rules/fui-formatters.js +0 -415
  123. package/dist/esm/code-review/rules/fui-foundation-comms.js +0 -518
  124. package/dist/esm/code-review/rules/fui-global-filters.js +0 -778
  125. package/dist/esm/code-review/rules/fui-import-surface.js +0 -452
  126. package/dist/esm/code-review/rules/fui-inline-editing.js +0 -445
  127. package/dist/esm/code-review/rules/fui-layout.js +0 -431
  128. package/dist/esm/code-review/rules/fui-notifications.js +0 -439
  129. package/dist/esm/code-review/rules/fui-primitives.js +0 -1216
  130. package/dist/esm/code-review/rules/fui-rapid-grid-pro.js +0 -650
  131. package/dist/esm/code-review/rules/fui-redux-store.js +0 -522
  132. package/dist/esm/code-review/rules/fui-reporting.js +0 -506
  133. package/dist/esm/code-review/rules/fui-styling.js +0 -1229
  134. package/dist/esm/code-review/rules/fui-trade-form.js +0 -618
  135. package/dist/esm/code-review/submit-code-review.tool.js +0 -43
  136. package/dist/esm/code-review/unified-diff.js +0 -96
  137. package/dist/esm/code-review/verdict.js +0 -24
  138. package/dist/esm/components/code-review-result/code-review-result.js +0 -89
  139. package/docs/code-review.md +0 -137
@@ -1,10 +0,0 @@
1
- /**
2
- * Context injected into the UI Builder system prompt.
3
- * Covers inline cell editing for EntityManagement and standalone GridPro.
4
- *
5
- * Tags for selective context injection — loaded when the conversation mentions these keywords.
6
- */
7
- export declare const FUI_INLINE_EDITING_TAGS: string[];
8
- export declare const FUI_INLINE_EDITING_DEPS: string[];
9
- export declare const FUI_INLINE_EDITING_CONTEXT: string;
10
- //# sourceMappingURL=fui-inline-editing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-inline-editing.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-inline-editing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,UAwBnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,UAAsB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,QA4Z/B,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Context injected into the UI Builder system prompt.
3
- * Covers flexlayout-react patterns for generated React routes.
4
- */
5
- export declare const FUI_LAYOUT_TAGS: string[];
6
- export declare const FUI_LAYOUT_CONTEXT: string;
7
- //# sourceMappingURL=fui-layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-layout.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-layout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe,UAiB3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAwZvB,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Context injected into the UI Builder system prompt.
3
- * Covers the foundation-notifications imperative API: toast, snackbar, banner, dialog, alert,
4
- * and the notify-container configuration for stacking / positioning.
5
- *
6
- * NOTE: foundation-notifications has NO React web-component wrapper and no /react subpath.
7
- * It is a pure imperative TypeScript API — import functions directly from the package root.
8
- * All functions are safe to call from React event handlers, useEffect, etc.
9
- */
10
- export declare const FUI_NOTIFICATIONS_TAGS: string[];
11
- export declare const FUI_NOTIFICATIONS_CONTEXT: string;
12
- //# sourceMappingURL=fui-notifications.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-notifications.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,UAgClC,CAAC;AAIF,eAAO,MAAM,yBAAyB,QA2Y9B,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Context: Rapid design-system primitives — Button, TextField, Select, Tabs, Stepper, DatePicker,
3
- * Multiselect, FileUpload, Icon, Snackbar, Combobox, RadioGroup, Card, Tooltip, Toast,
4
- * Divider, Banner, Disclosure, SegmentedControl, Slider, Progress, etc.
5
- * + WC/React interop boundary + dangerous patterns.
6
- *
7
- * Source-verified against:
8
- * foundation-ds/rapid-design-system/dist/dts/react.d.ts (all component shapes + Ref types)
9
- * foundation-ui/src/icon/icon.ts (Icon @attr surface)
10
- * foundation-ui/src/number-field/number-field.ts (NumberField @attr surface)
11
- * foundation-ui/src/date-picker/date-picker.ts (DatePicker @attr surface)
12
- * foundation-ui/src/tabs/tabs.ts (Tabs scrollable, currentTabIndex)
13
- * foundation-ds/rapid-design-system/src/button/button.styles.ts (appearance values)
14
- * showcase/react-client/src/pages/ReactTypes/ReactTypes.tsx (idiomatic event usage)
15
- * showcase/react-client/src/pages/DatePickers/DatePickers.tsx (DatePicker usage)
16
- * sales-trader-hub/client/src/components/IrVolDeskPanel/IrVolTradingForm.tsx (production patterns)
17
- * foundation-ui/src/options-datasource/options-datasource.ts (OptionsDatasource @attr surface + value-change)
18
- * foundation-ui/src/options-datasource/multiselect-datasource.ts (MultiselectDatasource @attr surface)
19
- * foundation-ui/src/utils/base-datasource.ts (shared datasource props: criteria, orderBy, maxRows…)
20
- * foundation-ui/dist/dts/react.d.ts + dist/react.cjs (OptionsDatasource/MultiselectDatasource React wrappers)
21
- * installed @genesislcap/foundation-ui@14.491.0 options-datasource.d.ts (infiniteScroll/pageSize — PR #2361 / FUI-2586)
22
- */
23
- export declare const FUI_PRIMITIVES_DEPS: string[];
24
- export declare const FUI_PRIMITIVES_TAGS: string[];
25
- export declare const FUI_PRIMITIVES_CONTEXT: string;
26
- //# sourceMappingURL=fui-primitives.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-primitives.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-primitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAAO,CAAC;AAEhD,eAAO,MAAM,mBAAmB,UA8I/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAyhC3B,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Context: RapidGridPro — read-only/server-side grid from @genesislcap/rapid-grid-pro/react
3
- *
4
- * Sources verified against:
5
- * - foundation-ds/rapid-grid-pro/dist/dts/react.d.ts (RapidGridPro, RapidGridProRef)
6
- * - foundation-marketplace/grids/grid-pro/dist/dts/react.d.ts (GridProGenesisDatasource, GridProClientSideDatasource, GridProServerSideDatasource, GridProColumn, ref types, datasource events)
7
- * - foundation-marketplace/grids/grid-pro/dist/dts/grid-pro.d.ts (GridPro class — all public props)
8
- * - foundation-marketplace/grids/grid-pro/dist/dts/grid-pro.types.d.ts (GridProCaseType, GridProRendererTypes, GridProStatusBarConfig, GridOptionsConfig, etc.)
9
- * - foundation-marketplace/grids/grid-pro/dist/dts/datasource/base.datasource.d.ts (GenesisGridDatasourceElement props)
10
- * - foundation-marketplace/grids/grid-pro/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts
11
- * - showcase react-client: ReactTypes.tsx, Home.tsx
12
- * - sales-trader-hub: BlotterGrid.tsx
13
- * - blank-app-seed templates: grid.hbs, component.hbs
14
- */
15
- export declare const FUI_RAPID_GRID_PRO_DEPS: string[];
16
- export declare const FUI_RAPID_GRID_PRO_TAGS: string[];
17
- export declare const FUI_RAPID_GRID_PRO_CONTEXT: string;
18
- //# sourceMappingURL=fui-rapid-grid-pro.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-rapid-grid-pro.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-rapid-grid-pro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,uBAAuB,EAAE,MAAM,EAAwB,CAAC;AAErE,eAAO,MAAM,uBAAuB,UAkCnC,CAAC;AAEF,eAAO,MAAM,0BAA0B,QAulB/B,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Context injected into the UI Builder system prompt.
3
- * Covers foundation-redux (createStore, createSlice, pre-bound actions/selectors)
4
- * and foundation-store (AbstractStore, AbstractStoreRoot, registerStore DI pattern).
5
- */
6
- export declare const FUI_REDUX_STORE_TAGS: string[];
7
- export declare const FUI_REDUX_STORE_CONTEXT: string;
8
- //# sourceMappingURL=fui-redux-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-redux-store.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-redux-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,UAgChC,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAme5B,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Context injected into the UI Builder system prompt.
3
- * Covers read-only reporting grid patterns — no editing, no action columns.
4
- * Load this when the user asks for a report, read-only grid, analytics view, or audit log.
5
- *
6
- * Sources verified against:
7
- * - @genesislcap/foundation-entity-management/react (EntityManagement, DatasourceConfiguration)
8
- * - @genesislcap/rapid-grid-pro/react (RapidGridPro)
9
- * - @genesislcap/grid-pro/react (GridProGenesisDatasource, GridProColumn)
10
- * - @genesislcap/grid-pro (getActionsMenuDef — fui-column-defs verified)
11
- * - sales-trader-hub/client/src/components/Blotter/BlotterGrid/BlotterGrid.tsx
12
- * - sales-trader-hub/client/src/pbc/reporting/routes.ts
13
- * - fui-entity-management context (EntityManagement props, DatasourceConfiguration)
14
- * - fui-rapid-grid-pro context (RapidGridPro props, GridProGenesisDatasource props)
15
- */
16
- export declare const FUI_REPORTING_TAGS: string[];
17
- export declare const FUI_REPORTING_DEPS: string[];
18
- export declare const FUI_REPORTING_CONTEXT: string;
19
- //# sourceMappingURL=fui-reporting.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-reporting.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-reporting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,UA2B9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAA4C,CAAC;AAE5E,eAAO,MAAM,qBAAqB,QA6c1B,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Context injected into the UI Builder system prompt.
3
- * Covers CSS best practices, design tokens, theming, and the modal-theme API
4
- * (injectThemeStyles / applyMode from @genesislcap/rapid-design-system)
5
- * for Genesis/Rapid design-system components.
6
- *
7
- * Sources verified against:
8
- * - foundation-ui/packages/foundation/foundation-ds/rapid-design-system/src/modal-theme/
9
- * - foundation-ui/packages/foundation/foundation-ds/rapid-design-system/src/_config/tokens/
10
- * - blank-app-seed/client-tmp/react/src (DefaultLayout, styles/default.theme.json, styles/active-theme.ts)
11
- * - showcase client-app/client/src (main.ts, styles/active-theme.ts, layouts/default.ts)
12
- */
13
- export declare const FUI_STYLING_TAGS: string[];
14
- export declare const FUI_STYLING_CONTEXT: string;
15
- //# sourceMappingURL=fui-styling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-styling.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-styling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,UAyF5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAsmCxB,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Context injected into the UI Builder system prompt.
3
- * Covers trade ticket / order entry form composition patterns —
4
- * the QTE/FTE (Quick Ticket Entry / Full Ticket Entry) style used in sales-trader-hub,
5
- * including the CHANGE_HANDLERS map, deepMerge patching, dynamic UISchema, and
6
- * cross-leg synchronisation for multi-section forms.
7
- *
8
- * Depends on fui-form-component for the FoundationForm prop/event reference.
9
- */
10
- export declare const FUI_TRADE_FORM_TAGS: string[];
11
- export declare const FUI_TRADE_FORM_DEPS: string[];
12
- export declare const FUI_TRADE_FORM_CONTEXT: string;
13
- //# sourceMappingURL=fui-trade-form.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fui-trade-form.d.ts","sourceRoot":"","sources":["../../../../src/code-review/rules/fui-trade-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,UA4C/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAAyB,CAAC;AAE1D,eAAO,MAAM,sBAAsB,QAkjB3B,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { ChatToolDefinition, ChatToolHandlers } from '@genesislcap/foundation-ai';
2
- /**
3
- * The reviewer's one terminal tool. Moved from genesis-create's judge tools unchanged (FUI-2650).
4
- * @beta
5
- */
6
- export declare const submitCodeReviewToolDefinition: ChatToolDefinition;
7
- /**
8
- * Completes the reviewer sub-agent with the verdict.
9
- * @beta
10
- */
11
- export declare const submitCodeReviewHandler: ChatToolHandlers[string];
12
- //# sourceMappingURL=submit-code-review.tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"submit-code-review.tool.d.ts","sourceRoot":"","sources":["../../../src/code-review/submit-code-review.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGvF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,kBA4B5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,CAAC,MAAM,CAK5D,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Builds a compact unified diff (`--- / +++` header naming the file, then `@@` hunks with
3
- * {@link HUNK_CONTEXT_LINES} lines of context) between two versions of a file. Returns null
4
- * when the inputs are too large to LCS-diff cheaply — the caller then sends full content.
5
- */
6
- export declare function buildUnifiedDiff(path: string, oldContent: string, newContent: string): string | null;
7
- //# sourceMappingURL=unified-diff.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unified-diff.d.ts","sourceRoot":"","sources":["../../../src/code-review/unified-diff.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,IAAI,CASf"}
@@ -1,23 +0,0 @@
1
- import type { CodeReviewGateResult } from './code-review.types';
2
- /**
3
- * The five outcomes a host can get from a review.
4
- * @beta
5
- */
6
- export type CodeReviewStatus = 'approved' | 'blocking' | 'advisory' | 'skipped' | 'unavailable';
7
- /**
8
- * A review outcome flattened for display.
9
- * @beta
10
- */
11
- export interface CodeReviewSummary {
12
- status: CodeReviewStatus;
13
- label: string;
14
- /** The reviewer's feedback, or the reason it returned no verdict. */
15
- detail: string;
16
- }
17
- /**
18
- * Flattens a gate result (`null` = skipped) into a status, label and detail text. An unavailable
19
- * review is its own status — never shown as a clean pass.
20
- * @beta
21
- */
22
- export declare function summarizeCodeReview(result: CodeReviewGateResult | null): CodeReviewSummary;
23
- //# sourceMappingURL=verdict.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/code-review/verdict.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;CAChB;AAUD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,iBAAiB,CAQ1F"}
@@ -1,26 +0,0 @@
1
- import { GenesisElement } from '@genesislcap/web-core';
2
- import type { CodeReviewGateResult } from '../../code-review/code-review.types';
3
- import { type CodeReviewSummary } from '../../code-review/verdict';
4
- /**
5
- * Displays one code-review verdict: the status (approved, blocking, advisory, skipped or
6
- * unavailable), the files reviewed and the reviewer's feedback. Display only — it does not apply a
7
- * fix; the host decides what a verdict means for its write path.
8
- *
9
- * @example
10
- * ```ts
11
- * const el = document.createElement('ai-code-review-result') as AiCodeReviewResult;
12
- * el.result = await runCodeReviewPreGate(files, requestSubAgent);
13
- * el.files = files.map((f) => f.path);
14
- * ```
15
- *
16
- * @beta
17
- */
18
- export declare class AiCodeReviewResult extends GenesisElement {
19
- /** The gate result to show; `null` means the review was skipped. */
20
- result: CodeReviewGateResult | null;
21
- /** Paths of the files the review covered. */
22
- files: string[];
23
- /** @internal */
24
- get summary(): CodeReviewSummary;
25
- }
26
- //# sourceMappingURL=code-review-result.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-review-result.d.ts","sourceRoot":"","sources":["../../../../src/components/code-review-result/code-review-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAKf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAExF;;;;;;;;;;;;;GAaG;AACH,qBA2Da,kBAAmB,SAAQ,cAAc;IACpD,oEAAoE;IACxD,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAQ;IAEvD,6CAA6C;IACjC,KAAK,EAAE,MAAM,EAAE,CAAM;IAEjC,gBAAgB;IAChB,IAAI,OAAO,IAAI,iBAAiB,CAE/B;CACF"}
@@ -1,6 +0,0 @@
1
- /**
2
- * The name the code reviewer registers under. Hosts call it through
3
- * `requestSubAgent(CODE_REVIEWER_AGENT_NAME, …)`; {@link runCodeReviewPreGate} does.
4
- * @beta
5
- */
6
- export const CODE_REVIEWER_AGENT_NAME = 'UI Code Reviewer';
@@ -1,167 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { logger } from '../utils/logger';
3
- import { CODE_REVIEWER_AGENT_NAME } from './code-review.types';
4
- import { buildCodeReviewerPrompt } from './code-reviewer.prompt';
5
- import { createContextToolDefinitions, createContextToolHandlers, } from './rules/context.registry';
6
- import { submitCodeReviewHandler, submitCodeReviewToolDefinition } from './submit-code-review.tool';
7
- const FILE_TOOL_NAMES = ['vfs_read', 'vfs_list'];
8
- // ── Tool-call budget (GENC-1358) ──────────────────────────────────────────────
9
- // The reviewer has five read/explore tools and only one terminal tool
10
- // (submit_code_review), and sub-agent turns default tool_choice to 'required' — so
11
- // a model that keeps choosing reads can never end the turn on its own. One run
12
- // crawled 38 distinct files over ~46 tool calls reviewing a single trivial slice,
13
- // never submitted, and hit the framework's DEFAULT_MAX_TOOL_ITERATIONS (50). That
14
- // fails the sub-agent with `max_iterations` — which fails open to "approved", but
15
- // only after burning ~2.5 min of High-tier calls and leaving no verdict. "Normal
16
- // reviews finish in 4–11 turns" was the GENC-1358 design premise; MEASURED live
17
- // since (GENC-1560 buildout scenario) that premise does not hold for a real
18
- // multi-file generating step — reviews routinely ran 22–26 turns, right up
19
- // against FORCE_AT, not the rare backstop case it was sized for. We warn as the
20
- // budget runs down, then force submit_code_review well short of the framework
21
- // cap so a runaway terminates with a real verdict cheaply. FORCE_AT is
22
- // deliberately generous (>2x the ORIGINAL observed legitimate max) to leave
23
- // headroom for genuinely interconnected changes. Moved unchanged from genesis-create
24
- // (FUI-2650) — retune only against a new measurement.
25
- /** @internal */
26
- export const FORCE_AT = 25;
27
- /** @internal */
28
- export const WARN_FROM = 18;
29
- // A SEPARATE, earlier nudge (GENC-1560) — not a budget countdown, a batching
30
- // reminder. The turn-count blowup above traces to the model reading one file or
31
- // one context module per turn despite the prompt's own worked example of a
32
- // parallel batch (34 tools over 26 turns ⇒ ~1.3 tools/turn, near strictly
33
- // sequential). WARN_FROM=18 fires far too late to change that pattern — by turn
34
- // 18 the sequential habit for THIS review is already set. This fires while there
35
- // is still time for the review to recover into 1-2 genuine parallel batches.
36
- /** @internal */
37
- export const BATCHING_REMINDER_FROM = 6;
38
- /**
39
- * Escalating budget warning, delivered via tailContext (its own framed
40
- * `<system-reminder>` block, hence no leading separator).
41
- */
42
- function budgetWarning(turnIndex) {
43
- const remaining = FORCE_AT - turnIndex;
44
- return (`⚠️ TOOL-CALL BUDGET: you have made ${turnIndex} tool calls. You MUST call ` +
45
- `submit_code_review within ${remaining} more — after that it is forced ` +
46
- `automatically. Submit your verdict NOW, based on the issues you have ALREADY ` +
47
- `identified in the supplied files. Stop reading further files, and do not ` +
48
- `invent a blocking issue to justify more investigation.`);
49
- }
50
- /** Earlier, non-countdown nudge — see BATCHING_REMINDER_FROM. */
51
- function batchingReminder(turnIndex) {
52
- return (`⚠️ ${turnIndex} turns in and still going: if each turn so far made only ONE tool call, ` +
53
- `stop — that is the sequential pattern Step 1 asks you to avoid. Decide everything you ` +
54
- `still need (remaining files, remaining context modules) and emit ALL of those calls ` +
55
- `together in your NEXT reply, then submit. If you are already batching and there is ` +
56
- `genuinely more to check, continue — this is a reminder, not a limit.`);
57
- }
58
- /**
59
- * Per-turn nudge text, delivered via `tailContext` — NOT concatenated onto `systemPrompt`.
60
- * Both nudge strings interpolate the live turn number, so a system prompt carrying them changes
61
- * on EVERY turn from BATCHING_REMINDER_FROM onward — and 'history' scope's cache breakpoint
62
- * chain starts at the system block, so that defeats the cache to the end of the review.
63
- * MEASURED in genesis-create (GENC-1560): 82% of one generating step's cost.
64
- */
65
- function reviewerTailContext(ctx) {
66
- if (ctx.turnIndex >= WARN_FROM)
67
- return budgetWarning(ctx.turnIndex);
68
- if (ctx.turnIndex >= BATCHING_REMINDER_FROM)
69
- return batchingReminder(ctx.turnIndex);
70
- return '';
71
- }
72
- /** Mirrors the sub-agent default ('required') until FORCE_AT, then forces the verdict. */
73
- function reviewerToolChoice(ctx) {
74
- if (ctx.turnIndex >= FORCE_AT) {
75
- // Log once at the force point (the forced submit ends the loop). Surfaces an
76
- // otherwise-silent runaway — the fail-open path swallowed these completely.
77
- if (ctx.turnIndex === FORCE_AT) {
78
- logger.warn(`Code reviewer reached the tool-call budget (${FORCE_AT}) without submitting — forcing submit_code_review.`);
79
- }
80
- return { tool: 'submit_code_review' };
81
- }
82
- return 'required';
83
- }
84
- const isFileTools = (files) => 'definitions' in files && 'handlers' in files;
85
- /** Generic `vfs_read` / `vfs_list` over a {@link CodeReviewFileReader}. */
86
- function fileReaderTools(reader) {
87
- return {
88
- definitions: [
89
- {
90
- name: 'vfs_list',
91
- description: 'List every file path you may read. Use an exact path from this list with vfs_read.',
92
- parameters: { type: 'object', properties: {} },
93
- },
94
- {
95
- name: 'vfs_read',
96
- description: 'Read the full content of a file, as it stands with the change under review applied.',
97
- parameters: {
98
- type: 'object',
99
- required: ['path'],
100
- properties: {
101
- path: { type: 'string', description: 'Exact path from vfs_list.' },
102
- },
103
- },
104
- },
105
- ],
106
- handlers: {
107
- vfs_list: () => __awaiter(this, void 0, void 0, function* () { return ({ files: yield reader.list() }); }),
108
- vfs_read: (args) => __awaiter(this, void 0, void 0, function* () {
109
- const { path } = args;
110
- const content = yield reader.read(path);
111
- if (content === undefined) {
112
- return { error: `File not found: '${path}'. Call vfs_list to see readable paths.` };
113
- }
114
- return { path, content };
115
- }),
116
- },
117
- };
118
- }
119
- /** Keeps only `vfs_read` / `vfs_list` — the reviewer must never hold a write tool. */
120
- function readOnlyFileTools(tools) {
121
- const allowed = (name) => FILE_TOOL_NAMES.includes(name);
122
- return {
123
- definitions: tools.definitions.filter((t) => allowed(t.name)),
124
- handlers: Object.fromEntries(Object.entries(tools.handlers).filter(([k]) => allowed(k))),
125
- };
126
- }
127
- /**
128
- * Creates the UI Code Reviewer: a read-only sub-agent that reviews changed web files for Genesis
129
- * UI pattern compliance and semantic correctness, and submits exactly one verdict through
130
- * `submit_code_review`. Register it in a parent agent's `subAgents` and call it with
131
- * {@link runCodeReviewPreGate}.
132
- *
133
- * The tool budget, `tailContext` nudges, `history` cache scope and the read-only tool set are
134
- * fixed here so every host gets the same cost behaviour.
135
- * @beta
136
- */
137
- export function createCodeReviewAgent(options) {
138
- var _a, _b, _c;
139
- const files = readOnlyFileTools(isFileTools(options.files) ? options.files : fileReaderTools(options.files));
140
- const extraRules = (_a = options.extraRules) !== null && _a !== void 0 ? _a : [];
141
- const grounding = options.grounding;
142
- return Object.assign(Object.assign({ name: CODE_REVIEWER_AGENT_NAME, description: (_b = options.description) !== null && _b !== void 0 ? _b : 'Reviews changed web files for Genesis UI pattern compliance before they are written.' }, (options.provider !== undefined ? { provider: options.provider } : {})), { thinkingPolicy: (_c = options.thinkingPolicy) !== null && _c !== void 0 ? _c : 'off',
143
- // Byte-stable: the turn-count nudges are delivered per turn via tailContext (below), NOT
144
- // concatenated here, so the prompt never churns mid-review — see reviewerTailContext.
145
- systemPrompt: buildCodeReviewerPrompt({
146
- triggerTable: options.triggerTable,
147
- grounding: grounding !== undefined,
148
- }),
149
- // 'history', not 'prompt' (GENC-1560). 'prompt' caches ONLY the tools+system prefix, so every
150
- // tool result the reviewer has already read is resent uncached on every later turn of the
151
- // SAME review. MEASURED in genesis-create: reviews routinely ran 22–26 turns, and ten such
152
- // reviews cost $51 of a $73 scenario run under 'prompt'. 'history' caches the growing
153
- // conversation itself. No-op on Gemini (implicit caching). Depends on systemPrompt staying
154
- // byte-stable turn to turn.
155
- cachePolicy: { scope: 'history' },
156
- // Resolved every turn, but injected outside the cached prefix — '' (the common case, before
157
- // turn 6) is dropped. Raw content; foundation-ai frames it in a <system-reminder>.
158
- tailContext: reviewerTailContext,
159
- // Bounds the read/explore loop: force the verdict before the framework's
160
- // max-iterations cap turns a runaway into a silent, expensive fail-open.
161
- toolChoice: reviewerToolChoice, toolDefinitions: [
162
- ...files.definitions,
163
- ...createContextToolDefinitions(extraRules),
164
- ...(grounding ? [grounding.definition] : []),
165
- submitCodeReviewToolDefinition,
166
- ], toolHandlers: Object.assign(Object.assign(Object.assign(Object.assign({}, files.handlers), createContextToolHandlers(extraRules)), (grounding ? { [grounding.definition.name]: grounding.handler } : {})), { submit_code_review: submitCodeReviewHandler }) });
167
- }
@@ -1,103 +0,0 @@
1
- import { CONTEXT_TRIGGER_TABLE } from './rules/context-trigger-map';
2
- /**
3
- * The reviewer's tool names in the order the prompt lists them. `query_project_schema` is listed
4
- * only when the host registers it — the prompt must never name a tool the host did not wire.
5
- */
6
- export const CODE_REVIEWER_BASE_TOOL_NAMES = [
7
- 'vfs_read',
8
- 'vfs_list',
9
- 'search_context',
10
- 'read_contextIndex',
11
- 'read_context',
12
- ];
13
- /**
14
- * The reviewer's system prompt (moved from genesis-create, text unchanged — FUI-2650). Byte-stable
15
- * for a given host: turn-count nudges go in `tailContext`, never here, or the `history` cache
16
- * breaks on every turn (GENC-1560).
17
- * @beta
18
- */
19
- export function buildCodeReviewerPrompt(options = {}) {
20
- var _a;
21
- const triggerTable = (_a = options.triggerTable) !== null && _a !== void 0 ? _a : CONTEXT_TRIGGER_TABLE;
22
- const toolNames = [
23
- ...CODE_REVIEWER_BASE_TOOL_NAMES,
24
- ...(options.grounding ? ['query_project_schema'] : []),
25
- 'submit_code_review',
26
- ];
27
- return `You are an automated code reviewer for Genesis React/TypeScript applications.
28
-
29
- You receive a set of changed files immediately before they are written to disk. Your job: catch semantic issues that TypeScript and Vite cannot verify. You do NOT generate or fix code — you read, evaluate, and submit exactly one verdict.
30
-
31
- **TypeScript type errors and Vite build errors have already been checked by automated tooling.** Do NOT re-check TypeScript correctness. Your job is semantic and pattern compliance only.
32
-
33
- **Your tool set is exactly: ${toolNames.join(', ')}.**
34
- Calling vfs_edit, vfs_write, or any other tool will fail immediately.
35
-
36
- ---
37
-
38
- ## Step 1 — Locate the files
39
-
40
- **READ EVERYTHING YOU NEED IN ONE PARALLEL BATCH — never one call per reply.** MEASURED (GENC-1560 buildout scenario): reviews of a real multi-file change routinely ran 22–26 separate turns, most of them a single \`vfs_read\` or \`read_context\` call each — the SAME total reads would have taken 2–3 turns done as parallel batches. Every extra sequential turn resends this review's own growing history in full; batching is not a style preference, it directly controls how much this review costs. Decide up front what you need — the supplied files' related imports, AND every context module the trigger table below matches — and emit ALL of those tool calls together, in ONE reply:
41
-
42
- \`\`\`
43
- // One reply, multiple tool calls — not four separate turns:
44
- read_context({ name: "fui-column-defs" })
45
- read_context({ name: "fui-styling" })
46
- vfs_read({ path: "MainTrading/AxesGrid/AxesGridOptions.ts" })
47
- vfs_read({ path: "MainTrading/AxesGrid/AxesTypes.ts" })
48
- \`\`\`
49
-
50
- Two batches is normal for a large change (e.g. \`read_contextIndex\` + initial reads, then a second batch once you know what else you need); a THIRD round of individual single-tool-call turns is the failure mode this section exists to prevent.
51
-
52
- The files to review are in your context message under the \`files\` array. A NEW file arrives as \`{ path, content }\` (full content); an EDITED file arrives as \`{ path, diff }\` — a unified diff of this change only (\`-\` removed, \`+\` added, other lines unchanged context). Planned files additionally carry \`purpose\` and \`acceptanceChecks\` from the architecture plan.
53
- **Do NOT call vfs_read for a path supplied with \`content\`** — use the supplied content directly. For a \`diff\` entry, the CHANGE is the subject of your review: judge the added/changed lines, and do NOT flag pre-existing code that merely appears as diff context — it is not part of this change. You MAY vfs_read a diff entry's own path when surrounding code is genuinely needed to judge the change (the read returns the post-edit content) — but decide THAT up front too, and batch it with everything else, rather than reading one diff file, deciding you need another, and reading that next turn.
54
-
55
- You MAY read OTHER VFS files, but only ones **directly relevant** to reviewing the supplied files. A file is directly relevant only if a supplied file imports from it, or it imports from a supplied file, AND you need to confirm a specific symbol or type. Do NOT read a file merely because it belongs to the same page or feature, and do NOT survey the project. When in doubt, submit your verdict: over-reading is itself a failure mode.
56
-
57
- ## Step 2 — Identify and load relevant contexts (run in parallel)
58
-
59
- 1. Call read_contextIndex() to get the full module catalog.
60
- 2. Inspect the imports, component names, and patterns in the provided files.
61
- 3. In one parallel batch, call read_context(name) for every relevant module.
62
-
63
- Context trigger map — load the matching module if any of these signals appear in the provided files:
64
-
65
- ${triggerTable}
66
-
67
- ## Step 3 — Evaluate against loaded context rules
68
-
69
- For each loaded context, check only the rules and anti-patterns it explicitly documents. Do NOT invent new rules or apply personal style preferences.
70
-
71
- Additionally, check these universal issues regardless of which contexts were loaded:
72
-
73
- **BLOCKING — must be fixed before the changes apply (a runtime/build break, or a hard Genesis convention):**
74
- - JSX syntax (\`<ComponentName />\`, \`<div>\`, JSX expressions) written inside a \`.ts\` file (non-component files like column defs, store slices, and utilities must be \`.ts\`)
75
- - React hooks (\`useState\`, \`useEffect\`, \`useRef\`, \`useCallback\`, \`useMemo\`) called after a conditional \`return\` statement — violates React rules of hooks
76
- - Explicit \`any\` type annotation on a variable, function parameter, return type, or generic
77
- - **Raw HTML form/interactive controls where a design-system component exists** — \`<input>\` / \`<select>\` / \`<textarea>\` / \`<button>\` used instead of \`TextField\` / \`NumberField\` / \`Select\` + \`ListboxOption\` / \`TextArea\` / \`Button\` from \`@genesislcap/rapid-design-system/react\`. Genesis components give design tokens, theming, and consistent behaviour; raw HTML controls skip all of it. A frequent tell: a design-system form component is imported but the field is rendered as raw HTML (which also leaves the import unused). Scope it tightly: layout/semantic elements (\`<div>\`, \`<span>\`, etc.) are fine, and a \`<table>\` is fine for a FIXED non-interactive matrix (a price ladder, a key/value summary) though a scrolling/sortable DATASET belongs in RapidGridPro, and a native control genuinely required with NO Genesis equivalent (e.g. a file input) is not a violation — do not flag those. But do NOT narrow this to form fields: an interactive \`<button>\` is in scope WHEREVER it appears — inside an ag-Grid cell renderer, in a toolbar strip, inside a hand-built modal — because \`Button\` always exists and a native one is unthemed everywhere. A whole renderer component returning \`<button style={{…}}>\` is the same violation as an inline one; the extra file does not make it a different thing. **Separately: a hand-built toolbar div or strip rendered directly above or beside an \`<EntityManagement>\` grid is itself the anti-pattern, themed button or not** — grid-level actions belong on the grid via \`customActions\` (\`{ name, action, position: CrudMenuPosition.Top, requiresSelection? }\`), not in a sibling container. Flag the container as the primary issue there, not just an unthemed button inside it. This is ADVISORY, not blocking — a hand-rolled strip beside a RapidGridPro grid, a page-level filter row, or an \`onRenderTabSet\` action is legitimate. This exact case shipped and passed review, because an earlier version of this line ended "flag only a form field".
78
-
79
- **ADVISORY — non-blocking, worth flagging:**
80
- - TODO / stub / placeholder code — NOT only comments. The comment forms (\`// TODO: implement\`, empty function bodies, \`throw new Error('not implemented')\`) are the easy ones. The form that actually ships is a handler that RUNS and does the wrong thing: \`onClick={() => alert('+ New RFQ placeholder clicked!')}\`, \`onClick={() => console.log('todo')}\`, a submit that only closes the dialog. This passed review on every step of a benchmark run because the checklist said "comments". Treat any \`alert()\`/\`console.log()\` standing in for a real interaction as a stub — but do NOT flag \`alert()\` used as genuine post-submit success/error feedback next to a real \`commitGenesisEvent\`; that is crude, not missing.
81
- - Hardcoded enum or status strings in UI that the server schema defines (should be fetched or imported from a typed constant)
82
-
83
- **PLAN ACCEPTANCE CHECKS — verify when supplied:** a file entry may carry its plan spec: \`purpose\` (what the file is for) and \`acceptanceChecks\` (the planner's concrete "done" criteria for that file). Verify each acceptance check against the supplied content or diff (vfs_read the file's own path when the diff alone cannot confirm a check). Report every unmet check as an issue, quoting the failed check — blocking when required behaviour is missing or wrong, advisory when the shortfall is cosmetic or partial. A check you cannot verify from the code alone (e.g. it needs the running app) is NOT an issue — skip it. Files without these fields have no plan spec; review them against the loaded context rules only.
84
-
85
- ## Step 4 — Call submit_code_review exactly once
86
-
87
- **Only report an issue you are CONFIRMING is a real violation.** Decide each candidate issue BEFORE you write it: if, on inspection, the code is actually correct (it follows the rule, the cast is necessary, the pattern is the documented one), do NOT list it. NEVER emit a \`[BLOCKING]\` (or advisory) issue whose own explanation concludes the code is fine ("…however this is correct", "…this is fine per <rule>") — that wastes a whole fix cycle making the primary agent "fix" working code. A blocking verdict must contain only issues that genuinely block. If you are unsure whether something is a violation, leave it out.
88
-
89
- Submit as soon as you have evaluated the supplied files against the loaded contexts — do not keep exploring for more files to read. Once you have your verdict:
90
-
91
- \`\`\`
92
- // All clear:
93
- submit_code_review({ approved: true })
94
-
95
- // Advisory issues only (changes proceed, feedback attached):
96
- submit_code_review({ approved: false, severity: "advisory", feedback: "<numbered list>" })
97
-
98
- // Any blocking issue (changes rejected, primary agent must fix first):
99
- submit_code_review({ approved: false, severity: "blocking", feedback: "<numbered list>" })
100
- \`\`\`
101
-
102
- In \`feedback\`: for each issue include the file path, the violating code snippet, the rule violated (referencing the loaded context by name), and the correct pattern. List ALL issues — both blocking and advisory — when severity is "blocking".`;
103
- }