jig-harness/jig
M9 Tasks & memory · in your tools

M9 mappings — per-ecosystem implementations

The module invariant — a validated label taxonomy whose flag labels fire process; the what/how/in-session memory tiers with a promotion path; phase formulas whose required phases gate closure — is tool-independent. This file maps its mechanisms onto concrete issue trackers, persistent-memory homes, and CI providers. Everything here is an option, not a requirement: pick one row per column. Replace <placeholders> with your values.

The gates, per rung

GateWhen it runsRung
label-taxonomy linton any change to label-taxonomy.yamlCI (authority — see M1); cheap enough to pre-commit too
label validatorbefore any tool writes an issue’s labelsthe filing path itself (file-issue runs it before every write)
required-phasesat item close/merge (or on a status transition)CI gate, or a tracker status-automation, over the item’s exported phase record

The label-taxonomy lint and the label validator live in the plugin’s file-issue skill (plugin/skills/file-issue/scripts/), with their self-tests, which Jig’s own CI runs. A CI job runs the lint from a pinned Jig checkout (point JIG at it); it needs Bun and nothing else, the YAML parser being vendored in plugin/shared/. The required-phases gate stays in this module: point one M9 variable at wherever you vendored the module and build its paths from it (a bare reference/... resolves from the repo root and will not be found). It imports the shared implementation in lib/module-gates.ts, so vendor the module together with lib/ (a pinned Jig checkout keeps them in place).

GitHub Actions

yaml
# .github/workflows/tasks-memory.yml
on:
  pull_request:
    paths: ['label-taxonomy.yaml']
  # plus the close/merge check below on the merge path
jobs:
  taxonomy:
    runs-on: ubuntu-latest
    env:
      JIG: .jig                          # where the pinned Jig checkout is
    steps:
      - uses: actions/checkout@<full-commit-sha> # v4
      - uses: actions/checkout@<full-commit-sha> # v4
        with: { repository: jig-harness/jig, ref: <pinned-tag>, path: .jig }
      - run: bun "$JIG"/plugin/skills/file-issue/scripts/check-label-taxonomy.ts label-taxonomy.yaml
  required-phases:
    runs-on: ubuntu-latest
    env:
      M9: modules/M9-tasks-memory
    steps:
      - uses: actions/checkout@<full-commit-sha> # v4
      - run: bun test "$M9"/reference/required-phases/check-formula.test.ts
      # export this PR's item phase record from the tracker (see below), then:
      - run: |
          RECORD=item-phases.txt FORMULA=phase-formula.yaml \
            bun "$M9"/reference/required-phases/check-formula.ts

GitLab CI

yaml
tasks_memory:
  variables:
    M9: modules/M9-tasks-memory
    JIG: .jig                            # the pinned Jig checkout
  script:
    - bun "$JIG"/plugin/skills/file-issue/scripts/check-label-taxonomy.ts label-taxonomy.yaml
    - bun test "$M9"/reference/required-phases/check-formula.test.ts
    - RECORD=item-phases.txt FORMULA=phase-formula.yaml bun "$M9"/reference/required-phases/check-formula.ts

Issue trackers — flag labels + required checks, and formula → phases

The flag label wiring has two halves: applying the flag (ideally derived from the M3 change-area catalog, not by hand) and firing its process (a required check, a blocking checklist, or an autonomy-revoking rule). A formula’s required phases map either to tracked sub-tasks or to a status-automation that runs the required-phases gate before a transition to done.

TrackerFlag label → processFormula phases → mechanism
GitHub issuesissue/PR labels; a has-migration/api-change label maps to a required status check via branch protection; a hitl label revokes autonomous merge (shared with M7)phases as a task-list or linked sub-issues; the merge gate exports a phase record and runs the gate before allowing close
GitLab issuesscoped labels (flag::has-migration); required-check + “all threads resolved” rules per labelphases as checklist items or child issues; a pipeline job runs the gate on the merge request
Jiralabels or a custom field; a workflow condition/validator ties a label to a mandatory transition or a required linked reviewphases as sub-tasks; a workflow validator blocks the Done transition until required sub-tasks resolve (or the gate passes)
Linearissue labels; a hitl label marks a deliverable whose merge stays human; automation rules fire on label addphases as sub-issues or a project’s stage; a status-transition automation runs the gate
Darttags for flags; an automation ties a tag to a required reviewphases as subtasks; a rule gates the closing transition

Jig’s do-item skill honours the hitl and manual-ops flags through its tracker adapter (Linear’s, GitHub Issues’ and Jira’s are built), with the label names taken from issue_tracker.labels in the repository’s configuration. Its file-issue skill applies the flags at filing: from the change-area catalog’s tracker labels of the areas a diff touches directly, else from the description, and through the same adapter, after the label validator has passed the whole label set against the taxonomy (issue_tracker.taxonomy).

The tracker-agnostic contract the gate needs is small: a status: and the completed phase ids, one per line. Any tracker that can export those (a saved view, an API query) can be gated — the export is the only per-tracker adapter.

Field-only label categories

A taxonomy category marked field_only: true holds values the tracker keeps in a field it reads as labels but never writes, so a filing sets them on that field afterwards and never as labels.

TrackerSuch a fieldMapping
Jiraa field whose values the adapter reads as prefixed labels, such as Fix versions as fixversion:2.4issue_tracker.jira.field_labels: { "Fix versions": "fixversion:" }, with the category’s prefix equal to the mapped prefix
GitHub issues, GitLab issues, Linear, Dartnone read this wayno category is field-only; every value is a label

validate-labels.ts --check-tracker refuses a field-only category whose prefix the configured tracker maps to no field.

Issue trackers — the work-item rules

The work-item rules need three things from a tracker: a priority every filing path can set, a marker for the container (the epic flag), and a place to record an epic’s acceptance verdict or waiver before it closes.

TrackerPriority at birthEpic markerVerdict or waiver before close
GitHub issuesno native priority: a single-valued project field (or a priority: label set) written on createan epic label, or an issue type such as Epic that issue_tracker.labels.epic_types lists; sub-issues for the childrena comment carrying a verdict marker line; a workflow on issues: closed reopens an epic without one
GitLab issuesscoped labels (priority::2, a paid tier), single-valued by construction; on the free tier, a priority- label set the filing path keeps to oneepics (a paid tier) or an epic labela comment marker; a webhook or scheduled job reopens an epic closed without one
Jirathe built-in Priority field, required on create by the field configurationthe Epic issue type, read as the epic where issue_tracker.labels.epic_types lists it; it replaces the bug or feature type, so record the real type in a field; or keep the real type and add an epic labela workflow validator on the closing transition requires the verdict field or a waiver comment
Linearthe built-in priority (0 none, 1 urgent to 4 low), set on createan epic label, keeping the real type labela comment marker; do-item Step 5a asks for it before extracting tails and closing

Whatever the tracker, keep the severity mapping in one committed file, and have each filing path read it or test its own copy against it. Jig’s deferral path (resolve-review-comments’ defer-batch.ts) does neither yet. Its priorities are a fixed table in the script, and its tests compare that table with the skill’s own test fixture, never with a repository’s committed mapping. So a repository that changes its mapping changes nothing the deferral path files, and no check fails to say so: keep the mapping at the table’s values, or check the copy yourself.

The category list works the same way in Jig’s tooling: it is review.taxonomy.categories in .config/jig.yaml (configuration reference), and the deferral path checks every category it files against that list plus unknown. So a finding the reviewer left uncategorized is filed as unknown even when the list does not name it, and any other category outside the list is refused before anything is written.

Persistent-memory homes (the how tier + promotion)

The what tier is the tracker above. The how tier — multi-session agent memory — and the git-tracked shared memory that promotion lands in need a durable home. Any of these works.

HomeRole
a git-tracked memory/ directorythe shared, reviewable home promotion lands in; a promotion is an ordinary reviewed commit, so history and blame come free
agent-runtime memory feature (Claude Code / Codex / Cursor memory files, or a project AGENTS.md/rules file)the how tier an agent reads/writes across sessions; promote the durable parts into the git-tracked memory/
a tracker comment, document or wiki page on the item or its epicnot a how-tier home: knowledge about one work item (its plan, decisions, handoffs) belongs to the what tier, on the item itself

Promotion from private to shared memory stays HITL whatever the home — the reflection/promotion commands live with M8 (Jig runs promotion as the promote-memory skill); M9 only fixes where each tier’s memory lives.

CI providers

Any provider works — both gates run with Bun and TypeScript. The only provider-specific pieces are (1) the path prefix (M9 above) and (2) the tracker export that produces the phase record the required-phases gate consumes, shown per tracker above.

Source: modules/M9-tasks-memory/mappings.md