Files
AutoGPT/AGENTS.md
Nicholas Tindle 88589764b5 dx(platform): normalize agent instructions for Claude and Codex (#12592)
### Why / What / How

Why: repo guidance was split between Claude-specific `CLAUDE.md` files
and Codex-specific `AGENTS.md` files, which duplicated instruction
content and made the same repository behave differently across agents.
The repo also had Claude skills under `.claude/skills` but no
Codex-visible repo skill path.

What: this PR bridges the repo's Claude skills into Codex and normalizes
shared instruction files so `AGENTS.md` becomes the canonical source
while each `CLAUDE.md` imports its sibling `AGENTS.md`.

How: add a repo-local `.agents/skills` symlink pointing to
`../.claude/skills`; move nested `CLAUDE.md` content into sibling
`AGENTS.md` files; replace each repo `CLAUDE.md` with a one-line
`@AGENTS.md` shim so Claude and Codex read the same scoped guidance
without duplicating text. The root `CLAUDE.md` now imports the root
`AGENTS.md` rather than symlinking to it.

Note: the instruction-file normalization commit was created with
`--no-verify` because the repo's frontend pre-commit `tsc` hook
currently fails on unrelated existing errors, largely missing
`autogpt_platform/frontend/src/app/api/__generated__/*` modules.

### Changes 🏗️

- Add `.agents/skills` as a repo-local symlink to `../.claude/skills` so
Codex discovers the existing Claude repo skills.
- Add a real root `CLAUDE.md` shim that imports the canonical root
`AGENTS.md`.
- Promote nested scoped instruction content into sibling `AGENTS.md`
files under `autogpt_platform/`, `autogpt_platform/backend/`,
`autogpt_platform/frontend/`, `autogpt_platform/frontend/src/tests/`,
and `docs/`.
- Replace the corresponding nested `CLAUDE.md` files with one-line
`@AGENTS.md` shims.
- Preserve the existing scoped instruction hierarchy while making the
shared content cross-compatible between Claude and Codex.

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] Verified `.agents/skills` resolves to `../.claude/skills`
  - [x] Verified each repo `CLAUDE.md` now contains only `@AGENTS.md`
- [x] Verified the expected `AGENTS.md` files exist at the root and
nested scoped directories
- [x] Verified the branch contains only the intended agent-guidance
commits relative to `dev` and the working tree is clean

#### For configuration changes:

- [x] `.env.default` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)

No runtime configuration changes are included in this PR.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: documentation/instruction-file reshuffle plus an
`.agents/skills` pointer; no runtime code paths are modified.
> 
> **Overview**
> Unifies agent guidance so **`AGENTS.md` becomes canonical** and all
corresponding `CLAUDE.md` files become 1-line shims (`@AGENTS.md`) at
the repo root, `autogpt_platform/`, backend, frontend, frontend tests,
and `docs/`.
> 
> Adds `.agents/skills` pointing to `../.claude/skills` so non-Claude
agents discover the same shared skills/instructions, eliminating
duplicated/agent-specific guidance content.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
839483c3b6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-04-01 09:08:51 +00:00

3.5 KiB
Raw Blame History

AutoGPT Platform Contribution Guide

This guide provides context for coding agents when updating the autogpt_platform folder.

Directory overview

  • autogpt_platform/backend FastAPI based backend service.
  • autogpt_platform/autogpt_libs Shared Python libraries.
  • autogpt_platform/frontend Next.js + Typescript frontend.
  • autogpt_platform/docker-compose.yml development stack.

See docs/content/platform/getting-started.md for setup instructions.

Code style

  • Format Python code with poetry run format.
  • Format frontend code using pnpm format.

Frontend guidelines:

See /frontend/CONTRIBUTING.md for complete patterns. Quick reference:

  1. Pages: Create in src/app/(platform)/feature-name/page.tsx
    • Add usePageName.ts hook for logic
    • Put sub-components in local components/ folder
  2. Components: Structure as ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts
    • Use design system components from src/components/ (atoms, molecules, organisms)
    • Never use src/components/__legacy__/*
  3. Data fetching: Use generated API hooks from @/app/api/__generated__/endpoints/
    • Regenerate with pnpm generate:api
    • Pattern: use{Method}{Version}{OperationName}
  4. Styling: Tailwind CSS only, use design tokens, Phosphor Icons only
  5. Testing: Add Storybook stories for new components, Playwright for E2E
  6. Code conventions: Function declarations (not arrow functions) for components/handlers
  • Component props should be interface Props { ... } (not exported) unless the interface needs to be used outside the component
  • Separate render logic from business logic (component.tsx + useComponent.ts + helpers.ts)
  • Colocate state when possible and avoid creating large components, use sub-components ( local /components folder next to the parent component ) when sensible
  • Avoid large hooks, abstract logic into helpers.ts files when sensible
  • Use function declarations for components, arrow functions only for callbacks
  • No barrel files or index.ts re-exports
  • Avoid comments at all times unless the code is very complex
  • Do not use useCallback or useMemo unless asked to optimise a given function
  • Do not type hook returns, let Typescript infer as much as possible
  • Never type with any, if not types available use unknown

Testing

  • Backend: poetry run test (runs pytest with a docker based postgres + prisma).
  • Frontend: pnpm test or pnpm test-ui for Playwright tests. See docs/content/platform/contributing/tests.md for tips.

Always run the relevant linters and tests before committing. Use conventional commit messages for all commits (e.g. feat(backend): add API). Types: - feat - fix - refactor - ci - dx (developer experience) Scopes: - platform - platform/library - platform/marketplace - backend - backend/executor - frontend - frontend/library - frontend/marketplace - blocks

Pull requests

  • Use the template in .github/PULL_REQUEST_TEMPLATE.md.
  • Rely on the pre-commit checks for linting and formatting
  • Fill out the Changes section and the checklist.
  • Use conventional commit titles with a scope (e.g. feat(frontend): add feature).
  • Keep out-of-scope changes under 20% of the PR.
  • Ensure PR descriptions are complete.
  • For changes touching data/*.py, validate user ID checks or explain why not needed.
  • If adding protected frontend routes, update frontend/lib/supabase/middleware.ts.
  • Use the linear ticket branch structure if given codex/open-1668-resume-dropped-runs