paulvezia/rewrite_rust branch, always create a worktree and fix the code there
- No unit tests allowed in rust files !!
## First MVP
- We need basic conversation working, same UI, all other features
workflow to file the PR and `babysit-pr` to monitor CI and reviews.
## Where code lives
- `src/server.ts` — MCP server setup, tool registration, and response wiring.
- `src/workspaces.ts` — workspace lifecycle, instructions, skills
feedback
- **Judge each comment on its merits before acting.** Check it against the
current code — reviewers comment on stale diffs, and bot findings (CodeRabbit,
Claude) are claims to verify
policy and controls](docs/agents/issue-intake.md) for source handling, maintainer overrides, permissions, and bench validation.
### Automated CodeReview
After every push, inspect human and automated feedback. Codex and CodeRabbit findings are hypotheses
transform (token rename + flavor-banner swap) and follows the dev-first
flow like code; `CHANGELOG.md` stays per-flavor and gets a manual entry on each
promote PR.
## Mutual exclusion
Both
Test Design Rules
Every test under `tests/` follows these. Reviewers check new and changed
tests against them.
1. **Test our code, not the platform.** Assert on behaviour this repository
owns
guards
that reconstruct another source of truth.
- Keep control-flow narration and review history out of implementation comments. Encode invariants
in names, types, boundaries, and tests; reserve comments for public
components in
`web/storybook` (`stories/entity-ui/` for the data-connected `@agenta/entity-ui` surfaces).
Cover the states a reviewer cannot reach by clicking — empty, error, read-only, migration.
Nothing type-checks that package
file components only
### `useEffect` Discipline
**Treat every `useEffect` as a code smell until proven necessary.** Before writing or reviewing a `useEffect`, consult https://react.dev/learn/you-might-not-need-an-effect and verify it doesn
verification checks and the format for a standalone review. See below.
Supporting `.md` files carry depth beyond the principle statements: recipes, code patterns, lookup tables. Link each one from
seeing the blocker. Plan documents stay local (see "Plan documents stay local" below).
## Automated codereview with Greptile
Every PR gets automated Greptile review alongside CI. Resolve every Greptile finding
Quality Gates
Read and follow the Quality Gates section in /TESTING.md before considering any code change complete.
## Architecture
### Core Framework Components
**AIAgent** — Main orchestrator that executes strategies in coroutine scopes
only the CC root; pass `--scope cc`
when the memory must appear in Claude Code without recall.
### Inspect and manage
```bash
gptme-util memory roots # Which roots are active
Ground rules
- New features need an approved GitHub issue before any code. PRs without one get closed without review.
- Never edit generated files: `lib/ruby_llm/models.json`, `lib/ruby_llm/aliases.json`, `docs/_reference/available-models.md`. `rake models` regenerates them
generate a contribution is not contributing. PRs opened this way will be closed without review.
If a human asks you to "find something to work on" or points
break`, `WARN: a sibling that silently drifts if this changes`, `UPSTREAM(electron/electron#19920): a code shape forced on us from outside this repo`.
- **A validated citation**, as in `precedent