aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
44
akode-rs/prompts/src/multi_agent_instructions_tests.rs
Normal file
44
akode-rs/prompts/src/multi_agent_instructions_tests.rs
Normal file
@@ -0,0 +1,44 @@
|
||||
//! Covers role composition and attribution for captured model instructions.
|
||||
|
||||
use super::*;
|
||||
use akode_context_fragments::AnnotatedContent;
|
||||
use akode_context_fragments::RenderedFragment;
|
||||
use akode_protocol::models::ContentItemMetadata;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn role_segment_filters_base_and_appends_bundled_guidance() {
|
||||
let shared = DEFAULT_MULTI_AGENT_V2_SHARED_USAGE_HINT_TEXT;
|
||||
let wait = DEFAULT_MULTI_AGENT_V2_WAIT_AGENT_USAGE_HINT_TEXT;
|
||||
let model_override = DEFAULT_MULTI_AGENT_V2_MODEL_OVERRIDE_USAGE_HINT_TEXT;
|
||||
let expected_body = format!(
|
||||
"Role.\n## Work\nContinue.\n{shared}\n{wait}\n\nThere are 2 available concurrency slots, meaning that up to 2 agents can be active at once, including you.\n\n{model_override}"
|
||||
);
|
||||
for marked in [false, true] {
|
||||
let instructions = MultiAgentRoleInstructions::Composed {
|
||||
base: "Role.\n## Plan tool\nOmit role checklist guidance.\n## Work\nContinue."
|
||||
.to_string(),
|
||||
marked,
|
||||
omit_update_plan_instructions: true,
|
||||
max_concurrency: 2,
|
||||
wait_agent_enabled: true,
|
||||
expose_model_overrides: true,
|
||||
};
|
||||
let expected_text = if marked {
|
||||
format!("<multi_agent_role>{expected_body}</multi_agent_role>")
|
||||
} else {
|
||||
expected_body.clone()
|
||||
};
|
||||
assert_eq!(
|
||||
instructions.render_fragment(),
|
||||
RenderedFragment::new(
|
||||
"developer",
|
||||
AnnotatedContent::text(
|
||||
expected_text,
|
||||
ContentItemKind("multi_agent.role_instructions".to_string()),
|
||||
ContentItemMetadata::harness(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user