Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
ffb4368
Replace welcome steps with a chat and pitch reach after connect
paulocastellano Aug 17, 2026
4a718ab
Align the welcome pitch with the analytics account and dynamic copy
paulocastellano Aug 18, 2026
cf398df
Fix welcome referral icons and hide disconnect after connect
paulocastellano Aug 18, 2026
6ed9798
Add a publish method step to the welcome chat
paulocastellano Aug 18, 2026
7781371
Make the welcome flow behave like a live chat
paulocastellano Aug 18, 2026
8d2b92b
Rename the welcome chat to onboarding.
paulocastellano Aug 18, 2026
9c0100c
Finish the onboarding rename and add workspace chat.
paulocastellano Aug 18, 2026
e82c7f9
Add workspace conversation tables, models and enums
paulocastellano Aug 18, 2026
33f0f06
Add workspace conversation store backed by our own tables
paulocastellano Aug 18, 2026
34ca4a0
Harden the workspace conversation store after review
paulocastellano Aug 18, 2026
a5c826d
Add chat tool base class, lean resources and post read tools
paulocastellano Aug 18, 2026
005e87b
Stop leaking DB internals from chat tool errors; clamp list_posts limit
paulocastellano Aug 18, 2026
bc71e23
Add post create, update and schedule chat tools
paulocastellano Aug 18, 2026
58d24e4
Stamp chat CreatedVia and route schedule_post validation through Post…
paulocastellano Aug 18, 2026
245f901
Add publish and delete chat tools behind human approval
paulocastellano Aug 18, 2026
dd3affd
Match approval gates to what publish/delete tools will actually do (R15)
paulocastellano Aug 18, 2026
1888467
Add the workspace conversation agent and its system prompt
paulocastellano Aug 18, 2026
27be85a
Fix delete-approval wording and broaden instructions test coverage
paulocastellano Aug 18, 2026
27e37f0
Make the content_language assertion fault-revealing
paulocastellano Aug 18, 2026
41d0237
Generate conversation titles asynchronously and release stalled turns
paulocastellano Aug 18, 2026
74ebd7d
Fix Unicode title corruption, sidebar reorder, and fragile preamble r…
paulocastellano Aug 18, 2026
40672ab
Fix apostrophe-pairing bug in title quote extraction (R17)
paulocastellano Aug 18, 2026
299f91a
Stream a chat turn over the Vercel data protocol
paulocastellano Aug 18, 2026
ed6c629
Heal a stalled chat turn on the next claim
paulocastellano Aug 18, 2026
4736662
Use driver-agnostic whereLike in ListPostsTool; correct stale-turn re…
paulocastellano Aug 18, 2026
23f4c11
List, open, rename and delete conversations with tool replay
paulocastellano Aug 18, 2026
2ec3136
Separate conversation resolution from sidebar listing (R22)
paulocastellano Aug 19, 2026
7acae3a
Make the replayer's error fallback real, and widen replay test coverage
paulocastellano Aug 19, 2026
71ac556
Consume the chat stream with the Vercel AI SDK Vue client
paulocastellano Aug 19, 2026
eaff2db
Declare ai as a direct dependency and attach HTTP status to chat errors
paulocastellano Aug 19, 2026
148671f
Render chat tool results as post, metric and approval cards
paulocastellano Aug 19, 2026
90fd5f5
Render the chat thread, sidebar grouping and translations
paulocastellano Aug 19, 2026
88e4e76
Close the chat write-tool role gap and three streaming risks
paulocastellano Aug 19, 2026
846a41e
Render assistant chat replies as markdown
paulocastellano Aug 19, 2026
ad998b3
Merge branch 'main' into feature/welcome-chat
paulocastellano Aug 19, 2026
79816c3
Merge branch 'main' into feature/welcome-chat
paulocastellano Aug 19, 2026
4ef6ed8
Stamp the creation id on AI-generated posts
paulocastellano Aug 19, 2026
d1a3156
Add the post generation catalog, sourced from ContentType
paulocastellano Aug 19, 2026
526dd87
Derive the generation catalog's formats from ContentType::aiSupported…
paulocastellano Aug 19, 2026
8676180
Add needs_account to the generation catalog's styles, cover Instagram…
paulocastellano Aug 19, 2026
e7407c2
Add the start_post_generation chat tool
paulocastellano Aug 19, 2026
fd8c967
Add the generate_post chat tool
paulocastellano Aug 19, 2026
f9df07c
Key generate_post on the tool call id and validate the account agains…
paulocastellano Aug 19, 2026
f73bfe8
Cover the per-format image cap and tighten generate_post validation
paulocastellano Aug 19, 2026
4211674
Add the progressive post-generation card to the chat
paulocastellano Aug 19, 2026
1811497
Replay the post-generation catalog when a conversation reopens
paulocastellano Aug 19, 2026
c7e7024
Stop the post-generation card from submitting into a busy turn
paulocastellano Aug 19, 2026
76fdea7
Render the generated post in the chat, resolvable after reopening
paulocastellano Aug 19, 2026
76f5b4a
Settle a generation that ended before the conversation was reopened
paulocastellano Aug 19, 2026
c801a0f
Tidy the post-generation card's types, guards and labels
paulocastellano Aug 19, 2026
31065c7
Create a post directly from every entry point
paulocastellano Aug 19, 2026
63ec4f2
Remove the post creation screen
paulocastellano Aug 19, 2026
f873699
Guard the create-post entry points against a double submit
paulocastellano Aug 19, 2026
708cb96
Drop the dead AiTemplate type and cover the storeless-workspace redirect
paulocastellano Aug 19, 2026
2b12e9e
Stop offering a Pinterest carousel the generator cannot produce
paulocastellano Aug 19, 2026
194300b
Make the generation catalog's accounts tell each other apart
paulocastellano Aug 19, 2026
c1c3b79
Delete PostGenerationCatalog::allowedFormats()
paulocastellano Aug 19, 2026
d669b8c
Rename wizardPromptRule() now that there is no wizard
paulocastellano Aug 19, 2026
256b70b
Stop the generation clock when the wait actually runs out
paulocastellano Aug 19, 2026
7d4632e
Settle a generation card the conversation already acted on
paulocastellano Aug 19, 2026
a61900c
Bound the generation clock when no timeout was ever armed
paulocastellano Aug 19, 2026
1477079
Only settle a generation card once a generation actually started
paulocastellano Aug 19, 2026
50af61a
Open the generation card on a real choice, not a dead click
paulocastellano Aug 19, 2026
ca4f9d5
Pin the chat to the bottom in the layout that actually scrolls
paulocastellano Aug 19, 2026
f812de9
Stop the assistant from talking over its own cards
paulocastellano Aug 19, 2026
1dd03c5
Keep a chat turn's text and tool cards in the order they happened
paulocastellano Aug 19, 2026
1b6cc3c
Lay the post generation card out as a running conversation
paulocastellano Aug 19, 2026
6b700dc
Move the generation defaults out of the question sequence
paulocastellano Aug 19, 2026
8f4bda3
Record only the steps the user actually answered
paulocastellano Aug 19, 2026
93bb819
Ask what the post should be about
paulocastellano Aug 19, 2026
157cf86
Render the generation card in the conversation's language
paulocastellano Aug 19, 2026
2978a58
Let the topic step be a field the user just types in
paulocastellano Aug 19, 2026
2f2a049
Ask for the topic in conversation, not in a box inside the card
paulocastellano Aug 19, 2026
e510708
Let the assistant introduce a card before opening it
paulocastellano Aug 20, 2026
a472365
Stop the assistant talking over a card the user answers by clicking
paulocastellano Aug 20, 2026
51e5d6f
Close the double-submit gaps and rename the format labels to what the…
paulocastellano Aug 20, 2026
f5c4edd
Ask one thing at a time, and give the choices back when the send fails
paulocastellano Aug 20, 2026
5813cc9
Add the Boost skills for humanizer, media library and the v13 upgrade
paulocastellano Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
595 changes: 595 additions & 0 deletions .agents/skills/humanizer/SKILL.md

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions .agents/skills/medialibrary-development/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
name: medialibrary-development
description: Build and work with spatie/laravel-medialibrary features including associating files with Eloquent models, defining media collections and conversions, generating responsive images, and retrieving media URLs and paths.
license: MIT
metadata:
author: Spatie
---

# Media Library Development

## Overview

Use spatie/laravel-medialibrary to associate files with Eloquent models. Supports image/video conversions, responsive images, multiple collections, and various storage disks.

## When to Activate

- Activate when working with file uploads, media attachments, or image processing in Laravel.
- Activate when code references `HasMedia`, `InteractsWithMedia`, the `Media` model, or media collections/conversions.
- Activate when the user wants to add, retrieve, convert, or manage files attached to Eloquent models.

## Scope

- In scope: media uploads, collections, conversions, responsive images, custom properties, file retrieval, path/URL generation.
- Out of scope: general file storage without Eloquent association, non-Laravel frameworks.

## Workflow

1. Identify the task (model setup, adding media, defining conversions, retrieving files, etc.).
2. Read `references/medialibrary-guide.md` and focus on the relevant section.
3. Apply the patterns from the reference, keeping code minimal and Laravel-native.

## Core Concepts

### Model Setup

Every model that should have media must implement `HasMedia` and use the `InteractsWithMedia` trait:

```php
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;

class BlogPost extends Model implements HasMedia
{
use InteractsWithMedia;
}
```

### Adding Media

```php
$blogPost->addMedia($file)->toMediaCollection('images');
$blogPost->addMediaFromUrl($url)->toMediaCollection('images');
$blogPost->addMediaFromRequest('file')->toMediaCollection('images');
```

### Defining Collections

```php
public function registerMediaCollections(): void
{
$this->addMediaCollection('avatar')->singleFile();
$this->addMediaCollection('downloads')->useDisk('s3');
}
```

### Defining Conversions

```php
use Spatie\MediaLibrary\MediaCollections\Models\Media;
use Spatie\Image\Enums\Fit;

public function registerMediaConversions(?Media $media = null): void
{
$this->addMediaConversion('thumb')
->fit(Fit::Contain, 300, 300)
->nonQueued();
}
```

### Retrieving Media

```php
$url = $model->getFirstMediaUrl('images');
$thumbUrl = $model->getFirstMediaUrl('images', 'thumb');
$allMedia = $model->getMedia('images');
```

## Do and Don't

Do:
- Always implement the `HasMedia` interface alongside the `InteractsWithMedia` trait.
- Use `?Media $media = null` as the parameter for `registerMediaConversions()`.
- Call `->toMediaCollection()` to finalize adding media.
- Use `->nonQueued()` for conversions that should run synchronously.
- Use `->singleFile()` on collections that should only hold one file.
- Use `Spatie\Image\Enums\Fit` enum values for fit methods.

Don't:
- Don't forget to run `php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"` before migrating.
- Don't use `env()` for disk configuration; use `config()` or set it in `config/media-library.php`.
- Don't call `addMedia()` without calling `toMediaCollection()` — the media won't be saved.
- Don't reference conversion names that aren't registered in `registerMediaConversions()`.

## References

- `references/medialibrary-guide.md`
Loading
Loading