Starcraft style guide

This is the style guide for user and developer documentation in the craft apps and libraries. It’s a supplement to the Canonical Documentation Style Guide.

Tone

Starcraft is for developers, which means Starcraft is for humans. In our tone we must never forget we’re speaking directly to the person behind the device.

Here are fundamentals for the persona we adopt when speaking to the user. They’re the foundation for our style:

  • We write, primarily, as teachers and guides. We provide for the user’s understanding, and guide their work.

  • We are the team behind the Starcraft products. We take responsibility for them.

  • Let that which is exciting, inspiring, and interesting come across on the page. If technology has this effect on you, allow it to come out in your writing.

  • Documentation is one side of an ongoing dialogue with the user. Dialogue is conversation, so write directly and straightforwardly, in plain language. Write like the user will respond to you directly – they often do.

  • Be brief. The user’s time and attention is a gift they don’t hand out lightly. Be responsible with it. Don’t squander it.

  • In the course of events, identify the person in the loop. Humans come to decisions, have opinions, and make mistakes. Processes, systems, and machines don’t.

  • Many ideas in computing are abstract, metaphorical, and even at times whimsical. If it helps the user understand, use analogy and metaphor. Grounding an idea in a familiar concept is an effective technique for communicating abstract and complex ideas.

  • When something is difficult, acknowledge the pain it causes.

  • When something is uncertain, be forthcoming about why.

Inclusivity

Singular they and them

Don’t presume a gender when referring to a nominal or anonymous person:

Once he installs the app

Wait for the user to make her choice

Do use singular third-person pronouns:

Once they install the app

Wait for the user to make their choice

Names for people

Don’t use gendered names in examples or placeholders:

Alice

Bob

Carol

David

Do use unisex names:

Alex

Blair

Cam

Devin

Accessibility

Image alt text

All images must have alt text. The W3C Images Tutorial provides complete guidance for how to write one.

Relative positioning

Don’t refer to relative positions and directions:

The above example

The code below

The Render node at the bottom-right of the chart

Do refer to chronological sequence, linear sequence, or the item itself:

The previous example

The following code

The Render node

The user is able to locate elements in space in multiple senses. Relative positions in a document, a graphic, or an interface are likely to change, therefore documenting them precisely increases maintenance debt. They also aren’t helpful when the page is recited by a screen reader.

Names

Product names

Don’t modify the product names, even if it’s grammatical:

Starcraft’s

Starcrafts

Starcrafty

Do keep product names discrete and unaltered:

Starcraft

Version names

Don’t use special formatting for version names:

Starcraft 9

Starcraft v9.0.1

Use regular formatting instead:

Starcraft 9

Starcraft 9.0.1

Don’t refer to changes in time when referring to a range of versions:

Starcraft 8 or newer

earlier than core26

Use higher and lower instead:

Starcraft 8 or higher

lower than core26

Software and package names

Don’t format software and package names as code:

download and install curl

the firefox snap

core26

Do write software names in plain English, using the spelling provided by the authors:

download and install curl

the Firefox snap

core26

Some commands, programs, and library names have become generic as verbs, tools, or products. For example, sudo and grep started as packages but have since entered common parlance.

Feature and component names

Don’t format feature and component names as code:

the python plugin

the gnome extension

Do format feature and component names plainly:

the Python plugin

the GNOME extension

The rule of thumb is, do you always qualify the name as belonging to the class of the feature? In other words, does it fit the pattern the [name] [feature type]? If yes, it should be formatted normally.

Code unit names

Don’t refer to code unit names without context:

call setup()

if your package doesn’t have a name

Do qualify what the name is to disambiguate it:

call the setup() method

if your package’s name key isn’t set

Reference labels

Format Sphinx labels as:

.. _<diataxis-type>-<page-title>-<id>

For example:

.. _how-to-starcraft-style-guide-sphinx-labels

Within a documentation set, every label must be unique. A systematic and semantic approach reduces the chances for collisions and makes identification by humans much easier.

Between documentation sets, they may be connected through Intersphinx. The namespaces of every connected documentation set are pooled. It’s possible to have collisions if one set refers to another through a :ref: lookup instead of :external+<set>:ref:.

Admonitions

Wherever possible, avoid admonitions, also known as callouts, like notes, tips, cautions, and warnings. They compete for the user’s attention and become noise when overused. Aim for at most one in a document.

Prefer the generic admonition type:

.. admonition:: If you're thinking about using an admonition
    :class: tip

    Try writing a plain paragraph first.

The message you put in the admonition becomes meaningful for its time and place, which is much more helpful to the user than a generic, context-free Tip.

Code blocks and quotations

The purpose of code in documentation is to make bare the literal words and expressions that have effect in the software. Format code in contexts when you expect the user to immediately make use of it.

Use as little code as possible. Readers have complete availability of our source code. They come to the documentation to read in a natural language.

Code directive

Use the code-block directive for code blocks, and always include the language:

.. code-block:: bash

    ls -la

If no language applies, then the text probably isn’t code, and different markup is needed.

Error messages

Don’t quote error messages and statuses as code:

.. code-block::

    Code: macaroon-permission-required

Use the terminal directive instead:

.. terminal::
    :output-only:

    Code: macaroon-permission-required

File paths

Format file paths in text like this:

/directory/from/root/

relative/directory/

path/to/file

path/to/file.ext

There are many files in Linux that don’t have extensions, such as /bin/bash and ~/.gitconfig. Including the final slash makes it less ambiguous about whether we’re describing a file or a directory.

Punctuation and symbols

Colons and semicolons

Avoid colons and semicolons inside paragraphs:

There was only one thing to do: dance.

It was cold; I ran home.

Do use full stops:

There was only one thing to do. Dance.

It was cold. I ran home.

The grammar rules for when to use semicolons, colons, and commas vary between regions and writers. It’s easier to sidestep them completely.

Colons and semicolons are difficult to see when skimming, and are a barrier for blind users and those with vision impairment.

Use colons to connect to an element on the next line:

Run the following commands to clear the cache:

Quotation marks

Don’t use quotation marks to cite terms, borrowed words, names, or titles:

also known as “crafting” a package

according to “Design Patterns”

Do use emphasis instead:

also known as crafting a snap

according to Design Patterns

Quotation marks around words can sound insincere or sarcastic. Many cultures and languages don’t use them, so their meaning can be lost.

Non-linguistic symbols

Don’t use symbols as shorthand:

🚀

Do use single words:

Yes

No

Launched

Symbol meaning varies across cultures and languages. Symbols aren’t always compatible in screen readers.

Preferred terms

Technical terms

Instead of…

Use…

application

app

Apt

apt

APT

craft tool

crafts

craft app

DEB

.deb

Debian package

keyword

field

key

Inclusive and nonviolent terms

Some longstanding words in computing are biased, discriminatory, or violent. Use these replacements:

Instead of…

Use…

black hat

malicious actor

attacker

blacklist

blocklist

dummy

placeholder

grandfathered

exempt

hang

stall

hit

press

illegal characters

invalid characters

unsupported characters

kill

terminate

end

halt

man-in-the-middle

machine-in-the-middle

master

primary

main

sanity check

safety check

confidence check

slave

secondary

replica

mimic

sample

example

white hat

researcher

security specialist

whitelist

allowlist