oceanbase / oceanbase/powercontext

RFC: define governed extension points for context generation and custom Artifacts

Open
#1,424 1 comment 0 reactions 1 assignee View on GitHub

@MaoMengww is already working on this.

Since Sep 2, 2026.

ecosystem enhancement
Dominant language
Python
Stars
1.1k
Forks
212
Avg merge
1d 11h
Merged PRs (30d)
199

Description

Feature description

Define governed extension points for customizing context generation and introducing new derived Artifact families without forking PowerContext.

The first slice should let an administrator register a versioned generation profile and one typed derived Artifact extension while preserving exact evidence, schema validation, Review policy, authorization, resource bounds, and Runtime-owned context composition.

Problem and proposed solution

Organizations may want to change how a proposal is generated or create a domain-specific result such as a runbook, incident brief, requirement decision, or support resolution. Today the safe extension choices are narrow: callers can provide Sources and use built-in Memory, Experience, Skill, and Handoff behavior. Allowing arbitrary hooks inside the Runtime would make model output, storage, injection, and authority difficult to reason about.

The RFC should define two separate extension surfaces:

1. Versioned generation profiles
  • profile identity and immutable revision;
  • model/provider requirements and bounded settings;
  • Prompt Template identity, input schema, output schema, and content limits;
  • exact Source/Artifact evidence inputs;
  • timeout, retry, cost, and failure behavior;
  • generated output always enters the owning Family's Draft/Candidate path and never commits itself.
2. Derived Artifact family extensions
  • globally unique family ID, schema version, content model, and migration rules;
  • fixed review policy and explicit lifecycle actions;
  • exact lineage and immutable Revision semantics;
  • search/index projection declared separately from authority;
  • optional PreparedContext rendering/contribution that requires separate registration, budget, trust envelope, and authorization;
  • installation and compatibility through an administrator-controlled package boundary, not public remote-code upload.

The extension API must not expose database sessions, internal repositories, unrestricted filesystem/network access, or a way to alter built-in identity and transaction invariants.

Acceptance criteria
  • One sample extension can derive a typed Candidate from exact evidence, pass human Review, and commit an immutable Artifact Revision.
  • Changing a Prompt, model, settings, schema, or extension package creates a new exact profile/extension version visible in lineage.
  • Invalid or unavailable extensions fail before persisting a Candidate and do not block unrelated Runtime capabilities.
  • A generator cannot allocate final Artifact identity, approve its Candidate, publish/install content, or grant itself execution authority.
  • A custom Artifact is not searchable or injectable until its projection and PreparedContext behavior are explicitly registered and authorized.
  • PreparedContext remains bounded, cited, and wrapped as untrusted history; an extension cannot inject raw system/developer instructions.
  • Extension execution has explicit time, memory, output, network, and secret policy, with content-free diagnostics.
  • OpenAPI, SDK, MCP, Dashboard, and generated Agent transports expose only the reviewed public operations required by the accepted RFC.

Alternatives considered

  • Arbitrary Python callbacks configured at runtime: powerful but unsafe, unversioned, and difficult to support remotely.
  • Let prompts return untyped JSON stored directly in one generic table: erases Family semantics, lifecycle, review, and compatibility.
  • Treat every new result as Memory: conflates durable facts/decisions with domain-specific deliverables.
  • Let custom output enter PreparedContext automatically: bypasses selection, citation, budget, trust, and authorization policy.

Additional context

This issue is separate from the Source Connector SDK: connectors produce Source observations; generation and Artifact extensions transform exact evidence into governed derived results. Related: #1240, #1363, #1395, and #1397.

  • I am willing to contribute code, docs, or design feedback.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.