Problem
The app-owned Pi extension that injects Zenbu editing guidance tries to identify the Zenbu source root with:
const ROOT_MARKERS = ["zenbu.config.ts", "AGENTS.md"] as const
That root identification is flawed for two separate reasons:
- It unnecessarily requires
AGENTS.md. The release/dev checkout may not contain AGENTS.md, so root resolution returns null even when the directory is clearly the running app root. That silently prevents the house-rules prompt from being appended.
- It identifies any Zenbu.js app, not specifically the Zenbu IDE app.
zenbu.config.ts is a framework-level marker for any app built with Zenbu.js. The prompt being injected is IDE-specific guidance about editing this app, so the detector should verify that the host app is the Zenbu IDE, e.g. via package.json#name === "zenbu" or another app-specific identity marker.
Expected behavior
The Pi house-rules extension should resolve the running Zenbu IDE app root reliably and only inject IDE-specific instructions when the host app is actually the Zenbu IDE.
Suggested direction
Instead of walking from the session/project cwd and requiring docs files as root markers:
- derive the host app root from the running Zenbu app context, such as
process.env.ZENBU_CONFIG_PATH → dirname(configPath);
- read the app
package.json and require name === "zenbu" before enabling the IDE-specific prompt;
- treat docs such as
AGENTS.md as optional prompt content, not as required root markers.
This keeps framework-level Zenbu.js app detection separate from Zenbu IDE-specific behavior.
Problem
The app-owned Pi extension that injects Zenbu editing guidance tries to identify the Zenbu source root with:
That root identification is flawed for two separate reasons:
AGENTS.md. The release/dev checkout may not containAGENTS.md, so root resolution returnsnulleven when the directory is clearly the running app root. That silently prevents the house-rules prompt from being appended.zenbu.config.tsis a framework-level marker for any app built with Zenbu.js. The prompt being injected is IDE-specific guidance about editing this app, so the detector should verify that the host app is the Zenbu IDE, e.g. viapackage.json#name === "zenbu"or another app-specific identity marker.Expected behavior
The Pi house-rules extension should resolve the running Zenbu IDE app root reliably and only inject IDE-specific instructions when the host app is actually the Zenbu IDE.
Suggested direction
Instead of walking from the session/project cwd and requiring docs files as root markers:
process.env.ZENBU_CONFIG_PATH→dirname(configPath);package.jsonand requirename === "zenbu"before enabling the IDE-specific prompt;AGENTS.mdas optional prompt content, not as required root markers.This keeps framework-level Zenbu.js app detection separate from Zenbu IDE-specific behavior.