Sil library reuse

From sillsdev/FieldWorks · View interactive version

Sil library reuse is an AI agent skill from the GitHub repository sillsdev/FieldWorks. Reuse lower-level SIL libraries before writing custom helpers in FieldWorks. Use this whenever a task touches file or directory I/O, locked-file retries, paths or URIs, writing systems, keyboards, LCM caches/project IDs/service locators, linked files/media/config paths, localization, LIFT/import/exp

How to use this skill

Skill file

SIL Library Reuse

FieldWorks already depends on SIL packages that solve many of the "small

helper" problems agents are tempted to rebuild. Start here before adding new

filesystem wrappers, cache bootstraps, writing-system plumbing, localization

hooks, bridge calls, or parser code.

Staying Current

If you find this to be inaccurate, treat that as a maintenance signal, not a

reason to ignore the skill. SIL package versions, upstream repo layouts, and

public API names change over time. Revalidate the claim against the current

FieldWorks package references, installed package metadata, local usage, and

upstream repos, then update this skill in the same change when practical. If

you cannot update it, call out the stale item clearly in your final response.

Workflow

  1. Identify the package family from the touched namespace or project file. If

the package or version is unclear, check

Directory.Packages.props and

Build/SilVersions.props.

  1. Search FieldWorks first for the concrete helper or namespace and copy the

existing local pattern.

  1. If local usage is thin or the name is unfamiliar, open the upstream repo

links below. Do not assume Context7 covers these packages well.

  1. Prefer the library helper over custom code when it already handles retries,

path normalization, cache setup, localization metadata, sync boundaries, or

corpus parsing.

  1. Keep FieldWorks constraints intact: .NET Framework 4.8, C# 7.3, .resx for

user-facing strings, registration-free COM, and repo build/test scripts.

Good First Searches

Package Family Map

`libpalaso`

Packages:

SIL.Core, SIL.Core.Desktop, SIL.Archiving, SIL.Lexicon, SIL.Lift,

SIL.Media, SIL.Scripture, SIL.TestUtilities, SIL.Windows.Forms*,

SIL.WritingSystems

Use for:

filesystem resilience, path helpers, retry loops, desktop file helpers,

writing systems, keyboards, LIFT processing, archiving, and test temp-file

helpers.

FieldWorks usage anchors:

Main APIs to look for first:

Upstream repo:

`liblcm`

Packages:

SIL.LCModel, SIL.LCModel.Core, SIL.LCModel.Utils,

SIL.LCModel.FixData, SIL.LCModel.Tests

Use for:

LCM cache creation, project IDs, service location, writing-system managers,

linked/media/config paths, imports, migrations, and repository/factory access.

FieldWorks usage anchors:

Main APIs to look for first:

Upstream repo:

`l10nsharp`

Packages:

L10NSharp, L10NSharp.Windows.Forms

Use for:

runtime WinForms localization, XLIFF-backed string management, control

metadata, and language switching.

FieldWorks usage anchors:

Main APIs to look for first:

Upstream repo:

`desktopanalytics.net`

Packages:

SIL.DesktopAnalytics

Use for:

telemetry, consent-aware tracking, exception reporting, and application-level

analytics properties.

FieldWorks usage anchors:

Main APIs to look for first:

Upstream repo:

`ipcframework` and `chorus`

Packages:

SIL.FLExBridge.IPCFramework, SIL.Chorus.App, SIL.Chorus.LibChorus,

SIL.Chorus.L10ns

Use for:

FLExBridge launch/obtain/send-receive flows, IPC contracts, sync/merge

orchestration, file-type handlers, and merge/conflict notes.

FieldWorks usage anchors:

Start with the local wrapper first:

Then inspect upstream helpers if the change crosses the boundary:

Upstream repos:

`machine`

Packages:

SIL.Machine, SIL.Machine.Morphology.HermitCrab

Use for:

morphology, feature-structure-based NLP, text corpora, USFM/USX parsing, and

alignment. Direct FieldWorks usage is light today; consult this before

inventing parser or analysis code.

Main APIs to look for first:

Upstream repo:

`Paratext`

Packages:

SIL.ParatextShared, ParatextData

Use for:

Scripture project access, verse references, plugin integration, USFM tokens,

and Paratext interoperability.

FieldWorks usage anchors:

Important caveat:

SIL.ParatextShared source for the legacy package used by FieldWorks is not

publicly available. Use the public docs and demo plugins instead of hunting

for a missing source tree.

Public docs and references:

Useful API names in the public docs:

Biases To Keep

LcmFileHelper over custom LCM bootstrapping or path math.

symbol/reference navigation before deciding the helper does not exist.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.