-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Problem
The /index command hardcodes ecosystem-specific hints (file names, entry points, config files) directly into the prompt body. This creates a tiered experience where some ecosystems get reasonable coverage and most get none:
| Ecosystem | Phase 1 (Discovery) | Phase 2 (Architecture) | Phase 3 (Conventions) | Phase 4 (Key Files) |
|---|---|---|---|---|
| JS/TS | package.json, tsconfig |
index.ts, App.tsx, API routes |
Import patterns | Auth, DB, API clients |
| Rust | Cargo.toml mentioned |
No entry points | No guidance | No guidance |
| Python | pyproject.toml mentioned |
main.py mentioned |
No guidance | No guidance |
| Go | go.mod mentioned |
No entry points | No guidance | No guidance |
| C#/.NET | Not mentioned | Not mentioned | Not mentioned | Not mentioned |
| Java | Not mentioned | Not mentioned | Not mentioned | Not mentioned |
| Ruby | Not mentioned | Not mentioned | Not mentioned | Not mentioned |
| PHP | Not mentioned | Not mentioned | Not mentioned | Not mentioned |
Even for the ecosystems that are partially mentioned, the guidance drops off after Phase 1. Rust, Python, and Go get a manifest file name in the discovery phase and nothing else — no entry points, no architectural patterns, no convention hints.
Concrete example: .NET/C#
A .NET repo indexed with the current command would produce a shallow, generic result because the agent wouldn't know to look for:
- Discovery:
*.sln,*.csproj,Directory.Build.props,Directory.Packages.props,global.json,nuget.config,appsettings.json,launchSettings.json - Architecture:
Program.cs,Startup.cs,Host.CreateDefaultBuilderpatterns, Controllers vs Minimal API endpoints,DbContextclasses,IServiceCollectionDI registrations, middleware pipelines - Conventions: Namespace-per-folder patterns,
src//tests/split,IOptions<T>configuration, attribute-based routing - Key files:
ServiceCollectionExtensions, middleware classes,AutoMapperprofiles,MediatRhandlers, EF Core migrations
This same gap exists for Java (no pom.xml, build.gradle, Application.java, Spring annotations), Ruby (no Gemfile, config/routes.rb, Rails conventions), and every other ecosystem not explicitly listed.
Root cause
The problem is structural, not just a missing entry. Adding more file names to the existing flat list would help marginally but:
- The prompt would bloat with every new ecosystem
- Phases 2-4 would still lack ecosystem-specific architectural guidance
- Maintenance burden grows linearly with each language added
Recommended Solution
Restructure the single /index command with a two-phase approach:
-
Phase 0 (new): Auto-detect the ecosystem — Glob for manifest files (
*.sln,*.csproj,package.json,Cargo.toml,go.mod,pyproject.toml,Gemfile,pom.xml,build.gradle, etc.) and determine the primary stack before beginning the deep dive -
Phases 1-4: Ecosystem-aware guidance via reference table — Replace the hardcoded file names with a lookup table that gives the agent specific guidance for whichever ecosystem it detected:
| Ecosystem | Manifest | Entry Points | Config | Key Patterns to Find |
|---|---|---|---|---|
| .NET/C# | *.sln, *.csproj, Directory.Build.props |
Program.cs, Startup.cs |
appsettings.json, launchSettings.json |
DI registrations, middleware pipeline, DbContext, Controllers/MinimalAPI |
| JS/TS | package.json |
index.ts, App.tsx, main.ts |
tsconfig.json, .eslintrc |
Module system, imports, component patterns |
| Python | pyproject.toml, setup.py |
main.py, app.py, __main__.py |
pyproject.toml, .env |
Decorators, __init__.py, framework patterns |
| Rust | Cargo.toml |
main.rs, lib.rs |
Cargo.toml |
mod.rs, traits, derive macros |
| Go | go.mod |
main.go, cmd/ |
go.mod |
Interfaces, packages, error handling patterns |
| Java | pom.xml, build.gradle |
Application.java, Main.java |
application.properties/yml |
Annotations, Spring beans, dependency injection |
| Ruby | Gemfile |
config.ru, app/ |
config/ |
Rails conventions, gems, middleware |
This keeps UX simple (one command, no arguments needed), avoids prompt bloat, and gives the agent enough context to do a thorough job for any ecosystem.
Affected File
plugin/commands/index.md