datapages AGENTS.md

Project instructions for developing datapages, a Go-based code-generation project, including coding conventions, commands, dependencies, and folder roles.

In plain words
What is it for?
Use it when editing the parser or other Go packages, running checks, updating generated files, or building the command-line tool and examples.
Why use it?
It gives contributors the project's expected way to format, test, generate, build, and organize code.

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

Made for: Codex, OpenCode.

Per session 4,797 This file is loaded in full into every session.
When invoked 4,797 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.04797 $0.04797
Opus 5 $0.02398 $0.02398
Sonnet 5 $0.00959 $0.00959
Haiku 4.5 $0.00480 $0.00480

Measured 2d ago against content hash c8cd89ca51f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

datapages 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 · 415 lines

How it starts

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

Code Style

  • Follow standard Go conventions (Effective Go).
  • Comment as described in code comments.
  • Use require from testify for test assertions, use assert only where it makes sense.
  • Use table-driven map-based (to ensure random input ordering) tests where applicable with concise name tests as map keys.

Commands

  • Lint: mage lint
  • Format: mage fmt
  • Tidy all Go modules: mage modTidy
  • Test (runs lint first): mage test
  • Coverage of the generator and of the code it generates: mage coverage
  • Build CLI and examples: mage build
  • Generate templ files: mage genTempl
  • Generate datapages code: mage genDatapages
  • Generate all (templ + datapages + docs): mage gen
  • Check that all generated code is current: mage checkGen
  • Run go fix on all modules: mage goFix
  • Run everything: mage all

Project Structure

Internal, used by the CLI and build tooling:

  • internal/parser/ - parses the application model from a Go source package.
    • model/ - the data model.
    • validate/ - naming convention validation.
    • errsuggest/ - "did you mean" suggestions for parser errors.
    • internal/ - method kinds, parameter validation, struct inspection, templ linting, type predicates, URL paths.
    • testdata/ - one self-contained module per fixture. Prefix err_ for expected-error cases.
  • internal/generator/ - code generation from the parsed model. internal/generator/README.md explains its tests.
  • internal/acceptance/ - one module per case: the application, its committed generated code and tests asserting behaviour over HTTP. internal/acceptance/README.md explains how they run and how to record a defect the framework has not fixed yet.
  • internal/gotypes/ - go/types predicates and renderings that know nothing about Datapages. Shared by the parser and the generator.
  • internal/routepattern/ - net/http ServeMux route pattern parsing.
  • internal/structtag/ - the path, query, json and reflectsignal tags.
  • internal/subject/ - broker subject rules: the token rule and which subjects an event claims.
  • internal/serverscan/ - finds the app package and the target package from the datapages.NewServer calls. AST only, so it reads a main.go naming a package the first run has not written yet.
  • internal/templatingbench/ - the templating benchmarks FAQ.md quotes.
  • internal/cmd/ - CLI command implementations, package cmd.
  • internal/tools/render-pages/ - renders docs/index.html.
  • internal/docs-src/ - templ source and CSS for the docs page.
  • docs/ - generated GitHub Pages output.
  • magefiles/ - build targets.

Read the full file on GitHub · 415 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 · 415 lines · 4,797 tokens per session scan A c8cd89ca51f5

Subscribe to this mod's changes

datapages AGENTS.md is an instructions file published in the GitHub repository romshark/datapages (87 stars, last pushed 3d ago), licensed MIT. It adds 4,797 tokens to every session, about $0.0240 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-30.