HotelAI: Instructions file for Codex

AGENTS.md

HotelAI AGENTS.md is an instructions file for Codex, OpenCode from workfromrome/HotelAI. It costs 3,421 tokens per session, scanned A, original, MIT.

An AGENTS.md instruction file describing the HotelAI project's structure, data-processing components, and coding guidance.

In plain words
What is it for?
It helps maintain the PDF parsing, hotel-data extraction, search indexing, and retrieval code, including where editable word lists and key processing logic live.
Why use it?
It gives an AI coding agent the project context needed to make changes in the right files and follow the project's workflow.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is workfromrome/HotelAI's own configuration. It tells Codex and OpenCode how to work on HotelAI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything HotelAI configures →

Reuse

Borrowing it

Nothing to install: this file belongs to workfromrome/HotelAI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/workfromrome/HotelAI/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/workfromrome/HotelAI

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for HotelAI AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/workfromrome/hotelai/agents-md/github.svg)](https://agentmods.dev/instructions/workfromrome/hotelai/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/workfromrome/hotelai/agents-md"><img src="https://agentmods.dev/badge/instructions/workfromrome/hotelai/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for HotelAI AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/workfromrome/hotelai/agents-md"><img src="https://agentmods.dev/badge/instructions/workfromrome/hotelai/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,421 This file is loaded in full into every session.
When invoked 3,421 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03421 $0.03421
Opus 5.5 $0.01368 $0.01368
Sonnet 5.5 $0.00684 $0.00684
Haiku 4.5 $0.00342 $0.00342

Measured 2mo ago against content hash 8dc3e1215a00, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

HotelAI AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

System overview

  • src/ingestion/: PDF loading/segmentation and structured Groq/Gemini-reviewed extraction.
    • pdf_parser.py: pdfplumber-based hotel-block segmentation, OCR cleanup, and word bounding boxes (used as the reference .words source for the visual-ratings fallback).
    • pymupdf_parser.py: font-size-aware header extractor; canonical nome/localita source for structured_extractor. The two flat exclusion word-lists (_EXCLUDED_HEADER_TEXT, _EXCLUDED_BADGE_WORDS) live as one-word-per-line .txt files in pdf_artifacts/, not as Python constants — edit those files to add/remove excluded words, no code change needed. _STOP_MARKERS (regex) and _LIGATURE_GLYPHS (character-substitution rule) stayed in code: they're parsing logic, not data.
    • structured_extractor.py: canonical HotelRecord extraction and CSV/JSONL export.
  • src/search/: embeddings, ChromaDB indexing, hybrid retrieval and Markdown formatting.
    • vector_store.py: GeminiEmbedder, offline embedder and persistent Chroma index. build_index_from_csv reads hotels_data.csv back via structured_extractor.read_csv and is the real Part-1-to-Part-2 bridge — build_index itself takes only records, no PDF blocks, since the document text embedded per hotel is record.source.raw_text, already present in the CSV's source column.
    • retriever.py: maximum-five-result search and ranking.
  • src/rag/rag_engine.py: RAGEngine/answer_query conversational synthesis over HotelRetriever results; tries Groq first, falls back to Gemini, then to the fixed fallback string FALLBACK_MESSAGE. Not yet wired into mcp_server.
  • src/mcp_server/server.py: canonical FastMCP server and search_hotels(query) tool. Does not yet expose the RAG engine's natural-language synthesis, only raw retrieval.
  • src/api/main.py: FastAPI HTTP layer for the React frontend — POST /api/chat (RAGEngine.answer_query), GET /api/hotels (reads settings.hotel_records_path, i.e. data/processed/hotels_data.jsonl, the canonical HotelRecord-schema export — not the legacy hotels.jsonl), GET /api/health (Chroma connectivity/count + Groq/Gemini key presence). Retriever/RAG-engine access is via Depends(get_retriever)/Depends(get_rag_engine), overridable in tests; the real Chroma index is only built in the lifespan startup hook, so tests never touch it unless they opt in. CORS is open to http://localhost:5173 (Vite dev server) only. Run: uvicorn api.main:app --reload --port 8000 (PYTHONPATH=src, from repo root).
  • frontend/: Vite + React chatbot UI (dark theme, ChatGPT/Claude-style layout). Talks to the backend via /api/*, proxied to localhost:8000 by vite.config.js in dev — CORS is also configured on the backend as a second line of defense. src/components/: Sidebar.jsx (status, 5 quick queries, hotel catalog accordion), ChatArea.jsx (hero view, message bubbles, page-range citation badges, typing indicator), InputBar.jsx. src/styles/app.css holds the whole design (CSS variables for the zinc/emerald palette). No markdown renderer is wired in — assistant answers render as white-space: pre-wrap plain text, so literal **bold**/table-pipe markup from the LLM is visible as-is; add react-markdown if that needs to render properly. Run: cd frontend && npm install && npm run dev (port 5173). .claude/launch.json has a frontend config for the preview_start tool.
  • src/hotelai/: canonical settings/Settings (config.py), HotelRecord schema (schemas.py), centralized logging setup (logging_setup.py), prompts/ (LLM prompt text as .md files plus load_prompt(name), see line below), and server.py (deprecated compat wrapper, see line below). Renamed from fde_hotel_rag; the project folder itself is still named fde_hotel_rag pending a manual rename by the user (see Known gotchas). Formerly also held extractors//storage/ subpackages — deleted, they contained no source, only stale __pycache__.
  • src/hotelai/prompts/: all LLM prompt text lives here as .md files, not inline in Python — load_prompt(name) reads <name>.md and strips it; callers .format(...) it themselves when the template has placeholders (conversational_rag.md takes {fallback_message}, structured_review.md takes {example}, the dynamically-built HotelReview JSON sample). visual_ratings.md has no placeholders. Editing a prompt's wording only ever means editing the .md file.
  • scripts/run_pipeline.py: primary ingestion entry point; --offline skips API calls and indexing.
  • tests/: unit/integration-style tests for parsing, extraction, Chroma, retrieval, MCP and the FastAPI layer (test_api.py, 100% mocked via app.dependency_overrides).
  • scripts/compare_pdf_extractors.py: comparison-only PyMuPDF extraction benchmark.

Read the full file on GitHub · 136 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 136 lines · 3,421 tokens per session scan A 8dc3e1215a00

Subscribe to this mod's changes

HotelAI AGENTS.md is an instructions file published in the GitHub repository workfromrome/HotelAI (0 stars, last pushed 2mo ago), licensed MIT. It adds 3,421 tokens to every session, about $0.0137 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

HotelAI AGENTS.md compared with instructions from other repositories

HotelAI AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
HotelAI AGENTS.mdworkfromrome/HotelAIInstructions file02mo agoMITA3,421Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode