← LLM Module

LLM MODULE FEATURE

LLM Module Overview

The LLM module is not "chat pasted onto a framework". It gives your project a governed way to expose its own commands as AI-usable skills.

Feature Guide

A quick orientation block that answers the essential questions: what this feature does, how it works, why it matters, and the key concepts behind it.

What this does

What `semitexa/llm` adds to the framework and how your project can expose its own CLI skills to the assistant.

Project Extension

Turn your own commands into skills

The point of `semitexa/llm` is not only to ship one assistant command. The point is to let each project expose its own safe command surface to the assistant through explicit skill metadata.

Your commands stay primary. A skill starts as an ordinary Semitexa console command owned by your project or package.

Metadata makes it usable. `#[AsAiSkill]` adds summary, use/avoid guidance, confirmation mode, and argument policy.

The manifest stays reviewable. Only the commands you expose become part of the skill manifest the assistant may use.

Command Purpose Why it matters
#[AsCommand(...)] Define the real console command first. The assistant extends your CLI; it does not replace it with a second hidden automation layer.
#[AsAiSkill(...)] Attach AI metadata to the command you want to expose. This is where you define risk, confirmation, exposed arguments, and usage guidance.
bin/semitexa ai:skills --json Verify what the assistant can actually see. Treat the manifest as the review surface for your project-specific skills.

Minimal custom skill

#[AsCommand(name: 'reports:rebuild')]
#[AsAiSkill(summary: 'Rebuild reporting snapshots', argumentPolicy: 'allowlisted')]
final class RebuildReportsCommand extends Command {}

Review the exposed manifest

bin/semitexa ai:skills --json
#[AsAiSkill] custom skills SkillManifest policy-aware execution

Verified against Semitexa Ultimate 2026.09.19.1020

LLM Module Overview

The semitexa/llm package gives a Semitexa project a governed AI surface: your own console commands can become discoverable skills instead of living behind ad-hoc prompt instructions.

How it works

You keep writing normal console commands. When one should be usable by the assistant, you add #[AsAiSkill] next to #[AsCommand], choose the risk and argument policy, and let the manifest expose it to the LLM layer.

Why this matters

This keeps AI integration inside the framework contract. Teams extend the system by adding real commands and explicit metadata, not by teaching a model private tribal knowledge about the project.

Own Skills

Good first examples for your project

The best first skills are concrete operational or introspection commands that already have a clear CLI contract.

Start with safe read-only or low-blast-radius commands such as diagnostics, cache hygiene, index refresh, or report rebuilds.

Give each skill a strong `useWhen` and `avoidWhen` so neighboring commands do not blur together in planning.

Expose only the options an assistant should really control; do not default to "all arguments".

After the first skill works, grow the surface intentionally instead of dumping the whole CLI into the manifest.

Support Semitexa
Built for developers who prefer control over magic. Your support helps keep it fast, open, and evolving.

Donate via PayPal