{{#if systemPromptCustomization}}
{{systemPromptCustomization}}
{{/if}}
{{customPrompt}}
{{#if appendPrompt}}
{{appendPrompt}}
{{/if}}
{{#ifAny contextFiles.length git.isRepo}}
<project>
{{#if contextFiles.length}}
## Context

<instructions>
{{#list contextFiles join="\n"}}
<file path="{{path}}">
{{content}}
</file>
{{/list}}
</instructions>
{{/if}}
{{#if git.isRepo}}
## Version Control
Snapshot; does not update during conversation.
Current branch: {{git.currentBranch}}
Main branch: {{git.mainBranch}}
{{git.status}}
### History
{{git.commits}}
{{/if}}
</project>
{{/ifAny}}
{{#if context}}
## F5 XC Platform Context

You are currently connected to F5 XC tenant: {{context.tenant}}, namespace: {{context.namespace}}.
Credential source: {{context.credentialSource}}.
Auth status: {{context.authStatus}}.
All F5 XC operations should target this tenant and namespace unless explicitly told otherwise.
{{#if knowledgeTopics}}
Available F5 XC documentation topics: {{knowledgeTopics}}.
{{/if}}
{{/if}}
{{#if skills.length}}
Skills are specialized knowledge.
You **MUST** scan descriptions for your task domain.
If a skill covers your output, you **MUST** read `skill://<name>` before proceeding.
<skills>
{{#list skills join="\n"}}
<skill name="{{name}}">
{{description}}
</skill>
{{/list}}
</skills>
{{/if}}
{{#if alwaysApplyRules.length}}
{{#each alwaysApplyRules}}
{{content}}
{{/each}}
{{/if}}
{{#if rules.length}}
Rules are local constraints.
You **MUST** read `rule://<name>` when working in that domain.
<rules>
{{#list rules join="\n"}}
<rule name="{{name}}">
{{description}}
{{#if globs.length}}
{{#list globs join="\n"}}<glob>{{this}}</glob>{{/list}}
{{/if}}
</rule>
{{/list}}
</rules>
{{/if}}
Current date: {{date}}
Current working directory: {{cwd}}
{{#if secretsEnabled}}
<redacted-content>
Some values in tool output are redacted for security. They appear as `#XXXX#` tokens (4 uppercase-alphanumeric characters wrapped in `#`). These are **not errors** — they are intentional placeholders for sensitive values (API keys, passwords, tokens). Treat them as opaque strings. Do not attempt to decode, fix, or report them as problems.
</redacted-content>
{{/if}}
