Advanced Prompting Engine
Advanced Prompting Engine
Универсальный движок для создания промптов, реализованный в виде MCP-сервера. Измеряет намерения по 12 философским измерениям и возвращает основу построения, на базе которой клиент формирует промпты.
Движок не генерирует промпты. Он предоставляет размерную основу — активные конструкции, спектральные противоположности, напряжения, «драгоценные камни» (gems), «спицы» (spokes), пары гармонизации и вопросы для построения, — которые делают создание промптов принципиальным, а не эвристическим.
Быстрый старт
# Install
pip install advanced-prompting-engine
# Or run directly via uvx
uvx advanced-prompting-engineКонфигурация MCP
Добавьте в ваш .mcp.json:
{
"mcpServers": {
"advanced-prompting-engine": {
"command": "uvx",
"args": ["advanced-prompting-engine"]
}
}
}Related MCP server: MCP Prompt Optimizer
Что он делает
Движок позиционирует ваше намерение в 12-мерном философском многообразии:
Грань | Подразмерения | Фаза |
Онтология | Частное ↔ Универсальное, Статичное ↔ Динамичное | Постижение |
Эпистемология | Эмпирическое ↔ Рациональное, Достоверное ↔ Условное | Постижение |
Аксиология | Абсолютное ↔ Относительное, Количественное ↔ Качественное | Постижение |
Телеология | Непосредственное ↔ Предельное, Намеренное ↔ Эмерджентное | Постижение |
Феноменология | Объективное ↔ Субъективное, Поверхностное ↔ Глубинное | Постижение |
Этика | Деонтологическое ↔ Консеквенциальное, Агент ↔ Акт | Оценка |
Эстетика | Автономное ↔ Контекстуальное, Сенсорное ↔ Концептуальное | Оценка |
Праксеология | Индивидуальное ↔ Координированное, Реактивное ↔ Проактивное | Применение |
Методология | Аналитическое ↔ Синтетическое, Дедуктивное ↔ Индуктивное | Применение |
Семиотика | Эксплицитное ↔ Имплицитное, Синтаксическое ↔ Семантическое | Применение |
Герменевтика | Буквальное ↔ Фигуральное, Авторский замысел ↔ Реакция читателя | Применение |
Эвристика | Систематическое ↔ Интуитивное, Консервативное ↔ Исследовательское | Применение |
Каждая грань представляет собой сетку 12x12 из 144 эпистемических точек наблюдения. Позиция определяет классификацию (угол/середина/край/центр), потенциал и принадлежность к спектру. 12 граней организованы как 6 взаимодополняющих пар (кубическая модель) с гармонизацией через общие поверхности. Движок вычисляет напряжения через позиционное соответствие, «драгоценные камни» (интеграции между гранями) с модуляцией уровней куба, «спицы» (поведенческие сигнатуры каждой грани) и центральный показатель когерентности.
Инструменты
Инструмент | Назначение |
| Основной — ввод намерения или координат, вывод основы построения |
| Интерпретация — чтение основы построения на обычном языке |
| Экспертный — обход графа, стресс-тестирование, триангуляция |
| Авторский — добавление конструкций и отношений с обнаружением противоречий |
Пример: Намерение на естественном языке
create_prompt_basis(intent="Design an ethical framework for autonomous vehicle decision-making")Движок локализует это намерение по всем 12 философским измерениям и возвращает:
{
"coordinate": {
"epistemology": {"x": 4, "y": 4, "weight": 0.76},
"ontology": {"x": 6, "y": 5, "weight": 0.73},
"praxeology": {"x": 7, "y": 4, "weight": 0.72},
"heuristics": {"x": 5, "y": 3, "weight": 0.66},
"phenomenology": {"x": 7, "y": 4, "weight": 0.61},
"ethics": {"x": 6, "y": 4, "weight": 0.53},
"...": "...all 12 faces with (x,y) position and relevance weight"
},
"harmonization": [
{"pair": ["ontology", "praxeology"], "resonance": 0.15},
{"pair": ["axiology", "ethics"], "resonance": 0.05},
"...6 complementary pairs with resonance scores"
],
"spokes": {
"ontology": {"classification": "weakly_integrated", "strength": 0.042},
"epistemology": {"classification": "weakly_integrated", "strength": 0.039},
"...": "...per-face behavioral signatures"
},
"central_gem": {"coherence": 0.69, "classification": "highly_coherent"},
"construction_questions": {
"ethics": {
"template": "What moral obligations does this prompt impose or assume?",
"position_summary": "balanced Deontological/Consequential + moderately Agent-focused",
"meaning_mechanism": "composition",
"phase": "evaluation"
},
"...": "...12 position-specific philosophical questions to guide prompt construction"
}
}Вывод сообщает вам: это намерение в первую очередь касается проверки знаний (эпистемология 0.76), того, какие сущности существуют (онтология 0.73), и структуры действий (праксеология 0.72). Этика регистрируется на уровне 0.53 — присутствует, но не доминирует. Гармонизация показывает, что онтология и праксеология сильно резонируют (0.15) — теоретическое «что существует» согласуется с практическим «как действовать».
Пример: Предварительно сформированные координаты
Для точного контроля передайте координаты напрямую:
coordinate = {
"ontology": {"x": 0, "y": 0, "weight": 1.0}, # corner: particular + static
"ethics": {"x": 0, "y": 11, "weight": 0.9}, # corner: deontological + act
"methodology": {"x": 0, "y": 0, "weight": 0.8}, # corner: analytic + deductive
# ...all 12 faces with x (0-11), y (0-11), weight (0-1)
}
result = create_prompt_basis(coordinate=coordinate)Архитектура
Стек: Python + NetworkX (топология) + numpy (вычисления) + SQLite (персистентность) + MCP SDK
Граф: 1873 узла, 2279 ребер (12 граней × 144 конструкции + 132 связи + 1 центральный узел)
Конвейер: 8 этапов (Парсер намерений → Разрешитель координат → Вычислитель позиции → Разрешитель конструкций → Анализатор напряжений → Анализатор связей/узлов → Анализатор спиц → Мост построения)
Геометрия: Векторное равновесие (кубооктаэдр) как латентная топология между гранями, кубическая модель для 6 взаимодополняющих пар
Развертывание: Один процесс, транспорт stdio, без демона, без внешних зависимостей
Документация
docs/DESIGN.md— Полная спецификация дизайнаdocs/CONSTRUCT-v2.md— Спецификация конструкций (что такое грани, точки, спектры, связи, «драгоценные камни», «спицы»)docs/CONSTRUCT-v2-questions.md— 144 шаблона вопросов для построения по зонамdocs/adr/— 13 записей о архитектурных решениях (ADR)
Разработка
pip install -e ".[dev]"
pytest tests/ -vПересборка семантического моста (опционально)
Поставляемый пакет включает предварительно вычисленные артефакты на базе BGE (semantic_bridge.npz, semantic_vocab.json). Чтобы пересобрать их с нуля (например, после правок синонимов полюсов), установите дополнительные компоненты для сборки:
pip install -e ".[build]"
python -m nltk.downloader wordnet omw-1.4
python scripts/build_semantic_bridge.pyСборка использует BAAI/bge-large-en-v1.5 (~1.3 ГБ, загружается один раз в кэш HuggingFace) и wordfreq для частотной сортировки. Зависимости времени выполнения остаются неизменными — конечные пользователи получают только предварительно вычисленные артефакты.
Участие в разработке
См. CONTRIBUTING.md для настройки среды разработки и руководящих принципов.
Безопасность
См. SECURITY.md для инструкций по сообщению об уязвимостях.
Лицензия
MIT
Available Tools
4 toolscreate_prompt_basisA
Measure intent across 12 philosophical dimensions and return a construction basis.
Use this before constructing any prompt where dimensional precision, philosophical coherence, or systematic completeness matters.
Provide either 'intent' (natural language) or 'coordinate' (JSON object with 12 faces, each having x, y, weight).
Output modes (mutually exclusive, focused takes priority):
Default: full output (~50KB) with all pipeline data
compact=true: summary fields only (~2KB)
focused=true: guidance-centric output (~500 bytes) with dominant dimensions, gaps, resonance, and coherence — what a prompt engineer needs
| Name | Required | Description | Default |
|---|---|---|---|
| intent | No | ||
| coordinate | No | ||
| compact | No | ||
| focused | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It outlines output modes (default, compact, focused) with approximate sizes, and describes the coordinate structure. It does not mention side effects, permissions, or rate limits, but as a read-like creation tool, the disclosure is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short paragraphs (about 100 words) that are front-loaded with the main purpose, followed by usage and output details. Every sentence adds value, no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 0 required params, 4 optional params, and an output schema, the description covers input options and output modes well. It could briefly name the 12 dimensions, but the output schema likely details that. Overall, sufficient for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description fully compensates. It explains that 'intent' is natural language, 'coordinate' is a JSON object with 12 faces (x, y, weight), and that compact/focused control output verbosity. This adds crucial meaning absent from the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool measures intent across 12 philosophical dimensions and returns a construction basis. It uses specific verbs ('measure', 'return') and a clear resource, and distinguishes itself from siblings by focusing on basis creation for dimensional precision.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises using this tool before constructing prompts where dimensional precision, coherence, or completeness matters. It also explains input options (intent or coordinate) and output modes, but does not directly compare to sibling tools or state when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explore_spaceC
Explore the philosophical manifold. Operations: list_faces, list_constructs, get_construct, get_neighborhood, find_path, get_spoke, stress_test, triangulate.
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| face | No | ||
| x | No | ||
| y | No | ||
| target_face | No | ||
| target_x | No | ||
| target_y | No | ||
| coordinate | No | ||
| coordinate_a | No | ||
| coordinate_b | No | ||
| classification | No | ||
| provenance | No | merged |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Does not disclose side effects, permissions, rate limits, or any behavioral traits. Only states 'explore', which is non-committal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Short two sentences, but front-loading with vague phrase reduces impact. List of operations is useful but could be structured better. Minimal but not overly concise for the complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 12 parameters and 0% schema coverage, description is severely incomplete. No explanation of operations, their required parameters, or return values. Output schema exists but unmentioned.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so description must add meaning. It only lists operation names without explaining any parameter. Parameters like x, y, face, etc. are not described, leaving agent guessing.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The verb 'explore' is vague and 'philosophical manifold' is abstract, but listing operations gives some idea. Not a tautology, but doesn't clearly state concrete purpose. Distinguishes from sibling tools implicitly via domain, but lacks explicit differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. Does not suggest scenarios or mention sibling tools. The list of operations implies different behaviors, but no context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extend_schemaC
Add constructs or relations to the graph. Contradiction detection is automatic.
Operations: add_construct, add_relation.
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| face | No | ||
| x | No | ||
| y | No | ||
| question | No | ||
| tags | No | ||
| description | No | ||
| source_id | No | ||
| target_id | No | ||
| relation_type | No | ||
| strength | No | ||
| override_reason | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Notes automatic contradiction detection, which is a behavioral trait. However, with no annotations, the description should disclose more about side effects, reversibility, and required permissions; it only provides one behavioral insight.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences plus a list of operations make it concise, but it lacks structure and omits important details; every sentence is functional but incomplete.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 12 parameters and no parameter descriptions, the tool is complex. The description does not explain return values (output schema exists) or how to use parameters, leaving significant gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, yet the description does not explain any of the 12 parameters (e.g., face, x, y, tags, strength). Users must infer meanings from names alone, which is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Add constructs or relations to the graph' and lists two operations (add_construct, add_relation). It distinguishes the tool's action from siblings like create_prompt_basis, explore_space, interpret_basis, but doesn't explicitly contrast them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Only mentions available operations without context on prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
interpret_basisA
Interpret a construction basis produced by create_prompt_basis.
Takes the JSON output from create_prompt_basis and returns a plain-language interpretation of the philosophical measurement. Extracts the guidance section and formats it as readable text with dominant dimensions, gaps, and strongest resonance.
| Name | Required | Description | Default |
|---|---|---|---|
| basis | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, but the description details the tool's behavior: extracts the guidance section and formats it as readable text with dominant dimensions, gaps, and strongest resonance. This goes beyond a simple 'interpret' to specify output content.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with purpose, no wasted words. Each sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one parameter with no schema coverage, the description fully explains the parameter and behavior. Output schema exists, so return value details are not needed. The tool is simple and well-described.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter 'basis' has no schema description, but the description compensates by specifying it expects 'JSON output from create_prompt_basis', adding essential meaning to the raw type string.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'interpret' and the resource 'construction basis produced by create_prompt_basis', effectively differentiating it from sibling tools like create_prompt_basis (which produces the basis).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description implies usage context: takes JSON output from create_prompt_basis. While it doesn't explicitly state when not to use alternatives, the dependency on a prior tool output is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.8.0- First observed
create_prompt_basis - First observed
explore_space - First observed
extend_schema - First observed
interpret_basis
TDQS
Scored across 4 tools
Each tool has a distinct purpose: create measures intent, explore navigates the manifold, extend modifies the graph, interpret explains results. No overlap in functionality.
All tool names follow a consistent verb_noun pattern (create_prompt_basis, explore_space, extend_schema, interpret_basis), making it easy to predict tool roles.
Four tools is an ideal number for a specialized philosophical engine, covering core operations without unnecessary bloat.
The toolkit covers creation, exploration, extension, and interpretation. The only minor gap is the lack of a deletion or reset tool, but this is acceptable for a focused engine.
Maintenance
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Capability registry for the agentic economy. Semantic search over verified MCP server listings.
Hosted MCP server and Agent Skills for specs, engineering threads, and project memory.
Related MCP Servers
- FlicenseCqualityDmaintenanceAn MCP server implementing the Unified Cognitive Processing Framework for advanced problem-solving, creative thinking, and cognitive analysis through structured tools for knowledge mapping, recursive questioning, and perspective generation.316-
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides research-backed prompt optimization tools and professional domain templates designed to improve AI performance through strategies like Tree of Thoughts and Medprompt. It enables users to analyze, auto-optimize, and refine prompts using advanced reasoning patterns and safety-critical alignment techniques.25MIT
- AlicenseAqualityDmaintenanceAn MCP server that automatically enhances user prompts by applying advanced engineering techniques like chain-of-thought and few-shot reasoning based on identified intent. It optimizes technique selection through local learning and integrates directly into Claude sessions to improve output quality without additional API costs.6MIT
- AlicenseAqualityDmaintenanceAn advanced MCP server that intelligently enhances prompts using 44+ metaprompt strategies, with LLM-driven strategy selection and enterprise-grade features.849 npm9MIT