@kenshiki/config
v1.3.0
Published
Shared Biome, ESLint and TypeScript configuration and agent instructions for Kenshiki repositories.
Readme
@kenshiki/config
Shared Biome, ESLint and TypeScript configuration for Kenshiki repositories. Install it pinned exactly
(npm i -D -E @kenshiki/config); Renovate opens the bump PRs.
The package holds only what every repository agrees on. File includes, overrides and per-repository limits (cognitive complexity, generated files) stay in the repository's own config.
Biome
{ "extends": ["@kenshiki/config/biome"], "files": { "includes": ["**", "!**/dist"] } }Two-space indent, 110 columns, double quotes, trailing commas, semicolons; recommended rules plus
noExplicitAny, noEmptyBlockStatements, useConst, unused variables and imports as errors, and
noConsole as a warning.
ESLint (type-aware rules only)
Biome owns formatting and general lint. ESLint runs the rules that need the TypeScript checker.
Requires eslint and typescript-eslint in the repository.
import { typeAware } from "@kenshiki/config/eslint";
export default typeAware({ files: ["src/**/*.ts"], tsconfigRootDir: import.meta.dirname });no-floating-promises (no void escape), no-misused-promises, await-thenable, no-useless-catch.
TypeScript
{ "extends": "@kenshiki/config/tsconfig", "compilerOptions": { "target": "ES2023", "module": "ESNext", "moduleResolution": "Bundler" } }Strictness only: strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride,
noFallthroughCasesInSwitch, verbatimModuleSyntax, isolatedModules, noEmit. Target, module, lib
and types stay in the repository.
Activity in Slack
A summary of everyone's local work, posted to a Slack channel before anything reaches origin, whoever made it: Claude Code, Codex, another agent or hand edits. It watches git, not the agent.
************************
*Test Person* · kenshiki-ci · `feat/hooks`
Adding … so that …
*Scope:* a feature spanning …
*Where:* the shared config package, …
_Claude Code · 0 commits not pushed · 7 files uncommitted_The header and status line come from git; claude -p (KENSHIKI_ACTIVITY_MODEL, default claude-sonnet-5-5)
writes the sentence on the task, Scope and Where from commit messages, agent records, the README's opening
paragraph and the changed paths counted per directory. It does not judge progress.
Each person, once per machine (macOS):
security add-generic-password -a "$USER" -s kenshiki-slack-webhook -w 'https://hooks.slack.com/services/...'
npx @kenshiki/config activity install # --roots <dir>[,<dir>…]; default ~/Developer
npx @kenshiki/config activity scan --dry-run # what would post now, changes nothing
npx @kenshiki/config activity status # is it working: agent loaded, webhook found, last scan recent and not failedEvery scan writes one timestamped line to the log, including activity: 0 posted and activity: FAIL …, so a
quiet channel and a dead poster are told apart by status, not by guessing. A failed post is retried on the
next scan.
install copies the package to ~/.kenshiki/config and loads a launchd agent that runs activity scan
every 10 minutes (log: ~/.kenshiki/activity.log; activity uninstall removes it). A scan visits every
checkout directly under the roots and each of its worktrees. A worktree posts when its commit, diff or
untracked files changed since its last post: at once the first time, then at most every
KENSHIKI_ACTIVITY_MINUTES (default 30). A worktree seen for the first time only records a baseline, so
installing never floods the channel. State lives in each checkout's .git/kenshiki-activity/; nothing is
committed.
Each repository, once: agent records add what the session set out to do. Without one a post still goes out, from commits and the diff, marked "no agent session recorded".
npx @kenshiki/config hooks sync # copies the Claude Code recorder into .claude/hooks/ and registers it in .claude/settings.json
npx @kenshiki/config hooks check # fails when the hook file drifted or a registration is missingCommit both files. sync keeps the repository's own settings and hooks. The recorder writes the session's
first prompt, latest prompt and latest reply to .git/kenshiki-activity/sessions/.
Releasing
Bump version in package.json, merge, then push the tag config-vX.Y.Z. The publish workflow checks
the tag matches the version and publishes with the NPM_TOKEN secret.
