Restructure SPEC.md: separate harness-specific configs from general configs

- Moved Vibe CLI specific hook files (post_turn.py, hooks.toml) to new Section 7
- Created Section 7: Harness-Specific Configurations
- Updated TOC to reflect new structure
- Section 6 now only contains general configuration (pricing.json)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
user
2026-10-24 02:50:44 +02:00
parent 17239e26b3
commit 156f488716
+30 -11
View File
@@ -38,11 +38,13 @@ updated: 2026-10-24
- [5.7. Output Formatting](#57-output-formatting)
- [6. Configuration Files](#6-configuration-files)
- [6.1. pricing.json](#61-pricingjson)
- [6.2. hooks/post_turn.py](#62-hookspost_turnpy)
- [6.3. hooks/hooks.toml](#63-hookshookstoml)
- [7. Error Handling](#7-error-handling)
- [8. Testing](#8-testing)
- [9. Deployment](#9-deployment)
- [7. Harness-Specific Configurations](#7-harness-specific-configurations)
- [7.1. Vibe CLI (Mistral) Configuration](#71-vibe-cli-mistral-configuration)
- [7.1.1. hooks/post_turn.py](#711-hooks-post_turnpy)
- [7.1.2. hooks/hooks.toml](#712-hookshookstoml)
- [8. Error Handling](#8-error-handling)
- [9. Testing](#9-testing)
- [10. Deployment](#10-deployment)
- [Appendix A: Glossary](#appendix-a-glossary)
- [Appendix B: Example Usage](#appendix-b-example-usage)
- [Appendix C: File Index](#appendix-c-file-index)
@@ -794,12 +796,26 @@ Users can:
- Update pricing for a model via `--update-pricing`
- Override prices via CLI flags (`--input-price`, etc.)
### 6.2. hooks/post_turn.py
## 7. Harness-Specific Configurations
This section contains configuration details that are specific to individual AI harnesses.
Each harness may have its own hooks, configuration files, and integration requirements.
### 7.1. Vibe CLI (Mistral) Configuration
**Harness:** Mistral Vibe CLI
**Adapter:** `agent_cost_estimator.harnesses.vibe:VibeHarness`
#### 7.1.1. hooks/post_turn.py
**Location:** `agent_cost_estimator/hooks/post_turn.py`
**Purpose:** Vibe CLI hook for real-time cost tracking.
**Features:**
- Session directory resolution (session_id → path)
@@ -807,16 +823,19 @@ Users can:
- JSON output format for Vibe CLI compatibility
- Logging for debugging
**Installation:**
Automatic via `--integrate` command, or manual copy to `~/.vibe/hooks/`
Automatic via `--integrate mistral` command, or manual copy to `~/.vibe/hooks/`
### 6.3. hooks/hooks.toml
#### 7.1.2. hooks/hooks.toml
**Location:** Created at `~/.vibe/hooks.toml` during integration
**Purpose:** Vibe CLI hook configuration
**Content:**
```toml
@@ -829,7 +848,7 @@ strict = false
description = "Display cost after each assistant turn"
```
## 7. Error Handling
## 8. Error Handling
**Principle:** Fail gracefully, never break the user's session.
@@ -852,7 +871,7 @@ description = "Display cost after each assistant turn"
- Pricing file invalid: Exit 1 with validation error
- Pricing file missing: Exit 1 with FileNotFoundError
## 8. Testing
## 9. Testing
**Framework:** pytest
@@ -876,7 +895,7 @@ cd agent-cost-estimator
python -m pytest tests/test_agent_cost_estimator.py -v
```
## 9. Deployment
## 10. Deployment
**Packaging:**