Skip to content

feat(jira): add Jira Cloud context-source adapter#320

Open
mattsenicksigma wants to merge 7 commits into
Kaelio:mainfrom
mattsenicksigma:feat/jira-adapter
Open

feat(jira): add Jira Cloud context-source adapter#320
mattsenicksigma wants to merge 7 commits into
Kaelio:mainfrom
mattsenicksigma:feat/jira-adapter

Conversation

@mattsenicksigma

Copy link
Copy Markdown
Contributor

Summary

Closes #174.

Adds a Jira Cloud context-source adapter that ingests issues filtered by project key and label allowlist, converts them to staged JSON, and runs the jira_ingest memory-agent skill to produce durable wiki knowledge.

  • New adapter at packages/cli/src/context/ingest/adapters/jira/ with fetch, chunk, detect, client, ADF-to-Markdown converter, and JiraSourceAdapter class
  • driver: jira connection schema added to driver-schemas.ts and registered in local-adapters.ts and public-ingest.ts
  • jira_ingest skill at packages/cli/src/skills/jira_ingest/SKILL.md for the memory agent
  • since date filter — optional YYYY-MM-DD field that narrows JQL to issues updated on or after that date; no per-run cap
  • ADF (Atlassian Document Format) description field recursively converted to Markdown before staging
  • Pagination via GET /rest/api/3/search/jql with nextPageToken (old /rest/api/3/search endpoint removed by Atlassian)
  • One work unit per project key (jira-<projectkey>)
  • 20 new tests (ADF converter, fetch, chunk)

ktx.yaml example

connections:
  jira-docs:
    driver: jira
    base_url: https://yourorg.atlassian.net
    email: you@yourorg.com
    api_token_ref: env:JIRA_API_TOKEN
    projects:
      - DOCS
      - ENG
    labels:
      - kb
      - decision
      - policy
    since: "2024-01-01"   # optional — omit to fetch all matching issues

Test plan

  • pnpm --filter @kaelio/ktx run test — all Jira adapter tests pass
  • pnpm --filter @kaelio/ktx run type-check — clean
  • pnpm run dead-code — clean
  • End-to-end: ktx ingest <connection-id> with a real Jira token fetches issues, stages JSON, and the memory agent writes wiki candidates

🤖 Generated with Claude Code

Replace the per-run issue cap with a `since` field (YYYY-MM-DD) that
adds `updated >= "YYYY-MM-DD"` to the JQL query. Fetches all matching
issues with no artificial limit; the date is the control knob for
scope instead of a volume ceiling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@mattsenicksigma is attempting to deploy a commit to the Kaelio Team on Vercel.

A member of the Team first needs to authorize it.

@mattsenicksigma

Copy link
Copy Markdown
Contributor Author

A more human comment

Pretty much the same flow as #319 -> just reading in some text and adding to the wiki generation.

novelty here is parsing out the text from the issues. An intermediary conversion to markdown is levereaged as it seemed like a reasonable way to standardize things.

Obviously this an #319 are more straightforward, #316 is the more novel/interesting of the three adapter pr's

mattsenicksigma and others added 3 commits June 27, 2026 02:05
…schema

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tamps

On subsequent runs, scan existing staged issues for the max `updated`
field and use it as the JQL `updated >= ...` floor. No cursor store
needed — the staged files are the state. First run (no existing issues)
still does a full eviction and uses the configured `since` date.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… and integrations docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@luca-martial
luca-martial requested a review from andreybavt June 27, 2026 17:21
mattsenicksigma and others added 3 commits July 1, 2026 20:07
JQL date literals only accept `yyyy-MM-dd` or `yyyy-MM-dd HH:mm`, but the
incremental sync floor derived from a staged issue's `updated` field is a
full ISO-8601 timestamp, so every run after the first sent Jira an invalid
query. Also fixes a stale `capped` field in the skill's manifest example and
registers `jira` in the local-adapters ordering test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tryPull ran a plain `git pull`, which merges divergent histories rather
than failing, so a locally-modified cache silently produced a new merge
commit instead of falling back to a fresh clone as intended. Use
--ff-only so divergence is rejected and the existing fresh-clone
fallback fires.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts:
#	docs-site/content/docs/cli-reference/ktx-ingest.mdx
#	docs-site/content/docs/configuration/ktx-yaml.mdx
#	docs-site/content/docs/guides/building-context.mdx
#	docs-site/content/docs/integrations/context-sources.mdx
#	packages/cli/src/context/ingest/local-adapters.ts
#	packages/cli/src/context/project/driver-schemas.ts
#	packages/cli/src/public-ingest.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Jira context source

1 participant