get_context_pack
Retrieve TwinCAT XML validation rules and OOP policies tailored to workflow stages—pre-generation for essential checks or troubleshooting for specific issues.
Instructions
Get curated knowledge base entries and OOP policy scoped by workflow stage.
Stages:
pre_generation: Returns high-priority non-fixable checks the LLM must get right when generating TwinCAT XML from scratch.
troubleshooting: Returns KB entries for specific check_ids (typically extracted from blocker lists after orchestration).
Args: stage: Workflow stage ("pre_generation" or "troubleshooting"). check_ids: Explicit check IDs (required for troubleshooting, ignored for pre_generation). target_path: Optional file/dir path for OOP policy resolution. max_entries: Maximum KB entries to return (default 10). include_examples: Include correct_examples and common_mistakes arrays (default True). Set False to save tokens. enforcement_mode: Policy enforcement mode ("strict" or "compat"). intent_profile: Programming paradigm intent — "oop", "procedural", or "auto". In pre_generation stage: - omitted: defaults to "oop" (backward compatible behavior). - "oop": Core + OOP check guidance is returned. - "procedural": Only core (non-OOP) check guidance is returned. - "auto": No file content is available at pre-generation time, so resolves to "procedural". Use "oop" or "procedural" explicitly for predictability. In troubleshooting stage: - explicit value is required (workflow guardrail). - value has no routing effect (check_ids drive selection).
Returns: JSON with effective_oop_policy, curated entries[], missing_check_ids[], intent metadata, truncation info, and meta envelope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stage | No | pre_generation | |
| check_ids | No | ||
| target_path | No | ||
| max_entries | No | ||
| include_examples | No | ||
| enforcement_mode | No | strict | |
| intent_profile | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |