HotelAI 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/workfromrome/hotelai/agents-md
Clone the repo
git clone --depth 1 https://github.com/workfromrome/HotelAI

Made for: Codex, OpenCode.

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. Scan, not verified.
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 $0.03421 $0.03421
Opus 5 $0.01710 $0.01710
Sonnet 5 $0.00684 $0.00684
Haiku 4.5 $0.00342 $0.00342

Measured 2d ago against content hash 8dc3e1215a00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 9d ago), licensed MIT. It adds 3,421 tokens to every session, about $0.0171 per session on Opus 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

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens