Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f1957e3
feat(metrics): add SQL dialect config and Hazards Metric
avidianity Nov 24, 2026
e672961
feat(plugins): add SQL Language plugin core for generic SQL and four …
avidianity Nov 24, 2026
7eec7fc
Merge branch 'feat/224-wave1-sql-core' into feat/224-sql-and-hazards
avidianity Nov 24, 2026
46294fa
feat(report): add Hazards, rejected statements, and SQL schemas
avidianity Nov 24, 2026
41d63b6
Merge branch 'feat/224-wave2-report' into feat/224-sql-and-hazards
avidianity Nov 24, 2026
a4df81b
feat(plugins): add SQL schema builder and schema-backed hazard rules
avidianity Nov 24, 2026
cf434fc
feat(plugins): add 27 statement-level SQL Hazard line rules
avidianity Nov 24, 2026
42d3dc1
Merge branch 'feat/224-wave2-sql-schema' into feat/224-sql-and-hazards
avidianity Nov 24, 2026
5fd5444
Merge branch 'feat/224-wave2-sql-hazards-27' into feat/224-sql-and-ha…
avidianity Nov 24, 2026
bc7f6f8
docs(docs): document SQL plugin, Dialects, Hazards Metric, and SQL Sc…
avidianity Nov 24, 2026
b32988d
feat(cli): wire SQL Language plugin, Dialects, schema pass, Hazards M…
avidianity Nov 24, 2026
5a4f73e
Merge branch 'feat/224-wave2c-cli-conformance' into feat/224-sql-and-…
avidianity Nov 24, 2026
065414a
fix(plugins): eliminate SQL false positives found in dialect proof
avidianity Nov 24, 2026
07ffb95
fix(plugins): preserve str::lines bounds for bare CR in SQL tokenizer
avidianity Nov 24, 2026
fb47cc7
feat(plugins): calibrate and publish SQL Reference ranges
avidianity Nov 24, 2026
7a9ed6d
fix(plugins): resolve SQL Round 1 crashes, verifier findings, and cac…
avidianity Nov 24, 2026
d22e824
fix(plugins): make SQL SetExpr walkers iterative and cap parsed state…
avidianity Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .rules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Agent guidance

codeint is a command-line tool that measures the Software entropy of a codebase, in any language that has a Language plugin, so that developers who work with coding agents see it grow before it compounds.
Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, and Go.
codeint is a command-line tool that measures the Software entropy of a codebase, and reports Hazards next to Software entropy, in any language that has a Language plugin, so that developers who work with coding agents see it grow before it compounds.
Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, Go, and SQL.
Test gap measures untested Production Function mass from user-named LCOV or Cobertura XML Coverage reports; codeint never runs tests and never guesses report paths.

Kit: avidianity/factory v0.4.0, bootstrapped 2026-11-21.
Expand Down
89 changes: 85 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ codeint-lang-go = { path = "plugins/languages/go" }
codeint-lang-php = { path = "plugins/languages/php" }
codeint-lang-python = { path = "plugins/languages/python" }
codeint-lang-rust = { path = "plugins/languages/rust" }
codeint-lang-sql = { path = "plugins/languages/sql" }
codeint-lang-ts = { path = "plugins/languages/ts" }
codeint-metrics = { path = "crates/metrics" }
codeint-model = { path = "crates/model" }
Expand All @@ -37,6 +38,7 @@ schemars = "=1.2.3"
serde = { version = "=1.0.229", features = ["derive"] }
serde-saphyr = { version = "=2.1.1", default-features = false, features = ["deserialize"] }
serde_json = "=1.0.154"
sqlparser = "=0.64.0"
syn = { version = "=2.0.119", features = ["full", "visit"] }
tempfile = "=3.27.0"
thiserror = "=2.0.21"
Expand Down
6 changes: 3 additions & 3 deletions GLOSSARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# codeint

codeint measures the Software entropy of a codebase, in any language that has a Language plugin: Erosion, Cognitive complexity, Test gap, Duplication, Verbosity, Import cycles, Import boundaries, Orphan files, and Dependency hygiene.
codeint measures the Software entropy of a codebase (Erosion, Cognitive complexity, Test gap, Duplication, Verbosity, Import cycles, Import boundaries, Orphan files, and Dependency hygiene) and reports Hazards next to Software entropy, in any language that has a Language plugin.
It is for developers whose code is increasingly written by coding agents, so they see Software entropy grow before it compounds.
Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, and Go.
Built-in Language plugins cover TypeScript/JavaScript/Vue/Svelte, Rust, PHP, Dart, Python, Go, and SQL.

## Language

Expand Down Expand Up @@ -92,7 +92,7 @@ A package declared by a repository workspace or by a module manifest such as `go
_Avoid_: subpackage, member package, workspace member

**Finding**:
One located piece of evidence behind a Metric value, such as an eroded function, an untested function, a Clone group, a Flagged line, or an Import cycle.
One located piece of evidence behind a Metric value, such as an eroded function, an untested function, a Clone group, a Flagged line, a Hazard line, or an Import cycle.
_Avoid_: issue, violation, warning, hotspot

**Reference range**:
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Coding agents write locally valid code very quickly.
Each pull request can pass tests and linters while quietly adding copied blocks, redundant branches, deeper functions, unused dependencies, and tangled imports.
Over dozens of changes, that structural drag compounds until both humans and agents slow down.

codeint measures **Software entropy** directly from the shape of your source code so you see it grow before it compounds.
It ships with six built-in Language plugins covering TypeScript/JavaScript (including React `.jsx`/`.tsx`, Vue, and Svelte `<script>` blocks), Rust, PHP, Dart, Python, and Go, plus sandboxed WebAssembly Plugins for other languages and custom Metrics.
codeint measures **Software entropy** directly from the shape of your source code so you see it grow before it compounds, and reports **Hazards** next to Software entropy ([ADR 0016](./docs/adr/0016-hazards-next-to-software-entropy.md)).
It ships with seven built-in Language plugins covering TypeScript/JavaScript (including React `.jsx`/`.tsx`, Vue, and Svelte `<script>` blocks), Rust, PHP, Dart, Python, Go, and SQL, plus sandboxed WebAssembly Plugins for other languages and custom Metrics.

## How it works

Expand All @@ -54,6 +54,7 @@ Additional independent Metrics and structural checks run in the same pass:
- **Orphan files**: Production files unreachable from manifest-declared, program-start, and configured `entry_points`, classified as `unreferenced` or `test-only`.
- **Dependency hygiene**: three independent Metrics (`unused_dependencies`, `unlisted_dependencies`, and `dev_in_production_dependencies`) comparing `package.json`, `Cargo.toml`, `pyproject.toml`, `composer.json`, `pubspec.yaml`, and `go.mod` against imported external packages while excluding standard-library built-ins.
- **Architectural import boundaries**: named zones, built-in `layered` and `hexagonal` presets, `public_files` encapsulation, directional `allow`/`deny` rules, and pre-edit `codeint guard <path>` checks before a file even exists on disk.
- **Hazards**: share of source lines matching AST-only Hazard line rules for patterns likely to cause wrong results, slow execution, or a security exposure, reported next to Software entropy with strict non-leakage (path, line, and rule name only, never source text) and 32 built-in SQL rules including 5 schema-backed rules ([Hazards guide](./docs/guide/hazards.md), [SQL guide](./docs/guide/sql.md), [ADR 0016](./docs/adr/0016-hazards-next-to-software-entropy.md)).

Every file belongs to one **Source set** (`production`, `test`, `generated`, or `vendored`), so fixtures and generated code never distort Production ratios.
**Budgets** cap absolute ratios in `codeint check`, while `codeint diff <base>` ratchets every pull request against its Git merge-base.
Expand Down Expand Up @@ -86,7 +87,7 @@ Read [docs/guide/philosophy-and-architecture.md](./docs/guide/philosophy-and-arc

## Calibrated Reference ranges

10th to 90th percentile across 20 pre-2023 open-source repositories per language or framework ([ADR 0008](./docs/adr/0008-typescript-reference-ranges.md), [ADR 0010](./docs/adr/0010-rust-reference-ranges.md), [ADR 0011](./docs/adr/0011-php-reference-ranges.md), [ADR 0012](./docs/adr/0012-dart-reference-ranges.md), [ADR 0013](./docs/adr/0013-python-reference-ranges.md), [ADR 0014](./docs/adr/0014-vue2-reference-ranges.md), [ADR 0015](./docs/adr/0015-vue3-reference-ranges.md), [ADR 0020](./docs/adr/0020-react-reference-ranges.md), [ADR 0021](./docs/adr/0021-go-reference-ranges.md)):
10th to 90th percentile across 20 pre-2023 open-source repositories per language or framework ([ADR 0008](./docs/adr/0008-typescript-reference-ranges.md), [ADR 0010](./docs/adr/0010-rust-reference-ranges.md), [ADR 0011](./docs/adr/0011-php-reference-ranges.md), [ADR 0012](./docs/adr/0012-dart-reference-ranges.md), [ADR 0013](./docs/adr/0013-python-reference-ranges.md), [ADR 0014](./docs/adr/0014-vue2-reference-ranges.md), [ADR 0015](./docs/adr/0015-vue3-reference-ranges.md), [ADR 0020](./docs/adr/0020-react-reference-ranges.md), [ADR 0021](./docs/adr/0021-go-reference-ranges.md), [ADR 0022](./docs/adr/0022-sql-reference-ranges.md)):

| Language | Erosion | Duplication | Verbosity | Import cycles |
| -------- | ------- | ----------- | --------- | ------------- |
Expand All @@ -99,6 +100,7 @@ Read [docs/guide/philosophy-and-architecture.md](./docs/guide/philosophy-and-arc
| Dart | 4.7% to 41.9% | 7.3% to 25.6% | 8.0% to 25.9% | 7.3% to 52.4% |
| Python | 14.4% to 62.4% | 1.2% to 20.1% | 1.4% to 20.4% | 0.0% to 32.1% |
| Go | 37.9% to 69.2% | 4.4% to 18.1% | 4.5% to 18.3% | 0.0% to 0.0% |
| SQL | 9.4% to 97.6% | 4.2% to 92.1% | 4.2% to 92.1% | absent |

See [docs/guide/languages.md](./docs/guide/languages.md) for per-language rules and sample repository timings.

Expand Down Expand Up @@ -155,7 +157,7 @@ let pr_diff = diff(Path::new("."), "main", &DiffOptions::default())?;

## Documentation

- [Guide](./docs/guide/README.md): walkthroughs for [Philosophy and Architecture](./docs/guide/philosophy-and-architecture.md), [Getting Started](./docs/guide/getting-started.md), [Configuration](./docs/guide/configuration.md), [Test gap](./docs/guide/test-gap.md), [Built-in Languages](./docs/guide/languages.md), [Go](./docs/guide/go.md), [CI and GitHub Actions](./docs/guide/ci-and-github-actions.md), and [Coding-Agent Integration (MCP)](./docs/guide/mcp.md).
- [Guide](./docs/guide/README.md): walkthroughs for [Philosophy and Architecture](./docs/guide/philosophy-and-architecture.md), [Getting Started](./docs/guide/getting-started.md), [Configuration](./docs/guide/configuration.md), [Test gap](./docs/guide/test-gap.md), [Hazards](./docs/guide/hazards.md), [Built-in Languages](./docs/guide/languages.md), [Go](./docs/guide/go.md), [SQL](./docs/guide/sql.md), [CI and GitHub Actions](./docs/guide/ci-and-github-actions.md), and [Coding-Agent Integration (MCP)](./docs/guide/mcp.md).
- [Reference](./docs/reference.md): tested reference for every command, flag, exit code, report format (`toon`, `json`, `sarif`, `markdown`, `text`), and configuration key.
- [Programmatic API](./docs/programmatic.md): JavaScript/TypeScript SDK and Rust library API.
- [Plugins](./docs/plugins.md): build, hash, declare, and test external WebAssembly Language and Metric plugins.
Expand Down
1 change: 1 addition & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ codeint-lang-go = { workspace = true }
codeint-lang-php = { workspace = true }
codeint-lang-python = { workspace = true }
codeint-lang-rust = { workspace = true }
codeint-lang-sql = { workspace = true }
codeint-lang-ts = { workspace = true }
codeint-metrics = { workspace = true }
codeint-model = { workspace = true }
Expand Down
Loading
Loading