Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

README: New in 0.7, and the release gate checks the README (#369)

Oleksandr Ivanchenko538b74450ca0
diff --git a/README.md b/README.md
index a8f10ffa..9cda9254 100644
--- a/README.md
+++ b/README.md
@@ -38,17 +38,23 @@ It's written in Rust (Tokio, Axum, SQLite) with a React web app embedded in the
---
-## New in 0.6
+## New in 0.7
-- **The right bot answers, and says why** (0.6.4). kwant picks the bot by its [rules](docs/channel-routing.md): a name or @mention, small talk to the last speaker, what you taught it, then the words in your message. In `#general`, a question no bot fits goes to the Concierge. One line under the reply says why that bot answers. **Wrong bot?** sends your message to the bot you pick, and kwant remembers it for next time. On a close call between two bots, you choose.
-- **Rules per bot** (0.6.4). **Good for** and **Not for** lists say what each bot should and shouldn't get. **Browser sites** sets which sites its browser may open, which it never opens, and whether it may reach your local network.
-- **One Inbox, one bot list, one Settings** (0.6.3). The Inbox shows what's waiting on you, what finished and what failed, with Loose ends as its second tab. Bots are listed once, grouped by team. Settings has two tabs: This space and All spaces.
-- **Linux app (beta)** (0.6.1). A `.deb` and an AppImage for x86_64 that update themselves with signed updates, like the Mac app.
-- **Mission board on by default** (0.6.2). Hand-offs, routine runs and loose ends show up as cards, and a finished hand-off goes to Review.
-- **Insights** (0.6.0). Verified results per week and what each one cost. When a run reports no cost, the board says "Not reported", never $0.
-- **Flight School and Truth Ledger** (0.6.0, on by default since 0.6.5; every bot starts at Act, and you can switch either off in Settings). Bots earn more freedom per kind of work with scorecards, and only you grant it. Facts that disagree show side by side for you to settle.
+- **Dev mode** (0.7.0; every team's repo since 0.7.2). For spaces where bots write code. One press turns it on, and kwant finds and watches each team's GitHub repo, read only, up to 10 per space. A **Dev desk** at the top of the sidebar has two tabs. **What landed** has one plain-words card per merge, a *Since you last looked* roll-up and **Draft release notes**. **Reviews** has one card per open pull request. The **?** next to the switch says what Dev mode does. [Guide](docs/dev-mode.md)
+- **Reviews by a bot that didn't write the code** (0.7.0). Each card shows a risk badge with its reasons, whether the pull request does what its task asked, and whether a test was weakened. Gitleaks and a registry check run on every pull request: a found secret or a made-up package always makes it High risk. Send a finding back with **Fix it** or **Dismiss** it. A merge gets the **Verified** sticker only when CI is green, another bot reviewed it, and every finding is fixed or dismissed.
+- **Post to GitHub** (0.7.1). One press puts a review card on its pull request as one GitHub review, posted as you, with findings on their lines. kwant never approves, requests changes or merges, a bot can't post, and secrets are never posted.
+- **The production floor** (0.7.0). In a Dev mode space, pushes to the watched or a protected branch, force pushes, deploys, destructive data commands and connections you marked production always ask first, with no "always allow". A step that can change production data waits until the space has a backup from the last 10 minutes. Dev mode cards run with no tools at all, so text in a pull request can't make a bot act.
+- **The Idea jar** (0.7.0). Drop an idea in from the sidebar's **+**, the phone's **Jar** tab or `/idea`. When a bot is free, it writes its take: a verdict, the effort, the risks and a short plan. **Do it** turns a take into a draft mission that still waits for your OK. [Guide](docs/idea-jar.md)
+- **Crypto sends and swaps always ask** (0.7.1). A tool whose arguments carry an amount and an address or a crypto asset counts as a payment, so it asks in every approval mode. [Guide](docs/payments.md)
-Every change is in the [CHANGELOG](CHANGELOG.md).
+<table>
+ <tr>
+ <td width="50%"><img src="site/assets/media/v07-dev-review-1440.webp" alt="A Dev desk review card for pull request #24, Speed up cart totals, written by Ben on Claude Sonnet and reviewed by Cody on Codex, a different engine. It has a Medium risk badge because a test was loosened, two warnings that a test was made easier to pass with the lines that did it, and security checks showing no secrets found and all new packages real."><br><sub><b>Reviews</b>: a bot that didn't write the code checks the pull request, tests and secrets included.</sub></td>
+ <td width="50%"><img src="site/assets/media/v072-dev-repos-four-1440.webp" alt="The Dev desk watching 3 of 4 team repos: Shop, Storefront and Payments are watching, and Ops needs a GitHub connection, with a Connect GitHub button on its row. Below, What landed filters by repo and says 5 changes landed on main and 2 need you, grouped as Code, Account, Checkout and Cart, with Draft release notes."><br><sub><b>What landed</b>: every team's repo on one desk, in plain words.</sub></td>
+ </tr>
+</table>
+
+0.6 added picking the bot that fits each message (and saying why), rules per bot, one Inbox, the Linux app, Insights, Flight School and the Truth Ledger. Every change is in the [CHANGELOG](CHANGELOG.md).
---
@@ -56,6 +62,7 @@ Every change is in the [CHANGELOG](CHANGELOG.md).
- **A team, not a chat tab.** Each bot has its own role, voice ("soul") and model. Bots @mention each other to hand work on, and a team lead runs short discussions and posts one summary. In a channel, kwant picks the bot that fits each message and shows why. The [Laya](#laya-model-router) router picks the model and effort for bots set to `auto`.
- **"Done" means checked.** The [Mission board](docs/mission-control.md) turns work into cards, one per hand-off. A card turns **Verified** only when kwant runs the check itself, such as a test or a file check, and the card keeps the receipt. Files a bot attaches are evidence to look at, never proof on their own.
+- **Dev mode for code.** When bots write code, the [Dev desk](docs/dev-mode.md) shows what landed in each team's repo in plain words, and a bot that didn't write a pull request reviews it, tests and secrets included. Pushes to main, deploys and other production steps always ask first.
- **Facts with sources.** Bots back web facts with a link that opens the page at the exact quote. kwant checks the quote is on the page word for word and refuses one that isn't.
- **Spaces.** Separate spaces for work, a side project and home. Each has its own bots, teams, channels, routines, accounts, approval rule and hiring rule.
- **Every account you have.** Several accounts per engine: Claude, Codex or Grok CLI logins, Anthropic, OpenAI or xAI keys, and your own OpenAI- or Anthropic-compatible server. Set a default and a priority order. When an account runs out of usage, the turn moves to the next one and the chat says so. You can pin a bot to one account.
diff --git a/scripts/site_release_gate.py b/scripts/site_release_gate.py
index 41f069fd..a173353c 100644
--- a/scripts/site_release_gate.py
+++ b/scripts/site_release_gate.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
-"""kwant.si must show the newest release before that release counts as done.
+"""kwant.si and the GitHub README must show the newest release before that release counts as done.
-Reads the newest `## [Mac X.Y.Z]` heading in CHANGELOG.md and checks site-src/:
+Reads the newest `## [Mac X.Y.Z]` heading in CHANGELOG.md and checks site-src/ and README.md:
1. features.html has a "New in" section for it: `id="new-<id>"`, where <id> is the version without dots or a
trailing .0 (0.7.0 -> new-07, 0.7.1 -> new-071, 0.6.11 -> new-0611), or any section whose `data-covers` lists
@@ -10,11 +10,14 @@ Reads the newest `## [Mac X.Y.Z]` heading in CHANGELOG.md and checks site-src/:
3. Every guide the CHANGELOG entry names (`docs/NAME.md`) has a page, site-src/docs-NAME.html, or an entry in
GUIDE_PAGES saying where the site covers it.
4. Every screenshot, video and media file that site-src names exists in site/assets/media.
+5. README.md has a `## New in X.Y` section for the release's minor version, and that section names the release
+ (0.7.2 as "(0.7.2)" on a bullet, say). A small fix release with no bullet of its own can be named in an HTML
+ comment in the section: `<!-- covers: 0.7.3 -->`.
Usage: python3 scripts/site_release_gate.py [--warn]
-Exit 0 when kwant.si is current, else 1 with one line per gap. --warn prints the gaps and exits 0: check_site.py
-uses it, because the release PR bumps CHANGELOG.md before the site PR lands. The release script uses the strict
-form, so a release isn't done until the site is.
+Exit 0 when kwant.si and the README are current, else 1 with one line per gap. --warn prints the gaps and exits 0:
+check_site.py uses it, because the release PR bumps CHANGELOG.md before the site PR lands. The release script uses
+the strict form, so a release isn't done until the site and the README are.
"""
import re
import sys
@@ -31,6 +34,7 @@ GUIDE_PAGES = {
}
HEAD = re.compile(r"^## \[Mac (\d+\.\d+\.\d+)\] - \d{4}-\d{2}-\d{2}\s*$", re.M)
+README_NEW = re.compile(r"^## New in (\d+)\.(\d+)\s*$", re.M)
def section_id(version):
@@ -48,6 +52,23 @@ def newest(changelog):
return m[1], changelog[m.end(): m.end() + nxt.start()] if nxt else changelog[m.end():]
+def readme_gap(version, readme):
+ """None when README.md's "## New in X.Y" section names `version`, else the gap. The section ends at the next
+ `## ` heading or `---` rule."""
+ major, minor, _ = version.split(".")
+ for m in README_NEW.finditer(readme):
+ if (m[1], m[2]) != (major, minor):
+ continue
+ end = re.search(r"^(?:## |---\s*$)", readme[m.end():], re.M)
+ body = readme[m.end(): m.end() + end.start()] if end else readme[m.end():]
+ if re.search(rf"(?<![0-9.]){re.escape(version)}(?![0-9])", body):
+ return None
+ return (f"README.md: the 'New in {major}.{minor}' section doesn't name {version} (add a bullet tagged "
+ f"({version}), or <!-- covers: {version} --> for a fix release)")
+ return (f"README.md: no '## New in {major}.{minor}' section for {version} (replace the old New in section "
+ f"with one for {major}.{minor}, its bullets tagged by version)")
+
+
def media_files(name):
if name.startswith("phone-"):
return [f"{name}-390.webp", f"{name}-780.webp"]
@@ -90,6 +111,10 @@ def gaps(root=ROOT):
missing.setdefault(f, []).append(page.name)
for f, pages in sorted(missing.items()):
out.append(f"site/assets/media/{f} is missing (used in {', '.join(pages)})")
+ readme = root / "README.md"
+ gap = readme_gap(version, readme.read_text()) if readme.exists() else "README.md is missing"
+ if gap:
+ out.append(gap)
return out
@@ -100,7 +125,7 @@ def main():
for g in found:
print(("WARN " if warn else "GAP ") + g)
if not found:
- print(f"kwant.si covers {version}")
+ print(f"kwant.si and README.md cover {version}")
sys.exit(0 if warn or not found else 1)
diff --git a/scripts/test_site_release_gate.py b/scripts/test_site_release_gate.py
new file mode 100644
index 00000000..69b0ca7d
--- /dev/null
+++ b/scripts/test_site_release_gate.py
@@ -0,0 +1,72 @@
+"""The release gate's README check: README.md's "New in X.Y" section must name the newest release."""
+import tempfile
+import unittest
+from pathlib import Path
+
+import site_release_gate as gate
+
+CHANGELOG = "# Changelog\n\n## Unreleased\n\n## [Mac 0.7.2] - 2026-11-06\n\n### Added\n- Things.\n\n" \
+ "## [Mac 0.7.1] - 2026-11-06\n"
+
+
+def readme(section):
+ return "# kwant\n\nIntro.\n\n---\n\n" + section + "\n---\n\n## Why kwant\n\n- 0.7.2 is mentioned here too.\n"
+
+
+class ReadmeGap(unittest.TestCase):
+ def test_section_naming_the_release_passes(self):
+ self.assertIsNone(gate.readme_gap("0.7.2", readme("## New in 0.7\n\n- **Repos** (0.7.2). Text.\n")))
+
+ def test_covers_comment_passes(self):
+ text = readme("## New in 0.7\n\n- **Dev mode** (0.7.0).\n<!-- covers: 0.7.2 -->\n")
+ self.assertIsNone(gate.readme_gap("0.7.2", text))
+
+ def test_old_minor_section_is_a_gap(self):
+ gap = gate.readme_gap("0.7.2", readme("## New in 0.6\n\n- **Routing** (0.6.4).\n"))
+ self.assertIn("no '## New in 0.7' section", gap)
+
+ def test_section_missing_the_patch_is_a_gap(self):
+ gap = gate.readme_gap("0.7.2", readme("## New in 0.7\n\n- **Dev mode** (0.7.0, 0.7.1).\n"))
+ self.assertIn("doesn't name 0.7.2", gap)
+
+ def test_version_outside_the_section_does_not_count(self):
+ # "Why kwant" below the rule mentions 0.7.2; only the New in section counts.
+ self.assertIn("doesn't name", gate.readme_gap("0.7.2", readme("## New in 0.7\n\n- **A** (0.7.0).\n")))
+
+ def test_longer_version_does_not_count(self):
+ self.assertIn("doesn't name", gate.readme_gap("0.7.2", readme("## New in 0.7\n\n- **A** (0.7.20).\n")))
+ self.assertIn("doesn't name", gate.readme_gap("0.7.2", readme("## New in 0.7\n\n- **A** (10.7.2).\n")))
+
+
+class Gaps(unittest.TestCase):
+ def tree(self, readme_text):
+ root = Path(self.tmp.name)
+ (root / "site-src").mkdir()
+ (root / "site" / "assets" / "media").mkdir(parents=True)
+ (root / "CHANGELOG.md").write_text(CHANGELOG)
+ (root / "site-src" / "features.html").write_text('<section id="new-072" class="fgroup"></section>')
+ (root / "site-src" / "index.html").write_text('<a href="features.html#new-072">New</a>')
+ if readme_text is not None:
+ (root / "README.md").write_text(readme_text)
+ return root
+
+ def setUp(self):
+ self.tmp = tempfile.TemporaryDirectory()
+
+ def tearDown(self):
+ self.tmp.cleanup()
+
+ def test_current_site_and_readme_have_no_gaps(self):
+ self.assertEqual(gate.gaps(self.tree(readme("## New in 0.7\n\n- **A** (0.7.2).\n"))), [])
+
+ def test_stale_readme_is_the_only_gap(self):
+ found = gate.gaps(self.tree(readme("## New in 0.6\n\n- **A** (0.6.4).\n")))
+ self.assertEqual(len(found), 1)
+ self.assertTrue(found[0].startswith("README.md: no '## New in 0.7' section"))
+
+ def test_missing_readme_is_a_gap(self):
+ self.assertEqual(gate.gaps(self.tree(None)), ["README.md is missing"])
+
+
+if __name__ == "__main__":
+ unittest.main()