File size: 3,116 Bytes
ddbc1ba | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | # Contributing to LifeStack
This document defines the **documentation rule** for the project.
**Nothing ships without its matching doc entry.**
---
## The rule: doc-first development
Every change that adds, removes, or significantly modifies a feature must include
**all three** of the following before the commit is made:
| # | Action | Where |
|---|--------|--------|
| 1 | **Create or update a doc file** | `docs/<topic>.md` |
| 2 | **Update [README.md](../README.md)** | File structure table + relevant section |
| 3 | **Update [docs/README.md](README.md)** | Add a one-line entry in the right table |
> [!IMPORTANT]
> A pull request or commit that adds a new script, module, or feature **without**
> updating **docs/README.md** and the root **README.md** is considered incomplete and should
> not be merged.
---
## What counts as a feature
| Change type | Doc required? |
|-------------|---------------|
| New Python module (`core/`, `agent/`, `intake/`) | Yes β `docs/<module>.md` |
| New script (`scripts/*.py`) | Yes β entry in `docs/scripts.md` |
| New tab or API route in `app_flask.py` | Yes β entry in `docs/app.md` |
| New CLI argument to an existing script | Yes β update the relevant doc |
| Bug fix with no API surface change | No (note in changelog if breaking) |
| Refactor with no API surface change | No |
| New environment variable / secret | Yes β `docs/configuration.md` |
| New dependency in `requirements.txt` | Yes β note in relevant doc + README |
---
## Doc file conventions
- All documentation lives in **`docs/`**. The **only** markdown file at the repository root is **`README.md`** (GitHub project landing page).
- Prefer **lowercase with underscores**: `docs/lifestack_env.md`, `docs/kaggle_train.md`.
- Promotional or Hugging Face collateral also lives under `docs/` (e.g. `blog.md`, `model_card.md`).
- Each doc starts with a `# Title` heading and a one-line summary.
- Code blocks must have a language tag (` ```python `, ` ```bash `).
---
## Checklist (copy into PR or commit message)
```
Docs checklist:
[ ] docs/<topic>.md created or updated
[ ] docs/README.md updated with new entry
[ ] README.md file structure / quickstart updated (if needed)
```
---
## Docs folder layout (representative)
```
docs/
βββ README.md β Master index (always update for new docs)
βββ CONTRIBUTING.md β This file
βββ training_guide.md
βββ train_trl.md
βββ configuration.md
βββ reward.md
βββ lifestack_env.md
βββ task.md
βββ memory.md
βββ conflict_generator.md
βββ eval.md
βββ scripts.md
βββ app.md
βββ DEPLOYMENT.md
βββ blog.md
βββ model_card.md
βββ mentor_pitch.md
βββ implementation_summary.md
βββ kaggle_train.md
```
---
## Commit message format
```
<type>: <short description>
- <file changed>: <what changed>
- docs/<doc>.md: <created|updated>
- docs/README.md: <added entry for X>
- README.md: <updated section Y>
Docs checklist: all items updated
```
Types: `feat` | `fix` | `refactor` | `docs` | `test` | `chore`
|