Packs
A pack is a self-contained plugin that teaches the kernel how to work in a specific domain. The kernel itself is domain-agnostic — it provides scope enforcement, policy evaluation, evidence recording, and tool dispatch. Packs provide the actual tools, policies, and evidence types for a particular workflow.
Software Delivery Pack (Pack #1)
Section titled “Software Delivery Pack (Pack #1)”LumenFlow ships with the Software Delivery Pack built in. It provides 90+ tools for software development workflows:
| Namespace | Tools | Purpose |
|---|---|---|
wu:* | 23 | Work Unit lifecycle (create, claim, prep, done, block, recover…) |
mem:* | 14 | Memory layer (checkpoint, inbox, signal, recover…) |
initiative:* | 8 | Initiative management (create, plan, status…) |
file:* | 4 | File operations with audit trail |
git:* | 4 | Git operations with audit trail |
agent:* | 4 | Agent session management |
orchestrate:* | 3 | Multi-agent orchestration |
plan:* | 4 | Plan management |
state:* | 3 | State management |
| Others | 23+ | Gates, validation, config, docs, metrics, flow analysis… |
Every one of these tools routes through the kernel’s execution pipeline — scope intersection, policy evaluation, and evidence recording happen on every call.
Pack Structure
Section titled “Pack Structure”A pack is a directory with a manifest.yaml at its root:
Directorymy-pack/ - manifest.yaml (declares tools, policies, evidence types) - constants.ts (pack id, version, shared strings) - tools/ - types.ts (shared type definitions) - tool-impl/ - my-tool.ts (runtime implementation)
- …
The manifest is the contract between a pack and the kernel. It declares:
- Tools — what the pack can do (name, entry point, permissions, required scopes)
- Policies — rules the kernel evaluates at specific lifecycle triggers
- Evidence types — kinds of audit records the pack produces
- Task types — what domain objects the pack manages (e.g.,
work-unit) - State aliases — friendly names for kernel state machine states
- Lane templates — pre-defined lane configurations
Minimal manifest
Section titled “Minimal manifest”How Packs Are Loaded
Section titled “How Packs Are Loaded”When the kernel starts, it reads the workspace spec (workspace.yaml) which lists pinned packs:
For each pack pin, the kernel:
- Resolves the pack root — in order:
workspaceRoot/packs/workspaceRoot/packages/@lumenflow/packs/(monorepo development)- bundled CLI packs (
@lumenflow/cli/packs/) for end-user installs - a git repository (
source: git) or registry cache (source: registry) when configured
- Parses the manifest — validates against the schema, checks that
idandversionmatch the pin. - Validates import boundaries — scans all source files to ensure the pack only imports from allowed dependencies (
node:*builtins,@lumenflow/kernel, and relative imports within the pack). No arbitrary npm packages allowed. - Verifies integrity — computes a SHA-256 hash of all pack files and compares it to the pinned hash. A mismatch means the pack was modified and the kernel refuses to load it.
- Registers tools — each tool declared in the manifest becomes available in the kernel’s tool registry.
- Injects policies — pack-declared policies are added to the
packlayer of the policy engine.
The Pack Ecosystem
Section titled “The Pack Ecosystem”LumenFlow is pack-first. The shipped production pack is:
| Pack | Domain | Status |
|---|---|---|
software-delivery | Software development workflows | Production (pack #1) |
Additional domains are expected to be delivered as fully implemented packs from the same manifest contract, loaded from local paths, git sources, or registries.
Tool Implementation Pattern
Section titled “Tool Implementation Pattern”Pack tools follow a standard pattern. Each tool returns a ToolOutput:
Tools can be implemented as:
- In-process handlers — TypeScript functions that run directly in the kernel process. Used for lightweight read operations.
- Subprocess handlers — executed in a sandboxed subprocess via
spawnSync. Used for write operations and anything that needs OS-level isolation.
The Software Delivery Pack uses two implementation strategies. Most tools (~80) use the runtime CLI adapter to reuse existing CLI command modules in-process. A smaller set (~10) use direct implementations with simple-git wrappers and Node builtins. See Tool Execution for the full execution architecture.
Next Steps
Section titled “Next Steps”- Kernel Runtime — How the kernel dispatches and governs tool calls
- Create a Pack — Step-by-step guide to building your own pack
- Scope Intersection — How pack tool scopes interact with other permission levels
- Policy Engine — How pack-declared policies are evaluated