ai-instructions: Instructions file for GitHub Copilot

.github/instructions/spring-boot-architecture.instructions.md

ai-instructions spring-boot-architecture.instructions.md is an instructions file for GitHub Copilot from lsampaioweb/ai-instructions. It costs 2,165 tokens per session, scanned A, original, MIT.

A baseline rule set for designing and reviewing Spring Boot applications, with links to rules for individual parts of the system.

In plain words
What is it for?
It is for guiding dependencies, application structure, APIs, configuration, events, and other Spring Boot concerns.
Why use it?
It gives a project one consistent architecture and prevents important rules from being missed when building or reviewing components.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is lsampaioweb/ai-instructions's own configuration. It tells GitHub Copilot how to work on ai-instructions 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 ai-instructions configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lsampaioweb/ai-instructions. 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/lsampaioweb/ai-instructions/main/.github/instructions/spring-boot-architecture.instructions.md
Clone the repo
git clone --depth 1 https://github.com/lsampaioweb/ai-instructions

Made for: GitHub Copilot.

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 ai-instructions spring-boot-architecture.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lsampaioweb/ai-instructions/spring-boot-architecture.svg)](https://agentmods.dev/instructions/lsampaioweb/ai-instructions/spring-boot-architecture)
Your own site
<a href="https://agentmods.dev/instructions/lsampaioweb/ai-instructions/spring-boot-architecture"><img src="https://agentmods.dev/badge/instructions/lsampaioweb/ai-instructions/spring-boot-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,165 This file is loaded in full into every session.
When invoked 2,165 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.02165 $0.02165
Opus 5 $0.01082 $0.01082
Sonnet 5 $0.00433 $0.00433
Haiku 4.5 $0.00216 $0.00216

Measured 3d ago against content hash 6f0e78ab9ceb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ai-instructions spring-boot-architecture.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/instructions/spring-boot-architecture.instructions.md · 76 lines

How it starts

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

Architecture Governance Baseline

Dependencies

  • Treat this section as the component instruction registry for Spring Boot application work.
  • Read each linked instruction file when planning or reviewing application components:
    • .github/instructions/spring-boot-actuator.instructions.md — Spring Boot actuator and observability contract: endpoint exposure, health probes, metrics, tracing, sampling, and sensitive-data boundaries (**/src/main/resources/application*.yml, **/src/test/java/**/*.java)
    • .github/instructions/spring-boot-api-versioning.instructions.md — API versioning rules: coexistence strategy, deprecation headers, and DTO evolution across versions (**/*Controller.java)
    • .github/instructions/spring-boot-application.instructions.md — Spring Boot main application entry-point contract for bootstrap class placement, annotation discipline, and startup configuration safety (**/*Application.java)
    • .github/instructions/spring-boot-async-events.instructions.md — Spring Boot async-events contract for deterministic event publication, consumer processing, and resilient delivery semantics (**/src/main/java/**/*Event*.java, **/src/main/java/**/*Publisher*.java, **/src/main/java/**/*Consumer*.java, **/src/main/java/**/*Listener*.java, **/src/main/java/**/*AsyncConfiguration*.java)
    • .github/instructions/spring-boot-config.instructions.md — Spring Boot configuration contract for externalized, profile-aware, and safe configuration management (**/src/main/resources/application*.yml, **/*ConfigurationProperties.java)
    • .github/instructions/spring-boot-container.instructions.md — Compose and Dockerfile container rules: image structure, naming, profile activation, volume mounts, healthcheck, and log directory ownership (**/Dockerfile, **/docker-compose.yml, **/docker-compose.yaml, **/compose.yml)
    • .github/instructions/spring-boot-controller.instructions.md — Spring Boot controller contract for request mapping, HTTP semantics, validation boundaries, and response consistency (**/*Controller.java)
    • .github/instructions/spring-boot-database-schema.instructions.md — Database schema and referential-integrity contract: types, naming, constraints, FK actions, and SQL artifact layout (**/src/main/resources/sql/**/*.xml, **/src/main/resources/sql/**/*.sql)
    • .github/instructions/spring-boot-dto-mapper.instructions.md — Spring Boot DTO-mapper contract for deterministic model mapping and boundary-safe transformations (**/*Request.java, **/*Response.java, **/*DtoMapper.java)
    • .github/instructions/spring-boot-enum.instructions.md — Spring Boot enum contract for deterministic closed-set domain values in API, domain, and persistence boundaries (**/src/main/java/**/*Enum.java)
    • .github/instructions/spring-boot-error-code.instructions.md — Spring Boot error-code contract for deterministic machine-readable API error semantics and stable message-key mapping (**/src/main/java/**/*ErrorCode.java)
    • .github/instructions/spring-boot-exception.instructions.md — Spring Boot exception-handling contract for centralized response mapping, stable error payloads, and controlled failure semantics (**/*Exception*.java, **/*ExceptionHandler*.java, **/*Advice*.java)
    • .github/instructions/spring-boot-gitignore.instructions.md — Spring Boot .gitignore contract for safe, complete exclusion of build output, IDE artifacts, OS files, secrets, and logs (**/.gitignore)
    • .github/instructions/spring-boot-http-client.instructions.md — Spring Boot HTTP client contract for deterministic outbound calls, bounded resilience behavior, and secure integration boundaries (**/src/main/java/**/*HttpClient*.java, **/src/main/java/**/*HttpAdapter*.java, **/src/main/java/**/*HttpConfiguration*.java, **/src/main/java/**/*HttpProperties*.java)
    • .github/instructions/spring-boot-i18n.instructions.md — Spring Boot i18n contract for message-key governance, locale behavior, and translation-safe output (**/messages*.properties, **/application*.yml, **/*Messages.java, **/*LogMessages.java, **/i18n/**/*.java)
    • .github/instructions/spring-boot-java-style.instructions.md — Java coding style contract for import ordering, visibility discipline, string constants, blank-line rules, and helper extraction across all Java source files (**/src/**/*.java)
    • .github/instructions/spring-boot-logging.instructions.md — Spring Boot logging contract for application log events, Logback appenders, rotation, and profile-level log routing (**/*Controller.java, **/*Service.java, **/*ServiceImpl.java, **/*Repository.java, **/*RepositoryImpl.java, **/*Filter.java, **/*Interceptor.java, **/*Advice.java, **/src/main/resources/**/logback-spring.xml)
    • .github/instructions/spring-boot-model.instructions.md — Spring Boot domain model contract for JDBC-first internal model types, boundary isolation, and persistence-free field declarations (**/*Model.java)
    • .github/instructions/spring-boot-openapi.instructions.md — Spring Boot OpenAPI contract for documented API metadata, discoverable endpoints, and stable specification output (**/OpenApiConfig.java, **/openapi/**/*.java, **/src/main/resources/application*.yml, **/*Controller.java)
    • .github/instructions/spring-boot-pagination.instructions.md — Spring Boot pagination contract for pageable queries, deterministic ordering, and consistent paged response metadata (**/*Controller.java, **/*Pagination*.java, **/src/main/resources/application*.yml)
    • .github/instructions/spring-boot-pom.instructions.md — Spring Boot Maven contract for dependency, plugin, and build-governance decisions (**/pom.xml)
    • .github/instructions/spring-boot-readme.instructions.md — README structure rules for required sections, actionable content, fenced code blocks, and no-filler-prose policy (README.md, **/README.md)
    • .github/instructions/spring-boot-repository.instructions.md — Spring Boot repository contract for JDBC-first data access, interface-implementation separation, and SQL safety (**/*Repository.java, **/*RepositoryImpl.java, **/*SqlConfigurationProperties.java, **/*SqlColumns.java)
    • .github/instructions/spring-boot-security.instructions.md — Spring Boot security contract for authentication, authorization, service-level checks, and endpoint protection boundaries (**/*SecurityConfig.java, **/security/**/*.java)
    • .github/instructions/spring-boot-service.instructions.md — Spring Boot service contract for business orchestration, transaction boundaries, and dependency-safe application logic (**/*Service.java, **/*ServiceImpl.java)
    • .github/instructions/spring-boot-test.instructions.md — Spring Boot testing contract for layer-focused tests, API-contract assertions, and cross-cutting governance checks (**/src/test/java/**/*.java)
    • .github/instructions/spring-boot-thymeleaf.instructions.md — Thymeleaf rules: controller conventions, template layout, model attributes, form binding, and static resource references (**/*PageController.java, **/*Routes.java, **/templates/**/*.html)
    • .github/instructions/spring-boot-websocket.instructions.md — WebSocket/STOMP rules: endpoint topology, message flow contract, lifecycle handling, and client resilience (**/*Socket*.java, **/*Stomp*.java)

Read the full file on GitHub · 76 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 · 76 lines · 2,165 tokens per session scan A 6f0e78ab9ceb

Subscribe to this mod's changes

ai-instructions spring-boot-architecture.instructions.md is an instructions file published in the GitHub repository lsampaioweb/ai-instructions (1 stars, last pushed 14d ago), licensed MIT. It adds 2,165 tokens to every session, about $0.0108 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-09-03.

Related

Other instructions, from other repositories

vibe-coding-prompt-template backend.instructions.md

Instructions for KhazP/vibe-coding-prompt-template: Read AGENTS.md, agentdocs/techstack.md, and agentdocs/codepatterns.md.

KhazP/vibe-coding-prompt-template · 139 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens