Commit graph

108 commits

Author SHA1 Message Date
010238b2fc feat(ST-708): create_todo tool
Adds a todo for the authenticated user with optional description (max
2000) and optional product scope. Verifies product access if a
product_id is given. Demo accounts get PERMISSION_DENIED.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:08:05 +02:00
c39b337fcc feat(ST-707): log tools — implementation, test_result, commit
Three write tools that append StoryLog entries:
- log_implementation: type=IMPLEMENTATION_PLAN
- log_test_result: type=TEST_RESULT, status PASSED|FAILED
- log_commit: type=COMMIT with hash and message

All accept optional metadata in input but skip writing it for now —
the StoryLog.metadata JSONB column lands with Scrum4Me PR #2.
After that PR merges, run sync-schema and add `metadata` to each
prisma.create's data field.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:06:50 +02:00
e3f9476568 feat(ST-706): task write tools — update_task_status and update_task_plan
- src/access.ts: shared product/story/task access checks via product
  ownership or membership
- update_task_status accepts lowercase API values, converts to DB
  enum, rejects unknown values
- update_task_plan replaces implementation_plan on a task
- Both call requireWriteAccess() so demo accounts get
  PERMISSION_DENIED before any DB write

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:05:49 +02:00
e9d87dd8ff feat(ST-705): read tools — health, list_products, get_claude_context
- health: pings DB via SELECT 1 and returns status/version/time
- list_products: active products owned or shared with the auth user
- get_claude_context: bundled product + active sprint + next story
  (with tasks, status mapped to lowercase) + 50 open todos

prisma.ts switches to a lazy proxy so the server bootstrap doesn't
crash before tools fire when DATABASE_URL is unset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:04:51 +02:00
f5a630c143 feat(ST-704): status mappers and shared error helpers
- src/status.ts: bidirectional Task/Story status mappers — DB stays
  UPPER_SNAKE, MCP tools expose lowercase (matches REST API contract)
- src/errors.ts: formatZodError, toolError, toolJson and the
  withToolErrors() wrapper so each tool turns thrown exceptions
  (PermissionDenied, ZodError, generic) into structured MCP errors

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:02:05 +02:00
2b52b1cedd feat(ST-703): auth and Prisma client singleton
- src/prisma.ts: PrismaClient via PrismaPg adapter and pg.Pool,
  same pattern as Scrum4Me's lib/prisma.ts
- src/auth.ts: getAuth() resolves SCRUM4ME_TOKEN once, caches
  { userId, username, isDemo }. requireWriteAccess() throws
  PermissionDeniedError for demo tokens — write tools call this
  before any DB mutation

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:01:22 +02:00
992a4ad5e1 feat(ST-702): vendor Scrum4Me schema via submodule + sync script
- Add vendor/scrum4me as a git submodule (read-only source of truth)
- scripts/sync-schema.sh copies schema.prisma into prisma/, stripping
  the upstream prisma-erd-generator block we don't ship
- Track the synced schema in git so a fresh clone works after
  'git submodule update --init && npm install'
- postinstall runs 'prisma generate' so @prisma/client is ready

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:00:29 +02:00
ea00736a13 feat(ST-701): scrum4me-mcp repo skeleton
Initial repo with TypeScript strict, MCP SDK 1.29, Prisma 7,
zod and tsx. Stdio-transport bootstrap in src/index.ts boots
without crashing. Tools and prompts to be added in ST-705..ST-709.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 22:57:27 +02:00