preamble
preamble
¶
Dynamic, context-aware preamble building for Marianne-orchestrated agents.
Generates preambles that tell agents who they are, where they are in the concert, and what success looks like. Replaces the static 5-rule warning label that was previously hardcoded in the retired native CLI executor.
Functions:¶
build_preamble
¶
build_preamble(sheet_num, total_sheets, workspace, retry_count=0, is_parallel=False, healing_context=None)
Build a context-aware preamble for a Marianne-orchestrated agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sheet_num
|
int
|
Current sheet number (1-indexed). |
required |
total_sheets
|
int
|
Total number of sheets in the concert. |
required |
workspace
|
Path
|
Workspace directory path. |
required |
retry_count
|
int
|
Number of previous failed attempts (0 = first run). |
0
|
is_parallel
|
bool
|
Whether parallel execution is enabled. |
False
|
healing_context
|
dict[str, Any] | None
|
Failure signals from the prior attempt (#201). When
present on a retry, rendered into a bounded UNTRUSTED-EVIDENCE block
so the agent knows specifically what failed instead of retrying
blind. Carries the raw |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Preamble string wrapped in |