# Contributing to AgentGit

Thanks for considering it. This is a pre-alpha project — expect rough edges,
and expect scope questions to matter more than usual (see `MAP.md` and
`docs/en/architecture.md` before proposing anything that grows the core).

## Before you start

1. Read `MAP.md` to find the right file.
2. Read `docs/en/architecture.md`, specifically the "MVP boundary" section —
   if your idea is in the "explicitly out of scope for v1" list, open an
   issue to discuss it before writing code.
3. Check `docs/en/comparison.md` — if what you want already exists well in
   another tool, we'd rather link to it than duplicate it.

## Workflow

1. Fork, create a branch (`git checkout -b your-change`).
2. Make your change.
3. Run the validation gate locally: `bash scripts/validate.sh --self-check`
   for core changes, or `npm test`.
4. Update `CHANGELOG.md` under `[Unreleased]`.
5. If your change is user-facing, update both the English doc and its
   French counterpart in the same PR (or flag in the PR description that the
   French translation is still needed — don't let them silently drift).
6. Open a PR using the template — fill in every checkbox honestly.

## Coding conventions

- Shell scripts (`scripts/*.sh`): `set -euo pipefail`, no unhandled failure
  paths. If a script can fail, it should fail loudly and with a clear log
  line prefixed `[agentgit:<script-name>]`.
- CLI (`bin/agentgit.js`): no logic that can't also be done by hand-editing
  `.agentgit/` files. The CLI is a convenience, never a requirement — see
  `docs/en/protocol.md`.
- Schemas (`schema/*.schema.json`): additive changes are fine; anything
  that breaks an existing valid file needs a version bump discussion first.

## Reporting bugs / proposing features

Use the issue templates under `.github/ISSUE_TEMPLATE/`. For features, the
template explicitly asks whether it belongs in the protocol or in an
application built on top — answering that honestly saves everyone time.

## Code of Conduct

This project follows the `CODE_OF_CONDUCT.md`.
