@booga/bsmell
v0.2.0
Published
Prompt lookup tool. Agent names a smell category from a fixed list; bsmell returns the prompt for that smell category. The prompt tells the agent how to check the session for that smell.
Downloads
412
Readme
bsmell
For agents that take shortcuts. bsmell returns a directive for a smell category selected by the caller. The caller supplies the category after inspecting a session transcript or diff, and bsmell emits the corresponding SMELL-DETECTED directive describing how to investigate that category. The smell taxonomy is closed at this version; the prompt library evolves continuously via empirical-lift evaluation, so the same selected category can receive stricter guidance as the corpus matures.
Prompt lookup tool. Agent names a smell category from a fixed list; bsmell returns the prompt for that smell category. The prompt tells the agent how to check the session for that smell.
Built for agentic loops. Looks up a selected category from a closed 15-category smell taxonomy, writes the directive on stdout, and exits with a discriminating code so the calling agent can branch. Automatic transcript or diff matching is not part of this release.
bsmell scan --category <name> emit the directive for a supported smell category; exit 0 / 1 / 2 / 64
bsmell categories list the 15 supported smell-category identifiers
bsmell init scaffold a manifest in the current directory
bsmell update self-update to the latest published version
bsmell tail stream recent verdict transcripts
bsmell explain print taxonomy + exit-code referenceExit code contract: 0 clean (no smell), 1 smell detected, 2 internal error, 64 malformed input.
Install
cargo install --git https://github.com/bvasilenko/bSmellUse
bsmell scan --category red-herring --session ./session.jsonl
# stdout: SMELL-DETECTED: red-herring ...
# exit: 1
bsmell scan --category mock-instead-of-fix --diff ./PR-feature-x.diff --json
# stdout: {"schema_version":1,"outcome":"finding","directive":"..."}
# exit: 1scan requires --category <smell-category>. Optional flags: --session <path-or-fd>, --diff <path>, --manifest <path>, --json, --quiet, --reason <text>. The session and diff paths are accepted as caller-supplied evidence context; this release does not classify their contents automatically.
Environment variables
| Variable | Purpose | Default |
|---|---|---|
| BSUITE_UPDATE_BASE_URL | Base URL for the bsmell update manifest endpoint | placeholder (update will fail without a real endpoint) |
| BSUITE_TRANSCRIPT_DIR | Override the transcript directory path | platform XDG/AppSupport/LocalAppData default |
| BSUITE_TRANSCRIPT_RETENTION_DAYS | Transcript retention window in days | 90 |
| BSUITE_OVERLAY_PATH | Override the signed manifest-overlay path | binary install directory |
| BSUITE_OVERLAY_PUBKEY_PATH | Override the manifest-overlay verifying-key path | binary install directory |
| BSUITE_HOST_CONTEXT | CMS adapter host context tag, set by adapters | default host context |
Transcript writing is best-effort. A transcript write failure does not change the stdout directive or exit code because stdout is the primary command contract. Invalid signed overlays fail visibly during startup and are not treated like absent overlays.
Corpus status
The v0 corpus embedded in this release is fixture material. It is hand-authored seed content used until an evolved corpus ships in a later release, and it is not production trust material.
Smell taxonomy
Closed 15-variant SmellCategory enum. The taxonomy is fixed at this version; widening lands in a later version.
| Category | Variants |
|---|---|
| Engineering | try-except-swallow, hardcoded-value, mock-instead-of-fix, silent-success, unaudited-edit, acceptable-degradation |
| Scope | scope-creep, scope-shrink |
| Behavioral | pride-defense, time-sink, red-herring, symptom-mute |
| CMS edge | schema-violation-silent-coerce, regulated-term-omission, synonym-hallucination |
bsmell categories prints the full list.
License
MIT.
