# simplon-dist-devia-p1-199833/harness-fiches-support architecture

> Architecture diagram of the GitHub repository simplon-dist-devia-p1-199833/harness-fiches-support, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/simplon-dist-devia-p1-199833/harness-fiches-support
- Repository: https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support

## Overview

Batifact’s prototype is a command-line support assistant that answers questions from procedure sheets and can draft missing sheets. The workflow starts with a technician’s question, maintains a conversation with an AI service, and lets the assistant consult or prepare sheets within configured limits. The README also describes attaching a sheet and handling service failures. The conversation and tool-execution functions are explicitly marked unfinished in the sampled code; those capabilities are shown as product responsibilities, not as verified completed implementations.

Main entry points: [`assistant/interface.py`](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/interface.py) (Command interface), [`assistant/conversation.py`](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/conversation.py) (Conversation loop), [`assistant/client.py`](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/client.py) (Service client), [`assistant/outils.py`](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/outils.py) (Tool dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Technician interaction"]
  node_cli_entry["CLI entry point<br/>[__main__.py]"]
  node_cli["Command interface<br/>[interface.py]"]
end

subgraph group_assistant_core["Assistant orchestration"]
  node_conversation["Conversation loop<br/>[conversation.py]"]
  node_tool_dispatch["Tool dispatcher<br/>[outils.py]"]
  node_configuration["Configuration and limits<br/>[configuration.py]"]
  node_limits_file["Team limits<br/>[limites.toml]"]
end

subgraph group_service["AI service access"]
  node_service_client["Service client<br/>[client.py]"]
  node_simulator["Simulated AI service<br/>[service_simule.py]"]
  node_ai_service{{"Company AI service"}}
end

subgraph group_knowledge["Procedure sheets"]
  node_sheet_collection[("Procedure collection")]
  node_sheet_read["Read a sheet<br/>[outils.py]"]
  node_sheet_draft["Write a sheet draft<br/>[outils.py]"]
  node_sheet_attachment["Attach a sheet<br/>[conversation.py]"]
end

node_technician(("Support technician"))

node_technician -->|"asks question"| node_cli
node_cli_entry -->|"starts"| node_cli
node_cli -->|"loads settings"| node_configuration
node_cli -->|"creates client"| node_service_client
node_cli -->|"starts conversation"| node_conversation
node_configuration -->|"reads limits"| node_limits_file
node_cli -->|"submits question"| node_conversation
node_conversation -->|"sends messages"| node_service_client
node_service_client -->|"selects when configured"| node_simulator
node_service_client -->|"sends requests"| node_ai_service
node_ai_service -.->|"returns responses"| node_conversation
node_conversation -->|"executes tool calls"| node_tool_dispatch
node_tool_dispatch -.->|"dispatches reads"| node_sheet_read
node_tool_dispatch -.->|"dispatches writes"| node_sheet_draft
node_sheet_read -->|"reads sheets"| node_sheet_collection
node_sheet_draft -->|"writes drafts"| node_sheet_collection
node_technician -->|"attaches sheet"| node_sheet_attachment
node_sheet_attachment -.->|"adds sheet context"| node_conversation

click node_cli_entry "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/__main__.py"
click node_cli "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/interface.py"
click node_conversation "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/conversation.py"
click node_tool_dispatch "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/outils.py"
click node_configuration "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/configuration.py"
click node_limits_file "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/limites.toml"
click node_service_client "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/client.py"
click node_simulator "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/service_simule.py"
click node_sheet_collection "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/tree/main/fiches"
click node_sheet_read "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/outils.py"
click node_sheet_draft "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/outils.py"
click node_sheet_attachment "https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/conversation.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli_entry,node_cli toneBlue
class node_conversation,node_tool_dispatch,node_configuration,node_limits_file toneAmber
class node_service_client,node_simulator,node_ai_service toneMint
class node_sheet_collection,node_sheet_read,node_sheet_draft,node_sheet_attachment toneRose
class node_technician toneIndigo
```

## Components

### Technician interaction

- [CLI entry point](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/__main__.py): `assistant/__main__.py`
- [Command interface](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/interface.py): `assistant/interface.py`

### Assistant orchestration

- [Conversation loop](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/conversation.py): `assistant/conversation.py`
- [Tool dispatcher](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/outils.py): `assistant/outils.py`
- [Configuration and limits](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/configuration.py): `assistant/configuration.py`
- [Team limits](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/limites.toml): `limites.toml`

### AI service access

- [Service client](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/client.py): `assistant/client.py`
- [Simulated AI service](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/service_simule.py): `assistant/service_simule.py`
- **Company AI service**

### Procedure sheets

- [Procedure collection](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/tree/main/fiches): `fiches`
- [Read a sheet](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/outils.py): `assistant/outils.py`
- [Write a sheet draft](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/outils.py): `assistant/outils.py`
- [Attach a sheet](https://github.com/simplon-dist-devia-p1-199833/harness-fiches-support/blob/main/assistant/conversation.py): `assistant/conversation.py`

### Other components

- **Support technician**

## Connections

- Support technician → Command interface: asks question (evidence: `README.md`)
- CLI entry point → Command interface: starts (evidence: `assistant/__main__.py`)
- Command interface → Configuration and limits: loads settings (evidence: `assistant/interface.py`)
- Command interface → Service client: creates client (evidence: `assistant/interface.py`)
- Command interface → Conversation loop: starts conversation (evidence: `assistant/interface.py`)
- Configuration and limits → Team limits: reads limits (evidence: `assistant/configuration.py`)
- Command interface → Conversation loop: submits question (evidence: `assistant/interface.py`)
- Conversation loop → Service client: sends messages (evidence: `assistant/conversation.py`)
- Service client → Simulated AI service: selects when configured (evidence: `assistant/client.py`)
- Service client → Company AI service: sends requests (evidence: `README.md`)
- Company AI service → Conversation loop: returns responses
- Conversation loop → Tool dispatcher: executes tool calls (evidence: `assistant/conversation.py`)
- Tool dispatcher → Read a sheet: dispatches reads (evidence: `assistant/outils.py`)
- Tool dispatcher → Write a sheet draft: dispatches writes (evidence: `assistant/outils.py`)
- Read a sheet → Procedure collection: reads sheets (evidence: `README.md`)
- Write a sheet draft → Procedure collection: writes drafts (evidence: `README.md`)
- Support technician → Attach a sheet: attaches sheet (evidence: `README.md`)
- Attach a sheet → Conversation loop: adds sheet context (evidence: `assistant/conversation.py`)
