Skip to content

feat(deployment): add agent-based dev environment analysis and deployment#384

Open
arielshad wants to merge 2 commits intomainfrom
feat/agent-dev-environment-93a417
Open

feat(deployment): add agent-based dev environment analysis and deployment#384
arielshad wants to merge 2 commits intomainfrom
feat/agent-dev-environment-93a417

Conversation

@arielshad
Copy link
Contributor

Summary

  • Introduce AI-driven dev environment analysis via IDevEnvironmentAgent that uses a structured agent caller to analyze any repository (language-agnostic) and determine how to start a local dev server
  • Add IAgentDeploymentService as a higher-level orchestration layer that analyzes repos before starting deployments, runs setup commands, and gracefully handles repos with nothing to deploy
  • Update web deploy actions (deployFeature, deployRepository) to use the new agent-based deployment service instead of the simple package.json script detection

Key Changes

New interfaces (ports):

  • IDevEnvironmentAgent — AI agent that analyzes repo structure, detects language/framework, and returns a structured DevEnvironmentAnalysis with command, port, setup steps, and deployability assessment
  • IAgentDeploymentService — Orchestration service that chains analysis → setup commands → dev server start

New services (infrastructure):

  • DevEnvironmentAgentService — Reads config files (package.json, Cargo.toml, go.mod, requirements.txt, etc.), builds a prompt, and calls the structured agent. Includes per-repo in-memory caching for fast repeated calls
  • AgentDeploymentService — Orchestrates the full deploy flow: analyze → run setup commands → start via DeploymentService

Modified services:

  • DeploymentService.start() now accepts optional DeploymentStartOptions with command and cwd overrides, enabling agent-provided commands alongside the legacy auto-detection path
  • deploy-feature.ts / deploy-repository.ts web actions now resolve IAgentDeploymentService and return reason field for not-deployable repos

DI Container:

  • Registered IDevEnvironmentAgent and IAgentDeploymentService with proper dependency wiring

Evidence

  • 46 feature-specific unit tests passing across 4 test files (agent-deployment.service, dev-environment-agent, deploy-feature action, deploy-repository action)
  • Full test suite: 315 test files, 4050 tests — all passing, confirming no regressions

Test plan

  • Feature-specific unit tests pass (46 tests across 4 files)
  • Full test suite passes (315 files, 4050 tests)
  • Build compiles without errors (CLI + Web)
  • Lint passes with zero warnings
  • Pre-commit hooks pass (ESLint, Prettier, TypeCheck)
  • CI pipeline passes on push

🤖 Generated with Claude Code

arielshad and others added 2 commits March 16, 2026 13:30
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ment

Replace simple package.json script detection with ai-driven repo analysis
that supports any language and framework. introduces idevenvronmentagent
for structured analysis with per-repo caching and iagentdeploymentservice
as the orchestration layer. repos with no server to start are gracefully
reported as not-deployable instead of throwing errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

Dev Release Published

Artifact Version Install
npm 1.120.0-pr384.fdb89bb npm install -g @shepai/cli@1.120.0-pr384.fdb89bb

Published from commit 0d1c42e | View CI

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