Skip to content

feat(create-artist): replace deep research with structured endpoints#20

Merged
sweetmantech merged 1 commit into
mainfrom
feat/replace-deep-research-with-structured-endpoints
Apr 26, 2026
Merged

feat(create-artist): replace deep research with structured endpoints#20
sweetmantech merged 1 commit into
mainfrom
feat/replace-deep-research-with-structured-endpoints

Conversation

@sweetmantech
Copy link
Copy Markdown
Contributor

@sweetmantech sweetmantech commented Apr 26, 2026

Summary

  • POST /api/research/deep hangs in the sandbox — verified by the user. Step 4 of the create-artist chain calls it twice, which means most create-artist runs stall mid-chain.
  • Replace deep research with a fan-out of five bounded endpoints. Each returns structured data the agent can use directly without paraphrasing — net result: higher resolution and no hangs.

Replacement chain

Endpoint What it returns Maps to
/api/research/lookup?spotifyId=$SPOTIFY_ARTIST_ID Chartmetric artist_id for the artist One-time prerequisite — capture as cmArtistId in frontmatter, every other call below uses it
/api/research/profile?id=$CM_ARTIST_ID Bio, genres, social URLs, label, career stage, basic metrics Biography / label / career-stage portions of what deep research produced
/api/research/career?id=$CM_ARTIST_ID Career timeline + key milestones + trajectory "Notable achievements" portion
/api/research/playlists?id=$CM_ARTIST_ID Editorial + algorithmic + indie playlist placements across platforms "Editorial features / playlists" portion
/api/research/web Search results with titles, URLs, snippets "Press / cultural narrative / collaborations" portion that structured endpoints don't cover

Changes

  • skills/artist-workspace/SKILL.md
    • Step 4 line in the create-artist scaffold checklist: Deep research (artist biography + Spotify presence)Structured research — /research/lookup (capture cmArtistId) → /research/profile + /research/career + /research/playlists + /research/web. Save responses under ## Research in this file.
    • Frontmatter slots add cmArtistId: so step 4's first call persists the Chartmetric ID for reuse by the rest of the structured chain.
    • "Tick + persist" rule now mentions cmArtistId and clarifies that larger response payloads belong under headed body sections (e.g. ## Research), not in frontmatter.
  • recoup-api/SKILL.md
    • Workflow row description: deep + web researchstructured research via Chartmetric profile/career/playlists + web.

Why this is a small change here

The doc-side rewrite of Step 4 (the actual curl blocks for the five replacement calls) lives in recoupable/docs PR #166 — pushing alongside this PR. This PR only changes the skill content (description + scaffolded checklist line + frontmatter slots).

Tradeoff

Five calls instead of two — but each is bounded (no hangs), structured (no paraphrasing loss), and higher resolution than what deep research returns since the agent gets exact playlist names, dates, metric values rather than synthesized prose. Acceptable IMO since a hanging endpoint is worse than slightly more doc surface.

Test plan

  • After merge + sandbox skill reinstall, run a create-artist prompt and verify Step 4 issues /research/lookup then the four parallel structured calls (no /research/deep call)
  • Verify cmArtistId populates in frontmatter after /research/lookup
  • Verify each subsequent structured call uses $cmArtistId rather than re-deriving it
  • Verify Step 8 KB synthesis can compose from the structured ## Research section + Spotify catalog + web context

🤖 Generated with Claude Code


Summary by cubic

Replaced hanging deep research in create-artist with structured endpoints to improve reliability and detail. Step 4 now uses Chartmetric lookup, profile, career, playlists, and a web search; adds cmArtistId to frontmatter and saves results under "## Research".

  • Refactors
    • skills/artist-workspace/SKILL.md: Step 4 now calls /research/lookup (capture cmArtistId) → /research/profile + /research/career + /research/playlists + /research/web; add cmArtistId: to frontmatter; clarify that large payloads go in body sections, not frontmatter.
    • recoup-api/SKILL.md: Update workflow row from "deep + web research" to "structured research via Chartmetric profile/career/playlists + web".

Written for commit 77a2e7d. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Refined artist research workflow with a more structured methodology
    • Added new artist identifier field to enhance data tracking in the setup process
    • Reorganized how research outputs are documented and stored in artist profiles

POST /api/research/deep was hanging in the sandbox. Replace it with
a fan-out of structured Chartmetric endpoints + a web search:

- /research/lookup (Spotify ID → Chartmetric artist_id)
- /research/profile (bio, genres, label, career stage)
- /research/career (career timeline + notable milestones)
- /research/playlists (editorial + algorithmic + indie placements)
- /research/web (narrative / press / cultural context)

This swaps a single hang-prone synthesizer for five bounded calls
that return structured data — higher resolution, no paraphrasing
loss, faster to fail when something is wrong.

- artist-workspace SKILL.md:
  - Step 4 line in the create-artist scaffold checklist updated
    from "Deep research (artist biography + Spotify presence)" to
    the new endpoint list (capture cmArtistId from /lookup, save
    responses to ## Research).
  - Frontmatter slots add `cmArtistId:` so step 4's first call
    persists the Chartmetric ID for reuse by the rest of the
    structured chain.
  - "Tick + persist" rule now mentions cmArtistId and clarifies
    that larger response payloads belong under headed body
    sections, not in frontmatter.
- recoup-api SKILL.md: workflow row description updated from
  "deep + web research" to "structured research via Chartmetric
  profile/career/playlists + web".

Pairs with docs PR #166 fix-up.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 875b0f14-06c8-4599-88f2-9ea2f9bb7d1f

📥 Commits

Reviewing files that changed from the base of the PR and between 9258a42 and 77a2e7d.

📒 Files selected for processing (2)
  • recoup-api/SKILL.md
  • skills/artist-workspace/SKILL.md

📝 Walkthrough

Walkthrough

Two documentation files updated to restructure the artist research workflow from generic "deep + web research" to a specific, multi-endpoint approach using /research/lookup with Chartmetric-based profile/career/playlists data capture, and a new persistent cmArtistId frontmatter field.

Changes

Cohort / File(s) Summary
Artist Research Workflow Documentation
recoup-api/SKILL.md, skills/artist-workspace/SKILL.md
Updated documentation to replace generic research descriptions with structured /research/lookup-driven workflow that captures cmArtistId and fans out to /research/profile, /research/career, /research/playlists, and /research/web endpoints. Added ## Research body subsection for consolidated result storage and updated frontmatter/body capture patterns.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 From vague depths to Chartmetric's glow,
Research now dances in structured flow,
Lookup, profile, career, playlists align,
Each cmArtistId a thread divine,
Organization hops through the data's delight!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/replace-deep-research-with-structured-endpoints

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sweetmantech sweetmantech merged commit 62705c7 into main Apr 26, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant