Docs & rules

obra/laceGitHub

This is a public, read-only report. Striff reads this repository's docs, turns each sentence that makes a claim about the code into a rule, and checks the rule against the code on the default branch. How this works

maina040e95Last read Oct 11

Is this yours? Install to manage it

Once installed, Striff checks every pull request.

Documents
Rules
61
58
13
13
12
1
11
18
18
9
9
3
3
3
6
3
3
3
3
3
154 docs

obra/lace — documented rules

61 of 61 rules, printed November 6, 2026.

The sentence in your docs
registers lifecycle/progress subscriptions through JobManager.subscribe().
JobManager has a subscribe method
Holds
reads status and output for an in-memory running job via JobManager.getJob() and JobManager.getJobOutput();
JobManager has a getJob method
Holds
lists durable job records through JobManager.listJobs() with status/type/limit filters.
JobManager has a listJobs method
Holds
cancels running jobs through JobManager.cancelJob() and optionally disposes tracked per-invocation delegate workspaces through WorkspaceReaper.
JobManager has a cancelJob method
Holds
These tools require a jobManager in ToolContext;
ToolContext has jobManager
Holds
JobManager.createJob(type, options) performs the main current creation flow (packages/agent/src/jobs/job-manager.ts):
JobManager has a createJob method
Holds
DelegateTool.executeValidated() (packages/agent/src/tools/implementations/delegate.ts) resolves delegate-specific inputs before calling JobManager.createJob('delegate', ...):
2 rules from this sentence
DelegateTool depends on JobManager
Holds
DelegateTool has an executeValidated method
checks “DelegateTool.executeValidated()”
Holds
jobStreaming/JobManager.streamingMode supports 'full' | 'coalesced' | 'none';
JobManager has streamingMode
Holds
JobManager.getJobOutput(jobId) reads the full output file for the active session and returns an empty string if there is no active session or the file is missing.
JobManager has a getJobOutput method
Holds
notifications are composed and injected by packages/agent/src/jobs/job-notifications.ts and routed through JobManager.fanoutToInject().
JobManager has a fanoutToInject method
Holds
JobManager.finalizeJob() in packages/agent/src/jobs/job-manager.ts is an internal manager path.
JobManager has a finalizeJob method
Holds
workspaceReaper.dispose() routes through the container manager/shim release path, destroying the per-invocation container and removing /work.
WorkspaceReaper depends on ContainerManager
Holds
CompactionStrategy interface for extensibility
CompactionStrategy is a contract
Holds
Tool is declared abstract
checks “abstract Tool class”
Holds
assertVersion(major) throws PluginVersionError unless major equals the kernel's plugin-contract major version (KERNEL_PLUGIN_VERSION, currently 1.0.0 → major 1).
PluginApi has an assertVersion method
Holds
Extend the abstract Tool class:
Tool is declared abstract
Holds
ToolContext.persona is the authoritative session identity, stamped server-side from the session's persona.
ToolContext has persona
Holds
To invoke a tool directly (e.g. in a test), call its public execute (not the protected executeValidated): tool.execute(args: unknown, ctx: ToolContext).
2 rules from this sentence
Tool has an execute method
checks “its public execute”
Holds
Tool has executeValidated
checks “the protected executeValidated”
Holds
the only required one is signal: AbortSignal.
ToolContext has signal
Holds
Field workingDirectory string, Use session cwd — resolve relative paths against it, fall back to process.cwd()
ToolContext has a workingDirectory field
Holds
Field threadId / projectId, Use session/project identity metadata
2 rules from this sentence
ToolContext has a threadId field
Holds
ToolContext has a projectId field
Holds
Field toolTempDir string, Use per-call scratch dir (via getToolTempDir(ctx) )
ToolContext has a toolTempDir field
Holds
Field processEnv NodeJS.ProcessEnv, Use env for subprocess execution
ToolContext has a processEnv field
Holds
A PreservedEntry is { role: string; content: string | Block[]; toolCalls?: unknown[]; toolResults?: unknown[] } where Block = { type: string; [k: string]: unknown }.
4 rules from this sentence
PreservedEntry has role
Holds
PreservedEntry has content
Holds
PreservedEntry has toolCalls
Holds
PreservedEntry has toolResults
Holds
PreservedEntry is exported from @lace/agent/compaction/toolkit — import the type rather than re-declaring it.
PreservedEntry is exported
Holds
inspect reads the in-process cache (and may be synchronous);
ContainerRuntime has inspect
Holds
daemonInspect hits the daemon and returns null when the container does not exist — that null case is how ContainerManager adopts boxes after a parent restart.
ContainerRuntime has daemonInspect
Holds
Aspect Second arg, Legacy CompactionStrategy.compact() CompactionContext = { threadId, provider?, agent?, toolExecutor }, New top-level compact() CompactionContext = { sessionDir, summarizer, modelMaxContext, targetTokens, tailConfig }
CompactionContext has sessionDir
Holds
Method name is compact, not runCompaction (Important 6). The existing strategy interface (compaction/types.ts — CompactionStrategy.compact(events, ctx)) names this method compact;
CompactionStrategy has a compact method
Holds
The existing strategy interface (compaction/types.ts — CompactionStrategy.compact(events, ctx)) names this method compact;
CompactionStrategy is a contract
Holds
injectNotification() writes a context_injected durable event (<notification> wrapper, priority immediate), and optionally idle-wakes the session to run an internal turn (IdleWakeHooks: isActive / hasActiveTurn / triggerInternalTurn).
3 rules from this sentence
IdleWakeHooks has isActive
Holds
IdleWakeHooks has hasActiveTurn
Holds
IdleWakeHooks has triggerInternalTurn
Holds
RPC surface is unaffected — ent/personas/list → PersonaRegistry.listAvailablePersonas() → PersonaInfo[], which Part 0 preserves.
PersonaRegistry has a listAvailablePersonas method
Holds
Name-seam. ExecToolAdapter currently hard-sets this.name = descriptor.name with no override (exec-tool-adapter.ts).
ExecToolAdapter has name
Holds
the per-session SkillRegistry still feeds use_skill and SkillVariableProvider (the prompt skill list).
SkillVariableProvider depends on SkillRegistry
Holds
A plugin exports register(api) and (recommended) meta.
2 rules from this sentence
PluginModule has a register method
checks “A plugin exports register(api)”
Holds
PluginModule has meta
checks “and (recommended) meta”
Holds
extends Tool gives you input validation (your Zod schema is enforced before executeValidated runs) and result helpers (createResult, createError).
3 rules from this sentence
Tool has createResult
Holds
Tool has createError
Holds
Tool has executeValidated
Holds
ContainerRuntime is the heaviest contract (lifecycle + exec + inspect + adopt).
ContainerRuntime is a contract
Holds
The single registration site is ToolExecutor.registerAllAvailableTools in packages/agent/src/tools/executor.ts:283-311. The instance list lives at lines 287–303 — new BashTool(), new FileReadTool(), …, new ManageRemindersTool() — with UseSkillTool conditionally appended at 306–308 when a SkillRegistry is wired in.
ToolExecutor depends on UseSkillTool
Holds
The single registration site is ToolExecutor.registerAllAvailableTools in packages/agent/src/tools/executor.ts:283-311.
ToolExecutor has registerAllAvailableTools
Holds
All instances are then handed to this.registerTools(tools) at line 310.
ToolExecutor has a registerTools method
Holds
61 rules from 9 docs

More open-source reports

Every report →

Other public repositories whose docs Striff read and checked against their code.