Skip to content

Latest commit

 

History

History
139 lines (97 loc) · 2.75 KB

File metadata and controls

139 lines (97 loc) · 2.75 KB

Contributing to quincode

Thanks for contributing.

quincode is a Rust terminal coding agent (TUI + CLI). This guide covers the expected workflow for code, docs, and issue tracking.

Prerequisites

  • Rust stable toolchain
  • Git
  • bd (beads) for issue tracking
  • pre-commit
  • gitleaks
  • trivy

Getting Started

  1. Clone the repo.
  2. Build and run tests:
cargo build
cargo test
  1. Run the app:
# Interactive mode
cargo run

# One-shot mode
cargo run -- run "inspect this repository"

# Config diagnostics
cargo run -- config doctor

Project Structure

  • src/main.rs: CLI entrypoint and command dispatch
  • src/cli.rs: Clap command definitions
  • src/config.rs: Config schema and merge logic
  • src/agent.rs: Agent loop and tool orchestration
  • src/llm/mod.rs: OpenAI/Anthropic compatibility adapters
  • src/tools/shell.rs: Shell tool execution
  • src/ui/*: TUI state, rendering, formatting

Issue Workflow (beads)

Use bd for all planned work:

bd ready
bd show <id>
bd update <id> --status in_progress
bd close <id>
bd sync

If follow-up work remains, create/adjust issues before ending your session.

Development Standards

  • Keep changes focused and testable.
  • Prefer small commits with clear intent.
  • Run formatting and tests before opening a PR:
cargo fmt
cargo test
  • If behavior changes, update docs in the same PR (README.md, AGENTS.md, this file, or SECURITY.md when relevant).

Pre-commit Hooks

Install and enable hooks:

pre-commit install
pre-commit install --hook-type pre-push

Run all hooks manually:

pre-commit run --all-files

Security Scanning

  • CI runs gitleaks and trivy on pushes and pull requests.
  • Before opening a PR, run local scans:
gitleaks git --no-banner
trivy fs --scanners vuln,misconfig,secret --severity HIGH,CRITICAL --exit-code 1 --no-progress .

Commit Guidelines

Use Conventional Commits where possible:

  • feat: add slash command support
  • fix: harden terminal resize behavior
  • docs: update config examples
  • chore: maintain tooling config

Pull Requests

Include:

  • What changed and why
  • Related issue IDs (bd or GitHub issues)
  • Any behavior changes users should know
  • Test/verification summary (commands run and outcomes)

AI-Assisted Contributions

AI-assisted changes are welcome. Before submitting:

  • Validate generated code and imports
  • Remove placeholders/TODO noise unless intentionally tracked
  • Ensure command/documentation accuracy against current source
  • Re-run cargo test

End-of-Session Expectations

When wrapping up implementation work:

git pull --rebase
bd sync
git push
git status

Work is only complete once changes are pushed and the branch is up to date with origin.