Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

Clarify bundled docs location guidance (#264)

Allen Zhouff44c4ccdf8d
diff --git a/.changeset/eve-docs-location-guidance.md b/.changeset/eve-docs-location-guidance.md
new file mode 100644
index 000000000..7ce994def
--- /dev/null
+++ b/.changeset/eve-docs-location-guidance.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Clarify scaffolded guidance for locating bundled eve package docs in workspaces and local installs.
diff --git a/packages/eve/src/cli/commands/agent-instructions.test.ts b/packages/eve/src/cli/commands/agent-instructions.test.ts
index e1da4ed12..559ed6f35 100644
--- a/packages/eve/src/cli/commands/agent-instructions.test.ts
+++ b/packages/eve/src/cli/commands/agent-instructions.test.ts
@@ -25,7 +25,9 @@ describe("initAgentInstructions", () => {
// pre-scaffold guide renders the universal `npx eve dev` through the shared
// prompt renderer rather than a launcher-specific command.
expect(instructions).toContain("npx eve@latest init <name>");
+ expect(instructions).toContain("full docs are bundled");
expect(instructions).toContain("node_modules/eve/docs/");
+ expect(instructions).toContain("resolve\nthe installed `eve` package location");
expect(instructions).toContain("npx eve dev --no-ui");
expect(instructions).not.toContain("npm run dev");
expect(instructions).not.toContain("starts the dev server");
@@ -56,7 +58,9 @@ describe("initAgentDevHandoff", () => {
// The intro names the scaffolded project; the shared sections then reference
// paths relative to it rather than interpolating the working directory.
expect(handoff).toContain("The project at `/tmp/triage-bot` is already scaffolded");
+ expect(handoff).toContain("full docs are bundled");
expect(handoff).toContain("node_modules/eve/docs/");
+ expect(handoff).toContain("resolve\nthe installed `eve` package location");
expect(handoff).toContain("agent/instructions.md");
expect(handoff).not.toContain("/tmp/triage-bot/");
diff --git a/packages/eve/src/cli/commands/agent-prompt/build-and-verify.md b/packages/eve/src/cli/commands/agent-prompt/build-and-verify.md
index 4ac5449b4..d847c77e3 100644
--- a/packages/eve/src/cli/commands/agent-prompt/build-and-verify.md
+++ b/packages/eve/src/cli/commands/agent-prompt/build-and-verify.md
@@ -1,10 +1,13 @@
## Build it out, then verify
Work from the project directory. Once eve is installed, the full docs are bundled
-at `node_modules/eve/docs/` and match the installed version exactly. Read
-`README.md` there first, then the guide for what you're adding, such as
-`connections`, `channels/slack`, or `guides/auth-and-route-protection` for the
-Vercel Connect flow.
+with the installed package and match its version exactly. In most installs, they
+are at `node_modules/eve/docs/`. In workspaces or local package installs, resolve
+the installed `eve` package location first and read its `docs/` directory. If
+package docs are unavailable, use https://eve.dev/docs as a fallback. Read
+`README.md` in the package docs first, then the guide for what you're adding,
+such as `connections`, `channels/slack`, or `guides/auth-and-route-protection`
+for the Vercel Connect flow.
- Put the purpose in `agent/instructions.md` (the always-on system prompt),
replacing the scaffold's placeholder with what the user said the agent should
diff --git a/packages/eve/src/setup/scaffold/create/project.ts b/packages/eve/src/setup/scaffold/create/project.ts
index 18e9ccd9e..119c1327e 100644
--- a/packages/eve/src/setup/scaffold/create/project.ts
+++ b/packages/eve/src/setup/scaffold/create/project.ts
@@ -245,7 +245,11 @@ dist
`,
"AGENTS.md": `# eve Agent App
-This project uses the eve framework. Before writing code, always read the relevant guide in \`node_modules/eve/docs/\`.
+This project uses the eve framework. Before writing code, read the relevant guide
+from the installed eve package docs. In most installs, those docs are at
+\`node_modules/eve/docs/\`. In workspaces or local package installs, resolve the
+installed \`eve\` package location first and read its \`docs/\` directory. If
+package docs are unavailable, use https://eve.dev/docs as a fallback.
`,
"CLAUDE.md": `@AGENTS.md
`,
diff --git a/packages/eve/src/setup/scaffold/index.integration.test.ts b/packages/eve/src/setup/scaffold/index.integration.test.ts
index 38e8e2516..078c8bc3f 100644
--- a/packages/eve/src/setup/scaffold/index.integration.test.ts
+++ b/packages/eve/src/setup/scaffold/index.integration.test.ts
@@ -730,9 +730,10 @@ describe("scaffoldBaseProject", () => {
await expect(readFile(join(projectRoot, "pnpm-workspace.yaml"), "utf8")).resolves.toBe(
PNPM_WORKSPACE_CONTENT,
);
- await expect(readFile(join(projectRoot, "AGENTS.md"), "utf8")).resolves.toContain(
- "node_modules/eve/docs/",
- );
+ const agentsMd = await readFile(join(projectRoot, "AGENTS.md"), "utf8");
+ expect(agentsMd).toContain("installed eve package docs");
+ expect(agentsMd).toContain("node_modules/eve/docs/");
+ expect(agentsMd).toContain("resolve the\ninstalled `eve` package location");
// `vercel deploy` uploads everything a .vercelignore doesn't exclude, and
// the platform default-ignores only the .env.local variants — eve's dev
// artifacts and a bare .env must be excluded here or a source deploy