Skip to content
Open
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
21 changes: 21 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AGENTS.md

## Cursor Cloud specific instructions

This is a Fern-powered documentation site for Credal. There is no database, Docker, or backend service — just the Fern CLI.

### Key commands

| Task | Command |
|------|---------|
| Validate docs/API definitions | `fern check` |
| Local dev server (hot-reload) | `fern docs dev` |
| Generate hosted preview | `FERN_TOKEN=<token> fern generate --docs --preview` |
| Publish docs | `FERN_TOKEN=<token> fern generate --docs` |

### Caveats

- `fern docs dev` starts a backend on port 3001 and a frontend on port 3000. The first startup takes ~20-30 seconds to bootstrap the docs preview bundle.
- `fern check` may report warnings (e.g. about unused types); 0 errors is the passing criterion used in CI.
- Publishing and preview generation require a `FERN_TOKEN` environment variable (not needed for local dev or `fern check`).
- The Fern CLI version is pinned in `fern/fern.config.json` (`"version": "4.18.0"`). Running `npm install -g fern-api` installs whatever version is specified there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Incorrect claim about npm install -g fern-api

The statement "Running npm install -g fern-api installs whatever version is specified there" is inaccurate. npm install -g fern-api always installs the latest version published to the npm registry — it does not read fern/fern.config.json to resolve the pinned version (4.18.0).

A developer following this guide would likely end up with a mismatched CLI version, which can cause subtle incompatibilities at runtime. To install the exact pinned version, the command should explicitly include the version tag:

Suggested change
- The Fern CLI version is pinned in `fern/fern.config.json` (`"version": "4.18.0"`). Running `npm install -g fern-api` installs whatever version is specified there.
- The Fern CLI version is pinned in `fern/fern.config.json` (`"version": "4.18.0"`). To install the exact pinned version, run `npm install -g fern-api@4.18.0`.
Prompt To Fix With AI
This is a comment left during a code review.
Path: AGENTS.md
Line: 21

Comment:
**Incorrect claim about `npm install -g fern-api`**

The statement "Running `npm install -g fern-api` installs whatever version is specified there" is inaccurate. `npm install -g fern-api` always installs the **latest** version published to the npm registry — it does not read `fern/fern.config.json` to resolve the pinned version (`4.18.0`).

A developer following this guide would likely end up with a mismatched CLI version, which can cause subtle incompatibilities at runtime. To install the exact pinned version, the command should explicitly include the version tag:

```suggestion
- The Fern CLI version is pinned in `fern/fern.config.json` (`"version": "4.18.0"`). To install the exact pinned version, run `npm install -g fern-api@4.18.0`.
```

How can I resolve this? If you propose a fix, please make it concise.

Loading