You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AI_CONTEXT.md
+6-15Lines changed: 6 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# AI Persona & Project Context: EvisHomeLab
2
2
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.
4
4
**Primary Goal:** Maintain a high-quality, automated CMDB (Configuration Management Database) for a Home Assistant setup.
5
5
6
6
## 1. The Architecture (Mental Model)
@@ -31,22 +31,16 @@ We operate on a **"Detached Docs"** strategy to ensure security:
31
31
32
32
***Structure:** Follow the CMDB hierarchy (`docs/smart-home/packages/`, `docs/smart-home/dashboards.md`).
33
33
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: ``.
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.
41
39
42
40
***Format:**
43
-
44
41
***YAML Conversion:** When converting JSON (dashboards) to YAML, ensure **multi-line formatting** with 2-space indentation. NEVER output single-line object dumps.
45
-
46
42
* Use Standard YAML code blocks for configuration.
47
43
48
-
* Use Admonitions (`!!! info`) for architectural notes.
49
-
50
44
## 4. Coding Standards for Scripts
51
45
52
46
When creating Python or Shell scripts for this project:
@@ -65,9 +59,7 @@ When creating Python or Shell scripts for this project:
65
59
## 5. Deployment Logic
66
60
67
61
* The site is built via **GitHub Actions**.
68
-
69
62
* We must push changes from the `docs_site/` directory to trigger a build.
70
-
71
63
***CNAME:** Ensure `docs/CNAME` exists and contains `www.evishome.com`.
72
64
73
65
## 6. Project History & Architectural Decisions (ADRs)
@@ -76,7 +68,6 @@ When creating Python or Shell scripts for this project:
76
68
77
69
1.**ADR-001: Detached Documentation:**
78
70
***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.
80
71
81
72
2.**ADR-002: Dashboard Generation via Python:**
82
73
***Failure:** Using LLMs to "rewrite" JSON dashboards often results in broken YAML or single-line dumps.
**Strategy:** "Detached Docs" (Private Config -> Public Documentation)
6
6
@@ -84,15 +84,14 @@ CRITICAL RULES:
84
84
85
85
### 3. Bootstrap Helper Tools
86
86
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.
88
88
89
89
**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.
91
91
***How:** Ask the Agent: "Create `ag_update_docs.py` with the content provided in the System Manual Part A." (See repository history for source).
92
92
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`.
96
95
97
96
### 4. Scaffold Documentation Site
98
97
@@ -132,7 +131,7 @@ git push -u origin main
132
131
133
132
---
134
133
135
-
# PART B: Workstation Setup (Adding Laptops)
134
+
##PART B: Workstation Setup (Adding Laptops)
136
135
137
136
**✅ START HERE:** If the system is already running and you want to work on it from a new computer (Laptop 2, 3, etc.).
138
137
@@ -174,11 +173,22 @@ These settings are stored on your laptop, not the server, so you must set them a
174
173
175
174
---
176
175
177
-
# PART C: Daily Operations (The Workflow)
176
+
##PART C: Daily Operations (The Workflow)
178
177
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.
181
180
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
182
192
**When starting a new Chat Session with an AI Model (like Gemini):**
183
193
You must "hydrate" the AI with the project context so it can act as the Architect. Paste this prompt:
184
194
@@ -190,10 +200,7 @@ You must "hydrate" the AI with the project context so it can act as the Architec
190
200
>
191
201
> **Action:** Confirm you have loaded the context and are ready to assist with maintaining the CMDB."
192
202
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)
197
204
198
205
**Task: Generate Package Documentation**
199
206
>"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
205
212
> 5. **Visuals:** Insert a placeholder link for a screenshot (e.g., ``).
206
213
> Finally, update `mkdocs.yml` navigation."
207
214
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`."
0 commit comments