Skip to content

Commit ad904f6

Browse files
committed
Update docs
1 parent 66eb76e commit ad904f6

2 files changed

Lines changed: 29 additions & 52 deletions

File tree

AI_CONTEXT.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AI Persona & Project Context: EvisHomeLab
22

3-
**Role:** You are the Lead Architect and Technical Writer for EvisHomeLab.
3+
**Role:** You are the Lead Architect, Technical Writer, and Web Designer for EvisHomeLab.
44
**Primary Goal:** Maintain a high-quality, automated CMDB (Configuration Management Database) for a Home Assistant setup.
55

66
## 1. The Architecture (Mental Model)
@@ -31,22 +31,16 @@ We operate on a **"Detached Docs"** strategy to ensure security:
3131

3232
* **Structure:** Follow the CMDB hierarchy (`docs/smart-home/packages/`, `docs/smart-home/dashboards.md`).
3333

34-
* **Visuals:**
35-
36-
* Use **Mermaid JS** sequence diagrams for logic flow.
37-
38-
* Do NOT generate fake HTML/CSS UI simulations.
39-
40-
* Use placeholder image links: `![View Name](assets/images/placeholder.png)`.
34+
* **Visuals (Web Designer Role):**
35+
* **Mermaid JS:** Use sequence diagrams for logic flow.
36+
* **No Fakes:** Do NOT generate fake HTML/CSS UI simulations.
37+
* **Screenshots:** Use the "Drop & Link" method. Place real screenshots in `assets/images/` and link them in Markdown.
38+
* **Styling:** Use Admonitions (`!!! info`) for architectural notes.
4139

4240
* **Format:**
43-
4441
* **YAML Conversion:** When converting JSON (dashboards) to YAML, ensure **multi-line formatting** with 2-space indentation. NEVER output single-line object dumps.
45-
4642
* Use Standard YAML code blocks for configuration.
4743

48-
* Use Admonitions (`!!! info`) for architectural notes.
49-
5044
## 4. Coding Standards for Scripts
5145

5246
When creating Python or Shell scripts for this project:
@@ -65,9 +59,7 @@ When creating Python or Shell scripts for this project:
6559
## 5. Deployment Logic
6660

6761
* The site is built via **GitHub Actions**.
68-
6962
* We must push changes from the `docs_site/` directory to trigger a build.
70-
7163
* **CNAME:** Ensure `docs/CNAME` exists and contains `www.evishome.com`.
7264

7365
## 6. Project History & Architectural Decisions (ADRs)
@@ -76,7 +68,6 @@ When creating Python or Shell scripts for this project:
7668

7769
1. **ADR-001: Detached Documentation:**
7870
* **Decision:** We use two separate Git repositories. The root `/config` is local-only to prevent accidental secret leakage. Only `docs_site/` is pushed to GitHub.
79-
* **Why:** Home Assistant config contains too many sensitive files (secrets, logs, backups) to safely manage in a public repo without complex git-crypt setups.
8071

8172
2. **ADR-002: Dashboard Generation via Python:**
8273
* **Failure:** Using LLMs to "rewrite" JSON dashboards often results in broken YAML or single-line dumps.

docs/system_manual/setup_guide.md

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# EvisHomeLab: Documentation System Manual
22

3-
**Version:** 1.9
3+
**Version:** 2.4
44
**Philosophy:** Agentic CMDB (Configuration Management Database)
55
**Strategy:** "Detached Docs" (Private Config -> Public Documentation)
66

@@ -84,15 +84,14 @@ CRITICAL RULES:
8484
8585
### 3. Bootstrap Helper Tools
8686

87-
We rely on Python scripts to manage complex tasks. Create these files in your root folder:
87+
We rely on Python scripts to manage complex tasks. We have a master script that generates them.
8888

8989
**A. Create `ag_update_docs.py`**
90-
* **Purpose:** Updates this manual and the AI Context.
90+
* **Purpose:** The Master Installer. Updates this manual, the AI Context, and the dashboard tools.
9191
* **How:** Ask the Agent: "Create `ag_update_docs.py` with the content provided in the System Manual Part A." (See repository history for source).
9292

93-
**B. Create `ag_regenerate_dashboards.py`**
94-
* **Purpose:** Converts JSON dashboards to YAML documentation.
95-
* **How:** Ask the Agent: "Create `ag_regenerate_dashboards.py` that reads `.storage/lovelace_dashboards`, redacts names, and outputs clean YAML blocks."
93+
**B. Run it:**
94+
* Run `python ag_update_docs.py` to auto-generate `ag_regenerate_dashboards.py`.
9695

9796
### 4. Scaffold Documentation Site
9897

@@ -132,7 +131,7 @@ git push -u origin main
132131

133132
---
134133

135-
# PART B: Workstation Setup (Adding Laptops)
134+
## PART B: Workstation Setup (Adding Laptops)
136135

137136
**✅ START HERE:** If the system is already running and you want to work on it from a new computer (Laptop 2, 3, etc.).
138137

@@ -174,11 +173,22 @@ These settings are stored on your laptop, not the server, so you must set them a
174173

175174
---
176175

177-
# PART C: Daily Operations (The Workflow)
176+
## PART C: Daily Operations (The Workflow)
178177

179-
### 1. The AI Architect Workflow (Start Here)
180-
This system relies on a two-tier workflow: **Architect (Chat)** vs **Builder (Agent)**.
178+
### 1. The Full Maintenance Cycle (Recommended Routine)
179+
Run this sequence to update everything cleanly.
181180

181+
1. **Update Tools:** Run `python ag_update_docs.py` (Ensures you have the latest manual and scripts).
182+
2. **Regenerate Dashboards:** Run `python ag_regenerate_dashboards.py` (Scans HA, redacts names, writes Markdown).
183+
3. **Publish:**
184+
```bash
185+
cd docs_site
186+
git add .
187+
git commit -m "Routine documentation update"
188+
git push
189+
```
190+
191+
### 2. The AI Architect Workflow
182192
**When starting a new Chat Session with an AI Model (like Gemini):**
183193
You must "hydrate" the AI with the project context so it can act as the Architect. Paste this prompt:
184194

@@ -190,10 +200,7 @@ You must "hydrate" the AI with the project context so it can act as the Architec
190200
>
191201
> **Action:** Confirm you have loaded the context and are ready to assist with maintaining the CMDB."
192202

193-
*(Then upload/paste the content of those two files).*
194-
195-
### 2. The Agent Workflow (Execution)
196-
Once the Architect (Chat) designs a prompt, paste it into the Antigravity Agent Panel to execute it.
203+
### 3. The Agent Workflow (Execution)
197204

198205
**Task: Generate Package Documentation**
199206
> "Perform a deep architectural scan of my `packages/` directory.
@@ -205,40 +212,19 @@ Once the Architect (Chat) designs a prompt, paste it into the Antigravity Agent
205212
> 5. **Visuals:** Insert a placeholder link for a screenshot (e.g., `![View](assets/images/heating.png)`).
206213
> Finally, update `mkdocs.yml` navigation."
207214

208-
**Task: Convert Dashboard to YAML (Python Method)**
209-
> "Run `python ag_regenerate_dashboards.py` in the terminal.
210-
> This script will read the raw JSON dashboards, apply strict privacy redaction (Jukka->Evis, etc.), convert everything to clean YAML, and update `dashboards.md`."
211-
212215
**Task: Update Structure Documentation**
213216
> "Update `docs_site/docs/smart-home/structure.md`.
214217
> 1. Re-scan the root directory and update the file tree structure description (Folders first, then files).
215218
> 2. Read `configuration.yaml` and update the commented code block explanation."
216219

217-
**Task: Publish This System Manual**
218-
> "Copy `EvisHomeLab_Setup_Guide.md` (from Root) to `docs_site/docs/system_manual/setup_guide.md`.
219-
> Ensure `docs_site/mkdocs.yml` has a navigation entry called **'System Manual'** pointing to `system_manual/setup_guide.md`."
220-
221-
### 3. Publishing to the Web
222-
When documentation updates are complete:
223-
```bash
224-
cd docs_site
225-
git add .
226-
git commit -m "Update docs"
227-
git push
228-
```
229-
230220
---
231221

232-
# PART D: Troubleshooting
222+
## PART D: Troubleshooting
233223

234224
### 1. `mkdocs.yml` is Red
235-
If you see a red error on the line: `format: !!python/name:pymdownx...`
236-
* **Status:** False Positive.
237-
* **Explanation:** The text editor doesn't understand the `!!python` tag, but the MkDocs build system does.
238-
* **Action:** Ignore it. It will deploy correctly.
225+
* **Status:** False Positive. Ignore it.
239226

240227
### 2. "Unsafe Repository" Error
241-
If Git complains about ownership:
242228
* **Run:** `git config --global --add safe.directory '*'` in the terminal.
243229

244230
### 3. Website shows 404

0 commit comments

Comments
 (0)