Principle:A5c ai Babysitter Context Bundle Assembly
| Knowledge Sources | |
|---|---|
| Domains | Kubernetes, Prompt_Engineering, Context_Assembly |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
A method for assembling agent context bundles with prompt layers, secret redaction, size enforcement, and cryptographic digest computation.
Description
Context Bundle Assembly is the principle of collecting, redacting, and bounding the information an agent receives at dispatch time. The bundle consists of:
- Prompt layers: system, developer, and task prompts from the AgentStack CRD, merged with skill and context label fragments.
- Redaction: Five redaction pattern types (secret-key, provider-token, bearer-token, private-key, base64-credential) scrub secrets from all prompt layers.
- Size enforcement: 64 KiB per layer, 750 KiB bundle max, 32 attachments max — prevents context overflow.
- Digest: SHA-256 digest of the assembled bundle for integrity verification.
The composeAgentPrompt function composes a three-part prompt from soul, persona, definition, and stack CRDs.
Usage
Use this principle when dispatching AI agents where the prompt context must be redacted, bounded, and verifiable.
Theoretical Basis
The assembly is a pipeline:
1. Collect raw prompt layers (system, developer, task)
2. Merge skill fragments and context label fragments
3. Apply redaction patterns (ordered by priority)
4. Enforce size limits (truncate per layer, reject if bundle > 750 KiB)
5. Compute SHA-256 digest
6. Return ContextBundle { spec: { promptLayers, digest, size, redactionManifest, attachments } }
Key property: Redaction is applied before digest computation, ensuring the digest covers the redacted (safe) content, not the raw secrets.