planday-bridge: Instructions file for Codex

AGENTS.md

planday-bridge AGENTS.md is an instructions file for Codex, OpenCode from MVPR-Ext-Projects/planday-bridge. It costs 2,170 tokens per session, scanned A, original, MIT.

Repository instructions that give AI coding agents the project’s purpose, design, domain details, and safety rules for the Planday workforce-management integration.

In plain words
What is it for?
Understanding the Planday API bridge, its timesheet-report pipeline, its MCP server, its generated files, and its write-safety constraints.
Why use it?
They prevent agents from repeating costly discoveries or making unsafe changes, such as hand-writing code that should be generated from API specifications.

Instructions file for CodexOpenCode

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

This is MVPR-Ext-Projects/planday-bridge's own configuration. It tells Codex and OpenCode how to work on planday-bridge 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 planday-bridge configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MVPR-Ext-Projects/planday-bridge. 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/MVPR-Ext-Projects/planday-bridge/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/MVPR-Ext-Projects/planday-bridge

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 planday-bridge AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mvpr-ext-projects/planday-bridge/agents-md/github.svg)](https://agentmods.dev/instructions/mvpr-ext-projects/planday-bridge/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mvpr-ext-projects/planday-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/mvpr-ext-projects/planday-bridge/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 planday-bridge AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mvpr-ext-projects/planday-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/mvpr-ext-projects/planday-bridge/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,170 This file is loaded in full into every session.
When invoked 2,170 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.02170 $0.02170
Opus 5.5 $0.00868 $0.00868
Sonnet 5.5 $0.00434 $0.00434
Haiku 4.5 $0.00217 $0.00217

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

Security

Grade A, and why

planday-bridge 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 · 152 lines

How it starts

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

planday-bridge — context for AI coding agents

If you are an AI agent working in this repo, read this first. It carries the domain knowledge and the non-obvious traps, most of which cost real time to rediscover.

Humans: README.md for the developer tour, SETUP.md to just get it running.

What this is

Two things over the Planday workforce-management API:

  1. A translator producing Planday's Timesheet Report — worked hours and staff cost per shift — which has no single endpoint and must be assembled from three.
  2. An MCP server exposing all 125 Planday operations.

Architecture

Everything derives from the vendored OpenAPI specs. Do not hand-write endpoint wrappers — regenerate instead, or coverage silently rots.

specs/*.json          vendored from openapi.planday.com/{area}/swagger/v1.0/swagger.json
scripts/generate.ts   specs -> src/generated/operations.json   (pnpm gen)
src/generated/        125 operations, 294 schemas. COMMITTED - do not gitignore.
src/planday/          auth, http (+ offset loop), validation, invoke (the dispatcher)
src/timesheet/        columns -> transform (pure) -> build -> summarise -> csv
src/bridge/           handler + setup page, shared by both HTTP entrypoints
src/fixtures/         seeded sample portal + schema-driven synthesiser
src/source.ts         LiveSource | DummySource behind one interface
apps/mcp/             the MCP server (19 tools, 3 layers)
apps/bridge/          standalone HTTP server (local + Docker)
api/index.ts          serverless entrypoint; vercel.json rewrites everything here
powerquery/           Timesheet.pq (GENERATED), Timesheet-direct.pq (hand-written)

Every call goes through src/planday/invoke.ts. Both HTTP entrypoints delegate to src/bridge/handler.ts — never add a route to one without the other, or the hosted and local builds diverge.

Traps

Each of these was found the hard way.

  • The spec URLs are undocumented. https://openapi.planday.com/{area}/swagger/v1.0/swagger.json for area in absence hr pay payroll portal punchclock reports revenue scheduling. Nothing on Planday's docs site links to them, and the docs site itself is a JS app that fetches them at runtime.
  • openapi.planday.com/api/{area} is a documentation page, not an endpoint. Aiming Power Query or an HTTP client at one is the most common Planday integration mistake.
  • Every request needs two headers, Authorization: Bearer and X-ClientId. Omitting the second gives a 401 that reads like a bad token. The spec mentions neither it nor a base URL — there is no servers block. Both are injected by src/planday/http.ts.
  • limit is hard-capped at 50 on list endpoints (maximum: 50); raising it is silently ignored. Walk offset against paging.total. The paging envelope is { data, paging: { offset, limit, total } } and is identical across all nine areas. The three report endpoints are not paged — they are bulk date-range calls.
  • 113 of 125 operations have no operationId. Ids are synthesised in scripts/generate.ts as {area}.{method}.{pathSlug}, purely from method + path so they stay stable across regeneration. Never make an id depend on ordering or a counter.
  • Planday's date-time is a .NET DateTime. Its own documented example for the punch-clock parameters is 2025-01-01T00:00 - no seconds, no offset - which strict RFC 3339 rejects. Left on the ajv-formats default, our validator refused requests that Planday accepts, across 24 parameters in 6 operations. Overridden in validation.ts.
  • format: time is a .NET TimeOnly, not RFC 3339. ajv-formats demands a timezone offset in both fast and full mode, which would reject every legitimate shift time — Planday pairs a local wall-clock time with a separate timeZone field. src/planday/validation.ts overrides time and date-span for this reason. Use createAjv() from there — never construct a bare Ajv, or tests will validate under looser rules than the dispatcher enforces.
  • Two POSTs are reads. reports.post.schedulingHistory and absence.post.accounts.balance.employees are queries whose filters are too big for a query string. They are in READ_ONLY_POSTS in the generator; tiering by HTTP verb alone would put the entire Timesheet Report behind the write gate.
  • firstApproved is a snapshot, not a timestamp. Planday exposes no approval time at all. The column is first_approved_hours; comparing it to approved is what surfaces edited_after_approval.
  • shiftId is nullable for punch-clock entries never matched to a shift. The row key is shiftId ?? "pc-<punchclockId>". Power BI needs a real primary key, and this is the case a hand-rolled Power Query merge gets wrong.
  • Salaried staff never appear in shiftsPayroll — only in salariedPayroll. Their shifts legitimately carry hours with no cost. Do not "fix" this.
  • Never read a file relative to import.meta.url. It is undefined once the code is bundled into a serverless function, and the lambda dies at cold start while every local test stays green. This bit once — the operation catalogue was loaded that way. It is now import catalogue from "./operations.json" with { type: "json" } so bundlers inline it. test/deploy.test.ts is the only test that would catch a repeat.
  • Planday gates each area by its own authorization policy. A perfectly valid token can be refused on payroll alone. Anything touching cost must degrade — payroll, then time-and-cost, then hours with no cost — never throw. pnpm whoami probes each area.

Read the full file on GitHub · 152 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 · 152 lines · 2,170 tokens per session scan A 7834e50aaf01

Subscribe to this mod's changes

planday-bridge AGENTS.md is an instructions file published in the GitHub repository MVPR-Ext-Projects/planday-bridge (0 stars, last pushed 2mo ago), licensed MIT. It adds 2,170 tokens to every session, about $0.0087 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

planday-bridge AGENTS.md compared with instructions from other repositories

planday-bridge AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
planday-bridge AGENTS.mdMVPR-Ext-Projects/planday-bridgeInstructions file02mo agoMITA2,170Codex, OpenCode
mcp-server-excel copilot-instructions.mdsbroenne/mcp-server-excelInstructions file853yesterdayMITA107GitHub Copilot
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