markdown corpus · Jira convert · quality gates
canonic
canonical responses, versioned in git
Versioned canned-response corpus for Jira workflows — markdown under a shared snell- prefix is the source of truth. Convert with pandoc, gate with quality checks, search and dedupe with Tantivy.
Why canonic#
Shared support answers should live in git, not only in Jira comments.
canonic treats version-controlled markdown under corpus/responses/ as the
source of truth: check quality before migration, convert with pandoc’s Jira
writer, lint with Vale or in-process Harper, and search or dedupe with a local
Tantivy index.
Workflow at a glance#
-
1
Author in markdown
Shared
snell-prefix, front matter, team closing. corpus/responses/ - 2 Gate quality Ids, prefix, sop, and generic closings — fail the PR early. canonic check
- 3 Search & dedupe Local Tantivy BM25 + Jaccard for near-copy discovery. canonic search · dedupe
- 4 Publish to Jira Convert or explicit one-shot comment; imports stay drafts until promote. canonic convert · jira-comment · tui
Full pipeline diagram — details in Architecture.
What you need → what you run#
Front matter, snell- id, and team closings.
- canonic checkexit 1 on findings
Pandoc jira writer for a human to paste.
- canonic convert PATH
BM25 search and near-duplicate pairs.
- canonic search "…"
- canonic dedupe
REST read path → drafts under corpus/imports/.
- canonic import-jira "JQL"
Install#
cargo install --git https://github.com/HaoZeke/canonic
# or from a checkout:
cargo build --release
Requirements: Rust 1.85+, pandoc for convert,
optional Vale for style lint (Harper is linked in-process).
Run canonic doctor to see what the environment can already do.
First canned response#
- Scaffold:
canonic new "Example topic"→corpus/responses/snell-example-topic.md(or edit the shipped demosnell-demo-shared-quota.md). - Validate:
canonic check - Index & search:
canonic reindexthencanonic search "example topic" - Convert (needs pandoc):
canonic convert corpus/responses/snell-example-topic.md(or the shippedsnell-demo-shared-quota.mdpath).
Full command reference: Usage.
Documentation map#
CLI overview, corpus layout, dedupe, Jira import, exit codes.
Why Tantivy, markdown-as-source, and the review-before-migrate rule.
Pipeline diagram, layers, and library module map.
Module overview and link to cargo-generated rustdoc.
Source & license#
Repository: https://github.com/HaoZeke/canonic
License: MIT — see
LICENSESite theme: Shibuya (build with
./docs/build.sh)