Skip to content

skillfollow: structural consolidation of FollowSet, walker errors, and the write boundary #405

Closed as not planned

Description

@runkids

Summary

The .skillfollow feature (PR #390) went through many review rounds that each added a guard at the call site. A /simplify pass applied the small, behavior-preserving cleanups (ai_docs/reports/274-simplify.md); the structural ones below were left for separate PRs because they change many signatures. None changes user-visible behavior.

Items

  1. Store the logical source root in FollowSet. Follow(root, …) already receives the root but keeps only the canonical one, so every consumer passes (source, follow) as a pair: WriteBoundary(source, rel), PrunePauses(source), followScope, and about 33 function signatures. Adding LogicalRoot() lets followScope fold into FollowSet and removes the source/snapshot mismatch class by construction.
  2. Let the walker return traversal errors. sourcewalk.Walk/WalkDir/ReadDir only return the declaration error; about 13 callers re-check follow.Err() afterwards, and TestFollowSnapshotGuard has an err-check rule to enforce that. Returning the walk errors added during the call removes both.
  3. Give sourcefs.Root the write boundary. About 20 call sites pair WriteBoundary with a sourcefs write by hand, and 7 build a declaration-only snapshot (sourcewalk.Follow(dir, FollowOptions{})) just for that check. A boundary carried by the root (interface to avoid the import cycle) checks once in the write methods; the update-in-place exemption in install_apply.go becomes an explicit opt-out.
  4. Non-nil empty snapshot semantics in install_apply.go. nil currently means both "no declaration" and "not computed", so followedDestError rebuilds a snapshot per installed skill in batch installs and update --all. Pass a built (possibly empty) snapshot instead.
  5. Agents exemption at the rule level. 5 of the 8 follow_allowlist.json rows say "agents source, outside .skillfollow"; expressing Kind == "agent" in the ratchet rule removes them.

References

  • internal/sourcewalk/follow.go, internal/sync/skillfollow.go, internal/install/install_apply.go, internal/sourcewalk/follow_guard_test.go
  • ai_docs/reports/274-simplify.md "Follow-ups", 274-discovery-entry.md, 274-codex-round19.md

Activity

  1. runkids commented on Oct 5, 2026

    @runkids
    OwnerAuthor

    Closed with #390. The .skillfollow implementation is not being merged, so this follow-up no longer applies. If the need resurfaces against a new implementation, it will be filed fresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions