Skip to content

FE-1507: Move the repertoire into core behind a guarded prompts subpath - #9349

Open
lunelson wants to merge 5 commits into
ln/fe-1431-pluginsfrom
ln/fe-1507-topology
Open

FE-1507: Move the repertoire into core behind a guarded prompts subpath#9349
lunelson wants to merge 5 commits into
ln/fe-1431-pluginsfrom
ln/fe-1507-topology

Conversation

@lunelson

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

ADR-0008 (accepted 2026-08-26) moves the harness's default teaching out of its own workspace and into core behind a guarded @hashintel/brunch-agent/prompts subpath that bindings may import and plugins may not. This branch is that mechanical move; it changes no plugin key and no repertoire text.

Draft: opened so the stack is visible end to end. The description is completed when the branch is tied off.

🔗 Related links

🚫 Blocked by

  • Stacks on ln/fe-1431-plugins; lands after it.

🔍 What does this change?

Removes packages/repertoire and its dependency edges; adds the ./prompts core export; the architecture suite requires the export and rejects a plugin import of it.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 27, 2026 5:58pm
petrinaut Ready Ready Preview Aug 27, 2026 5:58pm
petrinaut-docs Ready Ready Preview Aug 27, 2026 5:58pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Aug 27, 2026 5:58pm

Request Review

lunelson commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

@lunelson
lunelson marked this pull request as ready for review August 26, 2026 17:19
@lunelson
lunelson requested a review from a team as a code owner August 26, 2026 17:19
@cursor

cursor Bot commented Aug 26, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
This reshapes Brunch package boundaries and import rules (plugins must not touch prompts); mistakes could let plugins import harness defaults or break bindings/evaluations that render instructions. Content is unchanged, but the guarded subpath is a new architectural gate.

Overview
Implements ADR-0008 (FE-1507): the standalone @hashintel/brunch-agent-repertoire workspace is removed and the harness default teaching lives in core as @hashintel/brunch-agent/prompts, without changing repertoire YAML text or plugin keys.

Package graph: packages/repertoire (manifest, build, tests, lockfile edges) is deleted. Core adds src/prompts.ts (loads validated repertoire.yaml via existing readRepertoire), exports ./prompts in package.json and Vite, and keeps the repertoire off the root SDK entry. binding-flue and the baseline harness-run import repertoire from @hashintel/brunch-agent/prompts instead of the old package.

Enforcement: Architecture tests require no repertoire package dir, ./prompts on core exports, binding-only importers of that subpath, and plugin oxlint bans on @hashintel/brunch-agent/prompts (SDCPN/Gherkin). CI prune rules and tests drop repertoire-specific extra paths.

Docs: New ADR-0008, INDEX/STEERING/topology/elicitation-kernel/README updates; steering gap text points Proof 0 runs at hash-timing rather than “re-braid first.”

Reviewed by Cursor Bugbot for commit bd9e86c. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/tests New or updated tests type/legal Owned by the @legal team labels Aug 26, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bdd288b. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$26.8 \mathrm{ms} \pm 225 \mathrm{μs}\left({\color{gray}4.13 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.49 \mathrm{ms} \pm 21.8 \mathrm{μs}\left({\color{gray}-2.116 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$13.3 \mathrm{ms} \pm 89.7 \mathrm{μs}\left({\color{red}6.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.8 \mathrm{ms} \pm 353 \mathrm{μs}\left({\color{gray}1.13 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.2 \mathrm{ms} \pm 110 \mathrm{μs}\left({\color{lightgreen}-7.039 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$25.1 \mathrm{ms} \pm 189 \mathrm{μs}\left({\color{gray}-1.224 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$27.1 \mathrm{ms} \pm 184 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.91 \mathrm{ms} \pm 23.5 \mathrm{μs}\left({\color{gray}0.935 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.6 \mathrm{ms} \pm 101 \mathrm{μs}\left({\color{red}9.88 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.76 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{gray}-0.254 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.04 \mathrm{ms} \pm 16.8 \mathrm{μs}\left({\color{gray}-0.204 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.44 \mathrm{ms} \pm 24.0 \mathrm{μs}\left({\color{gray}1.29 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.21 \mathrm{ms} \pm 36.5 \mathrm{μs}\left({\color{gray}0.273 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.65 \mathrm{ms} \pm 30.7 \mathrm{μs}\left({\color{gray}0.199 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.20 \mathrm{ms} \pm 37.7 \mathrm{μs}\left({\color{gray}0.798 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.40 \mathrm{ms} \pm 25.1 \mathrm{μs}\left({\color{gray}0.398 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.55 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{gray}0.017 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.21 \mathrm{ms} \pm 35.1 \mathrm{μs}\left({\color{gray}2.01 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.72 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}-0.423 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.57 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}0.730 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.71 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}1.35 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.00 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}0.995 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 23.1 \mathrm{μs}\left({\color{gray}1.19 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.98 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}0.617 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.08 \mathrm{ms} \pm 28.6 \mathrm{μs}\left({\color{gray}0.520 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.77 \mathrm{ms} \pm 13.1 \mathrm{μs}\left({\color{gray}-1.249 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.03 \mathrm{ms} \pm 19.2 \mathrm{μs}\left({\color{gray}-0.415 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.45 \mathrm{ms} \pm 28.4 \mathrm{μs}\left({\color{gray}0.255 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.04 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}-0.741 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.32 \mathrm{ms} \pm 21.9 \mathrm{μs}\left({\color{gray}-1.031 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.39 \mathrm{ms} \pm 24.4 \mathrm{μs}\left({\color{gray}1.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.02 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}0.593 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.35 \mathrm{ms} \pm 25.8 \mathrm{μs}\left({\color{gray}0.651 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$42.8 \mathrm{ms} \pm 270 \mathrm{μs}\left({\color{gray}0.115 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$33.7 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{gray}0.446 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$37.3 \mathrm{ms} \pm 207 \mathrm{μs}\left({\color{gray}-0.249 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$32.2 \mathrm{ms} \pm 184 \mathrm{μs}\left({\color{gray}-1.186 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$43.5 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{gray}2.02 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$49.5 \mathrm{ms} \pm 292 \mathrm{μs}\left({\color{gray}-0.749 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$40.4 \mathrm{ms} \pm 289 \mathrm{μs}\left({\color{gray}-1.734 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$85.8 \mathrm{ms} \pm 722 \mathrm{μs}\left({\color{lightgreen}-6.857 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$33.6 \mathrm{ms} \pm 183 \mathrm{μs}\left({\color{gray}-2.412 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$272 \mathrm{ms} \pm 1.00 \mathrm{ms}\left({\color{gray}-1.322 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.6 \mathrm{ms} \pm 73.4 \mathrm{μs}\left({\color{gray}-0.218 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.7 \mathrm{ms} \pm 73.0 \mathrm{μs}\left({\color{gray}-0.527 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.7 \mathrm{ms} \pm 59.1 \mathrm{μs}\left({\color{gray}0.556 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.7 \mathrm{ms} \pm 73.3 \mathrm{μs}\left({\color{gray}1.88 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.8 \mathrm{ms} \pm 58.1 \mathrm{μs}\left({\color{gray}0.229 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.7 \mathrm{ms} \pm 60.8 \mathrm{μs}\left({\color{gray}1.65 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.9 \mathrm{ms} \pm 60.2 \mathrm{μs}\left({\color{gray}1.51 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.9 \mathrm{ms} \pm 67.1 \mathrm{μs}\left({\color{gray}1.81 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.9 \mathrm{ms} \pm 61.6 \mathrm{μs}\left({\color{gray}-0.073 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$11.3 \mathrm{ms} \pm 61.1 \mathrm{μs}\left({\color{gray}2.49 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$11.1 \mathrm{ms} \pm 83.6 \mathrm{μs}\left({\color{gray}2.21 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$11.1 \mathrm{ms} \pm 63.9 \mathrm{μs}\left({\color{gray}1.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$11.3 \mathrm{ms} \pm 89.1 \mathrm{μs}\left({\color{gray}0.878 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$11.4 \mathrm{ms} \pm 146 \mathrm{μs}\left({\color{gray}3.30 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$11.1 \mathrm{ms} \pm 73.2 \mathrm{μs}\left({\color{gray}0.924 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$11.3 \mathrm{ms} \pm 80.4 \mathrm{μs}\left({\color{gray}2.96 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.2 \mathrm{ms} \pm 82.4 \mathrm{μs}\left({\color{gray}2.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$11.5 \mathrm{ms} \pm 70.8 \mathrm{μs}\left({\color{gray}3.89 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$11.4 \mathrm{ms} \pm 86.4 \mathrm{μs}\left({\color{gray}4.10 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$8.04 \mathrm{ms} \pm 44.4 \mathrm{μs}\left({\color{gray}-0.429 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$59.4 \mathrm{ms} \pm 573 \mathrm{μs}\left({\color{red}8.67 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$113 \mathrm{ms} \pm 878 \mathrm{μs}\left({\color{red}6.95 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$67.0 \mathrm{ms} \pm 460 \mathrm{μs}\left({\color{red}8.29 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$76.6 \mathrm{ms} \pm 635 \mathrm{μs}\left({\color{red}7.16 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$84.4 \mathrm{ms} \pm 445 \mathrm{μs}\left({\color{red}5.52 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$90.7 \mathrm{ms} \pm 667 \mathrm{μs}\left({\color{red}5.83 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$43.8 \mathrm{ms} \pm 282 \mathrm{μs}\left({\color{gray}3.01 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$73.5 \mathrm{ms} \pm 552 \mathrm{μs}\left({\color{gray}3.37 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$50.4 \mathrm{ms} \pm 334 \mathrm{μs}\left({\color{gray}3.80 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$60.3 \mathrm{ms} \pm 443 \mathrm{μs}\left({\color{gray}3.79 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$62.3 \mathrm{ms} \pm 372 \mathrm{μs}\left({\color{gray}3.67 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$62.9 \mathrm{ms} \pm 457 \mathrm{μs}\left({\color{red}5.06 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$125 \mathrm{ms} \pm 693 \mathrm{μs}\left({\color{gray}1.20 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$138 \mathrm{ms} \pm 485 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$18.8 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{gray}2.76 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$540 \mathrm{ms} \pm 1.17 \mathrm{ms}\left({\color{gray}-0.846 \mathrm{\%}}\right) $$ Flame Graph

lunelson and others added 5 commits August 27, 2026 19:41
Co-authored-by: Cursor <cursoragent@cursor.com>
The accepted record now exists on this branch, so the docs index and
steering file links can point at it. Drop the prune extra for the
removed repertoire workspace.

Co-authored-by: Cursor <cursoragent@cursor.com>
ADR-0008's architecture suite lives in core, so a plugin-only change never ran it. The plugin lint job is the gate that still fires then.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > frontend Owned by the @frontend team type/legal Owned by the @legal team

Development

Successfully merging this pull request may close these issues.

1 participant