> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monolex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Monograph: Code Bug Patterns

> A standalone offline Book of detector- and CWE-keyed code fault classes, with retrieval, scan carrier, authoring, and embedded-integrity commands.

`monograph-code-bug-patterns` is a slim, offline, one-Book build of
[Monograph](/ai-clis/monograph). It embeds type-level fault and weakness
classes covering concurrency, memory safety, injection, resource lifetime,
error handling, cryptography, access control, and API misuse.

*Published contract: `monograph-code-bug-patterns 0.6.4`, OpenCLIs build
`2026-07-12-105002`. The executing binary, OpenCLIs registry, and public CDN
metadata agree on this release.*

The slim binary exposes **11 commands** and no network/package-management
surface. Its source manifest is already stamped `0.6.5`; the command and
runtime facts below are for the public `0.6.4` payload.

## Quick Start

```bash theme={null}
openclis install monograph-code-bug-patterns

monograph-code-bug-patterns --version
monograph-code-bug-patterns match --cwe CWE-78
monograph-code-bug-patterns read BOC-CWE78-COMMAND-INJECTION
```

## Complete Command Reference

| Command                 | What it does                                                                 | Boundary                                                                                  |
| ----------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `match --band <signal>` | Performs O(1) lookup by the Book's authored `detection.signal`.              | In `0.6.4`, a canonical foundry band name may differ; fall back to CWE or exact entry id. |
| `match --cwe <CWE-id>`  | Performs primary O(1) CWE lookup.                                            | A hit is a candidate to confirm.                                                          |
| `read <entry-id>`       | Prints the complete embedded entry.                                          | Exact id.                                                                                 |
| `search <symptom>`      | Runs keyword fallback browse.                                                | Natural-language retrieval, not detector proof.                                           |
| `resonate <query>`      | Runs engine-ranked retrieval plus causal resonance.                          | Richer browse path.                                                                       |
| `related <entry-id>`    | Follows typed causal edges.                                                  | Exact id.                                                                                 |
| `toc`                   | Lists entries by chapter.                                                    | Read-only.                                                                                |
| `scan <file>`           | Fires code bands, gates them, and attaches this Book's matching entry.       | `--db`; `--hook-claude` provides the Pre/PostToolUse carrier.                             |
| `add <CWE> <slug>`      | Scaffolds a Code Bug Patterns draft into an explicitly selected source Book. | `--book <dir>`; optional `--chapter`/`--title`; refuses overwrite.                        |
| `verify`                | Re-hashes the embedded Book against its build-time SHA-256 digest.           | Offline integrity check.                                                                  |
| `version`               | Prints the executing version.                                                | Read-only.                                                                                |
| `help`                  | Prints the installed guide.                                                  | No arguments also show it.                                                                |

This distribution has no multi-Book `books`, `open`, `lint`, `index`,
`install`, `update`, `remove`, `prune`, or package `list` surface. It is frozen
to one embedded Book and performs no package-network operation. A local
`--book <dir>` remains available for source authoring; other Book ids do not.

It also has no `docs`, `mcp`, or `mcp-schema` command. No arguments, `help`,
and `--help` print the compact installed guide.

## Release Platforms

The `0.6.4` metadata publishes five platform artifacts:

| Platform key      | Binary                            |
| ----------------- | --------------------------------- |
| `darwin-aarch64`  | `monograph-code-bug-patterns`     |
| `linux-aarch64`   | `monograph-code-bug-patterns`     |
| `linux-x86_64`    | `monograph-code-bug-patterns`     |
| `windows-aarch64` | `monograph-code-bug-patterns.exe` |
| `windows-x86_64`  | `monograph-code-bug-patterns.exe` |

Use [Monogram Semantics](/ai-clis/monogram-semantics) for the FIRE side of
`scan`, and full [Monograph](/ai-clis/monograph) when routing or signed
installable Book packages are required.
