[Meta] Context Scope feature
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3564706. -->
Reported by: [kristen pol](https://www.drupal.org/user/8389)
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[META] Context Scope feature<br>
<strong>Additional Collaborators: </strong> @kristen pol, @afoster, @emma horrell<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When discussing the UX with Aidan & Emma, we talked about assigning context an "application" (use case) such as "writing words", "building canvas pages", "creating components", etc.</p>
<p>Given other ways we can categorize context, I want to go a step further and have a number of categories/critieria/dimensions that could be attributed to context.</p>
<p>Currently, we are going to use the word "Scope" to capture this, but "Criteria" or "Factors" could also work. "Categories" probably isn't good, given it might be confused with taxonomy.</p>
<p>Example scope that context can be associated with:</p>
<ul>
<li>Use case: writing words, building canvas page, creating component, etc</li>
<li>Site scope: cross-site, site, section, page, etc</li>
<li>Language: English, French, Hindi, etc</li>
<li>Topics (freetagging or pulled from taxonomy): biology, history, political science, etc</li>
</ul>
<p>These scope items will be used when choosing context items for agents, as agents will be able to "subscribe"/"associate" themselves with certain scope items. For example:</p>
<ul>
<li>An agent creates textual content for blog posts</li>
<li>It doesn't care about creating landing pages or components, but does care about writing words</li>
<li>The agent can be configured to subscribe/link to "writing words" context items since those are most relevant</li>
<li>If the agent was specifically focused on writing Spanish blog posts rather than any language, it could also choose the Spanish language scope</li>
</ul>
<p>If 3 context items are associated with "writing words" and only one is associated with "Spanish" then the most relevant context item for the Spanish Blog Post Agent is that one.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Scope may come from different places, e.g.</p>
<ul>
<li>predefined list in code (e.g. use cases, site scope)</li>
<li>dynamic list from database (e.g. languages, topics)</li>
<li>dynamic list from third-party systems (e.g. products, industries)</li>
</ul>
<p>We want the scope system to be extensible so that other modules can add to the list of possible scope and add items to existing scope lists.</p>
<h3 id="summary-remaining-tasks">Target date or deadline</h3>
<p>January 2026</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ul>
<li>Figure out draft architecture</li>
<li>Create a few example scope items to test it out</li>
<li>Review with AI team and adjust as needed</li>
<li>Create follow-up issues to finalize certain scope items</li>
</ul>
issue