Document musing-ai-service in AGENTS.md and add ai-service.mdc rule - #96
Merged
Conversation
AGENTS.md and musing-project.mdc had zero mention of service/ despite it being a whole second application in this repo by now (8 merged PRs) — any agent working here had no idea it existed, that it's a separate Node/TS backend with its own toolchain, or its conventions. - New .cursor/rules/ai-service.mdc: scoped to service/**, covering the fail-fast required-env pattern, the two separately-billed/ separately-budgeted providers, requireAuth as the real access boundary (not GCP IAM), requireBudget needing to gate embed-page too (not just LLM routes, correcting the original design doc), the rate limiter, the ALLOWED_ORIGINS comma-escaping gotcha in deploy-service.yml, the two locked-down pgvector RPC functions, local dev, and that service/ needs its own lint/test/build (root scripts don't cover it). - AGENTS.md: intro paragraph, a Conventions table row, two new Constraints entries (don't assume the AI service is configured; don't assume root checks cover service/), and a Configure section pointer to VITE_AI_SERVICE_URL. - musing-project.mdc: thin pointer section (matching its own stated "don't duplicate long content" style) + added to the scoped-rules list. - README: VITE_AI_SERVICE_URL was missing from the Configuration table; readme.mdc's own Configuration bullet was stale too (didn't mention it) — both fixed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PR guideAuto-generated from changed paths. Fill in Summary and How to verify in the PR description above. Touches: docs / agent guidance, other Diff: 5 files changed, 93 insertions(+), 4 deletions(-) Suggested verify
Checklist (applies to this PR)
Reviewer focus
Commits
Files by area
CIPrimary check: CI runs lint, Prettier format check, Vitest coverage, and build for every PR. Coverage tables are posted separately. Template: |
|
Unit tests (Vitest)
Minimum allowed coverage is Generated by 🐒 cobertura-action against 4f6b011 |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`AGENTS.md` and `musing-project.mdc` had zero mention of `service/` despite it being a whole second application in this repo by now (8 merged PRs across the AI second-brain build) — any agent working here had no idea it existed, that it's a separate Node/TS backend with its own toolchain, or its conventions. This is the last item from the original architecture plan (`docs/ai-service-integration`).
Note on `/code-review`: it surfaced two real findings, but on `SidebarSearch.tsx` — code from the already-merged #94, not part of this diff (the review scanned the whole repo since this branch has no code diff). Handling those separately, as their own fix, rather than bundling an unrelated bug fix into a docs PR.
Test plan
🤖 Generated with Claude Code