| name | estatewise-engineering |
| description | Execute production-safe code changes in the EstateWise monorepo. Use when implementing or fixing behavior in backend, frontend, MCP, agentic-ai, gRPC, deployment-control, tests, or repo docs. Do not use for pure brainstorming, skill installation, or work outside this repository. |
EstateWise Engineering
Use this skill as the default playbook for coding work in this repository.
Objective
Implement the smallest defensible change in the correct subsystem, preserve contracts, and validate only the touched surface.
Operating Rules
- Keep patches surgical.
- Do not refactor unrelated files.
- Preserve backward compatibility unless the task explicitly requests a breaking change.
- Avoid changing environment defaults unless explicitly requested.
- Never commit secrets or
.env values.
Classify Scope First
Identify the owning subsystem before editing:
backend/: Express API, auth, chat, properties, graph, forums, commute, Swagger, Prometheus, tRPC bridge.
frontend/: Next.js Pages Router UI, REST calls, local tRPC API, charts, map, auth, forums.
mcp/: stdio MCP server, tool registry, token flows, monitoring, web research, A2A bridge.
agentic-ai/: default orchestrator, LangGraph, CrewAI, HTTP server, A2A endpoints.
grpc/: market_pulse.proto, service logic, server bootstrap.
deployment-control/: deployment operations API, job runner, kubectl helpers, Nuxt UI.
- Infra/docs: Docker, Kubernetes, Helm, Terraform, cloud folders, Jenkins/GitLab/GitHub docs, root docs.
If the task spans multiple subsystems, work from producer to consumer.
Find Real Entry Points
Use rg first. Open only the relevant files once the owning path is clear.
Start from:
backend/src/server.ts
backend/src/routes/, backend/src/controllers/, backend/src/services/
frontend/lib/api.ts
frontend/pages/chat.tsx, frontend/pages/insights.tsx, frontend/pages/map.tsx, frontend/pages/market-pulse.tsx
frontend/server/api/routers/insights.ts
mcp/src/server.ts, mcp/src/tools/, mcp/src/core/
agentic-ai/src/index.ts, agentic-ai/src/http/server.ts, agentic-ai/src/orchestrator/
grpc/proto/market_pulse.proto, grpc/src/services/
deployment-control/src/server.ts, deployment-control/ui/
Subsystem Playbooks
Backend
- Update route/controller/service in
backend/src/.
- Preserve middleware and route ordering in
backend/src/server.ts.
- If an endpoint or payload changes, update frontend callers, MCP wrappers, and docs in the same task.
- Add or adjust tests under
backend/tests.
Frontend
- Patch the smallest owning page or component.
- Check both
frontend/lib/api.ts and direct page-level fetch(...) usage before assuming one edit is enough.
- Keep large files like
chat.tsx and insights.tsx localized.
- Update only the tests needed for the changed behavior.
MCP
- Update the correct tool module in
mcp/src/tools/.
- Keep Zod validation strict.
- Preserve text-first, stringified JSON output patterns expected by clients.
- Validate with
npm run build and at least one focused client:call.
Agentic AI
- Decide whether the change belongs to the default orchestrator, LangGraph, CrewAI, or HTTP/A2A layer.
- Keep tool call contracts aligned with the MCP server.
- Validate with a realistic goal run when behavior changes.
gRPC
- Treat
grpc/proto/market_pulse.proto as the contract source.
- Update handlers and service wiring after proto edits.
- Run proto lint and tests on proto changes.
Deployment Control
- Keep API and UI behavior aligned.
- Preserve
queued/running/succeeded/failed job semantics.
- Remember there is no built-in auth/RBAC; do not silently widen trust assumptions.
Cross-Service Contract Checks
Inspect dependent consumers whenever a producer changes:
Use estatewise-contracts if the contract surface is non-trivial.
Validation Matrix
Run the smallest sufficient check set:
- Root:
npm run dev, npm run format, npm run lint
- Backend:
cd backend && npm run build && npm run test
- Frontend:
cd frontend && npm run build && npm run test, plus npm run lint when UI or TS lint-sensitive paths changed
- MCP:
cd mcp && npm run build && npm run client:call -- <tool> '<json>'
- Agentic AI:
cd agentic-ai && npm run build && npm run dev "realistic goal"
- gRPC:
cd grpc && npm run build && npm run test && npm run proto:check
- Deployment Control:
cd deployment-control && npm run build or npm run build:api && npm run build:ui
If environment dependencies block validation, state exactly what was skipped and why.
High-Risk Files
backend/src/server.ts
backend/src/services/geminiChat.service.ts
frontend/pages/chat.tsx
frontend/pages/insights.tsx
frontend/lib/api.ts
mcp/src/core/http.ts
mcp/src/core/token.ts
agentic-ai/src/http/server.ts
grpc/proto/market_pulse.proto
Prefer minimal diffs and avoid style-only churn in these files.
Documentation Requirements
Update affected docs when behavior or commands change:
backend/README.md
frontend/README.md
mcp/README.md
agentic-ai/README.md
grpc/README.md
deployment-control/README.md
- root docs like
README.md, ARCHITECTURE.md, DEPLOYMENTS.md, DEVOPS.md, GRPC_TRPC.md, RAG_SYSTEM.md
Done Criteria
Finish only when all are true:
- The requested behavior is implemented.
- Relevant validations ran, or skips are explicitly documented.
- Producer and consumer paths were updated for any contract change.
- Relevant docs were updated.
- The handoff includes changed files and exact validation commands.