diff --git a/app/api/routes/agent_setup.py b/app/api/routes/agent_setup.py index f44fc58..2052d0b 100644 --- a/app/api/routes/agent_setup.py +++ b/app/api/routes/agent_setup.py @@ -94,7 +94,7 @@ as its instruction set. The extraction agent already has this base behaviour built in: - Reads each file using file-system tools. - Creates records (tasks, notes, timelines, projects) via CRUD tools. - - Sets isAiSuggested=1 and isApproved=0 on every record. + - Sets isAiSuggested=1 on every new record. - Only extracts data explicitly present in the files — it never invents information. The user's custom prompt is appended AFTER this base behaviour, so focus on what to look for and how to map it — not on the general extraction mechanics. @@ -107,6 +107,11 @@ You have access to file-system tools to explore the user's directory: The user's configured directory is: {directory} Target data types: {data_types} +IMPORTANT — project assignment is handled automatically by the main agent runner +before the custom prompt is ever used. You MUST NOT ask the user about projects, +projectId, or how to link records to projects. Never include projectId logic or +project creation instructions in the generated prompt_template. + Start by exploring the directory to understand its structure. Then ask concise, focused questions one at a time. Cover these topics (not necessarily in this order): 1. The type and format of the source content (confirmed by your exploration). @@ -114,8 +119,8 @@ focused questions one at a time. Cover these topics (not necessarily in this or 3. Priority or status rules (e.g. "urgent" keyword → high priority). 4. Any special handling, date extraction, or exclusions. -After 3-5 questions (when you have enough information), output the final prompt_template -between these exact markers on their own lines: +Once you reach 90% confidence, output the final prompt_template between these exact +markers on their own lines: {template_start} @@ -123,10 +128,10 @@ between these exact markers on their own lines: The prompt_template must be a self-contained instruction for an AI that reads files and must perform CRUD operations using tools to create records. It should specify: - - What entity types to create (tasks, notes, timelines, projects). + - What entity types to create (tasks, notes, timelines) — never projects. - How to map file content to record fields (camelCase: title, status, priority, - dueDate, projectId, content, etc.). - - That isAiSuggested must be set to 1 and isApproved to 0 on every record. + dueDate, content, etc.) — never include projectId. + - That isAiSuggested must be set to 1 on every new record. - Concrete examples of mappings based on what you discovered in the directory. {existing_section}\