Repository navigation
21 Contributing
croft is an open-source per-project dev-loop tool. Contributions — features, fixes, docs, examples — are welcome. This page captures the non-negotiables.
After every code change, run the full verification ladder before committing:
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceIf any step fails, fix the cause — don't suppress warnings, don't
#[allow] clippy lints without a written justification in the
commit body, and don't --no-verify past pre-commit hooks.
For UI / TUI changes specifically: also run a manual smoke test
(cargo run -- ui against the example project under examples/)
before reporting the change as complete.
All commits follow Conventional Commits:
<type>(<scope>): <subject>
<optional body explaining the why>
<optional footers, e.g. BREAKING CHANGE:>
Types used in this repo: feat, fix, refactor, docs,
test, chore, build, ci, perf.
Scopes match crate or area: config, runtime, container,
tui, hooks, agents, cache, cli, workspace, docs.
Subject: imperative, lowercase, no trailing period. Under 70 characters.
Body: explain why, not what. The diff already shows the what.
Examples:
feat(config): support env var expansion in run stringsfix(runtime): propagate non-zero exit codes from compose execrefactor(container): extract Backend trait from compose implperf(runtime): stream stdout instead of buffering before printingdocs: clarify when to use scripts vs recipes
Breaking changes: add BREAKING CHANGE: <description> as a
footer, and add ! after type/scope:
feat(config)!: rename run_args to forward_args.
See Architecture for the operating principles (SOLID, DDD, performance is a default, one source of truth per concern, no dead config). Every code change is judged against those.
Examples live under
examples/.
Each example is a runnable croft project plus a short README that
calls out which features it demonstrates.
-
mkdir examples/<name>and add acroft.tomlplus any supporting files (.pre-commit-config.yaml,.croft/install/*, etc.). - Add a
README.mdlinking back to the relevant wiki page(s) and explaining what the example shows. - Update
docs/18-Examples.mdwith a one-paragraph summary and links. - Open the PR with a
docs(examples): add <name> examplecommit.
Sketch:
- Design. Open a discussion or draft PR with the schema change + the user-facing behaviour.
- Implement. Land the feature behind well-bounded crate surfaces. Cross-crate types travel as value objects.
-
Document. Add or update the relevant
docs/wiki page. The wiki is auto-synced fromdocs/on push tomain. -
Test. At least one integration test against a real fixture
under
examples/or atempfile::TempDir.
- Branch off
main(git switch -c feat/whatever). - One concern per PR. Long-running features can land in stages behind a flag, but each merge should leave the tree in a working state.
- The PR description should explain why — what problem the change solves and which design alternatives you considered.
- The verification ladder must be green before you mark the PR ready for review.
- Architecture — crate layout + design principles.
- Examples — existing examples to model from.
croft is dual-licensed under MIT or Apache 2.0. Source: github.com/nsrosenqvist/croft. Back to Home.