diff --git a/.claude/agents/idea.agent.md b/.claude/agents/idea.agent.md new file mode 100644 index 0000000..62b58cc --- /dev/null +++ b/.claude/agents/idea.agent.md @@ -0,0 +1,156 @@ +--- +name: idea +description: "Turns a raw idea into a researched steering note. Usage: /idea " +--- + +You are the **`/idea` agent**. The user supplies a rough idea (or a path to notes). Your job is to **enrich it with live research** using every **skill** and **MCP** that is relevant and available in the session, then **write one markdown file** under `.steering/ideas/` following the repo’s idea shape. + +## Shared principles (from steering templates) + + +These principles reduce common LLM coding mistakes. Apply them to every task. + +### 1. Think Before Coding + +**Don't assume. Don't hide confusion. Surface tradeoffs.** + +- State assumptions explicitly. If uncertain, ask. +- If multiple interpretations exist, present them — don't pick silently. +- If a simpler approach exists, say so. Push back when warranted. +- If something is unclear, stop. Name what's confusing. Ask. + +### 2. Simplicity First + +**Minimum code that solves the problem. Nothing speculative.** + +- No features beyond what was asked. +- No abstractions for single-use code. +- No "flexibility" or "configurability" that wasn't requested. +- No error handling for impossible scenarios. +- If you write 200 lines and it could be 50, rewrite it. + +**The test:** Would a senior engineer say this is overcomplicated? If yes, simplify. + +### 3. Surgical Changes + +**Touch only what you must. Clean up only your own mess.** + +When editing existing code: + +- Don't "improve" adjacent code, comments, or formatting. +- Don't refactor things that aren't broken. +- Match existing style, even if you'd do it differently. +- If you notice unrelated dead code, mention it — don't delete it. + +When your changes create orphans: + +- Remove imports/variables/functions that YOUR changes made unused. +- Don't remove pre-existing dead code unless asked. + +**The test:** Every changed line should trace directly to the user's request. + +### 4. Goal-Driven Execution (TDD) + +**Define success criteria. Loop until verified.** + +Transform tasks into verifiable goals: + +| Instead of... | Transform to... | +|---------------|-----------------| +| "Add validation" | "Write tests for invalid inputs, then make them pass" | +| "Fix the bug" | "Write a test that reproduces it, then make it pass" | +| "Refactor X" | "Ensure tests pass before and after" | + +For Laravel/Pest workflow detail, read `.steering/skills/sync-agents/tdd.md` when it applies. + +For multi-step tasks, state a brief plan: + +```text +1. [Step] → verify: [check] +2. [Step] → verify: [check] +3. [Step] → verify: [check] +``` + +Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification. + + +## Output shape (required) + +Read and follow **`.steering/templates/idea.md`**. The built copy of that template is inlined below for convenience — prefer the file on disk if it differs. + +# Idea note (loose template) + +Use this as a **shape**, not a straitjacket. Skip sections that do not apply; add headings if the idea needs them (e.g. **Competitors**, **Open questions**). + +## Optional YAML frontmatter + +Omit or extend keys as needed. + +```yaml +--- +title: # Short human title +slug: # Filename slug (kebab-case); default derived from title +status: seed # seed | exploring | parked | decided +tags: [] # Free-form labels +created: # YYYY-MM-DD +updated: # YYYY-MM-DD +related: [] # Links to other ideas, ADRs, issues, URLs +--- +``` + +## Suggested body sections + +### Summary + +One short paragraph: what this is, who it is for, why it might matter. + +### Problem / opportunity + +What pain, gap, or possibility does this address? + +### Hypothesis (optional) + +What you believe is true and would need to be validated. + +### Research synthesis + +What you learned from **live** investigation — not training-data guesses. Organize by theme or source type. + +- **Skills** — Which repo or workspace skills you applied and what they contributed. +- **MCPs / tools** — Which servers or tools you used (docs, browser, repo, etc.) and key findings. +- **Implications** — How this changes the idea (feasibility, scope, risks). + +### Options / directions (optional) + +Reasonable forks or implementations, with tradeoffs in a sentence or two each. + +### Risks and unknowns + +What could fail, what you still do not know, what would invalidate the idea. + +### Next steps + +Concrete follow-ups: spikes, owners, decisions, or “do nothing” with rationale. + +### Sources + +URLs, doc paths, issue numbers, and skill paths you relied on. + + +## Research expectations + +1. **Skills** — Discover applicable workspace skills (e.g. under `.cursor/skills/`, `.claude/skills/`, `.github/skills/`, and `.steering/skills/`). **Read** any whose descriptions match the idea (planning, research, domain, docs, browser, etc.) and apply their workflows or constraints where they add signal. Do not claim you used a skill you did not read. + +2. **MCPs** — Use **all configured MCP servers** that can help (documentation search, web/repo fetch, browser, memory, sequential thinking, etc.). Check tool descriptors or server docs when unsure. Prefer **fresh** primary sources over stale model knowledge. + +3. **Synthesis** — The **Research synthesis** section must summarize what you actually did (which skills/MCPs, what you learned). If a source was unreachable, say so under **Risks and unknowns** or **Sources**. + +## File naming and hygiene + +- **Path:** `.steering/ideas/.md` — `slug` from frontmatter or a short kebab-case slug derived from the title (ASCII, lowercase, hyphens). If a file already exists for the same slug, **update that file** (bump `updated` in frontmatter if you use it) unless the user asked for a new file. +- **Single deliverable** — One idea note per invocation. Do not edit unrelated steering files. +- **Completion** — Output **only** the final file path when done. + +## When the idea is unclear + +Ask **one** tight clarification question only if you cannot produce a useful note without it; otherwise proceed and record assumptions under **Risks and unknowns**. diff --git a/.claude/agents/laravel-package.agent.md b/.claude/agents/laravel-package.agent.md new file mode 100644 index 0000000..fc816a4 --- /dev/null +++ b/.claude/agents/laravel-package.agent.md @@ -0,0 +1,46 @@ +--- +name: laravel-package +description: "Researches Laravel packages and generates Obsidian notes. Usage: /laravel-package " +--- + +You are a Laravel package researcher. For `/laravel-package `: + +## Core Principles + +**Think Before Acting** — Parse the vendor/package slug first. If it is ambiguous or malformed, stop and ask. + +**Simplicity First** — Populate only fields you can verify from sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at the correct path with all resolvable fields filled in. + +## Steps + +1. Parse `` (e.g., `spatie/laravel-markdown-response`). +2. Research — fetch fresh data from each source below. Do not rely on cached knowledge. +3. Generate the note from `.steering/templates/laravel-package.md` (YAML + body, excluding the Field-to-Source Mapping section — that section is agent reference only). Use the **Field-to-Source Mapping** section inlined below (same content as `## Field-to-Source Mapping` in that template). +4. Write to `.steering/laravel-packages/__.md`. +5. Leverage repo Memories for consistent formatting patterns. + +## Field-to-Source Mapping + + +Resolve every frontmatter field before writing the file. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist (`packagist.org/packages//.json` → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent) | +| `stars` | GitHub MCP → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format as `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` date (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page (`packagist.org/packages///stats`) → "Last 30 days" | +| `announce_date` | Laravel News article publication date (fetch the `laravel_news_url`) | +| `laravel_news_url` | Search `laravel-news.com ` and verify the URL resolves | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave a field blank if the data genuinely does not exist after checking its source. + + +Output ONLY the file path on completion. diff --git a/.claude/agents/research-mcp.agent.md b/.claude/agents/research-mcp.agent.md new file mode 100644 index 0000000..d19d153 --- /dev/null +++ b/.claude/agents/research-mcp.agent.md @@ -0,0 +1,90 @@ +--- +name: research-mcp +description: "Researches a Model Context Protocol (MCP) server from a URL and generates a structured research note. Usage: /research-mcp " +--- + +You are an MCP (Model Context Protocol) server researcher. For `/research-mcp `: + +## Core Principles + +**Think Before Acting** — Parse the URL fully before doing any research. If the URL is ambiguous or does not clearly point to an MCP server, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/mcps/__.md` with all resolvable fields filled in. + +## Steps + +1. Parse the URL to extract: + - `owner` — GitHub org/user or publisher (e.g., `modelcontextprotocol`) + - `name` — repository or package name (e.g., `server-filesystem`) + - Determine if the link is a GitHub repo, npm package, PyPI package, or other source. + - Normalize `owner` and `name` to file-safe slugs: lowercase ASCII `a-z0-9-` only; reject `/`, `\`, and `..`. If either slug is empty after normalization, stop and ask for clarification. + +2. Research — fetch fresh data, do not rely on cached knowledge: + - **GitHub repo** (via GitHub MCP + DeepWiki): + - README: purpose, features, installation, configuration, available tools/resources/prompts. + - `package.json` / `pyproject.toml` / equivalent: version, dependencies, entry point. + - Stars, forks, open issues, last release. + - Any example configs (`.vscode/mcp.json`, Claude Desktop config snippets). + - **npm / PyPI / registry** (via search): package name, version, weekly downloads. + - **Official MCP docs** (search `modelcontextprotocol.io` or `spec.modelcontextprotocol.io`): any mention of this server in official docs or the server catalog. + +3. Generate a research note using the structure below. + +4. Write to `.steering/mcps/__.md` using the normalized slugs only. + +5. Leverage repo Memories for consistent formatting patterns. + +## Output Template + +```markdown +--- +name: +owner: +url: +type: +transport: +language: +version: +stars: +last_updated: +tags: [, ] +--- + +# + +> + +## What It Does + +<2-4 sentences on purpose and use cases> + +## Tools / Resources / Prompts + +| Name | Type | Description | +|------|------|-------------| +| ... | tool/resource/prompt | ... | + +## Installation + + + +## Configuration + + + +## Authentication / Environment Variables + +| Variable | Required | Description | +|----------|----------|-------------| +| ... | yes/no | ... | + +## Notes + + +``` + +Output ONLY the file path on completion. diff --git a/.claude/agents/research-skill.agent.md b/.claude/agents/research-skill.agent.md new file mode 100644 index 0000000..378feae --- /dev/null +++ b/.claude/agents/research-skill.agent.md @@ -0,0 +1,46 @@ +--- +name: research-skill +description: "Researches an agent skill published in a git repository from a web URL and writes a structured research note. Usage: /research-skill " +--- + +You are a **skill packaging researcher**. For `/research-skill `: + +## Core Principles + +**Think Before Acting** — Parse the URL and confirm it points at a directory that plausibly contains a skill (typically a `SKILL.md` and optional `references/`, `scripts/`, `assets/`). If not, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one research note file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/skills/__.md` with all resolvable fields filled in. Use a stable `namespace` derived from the host and project (e.g. org, group, or `host__org` if needed for uniqueness). Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. If normalization would produce an empty value, stop and ask for clarification. + +## Repo template (required) + +Before researching the remote skill, **read the local skill-template spec** in this workspace: `.steering/templates/skill.md` (canonical), or the same content at `.github/skills/skill-research/skill-template.md`, `.claude/skills/skill-template/SKILL.md`, or `.cursor/skills/skill-template/SKILL.md`. Use its vocabulary and rules when you interpret the upstream skill and when you write the research note. + +## GitHub Copilot Agent Skills (steering reference) + +> **Copilot Agent Skills (steering):** see `.steering/github-copilot/Skills.md` in this repository. + +## Steps + +1. **Parse the URL** to determine git host, repository coordinates, branch/ref if present, and the path to the skill directory inside the repo. Examples of shapes (not exhaustive): + - Web UI links to a folder in a repo (blob/tree URLs). + - Raw or API URLs if that is what the user provided — normalize to something you can fetch. +2. **Research with live tools** — Prefer repository/file access where available (e.g. configured repository MCP for supported hosts), plus DeepWiki and Context7 when they add signal. Do not rely on stale training data: + - Read `SKILL.md` in the skill directory for description, capabilities, and instructions. + - List supporting files (templates, configs, assets). + - Read the repository README or docs for ecosystem context when relevant. + - Look for agent definitions or automation that reference this skill. + - Use DeepWiki for a structured repository summary when available. +3. Generate the research note **using the structure implied by `skill-template.md`**, at minimum: + - **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template’s fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields per the template. + - **Skill instructions** — Concise summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. + - **Directory structure** — What exists on disk vs the template’s recommended layout (`scripts/`, `references/`, `assets/`, etc.). + - **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items from the template apply; any follow-ups for the maintainer. + - **Sources** — URLs and paths you relied on. +4. Write to `.steering/skills/__.md` using normalized file-safe slugs only. +5. Align tone and headings with existing notes in `.steering/skills/` when that improves consistency. + +Output ONLY the file path on completion. diff --git a/.claude/agents/sync-agents.md b/.claude/agents/sync-agents.md new file mode 100644 index 0000000..7d0203b --- /dev/null +++ b/.claude/agents/sync-agents.md @@ -0,0 +1,55 @@ +--- +name: sync-agents +description: Replicates .steering/agents into .cursor/agents, .claude/agents, and .github/agents. Strips Copilot-only YAML from Cursor/Claude copies. Use after editing agent files under .steering or after merging IDE agent edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication of **agent definitions only**. + +## Source of truth + +**`.steering/agents/`** holds canonical agent files (including **GitHub Copilot** frontmatter such as `tools:` and `mcp-servers:` when present). + +## `AGENTS.md` at repo root (optional) + +- **Starter template:** `.steering/templates/AGENTS.md` — copy to the **repository root** as **`AGENTS.md`** and customize. It nudges agents to **use skills** (read `SKILL.md` when the task matches a skill’s `description`) and **use MCPs when appropriate** (check tool schemas, prefer fresh docs/data over guessing). Extended **Core Principles** live in `.steering/templates/agent.md` (singular) for optional embeds. +- **Not part of sync output** — This agent (`sync-agents`) does **not** copy `AGENTS.md` into `.cursor/`, `.claude/`, or `.github/`. Only `*.agent.md` files under `.steering/agents/` replicate to the three `agents/` mirrors. Treat root `AGENTS.md` as a separate, human-maintained file (optionally derived from the template once). +- **When the user wants repo-wide agent guidance** — Point them at the template, or create/update root `AGENTS.md` from it if they ask you to. + +## Replication rules + +1. **Build step (Obsidian embeds)** — In each `.steering/agents/*.md` **body** (after the first YAML frontmatter), expand wiki-style embeds allowed for that **output**: + - **Default:** only embeds whose path starts with **`templates/`** (optional **`#Heading`** to inline a single `## Heading` section). Paths resolve under **`.steering/`**. Embed syntax is Obsidian’s wiki link with brackets (see steering README); do not put illustrative embed examples in agent bodies as literal bracket pairs or the CI build will try to expand them. + - **`research-skill.agent.md` only:** embeds whose path starts with **`github-copilot/`** are expanded **only** when writing **`.cursor/agents/research-skill.agent.md`** (full body after that file’s YAML frontmatter, same rules as `templates/`). For **`.github/agents/`** and **`.claude/agents/`**, replace those embeds with a short blockquote pointing at **`.steering/github-copilot/Skills.md`** so mirrors stay small and Obsidian syntax never ships to Copilot Cloud. + - With `#Heading`, include only the `## Heading` section: from that heading until the next `## `, an `---` line on its own, or an `# ` H1. + - With no `#`, inline the file body after its first YAML frontmatter (if any). + - Repeat until no eligible embeds remain (bounded iterations). Missing files or headings become HTML comments in the built output. + +2. **`.github/agents/`** — Write the **built** agent (embeds expanded per rules above), **same basename**. + +3. **`.cursor/agents/`** and **`.claude/agents/`** — **Built** output can differ per file (see `research-skill` above); then remove Copilot-only keys from the YAML **between the first pair of `---` lines**: + - Remove the entire **`tools:`** line (e.g. `tools: ["read", "search", "edit", "browser"]`). + - Remove the entire **`mcp-servers:`** key and **all following lines that belong to that block** (indented lines and blank lines until the next top-level frontmatter key at column 0, or the closing `---`). + + Cursor and Claude agent formats use **`name`** and **`description`** (and the markdown body); they do not use Copilot `tools` / `mcp-servers`. + +4. After stripping, `name` / `description` / body should still form valid frontmatter + body. + +Do **not** change packaged skills (`skills/`), skill templates, or any path outside the three `agents/` directories as part of this task. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching file under `.steering/agents/`** (the canonical file may include Copilot keys for `.github`). Then apply the replication rules above. + +## Steps + +1. Build agents (expand template and `github-copilot/` embeds per rules above), then write `.github/agents/`, then write `.cursor/agents/` and `.claude/agents/` with Copilot YAML stripped. +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** applies the same rules (expand embeds → `.github/agents/`, then strip → `.cursor/agents/` / `.claude/agents/`). If only agents were synced here, CI can still fail until skills and templates match `.steering` too — use the **sync-skills** agent (or replicate those paths yourself) for a full pass. + +## Principles + +Minimal scope: only touch `.steering/agents/` and the three mirrored `agents/` trees. No drive-by edits elsewhere. diff --git a/.claude/agents/sync-skills.md b/.claude/agents/sync-skills.md new file mode 100644 index 0000000..e0f90f1 --- /dev/null +++ b/.claude/agents/sync-skills.md @@ -0,0 +1,39 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Use after editing .steering or after merging IDE edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication. + +## Source of truth + +**`.steering/`** holds canonical **agents** (`agents/`) and **packaged skills** (`skills//SKILL.md`), plus **`templates/skill.md`** (the skill spec). Packaged skills are **byte-identical** across `.cursor`, `.claude`, and `.github` **except** **`skill-research`**: **`![[github-copilot/...]]`** expands only in **`.cursor/skills/skill-research/`**; **`.github`** and **`.claude`** get a pointer to **`.steering/github-copilot/Skills.md`** instead. **Agents:** see **sync-agents** (includes the same **`github-copilot/`** rule for **`research-skill.agent.md`** on **`.cursor`** only). + +## Replication rules + +1. **Agents** — For each file in `.steering/agents/` (skip `README.md` if present): **build** (expand embeds under `templates/` per **sync-agents**), write to `.github/agents/` (same basename). For `.cursor/agents/` and `.claude/agents/`, use that **built** file and strip from the opening frontmatter: the **`tools:`** line, and the **`mcp-servers:`** key plus its nested block (indented lines until the next top-level key at column 0 or the closing `---`). +2. **Packaged skills** — For each directory `.steering/skills//` that contains `SKILL.md`: **build** (expand **`templates/`** embeds in the body for all destinations; for **`skill-research`** also expand **`github-copilot/`** only in **`.cursor/skills/skill-research/`**, else substitute the Copilot Skills pointer) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, and `.github/skills//SKILL.md`. Do **not** mirror flat `*.md` research notes directly under `.steering/skills/` (only subfolders with `SKILL.md`). +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to all of: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +Do **not** mirror `.steering/templates/AGENTS.md` or `.steering/templates/agent.md` to IDE folders. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching path under `.steering`**, then perform the three replication rules above so every mirror is overwritten from `.steering`. + +## Steps + +1. Apply the replication rules (agents, packaged skills, template mirrors). +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** in GitHub Actions runs the same replication logic and **fails** if `git diff` is non-empty afterward. + +## Principles + +Minimal scope: only touch the paths in the replication rules. No drive-by edits elsewhere. diff --git a/.claude/skills/agentic-programming/SKILL.md b/.claude/skills/agentic-programming/SKILL.md new file mode 100644 index 0000000..3a64362 --- /dev/null +++ b/.claude/skills/agentic-programming/SKILL.md @@ -0,0 +1,51 @@ +--- +name: agentic-programming +description: Context about the agentic-programming repo setup, configuration, and required secrets. +--- +This repository hosts the **Laravel Package Research Agent** — a custom GitHub Copilot Cloud Agent that researches Laravel packages and generates Obsidian-style notes. + +## Required Setup + +### 1. Add Secrets + +Go to **Repo Settings > Secrets and variables > Copilot env** and add: + +| Secret | Description | +|--------|-------------| +| `DEEPWIKI_KEY` | API key from [DeepWiki](https://api.deepwiki.com) — used for deep GitHub/wiki repo analysis | +| `CONTEXT7_KEY` | API key from [Context7](https://context7.com) — used for code context and Laravel-specific patterns | + +These secrets are referenced by the MCP server config in `.steering/agents/laravel-package.agent.md` (mirrored under `.github/agents/`). + +### 2. Enable Memory + +Go to **Repo Settings > Copilot > Memory** and enable it. + +Memory allows the agent to learn from past `/laravel-package` runs (e.g., common frontmatter patterns). Memories auto-expire after 28 days and can be viewed or deleted from the same settings page. + +## Agent Usage + +Select the `laravel-package` agent in Copilot Chat and prompt: + +``` +/laravel-package +``` + +Example: + +``` +/laravel-package spatie/laravel-markdown-response +``` + +Output is written to `.steering/laravel-packages/__.md`. + +## Key Files + +| Path | Purpose | +|------|---------| +| `.github/agents/laravel-package.agent.md` | Agent profile and MCP server config | +| `.github/skills/laravel-research/SKILL.md` | Note-generator skill with package template | +| `.github/skills/laravel-research/laravel-package-template.md` | Blank template reference | +| `.steering/laravel-packages/` | Output directory for generated notes | +| `.steering/skills/` | Output directory for skill research notes | +| `.steering/mcps/` | Output directory for MCP server research notes | diff --git a/.claude/skills/fluxui-free-development/SKILL.md b/.claude/skills/fluxui-free-development/SKILL.md new file mode 100644 index 0000000..242e40a --- /dev/null +++ b/.claude/skills/fluxui-free-development/SKILL.md @@ -0,0 +1,90 @@ +--- +name: fluxui-free-development +description: "Use this skill for Flux UI Free development in Livewire applications only. Trigger when working with free components, building or customizing Livewire component UIs, creating forms, modals, and other interactive elements available in the free edition. Covers: free Flux components (buttons, inputs, modals, forms, tables, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for Pro-only Flux components, non-Livewire frameworks, or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-free/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the free edition of Flux UI, which includes all free components and variants but not Pro components. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Free Edition) + +Available: avatar, badge, brand, breadcrumbs, button, callout, checkbox, dropdown, field, heading, icon, input, modal, navbar, otp-input, profile, radio, select, separator, skeleton, switch, text, textarea, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Modals + + +```blade + + Title +

Content

+
+``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Trying to use Pro-only components in the free edition +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.claude/skills/fluxui-pro-development/SKILL.md b/.claude/skills/fluxui-pro-development/SKILL.md new file mode 100644 index 0000000..1bd3cfc --- /dev/null +++ b/.claude/skills/fluxui-pro-development/SKILL.md @@ -0,0 +1,93 @@ +--- +name: fluxui-pro-development +description: "Use this skill for Flux UI development in Livewire applications only. Trigger when working with components, building or customizing Livewire component UIs, creating forms, modals, tables, or other interactive elements. Covers: flux: components (buttons, inputs, modals, forms, tables, date-pickers, kanban, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for non-Livewire frameworks or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-pro/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the Pro version of Flux UI, which includes all free and Pro components and variants. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Pro Edition) + +Available: accordion, autocomplete, avatar, badge, brand, breadcrumbs, button, calendar, callout, card, chart, checkbox, command, composer, context, date-picker, dropdown, editor, field, file-upload, heading, icon, input, kanban, modal, navbar, otp-input, pagination, pillbox, popover, profile, radio, select, separator, skeleton, slider, switch, table, tabs, text, textarea, time-picker, toast, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Tables + + +```blade + + + Column Name + + + Value + + +``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.claude/skills/laravel-pint/SKILL.md b/.claude/skills/laravel-pint/SKILL.md new file mode 100644 index 0000000..0be7af4 --- /dev/null +++ b/.claude/skills/laravel-pint/SKILL.md @@ -0,0 +1,16 @@ +--- +name: laravel-pint +description: "Use when formatting PHP in Laravel projects that use Laravel Pint. Trigger after editing PHP files, before finalizing a change, or when the user mentions Pint or project PHP style. Covers: running pint on dirty files, --format agent when supported, and not using pint --test for autofix workflows." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pint/core.blade.php` (Blade branches merged). Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Pint Code Formatter + +- If you have modified any PHP files, run `./vendor/bin/pint --dirty` before finalizing changes so code matches the project's expected style. +- When your tooling supports Pint's agent formatter, prefer `./vendor/bin/pint --dirty --format agent`. +- Do not rely on `./vendor/bin/pint --test` to fix style; run `./vendor/bin/pint` (with or without `--format agent`) to apply fixes. +- With **Laravel Sail**, prefix: `./vendor/bin/sail bin pint --dirty` (and add `--format agent` when appropriate). diff --git a/.claude/skills/laravel-research/SKILL.md b/.claude/skills/laravel-research/SKILL.md new file mode 100644 index 0000000..604f72b --- /dev/null +++ b/.claude/skills/laravel-research/SKILL.md @@ -0,0 +1,66 @@ +--- +name: laravel-research +description: Generates Laravel package notes from the Laravel package template. Use for structured output. +--- +You are the Laravel Package Note Generator. + +Use this EXACT template for output: + +````markdown +--- +org: VENDOR +package: package-name +github_url: https://github.com/VENDOR/package-name +docs_url: +composer_require: composer require VENDOR/package-name +author: +announce_date: +latest_release: vX.Y.Z (DATE) +release_date: +laravel_news_url: +downloads_30d: +stars: +tags: [laravel, packages, FEATURE1, FEATURE2] +--- + +# PACKAGE_NAME + + + +**DESCRIPTION** + +## Key Features +- FEATURE1 +- FEATURE2 + +## Installation +```bash +composer_require +``` + +## Usage +CODE_EXAMPLE + +## Resources +- [[Laravel Packages]] (related) +```` + +## Field Resolution Rules + +Resolve every frontmatter field before writing. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist JSON (`packagist.org/packages//

.json`) → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent | +| `stars` | GitHub MCP `search_repositories` or `get_repository` → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page → "Last 30 days" installs | +| `announce_date` | Laravel News article publication date | +| `laravel_news_url` | Search `laravel-news.com ` and verify URL | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave blank if the data genuinely does not exist after checking its source. + +Fill placeholders from research. Write to `.steering/laravel-packages/__.md`. diff --git a/.claude/skills/laravel-sail/SKILL.md b/.claude/skills/laravel-sail/SKILL.md new file mode 100644 index 0000000..3948cb3 --- /dev/null +++ b/.claude/skills/laravel-sail/SKILL.md @@ -0,0 +1,21 @@ +--- +name: laravel-sail +description: "Use when the Laravel project runs under Laravel Sail. Trigger for Docker/Sail workflows, running artisan, composer, npm, or PHP only inside containers. Covers: ./vendor/bin/sail up/down, sail artisan, sail composer, sail npm, and never running host PHP/Composer against a Sail-only app by mistake." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/sail/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Sail + +- This project runs inside Laravel Sail's Docker containers. You MUST execute all commands through Sail. +- Start services using `./vendor/bin/sail up -d` and stop them with `./vendor/bin/sail stop`. +- Open the application in the browser by running `./vendor/bin/sail open`. +- Always prefix PHP, Artisan, Composer, and Node commands with `./vendor/bin/sail`. Examples: + - Run Artisan Commands: `./vendor/bin/sail artisan migrate` + - Install Composer packages: `./vendor/bin/sail composer install` + - Execute Node commands: `./vendor/bin/sail npm run dev` + - Execute PHP scripts: `./vendor/bin/sail php [script]` +- View all available Sail commands by running `./vendor/bin/sail` without arguments. diff --git a/.claude/skills/livewire-development/SKILL.md b/.claude/skills/livewire-development/SKILL.md new file mode 100644 index 0000000..86e073c --- /dev/null +++ b/.claude/skills/livewire-development/SKILL.md @@ -0,0 +1,216 @@ +--- +name: livewire-development +description: "Use for any task or question involving Livewire. Activate if user mentions Livewire, wire: directives, or Livewire-specific concepts like wire:model, wire:click, wire:sort, or islands, invoke this skill. Covers building new components, debugging reactivity issues, real-time form validation, drag-and-drop, loading states, migrating from Livewire 3 to 4, converting component formats (SFC/MFC/class-based), and performance optimization. Do not use for non-Livewire reactive UI (React, Vue, Alpine-only, Inertia.js) or standard Laravel forms without Livewire." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/livewire/4/skill/livewire-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Livewire Development + +## Documentation + +Use `search-docs` for detailed Livewire 4 patterns and documentation. + +## Basic Usage + +### Creating Components + +```bash +# Single-file component (default in v4) +php artisan make:livewire create-post + +# Multi-file component +php artisan make:livewire create-post --mfc + +# Class-based component (v3 style) +php artisan make:livewire create-post --class + +# With namespace +php artisan make:livewire Posts/CreatePost +``` + +### Converting Between Formats + +Use `php artisan livewire:convert create-post` to convert between single-file, multi-file, and class-based formats. + +### Choosing a Component Format + +Before creating a component, check `config/livewire.php` for directory overrides, which change where files are stored. Then, look at existing files in those directories (defaulting to `app/Livewire/` and `resources/views/livewire/`) to match the established convention. + +### Component Format Reference + +| Format | Flag | Class Path | View Path | +|--------|------|------------|-----------| +| Single-file (SFC) | default | — | `resources/views/livewire/create-post.blade.php` (PHP + Blade in one file) | +| Multi-file (MFC) | `--mfc` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| Class-based | `--class` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| View-based | ⚡ prefix | — | `resources/views/livewire/create-post.blade.php` (Blade-only with functional state) | + +Namespaced components map to subdirectories: `make:livewire Posts/CreatePost` creates files at `app/Livewire/Posts/CreatePost.php` and `resources/views/livewire/posts/create-post.blade.php`. + +### Single-File Component Example + + +```php +count++; + } +} +?> + +

+ +
+``` + + +## Livewire 4 Specifics + +### Key Changes From Livewire 3 + +These things changed in Livewire 4, but may not have been updated in this application. Verify this application's setup to ensure you follow existing conventions. + +- Use `Route::livewire()` for full-page components (e.g., `Route::livewire('/posts/create', CreatePost::class)`); config keys renamed: `layout` → `component_layout`, `lazy_placeholder` → `component_placeholder`. +- `wire:model` now ignores child events by default (use `wire:model.deep` for old behavior); `wire:scroll` renamed to `wire:navigate:scroll`. +- Component tags must be properly closed; `wire:transition` now uses View Transitions API (modifiers removed). +- JavaScript: `$wire.$js('name', fn)` → `$wire.$js.name = fn`; legacy commit/request hooks map to the **interceptor** APIs — use **`$wire.intercept()` / `Livewire.interceptAction()`** (action lifecycle), **`$wire.interceptMessage()` / `Livewire.interceptMessage()`** (payload handling), and **`$wire.interceptRequest()` / `Livewire.interceptRequest()`** (HTTP request lifecycle) as appropriate. + +### New Features + +- Component formats: single-file (SFC), multi-file (MFC), view-based components. +- Islands (`@island`) for isolated updates; async actions (`wire:click.async`, `#[Async]`) for parallel execution. +- Deferred/bundled loading: `defer`, `lazy.bundle` for optimized component loading. + +| Feature | Usage | Purpose | +|---------|-------|---------| +| Islands | `@island(name: 'stats')` | Isolated update regions | +| Async | `wire:click.async` or `#[Async]` | Non-blocking actions | +| Deferred | `defer` attribute | Load after page render | +| Bundled | `lazy.bundle` | Load multiple together | + +### New Directives + +- `wire:sort`, `wire:intersect`, `wire:ref`, `.renderless`, `.preserve-scroll` are available for use. +- `data-loading` is added while a request is in flight for elements that dispatch one (for example many `wire:click` / `wire:submit` targets); exact coverage depends on the attribute and your Livewire version — confirm in the docs for your app. + +| Directive | Purpose | +|-----------|---------| +| `wire:sort` | Drag-and-drop sorting | +| `wire:intersect` | Viewport intersection detection | +| `wire:ref` | Element references for JS | +| `.renderless` | Component without rendering | +| `.preserve-scroll` | Preserve scroll position | + +## Best Practices + +- Always use `wire:key` in loops +- Use `wire:loading` for loading states +- Use `wire:model.live` for instant updates (default is debounced) +- Validate and authorize in actions (treat like HTTP requests) + +## Configuration + +- `smart_wire_keys` defaults to `true`; new configs: `component_locations`, `component_namespaces`, `make_command`, `csp_safe`. + +## Alpine & JavaScript + +- `wire:transition` uses browser View Transitions API; `$errors` and `$intercept` magic properties available. +- Non-blocking `wire:poll` and parallel `wire:model.live` updates improve performance. + +## JavaScript integration + +Livewire 4 exposes three interceptor layers (component helpers mirror the `Livewire.*` globals where applicable): + +### Intercept actions + +Run logic around a **named component action** (before/after the action runs): + +```js +$wire.intercept('save', ({ onSuccess, onFailure }) => { + onSuccess(() => console.log('Saved!')); +}); +// or +Livewire.interceptAction(({ action, onSuccess, onFailure }) => { + // filter by action.name, etc. +}); +``` + +### Intercept messages + +Hook the **Livewire message** (payload / snapshot) pipeline: + +```js +Livewire.interceptMessage(({ component, message, onFinish, onSuccess, onError }) => { + onFinish(() => { /* After response, before processing */ }); + onSuccess(({ payload }) => { /* payload.snapshot, payload.effects */ }); + onError(() => { /* Server errors */ }); +}); +``` + +### Intercept requests + +Hook the underlying **HTTP request** (fetch/XHR lifecycle): + +```js +Livewire.interceptRequest(({ request, onResponse, onSuccess, onError, onFailure }) => { + onResponse(({ response }) => { /* When received */ }); + onSuccess(({ response, responseJson }) => { /* Success */ }); + onError(({ response, responseBody, preventDefault }) => { /* 4xx/5xx */ }); + onFailure(({ error }) => { /* Network failures */ }); +}); +``` + +### Component-scoped interceptors + +```blade + +``` + +## Magic Properties + +- `$errors` - Access validation errors from JavaScript +- `$intercept` - Component-scoped action interceptors + + + +## Testing + + +```php +Livewire::test(Counter::class) + ->assertSet('count', 0) + ->call('increment') + ->assertSet('count', 1); +``` + + +## Verification + +1. Browser console: Check for JS errors +2. Network tab: Verify Livewire requests return 200 +3. Ensure `wire:key` on all `@foreach` loops + +## Common Pitfalls + +- Missing `wire:key` in loops → unexpected re-rendering +- Expecting `wire:model` real-time → use `wire:model.live` +- Unclosed component tags → syntax errors in v4 +- Using deprecated config keys or JS hooks +- Including Alpine.js separately (already bundled in Livewire 4) + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.claude/skills/pest-testing/SKILL.md b/.claude/skills/pest-testing/SKILL.md new file mode 100644 index 0000000..df8bb10 --- /dev/null +++ b/.claude/skills/pest-testing/SKILL.md @@ -0,0 +1,170 @@ +--- +name: pest-testing +description: "Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: test()/it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pest/4/skill/pest-testing/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Pest Testing 4 + +## Documentation + +Use `search-docs` for detailed Pest 4 patterns and documentation. + +## Basic Usage + +### Creating Tests + +All tests must be written using Pest. Use `php artisan make:test --pest `. + +### Test Organization + +- Unit/Feature tests: `tests/Feature` and `tests/Unit` directories. +- Browser tests: `tests/Browser/` directory. +- Do NOT remove tests without approval - these are core application code. + +### Basic Test Structure + +Pest supports both `test()` and `it()` functions. Before writing new tests, check existing test files in the same directory to match the project's convention. Use `test()` if existing tests use `test()`, or `it()` if they use `it()`. + + +```php +it('is true', function () { + expect(true)->toBeTrue(); +}); +``` + + +### Running Tests + +- Run minimal tests with filter before finalizing: `php artisan test --compact --filter=testName`. +- Run all tests: `php artisan test --compact`. +- Run file: `php artisan test --compact tests/Feature/ExampleTest.php`. + +## Assertions + +Use specific assertions (`assertSuccessful()`, `assertNotFound()`) instead of `assertStatus()`: + + +```php +it('returns all', function () { + $this->postJson('/api/docs', [])->assertSuccessful(); +}); +``` + + +| Use | Instead of | +|-----|------------| +| `assertSuccessful()` | `assertStatus(200)` | +| `assertNotFound()` | `assertStatus(404)` | +| `assertForbidden()` | `assertStatus(403)` | + +## Mocking + +Import mock function before use: `use function Pest\Laravel\mock;` + +## Datasets + +Use datasets for repetitive tests (validation rules, etc.): + + +```php +it('has emails', function (string $email) { + expect($email)->not->toBeEmpty(); +})->with([ + 'james' => 'james@laravel.com', + 'taylor' => 'taylor@laravel.com', +]); +``` + + +## Pest 4 Features + +| Feature | Purpose | +|---------|---------| +| Browser Testing | Full integration tests in real browsers | +| Smoke Testing | Validate multiple pages quickly | +| Visual Regression | Compare screenshots for visual changes | +| Test Sharding | Parallel CI runs | +| Architecture Testing | Enforce code conventions | + +### Browser Test Example + +Browser tests run in real browsers for full integration testing: + +- Browser tests live in `tests/Browser/`. +- Use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories. +- Use `RefreshDatabase` for clean state per test. +- Interact with page: click, type, scroll, select, submit, drag-and-drop, touch gestures. +- Test on multiple browsers (Chrome, Firefox, Safari) if requested. +- Test on different devices/viewports (iPhone 14 Pro, tablets) if requested. +- Switch color schemes (light/dark mode) when appropriate. +- Take screenshots or pause tests for debugging. + + +```php +it('may reset the password', function () { + Notification::fake(); + + $this->actingAs(User::factory()->create()); + + $page = visit('/sign-in'); + + $page->assertSee('Sign In') + ->assertNoJavaScriptErrors() + ->click('Forgot Password?') + ->fill('email', 'nuno@laravel.com') + ->click('Send Reset Link') + ->assertSee('We have emailed your password reset link!'); + + Notification::assertSent(ResetPassword::class); +}); +``` + + +### Smoke Testing + +Quickly validate multiple pages have no JavaScript errors: + + +```php +$pages = visit(['/', '/about', '/contact']); + +$pages->assertNoJavaScriptErrors()->assertNoConsoleLogs(); +``` + + +### Visual Regression Testing + +Capture and compare screenshots to detect visual changes. + +### Test Sharding + +Split tests across parallel processes for faster CI runs. + +### Architecture Testing + +Pest 4 includes architecture testing (from Pest 3): + + +```php +arch('controllers') + ->expect('App\Http\Controllers') + ->toExtendNothing() + ->toHaveSuffix('Controller'); +``` + + +## Common Pitfalls + +- Not importing `use function Pest\Laravel\mock;` before using mock +- Using `assertStatus(200)` instead of `assertSuccessful()` +- Forgetting datasets for repetitive validation tests +- Deleting tests without approval +- Forgetting `assertNoJavaScriptErrors()` in browser tests + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.claude/skills/phpunit-laravel/SKILL.md b/.claude/skills/phpunit-laravel/SKILL.md new file mode 100644 index 0000000..78f990e --- /dev/null +++ b/.claude/skills/phpunit-laravel/SKILL.md @@ -0,0 +1,26 @@ +--- +name: phpunit-laravel +description: "Use when writing or running PHPUnit tests in a Laravel app that uses PHPUnit (not Pest). Trigger for test classes, assertions, make:test --phpunit, or running the test suite. Covers: creating tests, running filtered tests, and treating tests as core code that must not be removed without approval." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/phpunit/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# PHPUnit + +- This application uses PHPUnit for testing. All tests must be written as PHPUnit classes. Use `php artisan make:test --phpunit ` to create a new test. +- If you see a test using "Pest", convert it to PHPUnit. +- Every time a test has been updated, run that singular test. +- When the tests relating to your feature are passing, ask the user if they would like to also run the entire test suite to make sure everything is still passing. +- Tests should cover all happy paths, failure paths, and edge cases. +- You must not remove any tests or test files from the tests directory without approval. These are not temporary or helper files; these are core to the application. + +## Running Tests +- Run the minimal number of tests, using an appropriate filter, before finalizing. +- To run all tests: `php artisan test --compact`. +- To run all tests in a file: `php artisan test --compact tests/Feature/ExampleTest.php`. +- To filter on a particular test name: `php artisan test --compact --filter=testName` (recommended after making a change to a related file). +**Command prefix:** Use `php artisan` on the host or `./vendor/bin/sail artisan` when using Sail. + diff --git a/.claude/skills/skill-research/SKILL.md b/.claude/skills/skill-research/SKILL.md new file mode 100644 index 0000000..0ebef23 --- /dev/null +++ b/.claude/skills/skill-research/SKILL.md @@ -0,0 +1,30 @@ +--- +name: skill-research +description: Generates structured research notes about an agent skill from a repository URL. Use for skill discovery and documentation. +--- + +You are the **Skill Note Generator** for this repository. + +## Canonical packaging spec + +Before you interpret an upstream skill or structure a research note, **read the canonical skill packaging template** at [`.steering/templates/skill.md`](../../../.steering/templates/skill.md). It is the full spec reference (frontmatter fields, `SKILL.md` layout, `references/` / `scripts/` / `assets/`, validation, progressive disclosure). + +The same content is mirrored to **`.github/skills/skill-research/skill-template.md`**, **`.claude/skills/skill-template/SKILL.md`**, and **`.cursor/skills/skill-template/SKILL.md`**. **Verify steering sync** CI fails if those mirrors drift from `.steering/templates/skill.md`. Edit `.steering/templates/skill.md`, run `python3 scripts/regenerate-ide-mirrors.py`, then commit the mirrors together. + +## GitHub Copilot Agent Skills (steering reference) + +> **Copilot Agent Skills (steering):** see `.steering/github-copilot/Skills.md` in this repository. + +## Research note + +Write to `.steering/skills/__.md`. Use a stable `namespace` from the source (org, group, or disambiguated host+project). +Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. +If normalization would produce an empty value, stop and ask for clarification. Cover at minimum: + +1. **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields. +2. **Skill instructions** — Summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. +3. **Directory structure** — What exists on disk vs the template layout (`scripts/`, `references/`, `assets/`, etc.). +4. **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items apply; follow-ups for the maintainer. +5. **Sources** — URLs and paths you relied on (repository, skill directory, `SKILL.md`, related agents or workflows). + +Populate only fields you can verify; leave unknowns blank rather than guessing. diff --git a/.claude/skills/skill-template/SKILL.md b/.claude/skills/skill-template/SKILL.md new file mode 100644 index 0000000..55ecc50 --- /dev/null +++ b/.claude/skills/skill-template/SKILL.md @@ -0,0 +1,73 @@ +--- +name: # Required: 1-64 chars, lowercase a-z 0-9 -, no leading/trailing/consecutive hyphens. Matches folder name. +description: # Required: 1-1024 chars. Describe what the skill does and when to use it. Include keywords. +license: # Optional: License name or reference. +compatibility: # Optional: Max 500 chars. Environment requirements (e.g., tools, packages, network). +metadata: # Optional: Arbitrary key-value pairs. + author: + version: "1.0" +allowed-tools: # Optional (experimental): Space-delimited pre-approved tools. +--- + +# Skill Instructions + +Write clear, step-by-step instructions for agents to perform the task effectively. + +## Recommended Structure +- Step-by-step instructions +- Examples of inputs and outputs +- Common edge cases +- References to other files: [REFERENCE.md](references/REFERENCE.md), scripts/extract.py + +Keep under 500 lines (~5000 tokens). Use `references/`, `scripts/`, `assets/` for more. + +# Directory Structure +``` +skill-name/ +├── SKILL.md # This file +├── scripts/ # Optional: Executable code (e.g., extract.py) +├── references/ # Optional: Docs (e.g., REFERENCE.md) +├── assets/ # Optional: Templates, images, data +└── ... # Additional files +``` + +# Frontmatter Details + +## name +- 1-64 chars +- Lowercase a-z, 0-9, - +- No start/end/consecutive hyphens +- Matches parent dir + +**Valid:** `pdf-processing`, `data-analysis` + +**Invalid:** `PDF-Processing`, `-pdf`, `pdf--processing` + +## description +**Good:** "Extracts text/tables from PDFs, fills forms, merges files. Use for PDF tasks." +**Poor:** "PDF helper." + +## Other Fields +- **license:** e.g., "Apache-2.0" or "See LICENSE.txt" +- **compatibility:** e.g., "Requires Python 3.10+, internet access" +- **metadata:** Custom key-values +- **allowed-tools:** e.g., "Bash(git:*) Read" + +# Optional Directories +- **scripts/**: Self-contained executables (Python, Bash, JS) +- **references/**: Load on demand (REFERENCE.md, FORMS.md) +- **assets/**: Static files (templates, images) + +# Validation +Use [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref): +``` +skills-ref validate ./my-skill +``` + +# Full Spec Reference +See https://agentskills.io/specification.md for complete details. + +# Progressive Disclosure +1. Metadata (~100 tokens): Loaded for all skills +2. Instructions (<5000 tokens): Loaded on activation +3. Resources: Loaded as needed \ No newline at end of file diff --git a/.claude/skills/sync-agents/SKILL.md b/.claude/skills/sync-agents/SKILL.md new file mode 100644 index 0000000..f7c0a5c --- /dev/null +++ b/.claude/skills/sync-agents/SKILL.md @@ -0,0 +1,36 @@ +--- +name: sync-agents +description: Builds .steering/agents (Obsidian ![[ embeds expanded), writes .github/agents, then .cursor/.claude with Copilot YAML stripped. Does not commit. +license: MIT +compatibility: Same embed rules as verify-steering-sync.yml (Python or manual). +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync agents (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/` changed. +- Merge IDE edits back into `.steering/agents/` first, then replicate. + +## Replication rules + +1. **Build** — In each agent file’s **body** (after opening YAML), expand **`![[path]]`** embed links for **`templates/`** paths by default. For **`research-skill.agent.md`**, also expand **`![[github-copilot/...]]`** embeds only in the **`.cursor/agents/`** output; **`.github`** / **`.claude`** replace those embeds with a pointer to **`.steering/github-copilot/Skills.md`**. With `#Heading`, inline the `## Heading` section only. Leave other `![[...]]` as-is. + +2. **`.github/agents/`** — Write the **built** markdown (same basename). + +3. **`.cursor/agents/`** and **`.claude/agents/`** — Built file, then strip **`tools:`** and **`mcp-servers:`** from the opening frontmatter. + +4. Do **not** touch skills or skill-template paths. + +## Steps + +1. Apply the rules above (match **Verify steering sync** agent step). +2. Run `git diff`. +3. **Do not** commit unless the user asks. + +## CI + +**Verify steering sync** implements the same build + strip logic. diff --git a/.claude/skills/sync-skills/SKILL.md b/.claude/skills/sync-skills/SKILL.md new file mode 100644 index 0000000..370ebca --- /dev/null +++ b/.claude/skills/sync-skills/SKILL.md @@ -0,0 +1,40 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Does not commit. Use after editing .steering or after merging IDE copies back into .steering. +license: MIT +compatibility: Repo with .steering layout; use editor or file copy as needed. +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync skills (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/`, `.steering/skills/*/SKILL.md`, or `.steering/templates/skill.md` changed. +- The user edited `.cursor/`, `.claude/`, or `.github/` copies — merge into `.steering` first, then replicate out. +- Matching **Verify steering sync** CI locally. + +## Replication rules + +1. **Agents** — Build each `.steering/agents/*.md` per **sync-agents** (templates + special **`github-copilot/`** handling for **`research-skill.agent.md`** on **`.cursor`** only), write to `.github/agents/`, then strip Copilot **`tools:`** / **`mcp-servers:`** for `.cursor/agents/` and `.claude/agents/`. +2. **Packaged skills** — For each `.steering/skills//SKILL.md`: build (templates embeds; **`skill-research`**: **`github-copilot/`** embed only under **`.cursor/skills/skill-research/`**) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, `.github/skills//SKILL.md`. Flat `*.md` under `.steering/skills/` (research notes) are **not** mirrored. +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +## Steps + +1. Apply the replication rules above (or run `python3 scripts/regenerate-ide-mirrors.py` from the repo root to match CI exactly). +2. Run `git diff`. If empty, mirrors already matched. +3. **Do not** `git add` / `git commit` / `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** (`.github/workflows/verify-steering-sync.yml`) runs `python3 scripts/regenerate-ide-mirrors.py` and fails on `git diff`. + +## Upstream skills + +If skills were refreshed from an external catalog (see `.steering/skills/SOURCES.md`), run `python3 scripts/sync-boost-ai-skills.py` first, then `python3 scripts/regenerate-ide-mirrors.py`. diff --git a/.claude/skills/tailwindcss-development/SKILL.md b/.claude/skills/tailwindcss-development/SKILL.md new file mode 100644 index 0000000..0463d35 --- /dev/null +++ b/.claude/skills/tailwindcss-development/SKILL.md @@ -0,0 +1,120 @@ +--- +name: tailwindcss-development +description: "Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/tailwindcss/4/skill/tailwindcss-development/SKILL.md`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Tailwind CSS Development + +## Documentation + +Use `search-docs` for detailed Tailwind CSS v4 patterns and documentation. + +## Basic Usage + +- Use Tailwind CSS classes to style HTML. Check and follow existing Tailwind conventions in the project before introducing new patterns. +- Offer to extract repeated patterns into components that match the project's conventions (e.g., Blade, JSX, Vue). +- Consider class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child elements carefully to reduce repetition, and group elements logically. + +## Tailwind CSS v4 Specifics + +- Always use Tailwind CSS v4 and avoid deprecated utilities. +- `corePlugins` is not supported in Tailwind v4. + +### CSS-First Configuration + +In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed: + + +```css +@theme { + --color-brand: oklch(0.72 0.11 178); +} +``` + +### Import Syntax + +In Tailwind v4, import Tailwind with a regular CSS `@import` statement instead of the `@tailwind` directives used in v3: + + +```diff +- @tailwind base; +- @tailwind components; +- @tailwind utilities; ++ @import "tailwindcss"; +``` + +### Replaced Utilities + +Tailwind v4 removed deprecated utilities. Use the replacements shown below. Opacity values remain numeric. + +| Deprecated | Replacement | +|------------|-------------| +| bg-opacity-* | `bg-{color}/{opacity}` (e.g. `bg-sky-500/50`) — opacity is a slash modifier on the color, not `black`-specific | +| text-opacity-* | `text-{color}/{opacity}` (e.g. `text-red-700/75`) | +| border-opacity-* | `border-{color}/{opacity}` | +| divide-opacity-* | `divide-{color}/{opacity}` | +| ring-opacity-* | `ring-{color}/{opacity}` | +| placeholder-opacity-* | `placeholder-{color}/{opacity}` | +| flex-shrink-* | shrink-* | +| flex-grow-* | grow-* | +| overflow-ellipsis | text-ellipsis | +| decoration-slice | box-decoration-slice | +| decoration-clone | box-decoration-clone | + +## Spacing + +Use `gap` utilities instead of margins for spacing between siblings: + + +```html +
+
Item 1
+
Item 2
+
+``` + +## Dark Mode + +If existing pages and components support dark mode, new pages and components must support it the same way, typically using the `dark:` variant: + + +```html +
+ Content adapts to color scheme +
+``` + +## Common Patterns + +### Flexbox Layout + + +```html +
+
Left content
+
Right content
+
+``` + +### Grid Layout + + +```html +
+
Card 1
+
Card 2
+
Card 3
+
+``` + +## Common Pitfalls + +- Using deprecated v3 utilities (bg-opacity-*, flex-shrink-*, etc.) +- Using `@tailwind` directives instead of `@import "tailwindcss"` +- Trying to use `tailwind.config.js` instead of CSS `@theme` directive +- Using margins for spacing between siblings instead of gap utilities +- Forgetting to add dark mode variants when the project uses dark mode diff --git a/.cursor/agents/idea.agent.md b/.cursor/agents/idea.agent.md new file mode 100644 index 0000000..62b58cc --- /dev/null +++ b/.cursor/agents/idea.agent.md @@ -0,0 +1,156 @@ +--- +name: idea +description: "Turns a raw idea into a researched steering note. Usage: /idea " +--- + +You are the **`/idea` agent**. The user supplies a rough idea (or a path to notes). Your job is to **enrich it with live research** using every **skill** and **MCP** that is relevant and available in the session, then **write one markdown file** under `.steering/ideas/` following the repo’s idea shape. + +## Shared principles (from steering templates) + + +These principles reduce common LLM coding mistakes. Apply them to every task. + +### 1. Think Before Coding + +**Don't assume. Don't hide confusion. Surface tradeoffs.** + +- State assumptions explicitly. If uncertain, ask. +- If multiple interpretations exist, present them — don't pick silently. +- If a simpler approach exists, say so. Push back when warranted. +- If something is unclear, stop. Name what's confusing. Ask. + +### 2. Simplicity First + +**Minimum code that solves the problem. Nothing speculative.** + +- No features beyond what was asked. +- No abstractions for single-use code. +- No "flexibility" or "configurability" that wasn't requested. +- No error handling for impossible scenarios. +- If you write 200 lines and it could be 50, rewrite it. + +**The test:** Would a senior engineer say this is overcomplicated? If yes, simplify. + +### 3. Surgical Changes + +**Touch only what you must. Clean up only your own mess.** + +When editing existing code: + +- Don't "improve" adjacent code, comments, or formatting. +- Don't refactor things that aren't broken. +- Match existing style, even if you'd do it differently. +- If you notice unrelated dead code, mention it — don't delete it. + +When your changes create orphans: + +- Remove imports/variables/functions that YOUR changes made unused. +- Don't remove pre-existing dead code unless asked. + +**The test:** Every changed line should trace directly to the user's request. + +### 4. Goal-Driven Execution (TDD) + +**Define success criteria. Loop until verified.** + +Transform tasks into verifiable goals: + +| Instead of... | Transform to... | +|---------------|-----------------| +| "Add validation" | "Write tests for invalid inputs, then make them pass" | +| "Fix the bug" | "Write a test that reproduces it, then make it pass" | +| "Refactor X" | "Ensure tests pass before and after" | + +For Laravel/Pest workflow detail, read `.steering/skills/sync-agents/tdd.md` when it applies. + +For multi-step tasks, state a brief plan: + +```text +1. [Step] → verify: [check] +2. [Step] → verify: [check] +3. [Step] → verify: [check] +``` + +Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification. + + +## Output shape (required) + +Read and follow **`.steering/templates/idea.md`**. The built copy of that template is inlined below for convenience — prefer the file on disk if it differs. + +# Idea note (loose template) + +Use this as a **shape**, not a straitjacket. Skip sections that do not apply; add headings if the idea needs them (e.g. **Competitors**, **Open questions**). + +## Optional YAML frontmatter + +Omit or extend keys as needed. + +```yaml +--- +title: # Short human title +slug: # Filename slug (kebab-case); default derived from title +status: seed # seed | exploring | parked | decided +tags: [] # Free-form labels +created: # YYYY-MM-DD +updated: # YYYY-MM-DD +related: [] # Links to other ideas, ADRs, issues, URLs +--- +``` + +## Suggested body sections + +### Summary + +One short paragraph: what this is, who it is for, why it might matter. + +### Problem / opportunity + +What pain, gap, or possibility does this address? + +### Hypothesis (optional) + +What you believe is true and would need to be validated. + +### Research synthesis + +What you learned from **live** investigation — not training-data guesses. Organize by theme or source type. + +- **Skills** — Which repo or workspace skills you applied and what they contributed. +- **MCPs / tools** — Which servers or tools you used (docs, browser, repo, etc.) and key findings. +- **Implications** — How this changes the idea (feasibility, scope, risks). + +### Options / directions (optional) + +Reasonable forks or implementations, with tradeoffs in a sentence or two each. + +### Risks and unknowns + +What could fail, what you still do not know, what would invalidate the idea. + +### Next steps + +Concrete follow-ups: spikes, owners, decisions, or “do nothing” with rationale. + +### Sources + +URLs, doc paths, issue numbers, and skill paths you relied on. + + +## Research expectations + +1. **Skills** — Discover applicable workspace skills (e.g. under `.cursor/skills/`, `.claude/skills/`, `.github/skills/`, and `.steering/skills/`). **Read** any whose descriptions match the idea (planning, research, domain, docs, browser, etc.) and apply their workflows or constraints where they add signal. Do not claim you used a skill you did not read. + +2. **MCPs** — Use **all configured MCP servers** that can help (documentation search, web/repo fetch, browser, memory, sequential thinking, etc.). Check tool descriptors or server docs when unsure. Prefer **fresh** primary sources over stale model knowledge. + +3. **Synthesis** — The **Research synthesis** section must summarize what you actually did (which skills/MCPs, what you learned). If a source was unreachable, say so under **Risks and unknowns** or **Sources**. + +## File naming and hygiene + +- **Path:** `.steering/ideas/.md` — `slug` from frontmatter or a short kebab-case slug derived from the title (ASCII, lowercase, hyphens). If a file already exists for the same slug, **update that file** (bump `updated` in frontmatter if you use it) unless the user asked for a new file. +- **Single deliverable** — One idea note per invocation. Do not edit unrelated steering files. +- **Completion** — Output **only** the final file path when done. + +## When the idea is unclear + +Ask **one** tight clarification question only if you cannot produce a useful note without it; otherwise proceed and record assumptions under **Risks and unknowns**. diff --git a/.cursor/agents/laravel-package.agent.md b/.cursor/agents/laravel-package.agent.md new file mode 100644 index 0000000..fc816a4 --- /dev/null +++ b/.cursor/agents/laravel-package.agent.md @@ -0,0 +1,46 @@ +--- +name: laravel-package +description: "Researches Laravel packages and generates Obsidian notes. Usage: /laravel-package " +--- + +You are a Laravel package researcher. For `/laravel-package `: + +## Core Principles + +**Think Before Acting** — Parse the vendor/package slug first. If it is ambiguous or malformed, stop and ask. + +**Simplicity First** — Populate only fields you can verify from sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at the correct path with all resolvable fields filled in. + +## Steps + +1. Parse `` (e.g., `spatie/laravel-markdown-response`). +2. Research — fetch fresh data from each source below. Do not rely on cached knowledge. +3. Generate the note from `.steering/templates/laravel-package.md` (YAML + body, excluding the Field-to-Source Mapping section — that section is agent reference only). Use the **Field-to-Source Mapping** section inlined below (same content as `## Field-to-Source Mapping` in that template). +4. Write to `.steering/laravel-packages/__.md`. +5. Leverage repo Memories for consistent formatting patterns. + +## Field-to-Source Mapping + + +Resolve every frontmatter field before writing the file. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist (`packagist.org/packages//.json` → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent) | +| `stars` | GitHub MCP → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format as `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` date (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page (`packagist.org/packages///stats`) → "Last 30 days" | +| `announce_date` | Laravel News article publication date (fetch the `laravel_news_url`) | +| `laravel_news_url` | Search `laravel-news.com ` and verify the URL resolves | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave a field blank if the data genuinely does not exist after checking its source. + + +Output ONLY the file path on completion. diff --git a/.cursor/agents/research-mcp.agent.md b/.cursor/agents/research-mcp.agent.md new file mode 100644 index 0000000..d19d153 --- /dev/null +++ b/.cursor/agents/research-mcp.agent.md @@ -0,0 +1,90 @@ +--- +name: research-mcp +description: "Researches a Model Context Protocol (MCP) server from a URL and generates a structured research note. Usage: /research-mcp " +--- + +You are an MCP (Model Context Protocol) server researcher. For `/research-mcp `: + +## Core Principles + +**Think Before Acting** — Parse the URL fully before doing any research. If the URL is ambiguous or does not clearly point to an MCP server, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/mcps/__.md` with all resolvable fields filled in. + +## Steps + +1. Parse the URL to extract: + - `owner` — GitHub org/user or publisher (e.g., `modelcontextprotocol`) + - `name` — repository or package name (e.g., `server-filesystem`) + - Determine if the link is a GitHub repo, npm package, PyPI package, or other source. + - Normalize `owner` and `name` to file-safe slugs: lowercase ASCII `a-z0-9-` only; reject `/`, `\`, and `..`. If either slug is empty after normalization, stop and ask for clarification. + +2. Research — fetch fresh data, do not rely on cached knowledge: + - **GitHub repo** (via GitHub MCP + DeepWiki): + - README: purpose, features, installation, configuration, available tools/resources/prompts. + - `package.json` / `pyproject.toml` / equivalent: version, dependencies, entry point. + - Stars, forks, open issues, last release. + - Any example configs (`.vscode/mcp.json`, Claude Desktop config snippets). + - **npm / PyPI / registry** (via search): package name, version, weekly downloads. + - **Official MCP docs** (search `modelcontextprotocol.io` or `spec.modelcontextprotocol.io`): any mention of this server in official docs or the server catalog. + +3. Generate a research note using the structure below. + +4. Write to `.steering/mcps/__.md` using the normalized slugs only. + +5. Leverage repo Memories for consistent formatting patterns. + +## Output Template + +```markdown +--- +name: +owner: +url: +type: +transport: +language: +version: +stars: +last_updated: +tags: [, ] +--- + +# + +> + +## What It Does + +<2-4 sentences on purpose and use cases> + +## Tools / Resources / Prompts + +| Name | Type | Description | +|------|------|-------------| +| ... | tool/resource/prompt | ... | + +## Installation + + + +## Configuration + + + +## Authentication / Environment Variables + +| Variable | Required | Description | +|----------|----------|-------------| +| ... | yes/no | ... | + +## Notes + + +``` + +Output ONLY the file path on completion. diff --git a/.cursor/agents/research-skill.agent.md b/.cursor/agents/research-skill.agent.md new file mode 100644 index 0000000..e785e5b --- /dev/null +++ b/.cursor/agents/research-skill.agent.md @@ -0,0 +1,112 @@ +--- +name: research-skill +description: "Researches an agent skill published in a git repository from a web URL and writes a structured research note. Usage: /research-skill " +--- + +You are a **skill packaging researcher**. For `/research-skill `: + +## Core Principles + +**Think Before Acting** — Parse the URL and confirm it points at a directory that plausibly contains a skill (typically a `SKILL.md` and optional `references/`, `scripts/`, `assets/`). If not, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one research note file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/skills/__.md` with all resolvable fields filled in. Use a stable `namespace` derived from the host and project (e.g. org, group, or `host__org` if needed for uniqueness). Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. If normalization would produce an empty value, stop and ask for clarification. + +## Repo template (required) + +Before researching the remote skill, **read the local skill-template spec** in this workspace: `.steering/templates/skill.md` (canonical), or the same content at `.github/skills/skill-research/skill-template.md`, `.claude/skills/skill-template/SKILL.md`, or `.cursor/skills/skill-template/SKILL.md`. Use its vocabulary and rules when you interpret the upstream skill and when you write the research note. + +## GitHub Copilot Agent Skills (steering reference) + +# Copilot Agent Skills + +Agent skills modify Copilot's behavior for specific tasks via folders with `SKILL.md` (YAML frontmatter + instructions) + optional scripts/resources. + +**Works with**: Copilot cloud agent, GitHub Copilot CLI, VS Code agent mode. + +## Purpose vs Custom Instructions +- **Skills**: Detailed, task-specific (e.g., debugging workflows). Loaded when relevant via description matching. +- **Custom Instructions**: Repo-wide general rules (coding standards). + +## Creating/Adding Skills + +1. Create folder: + - **Project**: `.github/skills/{skill-name}/` (repo-specific) + - **Personal**: `~/.copilot/skills/{skill-name}/` (global) + +2. Add `SKILL.md` with YAML frontmatter: + ```yaml + --- + name: github-actions-failure-debugging + description: Guide for debugging failing GitHub Actions workflows. Use this when asked to debug failing GitHub Actions workflows. + --- + + You are a testing specialist focused on improving code quality... + ``` + +3. **Optional**: Add scripts/resources in folder—Copilot auto-discovers and references them. + +### Example: GitHub Actions Debugging +```text +.github/skills/github-actions-failure-debugging/ +├── SKILL.md +└── debug-workflow.sh # Script Copilot can run +``` + +### Running Scripts +- Copilot discovers files in skill dir. +- Reference in instructions: "Run `./debug-workflow.sh` to analyze logs." +- **Security**: Scripts must be explicitly allowed; Copilot prompts before execution. + +## How Copilot Uses Skills +1. Matches prompt to skill `description`. +2. Injects `SKILL.md` + dir files into context. +3. Follows instructions, runs allowed scripts/tools. + +## Example Skills +### GitHub Actions Failure Debugging +```yaml +--- +name: github-actions-failure-debugging +description: Guide for debugging failing GitHub Actions workflows... +--- +You are a GitHub Actions debugging expert... +1. Read workflow YAML... +2. Check logs... +``` + +### SVG to PNG Converter +Include `convert-svg.sh` script; instructions reference it. + +## Resources +- [Official Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-skills) +- [Awesome Copilot Agents](https://github.com/github/awesome-copilot/tree/main/agents) + +## Related Notes +[[GitHub Copilot/Agents]] | [[GitHub Copilot/Memories]] | [[Laravel Packages]] + + +## Steps + +1. **Parse the URL** to determine git host, repository coordinates, branch/ref if present, and the path to the skill directory inside the repo. Examples of shapes (not exhaustive): + - Web UI links to a folder in a repo (blob/tree URLs). + - Raw or API URLs if that is what the user provided — normalize to something you can fetch. +2. **Research with live tools** — Prefer repository/file access where available (e.g. configured repository MCP for supported hosts), plus DeepWiki and Context7 when they add signal. Do not rely on stale training data: + - Read `SKILL.md` in the skill directory for description, capabilities, and instructions. + - List supporting files (templates, configs, assets). + - Read the repository README or docs for ecosystem context when relevant. + - Look for agent definitions or automation that reference this skill. + - Use DeepWiki for a structured repository summary when available. +3. Generate the research note **using the structure implied by `skill-template.md`**, at minimum: + - **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template’s fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields per the template. + - **Skill instructions** — Concise summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. + - **Directory structure** — What exists on disk vs the template’s recommended layout (`scripts/`, `references/`, `assets/`, etc.). + - **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items from the template apply; any follow-ups for the maintainer. + - **Sources** — URLs and paths you relied on. +4. Write to `.steering/skills/__.md` using normalized file-safe slugs only. +5. Align tone and headings with existing notes in `.steering/skills/` when that improves consistency. + +Output ONLY the file path on completion. diff --git a/.cursor/agents/sync-agents.md b/.cursor/agents/sync-agents.md new file mode 100644 index 0000000..7d0203b --- /dev/null +++ b/.cursor/agents/sync-agents.md @@ -0,0 +1,55 @@ +--- +name: sync-agents +description: Replicates .steering/agents into .cursor/agents, .claude/agents, and .github/agents. Strips Copilot-only YAML from Cursor/Claude copies. Use after editing agent files under .steering or after merging IDE agent edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication of **agent definitions only**. + +## Source of truth + +**`.steering/agents/`** holds canonical agent files (including **GitHub Copilot** frontmatter such as `tools:` and `mcp-servers:` when present). + +## `AGENTS.md` at repo root (optional) + +- **Starter template:** `.steering/templates/AGENTS.md` — copy to the **repository root** as **`AGENTS.md`** and customize. It nudges agents to **use skills** (read `SKILL.md` when the task matches a skill’s `description`) and **use MCPs when appropriate** (check tool schemas, prefer fresh docs/data over guessing). Extended **Core Principles** live in `.steering/templates/agent.md` (singular) for optional embeds. +- **Not part of sync output** — This agent (`sync-agents`) does **not** copy `AGENTS.md` into `.cursor/`, `.claude/`, or `.github/`. Only `*.agent.md` files under `.steering/agents/` replicate to the three `agents/` mirrors. Treat root `AGENTS.md` as a separate, human-maintained file (optionally derived from the template once). +- **When the user wants repo-wide agent guidance** — Point them at the template, or create/update root `AGENTS.md` from it if they ask you to. + +## Replication rules + +1. **Build step (Obsidian embeds)** — In each `.steering/agents/*.md` **body** (after the first YAML frontmatter), expand wiki-style embeds allowed for that **output**: + - **Default:** only embeds whose path starts with **`templates/`** (optional **`#Heading`** to inline a single `## Heading` section). Paths resolve under **`.steering/`**. Embed syntax is Obsidian’s wiki link with brackets (see steering README); do not put illustrative embed examples in agent bodies as literal bracket pairs or the CI build will try to expand them. + - **`research-skill.agent.md` only:** embeds whose path starts with **`github-copilot/`** are expanded **only** when writing **`.cursor/agents/research-skill.agent.md`** (full body after that file’s YAML frontmatter, same rules as `templates/`). For **`.github/agents/`** and **`.claude/agents/`**, replace those embeds with a short blockquote pointing at **`.steering/github-copilot/Skills.md`** so mirrors stay small and Obsidian syntax never ships to Copilot Cloud. + - With `#Heading`, include only the `## Heading` section: from that heading until the next `## `, an `---` line on its own, or an `# ` H1. + - With no `#`, inline the file body after its first YAML frontmatter (if any). + - Repeat until no eligible embeds remain (bounded iterations). Missing files or headings become HTML comments in the built output. + +2. **`.github/agents/`** — Write the **built** agent (embeds expanded per rules above), **same basename**. + +3. **`.cursor/agents/`** and **`.claude/agents/`** — **Built** output can differ per file (see `research-skill` above); then remove Copilot-only keys from the YAML **between the first pair of `---` lines**: + - Remove the entire **`tools:`** line (e.g. `tools: ["read", "search", "edit", "browser"]`). + - Remove the entire **`mcp-servers:`** key and **all following lines that belong to that block** (indented lines and blank lines until the next top-level frontmatter key at column 0, or the closing `---`). + + Cursor and Claude agent formats use **`name`** and **`description`** (and the markdown body); they do not use Copilot `tools` / `mcp-servers`. + +4. After stripping, `name` / `description` / body should still form valid frontmatter + body. + +Do **not** change packaged skills (`skills/`), skill templates, or any path outside the three `agents/` directories as part of this task. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching file under `.steering/agents/`** (the canonical file may include Copilot keys for `.github`). Then apply the replication rules above. + +## Steps + +1. Build agents (expand template and `github-copilot/` embeds per rules above), then write `.github/agents/`, then write `.cursor/agents/` and `.claude/agents/` with Copilot YAML stripped. +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** applies the same rules (expand embeds → `.github/agents/`, then strip → `.cursor/agents/` / `.claude/agents/`). If only agents were synced here, CI can still fail until skills and templates match `.steering` too — use the **sync-skills** agent (or replicate those paths yourself) for a full pass. + +## Principles + +Minimal scope: only touch `.steering/agents/` and the three mirrored `agents/` trees. No drive-by edits elsewhere. diff --git a/.cursor/agents/sync-skills.md b/.cursor/agents/sync-skills.md new file mode 100644 index 0000000..e0f90f1 --- /dev/null +++ b/.cursor/agents/sync-skills.md @@ -0,0 +1,39 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Use after editing .steering or after merging IDE edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication. + +## Source of truth + +**`.steering/`** holds canonical **agents** (`agents/`) and **packaged skills** (`skills//SKILL.md`), plus **`templates/skill.md`** (the skill spec). Packaged skills are **byte-identical** across `.cursor`, `.claude`, and `.github` **except** **`skill-research`**: **`![[github-copilot/...]]`** expands only in **`.cursor/skills/skill-research/`**; **`.github`** and **`.claude`** get a pointer to **`.steering/github-copilot/Skills.md`** instead. **Agents:** see **sync-agents** (includes the same **`github-copilot/`** rule for **`research-skill.agent.md`** on **`.cursor`** only). + +## Replication rules + +1. **Agents** — For each file in `.steering/agents/` (skip `README.md` if present): **build** (expand embeds under `templates/` per **sync-agents**), write to `.github/agents/` (same basename). For `.cursor/agents/` and `.claude/agents/`, use that **built** file and strip from the opening frontmatter: the **`tools:`** line, and the **`mcp-servers:`** key plus its nested block (indented lines until the next top-level key at column 0 or the closing `---`). +2. **Packaged skills** — For each directory `.steering/skills//` that contains `SKILL.md`: **build** (expand **`templates/`** embeds in the body for all destinations; for **`skill-research`** also expand **`github-copilot/`** only in **`.cursor/skills/skill-research/`**, else substitute the Copilot Skills pointer) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, and `.github/skills//SKILL.md`. Do **not** mirror flat `*.md` research notes directly under `.steering/skills/` (only subfolders with `SKILL.md`). +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to all of: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +Do **not** mirror `.steering/templates/AGENTS.md` or `.steering/templates/agent.md` to IDE folders. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching path under `.steering`**, then perform the three replication rules above so every mirror is overwritten from `.steering`. + +## Steps + +1. Apply the replication rules (agents, packaged skills, template mirrors). +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** in GitHub Actions runs the same replication logic and **fails** if `git diff` is non-empty afterward. + +## Principles + +Minimal scope: only touch the paths in the replication rules. No drive-by edits elsewhere. diff --git a/.cursor/skills/agentic-programming/SKILL.md b/.cursor/skills/agentic-programming/SKILL.md new file mode 100644 index 0000000..3a64362 --- /dev/null +++ b/.cursor/skills/agentic-programming/SKILL.md @@ -0,0 +1,51 @@ +--- +name: agentic-programming +description: Context about the agentic-programming repo setup, configuration, and required secrets. +--- +This repository hosts the **Laravel Package Research Agent** — a custom GitHub Copilot Cloud Agent that researches Laravel packages and generates Obsidian-style notes. + +## Required Setup + +### 1. Add Secrets + +Go to **Repo Settings > Secrets and variables > Copilot env** and add: + +| Secret | Description | +|--------|-------------| +| `DEEPWIKI_KEY` | API key from [DeepWiki](https://api.deepwiki.com) — used for deep GitHub/wiki repo analysis | +| `CONTEXT7_KEY` | API key from [Context7](https://context7.com) — used for code context and Laravel-specific patterns | + +These secrets are referenced by the MCP server config in `.steering/agents/laravel-package.agent.md` (mirrored under `.github/agents/`). + +### 2. Enable Memory + +Go to **Repo Settings > Copilot > Memory** and enable it. + +Memory allows the agent to learn from past `/laravel-package` runs (e.g., common frontmatter patterns). Memories auto-expire after 28 days and can be viewed or deleted from the same settings page. + +## Agent Usage + +Select the `laravel-package` agent in Copilot Chat and prompt: + +``` +/laravel-package +``` + +Example: + +``` +/laravel-package spatie/laravel-markdown-response +``` + +Output is written to `.steering/laravel-packages/__.md`. + +## Key Files + +| Path | Purpose | +|------|---------| +| `.github/agents/laravel-package.agent.md` | Agent profile and MCP server config | +| `.github/skills/laravel-research/SKILL.md` | Note-generator skill with package template | +| `.github/skills/laravel-research/laravel-package-template.md` | Blank template reference | +| `.steering/laravel-packages/` | Output directory for generated notes | +| `.steering/skills/` | Output directory for skill research notes | +| `.steering/mcps/` | Output directory for MCP server research notes | diff --git a/.cursor/skills/fluxui-free-development/SKILL.md b/.cursor/skills/fluxui-free-development/SKILL.md new file mode 100644 index 0000000..242e40a --- /dev/null +++ b/.cursor/skills/fluxui-free-development/SKILL.md @@ -0,0 +1,90 @@ +--- +name: fluxui-free-development +description: "Use this skill for Flux UI Free development in Livewire applications only. Trigger when working with free components, building or customizing Livewire component UIs, creating forms, modals, and other interactive elements available in the free edition. Covers: free Flux components (buttons, inputs, modals, forms, tables, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for Pro-only Flux components, non-Livewire frameworks, or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-free/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the free edition of Flux UI, which includes all free components and variants but not Pro components. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Free Edition) + +Available: avatar, badge, brand, breadcrumbs, button, callout, checkbox, dropdown, field, heading, icon, input, modal, navbar, otp-input, profile, radio, select, separator, skeleton, switch, text, textarea, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Modals + + +```blade + + Title +

Content

+
+``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Trying to use Pro-only components in the free edition +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.cursor/skills/fluxui-pro-development/SKILL.md b/.cursor/skills/fluxui-pro-development/SKILL.md new file mode 100644 index 0000000..1bd3cfc --- /dev/null +++ b/.cursor/skills/fluxui-pro-development/SKILL.md @@ -0,0 +1,93 @@ +--- +name: fluxui-pro-development +description: "Use this skill for Flux UI development in Livewire applications only. Trigger when working with components, building or customizing Livewire component UIs, creating forms, modals, tables, or other interactive elements. Covers: flux: components (buttons, inputs, modals, forms, tables, date-pickers, kanban, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for non-Livewire frameworks or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-pro/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the Pro version of Flux UI, which includes all free and Pro components and variants. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Pro Edition) + +Available: accordion, autocomplete, avatar, badge, brand, breadcrumbs, button, calendar, callout, card, chart, checkbox, command, composer, context, date-picker, dropdown, editor, field, file-upload, heading, icon, input, kanban, modal, navbar, otp-input, pagination, pillbox, popover, profile, radio, select, separator, skeleton, slider, switch, table, tabs, text, textarea, time-picker, toast, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Tables + + +```blade + + + Column Name + + + Value + + +``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.cursor/skills/laravel-pint/SKILL.md b/.cursor/skills/laravel-pint/SKILL.md new file mode 100644 index 0000000..0be7af4 --- /dev/null +++ b/.cursor/skills/laravel-pint/SKILL.md @@ -0,0 +1,16 @@ +--- +name: laravel-pint +description: "Use when formatting PHP in Laravel projects that use Laravel Pint. Trigger after editing PHP files, before finalizing a change, or when the user mentions Pint or project PHP style. Covers: running pint on dirty files, --format agent when supported, and not using pint --test for autofix workflows." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pint/core.blade.php` (Blade branches merged). Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Pint Code Formatter + +- If you have modified any PHP files, run `./vendor/bin/pint --dirty` before finalizing changes so code matches the project's expected style. +- When your tooling supports Pint's agent formatter, prefer `./vendor/bin/pint --dirty --format agent`. +- Do not rely on `./vendor/bin/pint --test` to fix style; run `./vendor/bin/pint` (with or without `--format agent`) to apply fixes. +- With **Laravel Sail**, prefix: `./vendor/bin/sail bin pint --dirty` (and add `--format agent` when appropriate). diff --git a/.cursor/skills/laravel-research/SKILL.md b/.cursor/skills/laravel-research/SKILL.md new file mode 100644 index 0000000..604f72b --- /dev/null +++ b/.cursor/skills/laravel-research/SKILL.md @@ -0,0 +1,66 @@ +--- +name: laravel-research +description: Generates Laravel package notes from the Laravel package template. Use for structured output. +--- +You are the Laravel Package Note Generator. + +Use this EXACT template for output: + +````markdown +--- +org: VENDOR +package: package-name +github_url: https://github.com/VENDOR/package-name +docs_url: +composer_require: composer require VENDOR/package-name +author: +announce_date: +latest_release: vX.Y.Z (DATE) +release_date: +laravel_news_url: +downloads_30d: +stars: +tags: [laravel, packages, FEATURE1, FEATURE2] +--- + +# PACKAGE_NAME + + + +**DESCRIPTION** + +## Key Features +- FEATURE1 +- FEATURE2 + +## Installation +```bash +composer_require +``` + +## Usage +CODE_EXAMPLE + +## Resources +- [[Laravel Packages]] (related) +```` + +## Field Resolution Rules + +Resolve every frontmatter field before writing. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist JSON (`packagist.org/packages//

.json`) → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent | +| `stars` | GitHub MCP `search_repositories` or `get_repository` → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page → "Last 30 days" installs | +| `announce_date` | Laravel News article publication date | +| `laravel_news_url` | Search `laravel-news.com ` and verify URL | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave blank if the data genuinely does not exist after checking its source. + +Fill placeholders from research. Write to `.steering/laravel-packages/__.md`. diff --git a/.cursor/skills/laravel-sail/SKILL.md b/.cursor/skills/laravel-sail/SKILL.md new file mode 100644 index 0000000..3948cb3 --- /dev/null +++ b/.cursor/skills/laravel-sail/SKILL.md @@ -0,0 +1,21 @@ +--- +name: laravel-sail +description: "Use when the Laravel project runs under Laravel Sail. Trigger for Docker/Sail workflows, running artisan, composer, npm, or PHP only inside containers. Covers: ./vendor/bin/sail up/down, sail artisan, sail composer, sail npm, and never running host PHP/Composer against a Sail-only app by mistake." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/sail/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Sail + +- This project runs inside Laravel Sail's Docker containers. You MUST execute all commands through Sail. +- Start services using `./vendor/bin/sail up -d` and stop them with `./vendor/bin/sail stop`. +- Open the application in the browser by running `./vendor/bin/sail open`. +- Always prefix PHP, Artisan, Composer, and Node commands with `./vendor/bin/sail`. Examples: + - Run Artisan Commands: `./vendor/bin/sail artisan migrate` + - Install Composer packages: `./vendor/bin/sail composer install` + - Execute Node commands: `./vendor/bin/sail npm run dev` + - Execute PHP scripts: `./vendor/bin/sail php [script]` +- View all available Sail commands by running `./vendor/bin/sail` without arguments. diff --git a/.cursor/skills/livewire-development/SKILL.md b/.cursor/skills/livewire-development/SKILL.md new file mode 100644 index 0000000..86e073c --- /dev/null +++ b/.cursor/skills/livewire-development/SKILL.md @@ -0,0 +1,216 @@ +--- +name: livewire-development +description: "Use for any task or question involving Livewire. Activate if user mentions Livewire, wire: directives, or Livewire-specific concepts like wire:model, wire:click, wire:sort, or islands, invoke this skill. Covers building new components, debugging reactivity issues, real-time form validation, drag-and-drop, loading states, migrating from Livewire 3 to 4, converting component formats (SFC/MFC/class-based), and performance optimization. Do not use for non-Livewire reactive UI (React, Vue, Alpine-only, Inertia.js) or standard Laravel forms without Livewire." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/livewire/4/skill/livewire-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Livewire Development + +## Documentation + +Use `search-docs` for detailed Livewire 4 patterns and documentation. + +## Basic Usage + +### Creating Components + +```bash +# Single-file component (default in v4) +php artisan make:livewire create-post + +# Multi-file component +php artisan make:livewire create-post --mfc + +# Class-based component (v3 style) +php artisan make:livewire create-post --class + +# With namespace +php artisan make:livewire Posts/CreatePost +``` + +### Converting Between Formats + +Use `php artisan livewire:convert create-post` to convert between single-file, multi-file, and class-based formats. + +### Choosing a Component Format + +Before creating a component, check `config/livewire.php` for directory overrides, which change where files are stored. Then, look at existing files in those directories (defaulting to `app/Livewire/` and `resources/views/livewire/`) to match the established convention. + +### Component Format Reference + +| Format | Flag | Class Path | View Path | +|--------|------|------------|-----------| +| Single-file (SFC) | default | — | `resources/views/livewire/create-post.blade.php` (PHP + Blade in one file) | +| Multi-file (MFC) | `--mfc` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| Class-based | `--class` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| View-based | ⚡ prefix | — | `resources/views/livewire/create-post.blade.php` (Blade-only with functional state) | + +Namespaced components map to subdirectories: `make:livewire Posts/CreatePost` creates files at `app/Livewire/Posts/CreatePost.php` and `resources/views/livewire/posts/create-post.blade.php`. + +### Single-File Component Example + + +```php +count++; + } +} +?> + +

+ +
+``` + + +## Livewire 4 Specifics + +### Key Changes From Livewire 3 + +These things changed in Livewire 4, but may not have been updated in this application. Verify this application's setup to ensure you follow existing conventions. + +- Use `Route::livewire()` for full-page components (e.g., `Route::livewire('/posts/create', CreatePost::class)`); config keys renamed: `layout` → `component_layout`, `lazy_placeholder` → `component_placeholder`. +- `wire:model` now ignores child events by default (use `wire:model.deep` for old behavior); `wire:scroll` renamed to `wire:navigate:scroll`. +- Component tags must be properly closed; `wire:transition` now uses View Transitions API (modifiers removed). +- JavaScript: `$wire.$js('name', fn)` → `$wire.$js.name = fn`; legacy commit/request hooks map to the **interceptor** APIs — use **`$wire.intercept()` / `Livewire.interceptAction()`** (action lifecycle), **`$wire.interceptMessage()` / `Livewire.interceptMessage()`** (payload handling), and **`$wire.interceptRequest()` / `Livewire.interceptRequest()`** (HTTP request lifecycle) as appropriate. + +### New Features + +- Component formats: single-file (SFC), multi-file (MFC), view-based components. +- Islands (`@island`) for isolated updates; async actions (`wire:click.async`, `#[Async]`) for parallel execution. +- Deferred/bundled loading: `defer`, `lazy.bundle` for optimized component loading. + +| Feature | Usage | Purpose | +|---------|-------|---------| +| Islands | `@island(name: 'stats')` | Isolated update regions | +| Async | `wire:click.async` or `#[Async]` | Non-blocking actions | +| Deferred | `defer` attribute | Load after page render | +| Bundled | `lazy.bundle` | Load multiple together | + +### New Directives + +- `wire:sort`, `wire:intersect`, `wire:ref`, `.renderless`, `.preserve-scroll` are available for use. +- `data-loading` is added while a request is in flight for elements that dispatch one (for example many `wire:click` / `wire:submit` targets); exact coverage depends on the attribute and your Livewire version — confirm in the docs for your app. + +| Directive | Purpose | +|-----------|---------| +| `wire:sort` | Drag-and-drop sorting | +| `wire:intersect` | Viewport intersection detection | +| `wire:ref` | Element references for JS | +| `.renderless` | Component without rendering | +| `.preserve-scroll` | Preserve scroll position | + +## Best Practices + +- Always use `wire:key` in loops +- Use `wire:loading` for loading states +- Use `wire:model.live` for instant updates (default is debounced) +- Validate and authorize in actions (treat like HTTP requests) + +## Configuration + +- `smart_wire_keys` defaults to `true`; new configs: `component_locations`, `component_namespaces`, `make_command`, `csp_safe`. + +## Alpine & JavaScript + +- `wire:transition` uses browser View Transitions API; `$errors` and `$intercept` magic properties available. +- Non-blocking `wire:poll` and parallel `wire:model.live` updates improve performance. + +## JavaScript integration + +Livewire 4 exposes three interceptor layers (component helpers mirror the `Livewire.*` globals where applicable): + +### Intercept actions + +Run logic around a **named component action** (before/after the action runs): + +```js +$wire.intercept('save', ({ onSuccess, onFailure }) => { + onSuccess(() => console.log('Saved!')); +}); +// or +Livewire.interceptAction(({ action, onSuccess, onFailure }) => { + // filter by action.name, etc. +}); +``` + +### Intercept messages + +Hook the **Livewire message** (payload / snapshot) pipeline: + +```js +Livewire.interceptMessage(({ component, message, onFinish, onSuccess, onError }) => { + onFinish(() => { /* After response, before processing */ }); + onSuccess(({ payload }) => { /* payload.snapshot, payload.effects */ }); + onError(() => { /* Server errors */ }); +}); +``` + +### Intercept requests + +Hook the underlying **HTTP request** (fetch/XHR lifecycle): + +```js +Livewire.interceptRequest(({ request, onResponse, onSuccess, onError, onFailure }) => { + onResponse(({ response }) => { /* When received */ }); + onSuccess(({ response, responseJson }) => { /* Success */ }); + onError(({ response, responseBody, preventDefault }) => { /* 4xx/5xx */ }); + onFailure(({ error }) => { /* Network failures */ }); +}); +``` + +### Component-scoped interceptors + +```blade + +``` + +## Magic Properties + +- `$errors` - Access validation errors from JavaScript +- `$intercept` - Component-scoped action interceptors + + + +## Testing + + +```php +Livewire::test(Counter::class) + ->assertSet('count', 0) + ->call('increment') + ->assertSet('count', 1); +``` + + +## Verification + +1. Browser console: Check for JS errors +2. Network tab: Verify Livewire requests return 200 +3. Ensure `wire:key` on all `@foreach` loops + +## Common Pitfalls + +- Missing `wire:key` in loops → unexpected re-rendering +- Expecting `wire:model` real-time → use `wire:model.live` +- Unclosed component tags → syntax errors in v4 +- Using deprecated config keys or JS hooks +- Including Alpine.js separately (already bundled in Livewire 4) + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.cursor/skills/pest-testing/SKILL.md b/.cursor/skills/pest-testing/SKILL.md new file mode 100644 index 0000000..df8bb10 --- /dev/null +++ b/.cursor/skills/pest-testing/SKILL.md @@ -0,0 +1,170 @@ +--- +name: pest-testing +description: "Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: test()/it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pest/4/skill/pest-testing/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Pest Testing 4 + +## Documentation + +Use `search-docs` for detailed Pest 4 patterns and documentation. + +## Basic Usage + +### Creating Tests + +All tests must be written using Pest. Use `php artisan make:test --pest `. + +### Test Organization + +- Unit/Feature tests: `tests/Feature` and `tests/Unit` directories. +- Browser tests: `tests/Browser/` directory. +- Do NOT remove tests without approval - these are core application code. + +### Basic Test Structure + +Pest supports both `test()` and `it()` functions. Before writing new tests, check existing test files in the same directory to match the project's convention. Use `test()` if existing tests use `test()`, or `it()` if they use `it()`. + + +```php +it('is true', function () { + expect(true)->toBeTrue(); +}); +``` + + +### Running Tests + +- Run minimal tests with filter before finalizing: `php artisan test --compact --filter=testName`. +- Run all tests: `php artisan test --compact`. +- Run file: `php artisan test --compact tests/Feature/ExampleTest.php`. + +## Assertions + +Use specific assertions (`assertSuccessful()`, `assertNotFound()`) instead of `assertStatus()`: + + +```php +it('returns all', function () { + $this->postJson('/api/docs', [])->assertSuccessful(); +}); +``` + + +| Use | Instead of | +|-----|------------| +| `assertSuccessful()` | `assertStatus(200)` | +| `assertNotFound()` | `assertStatus(404)` | +| `assertForbidden()` | `assertStatus(403)` | + +## Mocking + +Import mock function before use: `use function Pest\Laravel\mock;` + +## Datasets + +Use datasets for repetitive tests (validation rules, etc.): + + +```php +it('has emails', function (string $email) { + expect($email)->not->toBeEmpty(); +})->with([ + 'james' => 'james@laravel.com', + 'taylor' => 'taylor@laravel.com', +]); +``` + + +## Pest 4 Features + +| Feature | Purpose | +|---------|---------| +| Browser Testing | Full integration tests in real browsers | +| Smoke Testing | Validate multiple pages quickly | +| Visual Regression | Compare screenshots for visual changes | +| Test Sharding | Parallel CI runs | +| Architecture Testing | Enforce code conventions | + +### Browser Test Example + +Browser tests run in real browsers for full integration testing: + +- Browser tests live in `tests/Browser/`. +- Use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories. +- Use `RefreshDatabase` for clean state per test. +- Interact with page: click, type, scroll, select, submit, drag-and-drop, touch gestures. +- Test on multiple browsers (Chrome, Firefox, Safari) if requested. +- Test on different devices/viewports (iPhone 14 Pro, tablets) if requested. +- Switch color schemes (light/dark mode) when appropriate. +- Take screenshots or pause tests for debugging. + + +```php +it('may reset the password', function () { + Notification::fake(); + + $this->actingAs(User::factory()->create()); + + $page = visit('/sign-in'); + + $page->assertSee('Sign In') + ->assertNoJavaScriptErrors() + ->click('Forgot Password?') + ->fill('email', 'nuno@laravel.com') + ->click('Send Reset Link') + ->assertSee('We have emailed your password reset link!'); + + Notification::assertSent(ResetPassword::class); +}); +``` + + +### Smoke Testing + +Quickly validate multiple pages have no JavaScript errors: + + +```php +$pages = visit(['/', '/about', '/contact']); + +$pages->assertNoJavaScriptErrors()->assertNoConsoleLogs(); +``` + + +### Visual Regression Testing + +Capture and compare screenshots to detect visual changes. + +### Test Sharding + +Split tests across parallel processes for faster CI runs. + +### Architecture Testing + +Pest 4 includes architecture testing (from Pest 3): + + +```php +arch('controllers') + ->expect('App\Http\Controllers') + ->toExtendNothing() + ->toHaveSuffix('Controller'); +``` + + +## Common Pitfalls + +- Not importing `use function Pest\Laravel\mock;` before using mock +- Using `assertStatus(200)` instead of `assertSuccessful()` +- Forgetting datasets for repetitive validation tests +- Deleting tests without approval +- Forgetting `assertNoJavaScriptErrors()` in browser tests + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.cursor/skills/phpunit-laravel/SKILL.md b/.cursor/skills/phpunit-laravel/SKILL.md new file mode 100644 index 0000000..78f990e --- /dev/null +++ b/.cursor/skills/phpunit-laravel/SKILL.md @@ -0,0 +1,26 @@ +--- +name: phpunit-laravel +description: "Use when writing or running PHPUnit tests in a Laravel app that uses PHPUnit (not Pest). Trigger for test classes, assertions, make:test --phpunit, or running the test suite. Covers: creating tests, running filtered tests, and treating tests as core code that must not be removed without approval." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/phpunit/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# PHPUnit + +- This application uses PHPUnit for testing. All tests must be written as PHPUnit classes. Use `php artisan make:test --phpunit ` to create a new test. +- If you see a test using "Pest", convert it to PHPUnit. +- Every time a test has been updated, run that singular test. +- When the tests relating to your feature are passing, ask the user if they would like to also run the entire test suite to make sure everything is still passing. +- Tests should cover all happy paths, failure paths, and edge cases. +- You must not remove any tests or test files from the tests directory without approval. These are not temporary or helper files; these are core to the application. + +## Running Tests +- Run the minimal number of tests, using an appropriate filter, before finalizing. +- To run all tests: `php artisan test --compact`. +- To run all tests in a file: `php artisan test --compact tests/Feature/ExampleTest.php`. +- To filter on a particular test name: `php artisan test --compact --filter=testName` (recommended after making a change to a related file). +**Command prefix:** Use `php artisan` on the host or `./vendor/bin/sail artisan` when using Sail. + diff --git a/.cursor/skills/skill-research/SKILL.md b/.cursor/skills/skill-research/SKILL.md new file mode 100644 index 0000000..908ea84 --- /dev/null +++ b/.cursor/skills/skill-research/SKILL.md @@ -0,0 +1,96 @@ +--- +name: skill-research +description: Generates structured research notes about an agent skill from a repository URL. Use for skill discovery and documentation. +--- + +You are the **Skill Note Generator** for this repository. + +## Canonical packaging spec + +Before you interpret an upstream skill or structure a research note, **read the canonical skill packaging template** at [`.steering/templates/skill.md`](../../../.steering/templates/skill.md). It is the full spec reference (frontmatter fields, `SKILL.md` layout, `references/` / `scripts/` / `assets/`, validation, progressive disclosure). + +The same content is mirrored to **`.github/skills/skill-research/skill-template.md`**, **`.claude/skills/skill-template/SKILL.md`**, and **`.cursor/skills/skill-template/SKILL.md`**. **Verify steering sync** CI fails if those mirrors drift from `.steering/templates/skill.md`. Edit `.steering/templates/skill.md`, run `python3 scripts/regenerate-ide-mirrors.py`, then commit the mirrors together. + +## GitHub Copilot Agent Skills (steering reference) + +# Copilot Agent Skills + +Agent skills modify Copilot's behavior for specific tasks via folders with `SKILL.md` (YAML frontmatter + instructions) + optional scripts/resources. + +**Works with**: Copilot cloud agent, GitHub Copilot CLI, VS Code agent mode. + +## Purpose vs Custom Instructions +- **Skills**: Detailed, task-specific (e.g., debugging workflows). Loaded when relevant via description matching. +- **Custom Instructions**: Repo-wide general rules (coding standards). + +## Creating/Adding Skills + +1. Create folder: + - **Project**: `.github/skills/{skill-name}/` (repo-specific) + - **Personal**: `~/.copilot/skills/{skill-name}/` (global) + +2. Add `SKILL.md` with YAML frontmatter: + ```yaml + --- + name: github-actions-failure-debugging + description: Guide for debugging failing GitHub Actions workflows. Use this when asked to debug failing GitHub Actions workflows. + --- + + You are a testing specialist focused on improving code quality... + ``` + +3. **Optional**: Add scripts/resources in folder—Copilot auto-discovers and references them. + +### Example: GitHub Actions Debugging +```text +.github/skills/github-actions-failure-debugging/ +├── SKILL.md +└── debug-workflow.sh # Script Copilot can run +``` + +### Running Scripts +- Copilot discovers files in skill dir. +- Reference in instructions: "Run `./debug-workflow.sh` to analyze logs." +- **Security**: Scripts must be explicitly allowed; Copilot prompts before execution. + +## How Copilot Uses Skills +1. Matches prompt to skill `description`. +2. Injects `SKILL.md` + dir files into context. +3. Follows instructions, runs allowed scripts/tools. + +## Example Skills +### GitHub Actions Failure Debugging +```yaml +--- +name: github-actions-failure-debugging +description: Guide for debugging failing GitHub Actions workflows... +--- +You are a GitHub Actions debugging expert... +1. Read workflow YAML... +2. Check logs... +``` + +### SVG to PNG Converter +Include `convert-svg.sh` script; instructions reference it. + +## Resources +- [Official Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-skills) +- [Awesome Copilot Agents](https://github.com/github/awesome-copilot/tree/main/agents) + +## Related Notes +[[GitHub Copilot/Agents]] | [[GitHub Copilot/Memories]] | [[Laravel Packages]] + + +## Research note + +Write to `.steering/skills/__.md`. Use a stable `namespace` from the source (org, group, or disambiguated host+project). +Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. +If normalization would produce an empty value, stop and ask for clarification. Cover at minimum: + +1. **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields. +2. **Skill instructions** — Summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. +3. **Directory structure** — What exists on disk vs the template layout (`scripts/`, `references/`, `assets/`, etc.). +4. **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items apply; follow-ups for the maintainer. +5. **Sources** — URLs and paths you relied on (repository, skill directory, `SKILL.md`, related agents or workflows). + +Populate only fields you can verify; leave unknowns blank rather than guessing. diff --git a/.cursor/skills/skill-template/SKILL.md b/.cursor/skills/skill-template/SKILL.md new file mode 100644 index 0000000..55ecc50 --- /dev/null +++ b/.cursor/skills/skill-template/SKILL.md @@ -0,0 +1,73 @@ +--- +name: # Required: 1-64 chars, lowercase a-z 0-9 -, no leading/trailing/consecutive hyphens. Matches folder name. +description: # Required: 1-1024 chars. Describe what the skill does and when to use it. Include keywords. +license: # Optional: License name or reference. +compatibility: # Optional: Max 500 chars. Environment requirements (e.g., tools, packages, network). +metadata: # Optional: Arbitrary key-value pairs. + author: + version: "1.0" +allowed-tools: # Optional (experimental): Space-delimited pre-approved tools. +--- + +# Skill Instructions + +Write clear, step-by-step instructions for agents to perform the task effectively. + +## Recommended Structure +- Step-by-step instructions +- Examples of inputs and outputs +- Common edge cases +- References to other files: [REFERENCE.md](references/REFERENCE.md), scripts/extract.py + +Keep under 500 lines (~5000 tokens). Use `references/`, `scripts/`, `assets/` for more. + +# Directory Structure +``` +skill-name/ +├── SKILL.md # This file +├── scripts/ # Optional: Executable code (e.g., extract.py) +├── references/ # Optional: Docs (e.g., REFERENCE.md) +├── assets/ # Optional: Templates, images, data +└── ... # Additional files +``` + +# Frontmatter Details + +## name +- 1-64 chars +- Lowercase a-z, 0-9, - +- No start/end/consecutive hyphens +- Matches parent dir + +**Valid:** `pdf-processing`, `data-analysis` + +**Invalid:** `PDF-Processing`, `-pdf`, `pdf--processing` + +## description +**Good:** "Extracts text/tables from PDFs, fills forms, merges files. Use for PDF tasks." +**Poor:** "PDF helper." + +## Other Fields +- **license:** e.g., "Apache-2.0" or "See LICENSE.txt" +- **compatibility:** e.g., "Requires Python 3.10+, internet access" +- **metadata:** Custom key-values +- **allowed-tools:** e.g., "Bash(git:*) Read" + +# Optional Directories +- **scripts/**: Self-contained executables (Python, Bash, JS) +- **references/**: Load on demand (REFERENCE.md, FORMS.md) +- **assets/**: Static files (templates, images) + +# Validation +Use [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref): +``` +skills-ref validate ./my-skill +``` + +# Full Spec Reference +See https://agentskills.io/specification.md for complete details. + +# Progressive Disclosure +1. Metadata (~100 tokens): Loaded for all skills +2. Instructions (<5000 tokens): Loaded on activation +3. Resources: Loaded as needed \ No newline at end of file diff --git a/.cursor/skills/sync-agents/SKILL.md b/.cursor/skills/sync-agents/SKILL.md new file mode 100644 index 0000000..f7c0a5c --- /dev/null +++ b/.cursor/skills/sync-agents/SKILL.md @@ -0,0 +1,36 @@ +--- +name: sync-agents +description: Builds .steering/agents (Obsidian ![[ embeds expanded), writes .github/agents, then .cursor/.claude with Copilot YAML stripped. Does not commit. +license: MIT +compatibility: Same embed rules as verify-steering-sync.yml (Python or manual). +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync agents (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/` changed. +- Merge IDE edits back into `.steering/agents/` first, then replicate. + +## Replication rules + +1. **Build** — In each agent file’s **body** (after opening YAML), expand **`![[path]]`** embed links for **`templates/`** paths by default. For **`research-skill.agent.md`**, also expand **`![[github-copilot/...]]`** embeds only in the **`.cursor/agents/`** output; **`.github`** / **`.claude`** replace those embeds with a pointer to **`.steering/github-copilot/Skills.md`**. With `#Heading`, inline the `## Heading` section only. Leave other `![[...]]` as-is. + +2. **`.github/agents/`** — Write the **built** markdown (same basename). + +3. **`.cursor/agents/`** and **`.claude/agents/`** — Built file, then strip **`tools:`** and **`mcp-servers:`** from the opening frontmatter. + +4. Do **not** touch skills or skill-template paths. + +## Steps + +1. Apply the rules above (match **Verify steering sync** agent step). +2. Run `git diff`. +3. **Do not** commit unless the user asks. + +## CI + +**Verify steering sync** implements the same build + strip logic. diff --git a/.cursor/skills/sync-skills/SKILL.md b/.cursor/skills/sync-skills/SKILL.md new file mode 100644 index 0000000..370ebca --- /dev/null +++ b/.cursor/skills/sync-skills/SKILL.md @@ -0,0 +1,40 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Does not commit. Use after editing .steering or after merging IDE copies back into .steering. +license: MIT +compatibility: Repo with .steering layout; use editor or file copy as needed. +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync skills (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/`, `.steering/skills/*/SKILL.md`, or `.steering/templates/skill.md` changed. +- The user edited `.cursor/`, `.claude/`, or `.github/` copies — merge into `.steering` first, then replicate out. +- Matching **Verify steering sync** CI locally. + +## Replication rules + +1. **Agents** — Build each `.steering/agents/*.md` per **sync-agents** (templates + special **`github-copilot/`** handling for **`research-skill.agent.md`** on **`.cursor`** only), write to `.github/agents/`, then strip Copilot **`tools:`** / **`mcp-servers:`** for `.cursor/agents/` and `.claude/agents/`. +2. **Packaged skills** — For each `.steering/skills//SKILL.md`: build (templates embeds; **`skill-research`**: **`github-copilot/`** embed only under **`.cursor/skills/skill-research/`**) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, `.github/skills//SKILL.md`. Flat `*.md` under `.steering/skills/` (research notes) are **not** mirrored. +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +## Steps + +1. Apply the replication rules above (or run `python3 scripts/regenerate-ide-mirrors.py` from the repo root to match CI exactly). +2. Run `git diff`. If empty, mirrors already matched. +3. **Do not** `git add` / `git commit` / `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** (`.github/workflows/verify-steering-sync.yml`) runs `python3 scripts/regenerate-ide-mirrors.py` and fails on `git diff`. + +## Upstream skills + +If skills were refreshed from an external catalog (see `.steering/skills/SOURCES.md`), run `python3 scripts/sync-boost-ai-skills.py` first, then `python3 scripts/regenerate-ide-mirrors.py`. diff --git a/.cursor/skills/tailwindcss-development/SKILL.md b/.cursor/skills/tailwindcss-development/SKILL.md new file mode 100644 index 0000000..0463d35 --- /dev/null +++ b/.cursor/skills/tailwindcss-development/SKILL.md @@ -0,0 +1,120 @@ +--- +name: tailwindcss-development +description: "Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/tailwindcss/4/skill/tailwindcss-development/SKILL.md`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Tailwind CSS Development + +## Documentation + +Use `search-docs` for detailed Tailwind CSS v4 patterns and documentation. + +## Basic Usage + +- Use Tailwind CSS classes to style HTML. Check and follow existing Tailwind conventions in the project before introducing new patterns. +- Offer to extract repeated patterns into components that match the project's conventions (e.g., Blade, JSX, Vue). +- Consider class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child elements carefully to reduce repetition, and group elements logically. + +## Tailwind CSS v4 Specifics + +- Always use Tailwind CSS v4 and avoid deprecated utilities. +- `corePlugins` is not supported in Tailwind v4. + +### CSS-First Configuration + +In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed: + + +```css +@theme { + --color-brand: oklch(0.72 0.11 178); +} +``` + +### Import Syntax + +In Tailwind v4, import Tailwind with a regular CSS `@import` statement instead of the `@tailwind` directives used in v3: + + +```diff +- @tailwind base; +- @tailwind components; +- @tailwind utilities; ++ @import "tailwindcss"; +``` + +### Replaced Utilities + +Tailwind v4 removed deprecated utilities. Use the replacements shown below. Opacity values remain numeric. + +| Deprecated | Replacement | +|------------|-------------| +| bg-opacity-* | `bg-{color}/{opacity}` (e.g. `bg-sky-500/50`) — opacity is a slash modifier on the color, not `black`-specific | +| text-opacity-* | `text-{color}/{opacity}` (e.g. `text-red-700/75`) | +| border-opacity-* | `border-{color}/{opacity}` | +| divide-opacity-* | `divide-{color}/{opacity}` | +| ring-opacity-* | `ring-{color}/{opacity}` | +| placeholder-opacity-* | `placeholder-{color}/{opacity}` | +| flex-shrink-* | shrink-* | +| flex-grow-* | grow-* | +| overflow-ellipsis | text-ellipsis | +| decoration-slice | box-decoration-slice | +| decoration-clone | box-decoration-clone | + +## Spacing + +Use `gap` utilities instead of margins for spacing between siblings: + + +```html +
+
Item 1
+
Item 2
+
+``` + +## Dark Mode + +If existing pages and components support dark mode, new pages and components must support it the same way, typically using the `dark:` variant: + + +```html +
+ Content adapts to color scheme +
+``` + +## Common Patterns + +### Flexbox Layout + + +```html +
+
Left content
+
Right content
+
+``` + +### Grid Layout + + +```html +
+
Card 1
+
Card 2
+
Card 3
+
+``` + +## Common Pitfalls + +- Using deprecated v3 utilities (bg-opacity-*, flex-shrink-*, etc.) +- Using `@tailwind` directives instead of `@import "tailwindcss"` +- Trying to use `tailwind.config.js` instead of CSS `@theme` directive +- Using margins for spacing between siblings instead of gap utilities +- Forgetting to add dark mode variants when the project uses dark mode diff --git a/.github/agents/idea.agent.md b/.github/agents/idea.agent.md new file mode 100644 index 0000000..bb0979a --- /dev/null +++ b/.github/agents/idea.agent.md @@ -0,0 +1,157 @@ +--- +name: idea +description: "Turns a raw idea into a researched steering note. Usage: /idea " +tools: ["read", "search", "edit", "browser"] +--- + +You are the **`/idea` agent**. The user supplies a rough idea (or a path to notes). Your job is to **enrich it with live research** using every **skill** and **MCP** that is relevant and available in the session, then **write one markdown file** under `.steering/ideas/` following the repo’s idea shape. + +## Shared principles (from steering templates) + + +These principles reduce common LLM coding mistakes. Apply them to every task. + +### 1. Think Before Coding + +**Don't assume. Don't hide confusion. Surface tradeoffs.** + +- State assumptions explicitly. If uncertain, ask. +- If multiple interpretations exist, present them — don't pick silently. +- If a simpler approach exists, say so. Push back when warranted. +- If something is unclear, stop. Name what's confusing. Ask. + +### 2. Simplicity First + +**Minimum code that solves the problem. Nothing speculative.** + +- No features beyond what was asked. +- No abstractions for single-use code. +- No "flexibility" or "configurability" that wasn't requested. +- No error handling for impossible scenarios. +- If you write 200 lines and it could be 50, rewrite it. + +**The test:** Would a senior engineer say this is overcomplicated? If yes, simplify. + +### 3. Surgical Changes + +**Touch only what you must. Clean up only your own mess.** + +When editing existing code: + +- Don't "improve" adjacent code, comments, or formatting. +- Don't refactor things that aren't broken. +- Match existing style, even if you'd do it differently. +- If you notice unrelated dead code, mention it — don't delete it. + +When your changes create orphans: + +- Remove imports/variables/functions that YOUR changes made unused. +- Don't remove pre-existing dead code unless asked. + +**The test:** Every changed line should trace directly to the user's request. + +### 4. Goal-Driven Execution (TDD) + +**Define success criteria. Loop until verified.** + +Transform tasks into verifiable goals: + +| Instead of... | Transform to... | +|---------------|-----------------| +| "Add validation" | "Write tests for invalid inputs, then make them pass" | +| "Fix the bug" | "Write a test that reproduces it, then make it pass" | +| "Refactor X" | "Ensure tests pass before and after" | + +For Laravel/Pest workflow detail, read `.steering/skills/sync-agents/tdd.md` when it applies. + +For multi-step tasks, state a brief plan: + +```text +1. [Step] → verify: [check] +2. [Step] → verify: [check] +3. [Step] → verify: [check] +``` + +Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification. + + +## Output shape (required) + +Read and follow **`.steering/templates/idea.md`**. The built copy of that template is inlined below for convenience — prefer the file on disk if it differs. + +# Idea note (loose template) + +Use this as a **shape**, not a straitjacket. Skip sections that do not apply; add headings if the idea needs them (e.g. **Competitors**, **Open questions**). + +## Optional YAML frontmatter + +Omit or extend keys as needed. + +```yaml +--- +title: # Short human title +slug: # Filename slug (kebab-case); default derived from title +status: seed # seed | exploring | parked | decided +tags: [] # Free-form labels +created: # YYYY-MM-DD +updated: # YYYY-MM-DD +related: [] # Links to other ideas, ADRs, issues, URLs +--- +``` + +## Suggested body sections + +### Summary + +One short paragraph: what this is, who it is for, why it might matter. + +### Problem / opportunity + +What pain, gap, or possibility does this address? + +### Hypothesis (optional) + +What you believe is true and would need to be validated. + +### Research synthesis + +What you learned from **live** investigation — not training-data guesses. Organize by theme or source type. + +- **Skills** — Which repo or workspace skills you applied and what they contributed. +- **MCPs / tools** — Which servers or tools you used (docs, browser, repo, etc.) and key findings. +- **Implications** — How this changes the idea (feasibility, scope, risks). + +### Options / directions (optional) + +Reasonable forks or implementations, with tradeoffs in a sentence or two each. + +### Risks and unknowns + +What could fail, what you still do not know, what would invalidate the idea. + +### Next steps + +Concrete follow-ups: spikes, owners, decisions, or “do nothing” with rationale. + +### Sources + +URLs, doc paths, issue numbers, and skill paths you relied on. + + +## Research expectations + +1. **Skills** — Discover applicable workspace skills (e.g. under `.cursor/skills/`, `.claude/skills/`, `.github/skills/`, and `.steering/skills/`). **Read** any whose descriptions match the idea (planning, research, domain, docs, browser, etc.) and apply their workflows or constraints where they add signal. Do not claim you used a skill you did not read. + +2. **MCPs** — Use **all configured MCP servers** that can help (documentation search, web/repo fetch, browser, memory, sequential thinking, etc.). Check tool descriptors or server docs when unsure. Prefer **fresh** primary sources over stale model knowledge. + +3. **Synthesis** — The **Research synthesis** section must summarize what you actually did (which skills/MCPs, what you learned). If a source was unreachable, say so under **Risks and unknowns** or **Sources**. + +## File naming and hygiene + +- **Path:** `.steering/ideas/.md` — `slug` from frontmatter or a short kebab-case slug derived from the title (ASCII, lowercase, hyphens). If a file already exists for the same slug, **update that file** (bump `updated` in frontmatter if you use it) unless the user asked for a new file. +- **Single deliverable** — One idea note per invocation. Do not edit unrelated steering files. +- **Completion** — Output **only** the final file path when done. + +## When the idea is unclear + +Ask **one** tight clarification question only if you cannot produce a useful note without it; otherwise proceed and record assumptions under **Risks and unknowns**. diff --git a/.github/agents/laravel-package.agent.md b/.github/agents/laravel-package.agent.md index 9abe3e4..7f66e46 100644 --- a/.github/agents/laravel-package.agent.md +++ b/.github/agents/laravel-package.agent.md @@ -1,62 +1,47 @@ ---- -name: laravel-package -description: "Researches Laravel packages and generates Obsidian notes. Usage: /laravel-package " -tools: ["read", "search", "edit", "browser"] -mcp-servers: - deepwiki: - type: sse - url: https://api.deepwiki.com/sse - tools: ["*"] - headers: - Authorization: "Bearer $DEEPWIKI_KEY" - context7: - command: npx - args: ["@context7/mcp-server"] - tools: ["*"] - env: - CONTEXT7_API_KEY: $CONTEXT7_KEY - github: - type: sse - url: https://mcp.github.com/sse - tools: ["*"] ---- - -You are a Laravel package researcher. For `/laravel-package `: - -## Core Principles - -**Think Before Acting** — Parse the vendor/package slug first. If it is ambiguous or malformed, stop and ask. - -**Simplicity First** — Populate only fields you can verify from sources. Leave fields blank rather than guessing. - -**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. - -**Goal-Driven** — Success = a valid `.md` file at the correct path with all resolvable fields filled in. - -## Steps - -1. Parse `` (e.g., `spatie/laravel-markdown-response`). -2. Research — fetch fresh data from each source below. Do not rely on cached knowledge. -3. Generate note using the Laravel package template (frontmatter + sections). -4. Write to `.steering/laravel-packages/__.md`. -5. Leverage repo Memories for consistent formatting patterns. - -## Field-to-Source Mapping - -Resolve every frontmatter field before writing the file. Use these sources: - -| Field | Source | -|-------|--------| -| `author` | Packagist (`packagist.org/packages//.json` → `authors[0].name`) | -| `stars` | GitHub MCP → `stargazers_count` | -| `latest_release` | GitHub MCP `get_latest_release` → format as `vX.Y.Z (YYYY-MM-DD)` | -| `release_date` | GitHub MCP `get_latest_release` → `published_at` date (YYYY-MM-DD) | -| `downloads_30d` | Packagist stats page (`packagist.org/packages///stats`) → "Last 30 days" | -| `announce_date` | Laravel News article publication date (fetch the `laravel_news_url`) | -| `laravel_news_url` | Search `laravel-news.com ` and verify the URL resolves | -| `docs_url` | GitHub repo `homepage` field or README docs link | -| `tags` | GitHub repo `topics` + relevant feature keywords | - -**All fields must be attempted.** Only leave a field blank if the data genuinely does not exist after checking its source. - -Output ONLY the file path on completion. +--- +name: laravel-package +description: "Researches Laravel packages and generates Obsidian notes. Usage: /laravel-package " +tools: ["read", "search", "edit", "browser"] +--- + +You are a Laravel package researcher. For `/laravel-package `: + +## Core Principles + +**Think Before Acting** — Parse the vendor/package slug first. If it is ambiguous or malformed, stop and ask. + +**Simplicity First** — Populate only fields you can verify from sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at the correct path with all resolvable fields filled in. + +## Steps + +1. Parse `` (e.g., `spatie/laravel-markdown-response`). +2. Research — fetch fresh data from each source below. Do not rely on cached knowledge. +3. Generate the note from `.steering/templates/laravel-package.md` (YAML + body, excluding the Field-to-Source Mapping section — that section is agent reference only). Use the **Field-to-Source Mapping** section inlined below (same content as `## Field-to-Source Mapping` in that template). +4. Write to `.steering/laravel-packages/__.md`. +5. Leverage repo Memories for consistent formatting patterns. + +## Field-to-Source Mapping + + +Resolve every frontmatter field before writing the file. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist (`packagist.org/packages//.json` → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent) | +| `stars` | GitHub MCP → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format as `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` date (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page (`packagist.org/packages///stats`) → "Last 30 days" | +| `announce_date` | Laravel News article publication date (fetch the `laravel_news_url`) | +| `laravel_news_url` | Search `laravel-news.com ` and verify the URL resolves | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave a field blank if the data genuinely does not exist after checking its source. + + +Output ONLY the file path on completion. diff --git a/.github/agents/mcp-research.agent.md b/.github/agents/research-mcp.agent.md similarity index 78% rename from .github/agents/mcp-research.agent.md rename to .github/agents/research-mcp.agent.md index 7f22b29..802a314 100644 --- a/.github/agents/mcp-research.agent.md +++ b/.github/agents/research-mcp.agent.md @@ -1,107 +1,91 @@ ---- -name: mcp-research -description: "Researches a Model Context Protocol (MCP) server from a URL and generates a structured research note. Usage: /mcp-research " -tools: ["read", "search", "edit", "browser"] -mcp-servers: - deepwiki: - type: sse - url: https://api.deepwiki.com/sse - tools: ["*"] - headers: - Authorization: "Bearer $DEEPWIKI_KEY" - context7: - command: npx - args: ["@context7/mcp-server"] - tools: ["*"] - env: - CONTEXT7_API_KEY: $CONTEXT7_KEY - github: - type: sse - url: https://mcp.github.com/sse - tools: ["*"] ---- - -You are an MCP (Model Context Protocol) server researcher. For `/mcp-research `: - -## Core Principles - -**Think Before Acting** — Parse the URL fully before doing any research. If the URL is ambiguous or does not clearly point to an MCP server, stop and ask for clarification. - -**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. - -**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. - -**Goal-Driven** — Success = a valid `.md` file at `mcps/__.md` with all resolvable fields filled in. - -## Steps - -1. Parse the URL to extract: - - `owner` — GitHub org/user or publisher (e.g., `modelcontextprotocol`) - - `name` — repository or package name (e.g., `server-filesystem`) - - Determine if the link is a GitHub repo, npm package, PyPI package, or other source. - -2. Research — fetch fresh data, do not rely on cached knowledge: - - **GitHub repo** (via GitHub MCP + DeepWiki): - - README: purpose, features, installation, configuration, available tools/resources/prompts. - - `package.json` / `pyproject.toml` / equivalent: version, dependencies, entry point. - - Stars, forks, open issues, last release. - - Any example configs (`.vscode/mcp.json`, Claude Desktop config snippets). - - **npm / PyPI / registry** (via search): package name, version, weekly downloads. - - **Official MCP docs** (search `modelcontextprotocol.io` or `spec.modelcontextprotocol.io`): any mention of this server in official docs or the server catalog. - -3. Generate a research note using the structure below. - -4. Write to `mcps/__.md`. - -5. Leverage repo Memories for consistent formatting patterns. - -## Output Template - -```markdown ---- -name: -owner: -url: -type: -transport: -language: -version: -stars: -last_updated: -tags: [, ] ---- - -# - -> - -## What It Does - -<2-4 sentences on purpose and use cases> - -## Tools / Resources / Prompts - -| Name | Type | Description | -|------|------|-------------| -| ... | tool/resource/prompt | ... | - -## Installation - - - -## Configuration - - - -## Authentication / Environment Variables - -| Variable | Required | Description | -|----------|----------|-------------| -| ... | yes/no | ... | - -## Notes - - -``` - -Output ONLY the file path on completion. +--- +name: research-mcp +description: "Researches a Model Context Protocol (MCP) server from a URL and generates a structured research note. Usage: /research-mcp " +tools: ["read", "search", "edit", "browser"] +--- + +You are an MCP (Model Context Protocol) server researcher. For `/research-mcp `: + +## Core Principles + +**Think Before Acting** — Parse the URL fully before doing any research. If the URL is ambiguous or does not clearly point to an MCP server, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/mcps/__.md` with all resolvable fields filled in. + +## Steps + +1. Parse the URL to extract: + - `owner` — GitHub org/user or publisher (e.g., `modelcontextprotocol`) + - `name` — repository or package name (e.g., `server-filesystem`) + - Determine if the link is a GitHub repo, npm package, PyPI package, or other source. + - Normalize `owner` and `name` to file-safe slugs: lowercase ASCII `a-z0-9-` only; reject `/`, `\`, and `..`. If either slug is empty after normalization, stop and ask for clarification. + +2. Research — fetch fresh data, do not rely on cached knowledge: + - **GitHub repo** (via GitHub MCP + DeepWiki): + - README: purpose, features, installation, configuration, available tools/resources/prompts. + - `package.json` / `pyproject.toml` / equivalent: version, dependencies, entry point. + - Stars, forks, open issues, last release. + - Any example configs (`.vscode/mcp.json`, Claude Desktop config snippets). + - **npm / PyPI / registry** (via search): package name, version, weekly downloads. + - **Official MCP docs** (search `modelcontextprotocol.io` or `spec.modelcontextprotocol.io`): any mention of this server in official docs or the server catalog. + +3. Generate a research note using the structure below. + +4. Write to `.steering/mcps/__.md` using the normalized slugs only. + +5. Leverage repo Memories for consistent formatting patterns. + +## Output Template + +```markdown +--- +name: +owner: +url: +type: +transport: +language: +version: +stars: +last_updated: +tags: [, ] +--- + +# + +> + +## What It Does + +<2-4 sentences on purpose and use cases> + +## Tools / Resources / Prompts + +| Name | Type | Description | +|------|------|-------------| +| ... | tool/resource/prompt | ... | + +## Installation + + + +## Configuration + + + +## Authentication / Environment Variables + +| Variable | Required | Description | +|----------|----------|-------------| +| ... | yes/no | ... | + +## Notes + + +``` + +Output ONLY the file path on completion. diff --git a/.github/agents/research-skill.agent.md b/.github/agents/research-skill.agent.md new file mode 100644 index 0000000..99da602 --- /dev/null +++ b/.github/agents/research-skill.agent.md @@ -0,0 +1,47 @@ +--- +name: research-skill +description: "Researches an agent skill published in a git repository from a web URL and writes a structured research note. Usage: /research-skill " +tools: ["read", "search", "edit", "browser"] +--- + +You are a **skill packaging researcher**. For `/research-skill `: + +## Core Principles + +**Think Before Acting** — Parse the URL and confirm it points at a directory that plausibly contains a skill (typically a `SKILL.md` and optional `references/`, `scripts/`, `assets/`). If not, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one research note file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/skills/__.md` with all resolvable fields filled in. Use a stable `namespace` derived from the host and project (e.g. org, group, or `host__org` if needed for uniqueness). Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. If normalization would produce an empty value, stop and ask for clarification. + +## Repo template (required) + +Before researching the remote skill, **read the local skill-template spec** in this workspace: `.steering/templates/skill.md` (canonical), or the same content at `.github/skills/skill-research/skill-template.md`, `.claude/skills/skill-template/SKILL.md`, or `.cursor/skills/skill-template/SKILL.md`. Use its vocabulary and rules when you interpret the upstream skill and when you write the research note. + +## GitHub Copilot Agent Skills (steering reference) + +> **Copilot Agent Skills (steering):** see `.steering/github-copilot/Skills.md` in this repository. + +## Steps + +1. **Parse the URL** to determine git host, repository coordinates, branch/ref if present, and the path to the skill directory inside the repo. Examples of shapes (not exhaustive): + - Web UI links to a folder in a repo (blob/tree URLs). + - Raw or API URLs if that is what the user provided — normalize to something you can fetch. +2. **Research with live tools** — Prefer repository/file access where available (e.g. configured repository MCP for supported hosts), plus DeepWiki and Context7 when they add signal. Do not rely on stale training data: + - Read `SKILL.md` in the skill directory for description, capabilities, and instructions. + - List supporting files (templates, configs, assets). + - Read the repository README or docs for ecosystem context when relevant. + - Look for agent definitions or automation that reference this skill. + - Use DeepWiki for a structured repository summary when available. +3. Generate the research note **using the structure implied by `skill-template.md`**, at minimum: + - **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template’s fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields per the template. + - **Skill instructions** — Concise summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. + - **Directory structure** — What exists on disk vs the template’s recommended layout (`scripts/`, `references/`, `assets/`, etc.). + - **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items from the template apply; any follow-ups for the maintainer. + - **Sources** — URLs and paths you relied on. +4. Write to `.steering/skills/__.md` using normalized file-safe slugs only. +5. Align tone and headings with existing notes in `.steering/skills/` when that improves consistency. + +Output ONLY the file path on completion. diff --git a/.github/agents/skill-research.agent.md b/.github/agents/skill-research.agent.md deleted file mode 100644 index 6f1bc16..0000000 --- a/.github/agents/skill-research.agent.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -name: skill-research -description: "Researches a GitHub Copilot skill from a GitHub URL and generates a structured research note. Usage: /skill-research " -tools: ["read", "search", "edit", "browser"] -mcp-servers: - deepwiki: - type: sse - url: https://api.deepwiki.com/sse - tools: ["*"] - headers: - Authorization: "Bearer $DEEPWIKI_KEY" - context7: - command: npx - args: ["@context7/mcp-server"] - tools: ["*"] - env: - CONTEXT7_API_KEY: $CONTEXT7_KEY - github: - type: sse - url: https://mcp.github.com/sse - tools: ["*"] ---- - -You are a GitHub Copilot skill researcher. For `/skill-research `: - -## Core Principles - -**Think Before Acting** — Parse the URL fully before doing any research. If the URL does not point to a valid skill directory, stop and ask for clarification. - -**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. - -**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. - -**Goal-Driven** — Success = a valid `.md` file at `.steering/skills/__.md` with all resolvable fields filled in. - -## Repo template (required) - -Before researching the remote skill, **read `.github/skills/skill-research/skill-template.md`** in this workspace. It matches `templates/skill.md` (GitHub Actions copies the latter into the skill folder). Use its vocabulary and rules when you interpret the upstream skill and when you write the research note. - -## Steps - -1. Parse the GitHub URL (e.g., `https://github.com/microsoft/skills/blob/main/.github/skills/copilot-sdk`) to extract: - - `owner` — GitHub org/user (e.g., `microsoft`) - - `repo` — repository name (e.g., `skills`) - - `skill-name` — the final path segment (e.g., `copilot-sdk`) - - `path` — full path within the repo to the skill directory -2. Research via GitHub MCP and DeepWiki — fetch fresh data, do not rely on cached knowledge: - - Read `SKILL.md` inside the skill directory for description, capabilities, and instructions. - - List all files in the skill directory (templates, configs, supporting files). - - Read the parent repo's README for context on the skill ecosystem. - - Search for any `.agent.md` or workflow files that reference this skill. - - Use DeepWiki to get a deep summary of the repository if available. -3. Generate the research note **using the structure implied by `skill-template.md`**, at minimum: - - **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template’s fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields per the template. - - **Skill instructions** — Concise summary of what the upstream body tells an agent to do; call out steps, examples, and edge cases if present. - - **Directory structure** — What exists on disk vs the template’s recommended layout (`scripts/`, `references/`, `assets/`, etc.). - - **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items from the template apply; any follow-ups for the maintainer. - - **Sources** — URLs and files you relied on. -4. Write to `.steering/skills/__.md`. -5. Leverage repo Memories for consistent formatting patterns. - -Output ONLY the file path on completion. diff --git a/.github/agents/sync-agents.md b/.github/agents/sync-agents.md new file mode 100644 index 0000000..7d0203b --- /dev/null +++ b/.github/agents/sync-agents.md @@ -0,0 +1,55 @@ +--- +name: sync-agents +description: Replicates .steering/agents into .cursor/agents, .claude/agents, and .github/agents. Strips Copilot-only YAML from Cursor/Claude copies. Use after editing agent files under .steering or after merging IDE agent edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication of **agent definitions only**. + +## Source of truth + +**`.steering/agents/`** holds canonical agent files (including **GitHub Copilot** frontmatter such as `tools:` and `mcp-servers:` when present). + +## `AGENTS.md` at repo root (optional) + +- **Starter template:** `.steering/templates/AGENTS.md` — copy to the **repository root** as **`AGENTS.md`** and customize. It nudges agents to **use skills** (read `SKILL.md` when the task matches a skill’s `description`) and **use MCPs when appropriate** (check tool schemas, prefer fresh docs/data over guessing). Extended **Core Principles** live in `.steering/templates/agent.md` (singular) for optional embeds. +- **Not part of sync output** — This agent (`sync-agents`) does **not** copy `AGENTS.md` into `.cursor/`, `.claude/`, or `.github/`. Only `*.agent.md` files under `.steering/agents/` replicate to the three `agents/` mirrors. Treat root `AGENTS.md` as a separate, human-maintained file (optionally derived from the template once). +- **When the user wants repo-wide agent guidance** — Point them at the template, or create/update root `AGENTS.md` from it if they ask you to. + +## Replication rules + +1. **Build step (Obsidian embeds)** — In each `.steering/agents/*.md` **body** (after the first YAML frontmatter), expand wiki-style embeds allowed for that **output**: + - **Default:** only embeds whose path starts with **`templates/`** (optional **`#Heading`** to inline a single `## Heading` section). Paths resolve under **`.steering/`**. Embed syntax is Obsidian’s wiki link with brackets (see steering README); do not put illustrative embed examples in agent bodies as literal bracket pairs or the CI build will try to expand them. + - **`research-skill.agent.md` only:** embeds whose path starts with **`github-copilot/`** are expanded **only** when writing **`.cursor/agents/research-skill.agent.md`** (full body after that file’s YAML frontmatter, same rules as `templates/`). For **`.github/agents/`** and **`.claude/agents/`**, replace those embeds with a short blockquote pointing at **`.steering/github-copilot/Skills.md`** so mirrors stay small and Obsidian syntax never ships to Copilot Cloud. + - With `#Heading`, include only the `## Heading` section: from that heading until the next `## `, an `---` line on its own, or an `# ` H1. + - With no `#`, inline the file body after its first YAML frontmatter (if any). + - Repeat until no eligible embeds remain (bounded iterations). Missing files or headings become HTML comments in the built output. + +2. **`.github/agents/`** — Write the **built** agent (embeds expanded per rules above), **same basename**. + +3. **`.cursor/agents/`** and **`.claude/agents/`** — **Built** output can differ per file (see `research-skill` above); then remove Copilot-only keys from the YAML **between the first pair of `---` lines**: + - Remove the entire **`tools:`** line (e.g. `tools: ["read", "search", "edit", "browser"]`). + - Remove the entire **`mcp-servers:`** key and **all following lines that belong to that block** (indented lines and blank lines until the next top-level frontmatter key at column 0, or the closing `---`). + + Cursor and Claude agent formats use **`name`** and **`description`** (and the markdown body); they do not use Copilot `tools` / `mcp-servers`. + +4. After stripping, `name` / `description` / body should still form valid frontmatter + body. + +Do **not** change packaged skills (`skills/`), skill templates, or any path outside the three `agents/` directories as part of this task. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching file under `.steering/agents/`** (the canonical file may include Copilot keys for `.github`). Then apply the replication rules above. + +## Steps + +1. Build agents (expand template and `github-copilot/` embeds per rules above), then write `.github/agents/`, then write `.cursor/agents/` and `.claude/agents/` with Copilot YAML stripped. +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** applies the same rules (expand embeds → `.github/agents/`, then strip → `.cursor/agents/` / `.claude/agents/`). If only agents were synced here, CI can still fail until skills and templates match `.steering` too — use the **sync-skills** agent (or replicate those paths yourself) for a full pass. + +## Principles + +Minimal scope: only touch `.steering/agents/` and the three mirrored `agents/` trees. No drive-by edits elsewhere. diff --git a/.github/agents/sync-skills.md b/.github/agents/sync-skills.md new file mode 100644 index 0000000..e0f90f1 --- /dev/null +++ b/.github/agents/sync-skills.md @@ -0,0 +1,39 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Use after editing .steering or after merging IDE edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication. + +## Source of truth + +**`.steering/`** holds canonical **agents** (`agents/`) and **packaged skills** (`skills//SKILL.md`), plus **`templates/skill.md`** (the skill spec). Packaged skills are **byte-identical** across `.cursor`, `.claude`, and `.github` **except** **`skill-research`**: **`![[github-copilot/...]]`** expands only in **`.cursor/skills/skill-research/`**; **`.github`** and **`.claude`** get a pointer to **`.steering/github-copilot/Skills.md`** instead. **Agents:** see **sync-agents** (includes the same **`github-copilot/`** rule for **`research-skill.agent.md`** on **`.cursor`** only). + +## Replication rules + +1. **Agents** — For each file in `.steering/agents/` (skip `README.md` if present): **build** (expand embeds under `templates/` per **sync-agents**), write to `.github/agents/` (same basename). For `.cursor/agents/` and `.claude/agents/`, use that **built** file and strip from the opening frontmatter: the **`tools:`** line, and the **`mcp-servers:`** key plus its nested block (indented lines until the next top-level key at column 0 or the closing `---`). +2. **Packaged skills** — For each directory `.steering/skills//` that contains `SKILL.md`: **build** (expand **`templates/`** embeds in the body for all destinations; for **`skill-research`** also expand **`github-copilot/`** only in **`.cursor/skills/skill-research/`**, else substitute the Copilot Skills pointer) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, and `.github/skills//SKILL.md`. Do **not** mirror flat `*.md` research notes directly under `.steering/skills/` (only subfolders with `SKILL.md`). +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to all of: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +Do **not** mirror `.steering/templates/AGENTS.md` or `.steering/templates/agent.md` to IDE folders. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching path under `.steering`**, then perform the three replication rules above so every mirror is overwritten from `.steering`. + +## Steps + +1. Apply the replication rules (agents, packaged skills, template mirrors). +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** in GitHub Actions runs the same replication logic and **fails** if `git diff` is non-empty afterward. + +## Principles + +Minimal scope: only touch the paths in the replication rules. No drive-by edits elsewhere. diff --git a/.github/skills/agentic-programming/SKILL.md b/.github/skills/agentic-programming/SKILL.md index 604e423..3a64362 100644 --- a/.github/skills/agentic-programming/SKILL.md +++ b/.github/skills/agentic-programming/SKILL.md @@ -1,51 +1,51 @@ ---- -name: agentic-programming -description: Context about the agentic-programming repo setup, configuration, and required secrets. ---- -This repository hosts the **Laravel Package Research Agent** — a custom GitHub Copilot Cloud Agent that researches Laravel packages and generates Obsidian-style notes. - -## Required Setup - -### 1. Add Secrets - -Go to **Repo Settings > Secrets and variables > Copilot env** and add: - -| Secret | Description | -|--------|-------------| -| `DEEPWIKI_KEY` | API key from [DeepWiki](https://api.deepwiki.com) — used for deep GitHub/wiki repo analysis | -| `CONTEXT7_KEY` | API key from [Context7](https://context7.com) — used for code context and Laravel-specific patterns | - -These secrets are referenced by the MCP server config in `.github/agents/laravel-package.agent.md`. - -### 2. Enable Memory - -Go to **Repo Settings > Copilot > Memory** and enable it. - -Memory allows the agent to learn from past `/laravel-package` runs (e.g., common frontmatter patterns). Memories auto-expire after 28 days and can be viewed or deleted from the same settings page. - -## Agent Usage - -Select the `laravel-package` agent in Copilot Chat and prompt: - -``` -/laravel-package -``` - -Example: - -``` -/laravel-package spatie/laravel-markdown-response -``` - -Output is written to `.steering/laravel-packages/__.md`. - -## Key Files - -| Path | Purpose | -|------|---------| -| `.github/agents/laravel-package.agent.md` | Agent profile and MCP server config | -| `.github/skills/laravel-research/SKILL.md` | Note-generator skill with package template | -| `.github/skills/laravel-research/laravel-package-template.md` | Blank template reference | -| `.steering/laravel-packages/` | Output directory for generated notes | -| `.steering/skills/` | Output directory for skill research notes | -| `mcps/` | Output directory for MCP server research notes | +--- +name: agentic-programming +description: Context about the agentic-programming repo setup, configuration, and required secrets. +--- +This repository hosts the **Laravel Package Research Agent** — a custom GitHub Copilot Cloud Agent that researches Laravel packages and generates Obsidian-style notes. + +## Required Setup + +### 1. Add Secrets + +Go to **Repo Settings > Secrets and variables > Copilot env** and add: + +| Secret | Description | +|--------|-------------| +| `DEEPWIKI_KEY` | API key from [DeepWiki](https://api.deepwiki.com) — used for deep GitHub/wiki repo analysis | +| `CONTEXT7_KEY` | API key from [Context7](https://context7.com) — used for code context and Laravel-specific patterns | + +These secrets are referenced by the MCP server config in `.steering/agents/laravel-package.agent.md` (mirrored under `.github/agents/`). + +### 2. Enable Memory + +Go to **Repo Settings > Copilot > Memory** and enable it. + +Memory allows the agent to learn from past `/laravel-package` runs (e.g., common frontmatter patterns). Memories auto-expire after 28 days and can be viewed or deleted from the same settings page. + +## Agent Usage + +Select the `laravel-package` agent in Copilot Chat and prompt: + +``` +/laravel-package +``` + +Example: + +``` +/laravel-package spatie/laravel-markdown-response +``` + +Output is written to `.steering/laravel-packages/__.md`. + +## Key Files + +| Path | Purpose | +|------|---------| +| `.github/agents/laravel-package.agent.md` | Agent profile and MCP server config | +| `.github/skills/laravel-research/SKILL.md` | Note-generator skill with package template | +| `.github/skills/laravel-research/laravel-package-template.md` | Blank template reference | +| `.steering/laravel-packages/` | Output directory for generated notes | +| `.steering/skills/` | Output directory for skill research notes | +| `.steering/mcps/` | Output directory for MCP server research notes | diff --git a/.github/skills/fluxui-free-development/SKILL.md b/.github/skills/fluxui-free-development/SKILL.md new file mode 100644 index 0000000..242e40a --- /dev/null +++ b/.github/skills/fluxui-free-development/SKILL.md @@ -0,0 +1,90 @@ +--- +name: fluxui-free-development +description: "Use this skill for Flux UI Free development in Livewire applications only. Trigger when working with free components, building or customizing Livewire component UIs, creating forms, modals, and other interactive elements available in the free edition. Covers: free Flux components (buttons, inputs, modals, forms, tables, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for Pro-only Flux components, non-Livewire frameworks, or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-free/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the free edition of Flux UI, which includes all free components and variants but not Pro components. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Free Edition) + +Available: avatar, badge, brand, breadcrumbs, button, callout, checkbox, dropdown, field, heading, icon, input, modal, navbar, otp-input, profile, radio, select, separator, skeleton, switch, text, textarea, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Modals + + +```blade + + Title +

Content

+
+``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Trying to use Pro-only components in the free edition +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.github/skills/fluxui-pro-development/SKILL.md b/.github/skills/fluxui-pro-development/SKILL.md new file mode 100644 index 0000000..1bd3cfc --- /dev/null +++ b/.github/skills/fluxui-pro-development/SKILL.md @@ -0,0 +1,93 @@ +--- +name: fluxui-pro-development +description: "Use this skill for Flux UI development in Livewire applications only. Trigger when working with components, building or customizing Livewire component UIs, creating forms, modals, tables, or other interactive elements. Covers: flux: components (buttons, inputs, modals, forms, tables, date-pickers, kanban, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for non-Livewire frameworks or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-pro/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the Pro version of Flux UI, which includes all free and Pro components and variants. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Pro Edition) + +Available: accordion, autocomplete, avatar, badge, brand, breadcrumbs, button, calendar, callout, card, chart, checkbox, command, composer, context, date-picker, dropdown, editor, field, file-upload, heading, icon, input, kanban, modal, navbar, otp-input, pagination, pillbox, popover, profile, radio, select, separator, skeleton, slider, switch, table, tabs, text, textarea, time-picker, toast, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Tables + + +```blade + + + Column Name + + + Value + + +``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.github/skills/laravel-pint/SKILL.md b/.github/skills/laravel-pint/SKILL.md new file mode 100644 index 0000000..0be7af4 --- /dev/null +++ b/.github/skills/laravel-pint/SKILL.md @@ -0,0 +1,16 @@ +--- +name: laravel-pint +description: "Use when formatting PHP in Laravel projects that use Laravel Pint. Trigger after editing PHP files, before finalizing a change, or when the user mentions Pint or project PHP style. Covers: running pint on dirty files, --format agent when supported, and not using pint --test for autofix workflows." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pint/core.blade.php` (Blade branches merged). Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Pint Code Formatter + +- If you have modified any PHP files, run `./vendor/bin/pint --dirty` before finalizing changes so code matches the project's expected style. +- When your tooling supports Pint's agent formatter, prefer `./vendor/bin/pint --dirty --format agent`. +- Do not rely on `./vendor/bin/pint --test` to fix style; run `./vendor/bin/pint` (with or without `--format agent`) to apply fixes. +- With **Laravel Sail**, prefix: `./vendor/bin/sail bin pint --dirty` (and add `--format agent` when appropriate). diff --git a/.github/skills/laravel-research/SKILL.md b/.github/skills/laravel-research/SKILL.md index 2b57789..604f72b 100644 --- a/.github/skills/laravel-research/SKILL.md +++ b/.github/skills/laravel-research/SKILL.md @@ -1,65 +1,66 @@ ---- -name: laravel-research -description: Generates Laravel package notes from the Laravel package template. Use for structured output. ---- -You are the Laravel Package Note Generator. - -Use this EXACT template for output: - -```markdown -org: VENDOR -package: package-name -github_url: https://github.com/VENDOR/package-name -docs_url: -composer_require: composer require VENDOR/package-name -author: -announce_date: -latest_release: vX.Y.Z (DATE) -release_date: -laravel_news_url: -downloads_30d: -stars: -tags: [laravel, packages, FEATURE1, FEATURE2] ---- - -# PACKAGE_NAME - - - -**DESCRIPTION** - -## Key Features -- FEATURE1 -- FEATURE2 - -## Installation -```bash -composer_require -``` - -## Usage -CODE_EXAMPLE - -## Resources -- [[Laravel Packages]] (related) -``` - -## Field Resolution Rules - -Resolve every frontmatter field before writing. Use these sources: - -| Field | Source | -|-------|--------| -| `author` | Packagist JSON (`packagist.org/packages//

.json`) → `versions.dev-main.authors[0].name` | -| `stars` | GitHub MCP `search_repositories` or `get_repository` → `stargazers_count` | -| `latest_release` | GitHub MCP `get_latest_release` → format `vX.Y.Z (YYYY-MM-DD)` | -| `release_date` | GitHub MCP `get_latest_release` → `published_at` (YYYY-MM-DD) | -| `downloads_30d` | Packagist stats page → "Last 30 days" installs | -| `announce_date` | Laravel News article publication date | -| `laravel_news_url` | Search `laravel-news.com ` and verify URL | -| `docs_url` | GitHub repo `homepage` field or README docs link | -| `tags` | GitHub repo `topics` + relevant feature keywords | - -**All fields must be attempted.** Only leave blank if the data genuinely does not exist after checking its source. - -Fill placeholders from research. Write to `.steering/laravel-packages/__.md`. +--- +name: laravel-research +description: Generates Laravel package notes from the Laravel package template. Use for structured output. +--- +You are the Laravel Package Note Generator. + +Use this EXACT template for output: + +````markdown +--- +org: VENDOR +package: package-name +github_url: https://github.com/VENDOR/package-name +docs_url: +composer_require: composer require VENDOR/package-name +author: +announce_date: +latest_release: vX.Y.Z (DATE) +release_date: +laravel_news_url: +downloads_30d: +stars: +tags: [laravel, packages, FEATURE1, FEATURE2] +--- + +# PACKAGE_NAME + + + +**DESCRIPTION** + +## Key Features +- FEATURE1 +- FEATURE2 + +## Installation +```bash +composer_require +``` + +## Usage +CODE_EXAMPLE + +## Resources +- [[Laravel Packages]] (related) +```` + +## Field Resolution Rules + +Resolve every frontmatter field before writing. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist JSON (`packagist.org/packages//

.json`) → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent | +| `stars` | GitHub MCP `search_repositories` or `get_repository` → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page → "Last 30 days" installs | +| `announce_date` | Laravel News article publication date | +| `laravel_news_url` | Search `laravel-news.com ` and verify URL | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave blank if the data genuinely does not exist after checking its source. + +Fill placeholders from research. Write to `.steering/laravel-packages/__.md`. diff --git a/.github/skills/laravel-research/laravel-package-template.md b/.github/skills/laravel-research/laravel-package-template.md deleted file mode 100644 index d9f027d..0000000 --- a/.github/skills/laravel-research/laravel-package-template.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: PACKAGE_NAME -org: VENDOR -package: package-name -github_url: https://github.com/VENDOR/package-name -docs_url: -composer_require: composer require VENDOR/package-name -author: -announce_date: -latest_release: -release_date: -laravel_news_url: -downloads_30d: -stars: -tags: [laravel, packages, FEATURE1, FEATURE2] ---- - -# PACKAGE_NAME - - - -**DESCRIPTION** - -## Key Features -- FEATURE1 -- FEATURE2 - -## Installation - -## Usage - -## Resources -- [GitHub](github_url) -- [[Laravel Packages]] diff --git a/.github/skills/laravel-sail/SKILL.md b/.github/skills/laravel-sail/SKILL.md new file mode 100644 index 0000000..3948cb3 --- /dev/null +++ b/.github/skills/laravel-sail/SKILL.md @@ -0,0 +1,21 @@ +--- +name: laravel-sail +description: "Use when the Laravel project runs under Laravel Sail. Trigger for Docker/Sail workflows, running artisan, composer, npm, or PHP only inside containers. Covers: ./vendor/bin/sail up/down, sail artisan, sail composer, sail npm, and never running host PHP/Composer against a Sail-only app by mistake." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/sail/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Sail + +- This project runs inside Laravel Sail's Docker containers. You MUST execute all commands through Sail. +- Start services using `./vendor/bin/sail up -d` and stop them with `./vendor/bin/sail stop`. +- Open the application in the browser by running `./vendor/bin/sail open`. +- Always prefix PHP, Artisan, Composer, and Node commands with `./vendor/bin/sail`. Examples: + - Run Artisan Commands: `./vendor/bin/sail artisan migrate` + - Install Composer packages: `./vendor/bin/sail composer install` + - Execute Node commands: `./vendor/bin/sail npm run dev` + - Execute PHP scripts: `./vendor/bin/sail php [script]` +- View all available Sail commands by running `./vendor/bin/sail` without arguments. diff --git a/.github/skills/livewire-development/SKILL.md b/.github/skills/livewire-development/SKILL.md new file mode 100644 index 0000000..86e073c --- /dev/null +++ b/.github/skills/livewire-development/SKILL.md @@ -0,0 +1,216 @@ +--- +name: livewire-development +description: "Use for any task or question involving Livewire. Activate if user mentions Livewire, wire: directives, or Livewire-specific concepts like wire:model, wire:click, wire:sort, or islands, invoke this skill. Covers building new components, debugging reactivity issues, real-time form validation, drag-and-drop, loading states, migrating from Livewire 3 to 4, converting component formats (SFC/MFC/class-based), and performance optimization. Do not use for non-Livewire reactive UI (React, Vue, Alpine-only, Inertia.js) or standard Laravel forms without Livewire." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/livewire/4/skill/livewire-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Livewire Development + +## Documentation + +Use `search-docs` for detailed Livewire 4 patterns and documentation. + +## Basic Usage + +### Creating Components + +```bash +# Single-file component (default in v4) +php artisan make:livewire create-post + +# Multi-file component +php artisan make:livewire create-post --mfc + +# Class-based component (v3 style) +php artisan make:livewire create-post --class + +# With namespace +php artisan make:livewire Posts/CreatePost +``` + +### Converting Between Formats + +Use `php artisan livewire:convert create-post` to convert between single-file, multi-file, and class-based formats. + +### Choosing a Component Format + +Before creating a component, check `config/livewire.php` for directory overrides, which change where files are stored. Then, look at existing files in those directories (defaulting to `app/Livewire/` and `resources/views/livewire/`) to match the established convention. + +### Component Format Reference + +| Format | Flag | Class Path | View Path | +|--------|------|------------|-----------| +| Single-file (SFC) | default | — | `resources/views/livewire/create-post.blade.php` (PHP + Blade in one file) | +| Multi-file (MFC) | `--mfc` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| Class-based | `--class` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| View-based | ⚡ prefix | — | `resources/views/livewire/create-post.blade.php` (Blade-only with functional state) | + +Namespaced components map to subdirectories: `make:livewire Posts/CreatePost` creates files at `app/Livewire/Posts/CreatePost.php` and `resources/views/livewire/posts/create-post.blade.php`. + +### Single-File Component Example + + +```php +count++; + } +} +?> + +

+ +
+``` + + +## Livewire 4 Specifics + +### Key Changes From Livewire 3 + +These things changed in Livewire 4, but may not have been updated in this application. Verify this application's setup to ensure you follow existing conventions. + +- Use `Route::livewire()` for full-page components (e.g., `Route::livewire('/posts/create', CreatePost::class)`); config keys renamed: `layout` → `component_layout`, `lazy_placeholder` → `component_placeholder`. +- `wire:model` now ignores child events by default (use `wire:model.deep` for old behavior); `wire:scroll` renamed to `wire:navigate:scroll`. +- Component tags must be properly closed; `wire:transition` now uses View Transitions API (modifiers removed). +- JavaScript: `$wire.$js('name', fn)` → `$wire.$js.name = fn`; legacy commit/request hooks map to the **interceptor** APIs — use **`$wire.intercept()` / `Livewire.interceptAction()`** (action lifecycle), **`$wire.interceptMessage()` / `Livewire.interceptMessage()`** (payload handling), and **`$wire.interceptRequest()` / `Livewire.interceptRequest()`** (HTTP request lifecycle) as appropriate. + +### New Features + +- Component formats: single-file (SFC), multi-file (MFC), view-based components. +- Islands (`@island`) for isolated updates; async actions (`wire:click.async`, `#[Async]`) for parallel execution. +- Deferred/bundled loading: `defer`, `lazy.bundle` for optimized component loading. + +| Feature | Usage | Purpose | +|---------|-------|---------| +| Islands | `@island(name: 'stats')` | Isolated update regions | +| Async | `wire:click.async` or `#[Async]` | Non-blocking actions | +| Deferred | `defer` attribute | Load after page render | +| Bundled | `lazy.bundle` | Load multiple together | + +### New Directives + +- `wire:sort`, `wire:intersect`, `wire:ref`, `.renderless`, `.preserve-scroll` are available for use. +- `data-loading` is added while a request is in flight for elements that dispatch one (for example many `wire:click` / `wire:submit` targets); exact coverage depends on the attribute and your Livewire version — confirm in the docs for your app. + +| Directive | Purpose | +|-----------|---------| +| `wire:sort` | Drag-and-drop sorting | +| `wire:intersect` | Viewport intersection detection | +| `wire:ref` | Element references for JS | +| `.renderless` | Component without rendering | +| `.preserve-scroll` | Preserve scroll position | + +## Best Practices + +- Always use `wire:key` in loops +- Use `wire:loading` for loading states +- Use `wire:model.live` for instant updates (default is debounced) +- Validate and authorize in actions (treat like HTTP requests) + +## Configuration + +- `smart_wire_keys` defaults to `true`; new configs: `component_locations`, `component_namespaces`, `make_command`, `csp_safe`. + +## Alpine & JavaScript + +- `wire:transition` uses browser View Transitions API; `$errors` and `$intercept` magic properties available. +- Non-blocking `wire:poll` and parallel `wire:model.live` updates improve performance. + +## JavaScript integration + +Livewire 4 exposes three interceptor layers (component helpers mirror the `Livewire.*` globals where applicable): + +### Intercept actions + +Run logic around a **named component action** (before/after the action runs): + +```js +$wire.intercept('save', ({ onSuccess, onFailure }) => { + onSuccess(() => console.log('Saved!')); +}); +// or +Livewire.interceptAction(({ action, onSuccess, onFailure }) => { + // filter by action.name, etc. +}); +``` + +### Intercept messages + +Hook the **Livewire message** (payload / snapshot) pipeline: + +```js +Livewire.interceptMessage(({ component, message, onFinish, onSuccess, onError }) => { + onFinish(() => { /* After response, before processing */ }); + onSuccess(({ payload }) => { /* payload.snapshot, payload.effects */ }); + onError(() => { /* Server errors */ }); +}); +``` + +### Intercept requests + +Hook the underlying **HTTP request** (fetch/XHR lifecycle): + +```js +Livewire.interceptRequest(({ request, onResponse, onSuccess, onError, onFailure }) => { + onResponse(({ response }) => { /* When received */ }); + onSuccess(({ response, responseJson }) => { /* Success */ }); + onError(({ response, responseBody, preventDefault }) => { /* 4xx/5xx */ }); + onFailure(({ error }) => { /* Network failures */ }); +}); +``` + +### Component-scoped interceptors + +```blade + +``` + +## Magic Properties + +- `$errors` - Access validation errors from JavaScript +- `$intercept` - Component-scoped action interceptors + + + +## Testing + + +```php +Livewire::test(Counter::class) + ->assertSet('count', 0) + ->call('increment') + ->assertSet('count', 1); +``` + + +## Verification + +1. Browser console: Check for JS errors +2. Network tab: Verify Livewire requests return 200 +3. Ensure `wire:key` on all `@foreach` loops + +## Common Pitfalls + +- Missing `wire:key` in loops → unexpected re-rendering +- Expecting `wire:model` real-time → use `wire:model.live` +- Unclosed component tags → syntax errors in v4 +- Using deprecated config keys or JS hooks +- Including Alpine.js separately (already bundled in Livewire 4) + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.github/skills/pest-testing/SKILL.md b/.github/skills/pest-testing/SKILL.md new file mode 100644 index 0000000..df8bb10 --- /dev/null +++ b/.github/skills/pest-testing/SKILL.md @@ -0,0 +1,170 @@ +--- +name: pest-testing +description: "Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: test()/it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pest/4/skill/pest-testing/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Pest Testing 4 + +## Documentation + +Use `search-docs` for detailed Pest 4 patterns and documentation. + +## Basic Usage + +### Creating Tests + +All tests must be written using Pest. Use `php artisan make:test --pest `. + +### Test Organization + +- Unit/Feature tests: `tests/Feature` and `tests/Unit` directories. +- Browser tests: `tests/Browser/` directory. +- Do NOT remove tests without approval - these are core application code. + +### Basic Test Structure + +Pest supports both `test()` and `it()` functions. Before writing new tests, check existing test files in the same directory to match the project's convention. Use `test()` if existing tests use `test()`, or `it()` if they use `it()`. + + +```php +it('is true', function () { + expect(true)->toBeTrue(); +}); +``` + + +### Running Tests + +- Run minimal tests with filter before finalizing: `php artisan test --compact --filter=testName`. +- Run all tests: `php artisan test --compact`. +- Run file: `php artisan test --compact tests/Feature/ExampleTest.php`. + +## Assertions + +Use specific assertions (`assertSuccessful()`, `assertNotFound()`) instead of `assertStatus()`: + + +```php +it('returns all', function () { + $this->postJson('/api/docs', [])->assertSuccessful(); +}); +``` + + +| Use | Instead of | +|-----|------------| +| `assertSuccessful()` | `assertStatus(200)` | +| `assertNotFound()` | `assertStatus(404)` | +| `assertForbidden()` | `assertStatus(403)` | + +## Mocking + +Import mock function before use: `use function Pest\Laravel\mock;` + +## Datasets + +Use datasets for repetitive tests (validation rules, etc.): + + +```php +it('has emails', function (string $email) { + expect($email)->not->toBeEmpty(); +})->with([ + 'james' => 'james@laravel.com', + 'taylor' => 'taylor@laravel.com', +]); +``` + + +## Pest 4 Features + +| Feature | Purpose | +|---------|---------| +| Browser Testing | Full integration tests in real browsers | +| Smoke Testing | Validate multiple pages quickly | +| Visual Regression | Compare screenshots for visual changes | +| Test Sharding | Parallel CI runs | +| Architecture Testing | Enforce code conventions | + +### Browser Test Example + +Browser tests run in real browsers for full integration testing: + +- Browser tests live in `tests/Browser/`. +- Use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories. +- Use `RefreshDatabase` for clean state per test. +- Interact with page: click, type, scroll, select, submit, drag-and-drop, touch gestures. +- Test on multiple browsers (Chrome, Firefox, Safari) if requested. +- Test on different devices/viewports (iPhone 14 Pro, tablets) if requested. +- Switch color schemes (light/dark mode) when appropriate. +- Take screenshots or pause tests for debugging. + + +```php +it('may reset the password', function () { + Notification::fake(); + + $this->actingAs(User::factory()->create()); + + $page = visit('/sign-in'); + + $page->assertSee('Sign In') + ->assertNoJavaScriptErrors() + ->click('Forgot Password?') + ->fill('email', 'nuno@laravel.com') + ->click('Send Reset Link') + ->assertSee('We have emailed your password reset link!'); + + Notification::assertSent(ResetPassword::class); +}); +``` + + +### Smoke Testing + +Quickly validate multiple pages have no JavaScript errors: + + +```php +$pages = visit(['/', '/about', '/contact']); + +$pages->assertNoJavaScriptErrors()->assertNoConsoleLogs(); +``` + + +### Visual Regression Testing + +Capture and compare screenshots to detect visual changes. + +### Test Sharding + +Split tests across parallel processes for faster CI runs. + +### Architecture Testing + +Pest 4 includes architecture testing (from Pest 3): + + +```php +arch('controllers') + ->expect('App\Http\Controllers') + ->toExtendNothing() + ->toHaveSuffix('Controller'); +``` + + +## Common Pitfalls + +- Not importing `use function Pest\Laravel\mock;` before using mock +- Using `assertStatus(200)` instead of `assertSuccessful()` +- Forgetting datasets for repetitive validation tests +- Deleting tests without approval +- Forgetting `assertNoJavaScriptErrors()` in browser tests + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.github/skills/phpunit-laravel/SKILL.md b/.github/skills/phpunit-laravel/SKILL.md new file mode 100644 index 0000000..78f990e --- /dev/null +++ b/.github/skills/phpunit-laravel/SKILL.md @@ -0,0 +1,26 @@ +--- +name: phpunit-laravel +description: "Use when writing or running PHPUnit tests in a Laravel app that uses PHPUnit (not Pest). Trigger for test classes, assertions, make:test --phpunit, or running the test suite. Covers: creating tests, running filtered tests, and treating tests as core code that must not be removed without approval." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/phpunit/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# PHPUnit + +- This application uses PHPUnit for testing. All tests must be written as PHPUnit classes. Use `php artisan make:test --phpunit ` to create a new test. +- If you see a test using "Pest", convert it to PHPUnit. +- Every time a test has been updated, run that singular test. +- When the tests relating to your feature are passing, ask the user if they would like to also run the entire test suite to make sure everything is still passing. +- Tests should cover all happy paths, failure paths, and edge cases. +- You must not remove any tests or test files from the tests directory without approval. These are not temporary or helper files; these are core to the application. + +## Running Tests +- Run the minimal number of tests, using an appropriate filter, before finalizing. +- To run all tests: `php artisan test --compact`. +- To run all tests in a file: `php artisan test --compact tests/Feature/ExampleTest.php`. +- To filter on a particular test name: `php artisan test --compact --filter=testName` (recommended after making a change to a related file). +**Command prefix:** Use `php artisan` on the host or `./vendor/bin/sail artisan` when using Sail. + diff --git a/.github/skills/skill-research/SKILL.md b/.github/skills/skill-research/SKILL.md index d0564e3..0ebef23 100644 --- a/.github/skills/skill-research/SKILL.md +++ b/.github/skills/skill-research/SKILL.md @@ -1,24 +1,30 @@ ---- -name: skill-research -description: Generates structured research notes about a GitHub Copilot skill from a GitHub URL. Use for skill discovery and documentation. ---- - -You are the Copilot Skill Note Generator. - -## Canonical packaging spec - -Before you interpret an upstream skill or structure a research note, **read [`skill-template.md`](skill-template.md)** in this skill directory. It is the full spec reference (frontmatter fields, `SKILL.md` layout, `references/` / `scripts/` / `assets/`, validation, progressive disclosure). - -That file is a **copy of** `templates/skill.md` at the repo root. GitHub Actions updates `skill-template.md` whenever `templates/skill.md` changes; edit the source in `templates/skill.md` if you need to change the spec text. - -## Research note - -Write to `.steering/skills/__.md`. Cover at minimum: - -1. **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields. -2. **Skill instructions** — Summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. -3. **Directory structure** — What exists on disk vs the template layout (`scripts/`, `references/`, `assets/`, etc.). -4. **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items apply; follow-ups for the maintainer. -5. **Sources** — GitHub URLs and paths you relied on (repo, skill dir, `SKILL.md`, related agents/workflows). - -Populate only fields you can verify; leave unknowns blank rather than guessing. +--- +name: skill-research +description: Generates structured research notes about an agent skill from a repository URL. Use for skill discovery and documentation. +--- + +You are the **Skill Note Generator** for this repository. + +## Canonical packaging spec + +Before you interpret an upstream skill or structure a research note, **read the canonical skill packaging template** at [`.steering/templates/skill.md`](../../../.steering/templates/skill.md). It is the full spec reference (frontmatter fields, `SKILL.md` layout, `references/` / `scripts/` / `assets/`, validation, progressive disclosure). + +The same content is mirrored to **`.github/skills/skill-research/skill-template.md`**, **`.claude/skills/skill-template/SKILL.md`**, and **`.cursor/skills/skill-template/SKILL.md`**. **Verify steering sync** CI fails if those mirrors drift from `.steering/templates/skill.md`. Edit `.steering/templates/skill.md`, run `python3 scripts/regenerate-ide-mirrors.py`, then commit the mirrors together. + +## GitHub Copilot Agent Skills (steering reference) + +> **Copilot Agent Skills (steering):** see `.steering/github-copilot/Skills.md` in this repository. + +## Research note + +Write to `.steering/skills/__.md`. Use a stable `namespace` from the source (org, group, or disambiguated host+project). +Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. +If normalization would produce an empty value, stop and ask for clarification. Cover at minimum: + +1. **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields. +2. **Skill instructions** — Summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. +3. **Directory structure** — What exists on disk vs the template layout (`scripts/`, `references/`, `assets/`, etc.). +4. **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items apply; follow-ups for the maintainer. +5. **Sources** — URLs and paths you relied on (repository, skill directory, `SKILL.md`, related agents or workflows). + +Populate only fields you can verify; leave unknowns blank rather than guessing. diff --git a/.github/skills/skill-research/skill-template.md b/.github/skills/skill-research/skill-template.md index 25fc5f9..55ecc50 100644 --- a/.github/skills/skill-research/skill-template.md +++ b/.github/skills/skill-research/skill-template.md @@ -1,76 +1,73 @@ -Frontmatter -``` ---- -name: # Required: 1-64 chars, lowercase a-z 0-9 -, no leading/trailing/consecutive hyphens. Matches folder name. -description: # Required: 1-1024 chars. Describe what the skill does and when to use it. Include keywords. -license: # Optional: License name or reference. -compatibility: # Optional: Max 500 chars. Environment requirements (e.g., tools, packages, network). -metadata: # Optional: Arbitrary key-value pairs. - author: - version: "1.0" -allowed-tools: # Optional (experimental): Space-delimited pre-approved tools. ---- -``` - -# Skill Instructions - -Write clear, step-by-step instructions for agents to perform the task effectively. - -## Recommended Structure -- Step-by-step instructions -- Examples of inputs and outputs -- Common edge cases -- References to other files: [REFERENCE.md](references/REFERENCE.md), scripts/extract.py - -Keep under 500 lines (~5000 tokens). Use `references/`, `scripts/`, `assets/` for more. - -# Directory Structure -``` -skill-name/ -├── SKILL.md # This file -├── scripts/ # Optional: Executable code (e.g., extract.py) -├── references/ # Optional: Docs (e.g., REFERENCE.md) -├── assets/ # Optional: Templates, images, data -└── ... # Additional files -``` - -# Frontmatter Details - -## name -- 1-64 chars -- Lowercase a-z, 0-9, - -- No start/end/consecutive hyphens -- Matches parent dir - -**Valid:** `pdf-processing`, `data-analysis` - -**Invalid:** `PDF-Processing`, `-pdf`, `pdf--processing` - -## description -**Good:** "Extracts text/tables from PDFs, fills forms, merges files. Use for PDF tasks." -**Poor:** "PDF helper." - -## Other Fields -- **license:** e.g., "Apache-2.0" or "See LICENSE.txt" -- **compatibility:** e.g., "Requires Python 3.10+, internet access" -- **metadata:** Custom key-values -- **allowed-tools:** e.g., "Bash(git:*) Read" - -# Optional Directories -- **scripts/**: Self-contained executables (Python, Bash, JS) -- **references/**: Load on demand (REFERENCE.md, FORMS.md) -- **assets/**: Static files (templates, images) - -# Validation -Use [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref): -``` -skills-ref validate ./my-skill -``` - -# Full Spec Reference -See https://agentskills.io/specification.md for complete details. - -# Progressive Disclosure -1. Metadata (~100 tokens): Loaded for all skills -2. Instructions (<5000 tokens): Loaded on activation -3. Resources: Loaded as needed +--- +name: # Required: 1-64 chars, lowercase a-z 0-9 -, no leading/trailing/consecutive hyphens. Matches folder name. +description: # Required: 1-1024 chars. Describe what the skill does and when to use it. Include keywords. +license: # Optional: License name or reference. +compatibility: # Optional: Max 500 chars. Environment requirements (e.g., tools, packages, network). +metadata: # Optional: Arbitrary key-value pairs. + author: + version: "1.0" +allowed-tools: # Optional (experimental): Space-delimited pre-approved tools. +--- + +# Skill Instructions + +Write clear, step-by-step instructions for agents to perform the task effectively. + +## Recommended Structure +- Step-by-step instructions +- Examples of inputs and outputs +- Common edge cases +- References to other files: [REFERENCE.md](references/REFERENCE.md), scripts/extract.py + +Keep under 500 lines (~5000 tokens). Use `references/`, `scripts/`, `assets/` for more. + +# Directory Structure +``` +skill-name/ +├── SKILL.md # This file +├── scripts/ # Optional: Executable code (e.g., extract.py) +├── references/ # Optional: Docs (e.g., REFERENCE.md) +├── assets/ # Optional: Templates, images, data +└── ... # Additional files +``` + +# Frontmatter Details + +## name +- 1-64 chars +- Lowercase a-z, 0-9, - +- No start/end/consecutive hyphens +- Matches parent dir + +**Valid:** `pdf-processing`, `data-analysis` + +**Invalid:** `PDF-Processing`, `-pdf`, `pdf--processing` + +## description +**Good:** "Extracts text/tables from PDFs, fills forms, merges files. Use for PDF tasks." +**Poor:** "PDF helper." + +## Other Fields +- **license:** e.g., "Apache-2.0" or "See LICENSE.txt" +- **compatibility:** e.g., "Requires Python 3.10+, internet access" +- **metadata:** Custom key-values +- **allowed-tools:** e.g., "Bash(git:*) Read" + +# Optional Directories +- **scripts/**: Self-contained executables (Python, Bash, JS) +- **references/**: Load on demand (REFERENCE.md, FORMS.md) +- **assets/**: Static files (templates, images) + +# Validation +Use [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref): +``` +skills-ref validate ./my-skill +``` + +# Full Spec Reference +See https://agentskills.io/specification.md for complete details. + +# Progressive Disclosure +1. Metadata (~100 tokens): Loaded for all skills +2. Instructions (<5000 tokens): Loaded on activation +3. Resources: Loaded as needed \ No newline at end of file diff --git a/.github/skills/sync-agents/SKILL.md b/.github/skills/sync-agents/SKILL.md new file mode 100644 index 0000000..f7c0a5c --- /dev/null +++ b/.github/skills/sync-agents/SKILL.md @@ -0,0 +1,36 @@ +--- +name: sync-agents +description: Builds .steering/agents (Obsidian ![[ embeds expanded), writes .github/agents, then .cursor/.claude with Copilot YAML stripped. Does not commit. +license: MIT +compatibility: Same embed rules as verify-steering-sync.yml (Python or manual). +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync agents (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/` changed. +- Merge IDE edits back into `.steering/agents/` first, then replicate. + +## Replication rules + +1. **Build** — In each agent file’s **body** (after opening YAML), expand **`![[path]]`** embed links for **`templates/`** paths by default. For **`research-skill.agent.md`**, also expand **`![[github-copilot/...]]`** embeds only in the **`.cursor/agents/`** output; **`.github`** / **`.claude`** replace those embeds with a pointer to **`.steering/github-copilot/Skills.md`**. With `#Heading`, inline the `## Heading` section only. Leave other `![[...]]` as-is. + +2. **`.github/agents/`** — Write the **built** markdown (same basename). + +3. **`.cursor/agents/`** and **`.claude/agents/`** — Built file, then strip **`tools:`** and **`mcp-servers:`** from the opening frontmatter. + +4. Do **not** touch skills or skill-template paths. + +## Steps + +1. Apply the rules above (match **Verify steering sync** agent step). +2. Run `git diff`. +3. **Do not** commit unless the user asks. + +## CI + +**Verify steering sync** implements the same build + strip logic. diff --git a/.github/skills/sync-skills/SKILL.md b/.github/skills/sync-skills/SKILL.md new file mode 100644 index 0000000..370ebca --- /dev/null +++ b/.github/skills/sync-skills/SKILL.md @@ -0,0 +1,40 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Does not commit. Use after editing .steering or after merging IDE copies back into .steering. +license: MIT +compatibility: Repo with .steering layout; use editor or file copy as needed. +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync skills (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/`, `.steering/skills/*/SKILL.md`, or `.steering/templates/skill.md` changed. +- The user edited `.cursor/`, `.claude/`, or `.github/` copies — merge into `.steering` first, then replicate out. +- Matching **Verify steering sync** CI locally. + +## Replication rules + +1. **Agents** — Build each `.steering/agents/*.md` per **sync-agents** (templates + special **`github-copilot/`** handling for **`research-skill.agent.md`** on **`.cursor`** only), write to `.github/agents/`, then strip Copilot **`tools:`** / **`mcp-servers:`** for `.cursor/agents/` and `.claude/agents/`. +2. **Packaged skills** — For each `.steering/skills//SKILL.md`: build (templates embeds; **`skill-research`**: **`github-copilot/`** embed only under **`.cursor/skills/skill-research/`**) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, `.github/skills//SKILL.md`. Flat `*.md` under `.steering/skills/` (research notes) are **not** mirrored. +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +## Steps + +1. Apply the replication rules above (or run `python3 scripts/regenerate-ide-mirrors.py` from the repo root to match CI exactly). +2. Run `git diff`. If empty, mirrors already matched. +3. **Do not** `git add` / `git commit` / `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** (`.github/workflows/verify-steering-sync.yml`) runs `python3 scripts/regenerate-ide-mirrors.py` and fails on `git diff`. + +## Upstream skills + +If skills were refreshed from an external catalog (see `.steering/skills/SOURCES.md`), run `python3 scripts/sync-boost-ai-skills.py` first, then `python3 scripts/regenerate-ide-mirrors.py`. diff --git a/.github/skills/tailwindcss-development/SKILL.md b/.github/skills/tailwindcss-development/SKILL.md new file mode 100644 index 0000000..0463d35 --- /dev/null +++ b/.github/skills/tailwindcss-development/SKILL.md @@ -0,0 +1,120 @@ +--- +name: tailwindcss-development +description: "Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/tailwindcss/4/skill/tailwindcss-development/SKILL.md`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Tailwind CSS Development + +## Documentation + +Use `search-docs` for detailed Tailwind CSS v4 patterns and documentation. + +## Basic Usage + +- Use Tailwind CSS classes to style HTML. Check and follow existing Tailwind conventions in the project before introducing new patterns. +- Offer to extract repeated patterns into components that match the project's conventions (e.g., Blade, JSX, Vue). +- Consider class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child elements carefully to reduce repetition, and group elements logically. + +## Tailwind CSS v4 Specifics + +- Always use Tailwind CSS v4 and avoid deprecated utilities. +- `corePlugins` is not supported in Tailwind v4. + +### CSS-First Configuration + +In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed: + + +```css +@theme { + --color-brand: oklch(0.72 0.11 178); +} +``` + +### Import Syntax + +In Tailwind v4, import Tailwind with a regular CSS `@import` statement instead of the `@tailwind` directives used in v3: + + +```diff +- @tailwind base; +- @tailwind components; +- @tailwind utilities; ++ @import "tailwindcss"; +``` + +### Replaced Utilities + +Tailwind v4 removed deprecated utilities. Use the replacements shown below. Opacity values remain numeric. + +| Deprecated | Replacement | +|------------|-------------| +| bg-opacity-* | `bg-{color}/{opacity}` (e.g. `bg-sky-500/50`) — opacity is a slash modifier on the color, not `black`-specific | +| text-opacity-* | `text-{color}/{opacity}` (e.g. `text-red-700/75`) | +| border-opacity-* | `border-{color}/{opacity}` | +| divide-opacity-* | `divide-{color}/{opacity}` | +| ring-opacity-* | `ring-{color}/{opacity}` | +| placeholder-opacity-* | `placeholder-{color}/{opacity}` | +| flex-shrink-* | shrink-* | +| flex-grow-* | grow-* | +| overflow-ellipsis | text-ellipsis | +| decoration-slice | box-decoration-slice | +| decoration-clone | box-decoration-clone | + +## Spacing + +Use `gap` utilities instead of margins for spacing between siblings: + + +```html +
+
Item 1
+
Item 2
+
+``` + +## Dark Mode + +If existing pages and components support dark mode, new pages and components must support it the same way, typically using the `dark:` variant: + + +```html +
+ Content adapts to color scheme +
+``` + +## Common Patterns + +### Flexbox Layout + + +```html +
+
Left content
+
Right content
+
+``` + +### Grid Layout + + +```html +
+
Card 1
+
Card 2
+
Card 3
+
+``` + +## Common Pitfalls + +- Using deprecated v3 utilities (bg-opacity-*, flex-shrink-*, etc.) +- Using `@tailwind` directives instead of `@import "tailwindcss"` +- Trying to use `tailwind.config.js` instead of CSS `@theme` directive +- Using margins for spacing between siblings instead of gap utilities +- Forgetting to add dark mode variants when the project uses dark mode diff --git a/.github/workflows/sync-skill-template.yml b/.github/workflows/sync-skill-template.yml deleted file mode 100644 index fe27f39..0000000 --- a/.github/workflows/sync-skill-template.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Sync skill template - -on: - workflow_dispatch: - push: - paths: - - templates/skill.md - -permissions: - contents: write - -jobs: - copy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Copy templates/skill.md to skill-research skill-template.md - run: | - mkdir -p .github/skills/skill-research - cp templates/skill.md .github/skills/skill-research/skill-template.md - - - name: Commit if changed - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add .github/skills/skill-research/skill-template.md - if git diff --staged --quiet; then - echo "No changes to skill-template.md" - exit 0 - fi - git commit -m "chore: sync skill-template.md from templates/skill.md" - git push diff --git a/.github/workflows/verify-steering-sync.yml b/.github/workflows/verify-steering-sync.yml new file mode 100644 index 0000000..eb2f74c --- /dev/null +++ b/.github/workflows/verify-steering-sync.yml @@ -0,0 +1,38 @@ +name: Verify steering sync + +on: + workflow_dispatch: + push: + paths: + - ".steering/**" + - ".github/workflows/verify-steering-sync.yml" + - "scripts/regenerate-ide-mirrors.py" + - ".github/agents/**" + - ".github/skills/**" + - ".cursor/agents/**" + - ".cursor/skills/**" + - ".claude/**" + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Regenerate IDE mirrors from .steering + run: | + set -euo pipefail + python3 scripts/regenerate-ide-mirrors.py + + - name: Fail if mirrors differ from commit + run: | + if [ -z "$(git status --porcelain --untracked-files=all)" ]; then + echo "IDE mirrors match .steering" + else + echo "::error::Out of sync with .steering — update mirrors under .cursor, .claude, and .github to match .steering (see .steering/README.md), then commit together." + git status --short + exit 1 + fi diff --git a/.steering/README.md b/.steering/README.md new file mode 100644 index 0000000..51cd86b --- /dev/null +++ b/.steering/README.md @@ -0,0 +1,31 @@ +# `.steering` — source of truth + +Canonical **agents** and **packaged skills** live here. **Packaged skills** and **skill-template** mirrors are usually identical under `.cursor`, `.claude`, and `.github`; **exception:** **`skill-research`** expands **`![[github-copilot/...]]`** only in **`.cursor/skills/skill-research/`** (other mirrors get a pointer to **`.steering/github-copilot/Skills.md`**). **Agents** may use **`![[templates/...]]`**; **`research-skill.agent.md`** uses the same **`github-copilot/`** rule for **`.cursor/agents/`** only. **Mirrors** are **built** (embeds expanded per destination), then **`.cursor/agents/`** and **`.claude/agents/`** drop Copilot-only **`tools:`** / **`mcp-servers:`**. CI also asserts Cursor/Claude agent mirrors never contain those keys. + +## Layout + +| Path | Purpose | +|------|---------| +| `agents/` | Agent definitions (`![[templates/...]]`; **`research-skill.agent.md`:** **`![[github-copilot/...]]`** expanded on **`.cursor`** only). **`.github/agents/`** = built; **`.cursor`** / **`.claude`** = built (per rules) + strip **`tools:`** / **`mcp-servers:`** (skip `README.md` if you add one). | +| `skills//SKILL.md` | Packaged skills — **built** to each IDE (same as agents for embeds; **`skill-research`** Copilot note inlined only under **`.cursor/skills/`**). | +| `skills/__.md` | Skill research notes only — not mirrored. | +| `mcps/__.md` | MCP server research notes (`research-mcp` agent) — not mirrored. | +| `templates/skill.md` | Skill spec; also copy to `skill-template` paths below. | +| `templates/AGENTS.md` | Starter for repo-root **`AGENTS.md`** (skills + MCP); not mirrored — see **sync-agents**. | +| `templates/agent.md` | **Core Principles** only (embedded by some agents); not mirrored. | + +**Template mirrors** (from `templates/skill.md`): + +- `.github/skills/skill-research/skill-template.md` +- `.claude/skills/skill-template/SKILL.md` +- `.cursor/skills/skill-template/SKILL.md` + +Packaged skill **`sync-skills`** covers full replication; **`sync-agents`** covers `.steering/agents/` only. + +## Workflow + +1. Edit under `.steering/` (or merge IDE edits **into** `.steering` first). +2. Replicate to the three IDE roots: same files, same paths relative to each root’s `agents/` and `skills/` layout, plus the three template paths above. +3. Commit `.steering/**` and every updated mirror in one change when possible. + +CI (**Verify steering sync**) repeats those copies in the runner and fails if `git diff` is non-empty. diff --git a/.steering/agents/idea.agent.md b/.steering/agents/idea.agent.md new file mode 100644 index 0000000..17964bc --- /dev/null +++ b/.steering/agents/idea.agent.md @@ -0,0 +1,35 @@ +--- +name: idea +description: "Turns a raw idea into a researched steering note. Usage: /idea " +tools: ["read", "search", "edit", "browser"] +--- + +You are the **`/idea` agent**. The user supplies a rough idea (or a path to notes). Your job is to **enrich it with live research** using every **skill** and **MCP** that is relevant and available in the session, then **write one markdown file** under `.steering/ideas/` following the repo’s idea shape. + +## Shared principles (from steering templates) + +![[templates/agent#Core Principles]] + +## Output shape (required) + +Read and follow **`.steering/templates/idea.md`**. The built copy of that template is inlined below for convenience — prefer the file on disk if it differs. + +![[templates/idea]] + +## Research expectations + +1. **Skills** — Discover applicable workspace skills (e.g. under `.cursor/skills/`, `.claude/skills/`, `.github/skills/`, and `.steering/skills/`). **Read** any whose descriptions match the idea (planning, research, domain, docs, browser, etc.) and apply their workflows or constraints where they add signal. Do not claim you used a skill you did not read. + +2. **MCPs** — Use **all configured MCP servers** that can help (documentation search, web/repo fetch, browser, memory, sequential thinking, etc.). Check tool descriptors or server docs when unsure. Prefer **fresh** primary sources over stale model knowledge. + +3. **Synthesis** — The **Research synthesis** section must summarize what you actually did (which skills/MCPs, what you learned). If a source was unreachable, say so under **Risks and unknowns** or **Sources**. + +## File naming and hygiene + +- **Path:** `.steering/ideas/.md` — `slug` from frontmatter or a short kebab-case slug derived from the title (ASCII, lowercase, hyphens). If a file already exists for the same slug, **update that file** (bump `updated` in frontmatter if you use it) unless the user asked for a new file. +- **Single deliverable** — One idea note per invocation. Do not edit unrelated steering files. +- **Completion** — Output **only** the final file path when done. + +## When the idea is unclear + +Ask **one** tight clarification question only if you cannot produce a useful note without it; otherwise proceed and record assumptions under **Risks and unknowns**. diff --git a/.steering/agents/laravel-package.agent.md b/.steering/agents/laravel-package.agent.md new file mode 100644 index 0000000..7097d92 --- /dev/null +++ b/.steering/agents/laravel-package.agent.md @@ -0,0 +1,31 @@ +--- +name: laravel-package +description: "Researches Laravel packages and generates Obsidian notes. Usage: /laravel-package " +tools: ["read", "search", "edit", "browser"] +--- + +You are a Laravel package researcher. For `/laravel-package `: + +## Core Principles + +**Think Before Acting** — Parse the vendor/package slug first. If it is ambiguous or malformed, stop and ask. + +**Simplicity First** — Populate only fields you can verify from sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at the correct path with all resolvable fields filled in. + +## Steps + +1. Parse `` (e.g., `spatie/laravel-markdown-response`). +2. Research — fetch fresh data from each source below. Do not rely on cached knowledge. +3. Generate the note from `.steering/templates/laravel-package.md` (YAML + body, excluding the Field-to-Source Mapping section — that section is agent reference only). Use the **Field-to-Source Mapping** section inlined below (same content as `## Field-to-Source Mapping` in that template). +4. Write to `.steering/laravel-packages/__.md`. +5. Leverage repo Memories for consistent formatting patterns. + +## Field-to-Source Mapping + +![[templates/laravel-package#Field-to-Source Mapping]] + +Output ONLY the file path on completion. diff --git a/.steering/agents/research-mcp.agent.md b/.steering/agents/research-mcp.agent.md new file mode 100644 index 0000000..23e8528 --- /dev/null +++ b/.steering/agents/research-mcp.agent.md @@ -0,0 +1,91 @@ +--- +name: research-mcp +description: "Researches a Model Context Protocol (MCP) server from a URL and generates a structured research note. Usage: /research-mcp " +tools: ["read", "search", "edit", "browser"] +--- + +You are an MCP (Model Context Protocol) server researcher. For `/research-mcp `: + +## Core Principles + +**Think Before Acting** — Parse the URL fully before doing any research. If the URL is ambiguous or does not clearly point to an MCP server, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/mcps/__.md` with all resolvable fields filled in. + +## Steps + +1. Parse the URL to extract: + - `owner` — GitHub org/user or publisher (e.g., `modelcontextprotocol`) + - `name` — repository or package name (e.g., `server-filesystem`) + - Determine if the link is a GitHub repo, npm package, PyPI package, or other source. + - Normalize `owner` and `name` to file-safe slugs: lowercase ASCII `a-z0-9-` only; reject `/`, `\`, and `..`. If either slug is empty after normalization, stop and ask for clarification. + +2. Research — fetch fresh data, do not rely on cached knowledge: + - **GitHub repo** (via GitHub MCP + DeepWiki): + - README: purpose, features, installation, configuration, available tools/resources/prompts. + - `package.json` / `pyproject.toml` / equivalent: version, dependencies, entry point. + - Stars, forks, open issues, last release. + - Any example configs (`.vscode/mcp.json`, Claude Desktop config snippets). + - **npm / PyPI / registry** (via search): package name, version, weekly downloads. + - **Official MCP docs** (search `modelcontextprotocol.io` or `spec.modelcontextprotocol.io`): any mention of this server in official docs or the server catalog. + +3. Generate a research note using the structure below. + +4. Write to `.steering/mcps/__.md` using the normalized slugs only. + +5. Leverage repo Memories for consistent formatting patterns. + +## Output Template + +```markdown +--- +name: +owner: +url: +type: +transport: +language: +version: +stars: +last_updated: +tags: [, ] +--- + +# + +> + +## What It Does + +<2-4 sentences on purpose and use cases> + +## Tools / Resources / Prompts + +| Name | Type | Description | +|------|------|-------------| +| ... | tool/resource/prompt | ... | + +## Installation + + + +## Configuration + + + +## Authentication / Environment Variables + +| Variable | Required | Description | +|----------|----------|-------------| +| ... | yes/no | ... | + +## Notes + + +``` + +Output ONLY the file path on completion. diff --git a/.steering/agents/research-skill.agent.md b/.steering/agents/research-skill.agent.md new file mode 100644 index 0000000..c1c7e33 --- /dev/null +++ b/.steering/agents/research-skill.agent.md @@ -0,0 +1,47 @@ +--- +name: research-skill +description: "Researches an agent skill published in a git repository from a web URL and writes a structured research note. Usage: /research-skill " +tools: ["read", "search", "edit", "browser"] +--- + +You are a **skill packaging researcher**. For `/research-skill `: + +## Core Principles + +**Think Before Acting** — Parse the URL and confirm it points at a directory that plausibly contains a skill (typically a `SKILL.md` and optional `references/`, `scripts/`, `assets/`). If not, stop and ask for clarification. + +**Simplicity First** — Populate only fields you can verify from live sources. Leave fields blank rather than guessing. + +**Surgical Output** — Write exactly one research note file. Do not create, modify, or delete anything else. + +**Goal-Driven** — Success = a valid `.md` file at `.steering/skills/__.md` with all resolvable fields filled in. Use a stable `namespace` derived from the host and project (e.g. org, group, or `host__org` if needed for uniqueness). Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. If normalization would produce an empty value, stop and ask for clarification. + +## Repo template (required) + +Before researching the remote skill, **read the local skill-template spec** in this workspace: `.steering/templates/skill.md` (canonical), or the same content at `.github/skills/skill-research/skill-template.md`, `.claude/skills/skill-template/SKILL.md`, or `.cursor/skills/skill-template/SKILL.md`. Use its vocabulary and rules when you interpret the upstream skill and when you write the research note. + +## GitHub Copilot Agent Skills (steering reference) + +![[github-copilot/Skills]] + +## Steps + +1. **Parse the URL** to determine git host, repository coordinates, branch/ref if present, and the path to the skill directory inside the repo. Examples of shapes (not exhaustive): + - Web UI links to a folder in a repo (blob/tree URLs). + - Raw or API URLs if that is what the user provided — normalize to something you can fetch. +2. **Research with live tools** — Prefer repository/file access where available (e.g. configured repository MCP for supported hosts), plus DeepWiki and Context7 when they add signal. Do not rely on stale training data: + - Read `SKILL.md` in the skill directory for description, capabilities, and instructions. + - List supporting files (templates, configs, assets). + - Read the repository README or docs for ecosystem context when relevant. + - Look for agent definitions or automation that reference this skill. + - Use DeepWiki for a structured repository summary when available. +3. Generate the research note **using the structure implied by `skill-template.md`**, at minimum: + - **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template’s fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields per the template. + - **Skill instructions** — Concise summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. + - **Directory structure** — What exists on disk vs the template’s recommended layout (`scripts/`, `references/`, `assets/`, etc.). + - **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items from the template apply; any follow-ups for the maintainer. + - **Sources** — URLs and paths you relied on. +4. Write to `.steering/skills/__.md` using normalized file-safe slugs only. +5. Align tone and headings with existing notes in `.steering/skills/` when that improves consistency. + +Output ONLY the file path on completion. diff --git a/.steering/agents/sync-agents.md b/.steering/agents/sync-agents.md new file mode 100644 index 0000000..cdd0fce --- /dev/null +++ b/.steering/agents/sync-agents.md @@ -0,0 +1,55 @@ +--- +name: sync-agents +description: Replicates .steering/agents into .cursor/agents, .claude/agents, and .github/agents. Strips Copilot-only YAML from Cursor/Claude copies. Use after editing agent files under .steering or after merging IDE agent edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication of **agent definitions only**. + +## Source of truth + +**`.steering/agents/`** holds canonical agent files (including **GitHub Copilot** frontmatter such as `tools:` and `mcp-servers:` when present). + +## `AGENTS.md` at repo root (optional) + +- **Starter template:** `.steering/templates/AGENTS.md` — copy to the **repository root** as **`AGENTS.md`** and customize. It nudges agents to **use skills** (read `SKILL.md` when the task matches a skill’s `description`) and **use MCPs when appropriate** (check tool schemas, prefer fresh docs/data over guessing). Extended **Core Principles** live in `.steering/templates/agent.md` (singular) for optional embeds. +- **Not part of sync output** — This agent (`sync-agents`) does **not** copy `AGENTS.md` into `.cursor/`, `.claude/`, or `.github/`. Only `*.agent.md` files under `.steering/agents/` replicate to the three `agents/` mirrors. Treat root `AGENTS.md` as a separate, human-maintained file (optionally derived from the template once). +- **When the user wants repo-wide agent guidance** — Point them at the template, or create/update root `AGENTS.md` from it if they ask you to. + +## Replication rules + +1. **Build step (Obsidian embeds)** — In each `.steering/agents/*.md` **body** (after the first YAML frontmatter), expand wiki-style embeds allowed for that **output**: + - **Default:** only embeds whose path starts with **`templates/`** (optional **`#Heading`** to inline a single `## Heading` section). Paths resolve under **`.steering/`**. Embed syntax is Obsidian’s wiki link with brackets (see steering README); do not put illustrative embed examples in agent bodies as literal bracket pairs or the CI build will try to expand them. + - **`research-skill.agent.md` only:** embeds whose path starts with **`github-copilot/`** are expanded **only** when writing **`.cursor/agents/research-skill.agent.md`** (full body after that file’s YAML frontmatter, same rules as `templates/`). For **`.github/agents/`** and **`.claude/agents/`**, replace those embeds with a short blockquote pointing at **`.steering/github-copilot/Skills.md`** so mirrors stay small and Obsidian syntax never ships to Copilot Cloud. + - With `#Heading`, include only the `## Heading` section: from that heading until the next `## `, an `---` line on its own, or an `# ` H1. + - With no `#`, inline the file body after its first YAML frontmatter (if any). + - Repeat until no eligible embeds remain (bounded iterations). Missing files or headings become HTML comments in the built output. + +2. **`.github/agents/`** — Write the **built** agent (embeds expanded per rules above), **same basename**. + +3. **`.cursor/agents/`** and **`.claude/agents/`** — **Built** output can differ per file (see `research-skill` above); then remove Copilot-only keys from the YAML **between the first pair of `---` lines**: + - Remove the entire **`tools:`** line (e.g. `tools: ["read", "search", "edit", "browser"]`). + - Remove the entire **`mcp-servers:`** key and **all following lines that belong to that block** (indented lines and blank lines until the next top-level frontmatter key at column 0, or the closing `---`). + + Cursor and Claude agent formats use **`name`** and **`description`** (and the markdown body); they do not use Copilot `tools` / `mcp-servers`. + +4. After stripping, `name` / `description` / body should still form valid frontmatter + body. + +Do **not** change packaged skills (`skills/`), skill templates, or any path outside the three `agents/` directories as part of this task. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching file under `.steering/agents/`** (the canonical file may include Copilot keys for `.github`). Then apply the replication rules above. + +## Steps + +1. Build agents (expand template and `github-copilot/` embeds per rules above), then write `.github/agents/`, then write `.cursor/agents/` and `.claude/agents/` with Copilot YAML stripped. +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** applies the same rules (expand embeds → `.github/agents/`, then strip → `.cursor/agents/` / `.claude/agents/`). If only agents were synced here, CI can still fail until skills and templates match `.steering` too — use the **sync-skills** agent (or replicate those paths yourself) for a full pass. + +## Principles + +Minimal scope: only touch `.steering/agents/` and the three mirrored `agents/` trees. No drive-by edits elsewhere. diff --git a/.steering/agents/sync-skills.md b/.steering/agents/sync-skills.md new file mode 100644 index 0000000..66f154c --- /dev/null +++ b/.steering/agents/sync-skills.md @@ -0,0 +1,39 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Use after editing .steering or after merging IDE edits back into .steering. +--- + +You are a maintainer agent for **steering → IDE** replication. + +## Source of truth + +**`.steering/`** holds canonical **agents** (`agents/`) and **packaged skills** (`skills//SKILL.md`), plus **`templates/skill.md`** (the skill spec). Packaged skills are **byte-identical** across `.cursor`, `.claude`, and `.github` **except** **`skill-research`**: **`![[github-copilot/...]]`** expands only in **`.cursor/skills/skill-research/`**; **`.github`** and **`.claude`** get a pointer to **`.steering/github-copilot/Skills.md`** instead. **Agents:** see **sync-agents** (includes the same **`github-copilot/`** rule for **`research-skill.agent.md`** on **`.cursor`** only). + +## Replication rules + +1. **Agents** — For each file in `.steering/agents/` (skip `README.md` if present): **build** (expand embeds under `templates/` per **sync-agents**), write to `.github/agents/` (same basename). For `.cursor/agents/` and `.claude/agents/`, use that **built** file and strip from the opening frontmatter: the **`tools:`** line, and the **`mcp-servers:`** key plus its nested block (indented lines until the next top-level key at column 0 or the closing `---`). +2. **Packaged skills** — For each directory `.steering/skills//` that contains `SKILL.md`: **build** (expand **`templates/`** embeds in the body for all destinations; for **`skill-research`** also expand **`github-copilot/`** only in **`.cursor/skills/skill-research/`**, else substitute the Copilot Skills pointer) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, and `.github/skills//SKILL.md`. Do **not** mirror flat `*.md` research notes directly under `.steering/skills/` (only subfolders with `SKILL.md`). +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to all of: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +Do **not** mirror `.steering/templates/AGENTS.md` or `.steering/templates/agent.md` to IDE folders. + +## If the user edited Cursor / Claude / GitHub copies + +Do **not** treat IDE paths as authoritative. **Merge those edits into the matching path under `.steering`**, then perform the three replication rules above so every mirror is overwritten from `.steering`. + +## Steps + +1. Apply the replication rules (agents, packaged skills, template mirrors). +2. Run `git diff` and summarize what changed (if anything). +3. **Do not** `git commit` or `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** in GitHub Actions runs the same replication logic and **fails** if `git diff` is non-empty afterward. + +## Principles + +Minimal scope: only touch the paths in the replication rules. No drive-by edits elsewhere. diff --git a/.steering/cursor/Agents.md b/.steering/cursor/Agents.md new file mode 100644 index 0000000..da76d6f --- /dev/null +++ b/.steering/cursor/Agents.md @@ -0,0 +1,114 @@ +--- +title: Cursor Agents +url: https://cursor.com/docs/subagents +tags: [cursor, agents, subagents, task-tool] +related: + - "[[cursor/Rules]]" + - "[[cursor/Skills]]" + - "[[cursor/Hooks]]" + - "[[github-copilot/Agents]]" +--- + +# Cursor Agents + +In Cursor’s documentation these are **subagents**—specialized assistants the **Cursor Agent** delegates to via the **Task** tool. This steering note parallels **`.steering/github-copilot/Agents.md`** (Copilot custom agents): same repo layout idea (**steering → `.cursor/agents/`**), different product surface. + +**Official reference:** [Subagents | Cursor Docs](https://cursor.com/docs/subagents) + +Each subagent runs in its **own context window**, returns a **final summary** to the parent, and fits **noisy or long-running work** (exploration, shell output, browser automation) without filling the main chat. + +## How this repo models Cursor agents + +| Layer | Role | +|--------|------| +| **Canonical source** | `.steering/agents/*.md` — edit here first. May include **GitHub Copilot–only** YAML (`tools:`, `mcp-servers:`) for `.github/agents/`. | +| **Cursor mirror** | `.cursor/agents/` — **built** from steering: template embeds under `templates/` are expanded; Copilot-only keys are **stripped** so Cursor sees `name`, `description`, and body. | +| **Claude / GitHub** | `.claude/agents/` (same strip as Cursor), `.github/agents/` (full YAML for Copilot). | + +Replication rules and CI behavior are documented in **`.steering/agents/sync-agents.md`** and **`.github/workflows/verify-steering-sync.yml`**. + +For **GitHub Copilot** custom agents (`.github/agents/`, `tools:`, `mcp-servers:`), see **`.steering/github-copilot/Agents.md`**. + +## File locations (Cursor) + +Per Cursor’s docs, custom subagents live in: + +| Scope | Path | +|--------|------| +| **Project** | `.cursor/agents/` (and optionally `.claude/agents/`, `.codex/agents/` for compatibility) | +| **User** | `~/.cursor/agents/` | + +Project agents override user agents when names conflict; `.cursor/` wins over `.claude/` / `.codex/` for the same name. + +**This repository** keeps the **authoritative** definitions under **`.steering/agents/`** and regenerates `.cursor/agents/` so the workspace stays in sync with steering. + +## File format + +Each agent is a **Markdown** file with **YAML frontmatter** (first `---` … `---` block), then the **system-style prompt** for that subagent. + +### Frontmatter fields (Cursor) + +| Field | Required | Purpose | +|--------|----------|---------| +| `name` | No | Identifier; defaults from filename. Lowercase and hyphens are typical. | +| `description` | No | Shown in Task hints; the parent agent uses this to choose **when** to delegate. | +| `model` | No | `inherit` (default), `fast`, or a specific model ID. See [models and pricing](https://cursor.com/docs/models-and-pricing). | +| `readonly` | No | If `true`, restricted writes (no edits / state-changing shell, per product behavior). | +| `is_background` | No | If `true`, non-blocking background run. | + +**Copilot-only keys** (`tools:`, `mcp-servers:`) are **not** part of Cursor’s subagent format; they live in steering for the **`.github/agents/`** mirror only and are removed for `.cursor/agents/`. + +### Example (Cursor-shaped, as in this repo’s mirrors) + +This matches the **stripped** shape under `.cursor/agents/` (see e.g. **`.cursor/agents/laravel-package.agent.md`**): + +```yaml +--- +name: laravel-package +description: "Researches Laravel packages and generates Obsidian notes. Usage: /laravel-package " +--- + +You are a Laravel package researcher… +``` + +### Example (steering source with Copilot YAML) + +Canonical files under **`.steering/agents/`** may include extra keys for GitHub (see **`.steering/agents/research-mcp.agent.md`**): + +```yaml +--- +name: research-mcp +description: "Researches an MCP server from a URL…" +tools: ["read", "search", "edit", "browser"] +--- +``` + +After sync, **`.cursor/agents/research-mcp.agent.md`** drops `tools:` and keeps `name`, `description`, and body. + +**Naming:** Cursor’s quick start uses names like `verifier.md`. This repo also uses **`.agent.md`** (e.g. `laravel-package.agent.md`) for parity with Copilot’s agent file convention; treat the **frontmatter `name`** as the stable identifier for `/name` invocation. + +## Behavior (summary from Cursor docs) + +- **Delegation** — The agent may spawn subagents automatically from task shape and **descriptions**, or you can invoke them with **`/subagent-name`** in the prompt. +- **Context** — Subagents do **not** see prior parent chat history; the parent must pass needed context in the task prompt. +- **Modes** — **Foreground** (wait for result) vs **background** (return immediately; resumable via agent id). +- **Built-ins** — **Explore**, **Bash**, and **Browser** are built-in subagents Cursor may use without custom files. + +## Agents vs skills + +Cursor positions **subagents** for isolated context, parallel workstreams, and multi-step specialization; **skills** are better for **single-shot, repeatable** actions. See [Skills](https://cursor.com/docs/skills) and **`.steering/cursor/Rules.md`** for rules/skill context. + +## Related in this repo + +| File | Why | +|------|-----| +| `.steering/agents/sync-agents.md` | How steering → `.cursor/agents/` build and strip works. | +| `.steering/agents/laravel-package.agent.md` | Full steering example (Copilot keys + embed). | +| `.cursor/agents/laravel-package.agent.md` | Cursor mirror after strip + embed expansion. | +| `.steering/github-copilot/Agents.md` | Copilot custom agents (cloud / VS Code). | + +## Resources + +- [Subagents](https://cursor.com/docs/subagents) — format, locations, model field, patterns. +- [Cloud Agents](https://cursor.com/docs/cloud-agent) — subagents in cloud workflows (Cursor docs). +- [Models and pricing](https://cursor.com/docs/models-and-pricing) — model IDs for `model:`. diff --git a/.steering/cursor/Hooks.md b/.steering/cursor/Hooks.md new file mode 100644 index 0000000..fa2fe61 --- /dev/null +++ b/.steering/cursor/Hooks.md @@ -0,0 +1,116 @@ +--- +title: Cursor Hooks +url: https://cursor.com/docs/hooks +tags: [cursor, hooks, agent-loop, stdio, governance] +related: + - "[[cursor/Agents]]" + - "[[cursor/Rules]]" + - "[[cursor/Skills]]" +--- + +# Cursor Hooks + +**Official reference:** [Hooks | Cursor Docs](https://cursor.com/docs/hooks) + +Hooks are **separate processes** Cursor runs at fixed points in the **agent loop** (and, with different events, for **Tab**). They talk to Cursor over **stdio** with **JSON** in both directions: they can **observe**, **block**, or **modify** behavior (format after edits, audit events, gate shells/MCP, inject session context, control **subagent / Task** execution, and more). + +Third-party hook configs (e.g. Claude Code) are discussed under [Third-party hooks](https://cursor.com/docs/reference/third-party-hooks). + +## How this repo relates to hooks + +| Topic | In this repository | +|--------|---------------------| +| **Config location** | Project hooks: **`.cursor/hooks.json`**. Scripts typically live under **`.cursor/hooks/`** (paths in JSON are relative to the **project root**). | +| **Steering** | This note lives under **`.steering/cursor/`** so the team has a **single place** to read how hooks work; it does **not** replace Cursor reading **`.cursor/hooks.json`** at runtime. | +| **Committed hooks** | There is **no** `hooks.json` in this repo today. Add one under **`.cursor/`** when you want team-shared behavior; document new hooks here or in a short `README` next to the scripts. | +| **Cloud Agents** | Per Cursor’s docs, **project** hooks committed under **`.cursor/hooks.json`** can run in **Cloud Agents**; team/enterprise-managed hooks do **not** yet. | + +For **who receives injected context** from hooks vs **subagent** boundaries, see **`.steering/cursor/Agents.md`** (subagents and the Task tool). + +## Where hooks live + +| Scope | Config | Scripts (typical) | +|--------|--------|-------------------| +| **Project** | `.cursor/hooks.json` | `.cursor/hooks/*.sh` (or `node`/`bun`/`python`, etc.) | +| **User (global)** | `~/.cursor/hooks.json` | `~/.cursor/hooks/*` | + +Cursor **reloads** hook config when those files change. + +**Path rule:** Docs often show `./hooks/...` for **user** hooks (cwd `~/.cursor/`). For **project** hooks, use **`.cursor/hooks/...`** because the process cwd is the **repository root**. + +## Config shape (minimal) + +```json +{ + "version": 1, + "hooks": { + "afterFileEdit": [{ "command": ".cursor/hooks/format.sh" }] + } +} +``` + +Each event maps to an array of hook entries. Entries can be **command-based** (default) or **prompt-based** (LLM-evaluated policy). + +## Hook kinds + +### Command-based (default) + +- **stdin:** JSON payload for the event. +- **stdout:** JSON response (when the hook mutates or signals permission). +- **Exit code:** `0` = success (use stdout JSON); `2` = **block** (same as denying in JSON); other = hook failure, action usually **proceeds** (fail-open unless docs say otherwise for your version). + +Optional fields on an entry include **`timeout`**, **`matcher`** (e.g. filter shell commands), and **`type`** for non-default behaviors. + +### Prompt-based + +Set `"type": "prompt"` with a **`prompt`** string; Cursor uses a **fast model** to return structured allow/deny style results. See the official doc for **`$ARGUMENTS`** and optional **`model`**. + +## Agent vs Tab events + +**Agent** (Cmd+K / Agent chat) and **Tab** (inline completions) use **different** hook names. + +**Agent (representative set from Cursor docs):** + +| Direction | Examples | +|-----------|-----------| +| Session | `sessionStart`, `sessionEnd` | +| Tools | `preToolUse`, `postToolUse`, `postToolUseFailure` | +| Subagents | `subagentStart`, `subagentStop` | +| Shell | `beforeShellExecution`, `afterShellExecution` | +| MCP | `beforeMCPExecution`, `afterMCPExecution` | +| Files | `beforeReadFile`, `afterFileEdit` | +| Prompt / loop | `beforeSubmitPrompt`, `preCompact`, `stop`, `afterAgentResponse`, `afterAgentThought` | + +**Tab:** + +- `beforeTabFileRead` +- `afterTabFileEdit` + +Use Tab hooks when policy for **autonomous inline edits** should differ from **explicit Agent** work. + +## Examples (official doc patterns) + +The Cursor doc ships full snippets for: + +- **Audit logging** — append stdin JSON to a log in `afterFileEdit` / `beforeShellExecution` / etc. +- **Shell gating** — parse `.command` with `jq`, return `permission: deny|ask|allow` JSON from `beforeShellExecution`. +- **`stop` hook** — TypeScript/Bun example: persist metrics, optional telemetry HTTP, `followup_message` for automated retry messaging. +- **`beforeShellExecution`** — Python example: guard `kubectl`-style flows with structured parsing. + +Use those as **copy-paste starting points**; keep project paths under **`.cursor/hooks/`**. + +**Partner integrations** for security/governance/secrets are linked from the [Hooks doc § Partner integrations](https://cursor.com/docs/hooks#partner-integrations). + +## Related in this repo + +| File | Why | +|------|-----| +| `.steering/cursor/Agents.md` | Subagents (Task tool) and how they differ from hook-injected context. | +| `.steering/cursor/Rules.md` | Cursor **rules** (`.cursor/rules`) — complementary to hooks, not the same mechanism. | +| `.steering/agents/sync-agents.md` | Agent **markdown** mirroring from steering; unrelated to `hooks.json`, but often configured in the same product. | + +## Resources + +- [Hooks](https://cursor.com/docs/hooks) — full event list, JSON schemas, blocking semantics, examples. +- [Third-party hooks](https://cursor.com/docs/reference/third-party-hooks) — Claude Code and compatibility. +- [Cloud Agent](https://cursor.com/docs/cloud-agent) — where project hooks run in the cloud. diff --git a/.steering/cursor/Plugins.md b/.steering/cursor/Plugins.md new file mode 100644 index 0000000..5200085 --- /dev/null +++ b/.steering/cursor/Plugins.md @@ -0,0 +1,103 @@ +--- +title: Cursor Plugins +url: https://cursor.com/docs/plugins +tags: [cursor, plugins, marketplace, manifest, skills, rules] +related: + - "[[cursor/Rules]]" + - "[[cursor/Skills]]" + - "[[cursor/Hooks]]" + - "[[cursor/Agents]]" + - "[[github-copilot/Skills]]" +--- + +# Cursor Plugins + +**Official reference:** [Plugins | Cursor Docs](https://cursor.com/docs/plugins) · **Creating plugins:** [§ Creating plugins](https://cursor.com/docs/plugins#creating-plugins) · **Manifest & schema:** [Plugins reference](https://cursor.com/docs/reference/plugins) + +Plugins are **distributable bundles** that package **rules**, **skills**, **agents**, **commands**, **MCP servers**, and **hooks** so teams can share one installable unit. Discovery: [Cursor Marketplace](https://cursor.com/marketplace) (official, reviewed) and [cursor.directory](https://cursor.directory) (community / MCP listings). + +## What a plugin can contain + +| Component | Role | +|-----------|------| +| **Rules** | Persistent guidance (`.mdc` under `rules/`) | +| **Skills** | Packaged agent capabilities (`skills//SKILL.md`) | +| **Agents** | Custom agent definitions | +| **Commands** | Agent-executable command files | +| **MCP servers** | MCP configuration (e.g. `mcp.json`) | +| **Hooks** | Hook automation wired like project hooks | + +Components are **discovered** from conventional folders unless the manifest overrides paths (see the reference doc). + +## Layout (minimal mental model) + +From Cursor’s docs and [plugin template](https://github.com/cursor/plugin-template): + +```text +my-plugin/ +├── .cursor-plugin/ +│ └── plugin.json # required manifest (at least `name`) +├── rules/ +│ └── coding-standards.mdc +├── skills/ +│ └── code-reviewer/ +│ └── SKILL.md +└── mcp.json # optional, when bundling MCP +``` + +**Manifest example** (only `name` is required; more fields for marketplace metadata): + +```json +{ + "name": "my-plugin", + "description": "Custom development tools", + "version": "1.0.0", + "author": { "name": "Your Name" } +} +``` + +For **multi-plugin repos**, Cursor documents a **`.cursor-plugin/marketplace.json`** at the repo root. Submission: [cursor.com/marketplace/publish](https://cursor.com/marketplace/publish). + +## Local development + +1. Put the plugin under **`~/.cursor/plugins/local//`** with **`.cursor-plugin/plugin.json`** at that folder’s root. +2. **Restart** Cursor or **Developer: Reload Window**. +3. For fast iteration, **symlink** your repo into `~/.cursor/plugins/local/`. + +Security note: marketplace plugins are **manually reviewed** and expected to be **open source**; see [Marketplace security](https://cursor.com/help/security-and-privacy/marketplace-security). + +## Team / Enterprise marketplaces + +On **Teams** and **Enterprise**, admins can add **team marketplaces** (import a GitHub repo, assign **required** vs **optional** plugins to distribution groups). **Enterprise** can use **SCIM**-synced groups. Flow: **Dashboard → Settings → Plugins → Team Marketplaces**. Example template repo: [fieldsphere/cursor-team-marketplace-template](https://github.com/fieldsphere/cursor-team-marketplace-template). + +## Install & runtime notes + +- **Scopes:** Plugins can be **project-scoped** or **user-level** (per docs). +- **MCP:** Toggle bundled servers under **Settings → Features → Model Context Protocol**. **Install deeplinks:** [MCP install links](https://cursor.com/docs/mcp/install-links) (`cursor://…/mcp/install?…`). +- **Rules / skills:** Managed under **Rules** in Settings (Always / Agent Decides / Manual); skills also **`/skill-name`** in chat. +- **Extensions:** `vscode.cursor.plugins.registerPath()` can register plugin directories from a VS Code extension (see docs § Using the Extension API). + +## How this repo relates to plugins + +| Topic | In this repository | +|--------|---------------------| +| **Cursor plugin bundle** | There is **no** committed **`my-plugin/.cursor-plugin/`** tree here. Capabilities are maintained as **steering sources** (e.g. **`.steering/skills/`**, **`.steering/agents/`**) and **mirrored** into **`.cursor/`** / **`.github/`** by sync rules — that is **repo layout**, not a Marketplace plugin zip/git product. | +| **Overlap** | If you later **publish** a plugin, you can reuse the same **SKILL.md** / agent shapes; compare with **`.steering/templates/skill.md`** and **`.steering/agents/sync-agents.md`**. | +| **Copilot skills** | GitHub’s cloud “skills” story is separate; see **`.steering/github-copilot/Skills.md`** for how this repo thinks about Copilot vs local Cursor assets. | + +## Related in this repo + +| File | Why | +|------|-----| +| `.steering/cursor/Rules.md` | Rules often ship inside plugins (`rules/*.mdc`). | +| `.steering/cursor/Hooks.md` | Hooks can be bundled; project hooks also use `.cursor/hooks.json`. | +| `.steering/cursor/Agents.md` | Agents can be bundled as plugin components. | +| `.steering/skills/sync-skills/SKILL.md` (or `agents/sync-skills.md`) | How **steering** replicates skills/agents into IDE paths (parallel concern to “install a plugin”). | +| `.steering/github-copilot/Skills.md` | Copilot cloud skills vs Cursor plugin skills. | + +## Resources + +- [Plugins](https://cursor.com/docs/plugins) — marketplace, teams, install, creating plugins. +- [Plugins reference](https://cursor.com/docs/reference/plugins) — full manifest, paths, checklist. +- [Plugin template (GitHub)](https://github.com/cursor/plugin-template) — starter tree. +- [Publish](https://cursor.com/marketplace/publish) — submission. diff --git a/.steering/cursor/Rules.md b/.steering/cursor/Rules.md new file mode 100644 index 0000000..0264b29 --- /dev/null +++ b/.steering/cursor/Rules.md @@ -0,0 +1,120 @@ +--- +title: Cursor Rules +url: https://cursor.com/docs/rules +tags: [cursor, rules, project-rules, agents-md, context] +related: + - "[[cursor/Agents]]" + - "[[cursor/Skills]]" + - "[[cursor/Hooks]]" + - "[[cursor/Plugins]]" + - "[[github-copilot/Agents]]" +--- + +# Cursor Rules + +**Official reference:** [Rules | Cursor Docs](https://cursor.com/docs/rules) + +**Rules** inject **persistent, reusable instructions** into the **Agent (Chat)** context. They are not “memory” for the model; they are **prepended** (or selectively included) so the agent gets consistent project or org guidance. + +**Important:** Per Cursor’s docs, rules **do not** apply to **Cursor Tab** (inline completions) or other non–Agent Chat surfaces. **User Rules** also **do not** apply to **Inline Edit (Cmd/Ctrl+K)**. + +## The four rule sources + +| Kind | Where | Notes | +|------|--------|--------| +| **Project rules** | **`.cursor/rules/`** | Version-controlled; `.md` or **`.mdc`** (frontmatter for `description`, `globs`, `alwaysApply`). | +| **User rules** | **Cursor Settings → Rules** | Global across projects; good for tone and personal defaults. | +| **Team rules** | **Cursor dashboard** (Team / Enterprise) | Org-wide; can be **enforced**; supports optional **glob** scoping. | +| **`AGENTS.md`** | Project **root** and/or **nested** dirs | Plain markdown, no rule frontmatter; simpler alternative to `.cursor/rules`. | + +**Precedence** when guidance conflicts: **Team Rules → Project Rules → User Rules** (earlier wins). All applicable rules are **merged**. + +## Project rules (`.cursor/rules`) + +**Purpose:** Domain knowledge, architecture choices, workflows, and standards **specific to this codebase**. + +**Layout** (from Cursor docs): + +```text +.cursor/rules/ + react-patterns.mdc # frontmatter: description, globs, alwaysApply + api-guidelines.md # simple markdown + frontend/ + components.md +``` + +### How a rule is applied (rule “type”) + +Controlled via the UI (type dropdown) mapping to **`description`**, **`globs`**, **`alwaysApply`**: + +| Mode | Behavior | +|------|-----------| +| **Always Apply** | Every Agent chat in the project. | +| **Apply Intelligently** | Agent uses **`description`** to decide relevance. | +| **Apply to Specific Files** | When context matches **`globs`**. | +| **Apply Manually** | When **`@`-mentioned** in chat (e.g. `@my-rule`). | + +### Frontmatter example + +```markdown +--- +description: "Standards for frontend components and API validation" +alwaysApply: false +--- + +- Use … +``` + +With **`.mdc`**, you can also set **`globs:`** for path-scoped rules (see official doc for full shape). + +### Creating rules + +- Chat: **`/create-rule`** — Agent drafts the file under **`.cursor/rules/`**. +- Settings: **Cursor Settings → Rules, Commands → + Add Rule**. + +## `AGENTS.md` + +- Place at **repo root** (and optionally in **subdirectories**) for **directory-scoped** stacking; nested files combine with parents, **more specific wins**. +- **No** rule frontmatter — just readable markdown sections (style, architecture, commands to prefer, etc.). +- Cursor positions this as a **lighter** option when **`.cursor/rules`** is more than you need. + +**This repository** does not currently commit a root **`AGENTS.md`**; if you add one, keep it focused and point to canonical docs (e.g. **`.steering/README.md`**) instead of duplicating long policy. + +## Team rules (summary) + +Admins manage rules in the **dashboard**; options include **enable immediately**, **enforce** (users cannot disable), and **glob** patterns (e.g. `**/*.py`) to limit scope. Team rules apply **across repos** for that team when enabled. See [Enterprise](https://cursor.com/docs/enterprise) and the Rules doc § Team Rules. + +## Importing rules + +**Remote rules (GitHub):** **Settings → Rules, Commands → + Add Rule → Remote Rule (GitHub)** with a repo URL; Cursor **syncs** updates from the remote. + +## Best practices (from Cursor) + +- Keep rules **short** (under **~500 lines**); split into composable files. +- Prefer **references** (`@file.ts`) over pasting large bodies that go stale. +- Avoid duplicating generic tool knowledge (npm, git, pytest) or whole style guides—use **linters** where appropriate. +- **Commit** project rules so the team shares them; iterate when the agent repeats the same mistake. + +## How this repo relates to rules + +| Topic | In this repository | +|--------|---------------------| +| **`.cursor/rules/`** | Not present in the committed tree today. Add it when you want **path-scoped** or **@mention** rules alongside mirrored **skills** and **agents**. | +| **Steering** | Long-form human docs and templates live under **`.steering/`** (e.g. **`.steering/cursor/*.md`**, **`.steering/templates/`**). That is **documentation and source-of-truth text**, not automatically loaded as Cursor Rules unless you copy or symlink into **`.cursor/rules/`** or summarize into **`AGENTS.md`**. | +| **Plugins** | Rules can ship inside a **plugin** (`rules/*.mdc`); see **`.steering/cursor/Plugins.md`**. | +| **Hooks** | **Hooks** observe/control the loop; **rules** shape prompt content. Complementary; see **`.steering/cursor/Hooks.md`**. | + +## Related in this repo + +| File | Why | +|------|-----| +| `.steering/cursor/Agents.md` | Subagents vs **skills** vs rules — different mechanisms. | +| `.steering/cursor/Plugins.md` | Bundling rules for distribution. | +| `.steering/github-copilot/Agents.md` | Copilot’s `.github/agents/` story vs Cursor rules + agents. | +| User **create-rule** skill (if you install one) | Some teams use a packaged skill to scaffold **`.cursor/rules`** files; this repo does not ship that skill by default. | + +## Resources + +- [Rules](https://cursor.com/docs/rules) — types, frontmatter, AGENTS.md, Team Rules, FAQ. +- [Enterprise](https://cursor.com/docs/enterprise) — team content and enforcement context. +- [Plugins](https://cursor.com/docs/plugins) — shipping rules in plugins. diff --git a/.steering/cursor/Skills.md b/.steering/cursor/Skills.md new file mode 100644 index 0000000..a71e567 --- /dev/null +++ b/.steering/cursor/Skills.md @@ -0,0 +1,120 @@ +--- +title: Cursor Agent Skills +url: https://cursor.com/docs/skills +tags: [cursor, skills, SKILL.md, agentskills, progressive-disclosure] +related: + - "[[cursor/Rules]]" + - "[[cursor/Agents]]" + - "[[cursor/Plugins]]" + - "[[github-copilot/Skills]]" +--- + +# Cursor Agent Skills + +**Official reference:** [Agent Skills | Cursor Docs](https://cursor.com/docs/skills) · **Open standard:** [agentskills.io](https://agentskills.io) + +**Skills** are portable, file-based packages that teach **Agent (Chat)** how to do a **focused task** (workflows, conventions, checklists). They can ship **scripts**, **references**, and **assets** the agent uses via tools. Cursor **discovers** them at startup and usually includes them when context suggests relevance; users can also invoke **`/skill-name`** manually. + +## Skills vs rules vs subagents + +| Mechanism | Typical use | +|-----------|-------------| +| **Rules** | Always-on or glob-scoped **policy** and project norms (see **`.steering/cursor/Rules.md`**). | +| **Skills** | **Procedure packs**—steps, examples, optional scripts—loaded **progressively** when relevant. | +| **Subagents** | **Separate context windows** for heavy exploration, shell noise, or parallel work (see **`.steering/cursor/Agents.md`**). | + +Cursor’s subagents doc includes a **when to use subagents vs skills** table; prefer skills for **single-shot, repeatable** playbooks when you do **not** need isolation. + +## Where Cursor loads skills from + +| Location | Scope | +|----------|--------| +| **`.cursor/skills/`** | Project | +| **`.agents/skills/`** | Project (alternate layout in docs) | +| **`~/.cursor/skills/`** | User (global) | + +**Compatibility paths** (also scanned): **`.claude/skills/`**, **`.codex/skills/`**, and the matching **`~/.claude/`** / **`~/.codex/`** trees. + +Each skill is a **directory** whose name matches the skill **`name`** in frontmatter, containing **`SKILL.md`** at its root. + +## Directory layout + +```text +my-skill/ +├── SKILL.md +├── scripts/ # optional +├── references/ # optional +└── assets/ # optional +``` + +Keep **`SKILL.md`** lean; put long prose in **`references/`** so the agent can load it **on demand**. + +## `SKILL.md` format + +YAML frontmatter + markdown body. Minimal shape (from Cursor docs): + +```markdown +--- +name: my-skill +description: What it does and when to use it (helps the model choose it). +--- + +# My Skill +… +``` + +### Frontmatter fields (Cursor) + +| Field | Required | Notes | +|--------|----------|--------| +| `name` | Yes | Lowercase letters, numbers, hyphens; **must match the parent folder name**. | +| `description` | Yes | Used for **relevance** and discovery; include trigger keywords. | +| `license` | No | | +| `compatibility` | No | Environment / tooling assumptions. | +| `metadata` | No | Arbitrary key-value map. | +| `disable-model-invocation` | No | If **`true`**, only applies when the user runs **`/skill-name`** (no automatic inclusion). | + +**Repo spec:** This project’s **`allowed-tools`** and stricter field notes live in **`.steering/templates/skill.md`** (mirrored into **`.cursor/skills/skill-template/SKILL.md`** for authoring). + +## Discovery and UI + +- Agent sees available skills and **decides** when to apply them (unless `disable-model-invocation: true`). +- **Manual:** type **`/`** in Agent chat and pick the skill. +- **Settings:** **Cursor Settings → Rules** → skills appear under **Agent Decides** (per Cursor docs). + +## GitHub install + +Cursor documents importing from GitHub via **Settings → Rules → Add Rule → Remote Rule (GitHub)** with a repository URL (same flow as remote rules). See the Skills doc for the exact steps in your Cursor version. + +## Migrating rules/commands → skills + +Built-in **`/migrate-to-skills`** (Cursor **2.4+**) converts eligible **dynamic rules** and **slash commands** into **`.cursor/skills/`** folders. Rules with **`alwaysApply: true`** or **`globs`** stay as rules; **user rules** are not migrated. Details in [Agent Skills](https://cursor.com/docs/skills) § migrating. + +## How this repo models skills + +| Layer | Role | +|--------|------| +| **Canonical source** | **`.steering/skills//SKILL.md`** — edit packaged skills here first. | +| **Mirrors** | **Byte-identical** copies under **`.cursor/skills//`**, **`.claude/skills//`**, **`.github/skills//`** (see **`.steering/agents/sync-skills.md`** and **`.github/workflows/verify-steering-sync.yml`**). | +| **Spec / template** | **`.steering/templates/skill.md`** → also copied to **`skill-template`** paths and **`.github/skills/skill-research/skill-template.md`**. | +| **Research notes** | Flat **`.steering/skills/*.md`** (e.g. `__.md`) are **not** mirrored as packaged skills—only folders containing **`SKILL.md`**. | + +**Packaged skills in steering today** (examples): `sync-agents`, `sync-skills`, `agentic-programming`, `skill-research`, `laravel-research`. + +**Plugins:** Skills can ship inside a Cursor **plugin**; see **`.steering/cursor/Plugins.md`**. + +## Related in this repo + +| File | Why | +|------|-----| +| `.steering/templates/skill.md` | Field-level spec and layout for new **`SKILL.md`** files. | +| `.steering/agents/sync-skills.md` | Maintainer agent: replication rules for skills + agents + template. | +| `.steering/skills/sync-skills/SKILL.md` | Human-oriented steps to run sync locally. | +| `.steering/github-copilot/Skills.md` | **GitHub Copilot** cloud skills vs **Cursor** project skills. | + +## Resources + +- [Agent Skills (Cursor)](https://cursor.com/docs/skills) — directories, frontmatter, scripts, migration. +- [agentskills.io](https://agentskills.io) — open specification. +- [Rules](https://cursor.com/docs/rules) — how rules and skills appear together in Settings. +- [Subagents](https://cursor.com/docs/subagents) — delegation vs skills. diff --git a/.steering/github-copilot/Agent MCP.md b/.steering/github-copilot/Agent MCP.md new file mode 100644 index 0000000..d07aa9b --- /dev/null +++ b/.steering/github-copilot/Agent MCP.md @@ -0,0 +1,123 @@ +--- +title: Extending Copilot Cloud Agent with MCP +url: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/extend-cloud-agent-with-mcp +status: Public Preview +tags: [copilot, mcp, agents, cloud-agent] +related: [[github-copilot/Agents]], [[github-copilot/Skills]] +--- + +# Extending GitHub Copilot Cloud Agent with Model Context Protocol (MCP) + +Repository admins can configure MCP servers via JSON in repo settings. Org/enterprise admins can use YAML in custom agents. + +## Prerequisites +- Understand [MCP and Cloud Agent](https://docs.github.com/en/copilot/concepts/agents/cloud-agent/mcp-and-cloud-agent) + +## Adding MCP Config to Repository +1. Repo → **Settings** → **Copilot** → **MCP** +2. Paste JSON config in **MCP Servers** field + +![Repo Settings Screenshot](https://docs.github.com/assets/cb-28260/images/help/repository/repo-actions-settings.png) + +## JSON Configuration Format +```json +{ + "mcpServers": { + "sentry": { + "command": "npx", + "args": ["-y", "@sentry/mcp-server-sentry"], + "env": { + "SENTRY_DSN": "$SENTRY_DSN" + } + }, + "notion": { + "type": "sse", + "url": "https://your-notion-mcp-server.com/sse", + "headers": { + "Authorization": "Bearer $NOTION_TOKEN" + }, + "tools": ["list_databases", "read_page"] + } + } +} +``` + +### Server Types +| Type | Config Keys | Example | +|------|-------------|---------| +| Local (command) | `command`, `args[]`, `env`, `cwd`, `tools[]` | `npx @sentry/mcp-server-sentry` | +| Remote SSE | `type: "sse"`, `url`, `headers`, `tools[]` | Cloudflare SSE endpoint | +| Remote Streamable HTTP | `type: "streamable-http"`, `url`, `headers`, `tools[]` | OAuth not supported | + +## Variable Substitution +| Syntax | Example | +|--------|---------| +| `$VAR` | `$COPILOT_MCP_API_KEY` | +| `${VAR}` | `${COPILOT_MCP_API_KEY}` | +| `${VAR:-default}` | `${COPILOT_MCP_API_KEY:-fallback}` | + +## Environment Secrets +- Repo: **Settings** → **Secrets and variables** → **Actions** → New secret (`COPILOT_MCP_*`) +- Auto-injected for local MCP servers + +## Examples +### Sentry +```json +{ + "mcpServers": { + "sentry": { + "command": "npx", + "args": ["-y", "@sentry/mcp-server-sentry"], + "env": { "SENTRY_DSN": "$SENTRY_DSN" }, + "tools": ["*"] + } + } +} +``` + +### Notion +```json +{ + "mcpServers": { + "notion": { + "command": "npx", + "args": ["-y", "notion-mcp-server"], + "env": { "NOTION_API_KEY": "$NOTION_API_KEY" } + } + } +} +``` + +### Azure (via workflow OIDC) +Update `copilot-setup-steps.yml` for Azure login. + +### Cloudflare +```json +{ + "mcpServers": { + "cloudflare": { + "type": "sse", + "url": "https://docs.mcp.cloudflare.com/sse", + "tools": ["*"] + } + } +} +``` + +### Azure DevOps / Atlassian +Similar command/env setups; see docs for auth (OIDC/API tokens). + +## Reusing VS Code MCP Config +- Copy from `.vscode/mcp.json` or `settings.json` +- Add `tools: ["*"]` or specific tools +- Adapt env vars to repo secrets + +## Validation & Warnings +- **Autonomous Tools**: Copilot may call tools without explicit instruction +- **Read-Only Recommended**: Avoid destructive actions +- **No OAuth Remotes**: Only basic auth/headers/tokens +- **GitHub MCP**: Repo owners can customize via `.github/mcp.json` + +## Resources +- [Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/extend-cloud-agent-with-mcp) +- Related: [[github-copilot/Agents]], [[github-copilot/Skills]], [[github-copilot/Memories]] \ No newline at end of file diff --git a/.steering/github-copilot/Agentic Workflows.md b/.steering/github-copilot/Agentic Workflows.md new file mode 100644 index 0000000..e9b2361 --- /dev/null +++ b/.steering/github-copilot/Agentic Workflows.md @@ -0,0 +1,103 @@ +--- +title: GitHub Agentic Workflows +url: https://github.blog/ai-and-ml/automate-repository-tasks-with-github-agentic-workflows/ +feature_status: Technical preview +tags: + - github-copilot + - agentic-workflows + - github-actions + - continuous-ai + - gh-aw +related: + - "[[github-copilot/Agents]]" + - "[[github-copilot/Skills]]" + - "[[github-copilot/Settings]]" +gh_aw_hub: https://github.github.com/gh-aw/ +--- + +# GitHub Agentic Workflows + +**Primary announcement:** [Automate repository tasks with GitHub Agentic Workflows](https://github.blog/ai-and-ml/automate-repository-tasks-with-github-agentic-workflows/) (GitHub Blog, Feb 2026) + +**Product / docs hub:** [github.github.com/gh-aw](https://github.github.com/gh-aw/?utm_source=blog-agentic-workflows-cta&utm_medium=blog&utm_campaign=agentic-workflows-tech-preview-feb-2026) + +Agentic Workflows are **intent-driven automations** that run on **GitHub Actions** using **coding agents**. You author **plain Markdown** (plus YAML frontmatter) checked into **`.github/workflows/`**; GitHub compiles a paired **lock file** and executes the run with **sandboxing**, **tool allowlists**, and **safe outputs** so repository changes stay **reviewable**. + +They are **not** a replacement for deterministic **CI/CD** (build, test, release). They extend automation to **subjective, repetitive** repo work—triage, docs drift, test gaps, CI triage, reports—alongside existing YAML workflows. + +## Mental model + +| Idea | Detail | +|------|--------| +| **Authoring** | Markdown describes **goals**; frontmatter pins **triggers**, **permissions**, **tools**, and **safe outputs**. | +| **Execution** | Standard **GitHub Actions** infrastructure: logging, auditing, permissions, isolation. | +| **Engines** | Configurable **coding agent** backends (e.g. **Copilot CLI**, **Claude Code**, **OpenAI Codex**) per [engines reference](https://github.github.com/gh-aw/reference/engines/). | +| **Outputs** | Writes default to **read-only**; mutating GitHub effects go through **safe outputs** (e.g. open a PR, comment on an issue)—mapped, pre-approved-style operations—not silent repo mutation. | + +Official **security / threat model:** [Architecture introduction](https://github.github.com/gh-aw/introduction/architecture/). + +## Files on disk + +For each workflow you typically commit **two** files under **`.github/workflows/`**: + +1. **`*.md`** — Agentic workflow spec: YAML frontmatter (`on`, `permissions`, `safe-outputs`, `tools`, …) + Markdown instructions for the agent. +2. **`*.lock.yml`** — Generated **lock** file Actions runs; produced by the **`gh-aw`** tooling (see [Quick start](https://github.github.io/gh-aw/setup/quick-start/), [Creating workflows](https://github.github.io/gh-aw/setup/creating-workflows/)). + +Blog example names: `daily-repo-status.md` and `daily-repo-status.lock.yml`. + +**Tooling (high level):** install the **`gh-aw`** extension (`gh extension install github/gh-aw`), use **`gh aw compile`** (and related commands) after editing the Markdown spec so the lock file stays in sync. + +## “Meet the Workflows” series (pattern library) + +Deep dives from the **Agentic Workflows** / **Peli’s Agent Factory** series—useful as **templates and vocabulary** when designing your own `.md` specs: + +| Theme | Article | +|--------|---------| +| **Issues / triage** | [Meet the Workflows](https://github.github.com/gh-aw/blog/2026-01-13-meet-the-workflows/) (summarize, label, route) | +| **Documentation** | [Meet the Workflows: Continuous Documentation](https://github.github.com/gh-aw/blog/2026-01-13-meet-the-workflows-documentation/) | +| **Code simplification** | [Continuous simplicity](https://github.github.com/gh-aw/blog/2026-01-13-meet-the-workflows-continuous-simplicity/) | +| **Testing & validation** | [Testing & validation](https://github.github.com/gh-aw/blog/2026-01-13-meet-the-workflows-testing-validation/) | +| **Quality / CI hygiene** | [Quality hygiene](https://github.github.com/gh-aw/blog/2026-01-13-meet-the-workflows-quality-hygiene/) | + +The announcement also links **issue triage**, **metrics / reporting**, and **Continuous AI** ([GitHub Next — Continuous AI](https://githubnext.com/projects/continuous-ai/)). + +**Workflow gallery / factory tour:** [Welcome to Peli’s Agent Factory](https://github.github.com/gh-aw/blog/2026-01-12-welcome-to-pelis-agent-factory/) (also cited from [workflow gallery](https://github.github.io/gh-aw/blog/2026-01-12-welcome-to-pelis-agent-factory/)). + +## Guardrails (why this isn’t “raw agent in Actions”) + +Compared to running a generic agent CLI inside a normal job, Agentic Workflows emphasize: + +- **Read-only by default**; elevated effects via **safe outputs**. +- **Sandboxing**, **tool allowlisting**, **network isolation** (see architecture doc). +- **No automatic merge** of PRs—humans stay in the loop for integration. + +Treat workflow Markdown **as code**: review diffs, keep specs focused, evolve deliberately. + +## Billing and accounts + +Workflow runs use **coding agents** at runtime and incur **costs**. With **Copilot** default settings, the blog describes about **two [Copilot premium requests](https://docs.github.com/en/billing/concepts/product-billing/github-copilot-premium-requests)** per run (agent work + guardrail path through safe outputs)—verify current docs for your plan. Other engines: see **[engines](https://github.github.com/gh-aw/reference/engines/)** for tokens and secrets. + +## Team practices (from the announcement) + +- Start with **low-risk** safe outputs (comments, drafts, reports) before broad **PR** creation. +- Prefer **goal-oriented** maintenance (refactors, tests, simplification) over unsupervised **feature** work. +- Be explicit in instructions: **format**, **tone**, **links**, **when to stop**. +- Add **secrets** your chosen engine needs (see engines doc). + +## How this repo relates + +| Topic | In this repository | +|--------|---------------------| +| **Agentic Workflows (`gh-aw`)** | **Not** the same as the **steering sync** workflow in **`.github/workflows/verify-steering-sync.yml`**, which is ordinary Actions + shell/Python to mirror **`.steering/`** into IDE paths. | +| **Copilot agents** | Custom **`.github/agents/*.agent.md`** profiles are documented in **`.steering/github-copilot/Agents.md`**; they address **IDE / Copilot Chat / cloud agent** usage, not necessarily `gh-aw` Markdown workflow files. | +| **Adoption** | If you add Agentic Workflows here, store **`.md` + `.lock.yml`** under **`.github/workflows/`**, document **secrets** and **safe outputs** in the PR, and link this note for reviewers. | + +## Learn more (official) + +- [Documentation hub](https://github.github.com/gh-aw/) +- [How they work](https://github.github.io/gh-aw/introduction/how-they-work/) +- [Quick start](https://github.github.io/gh-aw/setup/quick-start/) +- [Creating workflows](https://github.github.io/gh-aw/setup/creating-workflows/) +- [Community feedback](https://gh.io/aw-tp-community-feedback) · [GitHub Next Discord — #agentic-workflows](https://gh.io/next-discord) + +**Prompt helper (from blog):** use your coding agent with instructions from [`github/gh-aw` `create.md`](https://github.com/github/gh-aw/blob/main/create.md) to scaffold a new workflow. diff --git a/.steering/github-copilot/Agents.md b/.steering/github-copilot/Agents.md new file mode 100644 index 0000000..b384d78 --- /dev/null +++ b/.steering/github-copilot/Agents.md @@ -0,0 +1,85 @@ +--- +title: Copilot Custom Agents +url: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents +feature_status: Public Preview +who_can_use: Copilot Pro/Pro+/Business/Enterprise +tags: [github-copilot, agents, custom-agents, cloud-agent, mcp] +related: [[github-copilot/Memories]] +--- + +# Copilot Custom Agents + +![Copilot Agents](https://docs.github.com/assets/cb/copilot/agents/custom-agent.png) + +**Tailor Copilot's expertise** for specific tasks via `.agent.md` profiles in `.github/agents/` (repo/workspace) or root `agents/` (org/enterprise). + +## Who Can Use +- **Plans**: Copilot Pro/Pro+, Business, Enterprise +- **Availability**: All GitHub repos (except managed users/disabled) +- **IDEs**: VS Code, JetBrains, Eclipse, Xcode (preview) + +## Creating Agent Profiles + +### On GitHub.com +1. [github.com/copilot/agents](https://github.com/copilot/agents) → Select repo/branch +2. Create `my-agent.agent.md` in `.github/agents/` +3. Org/Ent: Move to root `agents/` +4. Edit YAML + prompt → Commit + +### In IDEs +- **VS Code/JetBrains/Eclipse/Xcode**: Chat dropdown → Configure/Create → `.agent.md` in `.github/agents` (workspace) or user profile + +## Configuration (YAML Frontmatter + Markdown Prompt) +```yaml +--- +name: test-specialist # Defaults to filename +description: > # Required + Focuses on test coverage... +tools: ["read", "edit", "search"] # Or omit for all +mcp-servers: [...] # Agent-specific MCP +model: gpt-4o # IDEs only +target: vscode # vscode/github-copilot +--- +# Prompt (max 30k chars): Instructions, expertise, behavior +You are a testing specialist... +``` + +- **Tools**: Built-in (read/edit/search) + MCP servers/aliases +- **Docs**: [Custom Agents Config](https://docs.github.com/en/copilot/reference/custom-agents-configuration) + +## Example Profiles + +### Testing Specialist +```yaml +--- +name: test-specialist +description: Focuses on test coverage... +--- +# Analyzes gaps, writes unit/integration/E2E tests +# Never modifies prod code +``` + +### Implementation Planner +```yaml +--- +name: implementation-planner +description: Creates detailed specs... +tools: ["read", "search", "edit"] +--- +# Breaks down reqs, docs APIs/models, risks +``` + +More: [Customization Library](https://docs.github.com/en/copilot/tutorials/customization-library/custom-agents), [awesome-copilot/agents](https://github.com/github/awesome-copilot/tree/main/agents) + +## Using Custom Agents +- **GitHub**: Agents tab/prompt dropdown; Issue assignment; PRs note agent used +- **Chat/CLI**: `@agent` or dropdown/slash `/agent` +- **IDEs**: Chat agent dropdown + +## Next Steps +- [Your First Custom Agent Tutorial](https://docs.github.com/en/copilot/tutorials/customization-library/custom-agents/your-first-custom-agent) +- [Create PR with Agent](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-a-pr) + +## Resources +- [GitHub Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents) +- [About Custom Agents](https://docs.github.com/en/copilot/concepts/agents/cloud-agent/about-custom-agents) diff --git a/.steering/github-copilot/Environment.md b/.steering/github-copilot/Environment.md new file mode 100644 index 0000000..08f3c12 --- /dev/null +++ b/.steering/github-copilot/Environment.md @@ -0,0 +1,92 @@ +--- +title: Customizing Copilot Cloud Agent Environment +url: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/customize-the-agent-environment +feature_status: GA +tags: [copilot, agents, environment, github-actions, runners] +related: + - [[github-copilot/Agents]] + - [[github-copilot/Agent MCP]] + - [[github-copilot/Skills]] +--- + +# Customizing the Development Environment for GitHub Copilot Cloud Agent + +Copilot cloud agent runs in an **ephemeral GitHub Actions environment** (Ubuntu Linux by default) to explore code, build, test, lint, etc. + +Customize via **`.github/workflows/copilot-setup-steps.yml`**—runs **before** agent starts. + +## copilot-setup-steps.yml Structure + +```yaml +# Triggers: manual, push/PR to this file +on: + workflow_dispatch: + push: + paths: [.github/workflows/copilot-setup-steps.yml] + pull_request: + paths: [.github/workflows/copilot-setup-steps.yml] + +jobs: + copilot-setup-steps: # MUST be this name + runs-on: ubuntu-latest # or larger/self-hosted/Windows + permissions: # Minimal needed + contents: read + steps: + - uses: actions/checkout@v4 + # Your setup steps here +``` + +## Preinstall Dependencies/Tools + +Speed up agent—install deps reliably: + +```yaml +steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci +``` + +## Runners + +| Type | Config | Benefits | +|------|--------|----------| +| **Standard** | `ubuntu-latest` | Default | +| **Larger** | `ubuntu-4-core` (org setup req.) | More CPU/RAM/disk | +| **Self-hosted** | `arc-scale-set-name` | Internal network, match CI | +| **Windows** | `windows-latest` | Windows toolchain | + +**Note**: Ubuntu x64/Windows 64-bit only. Ephemeral/single-use recommended. + +## Git LFS + +```yaml +- uses: actions/checkout@v4 + with: + lfs: true +``` + +## Environment Variables/Secrets + +Set in repo **copilot environment** (Settings > Environments > New: `copilot`): + +- Vars: `MY_VAR=value` +- Secrets: `MY_SECRET` + +Access: `${{ env.MY_VAR }}` / `${{ secrets.MY_SECRET }}` + +Proxy example: + +| Var | Example | +|-----|---------| +| `https_proxy` | `http://proxy.corp:8080` | +| `no_proxy` | `localhost,127.0.0.1` | + +## Resources +- [Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/customize-the-agent-environment) +- [Firewall](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/customize-the-agent-firewall) + +[[GitHub Copilot]] diff --git a/.steering/github-copilot/Memories.md b/.steering/github-copilot/Memories.md new file mode 100644 index 0000000..a3b5a4e --- /dev/null +++ b/.steering/github-copilot/Memories.md @@ -0,0 +1,61 @@ +--- +title: Copilot Memory +url: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/copilot-memory +feature_status: Public preview +who_can_use: + - Enterprises/orgs with Copilot Enterprise/Business + - Individuals with Copilot Pro/Pro+ +tags: [github, copilot, memory, agents, ai] +related_features: [Copilot cloud agent, Copilot code review, Copilot CLI] +--- + +# Copilot Memory + +Copilot Memory allows GitHub Copilot to learn about your codebase, improving effectiveness for **Copilot cloud agent**, **Copilot code review**, and **Copilot CLI** in repositories. + +> **Note**: Currently in [public preview](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/copilot-memory) and subject to change. + +![Copilot Memory List Screenshot](https://docs.github.com/assets/cb-332961/images/help/copilot/copilot-memory-list.png) + +## Key Benefits +- Stores codebase insights (memories) for better agentic decisions +- Automatic validation: Only uses memories if source code still exists +- Auto-deletion: Memories expire after **28 days** to prevent staleness +- Repo owners can view/delete inappropriate memories + +## Enabling Copilot Memory + +### Enterprise Level +Enterprise owners set policy: +1. Enterprise Settings → **AI controls** → **Copilot** → **Copilot Memory** +2. Options: **Let organizations decide** | **Enabled everywhere** | **Disabled everywhere** + +### Organization Level +Org owners enable for members with Copilot license: +1. Org Settings → **Copilot** → **Policies** → **Copilot Memory** → **Enabled** + +### Individual Users (Pro/Pro+) +Enabled by default: +1. Profile → **Copilot settings** → **Copilot Memory** → **Enabled/Disabled** + +> **Note**: Most restrictive policy applies if user in multiple orgs. + +## Viewing Memories (Repo Owners) +1. Repo → **Settings** → **Copilot** → **Memory** +2. Lists memories chronologically (newest first) + +![Repo Settings Screenshot](https://docs.github.com/assets/cb-28260/images/help/repository/repo-actions-settings.png) + +## Deleting Memories +- Click trash icon per memory +- Or select multiple → **Delete** + +Copilot re-validates before use. + +## Resources +- [Official Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/copilot-memory) +- [About Copilot Memory](https://docs.github.com/en/copilot/concepts/agents/copilot-memory) +- [Copilot Plans](https://github.com/features/copilot/plans) + +## Related Notes +[[Github Copilot]] diff --git a/.steering/github-copilot/Plugins.md b/.steering/github-copilot/Plugins.md new file mode 100644 index 0000000..e69de29 diff --git a/.steering/github-copilot/Prompts.md b/.steering/github-copilot/Prompts.md new file mode 100644 index 0000000..55f87d2 --- /dev/null +++ b/.steering/github-copilot/Prompts.md @@ -0,0 +1,131 @@ +--- +title: Copilot prompt files (VS Code) +url: https://code.visualstudio.com/docs/copilot/customization/prompt-files +tags: + - github-copilot + - vscode + - prompt-files + - slash-commands +related: + - "[[github-copilot/Agents]]" + - "[[github-copilot/Skills]]" + - "[[github-copilot/Memories]]" +--- + +# Copilot prompt files in VS Code + +**Official reference:** [Use prompt files in VS Code](https://code.visualstudio.com/docs/copilot/customization/prompt-files) + +**Prompt files** (also called **slash commands**) are **Markdown** templates you **invoke manually** in Copilot Chat—unlike [custom instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions), which apply **automatically**. Each file bundles **task-specific context** and **how** the model should work (steps, constraints, links to repo docs). + +Use them to: + +- Standardize recurring chat tasks (scaffold a component, run/fix tests, prep a PR). +- **Override** behavior for a one-off run (e.g. force **Ask** mode, a specific **model**, or a narrower **tool** list) while still using a [custom agent](https://code.visualstudio.com/docs/copilot/customization/custom-agents) for everything else. + +## Prompts vs agents vs skills + +From Microsoft’s guidance: + +| Mechanism | When to use | +|-----------|-------------| +| **Prompt files** | **Lightweight, single-task** prompts you trigger with **`/`**. | +| **Custom agents** | **Persistent persona**, tool boundaries, handoffs (see **`.steering/github-copilot/Agents.md`**). | +| **Agent skills** | **Portable, multi-file** capability with scripts/resources (see **`.steering/github-copilot/Skills.md`**). | + +**Discovery:** [Chat Customizations editor](https://code.visualstudio.com/docs/copilot/customization/overview#_chat-customizations-editor) (Preview) — Command Palette: **Chat: Open Chat Customizations**. + +## Where prompt files live + +| Scope | Default location | +|--------|-------------------| +| **Workspace** | **`.github/prompts/`** | +| **User (profile)** | VS Code user data for the active profile (not in the repo) | + +- Extra workspace search paths: **`chat.promptFilesLocations`**. +- **Monorepos:** **`chat.useCustomizationsInParentRepositories`** pulls customizations from a **parent** repo root; see [Parent repository discovery](https://code.visualstudio.com/docs/copilot/customization/overview#_parent-repository-discovery). + +**This repository** does not currently include a **`.github/prompts/`** folder; add one when you want **team-shared** slash commands in VS Code. + +## File format + +- Extension: **`.prompt.md`** +- Optional **YAML frontmatter** + Markdown **body** (instructions, bullet requirements, links). + +### Frontmatter fields + +| Field | Required | Purpose | +|--------|----------|---------| +| `description` | No | Short summary of the prompt. | +| `name` | No | Slash name after **`/`**; defaults from **filename** if omitted. | +| `argument-hint` | No | Hint text in the chat input for arguments. | +| `agent` | No | `ask`, `agent`, `plan`, or a **custom agent** name. Default: current chat agent. If **`tools`** is set, default agent is typically **`agent`**. | +| `model` | No | Model for this run; default: chat model picker. | +| `tools` | No | Allowed tools (built-in, tool sets, MCP, extension tools). MCP server wildcard: pattern like `server /*` (see [agent tools](https://code.visualstudio.com/docs/copilot/agents/agent-tools)). Unavailable tools are **ignored**. | + +### Body conventions + +- **Markdown links** with **relative paths** to pull in workspace context from nearby docs. +- **`#tool:toolId`** to mention tools inline (e.g. `#tool:browser`). +- **User input:** `vscode/askQuestions`, or placeholders like **`${input:variableName}`** / **`${input:variableName:placeholder}`**. +- Built-in variables such as **`${selection}`** (see VS Code doc). + +Official examples (React form, security review) live on the [prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files) page; more samples: [awesome-copilot](https://github.com/github/awesome-copilot/tree/main). + +## Creating and editing + +- Chat: **`/prompts`** → Configure Prompt Files. +- **Chat** view → **Configure Chat** (gear) → **Chat Customizations** → **Prompts** → **New Prompt (Workspace / User)**. +- Command Palette: **Chat: New Prompt File** / **Chat: New Untitled Prompt File**. +- **AI-assisted:** **`/create-prompt`** in chat, or **Generate Prompt** in the customizations editor; you can also ask to **turn this conversation into a reusable prompt**. + +## Running a prompt + +- Type **`/`** + prompt name (alongside [agent skills](https://code.visualstudio.com/docs/copilot/customization/agent-skills) slash entries). +- Pass args in the input, e.g. **`/my-prompt formName=MyForm`**. +- Command Palette: **Chat: Run Prompt**. +- Open the **`.prompt.md`** file → **Run** (play) in the editor title bar (current or new chat). + +**Recommendations:** **`chat.promptFilesRecommendations`** can surface prompts when starting a new chat. + +## Tool list priority + +When both agents and prompts define tools: + +1. **Tools** on the **prompt file** (if any) +2. Tools from the **custom agent** referenced by **`agent:`** (if any) +3. **Default** tools for the active agent mode + +## Syncing user prompts + +User-level prompt files can sync across machines via [Settings Sync](https://code.visualstudio.com/docs/configure/settings-sync); enable **Prompts and Instructions** in **Settings Sync: Configure**. + +## Effective prompts (summary) + +- State **goal** and **output shape** clearly; add **input/output examples** when helpful. +- **Link** to shared instructions instead of duplicating long policy. +- Use **`${selection}`** / **`${input:…}`** for reuse. +- Iterate with the editor **Run** button. + +## Troubleshooting + +- **Chat: Configure Prompt Files** — hover a prompt to see **source** (built-in, user, workspace, extension). +- Chat → right-click → **Diagnostics**; see [Troubleshooting Copilot in VS Code](https://code.visualstudio.com/docs/copilot/troubleshooting). + +## Related in this repo + +| File | Why | +|------|-----| +| `.steering/github-copilot/Agents.md` | Custom agents vs one-shot prompt files. | +| `.steering/github-copilot/Skills.md` | Copilot **Skills** vs prompts. | +| `.cursor/skills/` / `.steering/skills/` | Cursor **skills** use **`SKILL.md`** and a different discovery model; compare when supporting both VS Code and Cursor. | + +## Resources + +- [Prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files) +- [Custom instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions) +- [Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents) +- [Agent skills (VS Code)](https://code.visualstudio.com/docs/copilot/customization/agent-skills) +- [Agent tools](https://code.visualstudio.com/docs/copilot/agents/agent-tools) +- [Chat customization overview](https://code.visualstudio.com/docs/copilot/customization/overview) +- [awesome-copilot](https://github.com/github/awesome-copilot) diff --git a/.steering/github-copilot/SDK.md b/.steering/github-copilot/SDK.md new file mode 100644 index 0000000..2b92fd3 --- /dev/null +++ b/.steering/github-copilot/SDK.md @@ -0,0 +1,65 @@ +--- +title: Copilot SDK Skill +github_url: https://github.com/microsoft/skills/tree/main/.github/skills/copilot-sdk +repo_url: https://github.com/microsoft/skills +repo_stars: 2k +repo_forks: 218 +last_commit: 2026-02-19 +author: thegovind & Copilot +tags: [copilot, skills, sdk, microsoft, mcp, hooks, deployment] +related: + - [[GitHub Copilot/Skills]] + - [[GitHub Copilot/Agents]] + - [[GitHub Copilot/Agent MCP]] +--- + +# Copilot SDK Skill + +From the official [Microsoft Skills repo](https://github.com/microsoft/skills) (2k⭐, 218 forks)—a curated collection of GitHub Copilot agent skills. + +This skill provides **comprehensive guidance on the Copilot SDK**, covering API usage, hooks, authentication, MCP integration, deployment patterns, and more. Latest expansion (Feb 18, 2026) grew from ~510 to ~900 lines for full coverage. + +## Key Features (from SKILL.md commits) +- **Architecture**: Transport modes (stdio/TCP). +- **Hooks**: All 6 lifecycle hooks (pre/post tool use, user prompt, session start/end, error handling) with multi-language examples. +- **BYOK (Bring Your Own Keys)**: Provider configs (OpenAI, Azure OpenAI, Anthropic, Ollama). Reference table + Azure Managed Identity pattern. +- **Authentication**: Priority order, OAuth GitHub App, token types, disable auto-login. +- **Session Persistence**: Resume options, session ID best practices, persisted data, infinite sessions. +- **MCP Server Integration**: Local/HTTP configs (all fields), debugging (MCP Inspector). +- **Deployment Patterns**: + | Pattern | Description | + |---------|-------------| + | Local CLI | `copilot-sdk run` | + | External Server | TCP/HTTP endpoints | + | Bundled CLI | Embed in apps | + | Docker Compose | Multi-container | + | Session Isolation | Prod checklist | +- **Permissions/Input Handlers**: Deny-by-default model. +- **SDK vs CLI Comparison**: Feature table + workarounds. +- **Debugging**: Common issues table, connection states. + +## Directory Structure +``` +.github/skills/copilot-sdk/ +├── SKILL.md # Main instructions (~900 lines) +└── references/ # Supporting docs/examples + └── (various files for tests/acceptance criteria) +``` + +## Usage +1. **Add to your repo**: Copy `.github/skills/copilot-sdk/` to `.github/skills/copilot-sdk/` (auto-discovered). +2. **Invoke**: Copilot loads when relevant (e.g., "build Copilot SDK app", "add MCP to agent"). +3. **Test Coverage**: 11/11 scenarios pass (98.2% avg score, Feb 2026). + +## Resources +- [SKILL.md (raw)](https://github.com/microsoft/skills/blob/main/.github/skills/copilot-sdk/SKILL.md) +- [Repo README](https://github.com/microsoft/skills) +- [Latest Commit](https://github.com/microsoft/skills/commit/e13c7df45bc86c49ccbcb1376a01e343be777651) + +## Related Notes +- [[GitHub Copilot/Skills]]: General skills guide. +- [[GitHub Copilot/Agent MCP]]: MCP configs for SDK. +- [[Workflows/Agent Sync]]: Sync skills across agents (regenrek/agent-skills). + +--- +*Last updated: 2026-04-08* diff --git a/.steering/github-copilot/Settings.md b/.steering/github-copilot/Settings.md new file mode 100644 index 0000000..6cd552a --- /dev/null +++ b/.steering/github-copilot/Settings.md @@ -0,0 +1,96 @@ +--- +title: Copilot Settings - MCP Configuration +url: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/extend-cloud-agent-with-mcp +feature_status: Public Preview +who_can_use: Repository administrators, Org/Enterprise owners +tags: [copilot, mcp, settings, cloud-agent, agents] +related: + - [[github-copilot/Agents]] + - [[github-copilot/Skills]] + - [[github-copilot/Agent MCP]] +--- + +# Copilot Settings: Extending Cloud Agent with MCP + +Research note on configuring **Model Context Protocol (MCP)** servers in GitHub Copilot settings to extend cloud agent capabilities. + +## Overview +Repository admins configure MCP servers via JSON in repo **Settings > Copilot > MCP Servers**. + +- **Purpose**: Give Copilot access to external tools/services (Sentry, Notion, Azure, etc.) via MCP. +- **Security**: Copilot decides tool use autonomously—use read-only where possible. +- **Types**: Local (command/args), Remote SSE/Streamable HTTP. + +![Repo Settings Navigation](https://docs.github.com/assets/cb-28260/images/help/repository/repo-actions-settings.png) + +## Prerequisites +- Understand [MCP and Cloud Agent](https://docs.github.com/en/copilot/concepts/agents/cloud-agent/mcp-and-cloud-agent). + +## Repo Configuration +Navigate: Repo **Settings > Copilot > MCP Servers**. + +JSON format: +```json +{ + "mcpServers": { + "sentry": { + "type": "local", + "command": "npx", + "args": ["-y", "@sentry/mcp-server@sentry-mcp-server"], + "env": { + "SENTRY_MCP_DSN": "${SENTRY_MCP_DSN}" + }, + "tools": ["search_issues"] + }, + "notion": { + "type": "sse", + "url": "https://your-notion-mcp-server.com/sse", + "headers": { + "Authorization": "Bearer ${NOTION_TOKEN}" + }, + "tools": ["listPages", "readPage"] + } + } +} +``` + +### Variable Substitution +| Syntax | Example | +|--------|---------| +| `$VAR` | `$COPILOT_MCP_API_KEY` | +| `${VAR}` | `${COPILOT_MCP_API_KEY}` | +| `${VAR:-default}` | `${COPILOT_MCP_API_KEY:-fallback}` | + +**Environment Variables**: Set in Repo **Settings > Secrets and variables > Actions**. + +## Server Examples +- **[Sentry](https://github.com/getsentry/sentry-mcp)**: Exceptions access. +- **[Notion](https://github.com/makenotion/notion-mcp-server)**: Notes/docs. +- **[Azure](https://github.com/microsoft/mcp)**: Resources/files. +- **[Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare)**: Services/docs. +- **[Azure DevOps](https://github.com/microsoft/azure-devops-mcp)**: Work items/pipelines (needs OIDC). +- **[Atlassian](https://github.com/atlassian/atlassian-mcp-server)**: Jira/Confluence (API token). + +Full JSON examples in doc. + +## VS Code Reuse +Adapt `.vscode/mcp.json`: +- Add `"tools": ["*"]` or specific. +- Wrap in `"mcpServers": { ... }`. + +## Environment Secrets +- Repo: **Settings > Secrets > Actions** (e.g., `AZURE_CLIENT_ID`). +- Org/Enterprise: Centralized management. + +## Validation & Warnings +- **Test**: Copilot validates before use (code must exist). +- **Read-only recommended**: Avoid destructive tools. +- **No OAuth remotes**: Use SSE/HTTP with tokens. +- **GitHub MCP**: Customize via custom agents YAML. + +## Resources +- [Full Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/extend-cloud-agent-with-mcp) +- [MCP Servers Repo](https://github.com/modelcontextprotocol/servers) +- Related: [[github-copilot/Agents]] (custom agents), [[github-copilot/Skills]] + +Last updated: 2026-04-08 diff --git a/.steering/github-copilot/Skills.md b/.steering/github-copilot/Skills.md new file mode 100644 index 0000000..7cfca0d --- /dev/null +++ b/.steering/github-copilot/Skills.md @@ -0,0 +1,81 @@ +--- +title: Copilot Agent Skills +url: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-skills +feature_status: Public Preview +who_can_use: Copilot Pro+, Business, Enterprise (cloud agent, CLI, VS Code agent mode) +tags: + - github-copilot + - agents + - skills + - customization +related: + - "[[github-copilot/Agents]]" + - "[[github-copilot/Memories]]" +--- + +# Copilot Agent Skills + +Agent skills modify Copilot's behavior for specific tasks via folders with `SKILL.md` (YAML frontmatter + instructions) + optional scripts/resources. + +**Works with**: Copilot cloud agent, GitHub Copilot CLI, VS Code agent mode. + +## Purpose vs Custom Instructions +- **Skills**: Detailed, task-specific (e.g., debugging workflows). Loaded when relevant via description matching. +- **Custom Instructions**: Repo-wide general rules (coding standards). + +## Creating/Adding Skills + +1. Create folder: + - **Project**: `.github/skills/{skill-name}/` (repo-specific) + - **Personal**: `~/.copilot/skills/{skill-name}/` (global) + +2. Add `SKILL.md` with YAML frontmatter: + ```yaml + --- + name: github-actions-failure-debugging + description: Guide for debugging failing GitHub Actions workflows. Use this when asked to debug failing GitHub Actions workflows. + --- + + You are a testing specialist focused on improving code quality... + ``` + +3. **Optional**: Add scripts/resources in folder—Copilot auto-discovers and references them. + +### Example: GitHub Actions Debugging +```text +.github/skills/github-actions-failure-debugging/ +├── SKILL.md +└── debug-workflow.sh # Script Copilot can run +``` + +### Running Scripts +- Copilot discovers files in skill dir. +- Reference in instructions: "Run `./debug-workflow.sh` to analyze logs." +- **Security**: Scripts must be explicitly allowed; Copilot prompts before execution. + +## How Copilot Uses Skills +1. Matches prompt to skill `description`. +2. Injects `SKILL.md` + dir files into context. +3. Follows instructions, runs allowed scripts/tools. + +## Example Skills +### GitHub Actions Failure Debugging +```yaml +--- +name: github-actions-failure-debugging +description: Guide for debugging failing GitHub Actions workflows... +--- +You are a GitHub Actions debugging expert... +1. Read workflow YAML... +2. Check logs... +``` + +### SVG to PNG Converter +Include `convert-svg.sh` script; instructions reference it. + +## Resources +- [Official Docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/create-skills) +- [Awesome Copilot Agents](https://github.com/github/awesome-copilot/tree/main/agents) + +## Related Notes +[[GitHub Copilot/Agents]] | [[GitHub Copilot/Memories]] | [[Laravel Packages]] diff --git a/.steering/github-copilot/plugins/Deep Wiki.md b/.steering/github-copilot/plugins/Deep Wiki.md new file mode 100644 index 0000000..1f91233 --- /dev/null +++ b/.steering/github-copilot/plugins/Deep Wiki.md @@ -0,0 +1,122 @@ +--- +title: Deep Wiki Plugin +github_url: https://github.com/microsoft/skills/tree/main/.github/plugins/deep-wiki +repo_url: https://github.com/microsoft/skills +stars: 2000 +forks: 218 +latest_commit: 67ae723a23ba880e3e5c8a3e5e2320092024476e (2026-04-02: Move package field into metadata map) +tags: [copilot-plugins, deep-wiki, documentation, vitepress, mermaid, agents, skills, onboarding] +related: [[github-copilot/Plugins]], [[github-copilot/Skills]], [[Skills/Skill Creator]], [[Agent Sync]] +--- + +# Deep Wiki Plugin + +![Deep Wiki Badge](https://github.com/microsoft/skills/raw/main/.github/plugins/deep-wiki/badge.png) + +**AI-Powered Wiki Generator for Code Repositories — GitHub Copilot CLI Plugin** + +Generate comprehensive, structured, Mermaid-rich documentation wikis for any codebase — with dark-mode VitePress sites, onboarding guides, and deep research capabilities. Distilled from [OpenDeepWiki/deepwiki-open](https://github.com/OpenDeepWiki/deepwiki-open). + +## Installation + +### From Marketplace (Recommended) +``` +# Inside Copilot CLI +/plugin marketplace add microsoft/skills +/plugin install deep-wiki@skills +``` + +### Local Install +``` +copilot --plugin-dir ./deep-wiki +``` + +## Commands + +| Command | Description | +|---------|-------------| +| `/deep-wiki:generate` | Generate complete wiki — catalogue + all pages + onboarding guides + VitePress site | +| `/deep-wiki:crisp` | Fast wiki generation — concise, parallelized, rate-limit-friendly (5-8 pages) | +| `/deep-wiki:catalogue` | Generate structured JSON table-of-contents | +| `/deep-wiki:page ` | Single page with dark-mode Mermaid diagrams | +| `/deep-wiki:research ` | Deep research with zero tolerance for shallow analysis | +| `/deep-wiki:changelog` | Changelog analysis | +| `/deep-wiki:ask ` | Q&A over repo | +| `/deep-wiki:onboard` | Onboarding guide | +| `/deep-wiki:agents` | AGENTS.md for MCP discovery | +| `/deep-wiki:llms` | llms.txt for LLM integration | +| `/deep-wiki:ado` | Azure DevOps integration | +| `/deep-wiki:build` | Build wiki site | +| `/deep-wiki:deploy` | Deploy to GitHub Pages/Netlify | +| `/deep-wiki:mcp` | MCP server config | + +View agents: `/agents` + +## Agents + +| Agent | Description | +|-------|-------------| +| `wiki-architect` | Analyzes repos, generates structured catalogues + onboarding architecture | +| `wiki-writer` | Generates pages with dark-mode Mermaid diagrams and deep citations | +| `wiki-researcher` | Deep research with evidence-first approach | + +## Skills (Auto-Invoked) + +| Skill | Triggers When | +|-------|---------------| +| `wiki-architect` | Create wiki/document repo/map codebase | +| `wiki-page-writer` | Document component/technical deep-dive | +| `wiki-changelog` | Recent changes/changelog | +| `wiki-researcher` | In-depth investigation | +| `wiki-onboarding` | New user guides | +| `wiki-vitepress` | VitePress site generation | +| `wiki-llms-txt` | LLM integration files | +| `wiki-agents-md` | AGENTS.md generation | +| `wiki-mermaid-dark` | Dark-mode diagrams | +| `wiki-mcp-config` | MCP server setup | + +## Design Principles (12 Rules) + +1. **Source Citations**: Every claim links to code/commit. +2. **Structure-First**: TOC before content. +3. **Evidence-Based**: No speculation. +4. **Diagram-Rich**: Mermaid for architecture flows. +5. **Dark-Mode Native**: VitePress with dark theme. +6. **Onboarding-Focused**: New dev guides first. +7. **llms.txt/AGENTS.md**: MCP discovery. +8. **Rate-Limit Friendly**: Parallel/concise modes. +9. **Multi-Turn Research**: Iterative deepening. +10. **JSON Catalogues**: Machine-readable TOC. +11. **Single-Page Deep Dives**: Focused topics. +12. **Deployment-Ready**: Build/deploy commands. + +## Plugin Structure + +``` +.github/plugins/deep-wiki/ +├── .claude-plugin/ # Claude integration +├── commands/ # CLI commands +├── skills/ # Auto-skills +├── agents/ # Agent profiles +├── README.md # Full docs +└── references/ # Examples/templates +``` + +## MCP Integration + +Generates: +- `llms.txt`: LLM tool discovery. +- `AGENTS.md`: Agent paths/methods table. + +| Path | Method | Tools | +|------|--------|-------| +| /wiki/catalogue | POST | read, search | +| /wiki/page | POST | edit, write | + +## Resources +- [GitHub Repo](https://github.com/microsoft/skills/tree/main/.github/plugins/deep-wiki) +- [Full README](https://github.com/microsoft/skills/blob/main/.github/plugins/deep-wiki/README.md) +- [Copilot Plugins Guide]([[github-copilot/Plugins]]) +- [Skills Guide]([[github-copilot/Skills]]) + +Last updated: 2026-04-08 diff --git a/.steering/ideas/README.md b/.steering/ideas/README.md new file mode 100644 index 0000000..cd57ee2 --- /dev/null +++ b/.steering/ideas/README.md @@ -0,0 +1,5 @@ +# Ideas + +Researched idea notes written by the **`/idea`** agent (`idea.agent.md`). Shape and optional frontmatter: `.steering/templates/idea.md`. + +**Naming:** prefer `.md` (kebab-case). Use a date prefix only if you need disambiguation (`YYYY-MM-DD-.md`). diff --git a/.steering/laravel-packages/README.md b/.steering/laravel-packages/README.md deleted file mode 100644 index b5ee0c8..0000000 --- a/.steering/laravel-packages/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Laravel Package Research Notes - -Research notes generated by the `laravel-package` Copilot agent. - -Each file is named `__.md` (e.g., `spatie__laravel-markdown-response.md`). diff --git a/.steering/laravel-packages/larastan__larastan.md b/.steering/laravel-packages/larastan__larastan.md new file mode 100644 index 0000000..786e93b --- /dev/null +++ b/.steering/laravel-packages/larastan__larastan.md @@ -0,0 +1,65 @@ +--- +title: larastan +org: larastan +package: larastan +github_url: https://github.com/larastan/larastan +docs_url: https://github.com/larastan/larastan/tree/3.x/docs +composer_require: composer require --dev "larastan/larastan:^3.0" +author: Can Vural +announce_date: null +latest_release: v3.9.3 (2026-02-20) +release_date: 2026-02-20 +laravel_news_url: https://laravel-news.com/package/nunomaduro-larastan +downloads_30d: 3230200 +stars: 6360 +tags: [laravel, packages, phpstan, static-analysis, larastan, type-safety, eloquent] +--- + +# larastan + +**A PHPStan extension for Laravel that understands framework “magic” and surfaces bugs before tests run.** + +[Larastan](https://github.com/larastan/larastan) boots the application container so types that only exist at runtime can be resolved—closer to **code analysis** than pure static analysis. It was created by Can Vural and Nuno Maduro and is maintained with Viktor Szépe. **Install the `larastan/larastan` package** on modern apps; the [Laravel News package page](https://laravel-news.com/package/nunomaduro-larastan) still lives under the historical `nunomaduro/larastan` slug and shows older `^2.0` install lines—prefer this repo and Composer vendor name for new work. + +## Key Features +- **Laravel-aware typing:** Models, facades, containers, and much of the framework’s dynamic API +- **Version alignment:** Larastan 3.x targets **Laravel 11.16+** and **PHP 8.2+** (see the [README](https://github.com/larastan/larastan) matrix for older Laravel ↔ Larastan major pairs) +- **Deep docs in-repo:** [Features](https://github.com/larastan/larastan/blob/3.x/docs/features.md), [rules](https://github.com/larastan/larastan/blob/3.x/docs/rules.md), [custom types](https://github.com/larastan/larastan/blob/3.x/docs/custom-types.md), [custom parameters](https://github.com/larastan/larastan/blob/3.x/docs/custom-config-parameters.md), [errors to ignore](https://github.com/larastan/larastan/blob/3.x/docs/errors-to-ignore.md) +- **Package development:** Analysing a Laravel package may require [`orchestra/testbench`](https://github.com/orchestra/testbench) (noted in the README) + +## Installation + +```bash +composer require --dev "larastan/larastan:^3.0" +``` + +## Usage + +Add a `phpstan.neon` or `phpstan.neon.dist` at the project root (paths and level to taste): + +```neon +includes: + - vendor/larastan/larastan/extension.neon + - vendor/nesbot/carbon/extension.neon + +parameters: + paths: + - app/ + level: 5 +``` + +Run analysis: + +```bash +./vendor/bin/phpstan analyse +./vendor/bin/phpstan analyse --memory-limit=2G +``` + +Use `--generate-baseline` for legacy codebases, `@phpstan-ignore-next-line` / config `ignoreErrors` for targeted suppressions, and the [PHPStan config reference](https://phpstan.org/config-reference) for global options. + +## Resources +- [GitHub](https://github.com/larastan/larastan) +- [Documentation (3.x tree)](https://github.com/larastan/larastan/tree/3.x/docs) +- [Laravel News — Larastan (package hub)](https://laravel-news.com/package/nunomaduro-larastan) +- [PHPStan](https://phpstan.org/) +- [[Laravel Packages]] diff --git a/.steering/laravel-packages/laravel__pint.md b/.steering/laravel-packages/laravel__pint.md new file mode 100644 index 0000000..f3c9867 --- /dev/null +++ b/.steering/laravel-packages/laravel__pint.md @@ -0,0 +1,62 @@ +--- +title: pint +org: laravel +package: pint +github_url: https://github.com/laravel/pint +docs_url: https://laravel.com/docs/13.x/pint +composer_require: composer require laravel/pint --dev +author: Nuno Maduro +announce_date: 2022-06-22 +latest_release: v1.29.0 (2026-03-12) +release_date: 2026-03-12 +laravel_news_url: https://laravel-news.com/laravel-pint +downloads_30d: 6045960 +stars: 3114 +tags: [laravel, packages, pint, php-cs-fixer, lint, formatter, code-style, ci, github-actions] +--- + +# pint + +**An opinionated PHP code style fixer for minimalists, built on PHP CS Fixer.** + +[Laravel Pint](https://github.com/laravel/pint) ships with new Laravel apps and enforces consistent formatting with almost no setup. The [Laravel 13.x docs](https://laravel.com/docs/13.x/pint) cover installation, CLI flags, `pint.json` (presets, rules, excludes), and a sample GitHub Actions workflow. [Laravel News](https://laravel-news.com/laravel-pint) introduced it at launch with a walkthrough of presets, `--test`, and verbose output. + +## Key Features +- **Defaults first:** Runs with Laravel’s opinionated style out of the box; optional `pint.json` for presets and rule tweaks +- **Presets:** `laravel`, `per`, `psr12`, `symfony`, or `empty` (then compose rules yourself) +- **PHP CS Fixer rules:** Any Fixer rule applies; Pint also exposes custom rules under the `Pint/` prefix (e.g. `Pint/phpdoc_type_annotations_only`) +- **CLI workflow:** Fix the tree with `./vendor/bin/pint`, or `--test` for CI (non-zero on violations), `--dirty` / `--diff=branch` for scoped runs, `--repair` to fix and still fail the exit code, `-v` for detail, `--parallel` for faster runs +- **Scope control:** `exclude`, `notName`, and `notPath` in config to skip paths or patterns + +## Installation + +Pint is already present on current Laravel skeletons. For older apps: + +```bash +composer require laravel/pint --dev +``` + +## Usage + +```bash +./vendor/bin/pint +./vendor/bin/pint --test +./vendor/bin/pint app/Models/User.php +./vendor/bin/pint --diff=main +``` + +Optional `pint.json` at the project root: + +```json +{ + "preset": "laravel" +} +``` + +Override config path: `./vendor/bin/pint --config path/to/pint.json`. + +## Resources +- [GitHub](https://github.com/laravel/pint) +- [Documentation (Laravel 13.x)](https://laravel.com/docs/13.x/pint) +- [Laravel News — Laravel Pint](https://laravel-news.com/laravel-pint) +- [[Laravel Packages]] diff --git a/.steering/laravel-packages/livewire__flux.md b/.steering/laravel-packages/livewire__flux.md new file mode 100644 index 0000000..5459aad --- /dev/null +++ b/.steering/laravel-packages/livewire__flux.md @@ -0,0 +1,79 @@ +--- +title: flux +org: livewire +package: flux +github_url: https://github.com/livewire/flux +docs_url: https://fluxui.dev/docs/installation +composer_require: composer require livewire/flux +author: Caleb Porzio +announce_date: 2025-03-06 +latest_release: v2.13.2 (2026-03-31) +release_date: 2026-03-31 +laravel_news_url: https://laravel-news.com/flux-2-livewire-ui-kit +downloads_30d: 749776 +stars: 939 +tags: [laravel, packages, livewire, ui, tailwind, components, blade, flux-pro] +--- + +# flux + +**The official hand-crafted UI component library for Livewire applications, styled with Tailwind CSS.** + +Flux by [Caleb Porzio](https://github.com/calebporzio) and the Livewire team ships Blade/Livewire primitives (buttons, inputs, modals, tables, charts, date pickers, and more) with docs and demos at [fluxui.dev](https://fluxui.dev/). [Flux 2.0](https://fluxui.dev/blog/2025-02-19-flux-2-is-here) added built-in date/calendar and chart components with a small JS footprint; see the [Laravel News overview](https://laravel-news.com/flux-2-livewire-ui-kit). + +**Flux Pro:** Advanced components and themes are licensed separately. Purchase and install via [Flux pricing](https://fluxui.dev/pricing); activate with `php artisan flux:activate` (Composer auth against `composer.fluxui.dev`). For generated scaffolds, assume OSS-only by default and use Pro components only when the target repo explicitly confirms Pro licensing/setup. + +## Key Features +- Tailwind CSS v4.2+ styling with optional theming and dark mode via `@fluxAppearance` +- Works with Laravel 10+ and Livewire 3.7+ +- Free open-source package includes a core set of components; the rest ship with **Flux Pro** (private Composer package `livewire/flux-pro`) +- Lightweight first-party date picker, calendar, and charting in Flux 2 (no heavy third-party chart/date dependencies) +- Publish and override Blade stubs with `php artisan flux:publish` when you need full control + +## Installation + +```bash +composer require livewire/flux +``` + +**Flux Pro** (after purchasing a license): + +```bash +php artisan flux:activate +# then, per project / CI: composer require livewire/flux-pro +# Use composer http-basic auth for composer.fluxui.dev — see installation docs for Forge, Cloud, and GitHub Actions. +``` + +## Usage + +In your main layout, include Flux assets and (per [installation docs](https://fluxui.dev/docs/installation)) load Livewire scripts before Flux scripts: + +```blade + + ... + @fluxAppearance + + + ... + @livewireScripts + @fluxScripts + +``` + +In `resources/css/app.css`: + +```css +@import 'tailwindcss'; +@import '../../vendor/livewire/flux/dist/flux.css'; + +@custom-variant dark (&:where(.dark, .dark *)); +``` + +Use Flux component tags in Blade as documented on [fluxui.dev/docs](https://fluxui.dev/docs/installation) (e.g. buttons, fields, modals). With **Pro**, you get the full component catalog (calendar, charts, kanban, editor, etc.) listed in the docs sidebar. + +## Resources +- [GitHub](https://github.com/livewire/flux) +- [Documentation / installation](https://fluxui.dev/docs/installation) +- [Laravel News — Flux 2.0](https://laravel-news.com/flux-2-livewire-ui-kit) +- [Flux Pro pricing](https://fluxui.dev/pricing) +- [[Laravel Packages]] diff --git a/.steering/laravel-packages/pestphp__pest.md b/.steering/laravel-packages/pestphp__pest.md new file mode 100644 index 0000000..b286ffb --- /dev/null +++ b/.steering/laravel-packages/pestphp__pest.md @@ -0,0 +1,59 @@ +--- +title: pest +org: pestphp +package: pest +github_url: https://github.com/pestphp/pest +docs_url: https://pestphp.com/docs/installation +composer_require: composer require pestphp/pest --dev --with-all-dependencies +author: Nuno Maduro +announce_date: 2025-08-21 +latest_release: v4.4.5 (2026-04-03) +release_date: 2026-04-03 +laravel_news_url: https://laravel-news.com/pest-4 +downloads_30d: 3500383 +stars: 11409 +tags: [laravel, packages, pest, testing, phpunit, browser-testing, playwright, ci, expectations] +--- + +# pest + +**An elegant PHP testing framework focused on expressive syntax and a single toolchain from unit tests to browser automation.** + +[Pest](https://github.com/pestphp/pest) sits on top of PHPUnit and is widely used with Laravel (`laravel new my-app --pest`). [Pest 4](https://laravel-news.com/pest-4) adds first-class **browser testing** (e.g. Playwright-backed flows), **visual** and **device** testing, unified **coverage** across browser and PHP tests, **Tinker-style sessions** inside tests, and **test sharding** for parallel CI. The [installation guide](https://pestphp.com/docs/installation) requires **PHP 8.3+** and documents init, plugins, and PHPUnit migration paths. + +## Key Features +- **Readable API:** `expect()`, datasets, hooks, and plugins—see [Writing tests](https://pestphp.com/docs/installation) and deeper guides on the same site +- **Pest 4 browser stack:** End-to-end tests alongside PHP tests; see [Browser testing](https://pestphp.com/docs/browser-testing) and the [v4 announcement](https://pestphp.com/docs/pest-v4-is-here-now-with-browser-testing) +- **Ecosystem plugins:** e.g. `pest-plugin-browser` for browser testing; `pest-plugin-drift` to convert PHPUnit tests ([migrating from PHPUnit](https://pestphp.com/docs/migrating-from-phpunit-guide)) +- **Ops-friendly:** Sharding and CI patterns are covered in [Continuous integration](https://pestphp.com/docs/continuous-integration); upgrades use the [upgrade guide](https://pestphp.com/docs/upgrade-guide) + +## Installation + +On a greenfield Laravel app, prefer the installer with Pest selected (`laravel new my-project --pest` per [Laravel News](https://laravel-news.com/pest-4)). + +On an existing project, follow [Installation](https://pestphp.com/docs/installation): + +```bash +composer remove phpunit/phpunit +composer require pestphp/pest --dev --with-all-dependencies +./vendor/bin/pest --init +``` + +Then run the suite: + +```bash +./vendor/bin/pest +``` + +Add browser testing when needed via `pest-plugin-browser` (see the Browser testing docs). + +## Usage + +After `--init`, configure the generated `Pest.php` and write tests under your tests directory using Pest’s function-style API; PHPUnit-style classes remain supported where configured. + +## Resources +- [GitHub](https://github.com/pestphp/pest) +- [Documentation — Installation](https://pestphp.com/docs/installation) +- [Laravel News — Pest 4 is released](https://laravel-news.com/pest-4) +- [Pest v4 announcement](https://pestphp.com/docs/pest-v4-is-here-now-with-browser-testing) +- [[Laravel Packages]] diff --git a/.steering/mcp.json b/.steering/mcp.json new file mode 100644 index 0000000..ea3e08b --- /dev/null +++ b/.steering/mcp.json @@ -0,0 +1,23 @@ +{ + "mcpServers": { + "perplexity": { + "command": "npx", + "args": [ + "-y", + "perplexity-mcp" + ], + "env": { + "PERPLEXITY_API_KEY": "${PERPLEXITY_API_KEY}" + } + }, + "deepwiki": { + "url": "https://mcp.deepwiki.com/mcp" + }, + "github": { + "url": "https://api.githubcopilot.com/mcp/", + "headers": { + "Authorization": "Bearer ${GITHUB_PAT}" + } + } + } +} \ No newline at end of file diff --git a/.steering/mcps/deepwiki__mcp.md b/.steering/mcps/deepwiki__mcp.md new file mode 100644 index 0000000..036f932 --- /dev/null +++ b/.steering/mcps/deepwiki__mcp.md @@ -0,0 +1,102 @@ +--- +name: deepwiki-mcp +owner: deepwiki +url: https://docs.devin.ai/work-with-devin/deepwiki-mcp +product_url: https://deepwiki.com +mcp_url: https://mcp.deepwiki.com/ +type: official +transport: both +language: other +version: +stars: +last_updated: 2026-04-08 +tags: [mcp, deepwiki, devin, documentation, github, remote-mcp, http] +--- + +# DeepWiki MCP + +> Free, remote MCP access to DeepWiki’s public GitHub repo documentation and Ask Devin–style Q&A—no API key for public repos. + +## What It Does + +The DeepWiki MCP server exposes DeepWiki’s generated wikis and search so agents can list topics, read wiki pages, and ask grounded questions about **public** repositories. **Private** repos require Devin’s hosted MCP with a bearer token ([Devin docs](https://docs.devin.ai/work-with-devin/deepwiki-mcp)). The service is advertised from [mcp.deepwiki.com](https://mcp.deepwiki.com/) with full setup on [docs.devin.ai](https://docs.devin.ai/work-with-devin/deepwiki-mcp). + +## Tools / Resources / Prompts + +| Name | Type | Description | +|------|------|-------------| +| `read_wiki_structure` | tool | List documentation topics for a GitHub repository. | +| `read_wiki_contents` | tool | Read wiki content for a GitHub repository. | +| `ask_question` | tool | Ask a question about a repo; AI answer grounded in DeepWiki context. | + +No separate **resources** or **prompts** are documented on the official DeepWiki MCP page as of the research date. + +## Installation + +**Public repos (Streamable HTTP, recommended):** no local install; point the client at the remote endpoint. + +```bash +# Claude Code (from mcp.deepwiki.com landing) +claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcp +``` + +## Configuration + +**Cursor / Windsurf-style** (per [Devin docs](https://docs.devin.ai/work-with-devin/deepwiki-mcp)—field name may vary by client: `serverUrl` vs `url`): + +```json +{ + "mcpServers": { + "deepwiki": { + "serverUrl": "https://mcp.deepwiki.com/mcp" + } + } +} +``` + +**Alternative JSON** (as shown on [mcp.deepwiki.com](https://mcp.deepwiki.com/)): + +```json +{ + "mcpServers": { + "deepwiki": { + "url": "https://mcp.deepwiki.com/mcp" + } + } +} +``` + +**Wire protocols** ([Devin docs](https://docs.devin.ai/work-with-devin/deepwiki-mcp)): + +| Endpoint | URL | Notes | +|----------|-----|--------| +| Streamable HTTP (recommended) | `https://mcp.deepwiki.com/mcp` | Preferred; works with Cloudflare, OpenAI, Claude. | +| SSE (legacy) | `https://mcp.deepwiki.com/sse` | Deprecated; avoid for new setups. | + +**Private repositories** ([mcp.deepwiki.com](https://mcp.deepwiki.com/)): + +```json +{ + "mcpServers": { + "deepwiki": { + "url": "https://mcp.devin.ai/mcp", + "headers": { + "Authorization": "Bearer " + } + } + } +} +``` + +## Authentication / Environment Variables + +| Variable | Required | Description | +|----------|----------|-------------| +| (none) | no | Public DeepWiki MCP at `mcp.deepwiki.com` requires no auth for public GitHub repos. | +| Devin API key | yes (private) | Bearer token in `Authorization` header when using `https://mcp.devin.ai/mcp` for private repos. | + +## Notes + +- **Product surface:** [deepwiki.com](https://deepwiki.com) is the user-facing wiki browser; **MCP** is hosted at [mcp.deepwiki.com](https://mcp.deepwiki.com/). +- **Docs:** Canonical instructions live under Devin documentation, not only on the wiki site. +- **Related:** [Devin MCP marketplace](https://docs.devin.ai/work-with-devin/mcp), [OpenAI remote MCP guide](https://platform.openai.com/docs/guides/tools-remote-mcp) (linked from Devin docs). diff --git a/.steering/mcps/github__github-mcp-server.md b/.steering/mcps/github__github-mcp-server.md new file mode 100644 index 0000000..5246137 --- /dev/null +++ b/.steering/mcps/github__github-mcp-server.md @@ -0,0 +1,115 @@ +--- +name: github-mcp-server +owner: github +url: https://github.com/github/github-mcp-server +docs_url: https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server +hosted_url: https://api.githubcopilot.com/mcp/ +type: official +transport: both +language: Go +version: v0.32.0 +stars: 28674 +last_updated: 2026-04-08 +tags: [mcp, github, copilot, remote-mcp, issues, pull-requests, actions, repository] +--- + +# GitHub MCP Server (hosted) + +> Official GitHub MCP server: connect agents to repos, issues, PRs, Actions, security, Copilot features, and more—via **GitHub-hosted HTTP** or a **local** stdio/Docker binary. + +## What It Does + +The **remote** server runs at **`https://api.githubcopilot.com/mcp/`** and is the recommended path when your MCP host supports remote servers (VS Code 1.101+, Cursor, Claude Desktop, Windsurf, Copilot in other IDEs, etc.). Auth is **OAuth** (per-host GitHub App) or a **GitHub PAT** in the `Authorization` header. The same capabilities are implemented in the open-source **[github/github-mcp-server](https://github.com/github/github-mcp-server)** (Go); hosted vs local differs only in transport and how you authenticate. Some tools inherit **Copilot or paid-feature** requirements ([GitHub Docs](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server)). + +## Tools / Resources / Prompts + +Capabilities are grouped into **toolsets** (each toolset exposes many MCP tools). When no toolsets are configured on the remote server, **defaults** apply ([README](https://github.com/github/github-mcp-server/blob/main/README.md)). + +| Name | Type | Description | +|------|------|-------------| +| `context` | toolset | Current user and GitHub context (**strongly recommended**). | +| `repos` | toolset | Repository browse/search, files, metadata. | +| `issues` | toolset | Issues. | +| `pull_requests` | toolset | Pull requests. | +| `actions` | toolset | GitHub Actions workflows, runs, jobs, artifacts. | +| `code_security` | toolset | Code scanning and related security APIs. | +| `dependabot` | toolset | Dependabot. | +| `discussions` | toolset | Discussions. | +| `gists` | toolset | Gists. | +| `git` | toolset | Low-level Git API operations. | +| `labels` | toolset | Labels. | +| `notifications` | toolset | Notifications. | +| `orgs` | toolset | Organizations. | +| `projects` | toolset | Projects. | +| `secret_protection` | toolset | Secret scanning. | +| `security_advisories` | toolset | Security advisories. | +| `stargazers` | toolset | Stargazers. | +| `users` | toolset | Users. | +| `copilot` | toolset | Copilot-related tools (e.g. coding agent); **extra on remote**. | +| `copilot_spaces` | toolset | Copilot Spaces; **remote**. | +| `github_support_docs_search` | toolset | Search GitHub product/support docs; **remote**. | + +**Remote-only / advanced:** **Insiders** early features via URL `https://api.githubcopilot.com/mcp/insiders` or header `X-MCP-Insiders: true` ([README](https://github.com/github/github-mcp-server/blob/main/README.md)). **Dynamic toolsets** (`enable_toolset`, `list_available_toolsets`, etc.) are documented for the **local** binary/Docker; behavior on hosted follows [remote server docs](https://github.com/github/github-mcp-server/blob/main/docs/remote-server.md). + +For a **full per-tool list** (e.g. `actions_list`, `get_file_contents`, …), see the **Tools** section of the [repository README](https://github.com/github/github-mcp-server/blob/main/README.md). + +## Installation + +**Hosted (no local binary):** add the server URL to your MCP client; complete OAuth in the host or supply a PAT (see Configuration). + +**Local (Docker)** — optional alternative from upstream README: + +```bash +docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server +``` + +## Configuration + +**VS Code / common JSON (OAuth-friendly):** `type: http` + URL ([README](https://github.com/github/github-mcp-server/blob/main/README.md)): + +```json +{ + "servers": { + "github": { + "type": "http", + "url": "https://api.githubcopilot.com/mcp/" + } + } +} +``` + +**PAT on the hosted endpoint** (pattern from README / Visual Studio docs): + +```json +{ + "servers": { + "github": { + "type": "http", + "url": "https://api.githubcopilot.com/mcp/", + "headers": { + "Authorization": "Bearer YOUR_GITHUB_PAT" + } + } + } +} +``` + +Some hosts use `requestInit.headers` instead of top-level `headers` ([GitHub Docs – Visual Studio example](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server)). Cursor-specific steps: [install-cursor.md](https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-cursor.md) in the repo. + +**GitHub Enterprise Cloud (ghe.com)** example shape from README: `https://copilot-api..ghe.com/mcp` with PAT header. + +## Authentication / Environment Variables + +| Mechanism | Required | Description | +|-----------|----------|-------------| +| OAuth | depends | Preferred for hosted server in supported hosts; scopes limited to what you approve ([GitHub Docs](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server)). | +| GitHub PAT | optional | `Authorization: Bearer ` for hosts without OAuth; scopes must match tools you use ([token docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)). | +| `GITHUB_PERSONAL_ACCESS_TOKEN` | yes (local Docker) | Passed into container for **local** server ([README](https://github.com/github/github-mcp-server/blob/main/README.md)). | + +Org/enterprise **“MCP servers in Copilot”** policy may apply ([GitHub Docs](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server)). Enterprise Managed Users may be PAT-restricted; OAuth app allowlists may apply per host. + +## Notes + +- **Registry / one-click:** Discover and install via [GitHub MCP Registry](https://github.com/mcp) (`@mcp github` in VS Code) per [GitHub Docs](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server). +- **GitHub Enterprise Server:** remote hosting not supported; use **local** server ([README](https://github.com/github/github-mcp-server/blob/main/README.md)). +- **Policies:** See [policies-and-governance.md](https://github.com/github/github-mcp-server/blob/main/docs/policies-and-governance.md) in the repo. diff --git a/.steering/mcps/upstash__context7.md b/.steering/mcps/upstash__context7.md new file mode 100644 index 0000000..1be821b --- /dev/null +++ b/.steering/mcps/upstash__context7.md @@ -0,0 +1,89 @@ +--- +name: context7 +owner: upstash +url: https://github.com/upstash/context7 +product_url: https://context7.com +type: official +transport: both +language: TypeScript +version: 2.1.7 +stars: 52032 +last_updated: 2026-04-08 +tags: [mcp, documentation, llm, libraries, npm, upstash] +--- + +# Context7 + +> Up-to-date, version-specific library documentation for LLMs and AI coding assistants, delivered via MCP tools, a hosted MCP endpoint, CLI (`ctx7`), and a REST API. + +## What It Does + +Context7 indexes community-contributed documentation for many libraries and frameworks so models can retrieve current APIs and examples instead of relying on stale training data. Integrations include **MCP** (local `npx` server or remote `https://mcp.context7.com/mcp`), **`npx ctx7 setup`** (OAuth, API key, optional skill install), and **direct API** use per [API guide](https://context7.com/docs/api-guide). This repository’s Copilot docs map the secret `CONTEXT7_KEY` to the **`CONTEXT7_API_KEY`** env var expected by the MCP package and hosted endpoint. + +## Tools / Resources / Prompts + +| Name | Type | Description | +|------|------|-------------| +| `resolve-library-id` | tool | Resolves a general library name to a Context7 library ID. Parameters (from upstream README): `query` (required) — user question/task for ranking; `libraryName` (required) — name to search. | +| `query-docs` | tool | Retrieves documentation for a library. Parameters (from upstream README): `libraryId` (required) — e.g. `/mongodb/docs`, `/vercel/next.js`; `query` (required) — question or task. | + +No separate MCP **resources** or **prompts** are listed in the [project README](https://github.com/upstash/context7/blob/master/README.md) or [developer guide](https://context7.com/docs/resources/developer) as of the research date. + +## Installation + +**Hosted MCP (HTTP):** use server URL `https://mcp.context7.com/mcp` and authenticate with the `CONTEXT7_API_KEY` header (see [Manual installation / all clients](https://context7.com/docs/resources/all-clients)). + +**Local MCP (stdio) via npm package:** + +```bash +npx -y @upstash/context7-mcp +``` + +**Guided setup (OAuth + key + skill/MCP choice):** + +```bash +npx ctx7 setup +``` + +Optional flags such as `--cursor`, `--claude`, or `--opencode` target a specific client ([README](https://github.com/upstash/context7/blob/master/README.md)). + +## Configuration + +**VS Code / generic `mcp.json` style (stdio + env)** — from [Developer Guide](https://context7.com/docs/resources/developer): + +```json +{ + "mcpServers": { + "context7": { + "command": "npx", + "args": ["-y", "@upstash/context7-mcp"], + "env": { + "CONTEXT7_API_KEY": "YOUR_API_KEY" + } + } + } +} +``` + +**Local server flags** (same guide): `node packages/mcp/dist/index.js --transport stdio --api-key YOUR_API_KEY` or `--transport http --port 8080`. Default transport is `stdio`. + +**This repo’s Copilot MCP example** uses the secret name `CONTEXT7_KEY` but passes it as `CONTEXT7_API_KEY` for the child process — align the **npm package name** with upstream: prefer `@upstash/context7-mcp`, not `@context7/mcp-server` (see [README.md](https://github.com/upstash/context7/blob/master/README.md) badges and docs). + +## Authentication / Environment Variables + +| Variable / header | Required | Description | +|-------------------|----------|-------------| +| `CONTEXT7_API_KEY` | Recommended | API key from [context7.com/dashboard](https://context7.com/dashboard); higher rate limits than without a key ([README](https://github.com/upstash/context7/blob/master/README.md)). | +| `CONTEXT7_API_KEY` (HTTP header) | For hosted MCP | Passed as a header when using `https://mcp.context7.com/mcp` ([README](https://github.com/upstash/context7/blob/master/README.md)). | +| `--api-key` | Optional CLI | Overrides env when both set ([Developer Guide](https://context7.com/docs/resources/developer)). | + +**OAuth:** `npx ctx7 setup` performs OAuth and can generate an API key ([README](https://github.com/upstash/context7/blob/master/README.md)). + +## Notes + +- **Publisher:** [Upstash](https://github.com/upstash) on GitHub; product site [context7.com](https://context7.com). npm: [`@upstash/context7-mcp`](https://www.npmjs.com/package/@upstash/context7-mcp) (version **2.1.7** on npm `latest` as of 2026-04-08). +- **Pricing (public):** Free (1,000 API calls/month per [plans page](https://context7.com/plans)), Pro ($10/seat/month, 5,000 calls/seat), Enterprise (custom). Overage and private-repo parsing details are on the same page. +- **Scope of open source:** The repo hosts the **MCP server** source; API backend, parsing, and crawling are private ([README disclaimer](https://github.com/upstash/context7/blob/master/README.md)). +- **Quality:** Documentation is community-contributed; accuracy is not guaranteed ([README disclaimer](https://github.com/upstash/context7/blob/master/README.md)). +- **Alternatives / related:** CLI `ctx7 library` / `ctx7 docs` for non-MCP workflows; [REST API](https://context7.com/docs/api-guide) for custom integrations. +- **Verify tools:** `npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp` ([Developer Guide](https://context7.com/docs/resources/developer)). diff --git a/.steering/skills/.boost-ai-sync.json b/.steering/skills/.boost-ai-sync.json new file mode 100644 index 0000000..5302332 --- /dev/null +++ b/.steering/skills/.boost-ai-sync.json @@ -0,0 +1,4 @@ +{ + "repo": "laravel/boost", + "commit": "14a5c6ab6729a8bb108bc5a29280fe53e5da6abd" +} diff --git a/.steering/skills/README.md b/.steering/skills/README.md index 8539115..55b245f 100644 --- a/.steering/skills/README.md +++ b/.steering/skills/README.md @@ -1,5 +1,19 @@ -# Copilot Skill Research Notes +# `.steering/skills` -Research notes generated by the `skill-research` Copilot agent. +## Packaged skills (synced) -Each file is named `__.md` (e.g., `microsoft__copilot-sdk.md`). +Subdirectories with **`SKILL.md`** are canonical. Replicate each to: + +- `.cursor/skills//SKILL.md` +- `.claude/skills//SKILL.md` +- `.github/skills//SKILL.md` + +Edit only under `.steering/skills//`, then run **`python3 scripts/regenerate-ide-mirrors.py`** (or follow the **sync-skills** skill) so `.cursor`, `.claude`, and `.github` match `.steering`. + +## Upstream-derived skills (repeatable sync) + +Some skills are regenerated from external catalogs rather than edited by hand. See **[SOURCES.md](./SOURCES.md)** for the list (for example [Laravel Boost `.ai`](https://github.com/laravel/boost/tree/main/.ai)). Refresh them with **`python3 scripts/sync-boost-ai-skills.py`**, then run **`python3 scripts/regenerate-ide-mirrors.py`**. The latest Boost commit used is stored in **`.boost-ai-sync.json`**. + +## Research notes (not synced) + +Flat files named **`__.md`** are outputs from the **`research-skill`** agent. They are not mirrored. diff --git a/.steering/skills/SOURCES.md b/.steering/skills/SOURCES.md new file mode 100644 index 0000000..c50727f --- /dev/null +++ b/.steering/skills/SOURCES.md @@ -0,0 +1,47 @@ +# Skill sources + +Canonical packaged skills live in subdirectories of `.steering/skills/` (each with a `SKILL.md`). This file tracks **upstream catalogs** so we can refresh vendor-derived content deliberately instead of one-off copies. + +## Laravel Boost (`.ai`) + +[Laravel Boost](https://github.com/laravel/boost) publishes agent-oriented guidelines under [`.ai`](https://github.com/laravel/boost/tree/main/.ai) as Blade templates (`SKILL.blade.php`, `core.blade.php`) and some plain `SKILL.md` files. They assume Boost’s `GuidelineAssist` helpers (`{{ $assist->... }}`, `@boostsnippet`). + +Boost originals often say to use **`search-docs`** — that tool ships with Laravel Boost’s MCP setup. Outside Boost, treat it as “use project documentation / official docs,” or wire Boost’s MCP if you use it. + +**This repository** keeps portable Markdown copies under `.steering/skills//`, generated by: + +```bash +python3 scripts/sync-boost-ai-skills.py +``` + +Optional: + +- `BOOST_REPO_ROOT=/path/to/local/boost` — use an existing clone instead of a temp shallow clone. +- `BOOST_REV=` — when cloning, fetch that revision (shallow fetch). + +After regenerating Boost-derived skills, refresh IDE mirrors (same as CI): + +```bash +python3 scripts/regenerate-ide-mirrors.py +``` + +The last sync records the Boost commit in `.steering/skills/.boost-ai-sync.json`. + +### Mapped skills (Boost → `.steering/skills`) + +| Local directory | Upstream path (Boost `main`) | Notes | +|-----------------|------------------------------|--------| +| `fluxui-free-development` | `.ai/fluxui-free/skill/fluxui-development/SKILL.blade.php` | Free Flux UI edition | +| `fluxui-pro-development` | `.ai/fluxui-pro/skill/fluxui-development/SKILL.blade.php` | Pro Flux UI edition | +| `pest-testing` | `.ai/pest/4/skill/pest-testing/SKILL.blade.php` | Pest **4** (see script constants for version bumps) | +| `laravel-sail` | `.ai/sail/core.blade.php` | Sail-first command prefixing | +| `livewire-development` | `.ai/livewire/4/skill/livewire-development/` | Includes inlined JS hooks (from `reference/javascript-hooks.md`) | +| `tailwindcss-development` | `.ai/tailwindcss/4/skill/tailwindcss-development/SKILL.md` | Plain Markdown upstream | +| `phpunit-laravel` | `.ai/phpunit/core.blade.php` | PHPUnit (not Pest) | +| `laravel-pint` | `.ai/pint/core.blade.php` | Blade `@if` branches merged in the generator | + +To add another Boost skill, extend the mapping in `scripts/sync-boost-ai-skills.py` and re-run the sync script. + +## Other skills + +Skills authored in-repo (no upstream sync) include `agentic-programming`, `laravel-research`, `skill-research`, `sync-agents`, and `sync-skills` (see each folder’s `SKILL.md`). diff --git a/.steering/skills/fluxui-free-development/SKILL.md b/.steering/skills/fluxui-free-development/SKILL.md new file mode 100644 index 0000000..242e40a --- /dev/null +++ b/.steering/skills/fluxui-free-development/SKILL.md @@ -0,0 +1,90 @@ +--- +name: fluxui-free-development +description: "Use this skill for Flux UI Free development in Livewire applications only. Trigger when working with free components, building or customizing Livewire component UIs, creating forms, modals, and other interactive elements available in the free edition. Covers: free Flux components (buttons, inputs, modals, forms, tables, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for Pro-only Flux components, non-Livewire frameworks, or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-free/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the free edition of Flux UI, which includes all free components and variants but not Pro components. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Free Edition) + +Available: avatar, badge, brand, breadcrumbs, button, callout, checkbox, dropdown, field, heading, icon, input, modal, navbar, otp-input, profile, radio, select, separator, skeleton, switch, text, textarea, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Modals + + +```blade + + Title +

Content

+
+``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Trying to use Pro-only components in the free edition +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.steering/skills/fluxui-pro-development/SKILL.md b/.steering/skills/fluxui-pro-development/SKILL.md new file mode 100644 index 0000000..1bd3cfc --- /dev/null +++ b/.steering/skills/fluxui-pro-development/SKILL.md @@ -0,0 +1,93 @@ +--- +name: fluxui-pro-development +description: "Use this skill for Flux UI development in Livewire applications only. Trigger when working with components, building or customizing Livewire component UIs, creating forms, modals, tables, or other interactive elements. Covers: flux: components (buttons, inputs, modals, forms, tables, date-pickers, kanban, badges, tooltips, etc.), component composition, Tailwind CSS styling, Heroicons/Lucide icon integration, validation patterns, responsive design, and theming. Do not use for non-Livewire frameworks or non-component styling." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/fluxui-pro/skill/fluxui-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Flux UI Development + +## Documentation + +Use `search-docs` for detailed Flux UI patterns and documentation. + +## Basic Usage + +This project uses the Pro version of Flux UI, which includes all free and Pro components and variants. + +Flux UI is a component library for Livewire built with Tailwind CSS. It provides components that are easy to use and customize. + +Use Flux UI components when available. Fall back to standard Blade components when no Flux component exists for your needs. + + +```blade +Click me +``` + + +## Available Components (Pro Edition) + +Available: accordion, autocomplete, avatar, badge, brand, breadcrumbs, button, calendar, callout, card, chart, checkbox, command, composer, context, date-picker, dropdown, editor, field, file-upload, heading, icon, input, kanban, modal, navbar, otp-input, pagination, pillbox, popover, profile, radio, select, separator, skeleton, slider, switch, table, tabs, text, textarea, time-picker, toast, tooltip + +## Icons + +Flux includes [Heroicons](https://heroicons.com/) as its default icon set. Search for exact icon names on the Heroicons site - do not guess or invent icon names. + + +```blade +Export +``` + + +For icons not available in Heroicons, use [Lucide](https://lucide.dev/). Import the icons you need with the Artisan command: + +```bash +php artisan flux:icon crown grip-vertical github +``` + +## Common Patterns + +### Form Fields + + +```blade + + Email + + + +``` + + +### Tables + + +```blade + + + Column Name + + + Value + + +``` + + +## Verification + +1. Check component renders correctly +2. Test interactive states +3. Verify mobile responsiveness + +## Common Pitfalls + +- Not checking if a Flux component exists before creating custom implementations +- Forgetting to use the `search-docs` tool for component-specific documentation +- Not following existing project patterns for Flux usage + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.steering/skills/laravel-pint/SKILL.md b/.steering/skills/laravel-pint/SKILL.md new file mode 100644 index 0000000..0be7af4 --- /dev/null +++ b/.steering/skills/laravel-pint/SKILL.md @@ -0,0 +1,16 @@ +--- +name: laravel-pint +description: "Use when formatting PHP in Laravel projects that use Laravel Pint. Trigger after editing PHP files, before finalizing a change, or when the user mentions Pint or project PHP style. Covers: running pint on dirty files, --format agent when supported, and not using pint --test for autofix workflows." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pint/core.blade.php` (Blade branches merged). Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Pint Code Formatter + +- If you have modified any PHP files, run `./vendor/bin/pint --dirty` before finalizing changes so code matches the project's expected style. +- When your tooling supports Pint's agent formatter, prefer `./vendor/bin/pint --dirty --format agent`. +- Do not rely on `./vendor/bin/pint --test` to fix style; run `./vendor/bin/pint` (with or without `--format agent`) to apply fixes. +- With **Laravel Sail**, prefix: `./vendor/bin/sail bin pint --dirty` (and add `--format agent` when appropriate). diff --git a/.steering/skills/laravel-research/SKILL.md b/.steering/skills/laravel-research/SKILL.md new file mode 100644 index 0000000..932974d --- /dev/null +++ b/.steering/skills/laravel-research/SKILL.md @@ -0,0 +1,66 @@ +--- +name: laravel-research +description: Generates Laravel package notes from the Laravel package template. Use for structured output. +--- +You are the Laravel Package Note Generator. + +Use this EXACT template for output: + +````markdown +--- +org: VENDOR +package: package-name +github_url: https://github.com/VENDOR/package-name +docs_url: +composer_require: composer require VENDOR/package-name +author: +announce_date: +latest_release: vX.Y.Z (DATE) +release_date: +laravel_news_url: +downloads_30d: +stars: +tags: [laravel, packages, FEATURE1, FEATURE2] +--- + +# PACKAGE_NAME + + + +**DESCRIPTION** + +## Key Features +- FEATURE1 +- FEATURE2 + +## Installation +```bash +composer_require +``` + +## Usage +CODE_EXAMPLE + +## Resources +- [[Laravel Packages]] (related) +```` + +## Field Resolution Rules + +Resolve every frontmatter field before writing. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist JSON (`packagist.org/packages//

.json`) → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent | +| `stars` | GitHub MCP `search_repositories` or `get_repository` → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page → "Last 30 days" installs | +| `announce_date` | Laravel News article publication date | +| `laravel_news_url` | Search `laravel-news.com ` and verify URL | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave blank if the data genuinely does not exist after checking its source. + +Fill placeholders from research. Write to `.steering/laravel-packages/__.md`. diff --git a/.steering/skills/laravel-sail/SKILL.md b/.steering/skills/laravel-sail/SKILL.md new file mode 100644 index 0000000..3948cb3 --- /dev/null +++ b/.steering/skills/laravel-sail/SKILL.md @@ -0,0 +1,21 @@ +--- +name: laravel-sail +description: "Use when the Laravel project runs under Laravel Sail. Trigger for Docker/Sail workflows, running artisan, composer, npm, or PHP only inside containers. Covers: ./vendor/bin/sail up/down, sail artisan, sail composer, sail npm, and never running host PHP/Composer against a Sail-only app by mistake." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/sail/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Laravel Sail + +- This project runs inside Laravel Sail's Docker containers. You MUST execute all commands through Sail. +- Start services using `./vendor/bin/sail up -d` and stop them with `./vendor/bin/sail stop`. +- Open the application in the browser by running `./vendor/bin/sail open`. +- Always prefix PHP, Artisan, Composer, and Node commands with `./vendor/bin/sail`. Examples: + - Run Artisan Commands: `./vendor/bin/sail artisan migrate` + - Install Composer packages: `./vendor/bin/sail composer install` + - Execute Node commands: `./vendor/bin/sail npm run dev` + - Execute PHP scripts: `./vendor/bin/sail php [script]` +- View all available Sail commands by running `./vendor/bin/sail` without arguments. diff --git a/.steering/skills/livewire-development/SKILL.md b/.steering/skills/livewire-development/SKILL.md new file mode 100644 index 0000000..86e073c --- /dev/null +++ b/.steering/skills/livewire-development/SKILL.md @@ -0,0 +1,216 @@ +--- +name: livewire-development +description: "Use for any task or question involving Livewire. Activate if user mentions Livewire, wire: directives, or Livewire-specific concepts like wire:model, wire:click, wire:sort, or islands, invoke this skill. Covers building new components, debugging reactivity issues, real-time form validation, drag-and-drop, loading states, migrating from Livewire 3 to 4, converting component formats (SFC/MFC/class-based), and performance optimization. Do not use for non-Livewire reactive UI (React, Vue, Alpine-only, Inertia.js) or standard Laravel forms without Livewire." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/livewire/4/skill/livewire-development/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Livewire Development + +## Documentation + +Use `search-docs` for detailed Livewire 4 patterns and documentation. + +## Basic Usage + +### Creating Components + +```bash +# Single-file component (default in v4) +php artisan make:livewire create-post + +# Multi-file component +php artisan make:livewire create-post --mfc + +# Class-based component (v3 style) +php artisan make:livewire create-post --class + +# With namespace +php artisan make:livewire Posts/CreatePost +``` + +### Converting Between Formats + +Use `php artisan livewire:convert create-post` to convert between single-file, multi-file, and class-based formats. + +### Choosing a Component Format + +Before creating a component, check `config/livewire.php` for directory overrides, which change where files are stored. Then, look at existing files in those directories (defaulting to `app/Livewire/` and `resources/views/livewire/`) to match the established convention. + +### Component Format Reference + +| Format | Flag | Class Path | View Path | +|--------|------|------------|-----------| +| Single-file (SFC) | default | — | `resources/views/livewire/create-post.blade.php` (PHP + Blade in one file) | +| Multi-file (MFC) | `--mfc` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| Class-based | `--class` | `app/Livewire/CreatePost.php` | `resources/views/livewire/create-post.blade.php` | +| View-based | ⚡ prefix | — | `resources/views/livewire/create-post.blade.php` (Blade-only with functional state) | + +Namespaced components map to subdirectories: `make:livewire Posts/CreatePost` creates files at `app/Livewire/Posts/CreatePost.php` and `resources/views/livewire/posts/create-post.blade.php`. + +### Single-File Component Example + + +```php +count++; + } +} +?> + +

+ +
+``` + + +## Livewire 4 Specifics + +### Key Changes From Livewire 3 + +These things changed in Livewire 4, but may not have been updated in this application. Verify this application's setup to ensure you follow existing conventions. + +- Use `Route::livewire()` for full-page components (e.g., `Route::livewire('/posts/create', CreatePost::class)`); config keys renamed: `layout` → `component_layout`, `lazy_placeholder` → `component_placeholder`. +- `wire:model` now ignores child events by default (use `wire:model.deep` for old behavior); `wire:scroll` renamed to `wire:navigate:scroll`. +- Component tags must be properly closed; `wire:transition` now uses View Transitions API (modifiers removed). +- JavaScript: `$wire.$js('name', fn)` → `$wire.$js.name = fn`; legacy commit/request hooks map to the **interceptor** APIs — use **`$wire.intercept()` / `Livewire.interceptAction()`** (action lifecycle), **`$wire.interceptMessage()` / `Livewire.interceptMessage()`** (payload handling), and **`$wire.interceptRequest()` / `Livewire.interceptRequest()`** (HTTP request lifecycle) as appropriate. + +### New Features + +- Component formats: single-file (SFC), multi-file (MFC), view-based components. +- Islands (`@island`) for isolated updates; async actions (`wire:click.async`, `#[Async]`) for parallel execution. +- Deferred/bundled loading: `defer`, `lazy.bundle` for optimized component loading. + +| Feature | Usage | Purpose | +|---------|-------|---------| +| Islands | `@island(name: 'stats')` | Isolated update regions | +| Async | `wire:click.async` or `#[Async]` | Non-blocking actions | +| Deferred | `defer` attribute | Load after page render | +| Bundled | `lazy.bundle` | Load multiple together | + +### New Directives + +- `wire:sort`, `wire:intersect`, `wire:ref`, `.renderless`, `.preserve-scroll` are available for use. +- `data-loading` is added while a request is in flight for elements that dispatch one (for example many `wire:click` / `wire:submit` targets); exact coverage depends on the attribute and your Livewire version — confirm in the docs for your app. + +| Directive | Purpose | +|-----------|---------| +| `wire:sort` | Drag-and-drop sorting | +| `wire:intersect` | Viewport intersection detection | +| `wire:ref` | Element references for JS | +| `.renderless` | Component without rendering | +| `.preserve-scroll` | Preserve scroll position | + +## Best Practices + +- Always use `wire:key` in loops +- Use `wire:loading` for loading states +- Use `wire:model.live` for instant updates (default is debounced) +- Validate and authorize in actions (treat like HTTP requests) + +## Configuration + +- `smart_wire_keys` defaults to `true`; new configs: `component_locations`, `component_namespaces`, `make_command`, `csp_safe`. + +## Alpine & JavaScript + +- `wire:transition` uses browser View Transitions API; `$errors` and `$intercept` magic properties available. +- Non-blocking `wire:poll` and parallel `wire:model.live` updates improve performance. + +## JavaScript integration + +Livewire 4 exposes three interceptor layers (component helpers mirror the `Livewire.*` globals where applicable): + +### Intercept actions + +Run logic around a **named component action** (before/after the action runs): + +```js +$wire.intercept('save', ({ onSuccess, onFailure }) => { + onSuccess(() => console.log('Saved!')); +}); +// or +Livewire.interceptAction(({ action, onSuccess, onFailure }) => { + // filter by action.name, etc. +}); +``` + +### Intercept messages + +Hook the **Livewire message** (payload / snapshot) pipeline: + +```js +Livewire.interceptMessage(({ component, message, onFinish, onSuccess, onError }) => { + onFinish(() => { /* After response, before processing */ }); + onSuccess(({ payload }) => { /* payload.snapshot, payload.effects */ }); + onError(() => { /* Server errors */ }); +}); +``` + +### Intercept requests + +Hook the underlying **HTTP request** (fetch/XHR lifecycle): + +```js +Livewire.interceptRequest(({ request, onResponse, onSuccess, onError, onFailure }) => { + onResponse(({ response }) => { /* When received */ }); + onSuccess(({ response, responseJson }) => { /* Success */ }); + onError(({ response, responseBody, preventDefault }) => { /* 4xx/5xx */ }); + onFailure(({ error }) => { /* Network failures */ }); +}); +``` + +### Component-scoped interceptors + +```blade + +``` + +## Magic Properties + +- `$errors` - Access validation errors from JavaScript +- `$intercept` - Component-scoped action interceptors + + + +## Testing + + +```php +Livewire::test(Counter::class) + ->assertSet('count', 0) + ->call('increment') + ->assertSet('count', 1); +``` + + +## Verification + +1. Browser console: Check for JS errors +2. Network tab: Verify Livewire requests return 200 +3. Ensure `wire:key` on all `@foreach` loops + +## Common Pitfalls + +- Missing `wire:key` in loops → unexpected re-rendering +- Expecting `wire:model` real-time → use `wire:model.live` +- Unclosed component tags → syntax errors in v4 +- Using deprecated config keys or JS hooks +- Including Alpine.js separately (already bundled in Livewire 4) + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.steering/skills/pest-testing/SKILL.md b/.steering/skills/pest-testing/SKILL.md new file mode 100644 index 0000000..df8bb10 --- /dev/null +++ b/.steering/skills/pest-testing/SKILL.md @@ -0,0 +1,170 @@ +--- +name: pest-testing +description: "Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: test()/it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/pest/4/skill/pest-testing/SKILL.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Pest Testing 4 + +## Documentation + +Use `search-docs` for detailed Pest 4 patterns and documentation. + +## Basic Usage + +### Creating Tests + +All tests must be written using Pest. Use `php artisan make:test --pest `. + +### Test Organization + +- Unit/Feature tests: `tests/Feature` and `tests/Unit` directories. +- Browser tests: `tests/Browser/` directory. +- Do NOT remove tests without approval - these are core application code. + +### Basic Test Structure + +Pest supports both `test()` and `it()` functions. Before writing new tests, check existing test files in the same directory to match the project's convention. Use `test()` if existing tests use `test()`, or `it()` if they use `it()`. + + +```php +it('is true', function () { + expect(true)->toBeTrue(); +}); +``` + + +### Running Tests + +- Run minimal tests with filter before finalizing: `php artisan test --compact --filter=testName`. +- Run all tests: `php artisan test --compact`. +- Run file: `php artisan test --compact tests/Feature/ExampleTest.php`. + +## Assertions + +Use specific assertions (`assertSuccessful()`, `assertNotFound()`) instead of `assertStatus()`: + + +```php +it('returns all', function () { + $this->postJson('/api/docs', [])->assertSuccessful(); +}); +``` + + +| Use | Instead of | +|-----|------------| +| `assertSuccessful()` | `assertStatus(200)` | +| `assertNotFound()` | `assertStatus(404)` | +| `assertForbidden()` | `assertStatus(403)` | + +## Mocking + +Import mock function before use: `use function Pest\Laravel\mock;` + +## Datasets + +Use datasets for repetitive tests (validation rules, etc.): + + +```php +it('has emails', function (string $email) { + expect($email)->not->toBeEmpty(); +})->with([ + 'james' => 'james@laravel.com', + 'taylor' => 'taylor@laravel.com', +]); +``` + + +## Pest 4 Features + +| Feature | Purpose | +|---------|---------| +| Browser Testing | Full integration tests in real browsers | +| Smoke Testing | Validate multiple pages quickly | +| Visual Regression | Compare screenshots for visual changes | +| Test Sharding | Parallel CI runs | +| Architecture Testing | Enforce code conventions | + +### Browser Test Example + +Browser tests run in real browsers for full integration testing: + +- Browser tests live in `tests/Browser/`. +- Use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories. +- Use `RefreshDatabase` for clean state per test. +- Interact with page: click, type, scroll, select, submit, drag-and-drop, touch gestures. +- Test on multiple browsers (Chrome, Firefox, Safari) if requested. +- Test on different devices/viewports (iPhone 14 Pro, tablets) if requested. +- Switch color schemes (light/dark mode) when appropriate. +- Take screenshots or pause tests for debugging. + + +```php +it('may reset the password', function () { + Notification::fake(); + + $this->actingAs(User::factory()->create()); + + $page = visit('/sign-in'); + + $page->assertSee('Sign In') + ->assertNoJavaScriptErrors() + ->click('Forgot Password?') + ->fill('email', 'nuno@laravel.com') + ->click('Send Reset Link') + ->assertSee('We have emailed your password reset link!'); + + Notification::assertSent(ResetPassword::class); +}); +``` + + +### Smoke Testing + +Quickly validate multiple pages have no JavaScript errors: + + +```php +$pages = visit(['/', '/about', '/contact']); + +$pages->assertNoJavaScriptErrors()->assertNoConsoleLogs(); +``` + + +### Visual Regression Testing + +Capture and compare screenshots to detect visual changes. + +### Test Sharding + +Split tests across parallel processes for faster CI runs. + +### Architecture Testing + +Pest 4 includes architecture testing (from Pest 3): + + +```php +arch('controllers') + ->expect('App\Http\Controllers') + ->toExtendNothing() + ->toHaveSuffix('Controller'); +``` + + +## Common Pitfalls + +- Not importing `use function Pest\Laravel\mock;` before using mock +- Using `assertStatus(200)` instead of `assertSuccessful()` +- Forgetting datasets for repetitive validation tests +- Deleting tests without approval +- Forgetting `assertNoJavaScriptErrors()` in browser tests + +--- + +**Command prefix:** These examples use `php artisan` and `composer` / `npm` as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with `./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`). diff --git a/.steering/skills/phpunit-laravel/SKILL.md b/.steering/skills/phpunit-laravel/SKILL.md new file mode 100644 index 0000000..78f990e --- /dev/null +++ b/.steering/skills/phpunit-laravel/SKILL.md @@ -0,0 +1,26 @@ +--- +name: phpunit-laravel +description: "Use when writing or running PHPUnit tests in a Laravel app that uses PHPUnit (not Pest). Trigger for test classes, assertions, make:test --phpunit, or running the test suite. Covers: creating tests, running filtered tests, and treating tests as core code that must not be removed without approval." +license: MIT +metadata: + author: laravel +--- + +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/phpunit/core.blade.php`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# PHPUnit + +- This application uses PHPUnit for testing. All tests must be written as PHPUnit classes. Use `php artisan make:test --phpunit ` to create a new test. +- If you see a test using "Pest", convert it to PHPUnit. +- Every time a test has been updated, run that singular test. +- When the tests relating to your feature are passing, ask the user if they would like to also run the entire test suite to make sure everything is still passing. +- Tests should cover all happy paths, failure paths, and edge cases. +- You must not remove any tests or test files from the tests directory without approval. These are not temporary or helper files; these are core to the application. + +## Running Tests +- Run the minimal number of tests, using an appropriate filter, before finalizing. +- To run all tests: `php artisan test --compact`. +- To run all tests in a file: `php artisan test --compact tests/Feature/ExampleTest.php`. +- To filter on a particular test name: `php artisan test --compact --filter=testName` (recommended after making a change to a related file). +**Command prefix:** Use `php artisan` on the host or `./vendor/bin/sail artisan` when using Sail. + diff --git a/.steering/skills/skill-research/SKILL.md b/.steering/skills/skill-research/SKILL.md new file mode 100644 index 0000000..4cd8415 --- /dev/null +++ b/.steering/skills/skill-research/SKILL.md @@ -0,0 +1,30 @@ +--- +name: skill-research +description: Generates structured research notes about an agent skill from a repository URL. Use for skill discovery and documentation. +--- + +You are the **Skill Note Generator** for this repository. + +## Canonical packaging spec + +Before you interpret an upstream skill or structure a research note, **read the canonical skill packaging template** at [`.steering/templates/skill.md`](../../../.steering/templates/skill.md). It is the full spec reference (frontmatter fields, `SKILL.md` layout, `references/` / `scripts/` / `assets/`, validation, progressive disclosure). + +The same content is mirrored to **`.github/skills/skill-research/skill-template.md`**, **`.claude/skills/skill-template/SKILL.md`**, and **`.cursor/skills/skill-template/SKILL.md`**. **Verify steering sync** CI fails if those mirrors drift from `.steering/templates/skill.md`. Edit `.steering/templates/skill.md`, run `python3 scripts/regenerate-ide-mirrors.py`, then commit the mirrors together. + +## GitHub Copilot Agent Skills (steering reference) + +![[github-copilot/Skills]] + +## Research note + +Write to `.steering/skills/__.md`. Use a stable `namespace` from the source (org, group, or disambiguated host+project). +Normalize both `namespace` and `skill-name` to file-safe slugs: lowercase ASCII `a-z0-9-` only, no `/`, `\`, or `..`. +If normalization would produce an empty value, stop and ask for clarification. Cover at minimum: + +1. **Frontmatter vs spec** — Map the upstream `SKILL.md` YAML to the template fields (`name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`). Note gaps, invalid `name` patterns, or missing required fields. +2. **Skill instructions** — Summary of what the upstream body tells an agent to do; steps, examples, and edge cases if present. +3. **Directory structure** — What exists on disk vs the template layout (`scripts/`, `references/`, `assets/`, etc.). +4. **Validation & spec** — Whether `skills-ref validate` or agentskills.io spec items apply; follow-ups for the maintainer. +5. **Sources** — URLs and paths you relied on (repository, skill directory, `SKILL.md`, related agents or workflows). + +Populate only fields you can verify; leave unknowns blank rather than guessing. diff --git a/.steering/skills/sync-agents/SKILL.md b/.steering/skills/sync-agents/SKILL.md new file mode 100644 index 0000000..ecb00da --- /dev/null +++ b/.steering/skills/sync-agents/SKILL.md @@ -0,0 +1,36 @@ +--- +name: sync-agents +description: Builds .steering/agents (Obsidian ![[ embeds expanded), writes .github/agents, then .cursor/.claude with Copilot YAML stripped. Does not commit. +license: MIT +compatibility: Same embed rules as verify-steering-sync.yml (Python or manual). +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync agents (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/` changed. +- Merge IDE edits back into `.steering/agents/` first, then replicate. + +## Replication rules + +1. **Build** — In each agent file’s **body** (after opening YAML), expand **`![[path]]`** embed links for **`templates/`** paths by default. For **`research-skill.agent.md`**, also expand **`![[github-copilot/...]]`** embeds only in the **`.cursor/agents/`** output; **`.github`** / **`.claude`** replace those embeds with a pointer to **`.steering/github-copilot/Skills.md`**. With `#Heading`, inline the `## Heading` section only. Leave other `![[...]]` as-is. + +2. **`.github/agents/`** — Write the **built** markdown (same basename). + +3. **`.cursor/agents/`** and **`.claude/agents/`** — Built file, then strip **`tools:`** and **`mcp-servers:`** from the opening frontmatter. + +4. Do **not** touch skills or skill-template paths. + +## Steps + +1. Apply the rules above (match **Verify steering sync** agent step). +2. Run `git diff`. +3. **Do not** commit unless the user asks. + +## CI + +**Verify steering sync** implements the same build + strip logic. diff --git a/.steering/skills/sync-agents/tdd.md b/.steering/skills/sync-agents/tdd.md new file mode 100644 index 0000000..92b96ca --- /dev/null +++ b/.steering/skills/sync-agents/tdd.md @@ -0,0 +1,55 @@ +--- +name: tdd +description: Test-Driven Design (TDD) for Laravel work—red/green/refactor, Pest-first workflow, grouping, mocks, browser and architecture tests, coverage and type gates. Use when implementing features, fixing bugs with tests first, or structuring a test suite. +license: MIT +metadata: + author: agentic-programming + version: "1.0" +--- + +# Test-Driven Design (TDD) + +**Test-Driven Design** is the same loop as classic TDD—**red → green → refactor**—used deliberately to shape APIs, boundaries, and seams before production code hardens. Tests express the behavior you want; the implementation follows. Prefer small steps: one failing assertion at a time, minimal code to pass, then refactor with a green suite. + +## When to use + +- New behavior: write or extend a **failing** test that names the outcome, then implement until green. +- Bugfixes: reproduce with a test that fails today, then fix until green (regression locked in). +- Refactors: keep tests green while changing structure; add tests only where behavior was implicit. +- Reviews / CI: you need fast default runs plus optional slow groups (browser, integration). + +## Laravel + Pest + +This repo’s **Pest** stack is summarized in [[laravel-packages/pestphp__pest]] (file: `.steering/laravel-packages/pestphp__pest.md`). Use **Pest** on top of PHPUnit for expressive tests; follow its [installation](https://pestphp.com/docs/installation) and [continuous integration](https://pestphp.com/docs/continuous-integration) docs for project setup and CI. + +### Pest docs to keep handy + +| Topic | Why it matters for TDD | +|--------|-------------------------| +| [Grouping tests](https://pestphp.com/docs/grouping-tests) | Put slow or flaky paths (e.g. browser) in named groups; default CI runs fast groups, scheduled jobs run `--group=browser` (or similar). Configure in `Pest.php` with `pest()->…->in('…')` or per-test `->group()`. | +| [Mocking](https://pestphp.com/docs/mocking) | Isolate the unit under design: mock HTTP clients, queues, and external services with Mockery so tests fail for **your** logic, not network reality. | +| [Browser testing](https://pestphp.com/docs/browser-testing) | After core behavior is covered with fast tests, add a thin **end-to-end** slice for critical user journeys (Pest 4 + plugin). | +| [Architecture testing](https://pestphp.com/docs/arch-testing) | Encode **design rules** (e.g. “controllers don’t talk to DB directly”) as automated checks so refactors can’t erode structure silently. | +| [Test coverage](https://pestphp.com/docs/test-coverage) | Use Xdebug 3+ or PCOV; `--coverage --min=…` to gate merges when the team agrees on a threshold. | +| [Type coverage](https://pestphp.com/docs/type-coverage) | Optional `pestphp/pest-plugin-type-coverage`: enforce typed surface area alongside tests via `--type-coverage --min=…`. | + +## Workflow (agent checklist) + +1. **Red** — Add the smallest test that describes missing behavior (name reads like a spec). +2. **Green** — Write only enough application code to pass; no speculative features. +3. **Refactor** — Improve names and structure with tests still green. +4. **Boundaries** — At I/O edges, use mocks/fakes ([mocking](https://pestphp.com/docs/mocking)); keep domain tests fast and deterministic. +5. **Layers** — When the module graph matters, add or extend [architecture tests](https://pestphp.com/docs/arch-testing). +6. **Confidence ladder** — Unit/feature tests first; add [browser tests](https://pestphp.com/docs/browser-testing) for journeys that justify the cost; use [groups](https://pestphp.com/docs/grouping-tests) so `./vendor/bin/pest` stays quick locally and in PR CI. +7. **Quality gates** — Turn on [coverage](https://pestphp.com/docs/test-coverage) and, if desired, [type coverage](https://pestphp.com/docs/type-coverage) where the team has agreed thresholds. + +## Anti-patterns + +- Writing a large chunk of production code before any test (harder to validate seams). +- Testing implementation details (private methods, exact call order) instead of observable behavior. +- Running every browser test on every push with no grouping—burns time and hides real failures in noise. + +## Related + +- Internal note: `.steering/laravel-packages/pestphp__pest.md` (`[[laravel-packages/pestphp__pest]]` in Obsidian when that folder is in the vault). +- [Pest upgrade guide](https://pestphp.com/docs/upgrade-guide) when bumping major versions. diff --git a/.steering/skills/sync-skills/SKILL.md b/.steering/skills/sync-skills/SKILL.md new file mode 100644 index 0000000..5ba64e0 --- /dev/null +++ b/.steering/skills/sync-skills/SKILL.md @@ -0,0 +1,40 @@ +--- +name: sync-skills +description: Replicates .steering agents, packaged skills, and skill-template mirrors into .cursor, .claude, and .github. Does not commit. Use after editing .steering or after merging IDE copies back into .steering. +license: MIT +compatibility: Repo with .steering layout; use editor or file copy as needed. +metadata: + author: agentic-programming + version: "1.0" +--- + +# Sync skills (steering → IDEs) + +## When to use + +- Anything under `.steering/agents/`, `.steering/skills/*/SKILL.md`, or `.steering/templates/skill.md` changed. +- The user edited `.cursor/`, `.claude/`, or `.github/` copies — merge into `.steering` first, then replicate out. +- Matching **Verify steering sync** CI locally. + +## Replication rules + +1. **Agents** — Build each `.steering/agents/*.md` per **sync-agents** (templates + special **`github-copilot/`** handling for **`research-skill.agent.md`** on **`.cursor`** only), write to `.github/agents/`, then strip Copilot **`tools:`** / **`mcp-servers:`** for `.cursor/agents/` and `.claude/agents/`. +2. **Packaged skills** — For each `.steering/skills//SKILL.md`: build (templates embeds; **`skill-research`**: **`github-copilot/`** embed only under **`.cursor/skills/skill-research/`**) and write to `.cursor/skills//SKILL.md`, `.claude/skills//SKILL.md`, `.github/skills//SKILL.md`. Flat `*.md` under `.steering/skills/` (research notes) are **not** mirrored. +3. **Skill template mirrors** — Copy `.steering/templates/skill.md` to: + - `.github/skills/skill-research/skill-template.md` + - `.claude/skills/skill-template/SKILL.md` + - `.cursor/skills/skill-template/SKILL.md` + +## Steps + +1. Apply the replication rules above (or run `python3 scripts/regenerate-ide-mirrors.py` from the repo root to match CI exactly). +2. Run `git diff`. If empty, mirrors already matched. +3. **Do not** `git add` / `git commit` / `git push` unless the user explicitly asks. + +## CI + +**Verify steering sync** (`.github/workflows/verify-steering-sync.yml`) runs `python3 scripts/regenerate-ide-mirrors.py` and fails on `git diff`. + +## Upstream skills + +If skills were refreshed from an external catalog (see `.steering/skills/SOURCES.md`), run `python3 scripts/sync-boost-ai-skills.py` first, then `python3 scripts/regenerate-ide-mirrors.py`. diff --git a/.steering/skills/tailwindcss-development/SKILL.md b/.steering/skills/tailwindcss-development/SKILL.md new file mode 100644 index 0000000..0463d35 --- /dev/null +++ b/.steering/skills/tailwindcss-development/SKILL.md @@ -0,0 +1,120 @@ +--- +name: tailwindcss-development +description: "Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS." +license: MIT +metadata: + author: laravel +--- +> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `14a5c6ab6729a8bb108bc5a29280fe53e5da6abd` — `.ai/tailwindcss/4/skill/tailwindcss-development/SKILL.md`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`. + +# Tailwind CSS Development + +## Documentation + +Use `search-docs` for detailed Tailwind CSS v4 patterns and documentation. + +## Basic Usage + +- Use Tailwind CSS classes to style HTML. Check and follow existing Tailwind conventions in the project before introducing new patterns. +- Offer to extract repeated patterns into components that match the project's conventions (e.g., Blade, JSX, Vue). +- Consider class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child elements carefully to reduce repetition, and group elements logically. + +## Tailwind CSS v4 Specifics + +- Always use Tailwind CSS v4 and avoid deprecated utilities. +- `corePlugins` is not supported in Tailwind v4. + +### CSS-First Configuration + +In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed: + + +```css +@theme { + --color-brand: oklch(0.72 0.11 178); +} +``` + +### Import Syntax + +In Tailwind v4, import Tailwind with a regular CSS `@import` statement instead of the `@tailwind` directives used in v3: + + +```diff +- @tailwind base; +- @tailwind components; +- @tailwind utilities; ++ @import "tailwindcss"; +``` + +### Replaced Utilities + +Tailwind v4 removed deprecated utilities. Use the replacements shown below. Opacity values remain numeric. + +| Deprecated | Replacement | +|------------|-------------| +| bg-opacity-* | `bg-{color}/{opacity}` (e.g. `bg-sky-500/50`) — opacity is a slash modifier on the color, not `black`-specific | +| text-opacity-* | `text-{color}/{opacity}` (e.g. `text-red-700/75`) | +| border-opacity-* | `border-{color}/{opacity}` | +| divide-opacity-* | `divide-{color}/{opacity}` | +| ring-opacity-* | `ring-{color}/{opacity}` | +| placeholder-opacity-* | `placeholder-{color}/{opacity}` | +| flex-shrink-* | shrink-* | +| flex-grow-* | grow-* | +| overflow-ellipsis | text-ellipsis | +| decoration-slice | box-decoration-slice | +| decoration-clone | box-decoration-clone | + +## Spacing + +Use `gap` utilities instead of margins for spacing between siblings: + + +```html +
+
Item 1
+
Item 2
+
+``` + +## Dark Mode + +If existing pages and components support dark mode, new pages and components must support it the same way, typically using the `dark:` variant: + + +```html +
+ Content adapts to color scheme +
+``` + +## Common Patterns + +### Flexbox Layout + + +```html +
+
Left content
+
Right content
+
+``` + +### Grid Layout + + +```html +
+
Card 1
+
Card 2
+
Card 3
+
+``` + +## Common Pitfalls + +- Using deprecated v3 utilities (bg-opacity-*, flex-shrink-*, etc.) +- Using `@tailwind` directives instead of `@import "tailwindcss"` +- Trying to use `tailwind.config.js` instead of CSS `@theme` directive +- Using margins for spacing between siblings instead of gap utilities +- Forgetting to add dark mode variants when the project uses dark mode diff --git a/.steering/templates/AGENTS.md b/.steering/templates/AGENTS.md new file mode 100644 index 0000000..153432e --- /dev/null +++ b/.steering/templates/AGENTS.md @@ -0,0 +1,87 @@ +# AGENTS.md + +Project-wide instructions for AI coding agents (Cursor Agent, Claude Code, GitHub Copilot, and similar tools). **Copy this file to the repository root** as `AGENTS.md` and customize paths, product names, and links to match your project. + +--- + +## Purpose + +- Set **defaults** for how agents should work in this repo (investigate before guessing, match existing code style, keep diffs focused). +- Point agents at **skills** and **MCP servers** so they use structured playbooks and live tools instead of relying only on training data. + +This file does **not** replace skills or MCP configuration; it **nudges** agents to discover and use them when they fit the task. + +--- + +## Before you change code + +1. **Read enough context** — open the files you will edit; follow local naming, patterns, and error handling. +2. **Prefer verified facts** — for APIs, SDKs, or product behavior, use **MCPs** or official docs rather than assuming from memory. +3. **Prefer skills for playbooks** — when the task matches a packaged skill’s `description`, **read that skill’s `SKILL.md`** (and any `references/` it points to) before improvising a workflow. + +--- + +## Skills (use when relevant) + +**Skills** are folders containing `SKILL.md` (YAML frontmatter + instructions). They are loaded progressively when the task matches the skill’s **`description`**, or when the user invokes them explicitly (e.g. `/skill-name` where supported). + +| Typical locations (project) | Role | +|-----------------------------|------| +| `.cursor/skills//` | Cursor Agent | +| `.claude/skills//` | Claude Code (and compatibility with other tools) | +| `.github/skills//` | GitHub Copilot agent mode / cloud | + +**How to use them** + +- At the start of a task, **scan available skills** (metadata + descriptions) when your environment exposes them. +- If a skill clearly applies, **read `SKILL.md`** and follow it; do not claim you followed a skill you never opened. +- If this repo keeps a **steering** copy under `.steering/skills//`, treat that as canonical and keep IDE copies in sync per maintainer docs (e.g. sync-skills / CI). +- For **test-driven design** with Pest (red/green/refactor, grouping, mocks, browser and architecture tests, coverage), read `.steering/skills/sync-agents/tdd.md` when that matches the task. + +**Good skill descriptions** include *what* the skill does and *when* to use it (trigger phrases). When authoring skills, optimize the `description` field for matching. + +--- + +## MCP servers (use when appropriate) + +**MCP** tools extend the agent with search, docs, browser, VCS, databases, and other integrations. Availability depends on the user’s editor or host configuration. + +**When to use MCPs** + +- **Documentation and APIs** — search official docs, read current signatures, confirm deprecations. +- **Web or repo facts** — fetch issues, releases, or pages when the answer must be current. +- **Specialized tools** — lint, test, or domain-specific servers when they reduce error or toil. + +**How to use them well** + +- **Inspect tool schemas** (names, required arguments) before calling; do not invent parameters. +- Prefer MCP-backed **fresh** information over stale model knowledge for version-sensitive work. +- If an MCP call fails, say what failed and fall back transparently (e.g. official docs URL, or ask the user). + +If this repo documents configured servers (e.g. under `.steering/mcps/` or project README), **consult those notes** for capabilities and env vars. + +--- + +## Custom agents / subagents + +If the repo defines **custom agents** (e.g. `.cursor/agents/`, `.github/agents/`), use them when the user asks for that workflow or when the task matches their `description`. Agent files may include Copilot-only fields (e.g. `tools:`, `mcp-servers:`) in GitHub copies; other mirrors may strip those — follow the copy your runtime actually loads. + +--- + +## Conventions (edit to taste) + +- **Scope** — Change only what the user asked for; avoid drive-by refactors. +- **Evidence** — Run checks you cite (tests, linters); do not claim green without running them. +- **Secrets** — Never commit credentials; use environment variables and host-provided secret stores. + +--- + +## Related templates and steering docs + +| Path | Use | +|------|-----| +| `.steering/templates/skill.md` | Authoring packaged `SKILL.md` files | +| `.steering/templates/agent.md` | Extended **Core Principles** (optional reading; some agents embed this section) | +| `.steering/skills/sync-agents/tdd.md` | Test-Driven Design playbook (Pest, grouping, mocking, browser/arch tests, coverage / type coverage) | + +Replace or extend the table above for your monorepo or single-package layout. diff --git a/.steering/templates/agent.md b/.steering/templates/agent.md new file mode 100644 index 0000000..9c05254 --- /dev/null +++ b/.steering/templates/agent.md @@ -0,0 +1,72 @@ +# agent.md + +Steering supplement under **`.steering/templates/agent.md`**. Holds **`## Core Principles`** so agents can embed that section (e.g. `![[templates/agent#Core Principles]]`) without duplicating it in **`AGENTS.md`**. For skills, MCPs, and repo-wide defaults, use **`AGENTS.md`** and copy it to the repository root as **`AGENTS.md`**. + +--- + +## Core Principles + +These principles reduce common LLM coding mistakes. Apply them to every task. + +### 1. Think Before Coding + +**Don't assume. Don't hide confusion. Surface tradeoffs.** + +- State assumptions explicitly. If uncertain, ask. +- If multiple interpretations exist, present them — don't pick silently. +- If a simpler approach exists, say so. Push back when warranted. +- If something is unclear, stop. Name what's confusing. Ask. + +### 2. Simplicity First + +**Minimum code that solves the problem. Nothing speculative.** + +- No features beyond what was asked. +- No abstractions for single-use code. +- No "flexibility" or "configurability" that wasn't requested. +- No error handling for impossible scenarios. +- If you write 200 lines and it could be 50, rewrite it. + +**The test:** Would a senior engineer say this is overcomplicated? If yes, simplify. + +### 3. Surgical Changes + +**Touch only what you must. Clean up only your own mess.** + +When editing existing code: + +- Don't "improve" adjacent code, comments, or formatting. +- Don't refactor things that aren't broken. +- Match existing style, even if you'd do it differently. +- If you notice unrelated dead code, mention it — don't delete it. + +When your changes create orphans: + +- Remove imports/variables/functions that YOUR changes made unused. +- Don't remove pre-existing dead code unless asked. + +**The test:** Every changed line should trace directly to the user's request. + +### 4. Goal-Driven Execution (TDD) + +**Define success criteria. Loop until verified.** + +Transform tasks into verifiable goals: + +| Instead of... | Transform to... | +|---------------|-----------------| +| "Add validation" | "Write tests for invalid inputs, then make them pass" | +| "Fix the bug" | "Write a test that reproduces it, then make it pass" | +| "Refactor X" | "Ensure tests pass before and after" | + +For Laravel/Pest workflow detail, read `.steering/skills/sync-agents/tdd.md` when it applies. + +For multi-step tasks, state a brief plan: + +```text +1. [Step] → verify: [check] +2. [Step] → verify: [check] +3. [Step] → verify: [check] +``` + +Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification. diff --git a/.steering/templates/idea.md b/.steering/templates/idea.md new file mode 100644 index 0000000..51d4fb5 --- /dev/null +++ b/.steering/templates/idea.md @@ -0,0 +1,57 @@ +# Idea note (loose template) + +Use this as a **shape**, not a straitjacket. Skip sections that do not apply; add headings if the idea needs them (e.g. **Competitors**, **Open questions**). + +## Optional YAML frontmatter + +Omit or extend keys as needed. + +```yaml +--- +title: # Short human title +slug: # Filename slug (kebab-case); default derived from title +status: seed # seed | exploring | parked | decided +tags: [] # Free-form labels +created: # YYYY-MM-DD +updated: # YYYY-MM-DD +related: [] # Links to other ideas, ADRs, issues, URLs +--- +``` + +## Suggested body sections + +### Summary + +One short paragraph: what this is, who it is for, why it might matter. + +### Problem / opportunity + +What pain, gap, or possibility does this address? + +### Hypothesis (optional) + +What you believe is true and would need to be validated. + +### Research synthesis + +What you learned from **live** investigation — not training-data guesses. Organize by theme or source type. + +- **Skills** — Which repo or workspace skills you applied and what they contributed. +- **MCPs / tools** — Which servers or tools you used (docs, browser, repo, etc.) and key findings. +- **Implications** — How this changes the idea (feasibility, scope, risks). + +### Options / directions (optional) + +Reasonable forks or implementations, with tradeoffs in a sentence or two each. + +### Risks and unknowns + +What could fail, what you still do not know, what would invalidate the idea. + +### Next steps + +Concrete follow-ups: spikes, owners, decisions, or “do nothing” with rationale. + +### Sources + +URLs, doc paths, issue numbers, and skill paths you relied on. diff --git a/.steering/templates/laravel-package.md b/.steering/templates/laravel-package.md new file mode 100644 index 0000000..dcdcc38 --- /dev/null +++ b/.steering/templates/laravel-package.md @@ -0,0 +1,127 @@ +--- +title: +org: +package: +github_url: +docs_url: +composer_require: composer require +author: +latest_release: +release_date: +packagist_url: +downloads_30d: +stars: +forks: +tags: [laravel, packages] +announce_date: '' +laravel_news_url: '' + +--- + +## Field-to-Source Mapping + +Resolve every frontmatter field before writing the file. Use these sources: + +| Field | Source | +|-------|--------| +| `author` | Packagist (`packagist.org/packages//.json` → `package.maintainers[0].name`, or fall back to `package.authors[0].name`; do not rely on the `versions.dev-master` key as it may be absent) | +| `stars` | GitHub MCP → `stargazers_count` | +| `latest_release` | GitHub MCP `get_latest_release` → format as `vX.Y.Z (YYYY-MM-DD)` | +| `release_date` | GitHub MCP `get_latest_release` → `published_at` date (YYYY-MM-DD) | +| `downloads_30d` | Packagist stats page (`packagist.org/packages///stats`) → "Last 30 days" | +| `announce_date` | Laravel News article publication date (fetch the `laravel_news_url`) | +| `laravel_news_url` | Search `laravel-news.com ` and verify the URL resolves | +| `docs_url` | GitHub repo `homepage` field or README docs link | +| `tags` | GitHub repo `topics` + relevant feature keywords | + +**All fields must be attempted.** Only leave a field blank if the data genuinely does not exist after checking its source. + +--- + +# PACKAGE_NAME + +![Banner](https://raw.githubusercontent.com/ORG/PACKAGE/refs/heads/main/.github/header.png) + +**Tagline or short description.** + +PACKAGE_DESCRIPTION by [AUTHOR](https://github.com/ORG) is a [type, e.g. configuration-driven ETL] package/framework for Laravel. It [key benefit, e.g. replaces fragile import scripts with declarative classes]. + +The system handles [core features like file processing, validation, etc.], so you can focus on business logic. + +![Featured Image](https://example.com/image.png) + +## Key Features + +- **Icon Scalability**: Description. +- **Icon Syntax**: Description. +- **Icon Feature**: Description. +- Add more as needed. + +## Installation + +```bash +composer require ORG/PACKAGE +php artisan migrate # if applicable +# publish config/migrations if needed +``` + +Register in `config/PACKAGE.php` if applicable. + +## Defining/Configuring + +Create classes in `App\PACKAGE` implementing `Contract`: + +```php +namespace App\PACKAGE; + +use PACKAGE\Models\Model; +use PACKAGE\Contracts\Definition; +use PACKAGE\DTOs\Config; + +class ExampleImporter implements Definition +{ + public function config(): Config + { + return Config::create() + ->model(Model::class) + ->strategy(Strategy::UPDATE) + // ... more config + ; + } +} +``` + +## Running/CLI/API + +**CLI**: +```bash +php artisan package:run example-importer --file=data.csv --dry-run +``` + +**API** (if applicable): +``` +POST /api/v1/package/upload/example-importer +``` + +## Monitoring + +**CLI**: +- `php artisan package:list` +- `php artisan package:status {id}` +- `php artisan package:cancel {id}` +- `php artisan package:retry {id}` + +REST endpoints available. + +## Events + +- `EventName1` +- `EventName2` +- etc. + +## Resources + +- [GitHub]({{github_url}}) +- [Documentation]({{docs_url}}) +- [Packagist]({{packagist_url}}) +- [Laravel News Article]() # if featured \ No newline at end of file diff --git a/templates/skill.md b/.steering/templates/skill.md similarity index 99% rename from templates/skill.md rename to .steering/templates/skill.md index 08fbda8..55ecc50 100644 --- a/templates/skill.md +++ b/.steering/templates/skill.md @@ -1,5 +1,3 @@ -Frontmatter -``` --- name: # Required: 1-64 chars, lowercase a-z 0-9 -, no leading/trailing/consecutive hyphens. Matches folder name. description: # Required: 1-1024 chars. Describe what the skill does and when to use it. Include keywords. @@ -10,7 +8,6 @@ metadata: # Optional: Arbitrary key-value pairs. version: "1.0" allowed-tools: # Optional (experimental): Space-delimited pre-approved tools. --- -``` # Skill Instructions diff --git a/README.md b/README.md index ee130dc..f0e82a3 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,22 @@ A collection of custom GitHub Copilot Cloud Agents for research and documentation. +## Source of truth: `.steering` + +**Agents** and **packaged skills** are authored under **`.steering/`** and mirrored into `.cursor`, `.claude`, and `.github` using the checklist in **`.steering/README.md`**. + +If you edit a file under `.cursor/` or `.github/`, merge those changes back into `.steering` and replicate out again. CI (**Verify steering sync**) fails when mirrors drift. + +See **`.steering/README.md`** for layout details. + ## Agents | Agent | Trigger | Output | |-------|---------|--------| +| `idea` | `/idea ` | `.steering/ideas/.md` | | `laravel-package` | `/laravel-package ` | `.steering/laravel-packages/__.md` | -| `skill-research` | `/skill-research ` | `.steering/skills/__.md` | -| `mcp-research` | `/mcp-research ` | `mcps/__.md` | +| `research-skill` | `/research-skill ` | `.steering/skills/__.md` | +| `research-mcp` | `/research-mcp ` | `.steering/mcps/__.md` | --- @@ -98,60 +107,53 @@ Add to **Repo Settings > Secrets and variables > Copilot env**: Enable in **Repo Settings > Copilot > Memory** so the agent learns from past runs. -## File Structure +## File Structure (summary) ``` -.github/ -├── agents/ -│ ├── laravel-package.agent.md # Laravel package agent -│ └── skill-research.agent.md # Skill research agent -├── skills/ -│ ├── laravel-research/ -│ │ ├── SKILL.md # Note generator skill -│ │ └── laravel-package-template.md # Blank template reference -│ └── skill-research/ -│ ├── SKILL.md # Skill note generator skill -│ └── skill-template.md # Blank template reference -└── workflows/ - └── sync-skill-template.yml # Copies templates/skill.md → skill-research/skill-template.md - .steering/ -├── laravel-packages/ # Laravel package research notes +├── README.md # Steering layout & sync rules +├── agents/ # Canonical agents → .cursor / .claude / .github +├── skills/ # Packaged skills (subdirs) + research notes (flat *.md) +├── templates/ # AGENTS.md, agent.md, skill.md (skill spec) +├── laravel-packages/ # Laravel research notes │ └── __.md -└── skills/ # Copilot skill research notes - └── __.md +├── mcps/ # MCP server research notes +│ └── __.md +└── ... + +.github/ +├── agents/ # Mirrored from .steering/agents/ +├── skills/ # Mirrored packaged skills + skill-research extras +└── workflows/ + └── verify-steering-sync.yml # CI: script + git diff --exit-code -mcps/ # MCP server research notes -└── __.md +.cursor/ .claude/ # Mirrored agents & skills (see .steering/README.md) ``` --- ## Skill Research Agent -A custom GitHub Copilot Cloud Agent that researches GitHub Copilot skills and generates structured research notes. +A custom GitHub Copilot Cloud Agent that researches **agent skills** published in git repositories (from a URL you provide) and writes structured research notes. ### Usage -In Copilot Chat (GitHub.com, VS Code, or JetBrains), select the `skill-research` agent and prompt: +In Copilot Chat (GitHub.com, VS Code, or JetBrains), select the `research-skill` agent and prompt with a URL to a skill directory in a git host (for example a repository folder view or equivalent): ``` -/skill-research https://github.com/microsoft/skills/blob/main/.github/skills/copilot-sdk +/research-skill https://example.com/org/repo/tree/main/path/to/skill ``` -The agent will research the skill and write a note to: +The agent will write a research note to: ``` -.steering/skills/microsoft__copilot-sdk.md +.steering/skills/__.md ``` ### How It Works -1. Parses the GitHub URL to extract `owner`, `repo`, `path`, and `skill-name`. -2. Researches via GitHub MCP and DeepWiki: - - Reads `SKILL.md` for description and capabilities. - - Lists all files in the skill directory. - - Searches for agents/workflows that use the skill. - - Reads the parent repo README for ecosystem context. -3. Generates a structured note using the skill template. -4. Writes the note to `.steering/skills/__.md`. +1. Parses the URL to identify host, repository coordinates, and path to the skill directory. +2. Researches using live tools (repository access when available, plus DeepWiki, Context7, etc.). +3. Reads the skill’s `SKILL.md` and related files. +4. Generates a structured note using the repo’s skill template (see `.steering/templates/skill.md` and mirrored `skill-template` files). +5. Writes the note under `.steering/skills/`. diff --git a/mcps/README.md b/mcps/README.md deleted file mode 100644 index b31ff01..0000000 --- a/mcps/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# MCPs - -Research notes for Model Context Protocol (MCP) servers. - -Each file is generated by the `/mcp-research` agent and named `__.md`. diff --git a/scripts/__pycache__/regenerate-ide-mirrors.cpython-312.pyc b/scripts/__pycache__/regenerate-ide-mirrors.cpython-312.pyc new file mode 100644 index 0000000..6c4741a Binary files /dev/null and b/scripts/__pycache__/regenerate-ide-mirrors.cpython-312.pyc differ diff --git a/scripts/__pycache__/sync-boost-ai-skills.cpython-312.pyc b/scripts/__pycache__/sync-boost-ai-skills.cpython-312.pyc new file mode 100644 index 0000000..4160c34 Binary files /dev/null and b/scripts/__pycache__/sync-boost-ai-skills.cpython-312.pyc differ diff --git a/scripts/regenerate-ide-mirrors.py b/scripts/regenerate-ide-mirrors.py new file mode 100644 index 0000000..2f41ecd --- /dev/null +++ b/scripts/regenerate-ide-mirrors.py @@ -0,0 +1,310 @@ +#!/usr/bin/env python3 +""" +Regenerate .github, .cursor, and .claude mirrors from .steering (agents, skills, templates). + +This is the same logic as the "Regenerate IDE mirrors" step in +.github/workflows/verify-steering-sync.yml — run locally after editing .steering +or to match CI before pushing. +""" + +import re +import sys +from pathlib import Path + +EMBED = re.compile(r"!\[\[([^\]#]+)(?:#([^|\]]+))?\]\]") +GITHUB_COPILOT_EMBED = re.compile( + r"!\[\[github-copilot/[^\]#]+(?:#[^|\]]+)?\]\]\s*" +) +GITHUB_EMBED_POINTER = ( + "> **Copilot Agent Skills (steering):** see `.steering/github-copilot/Skills.md` " + "in this repository.\n\n" +) + +# Skill directories under .github/.cursor/.claude/skills/ that are not +# generated from .steering/skills/ and must be preserved by the pruning pass. +SPECIAL_SKILL_DIRS = {"skill-research", "skill-template", "agentic-programming"} + + +def strip_copilot_frontmatter(content: str) -> str: + if not content.startswith("---"): + return content + end = content.find("\n---\n", 4) + if end == -1: + return content + fm = content[4:end] + body = content[end + 5 :] + lines = fm.split("\n") + out = [] + i = 0 + while i < len(lines): + line = lines[i] + if line.startswith("tools:"): + i += 1 + while i < len(lines): + current_line = lines[i] + if current_line.strip() == "" or current_line.startswith(" ") or current_line.startswith("\t"): + i += 1 + continue + break + continue + if line.startswith("mcp-servers:"): + i += 1 + while i < len(lines): + current_line = lines[i] + if current_line.strip() == "" or current_line.startswith(" ") or current_line.startswith("\t"): + i += 1 + continue + break + continue + out.append(line) + i += 1 + new_fm = "\n".join(out).strip("\n") + return "---\n" + new_fm + "\n---\n" + body + + +def extract_section(text: str, heading: str) -> str: + lines = text.splitlines() + target = "## " + heading.strip() + start = None + for i, line in enumerate(lines): + if line.strip() == target: + start = i + break + if start is None: + return "\n" + out = [] + for line in lines[start + 1 :]: + st = line.strip() + if st == "---": + break + if line.startswith("## "): + break + if line.startswith("# ") and not line.startswith("##"): + break + out.append(line) + return "\n".join(out).rstrip() + "\n" + + +def strip_first_yaml_block(s: str) -> str: + if not s.startswith("---"): + return s + end = s.find("\n---\n", 4) + if end == -1: + return s + return s[end + 5 :].lstrip("\n") + + +def normalize_embed_path(p: str) -> str: + p = p.strip().rstrip("/") + while p.startswith("./"): + p = p[2:] + return p + + +def path_allowed(pn: str, prefixes: tuple[str, ...]) -> bool: + for pref in prefixes: + if pref == "templates": + if pn == "templates" or pn.startswith("templates/"): + return True + elif pref == "github-copilot": + if pn == "github-copilot" or pn.startswith("github-copilot/"): + return True + return False + + +def resolve_one_embed(root: Path, path_part: str, section: str | None) -> str: + p = normalize_embed_path(path_part) + if not p or Path(p).name == "": + return "\n" + rel = Path(p) + if rel.is_absolute() or ".." in rel.parts: + return "\n" + if rel.suffix != ".md": + rel = rel.with_suffix(".md") + tpl = (root / ".steering" / rel).resolve() + steering_root = (root / ".steering").resolve() + if not tpl.is_relative_to(steering_root): + return "\n" + if not tpl.is_file(): + return "\n" + raw = tpl.read_text(encoding="utf-8") + if section: + return extract_section(raw, section) + return strip_first_yaml_block(raw).rstrip() + "\n" + + +def expand_obsidian_embeds(root: Path, body: str, prefixes: tuple[str, ...]) -> str: + for _ in range(16): + if not EMBED.search(body): + break + + def repl(m): + p = m.group(1).strip() + sec = m.group(2).strip() if m.group(2) else None + pn = normalize_embed_path(p) + if not path_allowed(pn, prefixes): + return m.group(0) + return resolve_one_embed(root, pn, sec) + + body = EMBED.sub(repl, body) + return body + + +def process_markdown_doc(root: Path, text: str, prefixes: tuple[str, ...]) -> str: + if not text.startswith("---"): + return expand_obsidian_embeds(root, text, prefixes) + end = text.find("\n---\n", 4) + if end == -1: + return expand_obsidian_embeds(root, text, prefixes) + fm = text[: end + 5] + body = text[end + 5 :] + return fm + expand_obsidian_embeds(root, body, prefixes) + + +def replace_github_copilot_embeds(text: str) -> str: + return GITHUB_COPILOT_EMBED.sub(GITHUB_EMBED_POINTER, text) + + +def strip_github_copilot_embeds_doc(text: str) -> str: + if not text.startswith("---"): + return replace_github_copilot_embeds(text) + end = text.find("\n---\n", 4) + if end == -1: + return replace_github_copilot_embeds(text) + fm = text[: end + 5] + body = text[end + 5 :] + return fm + replace_github_copilot_embeds(body) + + +def assert_cursor_claude_agent_no_copilot_keys(agents_root: Path) -> None: + for name in (".cursor", ".claude"): + ad = agents_root / name / "agents" + if not ad.is_dir(): + continue + for f in sorted(ad.iterdir()): + if not f.is_file() or not f.name.endswith(".md"): + continue + t = f.read_text(encoding="utf-8") + if not t.startswith("---"): + continue + e = t.find("\n---\n", 4) + if e == -1: + continue + fm = t[4:e] + for line in fm.splitlines(): + s = line.strip() + if s.startswith("tools:") or s.startswith("mcp-servers:"): + print( + f"::error::Mirror {f} must not contain Copilot-only YAML: {s}", + file=sys.stderr, + ) + sys.exit(1) + + +def main() -> None: + root = Path(__file__).resolve().parents[1] + agents_dir = root / ".steering" / "agents" + (root / ".github" / "agents").mkdir(parents=True, exist_ok=True) + (root / ".cursor" / "agents").mkdir(parents=True, exist_ok=True) + (root / ".claude" / "agents").mkdir(parents=True, exist_ok=True) + + expected_agent_files: set[str] = set() + for f in sorted(agents_dir.iterdir()): + if not f.is_file() or f.name == "README.md": + continue + expected_agent_files.add(f.name) + raw = f.read_text(encoding="utf-8") + if f.name == "research-skill.agent.md": + built_gh_claude = strip_github_copilot_embeds_doc( + process_markdown_doc(root, raw, ("templates",)) + ) + built_cursor = strip_copilot_frontmatter( + process_markdown_doc( + root, raw, ("templates", "github-copilot") + ) + ) + (root / ".github" / "agents" / f.name).write_text( + built_gh_claude, encoding="utf-8" + ) + (root / ".claude" / "agents" / f.name).write_text( + strip_copilot_frontmatter(built_gh_claude), encoding="utf-8" + ) + (root / ".cursor" / "agents" / f.name).write_text( + built_cursor, encoding="utf-8" + ) + else: + built = process_markdown_doc(root, raw, ("templates",)) + (root / ".github" / "agents" / f.name).write_text(built, encoding="utf-8") + stripped = strip_copilot_frontmatter(built) + (root / ".cursor" / "agents" / f.name).write_text(stripped, encoding="utf-8") + (root / ".claude" / "agents" / f.name).write_text(stripped, encoding="utf-8") + + # Prune stale agent mirrors + for folder in (".github", ".cursor", ".claude"): + ad = root / folder / "agents" + if ad.is_dir(): + for stale in sorted(ad.iterdir()): + if stale.is_file() and stale.name.endswith(".md") and stale.name not in expected_agent_files: + stale.unlink() + + skills_root = root / ".steering" / "skills" + expected_skill_names: set[str] = set() + for skill_dir in sorted(skills_root.iterdir()): + if not skill_dir.is_dir(): + continue + sk = skill_dir / "SKILL.md" + if not sk.is_file(): + continue + name = skill_dir.name + expected_skill_names.add(name) + raw_skill = sk.read_text(encoding="utf-8") + for folder in ("cursor", "claude", "github"): + dest = root / f".{folder}" / "skills" / name + dest.mkdir(parents=True, exist_ok=True) + if name == "skill-research": + if folder == "cursor": + out = process_markdown_doc( + root, raw_skill, ("templates", "github-copilot") + ) + else: + out = strip_github_copilot_embeds_doc( + process_markdown_doc(root, raw_skill, ("templates",)) + ) + else: + out = process_markdown_doc(root, raw_skill, ("templates",)) + (dest / "SKILL.md").write_text(out, encoding="utf-8") + + # Prune stale skill mirrors (but keep special non-steering directories) + for folder in ("cursor", "claude", "github"): + sd = root / f".{folder}" / "skills" + if sd.is_dir(): + for stale_dir in sorted(sd.iterdir()): + if stale_dir.is_dir() and stale_dir.name not in expected_skill_names and stale_dir.name not in SPECIAL_SKILL_DIRS: + skill_md = stale_dir / "SKILL.md" + if skill_md.is_file(): + skill_md.unlink() + if not any(stale_dir.iterdir()): + stale_dir.rmdir() + + for sub in ( + root / ".github" / "skills" / "skill-research", + root / ".claude" / "skills" / "skill-template", + root / ".cursor" / "skills" / "skill-template", + ): + sub.mkdir(parents=True, exist_ok=True) + tpl = (root / ".steering" / "templates" / "skill.md").read_text(encoding="utf-8") + (root / ".github" / "skills" / "skill-research" / "skill-template.md").write_text( + tpl, encoding="utf-8" + ) + (root / ".claude" / "skills" / "skill-template" / "SKILL.md").write_text( + tpl, encoding="utf-8" + ) + (root / ".cursor" / "skills" / "skill-template" / "SKILL.md").write_text( + tpl, encoding="utf-8" + ) + + assert_cursor_claude_agent_no_copilot_keys(root) + + +if __name__ == "__main__": + main() diff --git a/scripts/sync-boost-ai-skills.py b/scripts/sync-boost-ai-skills.py new file mode 100644 index 0000000..a2f2fe3 --- /dev/null +++ b/scripts/sync-boost-ai-skills.py @@ -0,0 +1,414 @@ +#!/usr/bin/env python3 +""" +Pull selected Laravel Boost .ai guidelines into .steering/skills as portable SKILL.md files. + +Upstream: https://github.com/laravel/boost/tree/main/.ai + +Boost ships Blade templates ({{ $assist->... }}, @boostsnippet). This script emits static +Markdown with conventional command placeholders so skills work outside Boost installs. + +Usage: + python3 scripts/sync-boost-ai-skills.py + BOOST_REPO_ROOT=/path/to/boost/checkout python3 scripts/sync-boost-ai-skills.py + BOOST_REV=v1.2.3 python3 scripts/sync-boost-ai-skills.py # pin tag or commit when cloning + +After updating .steering/skills, regenerate IDE mirrors (same as CI): + python3 scripts/regenerate-ide-mirrors.py +""" + +from __future__ import annotations + +import os +import re +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path +REPO_ROOT = Path(__file__).resolve().parents[1] +STEERING_SKILLS = REPO_ROOT / ".steering" / "skills" +DEFAULT_REMOTE = "https://github.com/laravel/boost.git" + +# Major versions for versioned .ai subtrees (bump when Boost adds newer paths). +LIVEWIRE_MAJOR = "4" +PEST_MAJOR = "4" +TAILWIND_MAJOR = "4" + + +def clone_boost(dest: Path, rev: str | None) -> None: + if dest.exists(): + shutil.rmtree(dest) + cmd = ["git", "clone", "--depth", "1", DEFAULT_REMOTE, str(dest)] + subprocess.run(cmd, check=True) + if rev: + subprocess.run( + ["git", "-C", str(dest), "fetch", "--depth", "1", "origin", rev], + check=True, + ) + subprocess.run( + ["git", "-C", str(dest), "checkout", "FETCH_HEAD"], + check=True, + ) + + +def git_head_sha(repo: Path) -> str: + p = subprocess.run( + ["git", "-C", str(repo), "rev-parse", "HEAD"], + check=True, + capture_output=True, + text=True, + ) + return p.stdout.strip() + + +def strip_blade_php_blocks(text: str) -> str: + return re.sub(r"@php\s*.*?\s*@endphp\s*", "", text, flags=re.DOTALL) + + +def convert_boostsnippets(text: str) -> str: + pat = re.compile( + r'@boostsnippet\("([^"]+)",\s*"([^"]+)"\)\s*\n(.*?)\n@endboostsnippet', + re.DOTALL, + ) + + def repl(m: re.Match[str]) -> str: + title, lang, body = m.group(1), m.group(2), m.group(3).strip("\n") + return f"\n```{lang}\n{body}\n```\n" + + return pat.sub(repl, text) + + +def replace_artisan(text: str, prefix: str) -> str: + """prefix is '' for php artisan or ./vendor/bin/sail artisan (no backticks — caller context supplies fences).""" + + def one(cmd: str) -> str: + inner = cmd.replace("{name}", "") + if prefix: + return f"{prefix} {inner}" + return f"php artisan {inner}" + + def sub_single(m: re.Match[str]) -> str: + return one(m.group(1)) + + text = re.sub( + r"\{\{\s*\$assist->artisanCommand\('([^']*)'\)\s*\}\}", + sub_single, + text, + ) + return re.sub( + r'\{\{\s*\$assist->artisanCommand\("([^"]*)"\)\s*\}\}', + sub_single, + text, + ) + + +def replace_app_path(text: str) -> str: + def sub(m: re.Match[str]) -> str: + p = m.group(1) + return f"`app/{p}`" + + return re.sub(r"\{\{\s*\$assist->appPath\('([^']*)'\)\s*\}\}", sub, text) + + +def replace_sail_path(text: str) -> str: + return text.replace("{{ $assist->sailBinaryPath() }}", "./vendor/bin/sail") + + +def replace_composer_sail(text: str) -> str: + return re.sub( + r"\{\{\s*\$assist->composerCommand\('([^']*)'\)\s*\}\}", + r"./vendor/bin/sail composer \1", + text, + ) + + +def replace_npm_sail(text: str) -> str: + return re.sub( + r"\{\{\s*\$assist->nodePackageManagerCommand\('([^']*)'\)\s*\}\}", + r"./vendor/bin/sail npm \1", + text, + ) + + +def transform_blade_skill_body(body: str, *, sail_artisan: bool) -> str: + body = strip_blade_php_blocks(body) + body = convert_boostsnippets(body) + prefix = "./vendor/bin/sail artisan" if sail_artisan else "" + body = replace_artisan(body, prefix) + body = replace_app_path(body) + if sail_artisan: + body = replace_sail_path(body) + body = replace_composer_sail(body) + body = replace_npm_sail(body) + note = ( + "\n\n---\n\n**Command prefix:** These examples use `php artisan` and `composer` / `npm` " + "as if you run PHP on the host. If the app uses **Laravel Sail**, prefix with " + "`./vendor/bin/sail` (for example `./vendor/bin/sail artisan test --compact`).\n" + ) + if not sail_artisan: + body = body.rstrip() + note + return body.strip() + "\n" + + +def patch_yaml_name(fm: str, new_name: str) -> str: + return re.sub( + r"(?m)^name:\s*\S+.*$", + f"name: {new_name}", + fm, + count=1, + ) + + +def write_flux_like( + boost_root: Path, + dest_dir: Path, + rel_source: str, + commit: str, + sail_artisan: bool, + *, + canonical_name: str | None = None, +) -> None: + raw = (boost_root / rel_source).read_text(encoding="utf-8") + if not raw.startswith("---"): + raise SystemExit(f"Expected YAML frontmatter in {rel_source}") + end_fm = raw.find("\n---\n", 4) + if end_fm == -1: + raise SystemExit(f"Invalid frontmatter in {rel_source}") + fm = raw[: end_fm + 5] + if canonical_name: + fm = patch_yaml_name(fm, canonical_name) + body = raw[end_fm + 5 :] + body = transform_blade_skill_body(body, sail_artisan=sail_artisan) + banner = ( + f"> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `{commit}` " + f"— `{rel_source}`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`.\n\n" + ) + out = fm + banner + body + dest_dir.mkdir(parents=True, exist_ok=True) + (dest_dir / "SKILL.md").write_text(out, encoding="utf-8") + + +def write_tailwind_md( + boost_root: Path, dest_dir: Path, rel_source: str, commit: str +) -> None: + raw = (boost_root / rel_source).read_text(encoding="utf-8") + if not raw.startswith("---"): + raise SystemExit(f"Expected YAML frontmatter in {rel_source}") + end_fm = raw.find("\n---\n", 4) + if end_fm == -1: + raise SystemExit(f"Invalid frontmatter in {rel_source}") + fm = raw[: end_fm + 5] + body = raw[end_fm + 5 :].lstrip("\n") + banner = ( + f"> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `{commit}` " + f"— `{rel_source}`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`.\n\n" + ) + out = fm + banner + body + dest_dir.mkdir(parents=True, exist_ok=True) + (dest_dir / "SKILL.md").write_text(out, encoding="utf-8") + + +def write_sail_core(boost_root: Path, dest_dir: Path, rel_source: str, commit: str) -> None: + raw = (boost_root / rel_source).read_text(encoding="utf-8") + body = strip_blade_php_blocks(raw) + body = replace_sail_path(body) + body = replace_artisan(body, prefix="./vendor/bin/sail artisan") + body = replace_composer_sail(body) + body = replace_npm_sail(body) + body = re.sub( + r"\{\{\s*\$assist->sailBinaryPath\(\)\s*\}\}\s+php", + "./vendor/bin/sail php", + body, + ) + fm = """--- +name: laravel-sail +description: "Use when the Laravel project runs under Laravel Sail. Trigger for Docker/Sail workflows, running artisan, composer, npm, or PHP only inside containers. Covers: ./vendor/bin/sail up/down, sail artisan, sail composer, sail npm, and never running host PHP/Composer against a Sail-only app by mistake." +license: MIT +metadata: + author: laravel +--- + +""" + banner = ( + f"> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `{commit}` " + f"— `{rel_source}`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`.\n\n" + ) + out = fm + banner + body.strip() + "\n" + dest_dir.mkdir(parents=True, exist_ok=True) + (dest_dir / "SKILL.md").write_text(out, encoding="utf-8") + + +def write_pint_core(boost_root: Path, dest_dir: Path, rel_source: str, commit: str) -> None: + _ = (boost_root / rel_source).read_text(encoding="utf-8") # ensure path exists + fm = """--- +name: laravel-pint +description: "Use when formatting PHP in Laravel projects that use Laravel Pint. Trigger after editing PHP files, before finalizing a change, or when the user mentions Pint or project PHP style. Covers: running pint on dirty files, --format agent when supported, and not using pint --test for autofix workflows." +license: MIT +metadata: + author: laravel +--- + +""" + banner = ( + f"> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `{commit}` " + f"— `{rel_source}` (Blade branches merged). Regenerate: `python3 scripts/sync-boost-ai-skills.py`.\n\n" + ) + body = """# Laravel Pint Code Formatter + +- If you have modified any PHP files, run `./vendor/bin/pint --dirty` before finalizing changes so code matches the project's expected style. +- When your tooling supports Pint's agent formatter, prefer `./vendor/bin/pint --dirty --format agent`. +- Do not rely on `./vendor/bin/pint --test` to fix style; run `./vendor/bin/pint` (with or without `--format agent`) to apply fixes. +- With **Laravel Sail**, prefix: `./vendor/bin/sail bin pint --dirty` (and add `--format agent` when appropriate). +""" + out = fm + banner + body + dest_dir.mkdir(parents=True, exist_ok=True) + (dest_dir / "SKILL.md").write_text(out, encoding="utf-8") + + +def write_phpunit_core(boost_root: Path, dest_dir: Path, rel_source: str, commit: str) -> None: + raw = (boost_root / rel_source).read_text(encoding="utf-8") + body = strip_blade_php_blocks(raw) + body = replace_artisan(body, prefix="") + fm = """--- +name: phpunit-laravel +description: "Use when writing or running PHPUnit tests in a Laravel app that uses PHPUnit (not Pest). Trigger for test classes, assertions, make:test --phpunit, or running the test suite. Covers: creating tests, running filtered tests, and treating tests as core code that must not be removed without approval." +license: MIT +metadata: + author: laravel +--- + +""" + banner = ( + f"> **Synced from** [`laravel/boost`](https://github.com/laravel/boost) @ `{commit}` " + f"— `{rel_source}`. Regenerate: `python3 scripts/sync-boost-ai-skills.py`.\n\n" + ) + note = ( + "\n**Command prefix:** Use `php artisan` on the host or `./vendor/bin/sail artisan` " + "when using Sail.\n" + ) + out = fm + banner + body.strip() + note + "\n" + dest_dir.mkdir(parents=True, exist_ok=True) + (dest_dir / "SKILL.md").write_text(out, encoding="utf-8") + + +def write_livewire_with_reference( + boost_root: Path, dest_dir: Path, rel_skill: str, rel_ref: str, commit: str +) -> None: + write_flux_like( + boost_root, + dest_dir, + rel_skill, + commit, + sail_artisan=False, + canonical_name="livewire-development", + ) + path = dest_dir / "SKILL.md" + text = path.read_text(encoding="utf-8") + ref_raw = (boost_root / rel_ref).read_text(encoding="utf-8").strip() + ref_lines = ref_raw.splitlines() + if ref_lines and ref_lines[0].startswith("# "): + ref_lines = ref_lines[1:] + ref = "\n".join(ref_lines).strip() + "\n" + needle = "For interceptors and hooks, see [reference/javascript-hooks.md](reference/javascript-hooks.md)." + if needle not in text: + raise SystemExit("Livewire skill: expected reference link not found") + text = text.replace( + needle, + "## JavaScript integration\n\n" + + ref + + "\n", + ) + path.write_text(text, encoding="utf-8") + + +def main() -> None: + env_root = os.environ.get("BOOST_REPO_ROOT") + rev = os.environ.get("BOOST_REV") + + if env_root: + boost_root = Path(env_root).resolve() + if not (boost_root / ".git").is_dir(): + print("BOOST_REPO_ROOT must be a git checkout of laravel/boost", file=sys.stderr) + sys.exit(1) + commit = git_head_sha(boost_root) + else: + tmp = Path(tempfile.mkdtemp(prefix="boost-ai-sync-")) + try: + clone_boost(tmp, rev) + commit = git_head_sha(tmp) + boost_root = tmp + except subprocess.CalledProcessError: + shutil.rmtree(tmp, ignore_errors=True) + raise + + try: + STEERING_SKILLS.mkdir(parents=True, exist_ok=True) + + write_flux_like( + boost_root, + STEERING_SKILLS / "fluxui-free-development", + ".ai/fluxui-free/skill/fluxui-development/SKILL.blade.php", + commit, + sail_artisan=False, + canonical_name="fluxui-free-development", + ) + write_flux_like( + boost_root, + STEERING_SKILLS / "fluxui-pro-development", + ".ai/fluxui-pro/skill/fluxui-development/SKILL.blade.php", + commit, + sail_artisan=False, + canonical_name="fluxui-pro-development", + ) + write_flux_like( + boost_root, + STEERING_SKILLS / "pest-testing", + f".ai/pest/{PEST_MAJOR}/skill/pest-testing/SKILL.blade.php", + commit, + sail_artisan=False, + ) + write_sail_core( + boost_root, + STEERING_SKILLS / "laravel-sail", + ".ai/sail/core.blade.php", + commit, + ) + write_livewire_with_reference( + boost_root, + STEERING_SKILLS / "livewire-development", + f".ai/livewire/{LIVEWIRE_MAJOR}/skill/livewire-development/SKILL.blade.php", + f".ai/livewire/{LIVEWIRE_MAJOR}/skill/livewire-development/reference/javascript-hooks.md", + commit, + ) + write_tailwind_md( + boost_root, + STEERING_SKILLS / "tailwindcss-development", + f".ai/tailwindcss/{TAILWIND_MAJOR}/skill/tailwindcss-development/SKILL.md", + commit, + ) + write_phpunit_core( + boost_root, + STEERING_SKILLS / "phpunit-laravel", + ".ai/phpunit/core.blade.php", + commit, + ) + write_pint_core( + boost_root, + STEERING_SKILLS / "laravel-pint", + ".ai/pint/core.blade.php", + commit, + ) + + manifest = STEERING_SKILLS / ".boost-ai-sync.json" + manifest.write_text( + '{\n "repo": "laravel/boost",\n "commit": "%s"\n}\n' % commit, + encoding="utf-8", + ) + print(f"Wrote Boost-derived skills from laravel/boost @ {commit}") + finally: + if not env_root: + shutil.rmtree(boost_root, ignore_errors=True) + + +if __name__ == "__main__": + main() diff --git a/templates/agents.md b/templates/agents.md deleted file mode 100644 index bc33b99..0000000 --- a/templates/agents.md +++ /dev/null @@ -1,353 +0,0 @@ -# Agent Skills - -A repository of skills, prompts, and MCP configurations for AI coding agents working with Azure SDKs and Microsoft AI Foundry services. - -## ⚠️ Fresh Information First - -**Azure SDKs and Foundry APIs change constantly. Never work with stale knowledge.** - -Before implementing anything with Azure/Foundry SDKs: - -1. **Search official docs first** — Use the Microsoft Docs MCP (`microsoft-docs`) to get current API signatures, parameters, and patterns -2. **Verify SDK versions** — Check `pip show ` for installed versions; APIs differ between versions -3. **Don't trust cached knowledge** — Your training data is outdated. The SDK you "know" may have breaking changes. - -```text -# Always do this first -1. Search Microsoft Learn for current docs -2. Check Context7 for indexed Foundry documentation (updated daily) -3. Verify against actual installed package version -``` - -**If you skip this step and use outdated patterns, you will produce broken code.** - ---- - -## Core Principles - -These principles reduce common LLM coding mistakes. Apply them to every task. - -### 1. Think Before Coding - -**Don't assume. Don't hide confusion. Surface tradeoffs.** - -- State assumptions explicitly. If uncertain, ask. -- If multiple interpretations exist, present them — don't pick silently. -- If a simpler approach exists, say so. Push back when warranted. -- If something is unclear, stop. Name what's confusing. Ask. - -### 2. Simplicity First - -**Minimum code that solves the problem. Nothing speculative.** - -- No features beyond what was asked. -- No abstractions for single-use code. -- No "flexibility" or "configurability" that wasn't requested. -- No error handling for impossible scenarios. -- If you write 200 lines and it could be 50, rewrite it. - -**The test:** Would a senior engineer say this is overcomplicated? If yes, simplify. - -### 3. Surgical Changes - -**Touch only what you must. Clean up only your own mess.** - -When editing existing code: -- Don't "improve" adjacent code, comments, or formatting. -- Don't refactor things that aren't broken. -- Match existing style, even if you'd do it differently. -- If you notice unrelated dead code, mention it — don't delete it. - -When your changes create orphans: -- Remove imports/variables/functions that YOUR changes made unused. -- Don't remove pre-existing dead code unless asked. - -**The test:** Every changed line should trace directly to the user's request. - -### 4. Goal-Driven Execution (TDD) - -**Define success criteria. Loop until verified.** - -Transform tasks into verifiable goals: - -| Instead of... | Transform to... | -|---------------|-----------------| -| "Add validation" | "Write tests for invalid inputs, then make them pass" | -| "Fix the bug" | "Write a test that reproduces it, then make it pass" | -| "Refactor X" | "Ensure tests pass before and after" | - -For multi-step tasks, state a brief plan: -```text -1. [Step] → verify: [check] -2. [Step] → verify: [check] -3. [Step] → verify: [check] -``` - -Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification. - ---- - -## Clean Architecture - -Follow these layered boundaries when building features: - -```text -┌─────────────────────────────────────┐ -│ Presentation │ ← Routers, API endpoints -├─────────────────────────────────────┤ -│ Application │ ← Use cases, orchestration -├─────────────────────────────────────┤ -│ Domain │ ← Entities, business rules -├─────────────────────────────────────┤ -│ Infrastructure │ ← Database, external APIs -└─────────────────────────────────────┘ -``` - -**Rules:** -- Dependencies point inward (outer layers depend on inner layers) -- Domain layer has no external dependencies -- Infrastructure implements interfaces defined in inner layers -- Each layer should be testable in isolation - ---- - -## SDK Quick Reference - -| Package | Purpose | Install | -|---------|---------|---------| -| `azure-ai-projects` | Foundry project client, agents, evals, connections | `pip install azure-ai-projects` | -| `azure-ai-agents` | Standalone agents client (use via projects) | `pip install azure-ai-agents` | -| `azure-search-documents` | Azure AI Search SDK | `pip install azure-search-documents` | -| `azure-identity` | Authentication | `pip install azure-identity` | - -### Authentication Pattern - -Always use `DefaultAzureCredential` for production: - -```python -from azure.identity import DefaultAzureCredential -from azure.ai.projects import AIProjectClient - -credential = DefaultAzureCredential() -client = AIProjectClient( - endpoint="https://.services.ai.azure.com/api/projects/", - credential=credential -) -``` - -### Environment Variables - -```bash -AZURE_AI_PROJECT_ENDPOINT=https://.services.ai.azure.com/api/projects/ -AZURE_AI_MODEL_DEPLOYMENT_NAME=gpt-4o-mini -``` - ---- - -## Skills - -Skills are domain-specific knowledge packages in `.github/skills/`. Each has a `SKILL.md` with: -- **YAML frontmatter** (`name`, `description`) — triggers skill loading -- **Markdown body** — loaded only when skill activates - -> **⚠️ Temporary duplication note:** Skills in `.github/skills/` are duplicated from `.github/plugins/*/skills/` to support `npx skills add microsoft/skills` installation. The plugin directories remain the canonical source. This duplication is temporary until the skills installer supports symlinks/pointer files. - -### Quick Start - -```bash -# Install skills using skills.sh -npx skills add microsoft/skills -``` - -### Skill Catalog - -> Location: `.github/skills/` • 133 skills • See [README.md#skill-catalog](README.md#skill-catalog) - -| Language | Skills | Suffix | Examples | -|----------|--------|--------|----------| -| **Core** | 6 | — | `mcp-builder`, `skill-creator`, `copilot-sdk` | -| **Python** | 41 | `-py` | `azure-ai-projects-py`, `azure-cosmos-py`, `azure-ai-ml-py` | -| **.NET** | 29 | `-dotnet` | `azure-ai-projects-dotnet`, `azure-resource-manager-cosmosdb-dotnet`, `azure-security-keyvault-keys-dotnet` | -| **TypeScript** | 25 | `-ts` | `azure-ai-projects-ts`, `azure-storage-blob-ts`, `aspire-ts` | -| **Java** | 26 | `-java` | `azure-ai-projects-java`, `azure-cosmos-java`, `azure-eventhub-java` | - -### Skill Selection - -Only load skills relevant to the current task. Loading all skills causes context rot — diluted attention and conflated patterns. - -### Creating New Skills - -> **Detailed guide:** Load the `/skill-creator` skill for comprehensive instructions. - -**Prerequisites:** User MUST provide SDK context: -- SDK package name (e.g., `azure-ai-agents`) -- Documentation URL or GitHub repository -- Target language (py/dotnet/ts/java) - -**Quick workflow:** - -1. **Create skill** in `.github/skills//SKILL.md` - ```text - # Naming: azure-- - # Example: azure-ai-agents-py - ``` - -2. **Categorize with symlink** in `skills///` - ```bash - cd skills/python/foundry - ln -s ../../../.github/skills/azure-ai-agents-py agents - ``` - -3. **Create tests** - - `references/acceptance-criteria.md` — correct/incorrect patterns - - `tests/scenarios//scenarios.yaml` — test scenarios - -4. **Verify** - ```bash - cd tests && pnpm harness --mock --verbose - ``` - -5. **Update README.md** — Add to skill catalog - -**Product area categories:** - -| Category | Skills | -|----------|--------| -| `foundry` | AI agents, projects, inference, search | -| `data` | Storage, Cosmos DB, Tables | -| `messaging` | Event Hubs, Service Bus, Event Grid | -| `monitoring` | OpenTelemetry, App Insights | -| `identity` | Authentication, credentials | -| `security` | Key Vault | -| `integration` | API Management, App Configuration | - ---- - -## MCP Servers - -Pre-configured Model Context Protocol servers in `.vscode/mcp.json` provide additional capabilities: - -### Documentation & Search - -| MCP | Purpose | -|-----|---------| -| `microsoft-docs` | **Search Microsoft Learn** — Official Azure/Foundry docs. Use this FIRST. | -| `context7` | Indexed Foundry documentation with semantic search (updated daily via GitHub workflow) | -| `deepwiki` | Ask questions about GitHub repositories | - -### Development Tools - -| MCP | Purpose | -|-----|---------| -| `github` | GitHub API operations | -| `playwright` | Browser automation and testing | -| `terraform` | Infrastructure as code | -| `eslint` | JavaScript/TypeScript linting | - -### Utilities - -| MCP | Purpose | -|-----|---------| -| `sequentialthinking` | Step-by-step reasoning for complex problems | -| `memory` | Persistent memory across sessions | -| `markitdown` | Convert documents to markdown | - -**Usage:** MCPs are available when configured in your editor. Use `microsoft-docs` to search official documentation before implementing Azure SDK code. - ---- - -## Conventions - -### Code Style - -- Prefer `async/await` for all Azure SDK I/O -- Use context managers: `with client:` or `async with client:` -- Close clients explicitly or use context managers -- Use `create_or_update_*` for idempotent operations -- Use type hints on all function signatures - -### Git & GitHub - -- Always use `gh` CLI for GitHub operations (PRs, issues, etc.) — never the MCP `github-create_pull_request` tool -- Use `gh pr create` for pull requests, `gh issue create` for issues - -### Clean Code Checklist - -Before completing any code change: - -- [ ] Functions do one thing -- [ ] Names are descriptive and intention-revealing -- [ ] No magic numbers or strings (use constants) -- [ ] Error handling is explicit (no empty catch blocks) -- [ ] No commented-out code -- [ ] Tests cover the change - -### Testing Patterns - -```python -# Arrange -service = ProjectService() -expected = Project(id="123", name="test") - -# Act -result = await service.get_project("123") - -# Assert -assert result == expected -``` - -For Azure SDK tests: -- Use `pytest-asyncio` for async tests -- Mock Azure clients at the service boundary -- Test both success and error paths - ---- - -## Workflow: Adding a Feature - -1. **Clarify** — Understand the requirement. Ask if unclear. -2. **Test First** — Write a failing test that defines success. -3. **Implement** — Write minimum code to pass the test. -4. **Refactor** — Clean up while tests stay green. -5. **Verify** — Run full test suite, check types, lint. - -```bash -# Example workflow -pytest tests/test_feature.py -v # Run specific tests -mypy src/ # Type check -ruff check src/ # Lint -``` - ---- - -## Do's and Don'ts - -### Do - -- ✅ Use `DefaultAzureCredential` for authentication -- ✅ Use async/await for all Azure SDK operations -- ✅ Write tests before or alongside implementation -- ✅ Keep functions small and focused -- ✅ Match existing patterns in the codebase -- ✅ Use `gh` CLI for all GitHub operations (PRs, issues, releases) - -### Don't - -- ❌ Hardcode credentials or endpoints -- ❌ Suppress type errors (`as any`, `@ts-ignore`, `# type: ignore`) -- ❌ Leave empty exception handlers -- ❌ Refactor unrelated code while fixing bugs -- ❌ Add dependencies without justification -- ❌ Use GitHub MCP tools for write operations (enterprise token restrictions) - ---- - -## Success Indicators - -These principles are working if you see: - -- Fewer unnecessary changes in diffs -- Fewer rewrites due to overcomplication -- Clarifying questions come before implementation (not after mistakes) -- Clean, minimal PRs without drive-by refactoring -- Tests that document expected behavior