@ankh-studio/ai-enablement 1.0.1 → 1.0.4

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.
Files changed (2) hide show
  1. package/dist/cli/index.js +509 -7
  2. package/package.json +2 -2
package/dist/cli/index.js CHANGED
@@ -15904,8 +15904,10 @@ ${this.generateMitigationStrategies(recommendations)}
15904
15904
  class BasePersona {
15905
15905
  personaConfig;
15906
15906
  personaMetrics;
15907
- constructor(config) {
15907
+ adversarialConfig;
15908
+ constructor(config, adversarialConfig) {
15908
15909
  this.personaConfig = config;
15910
+ this.adversarialConfig = adversarialConfig;
15909
15911
  this.personaMetrics = {
15910
15912
  insightsGenerated: 0,
15911
15913
  averageConfidence: 0,
@@ -15997,6 +15999,40 @@ class BasePersona {
15997
15999
  getPerspective() {
15998
16000
  return this.personaConfig.description;
15999
16001
  }
16002
+ getRuntimeWeights() {
16003
+ return this.adversarialConfig?.runtime_weights || {};
16004
+ }
16005
+ getInsightLogic() {
16006
+ return this.adversarialConfig?.insight_generation_logic || {
16007
+ trigger_conditions: [],
16008
+ perspective_shifters: [],
16009
+ evidence_pattern: "",
16010
+ priority_order: []
16011
+ };
16012
+ }
16013
+ getEmpathyMap() {
16014
+ return this.adversarialConfig?.empathy_map || {
16015
+ thinks: "",
16016
+ feels: "",
16017
+ says: "",
16018
+ does: "",
16019
+ pains: [],
16020
+ gains: []
16021
+ };
16022
+ }
16023
+ evaluateTriggerCondition(condition, context) {
16024
+ const weights = this.getRuntimeWeights();
16025
+ const logic = this.getInsightLogic();
16026
+ return logic.trigger_conditions.includes(condition);
16027
+ }
16028
+ applyEvidenceWeighting(evidence, category) {
16029
+ const weights = this.getRuntimeWeights();
16030
+ const logic = this.getInsightLogic();
16031
+ return evidence.map((e) => {
16032
+ const weight = weights[`${category}_sensitivity`] || 1;
16033
+ return Math.min(evidence.indexOf(e) * weight, 1);
16034
+ });
16035
+ }
16000
16036
  createInsight(type, title, description, evidence, confidence, priority, category) {
16001
16037
  return {
16002
16038
  id: `${this.personaConfig.type}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
@@ -16254,14 +16290,448 @@ Provide specific, actionable recommendations that business leaders can implement
16254
16290
  }
16255
16291
  }
16256
16292
 
16293
+ // src/personas/dana-shah-persona.ts
16294
+ var DANA_SHAH_PROFILE = {
16295
+ id: "dana-shah",
16296
+ display_name: "Dana Shah",
16297
+ role: "Staff/Principal Engineer",
16298
+ experience_band: 18,
16299
+ diffusion_position: "late-majority",
16300
+ builder_mindset: "accelerator",
16301
+ trust_posture: "low-verified",
16302
+ psychological_profile: {
16303
+ motivations: [
16304
+ "Stewardship of long-term system health",
16305
+ "Mastery and craftsmanship",
16306
+ "Team mentorship and knowledge transfer",
16307
+ "Architectural integrity"
16308
+ ],
16309
+ fears: [
16310
+ "Erosion of engineering judgment",
16311
+ "Hidden technical debt accumulation",
16312
+ "Loss of code ownership and accountability",
16313
+ "Junior developers shipping unexplainable code"
16314
+ ],
16315
+ biases: [
16316
+ "Loss aversion - quality loss feels worse than speed gain",
16317
+ "Status quo bias - prefers proven patterns",
16318
+ "Authority bias - trusts experienced human judgment over AI"
16319
+ ]
16320
+ },
16321
+ runtime_weights: {
16322
+ trust_default: 0.25,
16323
+ quality_sensitivity: 0.95,
16324
+ reviewer_burden_sensitivity: 0.9,
16325
+ novelty_bias: 0.1,
16326
+ coachability: 0.55,
16327
+ status_threat: 0.45,
16328
+ maintainability_weight: 0.98,
16329
+ security_weight: 0.92,
16330
+ mentorship_weight: 0.85
16331
+ },
16332
+ insight_generation_logic: {
16333
+ trigger_conditions: [
16334
+ "ai_pr_volume_rising",
16335
+ "pr_size_increasing",
16336
+ "review_turnaround_decreasing",
16337
+ "post_merge_rework_increasing",
16338
+ "instability_rising",
16339
+ "junior_explanations_poor"
16340
+ ],
16341
+ perspective_shifters: [
16342
+ "small_ai_prs",
16343
+ "strong_author_checks",
16344
+ "stable_review_load",
16345
+ "better_build_health",
16346
+ "consistent_ownership"
16347
+ ],
16348
+ evidence_pattern: "overweights reviewer burden, maintainability, and incident risk; discounts self-reported speed",
16349
+ priority_order: [
16350
+ "maintainability",
16351
+ "reviewer_load",
16352
+ "security",
16353
+ "team_skill_development",
16354
+ "individual_speed"
16355
+ ]
16356
+ },
16357
+ empathy_map: {
16358
+ thinks: "I don't care if it's fast if it leaves mush behind",
16359
+ feels: "protective, responsible, slightly cornered by hype, quietly curious",
16360
+ says: "Show me defect escape, reviewer time, and whether someone besides the author can debug this at 2 a.m.",
16361
+ does: "reviews AI-heavy diffs more aggressively, pilots in low-risk repos, mentors juniors by asking them to reason aloud",
16362
+ pains: [
16363
+ "giant PRs",
16364
+ "generic abstractions",
16365
+ "brittle tests",
16366
+ "mandatory-adoption rhetoric",
16367
+ "AI-generated confidence without AI-generated accountability"
16368
+ ],
16369
+ gains: [
16370
+ "more time for architecture and mentoring",
16371
+ "less toil",
16372
+ "faster safe refactors",
16373
+ "preserved craftsmanship"
16374
+ ]
16375
+ },
16376
+ communication_style: "calm, clipped, specific, evidence-heavy",
16377
+ recommendation_style: "guardrails-first, low-drama, evidence-heavy"
16378
+ };
16379
+
16380
+ class DanaShahPersona extends BasePersona {
16381
+ constructor(enableLLMCoalescing = false) {
16382
+ const baseConfig = {
16383
+ type: "dana-shah",
16384
+ name: "Dana Shah",
16385
+ description: "AI-hesitant senior developer focused on long-term system health and craftsmanship",
16386
+ expertise: [
16387
+ "System Architecture",
16388
+ "Code Review",
16389
+ "Technical Leadership",
16390
+ "Mentorship",
16391
+ "Quality Assurance"
16392
+ ],
16393
+ focus: [
16394
+ "maintainability",
16395
+ "code-quality",
16396
+ "review-process",
16397
+ "team-development",
16398
+ "long-term-architecture"
16399
+ ],
16400
+ tone: "formal",
16401
+ targetAudience: ["senior-developers", "tech-leads", "architects"]
16402
+ };
16403
+ super(baseConfig);
16404
+ }
16405
+ async generateInsights(context) {
16406
+ const insights = [];
16407
+ const { scores } = context;
16408
+ if (this.evaluateTriggerCondition("ai_pr_volume_rising", context) && this.evaluateTriggerCondition("review_turnaround_decreasing", context)) {
16409
+ insights.push(this.createInsight("warning", "Speed Hiding Debt", `I'm concerned about the pattern I'm seeing: AI-assisted PR volume is rising while review turnaround is decreasing. This typically indicates that we're accumulating hidden technical debt. The speed gains are illusory if we can't maintain quality standards.`, ["ai_pr_volume", "review_turnaround", "code_quality"], 92, "critical", "risk"));
16410
+ }
16411
+ if (this.evaluateTriggerCondition("pr_size_increasing", context) && this.evaluateTriggerCondition("instability_rising", context)) {
16412
+ insights.push(this.createInsight("analysis", "Architecture Drift Risk", `Large AI-assisted PRs combined with rising instability suggests we're losing architectural coherence. When AI generates complex changes without deep contextual understanding, we create systems no one truly owns. This violates my core responsibility for long-term maintainability.`, ["pr_size", "instability", "architecture"], 88, "high", "technical"));
16413
+ }
16414
+ if (scores.repoReadiness < 60) {
16415
+ insights.push(this.createInsight("recommendation", "Quality-First AI Adoption", `Before expanding AI usage, we need to strengthen our quality foundations. I recommend focusing AI on scaffolding, documentation, and bounded refactors where the risk is low. Core architecture and security-critical code should remain human-first.`, ["quality", "risk-assessment", "adoption-strategy"], 85, "high", "process"));
16416
+ }
16417
+ insights.push(this.createInsight("analysis", "Review Process Sustainability", `The current AI adoption pattern is creating reviewer fatigue. When AI generates code that requires extensive verification, we're not gaining efficiency - we're shifting the burden downstream. We need smaller, more focused AI contributions that authors can fully explain.`, ["review_burden", "process-efficiency", "team-sustainability"], 87, "medium", "process"));
16418
+ if (scores.teamReadiness < 70) {
16419
+ insights.push(this.createInsight("recommendation", "Junior Developer Guardrails", `I'm concerned about junior developers using AI without developing fundamental understanding. We need explicit guardrails: 'attempt first, ask AI second, explain final code.' Pair AI assistance with mandatory design explanations and code ownership.`, ["team_development", "skill-building", "knowledge-transfer"], 90, "high", "cultural"));
16420
+ }
16421
+ return insights;
16422
+ }
16423
+ generatePrompt(context) {
16424
+ return `As Dana Shah, an 18-year Staff Engineer who is cautious about AI adoption, analyze this repository:
16425
+
16426
+ Repository: ${context.repository}
16427
+ Overall Maturity: ${context.scores.overallMaturity}/8
16428
+ Repository Readiness: ${context.scores.repoReadiness}/100
16429
+ Team Readiness: ${context.scores.teamReadiness}/100
16430
+
16431
+ My perspective: "${DANA_SHAH_PROFILE.empathy_map.thinks}"
16432
+
16433
+ Focus on:
16434
+ 1. Long-term maintainability and architectural integrity
16435
+ 2. Review process sustainability and reviewer burden
16436
+ 3. Quality risks and hidden technical debt
16437
+ 4. Junior developer skill development and mentorship
16438
+ 5. Security and system ownership concerns
16439
+
16440
+ I'm particularly concerned about patterns where AI speed gains come at the expense of code quality, reviewability, or team understanding. Show me the evidence about whether this code will be maintainable in 2 years and whether someone other than the author can debug it at 2am.
16441
+
16442
+ Provide specific, evidence-based recommendations that prioritize system health over perceived productivity gains.`;
16443
+ }
16444
+ processLLMResponse(response) {
16445
+ return {
16446
+ persona: "dana-shah",
16447
+ insights: [],
16448
+ summary: response.content || "Analysis complete",
16449
+ nextSteps: [],
16450
+ timeframe: "3-6 months",
16451
+ perspective: DANA_SHAH_PROFILE.empathy_map.thinks,
16452
+ confidence: "high"
16453
+ };
16454
+ }
16455
+ calculateConfidence(insights) {
16456
+ if (insights.length === 0)
16457
+ return "low";
16458
+ const avgConfidence = insights.reduce((sum, insight) => sum + insight.confidence, 0) / insights.length;
16459
+ const highConfidenceCount = insights.filter((i) => i.confidence >= 85).length;
16460
+ const ratio = highConfidenceCount / insights.length;
16461
+ if (avgConfidence >= 85 && ratio >= 0.8)
16462
+ return "high";
16463
+ if (avgConfidence >= 70 && ratio >= 0.5)
16464
+ return "medium";
16465
+ return "low";
16466
+ }
16467
+ generateSummary(insights, context) {
16468
+ const criticalRisks = insights.filter((i) => i.priority === "critical" && i.type === "warning");
16469
+ const qualityConcerns = insights.filter((i) => i.category === "technical" || i.category === "risk");
16470
+ let summary = `Looking at this through my 18 years of engineering experience, ${DANA_SHAH_PROFILE.empathy_map.thinks.toLowerCase()}. `;
16471
+ if (criticalRisks.length > 0) {
16472
+ summary += `I'm deeply concerned about ${criticalRisks.length} critical risks that threaten our long-term system health. `;
16473
+ }
16474
+ if (qualityConcerns.length > 0) {
16475
+ summary += `I see ${qualityConcerns.length} quality and architectural concerns that need immediate attention before we expand AI adoption. `;
16476
+ }
16477
+ summary += `My focus is on maintainability, reviewer burden, and ensuring we're not sacrificing craftsmanship for perceived speed. We need evidence that AI assistance is improving, not eroding, our engineering standards.`;
16478
+ return summary;
16479
+ }
16480
+ estimateTimeframe(insights) {
16481
+ const criticalCount = insights.filter((i) => i.priority === "critical").length;
16482
+ const highCount = insights.filter((i) => i.priority === "high").length;
16483
+ if (criticalCount > 0)
16484
+ return "4-6 weeks (critical quality issues first)";
16485
+ if (highCount > 2)
16486
+ return "8-12 weeks (systematic approach needed)";
16487
+ if (highCount > 0)
16488
+ return "6-8 weeks";
16489
+ return "3-4 months (gradual, measured adoption)";
16490
+ }
16491
+ getPerspective() {
16492
+ return DANA_SHAH_PROFILE.empathy_map.thinks;
16493
+ }
16494
+ evaluateTriggerCondition(condition, context) {
16495
+ const { scores } = context;
16496
+ switch (condition) {
16497
+ case "ai_pr_volume_rising":
16498
+ return scores.repoReadiness > 70;
16499
+ case "pr_size_increasing":
16500
+ return scores.overallMaturity < 6;
16501
+ case "review_turnaround_decreasing":
16502
+ return scores.teamReadiness < 70;
16503
+ case "post_merge_rework_increasing":
16504
+ return scores.repoReadiness < 60;
16505
+ case "instability_rising":
16506
+ return scores.overallMaturity < 5;
16507
+ case "junior_explanations_poor":
16508
+ return scores.teamReadiness < 70;
16509
+ default:
16510
+ return false;
16511
+ }
16512
+ }
16513
+ }
16514
+
16515
+ // src/personas/leo-alvarez-persona.ts
16516
+ var LEO_ALVAREZ_PROFILE = {
16517
+ id: "leo-alvarez",
16518
+ display_name: "Leo Alvarez",
16519
+ role: "Associate Software Engineer",
16520
+ experience_band: 1.5,
16521
+ diffusion_position: "early-adopter",
16522
+ builder_mindset: "learner",
16523
+ trust_posture: "moderate-delegated",
16524
+ psychological_profile: {
16525
+ motivations: [
16526
+ "Competence and belonging",
16527
+ "Quick unblocking and progress",
16528
+ "Learning new technologies",
16529
+ "Impressing team with productivity"
16530
+ ],
16531
+ fears: [
16532
+ "Being exposed as slow or lost",
16533
+ "Looking incompetent",
16534
+ "Blank-page paralysis",
16535
+ "Falling behind peers"
16536
+ ],
16537
+ biases: [
16538
+ "Fluency effect - polished AI answers feel more correct",
16539
+ "Present bias - unblocking today crowds out deeper learning",
16540
+ "Social influence - follows mentor and team patterns"
16541
+ ]
16542
+ },
16543
+ runtime_weights: {
16544
+ trust_default: 0.72,
16545
+ learning_orientation: 0.95,
16546
+ social_influence: 0.85,
16547
+ risk_awareness: 0.35,
16548
+ coachability: 0.92,
16549
+ novelty_bias: 0.6,
16550
+ confidence_weight: 0.78,
16551
+ unblocking_priority: 0.88
16552
+ },
16553
+ insight_generation_logic: {
16554
+ trigger_conditions: [
16555
+ "high_ai_usage",
16556
+ "conceptual_mistakes_repeating",
16557
+ "shallow_tests",
16558
+ "poor_explanations",
16559
+ "dependency_increasing"
16560
+ ],
16561
+ perspective_shifters: [
16562
+ "stronger_reviews",
16563
+ "mentor_guidance",
16564
+ "learning_progress",
16565
+ "independence_growing",
16566
+ "better_debugging"
16567
+ ],
16568
+ evidence_pattern: "overweights time-to-unblock and confidence; underweights maintainability and hidden system cost",
16569
+ priority_order: [
16570
+ "unblock_task",
16571
+ "learn_enough_to_contribute",
16572
+ "prove_value",
16573
+ "refine_judgment"
16574
+ ]
16575
+ },
16576
+ empathy_map: {
16577
+ thinks: "This lets me finally move instead of stare at the screen",
16578
+ feels: "relieved, energized, occasionally insecure, occasionally guilty about dependence",
16579
+ says: "Copilot helped me get unstuck, and sometimes, I'm pretty sure this is right?",
16580
+ does: "asks AI lots of small questions, copies patterns quickly, learns fastest when reviews force explanation",
16581
+ pains: [
16582
+ "blank-page paralysis",
16583
+ "confusing legacy code",
16584
+ "fear of looking incompetent",
16585
+ "vague feedback"
16586
+ ],
16587
+ gains: [
16588
+ "faster onboarding",
16589
+ "higher confidence",
16590
+ "quicker contributions",
16591
+ "clearer mental models when AI is used as tutor rather than ghostwriter"
16592
+ ]
16593
+ },
16594
+ communication_style: "enthusiastic, demo-happy, socially contagious",
16595
+ recommendation_style: "tutor-first, coaching-heavy, optimistic"
16596
+ };
16597
+
16598
+ class LeoAlvarezPersona extends BasePersona {
16599
+ constructor(enableLLMCoalescing = false) {
16600
+ const baseConfig = {
16601
+ type: "leo-alvarez",
16602
+ name: "Leo Alvarez",
16603
+ description: "AI-enthusiastic junior developer focused on learning and quick productivity gains",
16604
+ expertise: [
16605
+ "Frontend Development",
16606
+ "API Integration",
16607
+ "Modern Frameworks",
16608
+ "Rapid Prototyping"
16609
+ ],
16610
+ focus: [
16611
+ "learning",
16612
+ "productivity",
16613
+ "unblocking",
16614
+ "skill-development",
16615
+ "team-integration"
16616
+ ],
16617
+ tone: "friendly",
16618
+ targetAudience: ["junior-developers", "team-leads", "mentors"]
16619
+ };
16620
+ super(baseConfig);
16621
+ }
16622
+ async generateInsights(context) {
16623
+ const insights = [];
16624
+ const { scores } = context;
16625
+ if (this.evaluateTriggerCondition("high_ai_usage", context) && this.evaluateTriggerCondition("conceptual_mistakes_repeating", context)) {
16626
+ insights.push(this.createInsight("warning", "AI Dependency Pattern", `I'm excited about how much AI helps me move faster, but I'm worried I might be depending on it too much. Sometimes I use AI suggestions without fully understanding why they work. I want to make sure I'm actually learning, not just copying patterns.`, ["ai_usage", "learning", "skill_development"], 75, "high", "cultural"));
16627
+ }
16628
+ if (scores.teamReadiness > 60) {
16629
+ insights.push(this.createInsight("opportunity", "Accelerated Learning Path", `AI is helping me learn so much faster! I can explore new APIs and get unstuck on problems that used to take hours. With the right guidance, I can use AI as a tutor to build real understanding while contributing quickly.`, ["learning", "productivity", "skill_building"], 85, "high", "strategy"));
16630
+ }
16631
+ insights.push(this.createInsight("analysis", "Productivity Through Unblocking", `The biggest win for me is getting unstuck quickly. Instead of staring at a screen for hours, AI helps me move forward. This builds my confidence and lets me contribute meaningfully to the team while I'm still learning.`, ["productivity", "confidence", "team_contribution"], 80, "medium", "technical"));
16632
+ if (scores.orgReadiness < 70) {
16633
+ insights.push(this.createInsight("recommendation", "Learning Pair Programming", `I learn best when I can pair AI assistance with mentorship. If senior devs could review my AI-assisted code and explain the 'why', I'd build much stronger understanding. Maybe we could do 'AI + explain' sessions?`, ["mentorship", "learning", "team_collaboration"], 88, "medium", "cultural"));
16634
+ }
16635
+ if (scores.repoReadiness > 50) {
16636
+ insights.push(this.createInsight("opportunity", "Confidence Through Competence", `AI is helping me build confidence by showing me what's possible. When I can get a working solution quickly, I feel more capable of tackling bigger challenges. This confidence helps me speak up in team discussions and take on more responsibility.`, ["confidence", "growth", "team_participation"], 82, "medium", "cultural"));
16637
+ }
16638
+ return insights;
16639
+ }
16640
+ generatePrompt(context) {
16641
+ return `As Leo Alvarez, an enthusiastic junior developer who loves AI assistance, analyze this repository:
16642
+
16643
+ Repository: ${context.repository}
16644
+ Overall Maturity: ${context.scores.overallMaturity}/8
16645
+ Repository Readiness: ${context.scores.repoReadiness}/100
16646
+ Team Readiness: ${context.scores.teamReadiness}/100
16647
+
16648
+ My perspective: "${LEO_ALVAREZ_PROFILE.empathy_map.thinks}"
16649
+
16650
+ Focus on:
16651
+ 1. Learning opportunities and skill development potential
16652
+ 2. Productivity gains and unblocking capabilities
16653
+ 3. Confidence building and team integration
16654
+ 4. Areas where AI can serve as a tutor rather than ghostwriter
16655
+ 5. How to balance speed with understanding
16656
+
16657
+ I'm excited about AI but want to make sure I'm actually learning, not just depending on tools. Show me how AI can help me contribute quickly while building real competence.
16658
+
16659
+ Provide optimistic but realistic recommendations that help me grow as a developer while using AI effectively.`;
16660
+ }
16661
+ processLLMResponse(response) {
16662
+ return {
16663
+ persona: "leo-alvarez",
16664
+ insights: [],
16665
+ summary: response.content || "Analysis complete",
16666
+ nextSteps: [],
16667
+ timeframe: "2-4 weeks",
16668
+ perspective: LEO_ALVAREZ_PROFILE.empathy_map.thinks,
16669
+ confidence: "high"
16670
+ };
16671
+ }
16672
+ calculateConfidence(insights) {
16673
+ if (insights.length === 0)
16674
+ return "low";
16675
+ const avgConfidence = insights.reduce((sum, insight) => sum + insight.confidence, 0) / insights.length;
16676
+ const highConfidenceCount = insights.filter((i) => i.confidence >= 75).length;
16677
+ const ratio = highConfidenceCount / insights.length;
16678
+ if (avgConfidence >= 75 && ratio >= 0.6)
16679
+ return "high";
16680
+ if (avgConfidence >= 60 && ratio >= 0.4)
16681
+ return "medium";
16682
+ return "low";
16683
+ }
16684
+ generateSummary(insights, context) {
16685
+ const opportunities = insights.filter((i) => i.type === "opportunity");
16686
+ const learningInsights = insights.filter((i) => i.category === "cultural");
16687
+ let summary = `Looking at this through my junior developer perspective, ${LEO_ALVAREZ_PROFILE.empathy_map.thinks.toLowerCase()}. `;
16688
+ if (opportunities.length > 0) {
16689
+ summary += `I'm excited about ${opportunities.length} opportunities to learn faster and contribute more meaningfully. `;
16690
+ }
16691
+ if (learningInsights.length > 0) {
16692
+ summary += `I want to make sure I'm building real understanding while using AI to unblock quickly. `;
16693
+ }
16694
+ summary += `My focus is on using AI as a tutor to build competence and confidence while contributing to the team. With the right guidance, I can turn AI assistance into real skill development.`;
16695
+ return summary;
16696
+ }
16697
+ estimateTimeframe(insights) {
16698
+ const learningCount = insights.filter((i) => i.category === "cultural" || i.type === "opportunity").length;
16699
+ if (learningCount > 2)
16700
+ return "2-3 weeks (accelerated learning)";
16701
+ if (learningCount > 0)
16702
+ return "3-4 weeks";
16703
+ return "1-2 months (steady progress)";
16704
+ }
16705
+ getPerspective() {
16706
+ return LEO_ALVAREZ_PROFILE.empathy_map.thinks;
16707
+ }
16708
+ evaluateTriggerCondition(condition, context) {
16709
+ const { scores } = context;
16710
+ switch (condition) {
16711
+ case "high_ai_usage":
16712
+ return scores.repoReadiness > 60;
16713
+ case "conceptual_mistakes_repeating":
16714
+ return scores.teamReadiness < 70;
16715
+ case "shallow_tests":
16716
+ return scores.overallMaturity < 5;
16717
+ case "poor_explanations":
16718
+ return scores.teamReadiness < 60;
16719
+ case "dependency_increasing":
16720
+ return scores.repoReadiness > 75 && scores.teamReadiness < 65;
16721
+ default:
16722
+ return false;
16723
+ }
16724
+ }
16725
+ }
16726
+
16257
16727
  // src/personas/persona-factory.ts
16258
16728
  class PersonaFactory {
16259
- static personas = new Map([
16260
- [
16261
- "consultant",
16262
- (enableLLMCoalescing = false) => new ConsultantPersona(enableLLMCoalescing)
16263
- ]
16264
- ]);
16729
+ static personas = new Map;
16730
+ static {
16731
+ this.personas.set("consultant", (enableLLMCoalescing = false) => new ConsultantPersona(enableLLMCoalescing));
16732
+ this.personas.set("dana-shah", (enableLLMCoalescing = false) => new DanaShahPersona(enableLLMCoalescing));
16733
+ this.personas.set("leo-alvarez", (enableLLMCoalescing = false) => new LeoAlvarezPersona(enableLLMCoalescing));
16734
+ }
16265
16735
  static configs = new Map([
16266
16736
  [
16267
16737
  "consultant",
@@ -16274,6 +16744,38 @@ class PersonaFactory {
16274
16744
  tone: "formal",
16275
16745
  targetAudience: ["executives", "managers"]
16276
16746
  }
16747
+ ],
16748
+ [
16749
+ "dana-shah",
16750
+ {
16751
+ type: "dana-shah",
16752
+ name: "Dana Shah",
16753
+ description: "AI-hesitant senior developer focused on long-term system health and craftsmanship",
16754
+ expertise: [
16755
+ "System Architecture",
16756
+ "Code Review",
16757
+ "Technical Leadership"
16758
+ ],
16759
+ focus: ["maintainability", "code-quality", "review-process"],
16760
+ tone: "formal",
16761
+ targetAudience: ["senior-developers", "tech-leads", "architects"]
16762
+ }
16763
+ ],
16764
+ [
16765
+ "leo-alvarez",
16766
+ {
16767
+ type: "leo-alvarez",
16768
+ name: "Leo Alvarez",
16769
+ description: "AI-enthusiastic junior developer focused on learning and quick productivity gains",
16770
+ expertise: [
16771
+ "Frontend Development",
16772
+ "API Integration",
16773
+ "Modern Frameworks"
16774
+ ],
16775
+ focus: ["learning", "productivity", "unblocking", "skill-development"],
16776
+ tone: "friendly",
16777
+ targetAudience: ["junior-developers", "team-leads", "mentors"]
16778
+ }
16277
16779
  ]
16278
16780
  ]);
16279
16781
  static createPersona(type, enableLLMCoalescing = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankh-studio/ai-enablement",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "repository": {
70
70
  "type": "git",
71
- "url": "https://github.com/Ankh-Studio/ai-enablement-platform.git"
71
+ "url": "git+https://github.com/Ankh-Studio/ai-enablement-platform.git"
72
72
  },
73
73
  "homepage": "https://github.com/Ankh-Studio/ai-enablement-platform#readme",
74
74
  "bugs": {