@peacethinking/conflict-framework
v0.1.0
Published
Open standard for AI-assisted conflict resolution — structured taxonomy, scoring, and data models
Maintainers
Readme
@peacethinking/conflict-framework
Structured conflict taxonomy for AI-assisted mediation systems.
The foundation layer for building conflict resolution tools. Provides the 6-dimension analysis framework, scoring weights, domain types, and Zod validation schemas.
Install
npm install @peacethinking/conflict-frameworkUsage
6-Dimension Framework
import { DEFAULT_DIMENSIONS, DEFAULT_SCORING_WEIGHTS } from '@peacethinking/conflict-framework';
// 6 dimensions: Situation, Impact, Needs, Causes, Solutions, Boundaries
console.log(DEFAULT_DIMENSIONS);
// 6 scoring weights: factual, logical, coherence, emotional, accountability, constructiveness
console.log(DEFAULT_SCORING_WEIGHTS);Validate LLM Output
import { VerdictSchema } from '@peacethinking/conflict-framework/schemas';
const result = VerdictSchema.safeParse(llmOutput);
if (!result.success) {
console.error('Invalid verdict:', result.error.issues);
}Extend the Framework
import { createDimensionRegistry } from '@peacethinking/conflict-framework';
const registry = createDimensionRegistry();
registry.add({
key: 'dimension-power-dynamics',
label: 'Power Dynamics',
description: 'Power imbalances between the parties',
optional: true,
});Domain Enums
import {
DialogueStatus,
VerdictOutcomeType,
WorkflowElementType,
ParticipantRole,
} from '@peacethinking/conflict-framework';Types
import type { Verdict, VerdictRequest, Participant, Vote } from '@peacethinking/conflict-framework';API
Dimensions
| Export | Description |
|---|---|
| DEFAULT_DIMENSIONS | 6 conflict analysis dimensions |
| DEFAULT_SCORING_WEIGHTS | 6 scoring weight factors (sum = 1.0) |
| SCORING_DIMENSIONS | Dimension key strings |
| createDimensionRegistry() | Create an extensible dimension set |
Schemas (from /schemas)
| Export | Description |
|---|---|
| VerdictSchema | Validates full verdict output (scores sum to 100, all dimensions present) |
| VerdictRequestSchema | Validates verdict input |
| DimensionScoresSchema | Validates per-dimension scores |
| PerspectiveAnalysisSchema | Validates perspective analysis output |
Types
Verdict, VerdictReasoningData, VerdictRequest, DimensionScores, Participant, Viewpoint, Vote, ProposalOption, ProposalSet, VoteSession
Enums
DialogueStatus, DialogueStage, ParticipantRole, ParticipantStatus, VerdictOutcomeType, VoteDecision, ProposalSource, ConflictResolutionMethod, WorkflowMode, WorkflowElementType, NotificationType, VerdictTone
License
MIT
