Q40: tasks choose a writing mode; house style applies to conversational work only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
645ce686bb
commit
7be072f8c5
18 files changed
+119
-41
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { WRITING_MODE, type WritingMode } from "../../shared/domain";
|
||||
import { canonicalMentionHandle } from "../../shared/mention-handles";
|
||||
|
||||
const RECORD_LEARNINGS_INSTRUCTION =
|
||||
@@ -16,6 +17,7 @@ export interface TaskExecutionTaskRow {
|
||||
workspace_id: string | null;
|
||||
priority: string;
|
||||
requires_filesystem: number;
|
||||
writing_mode: WritingMode;
|
||||
handoff_json: string | null;
|
||||
origin: string | null;
|
||||
}
|
||||
@@ -132,7 +134,7 @@ function capabilityBriefing(input: AgentInstructionContext): string {
|
||||
);
|
||||
if (input.isCeo) {
|
||||
lines.push(
|
||||
"You are the CEO: you automatically carry every connected service, and access for everyone else is yours to manage — when you delegate work that needs an external service, grant it first with grant_connector and take it back with revoke_connector when done. The company also ships a built-in skill library: staff every hire with the skills their role needs by passing skills to hire_agent (several per person is normal), and adjust later with grant_skill / revoke_skill. You run only with skills granted to you too: grant yourself a playbook before you rely on it. A teammate without the grant cannot use the tool or skill, so grant before you assign. The humanizer skill is company house style — every agent, you included, carries it automatically and must write like a person, not like an AI.",
|
||||
"You are the CEO: you automatically carry every connected service, and access for everyone else is yours to manage — when you delegate work that needs an external service, grant it first with grant_connector and take it back with revoke_connector when done. The company also ships a built-in skill library: staff every hire with the skills their role needs by passing skills to hire_agent (several per person is normal), and adjust later with grant_skill / revoke_skill. You run only with skills granted to you too: grant yourself a playbook before you rely on it. A teammate without the grant cannot use the tool or skill, so grant before you assign. The humanizer skill is company house style — every agent, you included, carries it on conversational work and must write like a person, not like an AI. For specs and API docs pass writing_mode technical to create_task; for output in an exact format pass structured; both skip house style.",
|
||||
);
|
||||
} else if (input.connectorNames.length === 0) {
|
||||
lines.push(
|
||||
@@ -160,6 +162,17 @@ function roleVoice(input: AgentInstructionContext): string {
|
||||
return "You own your craft. Ask the question early instead of guessing, do the work properly, and when you are stuck for more than a few minutes say so in the thread instead of spinning in place.";
|
||||
}
|
||||
|
||||
/** The writing rule for technical and structured tasks, which run without house style. */
|
||||
export function writingModeLines(mode: WritingMode): string[] {
|
||||
if (mode === WRITING_MODE.TECHNICAL) {
|
||||
return ["", "Technical writing: this task's output is a spec or technical document. Be exact and complete: define terms, name types, units and edge cases, prefer lists and tables over prose, and never trade precision for tone."];
|
||||
}
|
||||
if (mode === WRITING_MODE.STRUCTURED) {
|
||||
return ["", "Structured output: the deliverable must match the requested format exactly (JSON, table, template). No prose around it, no extra fields, no commentary inside it."];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function skillToolLines(toolsManifest: string, available: string[]): string[] {
|
||||
const { requiredTools } = JSON.parse(toolsManifest) as { requiredTools: string[] };
|
||||
const missing = requiredTools.filter((tool) => !available.includes(tool));
|
||||
@@ -216,6 +229,7 @@ export function buildTaskPrompt(input: {
|
||||
`Mounts: ${input.isolation.workspaceMountJson}`,
|
||||
);
|
||||
}
|
||||
lines.push(...writingModeLines(input.task.writing_mode));
|
||||
lines.push(...input.handoffLines);
|
||||
lines.push(...input.knowledgeLines);
|
||||
lines.push("", `Secret scope: ${input.isolation.secretScopeJson}`);
|
||||
|
||||
Reference in new issue
Block a user