- @peppa/core: projects, goals, tasks (atomic per-project numbering), PM questions, progress events, pg NOTIFY on peppa_events - @peppa/mcp (peppa-mcp): get_task, list_tasks, list_goals, create_task, update_task, request_approval, ask_pm, report_progress - @peppa/cli (peppa): project/goal/task/q commands - questions/events now link to project and task; session is optional - scripts/install-bins.sh; bootstrap-project.sh registers the project Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
596 B
TypeScript
16 lines
596 B
TypeScript
import { existsSync, readFileSync } from "node:fs";
|
|
import { dirname, join } from "node:path";
|
|
import type { PeppaProjectFile } from "@peppa/shared";
|
|
|
|
/** Walks up from `dir` looking for `.peppa/project.json`. */
|
|
export function findProjectFile(dir: string): { path: string; data: PeppaProjectFile } | null {
|
|
let cur = dir;
|
|
for (;;) {
|
|
const path = join(cur, ".peppa", "project.json");
|
|
if (existsSync(path)) return { path, data: JSON.parse(readFileSync(path, "utf8")) as PeppaProjectFile };
|
|
const parent = dirname(cur);
|
|
if (parent === cur) return null;
|
|
cur = parent;
|
|
}
|
|
}
|