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

# cant

> cant package overview

## Functions & Classes

| Symbol                                                                                  | Kind     | Description                                                                      |
| --------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------- |
| [`parseMarkdownSections()`](/packages/cant/api/index#parsemarkdownsections)             | function | Parse markdown content into classified sections.  Splits on `##` and `###` he... |
| [`classifySection()`](/packages/cant/api/index#classifysection)                         | function | Classify a markdown section based on its heading and content.  Uses heuristic... |
| [`extractProperties()`](/packages/cant/api/index#extractproperties)                     | function | Extract key-value properties from markdown bullet lists.  Matches patterns li... |
| [`extractPermissions()`](/packages/cant/api/index#extractpermissions)                   | function | Extract permission entries from markdown content.  Handles two formats: 1. St... |
| [`headingToIdentifier()`](/packages/cant/api/index#headingtoidentifier)                 | function | Normalize a heading into a valid CANT identifier.  Converts "Code Review Agen... |
| [`headingToEventName()`](/packages/cant/api/index#headingtoeventname)                   | function | Map a hook heading to a CAAMP event name.  Converts headings like "On Session... |
| [`getCaampEvents()`](/packages/cant/api/index#getcaampevents)                           | function | Get the full set of CAAMP event names.                                           |
| [`serializeCantDocument()`](/packages/cant/api/index#serializecantdocument)             | function | Serialize a CANT document IR into .cant file text.  Produces a complete .cant... |
| [`formatValue()`](/packages/cant/api/index#formatvalue)                                 | function | Format a property value for .cant output.  - Strings are double-quoted - Arra... |
| [`propertiesToIR()`](/packages/cant/api/index#propertiestoir)                           | function | Convert extracted properties to CANT property IR format.  Maps known markdown... |
| [`migrateMarkdown()`](/packages/cant/api/index#migratemarkdown)                         | function | Migrate a markdown file to CANT format.  Parses the markdown into sections, c... |
| [`showDiff()`](/packages/cant/api/index#showdiff)                                       | function | Show a color-coded diff of the migration result.  Displays: - A summary heade... |
| [`showSummary()`](/packages/cant/api/index#showsummary)                                 | function | Generate a simple text-only summary (no color).  Suitable for logging or non-... |
| [`isNativeAvailable()`](/packages/cant/api/index#isnativeavailable)                     | function | Check if the native addon is available                                           |
| [`cantParseNative()`](/packages/cant/api/index#cantparsenative)                         | function | Parse a CANT message using the native addon                                      |
| [`cantClassifyDirectiveNative()`](/packages/cant/api/index#cantclassifydirectivenative) | function | Classify a directive using the native addon                                      |
| [`initCantParser()`](/packages/cant/api/index#initcantparser)                           | function | Initialize the CANT parser  With napi-rs native addons, this is a no-op (nati... |
| [`parseCANTMessage()`](/packages/cant/api/index#parsecantmessage)                       | function | Parse a CANT message  If the native addon is available, uses the Rust cant-co... |
| [`initWasm()`](/packages/cant/api/index#initwasm)                                       | function | Initialize the WASM module Must be called before using any WASM functions        |
| [`isWasmAvailable()`](/packages/cant/api/index#iswasmavailable)                         | function | Check if WASM is available                                                       |
| [`cantParseWASM()`](/packages/cant/api/index#cantparsewasm)                             | function | Parse a CANT message using WASM                                                  |
| [`cantClassifyDirectiveWASM()`](/packages/cant/api/index#cantclassifydirectivewasm)     | function | Classify a directive using WASM                                                  |

## Types & Interfaces

| Symbol                                                                    | Kind      | Description                                                                      |
| ------------------------------------------------------------------------- | --------- | -------------------------------------------------------------------------------- |
| [`MigrationOptions`](/packages/cant/api/index#migrationoptions)           | interface | Options controlling migration behavior.                                          |
| [`MigrationResult`](/packages/cant/api/index#migrationresult)             | interface | Result of migrating a single markdown file.                                      |
| [`ConvertedFile`](/packages/cant/api/index#convertedfile)                 | interface | A single converted .cant output file.                                            |
| [`UnconvertedSection`](/packages/cant/api/index#unconvertedsection)       | interface | A section of markdown that was not converted.                                    |
| [`MarkdownSection`](/packages/cant/api/index#markdownsection)             | interface | A parsed markdown section identified by heading.  Used internally by the mark... |
| [`SectionClassification`](/packages/cant/api/index#sectionclassification) | type      | Classification of a markdown section for conversion purposes.                    |
| [`ExtractedProperty`](/packages/cant/api/index#extractedproperty)         | interface | A key-value property extracted from a markdown bullet list.  Matches patterns... |
| [`ExtractedPermission`](/packages/cant/api/index#extractedpermission)     | interface | A permission entry extracted from markdown.  Matches patterns like...            |
| [`CantDocumentIR`](/packages/cant/api/index#cantdocumentir)               | interface | Intermediate representation of a CANT document for serialization.  This is th... |
| [`CantBlockIR`](/packages/cant/api/index#cantblockir)                     | interface | A CANT block (agent, skill, hook, or workflow).                                  |
| [`CantPropertyIR`](/packages/cant/api/index#cantpropertyir)               | interface | A single property key-value pair.                                                |
| [`NativeParseResult`](/packages/cant/api/index#nativeparseresult)         | interface | Shape returned by the native Rust WASM cantParse function.                       |
| [`DirectiveType`](/packages/cant/api/index#directivetype)                 | type      |                                                                                  |
| [`ParsedCANTMessage`](/packages/cant/api/index#parsedcantmessage)         | interface |                                                                                  |

## Other Exports

| Symbol                                                                      | Kind     | Description |
| --------------------------------------------------------------------------- | -------- | ----------- |
| [`vitest.config.ts`](/packages/cant/api/index#vitestconfigts)               | file     |             |
| [`types.ts`](/packages/cant/api/index#typests)                              | file     |             |
| [`markdown-parser.ts`](/packages/cant/api/index#markdown-parserts)          | file     |             |
| [`serializer.ts`](/packages/cant/api/index#serializerts)                    | file     |             |
| [`converter.ts`](/packages/cant/api/index#converterts)                      | file     |             |
| [`diff.ts`](/packages/cant/api/index#diffts)                                | file     |             |
| [`index.ts`](/packages/cant/api/index#indexts)                              | file     |             |
| [`isWasmAvailable`](/packages/cant/api/index#iswasmavailable)               | variable |             |
| [`initWasm`](/packages/cant/api/index#initwasm)                             | variable |             |
| [`native-loader.ts`](/packages/cant/api/index#native-loaderts)              | file     |             |
| [`types.ts`](/packages/cant/api/index#typests)                              | file     |             |
| [`parse.ts`](/packages/cant/api/index#parsets)                              | file     |             |
| [`index.ts`](/packages/cant/api/index#indexts)                              | file     |             |
| [`wasm-loader.ts`](/packages/cant/api/index#wasm-loaderts)                  | file     |             |
| [`parse.test.ts`](/packages/cant/api/index#parsetestts)                     | file     |             |
| [`converter.test.ts`](/packages/cant/api/index#convertertestts)             | file     |             |
| [`diff.test.ts`](/packages/cant/api/index#difftestts)                       | file     |             |
| [`markdown-parser.test.ts`](/packages/cant/api/index#markdown-parsertestts) | file     |             |
| [`roundtrip.test.ts`](/packages/cant/api/index#roundtriptestts)             | file     |             |
| [`serializer.test.ts`](/packages/cant/api/index#serializertestts)           | file     |             |
