How to write documentation for boxfork
All documentation in this repository uses the writing rules of ASD-STE100, Simplified Technical English (STE). STE makes technical text easy to read, also for readers whose first language is not English. This page gives the rules that we use and the names that we use.
Run the checker before you send a change:
make docs-checkThe checker finds the mechanical errors: long sentences, long paragraphs, contractions and words that are not approved. The checker does not have the STE dictionary. You must apply the other rules when you write.
- Use one word for one meaning. Use one name for one thing.
- Use a word only as the part of speech that this page or the STE dictionary gives.
- Use the simple word. Write “use”, not “utilize”. Write “do”, not “carry out”. Write “start”, not “initiate”.
- Do not use these words: “should”, “shall”, “may”, “might”, “would”, “could”. Write “must” for an obligation. Write “can” for an ability or a possibility.
- Do not use contractions. Write “do not”, not “don’t”.
- Do not use Latin abbreviations. Write “for example”, not “e.g.”.
- Do not use slang, idioms or marketing words.
- Use the technical names and the technical verbs from the lists below.
- Write a name from the code in code font:
Manager.Run,--max-pooled,POST /v1/sandboxes.
- Use the active voice. Write “The daemon removes the container”, not “The container is removed”. Use the passive voice only when the agent is not known or not important.
- Use only these forms of the verb: the infinitive, the imperative, the simple present, the simple past, the simple future.
- Do not use the “-ing” form of a verb. Write “The daemon starts the helper”, not “The daemon is starting the helper”. An “-ing” word is permitted when it is a technical name, for example “networking”.
- Do not use the perfect tenses. Write “The sandbox stopped”, not “The sandbox has stopped”.
- Use the past participle only as an adjective: “a stopped sandbox”, “the sandbox is stopped”.
Sentences
Section titled “Sentences”- Write short sentences. A sentence in a procedure has a maximum of 20 words. A sentence in a description has a maximum of 25 words.
- Put one topic in one sentence.
- Do not omit words to make a sentence shorter. Keep the articles “a”, “an” and “the”.
- A noun cluster has a maximum of three words. Write “the limit of the output of a command”, not “the command output size limit”.
- Use a vertical list when a sentence has more than two items.
- A name in code font is one word. A number is one word.
Paragraphs
Section titled “Paragraphs”- A paragraph has a maximum of six sentences.
- Put one topic in one paragraph. Start the paragraph with the topic sentence.
- Do not write a paragraph that has only one very long sentence.
Procedures
Section titled “Procedures”- Write one instruction in one sentence. Write two instructions in one sentence only when the reader must do them at the same time.
- Write an instruction as a command: “Start the daemon.”
- Use a numbered list for the steps.
- When a step has a condition, put the condition first: “If the test fails, read the output.”
- Put a warning or a caution before the step that it applies to. Start it with a clear command. Give the risk and the result: “Caution: Do not delete the state file while the daemon runs. The daemon loses all sandboxes.”
- Use a note only for information. A note does not contain an instruction.
Descriptions
Section titled “Descriptions”- Give the reader the general information first and the details after.
- Say what a part does, then how it does it, then why.
- Give the reason for a design decision. Give also the cost of the decision.
- Say clearly what is not proven. Do not write that something works if nobody did a test on it.
- Use a diagram for a flow or for a set of states. GitHub shows Mermaid diagrams.
- Use a table for a reference: one row for one item.
- Give the source file for each mechanism, as a link: internal/sandbox/kept.go.
Technical names
Section titled “Technical names”Use these names. Do not use a different name for the same thing.
| Name | Meaning |
|---|---|
| sandbox | An isolated Linux environment in which a client runs commands. One sandbox is one container. |
| daemon | The process that boxfork serve starts. It owns all sandboxes on one machine. |
| client | A program that calls the HTTP API: the CLI, the Python SDK, the MCP server or your code. |
| engine | The container engine that the daemon controls through the Docker Engine API. |
| container | The object that the engine runs for one sandbox. |
| helper | The small program /.boxfork/guest that the daemon puts in each sandbox. |
| first process | Process 1 of a sandbox. It is the helper in its init mode. |
| command | A program that a client runs in a sandbox. |
| kept connection | The connection to the helper that the daemon keeps open for the commands of one sandbox. |
| image | A container image, for example ubuntu:24.04. |
| snapshot | The saved files of a sandbox. The engine keeps a snapshot as an image. |
| fork | A new sandbox that the daemon makes from a snapshot of a sandbox that runs. |
| pool | A set of sandboxes that the daemon keeps started for one image or one snapshot. |
| waiting sandbox | A sandbox in a pool that no client owns. |
| volume | Storage that stays when a sandbox goes. |
| model cache | A volume that the daemon mounts read-only in each sandbox. |
| state file | The JSON file in which the daemon keeps its records. |
| record | The data that the daemon keeps for one sandbox, one snapshot or one pool. The daemon keeps no record of a volume. |
| API key | The secret that a client sends with each request. |
| sweep | The periodic work of the daemon: timeouts, idle connections, idle sandboxes. |
| GPU allocator | The part of the daemon that gives each GPU to a maximum of one sandbox. |
| isolation | The mechanism between a sandbox and the host kernel: gVisor or a plain container. |
| test engine | The engine in memory that the unit tests use. It is not a real engine. |
| break-it check | A deliberate defect that we put in a copy of the code to see if a test finds it. |
| proof script | A script that does checks on a real engine on a real machine. |
Technical verbs
Section titled “Technical verbs”| Verb | Meaning |
|---|---|
| create | Make a new sandbox, snapshot, pool or volume. |
| kill | Remove a sandbox and its container. |
| pause | Freeze all processes of a sandbox. The memory stays. |
| resume | Continue a paused sandbox. |
| suspend | Save the files of an idle sandbox and remove its container. |
| wake | Start a suspended sandbox again from its saved files. |
| fork | Make one or more new sandboxes from a sandbox that runs. |
| mount | Attach a volume at a path in a sandbox. |
| hand out | Give a waiting sandbox to a client that asks for a sandbox. |
| stream | Send the output of a command to the client while the command runs. |
| sweep | Do the periodic work of the daemon. |
| pull | Download an image to the engine. |
| commit | Save a change in git. Also: the engine saves the files of a container as an image. |
Structure of a page
Section titled “Structure of a page”- A title that says what the page is about.
- A short introduction: what the reader gets from the page, and who the page is for.
- Sections with headings that say what they contain.
- A last section, “Not proven” or “Limits”, when the page describes behavior that has limits.
Examples
Section titled “Examples”| Do not write | Write |
|---|---|
| The sandbox should be killed when it’s no longer needed. | Kill the sandbox when you do not need it. |
| The container is being started by the daemon. | The daemon starts the container. |
| Having created the pool, check that it has filled up. | Create the pool. Then make sure that the pool is full. |
| The command output size limit may be exceeded. | The output of a command can be larger than the limit. |
| Utilize the kept connection in order to reduce latency. | Use the kept connection to decrease the time of a command. |