Project: ManagedCode.Tps Stack: Node.js static documentation site plus .NET 10 solution with xUnit on VSTest
Follows MCAF
This file defines the global rules for AI agents working in this repository.
- Keep one root
AGENTS.mdat the repository root. - Read this file first, then read the nearest local
AGENTS.mdbefore editing a project subtree. - Local
AGENTS.mdfiles may tighten root policy, but they must not silently weaken it.
- Repository root:
/Users/ksemenenko/Developer/TPS - Solution file:
SDK/dotnet/ManagedCode.Tps.slnx - Repo-local skills:
.codex/skills/ - SDK root:
SDK/ - Documentation/site surface:
package.jsonscripts/build-site.mjsexamples/public/website/
- SDK projects with local
AGENTS.mdfiles:SDK/ts/SDK/js/SDK/flutter/SDK/swift/SDK/java/SDK/dotnet/src/ManagedCode.Tps/SDK/dotnet/tests/ManagedCode.Tps.Tests/
- Read the solution-root
AGENTS.mdfirst. - Read the nearest local
AGENTS.mdfor the area you will edit. - Apply the stricter rule when both files cover the same topic.
- If a local rule appears weaker than root policy, stop and clarify before editing.
- Document justified exceptions explicitly in the nearest durable doc:
- local
AGENTS.md docs/Architecture.md- ADR or feature doc when those exist
- local
- Use
ManagedCode.Tpsas the namespace, project, and solution prefix for .NET artifacts. - Keep the
.NETruntime as the canonical TPS implementation and module layout that other runtimes mirror where practical. - Keep repo-local agent skills under
.codex/skills/. - Keep architecture and workflow guidance durable and versioned in the repository.
- Keep all active TPS runtimes feature-aligned: each runtime must expose spec constants, validation APIs, compiler APIs, and player APIs.
- Keep SDK implementation, runtime docs, ADRs, and per-language code grouped under
SDK/. - Keep shared fixtures and runtime-manifest-driven CI under
SDK/so future runtimes can join without reorganizing the repo again.
- Do not move
AGENTS.mdout of the repository root. - Do not add repo-local skills under
.claude/,.agents/, or other agent roots for this repository. - Do not add stale or superseded MCAF skill folders when updating the repo-local skill set.
Record durable user rules here instead of relying on chat history.
- Update this file when the user gives a lasting requirement, correction, workflow change, or repeated preference.
- Do not record one-off task instructions as durable policy.
- Prefer updating an existing rule over adding duplicates.
List only the skills this repository should actively use.
mcaf-solution-governance— maintain root and project-localAGENTS.mdfiles, rule precedence, and project boundaries.mcaf-solid-maintainability— keep maintainability limits, exception handling, and refactor expectations explicit.mcaf-architecture-overview— create or updatedocs/Architecture.mdand keep module maps current.mcaf-ci-cd— review or update CI/CD workflows and deployment-quality gates.mcaf-code-review— tighten review expectations and PR hygiene.mcaf-testing— choose test scope, regression strategy, and user-flow coverage.dotnet-quality-ci— .NET analyzer, formatting, coverage, and quality-gate changes.dotnet-xunit— xUnit and VSTest guidance for the .NET test project.dotnet-mcaf-devex— developer-experience and onboarding guidance.dotnet-mcaf-documentation— durable documentation structure and navigation.dotnet-mcaf-source-control— source-control workflow and branch/commit rules.
build:npm run buildtest:npm run testformat:dotnet format SDK/dotnet/ManagedCode.Tps.slnx --verify-no-changesanalyze:dotnet build SDK/dotnet/ManagedCode.Tps.slnx -warnaserrorcoverage:npm run coverage:sdk
.NET execution details:
- Test framework: xUnit
- Runner model: VSTest
- Coverage driver:
coverlet.msbuildwith explicit threshold gates - Analyzer and formatting source of truth: repo-root
.editorconfig - Do not pin
LangVersionunless the repository intentionally diverges from the SDK default.
- This is a multi-project solution and must keep one root
AGENTS.mdplus one localAGENTS.mdin each project root. - Each local
AGENTS.mdmust document:- project purpose
- entry points
- boundaries
- project-local commands
- applicable skills
- local risks or protected areas
- Local files may tighten root rules, but must not weaken them silently.
file_max_loc:400type_max_loc:200function_max_loc:50max_nesting_depth:3exception_policy:Document any justified exception in the nearest AGENTS file, ADR, or feature doc with the reason, scope, and removal plan.
- Start non-trivial work from
docs/Architecture.mdand the nearest localAGENTS.md. - For non-trivial tasks, create a root-level
<slug>.brainstorm.mdbefore implementation. - After the direction is chosen, create a root-level
<slug>.plan.md. - Keep the plan current while work is in progress.
- Include verification steps in the ordered plan from the start.
- Run focused verification first, then broader verification, then the full required regression set.
- If a task changes .NET production code, run the repo-defined quality pass:
formatbuildanalyze- focused
test - broader
test coverage
- Summarize the change, remaining risks, and verification evidence before marking the task complete.
- Durable repository documentation lives in
docs/. - SDK-specific architecture, ADRs, and language rollout docs live in
SDK/docs/. - Runtime-facing usage docs live in
SDK/README.mdandSDK/<Language>/README.md. - Site pages must be generated from canonical checked-in source documents instead of hand-maintained duplicated prose inside the site builder.
- Preferred source mapping:
/fromREADME.md/glossary/fromdocs/Glossary.md/sdk/fromSDK/README.mdplusSDK/manifest.json/skills/fromREADME.mdAI Skills content and the canonical files underSkills/
- If a page needs copy that does not fit an existing source document, add a dedicated versioned markdown source file first and generate from that file.
- GitHub Actions workflows stay compact by delivery surface:
.github/workflows/ci.ymlfor SDK quality, runtime build/test, and coverage stages.github/workflows/pages.ymlfor site publishing.github/workflows/release.ymlfor versioned GitHub releases
docs/Architecture.mdis the global architecture map for this repository.- Architecture docs, feature docs, and ADRs must include Mermaid diagrams when they describe non-trivial structure or flow.
- Keep one canonical source of truth for each important fact and link rather than duplicating.
- Update docs when behavior, topology, or verification flow changes.
- TDD is the default for new behavior and bug fixes.
- Bug fixes start with a failing regression test when practical.
- Test user-visible behavior and boundary contracts, not only internal implementation details.
- Prefer realistic verification over mock-heavy tests.
- Flaky tests are failures and must be fixed, not ignored.
- Active runtime CI coverage gates must stay at or above 90% unless an ADR explicitly changes that policy.
- Repository or module coverage must not go down without an explicit written exception.
- The task is not done until the full relevant test suite is green.
- Follow SOLID by default.
- Keep responsibilities explicit and boundaries narrow.
- Use
.editorconfig, project files, and checked-in docs as the durable source of tooling truth. - Keep names, namespaces, and future .NET projects under the
ManagedCode.Tpsprefix unless a documented exception is approved. - Every TPS runtime library must publish a clear list of spec constants for keywords, tags, emotions, metadata keys, and other validation-critical terms.
- Do not introduce magic string literals, repeated catalog literals, or inline public catalog numbers for TPS spec terms, statuses, diagnostic codes, emotion names, palette keys, recommended WPM values, rhythm ranges, or similar runtime-contract data; define and reuse named constants or named catalog values.
- Every TPS runtime library must include TPS format validation that reports actionable diagnostics for invalid structure, unknown tags, malformed attributes, and other authoring errors.
- Keep each runtime in its own language folder under
SDK/, and keep SDK design/testing/ADR documentation underSDK/docs/. - Design CI so the active runtime set is extensible beyond JavaScript, TypeScript, and C#, with future language additions enabled by configuration instead of ad hoc workflow rewrites.