Teams
Authoring Shared Content
Mapping rules live inside your content files so they travel with the content. Markdown and text files use YAML frontmatter; rich-text files use a small sidecar. Here’s the exact syntax.
You can write these rules by hand, or let Learning Mode add them for you when you assign a shared-folder snippet to a page. Either way, the format is the same.
Frontmatter (.md and .txt)
Put a YAML block at the very top of the file, fenced by --- lines. Everything below the closing fence is your content.
---
title: "Stripe Billing Dashboard"
match:
- url: "https://dashboard.stripe.com/billing/*"
- url: "https://dashboard.stripe.com/billing"
anchor: "payment-methods"
- url: "https://help.stripe.com/*"
tags: [stripe, billing, payments]
---
# Billing dashboard
- Lead with the metric they asked about
- Show the invoice, then the retry logic
- Mention **Smart Retries** if churn comes upFields
title— optional display name for the snippet.match— a list of rules. Each has aurlpattern (see Mappings for wildcard and normalization rules) and an optionalanchorto target a specific element. A rule with noanchormaps the whole page.tags— optional list of tags, written inline as[tag1, tag2].
Forgiving about formatting
Always close the fence
--- is required. If it’s missing, Promptr treats the file as having no frontmatter (your content is preserved, but the rules are ignored). When in doubt, confirm both fences are present.Sidecars (.rtf and .rtfd)
Rich-text files can’t hold frontmatter, so their rules go in a sidecar file inside a hidden .promptr-mappings directory at the folder root. The sidecar mirrors the content file’s path and adds .yaml:
SharedFolder/
├── Webinar.rtf
├── demos/
│ └── Onboarding.rtfd
└── .promptr-mappings/ (hidden; created automatically)
├── Webinar.rtf.yaml
└── demos/
└── Onboarding.rtfd.yamlThe sidecar is plain YAML — the same fields as frontmatter, but with no --- fences:
title: "Q4 Roadmap Webinar"
match:
- url: "https://company.slack.com/archives/*"
- url: "https://app.slack.com/client/*"
anchor: "roadmap"
tags: [webinar, company-meeting]Learning Mode keeps these in sync
Anchors in practice
An anchor is matched case-insensitively as a substring of the element’s text, selector, or aria-label (or an exact match against its test id). Keep anchors short and distinctive — a value like payment-methods is more reliable than a common word that could appear in many places.