implementation-order

implementation-order is a cursor rule for Cursor from EvilFreelancer/openapi-to-cli. It costs 0 tokens per session (574 once invoked), scanned A, original, MIT.

A set of project rules for adding code to openapi-to-cli one unit at a time. It defines which code layers may depend on each other and requires tests before implementation.

In plain words
What is it for?
Use it when adding modules under src/, deciding where code belongs, writing tests, and implementing features incrementally.
Why use it?
It gives changes a predictable order and helps prevent misplaced dependencies or untested behavior.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding modules under src/, deciding where code belongs, writing tests, and implementing features incrementally.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/evilfreelancer/openapi-to-cli/implementation-order
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.

Clone the repo
git clone --depth 1 https://github.com/EvilFreelancer/openapi-to-cli

Made for: Cursor.

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 implementation-order

README.md
[![agentmods](https://agentmods.dev/badge/rules/evilfreelancer/openapi-to-cli/implementation-order/github.svg)](https://agentmods.dev/rules/evilfreelancer/openapi-to-cli/implementation-order)
Your own site
<a href="https://agentmods.dev/rules/evilfreelancer/openapi-to-cli/implementation-order"><img src="https://agentmods.dev/badge/rules/evilfreelancer/openapi-to-cli/implementation-order/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 implementation-order

Your own site · 80×15
<a href="https://agentmods.dev/rules/evilfreelancer/openapi-to-cli/implementation-order"><img src="https://agentmods.dev/badge/rules/evilfreelancer/openapi-to-cli/implementation-order.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 574 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00574
Opus 5.5 $0.00000 $0.00230
Sonnet 5.5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00057

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

Security

Grade A, and why

implementation-order 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 1mo 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.

.cursor/rules/implementation-order.mdc · 43 lines

How it starts

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

Implementation order (one unit at a time)

Applies when adding or extending modules under src/.

Layer order (lower first)

The architecture in @architecture.mdc defines four layers. New behavior should be added at the lowest layer it can live in, then composed upward:

  1. Layer 0 - pure (bm25.ts, type-only files): no I/O, no Node built-ins beyond Buffer/URL/etc.
  2. Layer 1 - I/O wrappers (config.ts, profile-store.ts, openapi-loader.ts): touch fs, network, or env.
  3. Layer 2 - transform (openapi-to-commands.ts, command-search.ts): combine Layer 0 + Layer 1 outputs into the CLI command model.
  4. Layer 3 - entry (cli.ts): wire everything together for yargs and axios.

Forbidden: Layer N importing from Layer M when M > N. If a Layer 1 module suddenly needs a Layer 2 type, that is a sign the type belongs lower.

Steps for a new module or class

  1. Decide the layer using @architecture.mdc.
  2. Write a failing test in tests/<module>.test.ts that describes the smallest useful behavior (see @testing.mdc and @workflow.mdc).
  3. Add the minimum implementation in src/<module>.ts. Follow @code-style.mdc for types, naming, and constructor-injected I/O.
  4. Make the test pass.
  5. Run npm test to confirm no regressions, then npm run build to confirm tsc is clean.
  6. Only then integrate the new module into the layer above (typically cli.ts), guarded by its own test.

Forbidden

  • Implementing two unrelated modules in one step before either has tests.
  • Wiring a new module into cli.ts before its own tests pass.
  • Adding optional fields to Profile, CliCommand, or CliCommandOption without a test that exercises the new field.
  • Editing real-spec fixtures (github-api.*, box-api-yaml.*) to "make tests pass" - those represent contracts.

Allowed

  • Stub or fake dependencies (mock HttpClient, in-memory fs) while a lower layer is incomplete, provided the stub matches the documented contract.
  • Refactor a passing module to a cleaner shape after the test suite stays green.
  • Extending an existing Layer 2 module with a new transformation, as long as it is covered by a new test and does not import upward.

Read the full file on GitHub · 43 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. 1mo ago Changed 6cf79b62b879
  2. 1mo ago First seen · 43 lines · 0 tokens per session scan A d6c8c13e951c

Subscribe to this mod's changes

implementation-order is a cursor rule published in the GitHub repository EvilFreelancer/openapi-to-cli (267 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 574 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-30.