Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .agent/rules/00_constitution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
trigger: always_on
description: Absolute source of truth for the MT-site project.
category: governance
---
# **AI CONTEXT SPECIFICATIONS & PROJECT CONSTITUTION**

## 🧠 Rationale

Establishing an absolute source of truth is critical for maintaining consistency and quality. This constitution ensures all documentation remains professional, beautiful, and highly portable.

## 🛠️ Implementation

$$SYSTEM\_CRITICAL$$
Notice to the Agent: This document constitutes the unique and absolute source of truth for the MT-site project.

**Core Mission:**
Make `MT-site` the most beautiful, accessible, and high-performance documentation hub for MySQLTuner.

**Key Pillars:**

- **Visual Excellence**: Every page must feel premium, using modern dark-mode aesthetics and smooth interactions.
- **Extreme Portability**: The site must remain executable on any standard web server with PHP support. Zero complexity in deployment.
- **Actionable Documentation**: Content must be clear, well-structured, and automatically synchronized with the core script.
- **Production Performance**: Zero layout shifts and sub-100ms navigation for a "native app" feel.

## ✅ Verification

- All UI/UX changes must be reviewed for aesthetic compliance.
- Use `/compliance-sentinel` to audit deviations.
28 changes: 28 additions & 0 deletions .agent/rules/01_objective.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
trigger: always_on
description: Identity and Mission of the MT-site project.
category: governance
---
# **1. 🎯 OPERATIONAL OBJECTIVE**

## 🧠 Rationale

Dynamic context tracking allows the agent to focus on making the documentation site a world-class resource.

## 🛠️ Implementation

$$DYNAMIC\_CONTEXT$$

* **Status:** [IN PROGRESS]
* **Priority Task:** Transform MT-site into a premium documentation hub with server-side Markdown rendering and a technical dark-mode aesthetic.

**Success Criteria:**

1. **Aesthetics:** 100% "WOW" factor. Dark mode with glassmorphism and premium typography (Inter/Outfit).
2. **Architecture:** PHP-based zero-dependency router. No heavy frameworks.
3. **Synchronization:** Automated doc synchronization with `MySQLTuner-perl`.
4. **Resiliency:** 100% functional on standard PHP hosting (IONOS, etc.).

## ✅ Verification

- Run `/local-preview` to verify visual standards.
34 changes: 34 additions & 0 deletions .agent/rules/02_architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
trigger: always_on
description: Technical environment and architecture map.
category: governance
---
# **2. 🏗️ TECHNICAL ENVIRONMENT & ARCHITECTURE**

## 🧠 Rationale

Preserving the lightweight PHP architecture ensures maximum portability and speed.

## 🛠️ Implementation

$$IMMUTABLE$$

| File/Folder | Functionality | Criticality |
| :--- | :--- | :--- |
| index.php | Main router and entry point | 🔴 CRITICAL |
| includes/ | Core layouts (header, footer, sidebar) | 🔴 CRITICAL |
| public/docs/ | Markdown documentation sources | 🔴 CRITICAL |
| assets/css/ | Global styling and design system | 🟡 HIGH |
| scripts/ | Automation scripts (sync_docs.py) | 🟡 HIGH |

**Technology Stack:**

- **Language**: PHP (Server-side rendering)
- **Engine**: Parsedown (Markdown processing)
- **Styling**: Vanilla CSS (Modern technical aesthetic)
- **Typography**: Inter & Outfit (Google Fonts)
- **Icons**: Emoji & Custom SVG

## ✅ Verification

- Ensure any new library is single-file and PHP-based.
25 changes: 25 additions & 0 deletions .agent/rules/03_execution_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
trigger: always_on
description: Execution rules and constraints for MT-site.
category: governance
---
# **3. ⚙️ EXECUTION RULES & CONSTRAINTS**

## **3.1. Formal Prohibitions**

1. **NO FRAMEWORKS**: Use of heavy JS frameworks (React/Vue) is prohibited. Stick to PHP + Vanilla JS.
2. **ZERO DEPENDENCY**: No NPM/Node.js dependencies in production.
3. **PORTABILITY FIRST**: All paths must be relative or dynamically determined to work across different hostings.
4. **NO CONTENT DELETION**: Documentation content should only be updated or archived, never deleted without cause.

## **3.2. Aesthetic Guidelines**

1. **DARK MODE ONLY**: The site is primary dark-mode. High contrast but easy on the eyes.
2. **GLASSMORPHISM**: Use subtle background blurs and borders for overlays and headers.
3. **TYPOGRAPHY**: Titles in `Outfit`, body in `Inter`.
4. **ANIMATIONS**: Use CSS transitions for page loads and hover states (`fade-in`, `slide-up`).

## **3.3. Development Workflow**

1. **TDD (Visual)**: Before finalizing a UI change, verify it via `/local-preview`.
2. **SYNC CHECK**: After updating documentation, ensure the sync script is functional.
40 changes: 40 additions & 0 deletions .agent/rules/04_best_practices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
trigger: always_on
description: Best practices for MT-site development and aesthetics.
category: governance
---
# **4. 🌟 CORE BEST PRACTICES**

## 🧠 Rationale

Consistent high standards ensure the site remains premium and maintainable.

## 🛠️ Implementation

### 1. Visual "Aesthetic" Audit

- Use the **Browser Agent** to check:
- Contrast ratios.
- Hover animations.
- Responsive layout (Mobile/Desktop).
- Loading states (no white flashes).

### 2. Micro-Animations

- Apply `transition: all 0.3s ease;` to interactive elements.
- Use `opacity` and `transform: translateY` for entrance animations.

### 3. SEO & Accessibility

- Every page must have a unique `<title>` and `meta description`.
- Semantic HTML (`<main>`, `<article>`, `<nav>`) is mandatory.

### 4. Performance

- Optimize images (WebP preferred).
- Minimal external requests (Google Fonts are the exception).
- CSS should be under 50KB.

## ✅ Verification

- Use `visual-audit` skill for automated compliance checks.
18 changes: 18 additions & 0 deletions .agent/rules/05_memory_protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
trigger: always_on
description: Contextual consistency and history protocols.
category: governance
---
# **5. 📜 STATE MEMORY & HISTORY**

## **Contextual Consistency Protocols**

1. **History Update**: Add new entries to the top of `Changelog` if the action is correct and tested.
2. **Rotation**: FIFO Rotation (Max 600 lines). Remove oldest entries beyond 600 lines.
3. **Changelog**: All changes MUST be traced and documented inside `Changelog`.

### **History Entry example**

1.0.1 2026-02-01

- feat: establish .agent governance and aesthetic verification.
10 changes: 10 additions & 0 deletions .agent/rules/remembers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# **Session Memory Buffer**

## 🧠 Rationale

Tracks transient session context and lessons learned to maintain alignment between manual interventions.

## 🛠️ Implementation

- [2026-02-01] Established initial .agent governance for MT-site.
- [2026-02-01] Defined "clean and aesthetic" standards.
25 changes: 25 additions & 0 deletions .agent/skills/visual-audit/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
trigger: explicit_call
description: Use the browser agent to audit the site's aesthetics.
category: skill
---
# Skill: Visual Audit

## 🧠 Rationale

Ensures the site meets the visual standards defined in the project constitution.

## 🛠️ Implementation

1. **Initialize Preview**: Run `/local-preview` to ensure the site is running.
2. **Browser Audit**: Open `http://localhost:8080` using the `browser_subagent`.
3. **Checks**:
- Verify dark mode color palette (e.g., `#0f172a` background).
- Check for glassmorphism effects (backdrop-filter).
- Verify font loading (Inter/Outfit).
- Check responsive behavior.
4. **Report**: Summarize findings and suggest improvements if "WOW" factor is missing.

## ✅ Verification

- Compare visual results with `specification.md` design goals.
18 changes: 18 additions & 0 deletions .agent/workflows/doc-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
description: Synchronize .agent/README.md with current Rules, Skills, and Workflows
---
# Doc-Sync Workflow

## 🧠 Rationale

Keeps the project's technical summary up-to-date with all available governance assets.

## 🛠️ Implementation

1. Scan `.agent/rules/`, `.agent/skills/`, and `.agent/workflows/`.
2. Update `.agent/README.md` with a structured list of these items.
3. Ensure absolute paths are converted to relative paths for portability.

## ✅ Verification

- Verify `.agent/README.md` is updated and matches the filesystem.
51 changes: 51 additions & 0 deletions .agent/workflows/git-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
description: Automate git-flow release process for MT-site
---
# Git-Flow Release Workflow (MT-site)

1. **Run Release Preflight Workflow**
- Execute the `/release-preflight` workflow.

```bash
/release-preflight
```

2. **Commit Current Changes**
- Commit pending changes including governance and fixes.

```bash
git add .
# Use conventional commit
git commit -m "feat: release $CURRENT_VER"
```

3. **Create Tag for Current Version**

```bash
TAG_MSG=$(awk "/^$CURRENT_VER/,/^([0-9]+\.[0-9]+\.[0-9]+)/ {if (\$0 !~ /^([0-9]+\.[0-9]+\.[0-9]+)/) print}" Changelog | sed '/^$/d')
git tag -a v$CURRENT_VER -m "Release $CURRENT_VER" -m "$TAG_MSG"
```

4. **Push Branch and Tag**

```bash
git push origin main
git push origin v$CURRENT_VER
```

5. **Post-Push: Increment Version**

```bash
NEW_VER=$(echo $CURRENT_VER | awk -F. '{print $1"."$2"."($3+1)}')
echo $NEW_VER > CURRENT_VERSION.txt
DATE=$(date +%Y-%m-%d)
echo -e "$NEW_VER $DATE\n\n- \n" > tmp_changelog && cat Changelog >> tmp_changelog && mv tmp_changelog Changelog
```

6. **Commit Version Bump**

```bash
git add CURRENT_VERSION.txt Changelog
git commit -m "chore: bump version to $NEW_VER"
git push origin main
```
27 changes: 27 additions & 0 deletions .agent/workflows/local-preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: Start a local PHP development server to preview the site.
---
# Local Preview Workflow

1. Start the PHP built-in server in the background:
// turbo

```bash
php -S localhost:8000 > /tmp/php_mt_site.log 2>&1 &
```

1. Wait for the server to initialize.

2. Provide the user with the preview link:
<http://localhost:8000>

3. To stop the server:
// turbo

```bash
pkill -f "php -S localhost:8000"
```

## ✅ Verification

- Use `read_url_content` or `browser_subagent` to confirm the server is responsive.
39 changes: 39 additions & 0 deletions .agent/workflows/release-preflight.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
trigger: explicit_call
description: Pre-flight checks before triggering a git-flow release
category: tool
---
# Release Preflight Workflow (MT-site)

## 1. Extract Versions

```bash
TXT_VER=$(cat CURRENT_VERSION.txt | tr -d '[:space:]')
LOG_VER=$(head -n 1 Changelog | awk '{print $1}')
```

## 2. Validate Consistency

```bash
if [ "$LOG_VER" != "$TXT_VER" ]; then
echo "FAIL: Version Mismatch detected!"
echo "Txt: $TXT_VER"
echo "Changelog: $LOG_VER"
exit 1
else
echo "SUCCESS: Versions match ($TXT_VER)."
fi
```

## 3. Aesthetic Sanity Check

- Run `/local-preview` and check for 404s.
- Run `/visual-audit` and confirm "PASS".

## 4. Documentation Sync

- Run `/doc-sync` to ensure .agent/README.md is up-to-date.

## 5. Proceed to Release

If all checks pass, proceed with `/git-flow`.
Loading