Commit graph

348 commits

Author SHA1 Message Date
Andrey Avtomonov
c56bcadd9e
Merge branch 'main' into ktx-cli-ergonomics-review 2026-05-20 01:47:43 +02:00
Andrey Avtomonov
9190eaf306 Merge remote-tracking branch 'origin/main' into ktx-cli-ergonomics-review
# Conflicts:
#	docs-site/content/docs/cli-reference/ktx-ingest.mdx
2026-05-20 01:45:34 +02:00
Luca Martial
14626c294b
chore(community): rewards program, issue templates, and triage workflow (#176)
* chore(community): rewards program, issue templates, and triage workflow

Adds the public-facing community engagement infrastructure.

CONTRIBUTING.md introduces a three-tier rewards program (sticker / t-shirt /
hoodie) gated on merged PRs, with explicit eligibility rules to keep the
program sustainable. Fulfillment is handled by emailing support@kaelio.com.

The .github/ISSUE_TEMPLATE/ forms give structure to bug reports and feature
requests, and config.yml routes questions to the KTX Slack instead of GitHub
Discussions (matching the routing established in docs-site/.../support.mdx).

The triage-issues workflow applies a needs-triage label only when the issue
author isn't OWNER, MEMBER, or COLLABORATOR — so internal issues stay clean
while external contributions get queued for maintainer review.

The first 14 connector contribution issues (#161-174) have been filed using
these labels and reward tiers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(community): add SECURITY.md

Documents the private reporting channel (GitHub Security Advisories with
support@kaelio.com as fallback), what reporters should include, and the
supported-version policy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 19:42:06 -04:00
Andrey Avtomonov
7380311501 feat(cli): smart defaults and flatter command surface for ktx
Bare invocations now do the obvious thing instead of erroring out, and mode-as-subcommand patterns collapse into flags on the parent. No new top-level commands.

- `ktx ingest` (bare) ingests every configured connection. The `text` subcommand is gone; capture inline notes with `ktx ingest --text "..."` and files with `ktx ingest --file path` (use `-` for stdin). `--text`/`--file` reject a positional connection id; pass `--connection-id` to tag captured notes.
- `ktx connection` (bare) lists; `ktx connection test` (bare) tests every configured connection.
- `ktx wiki` and `ktx sl` flatten `list`/`search`: bare lists, with a `[query...]` positional searches (multi-word joined with spaces). `sl validate` and `sl query` stay as distinct verbs and now read `--connection-id` from the parent.
- `ktx mcp` (bare) prints daemon status.

Adds a shared `resolveConnectionSelection` helper consumed by ingest and connection test. Updates README, docs-site cli-reference and guides, next-steps strings, agent SKILL templates, and all affected tests. Per-package type-check, unit tests (605), smoke tests, and dead-code checks all pass.
2026-05-20 01:37:44 +02:00
Andrey Avtomonov
6dbb0c8b3a
feat(cli): add ktx admin reindex (#160)
* feat(cli): add admin reindex

* fix: keep lexical-only reindex incremental
2026-05-20 01:36:54 +02:00
Andrey Avtomonov
3db3e724cb
fix(docs): stop semantic-layer flow from trapping page scroll (#175)
Wheel events over the embedded ReactFlow diagram were captured by
zoomOnScroll + preventScrolling, blocking page scroll once the pointer
crossed into the diagram — even at min zoom. Disable wheel-zoom and let
the page handle scroll, keep Cmd/Ctrl + scroll as the zoom escape hatch
(default zoomActivationKeyCode), and remove the inaccessible Controls
that sat at the bottom of the 2340px-tall canvas. Hint badge updated.
2026-05-20 01:29:03 +02:00
Andrey Avtomonov
322e24fc02
fix(ci): publish the pre-built tarball instead of re-packing (#159)
* fix(ci): publish the pre-built tarball instead of re-packing

The release workflow built the tarball twice — once via pnpm pack in
artifacts:check (leaving it at dist/artifacts/npm/) and again inside
@semantic-release/npm's prepare step, which then tried to fs-extra
move npm pack's output into the same directory and crashed with
"dest already exists". On top of being a publish blocker, that meant
the published tarball was different from the one smoke-tested in
artifacts:check.

Drop @semantic-release/npm and publish the exact tarball that
artifacts:check verified via an exec publishCmd:

    npm publish dist/artifacts/npm/kaelio-ktx-<v>.tgz \
      --tag <next|latest> --access public --provenance

Auth uses OIDC trusted publishing — the workflow already grants
id-token: write and setup-node configures the registry, and
release-workflow.test.mjs asserts NODE_AUTH_TOKEN is not set.

* fix(ci): allow @kaelio/ktx tarball name in semantic-release config

The new publishCmd added in the previous commit hardcodes the
dist/artifacts/npm/kaelio-ktx-<v>.tgz path, which trips the boundary
check that forbids the literal product name outside release-machinery
files. The release config is exactly such a release-machinery file —
its job is to bridge the generic ktx project to the @kaelio/ktx npm
package — so add it to identifierAllowPatterns alongside the existing
build-public-npm-package and public-npm-release-metadata entries.
2026-05-20 00:55:15 +02:00
Andrey Avtomonov
bf163029d3 Normalize docs punctuation 2026-05-20 00:43:07 +02:00
Andrey Avtomonov
6738defb81
chore: preserve superpowers docs symlink in worktrees (#158) 2026-05-20 00:11:38 +02:00
Luca Martial
8d5186e4ea
docs: add Slack community invite to README and docs (#157)
* docs: add Slack community invite to README and docs

Adds a Slack badge and Community section to the README, a new
Community & Support page under docs-site/content/docs/community/,
and a Community section on the docs introduction page. Routes
chat/questions to Slack and bugs/features to GitHub Issues.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: add Slack icon link to docs navbar

Adds the Slack brand mark as an icon button in the Fumadocs navbar
alongside the existing GitHub link, pointing to the KTX Slack
community invite. Persistent across every docs page so users can
reach the community from anywhere.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: order navbar icons as GitHub then Slack

Moves the GitHub link out of githubUrl and into the explicit links
array so the navbar renders GitHub first, then Slack. Fumadocs
appends githubUrl after links, which previously put Slack first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:07:29 -04:00
Andrey Avtomonov
620d6adbe6
docs: rewrite Semantic Querying concept with imperative-vs-declarative diagram (#156)
* docs: rewrite Semantic Querying concept with imperative-vs-declarative diagram

Reframe semantic-layer-internals.mdx around the contract the semantic
layer offers an agent: declare what you want (a Semantic Query), KTX
figures out how to compute it. Replaces the old "Context-Aware SQL"
framing with a clear imperative-vs-declarative narrative.

Adds a React Flow component (semantic-layer-flow.tsx) that contrasts a
buggy 4-table agent-authored SQL (chasm trap, LEFT-JOIN-in-WHERE,
hardcoded DATE_TRUNC) against the chasm-safe per-fact CTE SQL the
planner actually emits, including the outer GROUP BY over the requested
dimensions. Both lanes converge into a shared warehouse node and each
SQL card now has parallel bullet notes (failures on the left, KTX
behavior on the right).

Side fixes bundled in:
- include the /ktx basePath in the favicon metadata so the icon resolves
  under the production prefix
- migrate docs-site/middleware.ts to docs-site/proxy.ts (Next 16 rename)
- redirect / to /ktx/docs/getting-started/introduction so the apex docs
  URL works
- add tests covering the apex redirect, the favicon basePath, and the
  middleware-to-proxy rename
- propagate the Semantic Query terminology across the ktx-sl CLI
  reference, the context-layer concept page, and the agent-clients /
  primary-sources integration pages

* Fix CI dead-code failures

* docs-site: polish semantic-layer-internals code blocks and flow diagram

- Make CodeBlock a server component so children traverse synchronously
  under React 19 RSC streaming; previously extractText returned "" in
  dev SSR, leaving code blocks empty.
- Add custom JSON/YAML/SQL/code-like tokenizers with theme-aware token
  classes; drop the colored file-glyph dot and gradient tab-head.
- Tighten tab-head: subtle grey background, smaller monospace filename
  in muted grey, smaller rectangular language pill placed to the left
  of the filename.
- Polish the React Flow semantic-layer diagram (controls, fit-view
  padding, edge types).

* docs-site: annotate imperative SQL, add section anchor, drop ClickHouse

- Wire numbered red badges to each problematic span in the "Without KTX"
  SQL with hover sync between SQL gutter, lines, and the notes list.
- Add #imperative-vs-declarative anchor on the flow section header so
  the eyebrow link is shareable; reveals a # glyph on hover/focus.
- Align the compiled-SQL note dots to the first-line midpoint
  (mt-[6px] instead of mt-1) so 4px dots sit at y=8 in a 16px line.
- Remove all ClickHouse references from docs-site (primary-sources,
  quickstart, ktx-setup, contributing, agents-setup, mechanics test,
  warehouse drivers in the flow diagram).

* test: drop ClickHouse contributing-docs assertion

Align the workspace-package mirror test with the ClickHouse removal
from docs-site (75907eb). The connector-clickhouse package still
exists in packages/, but contributing.mdx no longer lists it, so the
test that mirrored docs against the workspace was failing.
2026-05-19 23:41:29 +02:00
Andrey Avtomonov
590dd5dddb
fix(cli): simplify setup flags and agents tty handling (#155)
* fix(cli): simplify setup flags and agents tty handling

* fix(context): update ingest setup guidance flag
2026-05-19 19:23:35 +02:00
Andrey Avtomonov
efda990de0 docs: remove README byline 2026-05-19 18:27:48 +02:00
Andrey Avtomonov
14c2567c14
docs: rewrite README to lead with problem and self-improving framing (#154) 2026-05-19 18:19:38 +02:00
Andrey Avtomonov
8bc60e8e56
fix: sanitize no_proxy for managed embeddings (#153) 2026-05-19 18:18:56 +02:00
Andrey Avtomonov
af0567c57e
fix(cli): install managed runtime with required Python (#152) 2026-05-19 18:18:38 +02:00
Andrey Avtomonov
7cec0041eb docs: update README status badges
Add the KTX CI tests status badge and remove the GitHub stars badge.
2026-05-19 17:09:10 +02:00
Andrey Avtomonov
144a6d1a56 docs: refresh GitHub stars badge
Add a short Shields cache hint so GitHub refreshes the stars badge instead of showing stale counts.
2026-05-19 17:07:48 +02:00
Andrey Avtomonov
ab1b912751
docs: make docs badge green (#151) 2026-05-19 17:04:45 +02:00
Andrey Avtomonov
366c44f224
ci: configure Codecov coverage uploads (#150) 2026-05-19 16:56:48 +02:00
Andrey Avtomonov
75bb4f9497
docs: align CLI install package manager guidance (#148)
* docs: align CLI install package manager guidance

* test: update CLI install docs expectation
2026-05-19 16:41:01 +02:00
Andrey Avtomonov
9c07038368
ci: simplify ktx release flow (#149) 2026-05-19 16:40:23 +02:00
Andrey Avtomonov
06aeb56f39
fix: remove deterministic embedding backend (#146)
* fix: remove deterministic embedding backend

* test: update slow tests for disabled embeddings
2026-05-19 16:40:01 +02:00
Andrey Avtomonov
e80f755a6c
Merge pull request #147 from Kaelio/fix-release-provenance-url
fix: align release provenance metadata
2026-05-19 16:15:10 +02:00
Andrey Avtomonov
b58232115e fix: align release provenance metadata 2026-05-19 16:10:30 +02:00
Andrey Avtomonov
afcfecfcc9
docs: add ingestion flow diagram to readme (#144) 2026-05-19 16:02:20 +02:00
Andrey Avtomonov
03e2f9f0a3
fix: prevent stable release pushes to main (#145) 2026-05-19 16:01:07 +02:00
Andrey Avtomonov
7110aa6f5c
fix: publish first stable release as 0.1.0 (#143) 2026-05-19 15:52:30 +02:00
Andrey Avtomonov
b4c77c0563 docs: add README agent setup prompt 2026-05-19 15:29:52 +02:00
Andrey Avtomonov
e80bfbfda5
docs: add agent setup prompt endpoint (#142)
* docs: add agent setup prompt endpoint

* docs: wrap agent setup prompt

* docs: restyle agent setup note

* docs: make agent setup prompt copyable

* docs: update quickstart demo callout

* docs: align prompt copy button
2026-05-19 15:22:17 +02:00
Andrey Avtomonov
56f4f9c9e8
feat(cli): split Claude Desktop skills and polish setup-agents output (#141)
* fix(cli): package Claude Desktop skills in one zip

* Polish ktx setup-agents output: hint, summaries, outro

* test: update setup agents output polish assertion

* Add output-polish follow-up plan

* docs: align Claude Desktop split-ZIP wording

Update README and the agent-clients docs page to reflect that ktx setup
now produces one uploadable ZIP per Claude Desktop skill under
.ktx/agents/claude/ (ktx-analytics.zip and optionally ktx.zip) instead
of a single combined ktx-skills.zip.

* feat(cli): style next-actions note in TTY mode

Add createAgentNextActionsLineFormatter, an ANSI line transformer wired
into the "Required before using agents" Clack note. It activates only
when the target stream reports hasColors(), so non-TTY pipelines and
tests keep the existing plain-text output byte-identical.

Per-line rules: cyan-bold step numbers + bold titles; dim sub-prose
aligned under the title; dim-cyan bullet for .zip paths with HOME
shortened to ~; dim "›" replaces " > " breadcrumbs; RUN/PASTE/USE/OPEN
markers dimmed; already-styled lines pass through to avoid double-wrap.

* docs: move output polish specs out of ktx
2026-05-19 15:21:49 +02:00
Andrey Avtomonov
86afff56d0
chore: remove private planning docs (#140) 2026-05-19 14:58:55 +02:00
Andrey Avtomonov
b42f418adc
fix: allow agent setup without context (#139)
* fix: allow agent setup without context

* docs: align readme command examples
2026-05-19 12:18:52 +02:00
Luca Martial
eb41d084af
docs: align readme quickstart (#138) 2026-05-18 19:47:28 -04:00
Luca Martial
1331e573dd
Improve KTX agent setup guidance (#137)
* feat(cli): clarify MCP start output

* feat(cli): improve agent setup guidance

* docs: update agent client setup guidance
2026-05-18 18:54:20 -04:00
Andrey Avtomonov
b507ff171d
docs: revamp quickstart and tighten code-block styling (#135)
* docs: streamline quickstart

* feat(docs): simplify quickstart code-block styling

Remove the fake terminal chrome (traffic lights + zsh header) and language
pill from bash blocks, and the teal left-accent from output blocks. Bash
fences now render as minimal cards; text fences route to a muted "output"
preview. Make detectLanguage recursive and enable addLanguageClass in
source.config.ts so Shiki tokens carry through to the renderer. Switch
Shiki themes to min-light / github-dark and disable monospace ligatures so
flag pairs like --agents keep a visible space.

* fix(docs): restore quickstart CI snippets
2026-05-18 19:22:19 +02:00
Andrey Avtomonov
7d156d9a06
feat(docs): visualize KTX ingestion with ReactFlow diagram (#133)
* feat(docs): visualize KTX ingestion with ReactFlow diagram

Reframe the introduction around the two user-facing ingestion outputs (wiki
and executable semantic layer) and replace the static product-mechanics card
flow with a ReactFlow diagram: sources fan into a sequential ingest pipeline,
which forks into wiki and semantic-layer outputs connected by a bidirectional
"references" edge. Drop the .ktx/raw-sources internal-implementation rows from
the intro table and update the content test to guard the new copy.

* Improve KTX docs introduction

* feat(docs): animate ingestion flow with running dots

Replace static smoothstep edges in the introduction page's ingestion
diagram with a custom animated edge that runs glowing cyan dots along
each path, conveying the source → stage → output flow. Dot duration
scales with path length and is hidden under prefers-reduced-motion.

* feat(docs): route ingestion atoms through full source→output journey

Replace per-edge dots with full-journey particles: each atom is born at
a source, threads the entire stage chain, and lands at either the wiki
or semantic layer. Particles are tinted by their source's accent so
the origin is legible. Each source produces exactly 2 atoms (8 total)
to guarantee every input is visibly active, while the destination and
begin offsets are randomized per page load. Particles populate on
client mount to avoid hydration mismatch, and are hidden under
prefers-reduced-motion.
2026-05-18 17:41:37 +02:00
Luca Martial
611f830fe0
fix(docs): restore search overlay behavior (#134) 2026-05-18 10:50:34 -04:00
Luca Martial
6a60977eb5
fix(docs): replace broken page copy buttons with working single button (#132)
The three page-level buttons (Copy MD, View MD, Copy MDX) were broken
because the fetch URL missed the /ktx basePath. Replace with a single
"Copy as Markdown" button that strips frontmatter from the MDX source
already available client-side — no fetch needed. Drop the .md link
since agents discover markdown URLs through llms.txt and content
negotiation.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 09:59:01 -04:00
Luca Martial
c539433d66
docs: tighten guide copy (#131) 2026-05-18 09:57:27 -04:00
Luca Martial
d60d83e595
docs: remove section overview pages (#130) 2026-05-18 09:49:43 -04:00
Andrey Avtomonov
e64da5a85d
feat(ingest): default local ingest to isolated diffs (#128)
* docs: add isolated-diff ingestion design

* Refine isolated-diff ingestion design after adversarial review iteration 1

* Refine isolated-diff ingestion design after adversarial review iteration 2

* Refine isolated-diff ingestion design after adversarial review iteration 3

* feat: persist ingest trace events

* feat: add isolated ingest patch helpers

* feat: validate wiki body semantic references

* feat: add final ingest artifact gates

* feat: execute ingest work units in child worktrees

* feat: integrate isolated work unit patches

* feat: route selected ingest sources through isolated diffs

* test: cover isolated diff ingestion regressions

* feat: add isolated diff ingestion v1 core

* docs: document ingest trace inspection

* docs: add isolated diff ingestion v1 core plan

* fix(ingest): tighten final artifact gates

* fix(ingest): gate isolated final integration tree

* fix(ingest): persist postmortem failure traces

* fix(ingest): trace policy conflicts and cleanup child worktrees

* test(ingest): verify isolated diff postmortem coverage

* docs: add isolated diff ingestion gates and trace closure plan

* fix(ingest): gate provenance before isolated diff squash

* docs: add isolated diff ingestion provenance gate closure plan

* fix(ingest): gate final wiki references

* fix(ingest): enforce SL target connection scope

* fix(ingest): trace isolated SL target policy gates

* test(ingest): cover isolated diff reference and target gates

* chore(ingest): verify isolated diff gate closure

* docs: add isolated diff ingestion reference and target gate closure plan

* fix(ingest): gate global wiki references

* docs: add isolated diff ingestion global wiki reference gate closure plan

* fix(ingest): validate scan sources and wiki refs

* test(ingest): cover isolated diff textual conflict resolver

* test(ingest): cover isolated diff resolver integration

* feat(ingest): repair isolated diff textual conflicts

* feat(ingest): report isolated diff resolver outcomes

* test(ingest): verify isolated diff textual conflict repair

* test(ingest): align textual conflict failure coverage

* docs: add isolated diff textual conflict resolver plan

* test(ingest): cover isolated diff gate repair

* feat(ingest): add isolated diff gate repair agent

* feat(ingest): repair isolated diff semantic gate failures

* feat(ingest): wire isolated diff gate repair

* test(ingest): verify isolated diff final gate repair

* chore(ingest): verify isolated diff gate repair

* docs: add isolated diff gate repair plan

* Improve ingest progress updates

* feat(ingest): route direct-write connectors through isolated diffs

* test(ingest): cover non-metabase isolated diff routing

* feat(ingest): project metricflow semantic models before work units

* test(ingest): verify metricflow isolated projection path

* chore(ingest): verify isolated diff connector migration

* docs: add isolated diff connector migration plan

* feat(ingest): make isolated diff routing the private default

* feat(ingest): promote isolated diff to default runner path

* feat(ingest): default local ingest to isolated diffs

* chore(ingest): remove isolated diff allowlist references

* fix(ingest): preserve transient evidence for isolated work units

* docs: add isolated diff default promotion plan

* refactor(ingest): remove shared worktree WorkUnit path

* docs(ingest): align WorkUnit prompts with isolated diffs

* test(ingest): drop unused runner import

* docs: add isolated diff shared worktree removal plan

* docs: add isolated diff gate repair classification plan

* fix: restrict claude-code mcp servers

* docs: align ingest trace guidance with public CLI

---------

Co-authored-by: Andrey Avtomonov <7889985+andreybavt@users.noreply.github.com>
2026-05-18 13:38:06 +02:00
Andrey Avtomonov
d1c84e5564
fix: improve setup wizard behavior (#127)
* fix: improve setup wizard behavior

* fix: derive runtime versions from release metadata

* test: validate metabase source mapping requirements

* Fix boundary check release identifiers
2026-05-17 19:15:09 +02:00
Andrey Avtomonov
33a142f769
feat(cli): add read-only sql command (#126)
* feat(cli): add read-only sql command

* fix(cli): rename sql connection flag
2026-05-17 10:29:07 +02:00
Andrey Avtomonov
c89af7733a
fix: improve ingest runtime readiness (#124)
* fix: improve ingest runtime readiness

* fix(cli): mock runtime in slow setup tests

* test(cli): isolate setup runtime status
2026-05-17 10:27:29 +02:00
Andrey Avtomonov
f49672ba5b
fix: accept ingest wiki forward refs (#125) 2026-05-17 10:10:14 +02:00
Andrey Avtomonov
74be832aea
feat(cli): improve search ranking output (#123) 2026-05-17 02:32:41 +02:00
Andrey Avtomonov
d3d58a279b
fix(release): repair next npm release workflow (#122)
* fix(ci): run rc releases from next branch

* fix(context): allow release git askpass env

* fix(release): make npm publish noninteractive

* fix(release): use npm trusted publishing

* fix(release): tolerate npm propagation in smoke

* docs(release): document trusted publishing auth
2026-05-17 01:41:07 +02:00
Andrey Avtomonov
de72a10ffb
fix(cli): build runtime assets during dev setup (#121) 2026-05-17 01:04:44 +02:00
Luca Martial
c7e6b5001d
docs: clarify getting started introduction (#120) 2026-05-16 13:25:37 -04:00