Imagine a Weir Marketplace

For con­text, I main­tain an open-source gram­mar checker by the name of Harper. This post is a kind of RFC for a po­ten­tial im­prove­ment to the pro­jec­t’s er­gonom­ics.

I’ve ob­served a high de­gree of spe­cial­iza­tion of lan­guage be­tween aca­d­e­mic fields.

Ecologists use bits of lan­guage that com­puter sci­en­tists don’t use, and com­puter sci­en­tists use bits of lan­guage that ecol­o­gists don’t use. If we em­brace this spe­cial­iza­tion through cus­tomiza­tion, we could gain an ad­van­tage over other gram­mar check­ers. That’s all to say: We want to en­able au­thors and aca­d­e­mics to cus­tomize Harper to their spe­cial­ized lan­guage. For ex­am­ple, a chemist might want to en­force a set of rules for en­sur­ing mol­e­cules are named cor­rectly ac­cord­ing to the IUPAC stan­dard, and a sci­ence fic­tion au­thor might want to en­force rules to make sure spe­cific char­ac­ters are ad­dressed by the proper ti­tles. Weir is the so­lu­tion to these prob­lems.

In this post, I’ll re­cap what Weir is, and out­line a mech­a­nism for dis­trib­ut­ing Weir rules to in­di­vid­ual users that might take ad­van­tage of them. I’d love your thoughts on how we can make it as im­pact­ful and in­ter­ac­tive as pos­si­ble.

In my ini­tial post about Weir, I dis­cussed how most large or­ga­ni­za­tions have style guides which de­fine spe­cific rules for their em­ploy­ee’s gram­mar, cap­i­tal­iza­tion, and for­mat­ting. I pro­posed a pro­gram­ming lan­guage by the name of Weir, which could be used to clearly state these rules to be en­forced by Harper. I’ve per­son­ally found that LLMs are not great at en­forc­ing strict gram­mat­i­cal guide­lines, but they’re ex­cel­lent at trans­lat­ing them from an ex­ist­ing style guide into the Weir lan­guage. See my re­cent ex­per­i­men­ta­tion for more de­tails.

Now that Weir has been merged, we can move on to the other prob­lems: cre­ation and dis­tri­b­u­tion. To­day, I’d like to talk about dis­tri­b­u­tion.

I’ve had sev­eral dis­cus­sions in the last week from peo­ple who want to be able to cus­tomize Harper with their own rules. This in­cludes peo­ple who use Harper as a part of their con­tin­u­ous in­te­gra­tion, aca­d­e­mics, and some en­gi­neers who work on learn­ing man­age­ment sys­tems. There is a need and de­sire for this to­day, and I want to ad­dress it as soon as pos­si­ble.

Distribution

Once a col­lec­tion of Weir rules has been drafted, how should it be shared? There is a for­mat­ting piece, as well as an in­fra­struc­ture piece.

Weirpacks

I pro­pose a sim­ple, but ef­fec­tive for­mat for shar­ing col­lec­tions of Weir rules. In­stances of this for­mat should be called Weirpacks” and thus have the file ex­ten­sion .weirpack.

Right now, the Weir rules baked into Harper are or­ga­nized into a sin­gle di­rec­tory, weir_rules, with each .weir file pre­fixed with the rule’s name. For ex­am­ple, the file con­tain­ing the rule for fix­ing Their to There is TheirToTheir.weir. There are a vast quan­tity of these curated” rules, and I don’t think they should go any­where. I just think we can reuse the lay­out.

I be­lieve the best strat­egy for or­ga­niz­ing col­lec­tions of Weir rules is to repli­cate what’s al­ready in the Harper repos­i­tory, but in­side a ZIP archive. Even though it is a ZIP file, which nor­mally have the suf­fix .zip, I think we should give them the .weirpack suf­fix for clar­ity on their pur­pose. The root di­rec­tory of the archive will con­tain as many .weir files as is de­sired by the Weirpack au­thor, in ad­di­tion to a .json man­i­fest file con­tain­ing pack­age meta­data.

Metadata

Since JSON is quite flex­i­ble, Weirpack au­thors can in­clude what­ever in­for­ma­tion they want. I think cer­tain fields, how­ever, should be re­quired. Namely:

  • The Author’s Name
  • The Weirpack’s ver­sion
  • A de­scrip­tion of the Weirpack’s pur­pose and us­age
  • The Weirpack’s li­cense

I think we can also rec­om­mend, but not re­quire some ad­di­tional help­ful in­for­ma­tion:

  • Keywords rel­e­vant to the rule’s pur­pose
  • The Author’s Website

Loading Weirpacks

Support for Weirpacks will be baked di­rectly into harper-core, as well as harper.js.

The for­mer will make it pos­si­ble for our com­mand-line pro­grams, harper-cli and harper-ls, to load them at run­time. In harper-cli, which is a de­bug­ging tool, it will be suf­fi­cient to ex­pose a flag on our lint com­mand to al­low Weirpacks to be loaded. In harper-ls, we need to up­date our con­fig to al­low Weirpacks to be loaded from a di­rec­tory on the disk. The de­fault should be next to where the dic­tio­nar­ies are al­ready loaded.

The lat­ter will make it pos­si­ble for our web in­te­gra­tions to load them when the user de­sires, ei­ther from disk or from our mar­ket­place (more on that in a minute). For both the Obsidian plu­gin, as well as the Chrome ex­ten­sion, we’ll in­clude a field in the set­tings menus for users to load Weirpacks from disk and into the lin­ter. Nat­u­rally, these will per­sist across ses­sions in the same way the other set­tings do.

Being able to load Weirpacks from disk is crit­i­cal to al­low­ing users to re­main com­pletely of­fline if they choose to be. Ad­di­tion­ally, load­ing cus­tom Weirpacks with­out ap­proval from a mod­er­a­tor is a pre­req­ui­site to hav­ing a quick and en­joy­able it­er­a­tive loop.

The Weir Marketplace

When a user in a field with spe­cial­ized lan­guage down­loads Harper, we will nat­u­rally pro­vide them with the es­sen­tial rules that are com­mon to the en­tirety of the English lan­guage. We will also give them the op­tion to down­load ad­di­tional Weirpacks from the Weir Marketplace. This will be a place, not un­like Obsidian’s Community Plugins Marketplace, where user-sub­mit­ted Weirpacks can be down­loaded and in­stalled quickly and eas­ily.

The Obsidian Community Plugins Marketplace

Imagine, if you will, that you’re a JavaScript de­vel­oper who has just down­loaded Harper. You start writ­ing a blog post about your re­cent ad­ven­tures with the lat­est JavaScript frame­work. Un­for­tu­nately, Harper starts flag­ging swaths of your work as mis­spelled and filled with poor gram­mar.

Thankfully, Harper no­tices its mis­take and of­fers to down­load a rel­e­vant Weirpack for pro­gram­mers—one pre­set with a dic­tio­nary filled with tech­ni­cal lan­guage and rules to en­sure proper use. You down­load the Weirpack and con­tinue writ­ing with Harper now bet­ter equipped to han­dle the sub­ject at hand. Cri­sis averted.

The Long View

This idea of a self-con­tained Weirpack pro­vid­ing the logic and the datasets nec­es­sary to do gram­mar check­ing for a spe­cial­ized sub­set of English is in­tox­i­cat­ing. Pro­ject­ing for­ward, I can imag­ine a fu­ture where we can pro­vide sup­port for any num­ber of nat­ural lan­guages, dis­trib­uted via Weirpacks and sup­ported by a com­mu­nity of con­trib­u­tors in a de­cen­tral­ized way, not dis­sim­i­lar to WordPress’ plu­gin mar­ket­place. That is­n’t for to­day, though.

Published January 9, 2026 at 7:00 AM

Proofread by Harper.

Comments