Skip to content

Commit bb5023b

Browse files
authored
chore: add community standard files (#27)
1 parent 76ef0fb commit bb5023b

8 files changed

Lines changed: 368 additions & 0 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
title: "BUG: "
4+
labels: ["bug", "needs-triage"]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Describe the bug
10+
description: A clear and concise description of what the bug is.
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: reproduce
16+
attributes:
17+
label: To reproduce
18+
description: Steps to reproduce the behavior.
19+
placeholder: |
20+
1. Go to '...'
21+
2. Click on '...'
22+
3. See error
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: expected
28+
attributes:
29+
label: Expected behavior
30+
description: A clear and concise description of what you expected to happen.
31+
validations:
32+
required: true
33+
34+
- type: textarea
35+
id: screenshots
36+
attributes:
37+
label: Screenshots
38+
description: If applicable, add screenshots to help explain your problem.
39+
40+
- type: input
41+
id: matcha-version
42+
attributes:
43+
label: Matcha version
44+
placeholder: "e.g. 0.20.0"
45+
46+
- type: input
47+
id: go-version
48+
attributes:
49+
label: Go version
50+
description: "Run `go version` to find out. Only relevant if the issue is related to Go/compilation."
51+
placeholder: "e.g. 1.22.0"
52+
53+
- type: input
54+
id: os
55+
attributes:
56+
label: OS
57+
placeholder: "e.g. macOS 14, Ubuntu 24.04, Windows 11"
58+
validations:
59+
required: true
60+
61+
- type: input
62+
id: terminal
63+
attributes:
64+
label: Terminal
65+
placeholder: "e.g. iTerm2, Windows Terminal, Alacritty"
66+
67+
- type: textarea
68+
id: additional
69+
attributes:
70+
label: Additional context
71+
description: Add any other context about the problem here.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project
3+
title: "FEAT: "
4+
labels: ["enhancement", "needs-triage"]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: Is your feature request related to a problem?
10+
description: A clear and concise description of what the problem is.
11+
placeholder: "I'm always frustrated when..."
12+
13+
- type: textarea
14+
id: solution
15+
attributes:
16+
label: Describe the solution you'd like
17+
description: A clear and concise description of what you want to happen.
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: alternatives
23+
attributes:
24+
label: Describe alternatives you've considered
25+
description: A clear and concise description of any alternative solutions or features you've considered.
26+
27+
- type: textarea
28+
id: additional
29+
attributes:
30+
label: Additional context
31+
description: Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## What?
2+
3+
<!-- Describe what this PR changes. Keep it concise — what code was added, removed, or modified? -->
4+
5+
## Why?
6+
7+
<!-- Explain the motivation behind this change. What problem does it solve, or what addition does it enable? Link related issues if applicable. -->

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
permissions:
5757
contents: read
5858
pull-requests: write
59+
issues: write
5960
steps:
6061
- uses: actions/checkout@v6
6162

CODE_OF_CONDUCT.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Contributor Covenant 3.0 Code of Conduct
2+
Our Pledge
3+
4+
We pledge to make our community welcoming, safe, and equitable for all.
5+
6+
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
7+
Encouraged Behaviors
8+
9+
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
10+
11+
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
12+
13+
Respecting the purpose of our community, our activities, and our ways of gathering.
14+
Engaging kindly and honestly with others.
15+
Respecting different viewpoints and experiences.
16+
Taking responsibility for our actions and contributions.
17+
Gracefully giving and accepting constructive feedback.
18+
Committing to repairing harm when it occurs.
19+
Behaving in other ways that promote and sustain the well-being of our community.
20+
21+
Restricted Behaviors
22+
23+
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
24+
25+
Harassment. Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
26+
Character attacks. Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
27+
Stereotyping or discrimination. Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
28+
Sexualization. Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
29+
Violating confidentiality. Sharing or acting on someone's personal or private information without their permission.
30+
Endangerment. Causing, encouraging, or threatening violence or other harm toward any person or group.
31+
Behaving in other ways that threaten the well-being of our community.
32+
33+
Other Restrictions
34+
35+
Misleading identity. Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
36+
Failing to credit sources. Not properly crediting the sources of content you contribute.
37+
Promotional materials. Sharing marketing or other commercial content in a way that is outside the norms of the community.
38+
Irresponsible communication. Failing to responsibly present content which includes, links or describes any other restricted behaviors.
39+
40+
Reporting an Issue
41+
42+
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
43+
44+
When an incident does occur, it is important to report it promptly. To report a possible violation, please email [us@floatpane.com](mailto:us@floatpane.com). All reports will be handled with discretion and confidentiality.
45+
46+
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
47+
Addressing and Repairing Harm
48+
49+
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
50+
51+
Warning
52+
Event: A violation involving a single incident or series of incidents.
53+
Consequence: A private, written warning from the Community Moderators.
54+
Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
55+
Temporarily Limited Activities
56+
Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
57+
Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
58+
Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
59+
Temporary Suspension
60+
Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
61+
Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
62+
Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
63+
Permanent Ban
64+
Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
65+
Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
66+
Repair: There is no possible repair in cases of this severity.
67+
68+
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
69+
Scope
70+
71+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
72+
Attribution
73+
74+
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at https://www.contributor-covenant.org/version/3/0/.
75+
76+
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/4.0/
77+
78+
For answers to common questions about Contributor Covenant, see the FAQ at https://www.contributor-covenant.org/faq. Translations are provided at https://www.contributor-covenant.org/translations. Additional enforcement and community guideline resources can be found at https://www.contributor-covenant.org/resources. The enforcement ladder was inspired by the work of Mozilla’s code of conduct team.

CONTRIBUTING.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Contributing to Lattice
2+
3+
Thank you for your interest in contributing to Lattice! This guide will help you get started.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- [Go 1.26+](https://go.dev/dl/)
10+
- A terminal emulator with modern capabilities (kitty, ghostty, alacritty, etc.)
11+
- An IMAP email account for testing
12+
13+
### Setup
14+
15+
```bash
16+
git clone https://github.com/floatpane/lattice.git
17+
cd matcha
18+
go mod tidy
19+
```
20+
21+
### Build & Run
22+
23+
```bash
24+
make build # builds to ./lattice
25+
make run # builds and runs in one step
26+
```
27+
28+
### Testing
29+
30+
```bash
31+
make test # run all tests
32+
make test-verbose # run tests with verbose output
33+
make test-coverage # run tests and generate a coverage report
34+
```
35+
36+
### Linting
37+
38+
```bash
39+
make lint # runs go fmt and go vet
40+
```
41+
42+
## Making Changes
43+
44+
### Branch Naming
45+
46+
Create a branch from `master` using one of these prefixes:
47+
48+
- `feature/` — new functionality
49+
- `fix/` — bug fixes
50+
- `docs/` — documentation changes
51+
- `refactor/` — code restructuring without behavior changes
52+
53+
### Commit Messages
54+
55+
We use [Conventional Commits](https://www.conventionalcommits.org/). Format your commit messages as:
56+
57+
```
58+
type(scope): short description
59+
```
60+
61+
Common types: `feat`, `fix`, `docs`, `test`, `ci`, `chore`.
62+
63+
Examples:
64+
```
65+
feat(compose): add CC/BCC field support
66+
fix(imap): handle connection timeout gracefully
67+
docs: update installation instructions
68+
```
69+
70+
### Before Submitting a PR
71+
72+
1. Run `make lint` and fix any issues.
73+
2. Run `make test` and make sure all tests pass.
74+
3. Keep your PR focused — one logical change per PR.
75+
4. Write a clear PR description explaining **what** changed and **why**.
76+
77+
## Reporting Bugs
78+
79+
Open an issue using the [bug report template](https://github.com/floatpane/lattice/issues/new?template=bug_report.md). Include:
80+
81+
- Steps to reproduce the issue
82+
- Expected vs. actual behavior
83+
- Your OS, terminal emulator, and Lattice version
84+
85+
## Requesting Features
86+
87+
Open an issue using the [feature request template](https://github.com/floatpane/lattice/issues/new?template=feature_request.md) with a clear description of the problem you're trying to solve and your proposed solution.
88+
89+
## AI Policy
90+
91+
We welcome contributions that use AI-assisted tools (Copilot, Claude, ChatGPT, etc.) as part of the development process. That said, contributors are fully responsible for any code they submit, regardless of how it was written.
92+
93+
**What we expect:**
94+
95+
- **Understand what you submit.** You should be able to explain every line of your PR. If you can't explain it, don't submit it.
96+
- **Review AI output carefully.** AI tools can produce plausible-looking code that is subtly wrong, insecure, or doesn't match the project's patterns. Treat AI suggestions the same way you'd treat a Stack Overflow snippet — verify before committing.
97+
- **Don't submit AI-generated issues, reviews, or comments.** Discussions should be genuine human communication. Using AI to help draft something is fine, but don't paste raw AI output into issues or review comments.
98+
- **No AI-generated tests that don't actually test anything.** Tests must be meaningful and actually validate behavior, not just exist for coverage numbers.
99+
- **Attribute when appropriate.** If a significant portion of your contribution was AI-assisted, a brief mention in your PR description is appreciated but not required.
100+
101+
**What we won't accept:**
102+
103+
- Bulk PRs of AI-generated refactors, documentation, or "improvements" that weren't requested.
104+
- Code that introduces hallucinated dependencies, APIs, or patterns that don't exist in the project.
105+
- Contributions where the author clearly doesn't understand the changes they're proposing.
106+
107+
The goal is simple: AI is a tool. Use it well, take ownership of the output, and make sure your contribution actually improves the project.
108+
109+
## Code of Conduct
110+
111+
This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold a welcoming and respectful environment for everyone.

Makefile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.PHONY: build test run clean lint fmt vet build-full generate_screenshots
2+
3+
BINARY_NAME=lattice
4+
5+
build:
6+
go build -o $(BINARY_NAME) .
7+
8+
build-full:
9+
@echo "Building with version information..."
10+
@VERSION=$$(git describe --tags --abbrev=0 2>/dev/null || echo "dev"); \
11+
COMMIT=$$(git rev-parse --short HEAD 2>/dev/null || echo "unknown"); \
12+
DATE=$$(date +%Y-%m-%d); \
13+
echo "Version: $$VERSION"; \
14+
echo "Commit: $$COMMIT"; \
15+
echo "Date: $$DATE"; \
16+
go build -ldflags="-X 'main.version=$$VERSION' -X 'main.commit=$$COMMIT' -X 'main.date=$$DATE'" -o $(BINARY_NAME)-full .;
17+
18+
run:
19+
go run .
20+
21+
test:
22+
go test ./...
23+
24+
test-verbose:
25+
go test -v ./...
26+
27+
test-coverage:
28+
go test -coverprofile=coverage.out ./...
29+
go tool cover -html=coverage.out -o coverage.html
30+
31+
clean:
32+
rm -rf $(BUILD_DIR)
33+
rm -f coverage.out coverage.html
34+
35+
fmt:
36+
go fmt ./...
37+
38+
vet:
39+
go vet ./...
40+
41+
lint: fmt vet
42+
43+
all: lint test build

SECURITY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Only the latest release of Lattice is supported with security updates.
6+
7+
## Reporting a Vulnerability
8+
9+
If you discover a security vulnerability in Matcha, please report it responsibly. **Do not open a public issue.**
10+
11+
Email us at [us@floatpane.com](mailto:us@floatpane.com) with:
12+
13+
- A description of the vulnerability
14+
- Steps to reproduce the issue
15+
- The potential impact
16+
- Any suggested fixes (optional)
17+
18+
We will acknowledge your report within 48 hours and aim to provide a fix or mitigation plan within 7 days, depending on severity.
19+
20+
## Scope
21+
22+
This policy covers the Matcha codebase and its official releases. Third-party dependencies are outside our direct control, but we will work to address reported issues in dependencies as quickly as possible.
23+
24+
## Disclosure
25+
26+
We ask that you give us reasonable time to address the issue before disclosing it publicly. We are committed to crediting reporters in release notes (unless you prefer to remain anonymous).

0 commit comments

Comments
 (0)