Legal Core (Australia)

by blursedperf
5
4
3
2
1
Score: 50/100
New Plugin

Description

Legal Core (Australia): the shared foundation for Australian legal-writing plugins in Obsidian. Shared authorities, a Word export engine with AGLC4 formatting, and an API for other plugins.

Reviews

No reviews yet.

Stats

0
stars
3
downloads
0
forks
0
days
0
days
1
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
2
commits

Latest Version

a day ago

Changelog

The first release of Legal Core (Australia): the shared foundation for a suite of Australian legal-writing plugins in Obsidian.

On its own Legal Core does little you'll see. It gives the plugins built on it one place to keep your sources, and one Word export engine.

What it provides

  • Shared authorities: the cases, legislation and secondary sources your work relies on, kept in your vault in .legal-core/authorities.json. The plugins you use see the same sources. Each source has one record, however many plugins write it, and nothing another plugin wrote is ever removed. The file is saved safely, so a crash part-way through a save loses nothing.
  • A Word export engine: real Word footnotes, AGLC4 headings, typography and bibliography, which plugins extend with their own syntax and content.
  • Templates: a reference Word document whose styles exports take on. Version 1 merges styles; numbering, headers and footers come later.
  • An API for plugin authors: documented in API.md, with an example plugin.

Works with AGLC4 Citations 1.10.0 and later. With both installed, AGLC4 Citations asks once whether to share the sources your notes cite, then keeps them up to date. It only reads your notes, and its exports are the same with or without Legal Core.

Private and offline: no network requests, no AI, no telemetry. An offline audit checks the code and the bundle.

Verify the build: gh attestation verify main.js -R blursedperf/obsidian-legal-core

Legal Core is developed in blursedperf/obsidian-aglc4, together with AGLC4 Citations and the packages they share.

README file from

Github

The foundation for professional legal plugins in Obsidian, for lawyers and legal assistants. On its own it does little that you see: it gives the plugins built on it one place to keep the cases, legislation and sources a practice relies on, and one Word export engine.

  • Shared authorities. Cases, legislation and secondary sources, kept in your vault in .legal-core/authorities.json, so that the professional plugins you use see the same sources.
  • Word export engine. Real Word footnotes, AGLC4 headings, typography and bibliography, which plugins extend with their own content.
  • Templates. A reference Word document (a firm's house style, say) whose styles exports take on.

Plugins built on Legal Core need it installed, and tell you clearly when it is missing or too old; none of them stops working without warning.

Settings

  • Authorities file: where the shared authorities are kept (default .legal-core/authorities.json, hidden from the file list).
  • Stored authorities: how many there are, by kind.
  • Registered extensions: the plugins that build on Legal Core and are running.
  • Default template: the reference Word document used by default in exports.

Privacy

Legal Core works locally only. It makes no network requests, uses no AI and has no telemetry, and the repository's offline audit checks its code and bundle.

For plugin authors

See API.md for the API, and examples/case-notes for a plugin built on it.

Development

npm install
npm run build   # type-check and build main.js
npm run dev     # rebuild on every change
npm run dev:vault -- <vault>   # build and link into a test vault (settings stay in the vault)
npm test        # tests, golden exports and the offline audit
npm run lint
  • Layout: the plugin's source is in src/. The packages it is built from are in packages/, and are bundled into main.js:
    • ldm, the document model;
    • md-pipeline, Markdown and extensions;
    • docx-engine, the Word and HTML writers;
    • aglc, AGLC4 formatting;
    • authority-store;
    • legal-core-api, the API's types.
  • Golden exports: test/golden holds the Word XML of the notes in test/fixtures. Any change to the export fails the tests; regenerate them only when the output is meant to change, with UPDATE_GOLDEN=1 npx vitest run test/golden.test.ts.
  • Releasing: npm version <x.y.z> updates manifest.json and versions.json; pushing the tag runs the release workflow, which builds main.js with a build attestation and drafts the release.