Ship Agent Skills for building Quantum applications

Đang mở
#740 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
40/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php

Hướng nghiên cứu

Start by checking the existing framework commands, module templates, event definitions, config lookup, and Composer package exclusions to verify each proposed skill against the shipped code. Then plan the skill folders, specification checks, README and docs updates, and contribution workflow changes; the issue names no specific source files or test entry points. Done means the agreed skills pass the requested validation, document versioned installation, and guide a fresh project through creating a working module.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Summary

Ship Agent Skills with the framework, so AI coding agents (Claude Code, Codex, Cursor, Copilot and other clients that support the format) know how to build Quantum applications: create modules, routes, controllers, config, console commands and event listeners in the Quantum way, using only names the framework really has.

Why

Agents know Laravel and Symfony well and Quantum barely, so they guess and produce code that looks like another framework's. A skill is a small folder that the agent loads only when the task matches, so it costs nothing in other tasks. Other PHP projects already do this: MoonShine ships skills/ in its package, and Laravel Boost installs skills shipped by Composer packages.

Format (Agent Skills specification)

  • One folder per skill: skills/<name>/SKILL.md, optional references/, scripts/, assets/.
  • SKILL.md frontmatter: name (required; lowercase letters, digits and hyphens, at most 64 characters, equal to the folder name) and description (required, at most 1024 characters, says what the skill does and when to use it: agents choose skills from this text alone). Optional: license, compatibility (for example "Requires quantum/framework 3.3"), metadata (for example the framework version).
  • Loading in layers: name and description load at startup (about 100 tokens per skill), the SKILL.md body when the skill is used (keep it under 500 lines, about 5000 tokens), references/ only when SKILL.md points to them. References are linked straight from SKILL.md, one level deep.
  • Shape that works: a short SKILL.md with the hard rules an agent gets wrong, and the detailed guide with examples in references/.

Scope

  1. A top-level skills/ folder in this repository, shipped in the Composer package (not export-ignored), so the skills in vendor/quantum/framework/skills always match the installed version.
  2. Skills for application developers, one per task. Candidates (the final set is decided in the plan):
    • quantum-module: create a module with php qt module:generate, the templates (DefaultWeb, DefaultApi, DemoWeb, DemoApi), the module folder layout.
    • quantum-config: config lookup order (module file, then shared/config, then the package default), php qt config:publish <Package> [--module=<Name>], reading config with config().
    • quantum-console-command: an application command, where it lives, how it is registered; its constructor may use the environment and config.
    • quantum-events: listening to the runtime events (web.route.before, web.dispatch.after, ...): names, payload (['context' => $context]), and what a stage stop means for later events.
    • quantum-helpers: application and module helper files (helpers folders).
  3. A unit test that checks every skill against the specification: name matches the folder and the allowed characters, description is set and at most 1024 characters, SKILL.md is at most 500 lines, and every file SKILL.md links to exists. No new dependency.
  4. Installation documented in the README and the docs: with the skills CLI from a release tag (npx skills add https://github.com/quantum-php/framework/tree/<tag>/skills), with gh skill install, or by copying from vendor/quantum/framework/skills into the project's skills folder (.claude/skills/ for Claude Code). Installing from master gets skills for unreleased code; the docs must say to use the tag of the installed version.

Rules for the content

  • Every statement and example is checked against the framework code of the target version; examples use only classes, helpers, commands and config keys that exist.
  • No rule that duplicates the code's own types; rules cover what agents get wrong.
  • A change that alters behavior a skill describes updates the skill in the same PR (added to the contribution workflow next to the changelog and docs checks).

Out of scope

  • A php qt command that installs skills (possible follow-up once the format has settled).
  • An MCP server for the running application.
  • Skills for contributing to the framework itself.

Acceptance criteria

  • skills/ holds the agreed skills, each valid against the specification; the unit test passes and fails on an invalid skill.
  • A Claude Code session in a fresh quantum/project app with the skills installed picks the right skill for "create a module named Blog" and produces code that runs.
  • README and docs explain the installation per version.
Ngôn ngữ chính
PHP
Star
44
Fork
22
Merge trung bình
2 giờ 49 phút
Pull request đã merge (30 ngày)
61

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quantum-php/framework

Tất cả issue của quantum-php/framework

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.