guidewire-mcp-for-claude
CLAUDE.md3 starsChanged 6 months agoApache-2.0View on GitHub
Guidewire MCP for Claude — a Claude Code plugin (/plugin install jeremylongshore/guidewire-mcp-for-claude) + carrier-native MCP server for the Guidewire InsuranceSuite (PolicyCenter, ClaimCenter, BillingCenter). v0.1.0 ships read-only PolicyCenter with 5 carrier-vocabulary tools. Live architecture diagram: guidewire-mcp.intentsolutions.io. The thesis: tool names are operator questions (find-submissions-waiting-on-me), never API verbs (search_policies). A governance harness gates all writes via plan → policy → approval → execute → audit → rollback. The audit hash-chain + the carrier vocabulary are the durable moats. Harness library + CLI…
- Installs packages
- Commits and pushes
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- guidewire-policycenterSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 73
Production-wiring detail: when wiring against real Postgres, the harness needs both pools — audit_writer for audit.append() (INSERT-only) …
- Very specific: line 135
Observability from line 1: Every public function in servers/* and packages/harness/ opens a span.
- Distinctive: line 139
Source-doc citation discipline: Every claim about Cloud API endpoints, typelist values, LOB codes, custom-entity shape, App Events, or any …
- Very specific: line 148
Beads for ALL task tracking: Never TodoWrite, TaskCreate, or markdown TODO.
- Very specific: line 184
If a separate bot account is ever set up for Claude's commits, the PR-author / approver split would be natural: bot opens PR, owner …
- Very specific: line 196
Release version-bump discipline: do NOT use jq '.version = "..."' across multiple package.json files — jq's default formatting expands …
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this is
Guidewire MCP for Claude — a Claude Code plugin (/plugin install
jeremylongshore/guidewire-mcp-for-claude) + carrier-native MCP server
for the Guidewire InsuranceSuite (PolicyCenter, ClaimCenter,
BillingCenter). v0.1.0 ships read-only PolicyCenter with 5
carrier-vocabulary tools. Live architecture diagram:
guidewire-mcp.intentsolutions.io.
The thesis: tool names are operator questions
(find-submissions-waiting-on-me), never API verbs (search_policies).
A governance harness gates all writes via plan → policy → approval →
execute → audit → rollback. The audit hash-chain + the carrier
vocabulary are the durable moats. Harness library + CLI shipped; full
pipeline proven end-to-end against testcontainers Postgres in
packages/harness/tests/e2e.pg.test.ts.
Remaining E3 work: npm publish (bundled with E11+ marketplace push).
Build / test / run
pnpm workspace, Node 22 LTS, TypeScript 5.5+, Vitest, Biome (single
linter+formatter, no ESLint+Prettier). Cloud API contract tests live
in tests/contract/ on Karate (JDK 11 + Gradle) per
D-022 — TS
covers orchestration / unit / integration; Karate covers the Cloud
API wire contract.
pnpm install # prepare hook builds all workspaces
pnpm -r build # rebuild all 8 workspaces (7 packages + 1 server)
pnpm -r test # 135 tests across all workspaces
pnpm --filter @intentsolutions/guidewire-audit test # single workspace
pnpm --filter @intentsolutions/guidewire-audit test -- audit-store.test.ts # single test file
pnpm typecheck # tsc --noEmit across all workspaces
pnpm lint # biome check .
pnpm format # biome format --write .
pnpm smoke-reach # ping librarian-cataloged Cloud endpoints with dev-tier creds
node servers/policycenter-mcp/dist/cli.js # boot with in-memory default profile
node servers/policycenter-mcp/dist/cli.js --profile profiles/oss-demo # boot with on-disk profile
# Cloud API contract tests (Karate — JVM-side; runs when GUIDEWIRE_OAUTH_CLIENT_ID is set, skips cleanly when not):
cd tests/contract && ./gradlew testThe prepare script (pnpm -r build in root package.json) fires
on every pnpm install so plugin-install end-users get a built
dist/ automatically. dist/ is gitignored; CI rebuilds in workflows.
Fail-loud by design — if the build breaks on a user's machine,
pnpm install errors out with the underlying message instead of
silently completing. Don't reintroduce || true (PR #96).
pnpm.overrides in root package.json pins vite >=6.4.2 and
ip-address >=10.1.1 to clear transitive moderate CVEs that the
direct devDeps don't bump on their own pace. pnpm audit is clean —
keep it that way; new vulns surface here first.
Architecture big-picture
5 layers, top to bottom (the live diagram visualizes this):
- Agent host — Claude Code, Claude Desktop, Anthropic API
- MCP servers —
servers/<suite>-mcp/(onlypolicycenter-mcpbuilt; claimcenter / billingcenter / producer / events planned) - Harness —
packages/harness/(library + CLI built; end-to-end pipeline proven via testcontainers intests/e2e.pg.test.ts; npm publish pending). Gates writes via plan → policy → approval → execute → audit → rollback. NOT an MCP server (recursion + tool-selection problem). Production-wiring detail: when wiring against real Postgres, the harness needs both pools —audit_writerforaudit.append()(INSERT-only) andaudit_readerforevidence.build()(SELECT-only). Surfaced by the e2e test; in-memory tests can't catch it because the memory store has no role separation. The e2e test is the canonical wiring template for any server that boots the harness inapproved_executemode. - E1 foundation packages (all built;
packages/):@intentsolutions/guidewire-schemas— Zod schemas + TS contracts@intentsolutions/guidewire-observability— OTel + pino + Sentry factory@intentsolutions/guidewire-auth— Hub OAuth + JWT propagation@intentsolutions/guidewire-audit— Postgres + hash-chain audit store@intentsolutions/guidewire-client— undici Cloud API client with two-key idempotency (harnessgwh1:cache key + GuidewireGW-DBTransaction-IDwire header — never reuse the same value)@intentsolutions/guidewire-mcp-runtime— MCP SDK wrapper
- External — Guidewire Cloud API, Hub OAuth, Postgres (audit chain), OTLP collector + Sentry
Profile system (loader + scaffold landed; full per-tenant story is E4):
- Plug-and-play default:
createDefaultProfile()inservers/policycenter-mcp/src/profile.tsreturns an in-memory profile covering all 5 v0.1.0 read-only tools. Zero YAML editing required for the 80% case. This is what the Claude Code plugin install uses. - Per-tenant override:
loadProfile(path)reads 9 YAMLs fromprofiles/<tenant>/(auth, roles, lob, typelists, custom-entities, field-aliases, approval-matrix, pii-policy, events; per PRD § 6.1-6.9), validates each via Zod schemas inpackages/schemas/src/profile/. Customers copyprofiles/_template/→profiles/<their-tenant>/, edit, run with--profile <path>. profiles/oss-demo/is a fully-populated reference. Read-only — never the production path.
Three execution modes per tool (selected per-tool via profile):
read_only (E2 ships these), draft_only (E5), approved_execute
(E3 + harness). The harness is the only path to writes — depcruise
- AST rules in CI prevent server code from importing
packages/client-sdk(npm@intentsolutions/guidewire-client) write methods except inside anexecute()callback.
Hard rules
These travel with the code; CI workflows in .github/workflows/
enforce what's enforceable.
- Carrier-vocabulary tool names. Tool names are the question an
operator would actually ask. Reject API-shaped names (
search_*,list_*,get_*) at PR review. - NO MOCKS. Real Guidewire Cloud endpoints from day one. No
hand-written
fixtures/.tests/recordings/holds HTTP recordings captured from real dev-tier sandbox calls with provenance metadata. Per D-008 + D-021. - No write without audit, policy, idempotency. Hash-chained
audit per tenant; tamper-resistant via three Postgres roles
(writer / reader / verifier) per
D-019.
E1 ships a testcontainers test asserting
audit_writercannotUPDATE/DELETE(per audit-response triage AR-7 inaudits/00-AUDIT-RESPONSES.md). - Observability from line 1. Every public function in
servers/*andpackages/harness/opens a span. Everythrowuses a typedAppErrorinpackages/observability/. CI fails on rawconsole.login production code paths. - Source-doc citation discipline. Every claim about Cloud API
endpoints, typelist values, LOB codes, custom-entity shape, App
Events, or any Guidewire technical surface must cite an
authoritative public reference (typically a release-versioned URL
from
000-docs/005-DR-REF-guidewire-public-resources.md) OR explicitly mark the claim(unverified — practitioner knowledge from public docs; first integration engagement validates). Never invent endpoint shapes or syntax. - Beads for ALL task tracking. Never
TodoWrite,TaskCreate, or markdown TODO. Each bead carries aBlueprint:reference to the relevant000-docs/blueprint/section.
Workflow
bd ready # find available work
bd update <id> --status=in_progress
git checkout -b <type>/<short-description>
# work
bd close <id> -r "evidence" && git add ... && git commit ... && git push -u origin <branch>
gh pr create --title "..." --body "..."
gh pr merge <N> --squash --auto --delete-branch # auto-merges after Gemini review + checksBranch protection on main is enforced by the repository ruleset
main: required checks + 1 review
(active 2026-05-06). It binds:
- 6 required status checks — all must pass before merge:
Lint (Biome),Typecheck (tsc --noEmit),Test (Vitest),Build (tsup),audit-harness gates,gitleaks. - 1 required PR approval — author cannot self-approve.
- No force-push, no deletion of
main.
Bypass: the ruleset's bypass_actors list explicitly grants
the RepositoryRole=Admin (id 5) bypass_mode: always. Without
that explicit entry, even repo OWNER cannot bypass — verified
empirically 2026-05-06 (an unconfigured ruleset blocked the OWNER's
own admin-merge attempt). With it, gh pr merge --admin succeeds
for owner-authored PRs (the common case where Claude opens the PR
on Jeremy's behalf — GitHub blocks the PR author from approving
their own PR, so admin-merge is the only CLI path; web-UI workflows
are not used).
If a separate bot account is ever set up for Claude's commits, the
PR-author / approver split would be natural: bot opens PR, owner
approves via gh pr review --approve, normal merge works without
the bypass. Until then, every Claude-opened PR ends with
gh pr merge --admin --squash --delete-branch.
Rebase gotcha: .beads/issues.jsonl conflicts on every rebase
because both branches accrete bead activity (the file is a sqlite
export that bd auto-rewrites on every command). Resolution is
mechanical — take main's version, the underlying state is identical:
git checkout --theirs .beads/issues.jsonl && git add .beads/issues.jsonl && git rebase --continue.
Release version-bump discipline: do NOT use jq '.version = "..."'
across multiple package.json files — jq's default formatting
expands short string arrays ("files": [...]) into multi-line which
biome wants compact, leaving the release commit CI-red. Either bump
via Edit (exact-string replace per file) or follow with
npx biome check --write . before commit. Lesson learned 2026-05-07
on the v0.1.1 release; see commit history for the cleanup PR.
Gemini Code Assist is the convention for external review on every PR but is NOT enforced as a required reviewer (Gemini posts as a bot, marking it required would break the OSS contributor flow). By convention: wait for Gemini's review before approving — it catches drift the human reviewer often misses (per session log 2026-05-06: Gemini caught 3 real defects on PRs #84-#88, including a security-medium GRANT issue and an env-var name bug that would have silently broken smoke-reach).
5 specialist agents in .claude/agents/ (project-scoped)
auto-review designs:
mcp-safety-reviewer,
carrier-vocabulary-curator,
guidewire-api-archaeologist,
harness-runtime-architect,
guidewire-reference-librarian.
Spawn the librarian before drafting any tool / profile / recording
that asserts a Cloud API shape — it consults the public-docs KB and
flags unverified gaps.
Where to look (canonical sources of truth)
| Topic | File |
| Architectural decisions D-001..D-022 | 000-docs/004-DR-DEC-architecture-decisions.md |
| Harness production-wiring template (testcontainers e2e) | packages/harness/tests/e2e.pg.test.ts |
| Public Guidewire docs map | 000-docs/005-DR-REF-guidewire-public-resources.md |
| Profile schema (9 YAMLs) | 000-docs/blueprint/02-PRD.md § 6.1-6.9 |
| Per-tool spec (5 v0.1.0 tools) | 000-docs/blueprint/02-PRD.md § 3 + § 4 |
| Operator user journeys | 000-docs/blueprint/04-USER-JOURNEY.md |
| Stack + observability + quality gates | 000-docs/blueprint/05-TECHNICAL-SPEC.md |
| 11-epic public roadmap | 000-docs/blueprint/07-ROADMAP.md |
| 11-auditor staffed panel + response register | 000-docs/blueprint/audits/ |
| Audit response triage state | 000-docs/blueprint/audits/00-AUDIT-RESPONSES.md (all 4 themes closed; re-pass filed — see 14-AR-RE-PASS + 15-CC-RE-PASS) |
Plugin / installation surface
The repo ships as a Claude Code plugin via
.claude-plugin/plugin.json +
.mcp.json. End-users run /plugin install ...,
set 4 env vars (GUIDEWIRE_OAUTH_CLIENT_ID,
GUIDEWIRE_OAUTH_CLIENT_SECRET, GUIDEWIRE_TOKEN_ENDPOINT,
GUIDEWIRE_PC_BASE_URL), and ask Claude carrier questions in their
session. The plugin path is the primary product surface; the
pnpm install && pnpm -r build flow is the developer / contributor path.
Author
Jeremy Longshore, Intent Solutions IO ·
intentsolutions.io ·
jeremy@intentsolutions.io
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

