@kpritam/grimoire-core
v0.1.6
Published
Grimoire core: Effect v4 services, workflows, and schemas for repo-aware documentation generation.
Maintainers
Readme
@kpritam/grimoire-core
Effect services, configuration schema, prompts, and workflow
implementations shared by @kpritam/grimoire and @kpritam/grimoire-action.
Role
GrimoireConfig/defaultConfig— YAML schema (effect/Schema) for.grimoire/config.yml(pre-v0.2.grimoire.ymlstill resolves), decoded from disk via theConfigservice.- Services —
Config,CliAgent,AgentProvider,Git,PromptEngine,SealManager,SiteGenerator,SkillInstaller(src/services/), plus routersmakeAgentRouter/makeSiteGeneratorRouterthat select live layers from config. Each service uses the Effect v4Context.Serviceclass pattern; live implementations live beside the tag (*Live.ts) or in provider / output packages. - Workflows —
cast,sync,status,init,lint,quality,publish,agentPassthrough(agent run),probeAll(agent probe) (src/workflows/). Each workflow is a plainEffectprogram that only depends on service tags. - Live composition —
GrimoireCoreLive,makeGrimoireLive,makeAgentRouter,makeSiteGeneratorRouter(src/live.ts,src/services/AgentRouter.ts,src/services/SiteGeneratorRouter.ts). - Prompts — Default section prompts in
src/prompts/default/, bundled into the package and routed byPromptEngine. - Errors —
GrimoireErrorunion insrc/errors.ts:ConfigParseError,SealCorrupted,SealMissing,SealWriteError,GitError,ProviderUnavailable,CliAgentError,RepoScanError,PromptResolveError,OutputWriteError,PublishError; useisGrimoireError()to narrow unknown values at boundaries.
Public API
Import from @kpritam/grimoire-core (see src/index.ts exports). A canonical
configuration matching defaultConfig ships as
.grimoire.example.yml in the repo
root.
Install
pnpm add @kpritam/grimoire-coreUse makeGrimoireLive with a providers map (and optionally a
siteGenerators map and configPath) to assemble the same layered
runtime the CLI uses.
