承接 ineersa/ai-index 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ineersa/ai-index

最新稳定版本:v0.1.2

Composer 安装命令:

composer require ineersa/ai-index

包简介

AI index for Symfony projects with map, callgraph and wiring information.

README 文档

README

Standalone AI index tooling for Symfony projects.

It provides a CLI binary (vendor/bin/ai-index) to:

  • install agent templates and AGENTS section (setup)
  • export Symfony DI wiring metadata (wiring:export)
  • generate per-class and namespace AI index files (generate)

Status

Current status: usable / beta.

Implemented:

  • setup recipe (idempotent)
  • DI wiring export from compiled Symfony container
  • class docs index generation (src/**/docs/*.toon)
  • namespace index regeneration (src/**/ai-index.toon)
  • mandatory callgraph generation via PHPStan + ineersa/call-graph

Still recommended before first stable release:

  • add unit + integration test suites
  • run consumer parity checks in more projects

Installation

From Packagist (normal)

composer require --dev ineersa/ai-index

This package now installs and uses phpstan/phpstan + ineersa/call-graph as runtime dependencies.

Local path dependency (development)

In consumer composer.json:

{
  "repositories": [
    {
      "type": "path",
      "url": "packages/ai-index",
      "options": { "symlink": true }
    }
  ]
}

Then:

composer require --dev ineersa/ai-index:@dev -W

Quick start

From the Symfony project root:

vendor/bin/ai-index setup
vendor/bin/ai-index generate --changed

generate auto-runs wiring export first (parity with the original flow).

For full regeneration:

vendor/bin/ai-index generate --all --force

Commands

setup

Install templates and upsert AGENTS section.

vendor/bin/ai-index setup [--project-root=...] [--dry-run] [--force]

Behavior:

  • copies templates:
    • .agents/skills/ai-index/SKILL.md
    • .agents/index-maintainer.md
  • upserts AGENTS.md section between markers:
    • <!-- ai-index:begin -->
    • <!-- ai-index:end -->
  • idempotent by default

wiring:export

Export DI wiring map as Toon.

vendor/bin/ai-index wiring:export [--project-root=...] [--output=...] [--dry-run]

Default output: var/reports/di-wiring.toon.

generate

Generate class docs + namespace indexes.

vendor/bin/ai-index generate [--project-root=...] [--all|--changed|<targets...>] [--force] [--dry-run] [--skip-wiring] [--skip-namespace]

By default this command:

  1. generates callgraph via PHPStan call-graph config,
  2. exports DI wiring map,
  3. regenerates class docs indexes,
  4. regenerates namespace indexes (unless --skip-namespace).

Outputs:

  • var/reports/di-wiring.toon
  • src/**/docs/*.toon
  • src/**/ai-index.toon

Configuration (.ai-index.php)

Create this file in the consumer project root to override defaults.

<?php

declare(strict_types=1);

return [
    'srcDir' => 'src',
    'projectNamespacePrefix' => 'App\\',

    'callGraph' => [
        'outputPath' => 'callgraph.json',
        'phpstanBin' => 'vendor/bin/phpstan',
        'configPath' => 'vendor/ineersa/call-graph/callgraph.neon',

        // false by default: only App<->App edges
        // true: include App<->Vendor edges too (still excludes Vendor<->Vendor-only edges)
        'includeVendorEdges' => false,
    ],

    'wiring' => [
        'outputPath' => 'var/reports/di-wiring.toon',

        // Either a Kernel class name (recommended):
        'kernelFactory' => App\Kernel::class,

        // or a callable: fn (string $env, bool $debug, string $projectRoot) => KernelInterface

        'environment' => 'test',
        'debug' => false,
        'spec' => 'agent-core.di-wiring/v1',
    ],

    'index' => [
        'spec' => [
            'file' => 'agent-core.file-index/v1',
            'namespace' => 'agent-core.ai-docs/v1',
        ],
    ],
];

Notes / troubleshooting

  • Callgraph is mandatory for generate. If callgraph config/binary is missing or PHPStan callgraph run fails, generate aborts with error.
  • callGraph.includeVendorEdges is false by default.
  • generate and wiring:export need a bootable Symfony kernel in the target project unless --skip-wiring is used.
  • vendor/bin/ai-index is a Composer-generated proxy. The ../ineersa/ai-index/bin/ai-index path inside that file is expected.

Development (this package)

composer install
composer validate --no-check-publish
./bin/ai-index list --raw
./bin/ai-index setup --dry-run
./bin/ai-index generate --dry-run --skip-wiring
./bin/ai-index wiring:export --dry-run

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固