home / skills / bdambrosio / cognitive_workbench / test-map-with-args
This skill helps validate map operations with additional argument handling by summarizing test documents using focus and max_length, ensuring correct outputs.
npx playbooks add skill bdambrosio/cognitive_workbench --skill test-map-with-argsReview the files below or copy the command above to add this skill to your agents.
---
name: test-map-with-args
description: Tests map primitive with additional operation arguments
manual_only: true
---
# Test Map with Args
Tests the map primitive applying summarize with focus and max_length arguments.
Creates 2 test documents, maps summarize over them with focus="AI", verifies 2 summaries produced.
This skill tests the map primitive by applying a summarize operation with additional operation arguments. It creates two short test documents, runs map(summarize) with focus and max_length set, and verifies that two focused summaries are produced. The skill demonstrates how operation arguments are passed through the mapping step and validated.
The test constructs two simple documents and invokes the map primitive using the summarize operation. Operation-specific arguments (focus="AI" and max_length) are supplied so each mapped call receives them. The test then checks that the map returned exactly two summary outputs and that they respect the provided arguments.
What does focus="AI" do in this test?
It instructs the summarize operation to emphasize the topic 'AI' when producing each summary, used here to confirm argument forwarding.
Why are there exactly two summaries?
The test creates two source documents and maps the summarize operation over them, so one summary per document is expected.