Add context for AI¶
Briefing, not authority. (R) rule at linked source · (O) dated upstream fact · (P) procedure · (C) open work · (G) not established.
WHAT THIS MEANS IN DRUPAL¶
Governed context (policies, procedures, agent memory) is ai_context_item content: bundled, revisioned, moderated, scoped, budgeted (R) how-we-build §10.
OWNER¶
- Context model, revisions, moderation, scopes, selection:
drupal/ai_context(R) how-we-build §10. - Bluefly adds only provenance, tenancy, conflict control, Cedar write guards, GAID (R) how-we-build §10-11;
kb_cacheisSHRINK(O) package map. - Vectors: Drupal AI / vector-provider layer, not
kb_cache(R) how-we-build §11.
PREREQUISITES¶
- (P) Check the RC1 breaking changes before writing a scope plugin RC1 notes.
DO THIS¶
- (P) New kind of context: an
ai_context_itembundle + fields, as config (R) standard §8. - (P) Scope it with existing scope plugins; write a scope plugin only when none match.
- (P) Lifecycle (staleness, archive): ECA, not cron code (R) Rule E.
- (P) Read context through
ai_context.request_factory, injected AI context playbook §2.1. - (P) Ship bundles in a recipe (R) Rule I.
WATCH FOR¶
ai_contextis beta, not security-covered, accepted as substrate (O 2026-09-20) matrix.- Do not decorate
ai_context.selector; use the selection events AI context playbook §2.2.
DO NOT¶
- Custom entity type for plans, tasks or memory (R) standard §8.
- Duplicate revisions, moderation, scopes or selection (R) how-we-build §10.
- Generic vector client in
kb_cache(R) how-we-build §11.
OWNERSHIP / CAN-SHOULD-MAY¶
- CAN: editors via moderation; agents via Tools.
- SHOULD: ContextControl governs;
ai_contextstores; Beads track work. - MAY: governed writes pass Cedar (R) how-we-build §11.
DO NOT REDISCOVER¶
- ContextControl.ai is product + governance around upstream
ai_context, not a second model (R) how-we-build §10.
CONFLICTS¶
| ID | A | B | Resolution |
|---|---|---|---|
| C-SCOPE-LIST | AI context playbook §3: global, use_case, language, tag, entity, taxonomy |
"Building in Drupal: The 2026 Way" (claude.ai project instructions, not in repo): global, language, site_section, tag, target_entity, use_case |
Unverified upstream (G). Read the installed module's scope plugins before relying on ids. |
GO DEEPER¶
Anchored sources: frontmatter authority_sources. Expires last_verified + 30d.