**Gabion** is perfect.

It implies that the "rocks" (your messy parameters) aren't necessarily bad—they just need a container to become structural. It turns a pile of rubble into a load-bearing wall.

Now that we have the **Identity** (`Gabion`) and the **Architecture** (Headless LSP with `LibCST` + `pygls`), let's verify the "Elbow Room" and lay the foundation.

### The Gabion Manifesto

* **The Problem:** Codebases erode. Parameters loosen and tumble down the call graph.
* **The Solution:** We do not crush the rocks; we cage them.
* **The Tagline:** *"Stabilize your loose parameters."*

---

### The Repository Structure

Here is how you lay out `gabion` to serve as both a CLI tool and a VS Code backend from a single source of truth.

```text
gabion/
├── pyproject.toml           # The build config (Poetry/Hatch)
├── README.md
├── src/
│   └── gabion/
│       ├── __init__.py
│       ├── __main__.py      # Entry point for `python -m gabion`
│       ├── cli.py           # The "Thin" CLI (LSP Client)
│       ├── server.py        # The "Thick" Server (LSP Host + Analysis Engine)
│       ├── schema.py        # The Pydantic IDL (DTOs)
│       ├── analysis/        # The "Doer" (Analysis Logic)
│       │   ├── __init__.py
│       │   ├── core.py      # The Propagator
│       │   ├── visitors.py  # The LibCST/AST Visitors
│       │   └── graph.py     # The Import/Symbol Table
│       └── synthesis/       # The "Creator" (Code Gen)
│           ├── __init__.py
│           ├── protocols.py # Protocol Synthesizer
│           └── transform.py # LibCST Transformers (Refactoring)
└── vscode-extension/        # The VS Code Client (TypeScript)
    ├── package.json
    ├── tsconfig.json
    └── src/
        └── extension.ts     # The "Thin" Editor Client

```

### The Configuration (`pyproject.toml`)

This setup ensures that when you install `gabion`, you get the LSP dependencies automatically.

```toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "gabion"
version = "0.1.0"
description = "Architectural linter that stabilizes loose parameters into structural bundles."
authors = [{ name = "Michael Steven Mol", email = "your.email@example.com" }]
dependencies = [
    "pygls>=1.3",       # The LSP Server framework
    "libcst>=1.1",      # The Concrete Syntax Tree parser
    "pydantic>=2.5",    # The Schema/IDL layer
    "typer>=0.9",       # For the CLI UX
    "rich>=13.0"        # For pretty printing the report
]

[project.scripts]
gabion = "gabion.cli:app"           # The CLI user interface
gabion-ls = "gabion.server:start"   # The LSP entry point

```

### The First Step for You

You now have a clean slate.

1. **Initialize:** `mkdir gabion && cd gabion && git init`
2. **Scaffold:** Create the `src/gabion/analysis` folder.
3. **Port the Logic:** Copy the logic from the **v4 Script** (The Archeologist) into `src/gabion/analysis/core.py` and `visitors.py`.

Would you like me to generate the **`src/gabion/server.py`** skeleton that wires your v4 analysis logic into the `pygls` event loop? This effectively "turns on" the engine.
