Provide model-agnostic operating instructions for AI agents working in this repository.
Use this file before making or reviewing repository changes.
| Path | Contains | Use it to |
|---|---|---|
.ai/principles.md |
why the code is shaped this way | resolve a judgment call |
.ai/constraints.md |
hard prohibitions | know what is never acceptable |
.ai/prompts/ |
task entry points | start work when you know what to build |
.ai/workflows/ |
multi-phase procedures with gates | start work when you must first find something out |
.ai/skills/ |
domain procedures with mandatory rules | do or review work in one domain |
.ai/knowledge/ |
shared context and patterns | understand how the system works |
.ai/glossary/ |
the domain vocabulary | name things the way this domain names them |
.ai/standards/ |
binding conventions | name, format, structure, and ship a change |
.ai/checklists/ |
cross-cutting gates | verify a change before calling it done |
.ai/examples/ |
worked walkthroughs of shipped code | see the rules applied before writing new code |
.ai/templates/ |
copy-ready skeletons | scaffold a plugin, theme, or migration |
Start from a prompt or a workflow. It names the skills, knowledge, standards, and templates to load. Use a prompt when the goal is known; use a workflow when the cause, bottleneck, or path is not.
.ai/constraints.md and .ai/glossary/renamed-terms.md apply to every change and are worth reading once in full.
- Use
.ai/prompts/review-change.mdto review a pull request or diff against all applicable skills. - Use
.ai/prompts/implement-feature.mdto implement or change a feature across layers. - Use
.ai/prompts/create-plugin.mdto scaffold a new installable plugin. - Use
.ai/prompts/create-theme.mdto create a storefront theme or add view overrides to one. - Use
.ai/prompts/add-migration.mdto add an upgrade migration for existing installations. - Use
.ai/prompts/write-tests.mdto add or extend unit tests. - Use
.ai/prompts/explore-repository.mdto answer "where does X live" or "how does X work".
Use a workflow when the answer is not known at the start. Each ends by handing off to a prompt.
- Use
.ai/workflows/fix-bug.mdwhen something is broken and the cause is unknown — reproduce, find the cause, choose a fix, assess risk, test, verify. - Use
.ai/workflows/investigate-performance.mdwhen something is slow and the bottleneck is unknown — define, measure, explain, fix, re-measure. - Use
.ai/workflows/refactor-safely.mdto change structure without changing behavior. - Use
.ai/workflows/upgrade-dependency.mdto move a NuGet package, framework, or shared version. - Use
.ai/workflows/respond-to-review.mdto work through review feedback, including automated findings.
- Use
.ai/skills/architecture-review.mdfor design, layering, dependency, module boundary, public contract, and maintainability reviews. - Use
.ai/skills/security-review.mdfor authentication, authorization, input handling, secrets, cryptography, sensitive data, and trust-boundary reviews. - Use
.ai/skills/dotnet-review.mdfor C#, .NET, ASP.NET Core, MongoDB repository usage, NuGet, MSBuild, and .NET test reviews. - Use
.ai/skills/database-review.mdfor migrations, schema, indexes, queries, transactions, ORM mappings, and data integrity reviews. - Use
.ai/skills/mongodb-review.mdfor MongoDB collections, filters, projections, indexes, repository queries, aggregations, updates, and data migrations. - Use
.ai/skills/plugin-module.mdfor GrandNode plugins and modules, including provider plugins, themes, API modules, migrations, and installer behavior. - Use
.ai/skills/plugin-shipping.mdfor shipping rate calculation plugins (IShippingRateCalculationProvider), GetShippingOptions, ShippingOption, ShippingRateCalculationType, and IShipmentTracker. - Use
.ai/skills/plugin-payment.mdfor payment method plugins (IPaymentProvider), Standard vs Redirection flow, ProcessPayment, Capture, Refund, Void, and PaymentTransaction status. - Use
.ai/skills/plugin-widget.mdfor widget plugins (IWidgetProvider), GetWidgetZones, view components, widget zone names, and GDPR consent gating. - Use
.ai/skills/plugin-discount-rules.mdfor discount rule plugins (IDiscountProvider, IDiscountRule), CheckRequirement, DiscountRule.Metadata, and rule configuration controllers. - Use
.ai/skills/template-creation.mdfor Razor views, layouts, partials, view components, plugin views, theme overrides, Vue-in-Razor templates, PDF templates, and DotLiquid message templates. - Use
.ai/skills/theme-creation.mdfor storefront themes: IThemeView, GetViewLocations fallback, theme view folders, theme _ViewImports, theme Content assets, and theme project setup. - Use
.ai/skills/frontend-bundle-workflow.mdfor Vue/Vite build, theme CSS changes, when to runnpm run build, bundle output files, and committing bundles alongside source. - Use
.ai/skills/admin-area-changes.mdfor admin-facing changes that may affect Main Admin, Store Owner, Vendor, shared admin models, permissions, navigation, validation, or scoped data access. - Use
.ai/skills/project-structure.mdto understand repository structure, technology ownership, layer responsibilities, and how to expand GrandNode consistently. - Use
.ai/skills/settings-and-localization.mdfor settings classes, store-scoped overrides, ISettingService, localization resources, ITranslationService, IPluginTranslateResource, localized domain entities, and localized admin models. - Use
.ai/skills/message-notification.mdfor message templates, DotLiquid tokens and drops, IMessageProviderService, queued email lifecycle, LiquidObjectBuilder, MessageTokensAddedEvent plugin extension, and domain event notification handlers. - Use
.ai/skills/scheduled-task.mdfor scheduled task classes, IScheduleTask, AddKeyedScoped registration, ScheduleTask seed, multi-instance distributed locking, error handling, and task migrations. - Use
.ai/skills/permission-navigation.mdfor permissions, PermissionSystemName, PermissionActionName, StandardPermission, PermissionProvider, controller authorization attributes, AdminSiteMap entries, and permission or navigation migrations. - Use
.ai/knowledge/async.mdfor async/await patterns, CancellationToken, Task vs ValueTask, and blocking anti-patterns. - Use
.ai/knowledge/mongodb.mdfor IRepository usage, query patterns, partial updates, and write conventions. - Use
.ai/knowledge/performance.mdfor ICacheBase, CacheKey constants, cache invalidation, pagination, and partial field writes. - Use
.ai/knowledge/security.mdfor authorization checks, FluentValidation patterns, guard clauses, HTML encoding, and safe MongoDB queries. - Use
.ai/knowledge/architecture.mdfor layering rules, DI lifetimes, mediator commands/queries, and domain events. - Use
.ai/knowledge/request-lifecycle.mdfor startup, IStartupApplication priorities, middleware order, ContextMiddleware, and the controller-to-view path. - Use
.ai/knowledge/scoping.mdfor store, vendor, customer group, language, and currency boundaries, and for code that runs without ambient context. - Use
.ai/knowledge/caching.mdfor ICacheBase, CacheKey constants, key composition, and invalidation including cross-family clearing. - Use
.ai/knowledge/domain-events.mdfor commands vs queries vs notifications, entity events, and notification handler rules. - Use
.ai/knowledge/tests.mdfor MSTest + Moq patterns, test structure, validator testing, and controller test setup. - Use
.ai/knowledge/dotnet.mdfor C# idioms: records, guard clauses, result objects, pattern matching, nullable types, and configuration binding. - Use multiple skills when a change crosses domains.
Use the domain's own vocabulary. GrandNode renamed much of the nopCommerce terminology; the old word produces types that read as foreign and searches that find nothing.
- Read
.ai/glossary/renamed-terms.mdbefore naming anything — Brand not Manufacturer, Page not Topic, Customer group not Customer role, Merchandise return not Return request, Loyalty points not Reward points, User field not Generic attribute. - Use
.ai/glossary/entity-model.mdfor base entity types, marker interfaces, user fields, localized properties, and slugs. - Use
.ai/glossary/catalog.mdfor products, product types, category/brand/collection, product vs specification attributes, pricing, and inventory. - Use
.ai/glossary/sales.mdfor cart, order, the three order statuses, payment transactions, shipping, merchandise returns, discounts, and loyalty points. - Use
.ai/glossary/customers.mdfor customers, groups, tags, vendors, sales employees, affiliates, and the four party boundaries. - Use
.ai/glossary/platform.mdfor stores, localization, settings, permissions, SEO, CMS content, media, messaging, and tasks.
- Read
.ai/principles.mdfor the reasoning behind the codebase's shape; use it when two valid approaches conflict. - Read
.ai/constraints.mdfor hard prohibitions. A violation is a defect, not a trade-off to weigh.
Standards are binding. When a standard and the closest existing file disagree, follow the existing file and say so.
- Use
.ai/standards/naming.mdfor project, type, file, key, and member naming, including plugin system names, setting keys, localization keys, and cache key constants. - Use
.ai/standards/csharp-style.mdfor formatting enforced by.editorconfig, file layout, constructor injection, guards, and what not to introduce. - Use
.ai/standards/razor-frontend.mdfor Razor conventions, Vue-in-Razor rules, storefront data attributes, admin tag helpers, and asset placement. - Use
.ai/standards/git-and-pr.mdfor branches, commit format, the pull request template, and the pre-PR checklist. - Use
.ai/standards/dependencies.mdfor central package management, shared MSBuild props, project references, output paths, and SDK selection.
Skills carry their own domain checklists; these cover what no single skill owns.
- Run
.ai/checklists/definition-of-done.mdon every change before reporting it complete. - Run
.ai/checklists/code-review.mdwhen reviewing a diff, including your own before opening a PR. - Run
.ai/checklists/security.mdwhen the change touches auth, input, scoped data, secrets, payments, or file handling. - Run
.ai/checklists/performance.mdwhen the change adds a query, iterates entities, or touches a render path. - Run
.ai/checklists/data-change.mdwhen the change touches entities, migrations, settings, resources, permissions, or persisted identities. - Run
.ai/checklists/plugin-release.mdbefore shipping a plugin or theme.
- Use
.ai/examples/cached-store-scoped-service.mdfor the canonical business service: read-through cache, store scope, invalidation, entity events. - Use
.ai/examples/payment-plugin-walkthrough.mdfor a complete plugin, file by file, from manifest to admin configuration screen. - Use
.ai/examples/theme-override-walkthrough.mdfor how a theme overrides a subset of views and what falls through to defaults. - Use
.ai/templates/plugin/base-plugin.mdfor the files every installable plugin needs. - Use
.ai/templates/plugin/admin-configuration.mdfor a plugin's admin configuration screen. - Use
.ai/templates/theme/theme-plugin.mdfor a storefront theme skeleton. - Use
.ai/templates/migration.mdfor an upgrade migration skeleton.
Templates are the shape; skills are the contract. Read the skill first, then diff the scaffold against the closest shipped plugin in src/Plugins/.
- Read the user's goal before inspecting files.
- Load the matching prompt from
.ai/prompts/or workflow from.ai/workflows/, plus the skills and standards it names. - Inspect existing repository patterns before proposing changes.
- Use the domain vocabulary from
.ai/glossary/when naming anything. - Keep changes limited to the requested scope.
- Preserve user work and unrelated local changes.
- Prefer existing abstractions, conventions, and test utilities.
- Validate changes with the narrowest meaningful build or test command when execution is available.
- Run the applicable checklists from
.ai/checklists/before reporting completion. - Report commands that were run and any commands that could not be run.
- Provide concrete file references for findings or changes.
.ai/constraints.md holds the full list of hard prohibitions. The ones that govern agent behavior itself:
- Never overwrite unrelated changes.
- Never invent requirements or repository conventions.
- Never broaden scope without a clear reason.
- Never leave generated, temporary, or diagnostic artifacts unless they are part of the requested output.
- Never report a change as verified when it was not.
Return a concise result that states what changed, what was reviewed, what was validated, and what risk remains.