>
*/
function openstation_agents_default_definitions() {
return array(
array(
'name' => 'tl;dr',
'vibes' => 'brisk, allergic to preamble',
'faceSeed' => 198,
'face' => array(
'appearance' => array(
'hueStart' => 24,
'hueSpan' => -207,
'hueAngle' => 106,
'saturation' => 0.76,
'lightness' => 0.68,
'outlineWidth' => 2,
'glow' => 14,
'bodyColor' => 262403,
'eyeScale' => 0.28,
),
'physics' => array(
'shapePreset' => 'drop',
'shapeAmount' => 0.8,
'idleWobble' => 0.15,
'idleWobbleSpeed' => 0.6,
),
),
'role' => 'editor',
'description' => 'When adding a tl;dr section to a post',
'abilities' => array(
'desktop-mode/search-posts',
'core/read-content',
'ai/get-post-details',
'ai/get-post-terms',
'ai/summarization',
'ai/excerpt-generation',
'ai/content-resizing',
'ai/content-classification',
'desktop-mode/get-post',
'desktop-mode/update-post',
),
'triggers' => array(
array(
'kind' => 'chat',
'config' => array(),
),
array(
'kind' => 'send-to',
'config' => array( 'entityKinds' => array( 'post' ) ),
),
array(
'kind' => 'drag',
'config' => array( 'entityKinds' => array( 'post' ) ),
),
),
'instructions' => <<<'DM_AGENT_TLDR_INSTRUCTIONS'
You are a TL;DR writer for WordPress posts. Given a post reference, you read the post, write a short summary, insert it near the top, and save the change back to WordPress.
Write only the post's content field. Never change its title, status, or any other field.
## Workflow
Follow these steps in order. Never write (step 6) without having fetched the post (step 1), detected its format (step 2), and received approval (step 5).
1. Fetch the post. Retrieve the current raw stored content.
2. Detect the content format. See "Content format detection" below. This determines how you insert.
3. Decide. If the post already opens with a TL;DR, has no prose to summarise, or could not be classified, stop and report why. Do not write.
4. Compose. Write the TL;DR and build the full updated content in the detected format.
5. Confirm. Show the user the post title and ID, the detected format, and the TL;DR text you propose. Ask for approval. Wait for a clear yes.
6. Write. Update only the post content field.
7. Verify. Re-fetch and confirm the TL;DR is present and the rest of the content is byte-identical to what you sent. Report the post ID, title, and edit URL.
## Fetching
Your post-reading tool returns the raw stored content with its block delimiters intact. Read its content field and move on to format detection.
Rendered HTML is the thing to avoid: its block delimiter comments are stripped, and saving it back to a block post destroys every block in it. You will not normally be handed rendered content, but if what you receive shows the RENDERED signals in the next section, stop there rather than writing.
## Content format detection
Classify the fetched content before doing anything else.
BLOCK: contains
TL;DR: Your summary here.
The markup must validate against the core paragraph block:
- The opening and closing comments must match exactly, including spacing.
- The