The Open Framework for Building Agents
feat(eve): summarize initialized projects after running `eve init` (#2239)
Colton Paddene739c28e7c03
diff --git a/.changeset/init-ready-summary.md b/.changeset/init-ready-summary.mdnew file mode 100644index 000000000..5c0a4efe4--- /dev/null+++ b/.changeset/init-ready-summary.md@@ -0,0 +1,5 @@+---+"eve": patch+---++Coding-agent `eve init` runs now report the selected model and generated instructions file without changing the interactive human flow.diff --git a/packages/eve/src/cli/commands/agent-instructions.test.ts b/packages/eve/src/cli/commands/agent-instructions.test.tsindex 28ccb66e0..3cde16a49 100644--- a/packages/eve/src/cli/commands/agent-instructions.test.ts+++ b/packages/eve/src/cli/commands/agent-instructions.test.ts@@ -2,10 +2,13 @@ import { readdirSync } from "node:fs";import { describe, expect, it } from "vitest";+import { stripAnsi } from "#cli/ui/terminal-text.js";+import {HANDOFF_SECTIONS,initAgentDevHandoff,initAgentInstructions,+ initAgentReadySummary,initAgentReplPrompt,initExtensionHandoff,initExtensionInstructions,@@ -53,6 +56,17 @@ describe("initAgentInstructions", () => {});});+describe("initAgentReadySummary", () => {+ it("reports the model and generated instructions path", () => {+ expect(stripAnsi(initAgentReadySummary(undefined, "/app"))).toBe(+ "✓ Model zai/glm-5.2 (eve default)\n✓ Instructions /app/agent/instructions.md",+ );+ expect(stripAnsi(initAgentReadySummary("openai/gpt-5.5", "/app"))).toContain(+ "✓ Model openai/gpt-5.5\n",+ );+ });+});+describe("initAgentDevHandoff", () => {it("composes the shared sections and keeps verification headless", () => {const handoff = initAgentDevHandoff({diff --git a/packages/eve/src/cli/commands/agent-instructions.ts b/packages/eve/src/cli/commands/agent-instructions.tsindex d17aa6b32..4ee6f23cd 100644--- a/packages/eve/src/cli/commands/agent-instructions.ts+++ b/packages/eve/src/cli/commands/agent-instructions.ts@@ -1,4 +1,9 @@import { readFileSync } from "node:fs";+import { join } from "node:path";++import pc from "picocolors";++import { DEFAULT_AGENT_MODEL_ID } from "#shared/default-agent-model.js";// The two coding-agent prompts are one onboarding flow in two phases, composed// from the section files in `agent-prompt/`. The setup guide runs before@@ -55,6 +60,16 @@ export function initAgentInstructions(): string {return compose(SETUP_SECTIONS, { devCommand: "npx eve dev" });}+/** Concise scaffold facts printed only when a coding agent launched `eve init`. */+export function initAgentReadySummary(model: string | undefined, projectPath: string): string {+ const selectedModel = model ?? DEFAULT_AGENT_MODEL_ID;+ const defaultLabel = model === undefined ? pc.dim(" (eve default)") : "";+ return [+ `${pc.green("✓")} Model ${pc.bold(selectedModel)}${defaultLabel}`,+ `${pc.green("✓")} Instructions ${pc.bold(join(projectPath, "agent/instructions.md"))}`,+ ].join("\n");+}+/** The post-scaffold handoff printed after a coding agent runs `eve init`. */export function initAgentDevHandoff(options: { projectPath: string; devCommand: string }): string {return compose(HANDOFF_SECTIONS, {diff --git a/packages/eve/src/cli/commands/init.integration.test.ts b/packages/eve/src/cli/commands/init.integration.test.tsindex 9115e3b11..e308e43ef 100644--- a/packages/eve/src/cli/commands/init.integration.test.ts+++ b/packages/eve/src/cli/commands/init.integration.test.ts@@ -196,12 +196,14 @@ describe("runInitCommand", () => {expect(output.messages[2]).toContain("Installed dependencies");expect(output.messages[2]).toContain("in 13.2s");expect(output.messages[3]).toContain("$ eve dev");+ expect(output.messages.join("\n")).not.toContain("Instructions ");});it("creates a new agent with model settings selected by init options", async () => {const parentDirectory = await mkdtemp(join(tmpdir(), "eve-init-model-"));const output = logger();const deps = dependencies();+ deps.isCodingAgentLaunch.mockResolvedValue(true);await runInitCommand(output,@@ -214,6 +216,10 @@ describe("runInitCommand", () => {const projectPath = join(parentDirectory, "my-agent");const agentSource = await readFile(join(projectPath, "agent/agent.ts"), "utf8");expect(agentSource).toContain('model: "openai/gpt-5.5"');+ const messages = stripAnsi(output.messages.join("\n"));+ expect(messages).toContain("✓ Model openai/gpt-5.5");+ expect(messages).not.toContain("openai/gpt-5.5 (eve default)");+ expect(messages).toContain(`✓ Instructions ${join(projectPath, "agent/instructions.md")}`);expect(agentSource).toContain('reasoning: "high"');expect(deps.validateModelSlug).toHaveBeenCalledWith(expect.stringContaining(".eve-init-"),@@ -1164,9 +1170,10 @@ describe("runInitCommand", () => {expect(deps.selectInitHandoff).not.toHaveBeenCalled();expect(deps.spawnCodingAgentRepl).not.toHaveBeenCalled();expect(deps.spawnPackageManager).not.toHaveBeenCalled();- expect(output.messages.join("\n")).toContain(- "pnpm --config.minimum-release-age=0 exec eve dev --no-ui",- );+ const messages = stripAnsi(output.messages.join("\n"));+ expect(messages).toContain(`✓ Model ${DEFAULT_AGENT_MODEL_ID} (eve default)`);+ expect(messages).toContain(`✓ Instructions ${join(projectPath, "agent/instructions.md")}`);+ expect(messages).toContain("pnpm --config.minimum-release-age=0 exec eve dev --no-ui");});it("derives the agent dev handoff command from the existing project's own manager", async () => {diff --git a/packages/eve/src/cli/commands/init.ts b/packages/eve/src/cli/commands/init.tsindex a591adf8c..4c00a1cfb 100644--- a/packages/eve/src/cli/commands/init.ts+++ b/packages/eve/src/cli/commands/init.ts@@ -41,6 +41,7 @@ import {} from "#setup/scaffold/create/project.js";import { initAgentDevHandoff, initAgentReplPrompt } from "./agent-instructions.js";+import { initAgentReadySummary } from "./agent-instructions.js";import { confirmInitInNonEmptyDirectory } from "./init-confirm.js";import {cleanupFreshInitTarget,@@ -628,6 +629,7 @@ export async function runInitCommand(});if (result.agentLaunched) {+ logger.log(initAgentReadySummary(options.model, result.projectPath));logger.log(agentHandoff);return;}