# Parisneo Lollms Vs Coder Lollms Client Discussion Mastering

> 1. Data Zones: The Context Layers

- Skill: `tomevault-io/parisneo-lollms-vs-coder-lollms-client-discussion-mastering` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/parisneo-lollms-vs-coder-lollms-client-discussion-mastering`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/parisneo-lollms-vs-coder-lollms-client-discussion-mastering/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/parisneo-lollms-vs-coder-lollms-client-discussion-mastering

---


## 1. Data Zones: The Context Layers
LoLLMs uses a layered context approach. When you call `get_full_data_zone()`, it assembles these layers in specific order:
1.  **Memory**: Long-term facts.
2.  **User Data Zone**: Global user preferences (e.g., "I prefer Python 3.10").
3.  **Discussion Data Zone**: Metadata for the specific task (e.g., "Currently working on Chapter 3").
4.  **Personality Data Zone**: Temporary data from tools (e.g., RAG search results).
5.  **Active Artefacts**: The content of versioned documents.

```python
# Direct manipulation of session context
discussion.user_data_zone = "User Role: Senior Architect"
discussion.discussion_data_zone = "Project Goal: Build a FastAPI backend."
```

## 2. The Memory System
Memory can be manually set or automatically extracted using `memorize()`.
- **Manual**: Best for explicit facts.
- **Auto-Memorize**: Asks the LLM to extract technical content and solutions from the history.

```python
# Auto-extract facts from current conversation
memory_entry = discussion.memorize() 
# Returns {"title": "...", "content": "..."} if successful
```

## 3. Versioned Artefact System
Artefacts are persistent documents that survive conversation turns. They support metadata and full version control.

### A. Creation & Metadata
Always use XML tags. The system stores attributes like `author`, `source`, and `description`.

```xml
<artefact name="outline.md" type="document" author="ParisNeo" description="Book Structure">
# Book Outline
1. Introduction
2. The Awakening
3. The Conflict
</artefact>
```

### B. Efficient Patching (Aider Format)
To save context, use Aider blocks. The backend finds the `SEARCH` text and replaces it with `REPLACE`.

```xml
<artefact name="outline.md">
<<<<<<< SEARCH
2. The Awakening
=======
2. The New Awakening (Expanded)
>>>>>>> REPLACE
</artefact>
```

### C. Versioning & Reverting
Every update increments the version. You can see history counts in the context and revert via tags:
```xml
<!-- Revert 'outline.md' to version 1 -->
<revert_artefact name="outline.md" version="1" />
```

## 4. Agentic Chat & UI Notifications
When using `discussion.chat()`, the backend emits a `MSG_TYPE_ARTEFACTS_STATE_CHANGED` notification whenever an artefact is created, updated, or reverted.

```python
from lollms_client import MSG_TYPE

def my_callback(text, msg_type, meta):
    if msg_type == MSG_TYPE.MSG_TYPE_ARTEFACTS_STATE_CHANGED:
        # meta["artefacts"] contains the updated list of dictionaries
        print(f"Artefact updated: {text}")

discussion.chat(
    user_message="Update the second chapter of the book.",
    streaming_callback=my_callback
)
```

## 5. Practical Workflow: Writing a Book
1.  **Initialization**: Ask LLM to create an artefact with an empty structure.
2.  **Iterative Filling**: Ask LLM to fill specific segments using aider patches.
3.  **Refinement**: Use `<revert_artefact>` if a change wasn't desired.
4.  **Context Management**: Use `discussion.summarize_and_prune(max_tokens=4096)` regularly to keep the history lean while the **Artefact** keeps the primary content stable.

---
> Source: [ParisNeo/lollms-vs-coder](https://github.com/ParisNeo/lollms-vs-coder) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 -->

