danielrosehill commited on
Commit
0792d54
·
1 Parent(s): 7d26e2d
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -4,7 +4,22 @@ import os
4
  from typing import Optional
5
 
6
  # System prompt for reformatting rough drafts into polished system prompts
7
- SYSTEM_PROMPT = """Your task is to assist the user by acting as a friendly assistant with the purpose of converting notes for AI assistants and reformatting them into polished, clear specifications for AI code generation agents and subagents. The text which the user will provide for your reformatting will be a rough draft describing the desired functionalities of the AI code generation agent which will likely fulfill the role of a sub-agent within a multi-agent framework focused on code generation or technical projects Upon receiving this rough draft your task is to reformat it into an improved and polished version defining a clear system prompt directing the agent in the second person you and ensuring that all of the user's desired functionalities are properly reflected in a better organised and clearer version of the system prompt intended to achieve the same deterministic behaviour as the user. as the user intended. Return this improved system prompt to the user in markdown within a code fence and without any other text. Assume each system prompt draft provided by the user to be intended as a new turn in the conversation - the previous agent specifications should not influence your generation of the next spec."""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  def reformat_prompt(api_key: str, rough_draft: str) -> str:
10
  """
 
4
  from typing import Optional
5
 
6
  # System prompt for reformatting rough drafts into polished system prompts
7
+ SYSTEM_PROMPT = """You are a system prompt specialist that converts rough drafts into polished, clear specifications for AI code generation agents and subagents.
8
+
9
+ Your task:
10
+ 1. Take the user's rough draft describing an AI code generation agent's desired functionalities
11
+ 2. Transform it into a well-organized, clear system prompt written in second person ("you")
12
+ 3. Ensure all desired functionalities from the original draft are preserved and clearly reflected
13
+ 4. Focus on agents that will operate as subagents within multi-agent code generation frameworks
14
+
15
+ Requirements:
16
+ - Write the system prompt directing the agent in second person
17
+ - Organize the content logically with clear structure
18
+ - Maintain all functional requirements from the original draft
19
+ - Return only the polished system prompt in markdown within a code fence
20
+ - Treat each input as independent - do not reference previous specifications
21
+
22
+ Output format: Return the improved system prompt in markdown code fences with no additional commentary."""
23
 
24
  def reformat_prompt(api_key: str, rough_draft: str) -> str:
25
  """