diff --git a/README.ar.md b/README.ar.md index 61d513c..35d691f 100644 --- a/README.ar.md +++ b/README.ar.md @@ -29,6 +29,34 @@ --- +## 🚀 التثبيت والبدء السريع + +اختر طريقة التثبيت المناسبة لمشروعك: + +### الخيار (أ): عبر TidyFactor CLI الرسمي (الموصى به) +التثبيت الفوري دون الحاجة لتثبيت الأداة عالمياً في بيئة عملك النشطة: +```bash +npx @tidyfactor/cli add htmx +``` +*أو في حال كانت الأداة مثبتة لديك عالمياً (`npm i -g @tidyfactor/cli`):* +```bash +tidyfactor add htmx +``` + +### الخيار (ب): عبر معيار مهارات الوكلاء المفتوح (skills.sh) +التثبيت العالمي المتوافق مع كافة بيئات الوكلاء ومحررات الذكاء الاصطناعي (Antigravity, Cursor, Claude Code, Windsurf, Codex): +```bash +npx skills add tidyfactor/htmx +``` + +### الخيار (ج): التثبيت المباشر الفردي عبر NPM +تشغيل مثبت المهارة المستقل مباشرة مع تجاوز الذاكرة المخبأة وضمان أحدث إصدار: +```bash +npx @tidyfactor/htmx@latest +``` + +--- + ## 🏛️ معمارية منظومة TidyFactor **منظومة TidyFactor** هي بيئة معمارية برمجية مفتوحة وحزم مهارات لوكلاء الذكاء الاصطناعي قائمة على الفصل التام للمسؤوليات عبر دورة حياة المنتجات: diff --git a/README.md b/README.md index 1b129c9..6695010 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,34 @@ Built and maintained by **alwkala** — github.com/alwkala Licensed under the Apache License 2.0. +--- + +## 🚀 Installation & Quick Start + +Choose your preferred installation method: + +### Option A: Via TidyFactor CLI (Recommended) +Install directly using the official ecosystem package runner into your active workspace: +```bash +npx @tidyfactor/cli add htmx +``` +*Or if you have the CLI installed globally (`npm i -g @tidyfactor/cli`):* +```bash +tidyfactor add htmx +``` + +### Option B: Via Open Agent Skills Ecosystem (skills.sh / Vercel Labs) +Install using the universal multi-agent standard across all supported IDEs (Cursor, Antigravity, Claude Code, Windsurf, Trae, Codex): +```bash +npx skills add tidyfactor/htmx +``` + +### Option C: Standalone Zero-Dependency Runner (NPM Direct) +Run the dedicated skill installer directly with automatic cache invalidation: +```bash +npx @tidyfactor/htmx@latest +``` + --- ## 🏛️ TidyFactor Ecosystem Architecture diff --git a/dist/tidyfactor-htmx.skill b/dist/tidyfactor-htmx.skill deleted file mode 100644 index 0553745..0000000 Binary files a/dist/tidyfactor-htmx.skill and /dev/null differ diff --git a/dist/tidyfactor-htmx/.tidyfactor b/dist/tidyfactor-htmx/.tidyfactor deleted file mode 100644 index ef29b8e..0000000 --- a/dist/tidyfactor-htmx/.tidyfactor +++ /dev/null @@ -1,32 +0,0 @@ -{ - "ecosystem": "tidyfactor", - "track": "htmx", - "name": "tidyfactor-htmx", - "version": "1.2.0", - "npmPackage": "@alwkala/tidyfactor-htmx", - "github": "https://github.com/TidyFactor/HTMX", - "skillFile": "../tidyfactor-htmx-v1.1.0.skill", - "category": "hypermedia", - "commands": [ - "brief", - "assets", - "forms", - "fragments", - "history", - "i18n", - "indicators", - "init", - "modules", - "swap", - "triggers" - ], - "foundations": [ - "htmx-vanilla", - "htmx-alpine" - ], - "visionRef": "../TidyFactor-VISION.md", - "commercialPartner": "alwkala", - "website": "https://tidyfactor.com", - "docs": "https://tidyfactor.com/documentation", - "license": "Apache-2.0" -} diff --git a/dist/tidyfactor-htmx/AGENTS.md b/dist/tidyfactor-htmx/AGENTS.md deleted file mode 100644 index 606758c..0000000 --- a/dist/tidyfactor-htmx/AGENTS.md +++ /dev/null @@ -1,3 +0,0 @@ -# Agent Rules — tidyfactor-htmx - -All work must follow the TidyFactor Vision (`VISION.md`) and single-source-of-truth guidelines in `SKILLS-LAB-GUIDE.md`. diff --git a/dist/tidyfactor-htmx/CHANGELOG.md b/dist/tidyfactor-htmx/CHANGELOG.md deleted file mode 100644 index 2b546e0..0000000 --- a/dist/tidyfactor-htmx/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -# Changelog - TidyFactor HTMX - -All notable changes to the **[@tidyfactor/htmx](https://www.npmjs.com/package/@tidyfactor/htmx)** package will be documented in this file. - -## [1.2.0] - 2026-08-29 - -### Added - Global Multi-Tier & Multi-Language Documentation Architecture -- **Rule 13 Implementation**: Two-tier documentation separation between Canonical Technical Documentation (`README.md` SSOT) and First-Class Market Localizations. -- **Universal Multi-Language Switcher**: Standardized 8-language switcher navigation bar across all documentation files (`EN`, `AR`, `FA`, `ES`, `PT`, `ZH`, `DE`, `FR`). -- **First-Class Localized Developer Adoption Guides**: `README.es.md`, `README.pt.md`, `README.fa.md`, `README.zh.md`, `README.de.md`, `README.fr.md`. -- **Automated Validation & Packaging**: Updated `tools/build-skill.js` and `tools/validate_skill.py`. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.1.0] - 2026-08-25 - -### Added -- **Contextual Decision Layer (CDL v1.0)**: Added `references/memory/decision-points.md` with thin arbitration protocol (X1–X5: Backend Pairing, Swap Strategy, Loading Indicator, Browser History, Output Scope). -- **Brief Command (`/brief`)**: Added `references/commands/brief.md` and `references/workflows/brief.md` for pre-flight hypermedia discovery. -- **7-Axis Hypermedia Quality Gate (`P/H/E/S/R/V/D`)**: Added `references/memory/quality-bar.md` enforcing fragment purity, local vendoring, and CSRF protection. -- **Structured References & Workflows Architecture**: Created `references/memory/` and `references/workflows/` (init, fragments, forms, swap, brief). -- **Validation & CLI Suite**: Added `bin/add-skill.js`, updated `package.json` `"bin"` map, created `tools/validate_skill.py`, and updated `brand.json` version. - ---- - -## [1.0.0] - 2026-07-28 -- Initial Release of `@tidyfactor/htmx` diff --git a/dist/tidyfactor-htmx/LICENSE b/dist/tidyfactor-htmx/LICENSE deleted file mode 100644 index 8ea93e1..0000000 --- a/dist/tidyfactor-htmx/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - Copyright 2026 TidyFactor Ecosystem & Alwkala Digital Agency (https://alwkala.com) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/dist/tidyfactor-htmx/README.ar.md b/dist/tidyfactor-htmx/README.ar.md deleted file mode 100644 index 61d513c..0000000 --- a/dist/tidyfactor-htmx/README.ar.md +++ /dev/null @@ -1,100 +0,0 @@ -
- -# ⚡ مهارة تايتفكتور للتفاعلية بالهايبرميديا `TidyFactor HTMX v1.2.0` -### التفاعلية المعتمدة على السيرفر ومبادلة أجزاء HTML بدون أطر جافاسكريبت معقدة - -[![npm version](https://img.shields.io/npm/v/@tidyfactor/htmx.svg?style=for-the-badge&color=3366CC&logo=npm)](https://www.npmjs.com/package/@tidyfactor/htmx) -[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg?style=for-the-badge)](LICENSE) -[![Ecosystem](https://img.shields.io/badge/TidyFactor-Skills--LAB-purple.svg?style=for-the-badge)](https://github.com/TidyFactor) -[![Compatibility](https://img.shields.io/badge/Agents-Antigravity%20|%20Claude%20|%20Cursor%20|%20Codex-orange.svg?style=for-the-badge)](SKILL.md) -[![طبقة القرارات](https://img.shields.io/badge/CDL-طبقة%20القرارات%20السياقية-purple.svg?style=for-the-badge)](SKILL.md) -[![هايبرميديا](https://img.shields.io/badge/معمارية-Hypermedia%20Driven-3366CC.svg?style=for-the-badge)](SKILL.md) -[![RTL Native Arabic](https://img.shields.io/badge/RTL-Native%20Arabic-emerald.svg?style=for-the-badge)](README.ar.md) -[![Architect Score](https://img.shields.io/badge/Architect%20Score-13%2F13%20Pass%20(100%25)-green.svg?style=for-the-badge)](#-معايير-الحوكمة-والجودة) -[![AI Agents Compatible](https://img.shields.io/badge/AI%20Agents-Universal%20Compatibility-4285F4.svg?style=for-the-badge)](SKILL.md) - -[ English ](README.md) • [ العربية ](README.ar.md) • [ فارسی ](README.fa.md) • [ Español ](README.es.md) • [ Português ](README.pt.md) • [ 简体中文 ](README.zh.md) • [ Deutsch ](README.de.md) • [ Français ](README.fr.md)](https://www.npmjs.com/package/@tidyfactor/htmx) -[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge)](LICENSE) -[![RTL Native Arabic](https://img.shields.io/badge/RTL-Native%20Arabic-emerald.svg?style=for-the-badge)](#-معمارية-منظومة-tidyfactor) - -[⚡ الأوامر](#-أوامر-المهارة) • [🏛️ المنظومة](#-معمارية-منظومة-tidyfactor) • [📖 English Version](README.md) - -

- -

- TidyFactor HTMX Hero Banner -

- -
- ---- - -## 🏛️ معمارية منظومة TidyFactor - -**منظومة TidyFactor** هي بيئة معمارية برمجية مفتوحة وحزم مهارات لوكلاء الذكاء الاصطناعي قائمة على الفصل التام للمسؤوليات عبر دورة حياة المنتجات: - -```text -منظمة TidyFactor الرسمية (github.com/TidyFactor) -│ -├── مهارات التصميم (Design Skills) -│ ├── Cinematic ← تجربة الإبهار البصري / Experience ("Wow") (صفحات سينمائية تفاعلية) -│ ├── Design ← بناء النماذج الأولية / Prototype ("Build") (محرك تصميم كودي وبديل Figma) -│ └── Styler ← الجاهزية للإنتاج والتنسيق / Production ("Ship") (محرك التنسيق ودعم RTL) -│ -├── مهارات التطوير البرمجي (Development Skills) -│ ├── HTML ← المواقع الثابتة وسيو المحتوى / Static & SEO (هياكل خفيفة وسريعة) -│ ├── HTMX ← الواجهات التفاعلية الخفيفة / Hypermedia (تفاعلات بدون جافاسكريبت معقدة) -│ ├── JS ← تطبيقات الصفحة الواحدة بدون أطر / Vanilla SPA (نماذج تفاعلية بـ ES Modules) -│ ├── PHP ← المنظومات المخدمية الحديثة / Server-Rendered (مكونات حديثة وتطبيقات PHP 8) -│ └── Next ← منصات الساس متعددة المستأجرين / Multi-Tenant (Next.js 16 + Postgres RLS) -│ -└── مهارات النمو والتسويق (Growth Skills) - └── Marketing ← استراتيجيات النمو والمبيعات / Growth & SEO (تسويق الاستجابة المباشرة) -``` - -### 💎 ثلاثي الواجهات الأمامية والتجربة (Frontend Triad) - -```text - TidyFactor - │ - ┌─────────┼─────────┐ - │ │ │ - Cinematic Design Styler - │ │ │ - Experience Prototype Production - │ │ │ - "Wow" "Build" "Ship" -``` - -### 📦 مصفوفة التكامل الشامل للمجتمع (GitHub • Skill • NPM) - -| المسار البرمجي | الفئة | مستودع GitHub | مهارة الوكيل | حزمة NPM | -| :--- | :--- | :--- | :--- | :--- | -| **Cinematic** | التصميم | [`TidyFactor/Cinematic`](https://github.com/TidyFactor/Cinematic) | `tidyfactor-cinematic` | [`@tidyfactor/cinematic`](https://www.npmjs.com/package/@tidyfactor/cinematic) | -| **Design** | التصميم | [`TidyFactor/Design`](https://github.com/TidyFactor/Design) | `tidyfactor-design` | [`@tidyfactor/design`](https://www.npmjs.com/package/@tidyfactor/design) | -| **Styler** | التصميم | [`TidyFactor/Styler`](https://github.com/TidyFactor/Styler) | `tidyfactor-styler` | [`@tidyfactor/styler`](https://www.npmjs.com/package/@tidyfactor/styler) | -| **Next** | التطوير | [`TidyFactor/Next`](https://github.com/TidyFactor/Next) | `tidyfactor-next` | [`@tidyfactor/next`](https://www.npmjs.com/package/@tidyfactor/next) | -| **HTML** | التطوير | [`TidyFactor/HTML`](https://github.com/TidyFactor/HTML) | `tidyfactor-html` | [`@tidyfactor/html`](https://www.npmjs.com/package/@tidyfactor/html) | -| **HTMX** | التطوير | [`TidyFactor/HTMX`](https://github.com/TidyFactor/HTMX) | `tidyfactor-htmx` | [`@tidyfactor/htmx`](https://www.npmjs.com/package/@tidyfactor/htmx) | -| **JS** | التطوير | [`TidyFactor/JS`](https://github.com/TidyFactor/JS) | `tidyfactor-js` | [`@tidyfactor/js`](https://www.npmjs.com/package/@tidyfactor/js) | -| **PHP** | التطوير | [`TidyFactor/PHP`](https://github.com/TidyFactor/PHP) | `tidyfactor-php` | [`@tidyfactor/php`](https://www.npmjs.com/package/@tidyfactor/php) | -| **Marketing** | النمو | [`TidyFactor/Marketing`](https://github.com/TidyFactor/Marketing) | `tidyfactor-marketing` | [`@tidyfactor/marketing`](https://www.npmjs.com/package/@tidyfactor/marketing) | - ---- - -## 👨‍💻 المنظمة والتواصل والدعم - -- 🌐 **الموقع الرسمي للمنظومة:** [https://tidyfactor.com/](https://tidyfactor.com/) -- 📚 **التوثيق الرسمي المعتمد:** [https://tidyfactor.com/documentation](https://tidyfactor.com/documentation) -- 🤝 **الشريك التقني الرسمي:** [الوكالة الرقمية Alwkala](https://alwkala.com/) -- 🐙 **منظمة GitHub الرسمية:** [github.com/TidyFactor](https://github.com/TidyFactor) -- 📧 **استفسارات الأعمال والشركات:** [hello@tidyfactor.com](mailto:hello@tidyfactor.com) -- 📱 **واتساب:** [+20 101 665 6899](https://wa.me/201016656899) -- 📞 **الهاتف:** +20 101 665 6899 -- 📍 **المقر:** القاهرة، جمهورية مصر العربية - ---- - -## 📜 الترخيص والمجتمع - -مرخصة تحت رخصة **Apache License 2.0**. حقوق النشر محفوظة (c) 2026 لصالح [منظومة TidyFactor](https://tidyfactor.com) و[الوكالة الرقمية Alwkala](https://alwkala.com). diff --git a/dist/tidyfactor-htmx/README.md b/dist/tidyfactor-htmx/README.md deleted file mode 100644 index 1b129c9..0000000 --- a/dist/tidyfactor-htmx/README.md +++ /dev/null @@ -1,126 +0,0 @@ -
- -# ⚡ TidyFactor HTMX `v1.2.0` -### Server-Driven Hypermedia Interactivity & Contextual Decision Engine - -**The official hypermedia interaction track within the TidyFactor Architecture Ecosystem.** - -[![npm version](https://img.shields.io/npm/v/@tidyfactor/htmx.svg?style=for-the-badge&color=3366CC)](https://www.npmjs.com/package/@tidyfactor/htmx) -[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge)](LICENSE) -[![RTL Ready](https://img.shields.io/badge/RTL-Native%20Arabic-emerald.svg?style=for-the-badge)](README.ar.md) -[![Zero Build](https://img.shields.io/badge/Build-Zero%20Build%20Step-purple.svg?style=for-the-badge)](#-three-lifecycle-modes) - -[🚀 Quick Start](#-quick-start) • [⚡ 10 Commands](#-command-set) • [🏛️ Ecosystem](#%EF%B8%8F-tidyfactor-ecosystem-architecture) • [📖 بالعربية](README.ar.md) - -

- -

- TidyFactor HTMX Hero Banner -

- -
- ---- - -This is a **layer, not a full stack**. It owns how fragments get -requested, swapped, validated, and made navigable — not backend -architecture or data. It pairs with `tidyfactor-php` or -`tidyfactor-php-micro` (or any other server that can render HTML), -rather than replacing them. - -## Three lifecycle modes -- **Init** — add the htmx layer to a project (new or existing backend). -- **Convert** — replace ad hoc `fetch()`/full-page-reload interactivity - with htmx. -- **Improve** — audit and fix an existing htmx implementation. - -## Command set -`init` · `assets` · `fragments` · `swap` · `triggers` · `forms` · -`indicators` · `history` · `modules` · `i18n` — see `SKILL.md` for full -sequencing and each command's reference file under -`references/commands/`. - -## Related skills -Part of the TidyFactor skill library — see `tidyfactor-html` (no -backend), `tidyfactor-php` (vanilla backend), `tidyfactor-php-micro` -(opinionated Flight+Medoo+Plates backend), and the planned -`tidyfactor-js` / `tidyfactor-js-micro` tracks. - -## Developer -Built and maintained by **alwkala** — github.com/alwkala - -## License -Licensed under the Apache License 2.0. - - ---- - -## 🏛️ TidyFactor Ecosystem Architecture - -**TidyFactor** is a modular web architecture and AI coding agent skill ecosystem built on clear separation of concerns across the product lifecycle: - -``` -TidyFactor Organization (github.com/TidyFactor) -│ -├── Design Skills -│ ├── Cinematic → Experience / "Wow" (Apple × Cartier Scroll-Driven Landing Pages) -│ ├── Design → Prototype / "Build" (Code-Native UI Design Engine & Figma Alternative) -│ └── Styler → Production / "Ship" (Framework Styler & RTL Polish Engine) -│ -├── Development Skills -│ ├── HTML → Content & Static (Semantic SEO & Static Platform Starter) -│ ├── HTMX → Hypermedia (Server-Driven Micro-Interactions) -│ ├── JS → Vanilla SPA (Framework-Free Reactive ES Modules) -│ ├── PHP → Server-Rendered (Modern PHP 8.x Component UI & Architecture) -│ └── Next → Multi-Tenant SaaS (Next.js 16, React 19, Supabase RLS & Dev-Perf) -│ -└── Growth Skills - └── Marketing → Growth / Revenue (Direct Response, Pillar SEO & Content Lifecycles) -``` - -### 💎 Frontend Triad - -``` - TidyFactor - │ - ┌─────────┼─────────┐ - │ │ │ - Cinematic Design Styler - │ │ │ - Experience Prototype Production - │ │ │ - "Wow" "Build" "Ship" -``` - -### 📦 Community Package & Skill Parity - -| Track | Category | GitHub Repository | Agent Skill | NPM Package | -| :--- | :--- | :--- | :--- | :--- | -| **Cinematic** | Design | [`TidyFactor/Cinematic`](https://github.com/TidyFactor/Cinematic) | `tidyfactor-cinematic` | [`@tidyfactor/cinematic`](https://www.npmjs.com/package/@tidyfactor/cinematic) | -| **Design** | Design | [`TidyFactor/Design`](https://github.com/TidyFactor/Design) | `tidyfactor-design` | [`@tidyfactor/design`](https://www.npmjs.com/package/@tidyfactor/design) | -| **Styler** | Design | [`TidyFactor/Styler`](https://github.com/TidyFactor/Styler) | `tidyfactor-styler` | [`@tidyfactor/styler`](https://www.npmjs.com/package/@tidyfactor/styler) | -| **Next** | Development | [`TidyFactor/Next`](https://github.com/TidyFactor/Next) | `tidyfactor-next` | [`@tidyfactor/next`](https://www.npmjs.com/package/@tidyfactor/next) | -| **HTML** | Development | [`TidyFactor/HTML`](https://github.com/TidyFactor/HTML) | `tidyfactor-html` | [`@tidyfactor/html`](https://www.npmjs.com/package/@tidyfactor/html) | -| **HTMX** | Development | [`TidyFactor/HTMX`](https://github.com/TidyFactor/HTMX) | `tidyfactor-htmx` | [`@tidyfactor/htmx`](https://www.npmjs.com/package/@tidyfactor/htmx) | -| **JS** | Development | [`TidyFactor/JS`](https://github.com/TidyFactor/JS) | `tidyfactor-js` | [`@tidyfactor/js`](https://www.npmjs.com/package/@tidyfactor/js) | -| **PHP** | Development | [`TidyFactor/PHP`](https://github.com/TidyFactor/PHP) | `tidyfactor-php` | [`@tidyfactor/php`](https://www.npmjs.com/package/@tidyfactor/php) | -| **Marketing** | Growth | [`TidyFactor/Marketing`](https://github.com/TidyFactor/Marketing) | `tidyfactor-marketing` | [`@tidyfactor/marketing`](https://www.npmjs.com/package/@tidyfactor/marketing) | - ---- - -## 👨‍💻 Organization & Support - -- 🌐 **Official Website:** [https://tidyfactor.com/](https://tidyfactor.com/) -- 📚 **Official Documentation:** [https://tidyfactor.com/documentation](https://tidyfactor.com/documentation) -- 🤝 **Official Partner Website:** [Alwkala Digital Agency](https://alwkala.com/) -- 🐙 **GitHub Organization:** [github.com/TidyFactor](https://github.com/TidyFactor) -- 📧 **Business Inquiries:** [hello@tidyfactor.com](mailto:hello@tidyfactor.com) -- 📱 **WhatsApp:** [+20 101 665 6899](https://wa.me/201016656899) -- 📞 **Phone:** +20 101 665 6899 -- 📍 **Location:** Cairo, Egypt - ---- - -## 📜 License - -Licensed under the **Apache License 2.0**. Copyright (c) 2026 [TidyFactor](https://tidyfactor.com) & [Alwkala](https://alwkala.com). diff --git a/dist/tidyfactor-htmx/SKILL.md b/dist/tidyfactor-htmx/SKILL.md deleted file mode 100644 index 7dda594..0000000 --- a/dist/tidyfactor-htmx/SKILL.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: tidyfactor-htmx -description: "Server-Driven Hypermedia Interactivity engine with Contextual Decision Layer (CDL). Features locally vendored HTMX layered over server-rendered fragments (pairs with PHP, Node, Python). Trigger on commands 'brief', 'init', 'fragments', 'swap', 'triggers', 'forms', 'indicators', 'history', 'assets', 'i18n', or requests to add hypermedia interactions without SPAs." ---- -# TidyFactor HTMX (Server-Driven Hypermedia Interactivity) - -A command dispatcher for hypermedia-driven interfaces. This router declares commands and workflows without performing execution directly. - -## Commands - -| User intent | Command | What it loads | -|---|---|---| -| Strategic Hypermedia Discovery & Brief Resolution | `references/commands/brief.md` | `references/workflows/brief.md` + `references/memory/decision-points.md` + `references/memory/quality-bar.md` | -| Primary deliverable — setup vendored HTMX layer | `references/commands/init.md` | `references/workflows/init.md` + `references/memory/architecture.md` | -| Server-rendered HTML partials & fragment routes | `references/commands/fragments.md` | `references/workflows/fragments.md` + `references/memory/architecture.md` | -| DOM swap strategies (innerHTML, outerHTML, morphdom) | `references/commands/swap.md` | `references/workflows/swap.md` + `references/memory/decision-points.md` | -| Event triggers, polling intervals, SSE, debouncing | `references/commands/triggers.md` | `references/commands/triggers.md` + `references/memory/quality-bar.md` | -| Forms, inline validation errors, CSRF protection | `references/commands/forms.md` | `references/workflows/forms.md` + `references/memory/quality-bar.md` | -| Loading spinners, skeleton shimmers, button disabling | `references/commands/indicators.md` | `references/commands/indicators.md` + `references/memory/quality-bar.md` | -| Browser back-button & URL history synchronization | `references/commands/history.md` | `references/commands/history.md` + `references/memory/decision-points.md` | -| Local vendoring of htmx.min.js & extension scripts | `references/commands/assets.md` | `references/commands/assets.md` + `references/memory/architecture.md` | -| Companion JavaScript hooked to htmx lifecycle events | `references/commands/modules.md` | `references/commands/modules.md` + `references/memory/architecture.md` | -| Fragment translation & dynamic Arabic RTL rendering | `references/commands/i18n.md` | `references/commands/i18n.md` + `references/memory/quality-bar.md` | - -Read only the command file that matches the request. Do not load all commands simultaneously. - -## Non-Negotiable Invariants - -1. **Contextual Decision Layer (CDL)**: Resolve hypermedia baselines via `/brief` or `.tidyfactor/htmx-brief.md` before emitting code. -2. **Zero Third-Party CDN Dependency**: HTMX and all extensions MUST be vendored locally at `js/vendor/htmx.min.js`. -3. **Fragment HTML Only**: Endpoints respond with clean HTML fragments, not JSON and not full `` documents. -4. **CSRF On All Mutations**: Every `hx-post`, `hx-put`, `hx-delete` request MUST include CSRF tokens. -5. **7-Axis Pre-Emit Critique**: All generated components must be evaluated with `/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */`. diff --git a/dist/tidyfactor-htmx/assets/hero-banner.png b/dist/tidyfactor-htmx/assets/hero-banner.png deleted file mode 100644 index b3d35a8..0000000 Binary files a/dist/tidyfactor-htmx/assets/hero-banner.png and /dev/null differ diff --git a/dist/tidyfactor-htmx/assets/og-default.png b/dist/tidyfactor-htmx/assets/og-default.png deleted file mode 100644 index b3d35a8..0000000 Binary files a/dist/tidyfactor-htmx/assets/og-default.png and /dev/null differ diff --git a/dist/tidyfactor-htmx/bin/add-skill.js b/dist/tidyfactor-htmx/bin/add-skill.js deleted file mode 100644 index 5ecaea2..0000000 --- a/dist/tidyfactor-htmx/bin/add-skill.js +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env node -/** - * bin/add-skill.js — Multi-Agent Skill Installer Wrapper for tidyfactor-htmx - * Supports Trae, Cursor, Windsurf, Antigravity, GitHub Copilot, RooCode, OpenCode, KiloCode, Warp, and Universal. - * - * @license Apache-2.0 - */ - -const fs = require('fs'); -const path = require('path'); -const os = require('os'); - -const targetDir = process.cwd(); -const skillSource = path.resolve(__dirname, '..'); -const skillName = 'tidyfactor-htmx'; - -const AGENT_MAP = [ - { name: 'Trae AI IDE', dir: path.join(targetDir, '.trae', 'skills', skillName), test: path.join(targetDir, '.trae') }, - { name: 'Cursor IDE', dir: path.join(targetDir, '.cursor', 'skills', skillName), test: path.join(targetDir, '.cursor') }, - { name: 'Windsurf Cascade', dir: path.join(targetDir, '.windsurf', 'skills', skillName), test: path.join(targetDir, '.windsurf') }, - { name: 'GitHub Copilot', dir: path.join(targetDir, '.github', 'prompts', skillName), test: path.join(targetDir, '.github') }, - { name: 'RooCode', dir: path.join(targetDir, '.roo', 'skills', skillName), test: path.join(targetDir, '.roo') }, - { name: 'OpenCode / Zen', dir: path.join(targetDir, '.opencode', 'skills', skillName), test: path.join(targetDir, '.opencode') }, - { name: 'KiloCode', dir: path.join(targetDir, '.kilocode', 'skills', skillName), test: path.join(targetDir, '.kilocode') }, - { name: 'Warp Terminal', dir: path.join(targetDir, '.warp', 'skills', skillName), test: path.join(targetDir, '.warp') }, - { name: 'Kiro Spec IDE', dir: path.join(targetDir, '.kiro', 'skills', skillName), test: path.join(targetDir, '.kiro') }, - { name: 'Claude Code', dir: path.join(targetDir, '.claude', 'skills', skillName), test: path.join(targetDir, '.claude') }, - { name: 'Zed AI Agent', dir: path.join(targetDir, '.zed', 'skills', skillName), test: path.join(targetDir, '.zed') }, - { name: 'Google Antigravity/Gemini', dir: path.join(targetDir, '.agents', 'skills', skillName), test: path.join(targetDir, '.agents') }, -]; - -function copyRecursive(src, dest) { - fs.mkdirSync(dest, { recursive: true }); - const entries = fs.readdirSync(src, { withFileTypes: true }); - for (const entry of entries) { - const srcPath = path.join(src, entry.name); - const destPath = path.join(dest, entry.name); - if (['.git', 'node_modules', 'dist'].includes(entry.name)) continue; - if (entry.isDirectory()) { - copyRecursive(srcPath, destPath); - } else { - fs.copyFileSync(srcPath, destPath); - } - } -} - -// Determine installation targets -let mountedTargets = []; - -for (const agent of AGENT_MAP) { - if (fs.existsSync(agent.test)) { - copyRecursive(skillSource, agent.dir); - mountedTargets.push(agent.name + ' (' + path.relative(targetDir, agent.dir) + ')'); - } -} - -// Always ensure universal fallback in .agents/skills/ -const defaultDir = path.join(targetDir, '.agents', 'skills', skillName); -copyRecursive(skillSource, defaultDir); -if (!mountedTargets.some(t => t.includes('.agents'))) { - mountedTargets.push('Universal Default (.agents/skills/' + skillName + ')'); -} - -console.log('✨ Successfully injected ' + skillName + ' into:'); -mountedTargets.forEach(t => console.log(' • ' + t)); diff --git a/dist/tidyfactor-htmx/bin/create-kit.js b/dist/tidyfactor-htmx/bin/create-kit.js deleted file mode 100644 index 1cb99e3..0000000 --- a/dist/tidyfactor-htmx/bin/create-kit.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node -const fs = require('fs'); -const path = require('path'); - -const args = process.argv.slice(2); -if (args.includes('-v') || args.includes('--version')) { - console.log('tidyfactor-htmx v1.0.0'); - process.exit(0); -} - -if (args.includes('-h') || args.includes('--help')) { - console.log('Usage: npx @tidyfactor/cli-htmx [project-directory] [options]'); - console.log('Options:'); - console.log(' -y, --yes Non-interactive / AI Agent mode'); - console.log(' -v, --version Show version'); - console.log(' -h, --help Show help'); - process.exit(0); -} - -console.log('✨ Scaffolded tidyfactor-htmx starter project successfully.'); diff --git a/dist/tidyfactor-htmx/brand.json b/dist/tidyfactor-htmx/brand.json deleted file mode 100644 index d88d907..0000000 --- a/dist/tidyfactor-htmx/brand.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "TidyFactor HTMX", - "version": "1.2.0", - "schemaVersion": "brand-core-v2", - "meta": { - "product": "TidyFactor HTMX", - "tagline": "Server-Driven Hypermedia Interactivity", - "description": "Hypermedia interaction layer (HTMX over server-rendered fragments), locally vendored with zero CDN dependencies.", - "owner": "TidyFactor Ecosystem", - "website": "https://tidyfactor.com", - "repo": "https://github.com/TidyFactor/HTMX", - "version": "1.1.0", - "lastUpdated": "2026-08-25" - } -} diff --git a/dist/tidyfactor-htmx/memory/overview.md b/dist/tidyfactor-htmx/memory/overview.md deleted file mode 100644 index db99e61..0000000 --- a/dist/tidyfactor-htmx/memory/overview.md +++ /dev/null @@ -1 +0,0 @@ -# Deep Reference Memory — tidyfactor-htmx diff --git a/dist/tidyfactor-htmx/package.json b/dist/tidyfactor-htmx/package.json deleted file mode 100644 index ab4d2c1..0000000 --- a/dist/tidyfactor-htmx/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "@tidyfactor/htmx", - "version": "1.2.0", - "description": "TidyFactor HTMX track — Server-Driven Hypermedia Interactivity with Contextual Decision Layer (CDL)", - "main": "SKILL.md", - "bin": { - "tidyfactor-htmx": "bin/add-skill.js", - "add-skill": "bin/add-skill.js", - "add-htmx-skill": "bin/add-skill.js" - }, - "keywords": [ - "tidyfactor", - "htmx", - "hypermedia", - "server-rendered", - "spa-alternative", - "ai-agents", - "antigravity", - "claude-code", - "cursor" - ], - "author": "TidyFactor (https://tidyfactor.com)", - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "git+https://github.com/TidyFactor/HTMX.git" - }, - "scripts": { - "validate": "python tools/validate_skill.py", - "build": "node tools/build-skill.js", - "release": "python ../tools/release_skill.py ." - }, - "publishConfig": { - "access": "public" - }, - "files": [ - ".tidyfactor", - "AGENTS.md", - "CHANGELOG.md", - "LICENSE", - "README.ar.md", - "README.de.md", - "README.es.md", - "README.fa.md", - "README.fr.md", - "README.md", - "README.pt.md", - "README.zh.md", - "SKILL-REGISTRY.md", - "SKILL.md", - "VISION.md", - "assets", - "bin", - "brand.json", - "memory", - "references", - "scripts", - "templates", - "tools" - ] -} diff --git a/dist/tidyfactor-htmx/references/commands/_template.md b/dist/tidyfactor-htmx/references/commands/_template.md deleted file mode 100644 index 953989a..0000000 --- a/dist/tidyfactor-htmx/references/commands/_template.md +++ /dev/null @@ -1,27 +0,0 @@ -# Command: `` — - -## Purpose -One or two sentences: what this command extracts/organizes, and why it's -its own command rather than folded into another one. - -## When to run it -- Signal from the audit that suggests this command applies. -- User phrasing that should trigger it (besides the bare command word). - -## What it does -Numbered steps — concrete actions, not vague principles. - -## Output convention -``` -Example file tree fragment showing where output lands. -``` - -## Checklist -- [ ] Concrete, checkable outcomes for this command specifically. - ---- -To register a new command: -1. Copy this file to `references/commands/.md` and fill it in. -2. Add a row to the Command Index table in `SKILL.md`. -3. If it interacts with an existing command (consumes/produces the same - files), cross-reference it in both files' "What it does" sections. diff --git a/dist/tidyfactor-htmx/references/commands/assets.md b/dist/tidyfactor-htmx/references/commands/assets.md deleted file mode 100644 index dc0b1c6..0000000 --- a/dist/tidyfactor-htmx/references/commands/assets.md +++ /dev/null @@ -1,47 +0,0 @@ -# Command: `assets` — Vendoring & Version Hygiene - -## Purpose -Keep htmx and any extensions (SSE, WebSocket, etc.) locally vendored, -version-pinned, and free of CDN dependency — consistent with TidyFactor's -"portable, no lock-in" principle applied to a third-party script. - -## When to run it -- The audit shows htmx (or an extension) loaded from a CDN `` into master layout. - -2. **Setup Indicator CSS**: - - Inject `.htmx-indicator { display: none; } .htmx-request .htmx-indicator { display: inline-block; }`. - -3. **Pre-Emit Self-Critique**: - - `/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */` - ---- - -## Validation checklist - -- [ ] HTMX library vendored locally; no third-party CDN dependency. -- [ ] Indicator CSS classes present in stylesheet. -- [ ] Pre-emit critique stamp included. diff --git a/dist/tidyfactor-htmx/references/workflows/swap.md b/dist/tidyfactor-htmx/references/workflows/swap.md deleted file mode 100644 index d8b8735..0000000 --- a/dist/tidyfactor-htmx/references/workflows/swap.md +++ /dev/null @@ -1,24 +0,0 @@ -# Workflow: swap - -Calibrates DOM swap strategies (`innerHTML`, `outerHTML`, `morphdom`) and target resolution. - ---- - -## Steps - -1. **Target Identification**: - - Ensure target element has a unique ID (e.g. `id="results-container"`). - -2. **Swap Strategy Selection**: - - Add `hx-swap="innerHTML"` or `hx-swap="morphdom"` with transition easing. - -3. **Pre-Emit Self-Critique**: - - `/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */` - ---- - -## Validation checklist - -- [ ] Target element exists in DOM before swap execution. -- [ ] Swap mode avoids unintended parent destruction. -- [ ] Pre-emit critique stamp included. diff --git a/dist/tidyfactor-htmx/templates/index.html b/dist/tidyfactor-htmx/templates/index.html deleted file mode 100644 index b9e33e8..0000000 --- a/dist/tidyfactor-htmx/templates/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dist/tidyfactor-htmx/tools/build-skill.js b/dist/tidyfactor-htmx/tools/build-skill.js deleted file mode 100644 index 029ad66..0000000 --- a/dist/tidyfactor-htmx/tools/build-skill.js +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env node -/** - * tools/build-skill.js — TidyFactor HTMX Build & Packaging Tool - */ - -const fs = require('fs'); -const path = require('path'); -const { execSync } = require('child_process'); - -const SKILL_NAME = 'tidyfactor-htmx'; -const REPO_ROOT = path.resolve(__dirname, '..'); -const DIST_DIR = path.join(REPO_ROOT, 'dist'); -const STAGING_DIR = path.join(DIST_DIR, SKILL_NAME); -const SKILLS_LAB_ROOT = path.resolve(REPO_ROOT, '..'); - -const HOME = process.env.USERPROFILE || process.env.HOME; -const GLOBAL_CONFIG_SKILL = path.join(HOME, '.gemini', 'config', 'skills', SKILL_NAME); -const LOCAL_AGENT_SKILL = path.join(SKILLS_LAB_ROOT, '.agents', 'skills', SKILL_NAME); - -function log(msg) { - console.log(`[build-skill] ${msg}`); -} - -function runValidation() { - log('running release validation checks...'); - const pythonCmd = process.platform === 'win32' ? 'python' : 'python3'; - execSync(`${pythonCmd} "${path.join(__dirname, 'validate_skill.py')}"`, { stdio: 'inherit' }); -} - -function copyRecursive(src, dest) { - if (!fs.existsSync(src)) return; - const stat = fs.statSync(src); - if (stat.isDirectory()) { - fs.mkdirSync(dest, { recursive: true }); - for (const item of fs.readdirSync(src)) { - if (['node_modules', '.git', 'dist', '.agents'].includes(item)) continue; - copyRecursive(path.join(src, item), path.join(dest, item)); - } - } else { - fs.copyFileSync(src, dest); - } -} - -function zipDirectory(sourceDir, outZip) { - const pythonCmd = process.platform === 'win32' ? 'python' : 'python3'; - const pyScript = `import shutil, os; shutil.make_archive(r'''${outZip.replace(/\\/g, '/').replace(/\.skill$/, '')}''', 'zip', r'''${sourceDir.replace(/\\/g, '/')}''')`; - execSync(`${pythonCmd} -c "${pyScript}"`); - const generatedZip = outZip.replace(/\.skill$/, '.zip'); - if (generatedZip !== outZip) { - if (fs.existsSync(outZip)) fs.unlinkSync(outZip); - fs.renameSync(generatedZip, outZip); - } -} - -function build() { - log(`repo root: ${REPO_ROOT}`); - runValidation(); - - log('cleaning previous build...'); - if (fs.existsSync(DIST_DIR)) { - fs.rmSync(DIST_DIR, { recursive: true, force: true }); - } - fs.mkdirSync(STAGING_DIR, { recursive: true }); - - const pkg = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'package.json'), 'utf-8')); - const version = pkg.version; - - log('staging single-source-of-truth files from repo root...'); - const whitelist = [ - 'SKILL.md', - 'references', - 'memory', - 'templates', - 'scripts', - 'tools', - 'assets', - 'bin', - 'brand.json', - '.tidyfactor', - 'package.json', - 'AGENTS.md', - 'README.md', - 'README.ar.md', - 'LICENSE', - 'CHANGELOG.md' - ]; - - for (const item of whitelist) { - const srcPath = path.join(REPO_ROOT, item); - if (fs.existsSync(srcPath)) { - log(` + ${item}`); - copyRecursive(srcPath, path.join(STAGING_DIR, item)); - } - } - - log('zipping skill archive...'); - const archiveName = `${SKILL_NAME}.skill`; - const versionedArchiveName = `${SKILL_NAME}-v${version}.skill`; - const archivePath = path.join(DIST_DIR, archiveName); - const versionedArchivePath = path.join(DIST_DIR, versionedArchiveName); - - zipDirectory(STAGING_DIR, archivePath); - fs.copyFileSync(archivePath, versionedArchivePath); - - const stats = fs.statSync(archivePath); - log(`done → dist\\${archiveName} (${(stats.size / 1024).toFixed(1)} KB)`); - log(`✓ Created versioned archive → dist\\${versionedArchiveName}`); - - // Copy to Skills-LAB root - fs.copyFileSync(archivePath, path.join(SKILLS_LAB_ROOT, archiveName)); - fs.copyFileSync(versionedArchivePath, path.join(SKILLS_LAB_ROOT, versionedArchiveName)); - log(`✓ Updated Skills-LAB root archives → ${archiveName} & ${versionedArchiveName}`); - - // Cross-agent synchronization - const targets = [LOCAL_AGENT_SKILL, GLOBAL_CONFIG_SKILL]; - for (const target of targets) { - log(`synchronizing to target location: ${target}`); - if (fs.existsSync(target)) { - fs.rmSync(target, { recursive: true, force: true }); - } - copyRecursive(STAGING_DIR, target); - } - log('✓ Completed cross-agent synchronization across all target locations.'); -} - -build(); diff --git a/dist/tidyfactor-htmx/tools/validate-skill.js b/dist/tidyfactor-htmx/tools/validate-skill.js deleted file mode 100644 index a72bbc5..0000000 --- a/dist/tidyfactor-htmx/tools/validate-skill.js +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env node -/** - * validate-skill.js — Validates skill frontmatter, file integrity, - * command reference completeness, content parity, and path linkages across agent targets. - */ - -const fs = require('fs'); -const path = require('path'); - -const ROOT = path.resolve(__dirname, '..'); -const SKILL_NAME = "tidyfactor-htmx"; -const AGENTS_SKILL_DIR = path.join(ROOT, '.agents', 'skills', SKILL_NAME); -const CLAUDE_SKILL_DIR = path.join(ROOT, '.claude-skill'); - -const REQUIRED_COMMANDS = ["assets", "forms", "fragments", "history", "i18n", "indicators", "init", "modules", "swap", "triggers"]; - -const autoSync = process.argv.includes('--sync') || process.argv.includes('--fix'); - -let errors = []; -let warnings = []; - -function log(msg) { - console.log(`[validate-skill] ${msg}`); -} - -function checkFrontmatter(filePath) { - if (!fs.existsSync(filePath)) { - errors.push(`Missing skill file: ${path.relative(ROOT, filePath)}`); - return; - } - const content = fs.readFileSync(filePath, 'utf8'); - if (!content.startsWith('---')) { - errors.push(`File ${path.relative(ROOT, filePath)} is missing YAML frontmatter header ('---')`); - return; - } - const parts = content.split('---'); - if (parts.length < 3) { - errors.push(`Invalid frontmatter formatting in ${path.relative(ROOT, filePath)}`); - return; - } - const frontmatter = parts[1]; - if (!frontmatter.includes('name:')) { - errors.push(`Missing 'name:' field in frontmatter of ${path.relative(ROOT, filePath)}`); - } - if (!frontmatter.includes('description:')) { - errors.push(`Missing 'description:' field in frontmatter of ${path.relative(ROOT, filePath)}`); - } - log(`✓ Frontmatter valid for ${path.relative(ROOT, filePath)}`); -} - -function checkCommandsAndParity() { - const agentsRefDir = path.join(AGENTS_SKILL_DIR, 'references', 'commands'); - const claudeRefDir = path.join(CLAUDE_SKILL_DIR, 'references', 'commands'); - - if (!fs.existsSync(agentsRefDir)) { - errors.push(`Missing command references directory: ${path.relative(ROOT, agentsRefDir)}`); - return; - } - - let missingCmds = []; - for (const cmd of REQUIRED_COMMANDS) { - const file = `${cmd}.md`; - const agentFile = path.join(agentsRefDir, file); - const claudeFile = path.join(claudeRefDir, file); - - if (!fs.existsSync(agentFile)) { - missingCmds.push(cmd); - if (autoSync && fs.existsSync(claudeFile)) { - fs.mkdirSync(path.dirname(agentFile), { recursive: true }); - fs.copyFileSync(claudeFile, agentFile); - log(`Synced missing command file: ${cmd}.md -> .agents/`); - } - } - } - - if (missingCmds.length > 0 && !autoSync) { - errors.push(`Missing required command reference specs: ${missingCmds.join(', ')}`); - } else { - log(`✓ All ${REQUIRED_COMMANDS.length} command specs verified with parity check across targets`); - } -} - -function checkDirectory(dirName) { - const target = path.join(ROOT, dirName); - if (!fs.existsSync(target)) { - errors.push(`Missing required root directory: ${dirName}`); - } else { - log(`✓ Directory verified: ${dirName}`); - } -} - -function main() { - log(`Starting skill validation check for ${SKILL_NAME}...`); - - checkFrontmatter(path.join(AGENTS_SKILL_DIR, 'SKILL.md')); - checkFrontmatter(path.join(CLAUDE_SKILL_DIR, 'SKILL.md')); - - checkCommandsAndParity(); - checkDirectory('memory'); - checkDirectory('templates'); - - if (fs.existsSync(path.join(ROOT, 'AGENTS.md'))) { - log(`✓ Root AGENTS.md verified`); - } else { - warnings.push(`Missing root AGENTS.md`); - } - - if (errors.length > 0) { - console.error(`\n✖ Validation failed with errors:`); - errors.forEach(e => console.error(` ❌ ${e}`)); - process.exit(1); - } - - log(`✨ All skill validation checks passed successfully!\n`); -} - -main(); diff --git a/dist/tidyfactor-htmx/tools/validate_skill.py b/dist/tidyfactor-htmx/tools/validate_skill.py deleted file mode 100644 index 8e1fbd7..0000000 --- a/dist/tidyfactor-htmx/tools/validate_skill.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env python3 -""" -validate_skill.py — TidyFactor HTMX Release & Integrity Validator. -Checks: -1. SemVer synchronization across package.json, .tidyfactor, brand.json, CHANGELOG.md. -2. License consistency (Apache-2.0). -3. Existence of all files referenced in SKILL.md. -4. Validation checklists in all workflow files. -5. Absence of machine-specific absolute paths. -""" - -import sys -import os -import json -import re -from pathlib import Path - -# Ensure UTF-8 output on Windows terminal -if sys.platform == "win32": - sys.stdout.reconfigure(encoding="utf-8") - sys.stderr.reconfigure(encoding="utf-8") - -def main(): - root = Path(__file__).resolve().parent.parent - errors = [] - - print("=" * 60) - print(" RUNNING TIDYFACTOR HTMX RELEASE VALIDATION") - print("=" * 60) - - # 1. SemVer Synchronization Check - print("\n[1] Checking SemVer synchronization across metadata...") - pkg_file = root / "package.json" - tf_file = root / ".tidyfactor" - brand_file = root / "brand.json" - cl_file = root / "CHANGELOG.md" - - pkg_ver = json.loads(pkg_file.read_text(encoding="utf-8")).get("version") if pkg_file.exists() else None - tf_ver = json.loads(tf_file.read_text(encoding="utf-8")).get("version") if tf_file.exists() else None - - brand_data = json.loads(brand_file.read_text(encoding="utf-8")) if brand_file.exists() else {} - brand_ver = brand_data.get("version") or brand_data.get("meta", {}).get("version") - - print(f" package.json : {pkg_ver}") - print(f" .tidyfactor : {tf_ver}") - print(f" brand.json : {brand_ver}") - - if not (pkg_ver and tf_ver and brand_ver and pkg_ver == tf_ver == brand_ver): - errors.append(f"Version mismatch: package.json({pkg_ver}) vs .tidyfactor({tf_ver}) vs brand.json({brand_ver})") - else: - print(f" [OK] Version {pkg_ver} synchronized across all JSON metadata.") - - if cl_file.exists(): - cl_text = cl_file.read_text(encoding="utf-8") - if f"## [{pkg_ver}]" not in cl_text and f"[{pkg_ver}]" not in cl_text: - errors.append(f"CHANGELOG.md is missing release entry for version [{pkg_ver}].") - else: - print(f" [OK] CHANGELOG.md contains release entry for [{pkg_ver}].") - else: - errors.append("Missing CHANGELOG.md.") - - # 2. License check - print("\n[2] Checking license consistency...") - license_file = root / "LICENSE" - if license_file.exists(): - print(" [OK] LICENSE file exists (Apache-2.0).") - else: - errors.append("Missing LICENSE file.") - - # 3. Check referenced files in SKILL.md - print("\n[3] Checking SKILL.md referenced files exist on disk...") - skill_md = root / "SKILL.md" - if skill_md.exists(): - content = skill_md.read_text(encoding="utf-8") - refs = re.findall(r'(?:references|memory|commands|workflows)/[a-zA-Z0-9_\-\./]+(?:\.md|\.json)?', content) - for ref in sorted(set(refs)): - target = root / ref - if not target.exists() and not (root / "references" / ref).exists(): - if not (root / ref).is_dir() and not (root / "references" / ref).is_dir(): - errors.append(f"SKILL.md references non-existent file: {ref}") - else: - print(f" [OK] Found {ref}") - else: - errors.append("Missing SKILL.md.") - - # 4. Check workflow validation checklists - print("\n[4] Checking workflow checklists...") - wf_dir = root / "references" / "workflows" - if wf_dir.exists(): - for wf in wf_dir.glob("*.md"): - txt = wf.read_text(encoding="utf-8").lower() - if "validation checklist" not in txt: - errors.append(f"Workflow {wf.name} missing '## Validation checklist'") - else: - print(f" [OK] {wf.name} has Validation checklist.") - - # 5. Audit for leaked machine paths - print("\n[5] Auditing for leaked machine-specific absolute paths...") - for ext in ["*.md", "*.json", "*.js", "*.py"]: - for file in root.rglob(ext): - if any(part in file.parts for part in [".git", "node_modules", "dist", "assets"]): - continue - text = file.read_text(encoding="utf-8", errors="ignore") - if re.search(r'[A-Za-z]:\\(?:Users|wamp64|Dev-Studio)', text, re.IGNORECASE): - if file.name not in ["release_suite.py", "audit_all_skills.py"]: - errors.append(f"Machine-specific absolute path found in: {file.relative_to(root)}") - - print("\n" + "=" * 60) - if errors: - print(f"[FAIL] {len(errors)} validation error(s) found:") - for err in errors: - print(f" - {err}") - print("=" * 60) - sys.exit(1) - else: - print("[SUCCESS] ALL SKILL INTEGRITY CHECKS PASSED!") - print("=" * 60) - sys.exit(0) - -if __name__ == "__main__": - main()