Skip to content

docs: improve goose2 AGENTS.md - #9028

Merged
alexhancock merged 3 commits into
mainfrom
alexhancock/fix-goose2-agents-md
May 5, 2026
Merged

alexhancock merged 3 commits into
mainfrom
alexhancock/fix-goose2-agents-md

Conversation

@alexhancock

Copy link
Copy Markdown
Collaborator

Summary

Fixing a couple issues in the AGENTS.md I set up two weeks ago for goose2

  1. There was already an Architecture & File Structure section that was likely stomping on the further down Architecture system from being respected
  2. We never said anything to the agent about not just building things entirely in the frontend TS, which we don't generally want because then it's hard for any other client to leverage them

Testing

"what are the architectural issues in the implementation here?"

Related Issues

N/A

Screenshots/Demos (for UX changes)

N/A

@baxen baxen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread ui/goose2/AGENTS.md Outdated

- 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.).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread ui/goose2/AGENTS.md Outdated
- 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`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread ui/goose2/AGENTS.md Outdated
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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should go. it is not the single source of truth, it is a shadow set of types

Comment thread ui/goose2/AGENTS.md
- 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/`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Comment thread ui/goose2/AGENTS.md

### The frontend → ACP → goose core path

**All frontend ↔ backend communication in goose2 flows through a single path:**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add something like YOU MUST TREAT THE CLIENT as a THIN CLIENT

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/goose2/AGENTS.md Outdated

- 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`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/goose2/AGENTS.md
### 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@alexhancock
alexhancock added this pull request to the merge queue May 5, 2026
Merged via the queue into main with commit 8e69e63 May 5, 2026
25 checks passed
@alexhancock
alexhancock deleted the alexhancock/fix-goose2-agents-md branch May 5, 2026 19:31
lifeizhou-ap added a commit that referenced this pull request May 6, 2026
* 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)
shafqatevo pushed a commit to shafqatevo/goose that referenced this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants