The site that you are currently viewing is a static version of the Software Factory documentation delivered with the

version v7.2.
For up-to-date documentation, see the latest version.

Code Companion

1. Application

Reference:LLD – Software Factory as a Product - Code Companion
Type & Classification:Product
Step:Continuous Delivery
Bid/Project/Product Name & ID:Software Factory as a Product (SWaaP)
Solution Level:Digital product
Solution Name:Software Factory as a Product
Solution description:As deployed, create and update a Software Factory
Key Products/Solution:

2. Introduction

2.1 Document purpose

This document is a low level design - LLD which aims to describe how the architecture evoked in high level design - HLD will be implemented. This document will describe the protocols used in the target architecture, how to implement them and any modifications made to their default behavior. Once validated by Thales, this document will then serve as a basis for the implementation of configurations on equipment.

2.2 Document scope

This document is not a manual and is not intended to replace the reference literature describing with great precision all network protocols.

The protocols used will be briefly described as well as the modifications made to their default behavior.

2.3 Referenced documentation

Document referenceDocument Name
TASDTechnical Architecture and Security Document of SWaaP
SCOM-CodeCompanionSoftware Center Operation Manual of Code Companion

3. Component general description

This component is part of Software Factory as a Product (SWaaP), and it is visible in the TASD .

Code Companion is an AI-powered solution designed to assist software developers within their integrated development environment (IDE).

This tool, which is based on an open-source VSCode/JetBrains extension called Continue dev , provides developers with interactive and contextual support as they write code.

Additionally, Code Companion includes a Python-based backend that manages integration to the platform for authentication and key management for the billing part, and optionally integration to the API Manager (APIM) with on-behalf tokens and error management.

This component permits the exposure of Code Companion services to any Software engineer (end user of SWaaP). The Code Companion service is exposed using:

  • Code Companion IDE extension, available for VSCode and JetBrains solutions.
  • Code Companion Python-based Backend.

4. Functional & Business Requirements

No formal list of requirements has been expressed by clients. It is designed and developed based on business use cases.

4.1 Feature summary

The IDE extensions based on Continue dev have the following features:

  • Chat to understand and iterate on code in the sidebar
  • Autocomplete to receive inline code suggestions as you type
  • Edit to modify code without leaving your current file
  • Actions to establish shortcuts for common use cases

Continue dev also permit the definition and use of:

  • Several models for Chat, Edit and Autocompletion
  • Context Providers to RAG contexts from several internal (e.g. Codebase, Files, Terminal) or external (e.g. Url, Search, Documentations) sources.
  • Custom commands to quickly reuse predefined context providers and prompts.

Additionally, Code Companion offers predefined configuration and integration for:

  • TDP C2 based on OpenAI GPT4/GPT4o and using MCS APIM and Guardrails
  • TDP C3-CA based on OpenAI GPT4/GPT4o and using MCS APIM and Guardrails
  • TDP C3-BS based on Codestral and using Thalesgroup APIM
  • RTDP DR based on Codestral provided by ClearML

4.2 Prerequisites

Every prerequisites of the product are applicable to this component. See the TASD .

In detail:

  • Identity Provider (IdP (e.g Azure AD))
  • LLM/SLM (PRE_016)
  • APIM (PRE_017) (optional)
  • Guardrails (PRE_018) (optional, depending on the platform and it’s data sensibility)

4.3 Variability

TDP C2/C3-CA

  • Identity Provider (IdP): Azure AD
  • LLM/SLM: OpenAI
  • APIM: MCS APIM
  • Guardrails: MCS Guardrails (with Thales internal list of words)

C3-BS on CASTLE

  • Identity Provider (IdP): Azure AD
  • LLM/SLM: Codestral
  • APIM: Thalesgroup APIM
  • Guardrails: Not applicable

RTDP

  • Identity Provider (IdP): Microsoft ADFS
  • LLM/SLM: Codestral
  • APIM: Not applicable (ClearML)
  • Guardrails: Not applicable

5. Architecture decision record

Here is a list of decisions

6. Architecture description

6.1 Business architecture and allocation to services

6.1.1 Code Companion

You will find in Figure 0 business architecture for Code Companion allocated to services:

Figure 0

Figure 0 - Business architecture allocated to services.

Note: in dash, external items.

6.2.1 Code Companion

You will find in Figure 1 Functions for Code Companion

Figure 1

Figure 1 - Functions for Code Companion

You will find in Figure 2 Data Flow for Code Companion

Figure 2

Figure 2 - Data Flow for Code Companion

You will find in Figure 3 Components for Code Companion

Figure 3

Figure 3 - Components for Code Companion

You will find in Figure 4 Deployment for Code Companion

Figure 4

Figure 4 - Deployment for Code Companion

6.2.2 User management

This role matrix has been defined in TASD:

User roleDescription user roleComment
UC1End user / Software engineerPerson that can write in a solution/product/project tenant
UC2ReaderPerson that can read content of a solution/product/project tenant
UC3Tenant ownerPerson that can administrate a solution/product/project tenant
UC4Software Factory application adminPerson that can administrate Software Factory instance components
UC5Software Factory system adminPerson that can administrate the deployment/upgrade of the Software Factory instance
UC6Software Factory tribePerson that are delivering asset to deploy/upgrade a Software Factory instance

6.2.3 RACI

In addition of global RACI (Responsible, Accountable, Consulted, Informed) of the SWaaP defined in TASD:

ActionDescriptionUC4UC3UC2UC1
Generate/Edit/Comment CodeGenerate/Edit/Comment Code in the IDE ExtensionsR/A
Manage Subscription keyManage Subscription key in Continue ServerC/IR/A
Onboard userOnboard user in Code CompanionC/IR/A
Offboard userOffboard user in Code CompanionC/IR/A
Support RequestAsk for help on Code Companion usageC/IR/A

6.3 Delivery

Component is part of the Software Factory as a Product (SWaaP) delivery. See TASD for more details.

6.3.1 Latest Version

6.3.2 Version 2.2.0

6.3.3 Version 2.1.0

(*) Notes on redis option dependency:

  • redis is optional on platforms that configures the product without Set APIM_AUTHENTICATION_METHOD to oauth_onbehalfof. (this is currently the case for non-TDP platforms)
  • redis can also be configured as external service

6.3.4 Version 2.0.2

6.4 Infrastructure architecture

6.4.1 Software Factory API

Here is a list of services that can be integrated with the Code Companion.

Ref.NameRequiredDescription
SFE01Flux → Git in Software Factory for deploymentMandatoryCode in a Git server for deployment of the product
SFE02Flux → Registry in Software Factory for deploymentMandatoryRegistries with helm charts and containers for deployment of the product
SFE04IAM - SAML SSOHighly recommendedUsers should be authenticated using SAML SSO
SFE16LLM BackendMandatoryUsers requires a LLM Backend to create their prompts.
SFE17API ManagementHighly recommendedLLM Backend should be served by an APIM and handles logging, authentication and usage statistics.

7. Operational and maintenance

In this chapter you will find strategy and policy. Detail implementation will be described in the SCOM.

7.1 Life cycle policy

Cadence of version is describe in the Product Lifecycle .

7.2 License

Not applicable.

7.3 Deployment

The component is deployed as a standard component using Flux and SWaaP packaging. See TASD for more details.

7.4 IAM

We support and recommend integration with IAM using SAML SSO.

7.5 Scaling

  • Redis HA (High Availablilty) enabled .
  • Specs:
    • limits for continue-server: 200m/256Mi
    • limits for bitnami/redis: 150m/192Mi(nano sizing but could scale up according to our load test)
  • HPA (Horizontal Pod Autoscaling) was configured for continue-server pods .

7.6 Backup / restore

No persistent data.

7.7 Monitoring

No applicative monitoring. Use classical platform’s one (cpu/ram/ingress success rate, …)

7.8 Logging

  • The applicative logs can be obtained from the kubelet stdout/stderr corresponding to the container output.
  • Core Services Logging on our LLM Usage
  • K8SaaS Log Analytics for continue-server
  • Azure Active Directory Audit Logs
Last modified 17.03.2026: Fix British terms (24d3972)