Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mehen.ophi.dev/llms.txt

Use this file to discover all available pages before exploring further.

The Markdown LOC family separates physical lines by what they contain. A 1,000-line file with 700 lines of code fences is not the same artifact as a 1,000-line prose file, and a single SLOC count would hide that.

What mehen emits

KeyMeaning
MD.DLOCPhysical Markdown lines (everything).
MD.PLOCProse lines (narrative paragraphs, headings, list text).
MD.CLOCCode-fence and indented-code lines.
MD.TLOCTable lines.
MD.MLOCMath block lines.
MD.BLOCBlank lines.
MD.ALOCArtifact lines = CLOC + TLOC + MLOC + diagram / raw HTML / MDX lines.

Derived ratios

Each component / max(1, DLOC) produces a ratio:
  • ArtifactLineRatio
  • CodeLineRatio
  • TableLineRatio
  • MathLineRatio
  • BlankLineRatio
These ratios drive document classification (prose-dominant vs. artifact-dominant) and anomaly detection.

Worked example

# Auth API

Brief intro paragraph.

```ts
export async function login(): Promise<Session> { /* … */ }
```

| Field | Required |
|---|---|
| `email` | yes |
loc:
  dloc: 11
  ploc: 4
  cloc: 3
  tloc: 3
  mloc: 0
  bloc: 2
  aloc: 6

References

  • Park, R. E. (1992). Software Size Measurement: A Framework for Counting Source Statements. CMU/SEI-92-TR-20 — the standard reference for LOC categorization that this Markdown family extends to prose / code / table / math / blank lines. SEI report.
  • CommonMark Spec: Container blocks and leaf blocks — the parser-level distinctions the per-construct counts rely on.

See also