π§ Localization and Internationalization Agent Specification¶
π― Purpose¶
The Localization and Internationalization (L10n/i18n) Agent enables the ConnectSoft AI Software Factory to deliver globally adaptable, multi-lingual, and region-sensitive software artifacts. Its strategic role is to ensure that every SaaS product, microservice, UI, document, message, and runtime artifact can:
- Support multiple languages and locales
- Adapt content dynamically based on user preferences or tenant region
- Comply with regional standards (date/time formats, currencies, pluralization, etc.)
- Generate translatable, structured, and consistent text assets
- Enable seamless translation workflows, fallback logic, and resource validation
In short: The L10n/i18n Agent guarantees that every ConnectSoft-generated product is ready for global distribution, from launch.
ποΈ Strategic Position in ConnectSoft Factory¶
flowchart TD
VisionBlueprint --> ProductDefinition
ProductDefinition --> UXDesigner
UXDesigner --> UIStringsArtifact
BackendDeveloper --> LocalizableMessages
LocalizationAgent -->|Enriches| UIStringsArtifact
LocalizationAgent -->|Generates| ResourceFiles
LocalizationAgent -->|Validates| i18nCompleteness
ResourceFiles --> TranslationPipeline
TranslationPipeline --> FinalBuildArtifacts
π§© Role in the ConnectSoft Ecosystem¶
| Scope | Role |
|---|---|
| Frontend | Extracts, structures, and formats translatable strings (labels, buttons, messages, etc.) |
| Backend | Converts log messages, validation errors, and dynamic runtime messages into localizable formats |
| APIs | Ensures error responses and default descriptions are culture-aware |
| Documentation | Prepares and emits multi-lingual documentation versions or injection templates |
| Tenant Customization | Applies per-tenant overrides, locale-specific formatting rules, and fallback strategies |
π― Platform Goals Supported¶
| Strategic Goal | How Itβs Enabled |
|---|---|
| Goal #1: AI-Driven SaaS Delivery | Produces locale-ready artifacts as part of the CI chain |
| Goal #2: Multi-Tenant Modular Scale | Applies language and region overlays per tenant or edition |
| Goal #4: Cloud-Native and Region-Ready | Ensures runtime behavior adapts to user locale/region |
| Goal #5: AI-Generated UX & Docs | Localizes UX copy, help text, onboarding flows |
| Goal #9: Observability and Trust | Adds localized traces and logs with context-rich metadata |
β Summary¶
The Localization and Internationalization Agent is a cross-cutting, composable agent that ensures:
- All output is translation-ready
- All services are locale-aware
- All tenants get region-specific behaviors and content
- All interfaces (UI, API, docs) are globally compliant and accessible
It supports a scalable, automated globalization workflow β without requiring manual i18n setup per module.
Ready to proceed to Cycle 2 β Responsibilities?
π§ Localization and Internationalization Agent β Cycle 2: Responsibilities¶
π Core Responsibilities¶
The Localization and Internationalization Agent is responsible for ensuring language-awareness, formatting adaptability, and translation readiness across the full ConnectSoft software generation lifecycle.
It performs proactive enrichment, artifact validation, and translatable resource generation for all relevant modules β spanning frontend, backend, and documentation layers.
π οΈ Key Responsibilities Breakdown¶
| Responsibility | Description |
|---|---|
| Extraction of Localizable Content | Identifies and extracts translatable strings from source artifacts (e.g., UI components, .cs, .html, .md, .json). |
| Generation of Resource Files | Emits structured localization resources (.resx, .json, .po, .xlf, etc.) scoped by locale and module. |
| Internationalization Injection | Converts hardcoded text into dynamic runtime expressions that consume localized values. |
| Fallback & Default Locale Management | Injects fallback mechanisms for missing translations and configures default language behaviors. |
| Formatting Rules Enforcement | Applies locale-aware rules for dates, times, currencies, numbers, and pluralization. |
| Tenant & Edition Overlays | Generates tenant-specific overrides (e.g., custom terms, translations, or phrasing per edition). |
| Localization Validation | Validates completeness and correctness of localized artifacts (missing keys, broken placeholders). |
| Translation Pipeline Integration | Structures output for use with translation services or workflows (e.g., export to XLIFF, Transifex, Lokalise). |
| Multi-Language Documentation Support | Creates localized variants of generated documentation (README.md, help files, product info). |
| Observability for Locale Context | Adds trace and log context for locale-influenced behavior, user preference detection, etc. |
π¦ Outputs Generated by Responsibility¶
| Output Artifact | Responsibility Source |
|---|---|
en.json, he.json, fr.json |
Resource File Generation |
LocalizableStrings.resx |
Backend Internationalization |
translations/i18n.meta.json |
i18n Validation + Translation Metadata |
README.he.md, docs/es/help.md |
Localized Documentation |
MissingKeysReport.md |
Localization Validation |
formatting.rules.yaml |
Locale Formatting Injection |
π€ Autonomous Execution Role¶
This agent prevents localization debt from accumulating in generated code. It inserts L10n/i18n hooks automatically into services, libraries, and UI β ensuring that all ConnectSoft outputs are global-ready from the start.
It also ensures alignment with:
- Frontend Developer Agent (i18n modules in Angular/Blazor)
- Backend Developer Agent (infrastructure for
.resxandIStringLocalizer) - Documentation Writer Agent (for multilingual docs)
β Summary¶
This agent's core deliverables ensure that every ConnectSoft-generated artifact is:
- Extracted into structured localizable resources
- Enriched with fallback, formatting, and language awareness
- Validated for translation completeness
- Integrated into multilingual deployment workflows
Proceed to Cycle 3 β Inputs?
π§ Localization and Internationalization Agent β Cycle 3: Inputs¶
π₯ Inputs Consumed by the Agent¶
The Localization and Internationalization Agent relies on a wide range of upstream inputs β from generated code and UI elements to blueprint metadata and tenant preferences. These inputs allow it to extract contextually relevant strings, apply locale-specific transformations, and prepare resources for multilingual output.
π Input Categories and Examples¶
| Input Type | Description | Example |
|---|---|---|
| Source Artifacts | UI files, backend messages, logs, validation texts | .cshtml, .cs, .ts, .razor, .resx, .html, .js |
| Generated Strings | Any hardcoded string output from other agents (e.g., error messages, button labels) | "Submit", "Invalid password", "Booking confirmed" |
| Module Metadata | Blueprint metadata containing service/module/layer info | moduleId, languageTags, region |
| Blueprint & Prompt Context | Structured input that specifies default language, multilingual needs, edition-specific strings | defaultLanguage: "en", supportedLocales: ["en", "he", "fr"] |
| Tenant and Edition Settings | Custom terms, localized overlays, or restrictions based on tenant/brand | tenantConfig.locale = "fr-CA", editionConfig.localizations = [...] |
| Translation Memory | Existing translations stored in long-term memory or shared libraries | Previously generated fr.json, LocalizableStrings.resx, Glossary.yaml |
| Formatting Profiles | Rules per locale for date/time/currency/plural handling | currencyFormat.yaml, pluralRules.json |
| Agent Execution Traces | Artifacts emitted from prior agents containing translatable output | ExecutionMetadata, VisionDocument, UIComponent.md |
| Documentation Blueprints | Content targeted for multilingual docs | README.md, HelpPage.md, api-reference.yaml |
| i18n Configuration Templates | Default format and structure files (e.g., translation schema) | i18n.config.json, angular.i18n.ts, blazor.localization.cs |
π§© Context Injection Rules¶
The agent also parses contextual input for:
- Agent Lineage: Which agent produced this artifact? (
agentId,skillId) - Module Context: Which module does the artifact belong to? (
moduleId) - Locale Scope: Which locales are required and which are optional? (
supportedLocales) - Platform Type: Is this for UI, backend, API, documentation?
π Example: Full Context Bundle for Booking UI¶
{
"moduleId": "booking-ui",
"supportedLocales": ["en", "fr", "he"],
"defaultLocale": "en",
"agentId": "frontend-developer",
"sourceArtifacts": [
"src/components/BookingButton.tsx",
"src/pages/ConfirmationPage.tsx"
],
"tenant": "vetclinic-france",
"edition": "premium",
"existingMemory": ["booking-ui.fr.json"]
}
β Summary¶
The Localization Agent consumes a rich, multi-modal input layer including:
- Static source code
- Dynamic generation traces
- Tenant/edition overlays
- Semantic context from blueprints and modules
It transforms these inputs into clean, structured, multilingual-ready outputs across the platform.
Proceed to Cycle 4 β Outputs?
π§ Localization and Internationalization Agent β Cycle 4: Outputs¶
π€ Outputs Produced by the Agent¶
The Localization and Internationalization Agent produces structured, multi-language-compatible, and deployment-ready outputs across multiple layers of the ConnectSoft AI Software Factory.
Its outputs are designed to be consumable by translation pipelines, routable by edition/tenant, and integrated seamlessly into services, UIs, APIs, and documentation.
π¦ Output Artifact Categories¶
| Output Type | Description | Format / Example | |
|---|---|---|---|
| Localization Resource Files | Extracted key/value translation maps | en.json, fr.json, LocalizableStrings.resx |
|
| i18n Configuration Files | Framework-specific internationalization settings | i18n.config.ts, localization.config.cs, i18next.config.js |
|
| Fallback Mechanism Code | Code injection ensuring runtime defaults | app.UseRequestLocalization(...) in C#, defaultLocale: 'en' in Angular |
|
| Locale-Aware UI Elements | Updated UI components using translation bindings | `{{ 'booking.confirmation' | translate }}` |
| Localized Documentation | Translated and scoped documentation pages | README.fr.md, docs/es/help.md |
|
| Translation Metadata | Maps string keys to source line numbers, original text, and context | translations.meta.json, missingKeys.report.json |
|
| Missing or Incomplete Keys Report | Validation output listing untranslated or unused keys | MissingTranslations.md, orphaned-keys.json |
|
| Edition-Specific Overrides | Tenant/brand-specific string variants | booking-ui.premium.en.json, booking-ui.vetclinic-fr.json |
|
| Validation & Consistency Logs | Linting output and trace-annotated logs | i18n-validation-trace.json, translation-coverage.csv |
|
| Export Bundles for Translators | Extracted artifacts for external tools (e.g., XLIFF) | booking.i18n.xlf, ui-translations.xlsx |
π Example Output Directory¶
/i18n/
βββ booking-ui/
β βββ en.json
β βββ fr.json
β βββ he.json
β βββ translations.meta.json
β βββ i18n.config.ts
βββ backend-service/
β βββ LocalizableStrings.resx
β βββ LocalizableStrings.fr.resx
β βββ localization.config.cs
β βββ MissingTranslations.md
/docs/
βββ README.md
βββ README.fr.md
βββ README.he.md
π§ Cross-Module Output Integration¶
| Area | Output Type |
|---|---|
| Frontend | i18n files, updated components, config bindings |
| Backend | .resx resources, localized exception messages |
| API | Localized error messages and description fields |
| DevOps/Infra | Locale-specific CI/CD variables and templates |
| Studio | Status of localization coverage, validation reports |
𧬠Embedded Metadata per Output¶
Each generated output is annotated with:
traceId,agentId,skillIdlocale,edition,tenantIdmoduleId,sourceArtifactPathtranslationStatus,generatedAt
Example metadata:
{
"traceId": "trace-987",
"agentId": "localization-agent",
"skillId": "GenerateTranslationResource",
"locale": "fr",
"moduleId": "booking-ui",
"status": "Success",
"missingKeys": 2
}
β Summary¶
The Localization Agent outputs a complete localization package, including:
- Structured resource files
- Code updates with runtime bindings
- Validation and translator-ready artifacts
- Cross-agent usable files for integration with frontend, backend, documentation, and deployment
Ready to proceed to Cycle 5 β Knowledge Base?
π§ Localization and Internationalization Agent β Cycle 5: Knowledge Base¶
π§ What This Agent Already Knows¶
The Localization and Internationalization Agent operates with deep contextual awareness of localization strategies, translation practices, formatting rules, and framework-specific i18n techniques.
It draws on both static domain knowledge and dynamic memory from prior executions, enabling consistent, high-quality multilingual output across modules and releases.
π Built-In Knowledge¶
| Knowledge Area | Description |
|---|---|
| i18n and L10n Standards | Understands ICU Message Format, Unicode CLDR, pluralization, regional formats, and fallback logic |
| Framework-Specific Patterns | Angular i18n, Blazor localization with IStringLocalizer, .NET .resx, i18next, ngx-translate, etc. |
| Message Categorization Heuristics | Knows how to classify text into UI label, alert, error, doc, or placeholder for appropriate structuring |
| Translation Key Generation | Follows slugified, namespaced key formats based on file/module context (e.g., booking.confirmation.title) |
| String Interpolation Rules | Knows how to preserve placeholders (e.g., {0}, ${value}, %s) in a translatable-safe format |
| Default Formatting Conventions | Knows how to format currency, datetime, and numerals by region (e.g., β¬ vs βͺ, MM/DD/YYYY vs DD/MM/YYYY) |
| Fallback Locale Strategies | Implements graceful degradation when target locale is missing or incomplete |
| Common String Reuse Across Modules | Uses memory to avoid redundant generation (e.g., βSubmitβ, βCancelβ, βInvalid passwordβ) |
π§ Factory-Aligned Knowledge Models¶
| Factory Resource | Description |
|---|---|
i18n.config.templates |
Default structure and code patterns per tech stack (Angular, .NET, Blazor, Webflow, etc.) |
LocalizationGlossary.yaml |
Shared base of consistent terminology across projects (e.g., "Invoice", "Appointment", "Submit") |
translation-metadata-schema.json |
Canonical structure for describing translated assets, versions, traceability |
i18n-agent.skills.json |
Describes all available actions this agent can take across domains and languages |
tenant-language-map.yaml |
Maps tenants to supported languages, fallbacks, and preferred regional rules |
SemanticMemory.Vectors |
Embeddings of prior translation usage and alignment between source and localized output |
π§ Dynamic Knowledge from Memory System¶
| Memory Type | Purpose |
|---|---|
| Prior Localized Artifacts | Reuses previously generated .json, .resx, .md files to avoid duplicating translations |
| Blueprint Metadata | Ingests project-wide language rules from VisionDocument, ProductSpec, or EditionMetadata |
| Execution History | References trace logs from previous L10n/i18n runs for reuse, validation, or auto-correction |
| Prompt Corrections & Feedback | Learns from human-in-the-loop fixes or Studio-curated glossary overrides |
π Sample Dynamic Memory Entry¶
{
"moduleId": "booking-ui",
"traceId": "trace-2025-05-17",
"agentId": "localization-agent",
"locale": "he",
"resourcePath": "booking-ui/he.json",
"skillId": "GenerateTranslationFile",
"status": "Success",
"termsUsed": ["appointment", "confirmation", "submit"],
"missingKeys": 0
}
β Summary¶
The Localization Agent is equipped with a rich semantic, structural, and historical knowledge base, enabling it to:
- Operate across languages and frameworks
- Ensure output consistency and reusability
- Automatically apply formatting and localization best practices
- Evolve outputs based on memory and glossary alignment
Proceed to Cycle 6 β Process Flow?
π§ Localization and Internationalization Agent β Cycle 6: Process Flow¶
π Internal Execution Steps¶
The Localization and Internationalization Agent follows a deterministic, modular, and traceable workflow, optimized for extracting, generating, validating, and emitting localization-aware artifacts.
Its process is designed for reuse, reentrancy, and integration with both upstream and downstream agents, following ConnectSoftβs event-driven and clean architecture principles.
𧬠High-Level Execution Phases¶
flowchart TD
Start[Start Execution]
Intake[Artifact Intake & Context Gathering]
Extract[Translatable String Extraction]
Normalize[Key Generation & String Normalization]
GenResources[Resource File Generation (per locale)]
Inject[Code/Template Injection for Runtime i18n]
Validate[Validation & Coverage Checks]
Emit[Emit Artifacts + Metadata]
End[Emit Event & Complete]
Start --> Intake --> Extract --> Normalize --> GenResources --> Inject --> Validate --> Emit --> End
π Step-by-Step Breakdown¶
| Phase | Description |
|---|---|
| 1. Intake & Context Gathering | Ingests source artifacts (.cs, .html, .ts, .md), blueprint metadata, tenant config, and trace context. |
| 2. Extraction of Translatable Strings | Uses rule-based and pattern-based logic to find all literal strings requiring localization. |
| 3. Normalization & Key Generation | Converts extracted strings into namespaced keys (e.g., booking.confirmation.header) and preserves interpolation formats. |
| 4. Resource File Generation | Builds .json, .resx, .po, .yaml files per locale using extracted string/key maps. |
| 5. Runtime Injection | Updates original artifacts to consume localized keys instead of hardcoded values. Injects framework-specific i18n wrappers. |
| 6. Validation Pass | Ensures coverage completeness, detects missing translations, validates plural rules and region formatting. |
| 7. Emission of Outputs | Generates structured i18n folders, translation meta-files, validator reports, and injects them into memory and file store. |
| 8. Event Emission | Emits LocalizationResourcesGenerated, MissingKeysDetected, and TranslationReadyForExport events for downstream agents. |
π§ Decision Branches During Flow¶
| Decision Point | Options |
|---|---|
| Should the file be localized? | Based on extension, annotation, or blueprint instruction (localizable: true) |
| Which locales to generate? | From supportedLocales, tenant config, or fallback rules |
| Format to use? | Based on technology stack and configuration templates (Angular β JSON, .NET β .resx, Docs β MD clones) |
| Fallback mode | Use defaultLocale, auto-copy source to fallback, or mark TODO |
π¦ Example Execution Context (Extracted from Intake Phase)¶
{
"moduleId": "booking-ui",
"traceId": "trace-2025-05-17",
"supportedLocales": ["en", "fr", "he"],
"sourceFiles": ["BookingPage.tsx", "ConfirmationPage.html"],
"tenant": "vetclinic-fr",
"edition": "premium"
}
β Summary¶
The agent executes through a linear but adaptable flow, with each phase emitting traceable metadata, observable spans, and validation events.
This guarantees:
- Predictable multilingual coverage
- Modular integration into any module or edition
- Compatibility with ConnectSoftβs observability, event, and memory systems
Proceed to Cycle 7 β Skills and Kernel Functions?
π§ Localization and Internationalization Agent β Cycle 7: Skills and Kernel Functions¶
π§© Skills Used by the Agent¶
The Localization and Internationalization Agent operates using a set of modular, composable skills, defined in Semantic Kernel (SK) and aligned with ConnectSoft agent execution patterns. These skills allow it to break down its responsibilities into reusable, orchestratable units.
Each skill corresponds to a specific transformation, validation, or generation task in the i18n pipeline.
π§ Core Skill Set¶
| Skill Name | Description |
|---|---|
ExtractTranslatableStrings |
Scans source artifacts and detects translatable string literals, UI labels, error messages, etc. |
GenerateTranslationKeys |
Normalizes keys from strings and maps them using namespaces and module scope (booking.confirmation.header). |
BuildResourceFiles |
Emits .json, .resx, .po, .xlf, or .yaml files per locale, applying tenant/edition overlays. |
InjectRuntimeBindings |
Updates source files to bind to translation keys (e.g., Angular pipes, Razor @Localizer[...], Markdown templates). |
ApplyFallbackRules |
Automatically generates default or fallback values if translations are missing or incomplete. |
ValidateLocalizationCoverage |
Runs consistency and completeness checks across locales, modules, editions. |
DetectLocaleFormattingViolations |
Scans for non-localized number/date/currency usage and applies patch suggestions. |
EmitTranslationMetadata |
Builds structured files to describe translation contexts, string categories, source origin, and trace lineage. |
ExportForTranslationTools |
Prepares bundles for external translation pipelines (e.g., XLIFF export, glossary-based translation suggestion). |
LogI18nObservabilitySignals |
Emits OpenTelemetry spans and status logs with traceId, moduleId, locale, skillId. |
π§ Composite Workflows (Skill Chains)¶
These skills are often executed as chained flows based on module type:
π For UI Modules:¶
flowchart LR
Extract --> GenerateTranslationKeys --> BuildResourceFiles --> InjectRuntimeBindings --> ValidateLocalizationCoverage
π§± For Backend Services:¶
flowchart LR
Extract --> GenerateTranslationKeys --> BuildResourceFiles --> InjectRuntimeBindings --> ApplyFallbackRules --> ValidateLocalizationCoverage
π For Documentation:¶
flowchart LR
Extract --> BuildResourceFiles --> EmitTranslationMetadata --> ExportForTranslationTools
π§ Kernel Function Interfaces¶
Each skill is mapped to SK function signatures:
| Function Name | Input Parameters | Output |
|---|---|---|
ExtractTranslatableStringsAsync |
sourcePaths[], moduleId, locale |
List<TranslatableItem> |
BuildResourceFilesAsync |
List<KeyValuePair>, locale, formatType |
ResourceFileSet |
ValidateLocalizationCoverageAsync |
moduleId, resourcePaths[] |
ValidationReport |
InjectRuntimeBindingsAsync |
sourcePaths[], keyMap, techStack |
InjectionSummary |
All functions are:
- Isolated
- Retryable
- Tagged with execution metadata
- Observable via OpenTelemetry spans
β Summary¶
The Localization Agentβs power comes from its granular, skill-driven structure. Skills are:
- Reusable across modules and languages
- Stack-aware (e.g., .NET vs Angular vs Blazor)
- Traceable and orchestratable
- Compatible with ConnectSoftβs SK planning, memory, and correction layers
Proceed to Cycle 8 β Technologies Used?
π§ Localization and Internationalization Agent β Cycle 8: Technologies Used¶
βοΈ Technology Stack and Infrastructure¶
The Localization and Internationalization Agent leverages the ConnectSoft technology stack in full alignment with platform-wide principles like modularity, AI-first orchestration, observability, and cloud-native scalability.
It integrates with both agentic infrastructure (Semantic Kernel, memory, events) and runtime tooling (i18n libraries, formatting engines, exporters) to produce production-ready multilingual artifacts.
π§ Agentic Technology Foundation¶
| Technology | Purpose |
|---|---|
| Semantic Kernel | Executes and composes modular skills (ExtractTranslatableStrings, BuildResourceFiles, etc.) |
| OpenAI (Azure OpenAI) | Assists in language understanding, interpolation parsing, and glossary alignment |
| Model Context Protocol (MCP) | Optional integration for accessing shared glossaries, multilingual knowledge bases, and translation memory |
| ConnectSoft Memory System | Fetches prior translation files, glossary entries, blueprint metadata, formatting rules |
| Event Bus (internal) | Publishes events like LocalizationResourcesGenerated, TranslationReadyForExport, i18nValidationFailed |
| Execution Trace & Metadata | Used for embedding telemetry and history (traceId, skillId, locale) |
π§© Runtime Tooling and Libraries¶
| Area | Tooling / Library |
|---|---|
| Frontend Localization | ngx-translate, i18next, Angular i18n, Blazor IStringLocalizer, Tailwind + Lang Guards |
| Backend Localization | .resx (C#), IStringLocalizer, IRequestCultureProvider, LocalizationOptions |
| Date/Number Formatting | Intl.DateTimeFormat, Globalize.js, .NET CultureInfo, FluentValidation.LanguageManager |
| Translation Export/Import | XLIFF, PO, XLSX, .json bundles for Transifex, Lokalise, Phrase |
| Documentation | Markdown templating for multilingual docs, frontmatter tags for language awareness |
| Translation Validation | Custom YAML/JSON linters, pluralization rule checkers, ICU validation tools |
| CI/CD Integration | i18n pre-validation hooks in pipelines (Azure DevOps, GitHub Actions, YAML gates) |
| Observability | OpenTelemetry spans for skill execution, Serilog for i18n logs, Grafana dashboards per locale/module |
π Globalization-Aware Execution Stack¶
| Layer | Implementation |
|---|---|
| π§ Agent Layer | Semantic Kernel + Prompt Planner |
| π§± Application Layer | C# / Angular / Blazor translation files, bindings |
| π§ͺ Validation Layer | SK + ICU format validation, missing key reports |
| βοΈ Infrastructure Layer | Azure Blob for translation artifacts, localized CDN bundles |
| π Observability Layer | OTel spans: localization.duration, missingKeys.count, coverage.percent |
π Sample Pipeline Hook (Azure DevOps)¶
- task: DotNetCoreCLI@2
inputs:
command: run
projects: "LocalizationValidator.csproj"
arguments: "--module booking-ui --locale fr"
condition: succeededOrFailed()
β Summary¶
The Localization Agent integrates across:
- π‘ AI (SK + OpenAI)
- π Globalization Libraries (i18n tools per tech)
- π¦ Infrastructure (Azure Blob, EventBus, CI/CD)
- π Observability (OTel, Serilog, validation traces)
- π§ Memory/Knowledge (trace-aligned glossary reuse)
Itβs a fully modular, cloud-native, AI-augmented translation and adaptation layer in the ConnectSoft factory.
Ready to proceed to Cycle 9 β System Prompt?
π§ Localization and Internationalization Agent β Cycle 9: System Prompt (Initialization Instruction)¶
π§Ύ What Is the System Prompt?¶
The System Prompt is the foundational instruction that bootstraps the agentβs personality, role, and boundaries when first invoked. It defines:
- The scope of work (what the agent is responsible for)
- The expected behavior (how it should act)
- The standards and structure it must follow
- The format of outputs
- The alignment with ConnectSoft principles (modularity, traceability, clean architecture)
This prompt serves as the starting configuration for all planning, validation, and generation flows.
π§ System Prompt Template¶
You are the **Localization and Internationalization Agent** within the ConnectSoft AI Software Factory.
Your role is to make all system outputs β UI, backend, documentation, and runtime messages β translatable, locale-aware, and ready for multilingual deployment.
You MUST:
- Extract all translatable strings from source artifacts (code, UI, documentation)
- Convert them into structured translation resources (e.g., `.json`, `.resx`, `.po`, `.md`)
- Inject i18n runtime bindings into UI components, backend services, and documentation templates
- Generate localized documentation and help files when required
- Apply tenant-, edition-, and region-specific overrides where defined
- Handle missing translations with fallback mechanisms or `TODO` placeholders
- Validate translation completeness and formatting consistency
- Emit metadata with `traceId`, `locale`, `skillId`, and `agentId` for each output
- Support integration with external translation pipelines via XLIFF or JSON bundles
- Log observability signals (`missingKeys.count`, `coverage.percent`, `duration.ms`)
You operate in alignment with ConnectSoft platform principles:
- Modular outputs with clean i18n boundaries
- Event-driven orchestration (`LocalizationResourcesGenerated`)
- Semantic memory reuse across services and tenants
- Observability-first: all actions must be traceable
- Edition- and tenant-aware internationalization overlays
Your default languages are:
- English (`en`)
- French (`fr`)
- Hebrew (`he`)
Outputs MUST include:
- Translation keys
- Original values
- Localized versions (if known)
- Missing translation reports
- Markdown and configuration updates where applicable
If an artifact is not translatable or is missing localization support, include a note and fallback instructions.
Never guess β use prior memory or emit fallback markers for human review.
You do NOT define UI behavior, backend logic, or documentation structure β only their localized string layers.
ALWAYS ensure consistent naming, nesting, and scoping of keys (e.g., `booking.confirmation.title`).
Always respect trace boundaries and memory scoping (`moduleId`, `traceId`, `locale`, `tenantId`, `edition`).
You are autonomous, traceable, and clean β an internationalization engine for the ConnectSoft platform.
π Safeguards and Alignment Rules¶
- Must not rewrite logic β only wrap or replace strings
- Must emit missing key warnings with metadata
- Must respect platform formats:
.json,.resx,.md,.yaml - Must be tenant-safe β no cross-tenant leaks
- Must be observable β logs, traces, reports
β Summary¶
This system prompt initializes the agent with:
- A precise and bounded identity
- A clear mission across modules and languages
- Alignment with ConnectSoftβs AI-first, event-driven, modular principles
It sets the stage for predictable, safe, and reusable i18n automation.
Shall we proceed to Cycle 10 β Input Prompt Template?
π§ Localization and Internationalization Agent β Cycle 10: Input Prompt Template¶
π§Ύ What Is the Input Prompt Template?¶
The Input Prompt Template is the standardized, structured input used by orchestrators, coordinators, or planners to activate this agent with context-rich instructions.
It encapsulates all necessary metadata, paths, configuration, and localization targets so that the agent can:
- Extract localizable content
- Generate i18n outputs
- Integrate with downstream workflows (e.g., translators, QA)
This prompt is compatible with Semantic Kernel planners and is shaped to ensure idempotency, observability, and memory alignment.
π Template Format¶
{
"agentId": "localization-agent",
"skillPlan": [
"ExtractTranslatableStrings",
"GenerateTranslationKeys",
"BuildResourceFiles",
"InjectRuntimeBindings",
"ValidateLocalizationCoverage"
],
"traceId": "trace-{{uuid}}",
"moduleId": "booking-ui",
"sourceArtifacts": [
"src/components/BookingPage.tsx",
"src/pages/ConfirmationPage.html"
],
"techStack": "Angular",
"supportedLocales": ["en", "fr", "he"],
"defaultLocale": "en",
"tenantId": "vetclinic-fr",
"editionId": "premium",
"i18nConfig": {
"fallbackEnabled": true,
"pluralizationRules": "ICU",
"interpolationFormat": "{{value}}"
},
"memoryRefs": [
"booking-ui.en.json",
"booking-ui.fr.json",
"translations.meta.json"
],
"observability": {
"emitSpans": true,
"logStatus": true
}
}
π§ Fields Explained¶
| Field | Description |
|---|---|
agentId |
Identifies this as the Localization Agent |
skillPlan |
Ordered list of skills to execute |
traceId |
Traceable session for observability |
moduleId |
Module in scope (e.g., booking-ui) |
sourceArtifacts |
Files to extract strings from |
techStack |
Language/framework (e.g., Angular, .NET, Blazor) |
supportedLocales |
All locales this run must generate |
defaultLocale |
Fallback or base language |
tenantId / editionId |
For context overlays |
i18nConfig |
Special formatting and fallback rules |
memoryRefs |
Existing known i18n artifacts or glossary |
observability |
Toggles for telemetry and logs |
π§© Example Input as YAML¶
moduleId: checkout-service
techStack: dotnet
sourceArtifacts:
- Services/InvoiceService.cs
- Controllers/CheckoutController.cs
supportedLocales: [en, he]
defaultLocale: en
fallbackEnabled: true
traceId: trace-2025-05-17-XYZ
π‘ Usage in Planner¶
This prompt is either:
- Composed dynamically by the Planner Agent based on upstream blueprint context
- Injected manually during Studio-cued multilingualization tasks
- Derived from trace replays to retry previous i18n generation flows
β Summary¶
This Input Prompt Template provides:
- Modular scoping per module/language/tenant
- Full trace and telemetry alignment
- Reusability across services, docs, UI, backend
It ensures consistent and autonomous i18n activation.
Shall we move to Cycle 11 β Output Expectations?
π§ Localization and Internationalization Agent β Cycle 11: Output Expectations¶
π€ What Are Output Expectations?¶
This cycle defines the format, structure, and quality standards for all artifacts, metadata, and logs produced by the Localization and Internationalization Agent.
All outputs must be:
- π§± Modular (scoped per module and locale)
- π Traceable (with traceId, agentId, moduleId, locale, edition)
- π¦ Machine-consumable (for Studio, CI/CD, translators)
- β Validatable (with clear rules and schema alignment)
π¦ Structured Output Types¶
| Output | Description | Format |
|---|---|---|
translation.<locale>.json |
Localized key-value resource file for UIs and docs | JSON |
LocalizableStrings.<locale>.resx |
Localized backend messages and display names | .resx XML |
translations.meta.json |
Translation key map with categories, source locations, and context | JSON |
i18n.config.ts / localization.config.cs |
Runtime i18n configuration bindings | TS / C# |
README.<locale>.md |
Translated documentation | Markdown |
missing-keys.report.json |
Missing translation diagnostics | JSON |
translation-coverage.csv |
Percentages of translation completion | CSV |
observability-events.jsonl |
Span traces for metrics (duration, coverage, etc.) |
JSON Lines |
xliff.bundle.xlf |
Export for external translation platforms | XML (XLIFF) |
π Required Output Structure¶
πΉ JSON Resource File (UI)¶
{
"booking": {
"confirmation": {
"title": "Booking Confirmed",
"details": "Your appointment is scheduled for {{date}}"
}
}
}
πΉ RESX File (Backend)¶
<data name="AppointmentCreatedMessage" xml:space="preserve">
<value>Appointment successfully created</value>
</data>
πΉ Metadata Example¶
{
"moduleId": "booking-ui",
"locale": "fr",
"traceId": "trace-2025-05-17-abc",
"keys": [
{
"id": "booking.confirmation.title",
"source": "src/pages/BookingPage.tsx:22",
"status": "translated",
"glossaryMatched": true
}
]
}
πΉ Missing Keys Report¶
{
"locale": "he",
"missingKeys": [
"booking.cancel.button",
"confirmation.email.subject"
],
"total": 2,
"status": "incomplete"
}
β Output Quality Requirements¶
| Requirement | Description |
|---|---|
| Key naming | Must follow namespace.section.label pattern |
| Interpolation-safe | Strings must preserve placeholders: {{value}}, {0}, %s |
| Nested format | JSON keys must be hierarchically structured (not flat) |
| Coverage β₯ 95% | Minimum threshold unless fallbackEnabled is true |
| Fallback ready | Missing keys filled if allowed |
| Multilingual diff-aware | No duplicated keys or incorrect overwrites |
| Observability logs present | Trace metadata emitted for all resource builds |
π Embedded Metadata (per output)¶
Every output must include:
traceId,moduleId,locale,skillId,agentIdgeneratedAt,version,coveragePercentstatus(success, incomplete, warning)
π§ Integration Contract¶
All outputs are:
- Trace-logged
- Stored in memory
- Pushed to file system / Git repo
- Available to CI/CD and Studio
β Summary¶
The agent is expected to emit machine-readable, complete, structured, and tenant-aware localization artifacts, validated and scoped for:
- Edition overlays
- Translation coverage
- Runtime injection
- Future reuse in memory
Proceed to Cycle 12 β Memory?
π§ Localization and Internationalization Agent β Cycle 12: Memory¶
π§ Memory Integration Overview¶
The Localization and Internationalization Agent utilizes the ConnectSoft Memory System to ensure:
- Persistent continuity of previously translated content
- Avoidance of duplication across modules, editions, and tenants
- Glossary alignment and terminology consistency
- Traceability and observability of translation decisions
- Tenant- and locale-specific reuse of i18n artifacts
π¦ Memory Categories Utilized¶
| Memory Type | Description |
|---|---|
| Translation Artifacts | .json, .resx, .md files previously generated per locale |
| Glossary Modules | Canonical terms and reusable string fragments (e.g., "Submit", "Invoice", "Reschedule") |
| Blueprint-Scoped i18n Settings | Per-project or per-module configuration (default language, locales, plural rules, etc.) |
| Execution Metadata | Trace logs from previous L10n runs (e.g., traceId, agentId, coverage, errors) |
| Tenant Overlays | Branded/white-labeled terms per edition or customer |
| Validation Logs | Coverage reports, missing keys, inconsistent formatting, ICU mismatches |
| Format Profiles | Locale-specific formatting models (dates, numbers, currencies) |
| Prompt Corrections | Human-injected glossary corrections or curation overrides from Studio |
π§© Memory Read Operations¶
| Use Case | Memory Access |
|---|---|
| Prevent re-extracting duplicate strings | Lookup previous key mappings by file/module |
| Enforce glossary terms | Search glossary vector DB for concept alignment |
| Reuse partial translations | Retrieve partially translated bundles and merge |
| Compare editions | Load edition-specific overlays and diff keys |
| Generate fallback files | Use latest available translations from base locale |
| Enforce locale formatting | Load locale.formatRules.yaml scoped to region/tenant |
π Example: Memory Record for Translation Resource¶
{
"moduleId": "checkout-service",
"locale": "fr",
"traceId": "trace-2025-05-17-abcd",
"agentId": "localization-agent",
"filePath": "i18n/checkout-service/fr.json",
"keys": 84,
"coverage": 96.4,
"version": "1.1.2",
"source": "generated",
"tags": ["i18n", "resource", "json", "checkout"],
"status": "validated"
}
π§ Memory Write Operations¶
Every time this agent runs, it writes:
| Memory Type | Output |
|---|---|
translation.<locale>.json |
Stored in file store + registered in memory index |
metadata.translationCoverage.json |
Coverage statistics and validation outputs |
missingKeys.report.json |
Flagged for follow-up or translator workflow |
glossary.violations.log |
Optional feedback loop for missed terminology |
execution-metadata.json |
Captures skillId, traceId, duration, results |
π§ Memory Indexing Schema¶
| Dimension | Values |
|---|---|
traceId |
Unique execution |
agentId |
"localization-agent" |
skillId |
e.g., BuildResourceFiles, ValidateCoverage |
moduleId |
Microservice or UI module |
locale |
en, fr, he, etc. |
editionId, tenantId |
Optional for overlay logic |
status, version, source |
Output validation and trace info |
π Storage Backends¶
| Backend | Role |
|---|---|
| Azure Blob Storage | Full i18n file storage |
| Azure Cosmos DB | Index metadata |
| Vector DB (Qdrant / Azure AI Search) | Glossary and concept alignment |
| Git (optional) | Long-term storage of .resx, .json, .md files |
| Azure DevOps Artifact Storage | i18n bundles for translators or staging |
β Summary¶
The agentβs memory strategy ensures:
- π Reusability of translations across flows
- π Progressive improvement with trace history
- π Detectability of regressions or glossary violations
- π§ Smart fallback and glossary awareness
- π§± Clean modular memory isolation per module and tenant
Shall we move on to Cycle 13 β Validation?
π§ Localization and Internationalization Agent β Cycle 13: Validation¶
β Purpose of Validation¶
The Localization and Internationalization Agent ensures that all generated outputs are:
- Complete β every required key is present per locale
- Correct β formatting rules, placeholder syntax, and translation structure match expectations
- Consistent β between locales, modules, and editions
- Traceable β validation results are linked to
traceId,agentId,locale,moduleId
Validation is both a gating mechanism and a feedback loop into the platformβs observability and quality workflows.
π Types of Validation Performed¶
| Validation Type | Description |
|---|---|
| Translation Coverage | Ensures minimum percentage of keys are filled for each locale |
| Missing Keys | Detects untranslated keys, placeholder TODO values, or dropped entries |
| Glossary Compliance | Checks if standardized terminology is reused or violated |
| Pluralization Rules | Validates plural syntax (zero/one/other) using ICU or framework rules |
| Interpolation Format Consistency | Ensures placeholders (e.g., {{value}}, {0}) are preserved in translation |
| Key Structure Consistency | Validates key nesting and naming across locales |
| Locale Formatting Accuracy | Checks currency/date/number formatting rules |
| Duplicate / Orphaned Keys | Flags unused or stale keys in localized bundles |
| Framework Binding Validity | Verifies correct syntax for framework integrations (e.g., Angular pipes, .resx structure) |
| Runtime Injection Hooks | Ensures i18n references are correctly bound and will resolve at runtime |
π Sample Validation Thresholds¶
| Category | Threshold / Rule |
|---|---|
| Translation Coverage | β₯β―95% or fallback required |
| Glossary Match | β₯β―90% of glossary terms reused per locale |
| Interpolation Preservation | 100% |
| Missing Keys | β€β―5% or report blocking |
| ICU Syntax Valid | All plural rules must parse correctly |
π Validation Artifacts¶
| Output File | Purpose |
|---|---|
missingKeys.report.json |
Lists all untranslated or dropped keys |
translation-coverage.csv |
Shows percentage coverage per module and locale |
glossary-mismatches.json |
Flags glossary violations or outdated terminology |
pluralization-errors.log |
Lists invalid plural formats |
locale-validation-summary.json |
Per-locale result metadata (status, warnings, metrics) |
π§ Example Validation Result¶
{
"traceId": "trace-2025-05-17-abc",
"moduleId": "checkout-ui",
"locale": "he",
"totalKeys": 104,
"translatedKeys": 98,
"coveragePercent": 94.2,
"missingKeys": ["checkout.button.cancel", "invoice.error.duplicate"],
"glossaryViolations": ["Submit" translated inconsistently],
"status": "warning"
}
π Events Emitted During Validation¶
| Event | When |
|---|---|
i18nValidationPassed |
All checks succeed or are within thresholds |
i18nValidationWarning |
Coverage slightly below, glossary violations, minor issues |
i18nValidationFailed |
Blocking issues found (formatting errors, injection issues, >10% missing keys) |
π§ Studio + CI/CD Feedback¶
Validated outputs are:
- β Displayed in Studio dashboards (coverage, glossary, failure)
- β Used in gates for staging or production CI flows
- β Trigger review workflows or fallback generation if failed
β Summary¶
The Localization Agent performs strict, contextual validation of every artifact and translation bundle it creates. Validation enables:
- β¨ Quality control across modules
- π§ Observability and trace feedback
- π Retry/resubmission if thresholds arenβt met
- π Safe runtime injection
Proceed to Cycle 14 β Retry/Correction Flow?
π§ Localization and Internationalization Agent β Cycle 14: Retry / Correction Flow¶
π Purpose of the Retry/Correction Flow¶
The Localization Agent is designed to be resilient, self-correcting, and observability-driven. If its output is incomplete, inconsistent, or fails validation, the agent follows a well-defined retry or correction mechanism, aligned with ConnectSoftβs event-driven and traceable architecture.
This ensures:
- Fault-tolerant i18n pipelines
- Automatic remediation of known issues
- Clear hooks for human-in-the-loop correction
- Auditability and reusability of all correction attempts
π Retry Flow Lifecycle¶
sequenceDiagram
participant Orchestrator
participant LocalizationAgent
participant Memory
participant Studio
LocalizationAgent->>ValidationModule: Run i18nValidation
ValidationModule-->>LocalizationAgent: Status = Failed
LocalizationAgent->>Memory: Query previous artifacts
LocalizationAgent->>LocalizationAgent: Retry failed skills (e.g. InjectRuntimeBindings)
LocalizationAgent->>ValidationModule: Re-validate
alt If second attempt fails
LocalizationAgent-->>Studio: Emit human correction event
else If success
LocalizationAgent-->>Orchestrator: Emit LocalizationCompleted
end
π§ Retryable Skill Points¶
| Skill | Auto-Retry Condition |
|---|---|
ExtractTranslatableStrings |
Source changed or corruption detected |
BuildResourceFiles |
Serialization or merge conflicts |
InjectRuntimeBindings |
Invalid binding syntax or placeholder mismatch |
ValidateLocalizationCoverage |
Threshold not met but recoverable with fallback |
EmitTranslationMetadata |
Invalid metadata format, retry with strict mode off |
π Retry Modes¶
| Mode | Trigger | Action |
|---|---|---|
| Fast Retry | Minor failure (e.g., JSON formatting error) | Immediate re-run of failed skill with auto-correction logic |
| Memory-Based Retry | Previous version exists | Load prior output and reattempt missing keys only |
| Scoped Regeneration | Failure scoped to file or locale | Regenerate only that portion (e.g., fr.json) |
| Human-Curated Correction | Studio-initiated fix or glossary override | Pause agent flow, wait for review, resume with correction delta |
| Fallback Injection | Blocking key missing | Auto-fill with TODO, log observability issue, emit with fallback flag |
π§© Events Emitted in Retry Cycle¶
| Event | Description |
|---|---|
i18nRetryStarted |
Retry operation has begun |
i18nAutoCorrected |
Agent successfully repaired the issue |
i18nRetryFailed |
Second attempt failed, human input required |
i18nHumanCorrectionRequested |
Flow paused for manual glossary/translation fix |
i18nCorrectedAndPassed |
Final validation passed after retry or correction |
π Correction Memory Snapshot¶
Corrections are saved to memory as versioned artifacts with metadata like:
{
"traceId": "trace-2025-05-17",
"skillId": "InjectRuntimeBindings",
"moduleId": "booking-ui",
"locale": "fr",
"correctionType": "placeholder_fix",
"status": "corrected",
"retryCount": 1,
"correctedBy": "agent",
"observabilityScore": 98.7
}
π§ Human-in-the-Loop Points¶
If automatic correction fails or requires domain knowledge, the agent:
- Pauses execution
- Flags the failed artifact in Studio
- Attaches logs, suggested fix, glossary deltas
- Waits for human reviewer to update translation or key mappings
- Resumes flow with corrected prompt
β Summary¶
The Localization Agent ensures:
- π§ Safe retry with fallbacks
- π§ͺ Skill-scoped error containment
- π§Ύ Full trace of all correction attempts
- π€ Studio collaboration for glossary-sensitive fixes
It guarantees that localization is not a brittle one-shot β but a resilient, repairable pipeline.
Proceed to Cycle 15 β Collaboration Interfaces?
π§ Localization and Internationalization Agent β Cycle 15: Collaboration Interfaces¶
π€ Purpose of Collaboration Interfaces¶
The Localization and Internationalization Agent is not an isolated worker β it is a cross-cutting, collaborative agent that integrates with various components, agents, services, and external systems across the ConnectSoft AI Software Factory.
These interfaces enable:
- Seamless translation-aware flows
- Inter-agent task handoffs
- Dynamic tenant- or edition-specific overlays
- Human correction and review processes
- Export/import with external i18n and translation platforms
π Agent Collaboration Map¶
graph TD
FrontendAgent -->|Extracted UI strings| LocalizationAgent
BackendAgent -->|Validation messages| LocalizationAgent
DocumentationAgent -->|Docs in Markdown| LocalizationAgent
LocalizationAgent -->|Resource Files| DevOpsAgent
LocalizationAgent -->|XLIFF Bundles| TranslationPlatform
ValidationAgent -->|Glossary enforcement| LocalizationAgent
MemorySystem -->|Prior artifacts| LocalizationAgent
Studio -->|Correction feedback| LocalizationAgent
π€ Internal Agent Collaborators¶
| Agent | Interaction | |
|---|---|---|
| Frontend Developer Agent | Consumes `{{ 'key' | translate }}` syntax in UI components. Provides raw labels or UI literals. |
| Backend Developer Agent | Injects .resx references or IStringLocalizer["key"] into controllers and services. |
|
| Documentation Writer Agent | Triggers localized copies of README.md, Help.md, and onboarding flows. |
|
| Edition Config Agent | Supplies edition-specific overrides or branding-specific terminology. | |
| Validation Agent | Shares glossary and formatting rules. Validates term reuse and locale correctness. | |
| Microservice Generator Agent | Accepts i18n-injected service scaffolds. Requests default localization hooks per module. |
π§ Technical Interfaces¶
| Interface | Description |
|---|---|
| Event Bus | Listens for LocalizationRequested, emits LocalizationResourcesGenerated, i18nValidationFailed, etc. |
| ConnectSoft Memory SDK | Fetches existing .json, .resx, glossary files, execution metadata |
| OpenTelemetry Logging Hooks | Exports logs, spans, and status metrics to Studio and dashboards |
| GitOps Pipeline Integration | Commits i18n output (fr.json, .resx, .md) to repo or CI artifact store |
| Studio Trace Layer | UI for reviewing missingKeys, glossaryViolations, and providing corrections |
| Translation Exporter Service | Creates .xlf, .xlsx, .po bundles for integration with Lokalise, Transifex, Phrase, etc. |
π External System Collaboration¶
| System | Role |
|---|---|
| Translation Platforms | Exports/imports i18n resources via .xlf, .po, .json, .csv |
| Studio (Human Reviewer) | Reviews, edits, and approves glossary mismatches or suggested corrections |
| CI/CD Pipeline | Pulls i18n bundles into deployable artifacts or validates coverage gates |
π Example Event Chain¶
Event: ServiceScaffolded β
Triggers: LocalizationRequested β
LocalizationAgent emits:
- fr.json
- i18n.config.ts
- i18nValidationPassed
- translation-coverage.csv
β Summary¶
The Localization Agent:
- π€ Collaborates with developer, documentation, and validation agents
- π€ Produces outputs for CI/CD and translation tools
- π§ Reads from and writes to shared memory
- π§© Injects into live artifacts with traceable metadata
- π§βπ» Accepts Studio feedback for retry or correction
It serves as the interoperability layer for all things internationalization within the factory.
Proceed to Cycle 16 β Observability Hooks?
π§ Localization and Internationalization Agent β Cycle 16: Observability Hooks¶
π‘ Purpose of Observability Hooks¶
In alignment with ConnectSoftβs Observability-First principle, the Localization and Internationalization Agent is instrumented with telemetry, logging, traceability, and validation signals for every skill it executes.
These observability hooks:
- Enable trace-based debugging and performance tuning
- Provide real-time translation coverage visibility
- Power dashboards, alerts, and feedback loops
- Ensure compliance with glossary rules and content policies
- Record structured outputs for human review and audit
π Instrumentation Layers¶
| Layer | Type |
|---|---|
| Traces | OpenTelemetry spans for skill execution duration, retry counts, and coverage % |
| Logs | Structured, level-tagged entries (info, warning, error, validation, fallback) |
| Metrics | Aggregated by locale, module, edition, and validation category |
| Events | Published to Event Bus for orchestration and retry hooks |
| Status Files | execution-metadata.json, translation-coverage.csv, missing-keys.report.json |
π¬ Span Instrumentation (OpenTelemetry)¶
| Span Name | Tags |
|---|---|
i18n.ExtractTranslatableStrings |
traceId, agentId, moduleId, filePath, extractedCount |
i18n.BuildResourceFiles |
locale, resourcePath, status, durationMs |
i18n.ValidateCoverage |
coveragePercent, missingKeys, tenantId, status |
i18n.FallbackApplied |
locale, keyCount, fallbackStrategy, sourceLocale |
All spans are enriched with:
traceIdagentId: localization-agentskillIdmoduleIdlocaletenantIdexecutionId
π Sample Structured Log Entry¶
{
"timestamp": "2025-05-17T11:22:13Z",
"level": "Warning",
"traceId": "trace-2025-05-17-abcd",
"agentId": "localization-agent",
"skillId": "ValidateCoverage",
"locale": "fr",
"moduleId": "checkout-ui",
"coverage": 91.5,
"status": "Incomplete",
"missingKeys": ["checkout.confirmation.title", "invoice.dueDate.label"]
}
π Metric Export Points¶
| Metric | Labels |
|---|---|
i18n.coverage.percent |
moduleId, locale, editionId, tenantId |
i18n.missing_keys.total |
Same as above |
i18n.fallback.applied |
locale, reason, sourceLocale |
i18n.glossary.violations.count |
moduleId, locale |
i18n.skill.duration.ms |
skillId, locale |
All metrics are streamed to:
- π Grafana dashboards
- π‘ Studio Trace View
- π‘οΈ CI/CD quality gates
π Emitted Artifacts for Observability¶
| File | Purpose |
|---|---|
execution-metadata.json |
Tracks all skills executed, traceId, timestamps, locale status |
translation-coverage.csv |
Locale/module breakdown with coverage %, missing keys |
observability-events.jsonl |
Event timeline for validation, retry, glossary violations |
i18n-validation-summary.json |
Aggregated result used by orchestrators and Studio |
π― Triggered Events¶
| Event | Meaning |
|---|---|
LocalizationResourcesGenerated |
Successfully emitted i18n files |
i18nValidationPassed |
All thresholds met |
i18nValidationWarning |
Non-blocking issues |
i18nValidationFailed |
Blocking issues β triggers retry |
i18nRetryStarted |
Retry initiated |
i18nFallbackUsed |
Fallback logic activated |
β Summary¶
The Localization Agent is fully observable:
- π Every action is traceable by
traceId,locale,moduleId,skillId - π Metrics power dashboards and CI/CD gates
- π Logs inform debugging and Studio overlays
- π‘ Events power retries, alerts, and human review
Itβs not just multilingual β itβs measurable.
Shall we continue to Cycle 17 β Human Intervention Hooks?
π§ Localization and Internationalization Agent β Cycle 17: Human Intervention Hooks¶
π§βπ» Purpose of Human-in-the-Loop Hooks¶
Despite high autonomy, some localization tasks benefit from human expertise, especially when:
- Glossary adherence conflicts with brand tone
- Translations are missing or machine-inaccurate
- Region-specific variants require nuance
- Legal, accessibility, or cultural sensitivity is involved
This cycle defines how and when human review, overrides, or confirmations are enabled in the ConnectSoft AI Software Factory.
π€ Types of Human Intervention Points¶
| Intervention Type | Scenario | Triggered By |
|---|---|---|
| Glossary Violation Review | Inconsistent or missing glossary usage | glossary.violations.count > 0 |
| Missing Translation Curation | >5% missing keys or critical untranslated labels | i18nValidationFailed |
| Manual Language Override | Localization team edits suggested translations | Studio correction editor |
| Brand-Specific Terminology | Edition/tenant customization requires confirmation | EditionConfig terms.reviewRequired: true |
| Fallback Confirmation | Agent wants to emit TODO/fallback keys | fallbackApprovalRequired: true in prompt or edition config |
| Pluralization Conflict | Human input needed to ensure correct grammatical structure | ICU error, or ambiguous placeholder |
| Translation Dispute Resolution | Reviewer disagrees with reused memory suggestion | Studio inline comment on i18n.coverage.review |
π§© Studio Integration¶
Agents emit structured observability artifacts for Studio, which enable:
- Inline review of missing keys
- Glossary correction suggestions
- Edition-specific terminology editors
- Trace-aligned walkthroughs of i18n events
- Retry controls and correction flows
π Example: Human Correction Record¶
{
"traceId": "trace-2025-05-17",
"agentId": "localization-agent",
"locale": "fr",
"moduleId": "booking-ui",
"correctedKey": "booking.cancel.button",
"suggested": "Annuler",
"overridden": "Se dΓ©sister",
"reason": "Brand prefers soft tone for cancel action",
"correctedBy": "human.reviewer@connectsoft.studio",
"status": "approved",
"timestamp": "2025-05-17T14:00:00Z"
}
π§ Correction Flow Timeline¶
sequenceDiagram
LocalizationAgent->>Studio: Emit i18nValidationFailed
Studio->>HumanReviewer: Show missing keys + glossary flags
HumanReviewer->>Studio: Edit translations + approve overrides
Studio->>LocalizationAgent: Resume with correction deltas
LocalizationAgent->>Memory: Store corrected translations
LocalizationAgent->>Validation: Re-run coverage + glossary check
π Intervention Retry Behavior¶
| Scenario | Retry Action |
|---|---|
| Human updated keys | Agent revalidates only corrected locale/module |
| Human rejected fallback | Agent pauses and awaits explicit approval or input |
| Glossary override confirmed | Agent stores override in trace-specific memory |
| Human edits invalid | Agent emits i18nCorrectionFailed for QA team |
π Artifacts Affected by Human Input¶
| File | Status |
|---|---|
translation.<locale>.json |
Updated or partially replaced |
execution-metadata.json |
Enriched with correctedBy and reason fields |
translation-coverage.csv |
Recomputed |
observability-events.jsonl |
Adds humanOverrideConfirmed, glossaryOverrideAccepted |
glossary.violations.log |
Marked as resolved or overridden |
β Summary¶
The Localization Agent supports:
- π€ Autonomous default generation
- π§ Human-in-the-loop for accuracy, tone, and context
- π Bi-directional correction and retry
- π§© Studio UI overlays for reviewers
- π Full trace and auditability of all edits
This ensures multilingual quality is not only automatic, but also curated when needed.
Shall we continue to Cycle 18 β Factory Integration?
π§ Localization and Internationalization Agent β Cycle 18: Factory Integration¶
π Position in the ConnectSoft AI Software Factory¶
The Localization and Internationalization Agent is a cross-cutting automation layer, deeply integrated into the end-to-end AI Software Factory flow, ensuring every artifact β service, UI, documentation, or API β is ready for multilingual and regional deployment.
It plays a role in:
- π Continuous generation workflows
- π¦ Template- and module-aware code output
- π Documentation and onboarding translation
- π Tenant-specific overlays
- π Observability and compliance flows
- π€ Studio curation and release readiness
𧬠Factory Phase Alignment¶
| Phase | Role of L10n/i18n Agent |
|---|---|
| Vision Planning | Ingests default locale, supported languages, edition branding guidelines |
| Architecture Blueprinting | Respects module boundaries, tenant edition overlays, i18n-aware service templates |
| Engineering (Frontend/Backend) | Replaces hardcoded strings with dynamic references; emits translation scaffolds |
| Documentation | Translates onboarding, readme, feature specs, UI/UX instructions |
| Testing & QA | Validates localization completeness, glossary match, placeholder preservation |
| DevOps & Release | Emits i18n bundles into CI/CD pipelines, includes locale validation gates |
| Studio Review | Surfaces glossary violations, translation errors, or missing key warnings |
| Translation Export | Outputs .xlf, .json, .csv, or .po bundles for external localization teams |
π End-to-End Flow Snapshot¶
flowchart TD
VisionBlueprint --> ModuleScaffold
ModuleScaffold --> FrontendAgent & BackendAgent
FrontendAgent -->|UI Labels| LocalizationAgent
BackendAgent -->|Validation Texts| LocalizationAgent
DocumentationAgent -->|README.md| LocalizationAgent
LocalizationAgent -->|.json / .resx / .md| MemoryStore
LocalizationAgent -->|ValidationReport| Studio
LocalizationAgent -->|Bundles| TranslatorPlatform
MemoryStore --> CI
Studio -->|Feedback| LocalizationAgent
π System Integrations¶
| System | Integration Role |
|---|---|
| Module Templates | Automatically inject i18n hooks via parameterized scaffolds |
| Semantic Kernel Planners | Detect need for multilingual output and trigger agent with appropriate skill plan |
| Memory Engine | Reads/writes translation memory, edition overlays, and glossary mappings |
| Event-Driven Orchestration | Listens for LocalizationRequested, emits LocalizationResourcesGenerated, etc. |
| Observability Stack | Exports logs, spans, and validation metrics to Grafana, Studio, and audit logs |
| Studio + Trace View | Embeds output health, status, and key diff tools per locale |
| DevOps Pipelines | Injects localization validators, fails build on i18nValidationFailed |
π§± Modularity in Output¶
Every localized artifact is:
- π§© Aligned to a specific
moduleId - π§Ύ Versioned by
traceId,skillId,locale - π Scoped by
tenantId,editionId - π§ Persisted into memory for reuse
- π€ Routed to CI/CD and translators
π Reusability Across Modules¶
If a common string like βSubmitβ or βAppointment Bookedβ appears:
- It is automatically reused from prior translations
- Glossary enforcement ensures brand-aligned consistency
- Memory-based fallback prevents unnecessary duplication
π§ Summary¶
The Localization Agent is a core orchestration node in ConnectSoft:
- π§ Always triggered post-scaffolding and pre-release
- π§ͺ Validates and corrects i18n coverage
- π¦ Feeds into both automation and human review
- π Adds multilingual capability to the entire ConnectSoft lifecycle
It turns a software factory into a globally deployable engine.
Shall we continue to Cycle 19 β Mermaid Diagram: Agent in Full System Flow?
π§ Localization and Internationalization Agent β Cycle 19: Mermaid Diagram β Agent in Full System Flow¶
π§ Overview Diagram: Localization Agent in the AI Software Factory¶
This Mermaid diagram shows the full integration of the Localization and Internationalization Agent into the ConnectSoft AI Software Factory lifecycle β from prompt ingestion to multilingual output, validation, correction, and release.
π End-to-End System Integration¶
flowchart TD
A[π₯ Vision Blueprint Created] --> B[π§ Product & Feature Planning]
B --> C[π¦ Module Scaffolding Triggered]
C --> D1[π₯οΈ Frontend Developer Agent]
C --> D2[π§© Backend Developer Agent]
C --> D3[π Documentation Writer Agent]
D1 --> E1[π¬ UI Strings Extracted]
D2 --> E2[π¬ Validation/Error Texts Identified]
D3 --> E3[π Markdown Docs Submitted]
E1 & E2 & E3 --> F[π Localization & i18n Agent Triggered]
F --> G1[π Generate Resource Files (.json, .resx, .md)]
F --> G2[π§ Memory Lookup for Existing Keys]
F --> G3[π Glossary & Placeholder Validation]
F --> G4[π Inject Runtime Bindings]
F --> G5[π Emit Observability Metrics + Spans]
G1 --> H1[π¦ Output Stored to Memory + Git Repo]
G3 --> H2[β οΈ If Validation Fails β Retry / Studio Feedback]
G2 --> G1
G5 --> J[π Grafana / Studio Dashboards]
H2 --> F
H1 --> I1[π Release Coordinator Agent]
H1 --> I2[π CI/CD Pipeline with i18n Validation Gate]
H1 --> I3[π€ Translation Platform (XLIFF/JSON Export)]
I1 --> K[β
Localized Build Artifacts Deployed]
I2 --> K
I3 --> K
π Flow Highlights¶
| Node | Meaning |
|---|---|
| F | Localization Agent triggers full pipeline: extract β generate β validate β inject |
| G2 | Uses translation memory to deduplicate and reuse |
| G3 | Applies glossary rules, validates pluralization and placeholders |
| H2 | Retry or human intervention via Studio |
| I3 | Supports export to translation platforms for curated translations |
π Factory-Consistent Behavior¶
- π Every step is repeatable and versioned via
traceId - π¦ Outputs are modular: one resource set per
moduleIdΓlocale -
π€ Agent emits structured artifacts for:
-
Memory store
- Observability dashboards
- GitOps pipelines
- External translation systems
- π§ All generated strings are scoped, traceable, and auditable
β Summary¶
The Localization Agent is fully embedded in the platformβs modular, event-driven, and observability-first lifecycle β ensuring:
- β¨ Complete multilingual coverage
- π¦ Safe artifact generation
- π§ Memory-based reusability
- π€ Retry + human correction integration
- π Visibility through logs, spans, and Studio dashboards
Shall we proceed to Cycle 20 β Summary and Conclusion?
π§ Localization and Internationalization Agent β Cycle 20: Summary and Conclusion¶
β Final Summary β Realization of the Localization and Internationalization Agent¶
The Localization and Internationalization Agent is a modular, intelligent, and observable core utility agent in the ConnectSoft AI Software Factory. It ensures that every output from the platform β frontend, backend, documentation, messages, errors, and metadata β is multilingual, locale-compliant, and ready for global deployment.
π§© Core Mission¶
To make every artifact across the factory translatable, culturally adaptable, and ready for international delivery, while respecting tenant editions, observability, automation, and traceability.
π§ Functional Highlights¶
| Area | Key Capability | |
|---|---|---|
| Extraction | Scans .cs, .ts, .html, .md, etc. for hardcoded strings and emits structured key maps |
|
| Generation | Produces .json, .resx, .po, .md, .xlf, i18n.config files for each locale |
|
| Injection | Modifies templates to bind to translation keys (IStringLocalizer, `{{ key |
translate }}`) |
| Validation | Performs glossary enforcement, coverage checks, placeholder and ICU validation | |
| Fallback | Injects intelligent defaults or TODOs when content is missing | |
| Memory | Uses and updates long-term multilingual memory for reuse across modules and tenants | |
| Correction | Supports retry flow and human-in-the-loop glossary-based corrections via Studio | |
| Observability | Logs structured telemetry: spans, events, metrics, and validation summaries | |
| CI/CD and Studio | Integrates with pipelines, dashboards, and review tools with gating and diff analysis |
π¦ Deliverables¶
- Localized UI/UX resource files per locale and module
- Backend
.resxand localized error messages - Multilingual documentation and onboarding files
- Validation reports, glossary checks, observability logs
- External-ready bundles (
.xlf,.csv) for translators - Metadata for traceability, retry, and reusability
π ConnectSoft Alignment¶
| Strategic Principle | Alignment |
|---|---|
| AI-First | Prompt-driven and skill-based flow composition |
| Modular | Scoped by module, tenant, edition, and context |
| Event-Driven | Triggers and emits domain events for orchestration |
| Cloud-Native | Locale-specific output for microservice containers |
| Observability-First | OpenTelemetry spans, structured logs, validation hooks |
| Security-First | Per-tenant isolation, branding-specific translation control |
| DDD/Clean Architecture | Injects i18n at boundaries without crossing domains or layers |
π§ Position in the Factory Flow¶
flowchart LR
Scaffolding --> DeveloperAgents
DeveloperAgents --> LocalizationAgent
LocalizationAgent --> Memory
LocalizationAgent --> CI
LocalizationAgent --> Studio
LocalizationAgent --> Release
β It sits between scaffolding and release, ensuring every output is ready for global scale.
β Final Takeaway¶
The Localization and Internationalization Agent transforms ConnectSoft from a modular automation engine into a truly global software factory.
It guarantees that:
- Every product is edition-aware
- Every service is tenant-adaptable
- Every artifact is language-ready
- Every issue is traceable, fixable, and retryable
Let me know if you'd like a compiled document, a PDF export, or to begin another agent's realization.