A. Purpose & Scope
PLM (Pragmatics Language Module) governs how language functions in context β the relationship between form, speaker, listener, and situation.
It ensures that every utterance or term is appropriate, interpretable, and effective in its intended environment.
Mantra: Meaning lives where itβs used.
- Primary job:
- Evaluate contextual fit of terms, phrases, and discourse.
- Detect potential misinterpretations or social/legal risks.
- Govern register, politeness, implicature, presupposition, and discourse coherence.
B. Factory Overview
- Blueprints β define pragmatic features, context profiles, and decision rules.
- Templates β shape artifacts: schema, JSON Schemas, OpenAPI, rulebook, context profiles, seeds, tests.
- Generators β create artifacts from blueprints.
- Validators β check contextual modeling integrity and test compliance.
- Signers β hash + record provenance.
- Publishers β ship to ledger, editors, and SolveForce comms systems.
C. PLM Blueprints (source of truth)
C1. Module Blueprint (PLM)
name
: βPragmatics Language Moduleβintent
: βContext-aware language governanceβunits
: Utterance, Speech Act, Register, Politeness Strategy, Implicature, Presupposition, Discourse Movecontext_features
: channel (voice, text, contract, marketing), role relationships (peer, superior, client, regulator), cultural norms, legal constraints, discourse history.evaluation_axes
:contextFit
β appropriateness for audience & settingimplicatureSafety
β unintended inferences avoidedpolitenessAdequacy
β tone aligned with strategy/purposepresuppositionValidity
β background assumptions hold true in contextcoherence
β consistent with discourse thread & prior commitmentsriskLevel
β likelihood of misinterpretation, offense, or legal breach
thresholds
: Ο_context, Ο_implicature, Ο_politeness, Ο_presupposition, Ο_coherence, Ο_riskdecisions
: ACCEPT | REVIEW | REJECTio-contracts
: utterance + context profile β decision + scores + explain[]glyphs
: π£ (context-approved), Ξ (validated), β΄ (settled), β (ethics pass)
C2. Context Profile Blueprint
- Channel rules (e.g., βvoice prompts must avoid long, complex clausesβ).
- Role alignment rules (e.g., βregulatory comms require hedging languageβ).
- Cultural sensitivity overlays (regional politeness norms, taboo avoidance).
- Legal overlays (terms/phrases prohibited in regulated industries).
C3. Seeds Blueprint
- Well-formed and ill-formed utterances per channel/role, with verdicts.
D. Templates to Mint Later
- DB Schema (
templates/db/schema.sql.tmpl
)- Tables:
utterances, contexts, speech_acts, evaluations, decisions, audits
- View:
v_utterance_context_card
(utterance + context + evaluation results).
- Tables:
- JSON Schema (
templates/schemas/utterance_context_record.json.tmpl
)- Fields:
utterance, channel, role, cultural_norms[], legal_constraints[], context_history[], evaluations{}, decision, explain[]
.
- Fields:
- OpenAPI
/plm/verify
(POST) β{ decision, scores, context_card, explain[] }
/contexts
to list and update channel/role/cultural/legality profiles.
- Rulebook (
templates/rules/plm_rulebook.md.tmpl
)- R0 Context Identity, R1 Context Fit, R2 Implicature Safety, R3 Politeness Adequacy, R4 Presupposition Validity, R5 Discourse Coherence, R6 Risk Bounds, R7 Ethics, R8 Overrides.
- Context Profiles (
templates/data/context_profiles.yaml.tmpl
)- Detailed per-channel/role/culture/legal overlays.
- Seeds (
templates/data/plm_seeds.jsonl.tmpl
)- ACCEPT/REVIEW/REJECT examples with context metadata.
- Tests (
templates/tests/plm_cases.json.tmpl
)- Diverse scenarios stressing implicature, politeness, presupposition.
- Generator/Validator Stubs
- Context profile linter, risk scoring sanity checks.
E. Processing Pipeline
Input β Load Context Profile β Evaluate Utterance β Score β Decide β Explain
- Load Context Profile β retrieve constraints & norms based on channel, role, culture, legal region.
- Evaluate Utterance:
contextFit
β matches purpose, avoids disallowed structures/phrases.implicatureSafety
β ensure no dangerous unintended inference.politenessAdequacy
β check tone and formality.presuppositionValidity
β verify background assumptions hold true.coherence
β fits ongoing discourse pattern.riskLevel
β quantify misinterpretation/offense/legal breach potential.
- Score β numeric for each axis; compare to thresholds.
- Decide β ACCEPT/REVIEW/REJECT.
- Explain β structured bullet list: rule IDs, issues, suggested rewrites.
F. Scoring (deterministic skeleton)
contextFit
= match score between utterance and context constraints.implicatureSafety
= 1 β risk of unintended inference (classifier-based).politenessAdequacy
= tone match score.presuppositionValidity
= truth-value match in context KB.coherence
= discourse vector similarity to prior turns.riskLevel
= weighted sum of legal, cultural, relational risk factors.
Default pass (tunable):contextFit β₯ 0.75 β§ implicatureSafety β₯ 0.80 β§ politenessAdequacy β₯ 0.70 β§ presuppositionValidity β₯ 0.80 β§ coherence β₯ 0.70 β§ riskLevel β€ 0.25 β§ ethicsPass = true
.
G. Validators
- JSON Schema valid; examples included.
- OpenAPI typed; full response schema.
- Context Profiles: no missing rules; norms have region codes; legal constraints valid references.
- Seeds round-trip match expected decisions.
- Tests pass with explanations tied to rule IDs.
- Risk model sanity: high-risk utterances never ACCEPT.
H. Policies & Overrides
- Cultural overlays must be curator-reviewed when updated.
- Legal overlays only editable by compliance officers.
- Override decisions require context-specific rationale.
- High-risk channels (contracts, regulatory filings) use stricter thresholds.
I. Playbooks
- Author PLM Blueprint (
/blueprints/plm.yaml
) with evaluation axes, thresholds, and context profiles. - Dry run: validate profiles; run seeds through classifier.
- Mint: render schema, schemas, APIs, rulebook, profiles, seeds, tests into
/build/PLM/...
. - Prove: run tests; ensure risk detection works.
- Publish: ship artifacts; enable
/plm/verify
.
J. Content Requirements (when minted)
- schema.sql:
utterances, contexts, evaluations, decisions, audits
;v_utterance_context_card
. - utterance_context_record.json: utterance, context, evaluations{}, decision, explain[].
- OpenAPI:
/plm/verify
,/contexts
. - rulebook: R0βR8 with channel/role/culture/legal examples.
- context_profiles.yaml: exhaustive per-channel/role/culture/legal overlays.
- seeds/tests: representative coverage of pragmatic challenges.
K. Runtime Endpoints
POST /plm/verify { utterance, channel, role, culture, legal_region, context_history? }
β{ decision, scores, context_card, explain[] }
GET /contexts
β list profiles;PATCH /contexts/{id}
to update.
L. SolveForce Integration
- Headers:
X-PLM-ContextFit: <score>
X-PLM-Risk: <score>
X-Glyph-Status: π£|Ξ|β΄
- Used by comms systems to auto-block risky utterances or flag for review.
M. Acceptance Criteria
- Factory mints PLM artifacts from blueprint without manual edits.
- Context profiles valid; seeds/tests pass.
/plm/verify
returns scores + decision + rationale.- High-risk utterances always flagged; ethics overlay enforced.
- Headers consumed by SolveForce systems for live comms screening.
N. Roadmap
- Dynamic context updating based on live conversation analysis.
- Cross-cultural transfer mode β adjust tone and implicature in real time for multilingual/multicultural interactions.
- Presupposition checking tied to knowledge graphs for factual validation.
- Empathy modeling β detect emotional tone and suggest adjustments.
O. Micro-Examples
- ACCEPT (customer support voice)
- βI understand your concern, and Iβll resolve it right away.β
- High contextFit, politenessAdequacy, coherence; low riskLevel β ACCEPT.
- REVIEW (legal filing)
- βThe client is guaranteed a favorable outcome.β
- Violates presuppositionValidity; high legal risk β REVIEW with caution note.
- REJECT (marketing text)
- βOur competitorβs service is a scam.β
- High legal/cultural risk; implicatureSafety fail β REJECT.