@peacethinking/mediation-prompts
v0.1.0
Published
Production-tested prompt templates for AI-assisted conflict resolution and mediation
Maintainers
Readme
@peacethinking/mediation-prompts
Production-tested prompt templates for AI-assisted conflict resolution.
Parameterized TypeScript functions that generate structured system/user message pairs for LLM-based mediation. Each prompt includes a Zod output schema for runtime validation.
Install
npm install @peacethinking/mediation-promptsUsage
Generate a Verdict Prompt
import { buildVerdictPrompt, VerdictOutputSchema } from '@peacethinking/mediation-prompts';
const { system, user } = buildVerdictPrompt({
viewpoint1: "My manager assigns me more work than my colleagues...",
viewpoint2: "The project had tight deadlines and tasks were assigned by availability...",
languageCode: 'en',
tone: 'neutral',
});
// Send to any LLM
const response = await llm.chat([
{ role: 'system', content: system },
{ role: 'user', content: user },
]);
// Validate output
const result = VerdictOutputSchema.safeParse(JSON.parse(response));Analyze a Single Perspective
import { buildPerspectivePrompt } from '@peacethinking/mediation-prompts';
const { system, user } = buildPerspectivePrompt({
viewpoint: "I've been feeling overwhelmed since the reorganization...",
languageCode: 'de',
});Synthesize Two Viewpoints
import { buildMediationPrompt } from '@peacethinking/mediation-prompts';
const { system, user } = buildMediationPrompt({
viewpoint1: "...",
viewpoint2: "...",
languageCode: 'en',
});
// Output: { summary, solution_proposals: string[] }Generate Clarification Questions
import { buildClarificationPrompt } from '@peacethinking/mediation-prompts';
const { system, user } = buildClarificationPrompt({
viewpoint: "...",
languageCode: 'en',
});API
| Function | Output | Description |
|---|---|---|
| buildVerdictPrompt() | Scores, outcome, reframing | Full 6-dimension verdict with scoring |
| buildPerspectivePrompt() | Per-dimension analysis | Single viewpoint analysis |
| buildMediationPrompt() | Summary + 3-5 proposals | Two-viewpoint synthesis |
| buildClarificationPrompt() | 5-dimension questions | Follow-up clarification |
Each function returns { system: string, user: string } and exports a corresponding *OutputSchema for Zod validation.
License
MIT
