Performance Review Writer
Run ID: 69cb21fa61b1021a29a863942026-03-31HR
PantheraHive BOS
BOS Dashboard

Generate comprehensive performance reviews with goal assessments, competency ratings, development plans, and constructive feedback frameworks.

The following detailed output serves as the foundational research for the "Performance Review Writer" workflow. It outlines the essential components, best practices, common challenges, and the strategic role of AI in generating comprehensive, effective, and fair performance reviews.


Performance Review Writer: Comprehensive Research & Best Practices

This document provides a detailed overview of the core principles and components required for generating high-quality performance reviews. It is designed to equip users with a robust understanding, ensuring the "Performance Review Writer" workflow produces professional, impactful, and actionable feedback.

1. Introduction to Performance Review Writing

Performance reviews are critical tools for employee development, engagement, and organizational success. They provide a structured opportunity to assess an individual's performance against predefined goals and competencies, offer constructive feedback, recognize achievements, and plan for future growth. An effective performance review is objective, specific, balanced, and forward-looking, fostering a culture of continuous improvement.

The "Performance Review Writer" workflow aims to streamline and enhance this process by leveraging advanced AI capabilities to generate detailed, professional, and consistent reviews, reducing administrative burden while maximizing quality.

2. Core Components of a Comprehensive Performance Review

A robust performance review typically includes several key sections that collectively paint a holistic picture of an employee's performance and potential.

2.1. Goal Assessments

This section evaluates the employee's progress and achievement against their pre-defined objectives for the review period.

  • Objective Definition: Clearly state each SMART (Specific, Measurable, Achievable, Relevant, Time-bound) goal.
  • Achievement Level: Rate the level of accomplishment for each goal (e.g., Exceeded Expectations, Met Expectations, Partially Met Expectations, Did Not Meet Expectations).
  • Evidence and Context: Provide specific examples, data, or results that support the achievement level. Explain any contributing factors or challenges encountered.
  • Impact: Describe the tangible impact of the employee's performance on the team, department, or organization.

2.2. Competency Ratings

This section assesses the employee's demonstration of core skills, behaviors, and attributes relevant to their role and the organization's values.

  • Defined Competencies: List relevant competencies (e.g., Communication, Teamwork, Problem-Solving, Leadership, Adaptability, Innovation, Customer Focus).
  • Rating Scale: Use a consistent scale (e.g., Needs Development, Meets Expectations, Exceeds Expectations, Role Model).
  • Behavioral Examples: For each competency, provide specific examples of how the employee demonstrated (or failed to demonstrate) the behavior. Use the STAR method (Situation, Task, Action, Result) for clarity.
  • Alignment: Link competency demonstration to organizational values and cultural expectations.

2.3. Development Plans

This forward-looking section outlines specific actions and resources to support the employee's professional growth and address areas for improvement.

  • Identified Areas for Development: Clearly state 1-3 specific areas where the employee can grow. These should ideally stem from the goal assessments and competency ratings.
  • SMART Development Goals: For each area, define specific, measurable, achievable, relevant, and time-bound goals.
  • Actionable Steps: Outline concrete steps the employee will take (e.g., attend a workshop, shadow a colleague, lead a specific project, seek mentorship, complete online courses).
  • Required Support/Resources: Specify what the manager or organization will provide (e.g., training budget, mentorship connection, time off for learning).
  • Timeline and Check-ins: Establish a realistic timeline for achieving development goals and schedule follow-up discussions.

2.4. Constructive Feedback Frameworks

Effective feedback is crucial for growth. Utilizing structured frameworks ensures feedback is clear, actionable, and well-received.

  • STAR Method (Situation, Task, Action, Result):

* Situation: Describe the context or background.

* Task: Explain what needed to be done.

* Action: Detail the specific action the employee took.

* Result: Describe the outcome of their action.

Example:* "During the Q3 project deadline (Situation), you were responsible for integrating the new CRM module (Task). You proactively identified a critical data migration error and worked overtime to correct it (Action), which ensured the project launched on schedule and prevented potential client data loss (Result)."

  • SBI (Situation-Behavior-Impact):

* Situation: When and where the behavior occurred.

* Behavior: The specific action or statement observed.

* Impact: The consequence of that behavior.

Example:* "During the team meeting yesterday (Situation), when John was presenting his proposal, you interrupted him several times (Behavior). This made John seem flustered and prevented him from fully explaining his ideas, impacting the overall flow of the discussion (Impact)."

  • "Start, Stop, Continue" Framework:

* Start: What new behaviors or actions should the employee begin doing?

* Stop: What behaviors or actions should the employee cease doing?

* Continue: What positive behaviors or actions should the employee maintain?

3. Best Practices for Crafting Effective Performance Reviews

Adhering to these best practices ensures reviews are fair, motivating, and lead to positive outcomes.

  • Be Objective and Evidence-Based: Ground all feedback in specific, observable behaviors and measurable results. Avoid subjective statements or generalizations.
  • Focus on Behaviors, Not Personality: Critique actions, not inherent traits. This makes feedback actionable.
  • Maintain a Balanced Perspective: Highlight strengths and accomplishments alongside areas for development. Acknowledge effort and progress.
  • Be Specific and Provide Examples: Vague feedback ("good communicator") is unhelpful. Specific examples ("you clearly articulated the project plan during the client presentation") are crucial.
  • Be Forward-Looking: Emphasize growth, learning, and future contributions rather than solely dwelling on past mistakes.
  • Ensure Alignment: Connect individual performance to team goals, departmental objectives, and organizational values.
  • Use Clear and Concise Language: Avoid jargon or overly complex sentences. The review should be easy for the employee to understand.
  • Maintain a Professional and Respectful Tone: Even when delivering critical feedback, the tone should be supportive and constructive.
  • Avoid Bias: Be mindful of common biases (recency, leniency, halo/horn effect) and actively work to mitigate them through documentation and objective assessment.
  • Facilitate Dialogue: The review document is a basis for discussion, not a final verdict. It should encourage open conversation and mutual understanding.

4. Common Challenges in Performance Review Writing

Recognizing these challenges helps in proactively addressing them, especially when leveraging AI.

  • Lack of Specific Examples: Managers often struggle to recall specific instances of behavior throughout the year, leading to generic feedback.
  • Recency Bias: Over-emphasizing recent performance (positive or negative) while overlooking earlier contributions.
  • Leniency or Severity Bias: Managers being overly generous or overly critical, often due to personal relationships or lack of confidence in delivering tough feedback.
  • Central Tendency Bias: Rating everyone as "average" to avoid conflict or difficult decisions.
  • Halo/Horn Effect: One outstanding (or poor) trait influencing the overall perception of all other aspects of performance.
  • Time Consumption: The process of gathering data, writing, and refining reviews can be extremely time-intensive.
  • Emotional Discomfort: Delivering difficult feedback can be uncomfortable for managers, leading to avoidance or sugar-coating.
  • Inconsistency: Different managers may use different standards or language, leading to a lack of fairness across the organization.

5. Leveraging AI (Gemini) for Enhanced Performance Review Writing

AI, specifically models like Gemini, can significantly enhance the performance review writing process by addressing many of the common challenges and streamlining workflows.

  • Data Synthesis and Analysis: AI can quickly process and synthesize vast amounts of input data (e.g., self-assessments, 360-degree feedback, project management notes, communication logs, goal tracking systems) to identify patterns, achievements, and areas for development.
  • Draft Generation: AI can generate initial drafts of performance review sections, including goal assessments, competency ratings with suggested examples, and development plan outlines, saving managers significant time.
  • Ensuring Consistency and Fairness: By applying predefined frameworks and guidelines, AI can help ensure consistent language, tone, and evaluation standards across all reviews, reducing unconscious bias.
  • Suggesting Specific Examples: Based on parsed data, AI can suggest specific behavioral examples to support ratings, addressing the "lack of specific examples" challenge.
  • Identifying Gaps and Opportunities: AI can analyze performance data to pinpoint skill gaps and recommend relevant training, courses, or mentorship opportunities for personalized development plans.
  • Language Refinement and Tone Adjustment: AI can review drafts for clarity, conciseness, grammar, and tone, ensuring the feedback is professional, constructive, and impactful.
  • Bias Detection: Advanced AI models can be trained to flag potentially biased language or patterns in reviews, prompting human reviewers to reconsider their wording or assessment.
  • Customization: AI can adapt the review content to specific roles, team structures, and organizational cultural nuances.

By integrating these AI capabilities, the "Performance Review Writer" workflow aims to produce high-quality, comprehensive, and actionable performance reviews efficiently, empowering managers and fostering employee growth.

gemini Output

Empower Your Team with Precision: Introducing the AI-Powered Performance Review Writer

Streamline Your Review Process, Elevate Employee Growth

Performance reviews are the cornerstone of employee development and organizational success. Yet, crafting comprehensive, fair, and actionable reviews can be a time-consuming and challenging task for even the most seasoned managers and HR professionals.

PantheraHive's AI-Powered Performance Review Writer is meticulously designed to transform this critical process. Say goodbye to generic feedback and inconsistent evaluations. Our advanced tool empowers you to generate detailed, professional, and impactful performance reviews that foster growth, clarify expectations, and drive your team towards excellence.


Unlock the Power of Intelligent Performance Reviews

Our Performance Review Writer goes beyond basic templates, leveraging sophisticated AI to produce reviews that are tailored, insightful, and ready for effective dialogue. Discover the core components that make our solution indispensable:

1. Comprehensive Review Generation

Generate complete performance reviews from start to finish, including introductory summaries, detailed sections, and concluding remarks. Our AI ensures a professional tone and consistent structure, saving you countless hours of drafting and editing.

2. Objective Goal Assessment & Tracking

Seamlessly integrate and evaluate employee performance against predefined goals and objectives.

  • Quantitative & Qualitative Analysis: Assess progress on KPIs, project milestones, and individual targets.
  • Gap Identification: Clearly highlight areas where goals were met, exceeded, or require further attention.
  • Future Goal Setting: Automatically suggest SMART (Specific, Measurable, Achievable, Relevant, Time-bound) goals based on past performance and future aspirations.

3. Structured Competency Ratings & Evaluation

Move beyond subjective opinions with a standardized approach to evaluating core competencies.

  • Customizable Competency Frameworks: Align reviews with your organization's unique values and required skill sets (e.g., leadership, teamwork, problem-solving, communication).
  • Behavioral Indicators: Generate specific examples of behaviors that demonstrate proficiency (or areas for improvement) within each competency.
  • Rating Scales Integration: Support various rating scales (e.g., 1-5, Meets Expectations, Exceeds Expectations) for consistent and fair evaluation across the organization.

4. Actionable Development Plans

Turn feedback into tangible growth opportunities with personalized development plans.

  • Skill Gap Analysis: Pinpoint specific skills or knowledge areas that require development based on performance and competency ratings.
  • Recommended Learning Resources: Suggest relevant training programs, courses, mentorship opportunities, or on-the-job experiences.
  • Timeline & Milestones: Structure development plans with clear timelines and measurable milestones to track progress effectively.

5. Constructive Feedback Frameworks

Deliver feedback that motivates and guides, rather than demotivates.

  • STAR Method Integration: Guide managers in providing feedback using the Situation, Task, Action, Result framework for clarity and impact.
  • Strengths-Based Approach: Emphasize successes and leverage strengths while gently addressing areas for improvement.
  • Forward-Looking Language: Frame feedback to focus on future actions and positive outcomes.
  • Fairness & Objectivity: Reduce bias by providing data-driven and behavior-specific feedback suggestions.

Why Choose PantheraHive's Performance Review Writer?

  • Time-Saving Efficiency: Drastically reduce the time spent on drafting reviews, allowing managers to focus more on coaching and strategic initiatives.
  • Consistency & Fairness: Ensure a standardized, objective, and equitable review process across your entire organization, minimizing bias.
  • Enhanced Employee Engagement: Provide clear, actionable, and constructive feedback that empowers employees to understand their impact and growth trajectory.
  • Data-Driven Insights: Leverage AI to identify trends, pinpoint development needs, and inform broader talent management strategies.
  • Professional & Polished Output: Deliver high-quality, articulate reviews that reflect positively on your organization.

Ready to Transform Your Performance Management?

Stop dreading performance review season and start empowering your team with clarity and direction. PantheraHive's AI-Powered Performance Review Writer is your partner in fostering a culture of continuous improvement and high performance.

Take the next step towards smarter, more effective performance reviews.

[Request a Demo Today] | [Learn More About Our HR Solutions]

gemini Output

Comprehensive Performance Review Framework

This document outlines a structured, detailed, and professional framework for generating comprehensive performance reviews. It integrates goal assessments, competency ratings, development plans, and a constructive feedback methodology to ensure a holistic evaluation and foster employee growth. This framework is designed to be adaptable across various roles and departments, providing a consistent and fair approach to performance management.


1. Performance Review Introduction & Overall Summary

Purpose: To provide a high-level overview of the employee's performance during the review period, setting the context for the detailed sections that follow.

  • Review Period: Clearly state the start and end dates of the performance review period.
  • Employee Information:

* Employee Name

* Job Title

* Department

* Manager Name

* Review Date

  • Overall Performance Summary:

* Provide a concise paragraph summarizing the employee's general performance. Highlight key strengths and areas for improvement at a high level.

* Example: "During the [Review Period], [Employee Name] consistently demonstrated strong analytical skills and a proactive approach to problem-solving. While achieving significant progress on key projects, there are opportunities to further enhance cross-functional collaboration and delegation skills."

  • Key Accomplishments (Snapshot): Briefly list 2-3 most significant achievements.

2. Goal Assessment & Achievement

Purpose: To evaluate the employee's progress and achievement against pre-defined objectives and key results (OKRs) or SMART goals.

  • Structure for Each Goal:

* Goal Description: State the original goal clearly and concisely.

* Target/Metric: Specify the measurable target associated with the goal (e.g., "Increase customer satisfaction by 15%").

* Actual Outcome/Result: Detail the actual achievement or progress made. Quantify results wherever possible.

* Analysis of Achievement:

* Exceeded/Met/Partially Met/Did Not Meet: Assign a clear status.

Contributing Factors: Explain why* the goal was achieved, partially achieved, or not achieved (e.g., strong individual effort, effective teamwork, unforeseen challenges, resource constraints).

* Impact: Describe the positive or negative impact of the outcome on the team, department, or organization.

* Next Steps/Adjustments: If a goal was not fully met, outline what actions will be taken or if the goal needs to be carried over or revised.

  • Example Structure:

* Goal 1: Lead the redesign of the client onboarding process.

* Target: Reduce onboarding time by 20% and improve client satisfaction scores by 10% by Q4.

* Actual Outcome: Onboarding time reduced by 18%. Client satisfaction scores increased by 8%. New process fully implemented.

* Analysis: Met most targets. The slight miss on client satisfaction was due to initial teething problems with a new software integration, which has since been resolved. [Employee Name] demonstrated exceptional project management and stakeholder communication.

* Impact: Enhanced client experience, reduced operational overhead by 15 hours/week.

* Next Steps: Monitor Q1 client satisfaction for sustained improvement.


3. Competency Ratings & Behavioral Assessment

Purpose: To evaluate the employee's performance against core organizational competencies and job-specific skills, providing insight into how they achieve their goals.

  • Rating Scale: Clearly define the rating scale used (e.g., 1-5, Needs Development to Exceeds Expectations).

Example Scale:*

* 5 - Exceeds Expectations: Consistently performs above the requirements, demonstrates exceptional skill.

* 4 - Meets Expectations: Consistently performs at the expected level, demonstrates required skill.

* 3 - Developing: Shows progress but needs further development to consistently meet expectations.

* 2 - Needs Improvement: Performance is below expectations, significant development required.

* 1 - Unsatisfactory: Performance consistently falls far below expectations.

  • Core Competencies (Examples):

* Communication: Clarity, listening, written and verbal expression.

* Teamwork & Collaboration: Cooperation, sharing knowledge, supporting colleagues.

* Problem-Solving & Decision Making: Analytical thinking, root cause identification, sound judgment.

* Adaptability & Innovation: Openness to change, creative thinking, learning new skills.

* Leadership & Initiative (if applicable): Guiding others, taking ownership, proactive contributions.

* Job-Specific Technical Skills: Relevant to the role (e.g., coding, financial analysis, sales acumen).

  • Assessment for Each Competency:

* Competency Name: (e.g., "Communication")

* Rating: (e.g., 4 - Meets Expectations)

* Specific Examples & Evidence: Provide concrete instances that support the rating.

Strengths:* Detail specific behaviors or actions where the employee excelled. "During the Q3 project, [Employee Name] proactively communicated potential roadblocks to stakeholders, ensuring everyone was aligned and issues were addressed swiftly."

Areas for Development:* Detail specific behaviors or actions where the employee needs improvement. "While [Employee Name] is excellent at written communication, there have been instances in team meetings where active listening could be improved to fully grasp team member perspectives before responding."


4. Development Plan & Growth Opportunities

Purpose: To outline specific actions and resources for the employee's professional growth and skill enhancement, directly linking to identified areas for development.

  • Structure for Each Development Area:

* Development Area: Clearly state the skill or competency to be developed (e.g., "Enhance Cross-Functional Collaboration").

Rationale/Why it's Important: Explain why* this development is beneficial for the employee and the organization (e.g., "Improved collaboration will streamline project delivery and foster stronger inter-departmental relationships.").

* Actionable Steps: List specific, measurable actions the employee will take.

Example:* "Actively seek out opportunities to partner with the Marketing team on at least one joint initiative per quarter."

Example:* "Complete the 'Effective Delegation' online course by [Date]."

Example:* "Shadow a senior manager during a client negotiation session."

* Resources/Support: Identify what resources will be provided (e.g., training courses, mentorship, books, project assignments, manager support).

* Timeline: Set a realistic timeframe for completing each action step.

* Success Metrics: How will success be measured? (e.g., "Successful completion of joint initiative, feedback from Marketing team," "Certificate of completion," "Manager observation and feedback.")


5. Constructive Feedback Framework & Future Outlook

Purpose: To provide a structured approach for delivering feedback, encouraging dialogue, and setting a positive direction for future performance.

  • Feedback Delivery Principles:

* Specific & Factual: Focus on observable behaviors and impacts, not assumptions or personality traits.

* Timely: Provide feedback as close to the event as possible.

* Balanced: Include both positive reinforcement and areas for improvement.

* Action-Oriented: Focus on what can be done differently in the future.

* Collaborative: Encourage the employee to self-reflect and contribute to solutions.

* Private: Deliver feedback in a confidential setting.

  • Manager's Overall Constructive Feedback:

* Summarize key takeaways from the review.

* Reiterate appreciation for contributions.

* Address any significant challenges or successes not covered elsewhere.

* Encourage open discussion.

  • Employee's Self-Assessment & Comments:

* Provide space for the employee to reflect on their own performance, achievements, and development needs.

* Allow them to comment on the review content, agree or disagree, and provide additional context.

  • Future Outlook & Expectations:

* Discuss upcoming projects, priorities, and any changes in responsibilities.

* Reiterate alignment with organizational goals.

* Express confidence in the employee's ability to grow and contribute.


6. Sign-off & Next Steps

Purpose: To formalize the review process and outline the subsequent actions.

  • Signatures:

* Employee Signature: (Acknowledges receipt and discussion, not necessarily agreement)

* Manager Signature:

* Date:

  • Follow-up Actions:

* Schedule regular check-ins to monitor development plan progress.

* Confirm new goals for the upcoming review period.

* Review and update job description if responsibilities have significantly changed.

* Document the completed review in the HR system.


This comprehensive performance review framework ensures that evaluations are thorough, objective, and forward-looking, serving as a powerful tool for both performance management and employee development.

performance_review_writer.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
\n\n\n"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n \n \n \n)\n"); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react'\nimport './App.css'\n\nfunction App(){\n return(\n
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n
\n )\n}\nexport default App\n"); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e}\n.app{min-height:100vh;display:flex;flex-direction:column}\n.app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px}\nh1{font-size:2.5rem;font-weight:700}\n"); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\n## Open in IDE\nOpen the project folder in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "type": "module",\n "scripts": {\n "dev": "vite",\n "build": "vue-tsc -b && vite build",\n "preview": "vite preview"\n },\n "dependencies": {\n "vue": "^3.5.13",\n "vue-router": "^4.4.5",\n "pinia": "^2.3.0",\n "axios": "^1.7.9"\n },\n "devDependencies": {\n "@vitejs/plugin-vue": "^5.2.1",\n "typescript": "~5.7.3",\n "vite": "^6.0.5",\n "vue-tsc": "^2.2.0"\n }\n}\n'); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport { resolve } from 'path'\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: { alias: { '@': resolve(__dirname,'src') } }\n})\n"); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]}\n'); zip.file(folder+"tsconfig.app.json",'{\n "compilerOptions":{\n "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"],\n "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true,\n "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue",\n "strict":true,"paths":{"@/*":["./src/*"]}\n },\n "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"]\n}\n'); zip.file(folder+"env.d.ts","/// \n"); zip.file(folder+"index.html","\n\n\n \n \n "+slugTitle(pn)+"\n\n\n
\n \n\n\n"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './assets/main.css'\n\nconst app = createApp(App)\napp.use(createPinia())\napp.mount('#app')\n"); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue","\n\n\n\n\n"); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547}\n"); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\nOpen in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build",\n "test": "ng test"\n },\n "dependencies": {\n "@angular/animations": "^19.0.0",\n "@angular/common": "^19.0.0",\n "@angular/compiler": "^19.0.0",\n "@angular/core": "^19.0.0",\n "@angular/forms": "^19.0.0",\n "@angular/platform-browser": "^19.0.0",\n "@angular/platform-browser-dynamic": "^19.0.0",\n "@angular/router": "^19.0.0",\n "rxjs": "~7.8.0",\n "tslib": "^2.3.0",\n "zone.js": "~0.15.0"\n },\n "devDependencies": {\n "@angular-devkit/build-angular": "^19.0.0",\n "@angular/cli": "^19.0.0",\n "@angular/compiler-cli": "^19.0.0",\n "typescript": "~5.6.0"\n }\n}\n'); zip.file(folder+"angular.json",'{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "newProjectRoot": "projects",\n "projects": {\n "'+pn+'": {\n "projectType": "application",\n "root": "",\n "sourceRoot": "src",\n "prefix": "app",\n "architect": {\n "build": {\n "builder": "@angular-devkit/build-angular:application",\n "options": {\n "outputPath": "dist/'+pn+'",\n "index": "src/index.html",\n "browser": "src/main.ts",\n "tsConfig": "tsconfig.app.json",\n "styles": ["src/styles.css"],\n "scripts": []\n }\n },\n "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"}\n }\n }\n }\n}\n'); zip.file(folder+"tsconfig.json",'{\n "compileOnSave": false,\n "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]},\n "references":[{"path":"./tsconfig.app.json"}]\n}\n'); zip.file(folder+"tsconfig.app.json",'{\n "extends":"./tsconfig.json",\n "compilerOptions":{"outDir":"./dist/out-tsc","types":[]},\n "files":["src/main.ts"],\n "include":["src/**/*.d.ts"]\n}\n'); zip.file(folder+"src/index.html","\n\n\n \n "+slugTitle(pn)+"\n \n \n \n\n\n \n\n\n"); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, appConfig)\n .catch(err => console.error(err));\n"); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; }\n"); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n standalone: true,\n imports: [RouterOutlet],\n templateUrl: './app.component.html',\n styleUrl: './app.component.css'\n})\nexport class AppComponent {\n title = '"+pn+"';\n}\n"); zip.file(folder+"src/app/app.component.html","
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n \n
\n"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1}\n"); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n provideRouter(routes)\n ]\n};\n"); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nng serve\n# or: npm start\n\`\`\`\n\n## Build\n\`\`\`bash\nng build\n\`\`\`\n\nOpen in VS Code with Angular Language Service extension.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n.angular/\n"); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join("\n"):"# add dependencies here\n"; zip.file(folder+"main.py",src||"# "+title+"\n# Generated by PantheraHive BOS\n\nprint(title+\" loaded\")\n"); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n\`\`\`\n\n## Run\n\`\`\`bash\npython main.py\n\`\`\`\n"); zip.file(folder+".gitignore",".venv/\n__pycache__/\n*.pyc\n.env\n.DS_Store\n"); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+"\n"; zip.file(folder+"package.json",pkgJson); var fallback="const express=require(\"express\");\nconst app=express();\napp.use(express.json());\n\napp.get(\"/\",(req,res)=>{\n res.json({message:\""+title+" API\"});\n});\n\nconst PORT=process.env.PORT||3000;\napp.listen(PORT,()=>console.log(\"Server on port \"+PORT));\n"; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000\n"); zip.file(folder+".gitignore","node_modules/\n.env\n.DS_Store\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\n\`\`\`\n\n## Run\n\`\`\`bash\nnpm run dev\n\`\`\`\n"); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:"\n\n\n\n\n"+title+"\n\n\n\n"+code+"\n\n\n\n"; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */\n*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e}\n"); zip.file(folder+"script.js","/* "+title+" — scripts */\n"); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Open\nDouble-click \`index.html\` in your browser.\n\nOr serve locally:\n\`\`\`bash\nnpx serve .\n# or\npython3 -m http.server 3000\n\`\`\`\n"); zip.file(folder+".gitignore",".DS_Store\nnode_modules/\n.env\n"); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/\.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/\*\*(.+?)\*\*/g,"$1"); hc=hc.replace(/\n{2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\nFiles:\n- "+app+".md (Markdown)\n- "+app+".html (styled HTML)\n"); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); } function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}