Skip to content

Commit 317d89c

Browse files
nos1dot618claude
andcommitted
docs: add contributing guide, code of conduct and security policy
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 6affcf7 commit 317d89c

3 files changed

Lines changed: 185 additions & 0 deletions

File tree

‎CODE_OF_CONDUCT.md‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Code of Conduct
2+
3+
This project follows the
4+
[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
5+
It is the same code of conduct as the
6+
[language repository](https://github.com/lambda-discipline/lambda-discipline/blob/master/CODE_OF_CONDUCT.md).
7+
In short:
8+
9+
## Our pledge
10+
11+
We want participation in Lambda Discipline to be a harassment-free experience
12+
for everyone, regardless of age, body size, visible or invisible disability,
13+
ethnicity, sex characteristics, gender identity and expression, level of
14+
experience, education, socio-economic status, nationality, personal
15+
appearance, race, caste, color, religion, or sexual identity and orientation.
16+
17+
## Expected behavior
18+
19+
* Be kind and patient, and assume good intent.
20+
* Respect different viewpoints and experience levels.
21+
* Give and accept constructive feedback gracefully.
22+
* Take responsibility for mistakes and learn from them.
23+
* Focus on what is best for the community and the project.
24+
25+
## Unacceptable behavior
26+
27+
* Sexualized language or imagery, and unwelcome sexual attention.
28+
* Trolling, insulting or derogatory comments, and personal or political attacks.
29+
* Public or private harassment.
30+
* Publishing others' private information without their explicit permission.
31+
* Other conduct that would reasonably be considered inappropriate in a
32+
professional setting.
33+
34+
## Scope
35+
36+
This applies in all project spaces (issues, pull requests, discussions and
37+
other channels) and when someone officially represents the project elsewhere.
38+
39+
## Reporting and enforcement
40+
41+
Report unacceptable behavior privately to the maintainers through GitHub
42+
([private report](https://github.com/lambda-discipline/lambda-discipline.github.io/security/advisories/new)
43+
or a direct message to a maintainer). All reports are reviewed promptly and
44+
handled confidentially. Maintainers may remove, edit or reject contributions,
45+
and warn, temporarily ban or permanently ban participants, following the
46+
Contributor Covenant's
47+
[enforcement guidelines](https://www.contributor-covenant.org/version/2/1/code_of_conduct/#enforcement-guidelines).

‎CONTRIBUTING.md‎

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Contributing to the Lambda Discipline website
2+
3+
Thanks for helping! Fixes to wording, new pages, better examples and design
4+
improvements are all welcome. By taking part you agree to follow the
5+
[Code of Conduct](CODE_OF_CONDUCT.md).
6+
7+
This repository is the website only. Bugs in the language or the `lbd`
8+
interpreter belong in the
9+
[language repository](https://github.com/lambda-discipline/lambda-discipline/issues).
10+
Some of the site comes from there, too:
11+
12+
* the [builtin reference](https://lambda-discipline.github.io/builtins/) is
13+
generated from `lbd docs --json`, so builtin descriptions are fixed in the
14+
`builtins!` table in the language's `src/builtins.rs`;
15+
* the [examples](https://lambda-discipline.github.io/examples/) are `.lbd`
16+
files from the language repository, so a new example goes there first and
17+
is then listed in `site.toml` here.
18+
19+
## Reporting issues
20+
21+
Open an issue with the matching template: a broken page or link, a mistake in
22+
the docs, or an idea for the site. Include the page URL. For security
23+
problems, see [SECURITY.md](SECURITY.md) instead.
24+
25+
## Development setup
26+
27+
You need Python 3.11 or newer, Git, and Rust 1.85 or newer to build `lbd`.
28+
29+
```bash
30+
python -m venv .venv
31+
```
32+
33+
```bash
34+
.venv/bin/pip install -r requirements-dev.txt
35+
```
36+
37+
On Windows the scripts are in `.venv\Scripts\` instead of `.venv/bin/`.
38+
39+
Build the site and preview it:
40+
41+
```bash
42+
python build.py
43+
```
44+
45+
```bash
46+
python -m http.server -d _site
47+
```
48+
49+
`build.py` clones the language repository into `.cache/`, builds `lbd` and
50+
writes `_site/`. If you already have a checkout of the language, use it as is
51+
with `--repo ../lambda-discipline`, and skip the Cargo build with
52+
`--lbd path/to/lbd`. See [README.md](README.md) for every option and for how
53+
the repository is laid out.
54+
55+
Optional but recommended: install the [pre-commit](https://pre-commit.com)
56+
hooks, which format and check your changes before each commit.
57+
58+
```bash
59+
pre-commit install
60+
```
61+
62+
## Writing pages
63+
64+
* Pages are Markdown in `content/`, with `title` and `description` front
65+
matter. Mark Lambda Discipline code blocks with `lbd` so they are
66+
highlighted.
67+
* Keep the tone plain and precise. Every code sample should run, and its
68+
comments should show what it really prints: check them with `lbd run`.
69+
* Link to other pages with root-relative paths such as `/reference/#types`.
70+
The link checker verifies them, including the `#fragment`.
71+
72+
## Before you open a pull request
73+
74+
Everything CI checks can be run locally:
75+
76+
```bash
77+
black --check .
78+
```
79+
80+
```bash
81+
ruff check .
82+
```
83+
84+
```bash
85+
mypy
86+
```
87+
88+
```bash
89+
python build.py
90+
```
91+
92+
```bash
93+
lychee --offline --root-dir "$PWD/_site" _site
94+
```
95+
96+
Drop `--offline` to check external links too. Look at the pages you changed
97+
in a browser, in both light and dark mode and at phone width.
98+
99+
## Commit messages
100+
101+
Use `prefix: summary`, with the summary in lowercase and the imperative mood,
102+
for example `docs: explain let-polymorphism`. Common prefixes are `feat`,
103+
`fix`, `docs`, `style`, `refactor`, `ci`, `deps` and `chore`. Explain why in
104+
the body when it isn't obvious.

‎SECURITY.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Security policy
2+
3+
## Supported versions
4+
5+
Only the live site, built from the `master` branch, is supported.
6+
7+
## Reporting a vulnerability
8+
9+
Please do not open a public issue. Report it privately through GitHub:
10+
**Security → Report a vulnerability** on this repository
11+
([direct link](https://github.com/lambda-discipline/lambda-discipline.github.io/security/advisories/new)).
12+
13+
Include the affected page or file and the steps that reproduce the problem.
14+
You should get an acknowledgement within a week. We will agree on a
15+
disclosure date with you once a fix is ready, and credit you in the advisory
16+
unless you prefer otherwise.
17+
18+
## Scope
19+
20+
The site is static: plain HTML and CSS, one small inline script to filter the
21+
builtins, no cookies, no analytics and no third-party resources. Things that
22+
are in scope:
23+
24+
* Content injection or cross-site scripting through anything the build
25+
renders, such as an example program, its output, or a builtin's
26+
documentation.
27+
* The build and deploy workflows: anything that could let a pull request,
28+
a change in the language repository, or a dependency publish content to the
29+
site or reach the workflow's credentials.
30+
* Vulnerabilities in the Python dependencies (`requirements.txt`) or GitHub
31+
Actions this repository uses. Dependabot keeps them up to date.
32+
33+
Vulnerabilities in the language or the `lbd` interpreter belong to the
34+
[language repository's security policy](https://github.com/lambda-discipline/lambda-discipline/blob/master/SECURITY.md).

0 commit comments

Comments
 (0)