Skip to content

Repo documentation guidance#192

Open
SHession wants to merge 18 commits intomainfrom
add-repo-documentation-guidance
Open

Repo documentation guidance#192
SHession wants to merge 18 commits intomainfrom
add-repo-documentation-guidance

Conversation

@SHession
Copy link

@SHession SHession commented Jan 19, 2026

What is being recommended?

This document provides guidance and a template for writing effective documentation for our repos. It is intended to improve the general quality of these documents, providing actionable advice, as well as a template to use.

What's the context?

I've noticed during the tools audit that knowledge of some tools is becoming increasingly sparse. The aim is to make discovering and understanding tools much simpler.

Note

The recommendations in this repository are intended to share engineering best practices for all of Product & Engineering (P&E) in the open.

Some considerations:

  • Should this really be an ADR in another repository?
  • Have you sought review widely enough (Developer Experience, Heads of Engineering)?
  • If it is security related, should you consult with Information Security?

@SHession SHession changed the title Initial draft on repo documentation guidance Repo documentation guidance Jan 20, 2026
@SHession SHession force-pushed the add-repo-documentation-guidance branch from 01cb445 to 2cd9e7d Compare January 20, 2026 08:17
@SHession SHession force-pushed the add-repo-documentation-guidance branch 5 times, most recently from 826c4c9 to b2f098b Compare January 20, 2026 09:37
@SHession SHession force-pushed the add-repo-documentation-guidance branch from b2f098b to 00a1212 Compare January 20, 2026 10:00
@SHession SHession marked this pull request as ready for review January 20, 2026 10:02
@SHession SHession self-assigned this Jan 20, 2026
Acronyms can abbreviate and simplify documentation, but it can also create barriers to entry for an unfamiliar
audience.

<!--alex ignore just-->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this comment do?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the CI checks was flagging the paragraph for inclusive language, but the context here is fine.

SHession and others added 4 commits January 20, 2026 11:26
Co-authored-by: TJ Silver <15648334+tjsilver@users.noreply.github.com>
Co-authored-by: TJ Silver <15648334+tjsilver@users.noreply.github.com>
Co-authored-by: TJ Silver <15648334+tjsilver@users.noreply.github.com>
Co-authored-by: TJ Silver <15648334+tjsilver@users.noreply.github.com>
readers be expected to already know and what does the documentation aim to teach them?

> [!TIP]
> Answering the following questions helps you determine what your document should contain:
Copy link
Contributor

@NovemberTang NovemberTang Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth saying that it can be useful to readers if the documentation includes things like intended audience and knowledge prerequisites?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @NovemberTang, I have added an extra couple of sentences to encourage this. Let me know if you that that covers it 🙏

Copy link
Contributor

@NovemberTang NovemberTang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @SHession , this is great! I've left a couple of small QOL comments, but nothing blocking 🥇

@joelochlann
Copy link
Member

joelochlann commented Jan 26, 2026

Re: our discussion of advice on how to structure docs for LLMs

I think the general guidance should be that things that are useful for humans are also useful for LLMs, and in particular avoiding redundancy between docs/comments and code: docs should provide complementary information, not duplicate information.

Examples of complementary information:

  • Why this approach as opposed to obvious alternatives? A key bit information that is present when the code is created that often disappears after is: what we were the alternative solutions that were ruled out, and why were they ruled out?

A couple of specific things I've thought of, which we often do anyway, but not always:

  • Markdown is the bread-and-butter of LLMs because it is token-efficient (no need for open/close tags) while allowing hierarchical structure. Also it looks great in GitHub. Always use markdown!
  • Prefer markdown README in the repo to a separate wiki
  • Where it makes sense, co-locate markdown docs with relevant code, e.g. README.md files in the root of folders
  • In the top-level README, provide a table of contents that helps humans and LLMs understand the high-level structure of the repo, and to find all the relevant docs. So, link to any folders that contain exclusively documentation, and describe the pattern that would help someone easily find docs that are scattered around, for instance: "all docs are either README.md in an arbitrary folder, or .md files within docs/"
  • [not strictly docs but should be in our recommendations] Create a .github/copilot-instructions.md. Here's one example in the Guardian estate: https://github.com/guardian/support-service-lambdas/blob/main/.github/copilot-instructions.md

Another thing which we want to recommend people start exploring: https://github.com/anthropics/skills

SHession and others added 2 commits January 26, 2026 14:55
Co-authored-by: Natasha <67543397+NovemberTang@users.noreply.github.com>
### Write for an audience

<!--alex ignore clearly-->
Repo documentation is primarily useful for engineers. However, authors should also consider the value it provides to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this section doesn’t explain anywhere why writing for a specific audience is valuable. I think a good structure for the section might be to start with that explanation, before giving examples of possible audiences to consider and advice to help identify a good intended audience.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, that is a notable omission. I will add something in.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some detail to this section, I would value your thoughts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it, thanks!

Comment on lines 113 to 114
> Analytic minds tend to love tables. Given a page containing multiple paragraphs and a single table, engineers' eyes
> zoom towards the table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this strike you as true? It doesn’t apply to me (I would probably prefer the paragraphs in many cases), but I’m uncertain what’s typical.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, this was also taken from the technical writing course, but it is very much subjective. Although, I think the point stands that many people find tables useful.

I'm open to alternatives quotes or phrasing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reason I dislike this piece of text is that it implies engineers are all the same – engineers prefer tables, engineers have analytic minds. As I don’t prefer tables, I think it (slightly!) implies I’m not a real engineer.

That’s probably not that important, but I also don’t think the paragraph is adding much to this section: we’ve already recommended tables in the first paragraph, so this strikes me as just a bit of unnecessary colour. If we’re drawing attention to some extra markdown features here, I’d be more tempted to highlight alerts or GitHub’s support for mermaid diagrams.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this. I have removed the unhelpful quote and replaced it with a reference to the mermaid docs.

Co-authored-by: Emily Bourke <emily.bourke@guardian.co.uk>
> [!TIP]
> Sure, you can introduce and use acronyms properly, but should you use acronyms? Well, acronyms do reduce sentence
> size. For example, TTN is two words shorter than Telekinetic Tactile Network. However, acronyms are really just a
> layer of abstraction; readers must mentally expand recently learned acronyms to the full term. For example, readers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I first read this I missed the key bit "recently learned".

I presume we aren't suggesting expanding USB, CRC, HTTPS, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here actually – clicking through to the source makes it clearer that common acronyms should still be used.

@SHession SHession force-pushed the add-repo-documentation-guidance branch from c7c0806 to 89e3c3a Compare February 5, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants