A developer's desk at the end of a project, a clipped stack of blank pages beside a closed laptop, like documentation waiting to be handed over

Technical documentation with AI: document without exposing code

"Before you go, will you leave us some docs? With AI, it'll take you an hour."

Thursday, 5 pm, in an agency's open-plan office. Romain leaves the engagement in ten days. The client, a regional haulier, had a reversibility package written into the contract: a README for each module, documentation for the API used by the drivers' handheld terminals, and an operations procedure for the team taking over. None of it exists. What remains is a repository of nine hundred files, a few notes and AI.

AI is genuinely good at technical documentation: it reads code without tiring, organises, rephrases, spots the gaps. Here is the same documentation done twice, document by document: first the way it often gets done on a Thursday evening, then the way it should be done.

Technical documentation: who owns what you are describing

The code Romain is documenting is not his. Depending on the contract, it belongs to the agency or to the client, and in both cases it falls under trade secrets, which the law protects in Switzerland as across Europe. The service contract almost always includes a confidentiality clause, and the client's IT policy may forbid sending its code to a service it has not approved. If it does, the only honest course is to ask, not to work around it.

Documentation adds a risk of its own: it is made to circulate. What you write in it therefore goes out twice, first to the tool that helps you draft it, then with the document itself. And examples taken from production often contain personal data, which the GDPR or the Swiss Federal Act on Data Protection (FADP) governs as anywhere else.

The module README, from directory tree to versioned file

Before: the repository root pasted in, environment file included

Romain zips the repository, sends it to a consumer AI tool and types: "write me the README". Three minutes later, a six-step installation appears.

The environment file, attached "so it understands the configuration", held the key to the mapping service and the password of the staging database: they now sit with a provider nobody chose, one that often keeps the history. So does the route optimisation module, the client's most valuable asset. And two of the six installation commands do not exist: the AI wrote the ones it expected to find.

After: a Development space, the module folder read-only

In IA Confidential, Romain creates a "Development" space for the project. In Memory, on the Instructions tab, he writes space instructions that will apply to every conversation he opens there, taking precedence over his general preferences: language and version, framework, documentation in English, no invented commands, and the label [TO CHECK] wherever the code does not allow a conclusion.

Example · Memory of the “Routing project” space
Instruction Models
PHP 8.3 and Laravel; documentation written in English All
Invent no command or option: cite the file where it appears All
Write [TO CHECK] wherever the code does not allow a conclusion All
Configuration variables: names only, never a value All
These instructions, written once, apply to every answer in the space. Without an account, you can try it from your first conversation.

On his computer, with Chrome, Edge or Opera, he adds the Planning module folder to the space rather than the repository root, with the Search and Read rights, and ticks the "Confidential models" option: the folder is then never sent to an anonymised model. Files ignored by .gitignore, dependencies and files over 1 MB are not listed, which rules out the environment file from the start. A key hard-coded in a tracked file, however, would be listed: he replaces it with [API_KEY] before starting, and has it rotated, since it has already left once.

With a signed-in account, the assistant automatically searches the folder for the passages relevant to each question; the index stays in the folder, on the computer. How much code can be indexed depends on the plan: see the plans. By default, the answer comes from a confidential model: an open model on servers in Switzerland and Europe that keeps nothing of the conversations. The request, which you can reuse as is:

Using the files in the folder, write the README for the module: purpose in three sentences, prerequisites, step-by-step installation, configuration variables (names only, never values), useful commands, execution order of the scheduled tasks, known pitfalls. For each command and each variable, cite the file where you found it. Write [TO CHECK] wherever you are assuming, and finish with the list of questions to ask the team before treating this document as reliable.

This README written section by section, each command checked in the folder, is what the Delegate method does for you. In the box, switch from Chat to Delegate: the coordinator, a confidential model, reads the module folder, splits the work into steps and writes. Before starting, it asks the adviser how to proceed, a highly capable model that receives its questions, never your code; a click on the blue bulb , between the two logos, switches it off or back on.

Example · the message box, in Delegate
GLM The coordinator Confidential It reads your folder, splits the work into steps and writes. Your documents stay with it.
The blue bulb When lit, the adviser is consulted. One click switches it off for this conversation, another switches it back on.
Claude The adviser Anonymized A highly capable model. It receives only the coordinator’s questions, never the conversation or your documents, and answers with the steps to follow or a document template.
After a confidential folder has been read, you see each question before it leaves, and you can correct or cancel it. Without an account you can see the method; it runs with a free account.

Citing the files changes everything: Romain checks each command at the source instead of trusting the confident tone of the text. Once the text has been reviewed, if he has opened a second folder with the Write right, the file card offers to save it to that folder in Markdown; nothing is written there without that click, and an existing file is only replaced after the differences have been shown.

Example · Atelier of the “Routing project” space, Sources tab
Folder Models Search Read Write Index
/planning-module Confidential Yes Yes No 140 files
/documentation Atelier Confidential Yes Yes Yes 4 files
Your files stay on your computer: the assistant only takes the useful passages. The design kit lays out the letters it writes. Without an account, you can try it from your first conversation.

Try it on your own case

Start from a case of the trade

Show me the service No account for your first conversation First month free

Documenting an API without leaving customer data in it

Hands lining up blank index cards on a wooden desk, like the steps of a procedure, next to a closed laptop

Before: real responses copied from the logs

To illustrate each endpoint, Romain copies real responses from the production logs: it is faster than making them up, and "at least the examples are accurate". He pastes the lot into the consumer AI tool with the instruction "format this".

The documentation now contains drivers' names, delivery addresses and end customers' phone numbers, which went out once to the AI and will go out a second time with the document. The API's internal domain appears in every example.

After: made-up examples, an imposed structure

Romain stays in the same space. He asks the assistant to document the endpoints from the route and controller code in the folder, with a fixed structure for each: purpose, parameters, expected body, sample request and response, error codes. The sample values are made up and say so: "North Depot", "12 Example Street". An API documented from its code needs no real data at all.

In the Privacy panel, he adds his pseudonymisation instructions: always mask the client's name, the project's code name and the internal domain. These are precisely the things no detector can guess on its own.

To polish the introduction of the documentation, he tries an anonymised model. The Confidentiality filter first examines the message, spots a domain name left in the draft and offers three options: answer with a confidential model, message unchanged; send a pseudonymised version, which he can review and correct; or send it as is. He stays with the confidential model. The filter masks names, not the logic of an algorithm: the description of how routes are calculated stays on the confidential models, as the guide on reviewing proprietary code explains.

Operations documentation, the kind you read at 3 am

Before: the recovery procedure with its credentials

The operations procedure is the most useful document, and the most dangerous. Romain puts in everything that will help in the middle of the night: the server addresses, the service account, the database connection command, and the monitoring password, "so the team isn't stuck". The consumer AI tool turns it into a handsome page.

The document has become a complete master key to the client's information system. It will travel by email, be printed, be filed in a shared folder. The day it leaks, every password will have to be changed.

After: placeholders instead of values, a document fit to hand over

Romain writes the procedure with placeholders: [APPLICATION_SERVER], [SERVICE_ACCOUNT], [MONITORING_ACCESS]. The procedure says where the credentials are kept (the client's password vault, the person who issues them), never what they are. The assistant drafts from his notes: symptoms, checks in order, actions, return to normal, who to notify.

He then asks the assistant to reread the procedure as a developer discovering the project at 3 am would: every step that assumes unwritten knowledge, every command with no expected result, every case where you cannot tell whether to wait or act.

The client wants the reversibility package as a word-processing document. The assistant writes each document as a document, with preview and versions: Romain edits it, prints it to PDF or exports it to Word or OpenDocument. The layout is rebuilt from the text: for the client's house template, he pastes the content into it.

What AI does not know about your project

AI readily describes the code it expected rather than the code that exists: a command option, an API parameter, a plausibly named variable, all invented with total assurance. Wrong documentation is worse than no documentation: people trust it.

The only check worth anything is use. Have someone who does not know the project work through the README on a clean machine; call each endpoint with the example provided; have the on-call person review the procedure. Responsibility for what is delivered to the client stays with the team that signs it off.

What stays confidential

With a confidential model, the relevant passages of code and your notes leave your machine to be processed on servers in Switzerland and Europe, outside the reach of the CLOUD Act, and then nothing is kept on our side. A folder added with the "Confidential models" option is never sent to an anonymised model, and the index used to search it stays in the folder, on your computer.

With an anonymised model, you decide what goes out, once the filter has run: a pseudonymised version that you review, or the message as it is if you accept that. A folder without the "Confidential models" option is handled as you chose: with an anonymised model, its passages go out as they are. Your personal profile, for its part, is never sent to an anonymised model. In Delegate mode, the adviser is an anonymised model that receives only the coordinator's questions, never the conversation; after a confidential folder has been read, you see them before they go out.

The history of your conversations, documentation drafts included, lives in your browser, not with us; an encrypted backup is possible, and you keep its key. On a shared workstation or a common staging machine, anyone using the same session can read it: sign out when you leave. Finally, whatever the delivered document contains leaves with it: a secret kept out of the conversation but written into the procedure is protected by no tool.

Before you hand over the package

If the documentation covers a project you have just taken over, start by understanding the inherited codebase. Keep the list of data you should never paste into AI close by: it applies just as much to what you write in documentation.

To write the README for a first module, secrets removed: open the chat.

Try it on your own case

Show me the service Create an account First month free