onsager-ai/kirzner
概要
記事をさまざまなメディアチャネルに自動配信する記事公開プラットフォーム
デザイン・メディア計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- -2
- 1か月
- -7
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルKirzner
A lightweight, local-first business workspace for solo founders and small AI-native teams. Kirzner helps turn a brief into an evidence-backed opportunity and experiment, prepare work for an external agent, review returned materials, and record actual actions, outcomes, and adopted learning.
Kirzner owns business records and founder decisions. External agents own their model loops, tools, credentials, execution permissions, retries, and scheduling. Kirzner does not run agents, contact prospects, or automatically retry external writes. Research can stand alone; founders can self-prepare.
Formerly ArtiPub
Kirzner is the transferred and renamed continuation of
ArtiPub (formerly
crawlab-team/artipub). The standalone legacy repository
tikazyq/artipub points to Kirzner as its
continuation. The final pre-rewrite ArtiPub codebase, an unmaintained
2019–2021 publisher built with Express, MongoDB, Puppeteer, and a Chrome
extension, is preserved on the legacy/artipub branch and
artipub-legacy-final tag at commit c67d6006. Kirzner replaces it with a local-first SQLite workspace,
deterministic manual handoff bundles for Chinese developer platforms (掘金,
知乎, CSDN, 思否, 博客园, V2EX, 简书, 开源中国), and a standalone
kirzner campaign CLI for hash-approved Bluesky and GitHub Releases publishing
with read-back reconciliation. The campaign logic ported from ArtiPub retains
its BSD-3-Clause notice; Kirzner core is MIT licensed. See
THIRD_PARTY_NOTICES.md.
Run locally
Requires Rust 1.95.0, Node 22.12+, and npm. SQLite is embedded.
npm --prefix frontend ci
npm --prefix frontend run build
cargo run --locked
# Open http://127.0.0.1:4317
Agents use a kz_agent_ bearer token to submit business briefs, research,
experiment drafts, and returns to POST /api/workspace. They can create articles
with POST /api/articles, update them with PUT /api/articles/{id}, and prepare
packages with POST /api/articles/{id}/package. New packages are stored for
review under a pending proposal version.
In the Exception queue, the owner can open the article's adapted packages and
choose Approve to record decide_proposal with approved: true for that
version. Use the trusted local UI or a kz_owner_ bearer token for owner
decisions and for POST /api/publish/record. Draft preparation, draft
verification, and public URL recording require explicit approval of the package's
proposal version. A supplied bearer token determines the request's write
permissions. A kz_mon_ bearer token has read-only scope.
The Article radar shows each destination's evidence and links.
Review returns in Handoffs and make next-step and learning decisions in Results.
Core rules:
- Changed proposals need fresh approval; earlier decisions and late returns retain their original version.
- Execution, deliverable acceptance, external effects, and business outcomes are separate records.
- Unknown effects need explicit reconciliation before more preparation or an action. Imports never retry external writes.
- Conflicting returns remain inspectable; they do not replace the effective return.
- Results use the original criteria. Learning enters future context only after explicit adoption.
Manual publication handoff
The ArtiPub publishing workflow is being migrated from its legacy Puppeteer and cookie-scraping architecture to deterministic local handoff packages. A founder reviews and publishes each handoff package manually, then records the live URL against the approved Kirzner experiment version.
Import UTF-8 Markdown with frontmatter and local image references, then package it for an approved experiment proposal:
cargo run --locked -- article import article.md
cargo run --locked -- publish package --experiment experiment-1 --version 1 \
--article <id-or-path> --platform juejin --out packages
Each package has a deterministic <article-id>/<platform>/ directory with
manifest.json, article.md, assets/, and checklist.md. Zhihu packages
also include supervised-draft.json with the operator-controlled draft
verification contract. For local images,
the checklist gives their upload order and reminds you to replace each relative
assets/... link in article.md with the URL returned by the platform's image
uploader. After publishing, record the live HTTPS URL under Manual override or
use the package digest printed by publish package with the CLI:
cargo run --locked -- publish record --experiment experiment-1 --version 1 \
--package-digest <sha256> --url https://example.com/published-article
Supported manual handoff platforms are generic, juejin (掘金), zhihu
(知乎), csdn (CSDN), segmentfault (思否), cnblogs (博客园), v2ex
(V2EX), jianshu (简书), and oschina (开源中国). Recorded live URLs are tied
to the Kirzner experiment and proposal version; Kirzner records the founder's
evidence and does not verify remote publication. If you edit an experiment
proposal after creating a package, approve the new proposal version before
making a current recording. Otherwise, keep the package's original version
when recording evidence for a publication already made.
Copyable article and walkthrough
Save this as article.md:
---
title: A small experiment
summary: What I tried and what I learned
tags: [founder-tools, experiment]
---
## What I tested
I shared a short guide with readers and tracked whether it led to a useful
conversation. This is a sample article; replace it with your own work.
Import the article, then package it for an experiment whose current proposal you have approved. Use that experiment's ID and approved version from its Kirzner workspace:
cargo run --locked -- article import article.md
cargo run --locked -- publish package --experiment <experiment-id> \
--version <approved-version> --article <id-from-import> \
--platform juejin --out packages
Open packages/<article-id>/juejin/, follow checklist.md in 掘金's editor,
and review the rendered post before publishing. Then record the published URL
using the package digest and the same experiment version. In the experiment's
Results view, review the recorded action against the original success criteria
and add the observed outcome; Kirzner keeps that evidence with the experiment.
Supervised browser pre-fill
The encrypted browser_session store and pre-fill runner are implemented;
live creator-editor runs remain unverified pending playwright-core runtime
setup. Pre-fill ends with the operator reviewing and confirming the draft.
On a Unix desktop with Node, installed frontend dependencies, and visible Chromium,
run these commands from a trusted Kirzner checkout. The operator supplies a
Playwright storageState export through piped stdin or --file. Remove any
plaintext export after confirming import. Reimporting the same provider and
account rotates the credential in place. Use the existing
KIRZNER_MASTER_KEY setup and the same KIRZNER_DATA_DIR for both commands.
kirzner credentials import-browser-session --provider juejin --account my-account \
--file /path/to/private/storage-state.json
kirzner browser prefill --platform juejin --credential <id> --post draft.json
kirzner browser prefill --platform juejin --credential <id> --post draft.json \
--approval-hash <sha256>
Draft JSON has title, body (or caption), optional tags as strings, and
optional images as PNG, JPEG, or WebP paths relative to the JSON file.
The first pre-fill command prints a hash for review. The approved run checks
the hash against the selected credential, platform, fields and image bytes,
then checks agent-workbench ops thermal gate before opening Chromium. Set
CHROMIUM_PATH if using a system Chromium executable.
The receipt is printed while the browser is open. On needs_human_verification,
handle the prompt in the browser. On needs_owner_input, inspect any filled
fields and finish unsupported editor steps manually. On
ready_for_owner_confirm, review the draft and use the editor's final action
yourself. WeChat OA supports draft save. Close the window to let Kirzner finish
the run and release its lock. Supported platforms are 掘金 (juejin), 知乎
(zhihu), 小红书 (xiaohongshu), and WeChat OA (wechat_oa). Use the
manual handoff for V2EX.
For a staged campaign post, copy the command from its channel's Handoff
Pack, or run kirzner browser prefill --campaign <slug> --post <post-slug> --channel <platform>. It loads the tracked title, copy, tags and images in
upload order. The command uses the only active browser session for the
channel when one is available. If several match, add --credential <id>.
You can omit --channel when the credential identifies the platform.
Review the draft and rerun with --approval-hash <sha256> to open the browser.
Posted channels are refused. Drafts require --allow-draft, and explicit
hold markers in the notes such as Hold: awaiting review require
--allow-held. For an inline draft, supply --title and --body in place
of the JSON file and repeat --image <path> for each image in upload order.
Approved campaigns
Campaigns use a standalone Markdown file. Run these commands from its directory.
kirzner campaign plan campaign.md
kirzner campaign approve campaign.md
kirzner campaign run campaign.md
kirzner campaign status campaign.md
The runner uses BLUESKY_HANDLE and BLUESKY_APP_PASSWORD for Bluesky, and
GITHUB_TOKEN for GitHub releases. To use an encrypted Bluesky credential, run
kirzner campaign run campaign.md --use-credential-store --bluesky-credential <id>.
HTTPS_PROXY (or https_proxy) applies to
Bluesky requests and link cards. GitHub requests connect directly. Check the
Bluesky route with kirzner campaign check-bluesky-health.
To publish images, add an images list to a Bluesky campaign item.
images:
- path: screenshots/dashboard.png
alt: Dashboard showing campaign results by week
Use one to four PNG, JPEG, or WebP files, each at most 976,560 bytes.
Relative paths resolve from the campaign directory. Kirzner reads the image
dimensions unless you supply aspect_ratio: {width: 16, height: 9}. Images
take the place of the automatic link card. Links in the post remain clickable.
Changes to image bytes, alt text, or aspect ratio require renewed approval.
To make a thread, list the posts in order with the same Bluesky handle. Run
kirzner campaign plan campaign.md to get a post's request_key, then put it
in the next item's reply_to_request_key field. A reply waits for Bluesky to
confirm the root and parent records against their saved receipts. Each post
can have one direct reply. The runner checks for existing posts
before writing and records public success after AppView readback.
The runner exits with status 1 if any result is still unresolved or held. For
an unknown Bluesky write, kirzner campaign reconcile campaign.md <item> --absent
records absence only when the saved PDS returns HTTP 400 RecordNotFound.
A later approved run checks that same record key before writing. If a crashed
process leaves .kirzner.lock, confirm that no campaign command is active
before removing the empty lock directory and running again.
Campaign tracking and phone handoffs
Run kirzner campaign-track import manifest.json with the same
KIRZNER_DATA_DIR as the app, then open the Campaigns tab. Use a new slug and
ID for a new approved batch. To update an existing campaign with the same ID
and slug, run kirzner campaign-track import --upsert manifest.json. You can
omit unchanged posts and channels. Existing posted channels retain their
content, assets, and publication evidence.
Run kirzner campaign-track preflight <slug> [--post <post-slug>] [--json]
to check staged copy, local images, and stored credential status offline.
Readiness errors cause exit code 1 only for approved channels without a hold.
Use kirzner publish x --campaign <slug> --post <post-slug> to get the
approval hash for a staged X item. The hash-approved run publishes the item
and records the confirmed URL. See X credentials and publishing.
Use kirzner publish bluesky --campaign <slug> --post <post-slug> to get
the approval hash for a staged Bluesky item. Pass the reviewed hash with
--approval-hash to publish using a stored app password. Kirzner records
the URL after Bluesky's public AppView confirms the post. See
Bluesky credentials and publishing.
- At the top level, provide
slug,title,start_date,end_date, andposts.iddefaults to the slug anddescriptionis optional. UseYYYY-MM-DDfor calendar dates. - Each post has
seq,slug,title,target_date,approval_ref, andchannels. The optionaliddefaults to its slug. Give each new post one entry for every channel (bluesky,x,linkedin,wechat_oa,v2ex,juejin,zhihu, andxiaohongshu). - Each channel has
channelandmode(auto,prefill,pack, ormanual_only). Useprefillorpackfor WeChat andmanual_onlyfor V2EX. Juejin, Zhihu, and Xiaohongshu also supportprefill, which opens a draft for the owner to review and publish. Supplycopy_text,tagsas a string array, an HTTPStarget_url, and anynotesas needed.statusdefaults toapproved. Entries already posted require an RFC 3339posted_atand can includeposted_urlandowner_steps. - Supply
assetsin upload order. Each entry contains apathrelative to the manifest, optionalalt_text, and an optional expectedsha256as lowercase hex. Kirzner copies PNG, JPEG, and WebP files up to 10 MiB each into the local content store.
Mark Posted records the owner's confirmation. It defaults to two steps
for a text pack, three for an image pack, or zero for an automated channel.
Set pack_steps per channel when a measured handoff differs. Published
counts posts with a recorded publication on at least one channel. Average
steps divides the recorded steps by the number of tracked posts.
Campaign summaries count distinct channels configured as auto or prefill
in automated_channels_count and prefill_channels_count, respectively.
non_manual_channels_count counts distinct channels across both modes.
Local data
The default database is data/kirzner.sqlite3; uploaded files are in
data/files. Migrations run at startup. KIRZNER_DATA_DIR, KIRZNER_PORT, and
KIRZNER_FRONTEND_DIR customize local paths and port; set
KIRZNER_ALLOWED_ORIGINS to allow exact origins when a tailnet reverse proxy serves the UI. The app binds
IPv4 loopback and serves one local workspace.
Backup
Stop Kirzner first. Back up the SQLite database and referenced files together. Restore into a fresh data directory.
python3 scripts/backup.py backup backups/first --data-dir data
python3 scripts/backup.py restore backups/first --data-dir restored-data
KIRZNER_DATA_DIR=restored-data cargo run --locked
KIRZNER_DATA_DIR selects the data directory; Kirzner stores its database at
<data-dir>/kirzner.sqlite3 (default data/kirzner.sqlite3) and uploads at
<data-dir>/files. External URLs are references and are not copied. See
architecture for storage, return, and compatibility
boundaries.
Validation
cargo fmt --all -- --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --locked
npm --prefix frontend run build
The browser journey requires a fresh running app and Chromium:
CHROMIUM_PATH=/path/to/chromium npm --prefix frontend run test:browser.
CI runs the browser journey and worked example with synthetic data. See
worked example for its evidence labels and limits.
関連プロジェクトを探す
読み込み中…