feat: add the concept write verbs to okf mcp - #28
Merged
Conversation
This was referenced Aug 18, 2026
chrishiguto
force-pushed
the
feature/12-mcp-concept-writes
branch
from
August 19, 2026 14:30
3cec31a to
db2e751
Compare
chrishiguto
force-pushed
the
feature/12-mcp-concept-writes
branch
from
August 19, 2026 14:39
db2e751 to
6cffb51
Compare
chrishiguto
commented
Aug 19, 2026
Contributor
Author
There was a problem hiding this comment.
RESOLVED — MCP writes use canonical apply
The MCP adapter now translates arguments into typed changes and delegates to the canonical serialized prepare/commit boundary through 0df28ac. It has no injected validator or strict write policy, commits advisory-only candidates, reports Spec refusals, and keeps malformed input in the tool-error tier.
Protocol and concurrency coverage pass with all four CI checks. This review no longer blocks the PR.
leoafarias
force-pushed
the
feature/12-mcp-concept-writes
branch
from
August 21, 2026 17:30
0df28ac to
3b1d412
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Raw concept edits can bypass Spec preparation, reserved-path safety, atomic index/log maintenance, and preservation of unmanaged content.
What
Adds
create-conceptandupdate-conceptas thin adapters over the prepared-change module. Arguments become a change set, andOkfBundleChangeApplier.applyserializes preparation and the exact prepared commit under the shared bundle lock.Malformed input remains a report-free tool error. A Spec-invalid candidate returns the stable Spec report and changes no file. Advisory-only candidates, including safe Unicode IDs, can commit. The server has no injected validator or executable rule-registration parameter.
The MCP annotations are explicit: create is additive and non-idempotent; update is destructive and idempotent; both operate only on the local bundle.
Reviewer's guide
Start with the write registrations and
_writeinlib/src/mcp/server.dart, then the protocol tests. The branch is restacked directly onto currentmain.Prepared multi-file writes are rollback-backed for ordinary filesystem failures. They are not process- or power-loss crash-atomic because destination files are replaced independently; the README now states that boundary explicitly.
Testing
dart format --output=none --set-exit-if-changed .dart analyze --fatal-infosdart test— 160 tests passdart pub publish --dry-run— 0 warningsLinks
Fixes #12.