We welcome contributions to SalmonLoop! As a design-driven project, we prioritize stability, determinism, and clear engineering contracts.
- Safety First: Any change that affects the execution loop must maintain or enhance safety guarantees (e.g., no unintended file mutations).
- Deterministic Logic: Avoid heuristic "guessing" or AI-driven decision making for core execution logic. Prefer rule-based engineering.
- Documentation SSOT: English documentation is the Single Source of Truth (SSOT). Chinese documentation is a user guide and may lag behind.
- Test-Driven: New features or bug fixes should be accompanied by unit tests.
src/core: The execution kernel. Must remain editor-agnostic and self-contained.src/locales: Internationalization strings. No hardcoded user-facing text in core logic.tests/unit: Bun unit tests. These are mocked to ensure they are fast, deterministic, and don't require a real Git environment or Ripgrep.
- Fork the repository.
- Install dependencies:
bun install. - Run tests:
bun run test:full(correctness suite: unit + integration). - Run linting:
bun run lint. - Create a feature branch and submit a pull request.
Notes:
- Use
bunfor dependency management in this repository. - Enable shared hooks once per clone:
bun run setup:hooks(this enforces bothcheck:target-runtime-boundary:stagedandcheck:bun-purity:stagedbefore commit). - Before opening a PR, run
bun run verifyto execute Bun purity, target-runtime boundary, lint, typecheck, contract smoke, and correctness tests. - When changing performance-sensitive code, also run
bun run test:all(orbun run test:perf:allfor perf-only validation). - When changing A2A transport/network behavior, also run
bun run test:integration:network.
To debug issues, you can use the --verbose flag to get more detailed logs.
Use --verbose for basic execution steps, or --verbose=extended for detailed internal states and debug information.
Example:
salmon-loop --verbose=extended --instruction "Fix bug" --verify "bun run test"