@donedev/core
v0.27.0
Published
Programmatic API for Done Agent Pack — detect modes, audit repos, validate consistency, upgrade between versions
Downloads
2,694
Readme
@donedev/core
Programmatic API for the Done Agent Pack — detect workspace modes, audit existing repos, validate pack consistency, upgrade between pack versions, and read workspace status.
Install
pnpm add @donedev/core
# or
npm install @donedev/coreQuick start
import { detectMode, PACK_VERSION } from "@donedev/core";
const result = detectMode("./my-project");
console.log("Modes:", result.modes);
console.log("Signals:", result.signals);
console.log("Pack version:", PACK_VERSION);API
detectMode(dir)
Detects the workspace mode(s) for a given directory. Returns DetectionResult.
The function is read-only and additive — a workspace can match multiple modes
simultaneously (e.g. EXISTING_REPO_MODE + NATIVE_APP_MODE + MULTI_REPO_MODE).
Modes detected:
EMPTY_PROJECT_MODEEXISTING_REPO_MODEEXISTING_PRODUCT_NEW_MODULE_MODEPARTIAL_PROJECT_MODECONTINUATION_MODE(complementary)RESCUE_MODE(complementary)REBUILD_MODEPRODUCTION_HARDENING_MODE(complementary)NATIVE_APP_MODE(complementary)MULTI_REPO_MODE(complementary)
Other APIs (coming in Q1)
init(targetDir, options)— copy the pack into a directory.status(dir)— read runtime state and return a structured snapshot.audit(dir)— programmatic version of the Repo Audit Agent.validate(dir)— verify pack consistency.upgrade(dir, from, to)— apply migrations between pack versions.
License
MIT
