Skip to content

skillfollow: small cleanups left after PR #390 review #407

Closed as not planned

Description

@runkids

Summary

Small .skillfollow cleanups and known rough edges left after PR #390's internal review and /simplify pass. Each is independent and small; batch them as convenient.

Items

  1. Doctor re-implements the git followed-link check. cmd/skillshare/doctor.go checkFollowedIgnores repeats FollowedLinksStaged → IsPathIndexed + IsPathIgnored and the "indexed; run …" messages that internal/git/followed_links.go CheckFollowedLinks produces, with hard-coded .skillfollow.local strings. One helper returning per-link problems should serve both.
  2. unfollowResult stores derivable fields (NotDeclared equals empty FilesEdited and StillDeclaredIn; LinkKept duplicates StillDeclaredIn; leftDiscovery compares a string sentinel). Deriving them changes the --json shape, so it needs a note in unfollow.md.
  3. PUT /api/skillfollow re-implements declaration parsing (internal/server/handler_skillfollow.go) and hard-codes the file names instead of using an exported sourcewalk.ParseDeclarations and shared constants (skillfollow.File/LocalFile cannot be imported by sourcewalk without a cycle; move the constants to sourcewalk).
  4. handlePatchSkillSource returns 404 on an unreadable declaration instead of the read error the other routes return (noted in ai_docs/reports/274-codex-round19.md).
  5. Audit TUI Skills tab under audit --agents scans the agents source as skills (cmd/skillshare/audit.go replaces sourcePath with the agents source; auditTUIContext keeps one path). Pre-existing, unrelated to .skillfollow; keep the skills source separately in the context.
  6. /api/skillignore reads s.cfg.EffectiveSkillsSource() while /api/skillfollow reads s.skillsSource(). They are equal in project mode (pinned by TestServerProjectUpdateAllUsesProjectSource); use one accessor for consistency.
  7. Test seams for name folding are layered three deep (caseInsensitiveNames, sameFollowName, sameName) and ValidEntryName/SameEntryName are export-only wrappers; export the originals and keep one switch.
  8. Repeated "%s: prune paused; unavailable .skillfollow entry: %s" format in diff.go, init_apply.go, sync_parallel.go, handler_sync.go; one formatter in internal/sync.
  9. Inline ErrLink → 409 mappings remain in handler_trash.go and handler_skill_content.go with different fallbacks; a followWriteStatus(err, fallback) form would unify them.

References

  • ai_docs/reports/274-review-fixes.md, 274-simplify.md, 274-codex-round19.md, 274-discovery-entry.md

Activity

  1. runkids commented on Oct 5, 2026

    @runkids
    OwnerAuthor

    Items 5 and 6 landed in #412 (merged as d1371db): the audit TUI keeps the skills source under audit --agents, and /api/skillignore reads the source through skillsSource(). The remaining items (1-4, 7-9) touch .skillfollow code and wait for #390.

  2. runkids commented on Oct 5, 2026

    @runkids
    OwnerAuthor

    Closed with #390. Items 5 and 6 landed in #412; the .skillfollow implementation behind the rest 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