ICAS03 commited on
Commit
9a97bef
·
1 Parent(s): 7a1f1e8

- fixed gdrive

Browse files

- modified prompt

Files changed (4) hide show
  1. Project.py +11 -2
  2. google_drive.py +19 -10
  3. notion.py +70 -22
  4. prompt_configs.py +123 -81
Project.py CHANGED
@@ -46,6 +46,7 @@ def call_4o_mini(prompt):
46
  return response.choices[0].message.content
47
  except Exception as e:
48
  return f"Error generating output: {str(e)}"
 
49
 
50
  class Project:
51
  def __init__(self, project_type, session_id=None):
@@ -416,10 +417,18 @@ class Project:
416
  processed_result = {}
417
 
418
  doc_csv = StringIO(sections[0].strip())
419
- doc_df = pd.read_csv(doc_csv, keep_default_na=False)
 
 
 
 
420
 
421
  chat_csv = StringIO(sections[1].strip())
422
- chat_df = pd.read_csv(chat_csv, keep_default_na=False)
 
 
 
 
423
 
424
  processed_result = {
425
  f"{function_name}": pd.concat([
 
46
  return response.choices[0].message.content
47
  except Exception as e:
48
  return f"Error generating output: {str(e)}"
49
+
50
 
51
  class Project:
52
  def __init__(self, project_type, session_id=None):
 
417
  processed_result = {}
418
 
419
  doc_csv = StringIO(sections[0].strip())
420
+ try:
421
+ doc_df = pd.read_csv(doc_csv, keep_default_na=False)
422
+ except pd.errors.ParserError as e:
423
+ print(f"Error processing Document Extraction CSV: {str(e)}")
424
+ continue
425
 
426
  chat_csv = StringIO(sections[1].strip())
427
+ try:
428
+ chat_df = pd.read_csv(chat_csv, keep_default_na=False)
429
+ except pd.errors.ParserError as e:
430
+ print(f"Error processing Chatbot CSV: {str(e)}")
431
+ continue
432
 
433
  processed_result = {
434
  f"{function_name}": pd.concat([
google_drive.py CHANGED
@@ -432,11 +432,20 @@ def upload_to_gdrive(project_name, progress=gr.Progress()):
432
  if project.mandays_results:
433
  for result in project.mandays_results:
434
  function_name = result['function_name']
435
- df = pd.DataFrame(result['result'])
436
- if not df.empty:
437
- csv_content = df.to_csv(index=False)
438
- upload_content(service, subfolder_id, f"{function_name}.csv", csv_content)
439
- progress(0.1, f"Uploaded {function_name}.csv")
 
 
 
 
 
 
 
 
 
440
 
441
  if project.mvp_mandays_results:
442
  for result in project.mvp_mandays_results:
@@ -449,11 +458,11 @@ def upload_to_gdrive(project_name, progress=gr.Progress()):
449
  if isinstance(records, list):
450
  df = pd.DataFrame(records)
451
  if not df.empty:
452
- csv_content = df.to_csv(index=False)
453
-
454
- # Upload the CSV content to Google Drive
455
- upload_content(service, subfolder_id, f"{function_name}_{section_name}.csv", csv_content)
456
- progress(0.1, f"Uploaded {function_name}_{section_name}.csv")
457
  else:
458
  print(f"Unexpected data format for {section_name} in {function_name}.")
459
  else:
 
432
  if project.mandays_results:
433
  for result in project.mandays_results:
434
  function_name = result['function_name']
435
+ result_data = result['result']
436
+
437
+ # Ensure result_data is a list of dictionaries
438
+ if isinstance(result_data, dict) and function_name in result_data:
439
+ actual_data = result_data[function_name]
440
+ df = pd.DataFrame(actual_data)
441
+ if not df.empty:
442
+ # Ensure CSV content is correctly formatted
443
+ csv_content = df.to_csv(index=False)
444
+ # Upload the CSV content to Google Drive
445
+ upload_content(service, subfolder_id, f"{function_name}.csv", csv_content)
446
+ progress(0.1, f"Uploaded {function_name}.csv")
447
+ else:
448
+ print(f"Unexpected result data format for {function_name}.")
449
 
450
  if project.mvp_mandays_results:
451
  for result in project.mvp_mandays_results:
 
458
  if isinstance(records, list):
459
  df = pd.DataFrame(records)
460
  if not df.empty:
461
+ # Ensure CSV content is correctly formatted
462
+ csv_content = df.to_csv(index=False)
463
+ # Upload the CSV content to Google Drive
464
+ upload_content(service, subfolder_id, f"{function_name}_{section_name}.csv", csv_content)
465
+ progress(0.1, f"Uploaded {function_name}_{section_name}.csv")
466
  else:
467
  print(f"Unexpected data format for {section_name} in {function_name}.")
468
  else:
notion.py CHANGED
@@ -193,6 +193,42 @@ def process_mixed_content(content):
193
 
194
  return blocks
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  def upload_blocks_to_notion(notion, page_id, blocks, chunk_size=95):
197
  """Upload blocks to Notion in chunks due to API limits."""
198
  for i in range(0, len(blocks), chunk_size):
@@ -274,37 +310,49 @@ def upload_to_notion(project_name):
274
  if project.mandays_results:
275
  for result in project.mandays_results:
276
  function_name = result['function_name']
277
- df = pd.DataFrame(result['result'])
278
- if not df.empty:
279
- markdown_content = df.to_markdown(index=False)
280
- blocks = markdown_to_notion_blocks(markdown_content)
281
- subpage = notion.pages.create(
282
- parent={"page_id": parent_page_id},
283
- properties={"title": [{"type": "text", "text": {"content": f"{function_name}_mandays"}}]}
284
- )
285
- upload_blocks_to_notion(notion, subpage["id"], blocks)
286
- print(f"Uploaded {function_name}_mandays to Notion")
287
-
 
 
 
 
 
 
 
 
288
  if project.mvp_mandays_results:
289
  for result in project.mvp_mandays_results:
290
  function_name = result['function_name']
291
  result_data = result['result']
292
-
293
- df = pd.DataFrame(result_data)
294
  if isinstance(result_data, dict):
295
  for section_name, records in result_data.items():
296
  if isinstance(records, list):
297
  df = pd.DataFrame(records)
298
  if not df.empty:
299
- markdown_content = df.to_markdown(index=False) # Convert DataFrame to markdown
300
- blocks = markdown_to_notion_blocks(markdown_content)
301
-
302
- subpage = notion.pages.create(
303
- parent={"page_id": parent_page_id},
304
- properties={"title": [{"type": "text", "text": {"content": f"{function_name}_mvp_mandays"}}]}
305
- )
306
- upload_blocks_to_notion(notion, subpage["id"], blocks)
307
- print(f"Uploaded {function_name}_mvp_mandays to Notion")
 
 
 
 
308
 
309
  except Exception as e:
310
  print(f"Failed to upload mandays results to Notion: {e}")
 
193
 
194
  return blocks
195
 
196
+ def mandays_markdown_to_notion_blocks(markdown):
197
+ """Convert markdown text to Notion blocks."""
198
+ blocks = []
199
+ lines = markdown.split('\n')
200
+
201
+ # Check if the markdown is a table
202
+ if lines and '|' in lines[0]:
203
+ # Process as a table
204
+ headers = [header.strip() for header in lines[0].split('|') if header.strip()]
205
+ for line in lines[2:]: # Skip header and separator
206
+ if not line.strip():
207
+ continue
208
+ cells = [cell.strip() for cell in line.split('|') if cell.strip()]
209
+ if len(cells) == len(headers):
210
+ row = {headers[i]: cells[i] for i in range(len(headers))}
211
+ blocks.append({
212
+ "object": "block",
213
+ "type": "table_row",
214
+ "table_row": {
215
+ "cells": [{"type": "text", "text": {"content": cell}} for cell in cells]
216
+ }
217
+ })
218
+ else:
219
+ # Process as regular text
220
+ for line in lines:
221
+ if line.strip():
222
+ blocks.append({
223
+ "object": "block",
224
+ "type": "paragraph",
225
+ "paragraph": {
226
+ "rich_text": [{"type": "text", "text": {"content": line}}]
227
+ }
228
+ })
229
+
230
+ return blocks
231
+
232
  def upload_blocks_to_notion(notion, page_id, blocks, chunk_size=95):
233
  """Upload blocks to Notion in chunks due to API limits."""
234
  for i in range(0, len(blocks), chunk_size):
 
310
  if project.mandays_results:
311
  for result in project.mandays_results:
312
  function_name = result['function_name']
313
+ result_data = result['result']
314
+
315
+ # Ensure result_data is a list of dictionaries
316
+ if isinstance(result_data, dict) and function_name in result_data:
317
+ actual_data = result_data[function_name]
318
+ df = pd.DataFrame(actual_data)
319
+ if not df.empty:
320
+ # Convert DataFrame to markdown
321
+ markdown_content = df.to_markdown(index=False)
322
+ blocks = mandays_markdown_to_notion_blocks(markdown_content)
323
+ subpage = notion.pages.create(
324
+ parent={"page_id": parent_page_id},
325
+ properties={"title": [{"type": "text", "text": {"content": f"{function_name}_mandays"}}]}
326
+ )
327
+ upload_blocks_to_notion(notion, subpage["id"], blocks)
328
+ print(f"Uploaded {function_name}_mandays to Notion")
329
+ else:
330
+ print(f"Unexpected result data format for {function_name}.")
331
+
332
  if project.mvp_mandays_results:
333
  for result in project.mvp_mandays_results:
334
  function_name = result['function_name']
335
  result_data = result['result']
336
+
337
+ # Check if result_data is a dictionary
338
  if isinstance(result_data, dict):
339
  for section_name, records in result_data.items():
340
  if isinstance(records, list):
341
  df = pd.DataFrame(records)
342
  if not df.empty:
343
+ # Convert DataFrame to markdown
344
+ markdown_content = df.to_markdown(index=False)
345
+ blocks = mandays_markdown_to_notion_blocks(markdown_content)
346
+ subpage = notion.pages.create(
347
+ parent={"page_id": parent_page_id},
348
+ properties={"title": [{"type": "text", "text": {"content": f"{function_name}_{section_name}_mvp_mandays"}}]}
349
+ )
350
+ upload_blocks_to_notion(notion, subpage["id"], blocks)
351
+ print(f"Uploaded {function_name}_{section_name}_mvp_mandays to Notion")
352
+ else:
353
+ print(f"Unexpected data format for {section_name} in {function_name}.")
354
+ else:
355
+ print(f"Unexpected result data format for {function_name}.")
356
 
357
  except Exception as e:
358
  print(f"Failed to upload mandays results to Notion: {e}")
prompt_configs.py CHANGED
@@ -5,8 +5,7 @@ from typing import List, Dict, Any, Optional
5
  class ModelType(Enum):
6
  O1_MINI = "o1-mini"
7
  GPT_4O_MINI = "gpt-4o-mini"
8
- TEMP_GPT_4O_MINI = "gpt-4o-mini"
9
-
10
  class UIComponentType(Enum):
11
  TEXTBOX = "textbox"
12
  MARKDOWN = "markdown"
@@ -461,20 +460,27 @@ PROMPTS = {
461
  "generate_intent_list": PromptConfig(
462
  prompt=
463
  """
464
- You are an solution architect and project manager with 20+ years of experience in building chatbots and AI-powered systems.
465
- Your task is to analyze the provided project requirement document and help me understand the complexity of the project by defining ALL possible intents and workflows for each requirement.
466
- Additionally, anticipate and suggest realistic, real-life intents that might have been overlooked by the client but are critical for a robust and user-friendly chatbot. You can reference **how other chatbots in the same industry are functioning** and suggest intents that are commonly provided by competitors but may not have been explicitly mentioned by the client. List down these suggestion in one seperate table.
467
 
468
- Instruction:
469
- 1. **Break Down Requirements**: Identify all the client requirements from the document.
470
- 2. **Define ALL Possible Intents and Workflows**: For each requirement, list ALL possible intents and their corresponding workflows. - Use "→" to represent the flow between steps.
471
- - Provide your analysis in a clear, highly readable and structured table format. The intents to consider are:
472
- - Simple
473
- - Complex
474
- - Multi-Step
475
- - Single-Step
476
- - Fallback.Focus on business-centric fallback (e.g., "Order Management Fallback" should address specific order-related issues like invalid SKU, payment failure, or inventory unavailability)
477
- - Others (if applicable)
 
 
 
 
 
 
 
478
 
479
  Output Format:
480
  Present the analysis in a tabular format with the following structure:
@@ -528,7 +534,7 @@ PROMPTS = {
528
 
529
  Tech Stack:
530
  Backend: FastAPI, Python
531
- Chatbot: Chatbot Builder , COZE , Yellow.ai
532
  Infrastructure: AWS, PostgreSQL, Redis, Docker, Alembic
533
 
534
  Output Format:
@@ -565,7 +571,7 @@ PROMPTS = {
565
  "generate_page_dev_components": PromptConfig(
566
  prompt=
567
  """
568
- as a Senior Software Architect with 20+ years of experience, you are tasked to generate a detailed, actionable, and project-specific component list exclusively for the development phase of the project. The list must align with the project's goals, technical stack, and compliance requirements as outlined in the provided Project Requirement Document (PRD), ensuring granularity and specificity.
569
 
570
  **Specific Requirements:**
571
  1. Extract relevant **granular components** from the PRD that reflect the tasks and deliverables unique to this project.
@@ -1045,39 +1051,63 @@ PROMPTS = {
1045
  "generate_hybrid_plan_test_mandays": PromptConfig(
1046
  prompt=
1047
  """
1048
- You are an experienced project manager tasked to create a detailed task breakdown for a Hybrid project involving both Document Extraction and Chatbot functionalities. The project involves planning and testing components related to document processing, extraction, user interactions, and conversational workflows.
1049
 
1050
  Objective:
1051
- Generate structured CSV outputs with manday estimates for each planning and testing component, separated into Document Extraction and Chatbot sections.
1052
 
1053
- Instructions:
1054
- 1. Input:
1055
- - Use the planning and testing component list to identify all components and subcomponents.
1056
- - The hierarchy of the document is: Phase -> Component -> Subcomponent -> Task.
1057
 
1058
  2. Manday Estimation:
1059
- - Assign manday estimates for each component or subcomponent based on complexity and effort required, ranging from 0.2 to 5 days.
1060
- - Ensure estimates account for real-world complexity, potential delays, and complications.
1061
-
1062
- 3. Output Format Requirements:
1063
- - Generate TWO separate CSV files:
1064
- - First, for the Document Extraction section:
1065
- - Columns: "component, mandays, description".
1066
- - Description must include deliverables and outcomes.
1067
- - Second, for the Chatbot section:
1068
- - Columns: "component, subcomponent, mandays, description".
1069
- - Subcomponents must be clearly listed under each component.
1070
- - Description must include deliverables and outcomes.
1071
- - Clearly indicate Section Breaks between the two files by including:
1072
- ----SECTION BREAK----
1073
-
1074
- 4. Output:
1075
- - Return **ONLY** the CSV content, no code blocks or additional text.
1076
- - Ensure all rows have all columns filled.
1077
- - Numeric values should not be quoted.
1078
- - Text values must be enclosed in double quotes.
1079
- - No empty rows or missing values.
1080
- - Omit the ``` code guards.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1081
  """,
1082
  inputs=["generated_plan_test_components"],
1083
  outputs=["generated_plan_test_mandays"],
@@ -1319,14 +1349,17 @@ PROMPTS = {
1319
  - **MVP Timeline Constraint:** Ensure the final total mandays do not exceed the MVP timeline.
1320
  6. **Justify Adjustments:** Provide a brief explanation for any adjustments made to the mandays, ensuring they align with the timeline and maintain the MVP's core functionality.
1321
 
1322
- Output Format Requirements:
1323
- - **Separate Planning/Testing Components and Development Components:**
1324
- - Planning/Testing Components:
1325
- component,mandays,description,priority
1326
- "Requirements Analysis",0,"Critical user requirements and system specifications","High"
1327
- - Development Components:
1328
- component,subcomponent,mandays,description,priority
1329
- "Frontend","Document Upload Interface",3,"Essential for core functionality of automated document processing","High"
 
 
 
1330
  - Include the "Priority" column for all components.
1331
  - Include the total mandays for the revised plan and confirm whether it fits within the MVP timeline.
1332
  - Ensure the output is concise and actionable.
@@ -1404,17 +1437,22 @@ PROMPTS = {
1404
  8. Justify Adjustments:
1405
  - Provide a brief explanation for any adjustments made to the mandays, ensuring they align with the timeline and maintain the MVP's core functionality.
1406
 
1407
- Output Format Requirements:
1408
- - **Separate Planning/Testing Components , Development Components and MVP Intents:**
1409
- - Planning/Testing Components:
1410
- component,mandays,description,priority
1411
- "Requirements Analysis",0,"Critical user requirements and system specifications","High"
1412
- - Development Components:
1413
- component,subcomponent,mandays,description,priority
1414
- "Frontend","Document Upload Interface",3,"Essential for core functionality of automated document processing","High"
1415
- - MVP Intents:
1416
- intent_type,intent,workflow,mandays
1417
- "Single-Step","Create New Order","1. User initiates order creation → 2. Extract order details from user input → 3. Save order to database → 4. Confirm creation to user",0.3
 
 
 
 
 
1418
  - Include the "Priority" column for all components.
1419
  - Include the total mandays for the revised plan and confirm whether it fits within the MVP timeline.
1420
  - Ensure the output is concise and actionable.
@@ -1426,7 +1464,7 @@ PROMPTS = {
1426
  inputs=["identified_planning_testing_components", "identified_development_components", "identified_mvp_intents", "generated_prd"],
1427
  outputs=["revised_mandays_estimates"],
1428
  model=ModelType.O1_MINI,
1429
- description="Engage MVP Mandays Recalculation",
1430
  step="Step 2 : Mandays & Quotation",
1431
  sub_step="Step 2.3 : Recalculate MVP Mandays",
1432
  ui={
@@ -1512,35 +1550,39 @@ PROMPTS = {
1512
  Using the revised mandays estimates from the previous step, format the output into three clearly separated CSV sections: one for Planning/Testing Components, one for Development Components, and another for MVP Intents.
1513
 
1514
  Objective:
1515
- Structure the output to clearly delineate the two sections while maintaining the original column structure. Ensure that there are no duplicate components or subcomponents in the output.
1516
 
1517
  Output Format Requirements:
1518
- - First Section - Planning & Testing Components:
1519
  component,mandays,description
1520
  "Requirements Analysis",0,"Critical user requirements and system specifications"
1521
 
1522
- - Second Section - Development Components:
1523
  component,subcomponent,mandays,description
1524
  "Backend","Core API Development",3,"Essential API endpoints for basic functionality"
1525
 
1526
- - Third Section - MVP Intents:
1527
  intent_type,intent,workflow,mandays
1528
- "Single-Step","Create New Order","1. User initiates order creation → 2. Extract order details from user input → 3. Save order to database → 4. Confirm creation to user",0.3
1529
-
1530
- Important:
1531
- - Each section must maintain its original column structure.
1532
- - Sections MUST be separated by the marker: "----SECTION BREAK----".
1533
- - Include ALL the components and intents.
1534
- - No empty rows or missing values.
1535
- - Text values must be in double quotes.
1536
- - Numbers must not be in quotes.
1537
-
1538
- Return only the CSV content with the section break, no additional text or explanations.
 
 
 
 
1539
  """,
1540
  inputs=["revised_mandays_estimates"],
1541
  outputs=["generated_MVP_mandays"],
1542
  model=ModelType.O1_MINI,
1543
- description="Generate Engage MVP Mandays",
1544
  step="Step 2 : Mandays & Quotation",
1545
  sub_step="Step 2.4 : Generate MVP Mandays",
1546
  ui={
 
5
  class ModelType(Enum):
6
  O1_MINI = "o1-mini"
7
  GPT_4O_MINI = "gpt-4o-mini"
8
+
 
9
  class UIComponentType(Enum):
10
  TEXTBOX = "textbox"
11
  MARKDOWN = "markdown"
 
460
  "generate_intent_list": PromptConfig(
461
  prompt=
462
  """
463
+ You are a Solution Architect and Project Manager with over 20 years of experience in designing AI-powered chatbots and automation systems. Your task is to analyze the provided Project Requirement Document and generate a comprehensive list of intents and workflows that the chatbot must support.
464
+ The output should focus only on relevant functional intents and workflows that directly impact the chatbot's operations, excluding generic or redundant categories like company overview.
465
+ Additionally, anticipate potential real-world intents that may have been overlooked by the client but are critical for a robust and user-friendly chatbot. You may reference competitor chatbots in the same industry to suggest missing functionalities.
466
 
467
+ Instructions:
468
+ 1. Identify All Requirements
469
+ Carefully analyze the Project Requirement Document to extract all functionalities and pain points that need to be addressed.
470
+
471
+ 2. Define ALL Possible Intents and Workflows
472
+ For each requirement, list all possible intents and categorize them into one of the following types:
473
+ - Simple: Single-turn interactions (e.g., checking order status).
474
+ - Complex: Multi-step interactions requiring conditional logic.
475
+ - Multi-Step: Sequential flows involving multiple confirmations (e.g., creating a new purchase order).
476
+ - Single-Step: One-shot interactions requiring minimal processing.
477
+ - Fallback: Business-centric error handling (e.g., invalid SKU, payment failure, inventory unavailability).
478
+ - Other: Any additional relevant categories.
479
+
480
+ 3. Anticipate Overlooked Intents
481
+ - Identify missing but critical intents based on industry best practices.
482
+ - Reference how competitor chatbots handle similar functionalities.
483
+ - Directly integrate these missing intents into the main intent list.
484
 
485
  Output Format:
486
  Present the analysis in a tabular format with the following structure:
 
534
 
535
  Tech Stack:
536
  Backend: FastAPI, Python
537
+ Chatbot: Chatbot Builder , COZE , Yellow.ai (STRICTLY ONLY if the project involves chatbot functionality)
538
  Infrastructure: AWS, PostgreSQL, Redis, Docker, Alembic
539
 
540
  Output Format:
 
571
  "generate_page_dev_components": PromptConfig(
572
  prompt=
573
  """
574
+ As a Senior Software Architect with 20+ years of experience, you are tasked to generate a detailed, actionable, and project-specific component list exclusively for the development phase of the project. The list must align with the project's goals, technical stack, and compliance requirements as outlined in the provided Project Requirement Document (PRD), ensuring granularity and specificity.
575
 
576
  **Specific Requirements:**
577
  1. Extract relevant **granular components** from the PRD that reflect the tasks and deliverables unique to this project.
 
1051
  "generate_hybrid_plan_test_mandays": PromptConfig(
1052
  prompt=
1053
  """
1054
+ You are an experienced project manager creating a detailed task breakdown for a Hybrid project involving Document Extraction and Chatbot functionalities.
1055
 
1056
  Objective:
1057
+ Generate structured CSV outputs with manday estimates for planning and testing components, strictly separated into Document Extraction and Chatbot sections.
1058
 
1059
+ Strict Requirements:
1060
+ 1. Input Processing:
1061
+ - Use the component list with hierarchy: Phase -> Component -> Subcomponent -> Task
1062
+ - Maintain all original components - never omit any, even if mandays=0
1063
 
1064
  2. Manday Estimation:
1065
+ - Assign mandays from 0.2 to 5 days per component/subcomponent
1066
+ - Base estimates on:
1067
+ * Complexity (simple=0.2-1, medium=1-3, complex=3-5)
1068
+ * Required effort
1069
+ * Real-world contingencies
1070
+
1071
+ 3. Formatting Rules:
1072
+ - TWO distinct CSV sections separated by:
1073
+ ----SECTION BREAK----
1074
+ - Document Extraction section (3 columns):
1075
+ "component","mandays","description"
1076
+ - Chatbot section (4 columns):
1077
+ "component","subcomponent","mandays","description"
1078
+ - All descriptions must include specific deliverables/outcomes
1079
+
1080
+ 4. Output Validation:
1081
+ - Document Extraction: Must have exactly 3 columns
1082
+ - Chatbot: Must have exactly 4 columns
1083
+ - No duplicate components/subcomponents
1084
+ - No empty cells - all columns must be populated
1085
+ - Numbers unquoted, text double-quoted
1086
+ - No markdown (```) or additional text
1087
+ - Always use period decimal (0.5 not 0,5)
1088
+
1089
+ 5. Error Prevention:
1090
+ - If any component lacks details, use "TBD" in description
1091
+ - If unsure about mandays, use 0.5 as default
1092
+ - Never return partial/incomplete data
1093
+
1094
+ Output Example:
1095
+ "component","mandays","description"
1096
+ "Document Processing Setup",2,"Configure OCR engines and validation rules"
1097
+ "Field Extraction Framework",3,"Build template matching system for key fields"
1098
+
1099
+ ----SECTION BREAK----
1100
+
1101
+ "component","subcomponent","mandays","description"
1102
+ "Conversational UI","Dialog Flow Design",4,"Design 10 core conversation paths with validation"
1103
+ "NLU Integration","Intent Classification",3,"Train model on 50+ sample utterances"
1104
+
1105
+ Return ONLY the CSV data with section break - no headers, explanations, or additional text of any kind.
1106
+ - No freeform text outside CSV
1107
+ - No markdown backticks (```)
1108
+ - No incomplete rows
1109
+ - No unescaped quotes
1110
+ - No comma-separated lists in descriptions
1111
  """,
1112
  inputs=["generated_plan_test_components"],
1113
  outputs=["generated_plan_test_mandays"],
 
1349
  - **MVP Timeline Constraint:** Ensure the final total mandays do not exceed the MVP timeline.
1350
  6. **Justify Adjustments:** Provide a brief explanation for any adjustments made to the mandays, ensuring they align with the timeline and maintain the MVP's core functionality.
1351
 
1352
+ Final Output Format Requirements (Strictly Follow):
1353
+ 1. **Planning/Testing Components (CSV):**
1354
+ ```csv
1355
+ component,mandays,description,priority
1356
+ "Requirements Analysis",0,"Critical user requirements","High"
1357
+ ```
1358
+ 2. **Development Components (CSV):**
1359
+ ```csv
1360
+ component,subcomponent,mandays,description,priority
1361
+ "Frontend","Document Upload",3,"Essential UI for uploads","High"
1362
+ ```
1363
  - Include the "Priority" column for all components.
1364
  - Include the total mandays for the revised plan and confirm whether it fits within the MVP timeline.
1365
  - Ensure the output is concise and actionable.
 
1437
  8. Justify Adjustments:
1438
  - Provide a brief explanation for any adjustments made to the mandays, ensuring they align with the timeline and maintain the MVP's core functionality.
1439
 
1440
+ Final Output Format Requirements (Strictly Follow):
1441
+ 1. **Planning/Testing Components (CSV):**
1442
+ ```csv
1443
+ component,mandays,description,priority
1444
+ "Requirements Analysis",0,"Critical user requirements","High"
1445
+ ```
1446
+ 2. **Development Components (CSV):**
1447
+ ```csv
1448
+ component,subcomponent,mandays,description,priority
1449
+ "Frontend","Document Upload",3,"Essential UI for uploads","High"
1450
+ ```
1451
+ 3. **MVP Intents (CSV):**
1452
+ ```csv
1453
+ intent_type,intent,workflow,mandays
1454
+ "Single-Step","Create New Order","1. User initiates order creation → 2. Extract order details → 3. Save order → 4. Confirm creation",0.3
1455
+ ```
1456
  - Include the "Priority" column for all components.
1457
  - Include the total mandays for the revised plan and confirm whether it fits within the MVP timeline.
1458
  - Ensure the output is concise and actionable.
 
1464
  inputs=["identified_planning_testing_components", "identified_development_components", "identified_mvp_intents", "generated_prd"],
1465
  outputs=["revised_mandays_estimates"],
1466
  model=ModelType.O1_MINI,
1467
+ description="Engage/Hybrid MVP Mandays Recalculation",
1468
  step="Step 2 : Mandays & Quotation",
1469
  sub_step="Step 2.3 : Recalculate MVP Mandays",
1470
  ui={
 
1550
  Using the revised mandays estimates from the previous step, format the output into three clearly separated CSV sections: one for Planning/Testing Components, one for Development Components, and another for MVP Intents.
1551
 
1552
  Objective:
1553
+ Structure the output to clearly delineate the three sections while maintaining the original column structure. Ensure that there are no duplicate components or subcomponents in the output.
1554
 
1555
  Output Format Requirements:
1556
+ 1. First Section - Planning & Testing Components (CSV format):
1557
  component,mandays,description
1558
  "Requirements Analysis",0,"Critical user requirements and system specifications"
1559
 
1560
+ 2. Second Section - Development Components (CSV format):
1561
  component,subcomponent,mandays,description
1562
  "Backend","Core API Development",3,"Essential API endpoints for basic functionality"
1563
 
1564
+ 3. Third Section - MVP Intents (CSV format):
1565
  intent_type,intent,workflow,mandays
1566
+ "Single-Step","Create New Order","1. User initiates order creation → 2. Extract order details → 3. Save order → 4. Confirm creation",0.3
1567
+
1568
+ Strict Requirements:
1569
+ - Output MUST be in pure CSV format only, with no additional text, headers, or markdown indicators like ```plaintext```
1570
+ - Sections MUST be separated exactly by: ----SECTION BREAK----
1571
+ - Each section must maintain its specified column structure
1572
+ - Include ALL components and intents without duplication
1573
+ - No empty rows or missing values allowed
1574
+ - All text values must be in double quotes
1575
+ - Numbers must not be in quotes
1576
+ - Ensure the Development Components section has all four columns
1577
+ - Ensure the MVP Intents section has all four columns
1578
+ - The section break must be on its own line with no other content
1579
+
1580
+ Return only the CSV content with the section breaks, absolutely no additional text or explanations before, between, or after the sections.
1581
  """,
1582
  inputs=["revised_mandays_estimates"],
1583
  outputs=["generated_MVP_mandays"],
1584
  model=ModelType.O1_MINI,
1585
+ description="Generate Engage/Hybrid MVP Mandays",
1586
  step="Step 2 : Mandays & Quotation",
1587
  sub_step="Step 2.4 : Generate MVP Mandays",
1588
  ui={