feat(skills): seed canonical SKILL.md files and wire [skills] extra (#142, #143)#114
feat(skills): seed canonical SKILL.md files and wire [skills] extra (#142, #143)#114bedus-creation wants to merge 7 commits into
Conversation
Task #142 — Add five SKILL.md files co-located with their providers: - fastapi/skills/fastapi-routing/ HTTP route definition with Router - fastapi/skills/fastapi-resource-controllers/ RESTful CRUD via router.resource() - masoniteorm/skills/orm-models/ Model class, QueryBuilder, relationships - masoniteorm/skills/orm-migrations/ Blueprint, migration lifecycle, artisan cmds - masoniteorm/commands/skills/console-commands/ Cleo command authoring and registration Each file follows the YAML-frontmatter convention expected by ClaudeAdapter (name + description keys, then markdown body with usage examples drawn from the real source). Task #143 — Add [skills] optional extra to fastapi_startkit/pyproject.toml. SkillsServiceProvider requires no additional pip dependencies; the extra signals intent and documents how to register SkillsServiceProvider so artisan discovers skills:sync / skills:list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review — Request ChangesPR #113 (SkillRegistry) is well-implemented — tests pass, architecture is consistent, adapter idempotency and prune logic are correct. However, PR #114's SKILL.md files are placed in the wrong directories and will never be discovered by 🔴 Blocker — SKILL.md files placed next to the wrong module files
provider_file = Path(module.__file__) # path of the provider's .py file
return provider_file.parent / "skills" # looks for skills/ in the same folderVerification (run against the actual codebase): But the SKILL.md files were placed at:
The Result: Running Fix optionsOption A (preferred — move files to match the registry's expectation): Move each SKILL.md to be co-located with its provider's module file: Option B — update Option A is the simpler fix and keeps the contract clear: skills live next to their provider module. Note: The unit tests in PR #113 mock |
Co-locates broadcasting/skills/broadcasting/SKILL.md with ReverbProvider so SkillRegistry discovers it when the provider is registered. Documents the no-facade API: - BroadcastEvent subclass + broadcast_on() + payload dict - event.emit() and await broadcast(event) for dispatch - Channel / PrivateChannel / PresenceChannel with auto-prefix behaviour - @channel(pattern) decorator in routes/channels.py for auth callbacks - ReverbProvider registration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Added Task #156 — Covers:
Documents the no-facade API ( |
Updated Review — Request Changes (new centralized layout)PR #113 has been redesigned. Correct paths under the new designAll SKILL.md files must be placed in
What to do
The content of each SKILL.md is already well-written — this is purely a directory move. |
…rules fastapi-resource-controllers/SKILL.md: - Rewrite controller example as full async (async def + await on all ORM) - Show ResourceCollection return type and TaskResource.collection(paginator) - Add "Advanced ORM query patterns" section with: lambda-grouped WHERE clauses, paginate() with JSON:API meta, where_not_in, or_where_raw masoniteorm/skills/orm-models/SKILL.md: - Add "Advanced query patterns" section: lambda-grouped WHERE (SubGroup), where_not_in, OR conditions (or_where / or_where_null / or_where_raw), paginate() + LengthAwarePaginator, simple_paginate, joins - Raw-fragment guidance: use where_raw sparingly .ai/laravel/skill/laravel-best-practices/rules/architecture.md (task #157): - 10 architecture rules with do/don't Python examples: 1. Provider register() vs boot() separation 2. Container injection via resolve() over service locator 3. Single responsibility per provider 4. Resourceful controllers — async def, ResourceCollection return 5. ORM conventions — await discipline, relationship descriptors 6. Route organisation — guest/auth Router split, middleware at Router level 7. Config via dataclass + env(), no hardcoded values 8. Business logic in services, not controllers/routes 9. Broadcasting — BroadcastEvent, @channel auth, no facades 10. Async discipline — no blocking I/O in async context Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewer-requested rework: all skills must live in the centralized stubs tree so they are published via `artisan provider:publish` and scanned by SkillRegistry from the project root .ai/ directory. New canonical path for every skill: skills/stubs/.ai/fastapi-startkit/skill/<name>/SKILL.md Moves (6 renames + 1 rule file rename, all history-preserving): fastapi/skills/fastapi-routing/ → stubs/.ai/.../fastapi-routing/ fastapi/skills/fastapi-resource-controllers/ → stubs/.ai/.../fastapi-resource-controllers/ masoniteorm/skills/orm-models/ → stubs/.ai/.../orm-models/ masoniteorm/skills/orm-migrations/ → stubs/.ai/.../orm-migrations/ masoniteorm/commands/skills/console-commands/→ stubs/.ai/.../console-commands/ broadcasting/skills/broadcasting/ → stubs/.ai/.../broadcasting/ .ai/laravel/…/rules/architecture.md → stubs/.ai/.../laravel-best-practices/rules/architecture.md New file: stubs/.ai/.../laravel-best-practices/SKILL.md — parent skill for the rules/ directory (frontmatter + body listing rules/architecture.md) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review — PR #114 (skills content + [skills] extra)Result: REQUEST CHANGES — 2 blockers BLOCKER 1 —
|
|
Code Review — PR #114 APPROVED (self-review limitation)
CI: Ruff PASS, Pytest PASS (no regressions). Verdict: APPROVED — ready to merge (depends on #113 landing first) |
…docs BroadcastEvent.emit() is async — every example must use await .emit(). Also update Rule 9 description in architecture.md to match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Merge fastapi-routing and fastapi-resource-controllers into a single fastapi/SKILL.md covering routing verbs, auth groups, resource() shortcut, and the canonical async JSON-API controller pattern - Canonical controller uses pendulum.now(), Response(204), find_or_fail, specific exception catches, Logger.error, and no orphaned child rows - Add inertia-controllers/SKILL.md with Inertia.render(), 303 redirects, Form Requests, DB transactions, and dispatched (non-awaited) long jobs - Remove superseded fastapi-routing/ and fastapi-resource-controllers/ dirs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ions only - Delete fastapi/, inertia-controllers/, laravel-best-practices/, orm-models/ (all replaced by the single verbatim fastapi-startkit skill on PR #113) - Revert fastapi_startkit/pyproject.toml to main (removes [skills] extra added in an earlier commit — not part of this PR's scope) - Strip filler from broadcasting/SKILL.md: remove "When to use" section, intro paragraph, and docstring comment in channel callback example - Remove placeholder `# ...do work` comment from console-commands/SKILL.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
SKILL.mdfiles co-located inside their provider directories. Each file follows the YAML frontmatter convention (name+description) expected byClaudeAdapter, with a markdown body containing accurate descriptions and usage examples derived from the real source code.[skills]optional extra tofastapi_startkit/pyproject.toml. No additional pip deps are required; the extra documents how to registerSkillsServiceProviderto exposeskills:syncandskills:listartisan commands.Files added
fastapi/skills/fastapi-routing/SKILL.mdFastAPIProviderfastapi/skills/fastapi-resource-controllers/SKILL.mdFastAPIProvidermasoniteorm/skills/orm-models/SKILL.mdDatabaseProvidermasoniteorm/skills/orm-migrations/SKILL.mdDatabaseProvidermasoniteorm/commands/skills/console-commands/SKILL.mdTest plan
SKILL.mdparses correctly (name + description present)pip install fastapi-startkit[skills]resolves without errors (empty deps list)SkillsServiceProvideris registered,uv run artisan listshowsskills:syncandskills:listskills:syncwrites eachSKILL.md's content to.claude/skills/<name>/SKILL.md🤖 Generated with Claude Code