@repospec/engine
v0.10.1
Published
The Repospec engine: UI-agnostic implementation of the protocol operations.
Maintainers
Readme
@repospec/engine
The engine: the UI-agnostic implementation of the Repospec protocol operations
defined in spec/lifecycle.md — init, bootstrap,
generate, sync, doctor, upgrade, review, and architect.
The engine accepts plain data, never prompts, and operates on injected ports
(a filesystem and, for AI-assisted operations, an LlmClient). That keeps it
embeddable in any front-end — the CLI, an editor extension, or a CI action
(ADR-0007). The CLI is just one caller.
What it provides
- Operations:
init/planInit,bootstrap/planBootstrap(+inferProjectInputandharvestProse, which seeds prose docs from a repo's existingARCHITECTURE.mdetc.),generate,sync(withcheck+ ownership guard),doctor(with code-drift detection +strict),upgrade/planUpgrade, and the AI-assistedreviewandarchitect. - AI port:
LlmClient— a minimal, injectable completion interface, soreview/architect/bootstrapAI assist are provider-agnostic and testable with a fake. - Filesystems:
NodeFileSystemandMemoryFileSystem(RepospecFileSystem). - Adapters:
Adapter,AdapterRegistry, and ten built-ins —claude,agents,copilot,cursor,windsurf,gemini,zed,cline,continue, andclaude-agents(projects each role into a native Claude Code subagent at.claude/agents/<id>.md). - Plugin runtime (gated):
runPlugins,resolvePlugins,buildApprovalLock,integrityOf— approved, integrity-pinned plugins run in a worker sandbox (ADR-0008/0009). - Ownership helpers:
wrapManaged/parseManaged/isModified(managed header + checksum, ADR-0004). buildProject,findRepoRoot,requireRepoRoot,applyPlan.
Dependencies
@repospec/protocol— schemas, types, version helpers.@repospec/templates— default content + adapter templates.
Dependency direction (ADR-0001): engine → protocol, engine → templates.
