forgesmith 0.7.0 → 0.7.1

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/index.d.cts CHANGED
@@ -330,7 +330,7 @@ interface ADROutput {
330
330
  }
331
331
  declare function generateADR(opts: GenerateADROpts): Promise<ADROutput>;
332
332
 
333
- interface GitRangeContext {
333
+ interface GitRangeContext$1 {
334
334
  commits: Array<{
335
335
  hash: string;
336
336
  subject: string;
@@ -343,7 +343,7 @@ interface GitRangeContext {
343
343
  filesChanged: number;
344
344
  }
345
345
  interface GenerateSprintRetroOpts {
346
- gitContext?: GitRangeContext;
346
+ gitContext?: GitRangeContext$1;
347
347
  amberContext?: AmberLayerContext;
348
348
  greenContext?: GreenLayerContext;
349
349
  scoreBefore?: number;
@@ -523,6 +523,207 @@ interface KnowledgeCaptureResult {
523
523
  }
524
524
  declare function generateKnowledgeCapture(options: KnowledgeCaptureOptions): Promise<KnowledgeCaptureResult>;
525
525
 
526
+ /**
527
+ * generateApiChangelog
528
+ *
529
+ * Generates a consumer-specific API changelog from detected API file changes.
530
+ * Supports three output formats: changelog, migration-guide, and release-notes.
531
+ * Audience-aware: internal / external / partner tone control.
532
+ */
533
+
534
+ interface ApiChange {
535
+ endpoint: string;
536
+ changeType: "added" | "removed" | "modified" | "breaking";
537
+ file: string;
538
+ capability?: string;
539
+ capabilityName?: string;
540
+ description?: string;
541
+ }
542
+ interface ApiChangeContext {
543
+ from: string;
544
+ to: string;
545
+ changes: ApiChange[];
546
+ breakingChanges: ApiChange[];
547
+ newEndpoints: ApiChange[];
548
+ removedEndpoints: ApiChange[];
549
+ totalChanged: number;
550
+ }
551
+ interface GenerateApiChangelogOpts {
552
+ apiChangeContext: ApiChangeContext;
553
+ amberContext?: AmberLayerContext;
554
+ gitContext?: {
555
+ from: string;
556
+ to: string;
557
+ commitCount: number;
558
+ commitMessages: string[];
559
+ };
560
+ targetAudience: "internal" | "external" | "partner";
561
+ format: "changelog" | "migration-guide" | "release-notes";
562
+ projectName: string;
563
+ version?: string;
564
+ llm: LlmProvider;
565
+ }
566
+ interface ApiChangelogOutput {
567
+ version: string;
568
+ date: string;
569
+ targetAudience: string;
570
+ breakingChanges: Array<{
571
+ endpoint: string;
572
+ description: string;
573
+ migration: string;
574
+ }>;
575
+ newFeatures: Array<{
576
+ endpoint: string;
577
+ description: string;
578
+ example?: string;
579
+ }>;
580
+ improvements: Array<{
581
+ endpoint: string;
582
+ description: string;
583
+ }>;
584
+ deprecations: Array<{
585
+ endpoint: string;
586
+ description: string;
587
+ sunset?: string;
588
+ }>;
589
+ migrationGuide: string;
590
+ consumerImpactSummary: string;
591
+ }
592
+ declare function generateApiChangelog(opts: GenerateApiChangelogOpts): Promise<ApiChangelogOutput>;
593
+
594
+ /**
595
+ * generateChangeImpactBrief
596
+ *
597
+ * Generates an executive-ready 2-page change impact brief for CTO / CAB sign-off.
598
+ * Consumes ChangeImpactContext from PRISM, optionally enriched with AMBER and GREEN
599
+ * layer data from forgesmith readers.
600
+ */
601
+
602
+ /** Minimal git range context — populated by callers from git log. */
603
+ interface GitRangeContext {
604
+ from: string;
605
+ to: string;
606
+ commitCount: number;
607
+ commitMessages: string[];
608
+ breakingChanges: string[];
609
+ }
610
+ /** Shape returned by PRISM /api/green/change-impact */
611
+ interface ChangeImpactContext {
612
+ from: string;
613
+ to: string;
614
+ commitCount: number;
615
+ filesChanged: string[];
616
+ affectedCapabilities: Array<{
617
+ id: string;
618
+ name: string;
619
+ criticality: string;
620
+ changedFiles: string[];
621
+ driftCount: number;
622
+ }>;
623
+ regulatoryCapabilities: string[];
624
+ coherenceScoreBefore: number | null;
625
+ coherenceScoreAfter: number | null;
626
+ coherenceDelta: number | null;
627
+ topRisks: string[];
628
+ breakingChanges: string[];
629
+ summary: string;
630
+ }
631
+ interface GenerateChangeImpactBriefOpts {
632
+ gitContext: GitRangeContext;
633
+ changeImpactContext: ChangeImpactContext;
634
+ amberContext?: AmberLayerContext;
635
+ greenContext?: GreenLayerContext;
636
+ audience: "executive" | "technical" | "cab";
637
+ projectName: string;
638
+ releaseVersion?: string;
639
+ llm: LlmProvider;
640
+ }
641
+ interface ChangeImpactBrief {
642
+ title: string;
643
+ releaseVersion: string;
644
+ date: string;
645
+ audience: string;
646
+ executiveSummary: string;
647
+ technicalSummary: string;
648
+ affectedBusinessAreas: string[];
649
+ riskLevel: "low" | "medium" | "high" | "critical";
650
+ riskJustification: string;
651
+ complianceImpact: string;
652
+ rollbackComplexity: "simple" | "moderate" | "complex";
653
+ rollbackGuidance: string;
654
+ recommendedActions: string[];
655
+ approvalRequired: boolean;
656
+ metrics: {
657
+ commits: number;
658
+ filesChanged: number;
659
+ capabilitiesAffected: number;
660
+ coherenceDelta: number | null;
661
+ };
662
+ }
663
+ declare function generateChangeImpactBrief(opts: GenerateChangeImpactBriefOpts): Promise<ChangeImpactBrief>;
664
+
665
+ /**
666
+ * generateRoiSlide.ts
667
+ *
668
+ * FORGE generator that converts a PRISM ROI estimate into a CFO-ready
669
+ * 5-slide executive deck. Uses LLM to craft persuasive copy; falls back
670
+ * to deterministic templates when the LLM is unavailable.
671
+ *
672
+ * @amber-capability forge.roi-slide
673
+ * @amber-doc Converts PRISM technical-debt ROI estimates into executive slide decks
674
+ */
675
+
676
+ interface RoiBreakdownItem {
677
+ count: number;
678
+ hoursPerMonth: number;
679
+ cost: number;
680
+ }
681
+ interface RoiEstimate {
682
+ currentScore: number;
683
+ currentGrade: string;
684
+ estimatedMaintenanceHoursPerMonth: number;
685
+ maintenanceCostPerMonth: number;
686
+ maintenanceCostPerYear: number;
687
+ targetScore: number;
688
+ targetGrade: string;
689
+ savedHoursPerMonth: number;
690
+ savedCostPerMonth: number;
691
+ savedCostPerYear: number;
692
+ roiMultiple: number;
693
+ breakdown: {
694
+ importCycles: RoiBreakdownItem;
695
+ documentationDrift: RoiBreakdownItem;
696
+ highChurnFiles: RoiBreakdownItem;
697
+ orphanedCode: RoiBreakdownItem;
698
+ };
699
+ estimatedRemediationDays: number;
700
+ breakEvenMonths: number;
701
+ headline: string;
702
+ recommendation: string;
703
+ }
704
+ type RoiSlideType = "title" | "problem" | "cost-breakdown" | "scenarios" | "recommendation" | "cta";
705
+ interface RoiSlide {
706
+ type: RoiSlideType;
707
+ title: string;
708
+ content: string;
709
+ highlight?: string;
710
+ highlightLabel?: string;
711
+ bullets?: string[];
712
+ }
713
+ interface RoiSlideOutput {
714
+ title: string;
715
+ slides: RoiSlide[];
716
+ executiveSummary: string;
717
+ oneLinePitch: string;
718
+ }
719
+ interface GenerateRoiSlideOpts {
720
+ roiEstimate: RoiEstimate;
721
+ organizationName?: string;
722
+ currency: "EUR" | "USD" | "GBP";
723
+ llm: LlmProvider;
724
+ }
725
+ declare function generateRoiSlide(opts: GenerateRoiSlideOpts): Promise<RoiSlideOutput>;
726
+
526
727
  type ScopeKind = "framework" | "app" | "tenant";
527
728
  type SignalKind = "brief" | "knowledge_ref" | "git_range" | "app_feature_ref" | "business_capability_ref" | "amber_capability_ref" | "platform_walkthrough" | "green_insight_ref";
528
729
  type Channel = "heise" | "connect" | "linkedin" | "instagram" | "landing" | "onepager" | "internal" | "email" | "deck" | "x" | "product_hunt" | "presentation";
@@ -1329,4 +1530,4 @@ declare function exportToICalendar(entries: ScheduledEntry[]): string;
1329
1530
  type ExportFormat = "buffer" | "hypefury" | "icalendar";
1330
1531
  declare function previewExport(entries: ScheduledEntry[], format: ExportFormat): string;
1331
1532
 
1332
- export { type ADRDocument, type ADROutput, ANIMATION_DURATION_PRESETS, type AdrContext, type Arc42Document, type Arc42Options, type Arc42Section, type ArchitectureWalkthroughOpts, type ArrayField, type AskDrivenAssetFormat, type AskDrivenAssetOpts, type AssetKind, type AssetSlotsValidationErr, type AssetSlotsValidationOk, type AssetSlotsValidationResult, type AssetVersion, type AudienceId, BRAND_CONTENT_SLOT_KEYS, BUNDLED_DISPATCH_CHANNELS, BUNDLED_STYLE_PRESETS, BUNDLED_WIDGET_TEMPLATES, type BlueprintData, type BlueprintEdge, type BlueprintFile, type BooleanField, type BrandKit, type BrandKitFonts, type BrandKitLogo, type BrandKitPalette, type BrandKitSnapshot, type BrandKitVoice, type BrandPalette, type BrandThemeConfig, type ChangesSinceOpts, type Channel, type ChannelKind, type ChannelOutput, type ComplianceCapabilityRecord, type ComplianceContext, type ComplianceDocOutput, type ComplianceFramework, type ComplianceSection, DEFAULT_ANIMATION_DURATION_SECONDS, DEFAULT_BRAND_KIT_FONTS, DEFAULT_BRAND_KIT_PALETTE, DEFAULT_BRAND_KIT_VOICE, DISPATCH_CHANNEL_BLOG, DISPATCH_CHANNEL_EMAIL, DISPATCH_CHANNEL_HN, DISPATCH_CHANNEL_INSTAGRAM, DISPATCH_CHANNEL_LINKEDIN, DISPATCH_CHANNEL_NEWSLETTER, DISPATCH_CHANNEL_REDDIT, DISPATCH_CHANNEL_SLACK, DISPATCH_CHANNEL_TWEET, type DiffEntry, type DiffResult, type DispatchAudienceContext, type DispatchBrandContext, type DispatchChannel, type DispatchRun, type ExportFormat, FORGE_AUDIENCES, FORGE_BRAND_THEME_ID, FORGE_TEMPLATES, FREE_TIER_WIDGET_IDS, type FileEntry, type ForgeAsset, type ForgeAudience, type ForgeGenerationDryRun, type ForgeGenerationError, type ForgeGenerationGenerated, type ForgeGenerationInput, type ForgeGenerationResult, type ForgeOutput, type ForgePrompt, type ForgeScope, type ForgeSignal, type ForgeStorage, type ForgeSubview, type ForgeTemplate, type ForgeThemeEntry, type FormErrors, type FormField, type FormSpec, type FormSpecOk, type FormSpecRaw, type Format, type GenerateADROpts, type GenerateComplianceDocOpts, type GenerateNewsletterOpts, type GeneratePresentationOpts, type GenerateSprintRetroOpts, type GenerationResult, type GitRangeContext, type Intent, type KnowledgeCaptureOptions, type KnowledgeCaptureResult, type KnowledgeCaptureSection, type ListOutputsOpts, type LlmMessage, type LlmProvider, type LlmRequest, type LlmResponse, MAX_ANIMATION_DURATION_SECONDS, MIN_ANIMATION_DURATION_SECONDS, type Modality, type NewsletterOutput, type NumberField, type ObjectField, type OnboardingDocOpts, type OrchestrationInput, type OrchestrationResult, type OutputStatus, PRISM_TEMPLATES, PRISM_TEMPLATE_ARCHITECTURE_OVERVIEW, PRISM_TEMPLATE_REFACTOR_RATIONALE, PRISM_TEMPLATE_RELEASE_ANNOUNCEMENT, PRISM_TEMPLATE_SHIPPING_DIGEST, PRISM_TEMPLATE_ZONE_DEEPDIVE, type PresentationOutput, type PresentationSlide, type PresentationSlideType, type PrismBrandDraft, type PrismContextPrompt, type PrismData, type PrismFocus, type PrismInsight, type PrismRecommendation, type PrismSession, type PrismTemplate, type ProductTruth, type ProductTruthClaim, REFINE_COUNTDOWN_THRESHOLD, REFINE_SESSION_SOFT_CAP, REFINE_SUGGESTIONS, type RadioOptions, type RadioResult, type ReadingLevel, type RefactoringReportOpts, type RefineAssetInput, type RefineAssetResult, type RefineLimitState, type RefineSuggestion, type ReleaseNotesOpts, type RenderWidgetInput, type ResolveBrandPaletteInput, type ResolvedTuple, STYLE_PRESET_BRUTALIST, STYLE_PRESET_DEFAULT, STYLE_PRESET_GLASSY, STYLE_PRESET_MINIMAL, type ScheduleRange, type ScheduledEntry, type ScheduledEntryMetadata, type ScheduledStatus, type SchemaDefinitionErr, type SchemaDefinitionOk, type SchemaDefinitionResult, type ScopeKind, type SignalKind, type SprintRetroOutput, type StringField, type StyleTokens, TEMPLATE_SCHEMA_EXAMPLES, TEMPLATE_SCHEMA_GENERIC, type TokenUsage, type Tonality, type UrlBrandHints, type ValidationErr, type ValidationOk, type ValidationResult, WIDGET_TEMPLATE_CHANGELOG_ROW, WIDGET_TEMPLATE_CTA_BANNER, WIDGET_TEMPLATE_FEATURE_GRID, WIDGET_TEMPLATE_METRIC_BADGE, WIDGET_TEMPLATE_PRICING_TIER, WIDGET_TEMPLATE_SOCIAL_PROOF, WIDGET_TEMPLATE_STAT_CARD, WIDGET_TEMPLATE_TESTIMONIAL, type WeeklyDigestContext, type WidgetExportFormat, type WidgetInstance, type WidgetInstanceSnapshot, type WidgetKind, type WidgetSlotDef, type WidgetSlotType, type WidgetStyle, type WidgetStyleSnapshot, type WidgetTemplate, type Zone, applyEntryPatch, asAudienceId, assembleBrandUrlExtractionPrompt, assembleForgePrompt, brandThemeConfigToEntry, buildRevertVersion, buildScheduledEntry, buildVersion, cascadingScheduledFor, clampAnimationDuration, computeDiff, defaultBrandKit, defaultValueForField, distill, entryInRange, exportToBufferCsv, exportToHypefuryCsv, exportToICalendar, generateADR, generateArc42, generateArchitectureWalkthrough, generateAskDrivenAsset, generateChangesSince, generateComplianceDoc, generateKnowledgeCapture, generateNewsletter, generateOnboardingDoc, generatePresentation, generateRadio, generateRefactoringReport, generateReleaseNotes, generateSprintRetro, getDispatchChannel, getPrismTemplate, getSlotValue, getStyleById, getWidgetTemplate, initialFormValues, next7DaysRange, nextVersionNumber, orchestrateDispatch, parseAndValidateSchemaDefinition, parseBrandKitFromLlmResponse, parseBrandThemeContent, parseStyleFromCss, parseStyleFromTailwindConfig, parseStyleFromTokensJson, parseThemeConfigContent, previewExport, refineAsset, refineLimitState, renderWidget, resolveAnimatedChoice, resolveAnimationDuration, resolveBrandPalette, runForgeGeneration, scanForSecrets, schemaExampleFor, schemaToForm, templateAnimatedDefault, themeEntryToPalette, tryParseJsonObject, validateAgainstTemplateSchema, validateAssetSlots, validateFormValues, validateSchemaDefinition };
1533
+ export { type ADRDocument, type ADROutput, ANIMATION_DURATION_PRESETS, type AdrContext, type ApiChange, type ApiChangeContext, type ApiChangelogOutput, type Arc42Document, type Arc42Options, type Arc42Section, type ArchitectureWalkthroughOpts, type ArrayField, type AskDrivenAssetFormat, type AskDrivenAssetOpts, type AssetKind, type AssetSlotsValidationErr, type AssetSlotsValidationOk, type AssetSlotsValidationResult, type AssetVersion, type AudienceId, BRAND_CONTENT_SLOT_KEYS, BUNDLED_DISPATCH_CHANNELS, BUNDLED_STYLE_PRESETS, BUNDLED_WIDGET_TEMPLATES, type BlueprintData, type BlueprintEdge, type BlueprintFile, type BooleanField, type BrandKit, type BrandKitFonts, type BrandKitLogo, type BrandKitPalette, type BrandKitSnapshot, type BrandKitVoice, type BrandPalette, type BrandThemeConfig, type ChangeImpactBrief, type ChangeImpactContext, type ChangesSinceOpts, type Channel, type ChannelKind, type ChannelOutput, type ComplianceCapabilityRecord, type ComplianceContext, type ComplianceDocOutput, type ComplianceFramework, type ComplianceSection, DEFAULT_ANIMATION_DURATION_SECONDS, DEFAULT_BRAND_KIT_FONTS, DEFAULT_BRAND_KIT_PALETTE, DEFAULT_BRAND_KIT_VOICE, DISPATCH_CHANNEL_BLOG, DISPATCH_CHANNEL_EMAIL, DISPATCH_CHANNEL_HN, DISPATCH_CHANNEL_INSTAGRAM, DISPATCH_CHANNEL_LINKEDIN, DISPATCH_CHANNEL_NEWSLETTER, DISPATCH_CHANNEL_REDDIT, DISPATCH_CHANNEL_SLACK, DISPATCH_CHANNEL_TWEET, type DiffEntry, type DiffResult, type DispatchAudienceContext, type DispatchBrandContext, type DispatchChannel, type DispatchRun, type ExportFormat, FORGE_AUDIENCES, FORGE_BRAND_THEME_ID, FORGE_TEMPLATES, FREE_TIER_WIDGET_IDS, type FileEntry, type ForgeAsset, type ForgeAudience, type ForgeGenerationDryRun, type ForgeGenerationError, type ForgeGenerationGenerated, type ForgeGenerationInput, type ForgeGenerationResult, type ForgeOutput, type ForgePrompt, type ForgeScope, type ForgeSignal, type ForgeStorage, type ForgeSubview, type ForgeTemplate, type ForgeThemeEntry, type FormErrors, type FormField, type FormSpec, type FormSpecOk, type FormSpecRaw, type Format, type GenerateADROpts, type GenerateApiChangelogOpts, type GenerateChangeImpactBriefOpts, type GenerateComplianceDocOpts, type GenerateNewsletterOpts, type GeneratePresentationOpts, type GenerateRoiSlideOpts, type GenerateSprintRetroOpts, type GenerationResult, type GitRangeContext$1 as GitRangeContext, type Intent, type KnowledgeCaptureOptions, type KnowledgeCaptureResult, type KnowledgeCaptureSection, type ListOutputsOpts, type LlmMessage, type LlmProvider, type LlmRequest, type LlmResponse, MAX_ANIMATION_DURATION_SECONDS, MIN_ANIMATION_DURATION_SECONDS, type Modality, type NewsletterOutput, type NumberField, type ObjectField, type OnboardingDocOpts, type OrchestrationInput, type OrchestrationResult, type OutputStatus, PRISM_TEMPLATES, PRISM_TEMPLATE_ARCHITECTURE_OVERVIEW, PRISM_TEMPLATE_REFACTOR_RATIONALE, PRISM_TEMPLATE_RELEASE_ANNOUNCEMENT, PRISM_TEMPLATE_SHIPPING_DIGEST, PRISM_TEMPLATE_ZONE_DEEPDIVE, type PresentationOutput, type PresentationSlide, type PresentationSlideType, type PrismBrandDraft, type PrismContextPrompt, type PrismData, type PrismFocus, type PrismInsight, type PrismRecommendation, type PrismSession, type PrismTemplate, type ProductTruth, type ProductTruthClaim, REFINE_COUNTDOWN_THRESHOLD, REFINE_SESSION_SOFT_CAP, REFINE_SUGGESTIONS, type RadioOptions, type RadioResult, type ReadingLevel, type RefactoringReportOpts, type RefineAssetInput, type RefineAssetResult, type RefineLimitState, type RefineSuggestion, type ReleaseNotesOpts, type RenderWidgetInput, type ResolveBrandPaletteInput, type ResolvedTuple, type RoiBreakdownItem, type RoiEstimate, type RoiSlide, type RoiSlideOutput, type RoiSlideType, STYLE_PRESET_BRUTALIST, STYLE_PRESET_DEFAULT, STYLE_PRESET_GLASSY, STYLE_PRESET_MINIMAL, type ScheduleRange, type ScheduledEntry, type ScheduledEntryMetadata, type ScheduledStatus, type SchemaDefinitionErr, type SchemaDefinitionOk, type SchemaDefinitionResult, type ScopeKind, type SignalKind, type SprintRetroOutput, type StringField, type StyleTokens, TEMPLATE_SCHEMA_EXAMPLES, TEMPLATE_SCHEMA_GENERIC, type TokenUsage, type Tonality, type UrlBrandHints, type ValidationErr, type ValidationOk, type ValidationResult, WIDGET_TEMPLATE_CHANGELOG_ROW, WIDGET_TEMPLATE_CTA_BANNER, WIDGET_TEMPLATE_FEATURE_GRID, WIDGET_TEMPLATE_METRIC_BADGE, WIDGET_TEMPLATE_PRICING_TIER, WIDGET_TEMPLATE_SOCIAL_PROOF, WIDGET_TEMPLATE_STAT_CARD, WIDGET_TEMPLATE_TESTIMONIAL, type WeeklyDigestContext, type WidgetExportFormat, type WidgetInstance, type WidgetInstanceSnapshot, type WidgetKind, type WidgetSlotDef, type WidgetSlotType, type WidgetStyle, type WidgetStyleSnapshot, type WidgetTemplate, type Zone, applyEntryPatch, asAudienceId, assembleBrandUrlExtractionPrompt, assembleForgePrompt, brandThemeConfigToEntry, buildRevertVersion, buildScheduledEntry, buildVersion, cascadingScheduledFor, clampAnimationDuration, computeDiff, defaultBrandKit, defaultValueForField, distill, entryInRange, exportToBufferCsv, exportToHypefuryCsv, exportToICalendar, generateADR, generateApiChangelog, generateArc42, generateArchitectureWalkthrough, generateAskDrivenAsset, generateChangeImpactBrief, generateChangesSince, generateComplianceDoc, generateKnowledgeCapture, generateNewsletter, generateOnboardingDoc, generatePresentation, generateRadio, generateRefactoringReport, generateReleaseNotes, generateRoiSlide, generateSprintRetro, getDispatchChannel, getPrismTemplate, getSlotValue, getStyleById, getWidgetTemplate, initialFormValues, next7DaysRange, nextVersionNumber, orchestrateDispatch, parseAndValidateSchemaDefinition, parseBrandKitFromLlmResponse, parseBrandThemeContent, parseStyleFromCss, parseStyleFromTailwindConfig, parseStyleFromTokensJson, parseThemeConfigContent, previewExport, refineAsset, refineLimitState, renderWidget, resolveAnimatedChoice, resolveAnimationDuration, resolveBrandPalette, runForgeGeneration, scanForSecrets, schemaExampleFor, schemaToForm, templateAnimatedDefault, themeEntryToPalette, tryParseJsonObject, validateAgainstTemplateSchema, validateAssetSlots, validateFormValues, validateSchemaDefinition };
package/dist/index.d.ts CHANGED
@@ -330,7 +330,7 @@ interface ADROutput {
330
330
  }
331
331
  declare function generateADR(opts: GenerateADROpts): Promise<ADROutput>;
332
332
 
333
- interface GitRangeContext {
333
+ interface GitRangeContext$1 {
334
334
  commits: Array<{
335
335
  hash: string;
336
336
  subject: string;
@@ -343,7 +343,7 @@ interface GitRangeContext {
343
343
  filesChanged: number;
344
344
  }
345
345
  interface GenerateSprintRetroOpts {
346
- gitContext?: GitRangeContext;
346
+ gitContext?: GitRangeContext$1;
347
347
  amberContext?: AmberLayerContext;
348
348
  greenContext?: GreenLayerContext;
349
349
  scoreBefore?: number;
@@ -523,6 +523,207 @@ interface KnowledgeCaptureResult {
523
523
  }
524
524
  declare function generateKnowledgeCapture(options: KnowledgeCaptureOptions): Promise<KnowledgeCaptureResult>;
525
525
 
526
+ /**
527
+ * generateApiChangelog
528
+ *
529
+ * Generates a consumer-specific API changelog from detected API file changes.
530
+ * Supports three output formats: changelog, migration-guide, and release-notes.
531
+ * Audience-aware: internal / external / partner tone control.
532
+ */
533
+
534
+ interface ApiChange {
535
+ endpoint: string;
536
+ changeType: "added" | "removed" | "modified" | "breaking";
537
+ file: string;
538
+ capability?: string;
539
+ capabilityName?: string;
540
+ description?: string;
541
+ }
542
+ interface ApiChangeContext {
543
+ from: string;
544
+ to: string;
545
+ changes: ApiChange[];
546
+ breakingChanges: ApiChange[];
547
+ newEndpoints: ApiChange[];
548
+ removedEndpoints: ApiChange[];
549
+ totalChanged: number;
550
+ }
551
+ interface GenerateApiChangelogOpts {
552
+ apiChangeContext: ApiChangeContext;
553
+ amberContext?: AmberLayerContext;
554
+ gitContext?: {
555
+ from: string;
556
+ to: string;
557
+ commitCount: number;
558
+ commitMessages: string[];
559
+ };
560
+ targetAudience: "internal" | "external" | "partner";
561
+ format: "changelog" | "migration-guide" | "release-notes";
562
+ projectName: string;
563
+ version?: string;
564
+ llm: LlmProvider;
565
+ }
566
+ interface ApiChangelogOutput {
567
+ version: string;
568
+ date: string;
569
+ targetAudience: string;
570
+ breakingChanges: Array<{
571
+ endpoint: string;
572
+ description: string;
573
+ migration: string;
574
+ }>;
575
+ newFeatures: Array<{
576
+ endpoint: string;
577
+ description: string;
578
+ example?: string;
579
+ }>;
580
+ improvements: Array<{
581
+ endpoint: string;
582
+ description: string;
583
+ }>;
584
+ deprecations: Array<{
585
+ endpoint: string;
586
+ description: string;
587
+ sunset?: string;
588
+ }>;
589
+ migrationGuide: string;
590
+ consumerImpactSummary: string;
591
+ }
592
+ declare function generateApiChangelog(opts: GenerateApiChangelogOpts): Promise<ApiChangelogOutput>;
593
+
594
+ /**
595
+ * generateChangeImpactBrief
596
+ *
597
+ * Generates an executive-ready 2-page change impact brief for CTO / CAB sign-off.
598
+ * Consumes ChangeImpactContext from PRISM, optionally enriched with AMBER and GREEN
599
+ * layer data from forgesmith readers.
600
+ */
601
+
602
+ /** Minimal git range context — populated by callers from git log. */
603
+ interface GitRangeContext {
604
+ from: string;
605
+ to: string;
606
+ commitCount: number;
607
+ commitMessages: string[];
608
+ breakingChanges: string[];
609
+ }
610
+ /** Shape returned by PRISM /api/green/change-impact */
611
+ interface ChangeImpactContext {
612
+ from: string;
613
+ to: string;
614
+ commitCount: number;
615
+ filesChanged: string[];
616
+ affectedCapabilities: Array<{
617
+ id: string;
618
+ name: string;
619
+ criticality: string;
620
+ changedFiles: string[];
621
+ driftCount: number;
622
+ }>;
623
+ regulatoryCapabilities: string[];
624
+ coherenceScoreBefore: number | null;
625
+ coherenceScoreAfter: number | null;
626
+ coherenceDelta: number | null;
627
+ topRisks: string[];
628
+ breakingChanges: string[];
629
+ summary: string;
630
+ }
631
+ interface GenerateChangeImpactBriefOpts {
632
+ gitContext: GitRangeContext;
633
+ changeImpactContext: ChangeImpactContext;
634
+ amberContext?: AmberLayerContext;
635
+ greenContext?: GreenLayerContext;
636
+ audience: "executive" | "technical" | "cab";
637
+ projectName: string;
638
+ releaseVersion?: string;
639
+ llm: LlmProvider;
640
+ }
641
+ interface ChangeImpactBrief {
642
+ title: string;
643
+ releaseVersion: string;
644
+ date: string;
645
+ audience: string;
646
+ executiveSummary: string;
647
+ technicalSummary: string;
648
+ affectedBusinessAreas: string[];
649
+ riskLevel: "low" | "medium" | "high" | "critical";
650
+ riskJustification: string;
651
+ complianceImpact: string;
652
+ rollbackComplexity: "simple" | "moderate" | "complex";
653
+ rollbackGuidance: string;
654
+ recommendedActions: string[];
655
+ approvalRequired: boolean;
656
+ metrics: {
657
+ commits: number;
658
+ filesChanged: number;
659
+ capabilitiesAffected: number;
660
+ coherenceDelta: number | null;
661
+ };
662
+ }
663
+ declare function generateChangeImpactBrief(opts: GenerateChangeImpactBriefOpts): Promise<ChangeImpactBrief>;
664
+
665
+ /**
666
+ * generateRoiSlide.ts
667
+ *
668
+ * FORGE generator that converts a PRISM ROI estimate into a CFO-ready
669
+ * 5-slide executive deck. Uses LLM to craft persuasive copy; falls back
670
+ * to deterministic templates when the LLM is unavailable.
671
+ *
672
+ * @amber-capability forge.roi-slide
673
+ * @amber-doc Converts PRISM technical-debt ROI estimates into executive slide decks
674
+ */
675
+
676
+ interface RoiBreakdownItem {
677
+ count: number;
678
+ hoursPerMonth: number;
679
+ cost: number;
680
+ }
681
+ interface RoiEstimate {
682
+ currentScore: number;
683
+ currentGrade: string;
684
+ estimatedMaintenanceHoursPerMonth: number;
685
+ maintenanceCostPerMonth: number;
686
+ maintenanceCostPerYear: number;
687
+ targetScore: number;
688
+ targetGrade: string;
689
+ savedHoursPerMonth: number;
690
+ savedCostPerMonth: number;
691
+ savedCostPerYear: number;
692
+ roiMultiple: number;
693
+ breakdown: {
694
+ importCycles: RoiBreakdownItem;
695
+ documentationDrift: RoiBreakdownItem;
696
+ highChurnFiles: RoiBreakdownItem;
697
+ orphanedCode: RoiBreakdownItem;
698
+ };
699
+ estimatedRemediationDays: number;
700
+ breakEvenMonths: number;
701
+ headline: string;
702
+ recommendation: string;
703
+ }
704
+ type RoiSlideType = "title" | "problem" | "cost-breakdown" | "scenarios" | "recommendation" | "cta";
705
+ interface RoiSlide {
706
+ type: RoiSlideType;
707
+ title: string;
708
+ content: string;
709
+ highlight?: string;
710
+ highlightLabel?: string;
711
+ bullets?: string[];
712
+ }
713
+ interface RoiSlideOutput {
714
+ title: string;
715
+ slides: RoiSlide[];
716
+ executiveSummary: string;
717
+ oneLinePitch: string;
718
+ }
719
+ interface GenerateRoiSlideOpts {
720
+ roiEstimate: RoiEstimate;
721
+ organizationName?: string;
722
+ currency: "EUR" | "USD" | "GBP";
723
+ llm: LlmProvider;
724
+ }
725
+ declare function generateRoiSlide(opts: GenerateRoiSlideOpts): Promise<RoiSlideOutput>;
726
+
526
727
  type ScopeKind = "framework" | "app" | "tenant";
527
728
  type SignalKind = "brief" | "knowledge_ref" | "git_range" | "app_feature_ref" | "business_capability_ref" | "amber_capability_ref" | "platform_walkthrough" | "green_insight_ref";
528
729
  type Channel = "heise" | "connect" | "linkedin" | "instagram" | "landing" | "onepager" | "internal" | "email" | "deck" | "x" | "product_hunt" | "presentation";
@@ -1329,4 +1530,4 @@ declare function exportToICalendar(entries: ScheduledEntry[]): string;
1329
1530
  type ExportFormat = "buffer" | "hypefury" | "icalendar";
1330
1531
  declare function previewExport(entries: ScheduledEntry[], format: ExportFormat): string;
1331
1532
 
1332
- export { type ADRDocument, type ADROutput, ANIMATION_DURATION_PRESETS, type AdrContext, type Arc42Document, type Arc42Options, type Arc42Section, type ArchitectureWalkthroughOpts, type ArrayField, type AskDrivenAssetFormat, type AskDrivenAssetOpts, type AssetKind, type AssetSlotsValidationErr, type AssetSlotsValidationOk, type AssetSlotsValidationResult, type AssetVersion, type AudienceId, BRAND_CONTENT_SLOT_KEYS, BUNDLED_DISPATCH_CHANNELS, BUNDLED_STYLE_PRESETS, BUNDLED_WIDGET_TEMPLATES, type BlueprintData, type BlueprintEdge, type BlueprintFile, type BooleanField, type BrandKit, type BrandKitFonts, type BrandKitLogo, type BrandKitPalette, type BrandKitSnapshot, type BrandKitVoice, type BrandPalette, type BrandThemeConfig, type ChangesSinceOpts, type Channel, type ChannelKind, type ChannelOutput, type ComplianceCapabilityRecord, type ComplianceContext, type ComplianceDocOutput, type ComplianceFramework, type ComplianceSection, DEFAULT_ANIMATION_DURATION_SECONDS, DEFAULT_BRAND_KIT_FONTS, DEFAULT_BRAND_KIT_PALETTE, DEFAULT_BRAND_KIT_VOICE, DISPATCH_CHANNEL_BLOG, DISPATCH_CHANNEL_EMAIL, DISPATCH_CHANNEL_HN, DISPATCH_CHANNEL_INSTAGRAM, DISPATCH_CHANNEL_LINKEDIN, DISPATCH_CHANNEL_NEWSLETTER, DISPATCH_CHANNEL_REDDIT, DISPATCH_CHANNEL_SLACK, DISPATCH_CHANNEL_TWEET, type DiffEntry, type DiffResult, type DispatchAudienceContext, type DispatchBrandContext, type DispatchChannel, type DispatchRun, type ExportFormat, FORGE_AUDIENCES, FORGE_BRAND_THEME_ID, FORGE_TEMPLATES, FREE_TIER_WIDGET_IDS, type FileEntry, type ForgeAsset, type ForgeAudience, type ForgeGenerationDryRun, type ForgeGenerationError, type ForgeGenerationGenerated, type ForgeGenerationInput, type ForgeGenerationResult, type ForgeOutput, type ForgePrompt, type ForgeScope, type ForgeSignal, type ForgeStorage, type ForgeSubview, type ForgeTemplate, type ForgeThemeEntry, type FormErrors, type FormField, type FormSpec, type FormSpecOk, type FormSpecRaw, type Format, type GenerateADROpts, type GenerateComplianceDocOpts, type GenerateNewsletterOpts, type GeneratePresentationOpts, type GenerateSprintRetroOpts, type GenerationResult, type GitRangeContext, type Intent, type KnowledgeCaptureOptions, type KnowledgeCaptureResult, type KnowledgeCaptureSection, type ListOutputsOpts, type LlmMessage, type LlmProvider, type LlmRequest, type LlmResponse, MAX_ANIMATION_DURATION_SECONDS, MIN_ANIMATION_DURATION_SECONDS, type Modality, type NewsletterOutput, type NumberField, type ObjectField, type OnboardingDocOpts, type OrchestrationInput, type OrchestrationResult, type OutputStatus, PRISM_TEMPLATES, PRISM_TEMPLATE_ARCHITECTURE_OVERVIEW, PRISM_TEMPLATE_REFACTOR_RATIONALE, PRISM_TEMPLATE_RELEASE_ANNOUNCEMENT, PRISM_TEMPLATE_SHIPPING_DIGEST, PRISM_TEMPLATE_ZONE_DEEPDIVE, type PresentationOutput, type PresentationSlide, type PresentationSlideType, type PrismBrandDraft, type PrismContextPrompt, type PrismData, type PrismFocus, type PrismInsight, type PrismRecommendation, type PrismSession, type PrismTemplate, type ProductTruth, type ProductTruthClaim, REFINE_COUNTDOWN_THRESHOLD, REFINE_SESSION_SOFT_CAP, REFINE_SUGGESTIONS, type RadioOptions, type RadioResult, type ReadingLevel, type RefactoringReportOpts, type RefineAssetInput, type RefineAssetResult, type RefineLimitState, type RefineSuggestion, type ReleaseNotesOpts, type RenderWidgetInput, type ResolveBrandPaletteInput, type ResolvedTuple, STYLE_PRESET_BRUTALIST, STYLE_PRESET_DEFAULT, STYLE_PRESET_GLASSY, STYLE_PRESET_MINIMAL, type ScheduleRange, type ScheduledEntry, type ScheduledEntryMetadata, type ScheduledStatus, type SchemaDefinitionErr, type SchemaDefinitionOk, type SchemaDefinitionResult, type ScopeKind, type SignalKind, type SprintRetroOutput, type StringField, type StyleTokens, TEMPLATE_SCHEMA_EXAMPLES, TEMPLATE_SCHEMA_GENERIC, type TokenUsage, type Tonality, type UrlBrandHints, type ValidationErr, type ValidationOk, type ValidationResult, WIDGET_TEMPLATE_CHANGELOG_ROW, WIDGET_TEMPLATE_CTA_BANNER, WIDGET_TEMPLATE_FEATURE_GRID, WIDGET_TEMPLATE_METRIC_BADGE, WIDGET_TEMPLATE_PRICING_TIER, WIDGET_TEMPLATE_SOCIAL_PROOF, WIDGET_TEMPLATE_STAT_CARD, WIDGET_TEMPLATE_TESTIMONIAL, type WeeklyDigestContext, type WidgetExportFormat, type WidgetInstance, type WidgetInstanceSnapshot, type WidgetKind, type WidgetSlotDef, type WidgetSlotType, type WidgetStyle, type WidgetStyleSnapshot, type WidgetTemplate, type Zone, applyEntryPatch, asAudienceId, assembleBrandUrlExtractionPrompt, assembleForgePrompt, brandThemeConfigToEntry, buildRevertVersion, buildScheduledEntry, buildVersion, cascadingScheduledFor, clampAnimationDuration, computeDiff, defaultBrandKit, defaultValueForField, distill, entryInRange, exportToBufferCsv, exportToHypefuryCsv, exportToICalendar, generateADR, generateArc42, generateArchitectureWalkthrough, generateAskDrivenAsset, generateChangesSince, generateComplianceDoc, generateKnowledgeCapture, generateNewsletter, generateOnboardingDoc, generatePresentation, generateRadio, generateRefactoringReport, generateReleaseNotes, generateSprintRetro, getDispatchChannel, getPrismTemplate, getSlotValue, getStyleById, getWidgetTemplate, initialFormValues, next7DaysRange, nextVersionNumber, orchestrateDispatch, parseAndValidateSchemaDefinition, parseBrandKitFromLlmResponse, parseBrandThemeContent, parseStyleFromCss, parseStyleFromTailwindConfig, parseStyleFromTokensJson, parseThemeConfigContent, previewExport, refineAsset, refineLimitState, renderWidget, resolveAnimatedChoice, resolveAnimationDuration, resolveBrandPalette, runForgeGeneration, scanForSecrets, schemaExampleFor, schemaToForm, templateAnimatedDefault, themeEntryToPalette, tryParseJsonObject, validateAgainstTemplateSchema, validateAssetSlots, validateFormValues, validateSchemaDefinition };
1533
+ export { type ADRDocument, type ADROutput, ANIMATION_DURATION_PRESETS, type AdrContext, type ApiChange, type ApiChangeContext, type ApiChangelogOutput, type Arc42Document, type Arc42Options, type Arc42Section, type ArchitectureWalkthroughOpts, type ArrayField, type AskDrivenAssetFormat, type AskDrivenAssetOpts, type AssetKind, type AssetSlotsValidationErr, type AssetSlotsValidationOk, type AssetSlotsValidationResult, type AssetVersion, type AudienceId, BRAND_CONTENT_SLOT_KEYS, BUNDLED_DISPATCH_CHANNELS, BUNDLED_STYLE_PRESETS, BUNDLED_WIDGET_TEMPLATES, type BlueprintData, type BlueprintEdge, type BlueprintFile, type BooleanField, type BrandKit, type BrandKitFonts, type BrandKitLogo, type BrandKitPalette, type BrandKitSnapshot, type BrandKitVoice, type BrandPalette, type BrandThemeConfig, type ChangeImpactBrief, type ChangeImpactContext, type ChangesSinceOpts, type Channel, type ChannelKind, type ChannelOutput, type ComplianceCapabilityRecord, type ComplianceContext, type ComplianceDocOutput, type ComplianceFramework, type ComplianceSection, DEFAULT_ANIMATION_DURATION_SECONDS, DEFAULT_BRAND_KIT_FONTS, DEFAULT_BRAND_KIT_PALETTE, DEFAULT_BRAND_KIT_VOICE, DISPATCH_CHANNEL_BLOG, DISPATCH_CHANNEL_EMAIL, DISPATCH_CHANNEL_HN, DISPATCH_CHANNEL_INSTAGRAM, DISPATCH_CHANNEL_LINKEDIN, DISPATCH_CHANNEL_NEWSLETTER, DISPATCH_CHANNEL_REDDIT, DISPATCH_CHANNEL_SLACK, DISPATCH_CHANNEL_TWEET, type DiffEntry, type DiffResult, type DispatchAudienceContext, type DispatchBrandContext, type DispatchChannel, type DispatchRun, type ExportFormat, FORGE_AUDIENCES, FORGE_BRAND_THEME_ID, FORGE_TEMPLATES, FREE_TIER_WIDGET_IDS, type FileEntry, type ForgeAsset, type ForgeAudience, type ForgeGenerationDryRun, type ForgeGenerationError, type ForgeGenerationGenerated, type ForgeGenerationInput, type ForgeGenerationResult, type ForgeOutput, type ForgePrompt, type ForgeScope, type ForgeSignal, type ForgeStorage, type ForgeSubview, type ForgeTemplate, type ForgeThemeEntry, type FormErrors, type FormField, type FormSpec, type FormSpecOk, type FormSpecRaw, type Format, type GenerateADROpts, type GenerateApiChangelogOpts, type GenerateChangeImpactBriefOpts, type GenerateComplianceDocOpts, type GenerateNewsletterOpts, type GeneratePresentationOpts, type GenerateRoiSlideOpts, type GenerateSprintRetroOpts, type GenerationResult, type GitRangeContext$1 as GitRangeContext, type Intent, type KnowledgeCaptureOptions, type KnowledgeCaptureResult, type KnowledgeCaptureSection, type ListOutputsOpts, type LlmMessage, type LlmProvider, type LlmRequest, type LlmResponse, MAX_ANIMATION_DURATION_SECONDS, MIN_ANIMATION_DURATION_SECONDS, type Modality, type NewsletterOutput, type NumberField, type ObjectField, type OnboardingDocOpts, type OrchestrationInput, type OrchestrationResult, type OutputStatus, PRISM_TEMPLATES, PRISM_TEMPLATE_ARCHITECTURE_OVERVIEW, PRISM_TEMPLATE_REFACTOR_RATIONALE, PRISM_TEMPLATE_RELEASE_ANNOUNCEMENT, PRISM_TEMPLATE_SHIPPING_DIGEST, PRISM_TEMPLATE_ZONE_DEEPDIVE, type PresentationOutput, type PresentationSlide, type PresentationSlideType, type PrismBrandDraft, type PrismContextPrompt, type PrismData, type PrismFocus, type PrismInsight, type PrismRecommendation, type PrismSession, type PrismTemplate, type ProductTruth, type ProductTruthClaim, REFINE_COUNTDOWN_THRESHOLD, REFINE_SESSION_SOFT_CAP, REFINE_SUGGESTIONS, type RadioOptions, type RadioResult, type ReadingLevel, type RefactoringReportOpts, type RefineAssetInput, type RefineAssetResult, type RefineLimitState, type RefineSuggestion, type ReleaseNotesOpts, type RenderWidgetInput, type ResolveBrandPaletteInput, type ResolvedTuple, type RoiBreakdownItem, type RoiEstimate, type RoiSlide, type RoiSlideOutput, type RoiSlideType, STYLE_PRESET_BRUTALIST, STYLE_PRESET_DEFAULT, STYLE_PRESET_GLASSY, STYLE_PRESET_MINIMAL, type ScheduleRange, type ScheduledEntry, type ScheduledEntryMetadata, type ScheduledStatus, type SchemaDefinitionErr, type SchemaDefinitionOk, type SchemaDefinitionResult, type ScopeKind, type SignalKind, type SprintRetroOutput, type StringField, type StyleTokens, TEMPLATE_SCHEMA_EXAMPLES, TEMPLATE_SCHEMA_GENERIC, type TokenUsage, type Tonality, type UrlBrandHints, type ValidationErr, type ValidationOk, type ValidationResult, WIDGET_TEMPLATE_CHANGELOG_ROW, WIDGET_TEMPLATE_CTA_BANNER, WIDGET_TEMPLATE_FEATURE_GRID, WIDGET_TEMPLATE_METRIC_BADGE, WIDGET_TEMPLATE_PRICING_TIER, WIDGET_TEMPLATE_SOCIAL_PROOF, WIDGET_TEMPLATE_STAT_CARD, WIDGET_TEMPLATE_TESTIMONIAL, type WeeklyDigestContext, type WidgetExportFormat, type WidgetInstance, type WidgetInstanceSnapshot, type WidgetKind, type WidgetSlotDef, type WidgetSlotType, type WidgetStyle, type WidgetStyleSnapshot, type WidgetTemplate, type Zone, applyEntryPatch, asAudienceId, assembleBrandUrlExtractionPrompt, assembleForgePrompt, brandThemeConfigToEntry, buildRevertVersion, buildScheduledEntry, buildVersion, cascadingScheduledFor, clampAnimationDuration, computeDiff, defaultBrandKit, defaultValueForField, distill, entryInRange, exportToBufferCsv, exportToHypefuryCsv, exportToICalendar, generateADR, generateApiChangelog, generateArc42, generateArchitectureWalkthrough, generateAskDrivenAsset, generateChangeImpactBrief, generateChangesSince, generateComplianceDoc, generateKnowledgeCapture, generateNewsletter, generateOnboardingDoc, generatePresentation, generateRadio, generateRefactoringReport, generateReleaseNotes, generateRoiSlide, generateSprintRetro, getDispatchChannel, getPrismTemplate, getSlotValue, getStyleById, getWidgetTemplate, initialFormValues, next7DaysRange, nextVersionNumber, orchestrateDispatch, parseAndValidateSchemaDefinition, parseBrandKitFromLlmResponse, parseBrandThemeContent, parseStyleFromCss, parseStyleFromTailwindConfig, parseStyleFromTokensJson, parseThemeConfigContent, previewExport, refineAsset, refineLimitState, renderWidget, resolveAnimatedChoice, resolveAnimationDuration, resolveBrandPalette, runForgeGeneration, scanForSecrets, schemaExampleFor, schemaToForm, templateAnimatedDefault, themeEntryToPalette, tryParseJsonObject, validateAgainstTemplateSchema, validateAssetSlots, validateFormValues, validateSchemaDefinition };