@withpica/mcp-server 2.11.0 → 2.22.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 (82) hide show
  1. package/CHANGELOG.md +617 -1
  2. package/dist/config.d.ts +9 -9
  3. package/dist/index.d.ts +1 -1
  4. package/dist/prompts/index.d.ts +66 -34
  5. package/dist/prompts/index.d.ts.map +1 -1
  6. package/dist/prompts/index.js +320 -607
  7. package/dist/prompts/index.js.map +1 -1
  8. package/dist/resources/index.d.ts +53 -53
  9. package/dist/server.d.ts +49 -49
  10. package/dist/tools/agreement-types.d.ts.map +1 -1
  11. package/dist/tools/agreement-types.js +14 -129
  12. package/dist/tools/agreement-types.js.map +1 -1
  13. package/dist/tools/agreements.d.ts.map +1 -1
  14. package/dist/tools/agreements.js +11 -109
  15. package/dist/tools/agreements.js.map +1 -1
  16. package/dist/tools/assets.d.ts.map +1 -1
  17. package/dist/tools/assets.js +17 -257
  18. package/dist/tools/assets.js.map +1 -1
  19. package/dist/tools/bulk.d.ts +7 -1
  20. package/dist/tools/bulk.d.ts.map +1 -1
  21. package/dist/tools/bulk.js +24 -2
  22. package/dist/tools/bulk.js.map +1 -1
  23. package/dist/tools/credits.d.ts.map +1 -1
  24. package/dist/tools/credits.js +27 -13
  25. package/dist/tools/credits.js.map +1 -1
  26. package/dist/tools/discovery.d.ts.map +1 -1
  27. package/dist/tools/discovery.js +8 -0
  28. package/dist/tools/discovery.js.map +1 -1
  29. package/dist/tools/enrichment.d.ts +47 -0
  30. package/dist/tools/enrichment.d.ts.map +1 -1
  31. package/dist/tools/enrichment.js +416 -19
  32. package/dist/tools/enrichment.js.map +1 -1
  33. package/dist/tools/index.d.ts +88 -72
  34. package/dist/tools/labels.d.ts +20 -0
  35. package/dist/tools/labels.d.ts.map +1 -0
  36. package/dist/tools/labels.js +47 -0
  37. package/dist/tools/labels.js.map +1 -0
  38. package/dist/tools/metadata.d.ts.map +1 -1
  39. package/dist/tools/metadata.js +37 -0
  40. package/dist/tools/metadata.js.map +1 -1
  41. package/dist/tools/multimedia.d.ts.map +1 -1
  42. package/dist/tools/multimedia.js +86 -11
  43. package/dist/tools/multimedia.js.map +1 -1
  44. package/dist/tools/notes.d.ts.map +1 -1
  45. package/dist/tools/notes.js +4 -1
  46. package/dist/tools/notes.js.map +1 -1
  47. package/dist/tools/people.d.ts +38 -38
  48. package/dist/tools/projects.d.ts +1 -0
  49. package/dist/tools/projects.d.ts.map +1 -1
  50. package/dist/tools/projects.js +188 -17
  51. package/dist/tools/projects.js.map +1 -1
  52. package/dist/tools/publishers.d.ts +15 -1
  53. package/dist/tools/publishers.d.ts.map +1 -1
  54. package/dist/tools/publishers.js +43 -9
  55. package/dist/tools/publishers.js.map +1 -1
  56. package/dist/tools/recordings.d.ts +30 -30
  57. package/dist/tools/recovery-hints.d.ts.map +1 -1
  58. package/dist/tools/recovery-hints.js +49 -0
  59. package/dist/tools/recovery-hints.js.map +1 -1
  60. package/dist/tools/releases.d.ts +14 -1
  61. package/dist/tools/releases.d.ts.map +1 -1
  62. package/dist/tools/releases.js +247 -36
  63. package/dist/tools/releases.js.map +1 -1
  64. package/dist/tools/search.d.ts +20 -20
  65. package/dist/tools/sessions.d.ts.map +1 -1
  66. package/dist/tools/sessions.js +42 -8
  67. package/dist/tools/sessions.js.map +1 -1
  68. package/dist/tools/settings.d.ts +1 -0
  69. package/dist/tools/settings.d.ts.map +1 -1
  70. package/dist/tools/settings.js +51 -1
  71. package/dist/tools/settings.js.map +1 -1
  72. package/dist/tools/share-links.d.ts.map +1 -1
  73. package/dist/tools/share-links.js +19 -53
  74. package/dist/tools/share-links.js.map +1 -1
  75. package/dist/tools/split-sheets.d.ts.map +1 -1
  76. package/dist/tools/split-sheets.js +3 -42
  77. package/dist/tools/split-sheets.js.map +1 -1
  78. package/dist/tools/team.d.ts.map +1 -1
  79. package/dist/tools/team.js +9 -4
  80. package/dist/tools/team.js.map +1 -1
  81. package/dist/tools/works.d.ts +38 -38
  82. package/package.json +1 -1
@@ -1,793 +1,506 @@
1
1
  // Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
2
- const SHARED_PREAMBLE = `You are guiding a music creator or professional through PICA, a catalog management platform.
3
-
4
- Tone: knowledgeable friend (StoryBrand guide, Never Split the Difference empathy). You know the right order of things but you respect their autonomy. Soft nudge, never pushy, never passive. Say what you see, recommend what you'd do, let them choose. The creator is the hero of this story — you're the guide who helps them succeed.
5
-
6
- Before starting this workflow:
7
- 1. Read workspace://context to understand where they are (catalog size, health, identifiers, integrations)
8
- 2. If a prerequisite for this skill is missing, name it plainly: "I notice you don't have [X] yet. We can continue, but [Y] will work better once [X] is in place. Want to set that up first, or carry on?"
9
- 3. Never block — always offer to continue anyway
10
-
11
- After completing this workflow:
12
- - Summarise what changed in one short paragraph
13
- - Suggest the natural next step: "now that [X] is done, the next valuable thing would be [Y]. want to do that?"
14
- - If they say no, that's fine. Don't ask twice.
15
-
16
- Discovery principle: every creator's work has equal discoverability. Catalog quality determines visibility, not fame or follower count.`;
17
2
  export class PromptRegistry {
18
3
  /**
19
- * List all available skills
4
+ * List all available prompts
20
5
  */
21
6
  listPrompts() {
22
7
  return [
23
8
  {
24
- name: "workspace-autopilot",
25
- description: "Assess the workspace state and route to the most valuable next action — use this when you first connect or don't know where to start",
9
+ name: "analyze-catalog",
10
+ description: "Analyze the music catalog and provide insights about completeness, quality, and opportunities",
26
11
  arguments: [],
27
12
  },
28
13
  {
29
- name: "establish-identity",
30
- description: "Lock in your professional identifiers (IPI, ISNI, IPN) the foundation everything else builds on",
14
+ name: "find-duplicates",
15
+ description: "Find potential duplicate works or people that might need merging",
31
16
  arguments: [],
32
17
  },
33
18
  {
34
- name: "catalog-your-music",
35
- description: "Get your music into PICA however you like Spotify link, YouTube, spreadsheet, screenshot, or just describe your songs",
19
+ name: "enrich-metadata",
20
+ description: "Suggest works and people that could be enriched from external sources (ISNI, MusicBrainz)",
36
21
  arguments: [],
37
22
  },
38
23
  {
39
- name: "upload-and-analyse",
40
- description: "Upload audio files and run analysis BPM, key, mood, energy, lyrics transcription, and fingerprint matching",
24
+ name: "verify-works",
25
+ description: "Review unverified works and suggest which ones are ready for verification",
41
26
  arguments: [],
42
27
  },
43
28
  {
44
- name: "close-the-loop",
45
- description: "Find what's missing on your works and fix each gap credits, ISWCs, publisher data, enrichment, duplicates, and verification",
46
- arguments: [
47
- {
48
- name: "work_id",
49
- description: "Optional work ID to check completeness for a specific work",
50
- required: false,
51
- },
52
- ],
29
+ name: "assess-catalog-health",
30
+ description: "Get the PICA Score and provide a detailed assessment of catalog health with prioritized improvement actions",
31
+ arguments: [],
53
32
  },
54
33
  {
55
- name: "manage-collaborators",
56
- description: "Find collaborators on your works, get their emails, send invites, and verify splits",
34
+ name: "audit-credits",
35
+ description: "Find works with missing or incomplete credits and flag potential split issues",
57
36
  arguments: [],
58
37
  },
59
38
  {
60
- name: "establish-ownership",
61
- description: "Declare who owns each work publishing rights, master rights, custody claims, and agreements",
39
+ name: "new-catalog-setup",
40
+ description: "Get started with PICAimport your music however you like (Spotify link, spreadsheet, screenshot, or just describe your songs)",
62
41
  arguments: [],
63
42
  },
64
43
  {
65
- name: "production-assets",
66
- description: "Capture what gear was used on your recordings instruments, microphones, studios, and link them for provenance",
44
+ name: "close-the-loop",
45
+ description: "Check what's missing on a specific work and offer to fix each gap",
46
+ arguments: [
47
+ {
48
+ name: "work_id",
49
+ description: "The work ID to check completeness for",
50
+ required: true,
51
+ },
52
+ ],
53
+ },
54
+ {
55
+ name: "register-my-works",
56
+ description: "Check registration status across PROs and help prepare works for registration",
67
57
  arguments: [],
68
58
  },
69
59
  {
70
- name: "stay-connected",
71
- description: "Set up Telegram, email notifications, calendar sync, and scheduled reminders for your catalog",
60
+ name: "prepare-for-sync",
61
+ description: "Get your catalog sync-ready — check audio analysis, mood tags, and completeness",
72
62
  arguments: [],
73
63
  },
74
64
  {
75
- name: "export-and-report",
76
- description: "Generate reports and exportsCatalog Asset Report, CWR registration files, CSV, health reports, provenance certificates, sync readiness",
65
+ name: "workspace-autopilot",
66
+ description: "Assess the workspace state and route to the right workflow use this when you first connect or don't know where to start",
77
67
  arguments: [],
78
68
  },
79
69
  ];
80
70
  }
81
71
  /**
82
- * Get a skill by name
72
+ * Get a prompt by name
83
73
  */
84
74
  async getPrompt(name, args) {
85
75
  switch (name) {
86
- case "workspace-autopilot":
87
- return this.getWorkspaceAutopilotSkill();
88
- case "establish-identity":
89
- return this.getEstablishIdentitySkill();
90
- case "catalog-your-music":
91
- return this.getCatalogYourMusicSkill();
92
- case "upload-and-analyse":
93
- return this.getUploadAndAnalyseSkill();
76
+ case "analyze-catalog":
77
+ return this.getAnalyzeCatalogPrompt();
78
+ case "find-duplicates":
79
+ return this.getFindDuplicatesPrompt();
80
+ case "enrich-metadata":
81
+ return this.getEnrichMetadataPrompt();
82
+ case "verify-works":
83
+ return this.getVerifyWorksPrompt();
84
+ case "assess-catalog-health":
85
+ return this.getAssessCatalogHealthPrompt();
86
+ case "audit-credits":
87
+ return this.getAuditCreditsPrompt();
88
+ case "new-catalog-setup":
89
+ return this.getNewCatalogSetupPrompt();
94
90
  case "close-the-loop":
95
- return this.getCloseTheLoopSkill(args?.work_id);
96
- case "manage-collaborators":
97
- return this.getManageCollaboratorsSkill();
98
- case "establish-ownership":
99
- return this.getEstablishOwnershipSkill();
100
- case "production-assets":
101
- return this.getProductionAssetsSkill();
102
- case "stay-connected":
103
- return this.getStayConnectedSkill();
104
- case "export-and-report":
105
- return this.getExportAndReportSkill();
91
+ return this.getCloseTheLoopPrompt(args?.work_id);
92
+ case "register-my-works":
93
+ return this.getRegisterMyWorksPrompt();
94
+ case "prepare-for-sync":
95
+ return this.getPrepareForSyncPrompt();
96
+ case "workspace-autopilot":
97
+ return this.getWorkspaceAutopilotPrompt();
106
98
  default:
107
99
  throw new Error(`Prompt not found: ${name}`);
108
100
  }
109
101
  }
110
- getWorkspaceAutopilotSkill() {
102
+ /**
103
+ * Analyze catalog prompt
104
+ */
105
+ getAnalyzeCatalogPrompt() {
111
106
  return {
112
107
  messages: [
113
108
  {
114
109
  role: "user",
115
110
  content: {
116
111
  type: "text",
117
- text: `${SHARED_PREAMBLE}
118
-
119
- --- SKILL: workspace-autopilot ---
120
-
121
- You've just connected to a PICA workspace. Assess its current state and guide the user to the most valuable next action. You are not a workflow yourself — you point to the right skill.
122
-
123
- Step 1 Orient:
124
- Read the workspace://context resource to get a snapshot: org info, catalog size, health score, identifiers, integrations, and top priorities.
125
-
126
- Step 2 Route based on what you find, in this priority order:
127
-
128
- If the catalog is EMPTY (0 works) and identifiers (IPI/ISNI/IPN) are missing:
129
- "your identifiers aren't set up yet. that's the foundation everything else builds on. want to establish those first?"
130
- Route to: establish-identity
131
-
132
- If identifiers exist but catalog is EMPTY (0 works):
133
- "you're set up but your catalog is empty. got a spotify link, a spreadsheet, or just want to describe your songs?"
134
- → Route to: catalog-your-music
135
-
136
- If the catalog has works but 0 audio files:
137
- → "you've got [N] works catalogued but no audio attached. audio unlocks analysis, sync discovery, and richer metadata."
138
- → Route to: upload-and-analyse
139
-
140
- If the catalog has works + audio but LOW completeness (PICA Score below 50 or many gaps):
141
- → Use pica_works_query({ health_filter: "low_completeness" }) to find the works that need the most attention.
142
- → "your catalog has [N] works but [X] have gaps worth closing. want to start with the ones that need the most attention?"
143
- → Route to: close-the-loop
144
-
145
- If the catalog has works but 0 collaborators invited:
146
- → "we found [N] credited people on your works who aren't connected yet. linking them up means verified splits and shared visibility."
147
- → Route to: manage-collaborators
148
-
149
- If ownership is not established on most works:
150
- → "your credits are in but ownership isn't clear on [N] works. knowing who owns what unlocks registration and licensing."
151
- → Route to: establish-ownership
152
-
153
- If there are DUPLICATE signals (workspace context mentions duplicates):
154
- → "I noticed potential duplicate works. want to review them?"
155
- → Route to: close-the-loop (duplicate detection step)
156
-
157
- If there are enrichment proposals pending:
158
- → Use pica_enrichment_proposals_list to check
159
- → "there are [N] enrichment suggestions waiting for your review."
160
- → Review proposals inline
161
-
162
- If works are UNREGISTERED (registration coverage is low):
163
- → "many of your works aren't registered yet. want to see what's blocking them and prepare exports?"
164
- → Route to: export-and-report
165
-
166
- If the catalog is HEALTHY (PICA Score above 70, few gaps):
167
- → "your catalog's in good shape. here's the quick health check..."
168
- → Offer: export-and-report, stay-connected, or "anything specific?"
169
-
170
- Step 3 — Explain your routing:
171
- Tell the user WHY you chose the skill you did, in one sentence. Example: "your catalog has 42 works but 28 are missing credits, so let's close those gaps first."
172
-
173
- Step 4 — Offer alternatives:
174
- After explaining, mention 1-2 other things they could do instead. Example: "or if you'd rather import more music first, I can help with that too."
175
-
176
- Important: Don't run all workflows at once. Pick the single most valuable action and commit to it. You can always switch later.
177
-
178
- Tools: workspace://context resource, pica_catalog_stats, pica_works_inspect (sections: score), pica_enrichment_proposals_list`,
112
+ text: `Please analyze my music catalog and provide a comprehensive report.
113
+
114
+ Use the following tools to gather data:
115
+ 1. pica_catalog_stats - Get overall statistics
116
+ 2. pica_works_query - Review works data
117
+ 3. pica_people_query - Review people data
118
+ 4. pica_recordings_query - Review recordings data
119
+
120
+ Analyze and report on:
121
+ - Overall catalog size and composition
122
+ - Data quality (missing ISWCs, ISRCs, metadata)
123
+ - Verification status (how many works are verified/unverified)
124
+ - Enrichment opportunities (people missing ISNI or MusicBrainz data)
125
+ - Completeness (works with recordings, people with credits, etc.)
126
+ - Recommendations for improvement
127
+
128
+ Please provide specific, actionable insights.`,
179
129
  },
180
130
  },
181
131
  ],
182
132
  };
183
133
  }
184
- getEstablishIdentitySkill() {
134
+ /**
135
+ * Find duplicates prompt
136
+ */
137
+ getFindDuplicatesPrompt() {
185
138
  return {
186
139
  messages: [
187
140
  {
188
141
  role: "user",
189
142
  content: {
190
143
  type: "text",
191
- text: `${SHARED_PREAMBLE}
192
-
193
- --- SKILL: establish-identity ---
194
-
195
- Lock in the creator's professional identifiers. Everything downstream — enrichment, registration, discovery — depends on knowing who this person is in the industry's systems.
196
-
197
- Check the user's person record using pica_people_inspect.
198
-
199
- IPI check:
200
- Has IPI? → great, move on
201
- No IPI → "do you have an IPI number? it's the identifier your PRO assigned you. usually on royalty statements or your PRO's website."
202
- - If provided → use pica_people_update to save it
203
- - If unknown → "no worries. we can find it later when we check your works against MLC."
204
-
205
- ISNI check:
206
- Has ISNI? → great, move on
207
- No ISNI → Search automatically using pica_people_enrich_isni
208
- - Multiple results → present candidates with known works/roles. "which of these is you?"
209
- - One strong match → "I found this — [name, works, roles]. is this you?"
210
- - No match → "no ISNI found yet. as your catalog grows, you may become eligible. we'll move on."
144
+ text: `Please help me find potential duplicate works and people in my catalog.
211
145
 
212
- IPN check:
213
- Has IPN? great, move on
214
- No IPN → "do you have an IPN? it's for neighbouring rights — if you perform on recordings. if you're purely a songwriter, you might not have one."
215
- - If provided → use pica_people_update to save it
216
- - If not applicable → skip, no nudge
146
+ Use these tools:
147
+ 1. pica_works_query - Get all works
148
+ 2. pica_people_query - Get all people
217
149
 
218
- MusicBrainz check:
219
- No MusicBrainz ID try pica_people_enrich_musicbrainz silently
220
- - Match found → "I also found you on MusicBrainz. this helps with metadata enrichment. want me to link it?"
221
- - No match don't mention it
150
+ Look for:
151
+ - Works with very similar or identical titles
152
+ - People with similar names (accounting for typos, different orderings)
153
+ - Works with the same ISWC (if ISWC exists)
154
+ - People with the same email address
222
155
 
223
- After identifiers set:
224
- Summary: "you're now identifiable as [name] with IPI [X] and ISNI [Y]. enrichment tools can now match your works across external databases."
225
- Nudge: "the next valuable thing would be getting your music in. got a spotify link or a spreadsheet?"
156
+ For each potential duplicate found:
157
+ - List the IDs and key details
158
+ - Explain why you think they might be duplicates
159
+ - Suggest whether they should be merged or kept separate
226
160
 
227
- Domain knowledge:
228
- - IPI is the most important identifier for publishing (PRO royalties depend on it)
229
- - ISNI confirmation requires human judgment — multiple results are common for common names
230
- - IPN is only relevant for performers, not pure songwriters — don't push it
231
- - MusicBrainz lookup is best-effort, not worth blocking on
232
-
233
- Tools: pica_people_inspect, pica_people_update, pica_people_enrich_isni, pica_people_enrich_musicbrainz, pica_people_query`,
161
+ Be thorough but conservative - only flag items that have a strong likelihood of being duplicates.`,
234
162
  },
235
163
  },
236
164
  ],
237
165
  };
238
166
  }
239
- getCatalogYourMusicSkill() {
167
+ /**
168
+ * Enrich metadata prompt
169
+ */
170
+ getEnrichMetadataPrompt() {
240
171
  return {
241
172
  messages: [
242
173
  {
243
174
  role: "user",
244
175
  content: {
245
176
  type: "text",
246
- text: `${SHARED_PREAMBLE}
247
-
248
- --- SKILL: catalog-your-music ---
249
-
250
- Get works into PICA however the user wants. Meet them where they are.
251
-
252
- Prerequisite check: if identifiers aren't established yet, mention it softly: "I notice your identifiers aren't set up yet. we can import now and match them later, or set those up first."
253
-
254
- "how would you like to get your music in? whatever's easiest."
255
-
256
- Spotify/Deezer/YouTube link:
257
- → Import via pica_import_streaming_link
258
- Works + recordings created automatically with ISRCs, credits, artwork
259
- Enrichment cascade fires automatically
260
- "I've imported [N] tracks from [album/playlist]. each one is a work with a linked recording. enrichment is running — it'll pull in publisher data and identifiers as it finds matches."
261
-
262
- Spreadsheet or CSV:
263
- → "send me the file or paste the contents"
264
- Use pica_import_analyze to detect columns and field mapping
265
- → Use pica_import_validate before committing
266
- → Use pica_import_execute to run the import
267
- → "I've imported [N] works. [X] had ISWCs, [Y] had complete credits."
268
-
269
- Screenshot or photo:
270
- → Read the image directly (multimodal)
271
- → Extract titles, writers, roles from what's visible
272
- → Use pica_works_create and pica_people_create from extracted data
273
- → "I can see [N] tracks. I've created works for each one and added the credits I could read. want to check them?"
274
-
275
- Just describe your songs:
276
- → Conversational — ask title, who wrote it, co-writers
277
- → Use pica_works_create as they talk
278
- → "got it — '[title]' by [writers]. anything else, or next one?"
279
-
280
- PRO statement or registration document:
281
- → Use pica_documents_analyse to extract structured data
282
- → Cross-reference existing catalog
283
- → "I found [N] works in that document. [X] already exist, [Y] are new."
284
-
285
- After any import:
286
- → Use pica_catalog_stats to show updated numbers
287
- → If duplicates detected → use pica_find_duplicates → "I notice [title] might already exist. want me to check?"
288
- → Nudge: "now that your music is in, attaching audio files unlocks analysis and sync discovery. got any masters or mixes to upload?"
289
-
290
- Multiple imports in one session:
291
- → Don't re-explain. "got another one? paste it."
292
- → Running tally: "that's [N] works total now."
293
-
294
- Domain knowledge:
295
- - Streaming links are the fastest path — one link imports an entire album with ISRCs, credits, artwork
296
- - Enrichment cascade fires automatically on streaming imports — no manual trigger needed
297
- - CSV imports need validation before execution — field mapping errors are common
298
- - Screenshots are surprisingly common — creators photograph liner notes, PRO statements, contract pages
299
- - Duplicate detection after import catches double-imports
300
- - PRO statements contain structured data but use inconsistent formats
301
-
302
- Tools: pica_import_streaming_link, pica_import_analyze, pica_import_validate, pica_import_execute, pica_works_create, pica_people_create, pica_documents_analyse, pica_catalog_stats, pica_find_duplicates`,
177
+ text: `Please identify works and people that could benefit from metadata enrichment.
178
+
179
+ Use these tools:
180
+ 1. pica_works_query - Get all works
181
+ 2. pica_people_query - Get all people
182
+
183
+ Identify:
184
+ - People without ISNI identifiers who might have one
185
+ - People without MusicBrainz IDs who might have one
186
+ - Works missing ISWCs that could potentially be looked up
187
+ - People missing biographical information
188
+
189
+ For each enrichment opportunity:
190
+ - List the person/work details
191
+ - Explain what data is missing
192
+ - Suggest potential sources (ISNI, MusicBrainz, etc.)
193
+ - Prioritize the most impactful enrichment opportunities
194
+
195
+ Focus on people and works where enrichment would add the most value.`,
303
196
  },
304
197
  },
305
198
  ],
306
199
  };
307
200
  }
308
- getUploadAndAnalyseSkill() {
201
+ /**
202
+ * Verify works prompt
203
+ */
204
+ getVerifyWorksPrompt() {
309
205
  return {
310
206
  messages: [
311
207
  {
312
208
  role: "user",
313
209
  content: {
314
210
  type: "text",
315
- text: `${SHARED_PREAMBLE}
316
-
317
- --- SKILL: upload-and-analyse ---
318
-
319
- Get audio files attached to works and run analysis. Renders the MCP App UI — the user stays in their conversation and drops files.
320
-
321
- Prerequisite check: if no works exist, mention it: "you don't have any works yet. want to import your music first?"
322
-
323
- Check which works have audio vs not using pica_works_inspect and pica_recordings_query.
324
-
325
- "you've got [N] works but [X] don't have audio attached. audio unlocks BPM, key, mood detection, sync discoverability, and fingerprinting. want to upload some masters or mixes?"
326
-
327
- If yes:
328
- → Render the upload card using pica_upload (accept: "audio")
329
- → MCP App UI appears — drag and drop inside the conversation
330
- → As files upload, link each to its work (match by filename, or ask)
331
- → Use pica_audio_presigned_upload and pica_audio_complete_upload for the upload flow
332
- → Confirm each link: "linked [filename] to '[work title]'"
333
-
334
- After upload:
335
- → "want me to analyse these? I can detect BPM, key, energy, mood, and transcribe any lyrics."
336
-
337
- If yes:
338
- → Run pica_audio_analyze on each file
339
- → Per result: "[title] — 120 BPM, key of C minor, high energy. lyrics transcribed."
340
- → If fingerprint match found: "this track was recognised as [match] — it's already in distribution databases."
341
- → If analysis fails: "couldn't analyse [filename] — file might be too short or unsupported format. try a different version?"
342
-
343
- If no:
344
- → "no problem. audio is attached, you can analyse anytime."
211
+ text: `Please review unverified works and suggest which ones are ready for verification.
345
212
 
346
- After analysis:
347
- → Summary: "[N] tracks analysed. [X] have full mood/BPM data, [Y] had lyrics transcribed, [Z] were fingerprint-matched."
348
- → Nudge: "your works are getting rich now. want to check catalog health, or move on to connecting collaborators?"
213
+ Use these tools:
214
+ 1. pica_works_query with verified: false - Get unverified works
215
+ 2. pica_recordings_by_work - Check if works have recordings
216
+ 3. pica_people_query - Check for associated people/credits
349
217
 
350
- Batch awareness:
351
- Many files: group feedback, don't confirm each individually
352
- "uploaded and linked 8 files. 2 couldn't match automatically — [file1] and [file2]. which works are these for?"
218
+ For each unverified work, assess:
219
+ - Does it have complete metadata (title, type, duration)?
220
+ - Does it have an ISWC?
221
+ - Does it have associated recordings?
222
+ - Does it have proper credits/people assigned?
353
223
 
354
- Domain knowledge:
355
- - The upload card is an MCP App — renders inside the conversation, no browser needed
356
- - Filename-to-work matching is best-effort; ask when ambiguous rather than guess wrong
357
- - ACRCloud fingerprint matches confirm the recording exists in distribution — valuable signal, not a duplicate warning
358
- - Whisper transcription via Groq is fast but may need manual correction for sung lyrics
359
- - Batch uploads need grouped feedback, not per-file confirmation spam
224
+ Categorize unverified works into:
225
+ 1. Ready to verify - Has complete information
226
+ 2. Needs minor updates - Missing 1-2 pieces of information
227
+ 3. Needs significant work - Missing multiple key fields
360
228
 
361
- Tools: pica_upload, pica_audio_presigned_upload, pica_audio_complete_upload, pica_audio_analyze, pica_audio_inspect, pica_works_inspect, pica_recordings_query, pica_recordings_update`,
229
+ Provide specific recommendations for each category, including what's needed to move works forward.`,
362
230
  },
363
231
  },
364
232
  ],
365
233
  };
366
234
  }
367
- getCloseTheLoopSkill(workId) {
368
- const workInstruction = workId
369
- ? `Check completeness for work ${workId} using pica_works_inspect({ id: "${workId}", sections: ["completeness", "enrichment", "credits"] }).`
370
- : `If no specific work requested, find works with lowest completeness: use pica_works_query({ health_filter: "low_completeness" }). "your catalog has [N] works. [X] have gaps worth closing. want to start with '[title]'?"`;
235
+ /**
236
+ * Assess catalog health prompt
237
+ */
238
+ getAssessCatalogHealthPrompt() {
371
239
  return {
372
240
  messages: [
373
241
  {
374
242
  role: "user",
375
243
  content: {
376
244
  type: "text",
377
- text: `${SHARED_PREAMBLE}
378
-
379
- --- SKILL: close-the-loop ---
380
-
381
- Per-work gap closure. Find what's missing and walk through fixing each gap. This is where the enrichment cascade decision tree lives.
382
-
383
- ${workInstruction}
384
-
385
- For the target work, inspect completeness + enrichment status + credits using:
386
- 1. pica_works_inspect with sections: ["completeness"]full gap analysis
387
- 2. pica_credits_listcheck credits and splits
388
- 3. pica_works_inspect with sections: ["enrichment"] check what enrichment sources have been tried
389
-
390
- Build the gap list, ordered by impact:
391
-
392
- Gap priority order:
393
- 1. Missing credits/splits (blocks everything downstream)
394
- 2. Missing ISWC (blocks registration)
395
- 3. Missing publisher data (blocks royalty collection)
396
- 4. Missing ISRC on recording (blocks neighbouring rights)
397
- 5. Missing audio (blocks analysis and sync discovery)
398
- 6. Missing mood/BPM/key (blocks sync search)
399
- 7. Missing agreements (important but not urgent)
400
-
401
- For each gap, work through conversationally:
402
-
403
- Missing credits:
404
- → "who wrote '[title]'? just you, or co-writers?"
405
- → Add credits with roles (composer, lyricist, arranger) via pica_credits_update
406
- → "what's the split?" — suggest equal split as starting point
407
-
408
- Missing ISWC — enrichment decision tree:
409
- → Has IPI on credited writers? → try pica_enrich_work_mlc first
410
- (gives ISWC + publisher + splits in one call)
411
- → No IPI but has title + writer name? → try pica_enrich_work_musicbrainz
412
- (broader matcher, less publishing data)
413
- → MLC returns multiple matches? → present candidates with writer names and publisher info, let user confirm
414
- → No match anywhere? → "no ISWC found yet. your PRO will assign one when you register."
415
-
416
- Missing publisher data:
417
- → If MLC wasn't tried → try pica_enrich_work_mlc now
418
- → If MLC returned data → "MLC shows [publisher] with [X]% share. does that look right?"
419
-
420
- Missing ISRC:
421
- → Check if recording exists via pica_recordings_inspect and has ISRC
422
- → If exists without ISRC → "do you have the ISRC? usually from your distributor."
423
- → If no recording → "this work doesn't have a recording yet. want to upload audio?"
424
-
425
- After each gap:
426
- → Don't re-read the full list. Move to next: "nice. next — [gap]..."
427
- → If skip: "no problem." Move on, no follow-up.
428
-
429
- After closing gaps on 3+ works in one session:
430
- → Run pica_catalog_diligence for aggregate impact
431
- → "you've closed [N] gaps across [X] works. diligence score moved from [before] to [after]. biggest remaining area is [pillar]."
432
-
433
- Duplicate detection (inline):
434
- → If during gap closure a duplicate is found (same ISWC, similar title + artist): surface it
435
- → "this looks like it might be the same work as '[other title]'. want me to compare them side by side?"
436
- → If confirmed → use pica_merge_duplicates, preserving the richer record
437
-
438
- After all gaps addressed (or user stops):
439
- → Summary: "closed [N] gaps on '[title]'. PICA score went from [X] to [Y]."
440
- → Offer: "want to do the next work, or take a break?"
441
-
442
- Domain knowledge:
443
- - Enrichment source priority: MLC first if IPI available (ISWC + publisher + splits), MusicBrainz second (broadest matcher), Spotify third (genre/mood only)
444
- - MLC field gotchas: uses mlcsongCode (lowercase s), writer fields are writer-prefixed, no ISWC lookup (only songCode)
445
- - Credits before enrichment: adding credits with IPI unlocks MLC lookups. Without credits, enrichment is limited to title+artist matching
446
- - Gap order matters: credits and ISWC are structural (everything else depends on them); audio and mood are additive
447
- - Duplicate detection during gap closure catches cases where enrichment reveals two records are the same work
448
- - Catalog diligence as feedback loop: after closing several gaps, show aggregate impact to motivate continued effort
449
-
450
- Tools: pica_works_inspect, pica_works_query, pica_credits_list, pica_credits_update, pica_enrich_work_mlc, pica_enrich_work_musicbrainz, pica_enrich_work_spotify, pica_recordings_inspect, pica_find_duplicates, pica_merge_duplicates, pica_catalog_diligence`,
245
+ text: `Please assess the health of my music catalog using the PICA Score.
246
+
247
+ Use these tools:
248
+ 1. pica_works_inspect({ sections: ["score"] }) - Get the PICA Score with pillar breakdown
249
+ 2. pica_catalog_stats - Get raw catalog statistics for additional context
250
+ 3. pica_works_query - Sample works data to understand quality
251
+
252
+ Analyze:
253
+ - The composite score and grade is this catalog ready for commercial use?
254
+ - Each pillar (income, ownership, asset, verification) which is weakest?
255
+ - The top actions prioritize them by effort vs impact
256
+ - Compare pillar scores to identify the biggest gaps
257
+
258
+ Provide:
259
+ - A plain-language summary of catalog health (suitable for a non-technical stakeholder)
260
+ - The top 3 highest-impact improvements with specific steps
261
+ - An estimate of where the score could reach after those improvements
262
+ - Any urgent issues that need immediate attention (e.g., missing ownership data, unverified high-value works)`,
451
263
  },
452
264
  },
453
265
  ],
454
266
  };
455
267
  }
456
- getManageCollaboratorsSkill() {
268
+ /**
269
+ * Audit credits prompt
270
+ */
271
+ getAuditCreditsPrompt() {
457
272
  return {
458
273
  messages: [
459
274
  {
460
275
  role: "user",
461
276
  content: {
462
277
  type: "text",
463
- text: `${SHARED_PREAMBLE}
464
-
465
- --- SKILL: manage-collaborators ---
466
-
467
- Connect the humans behind the credits. Find collaborators, get contact info, invite them, verify splits.
468
-
469
- Prerequisite check: if no works with credits exist, mention it: "your works don't have credits yet. adding credits first makes collaborator management much easier."
470
-
471
- Scan works for credited people who aren't connected using pica_people_query.
472
-
473
- "we found [N] people credited on your works who aren't connected yet. connecting them means they can verify credits, confirm splits, and manage their side of the catalog."
474
-
475
- Present collaborators grouped by frequency:
476
- "[name] credited on [N] works as [role]. no email on file."
477
- → "[name] — credited on [N] works. has email, not yet invited."
478
-
479
- For each collaborator:
480
- "do you have an email for [name]?"
481
-
482
- If yes:
483
- Use pica_people_update to save the email
484
- → "want me to send them an invite? they'll get a link to confirm their credits and set up their own workspace."
485
- → If yes → use pica_collaborators_invite
486
- → "invite sent. they've got 7 days to accept."
487
-
488
- If no:
489
- → "no worries. we can come back to this." Move on.
490
-
491
- After invites:
492
- → "want to check the splits on works you share with [name]?"
493
-
494
- Split review:
495
- → Show current splits per work using pica_credits_list
496
- → "do these look right?"
497
- → If adjustment → use pica_credits_update
498
- → If splits don't total 100% → "these add up to [X]%. want to adjust, or is the remaining [Y]% assigned to a publisher?"
499
-
500
- Bulk invites:
501
- → Many collaborators → "want to give me all the emails at once?"
502
- → Use pica_collaborators_invite_bulk for batch send
503
-
504
- Warm-path note:
505
- → "when [name] accepts, their credits become verified and their identifiers will automatically link to your shared works."
506
-
507
- After session:
508
- → Summary: "invited [N] collaborators, confirmed splits on [X] works."
509
- → Nudge: "next — who actually owns these works? that determines licensing and registration rights."
510
-
511
- Domain knowledge:
512
- - Collaborator connection is social, not technical — needs emails and invitations
513
- - Split verification is best done while context is fresh
514
- - 100% split check is important but missing percentage often belongs to a publisher
515
- - Bulk invites are critical for large catalogs
516
- - Warm-path acceptance auto-links identifiers and verifies credits
517
- - 7-day invite expiry
518
-
519
- Tools: pica_people_query, pica_people_inspect, pica_people_update, pica_collaborators_invite, pica_collaborators_invite_bulk, pica_collaborators_invites_list, pica_credits_list, pica_credits_update, pica_recording_splits_list, pica_recording_splits_create`,
278
+ text: `Please audit the credits across my music catalog to find gaps and issues.
279
+
280
+ Use these tools:
281
+ 1. pica_works_query - Get all works
282
+ 2. pica_credits_list - Check credits for each work (sample at least 20 works, prioritizing recent ones)
283
+ 3. pica_people_query - Cross-reference credited people
284
+
285
+ Look for:
286
+ - Works with no credits at all (no collaborators assigned)
287
+ - Works where splits don't total 100%
288
+ - Works with only one credited person (potential missing collaborators)
289
+ - People who appear in multiple works — are their roles consistent?
290
+ - Credits with generic roles (just "writer") vs specific roles ("composer", "lyricist")
291
+ - People credited on works but missing key identifiers (IPI, ISNI)
292
+
293
+ Report:
294
+ - Summary statistics (% of works with credits, average collaborators per work)
295
+ - List of works with no credits (highest priority to fix)
296
+ - List of works with potential split issues
297
+ - Recommendations for improving credit completeness
298
+ - People who should be enriched with external identifiers for royalty collection`,
520
299
  },
521
300
  },
522
301
  ],
523
302
  };
524
303
  }
525
- getEstablishOwnershipSkill() {
304
+ /**
305
+ * New catalog setup prompt — first-time onboarding
306
+ */
307
+ getNewCatalogSetupPrompt() {
526
308
  return {
527
309
  messages: [
528
310
  {
529
311
  role: "user",
530
312
  content: {
531
313
  type: "text",
532
- text: `${SHARED_PREAMBLE}
533
-
534
- --- SKILL: establish-ownership ---
535
-
536
- Determine and record who owns each work. This is the custody and agreements layer — who can license, register, collect, and transfer.
537
-
538
- Prerequisite check: if works don't have credits, mention it: "credits help clarify ownership. want to add those first?"
539
-
540
- "now that your works have credits and collaborators, the next important thing is ownership. who actually owns these songs? that determines who can license, register, and collect."
541
-
542
- For each work (or batch if uniform):
543
-
544
- Role declaration:
545
- → "what's your role on '[title]'? songwriter, producer, performer, publisher, or a combination?"
546
- → This clarifies whether they hold publishing rights, master rights, or both
547
-
548
- Publishing rights (composition):
549
- → "do you own the publishing outright, or is there a deal?"
314
+ text: `I just connected to PICA. Help me get started with my music catalog.
550
315
 
551
- Self-published:
552
- → "you control 100% of the publishing?"
553
- → If co-writers → "do they control their shares, or does anyone have a publisher?"
554
- → Record custody via pica_custody_claim
316
+ First, read the workspace://context resource to understand my current catalog state (is it empty or do I already have works?).
555
317
 
556
- Has a publisher:
557
- "who's the publisher? is it an admin deal where you keep ownership, or a traditional deal where they own a share?"
558
- Admin deal creator retains ownership, publisher administers
559
- Traditional deal publisher owns a percentage
560
- "do you have the agreement as a document? I can read it and extract the key terms."
561
- → If yes → use pica_documents_analyse
318
+ If the catalog is empty, welcome me and explain that I can get my music into PICA however I like:
319
+ 1. Paste a Spotify or Deezer link use pica_import_streaming_link to import tracks with ISRCs, credits, and artwork automatically
320
+ 2. Share a spreadsheet or PRO statement use pica_import_analyze to read columns and import in bulk
321
+ 3. Send a screenshot of a track listing or release — you can read it and create the works from what you see
322
+ 4. Just describe my songs use pica_works_create to add them as we talk
562
323
 
563
- Master rights (recording):
564
- → "who owns the recordings? you, a label, or self-released?"
565
- → If label → "what's the deal? do they own the masters outright, or is there a reversion clause?"
566
- → Record master ownership separately from publishing
324
+ Ask me what I've got and help me get started with whichever method I choose.
567
325
 
568
- Multiple works, same deal:
569
- "does this arrangement apply to all your works, or just some?"
570
- → Batch-apply where uniform
326
+ After importing, guide me through closing the loop on each work:
327
+ - Who wrote these songs? (pica_credits_update add writers and set splits)
328
+ - Are there publishing details registered? (pica_enrich_work_mlc — check MLC)
329
+ - Do I have audio files to upload? (pica_audio_presigned_upload — for analysis)
330
+ - What identifiers are missing? (pica_works_inspect with sections: ["enrichment"] — check coverage)
571
331
 
572
- Custody claims (cross-org):
573
- → If work appears in another org's catalog:
574
- "this work also appears in [org name]'s catalog. that might be your publisher or distributor. want me to check, or start a custody conversation?"
575
- → If yes → use pica_custody_claim
576
- → "they'll have 7 days to respond. if they accept, the ownership chain is verified."
332
+ Don't push — let me stop whenever I want. But always let me know what the next valuable step would be.
577
333
 
578
- After ownership established:
579
- → Summary: "[N] works have clear ownership. [X] pending co-writer confirmation. [Y] have publisher agreements recorded."
580
- → Nudge: "now we know who owns what. want to capture what gear was used on these recordings?"
334
+ Also check pica_integrations_status to see if Google Calendar, Spotify, Gmail, or Telegram are connected. If not, mention that they can connect services at withpica.com/admin/settings to unlock calendar sync, email search, and notifications.
581
335
 
582
- Domain knowledge:
583
- - Ownership and credits are different things — you can write a song and not own it
584
- - Publishing rights (composition) and master rights (recording) often have different owners
585
- - Admin deals vs traditional publishing have fundamentally different ownership structures
586
- - Role declaration (songwriter/producer/performer/publisher) determines which rights are relevant
587
- - Co-writer ownership often can't be fully resolved until the co-writer confirms
588
- - Document analysis can extract agreement terms but user should verify
589
- - Custody claims are the mechanism for cross-org ownership verification
590
- - Batch-apply is essential when one deal covers the whole catalog
336
+ If the catalog already has works, summarise what's there and ask what I'd like to do — import more, check health, or work on what's missing.
591
337
 
592
- Tools: pica_works_inspect, pica_agreements_create, pica_agreements_query, pica_agreements_inspect, pica_custody_claim, pica_custody_list, pica_documents_analyse, pica_collaborators_invites_list`,
338
+ Important: I can always log in at withpica.com to see, verify, and manage everything you create. The dashboard and MCP see the same catalog.`,
593
339
  },
594
340
  },
595
341
  ],
596
342
  };
597
343
  }
598
- getProductionAssetsSkill() {
344
+ /**
345
+ * Close the loop — check a specific work's gaps and offer to fix each one
346
+ */
347
+ getCloseTheLoopPrompt(workId) {
348
+ const workInstruction = workId
349
+ ? `Check completeness for work ${workId} using pica_works_inspect({ id: "${workId || "..."}", sections: ["completeness"] }).`
350
+ : `Ask me which work I'd like to check, or use pica_works_query({ health_filter: "low_completeness" }) to find works that need the most attention.`;
599
351
  return {
600
352
  messages: [
601
353
  {
602
354
  role: "user",
603
355
  content: {
604
356
  type: "text",
605
- text: `${SHARED_PREAMBLE}
606
-
607
- --- SKILL: production-assets ---
608
-
609
- Capture what gear was used, who owns it, and link to recordings. Builds the provenance layer.
610
-
611
- Prerequisite check: if no recordings exist, mention it: "you don't have recordings yet. want to upload audio first?"
612
-
613
- "did you use any specific gear to make these recordings? instruments, microphones, synths, drum machines — anything you want on the record."
614
-
615
- If yes:
616
- → Conversational: "what did you use on '[title]'?"
617
- → For each piece of gear:
618
- - What is it? (type, make, model)
619
- - Do you own it?
620
- - Used on specific recordings, or across everything?
621
- → Use pica_physical_assets_create and pica_physical_assets_link_recording
622
- → "logged [instrument] — linked to [N] recordings."
623
- → If studio mentioned: "recorded at a specific studio? I can note that too."
624
-
625
- If many recordings with similar setups:
626
- → "sounds like you use [gear list] across most of your work. want me to link these to all recordings, or just specific ones?"
357
+ text: `Help me close the loop on a work — find what's missing and offer to fix each gap.
627
358
 
628
- If they don't know / "my producer handled that":
629
- → Check if producer is a connected collaborator
630
- → If connected: "want me to ask [producer name] to fill in the production details from their side?"
631
- → If not connected: "do you have their email? once they're connected, they can capture the production details."
632
- → Don't block — move on
359
+ ${workInstruction}
633
360
 
634
- If not interested:
635
- "totally fine. you can always come back to this."
636
- Move on immediately
361
+ For the work, check every aspect of completeness:
362
+ 1. pica_works_inspect with sections: ["completeness"] get the full gap analysis
363
+ 2. pica_credits_list check if credits and splits are assigned
364
+ 3. pica_works_inspect with sections: ["enrichment"] — check what enrichment sources have been tried
637
365
 
638
- After capture:
639
- Summary: "logged [N] production assets across [X] recordings."
640
- Nudge: "last thing — want to set up notifications so you hear about changes to your catalog?"
366
+ For each gap found, offer a specific action:
367
+ - Missing credits → "Want me to add writers? Who wrote this song?"
368
+ - Splits not set "What's the split between the writers?"
369
+ - No ISWC → "Want me to check MLC for this work?" (pica_enrich_work_mlc)
370
+ - No ISRC → "Do you have a recording with an ISRC for this?"
371
+ - No audio → "Got a master recording to upload?"
372
+ - Audio not analysed → "Want me to analyse the audio for BPM, key, and mood?"
373
+ - No agreements → "Is there a publishing agreement for this work?"
374
+ - Not registered → "Want me to check registration status?" (pica_works_inspect with sections: ["registration"])
641
375
 
642
- Domain knowledge:
643
- - Production assets are provenance evidence — prove how music was made
644
- - Ownership of gear matters for insurance and lending documentation
645
- - Most creators use a core set of gear — batch linking saves time
646
- - This is the most skippable step — never push it
647
- - Producers often know gear details that performers don't — route to them
648
- - Studio attribution is valuable but optional
376
+ Work through each gap one at a time. Let me skip any I'm not ready for. After each fix, check if the completeness score improved.
649
377
 
650
- Tools: pica_physical_assets_create, pica_physical_assets_link_recording, pica_physical_assets_link_work, pica_physical_assets_query, pica_recordings_query, pica_recordings_inspect`,
378
+ Keep it conversational don't list all gaps at once. Start with the most important one and work down.`,
651
379
  },
652
380
  },
653
381
  ],
654
382
  };
655
383
  }
656
- getStayConnectedSkill() {
384
+ /**
385
+ * Register my works — check registration status and prepare for PRO submission
386
+ */
387
+ getRegisterMyWorksPrompt() {
657
388
  return {
658
389
  messages: [
659
390
  {
660
391
  role: "user",
661
392
  content: {
662
393
  type: "text",
663
- text: `${SHARED_PREAMBLE}
664
-
665
- --- SKILL: stay-connected ---
666
-
667
- Configure ongoing notifications. The long-term relationship layer.
394
+ text: `Help me check which of my works are registered and which still need registration.
395
+
396
+ Steps:
397
+ 1. pica_works_query — list works, then use pica_works_inspect with sections: ["registration"] to check registration status across PROs (PRS, MCPS, PPL, MLC)
398
+ 2. For works that aren't registered, use pica_works_inspect with sections: ["registration", "completeness"] on a sample to understand what's blocking registration
399
+ 3. Identify common blockers:
400
+ - Missing ISWC (needed for PRS/MCPS) → suggest pica_enrich_work_mlc
401
+ - Missing ISRC (needed for PPL) → check if recordings have ISRCs
402
+ - Missing credits (needed for all) → suggest adding writers
403
+ - Missing identifiers on people (IPI needed for PRO registration) → suggest enrichment
404
+
405
+ Report:
406
+ - How many works are fully registered vs partially vs not at all
407
+ - The most common blocker and how to fix it
408
+ - Which works are closest to being registration-ready (fewest gaps)
409
+
410
+ Then offer:
411
+ - "Want me to try enriching the works missing ISWCs from MLC?"
412
+ - "Want me to export a CWR file for the works that are ready?" (pica_export_song_registration)
413
+ - "Want me to check registration status for a specific work?"
414
+
415
+ Focus on practical next steps, not just reporting.`,
416
+ },
417
+ },
418
+ ],
419
+ };
420
+ }
421
+ /**
422
+ * Workspace autopilot — assess state and route to the right workflow
423
+ */
424
+ getWorkspaceAutopilotPrompt() {
425
+ return {
426
+ messages: [
427
+ {
428
+ role: "user",
429
+ content: {
430
+ type: "text",
431
+ text: `You've just connected to a PICA workspace. Assess its current state and guide me to the most valuable next action.
668
432
 
669
- Prerequisite check: if catalog is empty, mention it: "notifications are more useful once you have works in your catalog."
433
+ Step 1 Orient:
434
+ Read the workspace://context resource to get a snapshot of the catalog: org info, catalog size, health score, and top priorities.
670
435
 
671
- Check current integration status using pica_integrations_status.
436
+ Step 2 Route based on what you find:
672
437
 
673
- "how do you want to hear about changes to your catalog?"
438
+ If the catalog is EMPTY (0 works):
439
+ → Use the new-catalog-setup workflow. Welcome me, explain how to import music (Spotify link, spreadsheet, screenshot, or just describe songs), and get started.
674
440
 
675
- Email (via Postmark):
676
- Per-event alerts for critical items (custody claims, collaborator responses, enrichment proposals)
677
- Weekly digest summarising catalog activity
678
- → "what email should I send to?" confirm address on file
441
+ If the catalog has works but LOW completeness (PICA Score below 50 or many gaps):
442
+ Use pica_works_query({ health_filter: "low_completeness" }) to find the works that need the most attention.
443
+ Pick the top 3 and offer to run close-the-loop on them one at a time.
444
+ Tell me: "Your catalog has [N] works but many have gaps. Want me to start closing the loop on the ones that need the most attention?"
679
445
 
680
- Telegram:
681
- Real-time push fastest channel
682
- → Configurable categories: catalog_alerts, custody_events, collaborator_updates, enrichment_results
683
- → Guide through bot setup if not connected using pica_telegram_connect
684
- → Check status with pica_telegram_status
685
- → "what do you want to hear about? everything, or just the important stuff?"
446
+ If there are DUPLICATE signals (workspace context mentions duplicates):
447
+ Use the find-duplicates workflow. Tell me how many potential duplicates exist and offer to review them.
686
448
 
687
- Both:
688
- "most people use telegram for real-time and email for the weekly summary."
449
+ If works are UNREGISTERED (registration coverage is low):
450
+ Use the register-my-works workflow. Tell me how many works aren't registered and what's blocking them.
689
451
 
690
- Calendar:
691
- Check Google Calendar connection via pica_integrations_status
692
- → If connected: "want me to add upcoming deadlines?" using pica_calendar_events
693
- → If not: "connecting Google Calendar lets me add custody deadlines, agreement expirations, and registration dates."
452
+ If the catalog is HEALTHY (score above 70, few gaps):
453
+ Use assess-catalog-health for a maintenance check. Tell me: "Your catalog looks solid. Here's a quick health check and what could still improve."
694
454
 
695
- Scheduled reminders:
696
- → "want me to check in on anything specific? I can set a reminder to follow up on [pending item]."
697
- → Use pica_notify_user_at for scheduled notifications
698
- → Use pica_notify_user_list_pending to show existing reminders
455
+ If none of the above clearly applies:
456
+ Use pica_catalog_stats and pica_works_inspect({ sections: ["score"] }) to give me a quick summary, then ask what I'd like to focus on.
699
457
 
700
- After configuration:
701
- Summary: "you're set up on [channels]. you'll hear about [categories]."
702
- → Nudge: "your catalog is in good shape now. want to see a full report, or generate a catalog asset report?"
458
+ Step 3 — Explain your routing:
459
+ Tell me WHY you chose the workflow you did, in one sentence. Example: "Your catalog has 42 works but 28 are missing credits, so let's close those gaps first."
703
460
 
704
- Domain knowledge:
705
- - Email and Telegram are presented as equal options user picks what works for them
706
- - Telegram is fastest (real-time push), email is for digests and critical alerts
707
- - Calendar integration turns deadlines into calendar events
708
- - Notification density matters — too many alerts get ignored
709
- - Scheduled reminders are for specific follow-ups, not ongoing alerts
461
+ Step 4 — Offer alternatives:
462
+ After explaining, mention 1-2 other things I could do instead. Example: "Or if you'd rather import more music first, I can help with that too."
710
463
 
711
- Tools: pica_integrations_status, pica_telegram_connect, pica_telegram_status, pica_directory_settings, pica_notify_user_at, pica_notify_user_list_pending, pica_calendar_events, pica_notifications_list`,
464
+ Important: Don't run all workflows at once. Pick the single most valuable action and commit to it. You can always switch later.`,
712
465
  },
713
466
  },
714
467
  ],
715
468
  };
716
469
  }
717
- getExportAndReportSkill() {
470
+ /**
471
+ * Prepare for sync — get catalog sync-ready
472
+ */
473
+ getPrepareForSyncPrompt() {
718
474
  return {
719
475
  messages: [
720
476
  {
721
477
  role: "user",
722
478
  content: {
723
479
  type: "text",
724
- text: `${SHARED_PREAMBLE}
725
-
726
- --- SKILL: export-and-report ---
727
-
728
- Generate reports, exports, and proof documents. Everything built through the journey becomes tangible output.
729
-
730
- "what do you need?"
731
-
732
- Catalog health report:
733
- Use pica_catalog_stats + pica_catalog_diligence + pica_works_inspect (sections: score)
734
- Plain language: "your catalog has [N] works. [X]% have complete credits, [Y]% have ISWCs, [Z]% have audio analysed."
735
- Strengths and gaps
736
- → If returning: "since last time, your score went from [X] to [Y]."
737
-
738
- Catalog Asset Report (CAR):
739
- Check prerequisites: ownership, credits, identifiers
740
- If gaps: "the CAR will be stronger with [X] resolved first. want to address that, or generate as-is?"
741
- → Attestation: "the CAR includes a creator attestation — a declaration that the information is accurate. ready to attest?"
742
- Section selection: "full report covers ownership, valuation, assets, agreements, intelligence, audio. all or specific?"
743
- Use pica_export_catalog_asset_report to generate
744
- Deliver via download card using pica_download
745
- "your CAR is ready ZIP with PDF report and supporting data, SHA-256 integrity verified."
746
-
747
- CWR export (registration):
748
- → Check which works are registration-ready
749
- → If some aren't: "out of [N] works, [X] are ready. [Y] are missing [what]. want to export what's ready?"
750
- → Use pica_export_song_registration to generate CWR file
751
- → "here's your CWR file. you'll need to submit this to your PRO — PICA prepares the file in the format they accept."
752
-
753
- Catalog CSV:
754
- → "want a spreadsheet of your full catalog?"
755
- → Use pica_export_catalog_csv and deliver via download card
756
-
757
- Provenance certificate:
758
- → Per-work chain-of-title certificate
759
- → Use pica_provenance_certificate and pica_provenance_work
760
- → "documents ownership history and attestations for [title]."
761
-
762
- Industry-ready package:
763
- → "pitching to a distributor or publisher? I can generate a metadata package in their format."
764
- → Use pica_export_industry_ready
765
-
766
- Sync readiness check:
767
- → "how many works have analysed audio, mood tags, and genre set?"
768
- → Show readiness breakdown
769
- → Offer to trigger analysis on tracks with uploads but no analysis
770
- → Use pica_search_for_sync to find sync-ready tracks
771
-
772
- Carbon footprint:
773
- → Streaming + distribution carbon metrics
774
- → Use pica_carbon_footprint and pica_carbon_live
775
- → "your catalog's estimated footprint is [X]. here's the breakdown."
776
-
777
- After any export:
778
- → "anything else, or are you good for now?"
779
- → No nudge — this is often the end of a session
780
-
781
- Domain knowledge:
782
- - CAR is the flagship output — maps creative portfolios to property-lending equivalents
783
- - CWR is the registration format but PICA doesn't submit — user takes it to their PRO
784
- - Attestation is a legal step — user is declaring accuracy
785
- - Export quality depends on catalog quality — a CAR with gaps is less useful but still valid
786
- - Provenance certificates are per-work — useful for licensing negotiations
787
- - Carbon footprint is a differentiator — few platforms track this
788
- - Sync readiness is about audio analysis data (BPM, key, mood), not metadata
789
-
790
- Tools: pica_catalog_stats, pica_catalog_diligence, pica_works_inspect, pica_export_catalog_asset_report, pica_export_song_registration, pica_export_catalog_csv, pica_export_industry_ready, pica_export_ai_consent, pica_provenance_stats, pica_provenance_certificate, pica_provenance_work, pica_carbon_footprint, pica_carbon_live, pica_search_for_sync, pica_download`,
480
+ text: `Help me get my catalog ready for sync licensing — make sure my works are discoverable and attractive to music supervisors.
481
+
482
+ Steps:
483
+ 1. pica_catalog_stats — get an overview of the catalog
484
+ 2. pica_works_query sample works to check what's missing for sync readiness
485
+ 3. For each work, check:
486
+ - Has audio been uploaded? (supervisors need to hear it)
487
+ - Has audio been analysed? (BPM, key, energy, mood — needed for search)
488
+ - Are mood tags and genre set? (how supervisors search)
489
+ - Is duration recorded? (supervisors filter by length)
490
+ - Are lyrics transcribed? (for lyrical content search)
491
+ - Is there a Spotify/YouTube link? (supervisors check existing presence)
492
+
493
+ Report:
494
+ - How many works have analysed audio vs unanalysed vs no audio at all
495
+ - How many have mood tags and genre vs missing
496
+ - The fastest path to sync-readiness (which works are closest)
497
+
498
+ Then offer:
499
+ - "Want me to trigger audio analysis on the tracks that have uploads but no analysis?"
500
+ - "Want me to search for sync-ready tracks you already have?" (pica_search_for_sync)
501
+ - "Want me to enrich works from Spotify to pull in genre and mood data?"
502
+
503
+ The goal is making works findable by mood, BPM, key, and energy — that's what sync supervisors search by.`,
791
504
  },
792
505
  },
793
506
  ],