docs: improve goose2 AGENTS.md - #9028
Conversation
|
|
||
| - Stand up a feature whose business logic lives in a Zustand store, a React hook, or a `features/<feature>/api/` adapter that calls `localStorage`, `fetch`, or filesystem APIs directly. | ||
| - Reach for `invoke()` to add a new Tauri command that proxies into `goose` — add an ACP custom method instead. | ||
| - Persist domain state to `localStorage` when goose core already has (or should have) a config/state surface for it. `localStorage` is for **frontend-only** UI state (theme mode, sidebar collapse, last-viewed tab, etc.). |
There was a problem hiding this comment.
I would go further - do not use localStorage. we should really have a client side settings module that re-uses the existing settings from goose 1.0 as much as possible
| - Stand up a feature whose business logic lives in a Zustand store, a React hook, or a `features/<feature>/api/` adapter that calls `localStorage`, `fetch`, or filesystem APIs directly. | ||
| - Reach for `invoke()` to add a new Tauri command that proxies into `goose` — add an ACP custom method instead. | ||
| - Persist domain state to `localStorage` when goose core already has (or should have) a config/state surface for it. `localStorage` is for **frontend-only** UI state (theme mode, sidebar collapse, last-viewed tab, etc.). | ||
| - Duplicate types between TS and Rust by hand — let the SDK generation produce them from `crates/goose-sdk/src/custom_requests.rs`. |
There was a problem hiding this comment.
add to really really use those types and not create shadow types of those if that seems convenient. Agents love to do that, oh I need an isSaved field, I'll just add it
| api/ — Thin wrappers around GooseClient SDK calls (the ONLY place ACP is touched) | ||
| types.ts — Feature-specific type definitions (when needed) | ||
| shared/ | ||
| types/ — Canonical shared type definitions (single source of truth) |
There was a problem hiding this comment.
this should go. it is not the single source of truth, it is a shadow set of types
| - Shared types live in `src/shared/types/` — this is the single source of truth for cross-feature types. | ||
| - There should be NO root-level `src/stores/` or `src/types/` directories. | ||
| - Feature stores use feature-relative imports (e.g., `../stores/featureStore`). | ||
| - Cross-feature imports use `@/features/*/stores/` or `@/shared/types/`. |
|
|
||
| ### The frontend → ACP → goose core path | ||
|
|
||
| **All frontend ↔ backend communication in goose2 flows through a single path:** |
There was a problem hiding this comment.
add something like YOU MUST TREAT THE CLIENT as a THIN CLIENT
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8d17d2153
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| - Stand up a feature whose business logic lives in a Zustand store, a React hook, or a `features/<feature>/api/` adapter that calls `localStorage`, `fetch`, or filesystem APIs directly. | ||
| - Reach for `invoke()` to add a new Tauri command that proxies into `goose` — add an ACP custom method instead. | ||
| - Do not use `localStorage` |
There was a problem hiding this comment.
Remove blanket ban on localStorage usage
This newly added rule conflicts with the same document’s existing theming contract (ThemeProvider persists mode/accent/density in localStorage), so it creates contradictory guidance for contributors and agents. In practice, anyone implementing UI-only preferences could follow this line and move purely client-side state into ACP/core unnecessarily, while others will follow the theming section and do the opposite. Please scope this rule to business/data logic (e.g., provider/session/secrets) rather than banning localStorage outright.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fa7bf94aa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ### Feature Organization | ||
|
|
||
| Not every feature needs every subdirectory. Use only what the feature requires: | ||
| Not every feature needs every subdirectory. Use only what the feature requires. Note that anything beyond `ui/` only — i.e. anything with state or backend calls — should already have a corresponding ACP method on the goose side. |
There was a problem hiding this comment.
Limit ACP requirement to backend-facing state
The new rule in this line says any feature with "state" should already have a corresponding ACP method, but the same section still classifies tabs as frontend-only UI state with no backend. That contradiction makes the guidance ambiguous and can cause contributors/agents to add unnecessary ACP endpoints for purely local presentation state; please scope this rule to backend/data state (persistence, providers, sessions, filesystem, external network) and explicitly exempt local UI state.
Useful? React with 👍 / 👎.
* main: feat: move goose2 provider catalog behind ACP layer (#9030) fix: use python3 in developer extension instructions for macOS/Linux compatibility (#8784) fix(acp): synchronously reap ACP child to avoid SIGCHLD race (#9023) fix goose2 small-window chat and settings layouts (#9019) docs: improve goose2 AGENTS.md (#9028) agents: add CLAUDE.mds to mirror AGENTS.mds (#9029) remove skill categories (#9008) fix: 8531 - elicitation fixes (#8999) feat(chat): group consecutive tool calls into one summarized chain card (#8995) fix(ci): mark openai/gpt-5 smoke test as flaky (#9027) goose2 distribution bundling (#8911) Add "Trimmed trailing whitespace" message to moim whitelist (#8847)
Summary
Fixing a couple issues in the AGENTS.md I set up two weeks ago for goose2
Testing
"what are the architectural issues in the implementation here?"
Related Issues
N/A
Screenshots/Demos (for UX changes)
N/A