| name | canonic-canned-loop |
| description | Day-to-day canned-response loop with canonic: probe free Jira, import drafts, scaffold or promote into corpus/responses, edit, check/lint, reindex/search/dedupe, convert or explicit jira-comment, and rely on CI. Use when curating shared-prefix markdown (canonic.toml), importing Jira comments as review drafts, or publishing one-shot free-tier comments. No bulk auto-sync and no Marketplace apps. |
canonic canned-response loop
Markdown under corpus/responses/ is the source of truth. Jira is a publication
surface. Free platform REST only (Cloud Free API token or Server/DC PAT).
Constraints (do not break)
- No bulk library push into Jira.
jira-comment is one file → one issue.
- No Marketplace / JSM canned-response admin APIs — native REST only.
- Imports are drafts:
import-jira writes under corpus/imports/ (or --out),
never silently overwrites corpus/responses/.
- Promote only after review: edit drafts, run
check, then promote.
- Secrets in gitignored
canonic.local.toml under [jira] (never commit tokens).
Config (canonic.toml / canonic.local.toml)
prefix = "resp"
[jira]
base_url = "https://your-instance.atlassian.net"
email = "you@example.org"
api_token = "..."
Day-to-day loop
1. Probe free REST
canonic doctor
canonic jira-probe
2. Pull snippets as review drafts
canonic import-jira "project = HSP AND labels = canned-response" --dry-run
canonic import-jira "project = HSP AND labels = canned-response"
Fixture smoke (no live Jira):
canonic import-jira "project = HSP AND labels = canned-response" --out /tmp/imports
3. Scaffold a new response (template)
canonic new "Project space is not a backup" --tags storage,project-space
canonic new "Queue limits" --id resp-queue-limits --sop none --out corpus/responses
4. Edit, then quality gate
canonic check
canonic lint --engine harper
canonic list
canonic tui
5. Promote import → published corpus
canonic promote corpus/imports/resp-some-topic-hsp-101.md
canonic check
canonic reindex
canonic search "project space"
canonic dedupe --reindex --threshold 1.0
6. Render / publish (human-gated)
canonic convert corpus/responses/resp-project-space-is-not-a-backup.md
canonic jira-comment --issue HSP-101 \
corpus/responses/resp-project-space-is-not-a-backup.md --dry-run
canonic jira-comment --issue HSP-101 \
corpus/responses/resp-project-space-is-not-a-backup.md
Cloud Free uses ADF on /rest/api/3; Server/DC uses wiki on /rest/api/2.
Override with --body-format wiki|adf when needed.
CI
GitHub Actions runs cargo test --locked --all-targets, then corpus check and
in-process Harper lint on corpus/responses/, plus a convert smoke when pandoc
is installed. Keep published responses check-clean so CI stays green.
TUI keys (quick)
| Key | Action |
|---|
j/k | Move · / filter · C check · c convert preview |
l lint · r reindex · s search · q quit | |
Full usage: docs/orgmode/usage.org and README Usage section.
Agent checklist
- Prefer
canonic new over hand-copying front matter.
- Never write import drafts straight into
corpus/responses/ without promote.
- Run
check (and lint --engine harper) before convert or jira-comment.
- Use
canonic tui for browse/filter/convert preview — it does not post to Jira.
- Do not invent bulk sync or paid Jira extensions.
- Leave production tickets out of git until a human promotes a reviewed draft.