nightytidy 0.3.7 → 0.3.9

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 (37) hide show
  1. package/bin/nightytidy.js +1 -1
  2. package/package.json +1 -1
  3. package/src/agent/git-integration.js +4 -1
  4. package/src/claude.js +1 -1
  5. package/src/prompts/manifest.json +138 -138
  6. package/src/prompts/steps/02-test-coverage.md +181 -181
  7. package/src/prompts/steps/03-test-hardening.md +181 -181
  8. package/src/prompts/steps/04-test-architecture.md +130 -130
  9. package/src/prompts/steps/05-test-consolidation.md +165 -165
  10. package/src/prompts/steps/06-test-quality.md +211 -211
  11. package/src/prompts/steps/07-api-design.md +165 -165
  12. package/src/prompts/steps/08-security-sweep.md +207 -207
  13. package/src/prompts/steps/09-dependency-health.md +217 -217
  14. package/src/prompts/steps/10-codebase-cleanup.md +189 -189
  15. package/src/prompts/steps/11-crosscutting-concerns.md +196 -196
  16. package/src/prompts/steps/12-file-decomposition.md +263 -263
  17. package/src/prompts/steps/13-code-elegance.md +329 -329
  18. package/src/prompts/steps/14-architectural-complexity.md +297 -297
  19. package/src/prompts/steps/15-type-safety.md +192 -192
  20. package/src/prompts/steps/16-logging-error-message.md +173 -173
  21. package/src/prompts/steps/17-data-integrity.md +139 -139
  22. package/src/prompts/steps/18-performance.md +183 -183
  23. package/src/prompts/steps/19-cost-resource-optimization.md +136 -136
  24. package/src/prompts/steps/20-error-recovery.md +145 -145
  25. package/src/prompts/steps/21-race-condition-audit.md +178 -178
  26. package/src/prompts/steps/22-bug-hunt.md +229 -229
  27. package/src/prompts/steps/23-frontend-quality.md +210 -210
  28. package/src/prompts/steps/24-uiux-audit.md +284 -284
  29. package/src/prompts/steps/25-state-management.md +170 -170
  30. package/src/prompts/steps/26-perceived-performance.md +190 -190
  31. package/src/prompts/steps/27-devops.md +165 -165
  32. package/src/prompts/steps/28-scheduled-job-chron-jobs.md +141 -141
  33. package/src/prompts/steps/29-observability.md +152 -152
  34. package/src/prompts/steps/30-backup-check.md +155 -155
  35. package/src/prompts/steps/31-product-polish-ux-friction.md +122 -122
  36. package/src/prompts/steps/32-feature-discovery-opportunity.md +128 -128
  37. package/src/prompts/steps/33-strategic-opportunities.md +217 -217
@@ -1,122 +1,122 @@
1
- # Product Polish & UX Friction Audit
2
-
3
- READ-ONLY analysis. Do not modify any code.
4
-
5
- ## Ground Rules
6
-
7
- - Evaluate as a **user**, not a developer. "The code handles this correctly" is irrelevant if the user can't tell.
8
- - Be specific: not "onboarding could be better" but "after signup, user lands on an empty dashboard with no guidance."
9
- - Classify every issue: **broken** / **confusing** / **incomplete** / **missing**.
10
- - Severity = frequency × pain. Trace every flow.
11
-
12
- ---
13
-
14
- ## Phase 1: User Journey Mapping
15
-
16
- **Entry points** — Trace each: signup, login, invite link, OAuth, magic link, public pages, shared links, API, CLI, deep links.
17
-
18
- **Core journeys per user role:**
19
- - First use: signup → onboarding → first meaningful action → "aha moment"
20
- - Core loop: the daily/weekly workflow
21
- - Configuration: settings, profile, team/org management
22
- - Edge cases: account recovery, plan changes, data export, deletion
23
- - Exit points: dead ends, confusing branches, flows that just stop
24
-
25
- **Secondary flows** — Notifications, search, filtering, sorting, bulk actions, imports/exports, integrations, billing, admin.
26
-
27
- ---
28
-
29
- ## Phase 2: First-Use & Onboarding
30
-
31
- **Signup:** Step count, field necessity, email verification clarity (cross-device?), OAuth permission scope & failure fallback, error specificity (duplicate email, weak password, etc.).
32
-
33
- **First experience:** What appears post-signup — empty state, tutorial, or sample data? Clear path to first action? Blocking setup steps? Skippable onboarding? Progress saved if user leaves?
34
-
35
- **Empty states:** For every list/dashboard/feed — what shows with zero data? Does it guide the user toward populating it?
36
-
37
- ---
38
-
39
- ## Phase 3: Core Workflow
40
-
41
- **Primary workflow:** Click/step count for common actions. Unnecessary confirmations? Missing confirmations on destructive actions? Undo support? Save clarity (auto vs. manual, feedback)?
42
-
43
- **Forms & inputs:** Required/optional marking, inline vs. submit-only validation, sensible defaults, helpful placeholders, error display (all vs. first), input preservation on failure, progress for long forms, timezone/date format clarity.
44
-
45
- **Navigation:** Location awareness (breadcrumbs, active states, titles), back-navigation (browser + in-app), information architecture logic, deep link shareability & permissions.
46
-
47
- **Feedback & loading:** Immediate feedback on every action? Click-and-nothing-happens cases? Progress for long operations? Safe to navigate away? Retry without re-entry on failure?
48
-
49
- ---
50
-
51
- ## Phase 4: Edge Cases & Errors
52
-
53
- **Destructive actions:** Confirmation with consequences explained? Undo available & obvious? Cascade effects communicated? Bulk action extra confirmation with count?
54
-
55
- **Common error states:** Network offline, session expired (unsaved work?), permission denied (actionable message?), not found (helpful or generic 404?), rate limited (wait guidance?), file upload failures (size/type/network — all communicated?).
56
-
57
- **Concurrency:** Two users editing same resource — conflict handling? Multi-tab state sync? Stale data refresh?
58
-
59
- **Boundaries:** Long text (truncation/overflow/layout break?), special characters/emoji/RTL, large datasets (1000+ items — pagination/virtualization/performance?), minimum-input functionality.
60
-
61
- ---
62
-
63
- ## Phase 5: Settings & Configuration
64
-
65
- **Every setting:** Discoverable? Explained? Immediate or requires save? Resettable to default? Dangerous settings guarded?
66
-
67
- **Missing settings users would expect:** Notification preferences, display prefs, timezone, language, default views, keyboard shortcuts, data export.
68
-
69
- **Account management:** Change email/password/name? Delete account (clear, complete process)? Team invite/role/removal flows? Data fate on leave/deletion?
70
-
71
- ---
72
-
73
- ## Phase 6: Notifications
74
-
75
- **Inventory all** emails, in-app, push, webhooks: trigger, content quality, user control (opt-out, frequency, channel).
76
-
77
- **Transactional:** Welcome email usefulness, password reset clarity & expiry, invite context, billing transparency.
78
-
79
- ---
80
-
81
- ## Phase 7: Accessibility Quick Scan
82
-
83
- Flag obvious issues only (defer full audit): keyboard-only core flow completion, color-only information, screen reader labels on interactive elements, mobile responsiveness.
84
-
85
- ---
86
-
87
- ## Output
88
-
89
- Save as `audit-reports/31_PRODUCT_POLISH_REPORT_[run-number]_[date]_[time in user's local time].md`.
90
-
91
- ### Report Sections
92
-
93
- 1. **Executive Summary** — Overall polish level (rough/fair/good/polished), worst friction, journey health.
94
- 2. **User Journey Map** — All flows traced, health per flow (smooth / some friction / significant friction / broken).
95
- 3. **Critical Friction Points** — Table: Flow | Location (file/component) | Issue | Severity | Type
96
- 4. **First-Use & Onboarding** — Signup friction, onboarding gaps, empty states.
97
- 5. **Core Workflow** — Step-by-step assessment, friction, feedback, form quality.
98
- 6. **Edge Cases & Errors** — Destructive action safety, error quality, boundaries.
99
- 7. **Settings & Account** — Gaps, account management, configuration polish.
100
- 8. **Notifications** — Inventory, quality, missing notifications, user control.
101
- 9. **Accessibility Notes** — Obvious issues only.
102
- 10. **Recommendations** — Priority-ordered by effort: quick fixes (hours) / medium (days) / larger (weeks).
103
-
104
- **Report rules:** Don't pad — if a flow is smooth, say so in one line. Note items requiring a running app as "verify in running app."
105
-
106
- ---
107
-
108
- ## Chat Summary (Required)
109
-
110
- Print directly in conversation — don't make the user open the file.
111
-
112
- 1. **Status Line** — One sentence: what you did.
113
- 2. **Key Findings** — Most important friction points, specific and actionable.
114
- 3. **Recommendations** (only if warranted):
115
-
116
- | # | Recommendation | Impact | Risk if Ignored | Worth Doing? | Details |
117
- |---|---|---|---|---|---|
118
- | *#* | *≤10 words* | *What improves* | *Low/Med/High/Critical* | *Yes/Probably/Only if time* | *1–3 sentences* |
119
-
120
- Order by risk descending. Be honest in "Worth Doing?" — if marginal, say so.
121
-
122
- 4. **Report Location** — Full file path.
1
+ # Product Polish & UX Friction Audit
2
+
3
+ READ-ONLY analysis. Do not modify any code.
4
+
5
+ ## Ground Rules
6
+
7
+ - Evaluate as a **user**, not a developer. "The code handles this correctly" is irrelevant if the user can't tell.
8
+ - Be specific: not "onboarding could be better" but "after signup, user lands on an empty dashboard with no guidance."
9
+ - Classify every issue: **broken** / **confusing** / **incomplete** / **missing**.
10
+ - Severity = frequency × pain. Trace every flow.
11
+
12
+ ---
13
+
14
+ ## Phase 1: User Journey Mapping
15
+
16
+ **Entry points** — Trace each: signup, login, invite link, OAuth, magic link, public pages, shared links, API, CLI, deep links.
17
+
18
+ **Core journeys per user role:**
19
+ - First use: signup → onboarding → first meaningful action → "aha moment"
20
+ - Core loop: the daily/weekly workflow
21
+ - Configuration: settings, profile, team/org management
22
+ - Edge cases: account recovery, plan changes, data export, deletion
23
+ - Exit points: dead ends, confusing branches, flows that just stop
24
+
25
+ **Secondary flows** — Notifications, search, filtering, sorting, bulk actions, imports/exports, integrations, billing, admin.
26
+
27
+ ---
28
+
29
+ ## Phase 2: First-Use & Onboarding
30
+
31
+ **Signup:** Step count, field necessity, email verification clarity (cross-device?), OAuth permission scope & failure fallback, error specificity (duplicate email, weak password, etc.).
32
+
33
+ **First experience:** What appears post-signup — empty state, tutorial, or sample data? Clear path to first action? Blocking setup steps? Skippable onboarding? Progress saved if user leaves?
34
+
35
+ **Empty states:** For every list/dashboard/feed — what shows with zero data? Does it guide the user toward populating it?
36
+
37
+ ---
38
+
39
+ ## Phase 3: Core Workflow
40
+
41
+ **Primary workflow:** Click/step count for common actions. Unnecessary confirmations? Missing confirmations on destructive actions? Undo support? Save clarity (auto vs. manual, feedback)?
42
+
43
+ **Forms & inputs:** Required/optional marking, inline vs. submit-only validation, sensible defaults, helpful placeholders, error display (all vs. first), input preservation on failure, progress for long forms, timezone/date format clarity.
44
+
45
+ **Navigation:** Location awareness (breadcrumbs, active states, titles), back-navigation (browser + in-app), information architecture logic, deep link shareability & permissions.
46
+
47
+ **Feedback & loading:** Immediate feedback on every action? Click-and-nothing-happens cases? Progress for long operations? Safe to navigate away? Retry without re-entry on failure?
48
+
49
+ ---
50
+
51
+ ## Phase 4: Edge Cases & Errors
52
+
53
+ **Destructive actions:** Confirmation with consequences explained? Undo available & obvious? Cascade effects communicated? Bulk action extra confirmation with count?
54
+
55
+ **Common error states:** Network offline, session expired (unsaved work?), permission denied (actionable message?), not found (helpful or generic 404?), rate limited (wait guidance?), file upload failures (size/type/network — all communicated?).
56
+
57
+ **Concurrency:** Two users editing same resource — conflict handling? Multi-tab state sync? Stale data refresh?
58
+
59
+ **Boundaries:** Long text (truncation/overflow/layout break?), special characters/emoji/RTL, large datasets (1000+ items — pagination/virtualization/performance?), minimum-input functionality.
60
+
61
+ ---
62
+
63
+ ## Phase 5: Settings & Configuration
64
+
65
+ **Every setting:** Discoverable? Explained? Immediate or requires save? Resettable to default? Dangerous settings guarded?
66
+
67
+ **Missing settings users would expect:** Notification preferences, display prefs, timezone, language, default views, keyboard shortcuts, data export.
68
+
69
+ **Account management:** Change email/password/name? Delete account (clear, complete process)? Team invite/role/removal flows? Data fate on leave/deletion?
70
+
71
+ ---
72
+
73
+ ## Phase 6: Notifications
74
+
75
+ **Inventory all** emails, in-app, push, webhooks: trigger, content quality, user control (opt-out, frequency, channel).
76
+
77
+ **Transactional:** Welcome email usefulness, password reset clarity & expiry, invite context, billing transparency.
78
+
79
+ ---
80
+
81
+ ## Phase 7: Accessibility Quick Scan
82
+
83
+ Flag obvious issues only (defer full audit): keyboard-only core flow completion, color-only information, screen reader labels on interactive elements, mobile responsiveness.
84
+
85
+ ---
86
+
87
+ ## Output
88
+
89
+ Save as `audit-reports/31_PRODUCT_POLISH_REPORT_[run-number]_[date]_[time in user's local time].md`.
90
+
91
+ ### Report Sections
92
+
93
+ 1. **Executive Summary** — Overall polish level (rough/fair/good/polished), worst friction, journey health.
94
+ 2. **User Journey Map** — All flows traced, health per flow (smooth / some friction / significant friction / broken).
95
+ 3. **Critical Friction Points** — Table: Flow | Location (file/component) | Issue | Severity | Type
96
+ 4. **First-Use & Onboarding** — Signup friction, onboarding gaps, empty states.
97
+ 5. **Core Workflow** — Step-by-step assessment, friction, feedback, form quality.
98
+ 6. **Edge Cases & Errors** — Destructive action safety, error quality, boundaries.
99
+ 7. **Settings & Account** — Gaps, account management, configuration polish.
100
+ 8. **Notifications** — Inventory, quality, missing notifications, user control.
101
+ 9. **Accessibility Notes** — Obvious issues only.
102
+ 10. **Recommendations** — Priority-ordered by effort: quick fixes (hours) / medium (days) / larger (weeks).
103
+
104
+ **Report rules:** Don't pad — if a flow is smooth, say so in one line. Note items requiring a running app as "verify in running app."
105
+
106
+ ---
107
+
108
+ ## Chat Summary (Required)
109
+
110
+ Print directly in conversation — don't make the user open the file.
111
+
112
+ 1. **Status Line** — One sentence: what you did.
113
+ 2. **Key Findings** — Most important friction points, specific and actionable.
114
+ 3. **Recommendations** (only if warranted):
115
+
116
+ | # | Recommendation | Impact | Risk if Ignored | Worth Doing? | Details |
117
+ |---|---|---|---|---|---|
118
+ | *#* | *≤10 words* | *What improves* | *Low/Med/High/Critical* | *Yes/Probably/Only if time* | *1–3 sentences* |
119
+
120
+ Order by risk descending. Be honest in "Worth Doing?" — if marginal, say so.
121
+
122
+ 4. **Report Location** — Full file path.
@@ -1,128 +1,128 @@
1
- # Feature Discovery & Opportunity Audit
2
-
3
- Read the entire codebase. Identify features, capabilities, and improvements worth building — grounded purely in what exists, what's partial, and what the architecture supports.
4
-
5
- **READ-ONLY. No web search. No code changes.**
6
-
7
- ---
8
-
9
- ## Rules
10
-
11
- - Every recommendation must reference specific files, models, or patterns.
12
- - Distinguish: **natural extensions** (80%+ done), **logical additions** (users would expect), **ambitious opportunities** (differentiators).
13
- - Quality over quantity. 10 well-reasoned opportunities > 50 shallow ones.
14
- - Be honest about effort and maintenance burden. "Add AI" is not a recommendation — specify data, infrastructure, and minimal viable version.
15
- - Don't recommend features that conflict with the product's design intent.
16
- - Prioritize features leveraging existing data/infrastructure over new systems.
17
- - You have all night. Read everything.
18
-
19
- ---
20
-
21
- ## Phase 1: Deep Codebase Understanding
22
-
23
- **Product model** — What it does, who it serves, every feature, the full data model (entities, relationships, collected data), user roles/permissions, monetization (free/paid/tiers/gating), integrations.
24
-
25
- **Architecture capabilities** — Background jobs, notification systems (email/push/in-app/webhooks), file handling, search (full-text/filtering/faceting), real-time (WebSockets/SSE), API surface & patterns, event/audit tracking.
26
-
27
- ---
28
-
29
- ## Phase 2: Unfinished & Abandoned Features
30
-
31
- **Partially built features** — Look for:
32
- - DB tables/columns with no UI or API exposure
33
- - Models/types defined but unused in routes/components
34
- - Feature flags permanently off (read the guarded code)
35
- - Routes/endpoints not linked from UI; unreachable components/pages
36
- - TODO/FIXME comments describing planned features
37
- - Migrations adding schema for unfinished features
38
- - Config/env vars for unintegrated services
39
-
40
- For each: what was it, how far did it get, what would finish it?
41
-
42
- **Vestigial infrastructure** — Libraries barely used, notification infra sending only one type, permission systems more granular than needed, underutilized search/webhook/queue systems. These are sunk investment awaiting ROI.
43
-
44
- ---
45
-
46
- ## Phase 3: Data-Driven Opportunities
47
-
48
- **Inventory all collected data** — User actions/events, timestamps, entity relationships, stored-but-unsurfaced metadata, computed-but-undisplayed aggregations.
49
-
50
- **Underutilized data** — Analytics/insights, personalization signals, automation triggers, collaborative signals, historical trends. For each: what data exists → what feature it enables → existing pipeline support → effort.
51
-
52
- **Missing data** — Features that need data not yet collected. What's the minimal collection that unlocks the most value?
53
-
54
- ---
55
-
56
- ## Phase 4: Pattern-Based Feature Discovery
57
-
58
- **Generalization** — Hardcoded reports → report builder. Single notification type → configurable system. Fixed workflow → customizable engine. Single integration → framework. Manual admin → self-service. Single export → multi-format. Fixed views → customizable dashboards.
59
-
60
- **Cross-entity features** — Unified search, activity feeds, bulk operations, broad tagging/categorization, universal comments/notes, import/export gaps.
61
-
62
- **Power user features** — Keyboard shortcuts, saved filters/views, bulk editing, templates, API access, advanced search, custom fields, scheduled/recurring actions.
63
-
64
- **Admin & ops** — Missing admin views, audit logging gaps, user impersonation, data export, usage analytics, health dashboards.
65
-
66
- ---
67
-
68
- ## Phase 5: Automation & Intelligence
69
-
70
- **Automate manual processes** — Repetitive action patterns (macros), predictable status transitions, inferable data entry, condition-triggered notifications, manual cleanup tasks.
71
-
72
- **Smart defaults** — Fields users fill identically, likely next actions, adaptive settings, context-based pre-population.
73
-
74
- **AI-augmentable features** — Text generation/summarization, manual classification, semantic search, auto-tagging, NL summaries of data, answering questions from product data. For each: what's augmented, what data feeds it, what infra exists, minimal viable version.
75
-
76
- ---
77
-
78
- ## Phase 6: Platform Opportunities
79
-
80
- **API-as-product** — Is the API exposable to third parties? What internal capabilities would externals pay for? Could webhook/event patterns power an integration ecosystem?
81
-
82
- **Multi-tenancy / white-label** — Tenant-aware data model? Configurable branding? Partner resale/embedding potential?
83
-
84
- **Extensibility** — Custom fields/views/workflows? Plugin architecture potential? Natural integration boundaries?
85
-
86
- ---
87
-
88
- ## Output
89
-
90
- Save as `audit-reports/32_FEATURE_DISCOVERY_REPORT_[run-number]_[date]_[time in user's local time].md`.
91
-
92
- ### Report Structure
93
-
94
- 1. **Executive Summary** — Maturity assessment, opportunity count by category, top 5 highest-value, overall untapped potential.
95
-
96
- 2. **Unfinished Features** — Table: Feature | Evidence (files/tables) | Completion % | Effort to Finish | Value | Recommendation
97
-
98
- 3. **Underutilized Infrastructure** — Table: Infrastructure | Current Usage | Potential Usage | Effort | Value
99
-
100
- 4. **Data Opportunities** — Underutilized: Data Available | Feature Enabled | Pipeline Support | Effort | Impact. Missing: Feature Desired | Data Needed | Collection Effort
101
-
102
- 5. **Feature Opportunities** (main deliverable) — Per feature: Name/description, Category (natural extension / logical addition / ambitious), Evidence (specific code references), Existing foundation (% estimate), Effort (days/weeks/months with specifics), Impact, Dependencies, Priority (Critical / High / Medium / Nice-to-have)
103
-
104
- 6. **Automation & Intelligence** — Manual→automated, smart defaults, AI opportunities with data/infra grounding.
105
-
106
- 7. **Platform Opportunities** — API, multi-tenancy, extensibility assessments.
107
-
108
- 8. **Recommended Build Order** — Priority sequence by dependencies and effort-to-value. Group: quick wins (days), medium (weeks), strategic (months).
109
-
110
- ---
111
-
112
- ## Chat Summary (Required)
113
-
114
- Print directly in conversation — don't make the user open the report.
115
-
116
- 1. **Status** — One sentence: what you did.
117
- 2. **Key Findings** — Specific, grounded bullets. Lead with value. (e.g., "The `user_events` table tracks every action but nothing surfaces it — a dashboard is low-effort since `jobs/daily_stats.ts` already aggregates.")
118
- 3. **Recommendations** table:
119
-
120
- | # | Recommendation | Impact | Risk if Ignored | Worth Doing? | Details |
121
- |---|---|---|---|---|---|
122
- | | ≤10 words | What improves | Low–Critical | Yes / Probably / Only if time | 1–3 sentences |
123
-
124
- Order by value descending. Be honest — not everything is worth the engineering time. If nothing worth building was found, say so.
125
-
126
- 4. **Report Location** — Full path to the detailed report.
127
-
128
- If a phase yielded zero findings, say so in one line.
1
+ # Feature Discovery & Opportunity Audit
2
+
3
+ Read the entire codebase. Identify features, capabilities, and improvements worth building — grounded purely in what exists, what's partial, and what the architecture supports.
4
+
5
+ **READ-ONLY. No web search. No code changes.**
6
+
7
+ ---
8
+
9
+ ## Rules
10
+
11
+ - Every recommendation must reference specific files, models, or patterns.
12
+ - Distinguish: **natural extensions** (80%+ done), **logical additions** (users would expect), **ambitious opportunities** (differentiators).
13
+ - Quality over quantity. 10 well-reasoned opportunities > 50 shallow ones.
14
+ - Be honest about effort and maintenance burden. "Add AI" is not a recommendation — specify data, infrastructure, and minimal viable version.
15
+ - Don't recommend features that conflict with the product's design intent.
16
+ - Prioritize features leveraging existing data/infrastructure over new systems.
17
+ - You have all night. Read everything.
18
+
19
+ ---
20
+
21
+ ## Phase 1: Deep Codebase Understanding
22
+
23
+ **Product model** — What it does, who it serves, every feature, the full data model (entities, relationships, collected data), user roles/permissions, monetization (free/paid/tiers/gating), integrations.
24
+
25
+ **Architecture capabilities** — Background jobs, notification systems (email/push/in-app/webhooks), file handling, search (full-text/filtering/faceting), real-time (WebSockets/SSE), API surface & patterns, event/audit tracking.
26
+
27
+ ---
28
+
29
+ ## Phase 2: Unfinished & Abandoned Features
30
+
31
+ **Partially built features** — Look for:
32
+ - DB tables/columns with no UI or API exposure
33
+ - Models/types defined but unused in routes/components
34
+ - Feature flags permanently off (read the guarded code)
35
+ - Routes/endpoints not linked from UI; unreachable components/pages
36
+ - TODO/FIXME comments describing planned features
37
+ - Migrations adding schema for unfinished features
38
+ - Config/env vars for unintegrated services
39
+
40
+ For each: what was it, how far did it get, what would finish it?
41
+
42
+ **Vestigial infrastructure** — Libraries barely used, notification infra sending only one type, permission systems more granular than needed, underutilized search/webhook/queue systems. These are sunk investment awaiting ROI.
43
+
44
+ ---
45
+
46
+ ## Phase 3: Data-Driven Opportunities
47
+
48
+ **Inventory all collected data** — User actions/events, timestamps, entity relationships, stored-but-unsurfaced metadata, computed-but-undisplayed aggregations.
49
+
50
+ **Underutilized data** — Analytics/insights, personalization signals, automation triggers, collaborative signals, historical trends. For each: what data exists → what feature it enables → existing pipeline support → effort.
51
+
52
+ **Missing data** — Features that need data not yet collected. What's the minimal collection that unlocks the most value?
53
+
54
+ ---
55
+
56
+ ## Phase 4: Pattern-Based Feature Discovery
57
+
58
+ **Generalization** — Hardcoded reports → report builder. Single notification type → configurable system. Fixed workflow → customizable engine. Single integration → framework. Manual admin → self-service. Single export → multi-format. Fixed views → customizable dashboards.
59
+
60
+ **Cross-entity features** — Unified search, activity feeds, bulk operations, broad tagging/categorization, universal comments/notes, import/export gaps.
61
+
62
+ **Power user features** — Keyboard shortcuts, saved filters/views, bulk editing, templates, API access, advanced search, custom fields, scheduled/recurring actions.
63
+
64
+ **Admin & ops** — Missing admin views, audit logging gaps, user impersonation, data export, usage analytics, health dashboards.
65
+
66
+ ---
67
+
68
+ ## Phase 5: Automation & Intelligence
69
+
70
+ **Automate manual processes** — Repetitive action patterns (macros), predictable status transitions, inferable data entry, condition-triggered notifications, manual cleanup tasks.
71
+
72
+ **Smart defaults** — Fields users fill identically, likely next actions, adaptive settings, context-based pre-population.
73
+
74
+ **AI-augmentable features** — Text generation/summarization, manual classification, semantic search, auto-tagging, NL summaries of data, answering questions from product data. For each: what's augmented, what data feeds it, what infra exists, minimal viable version.
75
+
76
+ ---
77
+
78
+ ## Phase 6: Platform Opportunities
79
+
80
+ **API-as-product** — Is the API exposable to third parties? What internal capabilities would externals pay for? Could webhook/event patterns power an integration ecosystem?
81
+
82
+ **Multi-tenancy / white-label** — Tenant-aware data model? Configurable branding? Partner resale/embedding potential?
83
+
84
+ **Extensibility** — Custom fields/views/workflows? Plugin architecture potential? Natural integration boundaries?
85
+
86
+ ---
87
+
88
+ ## Output
89
+
90
+ Save as `audit-reports/32_FEATURE_DISCOVERY_REPORT_[run-number]_[date]_[time in user's local time].md`.
91
+
92
+ ### Report Structure
93
+
94
+ 1. **Executive Summary** — Maturity assessment, opportunity count by category, top 5 highest-value, overall untapped potential.
95
+
96
+ 2. **Unfinished Features** — Table: Feature | Evidence (files/tables) | Completion % | Effort to Finish | Value | Recommendation
97
+
98
+ 3. **Underutilized Infrastructure** — Table: Infrastructure | Current Usage | Potential Usage | Effort | Value
99
+
100
+ 4. **Data Opportunities** — Underutilized: Data Available | Feature Enabled | Pipeline Support | Effort | Impact. Missing: Feature Desired | Data Needed | Collection Effort
101
+
102
+ 5. **Feature Opportunities** (main deliverable) — Per feature: Name/description, Category (natural extension / logical addition / ambitious), Evidence (specific code references), Existing foundation (% estimate), Effort (days/weeks/months with specifics), Impact, Dependencies, Priority (Critical / High / Medium / Nice-to-have)
103
+
104
+ 6. **Automation & Intelligence** — Manual→automated, smart defaults, AI opportunities with data/infra grounding.
105
+
106
+ 7. **Platform Opportunities** — API, multi-tenancy, extensibility assessments.
107
+
108
+ 8. **Recommended Build Order** — Priority sequence by dependencies and effort-to-value. Group: quick wins (days), medium (weeks), strategic (months).
109
+
110
+ ---
111
+
112
+ ## Chat Summary (Required)
113
+
114
+ Print directly in conversation — don't make the user open the report.
115
+
116
+ 1. **Status** — One sentence: what you did.
117
+ 2. **Key Findings** — Specific, grounded bullets. Lead with value. (e.g., "The `user_events` table tracks every action but nothing surfaces it — a dashboard is low-effort since `jobs/daily_stats.ts` already aggregates.")
118
+ 3. **Recommendations** table:
119
+
120
+ | # | Recommendation | Impact | Risk if Ignored | Worth Doing? | Details |
121
+ |---|---|---|---|---|---|
122
+ | | ≤10 words | What improves | Low–Critical | Yes / Probably / Only if time | 1–3 sentences |
123
+
124
+ Order by value descending. Be honest — not everything is worth the engineering time. If nothing worth building was found, say so.
125
+
126
+ 4. **Report Location** — Full path to the detailed report.
127
+
128
+ If a phase yielded zero findings, say so in one line.