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,467 @@
1
+ # [APP NAME] — Manual Test Plan
2
+
3
+ Last updated: [DATE]
4
+
5
+ This document is a walkthrough a tester can follow to exercise every major feature of the app. Each section lists preconditions, steps, and expected results. Work through it top to bottom; later sections assume earlier ones passed.
6
+
7
+ > 💡 **Lesson learned:** A manual test plan is essential even for solo projects.
8
+ > Automated tests are great for regressions, but a structured manual walkthrough catches
9
+ > UX issues, flow breakages, and integration failures that unit tests miss. This plan
10
+ > should be runnable end-to-end in 30-60 minutes and cover every user-facing feature.
11
+
12
+ ---
13
+
14
+ ## 0. Environment Setup
15
+
16
+ **Preconditions**
17
+
18
+ - Database running locally ([DATABASE] on default port)
19
+ - `.env` populated with all required vars (see `.env.example`)
20
+ - Dev server running (`pnpm dev`)
21
+ - Payment provider test-mode keys configured (if applicable)
22
+ - At least one OAuth provider configured (if applicable)
23
+
24
+ **Verify**
25
+
26
+ - [ ] App loads at `http://localhost:[PORT]` without errors
27
+ - [ ] Database admin UI is accessible
28
+ - [ ] Browser console is free of CSP violations and JS errors
29
+
30
+ ---
31
+
32
+ ## 1. Authentication
33
+
34
+ ### 1.1 Email Signup
35
+
36
+ - [ ] Navigate to signup page
37
+ - [ ] Fill in required fields (name, email, password)
38
+ - [ ] Password validation feedback appears while typing
39
+ - [ ] Click "Create Account"
40
+ - [ ] Redirected to main dashboard
41
+ - [ ] User record created in database with correct defaults (plan, trial dates, etc.)
42
+
43
+ ### 1.2 Email Login
44
+
45
+ - [ ] Log out
46
+ - [ ] Redirected to login page
47
+ - [ ] Enter credentials from 1.1
48
+ - [ ] Click "Sign In"
49
+ - [ ] Redirected to dashboard; user data loads correctly
50
+
51
+ ### 1.3 OAuth Login (if configured)
52
+
53
+ - [ ] Enabled providers show as buttons on the login page
54
+ - [ ] Clicking a provider redirects to the OAuth flow
55
+ - [ ] After authorizing, redirected back to dashboard
56
+ - [ ] User record created/updated in database
57
+
58
+ ### 1.4 Session Persistence
59
+
60
+ - [ ] Hard-refresh the page while logged in
61
+ - [ ] User remains authenticated (no redirect to login)
62
+
63
+ ### 1.5 Logout
64
+
65
+ - [ ] Click sign out
66
+ - [ ] Redirected to login page
67
+ - [ ] Navigating to protected routes redirects back to login
68
+
69
+ ### 1.6 Transactional outbound email (if applicable)
70
+
71
+ **Preconditions:** Provider API key and From address set in server env; sending domain verified per provider (SPF/DKIM/DMARC in DNS).
72
+
73
+ - [ ] After **email/password signup** (or equivalent), the inbox receives the expected **welcome** message (or verify delivery in the provider dashboard).
74
+ - [ ] After **password change**, a **security notice** arrives if your app sends one.
75
+ - [ ] If **billing webhooks** trigger mail (subscription active, payment failed), exercise test-mode checkout / failure paths and confirm one message per event (no duplicates on webhook retry when idempotency is implemented).
76
+
77
+ ### 1.7 Credential refresh (password change, token rotation) (if applicable)
78
+
79
+ - [ ] Change password (or equivalent credential rotation) from in-app settings.
80
+ - [ ] After success, **main lists / boards / pipelines** show **expected rows** — not an empty shell from stale client cache or aborted parallel fetches until hard refresh.
81
+ - [ ] If the app uses **parallel list loads** on one data route, spot-check that re-auth did not leave **cancelled** requests rendering as blank (see **CONTEXT_PROMPT** list-route patterns).
82
+
83
+ ### 1.8 External identity URLs — profile / contact links (if applicable)
84
+
85
+ _Use when users store **portfolio or professional-network URLs** used for linking, prompting, or exports._
86
+
87
+ - [ ] Paste a URL **with tracking query params** or alternate host casing — saves as **canonical** form per server rules where applicable.
88
+ - [ ] Broken or non-HTTPS URLs behave per policy (reject vs normalize) with readable errors.
89
+ - [ ] **Data export** treats these fields consistently with **PII** policy (included, redacted, or separate appendix).
90
+
91
+ ---
92
+
93
+ ## 2. [CORE FEATURE AREA 1]
94
+
95
+ ### 2a. Multi-record or bulk import (if applicable)
96
+
97
+ _Use when users can paste, upload, or import many external URLs or rows in one action (e.g. jobs, bookmarks, listings)._
98
+
99
+ **Preconditions:** At least one record already exists from the single-import path (for duplicate comparison).
100
+
101
+ - [ ] Open the bulk / multi-import entry point (e.g. export panel pairing, "import multiple" from the primary add flow).
102
+ - [ ] Paste or upload a small list with a **duplicate** of an existing URL — preview flags it; default selection skips or warns per product rules.
103
+ - [ ] Import **multiple** new URLs — each record uses the **same** pipeline as single add (visible progress, finalize, entitlements).
104
+ - [ ] Hitting plan / scrape limits mid-batch surfaces the **same** upgrade or limit UX as single add; no silent partial charge or unbounded queue.
105
+ - [ ] If the app exports **CSV** and claims re-import support, spot-check that **column headers match row fields** (no silent shift of tags, dates, or URLs into wrong columns).
106
+ - [ ] **Thin listing body:** Import a URL whose **main text omits** a field your schema requires (e.g. employer name on an aggregator). After **finalize** / enrichment, that field is still populated from **stub metadata or hints**, not cleared by an empty model value.
107
+ - [ ] **Markup drift / empty parse (if applicable):** If the product imports from **external listing or article URLs**, spot-check a host known to serve **valid HTML** in-browser where **legacy selectors** once failed: the user should see an **outcome-oriented** error or recovery (not a circular “paste the exact URL again” when the link is already canonical). If you ship **optional LLM recover** from raw HTML, toggling the disable env (if any) changes behavior predictably; **diagnostics** or support tooling reflect which stage failed (fetch vs parse vs recover).
108
+ - [ ] **Progressive import resilience (if stub + finalize are separate client calls):** After a stub succeeds, simulate or observe a finalize **failure** (offline tab, bogus proxy, or non-JSON error body). The UI should **reconcile** from a read-by-id path or surface the same **failure merge** as a dedicated error response — **not** remain forever on “in progress” with no pipeline update. Spot-check **discovery / suggestions** and **onboarding** add paths match the main modal behavior.
109
+ - [ ] **Workflow visibility:** If the product uses **status** or **column** enums for boards, seed or locate a row with a **legacy or empty** status (if plausible). It should appear in a **defined** bucket (or triage column), match **search** expectations, and keep **counts** consistent with visible columns — not vanish while still blocking duplicates.
110
+ - [ ] **Dual listing URLs (if applicable):** If records store both an **apply/source** URL and a **discovery** URL, confirm **detail UI** shows both with distinct labels; **export or CSV** includes both in stable columns; duplicate detection still behaves as documented when only one of the two repeats.
111
+
112
+
113
+ ### 2b. Intent-driven discovery and deep-linked panel state (if applicable)
114
+
115
+ _Use when recommendations, search, or a stored **profile / direction** feed the same create pipeline as manual entry, and when major panels or tabs sync to URL params._
116
+
117
+ - [ ] From the **discovery or recommendations** surface, add an item — **limits, duplicates, progress, and errors** match the manual add path.
118
+ - [ ] After changing the **profile or direction** that drives suggestions, dependent lists or badges **refresh** (no stale titles until full reload).
119
+ - [ ] Copy the URL with **`tab=` / sub-panel query params** (or equivalent), open in a fresh tab or hard-refresh — the **same tab/subview** restores.
120
+ - [ ] If the product runs **trust / plausibility** checks on imported records, spot-check a posting with **structured pay** (schema, native range UI, or OG fields) — warnings should not contradict visible comp unless extraction actually failed.
121
+ - [ ] If a **named discovery** workflow is reachable from **both** top-level nav (or a marketing CTA) and an in-panel tab, both paths open the **same** view and use **consistent** labels with Help and tours.
122
+ - [ ] **Bulk add from discovery** (if applicable): Narrow the list with **quick filters** or direction/URL selection — **add selected** should only enqueue rows that match the **visible** filtered set (or the product should reset filters with explicit copy).
123
+
124
+ ### 2c. Horizontally scrollable board / pipeline drag (if applicable)
125
+
126
+ _Use when primary workflow uses **native HTML5 drag** across columns inside a **horizontal** `overflow-x` container._
127
+
128
+ - [ ] Drag an item toward a column that starts **off-screen** horizontally — the container **auto-scrolls** so you can complete the drop without releasing early to scroll manually.
129
+ - [ ] After drop, the **browser console** stays clean on navigation (no SSR errors from `document` / `window` in `onDestroy` cleanup for global drag listeners).
130
+
131
+ > 🔧 **Guidance:** Add sections for each major feature area. Structure each as:
132
+ >
133
+ > ### [Feature].1 [Sub-feature Name]
134
+ >
135
+ > - [ ] Description of action to take
136
+ > - [ ] Expected result
137
+ > - [ ] Edge case to verify
138
+
139
+ ---
140
+
141
+ ## 3. [CORE FEATURE AREA 2]
142
+
143
+ ---
144
+
145
+ ## 4. AI Features (if applicable)
146
+
147
+ > 💡 **Lesson learned:** LLM-powered features need special test attention:
148
+ > - Progress indicators during generation (spinner, progress bar, staged labels)
149
+ > - Output persistence (does it survive tab switch and page refresh?)
150
+ > - Output quality spot-checks (tone, accuracy, format)
151
+ > - Token/usage tracking (are costs being recorded correctly?)
152
+ > - Graceful degradation if the API is down or slow
153
+
154
+ ### 4.1 [AI Feature Name]
155
+
156
+ - [ ] Trigger the AI feature
157
+ - [ ] Progress indicator appears with appropriate feedback
158
+ - [ ] Results render correctly when complete
159
+ - [ ] Results persist across navigations and refreshes
160
+
161
+ ### 4.2 In-tab or in-document tailoring critique (if applicable)
162
+
163
+ _Use when users run a **quality review** (heuristics, LLM audit, or checklist) on an **already-generated** tailored document tied to a **target record** (e.g. job-specific résumé)._
164
+
165
+ - [ ] Run critique — progress and completion states are clear; no perpetual “still analyzing” without a terminal outcome when the upstream key/service is unavailable.
166
+ - [ ] **Persist:** Switch tabs or reload — critique results (and approval/dismiss state) reload with the record.
167
+ - [ ] Optional **structural control** (e.g. reorder for narrative coherence): user can accept, override, or undo; exported documents reflect the chosen structure.
168
+
169
+ ### 4.3 Factual grounding and programmatic veracity checks (if applicable)
170
+
171
+ _Use when the product generates tailored materials representing the user (cover letters, statements of interest, custom pitches) and programmatically audits them against a source document of record (e.g. base resume) to prevent fabrications._
172
+
173
+ - [ ] **Grounding Check:** Run document tailoring with a base resume template. Verify that the full resume text is passed to the LLM (no fabrication of technologies, metrics, or roles).
174
+ - [ ] **Automatic Veracity Pass:** Verify that a programmatic veracity check runs automatically after generation.
175
+ - [ ] **Flagged Issues:** If the tailored document contains ungrounded claims, verify that they are flagged in the UI with exact excerpts, reasons, severity levels, and suggested repairs.
176
+ - [ ] **Success State:** If all claims are grounded, verify that a success state is displayed.
177
+ - [ ] **Persist:** Switch tabs or reload — veracity results reload with the record.
178
+ - [ ] **Dismissal:** Verify that clicking "Dismiss" or "Clear audit" successfully clears the veracity results from the record.
179
+
180
+ ### 4.4 Anti-self-importance and position-of-strength tone checks (if applicable)
181
+
182
+ _Use when the product generates tailored materials representing the user (cover letters, statements of interest, custom pitches) and enforces strict tone, register, and posture controls._
183
+
184
+ - [ ] **No Grandiose Framing:** Verify that routine work is stated at face value without dramatic or grandiose descriptions (e.g., "designed systems" instead of "originating products at the edge of what organizations know how to build").
185
+ - [ ] **No Visionary Self-Positioning:** Verify that there are no priority claims or timing assertions designed to establish priority (e.g., "before X was mainstream").
186
+ - [ ] **No Analytical Flattery:** Verify that the target company is not ranked or called "rare," "unique," or "the rarest environment."
187
+ - [ ] **No Name-Dropping by Negation:** Verify that no tools, frameworks, or competitors are named solely to say the candidate did not use them or built something better (e.g., "rather than using LangGraph").
188
+ - [ ] **No Performative Specificity:** Verify that there are no dense technology inventories used as arguments for fit instead of narrative.
189
+ - [ ] **No Modifier Stacking:** Verify that credential-bearing modifiers are limited to one per noun phrase.
190
+ - [ ] **Position-of-Strength Posture:**
191
+ - Verify that the text does not mirror the job description as proof of fit ("the work you describe is the loop I have been running").
192
+ - Verify that there are no aphorisms, maxims, or theses delivered as quotable wisdom.
193
+ - Verify that ordinary work habits are not branded as named personal methods.
194
+ - Verify that there is no striving or grind vocabulary (e.g., "the loop I have been running", "hold up in production", "want to keep doing").
195
+ - Verify that there are no humble-brags that raise a hurdle only to clear it.
196
+ - Verify that there is no rhetorical scaffolding, self-narration, or instructed interpretation (e.g., calling career periods "chapters" or "milestones").
197
+
198
+ ### 4.5 Assertive product copy — no hedging *can* (if applicable)
199
+
200
+ _After marketing, help, or onboarding edits — or when adding feature descriptions._
201
+
202
+ - [ ] Grep copy modules for `\bcan\b`; fix **product capability** hedges (`can strengthen` → `strengthens`, `can suggest` → `suggests`).
203
+ - [ ] Leave **user permission** (`You can…`), **factual limits** (`what we can read…`), and **people** (`who can help`) unchanged.
204
+ - [ ] How-it-works / landing steps use present-tense direct verbs for shipped behavior.
205
+
206
+ ### 4.6 Structured eligibility / requirement fit (if applicable)
207
+
208
+ _Use when jobs or listings store structured requirements compared to user profile status (education, clearance, license, work authorization, etc.)._
209
+
210
+ - [ ] Import + refresh populate requirement fields; regex fallback when LLM omits.
211
+ - [ ] User declares status in profile/onboarding; optional inference from resume text.
212
+ - [ ] Card badge + detail Logistics row + board filter use shared mismatch/match helpers (filter counts align with board).
213
+ - [ ] Fit scoring and tailoring/prep prompts include requirement context block.
214
+ - [ ] PATCH / API field maps include requirement fields (grep `fieldMap` / config schema).
215
+ - [ ] Unit tests: extraction regex samples, `hardMismatch` / filter predicates.
216
+
217
+ ---
218
+
219
+ ## 5. Billing & Entitlements (if applicable)
220
+
221
+ > 💡 **Lesson learned:** Test the full billing lifecycle end-to-end:
222
+ > signup → trial → hit limits → upgrade → downgrade → cancel.
223
+ > Pay special attention to what happens at tier boundaries and trial expiry.
224
+ > Silent failures here erode trust faster than any other bug category.
225
+
226
+ ### 5.1 Trial/Free Tier Limits
227
+
228
+ - [ ] New user gets correct default plan/trial
229
+ - [ ] Exceeding a limit shows appropriate upgrade prompt
230
+ - [ ] All gated features are correctly locked
231
+
232
+ ### 5.2 Payment Flow
233
+
234
+ - [ ] Click upgrade; redirected to payment provider (test mode)
235
+ - [ ] Complete payment with test credentials
236
+ - [ ] Webhook fires; user plan updated
237
+ - [ ] Usage counters reset; new limits in effect
238
+
239
+ ### 5.3 Subscription Management
240
+
241
+ - [ ] Can view invoices, update payment method, cancel
242
+ - [ ] Cancellation downgrades user at period end
243
+ - [ ] Usage limits revert correctly
244
+
245
+ ---
246
+
247
+ ## 6. Filtering, Search & Navigation
248
+
249
+ - [ ] Search/filter UI works correctly
250
+ - [ ] Filters combine correctly (AND/OR logic as designed)
251
+ - [ ] Filter state persists across page refreshes
252
+ - [ ] Empty states show helpful messages
253
+
254
+ ---
255
+
256
+ ## 7. UI & UX
257
+
258
+ ### 7.1 Theme
259
+
260
+ - [ ] Toggle dark/light mode
261
+ - [ ] All components render correctly in both themes
262
+ - [ ] Preference persists across sessions
263
+
264
+ ### 7.2 Responsive Layout
265
+
266
+ - [ ] Key layouts work on mobile viewport
267
+ - [ ] Panels/modals behave correctly at small sizes
268
+ - [ ] No horizontal overflow or broken layouts
269
+
270
+ ### 7.3 Icons & Assets
271
+
272
+ - [ ] All action buttons display their icons correctly
273
+ - [ ] No broken icon placeholders or CSP violations
274
+ - [ ] Favicon renders in browser tab
275
+
276
+ ### 7.4 Loading States
277
+
278
+ - [ ] App loads with proper skeletons/spinners (no flash of empty state)
279
+ - [ ] Data-heavy primary surface uses a **skeleton shaped like the destination** (not a centered spinner); layout does not jump when data lands
280
+ - [ ] Failed data loads show retry/refresh indication
281
+
282
+ ### 7.4a Global keyboard shortcuts (if applicable)
283
+
284
+ - [ ] Minimal set works on the bare primary surface: focus search, create-new, open help (`?`)
285
+ - [ ] Shortcuts **do not** fire while typing in an input/textarea/select/contenteditable, or during IME composition
286
+ - [ ] `?` opens a help overlay listing global **and** context (record-detail) shortcuts
287
+ - [ ] `Esc` closes an open flyout/menu, but **defers** to a record drawer or modal that owns Escape (no double-close)
288
+ - [ ] Create-new shortcut respects gating (read-only/viewer/expired) the same way the button does
289
+
290
+ ### 7.4b First-run hints (if applicable)
291
+
292
+ - [ ] A one-time "start here" hint appears on first open of a dense surface and is dismissible
293
+ - [ ] Dismissal persists per user across reloads (and does not leak across delegate/coach accounts)
294
+
295
+ ### 7.4c Modal focus trap (if applicable)
296
+
297
+ - [ ] Opening a modal moves focus inside the dialog (or `[data-autofocus]` target)
298
+ - [ ] Tab / Shift+Tab cycle within the dialog only; focus does not reach the page behind
299
+ - [ ] Closing the modal returns focus to the element that opened it
300
+ - [ ] Escape is handled by the modal layer; global Escape defers when a modal is open
301
+
302
+ ### 7.4d First-artifact orientation (if applicable)
303
+
304
+ - [ ] First successful completion of the core generated bundle shows a one-time orientation overlay
305
+ - [ ] Overlay lists what was built and where each piece lives; primary action opens the output surface
306
+ - [ ] Dismissal persists per user; overlay does not re-fire after dismissal
307
+
308
+ ### 7.4e Board "Start here" recommendation (if applicable)
309
+
310
+ - [ ] When prioritized follow-ups exist, the collapsed bar highlights the single top item as "Start here" (one click opens in context)
311
+ - [ ] Expanded view still shows the full list and quick actions unchanged
312
+
313
+ ### 7.4f AI section lifecycle states (if applicable)
314
+
315
+ - [ ] Empty, generating, ready, and stale (when input-hash exists) use consistent refresh labels across AI sections on one record
316
+ - [ ] Stale state shows a non-blocking banner with user-initiated refresh only — no silent auto-regen on input change
317
+ - [ ] Generating state does not leave a perpetual placeholder if the server returns a terminal error
318
+
319
+ ### 7.5 Persistent assistant or copilot shell (if applicable)
320
+
321
+ _Use when a **dock, rail, or side panel** hosts ongoing AI conversation scoped to optional **record context**._
322
+
323
+ - [ ] With **no record** selected (or cleared), assistant shows grounded empty state — **not** stale context from the previous selection.
324
+ - [ ] **Streaming** has clear progress and terminal outcomes (completion, cancellation, structured error).
325
+ - [ ] Metering / entitlements mirror **other** LLM surfaces for comparable actions.
326
+
327
+ ### 7.6 Multi-lens detail views (if applicable)
328
+
329
+ _Use when one **detail** screen has tabs or panels for **distinct persisted** analytic or AI outputs on the **same entity**._
330
+
331
+ - [ ] Regenerating one lens does not overwrite another unless intentionally architected that way (document which).
332
+ - [ ] **Exports / bundles** include or exclude each lens per product policy.
333
+
334
+ ### 7.7 Admin master–detail tables (if applicable)
335
+
336
+ _Use when operators manage users, billing, or tenants in **dense** tables with **expand** or **secondary** panes._
337
+
338
+ - [ ] Expanded row **colspan** matches table structure; no header/body column drift.
339
+ - [ ] If **impersonation** exists, visual guardrails make the **active principal** obvious before destructive or billing actions.
340
+ - [ ] Gated server-side proxy route is strictly restricted to administrator sessions (non-admins get 401/403).
341
+ - [ ] Service credentials (e.g. `[SERVICE]_TOKEN`) are completely withheld from the client-side browser payload.
342
+ - [ ] Network topography, connection hosts, or passwords inside connection strings are resolved on the server and stripped from the returned response.
343
+ - [ ] The proxy route implements a strict timeout (e.g., 10s) and handles edge node offline/down states gracefully without throwing uncaught 500 errors.
344
+
345
+ ### 7.8 Long-form generated reading (if applicable)
346
+
347
+ _Use when the UI renders **long structured reports** (AI dossiers, markdown bodies, multi-section briefs)._
348
+
349
+ - [ ] Sticky outline lists major headings (and subsections where useful); clicking an item scrolls to the anchor
350
+ - [ ] Scroll-spy or equivalent highlights the section currently in view
351
+ - [ ] Deep links (`#slug`) open the correct section; browser back/forward behave predictably
352
+ - [ ] Mobile: outline collapses into drawer or compact control so reading width is preserved
353
+ - [ ] Outline links are keyboard-accessible (focus management acceptable for product policy)
354
+
355
+ ---
356
+
357
+ ## 8. Security & Edge Cases
358
+
359
+ ### 8.1 CSP Headers
360
+
361
+ - [ ] Browser console free of Content-Security-Policy violations
362
+ - [ ] All external resources (CDN, fonts, scripts) allowed by CSP
363
+
364
+ ### 8.2 CSRF Protection
365
+
366
+ - [ ] POST/PATCH/DELETE requests include proper Origin header
367
+ - [ ] Cross-origin state-changing requests are rejected
368
+
369
+ ### 8.3 Rate Limiting
370
+
371
+ - [ ] General API: [X] requests/minute per IP
372
+ - [ ] Expensive routes (LLM, etc.): [Y] requests/minute per IP
373
+ - [ ] Exceeding limits returns 429 with retry-after header
374
+
375
+ ### 8.4 Auth Guards
376
+
377
+ - [ ] All API routes return 401 for unauthenticated requests
378
+ - [ ] Users cannot access other users' data
379
+ - [ ] Admin-only routes reject non-admin users
380
+
381
+ ### 8.5 Input Validation
382
+
383
+ - [ ] Submit forms with empty/invalid fields → validation errors shown
384
+ - [ ] Submit malformed input to API → appropriate error returned
385
+ - [ ] File upload accepts only allowed types; rejects oversized files
386
+
387
+ ### Resume / cover-letter upload — LLM JSON resilience (if product maps uploads via structured JSON)
388
+
389
+ _Use when DOCX or PDF resume import runs an LLM “map to skeleton” step before saving a template._
390
+
391
+ - [ ] Upload a **.docx** whose bullets or role blurbs contain **soft line breaks** (Shift+Enter) or multi-line table cells — import should **succeed** (not “could not parse structure” with `server_failure_llm_parse` / `Bad control character in string literal`).
392
+ - [ ] If import still fails, confirm UI shows a **Support ID** and PostHog `server_failure_llm_parse` or `server_failure_llm_call` includes matching `debugId` + `errorMessage`.
393
+ - [ ] Re-upload the same file after flattening line breaks in Word — should succeed even without server fix (sanity check for content vs infra).
394
+
395
+ ### 8.6 List APIs + nested BaaS reads (manual)
396
+
397
+ > 💡 **Lesson learned:** If a **GET list** route loads a parent collection then **parallel-fetches** related rows per parent through a single BaaS SDK client, verify **full page reload**: nested data (e.g. child records, flags derived from another collection) still appears. Regressions here often show up as empty nested arrays with **no user-facing error** when the SDK auto-cancels concurrent same-collection requests server-side.
398
+
399
+ - [ ] Create or attach nested data, reload the app: list and detail views still show the nested data
400
+ - [ ] Server logs: no repeated “aborted” / “auto-cancelled” errors on list enrichment during normal load
401
+
402
+ ---
403
+
404
+ ## 9. Deployment Verification
405
+
406
+ > 💡 **Lesson learned:** Run a subset of this plan against the production
407
+ > deployment, not just localhost. Differences in environment (reverse proxy, HTTPS,
408
+ > DNS, environment variables) cause bugs that never appear in dev.
409
+
410
+ - [ ] Production URL loads correctly
411
+ - [ ] Auth flow works end-to-end
412
+ - [ ] Core feature works with real data
413
+ - [ ] No mixed content warnings (HTTP/HTTPS)
414
+ - [ ] Error pages render correctly (404, 500)
415
+
416
+ ---
417
+
418
+ ## 10. Client Fetch and Polling Resilience
419
+
420
+ > 💡 **Lesson learned:** Bulk operations are the stress test for client-side polling. A single-item import may work perfectly, but importing 20+ items can spawn dozens of concurrent `setInterval` polling loops that collectively overwhelm the server's rate limiter, triggering 429 cascades that corrupt UI state when error responses are parsed as data.
421
+
422
+ - [ ] Bulk import 20+ items: no 429 storms in the console; no UI freeze
423
+ - [ ] During bulk import, individual job polling is suppressed (check Network tab for request volume)
424
+ - [ ] Rate-limited (429) polling loops back off exponentially instead of retrying every tick
425
+ - [ ] Navigate away from a page while polling is active: no orphaned fetch requests continue in the background
426
+ - [ ] Open a detail panel, switch to a different record while an async operation is running: no stale data from the previous record appears on the new one
427
+ - [ ] Toggle a star/favorite while offline or with simulated server error: star reverts to original state
428
+ - [ ] Save notes or tweaks with a simulated server failure: the shared indicator shows the **error** phase ("Couldn't save…"), not a false "Saved"
429
+ - [ ] Blur-save fields show the full ack lifecycle: `Saving…` while the request is in flight, then `✓ Saved` (auto-clears) on success
430
+ - [ ] Every Tier-A blur-save field (parent **and** child tabs) feeds the **same** shared indicator — no field persists silently with no acknowledgement
431
+ - [ ] Delete a record with a simulated server failure: confirmation dialog stays open (does not close as if succeeded)
432
+ - [ ] `res.ok` is checked before `.json()` on all interactive `fetch` calls (code review)
433
+ - [ ] Long-running **generation or research** routes: simulate HTML/plain-text error responses — UI shows a clear message without crashing; server returns JSON errors when `Accept: application/json` (when applicable)
434
+
435
+ ---
436
+
437
+ ## 11. Record-Level Activity / Event Timeline (if applicable)
438
+
439
+ - [ ] Create a manual timeline event: appears in the timeline with correct timestamp and body
440
+ - [ ] Edit an existing event: changes persist after reload
441
+ - [ ] AI-generated triage/note: marked distinctly from user-created entries
442
+ - [ ] Status change creates exactly one event (no duplicates from optimistic UI + server hook)
443
+ - [ ] Markdown body renders correctly; external links open in new tabs
444
+ - [ ] Quick-log from a reminder or dashboard surface: event appears in the main timeline
445
+
446
+ ---
447
+
448
+ ## 12. User-Facing Copy Hygiene (optional — when copy modules are adopted)
449
+
450
+ **Preconditions**
451
+
452
+ - App uses centralized copy under `$lib/content/` (or equivalent) with `export:copy` and `audit:inline-copy` scripts
453
+
454
+ **Verify**
455
+
456
+ - [ ] `pnpm export:copy` completes without errors; writer catalogs updated
457
+ - [ ] `pnpm audit:inline-copy` reports **0 UI prose not in export** (terms/CSS/noise may remain)
458
+ - [ ] `pnpm audit:copy` — no unintended duplicate prose in export (or duplicates documented as intentional)
459
+ - [ ] Run **`user-facing-content-sync-audit.md`** — every shipped feature appears on landing, help, and tours where appropriate
460
+ - [ ] Help panel and onboarding strings do **not** mention internal spec paths or backend service names
461
+ - [ ] New panel added in this release has a corresponding `*Copy.ts` module (no new product prose left inline)
462
+
463
+ ---
464
+
465
+ ## Notes
466
+
467
+ > 🔧 **Guidance:** Add test-specific notes, known issues, or environment-specific workarounds here.
package/docs/TODO.md ADDED
@@ -0,0 +1,125 @@
1
+ # [App Name] - Feature Backlog
2
+
3
+ _Organized by brand value pillars. See [BRAND_AND_PRODUCT.md](BRAND_AND_PRODUCT.md) for positioning context._
4
+
5
+ _Instructions: Start this in Session 1 as a flat list. During Phase 6 (Strategic Review), reorganize by brand pillars from BRAND_AND_PRODUCT.md. Use checkboxes for completion tracking, star ratings for leverage/priority. Process `.forgetrail/IDEAS.md` entries into this backlog periodically._
6
+
7
+ ---
8
+
9
+ > 💡 **Lesson learned:**
10
+ > 1. Organize by brand promise, not by technical layer. "Preparation Quality" is a better section header than "Backend Features." This keeps the backlog aligned with why features matter.
11
+ > 2. Star ratings (* or priority markers) indicate high-leverage features for the core value prop. These take priority over nice-to-haves.
12
+ > 3. Completed items stay in the list (checked off with date/notes). This creates a visible record of progress and prevents re-proposing already-shipped features.
13
+ > 4. Include a phased roadmap at the bottom. Time estimates keep the backlog grounded in reality.
14
+
15
+ ## [Value Pillar 1 from BRAND_AND_PRODUCT.md]
16
+
17
+ _[One-line description of what this pillar means for the user]_
18
+
19
+ - [x] [Completed feature] _(Session N, [brief note])_
20
+ - [ ] [Planned feature] [priority marker if high-leverage]
21
+ - [ ] [Planned feature]
22
+
23
+ ## [Value Pillar 2]
24
+
25
+ _[Description]_
26
+
27
+ - [ ] [Feature]
28
+ - [ ] [Feature]
29
+
30
+ ## [Value Pillar 3]
31
+
32
+ _[Description]_
33
+
34
+ - [ ] [Feature]
35
+ - [ ] [Feature]
36
+
37
+ ## [Value Pillar 4]
38
+
39
+ _[Description]_
40
+
41
+ - [ ] [Feature]
42
+ - [ ] [Feature]
43
+
44
+ ## [Value Pillar 5]
45
+
46
+ _[Description]_
47
+
48
+ - [ ] [Feature]
49
+ - [ ] [Feature]
50
+
51
+ ## Foundation
52
+
53
+ _Cross-cutting work that supports all pillars: code quality, infrastructure, documentation, security._
54
+
55
+ ### Robustness & Code Quality
56
+
57
+ - [ ] [Task]. See CODE_QUALITY.md finding [ID].
58
+
59
+ ### Security
60
+
61
+ - [ ] [Task]
62
+
63
+ ### Security Audit ([Date])
64
+
65
+ > 💡 **Lesson learned:** After running the black hat audit (prompts/black-hat-audit.md → BLACK_HAT_REPORT.md) and code quality review (CODE_QUALITY.md), import all actionable findings here organized by priority. This creates a single, unified backlog. As fixes land, update both the TODO checkbox and the finding status in the source report.
66
+ >
67
+ > Group by priority:
68
+ > - P0 = CRITICAL + HIGH findings that are directly exploitable
69
+ > - P1 = HIGH findings for defense-in-depth + MEDIUM findings on critical paths
70
+ > - P2 = remaining MEDIUM + LOW + INFO findings
71
+
72
+ #### P0 — Immediate (fix before launch)
73
+
74
+ - [ ] [Finding ID]: [One-line description from BLACK_HAT_REPORT.md or CODE_QUALITY.md]
75
+
76
+ #### P1 — Short-term (next sprint)
77
+
78
+ - [ ] [Finding ID]: [One-line description]
79
+
80
+ #### P2 — Backlog
81
+
82
+ - [ ] [Finding ID]: [One-line description]
83
+
84
+ ### Documentation
85
+
86
+ - [ ] [Task]
87
+
88
+ ### Payments & Growth
89
+
90
+ - [ ] [Task]. See BUSINESS_PLAN.md.
91
+
92
+ ### UX Polish
93
+
94
+ - [ ] [Task]
95
+
96
+ ### Accessibility
97
+
98
+ - [ ] [Task]
99
+
100
+ ---
101
+
102
+ ## Phased Roadmap
103
+
104
+ _Break the backlog into time-boxed phases with clear dependencies._
105
+
106
+ ### Phase 1: [Name] ([estimated time])
107
+
108
+ _Focus: [what this phase accomplishes]_
109
+
110
+ - [ ] [Task from backlog above]
111
+ - [ ] [Task]
112
+
113
+ ### Phase 2: [Name] ([estimated time])
114
+
115
+ _Depends on: Phase 1_
116
+
117
+ - [ ] [Task]
118
+ - [ ] [Task]
119
+
120
+ ### Phase 3: [Name] ([estimated time])
121
+
122
+ _Depends on: Phase 2_
123
+
124
+ - [ ] [Task]
125
+ - [ ] [Task]
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "forgetrail",
3
+ "version": "0.3.0",
4
+ "private": false,
5
+ "description": "ForgeTrail: a persistent development system for building software with AI agents. CLI, Lite protocol, and methodology templates.",
6
+ "license": "Apache-2.0",
7
+ "type": "module",
8
+ "bin": {
9
+ "forgetrail": "./scripts/forgetrail-cli.mjs"
10
+ },
11
+ "files": [
12
+ "scripts/",
13
+ "content/",
14
+ "docs/",
15
+ "prompts/",
16
+ "WORKFLOW.md",
17
+ "TRACKING_SCHEMA.md",
18
+ "workflow_tracking.json",
19
+ "INITIAL_PROMPT.md",
20
+ "CONTINUATION_PROMPT.md",
21
+ "TRY_FORGETRAIL.md",
22
+ "README.md",
23
+ "LICENSE"
24
+ ],
25
+ "engines": {
26
+ "node": ">=20"
27
+ },
28
+ "keywords": [
29
+ "forgetrail",
30
+ "mcp",
31
+ "ai-agents",
32
+ "cursor",
33
+ "claude",
34
+ "methodology",
35
+ "lite"
36
+ ],
37
+ "author": {
38
+ "name": "Catalyst Forge LLC",
39
+ "url": "https://catalystforge.com"
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/Catalyst-Forge-LLC/forgetrail.git"
44
+ },
45
+ "bugs": {
46
+ "url": "https://github.com/Catalyst-Forge-LLC/forgetrail/issues"
47
+ },
48
+ "homepage": "https://forgetrail.dev",
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "scripts": {
53
+ "install:forgetrail": "node scripts/install-forgetrail.mjs",
54
+ "install:lite": "node scripts/install-forgetrail-lite.mjs",
55
+ "link:global": "node scripts/link-global.mjs",
56
+ "mcp": "node scripts/mcp-status.mjs dev",
57
+ "mcp:build": "node scripts/mcp-status.mjs build",
58
+ "mcp:status": "node scripts/mcp-status.mjs status",
59
+ "mcp:ping": "node scripts/mcp-status.mjs ping",
60
+ "mcp:cursor-config": "node scripts/mcp-status.mjs cursor-config",
61
+ "mcp:inspector": "node scripts/mcp-status.mjs inspector",
62
+ "ship": "pnpm --dir site run ship",
63
+ "site:dev": "pnpm --dir site dev",
64
+ "site:build": "pnpm --dir site run build",
65
+ "site:deploy": "pnpm --dir site run ship",
66
+ "pack:check": "node scripts/publish-gate.mjs"
67
+ }
68
+ }