KnowledgeAdoption class final
Adopts a Profile in a project: binds it in wayfinder.json, locks and
installs it through resolver, seeds the bundle, and adds the
.okf.lock line to .gitignore. plan writes nothing in the project;
apply writes exactly what the plan lists, or nothing.
It never writes AGENTS.md, CLAUDE.md, .mcp.json or Git hooks: the
plan returns the agent-instruction block as text, and registering an MCP
server or hooks is the host's choice. Run it on the isolate that does the
process's okf bundle I/O (ADR-0018); only the Profile assessment may run
elsewhere, through a KnowledgeAssessor.
Constructors
- KnowledgeAdoption({required WayfinderProfileResolver resolver, KnowledgeAssessor assess = assessOnCallingIsolate, DateTime clock() = DateTime.now})
-
resolverresolves, locks and installs the Profile;assessjudges the bundle against it, by default on the calling isolate;clockdates the first log entry.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- resolver → WayfinderProfileResolver
-
Resolves the Profile and writes the lock and skills. Applying holds
its
getlock of the project, so nogetchanges the project meanwhile.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
apply(
KnowledgeAdoptionPlan plan, {WayfinderCancellation? cancel, Future< void> hostStep()?, void onStep(AdoptionStepReport report)?}) → Future<KnowledgeAdoptionResult> -
Writes
plan, one AdoptionStep at a time, then validates the bundle. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
plan(
AdoptionRequest request, {WayfinderCancellation? cancel}) → Future< KnowledgeAdoptionPlan> -
Reads the project, resolves the requested Profile, and returns what
apply would write. Writes nothing in the project. Resolving may
clone or refresh Profile sources in the Profile cache, each as
AdoptionRequest.allowFetch allows; an offline request reads the
cache as it is. A fetch it may not make throws
ProfileFetchRequiredException(fetch-required) naming it. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited