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

## Cursor Cloud specific instructions

### Overview

**Forge (DevForge)** is a self-hosted autonomous software development dashboard built with **Astro 6 SSR** + **Preact** + **Tailwind CSS / DaisyUI**. The UI and codebase are in French.

### Stack

- **Framework:** Astro 6 (SSR mode, `output: 'server'`)
- **UI Components:** Preact (`.tsx` interactive islands)
- **Styling:** Tailwind CSS 3 + DaisyUI (custom `forge` theme)
- **Database:** Astro DB (local SQLite via libSQL, auto-created at `.astro/db.sqlite`)
- **Runtime:** Node.js >= 22.12.0
- **Package manager:** npm (lockfile: `package-lock.json`, `.npmrc` sets `legacy-peer-deps=true`)

### Key commands

| Action | Command |
|--------|---------|
| Install deps | `npm install` |
| Dev server | `npm run dev` (serves on `http://localhost:4321`) |
| Build | `npm run build` |
| Preview | `npm run preview` |

### Development notes

- **No ESLint/Prettier/test framework** is configured in this repo. The build (`npm run build`) is the primary correctness check.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The absence of ESLint, Prettier, and a testing framework is a significant maintainability risk.\n\nWhile documenting this state is helpful for agents, it highlights a major gap in the project's quality assurance. Relying solely on the build process for correctness checks can lead to regressions and inconsistent code style. It is highly recommended to integrate these tools to automate quality checks and ensure long-term project health.

- `astro check` may hang in constrained environments; the build is a more reliable validation step.
- The dev server auto-creates the SQLite database and seeds it on first run. No manual DB setup is needed.
- The app redirects unauthenticated users to `/login`. Register via the "Créer un compte" tab (min 10-char password). After registration, the setup wizard at `/setup` can be skipped.
- **OpenClaw** and **Ollama** are optional external services. The dashboard gracefully degrades when they are unreachable.
- The Docker-related API endpoint (`/api/docker.ts`) gracefully returns empty data when Docker is unavailable.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There is a discrepancy between this documentation and the implementation in src/pages/api/docker.ts.\n\nThe documentation states the endpoint "gracefully returns empty data when Docker is unavailable," but the code returns a 500 Internal Server Error if the docker command fails (e.g., if Docker is not installed or the daemon is not running). To achieve the documented "graceful degradation," the API should return an empty array [] with a 200 OK status on failure. If the current error behavior is intended, please update this documentation to reflect it.

Suggested change
- The Docker-related API endpoint (`/api/docker.ts`) gracefully returns empty data when Docker is unavailable.
- The Docker-related API endpoint (/api/docker.ts) returns an error response when Docker is unavailable (except on Vercel where it returns empty data).

- `scripts/run-astro.mjs` wraps the Astro CLI and auto-sets `ASTRO_DATABASE_FILE` if not provided.
- `scripts/ensure-win32-natives.cjs` is a no-op on Linux (exits immediately on non-Windows).
- `scripts/patch-astro-node-polyfill.cjs` patches a compatibility shim for `@astrojs/node`; it runs automatically via npm lifecycle hooks.
Loading