Skip to content

Commit e4e5126

Browse files
authored
Merge pull request #114 from httpsphl/docs/contributing
docs: contributing guide, security policy and issue and PR templates
2 parents 5cbd1fb + 26a9284 commit e4e5126

9 files changed

Lines changed: 283 additions & 5 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Antivirus warning
2+
description: Your antivirus or SmartScreen flagged a Botloft download or the installed app.
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Botloft's releases are not code-signed yet, so an antivirus may flag them by guesswork
9+
(a "machine-learning" or "heuristic" detection). The
10+
[code signing policy](https://github.com/httpsphl/botloft/blob/main/docs/code-signing-policy.md)
11+
explains why and how each release is built. We report every false positive to the vendor.
12+
- type: input
13+
id: file
14+
attributes:
15+
label: File
16+
description: The name of the file that was flagged.
17+
placeholder: Botloft_0.8.0_x64-setup.exe
18+
validations:
19+
required: true
20+
- type: input
21+
id: antivirus
22+
attributes:
23+
label: Antivirus
24+
placeholder: Microsoft Defender
25+
validations:
26+
required: true
27+
- type: input
28+
id: detection
29+
attributes:
30+
label: Detection name
31+
placeholder: Trojan:Win32/Wacatac.C!ml
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: more
36+
attributes:
37+
label: Anything else
38+
description: When it happened (on download, on install, while running) and a VirusTotal link, if you have one.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Bug report
2+
description: Something in Botloft does not work as it should.
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for reporting. Please leave out anything private: bot conversations, file contents,
9+
tokens or names you would not post publicly.
10+
- type: textarea
11+
id: what
12+
attributes:
13+
label: What happened
14+
description: What you saw, and what you expected instead.
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: steps
19+
attributes:
20+
label: Steps to reproduce
21+
placeholder: |
22+
1. Open a crew with ...
23+
2. Send ...
24+
3. ...
25+
validations:
26+
required: true
27+
- type: input
28+
id: version
29+
attributes:
30+
label: Botloft version
31+
description: Settings > About shows it.
32+
placeholder: "0.8.0"
33+
validations:
34+
required: true
35+
- type: dropdown
36+
id: os
37+
attributes:
38+
label: System
39+
options:
40+
- Windows
41+
- Linux
42+
- macOS
43+
validations:
44+
required: true
45+
- type: input
46+
id: claude
47+
attributes:
48+
label: Claude Code version
49+
description: Settings > About shows it too. Most useful when the problem involves bots.
50+
- type: textarea
51+
id: logs
52+
attributes:
53+
label: Logs or screenshots
54+
description: Anything that helps. Check logs for private content before pasting.
55+
render: text

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Security problem
4+
url: https://github.com/httpsphl/botloft/security/advisories/new
5+
about: Report it privately, not in a public issue.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Idea or feature request
2+
description: Something Botloft could do, or do better.
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: What you want to do
9+
description: The situation and what gets in the way today. A real example helps most.
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: idea
14+
attributes:
15+
label: How it could work
16+
description: Your idea, if you have one. Rough is fine.
17+
- type: checkboxes
18+
id: help
19+
attributes:
20+
label: Building it
21+
options:
22+
- label: I would like to work on this myself.

‎.github/pull_request_template.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## What and why
2+
3+
<!-- What this changes and the reason. Link the issue: "Closes #123". -->
4+
5+
## How it was tested
6+
7+
<!-- Tests added, and any manual check. If it depends on the real Claude Code, the steps you ran. -->
8+
9+
## Checklist
10+
11+
- [ ] `cargo fmt`, `clippy -D warnings` and `cargo test` pass
12+
- [ ] `pnpm check` passes (if the app changed)
13+
- [ ] New behavior has a test
14+
- [ ] New interface text is in English, Portuguese and Spanish
15+
- [ ] `docs/spec.md` still matches the code

‎CONTRIBUTING.md‎

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Contributing to Botloft
2+
3+
Thanks for taking a look. Botloft is young (version 0.x) and every kind of help counts: trying it and
4+
reporting what broke, ideas, docs, translations and code.
5+
6+
## Ways to help
7+
8+
- **Try it and tell us.** A bug report with the steps to reproduce it is one of the most useful
9+
things you can send. Use the [bug report form](https://github.com/httpsphl/botloft/issues/new/choose).
10+
- **Antivirus false positives.** Releases are not code-signed yet (see the
11+
[code signing policy](docs/code-signing-policy.md)), so an antivirus may flag them by guesswork.
12+
If yours does, open an issue with the file name, the detection name and the antivirus; we report
13+
each one to the vendor.
14+
- **Pick an issue.** Issues labeled
15+
[`good first issue`](https://github.com/httpsphl/botloft/labels/good%20first%20issue) are small and
16+
self-contained; [`help wanted`](https://github.com/httpsphl/botloft/labels/help%20wanted) ones are
17+
bigger. Comment on the issue before you start so two people do not do the same work.
18+
- **Translations.** The app speaks English, Brazilian Portuguese and Spanish. Fixes to wording are
19+
welcome in any of them.
20+
- **Bigger changes.** For a new feature or a change in how something works, open an issue first and
21+
describe it. It saves you from writing code that does not fit the plan.
22+
23+
## Getting set up
24+
25+
The [Development section of the README](README.md#status) lists what to install and the commands to
26+
build and test. The short version:
27+
28+
```powershell
29+
cargo test --workspace
30+
cd app
31+
pnpm install
32+
pnpm dev # the UI alone in a browser, with a fake daemon and sample crews
33+
```
34+
35+
`pnpm dev` needs neither Rust nor Claude Code, so it is the quickest way to work on the interface.
36+
Running real bots needs Claude Code installed and signed in.
37+
38+
During development, set `BOTLOFT_HOME` to an absolute path (for example `$PWD\.dev\home`) for both
39+
the daemon and the app, so they never touch a real Botloft installation.
40+
41+
## How the project is organized
42+
43+
```
44+
crates/botloft-core domain types, IDs, message envelope, protocol types (exported to TypeScript)
45+
crates/botloft-store SQLite storage, migrations in migrations/NNNN_name.sql
46+
crates/botloftd the daemon: RPC, supervisor, bot runtime, chat, message delivery, MCP tools
47+
app/ Tauri v2 + React 19 + TypeScript (strict) + Tailwind v4 + Zustand
48+
docs/ specification and architecture decision records
49+
```
50+
51+
[`docs/spec.md`](docs/spec.md) is the source of truth for architecture, protocol, data and states.
52+
It is written in Portuguese; a browser translation reads fine, and questions about it are welcome in
53+
an issue. If your change makes the spec wrong, update the spec in the same pull request.
54+
55+
## Rules for code
56+
57+
- **Write it yourself.** Botloft is its own implementation. Do not copy or adapt code, tests, texts
58+
or schemas from other agent orchestration projects. The spec, the official Claude Code
59+
documentation and the documentation of the libraries we use are fine sources.
60+
- **English** for code, identifiers, comments and commit messages.
61+
- **Small files.** Keep files under about 300 lines; split by responsibility past that.
62+
- **Errors:** `thiserror` in the library crates, `anyhow` only in the binary.
63+
- **Platform code** (Win32, systemd, launchd) lives in `crates/botloftd/src/platform/`. The rest of
64+
the daemon does not call the OS directly.
65+
- **The UI talks only to `BotloftApi`** (`app/src/lib/api.ts`). Component tests use `FakeBotloft`.
66+
- **No interface text inside components.** Every string goes in
67+
`app/src/i18n/{en,pt-BR,es}/<area>.ts`, in all three languages, and is read with `useT()`. The
68+
TypeScript check flags a missing one. Use plain words: the app never says "daemon" or other jargon
69+
to the user.
70+
- **Never edit `app/src/lib/protocol.gen.ts` by hand.** It is generated from the Rust types with
71+
`cargo test -p botloft-core export_bindings`.
72+
- **Privacy.** Never log tokens, message bodies, attachments or chat items at `info` level or
73+
above: bots may handle personal data. No telemetry.
74+
75+
## Before you open a pull request
76+
77+
1. `cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings` and
78+
`cargo test --workspace` pass.
79+
2. If you changed the app: `pnpm check` passes (typecheck, Biome and Vitest).
80+
3. New behavior has a test. The supervisor, message delivery and chat are tested with
81+
`FakeRuntime`; components with `FakeBotloft`.
82+
4. The spec still describes what the code does.
83+
5. If the change depends on how the real Claude Code behaves, say in the pull request how you tested
84+
it by hand.
85+
86+
Keep pull requests small, one change each, with a title in
87+
[Conventional Commits](https://www.conventionalcommits.org) form, such as
88+
`fix(chat): keep the draft when a bot restarts`. CI runs on Windows, Ubuntu and macOS and must pass
89+
before merging.
90+
91+
Using an AI assistant to write your contribution is fine. You are still the one who answers for it:
92+
read every line, run the checks and make sure it follows the rules above.
93+
94+
## License
95+
96+
Botloft is licensed under the [Apache License 2.0](LICENSE). By sending a contribution, you agree
97+
that it is licensed under the same terms (section 5 of the license).
98+
99+
## Security
100+
101+
Please do not open a public issue for a security problem. See [SECURITY.md](SECURITY.md).

‎README.md‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<a href="#how-it-works">How it works</a>
2424
&nbsp;·&nbsp;
2525
<a href="#faq">FAQ</a>
26+
&nbsp;·&nbsp;
27+
<a href="#contributing">Contributing</a>
2628
</p>
2729

2830
<picture>
@@ -193,9 +195,9 @@ and is not affiliated with or endorsed by Anthropic.
193195
## Status
194196

195197
Botloft is young (version 0.x) and moves fast. The daemon, the chat, crews with a Chief, messages
196-
and tasks between bots, routines, the live browser, screens, the installer and updates are in place.
197-
Planned next: a question box where bots ask you things, "always allow" for requests, search, and a
198-
code-signed installer. `main` can be ahead of the latest release.
198+
and tasks between bots, routines, the live browser, screens, "always allow" for requests, the
199+
installer and updates are in place. Planned next: a question box where bots ask you things, search,
200+
and a code-signed installer. `main` can be ahead of the latest release.
199201

200202
<details>
201203
<summary><b>Development</b></summary>
@@ -246,6 +248,13 @@ docs/ specification and ADRs
246248
```
247249
</details>
248250

251+
## Contributing
252+
253+
Contributions are welcome: bug reports, ideas, translations and code. Start with
254+
[CONTRIBUTING.md](CONTRIBUTING.md); issues labeled
255+
[`good first issue`](https://github.com/httpsphl/botloft/labels/good%20first%20issue) are a good
256+
first step. Security problems go through [SECURITY.md](SECURITY.md), not public issues.
257+
249258
## License
250259

251260
Botloft is licensed under the [Apache License 2.0](LICENSE). See [NOTICE](NOTICE) for the copyright

‎SECURITY.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Security policy
2+
3+
## Reporting a problem
4+
5+
Please report security problems privately, through GitHub:
6+
[Report a vulnerability](https://github.com/httpsphl/botloft/security/advisories/new). Do not open a
7+
public issue.
8+
9+
Say what you found, how to reproduce it and which version you used. You will get an answer within a
10+
week. Once a fix is out, the advisory is published with credit to you, unless you prefer otherwise.
11+
12+
## Supported versions
13+
14+
Only the [latest release](https://github.com/httpsphl/botloft/releases/latest) gets security fixes.
15+
The app updates itself, so staying on it is one click.
16+
17+
## Scope
18+
19+
Botloft runs Claude Code bots on your computer, with your account. Some things are by design and not
20+
vulnerabilities:
21+
22+
- Bots run as your user, without a sandbox. Keeping them apart is cooperative: a bot that may run
23+
any command (or one set to skip permission prompts) can read what your user can read, including
24+
other bots' folders and Botloft's own data. The app warns about this before you turn that on.
25+
- The background service listens on `127.0.0.1` only and asks every client for a token, which only
26+
your user can read. Other programs running as your user are trusted as much as you are.
27+
28+
A way around what a bot was allowed to do, a page or a message that gets a bot past a permission
29+
prompt, or a program reaching the service without the token is in scope and very welcome.
30+
31+
Antivirus detections of the releases are not security reports: see the
32+
[code signing policy](docs/code-signing-policy.md) and open a normal issue.

‎docs/code-signing-policy.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ On Linux and macOS (preview since 0.8.0):
8383
`~/Library/Application Support/Botloft`. A launch agent,
8484
`~/Library/LaunchAgents/io.github.httpsphl.botloft.daemon.plist`, keeps the bots running; when
8585
Botloft opens its window at sign-in, it adds `io.github.httpsphl.botloft.app.plist` next to it.
86-
- Bots keep their work in `~/Botloft`, or in the folder you pick for a crew. Keeping the computer
87-
awake while bots work is Windows-only for now.
86+
- Bots keep their work in `~/Botloft`, or in the folder you pick for a crew.
87+
- While a bot is working, a helper keeps the computer from sleeping when idle: `caffeinate` on
88+
macOS, `systemd-inhibit` on Linux. Settings > General turns this off.
8889

8990
## Uninstalling
9091

0 commit comments

Comments
 (0)