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:
secretsforbidden_importsboundaryauth_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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| watchllm_kernel-0.1.1.tar.gz | 34.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| watchllm_kernel-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.0 kB
Release files / watchllm_kernel-0.1.1.tar.gz
| Download URL | watchllm_kernel-0.1.1.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2c68ad87b3904c1f4b1bef8ce7b37dc6bff820b00ca84549d26062b148d6b90
|
|
BLAKE2b-256 checksum How to use checksums |
ffaf3b433fc43a2f2e4858403d40b9d52055006211bc98831556e073152ca0c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / watchllm_kernel-0.1.1-py3-none-any.whl
| Download URL | watchllm_kernel-0.1.1-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fdb8f86ea51789fcd7f6e29362c2c3d78ef5f497a2c7533d48bdaec83fc2ca9
|
|
BLAKE2b-256 checksum How to use checksums |
8d32dd0b9889f3538c44146e0392d33b8f5ba65c2f200e879e6aec10faf8ec03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for watchllm-kernel 0.1.1
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.