neqsim copilot-instructions.md

A set of coding-agent instructions for NeqSim, a Java software project for simulating fluids and process equipment. It explains the codebase, common patterns, and the requirement to keep all code compatible with Java 8.

In plain words
What is it for?
Use it to orient an agent in the repository, follow existing coding patterns, check previous solutions, and write or test Java code without using Java 9-or-newer features.
Why use it?
It helps an agent find the right documentation and avoid code that the project's build cannot compile, such as Java features introduced after Java 8.

Instructions file for GitHub Copilot

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/equinor/neqsim/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/equinor/neqsim

Made for: GitHub Copilot.

Per session 13,741 This file is loaded in full into every session.
When invoked 13,741 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.13741 $0.13741
Opus 5 $0.06871 $0.06871
Sonnet 5 $0.02748 $0.02748
Haiku 4.5 $0.01374 $0.01374

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

Security

Grade A, and why

neqsim copilot-instructions.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 3d 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.

.github/copilot-instructions.md · 663 lines

How it starts

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

NeqSim AI Guidance for Coding Agents

Quick Orientation

Start here: Read CONTEXT.md in the repo root for a 60-second overview of the entire codebase - repo map, code patterns, build commands, and constraints.

Solving a task? See docs/development/TASK_SOLVING_GUIDE.md for the step-by-step workflow: classify the task, find similar past solutions, write code, verify, log it.

Looking for code patterns? docs/development/CODE_PATTERNS.md has copy-paste starters for every common task (fluids, flash, equipment, PVT, tests, notebooks).

Was this solved before? Search docs/development/TASK_LOG.md for keywords. Every solved task gets an entry there - check before starting from scratch.


WARNING: CRITICAL: Java 8 Compatibility (READ FIRST)

All code MUST compile with Java 8. The CI build will FAIL if you use Java 9+ features.

This applies to ALL Java files including test classes in src/test/java/.

FORBIDDEN Java 9+ Features (NEVER USE):

Forbidden Java 8 Alternative
"str".repeat(n) StringUtils.repeat("str", n) (Apache Commons)
var x = ... Explicit type declaration: String x = ..., Map<String, Object> map = ...
List.of(a, b) Arrays.asList(a, b) or Collections.singletonList(a)
Set.of(a, b) new HashSet<>(Arrays.asList(a, b))
Map.of(k, v) Collections.singletonMap(k, v) or HashMap
str.isBlank() str.trim().isEmpty()
str.strip() str.trim()
str.lines() str.split("\\R") or BufferedReader
Optional.isEmpty() !optional.isPresent()
Text blocks """...""" Regular strings with \n
Records Regular class with fields
Pattern matching instanceof Traditional instanceof + cast

Common var Replacement Examples:

// WRONG (Java 10+):
var map = someMethod.toMap();
var list = getItems();
var result = calculate();

// CORRECT (Java 8):
Map<String, Object> map = someMethod.toMap();
List<String> list = getItems();
CalculationResult result = calculate();

Read the full file on GitHub · 663 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. 3d ago First seen · 663 lines · 13,741 tokens per session scan A b1bf94bcb428

Subscribe to this mod's changes

neqsim copilot-instructions.md is an instructions file published in the GitHub repository equinor/neqsim (147 stars, last pushed 3d ago), licensed Apache-2.0. It adds 13,741 tokens to every session, about $0.0687 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.