composer-core

A set of fixed rules for calculating trip dates, stay length, feasibility, prices, and packages. The rules produce the same result for the same input instead of relying on changing network data or model guesses.

In plain words
What is it for?
Use it for the part of a travel application that must make repeatable decisions about dates, prices, and trip packages.
Why use it?
It prevents inconsistent answers, such as different night counts or hotel prices for identical requests.

Cursor rule for Cursor

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 rules/evilfreelancer/zaezd/composer-core
Clone the repo
git clone --depth 1 https://github.com/EvilFreelancer/zaezd

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,058 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.02058
Opus 5 $0.00000 $0.01029
Sonnet 5 $0.00000 $0.00412
Haiku 4.5 $0.00000 $0.00206

Measured yesterday against content hash 9682e5b63fa0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

composer-core 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 yesterday.

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.

.cursor/rules/composer-core.mdc · 171 lines

How it starts

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

Composer core: the deterministic rules

src/composer/ holds the only part of the product that is allowed to decide numbers. It is pure: no network, no file system, no Date.now(). The current date arrives as an argument. This is what makes three identical requests produce three identical answers, which a language model demonstrably does not (three live runs of one request gave 3, 2 and 2 nights and a 1.5x hotel price spread; specs/10-proverka.md).

Stay dates, dates.ts

check-in day:
  starts_at known and start time <  12:00  -> start_date minus one day
  starts_at known and start time >= 12:00  -> start_date
  starts_at is null                        -> start_date minus one day (cautious)

check-out day:
  end_date plus one day, if the event ends after 18:00 or the end time is unknown
  otherwise end_date

nights = check-out day minus check-in day

confcal has no event end time. Verified against the live catalogue: an event carries start_date, end_date and starts_at and nothing else about time. The second branch of the check-out rule is therefore unreachable on real data and the check-out day is always end_date plus one. The 18:00 branch stays in the function because a source may appear, and it is covered by a unit test, not by a scenario on fixtures.

Nights are never negative. Zero nights is a legal answer and means a same-day trip to a neighbouring city: assemble a package without a hotel but with a mandatory return leg the same day. Never round zero up to one, that buys a night the traveller does not need. The check-in day is the outbound travel date, the check-out day is the return travel date, and both go into search_hotels verbatim as check_in and check_out.

Event selection, selection.ts

Applied in order: drop format: "online" (they go to a separate "no travel needed" list), drop offline events with no city at all (there is nowhere to send anyone), drop events in the origin city, drop events outside the requested dates, drop events that can no longer be reached, drop records that contradict themselves, sort by date proximity with the catalogue id as the tie-break, keep at most five candidates, assemble only the first.

Read the full file on GitHub · 171 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. yesterday First seen · 171 lines · 0 tokens per session scan A 9682e5b63fa0

Subscribe to this mod's changes

composer-core is a cursor rule published in the GitHub repository EvilFreelancer/zaezd (1 stars, last pushed 13d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,058 tokens. 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.