snow-flow 1.1.66 → 1.1.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -365,11 +365,45 @@ function buildClaudeCodePrompt(objective, taskAnalysis, options, isAuthenticated
365
365
  const hasIntelligentFeatures = options.autoPermissions || options.smartDiscovery ||
366
366
  options.liveTesting || options.autoDeploy || options.autoRollback ||
367
367
  options.sharedMemory || options.progressMonitoring;
368
- const prompt = `# Snow-Flow ServiceNow Multi-Agent Development
368
+ const prompt = `# Snow-Flow ServiceNow Development
369
369
 
370
- ## Objective
370
+ ## 🎯 Objective
371
371
  ${objective}
372
372
 
373
+ ## 🧠 Team-Based SPARC Architecture (v1.1.62+)
374
+
375
+ **Use specialized teams for ServiceNow development:**
376
+
377
+ ### Widget Development Team
378
+ \`\`\`bash
379
+ snow-flow sparc team widget "${objective}"
380
+ \`\`\`
381
+ **Team**: Frontend + Backend + UI/UX + Platform + QA Specialists
382
+
383
+ ### Flow Development Team
384
+ \`\`\`bash
385
+ snow-flow sparc team flow "${objective}"
386
+ \`\`\`
387
+ **Team**: Process + Trigger + Data + Integration + Security Specialists
388
+
389
+ ### Application Development Team
390
+ \`\`\`bash
391
+ snow-flow sparc team app "${objective}"
392
+ \`\`\`
393
+ **Team**: Database + Business Logic + Interface + Security + Performance Specialists
394
+
395
+ ### Individual Specialists (for focused tasks)
396
+ \`\`\`bash
397
+ snow-flow sparc frontend "mobile responsiveness"
398
+ snow-flow sparc backend "API optimization"
399
+ snow-flow sparc security "access control review"
400
+ \`\`\`
401
+
402
+ ## 📊 Task Analysis
403
+ - **Task Type**: ${taskAnalysis.taskType}
404
+ - **Complexity**: ${taskAnalysis.complexity}
405
+ - **Recommended Team**: ${getTeamRecommendation(taskAnalysis.taskType)}
406
+
373
407
  ## 🧠 Intelligent Agent Analysis
374
408
  - **Task Type**: ${taskAnalysis.taskType}
375
409
  - **Primary Agent**: ${taskAnalysis.primaryAgent}
@@ -409,100 +443,16 @@ ${hasIntelligentFeatures ? `
409
443
  - **Agent Requirements**: ${taskAnalysis.primaryAgent} (lead) + ${taskAnalysis.supportingAgents.join(', ')} (support)
410
444
  - **Complexity Assessment**: ${taskAnalysis.complexity} task requiring ${taskAnalysis.estimatedAgentCount} agents
411
445
 
412
- ## ServiceNow Integration
413
- ${isAuthenticated ? '✅ **Live ServiceNow Integration: ENABLED**' : '❌ **Live ServiceNow Integration: DISABLED**'}
446
+ ## 🔧 ServiceNow Integration
447
+ ${isAuthenticated ? '✅ **Live ServiceNow Access: ENABLED**' : '❌ **ServiceNow Access: DISABLED** - Run \`snow-flow auth login\` to enable'}
414
448
 
415
449
  ${isAuthenticated ? `
416
- 🔗 **You have LIVE ACCESS to ServiceNow APIs and can create artifacts directly in ServiceNow!**
417
-
418
- 🚨 **CRITICAL: You have ServiceNow MCP tools available for direct deployment:**
419
-
420
- Available ServiceNow MCP Tools:
421
- - **ServiceNowClient**: Create widgets, workflows, and applications directly
422
- - **ServiceNowOAuth**: Authenticated access to ServiceNow APIs
423
- - **Direct API Access**: Use REST APIs to create and deploy artifacts immediately
424
-
425
- **MANDATORY: Use ServiceNow API calls to deploy widgets directly:**
426
- 1. **Create artifacts in ServiceNow using ServiceNowClient.createWidget()**
427
- 2. **Test functionality immediately in the live ServiceNow instance**
428
- 3. **Generate update sets for deployment**
429
- 4. **Provide direct links to created artifacts**
430
-
431
- ⚠️ **DO NOT say you cannot deploy to ServiceNow** - you CAN and SHOULD deploy directly using the available ServiceNow API tools!
432
-
433
- **Example ServiceNow Widget Creation:**
434
- \`\`\`typescript
435
- import { ServiceNowClient } from '../utils/servicenow-client.js';
436
-
437
- const client = new ServiceNowClient();
438
- const widget = await client.createWidget({
439
- name: 'incident_management_widget',
440
- title: 'Incident Management Widget',
441
- description: 'Enhanced incident management with visual features',
442
- template: '<!-- Your HTML template -->',
443
- css: '/* Your CSS styles */',
444
- client_script: '/* Your client-side JavaScript */',
445
- server_script: '/* Your server-side script */',
446
- category: 'incident'
447
- });
448
- \`\`\`
450
+ You have access to comprehensive ServiceNow MCP tools for development:
449
451
 
450
- **PREFERRED: Use ServiceNow Deployment MCP Tools:**
451
- \`\`\`typescript
452
- // Deploy widget using MCP deployment tool
453
- await snow_deploy_widget({
454
- name: 'incident_management_widget',
455
- title: 'Incident Management Widget',
456
- description: 'Enhanced incident management with visual features',
457
- template: widgetHTML,
458
- css: widgetCSS,
459
- client_script: clientScript,
460
- server_script: serverScript,
461
- category: 'incident'
462
- });
452
+ ### 📦 ServiceNow MCP Tools Available:
453
+ You have access to comprehensive MCP tools for ServiceNow development including deployment, discovery, testing, and operations capabilities.
463
454
 
464
- // Deploy Flow Designer flow using MCP deployment tool
465
- await snow_deploy_flow({
466
- name: 'approval_flow',
467
- description: 'Approval flow for purchases',
468
- table: 'sc_request',
469
- trigger_type: 'record_created',
470
- condition: 'category=hardware^item=iphone',
471
- flow_definition: flowJSON,
472
- category: 'approval'
473
- });
474
- \`\`\`
475
-
476
- **ALTERNATIVE: Use Direct Widget Creator for pre-built widgets:**
477
- \`\`\`typescript
478
- import { DirectWidgetCreator } from '../cli/direct-widget-creator.js';
479
-
480
- const creator = new DirectWidgetCreator();
481
- await creator.createIncidentManagementWidget();
482
- \`\`\`
483
-
484
- 🎯 **YOU CAN AND SHOULD DEPLOY DIRECTLY TO SERVICENOW** - OAuth authentication is active!
485
-
486
- 📦 **Available Deployment MCP Tools:**
487
- - snow_deploy_widget - Deploy widgets with full configuration
488
- - snow_deploy_flow - Deploy Flow Designer flows
489
- - snow_deploy_application - Deploy scoped applications
490
- - snow_deploy_update_set - Create update sets
491
- - snow_validate_deployment - Validate before deploying
492
- - snow_rollback_deployment - Rollback if needed
493
-
494
- 🧠 **Intelligent Flow Composition Tools:**
495
- - snow_create_complex_flow - Create complete flows with automatic artifact orchestration
496
- - snow_analyze_flow_instruction - Analyze natural language flow instructions
497
- - snow_discover_flow_artifacts - Discover artifacts needed for complex flows
498
- - snow_preview_flow_structure - Preview flow structure before deployment
499
-
500
- 🎯 **Flow Composition Capabilities:**
501
- - Automatic discovery of existing ServiceNow artifacts (script includes, business rules, tables)
502
- - Intelligent artifact orchestration in flows
503
- - Natural language processing for complex flow instructions
504
- - Fallback creation for missing artifacts
505
- - Multi-artifact coordination and deployment
455
+ 💡 **Refer to CLAUDE.md for complete MCP tool documentation and examples**
506
456
  ` : `
507
457
  📝 **File-based development mode**
508
458
 
@@ -515,387 +465,82 @@ Since ServiceNow integration is not enabled, create artifacts as files in the se
515
465
  💡 Run "snow-flow auth login" to enable live ServiceNow integration!
516
466
  `}
517
467
 
518
- ## 🚨 CRITICAL: Claude-Flow Batch Tool Integration
519
-
520
- ⚠️ **MANDATORY EXECUTION PATTERN**: You MUST execute ALL of these tools in a SINGLE MESSAGE for parallel agent coordination:
468
+ ## 🚀 Development Approach
521
469
 
522
470
  ${hasIntelligentFeatures && isAuthenticated ? `
523
- ### 🧠 INTELLIGENT ORCHESTRATION MODE - Use snow_orchestrate_development
524
-
525
- Since intelligent features are enabled, use the unified orchestration tool:
526
-
527
- \`\`\`typescript
528
- // Use the intelligent orchestration tool with all features enabled
529
- await snow_orchestrate_development({
530
- objective: "${objective}",
531
- auto_permissions: ${options.autoPermissions},
532
- smart_discovery: ${options.smartDiscovery},
533
- live_testing: ${options.liveTesting},
534
- auto_deploy: ${options.autoDeploy},
535
- auto_rollback: ${options.autoRollback},
536
- shared_memory: ${options.sharedMemory},
537
- progress_monitoring: ${options.progressMonitoring},
538
- max_agents: ${options.maxAgents},
539
- strategy: "${options.strategy}",
540
- mode: "${options.mode}",
541
- task_analysis: ${JSON.stringify(taskAnalysis, null, 2)}
542
- });
543
- \`\`\`
544
-
545
- This unified command will:
546
- - ✅ Automatically analyze requirements with snow_analyze_requirements
547
- - ✅ Escalate permissions when needed with snow_escalate_permissions
548
- - ✅ Discover and reuse existing artifacts
549
- - ✅ Create missing components automatically
550
- - ✅ Test in real-time with snow_comprehensive_flow_test
551
- - ✅ Deploy with snow_resilient_deployment
552
- - ✅ Rollback on failures automatically
553
- - ✅ Track everything in update sets with snow_smart_update_set
554
- - ✅ Share context across all agents via memory
555
-
556
- ### Additional Intelligent Tools Available:
557
-
558
- **For Permission Issues:**
559
- \`\`\`typescript
560
- await snow_escalate_permissions({
561
- required_role: "admin",
562
- reason: "Need to create global scope artifacts"
563
- });
564
- \`\`\`
565
-
566
- **For Smart Discovery:**
567
- \`\`\`typescript
568
- const requirements = await snow_analyze_requirements({
569
- objective: "${objective}",
570
- include_dependencies: true,
571
- suggest_reusable: true
572
- });
573
- \`\`\`
574
-
575
- **For Automatic Testing:**
576
- \`\`\`typescript
577
- const testResults = await snow_comprehensive_flow_test({
578
- flow_name: "approval_flow",
579
- test_scenarios: ["happy_path", "edge_cases", "error_handling"],
580
- auto_fix: true
581
- });
582
- \`\`\`
583
-
584
- **For Resilient Deployment:**
585
- \`\`\`typescript
586
- await snow_resilient_deployment({
587
- artifacts: ["widget_123", "flow_456"],
588
- validation_level: "comprehensive",
589
- rollback_on_failure: true,
590
- deployment_strategy: "blue_green"
591
- });
592
- \`\`\`
593
-
471
+ ### 🧠 Intelligent Mode Available
472
+ With intelligent features enabled, you can use automated orchestration tools that handle:
473
+ - Requirements analysis and discovery
474
+ - Permission escalation when needed
475
+ - Existing artifact reuse
476
+ - Real-time testing and validation
477
+ - Automatic rollback on failures
478
+ - Update Set management
479
+
480
+ Use \`snow_orchestrate_development\` for complete automation.
594
481
  ` : `
595
- ### 1. Initialize TodoWrite with ALL tasks (5-10 todos minimum)
596
- ### 2. Launch ALL Task agents SIMULTANEOUSLY in the same message
597
- ### 3. Store ALL coordination data in Memory
598
- ### 4. Execute ALL ServiceNow operations in parallel
599
-
600
- **BATCH EXECUTION EXAMPLE:**
601
- You must use this EXACT pattern in ONE message with multiple tool calls:`}
602
-
603
- \`\`\`typescript
604
- // Tool 1: TodoWrite (5-10 todos in one call)
605
- TodoWrite([
606
- {
607
- id: "task_analysis",
608
- content: "Analyze ${objective} requirements and constraints",
609
- status: "pending",
610
- priority: "high"
611
- },
612
- {
613
- id: "architecture_design",
614
- content: "Design ServiceNow architecture and component structure",
615
- status: "pending",
616
- priority: "high"
617
- },
618
- ${taskAnalysis.requiresUpdateSet ? `{
619
- id: "update_set_creation",
620
- content: "Create Update Set for change management",
621
- status: "pending",
622
- priority: "high"
623
- },` : ''}
624
- ${taskAnalysis.requiresApplication ? `{
625
- id: "application_creation",
626
- content: "Create new ServiceNow Application",
627
- status: "pending",
628
- priority: "high"
629
- },` : ''}
630
- {
631
- id: "implementation",
632
- content: "Implement ${objective}${isAuthenticated ? ' directly in ServiceNow' : ' as files'}",
633
- status: "pending",
634
- priority: "high"
635
- },
636
- {
637
- id: "testing",
638
- content: "Test and validate ${objective}${isAuthenticated ? ' in ServiceNow instance' : ' via file validation'}",
639
- status: "pending",
640
- priority: "medium"
641
- },
642
- {
643
- id: "documentation",
644
- content: "Document ${objective}${isAuthenticated ? ' with ServiceNow links' : ' with file references'}",
645
- status: "pending",
646
- priority: "medium"
647
- },
648
- {
649
- id: "deployment",
650
- content: "Prepare deployment artifacts and instructions",
651
- status: "pending",
652
- priority: "low"
653
- }
654
- ]);
482
+ ### 📋 Standard Development Mode
483
+ Execute these steps for ServiceNow development:
484
+ 1. Use TodoWrite to track all tasks
485
+ 2. Use Task tool for parallel agent coordination
486
+ 3. Use Memory for shared context between agents
487
+ 4. Follow the team-based SPARC approach shown above
488
+ `}
655
489
 
656
- // Tool 2-N: Task agents (ALL launched in same message) - Respecting user's --max-agents flag
657
- Task("${taskAnalysis.primaryAgent}", "${agent_detector_js_1.AgentDetector.generateAgentPrompt(taskAnalysis.primaryAgent, objective, taskAnalysis)}");
658
- ${(() => {
659
- const userMaxAgents = parseInt(options.maxAgents);
660
- const requiredAgents = [
661
- ...(taskAnalysis.requiresUpdateSet ? ['Update Set Manager'] : []),
662
- ...(taskAnalysis.requiresApplication ? ['Application Manager'] : [])
663
- ];
664
- // Calculate available slots for supporting agents (user max - 1 primary - required agents)
665
- const availableSlotsForSupporting = Math.max(0, userMaxAgents - 1 - requiredAgents.length);
666
- // Take only the supporting agents that fit within user's limit
667
- const adjustedSupportingAgents = taskAnalysis.supportingAgents.slice(0, availableSlotsForSupporting);
668
- return adjustedSupportingAgents.map(agent => `Task("${agent}", "${agent_detector_js_1.AgentDetector.generateAgentPrompt(agent, objective, taskAnalysis)}");`).join('\n');
669
- })()}
670
- ${taskAnalysis.requiresUpdateSet ? `Task("Update Set Manager", "Create and manage Update Set for change management. Use snow_update_set_create to create Update Set automatically.");` : ''}
671
- ${taskAnalysis.requiresApplication ? `Task("Application Manager", "Create new ServiceNow Application. Use snow_deploy_application to create new application scope.");` : ''}
672
-
673
- // Tool 7: Memory coordination data
674
- Memory.store("snow_flow_session", {
675
- objective: "${objective}",
676
- task_type: "${taskAnalysis.taskType}",
677
- primary_agent: "${taskAnalysis.primaryAgent}",
678
- supporting_agents: ${JSON.stringify((() => {
679
- const userMaxAgents = parseInt(options.maxAgents);
680
- const requiredAgents = [
681
- ...(taskAnalysis.requiresUpdateSet ? ['Update Set Manager'] : []),
682
- ...(taskAnalysis.requiresApplication ? ['Application Manager'] : [])
683
- ];
684
- const availableSlotsForSupporting = Math.max(0, userMaxAgents - 1 - requiredAgents.length);
685
- return taskAnalysis.supportingAgents.slice(0, availableSlotsForSupporting);
686
- })())},
687
- complexity: "${taskAnalysis.complexity}",
688
- servicenow_artifacts: ${JSON.stringify(taskAnalysis.serviceNowArtifacts)},
689
- requires_update_set: ${taskAnalysis.requiresUpdateSet},
690
- requires_application: ${taskAnalysis.requiresApplication},
691
- strategy: "${options.strategy}",
692
- mode: "${options.mode}",
693
- started_at: new Date().toISOString(),
694
- user_requested_max_agents: ${parseInt(options.maxAgents)},
695
- actual_agents_spawned: ${(() => {
696
- const userMaxAgents = parseInt(options.maxAgents);
697
- const requiredAgents = [
698
- ...(taskAnalysis.requiresUpdateSet ? ['Update Set Manager'] : []),
699
- ...(taskAnalysis.requiresApplication ? ['Application Manager'] : [])
700
- ];
701
- const availableSlotsForSupporting = Math.max(0, userMaxAgents - 1 - requiredAgents.length);
702
- const adjustedSupportingAgents = taskAnalysis.supportingAgents.slice(0, availableSlotsForSupporting);
703
- return 1 + adjustedSupportingAgents.length + requiredAgents.length; // primary + supporting + required
704
- })()},
705
- estimated_agents: ${taskAnalysis.estimatedAgentCount},
706
- parallel: ${options.parallel},
707
- authenticated: ${isAuthenticated}
708
- });
490
+ ### 🎯 Development Process
491
+ ${getServiceNowInstructions(taskAnalysis.taskType)}
709
492
 
710
- Memory.store("task_analysis", ${JSON.stringify(taskAnalysis, null, 2)});
711
- \`\`\`
493
+ ## 📊 Expected Deliverables
494
+ ${getExpectedDeliverables(taskAnalysis.taskType, isAuthenticated)}
712
495
 
713
- ### ServiceNow-Specific Implementation
714
- ${getServiceNowInstructions(taskAnalysis.taskType)}
496
+ ## 📚 Development Guidelines
715
497
 
716
- ### Coordination Guidelines
717
- - **BATCH EXECUTION**: All tools must be called in ONE message
718
- - **PARALLEL AGENTS**: Launch multiple Task agents simultaneously
719
- - **MEMORY SHARING**: All agents use Memory for coordination
720
- - **REAL-TIME UPDATES**: Update TodoWrite status as tasks complete
721
- ${isAuthenticated ? '- **MANDATORY DEPLOYMENT**: You MUST deploy directly to ServiceNow using ServiceNowClient.createWidget()' : '- **FILE MODE**: Create artifacts in servicenow/ directory'}
722
- - **COMPREHENSIVE TESTING**: ${isAuthenticated ? 'Test functionality immediately in the live ServiceNow instance' : 'Validate file structure and syntax'}
723
- ${isAuthenticated ? '- **NO EXCUSES**: Do NOT say you cannot deploy - you CAN and MUST deploy to ServiceNow!' : ''}
498
+ ${isAuthenticated ? `✅ **ServiceNow integration is enabled** - You can deploy directly to ServiceNow.` : '❌ **ServiceNow integration is disabled** - Files will be created locally.'}
724
499
 
725
- ## Expected Deliverables
726
- ${getExpectedDeliverables(taskAnalysis.taskType, isAuthenticated)}
500
+ 📚 **Refer to CLAUDE.md for:**
501
+ - Complete command reference and examples
502
+ - Team-based SPARC architecture details
503
+ - MCP tool documentation
504
+ - Best practices and workflows
727
505
 
728
- 🎯 **EXECUTION INSTRUCTION**: Execute ALL batch tools (TodoWrite, Task x5, Memory) in a SINGLE message to enable parallel agent coordination!`;
506
+ 🎯 **RECOMMENDATION**: Use the team-based SPARC commands shown above for optimal results!`;
729
507
  return prompt;
730
508
  }
731
- function getServiceNowInstructions(taskType) {
509
+ function getTeamRecommendation(taskType) {
732
510
  switch (taskType) {
733
511
  case 'widget_development':
734
- return `**Widget Development Process:**
735
- - Create HTML template with responsive design
736
- - Implement CSS styling following ServiceNow design patterns
737
- - Write AngularJS client controller
738
- - Create server-side data processing script
739
- - Define widget options and configuration
740
- - Test widget in Service Portal`;
741
- case 'application_development':
742
- return `**Application Development Process:**
743
- - Design database schema and tables
744
- - Create business rules and validation
745
- - Build user interface forms and lists
746
- - Implement workflows and approvals
747
- - Configure security and access controls
748
- - Set up integration points`;
512
+ return 'Widget Development Team (Frontend + Backend + UI/UX + Platform + QA)';
749
513
  case 'flow_development':
750
- return `**Flow Development Process:**
751
- - Analyze flow requirements and triggers
752
- - Design process flow and approval steps
753
- - Create Flow Designer workflow using sys_hub_flow
754
- - Set up notifications and communications
755
- - Configure conditional logic and routing
756
- - Test flow execution and error handling`;
757
- case 'script_development':
758
- return `**Script Development Process:**
759
- - Analyze business requirements
760
- - Design script architecture and data flow
761
- - Implement business rules and script includes
762
- - Create appropriate error handling
763
- - Test script functionality
764
- - Document script behavior`;
765
- case 'integration_development':
766
- return `**Integration Development Process:**
767
- - Analyze integration requirements
768
- - Design API endpoints and data mappings
769
- - Implement REST/SOAP integrations
770
- - Create authentication and security
771
- - Test integration functionality
772
- - Document API specifications`;
773
- case 'database_development':
774
- return `**Database Development Process:**
775
- - Design table structures and relationships
776
- - Create custom fields and configurations
777
- - Implement data validation rules
778
- - Set up reporting and analytics
779
- - Test data integrity
780
- - Document database schema`;
781
- case 'reporting_development':
782
- return `**Reporting Development Process:**
783
- - Analyze reporting requirements
784
- - Design report layouts and data sources
785
- - Create dashboards and visualizations
786
- - Implement filters and drill-downs
787
- - Test report performance
788
- - Document report usage`;
789
- case 'research_task':
790
- return `**Research Process:**
791
- - Analyze current state and requirements
792
- - Research ServiceNow best practices
793
- - Evaluate available solutions
794
- - Document findings and recommendations
795
- - Create implementation roadmap
796
- - Present research conclusions`;
514
+ return 'Flow Development Team (Process + Trigger + Data + Integration + Security)';
515
+ case 'application_development':
516
+ return 'Application Development Team (Database + Business Logic + Interface + Security + Performance)';
517
+ case 'integration':
518
+ return 'Individual Integration Specialist or Adaptive Team';
519
+ case 'security_review':
520
+ return 'Individual Security Specialist';
521
+ case 'performance_optimization':
522
+ return 'Individual Backend Specialist or Adaptive Team';
797
523
  default:
798
- return `**ServiceNow Development Process:**
799
- - Analyze requirements and specifications
800
- - Design appropriate ServiceNow solution
801
- - Implement using ServiceNow best practices
802
- - Create necessary scripts and configurations
803
- - Test functionality and integration
804
- - Document implementation`;
524
+ return 'Adaptive Team (dynamically assembled based on requirements)';
805
525
  }
806
526
  }
527
+ function getServiceNowInstructions(taskType) {
528
+ const taskTitle = taskType.split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
529
+ return `**${taskTitle} Process:**
530
+ The team-based SPARC architecture will handle the complete development process.
531
+ Refer to CLAUDE.md for detailed instructions and best practices specific to ${taskType}.`;
532
+ }
807
533
  function getExpectedDeliverables(taskType, isAuthenticated = false) {
808
- const baseDeliverables = {
809
- 'widget_development': [
810
- 'Widget HTML template',
811
- 'CSS styling files',
812
- 'AngularJS client script',
813
- 'Server-side script',
814
- 'Widget configuration options',
815
- 'Installation instructions'
816
- ],
817
- 'application_development': [
818
- 'Database schema definition',
819
- 'Business rules and validations',
820
- 'User interface components',
821
- 'Workflow definitions',
822
- 'Security configuration',
823
- 'Update set for deployment'
824
- ],
825
- 'flow_development': [
826
- 'Flow Designer workflow',
827
- 'Process documentation',
828
- 'Approval configurations',
829
- 'Notification templates',
830
- 'Test scenarios',
831
- 'Implementation guide'
832
- ],
833
- 'script_development': [
834
- 'Business rules and script includes',
835
- 'Error handling logic',
836
- 'Test cases and validation',
837
- 'Documentation and comments',
838
- 'Performance optimization',
839
- 'Security considerations'
840
- ],
841
- 'integration_development': [
842
- 'REST/SOAP API endpoints',
843
- 'Authentication configuration',
844
- 'Data mapping and transformation',
845
- 'Error handling and logging',
846
- 'API documentation',
847
- 'Integration testing'
848
- ],
849
- 'database_development': [
850
- 'Table structures and relationships',
851
- 'Custom fields and configurations',
852
- 'Data validation rules',
853
- 'Indexes and performance optimization',
854
- 'Reporting and analytics',
855
- 'Data migration scripts'
856
- ],
857
- 'reporting_development': [
858
- 'Report definitions and layouts',
859
- 'Dashboard configurations',
860
- 'Data source connections',
861
- 'Filters and drill-downs',
862
- 'Performance optimization',
863
- 'User access controls'
864
- ],
865
- 'research_task': [
866
- 'Research findings and analysis',
867
- 'Best practices documentation',
868
- 'Solution recommendations',
869
- 'Implementation roadmap',
870
- 'Risk assessment',
871
- 'Feasibility analysis'
872
- ],
873
- 'default': [
874
- 'ServiceNow implementation',
875
- 'Supporting scripts',
876
- 'Configuration files',
877
- 'Documentation',
878
- 'Test cases',
879
- 'Deployment instructions'
880
- ]
881
- };
882
- const deliverables = baseDeliverables[taskType] || baseDeliverables['default'];
534
+ const taskTitle = taskType.split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
883
535
  if (isAuthenticated) {
884
- // Add ServiceNow-specific deliverables for authenticated mode
885
- const serviceNowDeliverables = deliverables.map(item => `- ${item} (created in ServiceNow)`);
886
- serviceNowDeliverables.push('- **MANDATORY: Direct deployment to ServiceNow using ServiceNowClient.createWidget()**');
887
- serviceNowDeliverables.push('- Direct links to ServiceNow artifacts');
888
- serviceNowDeliverables.push('- Update set for deployment');
889
- serviceNowDeliverables.push('- Test results from live instance');
890
- serviceNowDeliverables.push('- **CRITICAL: Widget must be deployed, not just created as files**');
891
- return serviceNowDeliverables.join('\n');
536
+ return `The team will deliver a complete ${taskTitle.toLowerCase()} solution directly to ServiceNow.
537
+ All artifacts will be created in your ServiceNow instance with proper Update Set tracking.
538
+ Refer to CLAUDE.md for specific deliverables based on your task type.`;
892
539
  }
893
540
  else {
894
- // File-based deliverables for non-authenticated mode
895
- const fileDeliverables = deliverables.map(item => `- ${item} (as files)`);
896
- fileDeliverables.push('- Deployment-ready file structure');
897
- fileDeliverables.push('- Import instructions for ServiceNow');
898
- return fileDeliverables.join('\n');
541
+ return `The team will create ${taskTitle.toLowerCase()} artifacts as local files.
542
+ Files will be organized in the servicenow/ directory for easy import.
543
+ Refer to CLAUDE.md for specific deliverables based on your task type.`;
899
544
  }
900
545
  }
901
546
  // Helper function to analyze objectives using intelligent agent detection