simplexos
v0.1.0
Published
Portable cognitive profile service — resolves Basadur quadrant policy for LLM callers
Maintainers
Readme
simplexos
Portable cognitive profile service — resolves Basadur quadrant policy for LLM callers.
Install
npm install simplexosQuickstart
import { resolvePolicy, renderSystemPrompt } from 'simplexos';
const policy = resolvePolicy({
profile: {
dominant: 'generator',
secondary: 'conceptualizer',
weightings: { generator: 40, conceptualizer: 30, optimizer: 20, implementer: 10 }, // must sum to 100
dimensions: { experiencing: 0.8, thinking: 0.6, ideation: 0.9, evaluation: 0.5 },
source: 'declared',
assessment_date: '2025-01-01', // YYYY-MM-DD
confidence: 'declared',
},
stage: 'optimization',
});
const systemPrompt = renderSystemPrompt(policy);
console.log(systemPrompt);API
Functions
| Function | Signature | Description |
|---|---|---|
| resolvePolicy | (request: PolicyRequest, caller_context?: string) => Policy | Resolves a Basadur quadrant policy for the given profile and stage. Returns a Policy object with profile guidance, stage guidance, and (if applicable) a socratic gate question. |
| renderSystemPrompt | (policy: Policy) => string | Assembles a ready-to-use system prompt string from a resolved Policy. |
Types
| Type | Description |
|---|---|
| Quadrant | 'generator' \| 'conceptualizer' \| 'optimizer' \| 'implementer' |
| Stage | 'generation' \| 'conceptualization' \| 'optimization' \| 'implementation' |
| Path | 'silent_enrichment' \| 'socratic_intervention' |
| CognitiveProfile | { dominant: Quadrant; secondary: Quadrant } |
| PolicyRequest | { profile: CognitiveProfile; stage: Stage } |
| Policy | Resolved policy including guidance text, invocation record, and optional socratic gate |
| InvocationRecord | Audit record attached to every resolved policy |
Zod Schemas
All types are exported with matching Zod schemas (e.g. PolicyRequestSchema, PolicySchema, QuadrantSchema, etc.) for runtime validation.
Note
Extracted from GapFoundry — the reference implementation for Basadur-quadrant-aware LLM prompting.
