forgetrail 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CONTINUATION_PROMPT.md +42 -0
  2. package/INITIAL_PROMPT.md +214 -0
  3. package/LICENSE +201 -0
  4. package/README.md +198 -0
  5. package/TRACKING_SCHEMA.md +162 -0
  6. package/TRY_FORGETRAIL.md +78 -0
  7. package/WORKFLOW.md +921 -0
  8. package/content/AGENT_INTEGRATION_claude.md +38 -0
  9. package/content/AGENT_INTEGRATION_cursor.md +53 -0
  10. package/content/AGENT_INTEGRATION_generic.md +50 -0
  11. package/content/AGENT_INTEGRATION_grok.md +82 -0
  12. package/content/DEV_AUTOMATION_SCRIPTS.md +103 -0
  13. package/content/FORGETRAIL_LITE.md +1202 -0
  14. package/content/FORGETRAIL_LITE_UPDATES.md +13 -0
  15. package/content/FORGETRAIL_PROGRESS.md +26 -0
  16. package/content/GENESIS_SPEC_PROMPT.md +70 -0
  17. package/content/GENESIS_STUB.md +18 -0
  18. package/content/GREENFIELD_INTAKE.md +76 -0
  19. package/content/KICKOFF_WITHOUT_MCP.md +16 -0
  20. package/content/LITE_WORKFLOW_TRACKING.json +42 -0
  21. package/content/NEW_PROJECT_BOOTSTRAP.md +180 -0
  22. package/content/ONE_CLICK_DEV_SETUP.md +142 -0
  23. package/content/PLAN_MODE_PATTERNS.md +43 -0
  24. package/content/POCKETBASE_SCHEMA_SCRIPT.md +52 -0
  25. package/content/POST_BOOTSTRAP_USER_MESSAGE.md +51 -0
  26. package/content/SCAFFOLD_INSTALL.json +110 -0
  27. package/content/SESSION_RESUME_MCP.md +35 -0
  28. package/content/SYSTEM_HEALTH_CHECKS.md +131 -0
  29. package/content/USER_REPLY_FORMAT.md +41 -0
  30. package/content/cursor-rules/forgetrail-lessons-gate.mdc +30 -0
  31. package/content/cursor-rules/forgetrail-lessons-mcp.mdc +24 -0
  32. package/content/cursor-rules/forgetrail-no-trailer.mdc +49 -0
  33. package/content/cursor-rules/forgetrail-phase-status.mdc +61 -0
  34. package/content/cursor-rules/forgetrail-updates-log.mdc +30 -0
  35. package/content/cursor-rules/spec-completion.mdc +33 -0
  36. package/content/cursor-rules/specs-and-todo.mdc +26 -0
  37. package/content/cursor-rules/url-host-matching.mdc +31 -0
  38. package/content/cursor-rules/us-english.mdc +9 -0
  39. package/content/cursor-rules/user-facing-content.mdc +31 -0
  40. package/content/examples/GENESIS_SAMPLE_mars-habitat-roster.md +154 -0
  41. package/content/forgetrail-workspace-README.md +43 -0
  42. package/content/scripts/forgetrail-dev-launcher.mjs +208 -0
  43. package/content/scripts/forgetrail-env.mjs +51 -0
  44. package/content/scripts/setup-ollama.mjs +207 -0
  45. package/content/scripts/setup-pocketbase.mjs +133 -0
  46. package/content/scripts/test-ollama.mjs +71 -0
  47. package/content/scripts/test-pocketbase.mjs +110 -0
  48. package/content/skills/forgetrail/SKILL.md +92 -0
  49. package/docs/AUTOMATED_TESTING.md +269 -0
  50. package/docs/BLACK_HAT_REPORT.md +143 -0
  51. package/docs/BRAND_AND_PRODUCT.md +381 -0
  52. package/docs/BUGS.md +62 -0
  53. package/docs/BUSINESS_PLAN.md +256 -0
  54. package/docs/CODE_QUALITY.md +170 -0
  55. package/docs/CONTEXT_PROMPT.md +357 -0
  56. package/docs/DEPLOYMENT.md +181 -0
  57. package/docs/DESIGN_SYSTEM.md +414 -0
  58. package/docs/DEV_ESTIMATE.md +127 -0
  59. package/docs/FORGETRAIL_RENAME.md +193 -0
  60. package/docs/IDEAS.md +19 -0
  61. package/docs/MARKETING_GROWTH.md +301 -0
  62. package/docs/NAMING_EXPLORATION.md +406 -0
  63. package/docs/NPM.md +98 -0
  64. package/docs/PHASE_1_BRIEF.md +161 -0
  65. package/docs/README.md +75 -0
  66. package/docs/SPEC_FEATURE_TEMPLATE.md +155 -0
  67. package/docs/SPEC_UI_CHROME_NAV_TEMPLATE.md +48 -0
  68. package/docs/TECHNICAL_REFERENCE.md +836 -0
  69. package/docs/TEST_PLAN.md +467 -0
  70. package/docs/TODO.md +125 -0
  71. package/package.json +68 -0
  72. package/prompts/black-hat-audit.md +235 -0
  73. package/prompts/brand-copy-edit-pass.md +55 -0
  74. package/prompts/cialdini-marketing-audit.md +141 -0
  75. package/prompts/competitor-deep-dive.md +201 -0
  76. package/prompts/docs-alignment-audit.md +108 -0
  77. package/prompts/engineering-skill-library.md +75 -0
  78. package/prompts/landing-page-rewrite.md +63 -0
  79. package/prompts/microcopy-centralization.md +128 -0
  80. package/prompts/panel-usability-audit.md +197 -0
  81. package/prompts/personal-beta-outreach.md +195 -0
  82. package/prompts/pre-launch-audit.md +148 -0
  83. package/prompts/product-feedback-to-spec.md +76 -0
  84. package/prompts/propagate-to-forgetrail.md +315 -0
  85. package/prompts/user-facing-content-sync-audit.md +200 -0
  86. package/prompts/ux-cohesion-audit.md +165 -0
  87. package/scripts/ensure-lease.mjs +23 -0
  88. package/scripts/forgetrail-cli.mjs +85 -0
  89. package/scripts/install-forgetrail-lite.mjs +11 -0
  90. package/scripts/install-forgetrail.mjs +11 -0
  91. package/scripts/install-lib.mjs +115 -0
  92. package/scripts/install.mjs +163 -0
  93. package/scripts/link-global.mjs +100 -0
  94. package/scripts/mcp-lib.mjs +177 -0
  95. package/scripts/mcp-status.mjs +155 -0
  96. package/scripts/publish-gate.mjs +110 -0
  97. package/scripts/rename-to-forgetrail.mjs +273 -0
  98. package/workflow_tracking.json +124 -0
@@ -0,0 +1,108 @@
1
+ # Docs Alignment Audit
2
+
3
+ Run this prompt to verify that all project documentation is accurate and internally consistent. It checks each doc against the actual codebase and cross-checks docs against each other.
4
+
5
+ ---
6
+
7
+ ## The Prompt
8
+
9
+ You are auditing the project documentation suite for accuracy and alignment. The docs to audit are:
10
+
11
+ - `docs/DEPLOYMENT.md`
12
+ - `docs/TECHNICAL_REFERENCE.md`
13
+ - `docs/CODE_QUALITY.md`
14
+ - `docs/BLACK_HAT_REPORT.md`
15
+ - `docs/BUSINESS_PLAN.md`
16
+ - `docs/BRAND_AND_PRODUCT.md`
17
+ - `docs/BUGS.md`
18
+ - `TODO.md`
19
+ - `CONTEXT_PROMPT.md`
20
+ - `.env.example`
21
+
22
+ ## Audit Procedure
23
+
24
+ Work through each section below. For each check, report PASS, FAIL (with specifics), or STALE (accurate but outdated context). Use the codebase as the source of truth.
25
+
26
+ ### 1. DEPLOYMENT.md vs. Codebase
27
+
28
+ Check the "What's Done" and "What's Not Done" sections against what actually exists:
29
+
30
+ - [ ] **Security claims:** For each security item listed as done, verify the code exists. Search for rate limiting, CSRF protection, security headers, input validation schemas, prompt injection guards, parameterized database queries, and file handling sanitization.
31
+ - [ ] **Payment claims:** Verify all payment-related API routes exist. Verify entitlements enforcement exists. Count how many routes import from the entitlements module.
32
+ - [ ] **OAuth claims:** Verify OAuth routes exist. Check that OAuth env vars are referenced in code.
33
+ - [ ] **"Not Done" accuracy:** For each item listed as not done, confirm it's genuinely missing.
34
+ - [ ] **Infrastructure files:** Verify all files listed in deployment sections exist at the stated paths.
35
+ - [ ] **Cost estimates:** Cross-check resource recommendations against actual resource usage patterns.
36
+
37
+ ### 2. TECHNICAL_REFERENCE.md vs. Codebase
38
+
39
+ - [ ] **Env vars table:** Compare every row against `.env.example`. Flag missing vars in either direction.
40
+ - [ ] **API routes:** List all actual API route files. Compare against the documented routes. Flag undocumented or documented-but-missing routes.
41
+ - [ ] **Data model:** Compare collection schemas against setup/migration scripts. Flag missing fields or collections.
42
+ - [ ] **Billing section:** Cross-check plan limits against the entitlements module constants. Verify product/price IDs if referenced.
43
+ - [ ] **Feature descriptions:** Spot-check 3-5 feature descriptions against their actual implementations.
44
+
45
+ ### 3. CODE_QUALITY.md vs. Codebase
46
+
47
+ - [ ] **Remediated items:** For each item listed as fixed, verify the fix exists in code.
48
+ - [ ] **Open findings:** For each open finding, verify it's genuinely still present.
49
+ - [ ] **Severity counts:** Recount Critical/Major/Minor from the open findings and verify the summary table.
50
+
51
+ ### 4. BLACK_HAT_REPORT.md vs. Codebase & TODO
52
+
53
+ - [ ] **Fixed findings:** For each finding marked as fixed, verify remediation code exists.
54
+ - [ ] **Open findings:** For each open finding, verify the vulnerability still exists.
55
+ - [ ] **TODO integration:** Every actionable finding should have a corresponding entry in TODO.md's Security Audit section.
56
+ - [ ] **Priority alignment:** P0 findings should map to Critical + exploitable High. P1 to defense-in-depth. P2 to remaining.
57
+
58
+ ### 5. Cross-Document Consistency
59
+
60
+ - [ ] **DEPLOYMENT.md vs. TECHNICAL_REFERENCE.md:** Do they agree on env vars, API routes, schemas, payment details, and security measures?
61
+ - [ ] **DEPLOYMENT.md vs. TODO.md:** Are items marked "done" in DEPLOYMENT also checked off in TODO? Are "not done" items present as unchecked?
62
+ - [ ] **CODE_QUALITY.md vs. TODO.md:** Are remediated findings reflected as checked in the TODO Foundation section?
63
+ - [ ] **BLACK_HAT_REPORT.md vs. TODO.md:** Are finding statuses synchronized between the report and the Security Audit section of TODO?
64
+ - [ ] **BUSINESS_PLAN.md vs. TECHNICAL_REFERENCE.md:** Do pricing tiers and plan limits match?
65
+ - [ ] **BUSINESS_PLAN.md vs. entitlements code:** Do documented plan limits match the constants in code?
66
+ - [ ] **CONTEXT_PROMPT.md vs. everything:** Does the project context prompt accurately describe the current architecture? Spot-check 5-10 claims.
67
+ - [ ] **.env.example vs. DEPLOYMENT.md:** Does .env.example include all vars referenced in the go-live checklist?
68
+ - [ ] **BUGS.md vs. TODO.md:** Are triaged bugs cross-referenced to TODO entries?
69
+
70
+ ### 6. Staleness Indicators
71
+
72
+ Flag any of these patterns found in any doc:
73
+
74
+ - [ ] Phrases like "not yet done," "planned," "will be added," "TODO" that describe features which now exist
75
+ - [ ] Checked items (`[x]`) that describe features not in the codebase
76
+ - [ ] Unchecked items (`[ ]`) that describe features already implemented
77
+ - [ ] References to old file names, removed files, or restructured paths
78
+ - [ ] Model strings or version numbers that don't match current defaults
79
+
80
+ ## Output Format
81
+
82
+ For each section, output:
83
+
84
+ ```
85
+ ### [Section Name]
86
+ - PASS: [item] - [brief confirmation]
87
+ - FAIL: [item] - [what's wrong and what the correct state is]
88
+ - STALE: [item] - [what's outdated]
89
+ ```
90
+
91
+ End with a summary:
92
+
93
+ ```
94
+ ## Summary
95
+ - Total checks: X
96
+ - Pass: X
97
+ - Fail: X (list file + issue for each)
98
+ - Stale: X (list file + issue for each)
99
+ - Recommended fixes: [prioritized list]
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Usage Notes
105
+
106
+ - Run this audit during Phase 7 (Hardening) and before every release.
107
+ - After running, fix all FAIL items first (incorrect information), then STALE items (outdated but not wrong).
108
+ - This prompt is framework-agnostic — adapt the specific file checks to your project's actual doc structure.
@@ -0,0 +1,75 @@
1
+ # Engineering Skill Library (Principal-Engineer Handoff)
2
+
3
+ Produce a **skill library**: a set of mentoring-style documents that capture the **expert judgment, design rationale, and hard-won lessons** behind a mature codebase, so that a new engineer — or a lower-context / cheaper AI model — can continue the work effectively without re-learning everything the expensive way.
4
+
5
+ Think of it as the handoff a **retiring principal engineer** would write: not "what the code does" (the code shows that) but **why it's built this way, how to decide when the docs run out, and what goes wrong when the conventions are ignored.**
6
+
7
+ Use this when a project has matured enough to have real conventions, real scars, and real judgment worth preserving — typically before a beta/launch, before handing the project to someone else (human or agent), or when onboarding keeps costing the same explanations. It complements the reference docs (`TECHNICAL_REFERENCE.md`, `CONTEXT_PROMPT.md`): where those say *what* and *where*, the skill library says *why* and *what breaks*.
8
+
9
+ > **Companion prompts:** `ux-cohesion-audit.md` and `panel-usability-audit.md` read the *product experience*; `black-hat-audit.md` and the `CODE_QUALITY.md` pass read for *findings to fix*. This prompt reads for *judgment to preserve*. Its output is durable teaching material, not a findings backlog.
10
+
11
+ ---
12
+
13
+ ## How to Use
14
+
15
+ 1. Give this prompt to an AI assistant with **full codebase access**.
16
+ 2. Optionally set `[SCOPE]` (default: the whole app) and `[SKILL_COUNT]` (default: 10–16 documents).
17
+ 3. The assistant audits the repo, then writes one Markdown file per skill under `[docs/skills/]` (or a location you name), plus a short `README.md` index.
18
+ 4. Review, then commit. Keep the library next to the code; when a doc contradicts the code later, the **code is newer** — fix the doc in the same change set.
19
+
20
+ ---
21
+
22
+ ## Instructions
23
+
24
+ You are a **retiring principal engineer** writing a handoff library so the next person or model can operate with your judgment. Ground **everything** in the actual code — real file paths, real function names, real snippets, real past incidents. Generic advice that could apply to any codebase is worthless here; the value is in *this* system's specific decisions and scars.
25
+
26
+ ### Step 1 — Audit before you write
27
+
28
+ Do a genuine, broad audit first. Do **not** write from memory or the conversation summary. Read, in parallel where possible:
29
+
30
+ - **Core shared modules** — the server/lib layer, the cross-cutting helpers (auth, data access, validation, LLM/AI calls, file handling, entitlements/billing). These encode the conventions.
31
+ - **The convention/rules files** — `AGENTS.md` / `CLAUDE.md`, `.cursor/rules/*`, `CONTEXT_PROMPT.md`, contributing docs. Each rule usually exists because of a bug; find the bug.
32
+ - **The failure record** — bug logs, `CODE_QUALITY.md` / security reports, `TODO.md` / `IDEAS.md`, and **`git log`** for fix/regression themes. This is the single richest source of "lessons from costly mistakes."
33
+ - **The specs / decision log** — `specs/` (completed and in-flight) for *why* features are shaped as they are and what tradeoffs were weighed.
34
+ - **Route/component conventions** — pick 2–3 representative examples of each layer and note the repeated shape.
35
+
36
+ > 🔧 **Guidance:** For a large repo, parallelize the audit across sub-areas (server core, docs/failures, each major pipeline, specs, routes) and reconcile the findings before writing. Verify any code snippet you quote against the current file — stale line numbers and imagined APIs destroy trust in a handoff doc.
37
+
38
+ ### Step 2 — Choose the skill set
39
+
40
+ Aim for `[SKILL_COUNT]` focused documents. Cover these categories (merge or split to fit the project; not every project needs all of them):
41
+
42
+ 1. **Architecture & key design decisions** — the one-page mental model plus the load-bearing decisions *with rationale* (what was chosen, what was rejected, why).
43
+ 2. **One document per hairy subsystem** — the data layer, the AI/LLM integration, any document/format pipeline, any scraping/import pipeline, auth/permissions, billing/entitlements. One per subsystem that has real depth or real footguns.
44
+ 3. **Debugging playbooks** — symptom-first guides to the recurring and expensive failures ("works locally, fails in prod" and friends), each with the non-obvious root cause.
45
+ 4. **Security / review checklist** — the standing defenses and the open findings, framed as a pre-ship gate.
46
+ 5. **Testing & verification** — what's automated, what's *deliberately* manual, known-failing tests and why, the pre-commit gate.
47
+ 6. **Process** — spec/workflow lifecycle, git discipline, how work gets planned and finished here.
48
+ 7. **Judgment calls & decision frameworks** — the capstone: "how I decide when the docs don't cover it," the prime directive, and the failure patterns that repeat. This is the highest-value document; write it last, after the others surface the throughlines.
49
+
50
+ ### Step 3 — Write in a mentoring voice
51
+
52
+ - **Lead with the decision and its rationale**, then the mechanics. A handoff doc that only describes mechanics is just slower-to-read source code.
53
+ - **Every convention gets its WHY and its scar.** "Always use `[helper]`" is weak; "Always use `[helper]` — we shipped ~N raw `[unsafe pattern]` before the audit caught it, and here's the exact class of bug it prevents" is a lesson that survives.
54
+ - **Capture anti-patterns and war stories.** The thing someone tried that *didn't* work, and the specific incident, are often more valuable than the positive rule. Name the symptom so a future reader recognizes it.
55
+ - **Include real code references** (path + a short snippet) for the most instructive kernels, and cross-link between skill docs.
56
+ - **Write for less context than you have.** The reader — human or a cheaper model — did not watch the codebase evolve. Spell out the terms; don't rely on shorthand only you know.
57
+ - Keep each doc focused and skimmable (headings, tables, checklists). A skill library people actually re-read beats an exhaustive one they don't.
58
+
59
+ ### Step 4 — Index and verify
60
+
61
+ - Write a `README.md` for the library: a "read this first" order, a "read X when you're about to do Y" table, and the unchanging ground rules.
62
+ - Re-check quoted snippets against the current code. Fix anything stale.
63
+ - Note where a skill doc reveals that an existing convention doc (`AGENTS.md`, `CONTEXT_PROMPT.md`) is **wrong or out of date** — flag it (or fix it) rather than faithfully repeating stale guidance.
64
+
65
+ ### Step 5 — Report
66
+
67
+ List the documents you created, one line each, and call out: the biggest design decisions you captured, any convention-doc contradictions you found, and anything you judged too app-specific to generalize.
68
+
69
+ ---
70
+
71
+ ## Notes
72
+
73
+ - This library is **teaching material, not a spec or a findings report.** Don't turn it into a TODO backlog; link to the backlog instead.
74
+ - It pairs naturally with `propagate-to-forgetrail.md`: once the library exists, the *generalizable* lessons inside it are strong propagation candidates for ForgeTrail templates.
75
+ - Revisit after major architectural shifts. A stale handoff library is worse than none, because it teaches confidently wrong things — treat drift as a bug, same as any doc.
@@ -0,0 +1,63 @@
1
+ # Landing Page Rewrite from Brand Doc
2
+
3
+ A reusable prompt for rewriting a product landing page so it draws its emotional core, vocabulary, and positioning directly from a `BRAND_AND_PRODUCT.md` (or equivalent) document. Works for any product where you already have a strong brand narrative and want the public-facing page to carry the same conviction.
4
+
5
+ ---
6
+
7
+ ## The Prompt
8
+
9
+ I'm going to give you two files:
10
+
11
+ 1. **The brand document** — the authoritative source of truth for this product's positioning, voice, audience, and emotional framing.
12
+ 2. **The current landing page** — the code or copy that needs to be rewritten.
13
+
14
+ Rewrite the landing page following these principles:
15
+
16
+ ### Frame: Why → What → Who
17
+
18
+ The landing page is **not** a feature walkthrough or a tutorial. It answers three questions in this order:
19
+
20
+ 1. **Why does this exist?** Lead with the emotional reality the audience is living. Name the frustration, the invisible work, the thing that's broken — in language the reader would use to describe it to a friend. Pull this directly from the brand doc's problem framing.
21
+
22
+ 2. **What does it do?** Describe the product's value at the _outcome_ level, not the mechanics level. Say what changes for the user, not which buttons they'll click. Organize around a small number of pillars (4–6) rather than a long feature list. Each pillar should be one sentence of what it delivers and one sentence of why that matters.
23
+
24
+ 3. **Who is this for?** Be specific about the audience. State who benefits most and what makes them different from casual users. If the brand doc has a "Who It's For" section, lift the defining characteristics almost verbatim — they've already been refined.
25
+
26
+ ### Voice and Tone
27
+
28
+ - **Pull signature lines from the brand doc.** If the brand doc has a memorable phrase — a tagline, a manifesto line, a reframe — use it on the landing page. These lines were crafted to land; let them.
29
+ - **Emotional specificity over abstraction.** Don't say "we make things easier." Say what actually changes: the task that used to take hours, the output that sounds like you, the follow-up you stopped forgetting.
30
+ - **Conversational authority.** The tone should feel like a sharp colleague explaining why they built something — not a sales page, not a blog post. Confident but not hype. Direct but not cold.
31
+ - **Avoid these words and patterns:**
32
+ - "simple", "easy", "seamless" — let the product's description imply simplicity.
33
+ - "revolutionize", "game-changing", "cutting-edge" — hyperbole undercuts credibility.
34
+ - "helps you" as a crutch — prefer active constructions where the product _does_ something.
35
+ - Listing internal technical details (AI model names, architecture choices) unless the audience cares.
36
+
37
+ ### Structure and Density
38
+
39
+ - **Hero section:** One bold headline (can be aspirational or identity-based), one supporting sentence that names the product by name along with its category and positioning, one credibility or traction line. No more. The product name must appear in the hero copy — not just in the logo or nav. A first-time visitor should read the product name in text, anchored to the category definition (e.g., "[Product] is the [category] for [audience]."). This is for SEO, accessibility, and clarity.
40
+ - **Problem/reality section:** Full-width emotional narrative, not a two-column comparison chart. Describe the world the user is already in. Make them feel seen. This section earns the right to present your product.
41
+ - **Value pillars:** Replace any long feature grid with 4–6 outcome-oriented pillars. Each one: a short label, one sentence of what it delivers, one sentence of _why_ it matters. Use icons or visual markers if the format supports it.
42
+ - **Who it's for:** A dedicated section. Name 3–5 defining characteristics of the ideal user, drawn from the brand doc. This section should make the right person think "that's me" and the wrong person self-select out.
43
+ - **Differentiators / Insight section:** If the brand doc articulates a philosophy or insight that sets the product apart, give it its own section. Frame it as a belief or realization, not a feature comparison.
44
+ - **CTA:** One clear call to action at the end. Use the brand doc's closing line if it has one.
45
+
46
+ ### Process: How to Execute
47
+
48
+ 1. **Read the brand doc fully** before touching the landing page. Note the 3–5 most powerful phrases, the emotional arc, specific vocabulary, and any lines that feel like they were written _for_ the landing page.
49
+
50
+ 2. **Audit the current landing page** for: places where copy explains the _how_ when it should explain the _what_; feature lists that could be compressed into outcome pillars; tone mismatches; missing sections from the Why → What → Who framework; language that doesn't appear in the brand doc.
51
+
52
+ 3. **Rewrite section by section**, pulling language and structure from the brand doc. Open each section with the brand doc's framing, adapt to landing-page density, preserve the brand doc's emotional register.
53
+
54
+ 4. **Final check:** Read top to bottom as a first-time visitor. Does it flow Why → What → Who? Does every section have at least one phrase from the brand doc? Would a person from the target audience feel recognized?
55
+
56
+ ---
57
+
58
+ ## Usage Notes
59
+
60
+ - This prompt works best when the brand doc is already strong. If the brand doc is thin, strengthen it first (see `brand-copy-edit-pass.md`).
61
+ - The prompt focuses on content strategy and copy, not HTML/CSS structure. Apply to whatever template or framework you're using.
62
+ - Run once for a full rewrite, then use the brand copy edit pass for ongoing refinement.
63
+ - If the landing page has a pricing section, leave it mostly unchanged — pricing copy follows different rules.
@@ -0,0 +1,128 @@
1
+ # Microcopy centralization
2
+
3
+ Run this when a product has **substantial UI copy still inline in `.svelte` files**, or when marketing/help/tour strings drift from a single source of truth. Complements [User-Facing Content Sync Audit](./user-facing-content-sync-audit.md) (surface completeness) with **implementation discipline** (where strings live and how to verify them).
4
+
5
+ ---
6
+
7
+ ## How to use
8
+
9
+ Give this prompt to an AI coding assistant with full codebase access:
10
+
11
+ ```
12
+ Run microcopy centralization using [path to this file].
13
+ Mode: [phased clusters / final sweep / audit-only].
14
+ Scope: [optional panel list, or "follow inline audit"].
15
+ ```
16
+
17
+ **Audit-only** — run export + inline + duplication audits; report backlog; no refactors.
18
+
19
+ **Phased clusters** — migrate high-traffic surfaces in batches (onboarding, primary record tabs, billing, admin). Prefer **clusters over long-tail sweeps** until the inline audit is near zero.
20
+
21
+ **Final sweep** — after clusters, clear remaining 1-hit files in one pass.
22
+
23
+ ---
24
+
25
+ ## Three-layer architecture
26
+
27
+ | Layer | Typical module | Owns |
28
+ | --- | --- | --- |
29
+ | **Feature labels** | `[productLabels].ts` | Canonical feature names for landing, help, tours, nav, tabs |
30
+ | **Cross-cutting UI** | `[microcopy].ts` | Save failures, quota errors, shared toasts, Foreman/network banners |
31
+ | **Surface modules** | `[panelName]Copy.ts` under `$lib/content/` (or equivalent) | Panel intros, modals, section blurbs, wizard steps |
32
+
33
+ **What stays inline:** dead-obvious chrome (`Cancel`, `Save`, `Close`) unless repeated 3+ times; CSS classes; paths; MIME constants may live in admin/dev copy modules **omitted from user-facing export**.
34
+
35
+ **Legal pages:** one **markdown file per page** (`terms.md`, `privacy.md`) — do **not** shard into microcopy constants. Inline audit treats legal as document sections.
36
+
37
+ ---
38
+
39
+ ## Duplication policy
40
+
41
+ | Pattern | Action |
42
+ | --- | --- |
43
+ | Same feature title on landing + help + tour | Import `[FEATURE_LABELS].*` |
44
+ | Feature group on About cards | Import `[FEATURE_GROUP_LABELS].*` |
45
+ | Help tip body | Import from tips module; **never duplicate prose** |
46
+ | Elevator pitch variants | **Keep separate** — intentional messaging options |
47
+ | Landing FAQ vs feature summary | FAQ may shorten; don't force identical text |
48
+ | Short tooltip vs long feature summary | **Derive** tip from summary or shared excerpt constant |
49
+ | Terms / Privacy | **Markdown** per page, not `*Copy.ts` shards |
50
+ | Plan tier names / limits | Structured catalog; separate landing vs billing depth where needed |
51
+
52
+ ---
53
+
54
+ ## Three audits (different jobs)
55
+
56
+ | Command / prompt | Answers |
57
+ | --- | --- |
58
+ | **`user-facing-content-sync-audit.md`** | Is every **shipped feature mentioned** on landing, help, tours, onboarding? |
59
+ | **`export:copy`** (app script) | Regenerate **prose + terms** catalogs for writers/review |
60
+ | **`audit:copy`** (app script) | Exact **duplicate prose** inside the export inventory |
61
+ | **`audit:inline-copy`** (app script) | AST scan of `.svelte`; backlog metric = **UI prose not in export** |
62
+
63
+ **Acceptance:** inline audit reaches **0 UI prose not in export** (terms/noise/CSS may remain). Sync audit passes for feature parity.
64
+
65
+ > 🔧 **Guidance:** Apps adopt these scripts when copy volume justifies them (typically Phase 6–7 or after 10+ panels with product copy). ForgeTrail templates describe the **pattern**; copy script implementations from a reference app or build minimal stubs that call your `$lib/content/exportUserFacingCopy` module.
66
+
67
+ ---
68
+
69
+ ## Phased migration checklist
70
+
71
+ ### Phase 1 — Foundation
72
+
73
+ - [ ] `[productLabels].ts` — wire into marketing About, help section titles, tours
74
+ - [ ] `[microcopy].ts` — save failures, network errors, shared toasts
75
+ - [ ] Document Help ← tips **aliases** in export (no double prose)
76
+ - [ ] `audit:copy` duplication report
77
+
78
+ ### Phase 2+ — Clusters (repeat until audit clean)
79
+
80
+ For each cluster:
81
+
82
+ 1. Create or extend `*Copy.ts` for the surface
83
+ 2. Wire Svelte components to import constants (no string literals for product copy)
84
+ 3. Register strings in **export aggregator** (prose + terms groups)
85
+ 4. Run `export:copy` + `audit:inline-copy`
86
+ 5. Update delivery spec / TODO backlog count
87
+
88
+ **Cluster examples (rename for your product):**
89
+
90
+ - Onboarding wizard + start page
91
+ - Primary entity detail tabs
92
+ - Settings / profile / work preferences
93
+ - Billing + export panels
94
+ - Admin / internal tools (may omit dev-only strings from user export)
95
+
96
+ ### Final sweep
97
+
98
+ - [ ] Remaining 1-hit files from inline audit
99
+ - [ ] Move spec to **completed**; mark TODO done
100
+ - [ ] Propagate lessons to ForgeTrail (`propagate-to-forgetrail.md`)
101
+
102
+ ---
103
+
104
+ ## Export structure
105
+
106
+ Split **prose** (paragraphs, intros, help bodies) from **terms** (labels, tooltips, errors, button-adjacent strings). Use helper functions for parameterized copy (`saveFailedWithLabel(name)`) and register **sample invocations** in export so audit can match dynamic strings.
107
+
108
+ **User-facing content rule:** Help, onboarding, tours, toasts, and empty states must **not** mention internal spec paths or engineering jargon (see `.cursor/rules/user-facing-content.mdc`).
109
+
110
+ **Locale:** Default **US English** for product copy and LLM prompts that generate user-visible text (see `.cursor/rules/us-english.mdc`).
111
+
112
+ ---
113
+
114
+ ## When to run
115
+
116
+ | Trigger | Action |
117
+ | --- | --- |
118
+ | After 3+ features ship in a week | Sync audit + spot-check inline audit |
119
+ | Before launch / marketing push | Full sync audit + inline audit at 0 prose backlog |
120
+ | After landing/help rebrand | Reconcile `FEATURE_LABELS` + sync audit |
121
+ | New high-traffic panel | Add `*Copy.ts` in same PR; don't defer |
122
+ | Periodic (monthly) | `export:copy` + `audit:inline-copy` in CI or pre-release checklist |
123
+
124
+ ---
125
+
126
+ ## Propagate to ForgeTrail
127
+
128
+ When your app completes a centralization pass, run **`prompts/propagate-to-forgetrail.md`** so templates, `TECHNICAL_REFERENCE`, and `CODE_QUALITY` stay aligned — generalize patterns only, not app-specific strings.
@@ -0,0 +1,197 @@
1
+ # Panel Usability Audit
2
+
3
+ Deep usability audit of a single panel or feature surface. Produces a detailed spec with numbered, categorized findings, severity/effort ratings, concrete recommendations, and a phased implementation plan. Use before a beta, launch, or whenever a surface has accumulated enough features to warrant a fresh-eyes review.
4
+
5
+ ---
6
+
7
+ ## How to Use
8
+
9
+ 1. Give this prompt to an AI coding assistant with **full codebase access**.
10
+ 2. Specify which **panel or surface** to audit (the `[TARGET]` placeholder below).
11
+ 3. The assistant reads every file involved — component, sub-components, API routes, help content, related specs — then produces a spec under `specs/`.
12
+ 4. Save the spec at `specs/<surface>-usability-audit.md`.
13
+ 5. Add a backlog entry linking the spec (e.g., `TODO.md` or your tracking system).
14
+
15
+ ---
16
+
17
+ ## Instructions
18
+
19
+ You are a product-minded UX engineer auditing a feature surface in this codebase. The user will specify which panel, page, or component to audit.
20
+
21
+ ### Step 1 — Inventory (read-only)
22
+
23
+ Before writing anything, read **every file** that participates in the target surface:
24
+
25
+ - **Primary component** — the main component file (all state, derived values, async functions, event handlers, lifecycle hooks, template branches, buttons, error displays, conditional text, transitions).
26
+ - **Sub-components** — every child imported by the primary component (e.g., result cards, progress bars, previews, modals, form editors). Note their props, user-visible elements, actions, and accessibility attributes.
27
+ - **API routes** — every server endpoint the surface calls. Note request/response shapes, error handling, entitlement checks, side effects.
28
+ - **Help content** — any help panel, tooltip copy, onboarding tours, or guided flows that describe the surface to users.
29
+ - **Related specs** — completed and open specs that shaped or plan changes to this surface.
30
+ - **Test plan** — any manual or automated test scenarios covering this surface.
31
+ - **Brand / design docs** — target user, design system conventions, copy tone.
32
+
33
+ Build a complete mental model of: every user path, every state transition, every button and when it appears, every error and how it is displayed, every piece of information shown and when.
34
+
35
+ ### Step 2 — Analyze across six dimensions
36
+
37
+ Evaluate the surface through each lens below. For each, ask the guiding questions and look for specific anti-patterns.
38
+
39
+ #### A. Flow and orientation
40
+
41
+ - Can a new user figure out what to do and in what order without external help?
42
+ - Do visual cues (numbers, arrows, labels) match the actual flexibility of the flow?
43
+ - Is state preserved across navigation (close/reopen, tab switch, browser refresh)?
44
+ - When an operation fails, does the user know what failed and how to recover?
45
+ - After a long operation succeeds, does the UI guide the user to a natural next action?
46
+
47
+ *Anti-patterns:* strict-looking sequences that are actually optional; state that resets on panel close; error recovery that discards user progress; success screens with no next step.
48
+
49
+ #### B. Information hierarchy and density
50
+
51
+ - Is the most important element (primary CTA, key result) visible without scrolling at each state?
52
+ - Does long content (AI output, lists, markdown) push primary actions below the fold?
53
+ - Is the same information rendered in multiple places with slightly different styling?
54
+ - Do secondary surfaces (history, logs, metadata) compete for visual weight with primary workflows?
55
+
56
+ *Anti-patterns:* CTA buried under 3+ scroll heights of output; duplicated rendering with drift; "always visible" sections that are rarely needed.
57
+
58
+ #### C. Error handling and recovery
59
+
60
+ - Does the error state tell the user what went wrong, whether retrying makes sense, and what action to take?
61
+ - Are errors categorized (transient, parse/model, permanent/user) with different recovery paths?
62
+ - Are secondary failures (background saves, list loads, deletes) surfaced or silently swallowed?
63
+ - Does error recovery preserve user context or reset everything?
64
+
65
+ *Anti-patterns:* generic "Try Again" that resets all state; silent failures that look like empty results; identical error display for all error types.
66
+
67
+ #### D. Missing affordances
68
+
69
+ - At each state, what does the user want to do that no button or link offers?
70
+ - Can the user preview results, compare before/after, or undo a destructive action?
71
+ - Is plan usage / cost communicated before an action that consumes a limited resource?
72
+ - Are there actions the user has to perform outside the surface that could be brought in-line?
73
+
74
+ *Anti-patterns:* no preview after a transformation; no undo or revert; cost/usage hidden until the limit is hit; recovery requires download + re-upload instead of a single action.
75
+
76
+ #### E. Consistency and patterns
77
+
78
+ - Do similar actions use the same confirmation pattern (all inline, or all dialog, or all none)?
79
+ - Is button visual weight (primary, secondary, text link) proportional to importance in every state?
80
+ - Are shared UI patterns (upload, progress, preview, error) rendered from shared code or duplicated?
81
+ - Do labels, icons, and placement follow the same vocabulary across states?
82
+
83
+ *Anti-patterns:* mix of native `confirm()` and inline confirmations; primary-weight buttons for secondary actions; duplicated markup for the same pattern in different branches.
84
+
85
+ #### F. Accessibility
86
+
87
+ - Do progress indicators have ARIA roles and live-region attributes?
88
+ - Do icon-only buttons have accessible labels (`aria-label` or visually hidden text)?
89
+ - Are modals/panels keyboard-navigable (Escape to close, focus trap, tab order)?
90
+ - Are decorative vs interactive elements correctly marked?
91
+
92
+ *Anti-patterns:* `<div>` with `onclick` but no keyboard handler or role; icon buttons with no label; progress bars with no `role="progressbar"`.
93
+
94
+ ### Step 3 — Write the spec
95
+
96
+ Produce a spec with this structure:
97
+
98
+ ```
99
+ # [Surface Name] — Usability Audit
100
+
101
+ **Status:** Proposed
102
+ **Audience:** Product and engineering
103
+ **Related:** [links to prior specs, design docs]
104
+
105
+ ---
106
+
107
+ ## 1. Problem
108
+ [1-2 paragraphs: what this surface does, why an audit is warranted, and a bullet summary of the issue categories found.]
109
+
110
+ ## 2. Goals
111
+ [Numbered list: what "good" looks like after fixes are applied.]
112
+
113
+ ## 3. Non-goals
114
+ [Bullet list: what is explicitly out of scope.]
115
+
116
+ ---
117
+
118
+ ## 4. Findings
119
+
120
+ [Rating key:]
121
+ > Severity: **High** = blocks or confuses most users; **Medium** = friction for some users or edge cases; **Low** = polish or minor annoyance.
122
+ > Effort: **S** = < 1 hour, localized change; **M** = 1–4 hours, touches multiple places; **L** = half-day+, new component or significant restructure.
123
+
124
+ ### A. Flow and orientation
125
+ #### A1. [Finding title]
126
+ **Severity:** X | **Effort:** X
127
+ [Description: what is wrong, why it matters, who it affects.]
128
+ **Recommendation:** [Concrete fix. Name the function, component, or UI element to change. Offer alternatives if relevant.]
129
+
130
+ [... repeat for each finding across all six categories A–F ...]
131
+
132
+ ---
133
+
134
+ ## 5. Implementation phases
135
+
136
+ ### Phase 0: Quick wins (S effort, high impact) — target before [milestone]
137
+ | # | Finding | Change |
138
+ |---|---------|--------|
139
+ [table rows]
140
+
141
+ ### Phase 1: [Theme] (M effort, high impact) — target for [milestone]
142
+ [table]
143
+
144
+ ### Phase 2: [Theme] (M effort, medium impact) — [timeline]
145
+ [table]
146
+
147
+ ### Phase 3: [Theme] (L effort) — [timeline]
148
+ [table]
149
+
150
+ ---
151
+
152
+ ## 6. Files affected (Phase 0–1 scope)
153
+ | File | Changes |
154
+ |------|---------|
155
+ [table rows with specific file paths and one-line change descriptions]
156
+
157
+ ---
158
+
159
+ ## 7. Open questions
160
+ [Numbered list of decisions that need product/design input before implementation.]
161
+ ```
162
+
163
+ ### Rules
164
+
165
+ - **Ground every finding in code.** Name the specific state variable, template branch, function, or component. Do not write vague "the UX could be better" observations.
166
+ - **Be concrete in recommendations.** Say "add a button that calls `togglePreview('resume')`" not "consider adding a preview."
167
+ - **Include severity AND effort.** Readers use these to prioritize; omitting either makes the spec less actionable.
168
+ - **Phase the work.** Group by effort and impact so the team can ship quick wins before larger restructures.
169
+ - **List affected files.** For at least Phase 0–1, enumerate every file that needs a change.
170
+ - **Flag open questions.** If a recommendation has meaningful alternatives or needs product input, say so — do not bury ambiguity in the recommendation text.
171
+ - **Do not conflate audit with redesign.** The spec identifies and recommends fixes; it does not propose a full UI overhaul unless the findings demand one.
172
+ - **Stay honest.** If something works well, do not manufacture a finding. If the surface is in good shape, say so and keep the spec short.
173
+
174
+ ---
175
+
176
+ ## Input
177
+
178
+ ```
179
+ [TARGET]: The panel or surface to audit. Examples:
180
+ - "ProfilePanel.svelte (Settings tab)"
181
+ - "JobDetailPanel.svelte (all tabs)"
182
+ - "The onboarding flow (signup + first import)"
183
+
184
+ Audit [TARGET] using the methodology above. Save the spec at specs/<target>-usability-audit.md
185
+ and add a backlog entry linking to it.
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Run Logging
191
+
192
+ After completing the audit, add a backlog entry (e.g., `TODO.md`) under the most relevant section with:
193
+
194
+ - `[ ]` checkbox (open — the audit is proposed, not implemented)
195
+ - Title: **`[Surface] usability audit`**
196
+ - One-line summary of finding count and key themes
197
+ - Link to the spec