File size: 2,438 Bytes
0a7e835
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Supported Format Schemas

This document outlines the specific structures the Intelligent Markdown Converter looks for to detect and parse different types of documents into selectable components.

---

## 1. Repo2Markdown Format

**Purpose:** To represent a project's directory structure and the full contents of its files in a single document.

**Schema Rules:**
1.  The document **must** contain a second-level heading exactly named \`## File Structure\`.
2.  The document **must** contain at least one file block, denoted by a third-level heading starting with \`### File:\`.
3.  For proper syntax highlighting, code files should have their content wrapped in fenced code blocks (e.g., \`\`\`python ... \`\`\`).

---

## 2. Standard README Format

**Purpose:** To parse a typical software project \`README.md\` file into its major sections.

**Schema Rules:**
1.  The document **must** start with a top-level heading (\`#\`).
2.  The document **must** contain at least one second-level heading (\`##\`). Each \`##\` heading and its content becomes a "Section" component.

---

## 3. Changelog Format

**Purpose:** To parse a standard "Keep a Changelog" formatted file into components for each version.

**Schema Rules:**
1.  The document **must** contain at least one version heading that follows the pattern: \`## [VersionNumber] - YYYY-MM-DD\`.
2.  Each version heading and its content becomes a "Version" component.

---

## 4. Agent Action Format

**Purpose:** To describe a series of programmatic actions and file manipulations for an agent to take on a Hugging Face Space.

**Schema Rules:**
1.  The document is detected by the presence of a \`### HF_ACTION:\` command or the specific header text "File and Code Formatting:".
2.  **File definitions** use the format \`### File: path/to/filename.ext\`, followed by a fenced code block or a binary file marker. These become "File" components.
3.  **File structure definitions** use the heading \`## File Structure\`, followed by a fenced code block. This becomes a "Structure" component.
4.  **Agent commands** are specified on a single line starting with \`### HF_ACTION: COMMAND arguments...\`. Each command becomes an "Action" component.
5.  All other text is grouped into an "Instructions & Rules" component.

**Example:**
\`\`\`markdown
**File and Code Formatting:**
When you provide NEW code...
...
**Hugging Face Space Actions:**
...

### HF_ACTION: DELETE_FILE old_app.py