refactor(examples): flatten single-agent layout (dir:".", prompts at root)#1045
Conversation
…root) All 12 examples are single-agent, so the agents/<id>/ wrapper was redundant nesting (e.g. agent-community/agents/agent-community/SOUL.md). Set dir:"." and move SOUL/IDENTITY/USER + evals + skills to each project root, so an example is one readable folder: config + prompts + connector + reaction + skill side by side. `dir` is consumed only by readMarkdown when reading the prompt files (no worker/runtime implications), so this is purely a layout change. The scaffolder (lobu init) keeps agents/<id>/ — `lobu agent add` grows a project to multi-agent uniformly, so the recommended structure stays nested; single-agent projects opt into the flat layout via dir:".". Docs, the landing snippet generator, example tsconfig globs, and the lobu-crm README updated to match.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughFlatten example project layouts by setting agent ChangesExample Project Directory Restructuring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
bug_free 88, simplicity 96, slop 0, bugs 0, 0 blockers Read diff/logs. Typecheck/unit passed. [env] integration failed because DATABASE_URL pointed at database "postgres" and the harness refused destructive setup; failing files are untouched. Explored by running Suggested fixes
Full verdict JSON{
"bug_free_confidence": 88,
"bugs": 0,
"slop": 0,
"simplicity": 96,
"blockers": [],
"change_type": "refactor",
"behavior_change_risk": "low",
"tests_adequate": true,
"suggested_fixes": [
{
"file": "packages/landing/src/content/docs/guides/evals.md",
"line": 100,
"change": "Remove em dashes from this landing-copy line, e.g. use `evals: ...` and `boundary, two independent cases`."
}
],
"notes": "Read diff/logs. Typecheck/unit passed. [env] integration failed because DATABASE_URL pointed at database \"postgres\" and the harness refused destructive setup; failing files are untouched. Explored by running `lobu validate` in all 12 changed example projects; all valid.",
"categories": {
"src": 2,
"tests": 0,
"docs": 21,
"config": 112,
"deps": 2,
"migrations": 0,
"ci": 0,
"generated": 6
}
}Local review gate — branch protection can require the |
…vals/ path The promptfoo evals script + quick-start comment still referenced agents/personal-finance/evals/promptfooconfig.yaml, which moved to evals/ in the flatten. (Only personal-finance has a real evals script.)
What
All 12 examples are single-agent, so the
agents/<id>/wrapper was redundant nesting (agent-community/agents/agent-community/SOUL.md). Each example now setsdir: "."and keeps everything in one folder:Why it's safe
agent.diris consumed only byreadMarkdown(SOUL/IDENTITY/USER) in the apply path — verified there's no wholesale agent-dir sync to the worker (prompts reach workers via DB settings, skills via.skills/). Sodir: "."just changes where those three files are read from; no runtime/worker behavior changes.Scaffolder stays nested (deliberate)
lobu initkeeps generatingagents/<id>/, becauselobu agent addplaces additional agents underagents/<id>/— so the recommended/grows-to-multi-agent structure stays uniform. Single-agent projects (the examples) opt into the flat layout withdir: ".". Documented in the agent-prompts guide.Scope
44 renames (prompts/evals/skills → root across all 12) + config edits (
dir: ".", skill paths./skills/...), exampletsconfigincludes (**/*.ts), lobu-crm README tree, agent-prompts doc note, and the landing snippet generator + regenerated JSON (office-bot skill path).Verification
bun run typecheckclean;biome checkclean;cd packages/landing && bun run buildclean (regenerates snippets from new paths).loadDesiredStateFromConfig— prompts (soulMd) from root, skills from root, connectors resolved.Summary by CodeRabbit
Refactor
Documentation