Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 15 additions & 36 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ This file provides guidance for AI coding agents (Claude Code, Cursor, Codex, Am
- **Setup (core)**: `pnpm setup-dev` — core DBs (Doltgres, Postgres, SpiceDB), env config, migrations, admin user
- **Setup (optional services)**: `pnpm setup-dev:optional` — Nango + SigNoz + OTEL + Jaeger (run `setup-dev` first)
- **Optional services lifecycle**: `pnpm optional:stop` | `pnpm optional:status` | `pnpm optional:reset`
- **Lint**: `pnpm lint` (check) or `pnpm lint:fix` (auto-fix) or `pnpm check:fix` (Biome fix)
- **Format**: `pnpm format` (auto) or `pnpm format:check` (verify)
- **Typecheck**: `pnpm typecheck`

### Testing
- **Test (all)**: `pnpm test` or `turbo test`
- **Test (single file)**: `cd <package> && pnpm test --run <file-path>` (use `--run` to avoid watch mode)
- **Test (package)**: `cd <package> && pnpm test --run`
### Verification

**Pre-push** (run both, in order):
```bash
pnpm format # auto-fix formatting
pnpm check # lint + typecheck + test + format:check + env-descriptions + knip
```

**Single-command iteration:** `pnpm typecheck`, `pnpm lint` (`lint:fix`), `pnpm test`, `cd <pkg> && pnpm test --run <file>`

### Database Operations (run from monorepo root)
- **Generate migrations**: `pnpm db:generate` - Generate Drizzle migrations from schema changes
Expand Down Expand Up @@ -247,41 +249,18 @@ This product has **50+ customer-facing** and **100+ internal tooling/devops** su
- Follow the **write-docs** skill whenever creating or modifying documentation

**Before marking any feature complete, verify:**
- [ ] Tests written and passing (`pnpm test`)
- [ ] `pnpm check` passes
- [ ] UI components implemented in agents-manage-ui
- [ ] Documentation added to `/agents-docs/`
- [ ] All linting passes (`pnpm lint`)
- [ ] Code is formatted (`pnpm format` to auto-fix, `pnpm format:check` to verify)
- [ ] Surface area and breaking changes have been addressed as agreed with the user (see “Clarify scope and surface area before implementing”).

### 📋 Standard Development Workflow

**After completing a feature and ensuring all tests, typecheck, and build are passing:**

1. **Create a new branch** (if not already on one):
```bash
git checkout -b feature/your-feature-name
```

2. **Run verification commands** to ensure everything passes:
```bash
pnpm test
pnpm typecheck # or pnpm tsc --noEmit
pnpm build
pnpm lint
pnpm format # IMPORTANT: Always run formatter before committing
```

3. **Commit your changes** with a descriptive message

4. **Open a GitHub Pull Request** once all checks pass:
```bash
gh pr create --title "feat: Your feature description" --body "Description of changes"
```

This is the standard development procedure to ensure code review and CI/CD processes.

**Note**: The user may override this workflow if they prefer to work directly on main or have different branch strategies.
1. Create a branch: `git checkout -b feature/your-feature-name`
2. Run [Verification](#verification) before pushing
3. Commit, then `gh pr create`

The user may override this workflow (e.g., work directly on main).

### PR Review Agents

Expand Down
11 changes: 4 additions & 7 deletions agents-docs/content/community/contributing/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The pre-commit hook runs `pnpm lint-staged`, which:

#### Pre-push Hook

The pre-push hook runs `pnpm check:prepush` (lint, typecheck, and tests) for all packages except docs and cookbook templates.
The pre-push hook runs `pnpm format` to auto-format code before pushing.

##### Bypassing Checks

Expand All @@ -159,8 +159,7 @@ git commit --no-verify -m "emergency: hotfix for production"

### Local checks (CI parity)

- `pnpm check` runs lint, typecheck, and tests (the same set CI runs).
- CI also runs `pnpm format:check` and `pnpm knip`.
- `pnpm check` mirrors the full CI merge gate: lint, typecheck, tests, format verification, env-description validation, and dead code detection (knip).
- For package-specific commands, see `AGENTS.md` below.

# CLI Development
Expand Down Expand Up @@ -260,12 +259,10 @@ Types:

Our CI pipeline runs on all pull requests and includes:

- `pnpm check` (lint, typecheck, tests)
- `pnpm format:check`
- `pnpm knip`
- `pnpm check` (lint, typecheck, tests, format verification, env-description validation, knip)
- Create Agents E2E tests (separate job)

These checks must pass before a PR can be merged. Pre-commit uses lint-staged, pre-push runs `pnpm check:prepush`, and CI is the source of truth.
These checks must pass before a PR can be merged. Pre-commit uses lint-staged, pre-push runs `pnpm format`, and CI is the source of truth.

# AI coding assistants and coding practices

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"typecheck": "turbo typecheck --filter='!agents-cookbook-templates'",
"typecheck:watch": "turbo typecheck:watch",
"precheck": "pnpm install --frozen-lockfile",
"check": "turbo check --filter='!agents-cookbook-templates'",
"check": "turbo check --filter='!agents-cookbook-templates' && pnpm format:check && pnpm check:env-descriptions && pnpm knip",
"check:husky": "turbo check:husky --filter='!agents-cookbook-templates' --filter='!@inkeep/agents-docs'",
"check:prepush": "turbo check:prepush --filter='!agents-cookbook-templates' --filter='!@inkeep/agents-docs'",
"check:fix": "biome check --write",
Expand Down
Loading