levisstrauss commited on
Commit
4e9e142
Β·
1 Parent(s): 86d7056

Fix alignment

Browse files
Files changed (1) hide show
  1. app.py +59 -60
app.py CHANGED
@@ -865,73 +865,72 @@ class ProjectPlannerWorkflow:
865
  len([line for line in tasks.split('\n') if "task id" in line.lower()])
866
  )
867
 
868
- # Build the plan document
 
 
 
 
 
 
 
 
869
  plan = f"""# πŸ“‹ Project Plan
870
 
871
- **Generated:** {datetime.now().strftime("%Y-%m-%d %H:%M")}
872
-
873
- ---
874
-
875
- ## πŸ“Š Summary Statistics
876
-
877
- | Metric | Count |
878
- |--------|-------|
879
- | User Stories | {self.stats['user_stories']} |
880
- | Product Features | {self.stats['features']} |
881
- | Engineering Tasks | {self.stats['tasks']} |
882
- | Evaluation Iterations | {self.stats['iterations']} |
883
-
884
- ---
885
-
886
- ## πŸ‘€ User Stories
887
 
888
- {user_stories}
889
-
890
- ---
891
-
892
- ## πŸ“¦ Product Features
893
-
894
- {features}
895
-
896
- ---
897
-
898
- ## πŸ”§ Engineering Tasks
899
-
900
- {tasks}
901
-
902
- ---
903
-
904
- ## πŸ“ Workflow Log
905
-
906
- | Time | Level | Message |
907
- |------|-------|---------|
908
- """
909
 
910
- # Add each log entry as a proper table row
911
- for log_entry in self.workflow_log:
912
- # Escape pipe characters in message to prevent table breaking
913
- message = log_entry['message'].replace('|', '\\|')
914
- plan += f"| {log_entry['timestamp']} | {log_entry['level']} | {message} |\n"
915
 
916
- # Add footer
917
- plan += """
918
- ---
919
-
920
- ## βœ… Next Steps
921
-
922
- 1. Review and prioritize the user stories with stakeholders
923
- 2. Validate feature groupings with the product team
924
- 3. Estimate engineering tasks with the development team
925
- 4. Create sprint plan based on dependencies
926
- 5. Set up project tracking in your preferred tool (Jira, Linear, etc.)
927
-
928
- ---
929
-
930
- *Generated by AI Project Planner | Powered by GPT-3.5*
931
- """
932
 
933
- return plan
 
 
 
 
 
 
 
 
 
 
 
 
 
 
934
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
935
 
936
  # ============================================================================
937
  # GRADIO INTERFACE
 
865
  len([line for line in tasks.split('\n') if "task id" in line.lower()])
866
  )
867
 
868
+ # Build workflow log table rows first
869
+ log_rows = []
870
+ for log_entry in self.workflow_log:
871
+ message = log_entry['message'].replace('|', '-')
872
+ log_rows.append(f"| {log_entry['timestamp']} | {log_entry['level']} | {message} |")
873
+
874
+ workflow_log_table = "\n".join(log_rows)
875
+
876
+ # Build the plan document - NO INDENTATION in the string
877
  plan = f"""# πŸ“‹ Project Plan
878
 
879
+ **Generated:** {datetime.now().strftime("%Y-%m-%d %H:%M")}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
880
 
881
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
882
 
883
+ ## πŸ“Š Summary Statistics
 
 
 
 
884
 
885
+ | Metric | Count |
886
+ |--------|-------|
887
+ | User Stories | {self.stats['user_stories']} |
888
+ | Product Features | {self.stats['features']} |
889
+ | Engineering Tasks | {self.stats['tasks']} |
890
+ | Evaluation Iterations | {self.stats['iterations']} |
 
 
 
 
 
 
 
 
 
 
891
 
892
+ ---
893
+
894
+ ## πŸ‘€ User Stories
895
+
896
+ {user_stories}
897
+
898
+ ---
899
+
900
+ ## πŸ“¦ Product Features
901
+
902
+ {features}
903
+
904
+ ---
905
+
906
+ ## πŸ”§ Engineering Tasks
907
 
908
+ {tasks}
909
+
910
+ ---
911
+
912
+ ## πŸ“ Workflow Log
913
+
914
+ | Time | Level | Message |
915
+ |------|-------|---------|
916
+ {workflow_log_table}
917
+
918
+ ---
919
+
920
+ ## βœ… Next Steps
921
+
922
+ 1. Review and prioritize the user stories with stakeholders
923
+ 2. Validate feature groupings with the product team
924
+ 3. Estimate engineering tasks with the development team
925
+ 4. Create sprint plan based on dependencies
926
+ 5. Set up project tracking in your preferred tool (Jira, Linear, etc.)
927
+
928
+ ---
929
+
930
+ *Generated by AI Project Planner | Powered by GPT-3.5*
931
+ """
932
+
933
+ return plan
934
 
935
  # ============================================================================
936
  # GRADIO INTERFACE