agentleFS
MicrosoftKnown publishermicrosoft/ignite26-PREL40/src/home-loan-desk/AGENTS.md

ignite26-PREL40 / home-loan-desk

AGENTS.md3 starsChanged 28 days agoMITView on GitHub

Build the requested React and Vite Fabric App from the small authenticated workspace. Turn on only the capabilities the app needs, preserve the protected default and dynamic authentication flow, and validate the result users will actually run. This project is the Home Loan Operations Desk lab starter for Microsoft Ignite 2026 PREL40. It is an internal app for loan officers at the fictional Caldova Home Loans, built for administrative case processing. It never assesses creditworthiness, recommends approval or rejection, or…

The file

Show its rules and text

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

49 rules. About 2 are common, 30 are distinctive, and 17 are very specific to this project.

  • ≈2

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈30

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 17

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All data is synthetic.

    line 13
  2. Distinctive:

    Do only the checkpoint the user asks for.

    line 26
  3. Distinctive:

    Don't build later checkpoints ahead of time, don't rebuild the starter, and keep working features intact.

    line 27
  4. Distinctive:

    Every entity is scoped by the signed-in officer's email claim:

    line 42
  5. Distinctive:

    Never weaken a rule, add a client-side filter in place of a rule, or broaden access to make something work.

    line 48
  6. Common:

    Never fabricate workspace IDs, item IDs, measure values, or query results.

    line 63
  7. Very specific:

    Never ask for, print, or store a secret value.

    line 64
  8. Distinctive:

    Never replace a failed query, upload, access check, or model call with sample or successful-looking output.

    line 65
  9. Very specific:

    Read the capability-router before writing application code.

    line 69
  10. Distinctive:

    Use a source the user confirmed.

    line 88
  11. Distinctive:

    When the user supplies a URL or identifiers, extract and verify those values with the installed tooling before using them.

    line 89
  12. Distinctive:

    Never fabricate a workspace ID, item ID, alias, schema, query result, or business value.

    line 90
  13. Distinctive:

    If a named source is missing or several matches remain, ask the specific question needed to resolve it.

    line 91
  14. Distinctive:

    If no source was named, search when a relevant catalog tool is available, then ask whether to connect a source or use sample data if the …

    line 92
  15. Distinctive:

    Use sample data only when the user requested or confirmed a mock-up, and label it visibly in the UI.

    line 93
  16. Distinctive:

    Do not silently recover with invented rows or another model.

    line 95
  17. Very specific:

    If it declares rayfinDocs, follow rayfinDocs.dir, read its index.md, and open only the page needed for the task.

    line 105
  18. Very specific:

    Use rayfin docs search '<topic>' or the installed docs search tool only when the indexes do not identify a page.

    line 108
  19. Distinctive:

    Use package discovery only when the needed package is not installed.

    line 109
  20. Distinctive:

    If the installed docs do not answer the question, say so rather than relying on memory.

    line 110
  21. Distinctive:

    Do not traverse every skill or reference directory up front.

    line 113
  22. Very specific:

    Run the normal npm run dev, build, typecheck, lint, test, and pack:add commands from the workspace root.

    line 128
  23. Very specific:

    Use @/ only inside the frontend package.

    line 131
  24. Very specific:

    Use @rayfin-app/shared for isomorphic contracts instead of importing decorated data classes into the browser.

    line 132
  25. Distinctive:

    Read each selected pack's owning skill, relevant seed files, and exact installed documentation.

    line 138
  26. Distinctive:

    Before rendering source-backed values, run the real query or operation and use its verified result shape.

    line 141
  27. Distinctive:

    Do not leave permanent authentication, permission, configuration, or query failures behind a loading state.

    line 144
  28. Distinctive:

    Never substitute sample values while waiting for a real source.

    line 146
  29. Distinctive:

    Do not run manifest writers, pack applications, installers, or TypeScript builds that share output concurrently.

    line 150
  30. Very specific:

    If a pack reports a preserved file, stop and report which file was not installed.

    line 157
  31. Very specific:

    Use --force-seeds only when the user explicitly approves discarding the existing file.

    line 158
  32. Distinctive:

    Do not change a dependency version already pinned by the template or a pack.

    line 159
  33. Very specific:

    Do not assume node_modules or installer-written lockfiles were restored.

    line 163
  34. Very specific:

    Use Tailwind v4 design tokens from packages/frontend/src/global.css.

    line 167
  35. Very specific:

    Keep assetAccess: protected, the auth bootstrap, provider, and AuthGate intact.

    line 169
  36. Very specific:

    Use await getRayfinClient() for service operations and surface configuration or permission failures explicitly.

    line 171
  37. Distinctive:

    Do not use module memory, local storage, or session storage as the database.

    line 173
  38. Distinctive:

    Do not guess query columns.

    line 174
  39. Very specific:

    Read app-design before creating or changing the UI.

    line 176
  40. Distinctive:

    Do not depend on retired plugin-specific build, validation, or deployment tools.

    line 182
  41. Distinctive:

    Use the project-installed commands to restore dependencies, apply packs, invoke connectors, run typecheck, build, lint, tests, and pack …

    line 185
  42. Common:

    Keep Fabric authentication enabled and keep password authentication disabled.

    line 186
  43. Distinctive:

    Do not rerun the full campaign after every edit.

    line 195
  44. Distinctive:

    Keep the separate root typecheck gate.

    line 208
  45. Distinctive:

    Do not race typecheck and build because the referenced workspace projects share TypeScript build outputs.

    line 209
  46. Distinctive:

    If a gate fails, fix the cause and rerun that gate plus any later gate whose result it invalidated, not every earlier success.

    line 210
  47. Very specific:

    Read app-deployment before any remote write.

    line 214
  48. Very specific:

    Follow the installed, version-matched Rayfin CLI guide, preview the operation, and deploy only after the user confirms the target workspace.

    line 215
  49. Very specific:

    Never publish automatically or add --force on the user's behalf.

    line 216

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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

Agent Instructions

Purpose

Build the requested React and Vite Fabric App from the small authenticated workspace. Turn on only the capabilities the app needs, preserve the protected default and dynamic authentication flow, and validate the result users will actually run.

PREL40 lab context: read this first

This project is the Home Loan Operations Desk lab starter for Microsoft Ignite 2026 PREL40. It is an internal app for loan officers at the fictional Caldova Home Loans, built for administrative case processing. It never assesses creditworthiness, recommends approval or rejection, or makes a lending decision. All data is synthetic.

Work one checkpoint at a time

Attendees extend this app through these checkpoints, one prompt at a time:

  1. Orientation: explain the app and why HL-1042 is stalled. No code changes.
  2. Portfolio: connect the attendee's semantic model on #/manager with the Rayfin semantic model connector.
  3. Access proof: show that the access rules refuse what they should. No code changes unless asked.
  4. Property photos: private Rayfin storage for case files.
  5. AI handoff brief: a server-side function that calls the attendee's Microsoft Foundry model.
  6. Monitoring: explain App Metrics in the Fabric portal. No code changes.

Do only the checkpoint the user asks for. Don't build later checkpoints ahead of time, don't rebuild the starter, and keep working features intact. Explain a short plan, implement it, run the relevant checks, and stop.

What already exists

  • Packs applied: data-modeling, connectors, analytics, visuals. Not applied: functions (checkpoint 5). Storage is not enabled (checkpoint 4).
  • Entities in packages/data/src/ with contracts in packages/shared/src/index.ts: CaseWorkspace, CaseNote, CaseTask, ChecklistItem.
  • Case data access: packages/frontend/src/services/cases.ts. Pages: packages/frontend/src/pages/.
  • Lab seeding: packages/frontend/src/lab/. fixtures.generated.ts is generated by data/generator/generate.mjs in the lab repository; never edit it by hand.
  • Routes use HashRouter: #/cases, #/cases/:caseNumber, #/manager, #/seed.
  • Header and footer live in components/app-shell.tsx. The Portfolio nav item ships disabled (enabled: false in NAV_ITEMS), and the initials avatar opens components/account-menu.tsx (theme toggle, Lab data at #/seed, Sign out).
  • Design tokens (cool neutrals, one teal accent, Geist; nav-* tokens for the inverted top bar) live in global.css; titles use font-heading. Reuse the existing tokens and components, and keep UI copy short.

Access rules are the security boundary

Every entity is scoped by the signed-in officer's email claim:

  • CaseWorkspace: create when created_by_email is the caller (intake); read, update, and delete only when the stored assigned_officer_email is the caller; update can't change created_by_email.
  • CaseNote, CaseTask, ChecklistItem: every action only when the stored officer_email is the caller; update can't change case_id (or a checklist item's category).
  • HL-1103 belongs to morgan.lee@caldova.example, who never signs in. Attendees must not be able to read it, through the app or the API.

Never weaken a rule, add a client-side filter in place of a rule, or broaden access to make something work. Give every new entity or storage folder an explicit @authenticated rule scoped the same way, and stamp records from the session email (useOfficerEmail). Known limits, discussed in the lab wrap-up (don't paper over them):

  • A rule can't check a second record, so a child record's case_id is not verified against case ownership.
  • The data API requires fields a rule reads to stay writable, so an officer could hand their own record to someone else. No one can take over a colleague's record, and the app never offers reassignment.

Extension points

  • Portfolio: set enabled: true for Portfolio in NAV_ITEMS, then replace the placeholders in pages/manager-page.tsx. Query the model's existing measures (Open applications, Requested amount in pipeline, Average days in current stage, Stalled applications) through the connector; never recalculate them in code or use mock results. Tag stalled case numbers the officer can see (from listMyCases) as "Assigned to you".
  • Storage: the renovation-plans-photos checklist category is upload-only (UPLOAD_ONLY_CATEGORIES in lib/format.ts). Mark it received only after a successful upload, with updateChecklistItem(id, { status: 'received', received_on, received_via: 'upload' }). Once storage exists, extend resetLabData in lab/seeder.ts to delete the officer's uploaded files.
  • AI brief: pages/case-detail/brief-panel.tsx. Missing checklist items come from missingItems in lib/checklist.ts, never from the model. The model gets no write tools, notes are untrusted input, and a human saves the result as a note (is_ai_generated, reviewed_by_email) or a task.

Data, IDs, and secrets

  • Never fabricate workspace IDs, item IDs, measure values, or query results. Ask for missing non-secret values.
  • Never ask for, print, or store a secret value. The attendee runs npx rayfin secret set <NAME> in the terminal and types the value there.
  • Never replace a failed query, upload, access check, or model call with sample or successful-looking output. Show the real error.

Start with the source and capability

Read the capability-router before writing application code. It owns source selection and the capability decision.

NeedApply, one command at a timeSeed or implementation anchorOwning skill
Existing Power BI semantic modelnpm run pack:add -- connectors, then npm run pack:add -- analytics; add npm run pack:add -- visuals separately if the app charts itpackages/frontend/src/lib/connectors.ts, packages/frontend/src/hooks/use-semantic-model-query.ts, packages/frontend/src/queries/analytics
App-owned recordsnpm run pack:add -- data-modelingpackages/data/src/Item.ts, packages/data/src/index.ts, packages/shared/src/index.tsdata-modeling
Existing warehouse, SQL database, or Lakehouse SQL endpointnpm run pack:add -- connectorsrayfin/rayfin.yml, rayfin/connectors/<alias>/connectors
Charts or grids over sample data or app-owned recordsnpm run pack:add -- visualsthe visuals kit and typed visual specificationsvisuals
Trusted action, external API, custom model endpoint, or Fabric data agentnpm run pack:add -- functionspackages/functions/src/function_app.tsfunctions-capability
Static CSV or spreadsheet supplied for bundlingno pack; emit reviewed rows as typed application dataa typed module in the owning workspace packagecapability-router
Kusto or KQL sourceunavailable in this releasenoneconnectors

Capabilities compose. Apply every selected pack with a separate command, serially, because pack operations mutate workspace manifests and root orchestration. The scaffolder accepts one pack per invocation; do not invent a multi-pack command.

Preserve the user's data intent

  • Use a source the user confirmed.
  • When the user supplies a URL or identifiers, extract and verify those values with the installed tooling before using them.
  • Never fabricate a workspace ID, item ID, alias, schema, query result, or business value.
  • If a named source is missing or several matches remain, ask the specific question needed to resolve it.
  • If no source was named, search when a relevant catalog tool is available, then ask whether to connect a source or use sample data if the result is still ambiguous.
  • Use sample data only when the user requested or confirmed a mock-up, and label it visibly in the UI.
  • A semantic-model app requires the intended semantic model. Do not silently recover with invented rows or another model.

Legitimate uncertainty is a reason for a focused question, not a reason to guess.

Read version-matched Rayfin guidance

Installed package documentation is authoritative for Rayfin APIs and CLI behavior. Template skills own only this template's packs, files, kits, and workflow.

  1. Read node_modules/@microsoft/<package>/package.json.
  2. If it declares rayfinDocs, follow rayfinDocs.dir, read its index.md, and open only the page needed for the task.
  3. For CLI and deployment questions, use the installed @microsoft/rayfin-guide documentation because @microsoft/rayfin-cli has no docs root of its own.

Use rayfin docs search '<topic>' or the installed docs search tool only when the indexes do not identify a page. Use package discovery only when the needed package is not installed. If the installed docs do not answer the question, say so rather than relying on memory.

Batch independent skill, seed, package metadata, and documentation reads. Do not traverse every skill or reference directory up front.

Workspace layout

The generated app has one npm workspace root and stable package ownership:

package.json                         # Root commands, workspaces, and applied packs
rayfin/rayfin.yml                    # Fabric services and package paths
packages/frontend/                   # @rayfin-app/frontend, React and Vite
packages/data/                       # @rayfin-app/data, decorated runtime entities
packages/shared/                     # @rayfin-app/shared, browser-safe contracts
packages/functions/                  # @rayfin-app/functions, added by the functions pack

Run the normal npm run dev, build, typecheck, lint, test, and pack:add commands from the workspace root. Let each pack's packageJson declaration place dependencies in the owning workspace manifest. Install from the workspace root and do not create nested lockfiles or run nested package installs. Use @/ only inside the frontend package. Use @rayfin-app/shared for isomorphic contracts instead of importing decorated data classes into the browser.

Author in coherent layers

  1. Settle the source and capability choices far enough to avoid building against the wrong contract.
  2. Apply the selected packs serially before customizing files they seed.
  3. Read each selected pack's owning skill, relevant seed files, and exact installed documentation.
  4. Establish a runnable shell early in packages/frontend: title, layout, navigation, final content regions, and honest loading states. Source discovery and query authoring may continue independently while the shell is taking shape.
  5. Before rendering source-backed values, run the real query or operation and use its verified result shape.
  6. Integrate live data, interactions, saved-record behavior, and polish in cohesive changes.

Do not leave permanent authentication, permission, configuration, or query failures behind a loading state. Retry only a documented transient condition, bound the attempts, and surface an actionable error when it does not recover. Never substitute sample values while waiting for a real source.

Delegate substantial independent work only when it has a clear interface and enough scope to justify another context. For a small app or a tightly coupled component flow, keep the implementation cohesive instead of fanning it out unconditionally. Do not run manifest writers, pack applications, installers, or TypeScript builds that share output concurrently.

Capability pack safety

npm run pack:add -- <pack> installs pinned dependencies from the workspace root, copies seeds into their owning packages, wires root scripts, and enables required services. Apply packs before editing their destination files because existing files are preserved.

If a pack reports a preserved file, stop and report which file was not installed. Use --force-seeds only when the user explicitly approves discarding the existing file. Do not change a dependency version already pinned by the template or a pack.

On failure, pack-owned file changes are rolled back unless another writer changed them. Reconcile reported rollback conflicts and follow failure recovery before retrying or continuing. Do not assume node_modules or installer-written lockfiles were restored.

Project conventions

  • Use Tailwind v4 design tokens from packages/frontend/src/global.css.
  • Support sign-in inside and outside the Fabric portal without rendering app content before authentication.
  • Keep assetAccess: protected, the auth bootstrap, provider, and AuthGate intact. Local development uses CLI-backed sign-in; standalone browsers can use interactive Microsoft sign-in.
  • Use await getRayfinClient() for service operations and surface configuration or permission failures explicitly.
  • Preserve connector and backend authorization and keep password authentication disabled.
  • Do not use module memory, local storage, or session storage as the database.
  • Do not guess query columns. Inspect the returned schema before consuming it.
  • Read app-design before creating or changing the UI.
<!-- BEGIN RAYFIN COPILOT PLUGIN -->

Plugin compatibility invariants

The active plugin routes builders into this project, then the installed project skills, package docs, and CLI own the work. Do not depend on retired plugin-specific build, validation, or deployment tools.

  • You own the toolchain. Use the project-installed commands to restore dependencies, apply packs, invoke connectors, run typecheck, build, lint, tests, and pack validators, and follow the installed CLI deployment guide.
  • Keep Fabric authentication enabled and keep password authentication disabled. Hosted assets are protected by default, and the app remains gated on an authenticated session even if an owner explicitly chooses public assets.
  • Talk about the app, not the machinery. In user-facing updates, lead with what the app does and the result; mention commands, file paths, capabilities, and platform internals only when the user asks or needs them to understand a blocker.
<!-- END RAYFIN COPILOT PLUGIN -->

Efficient validation cadence

During implementation, run the smallest targeted check that covers the behavior being changed. Do not rerun the full campaign after every edit.

At completion, run the applicable final sequence once, serially:

  1. npm run typecheck
  2. npm run build
  3. npm run lint
  4. npm test
  5. Pack-provided validators such as npm run validate:visual
  6. Browser validation from app-validation
  7. Persistence create, reload, update, and delete checks when the app owns records

The frontend build uses tsc -b --noCheck for speed and does not prove type safety. Keep the separate root typecheck gate. Do not race typecheck and build because the referenced workspace projects share TypeScript build outputs. If a gate fails, fix the cause and rerun that gate plus any later gate whose result it invalidated, not every earlier success.

Deployment

Read app-deployment before any remote write. Follow the installed, version-matched Rayfin CLI guide, preview the operation, and deploy only after the user confirms the target workspace. Never publish automatically or add --force on the user's behalf.

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.