> For the complete documentation index, see [llms.txt](https://core-foundation-doc.rupeshstha.com.np/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://core-foundation-doc.rupeshstha.com.np/apm-and-devtools/agentic-skills.md).

# Agentic Skills (Laravel Boost)

CoreFoundation is "AI-Native" by design. It ships with built-in **Agentic Skills** powered by [Laravel Boost](https://github.com/laravel/boost). These skills provide AI coding assistants with the exact architectural rules, patterns, and conventions of this project, ensuring the AI writes compliant, high-quality code from day one.

## What is Laravel Boost?

Laravel Boost is a framework for providing structured context to AI assistants. In the context of CoreFoundation, it allows the project to export its "brain"—all the rules you find in these docs—in a format that AI tools (like Gemini CLI, Cursor, or Windsurf) can ingest and follow.

## How it Works

The project contains a `resources/boost` directory:

* `guidelines/`: Blade-based templates that generate high-level architectural instructions.
* `skills/`: Specific "rulebooks" (in Markdown) targeted at different components (Controllers, Services, Repositories, etc.).

When an AI assistant interacts with a project that has these files, it automatically applies the relevant rules based on the file or context it is working in.

## Usage for Human Developers

You don't need to do anything to "activate" these skills if you are using a Boost-compatible AI assistant. The AI will read the `.md` files in `resources/boost/skills` and follow the instructions therein.

### Proactive Verification

If you want to ensure your AI assistant is aware of a specific rule, you can explicitly ask it:

> "Read the CoreFoundation best practices for Repositories before refactoring this class."

## Usage for AI Assistants

AI assistants are instructed to:

1. **Read the Relevant Skill**: Before writing or refactoring code, the AI should identify which CoreFoundation base classes are involved.
2. **Follow the Pattern**: The AI must strictly adhere to the patterns defined in the `rules/` directory of the skill.
3. **Check Siblings**: AI should check existing files in the project to maintain consistency with established local patterns.

## Extending Skills

If you add a new architectural pattern or base class to your project, you should update the Agentic Skills to reflect this.

### 1. Identify the Rule File

Most rules live in `resources/boost/skills/core-foundation-best-practices/rules/`.

### 2. Add or Update the Rule

Rules are written in clear, concise Markdown with "Incorrect" and "Correct" code examples.

Example:

```markdown
# MyNewBase Rules

## Always Extend MyNewBase
Every my-new-feature class must extend `App\Base\MyNewBase`.

Incorrect:
class Feature extends PlainClass {}

Correct:
class Feature extends MyNewBase {}
```

### 3. Update the SKILL.md

If you add a new rule file, ensure it is mentioned in the main `SKILL.md` triggers so the AI knows when to look for it.

## Why this is Important

Standard documentation is for humans. **Agentic Skills are for machines.**

By maintaining these skills, you ensure that as your project scales, your AI assistant doesn't "hallucinate" standard Laravel patterns where CoreFoundation enforces stricter, enterprise-grade alternatives.
