Skip to content

Write documentation

The localspace documentation uses ASD-STE100 Simplified Technical English (STE). STE is a controlled language. It has a small dictionary and a set of writing rules. Text in STE is clear to readers who are not native speakers of English, and it has only one meaning.

This page gives the rules that apply to this documentation. The full standard is free from asd-ste100.org.

Vale checks the text with the rules in docs/vale/styles/STE. The commit hook and CI run the same check.

  1. Install Vale: brew install vale.

  2. Run the check from the root of the repository:

    Terminal window
    make docs-lint
  3. Correct each error. Vale shows the rule and an approved alternative.

Vale cannot find all problems. For example, it cannot tell a procedure from a description, and it does not know all unapproved words. Read your text again with the rules on this page.

If Vale shows an error on correct text, write the sentence in a different way. Turn a rule off only for a quotation that you cannot change:

<!-- vale STE.Words = NO -->
Text that you cannot change.
<!-- vale STE.Words = YES -->

Each page has one of these types. The section of the site shows the type.

Section Type The page tells the reader
Get started Tutorial How to get a first result, step by step
Guides Procedure How to do one task
Concepts Description How localspace operates, and the reason
Reference Reference All the facts about one item, in tables

Do not mix the types on one page. A guide can link to a concept page for the reason, and to a reference page for all the options.

Use the words of the STE dictionary with their approved meanings. Vale knows the unapproved words that occur most frequently in this documentation:

Do not write Write
may, might, could can
should must
allow, enable let
need, require must, is necessary
create make
every each, all
never do not
own (its own) separate
what which, the thing that
once when
via through
e.g., i.e., etc. for example, that is, (a full list)

You can use technical nouns and technical verbs that are not in the dictionary (STE 1.5 and 1.12). In this documentation, these are the names of software items and computer operations. Examples:

  • Technical nouns: workspace, template, container, database, port, branch, worktree, proxy, certificate.
  • Technical verbs: run, install, delete, copy, click, type, download, commit, push.

Use a technical verb only as a verb, and a technical noun only as a noun (STE 1.7).

Use the same term for the same item on all pages (STE 1.11). The glossary gives the terms. For example, always write “workspace”. Do not write “environment” or “copy” for a workspace.

  • Write lo for the command and localspace for the product.
  • Write the names of commands, flags, files, fields and values as code: lo up, --json, localspace.yaml.
  • Write the labels of the dashboard in bold: Settings.
  • Write a maximum of 20 words in a sentence of a procedure (STE 5.1).
  • Write a maximum of 25 words in a sentence of a description (STE 6.3).
  • Write only one instruction in a sentence (STE 5.2).
  • Do not use contractions. Write “do not” and “it is” in full (STE 4.2).
  • Do not omit words such as “the” and “a” to make a sentence shorter (STE 4.2 and 4.5).
  • Put a long series of items in a vertical list (STE 4.3).

Code, numbers and names count as one word.

  • Write instructions in the imperative: “Run lo up.” (STE 5.3).
  • Use only these tenses: the simple present, the simple past and the simple future (STE 3.2). Do not use the perfect tenses or the progressive forms.
  • Use the active voice (STE 3.6). Write “lo up starts the services”. Do not put the agent after “by”.
  • Use the “-ing” form only in a technical noun, such as “port forwarding” (STE 3.5).

Write the steps of a task as a numbered list.

  1. Start each step with a verb in the imperative.
  2. Put a condition before the instruction, and a comma after the condition: “If the port is busy, stop the other program.”
  3. Put the result of a step after the step, in a separate sentence.
  • Give each paragraph one topic. Start with a sentence that tells the topic (STE 6.4 and 6.5).
  • Write a maximum of six sentences in a paragraph (STE 6.6).
  • Give information gradually: first the general fact, then the details (STE 6.1).
  • Do not use semicolons (STE 8.1). Write two sentences.
  • Put a colon at the end of the sentence that starts a vertical list.
  • Write headings in sentence case: “Use a database”, not “Use A Database”.

A note gives information only. Do not put an instruction in a note (STE 5.5).

:::note
`lo down` keeps the worktrees and the data.
:::

A caution tells the reader about a risk of data loss. Start it with the instruction, then tell the result (STE 7.2 and 7.3).

:::caution
Do not run `lo rm --force` on a workspace with work that you did not push. It deletes that work.
:::
  • Write file names and fields as code. Give each code block a language, and a title when it shows a file:

    ```yaml title="localspace.yaml"
    services:
    api:
    port: 8080
    ```
  • Show commands in sh blocks. Do not write a $ prompt before a command.

  • Write a value that the reader must change in angle brackets: lo up <workspace>.

  • Start a link to a different page with the base of the site: [templates](/localspace/guides/templates/). The build fails when a link goes to a page or a heading that is not there.

  • Draw a flow or a sequence with a mermaid code block. The build changes it to a picture.

The pages in Reference › Commands come from the help text of lo. Do not change these pages. Change the help text in the Go code, then make the pages again:

Terminal window
make docs-cli

The help text must also obey the rules on this page. make check fails when the pages and the help text are different.

Run the site on your computer. It shows each change immediately.

Terminal window
make docs-dev