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
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository38 other files it gives its agents.
- github-actions/AGENTS.mdAGENTS.md
- plugins/copilot-managed-runtime/AGENTS.mdAGENTS.md
- samples/CodeFlow/AGENTS.mdAGENTS.md
- samples/TaskManager/AGENTS.mdAGENTS.md
- add-azuredevopsSkill
- add-backendSkill
- add-data-sourceSkill
- add-dataverseSkill
- add-excelSkill
- add-mcscopilotSkill
- add-office365Skill
- add-office365-usersSkill
- add-onedriveSkill
- add-sharepointSkill
- add-teamsSkill
- add-workiqSkill
- create-appSkill
- delete-appSkill
- deploySkill
- devSkill
- list-appsSkill
- list-connectorsSkill
- playSkill
- share-linkSkill
- shareSkill
- stateSkill
- add-data-sourceSkill
- setup-codeflowSkill
- add-data-sourceSkill
- setup-codeflowSkill
- add-data-sourceSkill
- setup-learninghubSkill
- add-data-sourceSkill
- setup-learninghubSkill
- add-data-sourceSkill
- setup-taskmanagerSkill
- add-data-sourceSkill
- setup-taskmanagerSkill
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
- Very specific: line 26
Storage boundary: Read and write data only through src/storage (collections and key/value stores from useAppStorage() or an AppStorage …
- Very specific: line 30
Connector boundary: Only src/connectors/* imports generated/.
- Very specific: line 39
Keep domain logic in src/lib testable with createMemoryProvider().
≈ “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.
Files
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
| Path | What 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.ts | Typed 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 fromuseAppStorage()or anAppStoragepassed in). Never uselocalStorage,sessionStorageorindexedDBdirectly; ESLint enforces this outsidesrc/storage/core/providers/. - Connector boundary. Only
src/connectors/*importsgenerated/. Everything else depends on the adapter interface (UsersDirectoryinsrc/connectors/users.ts) so tests can usecreateFakeUsersDirectory().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/libtestable withcreateMemoryProvider(); add tests insrc/test/.
Skills
.github/skills/setup-learninghub/SKILL.md: first-time setup (ms auth login,ms app initto createms.config.json,ms app set-setting --show-header false, add the Office 365 Users connector,.env.local,check-setup). The sample ships withoutms.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 collectionDoes 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
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.

