mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
### 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 -->
5.2 KiB
5.2 KiB
AutoGPT Platform
This file provides guidance to coding agents when working with code in this repository.
Repository Overview
AutoGPT Platform is a monorepo containing:
- Backend (
backend): Python FastAPI server with async support - Frontend (
frontend): Next.js React application - Shared Libraries (
autogpt_libs): Common Python utilities
Component Documentation
- Backend: See @backend/AGENTS.md for backend-specific commands, architecture, and development tasks
- Frontend: See @frontend/AGENTS.md for frontend-specific commands, architecture, and development patterns
Key Concepts
- Agent Graphs: Workflow definitions stored as JSON, executed by the backend
- Blocks: Reusable components in
backend/backend/blocks/that perform specific tasks - Integrations: OAuth and API connections stored per user
- Store: Marketplace for sharing agent templates
- Virus Scanning: ClamAV integration for file upload security
Environment Configuration
Configuration Files
- Backend:
backend/.env.default(defaults) →backend/.env(user overrides) - Frontend:
frontend/.env.default(defaults) →frontend/.env(user overrides) - Platform:
.env.default(Supabase/shared defaults) →.env(user overrides)
Docker Environment Loading Order
.env.defaultfiles provide base configuration (tracked in git).envfiles provide user-specific overrides (gitignored)- Docker Compose
environment:sections provide service-specific overrides - Shell environment variables have highest precedence
Key Points
- All services use hardcoded defaults in docker-compose files (no
${VARIABLE}substitutions) - The
env_filedirective loads variables INTO containers at runtime - Backend/Frontend services use YAML anchors for consistent configuration
- Supabase services (
db/docker/docker-compose.yml) follow the same pattern
Branching Strategy
devis the main development branch. All PRs should targetdev.masteris the production branch. Only used for production releases.
Creating Pull Requests
- Create the PR against the
devbranch of the repository. - Split PRs by concern — each PR should have a single clear purpose. For example, "usage tracking" and "credit charging" should be separate PRs even if related. Combining multiple concerns makes it harder for reviewers to understand what belongs to what.
- Ensure the branch name is descriptive (e.g.,
feature/add-new-block) - Use conventional commit messages (see below)
- Structure the PR description with Why / What / How — Why: the motivation (what problem it solves, what's broken/missing without it); What: high-level summary of changes; How: approach, key implementation details, or architecture decisions. Reviewers need all three to judge whether the approach fits the problem.
- Fill out the .github/PULL_REQUEST_TEMPLATE.md template as the PR description
- Always use
--body-fileto pass PR body — avoids shell interpretation of backticks and special characters:PR_BODY=$(mktemp) cat > "$PR_BODY" << 'PREOF' ## Summary - use `backticks` freely here PREOF gh pr create --title "..." --body-file "$PR_BODY" --base dev rm "$PR_BODY" - Run the github pre-commit hooks to ensure code quality.
Test-Driven Development (TDD)
When fixing a bug or adding a feature, follow a test-first approach:
- Write a failing test first — create a test that reproduces the bug or validates the new behavior, marked with
@pytest.mark.xfail(backend) or.fixme(Playwright). Run it to confirm it fails for the right reason. - Implement the fix/feature — write the minimal code to make the test pass.
- Remove the xfail marker — once the test passes, remove the
xfail/.fixmeannotation and run the full test suite to confirm nothing else broke.
This ensures every change is covered by a test and that the test actually validates the intended behavior.
Reviewing/Revising Pull Requests
Use /pr-review to review a PR or /pr-address to address comments.
When fetching comments manually:
gh api repos/Significant-Gravitas/AutoGPT/pulls/{N}/reviews --paginate— top-level reviewsgh api repos/Significant-Gravitas/AutoGPT/pulls/{N}/comments --paginate— inline review comments (always paginate to avoid missing comments beyond page 1)gh api repos/Significant-Gravitas/AutoGPT/issues/{N}/comments— PR conversation comments
Conventional Commits
Use this format for commit messages and Pull Request titles:
Conventional Commit Types:
feat: Introduces a new feature to the codebasefix: Patches a bug in the codebaserefactor: Code change that neither fixes a bug nor adds a feature; also applies to removing featuresci: Changes to CI configurationdocs: Documentation-only changesdx: Improvements to the developer experience
Recommended Base Scopes:
platform: Changes affecting both frontend and backendfrontendbackendinfrablocks: Modifications/additions of individual blocks
Subscope Examples:
backend/executorbackend/dbfrontend/builder(includes changes to the block UI component)infra/prod
Use these scopes and subscopes for clarity and consistency in commit messages.