Skip to content

feat: intelligent agent suggestion engine (v8.3.0)#7

Merged
dmicheneau merged 5 commits intomainfrom
feat/install-suggest
Mar 25, 2026
Merged

feat: intelligent agent suggestion engine (v8.3.0)#7
dmicheneau merged 5 commits intomainfrom
feat/install-suggest

Conversation

@dmicheneau
Copy link
Copy Markdown
Owner

Summary

  • Suggestion intelligente au démarrage : install sans argument détecte automatiquement la stack du projet (langages, frameworks, outils) et propose les agents les plus pertinents avec un score de correspondance
  • Écran de suggestions TUI : le TUI affiche un écran de suggestions pré-sélectionnées au démarrage si la stack est détectée (score ≥ 10%), avec navigation clavier complète
  • Plugin suggest_agents : nouveau tool MCP pour obtenir des suggestions depuis un LLM avec requête optionnelle en langage naturel

Changements

Nouveaux fichiers

  • src/recommender.mjs — moteur de recommandation (détection stack + scoring Jaccard)
  • data/triggers.json — mapping stack → agents
  • data/ecosystem-intent-tags.csv — tags enrichis pour 69 agents
  • tests/recommender.test.mjs — tests unitaires du moteur

Fichiers modifiés

  • bin/cli.mjsrunSuggestFlow() + gestion cas limites (non-TTY, --force, no-suggestions)
  • src/tui/state.mjs — nouveau mode 'suggest' + reducer updateSuggest
  • src/tui/renderer.mjsrenderSuggest() + migration agentStates Map → plain object
  • src/tui/index.mjs — détection stack au démarrage TUI
  • src/lock.mjs — migration agentStates Map → plain object
  • manifest.json — 69 agents enrichis avec ecosystem, intent, related_agents
  • package.jsonrecommender.test.mjs ajouté au script de test
  • .gitignore.opencode/* ignoré
  • README.md / README.en.md — documentation v8.3.0
  • CONTRIBUTING.md — comptage agents corrigé (69)

Tests

814 tests, 0 fail (504 JS + 310 Python)

Comportement

# Projet React + TypeScript
$ npx github:dmicheneau/opencode-template-agent install

Detected stack: javascript · typescript · react

Suggested agents for this project:

   1. react-specialist    37%  — React 19+ modern hooks, Server Components…
   2. nextjs-developer    34%  — Next.js 15+ App Router, Server Components…
   3. code-reviewer       30%  — Code review focusing on quality and security…
   …

Install these 8 agents? [Y/n]

Notes

  • Zéro dépendances externes ajoutées (Node.js builtins uniquement)
  • Nouveaux champs manifest (ecosystem, intent, related_agents) optionnels — rétrocompatibles
  • suggestSelected pré-rempli dans le TUI (opt-out) : Enter sans rien faire installe tout

Adds a recommendation engine that detects the project stack (languages, frameworks, tooling) and ranks agents by relevance using Jaccard scoring.

- New recommender.mjs: detectProjectProfile(), analyzeQuery(), scoreAgents() — zero external deps
- New data/triggers.json + data/ecosystem-intent-tags.csv for scoring signals
- CLI: runSuggestFlow() — triggers on 'install' with no args, non-TTY auto-accepts
- TUI: 'suggest' mode on startup when top score ≥ 0.1, updateSuggest reducer
- Plugin: suggest_agents tool for in-chat agent recommendations
- 69 manifest agents enriched with ecosystem/intent/related_agents fields
- Tests: recommender.test.mjs (new), tui-suggest.test.mjs (new), +23 tests in cli/tui suites
- Review fixes: score clamp ≤1.0, symlink guard, control-char strip, monorepo threshold, agentStates merge
- Show informative message instead of generic error when no suggestions available (all agents already installed or no stack detected)
- Bypass installed-agent filter when --force is used with no positional arg, so force-mode re-suggests everything
- Update two CLI tests that expected the old error behavior
@dmicheneau dmicheneau merged commit 63a987b into main Mar 25, 2026
8 checks passed
@dmicheneau dmicheneau deleted the feat/install-suggest branch March 25, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant