wayfinder 0.4.0
wayfinder: ^0.4.0 copied to clipboard
Core Wayfinder library that validates OKF knowledge bundles, evaluates the rules of any Profile package, resolves a project's Profiles, and writes bundles a Profile governs.
0.4.0 #
-
Add model-free, live structured concept queries, scoped saved query IDs, sorting, pagination and grouped counts through
project.dart. Share the existing metadata predicate with retrieval while preserving its public import paths. No Profile-format or OKF migration. -
New
package:wayfinder/authoring.dart, the write path for a bundle a Profile governs (ADR-0019).KnowledgeWriter.preparemaps oneKnowledgeChange(CreateConcept,UpdateConcept,LinkConcepts, which appends to the concept'srelationships,DeprecateConcept, or theRegenerateIndexesrepair) onto okf's change set through okf 0.5.1's reserved-file projection, and returns aKnowledgeWritePlanwithout writing.KnowledgeWriter.commitwrites exactly that plan under okf's exclusive bundle lock.- Only the indexes whose text the selected Profile generates differently
for the bundle and the candidate are rewritten, with exactly the generated
text; other indexes keep their bytes, stale or not.
RegenerateIndexeswrites exactly whatvalidate --fixwrites. - The root log records a caller's
KnowledgeLogEntryexactly as given, several asKnowledgeLogEntriesin the order given under one date, okf's lifecycle entry (KnowledgeLog.lifecycle, the default) or nothing (KnowledgeLog.none). Entries are inserted into the log as lines in its own style, so existing entries keep their bytes. KnowledgeStamp.generatedandKnowledgeStamp.verifiedrecordgenerated: {by, at}when the write creates or changes content (the body,title,descriptionortype), and the verified stamp appends{by, at}toverified. A change that sets either key is refused.- The plan holds the
baseandcandidatevalidations, judged in memory withvalidateLoaded, thediffof each file it writes, and the candidate's Profile findings split intointroducedandpreExistingby rule id and path. It iscommittablewhen okf accepts the candidate and it introduces no error finding or error diagnostic.assessedis false when no Profile could be selected, so OKF alone judged the write. preparereads the bundle under okf's shared claim and runs the Profile assessment after releasing it, once, through aKnowledgeAssessor(KnowledgeWriter(assess:)). It receives aKnowledgeAssessmentInput, the base and candidate load results and the selection, which a host may send to an isolate it can kill; the default runsKnowledgeAssessmentInput.assesson the calling isolate.KnowledgeAssessmentInput.assessWithinis that assessment bounded: it runs on an isolate of its own, killed once it runs past its timeout (30 seconds by default) or its cancellation fires, and throwsassessment-timeout,cancelledorassessment-failed. Adoption takes the sameKnowledgeAssessor; its input (KnowledgeAssessmentInput.bundle) has nobase, soKnowledgeAssessment.baseis null for it.preparethrowsassessment-failedwhen a host assessor returns nobasefor a write.prepareandcommittake aWayfinderCancellation, checked between steps and passed to the resolver and the assessor; a cancelled commit writes nothing and leaves the plan committable.- Without a
selection,preparebinds the bundle asvalidatedoes, through the nearestwayfinder.jsontowards the filesystem root. ItsprojectRootbounds that search asWayfinderProjectConfig.bind's does, so a bundle with none within the project is judged by OKF alone. committhrowsKnowledgeWriteRefusedException(write-refused) for a plan that is not committable, andKnowledgeStaleWriteException(write-stale) when the bundle, or thewayfinder.jsonorwayfinder.lockits selection came from, changed sinceprepare, including when the diff is empty. A project file that exists but cannot be read iswrite-failed; only a path that is absent counts as absent.KnowledgeChangeExceptionreports a change that cannot be described against the bundle:bundle-missing,concept-exists,concept-not-found,change-invalid(including a concept that is not UTF-8 text),log-unwritable, orfix-not-appliedfor aRegenerateIndexeswith no fixable rule.KnowledgeWriteFailedException(write-failed) reports a bundle that cannot be locked, read or written, withpartialset only when okf's rollback failed too. A second commit of one plan throwsStateError.- A commit leaves okf's
.okf.lockat the bundle root, as okf's own writes do; ignore it in Git.
- Only the indexes whose text the selected Profile generates differently
for the bundle and the candidate are rewritten, with exactly the generated
text; other indexes keep their bytes, stale or not.
-
ProfileValidator.validatewithfixholdsOkfBundleLock.writewhile it loads the bundle again, writes and validates, whenever it has something to write; a fix with nothing to write takes no lock. A lock it cannot take, such as in a bundle the process may not write, is reported like any failed write, aswayfinder/fix-failedwith nothing written, so results are unchanged. A fix that writes leaves.okf.lockat the bundle root, which okf's loader ignores. -
path-targets-existlooks a path target up in the loaded bundle before the disk, sovalidateLoadedon a candidate sees the files the candidate adds. Verdicts for a bundle read from disk are unchanged. -
New
package:wayfinder/project.dart, moved fromwayfinder_cli's private sources so a host can embed what the command does (ADR-0018):WayfinderProject.discoverandProjectBundle;WayfinderProfileResolver, now with a requireddataDirectory, and its lock types;validateWithProfileSources, now with a requiredresolver;ProfileSkills;projectWayfinderGraph,wayfinderLinkFieldsand the AckwayfinderGraphInput;WayfinderDataDirectory.resolve; andWayfinderException, which gains a stablecodebeside its message and aWayfinderException.cancelled()constructor. -
WayfinderProject.discover(root)reads nothing aboveroot: the bundles are thoseroot's ownwayfinder.jsonapplies to or, without one, itsknowledge/directory.searchAncestors: trueis the command's search instead, the nearestwayfinder.jsonat or above the directory or the nearestknowledge/directory below the Git boundary; the CLI and MCP server pass it, so their output is unchanged. A directory that does not exist or cannot be read isbundles-missing, not aFileSystemException. -
WayfinderProjectConfig.bind, the resolver'sselectandrestoreCachedPackages, andvalidateWithProfileSourcestakeprojectRoot, which stops their search for a bundle'swayfinder.jsonat that directory: the search climbs from the bundle's parent as before but reads only directories whose real path isprojectRootor inside it, so a bundle with none there reportsconfig-missing. Without it they search towards the filesystem root as before. -
EffectiveProfile.requiredConceptFieldslists the frontmatter keys every concept must carry for the gate to pass: those an error rule'sfrontmatterschema check requires unconditionally, in rule order. For Bitwild these aretype,title,descriptionandstatus. It combinesrequiredRootProperties, which aSchemaCheck'sschemanow lists for its own rule. -
ProfileSkills.readreturns theSKILL.mdgetinstalled for a skill revision, as aProfileSkillText, from a directory whose marker holds that revision and that no symbolic link places outside the project, or null. It reads the marker andSKILL.mdthrough the real paths it confined to the project, so a link retargeted after the check does not move the read, opens each only when it is a regular file just before the open, and returns the text only when its real path still holds no link afterwards and its marker is not a link. A link or named pipe swapped in between that last check and the open stays out of its reach, since Dart cannot open a file without following a link or waiting on a pipe. It takes no lock and reads the marker again after the text, so a concurrentgetnever makes it return another revision's text. WithmaxBytesit reads at most one byte past the limit and cuts a longer file at the last UTF-8 character boundary within it, settingtruncated; aSKILL.mdthat is not UTF-8 text counts as unreadable.ProfileSkills.revisionsOflists the skill revisions of aSelectedProfile's chain. -
SelectedProfile.projectRootis the directory of thewayfinder.jsonthat bound the selection, wheregetinstalled its skills, so a host passes it toProfileSkills.readinstead of deriving it fromconfig. It is null for a selection built by hand that names none, and the constructor refuses one that is not the absolute directory ofconfig. -
ProfileSkills.writeandProfileSkills.prunework under the real path of each skill root thatescapingconfined to the project, so a symbolic link changed after that check does not move a write or a delete.writerefuses to replace a directory without the marker for its id: it checks every root before writing any, and each again just before moving it, where a directory that appeared meanwhile stops it after the roots before it were replaced. A marker that is not a regular file when checked or is larger than 64 KiB marks no revision and is never read whole;writerefuses, andgetfails before writing anything for, a revision whose release would make its marker larger. -
The resolver splits
getintoplan, which may fetch into the cache but writes nothing in the project, andapply, which writes it and throwsresolution-stalewhen the configuration, lock or cache changed since.resolveruns both.selectreads the lock and the package files a plan kept underprofiles/packages/, and never runs Git. A cache Wayfinder 0.2 wrote has no package files:restoreCachedPackagescopies them out of the cached mirrors withgit show, never fetching, andvalidateWithProfileSourcesdoes so whenselectfinds no Profile, so such a cache validates as before.WayfinderProfileResolutionExceptioncarries itsDiagnosticCodeasdiagnosticand that code's value ascode. -
GitRunnerreturnsGitResult, whosestdoutholds bytes, and takes aWayfinderCancellationin place ofbinary. The defaultrunGitdrops theGIT_*variables other thanGIT_CONFIG_GLOBAL,GIT_CONFIG_SYSTEM,GIT_CONFIG_NOSYSTEM,GIT_SSH_COMMAND,GIT_SSHandGIT_SSH_VARIANT; never prompts; runs the SSH command Git would choose, includingcore.sshCommand, with-o BatchMode=yeswhen it is OpenSSH; skips Git LFS downloads; disables hooks, the filesystem monitor and theext::transport; and kills a command with its children once it writes nothing fortimeout(five minutes) or on cancellation (git-timeout,cancelled). The resolver clones with--progress, so a long clone keeps running.wayfinderGitOptionsandwayfinderGitEnvironmentlet a host's runner apply the same, andthrowIfCancelledchecks a cancellation. -
WayfinderFileLockis an exclusive lock that holds across processes and across the isolates of one process:flock(2)throughdart:ffion POSIX,RandomAccessFile.lockon Windows. A plan holdsprofiles/<sha256(location)>.lockwhile it clones, refreshes or reads a source's mirror, waiting up to 120 seconds;applyandresolveholdprojects/<sha256(root)>.get.lockand throwresolution-busywhile another holder has it. The project lock records its root; on Windows, read that note only while the lock is free. -
ProfileValidator.validateLoadedvalidates anOkfBundleLoadResultwithout reading its bundle files again; onlypath-targets-existstill checks, on disk relative to the bundle root, a link target okf's graph cannot resolve inside the bundle.ProfileProjection.generatedFilesreturns the filesvalidate --fixwrites.validatedelegates to both; its results are unchanged. -
wayfinderdepends oncryptoandffi. -
WayfinderProjectConfig.toJsonandencode,WayfinderConfigEncoder, andWayfinderConfigEditor, which edits awayfinder.jsondocument's Profile sources, bundles, vocabulary and actors and keeps every field it does not model.WayfinderVocabularynames the vocabulary list an edit changes, andWayfinderProfileBinding.explicitBundlePathwrites a bundle path in the./form. The definitions, actors, sources, bindings andProjectVocabularygaintoJson. -
ProfileResolutionPlan.fetcheslists each clone or refresh a plan made, asProfileFetchvalues, and its JSON gainsfetches.planandresolvetake aProfileFetchPolicy,allowFetch, that decides each fetch before it runs, including one of a chain parent's source the configuration never names. A refused fetch throwsProfileFetchRequiredException(fetch-required), which carries theProfileFetch. -
ProfileSkills.markerTextis the text of a skill directory's.wayfinder-profilemarker. -
New
package:wayfinder/adoption.dart(ADR-0020).KnowledgeAdoption.planreads a project and resolves a Profile, writing nothing in the project. It lists every file it would write with its text or digest, every Git fetch, the Profile's source, release and chain, the skills it installs, the conflicts that stop it, and the gate the adopted bundle will have. A request without a ref pins the source's current default branch as its commit. A later plan refreshes the mirror and follows a default branch that has moved. The request'sallowFetchdecides each fetch, and an offline request reads the Profile cache as it is; either way a fetch that may not run throwsfetch-required. Planning wraps an unreadable project asadoption-failed. -
KnowledgeAdoption.applywrites the seeded bundle (index.md,log.mdand the seed concepts a host passes, with generated indexes),wayfinder.json,wayfinder.lockand the Profile skills through the resolver, a<bundle>/.okf.lockline in.gitignoreunless it is listed there, and an optional host step, reporting each step. It refuses a plan with conflicts (adoption-conflict), one another Profile cache planned (adoption-invalid), or one whose inputs changed (adoption-stale,resolution-stale) before writing. It holds the project'sgetlock from that check on (resolution-busy), checks its cancellation as each step starts, and undoes the earlier steps when one fails, reporting a step whose undo failed asundo-failed. A marked skill directory it does not install is a conflict (skill-foreign), so adoption deletes nothing. Its closing validation binds the bundle with the plan'sprojectRoot, so nowayfinder.jsonabove the project applies. -
Adoption never writes
AGENTS.md,CLAUDE.md,.mcp.jsonor hooks; the plan returns the### Knowledge bundleblock as text.KnowledgeSeedsholds the generic seed that the adopt-knowledge-bundle skill'sSEEDING.mdshows. -
What a host composing adoption needs (ADR-0025):
KnowledgeAdoption(assess:)takes aKnowledgeAssessor, the seamKnowledgeWriterhas, so a host can bound or move the Profile assessment. Planning judges the bundle as applying leaves it through it, and the validate step ofapplyjudges the adopted bundle through it; the default stays on the calling isolate. An assessment that fails stops planning, and fails only the validate step ofapply, which undoes nothing.AdoptionRequest.profileis optional: the binding takes the id the package at the source declares. A request that names another throwsAdoptionProfileConflictException(adoption-profile-conflict), with therequestedanddeclaredids, before anything is written. Planning still fetches the source once.AdoptionRequest.hostInputsnames project files the host read or its own step writes, such asAGENTS.md. Planning digests them, andapplyrefuses withadoption-stalewhen one changed, before writing.KnowledgeAdoptionException.changedPathsnames the paths that changed. A..segment in the path as given isadoption-invalid, before any symlink is followed. Each other path counts with what it resolves to through symbolic links, so an edit through a linkedCLAUDE.mdcounts; one that resolves outside the project or into.gitisadoption-invalid.apply(onStep:)hears each step as it happens: the newAdoptionStepOutcome.started, then its end, and after a failure the undo of each earlier step, latest first. What it throws for a step's start or end fails that step, except for the host step'sdone, after the host's writes, which adoption cannot undo. The validate step now checks the cancellation too.- A failed
AdoptionStepReportcarries the failure'scode.
-
BREAKING: Remove the
okfPackageVersionexport; importokfVersionorokfIndexGeneratorRevisionfrompackage:okf/okf.dart. -
Depend on
okf^0.5.1instead of exactly 0.5.0. Thematches-generatedversionparam names okf's index generator revision,okfIndexGeneratorRevision, instead of the okf release; every okf 0.5 release keeps revision 0.5.0.engine.okfand the SARIFokftool extension report okf's ownokfVersion, 0.5.1 or a later okf 0.5 release, soengine.okfis no longer the value a package pins asversion. okf 0.5.1 writes the same indexes as 0.5.0: a package that setsversionto0.5.0, Bitwild 2026.3 included, loads and yields the same findings, every verdict is unchanged, and package format stays 2. -
A
matches-generatedversionthat names another generator revision fails to load with a message that names the revision this wayfinder runs. -
WayfinderProfileResolver.pruneProjectLocksdeletes thegetlock file of each project whose root no longer exists, such as a removed worktree, once nogetused it for a period (30 days by default), and returns the deleted files. It reads a lock's note only while the lock is free and leaves a held one.WayfinderKnowledgeStore.prunecalls it. -
WayfinderFileLock.tryExclusivetries a refused lock again for up to 100 ms before it returns null, so anisHeldprobe, which holds a shared lock for an instant, never reads as a holder.tryExclusiveandexclusivereturn a lock only while the file's path still names the file they locked (the same device and inode on POSIX), and otherwise open the path again, so a cleanup that deletes a lock file while holding it never leaves two holders on different files. -
runGittakesstart, aGitProcessStarter(startGitProcessby default), so a host whose process layer starts every process runs the hardened Git through it: the starter receives the hardened arguments and the whole environment, andGitProcess.killstops the command's tree.maxOutputBytes(wayfinderGitMaxOutputBytes, 64 MiB) bounds stdout: a command that writes more is stopped withgit-output-too-largeinstead of returning a cut blob. Stderr keeps its last 64 KiB. Once a command exits, its stdout is read to its end and its stderr until it closes or a second passes without any, so a helper that holds stderr open, such as an SSH connection master, no longer holds the command. Both must end within ten seconds of the exit, or the command'stimeoutwhen shorter: a stdout still open then fails withgit-output-incomplete, never returning part of it, a stderr still being written is cut, and either wayGitProcess.killis asked to stop the helpers;cancelstill stops the read. A stopped command that does not exit within five seconds still fails. -
The rules a host's own runner would copy are public:
gitSubcommand, which also skips the values of--git-dir,--work-tree,--namespace,--config-env,--attr-sourceand--super-prefix;gitMayReachRemoteoverwayfinderGitRemoteSubcommands, which addsarchive,fetch-pack,send-pack,maintenanceandlfs;wayfinderSshCommand, the SSH command Git would choose (GIT_SSH_COMMAND,core.sshCommand,GIT_SSH,ssh) in batch mode; andwayfinderConfiguredSshCommand, thecore.sshCommandlookup before a remote command. -
Reading a Profile package is bounded (ADR-0015, ADR-0018, guide §9).
ProfilePackage.parseWithinparses on an isolate of its own and kills it once it runs past its timeout (ProfilePackage.parseTimeout, ten seconds), throwing aProfilePackageExceptionwithtimedOutthat names the rule whosetestswere running. The resolver reads every package this way, bounded by itspackageTimeout, and reports one that runs past it as the newwayfinder/profile-timeoutdiagnostic (DiagnosticCode.profileTimeout), so a package whose tests run a pattern that backtracks without end failsgetand selection instead of holding them. A parse that stops on another error, such as a stack overflow in a rule's tests, throws aProfilePackageExceptionnaming it, reported asprofile-invalid, rather than parsing again unbounded on the caller. Every read runs the tests; no verdict is cached. Bitwild parses in about five milliseconds, so no package reads differently and package format stays 2. -
WayfinderProfileResolver.statusreports, offline and without Git, aProfileResolutionStatuswith oneProfileBindingStatusper binding: a stableProfileBindingState(resolved,lock-missing,lock-stale,cache-missing,package-invalid,package-unsupported,package-timeoutorcomposition-failed), the locked chain, the chain members missing from the cache, the diagnosticselectreports and itsprofile-skill-stalenotes.select's diagnostics are unchanged. -
plan(lockedOnly: true)resolves exactly the commitswayfinder.lockpins: it fetches a source only when its mirror is missing or lacks the locked commit, never re-resolves a ref (the lock's commits stay as written), and keeps the lock's bytes. It throwsProfileLockChangeRequiredException(lock-change-required) before any Git command when the lock as written would change, and once read for a package that disagrees with the lock.ProfileResolutionPlan.lockedOnlyreports it, and the plan's JSON addslocked_only. -
WayfinderProfileSource.locationOfis the location the resolver gives a source, asProfileFetch.locationreports it. AProfileFetchPolicyis all per-source consent needs: every Git command a resolution runs that can reach the network follows the policy's yes for that location. -
A Profile skill marker that cannot be read counts as no marker: validation warns
profile-skill-staleinstead of failing selection asprofile-unresolved,statusreports the bindingresolvedwith that warning rather thancache-missing, andgetleaves such a directory alone as it does any unmarked one. -
plan(skills: false)leaves Profile skills alone, so a host can fill the Profile cache without touching.claude/skillsor.agents/skills: the plan reads no skill file from a mirror and refuses no skill directory, and its apply writes and deletes none.ProfileResolutionPlan.includesSkillsreports it, andProfileResolutionPlan.skillDirectorieslists every directory a locked package's skill installs into with its state, including the unmarked and outside ones a plan with skills refuses. Such a plan'sskillsare allwritten: false, which says only that apply leaves them alone. The plan's JSON addsincludes_skillsandskill_directories. -
ProfileSkills.inspectreports, for one skill revision and without writing, each skill directory as aProfileSkillDirectory: its root, path, the revision its marker records and aProfileSkillDirectoryState(current,missing,stale,unmarkedoroutside).staleis derived from it and reports the same paths. -
getrefuses a file or symbolic link where a Profile skill directory goes, as it refuses a directory without the Profile's marker, before writing anything; it used to write the lock and fail while moving the skill into place.ProfileSkills.unownedandProfileSkills.writecount such an entry as unowned.ProfileSkills.writerefuses a skill root that resolves outside the project with theProfileSkillDirectoriesExceptiongetthrows, rather than aFileSystemException, so a root a link moves outside afterget's check fails the same way. -
statusreports as data, per binding:copies, oneProfileLocalCopyper chain member saying whether its source's mirror and its package file are in the Profile cache, with the source's location, so a consent gate names only the sources a locked-only plan contacts;skillDirectories, the states of a resolved chain's skill directories behind theprofile-skill-stalenotes; andlockChange, aProfileLockChangefor a lock that is missing or stale.ProfileResolutionStatus.lockChangeis what a locked-only plan would refuse before running Git, including a lock entry no chain reaches, all from one read of the lock. The JSON addscopies,lock_changeandskill_directories. -
ProfileLockChangeRequiredExceptioncarries aProfileLockChange(change): itsProfileLockChangeKind(lock-missing,configuration-changed,chain-missing,source-changed,package-changedorpackages-unreached), the binding it concerns, the lock entries that would change and the reason its message ends with. The constructor takes the change;stateandprofilederive from it, andprofileis null for a missing lock or a changed configuration, which concern every binding. -
The project library's messages name no command (ADR-0018), and the
wayfindercommand keeps printing what to run. A diagnostic'sEngineDiagnostic.remedy, aDiagnosticRemedy, says when resolving the Profiles again fixes it (resolve-profiles, orresolve-profiles-from-mirrorwhen the cached mirror needs no fetch), andWayfinderProfileResolutionException.remedywhen selecting new revisions does (upgrade-profiles). Results, text and SARIF do not report the remedy;ProfileValidationResult.withDiagnosticMessagesrewords a result's diagnostics for a host to render.get's refusal of a skill directory is aProfileSkillDirectoriesException, with the refuseddirectoriesand theiroutsideRoots, andresolution-busyaProfileResolutionBusyException, naming the busyprojectRootorsource. These messages lose their closing advice to run a command:profile-unresolvedandprofile-skill-stalediagnostics,resolution-stale, a locked commit no refresh finds, andProfileSkills.escapingProblem. A stale lock's reason readsthe configuration changed after the lock was written, a busy projectAnother Profile resolution is changing <root>, and a lock change found once a package is read names that package. A diagnostic for a missing or stale lock carries itsProfileLockChangeKind(EngineDiagnostic.lockChange), whichpackage:wayfinder/wayfinder.dartnow declares andpackage:wayfinder/project.dartstill exports, so a host words the cause itself, as the command keepsthe configuration changed after wayfinder get. Adoption'sbundle-okf-invalidandskill-foreignconflicts no longer nameokf validateorwayfinder get. -
WayfinderProfileResolver.relock(project, edit:)applies an edit ofwayfinder.json, such as registering an actor, and writeswayfinder.lockfor the result under one hold of the project'sgetlock (ADR-0024). It keeps exactly the commits the lock pins, runs no Git and writes no skill. Before writing anything it throwslock-change-required(ProfileLockChangeRequiredException.relock, with itsProfileLockChange) when, after the edit, the lock does not pin exactly each binding's chain at its source, and the resolution failure selection would report, such as a package missing from the cache or a chain that no longer composes. It writes the lock only when its configuration hash changes;ProfileRelockResultsays what it wrote. A file it cannot read or replace throwsProfileRelockFailedException(relock-failed), not a missing lock. When a write fails, a file it already wrote gets its original bytes back where that is possible, and the exception'schangednames any file that kept the new bytes. Aget, an apply, an adoption and another relock exclude it (resolution-busy). -
WayfinderConfigEditor.encode(minimal: true)keeps the text the editor parsed and rewrites only the members the edits changed, so registering an actor changes only those bytes, at the file's own indentation and line endings. It writes an object or list whole where an edit cannot be spliced, and the whole file with the full encoder when the spliced text does not parse back to the edited document.encode()is unchanged. -
changesConceptContent(before, after)is the rule that decides whether a write recordsgenerated: the body,title,descriptionortypechanges.UpdateConcept.changesContent(current)applies it to one update, andKnowledgeWritePlan.changesContentreports whatpreparedecided.KnowledgeContentLogrecords the log it holds only for a write that changes content. -
KnowledgeWritePlan.introducedOkfandpreExistingOkfsplit the candidate's OKF findings against the base's by finding id and location path, asintroducedandpreExistingsplit Profile findings;okfstays the candidate's whole OKF result, and the OKF gate is still the whole candidate. -
KnowledgeWritePlan.projectFiles, aKnowledgeProjectFiles, are the project files the plan's selection came from, with the SHA-256 of their bytes, whichcommitchecks under okf's exclusive lock:wayfinder.jsonandwayfinder.lockalso when no Profile was selected, with each closerwayfinder.jsonpath binding looked at first, absent; and when no configuration binds the bundle, eachwayfinder.jsonpath binding looked at, absent.preparetakes theprojectFilesa host captured with its own selection (KnowledgeProjectFiles.forBundle,read, or digests it computed, whose paths are made absolute when it is built), andKnowledgeStaleWriteException.projectFilesnames the files that changed. A plan is now refused aswrite-stalewhen its configuration or lock changes, or a configuration appears that would bind its bundle, before it commits, also when it was judged without a Profile. The check is not atomic withrelockorget, which hold the project's lock rather than the bundle's.
0.2.0 #
wayfinderdepends onack, which replaces the engine's own JSON Schema evaluator. Ack evaluates every rule schema. The engine still admits only its keyword subset, checks a schema's property names against its subject's facts, and words every message.SchemaCheck.schemais the parsed rule schema;SchemaCheck.defs,slotsandcompileare gone. A rule schema now follows 2020-12 where the old evaluator did not: an emptyenummatches nothing instead of being refused; a$refbelow a$defsentry, a$idor$schemabelow the root and a$schemathat does not name 2020-12 are unsupported; a malformed annotation (a non-stringtitle,descriptionor$comment, non-listexamples, a non-booleandeprecated), a duplicaterequiredortypeentry and an emptytypelist are refused; and Ack words these refusals and a nonproductive$refcycle.- Ack also checks
wayfinder.jsonand each package against the published schemas, and the engine words the first failure as before, with three changes: a rootnullis reported as "must not be null"; with several violations, the first is the first in Ack's keyword order rather than document order; and a number too large for a double is reported as "must contain only finite numbers".schemaFailureWhereis gone; it was never meant to be public. - A non-finite frontmatter number (YAML
.inf,.nan) reads as the string factInfinityorNaN, as other non-JSON scalars already do, so a rule schema only ever sees JSON. - A package may name its agent skill directory in
skill(ProfilePackage.skill), relative to the package. A Profile id has at most 64 characters (ProfileId.maxLength,maxLengthin both schemas), the Agent Skills name limit, because the id names the installed skill. The newwayfinder/profile-skill-stalewarning reports a Profile skill whose installed copy is not the locked revision, carried bySelectedProfile.notes. - A package names its own parent in
extends:{"path"}is the package at that path in the same repository at the same commit, and{"git", "ref", "path"}resolves its own revision (PackageParent,SameRevision,OtherRevision).wayfinder.jsonlosesextends, andapplies_toneeds at least one path.ProfileValidator.validatetakes aProfileSelection, eitherSelectedProfileorUnselectedProfile, instead of reading the configuration itself;WayfinderProjectConfig.bindfinds a bundle's binding or throwsBundleBindingExceptionwith its one diagnostic.ProfileSourceResolution,WayfinderProjectConfig.read,resolveandWayfinderResolvedConfigare gone. Whenever a Profile was selected, including underBLOCKED BY OKF, the JSON result names it asprofile.idandprofile.releaseand its chain asprofile.chain({id, release, commit}, root first). OnlyNOT ASSESSEDomits them. Text printsProfile <id> <release>: <state>, and SARIF gains theprofile_idrun property. - A Profile is one package file,
wayfinder-profile.jsonin package format 2, read byProfilePackage.parsefor every Profile alike. The manifest and rule catalog are merged (standard_typesistypes,frontmatter_keysis a list of definitions, the rule shape moves in, the per-rulerefis gone),wayfinder-rules.schema.jsonfolds intowayfinder-profile.schema.json, and the engine embeds no Profile. Bitwild is the package atprofiles/bitwild/with idbitwild-profile, so its findings arebitwild-profile/*(formerlyconcepta-profile/*), and it is fetched like any Profile; no chain has to reach it. A package id is the finding namespace, in kebab-case.EffectiveProfile.composemerges a chain and the project additions, and a name collision, a repeated frontmatter key or a tag equal to another vocabulary value is thewayfinder/profile-compositiondiagnostic (a tag collision wasconfig-invalid). A malformed package iswayfinder/profile-invalid; a package with anotherformat, an OKF release this okf cannot read or an unknown builtin iswayfinder/profile-unsupported. Findings and summary entries carryhelp_uri, the packagedocsURI with the rule id as its fragment, instead ofrule; SARIF rule descriptors carryhelpUriand loseproperties.ref. Builtins are engine capabilities with params:files-present(paths),path-targets-exist(fields) andmatches-generated(generator,version,keep,extra), and the generator declares the package'simplements.release. The JSON result gainsengine.okfand SARIFtool.extensionsnames the okf package the engine generates with. New root factshas_conceptsandindex_links, and the Bitwild ruleroot-index-lists-log. The generator istool/generate_published_schemas.dart, writingpublished_schemas.g.dart. - The engine selects a Profile only through
wayfinder.json. The 2026.2 dispatch through an in-bundleprofile.mddeclaration is gone, with itstypes.mdandactors.mdregistry readers and its index projection. A bundle with nowayfinder.jsonabove it isNOT ASSESSEDwithwayfinder/config-missingand gateINCOMPLETE, whatever its root files say, and--fixwrites nothing there. Aprofile.mdno longer exempts a bundle fromwayfinder/config-invalidorwayfinder/bundle-unbound. The 19 builtins frozen for 2026.2, the builtins'installedOnlyInrestriction,tag-literal-duplication(dead since 2026.3 checks tag collisions while reading the binding), and the 2026.2-onlyreservedparam ofroot-structure-filesare deleted, as areLegacyRegistries,EffectiveProfile.legacyDispatch,Vocabulary.standardTypes,legacyProfileRelease, andlegacyStandardTypes, and theyamldependency is dropped. A 2026.2 bundle keeps validating on wayfinder 0.1.x, or migrates to awayfinder.jsonbinding. - The engine reports on its own run as
EngineDiagnostics, a closed set ofwayfinder/*codes with a level, instead of dressing them as Profile findings. Release dispatch problems (DispatchRuleis gone), thelink-graph-unavailableandconfigured-type-extensioncatalog rules and their builtins, and--fixfailure or refusal (ProfileFixis gone) become diagnostics.ProfileValidationResultholds a sealedProfileAssessment(Assessed,BlockedByOkf,NotAssessed) and derivesgate:FAILwhen OKF fails or a finding is an error, elseINCOMPLETEwhen a diagnostic is an error, elsePASS, exiting 0, 1 or 2. JSON gainsdiagnosticsandgateand losesjudgment_rulesandautomated_gate;fixis{written}. Profile stateUNSUPPORTEDbecomesNOT ASSESSED. SARIF reports diagnostics as invocation notifications withdriver.notificationsdescriptors, andexecutionSuccessfulis false only for an error diagnostic.internalErrorJsonandinternalErrorSarifdescribe a run that stopped. A link graph that cannot be built now makes the gateINCOMPLETErather thanFAIL, and skips every rule that reads a link fact: by name, through a$refapplied to the subject, or through a keyword that reads the whole key set (propertyNames,additionalProperties,minProperties,enum,const).ProfileValidatortakes abuildGraphfunction so a test can force that path. index-currentandvalidate --fixcompare an index with CRLF line endings, as a Windows checkout writes it, equal to the generated LF text, so neither reports nor rewrites it.validate --fixreplaces each generated index atomically, refuses a symbolic link at any path segment, and reports a failed write with the files already written. SARIF locations inside the working directory are relative to a recordedWORKINGDIRbase, and summary results carry levelnone. A failed fix fails the SARIF invocation through itswayfinder/fix-failednotification, and the run'sfixproperty lists the files written before it.ProfileFindingtakes aFindingDescriptor, which only an error or advisory descriptor can become, so a note rule has no path to a finding.- A rule schema names a composed vocabulary as
{"$ref": "#/$defs/<slot>"}, such as#/$defs/profile.types. The engine supplies those entries, so a package or rule$defsentry may not use a slot id. Thex-slotkeyword is gone, and anyx-keyword now makes a package unsupported rather than being ignored, so every rule schema is plain JSON Schema. ProfilePackage.parserejects more at load: a rule whose own examples disagree with its schema;eachover a fact that is not a list;failing_fieldthat is not an element field; apropertiesorrequiredname at the subject level, inline or through a$refapplied to the same instance, that no fact or element field of a closed subject carries; params for a builtin that declares none; and a message placeholder the builtin does not fill.failingExamplesis gone; load runs the examples.- Bitwild 2026.3
relationship-shapefails arelationshipsvalue that is null, and an entry whoseresourceokf resolves asinvalidor as a scopedescriptor. The rule moves to theconceptsubject: eachrelationshipselement carries the authoredentrywith theresolutionbeside it, and a non-list value stays the value itself.okfFieldEdgesresolves targets as source resources, so prose resolves asdescriptorrather thanunresolved. The engine tests a non-listeachfact as one{"value": ...}instance instead of failing it outright, so the rule's schema decides. - Bitwild 2026.3 reports an undeclared relationship name as the new
used-relationship-declared(vocabulary, error), likeused-type-registeredandused-actor-registered, instead ofrelationship-shape, which now checks thatrelationshipis a nonempty string, not that it is declared. The new rule tests a name only once the entry is a mapping with nonempty text there, so one defect never reports under both. {failing}and{fact}placeholders render a non-string value as compact JSON instead of Dart's{key: value}text, so a failing relationships entry reads as it was authored. Strings are unchanged.- A failure while resolving relationship targets no longer drops the
relationshipsandinboundfacts silently. okf's graph and the relationship edges resolve as one link layer; when it fails, no link fact exists for a link rule to pass on, and the run reports it.BundleFacts.projecttakes abuildGraphfunction so a test can force that path. - Export
OkfLinkField,OkfFieldEdgeandokfFieldEdges, the typed link-field model and resolutionwayfinder_embeddingsand the CLI graph shared with the engine, plusrelationshipsLinkFieldfor the Profile'srelationshipskey. The engine's relationship facts resolve through the same function. - Bitwild 2026.3 reports what it permits as summary entries instead of
advisories. Rules take a third severity,
note, whose results fillProfileValidationResult.summary(ProfileSummaryEntry), JSONprofile.summary, a textSummary:block and SARIF results of kindinformationalwith levelnone, and never affect a state or the exit code.internal-link-unresolvedandrelationship-unresolvedbecome notes.evaluatereturns findings and summary entries apart. A declared tag that equals a type, status, trust tier or relationship name failsWayfinderProjectConfig.parseand binding composition, and Bitwild 2026.3 dropstag-literal-duplication. - Bitwild 2026.3 types relationships in the
relationshipsfrontmatter key instead of a# Relationshipsbody section. Bitwild 2026.3 declares the key in its newfrontmatter_keys, renamesfrontmatter-fields-okftofrontmatter-fields-declared, addsrelationship-shape(error) and therelationship-bundle-relativeandrelationship-unresolvedadvisories, and dropsrelationships-shapeandrelationship-label-extension.tag-literal-duplicationcompares tags with the declared relationship names. Relationship names are vocabulary: Bitwild declares eleven andWayfinderProfileBinding.relationshipsadds project names. A package declaring an OKF key fails to load. - Bitwild 2026.3 indexes are okf's generated output:
index-currentreplacesindex-semantic-projectionanddirectory-index-presentin Bitwild 2026.3 and reports each generated index that is missing or differs.ProfileValidator.validate(fix: true)writes those indexes first and reports what it wrote asProfileValidationResult.fixed. It also reports a leftoverindex.mdthe generator no longer writes, such as one in araw/tier, so the parent index stops linking to it. Conformance now depends on okf's generator output; the configured-fixture goldens fail if an okf release changes it, which is the signal to update the guide's pin. - Add direct-source project bindings in
wayfinder.json, with strict type, tag, actor, and path checks. Version 1 accepts onlysource+applies_to; the earlier unpublishedbundles/implementsdraft is not a compatibility form. Bitwild's twelve types include OKF's Attested Computation. - Inspect OKF independently before Profile selection. Bitwild's
okf-release-bindingchecks the rootokf_version. - Report a configured project type at the configuration path as supplied, or
wayfinder.jsonwhen discovered, instead of the file's absolute path. - Stop reporting nested
profile.md,types.md, oractors.mdconcepts. Bitwild forbids only the legacy root registries. - Bitwild 2026.3
log-entry-lead-wordno longer fails a root log without entries. The rule requires a lead word on every entry, not that entries exist. okf'smissing-log-dateandempty-log-dateerrors still reject such a log before Profile validation runs.
0.1.0 #
- Validate against Concepta Profile 2026.2, which adopts the OKF 0.2 revision
where every timestamp is an ISO 8601 datetime with an explicit UTC offset, and
pins the specification to its canonical
open-knowledge-formatrepository atad30107. A bundle still declaringconcepta_profile: "2026.1"now reports an unsupported release rather than a conformance verdict; update the declaration and, where timestamps are date-only, runokf format --migrate-timestamps. - Depend on
okf^0.5.0. A date-only timestamp is reported through okf's non-blockingokf/timestamp-without-offsetadvisory, so a bundle conformant under 2026.1 stays conformant once its declaration is updated. - Raise the Dart floor from 3.6.0 to 3.11.0, matching every Concepta package. A consumer on an older SDK no longer resolves this package and must upgrade Dart to take 0.1.0.
0.0.1 #
Core library replaces okf_profile; import package:wayfinder/wayfinder.dart. Validation contracts remain unchanged. The command and MCP server now live in wayfinder_cli.
Changelog #
0.2.1-dev.0 #
- Expose the existing validator and result contracts for Wayfinder without changing
okfpcommands, validation semantics or exit codes.
Release history of the okf_profile Dart package (the okfp toolchain).
This is package semver; profile releases are recorded in profile/, not here.
0.2.0 #
- Migrate to okf 0.2.0 and adopt its finding contract as the wire format
(ADR-0008): the
okf.reportJSON object is now okf's own projection — a canonically orderedfindingsarray of{id, severity, message, location}objects with namespaced kebab-case IDs — and the separateokf.load_issueschannel is retired, because load failures are error-severity findings in the same report. - Text output reports the OKF component as
N error(s), N advisory(ies); thewarningtier no longer exists upstream. ProfileValidatorvalidates through okf's single report-composition seam (OkfBundleLoadResult.validate()) and no longer takes an okf validator.- Profile findings speak the same finding grammar (ADR-0008): each JSON
finding is the okf projection —
{id, severity, message, location}— plus theprofile_releaseandrulereferences guide §4.2 requires, and findings sort in okf's canonical report order (path, line, column, id, severity, message) instead of emission order. - Add the profile rule descriptor registry (id, severity, normative rule
reference), mirroring okf's
okfSpecRuleDescriptors. Every finding is built from its rule's descriptor, so id, severity, and rule reference cannot drift from the registry — a call site names only the rule, the observation, and its path — and a corpus test holds every emitted finding to a registered rule. - The automated gate's exit codes are okf's
OkfExitCodecontract:success/findings/usagefor PASS/FAIL/UNSUPPORTED (values unchanged). - Index and log parsing go through okf's
OkfIndexDocument/OkfLogDocumententry format instead of a hand-rolled markdown-AST parallel; ADR-0007's percent-decoded target comparison is unchanged on top of it. okf 0.2.0's angle-bracket destination form means a raw)no longer forces the percent-encoded spelling; the authoring skill teaches both. The §9 expected projection stays profile-owned — okf's generic index generator synthesizes directory descriptions the Concepta projection deliberately leaves empty.
0.1.1 #
- Enforce the Profile 2026.1
raw/tier amendment (ADR-0006): non-index markdown under araw/directory inreferences/fails deterministically asconcepta-profile/raw-directory-markdown, and araw/directory sitting directly underreferences/fails asconcepta-profile/raw-directory-placement— the tier is per source directory, andreferences/itself is not one.
0.1.0 #
- Bootstrap the
okf_profilepackage and theokfpcommand-line interface, as a pub workspace member atpackages/wayfinder/. - Ship the closed
validate <bundle> [--output text|json]automated gate for the Concepta Profile, backed by the independent OKF 0.2 result. - Keep deterministic Profile findings, contextual judgment, and automated-gate states separate in stable text and JSON contracts.