AI Coding Agents & AGENTS.md
AI coding assistants — Claude, GitHub Copilot, Cursor, and others — can build and customize a PowerPortalsPro portal far more accurately when they understand the framework's conventions. To make that automatic, every project generated from a PowerPortalsPro template ships an AGENTS.md file at its root.
What is AGENTS.md?
AGENTS.md is a plain-Markdown instructions file that AI coding tools read automatically to learn a project's conventions before they write code. It is an emerging cross-tool standard — the same file is picked up by Claude, GitHub Copilot, Cursor, and others — so you maintain one set of guidance, not one per tool. The PowerPortalsPro templates generate an AGENTS.md tailored to the framework so an agent knows to assemble features from framework components and services rather than hand-rolling data access, authentication, or save logic.
Note
The guidance is stack-specific: a project generated from the React template ships a React-focused
AGENTS.md, and a Blazor project ships a Blazor-focused one. Each describes the components, services, and patterns for that stack.
Where it lives
The file sits at the root of your generated solution, alongside your projects, so any AI tool opened on the repository finds it without configuration:
YourPortal/
├── AGENTS.md
├── YourPortal/ (host / ASP.NET Core project)
└── YourPortal.Client/ (your pages, components, customizations)
What's inside
The generated AGENTS.md distills the conventions this documentation site covers into an always-in-context reference an agent reads on every task:
- Golden rules — don't hand-roll data access, auth, or save logic; bind editors to a record context; never hardcode colors or user-facing strings.
- Architecture & project layout — how the host and client projects fit together and where your pages and components live.
- Data & editing patterns — loading records, the record-context + field-editor model, and the grid components.
- A compact component reference — the props/parameters for the components you reach for most, with pointers to types and IntelliSense for the rest.
- Security — filter data at the source for accurate paging and performance; permission handlers are the enforcement layer.
- Localization & theming — the string-key conventions and design-token rules.
- Dev workflow & gotchas — how to run the project and the mistakes to avoid.
Using it effectively
A few habits get the most out of the guide:
- Let the agent read it first. Most tools load
AGENTS.mdautomatically; if not, point your assistant at it before asking for a feature. - Lean on types and IntelliSense. The guide is deliberately concise — for the full surface of any component or service, the agent can read the TypeScript definitions (React) or XML-doc IntelliSense (Blazor).
- Reference this site. Point the agent at the live examples and API reference here on the demo for patterns it can copy.
- Review the output. The guide makes an agent more accurate, but it doesn't replace your review — check generated security rules and data filtering in particular.
For example, a request like this gives an agent everything it needs to produce idiomatic code:
Add a page that lists ppp_widget records in a MainGrid and lets the user open one to edit it in a RecordContext form. Follow the conventions in AGENTS.md, and make sure widgets are filtered to the current user.
Make it yours
AGENTS.md is an ordinary file in your repository — edit it. Add your own tables and relationships, domain rules, naming conventions, and project-specific patterns so the agent learns your portal, not just the framework. The better the file reflects your codebase, the better the generated code.
Tip
Treat
AGENTS.mdas living documentation: when you establish a new convention or hit a recurring mistake, add a line to the file so every future AI session benefits.
