Skip to main content

WatchLLM Kernel

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░  ░░░░  ░░░      ░░░        ░░░      ░░░  ░░░░  ░░  ░░░░░░░░  ░░░░░░░░  ░░░░  ░
▒  ▒  ▒  ▒▒  ▒▒▒▒  ▒▒▒▒▒  ▒▒▒▒▒  ▒▒▒▒  ▒▒  ▒▒▒▒  ▒▒  ▒▒▒▒▒▒▒▒  ▒▒▒▒▒▒▒▒   ▒▒   ▒
▓        ▓▓  ▓▓▓▓  ▓▓▓▓▓  ▓▓▓▓▓  ▓▓▓▓▓▓▓▓        ▓▓  ▓▓▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓        ▓
█   ██   ██        █████  █████  ████  ██  ████  ██  ████████  ████████  █  █  █
█  ████  ██  ████  █████  ██████      ███  ████  ██        ██        ██  ████  █
████████████████████████████████████████████████████████████████████████████████

Deterministic local write-path governance kernel for autonomous coding agents.

Current status

Task 14 complete — core model layer, parser abstraction, fixture corpus, rule implementations, deterministic decision engine, CLI evaluation interface, end-to-end regression tests, baseline performance benchmarks, and local blocked-event reporting exist. Save-path editor integration is not implemented yet.

Installation

python -m pip install -e .

Usage

watchllm-kernel --help
python -m watchllm_kernel --help

Fixture corpus

Rule evidence fixtures live under tests/fixtures/rules/.

Each MVP rule category has a minimal pass/ and fail/ fixture set:

  • secrets
  • forbidden_imports
  • boundary
  • auth_flow

These fixtures are rule evidence examples and are used by rule-specific tests as each rule is implemented.

Implemented rules

Secret-literal rule

The secret-literal rule detects hardcoded credential patterns in assignment contexts and dangerous call contexts. It uses AST context to avoid flagging safe retrieval calls such as process.env.STRIPE_SECRET or os.getenv("STRIPE_SECRET").

Forbidden-import rule

The forbidden-import rule blocks dangerous imports such as child_process and disallowed relative traversal imports. It extracts ES module imports and CommonJS require(...) calls using AST traversal rather than raw text scanning.

Boundary rule

The boundary rule checks AST-extracted import edges against a small declared boundary map. In the current policy, auth may import the public DB contract but must not import db/internal paths directly.

Circular dependency detection is explicitly deferred because Task 08 evaluates single-file import edges only, not a repository-wide import graph.

Auth-flow rule

The auth-flow rule checks calls inside an exported handler function and requires an explicit auth guard before protected database operations such as db.user.update(...).

Current Task 09 behaviour is intentionally narrow:

  • mutation before auth returns FAIL
  • auth before mutation returns PASS
  • auth found only inside an ambiguous branch before mutation returns INCONCLUSIVE

Repository-wide control-flow analysis is not implemented yet.

Decision engine

The decision engine runs a supplied ordered list of rules against one source buffer and reduces their rule results into one KernelResult.

In enforce mode, any rule failure produces BLOCK.

In shadow mode, rule failures are preserved in the result but the final decision remains ALLOW.

For Task 10, INCONCLUSIVE rule results are recorded but do not block.

Benchmarks

Run the current Python kernel benchmark suite with:

python benchmarks/run_benchmarks.py --iterations 50 --warmup 5 --json

Benchmark baseline documentation lives in docs/benchmarks/baseline.md.

Local violation reporting

Blocked evaluations are written locally as JSONL.

Default path:

.watchllm/logs/violations.jsonl

Override path:

WATCHLLM_LOG_PATH=/tmp/watchllm-violations.jsonl python -m watchllm_kernel evaluate path/to/file.ts --json

The reporting contract is documented in docs/specs/reporting-contract.md.

Non‑goals (current state)

  • No save-path editor integration yet
  • No cloud dependency or network enforcement

Metadata

Release files for watchllm-kernel 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for watchllm-kernel 0.1.2
File Size Uploaded Provenance Actions
watchllm_kernel-0.1.2.tar.gz 33.0 kB Without provenance Details for watchllm_kernel-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for watchllm-kernel 0.1.2
File Interpreter ABI Platform Actions
watchllm_kernel-0.1.2-py3-none-any.whl Python 3 none any Details for watchllm_kernel-0.1.2-py3-none-any.whl

Total release size: 58.0 kB

Release files / watchllm_kernel-0.1.2.tar.gz

Download URL watchllm_kernel-0.1.2.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
82ff42b2f79d46f016dd423f5e4900d9ea8c182932b84b33dc963a8717659736
BLAKE2b-256 checksum
How to use checksums
fc77857d3a20ea6ae64a8f8a00ea89d64d59644ea57b43fffc7db05743a99cdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / watchllm_kernel-0.1.2-py3-none-any.whl

Download URL watchllm_kernel-0.1.2-py3-none-any.whl
Size 25.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18b3fca2825cfc0692bec3c401822f114012e25454b01fa3dc262d879130832d
BLAKE2b-256 checksum
How to use checksums
aef57a9b235a311d4b1e9db114651f25c813da60e7f02ad737674bf95a5c6b36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for watchllm-kernel 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page