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

# Comments

> Add rich Markdown comments to your documents with live preview

## Overview

Add contextual information to your documents using Markdown-formatted comments. Provide context that helps both humans and AI understand your content.

## Markdown Comments

### Comment System Overview

MemoryLake's comment system uses Markdown, allowing you to create rich, formatted notes for any file or folder.

**Features**:

* **Markdown Formatting**: Headers, lists, bold, italic, code blocks, links
* **Live Preview**: See rendered output as you type
* **Auto-Save**: Draft protection prevents data loss

### Creating Comments

<Steps>
  <Step title="Open Comment Editor">
    Select a file or folder and open the comment panel (usually on the right side).
  </Step>

  <Step title="Write Your Comment">
    Use the Markdown editor to compose your comment. You can use:

    * `# Headers` for structure
    * `**bold**` and `*italic*` for emphasis
    * `- Lists` for organization
    * `` `code` `` for technical terms
    * `[links](url)` for references
  </Step>

  <Step title="Preview Your Content">
    The live preview pane shows how your Markdown will render.

    <Tip>
      Use the preview to verify formatting before saving, especially for complex Markdown with tables or code blocks.
    </Tip>
  </Step>

  <Step title="Save Comment">
    Click "Save" to store your comment with the file.
  </Step>
</Steps>

### Markdown Syntax Reference

Here's a quick reference for common Markdown formatting:

#### Headers

```markdown theme={null}
# H1 Header
## H2 Header
### H3 Header
```

#### Text Formatting

```markdown theme={null}
**Bold text**
*Italic text*
~~Strikethrough~~
`Inline code`
```

#### Lists

```markdown theme={null}
Unordered list:
- Item 1
- Item 2
  - Nested item

Ordered list:
1. First item
2. Second item
3. Third item
```

#### Links and Images

```markdown theme={null}
[Link text](https://example.com)
![Image alt text](https://example.com/image.png)
```

#### Code Blocks

````markdown theme={null}
```javascript
function example() {
  return "Code with syntax highlighting";
}
```
````

#### Blockquotes

```markdown theme={null}
> This is a quoted text
> It can span multiple lines
```

#### Tables

```markdown theme={null}
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1   | Data 2   | Data 3   |
| Data 4   | Data 5   | Data 6   |
```

### Comment Examples

<AccordionGroup>
  <Accordion title="Research Document Comment">
    ```markdown theme={null}
    # Research Paper: Q1 2024 Analysis

    ## Summary
    This paper analyzes market trends for Q1 2024 with focus on:
    - Consumer behavior shifts
    - Competitive landscape changes
    - Budget allocation recommendations

    ## Key Findings
    1. **Consumer Spending**: Up 15% YoY
    2. **Market Share**: Gained 3 percentage points
    3. **ROI**: Exceeded targets by 12%

    ## Related Documents
    - [Budget Planning](/path/to/budget.xlsx)
    - [Previous Quarter Analysis](/path/to/q4-analysis.pdf)

    ## Next Steps
    - Review with leadership team
    - Incorporate feedback
    - Finalize recommendations
    ```
  </Accordion>

  <Accordion title="Project Folder Comment">
    ```markdown theme={null}
    # Project: Website Redesign

    ## Project Overview
    Complete redesign of the company website with modern UX and improved conversion rates.

    **Timeline**: Q1-Q2 2024
    **Budget**: $150,000
    **Team**: 8 members

    ## Folder Contents
    - `/design` - Mockups and design files
    - `/requirements` - Requirements documents
    - `/research` - User research and competitive analysis

    ## Important Notes
    ⚠️ All designs must be approved by marketing before development
    💡 Prioritize mobile-first approach
    ✅ Accessibility compliance required (WCAG 2.1 AA)
    ```
  </Accordion>

  <Accordion title="Data File Comment">
    ```markdown theme={null}
    # Dataset: Customer Survey Results 2024

    ## Data Description
    Survey responses from 1,500 customers collected in January 2024.

    **Format**: CSV
    **Columns**: 45
    **Rows**: 1,500

    ## Key Columns
    - `customer_id` - Unique identifier
    - `satisfaction_score` - 1-10 scale
    - `nps_score` - Net Promoter Score
    - `comments` - Free-text feedback

    ## Data Quality
    - ✅ All required fields populated
    - ✅ Validated against schema
    - ⚠️ 23 rows have missing optional fields

    ## Usage Notes
    Use this data for:
    1. Satisfaction trend analysis
    2. NPS calculation and tracking
    3. Identifying improvement areas

    **Do not** share externally without anonymization.
    ```
  </Accordion>
</AccordionGroup>

## Comment Management

### Editing Comments

To modify an existing comment:

1. Select the file or folder
2. Open the comment panel
3. Edit the Markdown text
4. Save changes

### Deleting Comments

To remove a comment entirely:

1. Open the comment editor
2. Delete all text
3. Click "Save"

<Warning>
  Deleting comments is permanent and cannot be undone. Consider adding a "DEPRECATED" header instead if you might need the information later.
</Warning>

## Best Practices

<AccordionGroup>
  <Accordion title="Writing Effective Comments">
    **Do**:

    * Be concise but complete
    * Use headers to organize long comments
    * Include context others might not have
    * Link to related documents
    * Update comments when content changes

    **Don't**:

    * Write novel-length comments (keep it scannable)
    * Include sensitive information in comments on shared files
    * Duplicate information that's in the file itself
    * Leave outdated comments
  </Accordion>

  <Accordion title="Markdown Formatting Tips">
    * Use `#` headers to create structure
    * Lists make content scannable
    * **Bold** key terms for quick identification
    * Code blocks for technical content
    * Tables for structured data
    * Links to connect related documents
  </Accordion>

  <Accordion title="Accessibility">
    * Use headers in hierarchical order (H1, then H2, not H1 then H3)
    * Provide descriptive link text (not "click here")
    * Add alt text for any images
    * Keep language clear and simple
    * Use lists for better screen reader support
  </Accordion>
</AccordionGroup>

## Integration with Projects

Comments enhance project workflows:

* **Project Context**: Comments provide context when documents are associated with projects
* **AI Understanding**: AI models accessing via MCP servers can read comments to understand document purpose
* **Team Collaboration**: Comments help team members understand document relationships and history
* **Search**: Comments are searchable, making documents easier to find

## Next Steps

<CardGroup cols={2}>
  <Card title="File Operations" icon="folder" href="/features/memorylake/document-management/file-folder-operations">
    Learn basic file and folder operations
  </Card>

  <Card title="Project Association" icon="diagram-project" href="/features/memorylake/project-management/document-association">
    Link documents to projects
  </Card>

  <Card title="Library API" icon="code" href="/features/memorylake/api-reference/library/overview">
    Manage files programmatically via API
  </Card>
</CardGroup>
