mayak AGENTS.md

mayak AGENTS.md is an instructions file for Codex, OpenCode from LamantinAI/mayak. It costs 4,238 tokens per session, scanned A, original, MIT.

Shared instructions for working on the Mayak service from Codex, including setup, generated documentation, environment configuration, quality checks, and end-to-end tests. An end-to-end test checks a feature through the whole running system.

In plain words
What is it for?
Use it to copy the reference task, initialize the environment, inspect project wiring, review local edits, and run the required quality and end-to-end checks.
Why use it?
It gives coding agents a common way to initialize, understand, test, and review the project. It also identifies the PostgreSQL configuration needed before the service can run locally.

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/lamantinai/mayak/agents-md
Clone the repo
git clone --depth 1 https://github.com/LamantinAI/mayak

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 mayak AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lamantinai/mayak/agents-md.svg)](https://agentmods.dev/instructions/lamantinai/mayak/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lamantinai/mayak/agents-md"><img src="https://agentmods.dev/badge/instructions/lamantinai/mayak/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,238 This file is loaded in full into every session.
When invoked 4,238 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.04238 $0.04238
Opus 5 $0.02119 $0.02119
Sonnet 5 $0.00848 $0.00848
Haiku 4.5 $0.00424 $0.00424

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

Security

Grade A, and why

mayak 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 today.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 128 lines

How it starts

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

AGENTS.md

The shared Mayak agent rules, rendered for Codex.

Generated from docs/agent_rules.md via scripts/sync_agent_docs.py. Do not edit this file manually.

Quick Start

  • Copy the reference_task vertical. It is the one worked example and it exists to be copied — eleven files plus three wiring edits; .agents/skills/add-vertical carries the order and the removal list for when your own vertical replaces it. A project that has replaced it edits this line and nothing else: the wrapper's Quick Start is generated from these bullets.
  • If .env is missing: make init-project. Nothing else creates it, and the app does not start without it. Idempotent — it never overwrites an existing .env.
  • make quality-gates before committing. When the diff touched persistence, endpoints or wiring, make test-e2e too — the gates run none of your queries.
  • Reach for uv run python scripts/query_ai_context.py bootstrap when you need the wiring map, and workset diff when you already have local edits — not as a ritual.

Running the service needs one more decision: the shipped .env points at PostgreSQL with placeholder credentials, so make run-local fails until either a database is up (docker compose -f docker-compose.yml -f docker-compose.postgres.yml up -d db) or the project declares it needs none (POSTGRES_ENABLED=false in .env).

Common Commands

# Validation
make ai-autofix              # Auto-format + fix lint + CBM
make quality-gates           # The validation suite — run it before committing
make security-scan           # bandit security scan over project/
make ci-local                # Everything CI runs, locally: gates, both Postgres modes, security, audit, e2e

# Testing
make test                    # Unit + integration (skip functional)
make test-all                # All tests including functional
make test-e2e                # Functional tests only (Docker)

# Refresh generated artifacts
make refresh-ai-context      # Regenerate AI context maps
make refresh-agent-docs      # Regenerate CLAUDE.md and AGENTS.md
make refresh-project-map     # Regenerate docs/project_map.md
make refresh-generated-docs  # All of the above, in dependency order

# Reading a running service
make format-trace            # Render a local NDJSON file: ARGS="<logfile>"
make logs                    # Render the container's semantic log as a trace tree
make logs-raw                # Dump the container's raw NDJSON under logs/

# Run
make smoke                   # Docker-based health check
make migrate                 # Apply pending Alembic migrations
make run-local               # Migrate, then start the app locally (needs a reachable PostgreSQL unless POSTGRES_ENABLED=false)

# Scaffolding
make autogenerate-migration  # Alembic migration: MSG="description"

Read the full file on GitHub · 128 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. today Changed · +106 tokens per session 7c73cef73366
  2. 4d ago First seen · 128 lines · 4,132 tokens per session scan A df32f6f99652

Subscribe to this mod's changes

mayak AGENTS.md is an instructions file published in the GitHub repository LamantinAI/mayak (5 stars, last pushed 2d ago), licensed MIT. It adds 4,238 tokens to every session, about $0.0212 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.