定制 mrkoopie/laravel-ai-harness 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mrkoopie/laravel-ai-harness

Composer 安装命令:

composer require mrkoopie/laravel-ai-harness

包简介

A Laravel package that installs and refreshes AI agent harnessing, local runtime drivers, and quality foundations.

README 文档

README

Laravel AI Harness installs and refreshes the files that make AI agents useful in a Laravel project: agent instructions, MCP configuration, local runtime helpers, worktree setup hooks, and repeatable quality guidance.

The package is intentionally conservative. Human-editable files receive managed blocks, generated scripts/config files are package-owned, and optional tooling such as Docker and Polyscope is opt-in.

Installation

composer require mrkoopie/laravel-ai-harness
php artisan ai-harness:install

The install command writes the initial harness files and adds this command to both Composer lifecycle hooks:

@php -r "if (file_exists('vendor/mrkoopie/laravel-ai-harness')) { passthru(escapeshellarg(PHP_BINARY).' artisan ai-harness:update --ansi', $code); exit($code); }"

After that first install, Composer will refresh managed harness files on every composer install and composer update. The generated hook is guarded so production composer install --no-dev runs can skip the harness when the package is installed as a development dependency.

When ai-harness:install is run with --with=* feature flags, those flags are preserved in the Composer hook.

Commands

php artisan ai-harness:install
php artisan ai-harness:update
php artisan ai-harness:doctor

ai-harness:install writes the harness and patches Composer scripts.

ai-harness:update refreshes package-managed files and blocks.

ai-harness:doctor checks whether the selected harness surface exists.

All commands accept --path=/path/to/project for testing or non-standard project roots.

Optional Features

Codex, Claude, shared MCP configuration, and the generated harness skill are enabled by default.

Docker and Polyscope are opt-in:

php artisan ai-harness:install --with=docker --with=polyscope
php artisan ai-harness:update --with=docker --with=polyscope

Feature defaults can also be configured:

AI_HARNESS_CODEX=true
AI_HARNESS_CLAUDE=true
AI_HARNESS_SKILLS=true
AI_HARNESS_HERD=false
AI_HARNESS_DOCKER=false
AI_HARNESS_POLYSCOPE=false

Generated project metadata is derived from existing harness context before falling back to the directory name. You can pin it explicitly when needed:

AI_HARNESS_PROJECT_NAME="bill-it"
AI_HARNESS_PROJECT_SLUG="bill-it"
AI_HARNESS_DATABASE_NAME="bill_it"
AI_HARNESS_DATABASE_CHARSET="utf8mb4"
AI_HARNESS_DATABASE_COLLATION="utf8mb4_uca1400_ai_ci"
AI_HARNESS_PHP_VERSION="8.3"
AI_HARNESS_WORKTREE_BASE_REF="origin/main"

Laravel Boost

This package ships Laravel Boost resources for package discovery:

  • resources/boost/guidelines/core.blade.php
  • resources/boost/skills/laravel-ai-harness/SKILL.md

After installing Laravel Boost, run php artisan boost:install or php artisan boost:update --discover and select mrkoopie/laravel-ai-harness when Boost asks for third-party guidelines or skills.

Boost and AI Harness own different generated regions. Boost refreshes its <laravel-boost-guidelines> block, while AI Harness refreshes its own <!-- ai-harness:start --> blocks and generated harness files.

Generated Files

Default files:

  • AGENTS.md
  • CLAUDE.md
  • .ai/mcp/mcp.json
  • .dev/bin/ai-harness
  • .codex/config.toml.example
  • .codex/environments/environment.toml
  • .codex/hooks.json
  • .codex/scripts/local-environment.sh
  • .claude/settings.json
  • .agents/skills/laravel-ai-harness/SKILL.md
  • .claude/skills/laravel-ai-harness/SKILL.md

Optional files:

  • docker/mysql/init/10-create-testing-database.sh
  • polyscope.json

Development

composer install
composer test
composer analyse
vendor/bin/pint --test --format agent
composer validate --strict

PHPStan uses Larastan. Run it through composer analyse, which passes --memory-limit=1G for Laravel package analysis.

Documentation

统计信息

  • 总下载量: 51
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固