agentleFS
MicrosoftKnown publishermicrosoft/Copilot-Managed-Runtime/samples/LearningHub/AGENTS.md

Copilot-Managed-Runtime / LearningHub

AGENTS.md4 starsChanged 8 days agoMITView on GitHub

Guidance for coding agents working in this repository. Learning Hub is a React 19 + Vite + TypeScript app for a recurring learning series: past sessions, sign-ups for upcoming dates, and topic requests with votes. It is hosted on Copilot Managed Runtime (@microsoft/cmr-apps packages, ms CLI) and uses the Office 365 Users connector for people. - Storage boundary. Read and write data only through src/storage (collections and key/value stores from useAppStorage() or an AppStorage passed in). Never use localStorage, sessionStorage…

  • Reads credentials
  • Installs packages

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Storage boundary: Read and write data only through src/storage (collections and key/value stores from useAppStorage() or an AppStorage …

    line 26
  2. Very specific:

    Connector boundary: Only src/connectors/* imports generated/.

    line 30
  3. Very specific:

    Keep domain logic in src/lib testable with createMemoryProvider().

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Guidance for coding agents working in this repository.

What this is

Learning Hub is a React 19 + Vite + TypeScript app for a recurring learning series: past sessions, sign-ups for upcoming dates, and topic requests with votes. It is hosted on Copilot Managed Runtime (@microsoft/cmr-apps packages, ms CLI) and uses the Office 365 Users connector for people.

Layout

PathWhat lives there
src/pages/One component per route (Home, Present, Topics, SessionDetail, Person, Settings).
src/components/Presentational pieces (cards, dialogs, pickers). No storage or connector calls.
src/lib/Domain logic and hooks: sessions.ts, topics.ts, pastSessions.ts, sampleData.ts, optimistic writes (*Actions.ts), router.ts (hash routes and deep links), share.ts, time.ts, logger.ts, safeUrl.ts.
src/storage/collections.ts (zod schemas, the source of truth for stored data), index.ts (provider registry and createStorage()), edit.ts (conflict-safe read-modify-write).
src/storage/core/Shared storage core, synced from upstream. Do not edit.
src/connectors/App-owned adapters: users.ts (directory interface) with office365Users.ts, and host.ts with managedAppsHost.ts. The only code allowed to import generated/ or @microsoft/cmr-apps/*.
src/config.tsTyped VITE_* configuration with defaults; documented in .env.example.
scripts/check-setup.mjs (runs before dev/build) and storage-describe.ts.

Rules

  • Storage boundary. Read and write data only through src/storage (collections and key/value stores from useAppStorage() or an AppStorage passed in). Never use localStorage, sessionStorage or indexedDB directly; ESLint enforces this outside src/storage/core/providers/.
  • Connector boundary. Only src/connectors/* imports generated/. Everything else depends on the adapter interface (UsersDirectory in src/connectors/users.ts) so tests can use createFakeUsersDirectory(). generated/ and .ms/ are created by the setup skill and committed to the user's own app repository, never to this sample.
  • People are stored by directory user id, never by email.
  • Links from data or connectors go through safeUrl().
  • No authorization in the browser. With local storage the user owns their data. Shared backends enforce permissions server-side (see the add-data-source skill).
  • Logging goes through src/lib/logger.ts (no-op in production); never log payloads or identities.
  • Keep domain logic in src/lib testable with createMemoryProvider(); add tests in src/test/.

Skills

  • .github/skills/setup-learninghub/SKILL.md: first-time setup (ms auth login, ms app init to create ms.config.json, ms app set-setting --show-header false, add the Office 365 Users connector, .env.local, check-setup). The sample ships without ms.config.json.
  • .github/skills/add-data-source/SKILL.md: move storage from the browser to SharePoint, Dataverse or a custom API.

Both are mirrored under .claude/skills/.

Commands

npm install
npm test                  # vitest; works without generated/
npm run lint              # eslint; works without generated/
npm run typecheck         # tsc -b; needs generated/ (setup skill)
npm run check-setup       # verifies ms.config.json (from `npx ms app init`) and generated connector code
npm run dev               # vite dev server (via `npx ms app dev` for the hosted player)
npm run build             # check-setup + typecheck + vite build
npm run storage:describe  # JSON Schema for every collection

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.