Feature description
Add bounded Project Bootstrap Context for cold starts: when a supported Agent opens, resumes, clears, or restores a project session before the first user query exists, PowerContext can inject one small, exact, project-scoped context package.
This is a concrete child direction of #1362. It should establish the host-neutral behavior with Codex first, then qualify another maintained Agent integration through the capability manifest in #1357.
Problem and proposed solution
Current automatic recall is query-driven: an Agent lifecycle hook receives a user prompt, calls PowerContext to prepare bounded context, and injects the result for that request. At project or session startup there may be no user query, even though the Agent still benefits from stable project constraints, current Workstream state, reviewed decisions, and an explicit Handoff selection.
Without a bootstrap contract, each integration may invent a different heuristic, inject too much history, depend on private transcripts, or duplicate the same context again on the first prompt.
Define an explicit bootstrap flow:
- The host resolves the current Project and optional Workstream using the accepted identity model.
- A supported lifecycle event requests bootstrap context without fabricating a semantic query.
- Runtime selects content through a versioned, bounded bootstrap profile.
- The response identifies exact authoritative citations and remains wrapped as untrusted historical context.
- The integration injects it at most once for the lifecycle boundary and records
injected, skipped, or failed delivery state.
- The first real user prompt still uses ordinary query-driven preparation, with exact-reference/digest deduplication to avoid repeated content.
The first bootstrap profile should be intentionally small and explicit. The design should decide which of the following are eligible:
- reviewed active project decisions and constraints;
- current Workstream objective and verified state;
- one exact committed Handoff selected for continuation;
- operator-curated onboarding or repository guidance represented through supported context assets.
It must not scan or inject complete Session transcripts, all project Memory, pending Candidates, raw Source windows, secrets, or unreviewed generated instructions.
If a new public request, response, or Context Profile is required, record that contract in an RFC before changing OpenAPI. Agent-specific lifecycle payloads remain in their integrations; Runtime owns selection, citation, budgeting, rendering, and trust boundaries.
Acceptance criteria
- A supported Agent can receive useful project context at startup without a user query or fabricated search text.
- Bootstrap is opt-in or explicitly configured for the first release; absent configuration returns a normal bounded
empty/skipped result.
- Every injected item resolves to one exact authoritative Revision or Memory entry version.
- Current system/developer instructions, repository rules, the current user request, and live validation take precedence over bootstrap history.
- One lifecycle event cannot inject the same bootstrap package more than once, including retries and process restarts where the host provides a stable event identity.
- The first user-prompt recall does not duplicate identical bootstrap items and remains compatible with the current PreparedContext contract.
- Startup, resume, clear, and compact/restore behavior are distinct and tested; compaction restores only PowerContext-owned bounded state, not private transcripts.
- Server unavailability, authorization denial, invalid response, and empty context remain distinct; integration failure stays fail-open for normal Agent work.
- A bounded Receipt or diagnostic record reports profile version, selected exact refs/digest, bytes, truncation, and injection state without storing context bodies or query text.
- Codex and one additional maintained Agent pass host-real acceptance before the capability is described as cross-host.
Alternatives considered
- Fabricate a generic query such as
project context: produces unstable semantic retrieval and hides the absence of user intent.
- Inject all project Memory at startup: violates context budgets and exposes unrelated or stale history.
- Reuse the latest Session transcript: makes behavior host-specific and crosses privacy and authority boundaries.
- Treat a Handoff as automatic bootstrap for every session: Handoff continuation requires an explicit exact selection and does not apply to every cold start.
Additional context
Parent tracker: #1362. Related: #1219, #1356, #1357, #1358, and #1419.
Feature description
Add bounded Project Bootstrap Context for cold starts: when a supported Agent opens, resumes, clears, or restores a project session before the first user query exists, PowerContext can inject one small, exact, project-scoped context package.
This is a concrete child direction of #1362. It should establish the host-neutral behavior with Codex first, then qualify another maintained Agent integration through the capability manifest in #1357.
Problem and proposed solution
Current automatic recall is query-driven: an Agent lifecycle hook receives a user prompt, calls PowerContext to prepare bounded context, and injects the result for that request. At project or session startup there may be no user query, even though the Agent still benefits from stable project constraints, current Workstream state, reviewed decisions, and an explicit Handoff selection.
Without a bootstrap contract, each integration may invent a different heuristic, inject too much history, depend on private transcripts, or duplicate the same context again on the first prompt.
Define an explicit bootstrap flow:
injected,skipped, orfaileddelivery state.The first bootstrap profile should be intentionally small and explicit. The design should decide which of the following are eligible:
It must not scan or inject complete Session transcripts, all project Memory, pending Candidates, raw Source windows, secrets, or unreviewed generated instructions.
If a new public request, response, or Context Profile is required, record that contract in an RFC before changing OpenAPI. Agent-specific lifecycle payloads remain in their integrations; Runtime owns selection, citation, budgeting, rendering, and trust boundaries.
Acceptance criteria
empty/skippedresult.Alternatives considered
project context: produces unstable semantic retrieval and hides the absence of user intent.Additional context
Parent tracker: #1362. Related: #1219, #1356, #1357, #1358, and #1419.