flex-md 4.4.2 → 4.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +55 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -629,7 +629,61 @@ Detailed guides can be found in the [docs](./docs) folder:
629
629
  - [Token Estimation Guide](./docs/token-estimation.md) - How estimation works
630
630
  - [Smart Toolbox Guide](./docs/smart-toolbox.md) - Using analysis features
631
631
  - [MDFlex Compliance Spec](./docs/mdflex-compliance.md) - Output enforcement
632
- - [OFS Syntax Guide](./SPEC.md) - Output Format Spec syntax
632
+
633
+ ## Output Format Spec (OFS) Syntax Reference
634
+
635
+ Flex-MD uses a simple Markdown block to define the expected output contract. This block is both machine-readable (for validation) and human-readable (for the LLM).
636
+
637
+ ### 1. Basic Structure
638
+
639
+ Start with `## Output format`. List sections using `- Name — Kind`.
640
+
641
+ ```markdown
642
+ ## Output format
643
+ - Summary — text (required)
644
+ - Reasoning — ordered list (required)
645
+ - Key Tags — list (optional)
646
+ ```
647
+
648
+ ### 2. Available Kinds
649
+
650
+ | Kind | Description | Validation Rule |
651
+ | :--- | :--- | :--- |
652
+ | `text` (or `prose`) | Any text content. | Always matches if section exists. |
653
+ | `list` | Unordered bullets. | Body must contain `- items`. |
654
+ | `ordered list` | Numbered list. | Body must contain `1. items`. |
655
+ | `table` | Markdown table. | Must match column headers. |
656
+
657
+ ### 3. Tables
658
+
659
+ Define tables by specifying columns in parentheses.
660
+
661
+ ```markdown
662
+ Tables:
663
+ - (Name, Age, Role — table)
664
+ - (Rank, Team, Score — ordered table)
665
+ ```
666
+
667
+ - **table**: Standard Markdown pipe table.
668
+ - **ordered table**: Must have a first column `#` with row numbers `1..N`.
669
+
670
+ ### 4. Instructions & Constraints
671
+
672
+ You can add instructions under any section item to guide the LLM.
673
+
674
+ ```markdown
675
+ - Summary — text
676
+ Length: 2-3 sentences. No bullet points.
677
+ ```
678
+
679
+ ### 5. Empty Sections
680
+
681
+ Define what to write if a section has no content:
682
+
683
+ ```markdown
684
+ Empty sections:
685
+ - If a section is empty, write `None`.
686
+ ```
633
687
 
634
688
  ## Migration from v3.0
635
689
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flex-md",
3
- "version": "4.4.2",
3
+ "version": "4.4.6",
4
4
  "description": "Parse and stringify FlexMD: semi-structured Markdown with three powerful layers - Frames, Output Format Spec (OFS), and Detection/Extraction.",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -54,7 +54,7 @@
54
54
  "dependencies": {
55
55
  "nd": "^1.2.0",
56
56
  "nx-helpers": "^1.5.0",
57
- "nx-json-parser": "^1.1.0",
57
+ "nx-json-parser": "^1.2.1",
58
58
  "nx-md-parser": "^2.2.0"
59
59
  }
60
60
  }