Skip to content

Commit 6cc44a9

Browse files
author
Ross Armstrong
committed
Phase 7: governance files and documentation
1 parent 8f03873 commit 6cc44a9

10 files changed

Lines changed: 962 additions & 0 deletions

File tree

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Bug report
2+
description: Report a bug in decibri-cli
3+
title: "[bug]: "
4+
labels:
5+
- bug
6+
- needs-triage
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to file a bug report. Please fill out the fields below so we can reproduce and fix the issue quickly.
12+
13+
**Security vulnerabilities**: do NOT file them here. Use the private advisory flow at <https://github.com/decibri/decibri-cli/security/advisories/new>.
14+
15+
- type: input
16+
id: version
17+
attributes:
18+
label: decibri-cli version
19+
description: Paste the output of `decibri version` (or `decibri version --json`).
20+
placeholder: decibri-cli 0.1.0 / decibri 3.0.0 / ...
21+
validations:
22+
required: true
23+
24+
- type: dropdown
25+
id: platform
26+
attributes:
27+
label: Operating system
28+
options:
29+
- Windows
30+
- macOS
31+
- Linux (please specify distro + version below)
32+
- Other (please specify below)
33+
validations:
34+
required: true
35+
36+
- type: input
37+
id: os-details
38+
attributes:
39+
label: OS details
40+
description: Distro/version, architecture (x86_64, aarch64, etc.)
41+
placeholder: Ubuntu 24.04 x86_64 / Windows 11 / macOS 14.5 Apple Silicon / ...
42+
validations:
43+
required: true
44+
45+
- type: dropdown
46+
id: install-method
47+
attributes:
48+
label: How did you install decibri-cli?
49+
options:
50+
- npm (`npm install -g decibri-cli`)
51+
- cargo (`cargo install decibri-cli`)
52+
- Direct download from GitHub Releases
53+
- Built from source
54+
- Other (please specify below)
55+
validations:
56+
required: true
57+
58+
- type: textarea
59+
id: reproduction
60+
attributes:
61+
label: Steps to reproduce
62+
description: Exact commands you ran, in order. Paste command lines, not screenshots.
63+
placeholder: |
64+
1. `decibri capture -o test.wav -d 5`
65+
2. Press Ctrl+C at ~2 seconds
66+
3. `decibri play test.wav`
67+
validations:
68+
required: true
69+
70+
- type: textarea
71+
id: expected
72+
attributes:
73+
label: Expected behaviour
74+
description: What did you expect to happen?
75+
validations:
76+
required: true
77+
78+
- type: textarea
79+
id: actual
80+
attributes:
81+
label: Actual behaviour
82+
description: What actually happened? Include stderr output and exit code if relevant.
83+
render: shell
84+
validations:
85+
required: true
86+
87+
- type: textarea
88+
id: additional
89+
attributes:
90+
label: Additional context
91+
description: Anything else that might help — device names, unusual audio setup, CI runner details, screenshots of GUI issues, etc.
92+
validations:
93+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions and discussion
4+
url: https://github.com/decibri/decibri-cli/discussions
5+
about: Use Discussions for questions, ideas, and general conversation.
6+
- name: Security reports
7+
url: https://github.com/decibri/decibri-cli/security/advisories/new
8+
about: Report security vulnerabilities privately via GitHub's advisory flow, NOT via public issues.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Feature request
2+
description: Suggest a new feature or enhancement
3+
title: "[feature]: "
4+
labels:
5+
- enhancement
6+
- needs-triage
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to suggest a feature. Before filing, please check the roadmap in [README.md](https://github.com/decibri/decibri-cli#roadmap) — some features are already planned for v0.2.0 or v0.3.0.
12+
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: What problem does this solve?
17+
description: Describe the use case. What are you trying to do that is currently hard or impossible?
18+
placeholder: |
19+
I'm building a CI pipeline that needs to [...] but decibri-cli currently [...]
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: solution
25+
attributes:
26+
label: Proposed solution
27+
description: If you have a specific design in mind, describe it. Otherwise leave blank.
28+
placeholder: |
29+
Add a `--foo` flag to `decibri capture` that [...]
30+
validations:
31+
required: false
32+
33+
- type: textarea
34+
id: alternatives
35+
attributes:
36+
label: Alternatives considered
37+
description: Other approaches you evaluated and why they did not fit.
38+
validations:
39+
required: false
40+
41+
- type: textarea
42+
id: scope
43+
attributes:
44+
label: Version scope
45+
description: Is this a small addition (v0.1.x patch), a new feature (v0.2.0+), or a breaking change (v1.0.0)? Best guess is fine.
46+
validations:
47+
required: false
48+
49+
- type: textarea
50+
id: additional
51+
attributes:
52+
label: Additional context
53+
description: Examples, related tools, prior art, anything else useful.
54+
validations:
55+
required: false

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
labels:
9+
- "dependencies"
10+
- "rust"
11+
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
open-pull-requests-limit: 5
17+
labels:
18+
- "dependencies"
19+
- "github-actions"
20+
21+
- package-ecosystem: "npm"
22+
directory: "/npm/decibri-cli"
23+
schedule:
24+
interval: "weekly"
25+
open-pull-requests-limit: 5
26+
labels:
27+
- "dependencies"
28+
- "npm"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ Thumbs.db
1515

1616
# Claude Code session state
1717
.claude/
18+
19+
# Local setup checklist (not published)
20+
.github/SETTINGS.md

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Changelog
2+
3+
All notable changes to decibri-cli will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - Unreleased
11+
12+
### Added
13+
14+
- `decibri version` subcommand with human-readable and JSON output modes. The `version --json` schema is locked at v0.1.0: `{decibri_cli, decibri, audio_backend, target, rust_version}`.
15+
- `decibri devices` subcommand listing audio input and output devices as a table or as JSON. Supports `--input`, `--output`, and `--json` flags.
16+
- `decibri capture` subcommand for WAV recording from a microphone.
17+
- Flags: `--output`, `--duration`, `--rate`, `--channels`, `--device`.
18+
- Device selection by case-insensitive name substring or numeric index.
19+
- Default configuration is 16000 Hz mono (voice/ASR preset); `--rate 44100 --channels 2` is the music preset.
20+
- Duration accepts bare seconds (`5`, `10.5`) or humantime strings (`10s`, `1m30s`).
21+
- Records until the specified duration or until Ctrl+C.
22+
- Ctrl+C produces a valid truncated WAV, not a corrupt file.
23+
- Watchdog protection: if the disk writer falls more than ~16 seconds behind, capture stops cleanly with exit 4 and the partial recording is preserved.
24+
- Clean device-unplug handling: loss mid-capture exits 4 with a partial WAV.
25+
- Output format is always 16-bit PCM WAV (universally compatible).
26+
- `decibri play` subcommand for WAV file playback.
27+
- Flags: `<FILE>` (positional), `--device`.
28+
- Supports 16-bit PCM int and 32-bit float WAV inputs.
29+
- Unsupported formats (24-bit, 8-bit, non-PCM codecs) exit 1 with a clear error.
30+
- Ctrl+C mid-playback exits 0 with `"interrupted": true` in JSON output.
31+
- Global flags `--json` and `--quiet` on all subcommands.
32+
- Hidden `decibri completions <shell>` plumbing via `clap_complete`. Shell completion generation ships publicly in v0.3.0; the subcommand is wired now so it is an additive change later.
33+
- Documented exit code table: 0 success, 1 generic error, 2 invalid arguments, 3 device not found, 4 IO error.
34+
- Cross-platform release pipeline building Windows x86_64, Linux x86_64, Linux aarch64, macOS x86_64, macOS aarch64, and a macOS universal2 binary.
35+
- npm distribution via `npm install -g decibri-cli`. The postinstall script downloads the platform binary from the matching GitHub Release, verifies its SHA256 against the release manifest, and places it on the user's PATH.
36+
- SLSA provenance attestations on every release binary via GitHub Actions.
37+
- `SHA256SUMS` manifest attached to every release for integrity verification.
38+
39+
[Unreleased]: https://github.com/decibri/decibri-cli/compare/v0.1.0...HEAD
40+
[0.1.0]: https://github.com/decibri/decibri-cli/releases/tag/v0.1.0

CONTRIBUTING.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Contributing to decibri-cli
2+
3+
Thanks for your interest in contributing. This guide covers what you need to know.
4+
5+
## Code of conduct
6+
7+
Be respectful. Disagree with ideas, not people. No harassment.
8+
9+
## How to report bugs
10+
11+
1. Check the [issue tracker](https://github.com/decibri/decibri-cli/issues) for duplicates.
12+
2. If the bug is new, open an issue using the Bug Report template.
13+
3. Include:
14+
- OS and architecture
15+
- `decibri version` output
16+
- Steps to reproduce
17+
- Expected vs. actual behaviour
18+
- Command output (stderr and stdout)
19+
20+
## How to request features
21+
22+
Open an issue using the Feature Request template. Explain:
23+
24+
- The problem you are trying to solve
25+
- Your proposed solution (if you have one)
26+
- Alternatives you considered
27+
28+
Scope-note: v0.1.x is focused on the core command surface. Features flagged for v0.2.0 (VAD, raw PCM piping, diagnostics) or v0.3.0 (Homebrew/Scoop, config files) already have homes on the roadmap — we'd still appreciate an issue describing your use case, but code contributions for those features should wait until the relevant version milestone is open.
29+
30+
## How to contribute code
31+
32+
1. Fork the repository
33+
2. Create a feature branch: `git checkout -b feature/your-feature`
34+
3. Make your changes
35+
4. Ensure all CI checks pass locally:
36+
```
37+
cargo fmt --all -- --check
38+
cargo clippy --all-targets -- -D warnings
39+
cargo test
40+
cargo deny check # if you have cargo-deny installed
41+
cargo audit # if you have cargo-audit installed
42+
```
43+
5. For npm wrapper changes, also run:
44+
```
45+
cd npm/decibri-cli
46+
node --test tests/platform.test.js tests/sha256sums.test.js tests/version.test.js
47+
```
48+
6. Commit with a clear message
49+
7. Push and open a Pull Request
50+
51+
### What we accept
52+
53+
- Bug fixes with tests demonstrating the fix
54+
- Platform compatibility improvements
55+
- Documentation improvements
56+
- Performance improvements with a measurement
57+
- Small refactors that reduce code without changing behaviour
58+
59+
### What we don't accept for v0.1.x
60+
61+
- Features explicitly deferred to v0.2.0 (VAD, raw PCM piping, `decibri test`)
62+
- New audio format support beyond WAV (deferred to v0.2.0+)
63+
- Breaking changes to the CLI contract (subcommand names, flag names, exit codes, `version --json` schema) until v1.0.0
64+
- Adding async runtimes (`tokio`, `async-std`) — the CLI is intentionally sync
65+
- Adding `env_logger` / `tracing` — stderr output is UI, not logs, in v0.1.x
66+
67+
## Development setup
68+
69+
### Requirements
70+
71+
- Rust stable toolchain. MSRV is recorded in `Cargo.toml` under `rust-version`.
72+
- Node.js 18 or newer (for running the npm wrapper tests)
73+
- On Linux, `libasound2-dev` for the cpal backend: `sudo apt-get install libasound2-dev`
74+
75+
### Building
76+
77+
```
78+
cargo build # debug build
79+
cargo build --release # optimised release build
80+
```
81+
82+
The release binary lands at `target/release/decibri` (or `decibri.exe` on Windows).
83+
84+
### Running locally
85+
86+
```
87+
./target/debug/decibri version
88+
./target/debug/decibri devices
89+
./target/debug/decibri capture -o test.wav -d 3
90+
./target/debug/decibri play test.wav
91+
```
92+
93+
### Testing
94+
95+
```
96+
cargo test # all Rust tests
97+
cd npm/decibri-cli && node --test tests/*.test.js # npm wrapper tests
98+
```
99+
100+
The Rust tests are hardware-independent and run in CI. Manual hardware tests (real microphone / speaker) are local-only because CI runners don't have audio devices.
101+
102+
### Snapshot tests
103+
104+
Some tests use [`insta`](https://insta.rs) for snapshot assertions. If you add a test or change snapshot-producing output, run:
105+
106+
```
107+
cargo insta review
108+
```
109+
110+
to approve changes after manual inspection. Do **not** blindly accept snapshots with `cargo insta accept` — review them first.
111+
112+
## Project structure
113+
114+
```
115+
decibri-cli/
116+
├── src/ Rust source
117+
│ ├── main.rs clap entry point + subcommand dispatch
118+
│ ├── exit.rs exit-code marker types
119+
│ ├── device_resolve.rs shared --device parsing + resolution
120+
│ └── commands/
121+
│ ├── version.rs
122+
│ ├── devices.rs
123+
│ ├── capture.rs
124+
│ └── play.rs
125+
├── tests/ integration tests (hardware-independent)
126+
├── npm/decibri-cli/ npm wrapper package
127+
├── .github/
128+
│ ├── workflows/ CI + release workflows
129+
│ ├── ISSUE_TEMPLATE/
130+
│ └── dependabot.yml
131+
├── Cargo.toml
132+
├── deny.toml cargo-deny config
133+
├── CHANGELOG.md
134+
└── README.md
135+
```
136+
137+
## License
138+
139+
By contributing, you agree that your contributions will be licensed under Apache-2.0.

0 commit comments

Comments
 (0)