-
Notifications
You must be signed in to change notification settings - Fork 0
Add AGENTS.md with Cursor Cloud development instructions #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aavramch
wants to merge
1
commit into
main
Choose a base branch
from
cursor/setup-dev-environment-afb9
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # AGENTS.md | ||
|
|
||
| ## Cursor Cloud specific instructions | ||
|
|
||
| ### Overview | ||
|
|
||
| Reparsed is a single-service Python 3.12 FastAPI application that parses files and URLs into clean, structured, LLM-ready text. It requires PostgreSQL 16 for persistence and optionally connects to an external Ollama server for LLM classification. | ||
|
|
||
| ### Running the dev server | ||
|
|
||
| 1. **Start PostgreSQL** (if not already running): | ||
| ``` | ||
| sudo pg_ctlcluster 16 main start | ||
| ``` | ||
|
|
||
| 2. **Start FastAPI with uvicorn** from the `api/` directory: | ||
| ``` | ||
| DATABASE_URL="postgresql+asyncpg://reparsed:reparsed@localhost:5432/reparsed" \ | ||
| SESSION_SECRET="dev-secret-for-local-testing-only-32b" \ | ||
| OLLAMA_BASE_URL="http://localhost:11434" \ | ||
| PLAYWRIGHT_ENABLED=false \ | ||
| uvicorn app.main:app --host 0.0.0.0 --port 17177 --reload | ||
| ``` | ||
|
|
||
| The app starts on `http://localhost:17177`. Hot reload is enabled with `--reload`. | ||
|
|
||
| ### Key caveats | ||
|
|
||
| - **No Ollama required for dev**: The app degrades gracefully without an Ollama server — `/v1/parse` returns `content_type: "generic"` with the deterministic extraction. Set `OLLAMA_BASE_URL` to any value; it only matters if you want Stage 2 LLM classification. | ||
| - **Playwright**: Set `PLAYWRIGHT_ENABLED=false` to skip headless Chromium startup if you don't need JS-rendering fallback. Playwright browsers are installed at `~/.cache/ms-playwright/`. | ||
| - **Database auto-creates tables**: On startup, `init_db()` runs `Base.metadata.create_all` so no manual migrations are needed. The DB user/password/database are all `reparsed` by default. | ||
| - **Session cookies**: `SESSION_COOKIE_SECURE` defaults to `false`, which is correct for local HTTP dev. Setting it to `true` over HTTP silently breaks login. | ||
| - **Static files and templates**: Served from `api/static/` and `api/templates/` respectively, resolved relative to `api/app/main.py`. | ||
| - **No automated tests**: The repository currently has no test suite. Validation is done via manual API calls and browser testing. | ||
| - **No linter config**: No `.flake8`, `pyproject.toml` linter config, or pre-commit hooks are present in the repository. | ||
|
|
||
| ### Endpoints for quick validation | ||
|
|
||
| - `GET /healthz` — returns `ok` (plain text) | ||
| - `GET /v1/health` — returns JSON with model readiness status | ||
| - `GET /v1/content-types` — lists all detected content types | ||
| - `GET /api-docs` — interactive Swagger UI | ||
| - `POST /v1/parse` — core parsing endpoint (requires API key via `Authorization: Bearer rp_live_...`) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Markdown fence languages and blank-line spacing around fenced blocks.
The fenced blocks on Line 12 and Line 17 violate MD031/MD040. Add surrounding blank lines and explicit language identifiers.
📄 Proposed doc fix
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 12-12: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 12-12: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 17-17: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 17-17: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents