Skip to content

AI Engineering Foundation

ENGINEERING BASELINE FOR AI

Make AI always follow yourarchitecture rules

AI writes fast but often skips constraints like rate limiting, idempotency, backups and audit logs. Settle the architecture, then generate AGENTS.md, skills and CI gates so it writes stable, secure, maintainable code.

  • 0Architecture modules
  • 0Components
  • 0Scenario templates
  • 0Backend languages
  • 0UI approaches

From it runs, to ready to ship

AI delivers a demo by default: the flow works, but this is what stands between it and production.

  • The demo looked great, then it crashed on launch
  • No rate limiting, so a few spam requests took it down
  • More users, and the page just spins
  • Connection pool exhausted, the whole site returns 500
  • One slow endpoint drags down the entire system
  • No backups, so an accidental delete is permanent
Choose a project template(click the selected one again to deselect and customize)
Choose a backend language(click the selected one again = no backend, e.g. a static site)
Framework
Backend framework
UI approach
↓
API
REST API design
Input validation
Unified error format and exception handling
Idempotency
Pagination
API versioning
Timeouts, retries, and circuit breakers
Rate limiting
Real-time
↓
Security
Authentication and authorization
Password hashing and salting
JWT and sessions (cookie sessions)
OAuth2, OIDC, and single sign-on
Role-based access control (RBAC)
Common attacks: SQL injection, XSS, CSRF, CORS
Secrets and configuration management
Audit log
↓
App structure
Monolith vs. microservices
Layered architecture and dependency injection
Twelve-factor app
↓
Supporting services
Message queue
Transactional outbox and eventual consistency
Background and scheduled jobs
Redis
Caching
Search engine
Object storage and file upload
↓
Data
Relational vs. NoSQL
ORM and when to write raw SQL
Database migrations
Indexes
Transactions and isolation levels
Connection pooling
↓
Release & operations
Logging
Health checks and graceful shutdown
Error tracking
Continuous integration and continuous deployment (CI/CD)
Configuration management and multiple environments
Testing strategy

Hand it to AI

This generates a set of engineering files for your repo, not a one-off prompt: AGENTS.md carries the stack, long-lived constraints and phasing, skills are on-demand how-to checklists, CI and config turn constraints into machine checks, and a kickoff prompt gets AI started.

Choose an AI tool

FAQ

Frequently asked questions

What gets generated, how constraints are enforced, and what data is covered.

01What is this?

An engineering foundation generator that helps AI write stable, secure, maintainable code. AI writes fast but often skips constraints like rate limiting, idempotency, and audit logs, and may pick different approaches in different sessions. Here you settle the architecture first, then generate AGENTS.md, skills, CI and architecture decision records, so the constraints live in the repo and AI follows them on every change.

02Why are AI-generated projects hard to maintain?

By default AI only builds the happy path: no attackers, no dirty data, no concurrency, and nobody taking over. Validation, error shapes, permission checks and migration conventions end up inconsistent and problems surface only after launch. The fix is to write constraints as checkable rules and enforce them in CI, instead of repeating them in prompts every time.

03What is in the generated pack?

AGENTS.md (stack, architecture constraints, phasing), on-demand skills (add an endpoint, database migration, security review, pre-completion check), a CI workflow, and a kickoff prompt. For a Python backend with layering enabled it also includes automated layer-dependency checks. Use "Download all (zip)" and unpack it into your repo.

04How do AGENTS.md and skills divide the work?

AGENTS.md is loaded in every conversation and holds only invariants: stack and red lines. Skills load only when relevant and hold how-to checklists, such as which validation and auth a new endpoint needs. That keeps the always-on context small while still giving concrete steps in key scenarios. Claude Code reads .claude/skills and Codex and similar tools read .agents/skills; pick your target tool on the page.

05How are the constraints actually enforced?

In three layers: AGENTS.md and skills tell AI what to do; the definition of done requires it to really run things and paste the results before finishing; and CI (lint, type checks, tests, dependency and secret scanning, layer-dependency checks) acts as the machine backstop before merge. The first two rely on AI cooperating; the third does not depend on anyone's discipline.

06Can I use it on an existing project?

Yes, at any stage. Pick the stack in the diagram to match what you already have, then download the pack into your repo. The kickoff prompt asks AI to first take inventory, compare against AGENTS.md and produce a gap report, then fix things in prioritized batches instead of rewriting. Back up any existing CI config or AGENTS.md before merging.

07What if the templates do not match my project exactly?

Templates are only a starting point. You can toggle any module and pick components one by one, and the generated files update live. When you switch the backend, incompatible components are reset to defaults automatically and you get a notice on the page.

08Why these backend languages?

Currently Python (FastAPI / Django / Flask), C# (ASP.NET Core), Rust (Axum / Actix Web), Go (chi / Gin) and TypeScript (Fastify / NestJS / Hono, plus full-stack Next.js and Nuxt). You pick a language first, then frameworks and components are filtered by it. All five languages have component data for frameworks, validation, ORM, migrations, job queues, rate limiting, logging, config, health checks, and more. Options tightly bound to one ecosystem (such as YARP or SQL Server) are not cloned into other languages. Each language's commands, conventions and CI come from one registry, so adding a language only needs data.

09Do I need a separate frontend?

Not necessarily. There are three options: server-rendered pages from the backend (Django templates, Razor Pages, Askama and so on), which need no separate frontend project; a TypeScript full-stack framework (Next.js, Nuxt) where UI and API are one; or a standalone frontend talking to the backend over an API. With the first two, the generated files will not include a separate frontend directory or commands.

10What does "Decide later, let AI recommend" mean?

Choose it when you have no conclusion for a module yet. The generated files will ask AI to propose an approach, reasons and alternatives before it starts, and write the result back to AGENTS.md once you confirm.

11Are the charts in the guides measured data?

No. Sequence diagrams and flowcharts explain a process; bar charts with numbers only show orders of magnitude and trends, and each is labeled "illustrative data, not measured" below. For your own project, rely on your own load tests and monitoring.

12Can I trust the pros and cons of each component?

The content was compiled with AI assistance and has not been verified item by item. Cloud free tiers, open-source licenses and per-language library support are especially likely to be out of date. Treat it as a starting point and check the official docs before key decisions (each product links to its "Official docs").

13Is my selection uploaded or stored?

It is never uploaded, and it is not persisted in the browser either; a refresh returns to the default template. To share a setup, use "Download all (zip)" or copy the files.

京ICP备2026024523号-1京公网安备11011402056024号