# all·markdown

Code of conduct template for a project

Make your CODE_OF_CONDUCT.md

Fill these in and the whole file updates. Nothing is sent anywhere, and there is nothing to sign up for.

# Code of Conduct

<!--
  Most projects adopt the Contributor Covenant rather than writing their own: it is the version maintainers and contributors already recognize, and
  recognition is most of the value. This is a shorter document in the same
  spirit. Whichever you use, the part that matters is the reporting address:
  a code of conduct with no working way to report is decoration.
-->

## Our commitment

This project is a place to work on software. Everyone taking part should be
able to do that without harassment, whoever they are.

## Expected behavior

- Assume the other person is acting in good faith
- Give feedback on the work, not on the person who wrote it
- Accept that a decision can go against you and the discussion is still over
- Take responsibility for mistakes and fix them

## Unacceptable behavior

- Harassment, whether in public or in private
- Sexualised language, imagery or attention
- Personal or political attacks, insults, and sustained disruption
- Publishing someone's private information without their permission

## Scope

This applies in every project space (the repository, issues, pull requests,
discussions and chat) and in any place where someone is representing the
project.

## Reporting

Report a problem to **conduct@example.com**. Reports go to the maintainers
listed below and are handled in confidence.

<!-- Name the people, not just the address. A report goes to someone. -->

- Maintainer Name (@handle)
- Maintainer Name (@handle)

Anyone reporting in good faith will not face consequences for having done so.

## What happens next

1. **Acknowledged** within a few days, in writing
2. **Reviewed** by maintainers not involved in the incident
3. **Decided**, and the outcome shared with the person who reported it

Depending on what happened, the outcome may be a private warning, a temporary
ban from project spaces, or a permanent one.

## Attribution

Adapted in spirit from the [Contributor Covenant](https://www.contributor-covenant.org).

Visual

Open in the editor Runs in this tab, nothing is uploaded.

CODE_OF_CONDUCT.md goes in the repository root, .github/ or docs/. GitHub finds it in any of the three and links it from the community profile and the repository sidebar.

Use the Contributor Covenant unless you have a reason not to

Most projects adopt it, and the reason is recognition rather than wording: contributors know what they are agreeing to without reading it. A bespoke document has to earn that trust from scratch.

The template here is shorter, in the same spirit, for projects that would rather have something people read once than something they scroll past.

The part that is usually missing

Reporting. A code of conduct with no working route to report is decoration, and it is worse than none: it implies a process that does not exist.

A usable reporting section has four things:

The awkward case is worth planning for: what happens when the report is about a maintainer. Naming two or three people, and saying that anyone involved steps out of the review, answers it before it comes up.

Scope

Say where it applies. Most projects extend it to the repository, issues, pull requests, discussions, chat, and anywhere someone is representing the project. Ambiguity here is what makes enforcement contentious later.

When it is worth writing

A solo project does not need one. Once contributors arrive who you have not met, it is twenty minutes well spent: pointing at a document that already existed is far easier than writing one during an incident.

Common questions

Where does CODE_OF_CONDUCT.md go?
The repository root, `.github/` or `docs/`. GitHub detects it in any of the three, links it from the community profile, and shows it in the sidebar of the repository page.
Should I use the Contributor Covenant instead?
Usually yes. Its value is recognition: contributors know what they are agreeing to without reading it, which a bespoke document cannot offer. This template is a shorter document in the same spirit, for projects that want something people will actually read.
What is the part most codes of conduct get wrong?
Reporting. A document with no working address, or one pointing at a mailing list the person being reported is on, is decoration. Name the people who receive reports, say what happens after one, and give a rough timescale.
Does it apply outside the repository?
Say so explicitly in a scope section. Most projects extend it to chat, forums, and anywhere someone is representing the project, including conferences. Ambiguity about scope is what makes enforcement contentious.
Do small projects need one?
A solo project does not. Once there are contributors you have not met, it is worth the twenty minutes: it is far easier to point at a document that already existed than to write one during an incident.

Sources