@tidyfactor/doc 1.3.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tidyfactor +3 -3
- package/CHANGELOG.md +103 -4
- package/README.ar.md +34 -8
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fa.md +1 -1
- package/README.fr.md +1 -1
- package/README.md +34 -8
- package/README.pt.md +1 -1
- package/README.zh.md +1 -1
- package/SKILL.md +28 -5
- package/bin/add-skill.js +44 -6
- package/brand.json +1 -1
- package/brand.yaml +10 -0
- package/manifest.json +216 -0
- package/package.json +4 -2
- package/references/commands/adr.md +25 -0
- package/references/commands/audit.md +15 -0
- package/references/commands/brief.md +16 -0
- package/references/commands/generate.md +7 -6
- package/references/commands/site.md +25 -23
- package/references/commands/vitepress.md +20 -0
- package/references/memory/20-brain-baas-integration.md +83 -0
- package/references/memory/adr-template.md +84 -0
- package/references/memory/changelog-rules.md +58 -0
- package/references/memory/collection-sources.md +48 -47
- package/references/memory/decision-points.md +72 -0
- package/references/memory/doc-templates.md +102 -73
- package/references/memory/doc-tree.md +38 -37
- package/references/memory/docsify-config.md +274 -273
- package/references/memory/git-doc-sync-hook.md +54 -0
- package/references/memory/mkdocs-config.md +171 -170
- package/references/memory/naming-conventions.md +40 -0
- package/references/memory/project-mindmap.md +66 -0
- package/references/memory/site-engines.md +32 -34
- package/references/memory/stacks/js-ts.md +47 -45
- package/references/memory/stacks/php.md +35 -33
- package/references/memory/stacks/react-vue-next.md +52 -50
- package/references/memory/tone-of-voice.md +31 -0
- package/references/memory/vitepress-config.md +174 -0
- package/references/workflows/audit.md +42 -0
- package/references/workflows/brief.md +105 -0
- package/references/workflows/collect.md +60 -25
- package/references/workflows/generate-adr.md +41 -0
- package/references/workflows/generate-changelog.md +52 -0
- package/references/workflows/init-docs.md +44 -18
- package/references/workflows/vitepress.md +57 -0
- package/scripts/audit_docs.py +190 -0
- package/scripts/clean_orphaned_assets.py +185 -0
- package/tools/build-skill.js +3 -0
- package/assets/og-default.png +0 -0
package/.tidyfactor
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tidyfactor-doc",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"category": "
|
|
5
|
-
"description": "TidyFactor Doc
|
|
3
|
+
"version": "1.9.0",
|
|
4
|
+
"category": "development",
|
|
5
|
+
"description": "TidyFactor Doc — Code Documentation Builder, ADR Architect, Link Auditor & Triple-Engine Publishing Platform (VitePress, MkDocs Material & Docsify) for AI Coding Agents",
|
|
6
6
|
"repository": "https://github.com/TidyFactor/Doc",
|
|
7
7
|
"npm": "@alwkala/tidyfactor-doc",
|
|
8
8
|
"compatibility": [
|
package/CHANGELOG.md
CHANGED
|
@@ -3,11 +3,110 @@
|
|
|
3
3
|
All notable changes to `tidyfactor-doc` will be documented in this file.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
-
## [1.
|
|
6
|
+
## [1.9.0] - 2026-09-09
|
|
7
7
|
|
|
8
|
-
###
|
|
9
|
-
- **
|
|
10
|
-
-
|
|
8
|
+
### 🚀 Added — Architectural Decision Records (ADR), Deep Docblock Scraping, Project Mindmaps & Asset Hygiene
|
|
9
|
+
- **Architectural Decision Record Generator (`references/commands/adr.md`, `references/workflows/generate-adr.md`)**:
|
|
10
|
+
- Added dedicated `adr` command with Context-Aware prompts to record technical choices, problem context, decision drivers, and consequences.
|
|
11
|
+
- Standardized on MADR (Markdown Architectural Decision Records) schema with index generation (`docs/adr/README.md`).
|
|
12
|
+
- **Deep Code Parsing in Collect Workflow (`references/workflows/collect.md`)**:
|
|
13
|
+
- Enriched Step 1 with automated scraping for PHPDoc (`@param`, `@return`, `@throws`, `@deprecated`) and JSDoc/TSDoc (`@param`, `@returns`, `@typedef`, `@template`) annotations.
|
|
14
|
+
- Mapped AST interface types and class properties directly to documentation templates.
|
|
15
|
+
- **Operational Memory Expansion**:
|
|
16
|
+
- Added `references/memory/adr-template.md`: Authoritative MADR record structure and master table of contents.
|
|
17
|
+
- Added `references/memory/project-mindmap.md`: Mermaid AST schemas for architecture layering, component topologies, and execution flows.
|
|
18
|
+
- Added `references/memory/naming-conventions.md`: Uniform naming conventions across PHP (PSR-1/PSR-12), TypeScript, Python, and doc slugs.
|
|
19
|
+
- Added `references/memory/tone-of-voice.md`: Non-negotiable technical writing rules (direct, action-oriented, zero marketing fluff).
|
|
20
|
+
- Added `references/memory/git-doc-sync-hook.md`: Pre-commit hook specification enforcing documentation updates alongside core code changes.
|
|
21
|
+
- **Automated Asset Hygiene & Orphan Detection (`scripts/clean_orphaned_assets.py`)**:
|
|
22
|
+
- Added script to scan all `.md` files for image references, identify unreferenced assets in `assets/`, detect duplicate files via SHA-256 hashes, and calculate WebP compression savings.
|
|
23
|
+
- **Unified Tooling Manifest (`manifest.json`)**:
|
|
24
|
+
- Registered `clean_orphaned_assets` tool with portable CLI patterns.
|
|
25
|
+
- Registered `adr` command in tool invocation mappings and decision gate options.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## [1.8.0] - 2026-09-09
|
|
30
|
+
|
|
31
|
+
### 🚀 Added — Documentation Hygiene Auditor, Keep a Changelog Architecture & Asset Optimization
|
|
32
|
+
- **Documentation Quality & Link Auditor (`references/commands/audit.md`, `references/workflows/audit.md`)**:
|
|
33
|
+
- Added dedicated `audit` command and workflow for sub-second deterministic doc scanning.
|
|
34
|
+
- Added relative markdown link integrity verification in `scripts/audit_docs.py` (`check_relative_links`) to detect broken local file links before release.
|
|
35
|
+
- Added Keep a Changelog structural validator (`check_changelog_format`) verifying SemVer release headers and standard change categories.
|
|
36
|
+
- **Changelog Workflow & SSOT Architecture (`references/workflows/generate-changelog.md`)**:
|
|
37
|
+
- Codified automated `generate-changelog` workflow strictly adhering to Keep a Changelog v1.1.0 and SemVer 2.0.0.
|
|
38
|
+
- Conventional Commits parser mapping git commits to standard sections (`Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`).
|
|
39
|
+
- Integrated changelog generation routing into `references/commands/generate.md`.
|
|
40
|
+
- **Operational Memory & Governance Templates (`references/memory/changelog-rules.md`, `references/memory/doc-templates.md`)**:
|
|
41
|
+
- Added `references/memory/changelog-rules.md` establishing release standards, SemVer bump formulas, and conventional commit mappings.
|
|
42
|
+
- Added standard `CHANGELOG.md` template to `references/memory/doc-templates.md`.
|
|
43
|
+
- Refreshed all memory verification timestamps (`<!-- last-verified: 2026-09-09 -->`).
|
|
44
|
+
- **Asset Deduplication & Hygiene (`assets/`)**:
|
|
45
|
+
- Removed duplicate 242KB asset (`assets/og-default.png`), saving 50% of the asset footprint without breaking references.
|
|
46
|
+
- **Unified Tooling & Decision Manifest (`manifest.json`)**:
|
|
47
|
+
- Expanded `audit_docs` tool contract with link integrity and changelog validation scopes.
|
|
48
|
+
- Registered `audit` and `vitepress` commands in tool invocation mappings and decision gate options.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## [1.7.0] - 2026-09-09
|
|
53
|
+
|
|
54
|
+
### 🚀 Added — Triple-Engine Publishing Platform (VitePress Integration) & Luxury RTL Design System
|
|
55
|
+
- **VitePress Publishing Engine (references/commands/vitepress.md)**: Added full VitePress SSG engine support alongside MkDocs Material and Docsify.
|
|
56
|
+
- **Ordered Workflow & Automation (references/workflows/vitepress.md)**: 6-step workflow covering scaffolding, multi-language subdirectory routing, luxury CSS injection, and zero-dead-link validation (npm run docs:build).
|
|
57
|
+
- **Master Configuration & Luxury Tokens (references/memory/vitepress-config.md)**: Codified complete ESM config.mjs schema, Alexandria + Cairo + JetBrains Mono typography, surgical RTL navbar flex order, and Quick-Navigation grid templates.
|
|
58
|
+
- **Luxury Hero & Actions Architecture**: Codified single-row CTA button flex safeguards (white-space: nowrap) and stable natural RTL Hero direction (Text/CTAs on right, Logo on left).
|
|
59
|
+
- **3-Column Feature Cards & Column Collapse Fix**: Codified explicit width assignment on .VPFeatures .item and BiDi text safeguards.
|
|
60
|
+
- **3-Way Engine Evaluation Matrix (references/memory/site-engines.md)**: Expanded to comprehensive 3-way evaluation across VitePress, MkDocs Material, and Docsify.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## [1.6.0] - 2026-09-08
|
|
65
|
+
|
|
66
|
+
### 🧠 Added — Dual-Mode Decision Architect (DM-DA) & Debate Mode Engine (CDL v2.0)
|
|
67
|
+
- **Interactive Interview & Debate Command (`brief`)**: Added `references/commands/brief.md` supporting trigger phrases `brief`, `interview`, `debate`, "استجوبني", and "ناقشني في معمارية التوثيق".
|
|
68
|
+
- **Dual Operational Modes (`references/workflows/brief.md`)**:
|
|
69
|
+
- **[MODE A] Smart 3-Round Protocol**: Fast-track structured alignment in 3 deterministic rounds (Purpose & Target Persona ➔ Architecture & Engine ➔ Hygiene & Safe Defaults) terminating with an explicit escalation gate prompt.
|
|
70
|
+
- **[MODE B] Relentless Debate & Interview (Debate Mode)**: Deep multi-turn architectural counter-questioning, challenging assumptions on static vs. SPA, bilingual overhead, and automated secret scrubbing. Strictly terminates only on `"END DEBATE"` / `"اعتماد"`, emitting a formal `docs/architectural_debate_synthesis.md` artifact.
|
|
71
|
+
- **Architectural Decision Matrix (`references/memory/decision-points.md`)**: Codified 5 core documentation dimensions (D1: Purpose & Scope, D2: Platform Engine, D3: Target Persona & Register, D4: Hygiene & Leak Policy, D5: Extraction Depth) with Boolean Skip Conditions for zero-overhead execution.
|
|
72
|
+
- **Declarative Gate Expansion (`manifest.json`)**: Expanded manifest schema v1.1.0 with formal `brief` decision gates for D1–D5 with local YAML persistence (`.tidyfactor/doc-brief.snapshot.yaml`).
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## [1.5.1] - 2026-09-08
|
|
77
|
+
|
|
78
|
+
### 🏛️ Fixed & Synchronized — Governance Compliance (TidyFactor Skill Architect)
|
|
79
|
+
- **Memory Freshness (Rule 11)**: Added `<!-- last-verified: 2026-09-08 -->` stamps to all stack memory files (`js-ts.md`, `php.md`, `react-vue-next.md`).
|
|
80
|
+
- **Two-Tier Multi-Language Documentation (Rule 13)**:
|
|
81
|
+
- Integrated universal 8-language switcher bar into `README.md` and `README.ar.md`.
|
|
82
|
+
- Synchronized title banner versioning (`v1.5.1`) across all 8 market localizations (`README.md`, `README.ar.md`, `README.de.md`, `README.es.md`, `README.fa.md`, `README.fr.md`, `README.pt.md`, `README.zh.md`).
|
|
83
|
+
- **Contextual Decision Layer CDL v2.0 (Rule 14)**:
|
|
84
|
+
- Integrated Step 0 Context Delta Resolution into `references/workflows/init-docs.md` with auto-sensing for `doc_engine`, `target_scope`, and `audience_persona`.
|
|
85
|
+
- **Token Efficiency & YAML Primacy (Rule 15)**:
|
|
86
|
+
- Created canonical `brand.yaml` SSOT at skill root alongside `brand.json`.
|
|
87
|
+
- Updated `manifest.json` to persist decision snapshots to `.tidyfactor/doc-brief.snapshot.yaml` and discover from `brand.yaml`.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## [1.5.0] - 2026-09-02
|
|
92
|
+
|
|
93
|
+
### 🧠 Added — Contextual Decision Layer (CDL v1.1.0) & Declarative Decision Gates
|
|
94
|
+
- **Declarative Decision Gates (`manifest.json`)**: Added formal `decision_gates[]` declaration for the `init` command conforming to manifest schema v1.1.0, defining `doc_engine`, `target_scope`, and `audience_persona` with `track_staleness: true`.
|
|
95
|
+
- **Context Delta Resolution Engine (`references/workflows/collect.md`)**: Upgraded collect workflow to evaluate the mechanical Delta formula:
|
|
96
|
+
$$\text{Unknowns} = \text{Required Decisions} - (\text{Discovered Facts} \cup \text{Brain KIs})$$
|
|
97
|
+
- **Interactive Disclosure & User Agency First**: Surfacing all genuine Unknowns interactively with structured options and recommendations.
|
|
98
|
+
- **Anti-Dual-Write Architecture**: Enforcing local markdown files under `docs/` as sole SSOT, with one-way outbound cloud sync via `--sync-brain`.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## [1.4.0] - 2026-09-02
|
|
103
|
+
|
|
104
|
+
### 🧠 Added — Sovereign Brain MCP Integration, Hygiene Auditor & Fail-Open Protocol
|
|
105
|
+
- **Brain Integration Contract (`references/memory/20-brain-baas-integration.md`)**: Sovereign self-hosted architecture and Documentation Knowledge Item (KI) payload schemas.
|
|
106
|
+
- **Fail-Open Active Discovery (`references/workflows/collect.md`)**: Local workspace auto-sensing first, optional Brain MCP context acceleration (`search_knowledge_base`) when active, and instant 0ms silent fallback.
|
|
107
|
+
- **Runtime Tooling Manifest (`manifest.json`)**: Declared portable `audit_docs` tool conforming to `skill-manifest.tools.schema.json` with `"skill_root_anchor": "self"`.
|
|
108
|
+
- **Documentation Quality & Hygiene Auditor (`scripts/audit_docs.py`)**: Sub-second AST and pattern scanner detecting sensitive credentials leaks, passwords, private tokens, and banned absolute workstation URLs.
|
|
109
|
+
- **Tooling Scope & Anti-Triggers**: Enriched `SKILL.md` with explicit Rule 10 Tooling Scope and anti-triggers.
|
|
11
110
|
|
|
12
111
|
---
|
|
13
112
|
|
package/README.ar.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
# 📚 TidyFactor Doc `v1.
|
|
3
|
+
# 📚 TidyFactor Doc `v1.9.0`
|
|
4
4
|
### محرك استقراء الأكواد البرمجية، وتوليد مراجع الـ API، ومنصة النشر المزدوجة (MkDocs Material و Docsify)
|
|
5
5
|
|
|
6
6
|
**بناء توثيقات فنية دقيقة، مستدامة، آمنة، وقابلة للتصفح لعصر التعاون بين المطورين ووكلاء الذكاء الاصطناعي.**
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
[](#-معايير-الروابط-النسبية-والتصفح-النظيف)
|
|
13
13
|
[](README.md)
|
|
14
14
|
|
|
15
|
-
[
|
|
15
|
+
[ 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)
|
|
16
|
+
|
|
17
|
+
[🌐 الموقع الرسمي](https://tidyfactor.com/) • [📚 مركز التوثيق](https://tidyfactor.com/documentation) • [🤝 الشريك (الوكالة)](https://alwkala.com/) • [⚡ سجل الأوامر](#-سجل-الأوامر-ومسارات-التوثيق-الأربعة) • [🛡️ الضمانات الأمنية](#-ضمانات-الأمان-وحجب-البيانات-الحساسة)
|
|
16
18
|
|
|
17
19
|
<br/><br/>
|
|
18
20
|
|
|
@@ -62,17 +64,24 @@ graph LR
|
|
|
62
64
|
|
|
63
65
|
---
|
|
64
66
|
|
|
65
|
-
## 🏛️ سجل الأوامر ومسارات التوثيق
|
|
67
|
+
## 🏛️ سجل الأوامر ومسارات التوثيق الشاملة
|
|
66
68
|
|
|
67
69
|
| نية المطور وطلب المستخدم | الأمر | مسارات العمل والذاكرة المحملة | المخرجات الناتجة |
|
|
68
70
|
|---|---|---|---|
|
|
71
|
+
| **"تأصيل سياق التوثيق، الاستجواب أو المناظرة المعمارية"** / "brief" / "debate" | `brief` | `workflows/brief.md`<br>`memory/decision-points.md` | وثيقة `.tidyfactor/doc-brief.snapshot.yaml` و `docs/architectural_debate_synthesis.md` |
|
|
69
72
|
| **"تجهيز وهيكلة مجلد التوثيق"** / "scaffold /docs" | `init` | `workflows/init-docs.md`<br>`memory/doc-tree.md` | مجلد `/docs`، ملف `docs/.doc-manifest.json`، وصفحة `docs/README.md` |
|
|
70
73
|
| **"استقراء وفحص الكود والمشروع"** / "gather facts" | `collect` | `workflows/collect.md`<br>`memory/collection-sources.md` | تقرير `docs/.collected/<target>.md` (تحليل منظم بالأبعاد الخمسة) |
|
|
71
74
|
| **"كتابة مرجع واجهة برمجة (API)"** / "API reference" | `generate` | `workflows/generate-api.md`<br>`memory/doc-templates.md`<br>`memory/stacks/*.md` | ملف `docs/api/<target>.md` (جداول المعاملات، القيم المرجعة، الأخطاء) |
|
|
75
|
+
| **"توليد أو تحديث سجل التغييرات"** / "generate changelog" | `generate` | `workflows/generate-changelog.md`<br>`memory/doc-templates.md`<br>`memory/changelog-rules.md` | ملف `CHANGELOG.md` في جذر المشروع (معيار Keep a Changelog و SemVer) |
|
|
72
76
|
| **"كتابة دليل إعداد وتشغيل"** / "setup guide" | `generate` | `workflows/generate-guide.md`<br>`memory/doc-templates.md` | ملف `docs/guides/<purpose-slug>.md` (دليل متخصص محدد الغرض) |
|
|
73
77
|
| **"توليد أو تحديث README الرئيسي"** / "generate readme" | `generate` | `workflows/generate-readme.md`<br>`memory/doc-templates.md` | ملف `README.md` في جذر المشروع (نظرة عامة، التثبيت، المتغيرات) |
|
|
74
78
|
| **"إضافة تعليقات برمجية للكود"** / "inline docblocks" | `generate` | `workflows/generate-inline.md`<br>`memory/stacks/*.md` | تعديل مباشر للملفات المصدرية بتعليقات PHPDoc / JSDoc / TSDoc |
|
|
75
|
-
| **"
|
|
79
|
+
| **"نشر بوابة توثيق متكاملة"** / "محدد تفاعلي" | `site` | `memory/site-engines.md` | اختيار تفاعلي بين (`vitepress` أو `mkdocs` أو `docsify`) |
|
|
80
|
+
| **"إعداد بوابة VitePress الحديثة"** / "VitePress SSG" | `vitepress` | `workflows/vitepress.md`<br>`memory/vitepress-config.md` | ملفات `docs/.vitepress/config.mjs` وتنسيقات الـ RTL الفاخرة |
|
|
81
|
+
| **"إعداد بوابة MkDocs Material"** / "Python SSG" | `mkdocs` | `workflows/mkdocs.md`<br>`memory/mkdocs-config.md` | ملف `mkdocs.yml` و `docs/stylesheets/extra.css` |
|
|
82
|
+
| **"تحويل التوثيقات إلى موقع Docsify"** / "deploy portal" | `docsify` | `workflows/docsify.md`<br>`memory/docsify-config.md` | ملفات `docs/index.html` و`docs/_sidebar.md` (موقع تفاعلي فوري) |
|
|
83
|
+
| **"تدقيق جودة الوثائق والروابط"** / "audit docs" | `audit` | `workflows/audit.md`<br>`scripts/audit_docs.py` | تقرير تدقيق AST آلي (فحص الروابط والبيانات الحساسة وسجل التغييرات) |
|
|
84
|
+
| **"توثيق قرار معماري"** / "generate ADR" | `adr` | `workflows/generate-adr.md`<br>`memory/adr-template.md`<br>`memory/tone-of-voice.md` | ملف `docs/adr/NNNN-<slug>.md` وفهرس `docs/adr/README.md` |
|
|
76
85
|
|
|
77
86
|
---
|
|
78
87
|
|
|
@@ -129,13 +138,30 @@ project-root/
|
|
|
129
138
|
|
|
130
139
|
---
|
|
131
140
|
|
|
132
|
-
## 🚀 التثبيت
|
|
141
|
+
## 🚀 التثبيت والبدء السريع
|
|
142
|
+
|
|
143
|
+
اختر طريقة التثبيت المناسبة لمشروعك:
|
|
133
144
|
|
|
134
|
-
###
|
|
135
|
-
|
|
145
|
+
### الخيار (أ): عبر TidyFactor CLI الرسمي (الموصى به)
|
|
146
|
+
التثبيت الفوري دون الحاجة لتثبيت الأداة عالمياً في بيئة عملك النشطة:
|
|
147
|
+
```bash
|
|
148
|
+
npx @tidyfactor/cli add doc
|
|
149
|
+
```
|
|
150
|
+
*أو في حال كانت الأداة مثبتة لديك عالمياً (`npm i -g @tidyfactor/cli`):*
|
|
151
|
+
```bash
|
|
152
|
+
tidyfactor add doc
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### الخيار (ب): عبر معيار مهارات الوكلاء المفتوح (skills.sh)
|
|
156
|
+
التثبيت العالمي المتوافق مع كافة بيئات الوكلاء ومحررات الذكاء الاصطناعي (Antigravity, Cursor, Claude Code, Windsurf, Codex):
|
|
157
|
+
```bash
|
|
158
|
+
npx skills add tidyfactor/doc
|
|
159
|
+
```
|
|
136
160
|
|
|
161
|
+
### الخيار (ج): التثبيت المباشر الفردي عبر NPM
|
|
162
|
+
تشغيل مثبت المهارة المستقل مباشرة مع تجاوز الذاكرة المخبأة وضمان أحدث إصدار:
|
|
137
163
|
```bash
|
|
138
|
-
npx @tidyfactor/
|
|
164
|
+
npx @tidyfactor/doc@latest
|
|
139
165
|
```
|
|
140
166
|
|
|
141
167
|
### 2. التوافق الشامل مع وكلاء الذكاء الاصطناعي
|
package/README.de.md
CHANGED
package/README.es.md
CHANGED
package/README.fa.md
CHANGED
package/README.fr.md
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
# 📚 TidyFactor Doc `v1.
|
|
4
|
-
###
|
|
3
|
+
# 📚 TidyFactor Doc `v1.9.0`
|
|
4
|
+
### Codebase Interview, API Generator, ADR Architect, Link Auditor & Triple-Engine Publishing Platform (VitePress, MkDocs Material & Docsify)
|
|
5
5
|
|
|
6
6
|
**Building accurate, maintainable, secure, and browsable documentation for the era of Human-Agent Collaboration.**
|
|
7
7
|
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
[](README.md)
|
|
14
14
|
[](README.ar.md)
|
|
15
15
|
|
|
16
|
-
[
|
|
16
|
+
[ 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)
|
|
17
|
+
|
|
18
|
+
[🌐 Official Website](https://tidyfactor.com/) • [📚 Documentation](https://tidyfactor.com/documentation) • [🤝 Partner (Alwkala)](https://alwkala.com/) • [⚡ Commands](#-commands--the-4-phase-documentation-lifecycle) • [🛡️ Security Guarantees](#-enterprise-security--sanitization-guarantees)
|
|
17
19
|
|
|
18
20
|
<br/><br/>
|
|
19
21
|
|
|
@@ -67,13 +69,20 @@ graph LR
|
|
|
67
69
|
|
|
68
70
|
| Intent & User Request | Command | Loaded Workflow & Memory | Output Artifact |
|
|
69
71
|
|---|---|---|---|
|
|
72
|
+
| **"Establish doc context / interview / debate architecture"** / "brief" / "debate" | `brief` | `workflows/brief.md`<br>`memory/decision-points.md` | `.tidyfactor/doc-brief.snapshot.yaml`, `docs/architectural_debate_synthesis.md` |
|
|
70
73
|
| **"Set up docs for this project"** / "scaffold /docs" | `init` | `workflows/init-docs.md`<br>`memory/doc-tree.md` | `/docs` scaffold, `docs/.doc-manifest.json`, `docs/README.md` |
|
|
71
74
|
| **"Document this codebase"** / "gather facts for module X" | `collect` | `workflows/collect.md`<br>`memory/collection-sources.md` | `docs/.collected/<target>.md` (5-dimensional structured analysis) |
|
|
72
75
|
| **"Write API reference"** / "generate docs for endpoints" | `generate` | `workflows/generate-api.md`<br>`memory/doc-templates.md`<br>`memory/stacks/*.md` | `docs/api/<target>.md` (parameter tables, returns, errors, examples) |
|
|
76
|
+
| **"Generate CHANGELOG"** / "update release history" | `generate` | `workflows/generate-changelog.md`<br>`memory/doc-templates.md`<br>`memory/changelog-rules.md` | Root `CHANGELOG.md` (Keep a Changelog v1.1.0, SemVer 2.0.0) |
|
|
77
|
+
| **"Record architectural decision"** / "generate ADR" | `adr` | `workflows/generate-adr.md`<br>`memory/adr-template.md`<br>`memory/tone-of-voice.md` | `docs/adr/NNNN-<slug>.md` & `docs/adr/README.md` index |
|
|
73
78
|
| **"Write setup guide"** / "create architecture runbook" | `generate` | `workflows/generate-guide.md`<br>`memory/doc-templates.md` | `docs/guides/<purpose-slug>.md` (focused, single-purpose guide) |
|
|
74
79
|
| **"Generate project README"** / "update root README" | `generate` | `workflows/generate-readme.md`<br>`memory/doc-templates.md` | Root `README.md` (overview, install, env vars, quick start) |
|
|
75
80
|
| **"Add inline docblocks"** / "document public functions" | `generate` | `workflows/generate-inline.md`<br>`memory/stacks/*.md` | Direct source code edit with PHPDoc / JSDoc / TSDoc comments |
|
|
76
|
-
| **"
|
|
81
|
+
| **"Publish documentation portal"** / "interactive selector" | `site` | `memory/site-engines.md` | Interactive selection (`vitepress`, `mkdocs`, `docsify`) |
|
|
82
|
+
| **"Set up VitePress doc portal"** / "build Vue SSG" | `vitepress` | `workflows/vitepress.md`<br>`memory/vitepress-config.md` | `docs/.vitepress/config.mjs`, luxury RTL CSS |
|
|
83
|
+
| **"Set up MkDocs Material"** / "compile static portal" | `mkdocs` | `workflows/mkdocs.md`<br>`memory/mkdocs-config.md` | `mkdocs.yml`, `docs/stylesheets/extra.css` |
|
|
84
|
+
| **"Turn /docs into Docsify site"** / "deploy zero-build SPA" | `docsify` | `workflows/docsify.md`<br>`memory/docsify-config.md` | `docs/index.html` + `docs/_sidebar.md` (instant web portal) |
|
|
85
|
+
| **"Audit doc quality / verify links & credentials"** / "audit" | `audit` | `workflows/audit.md`<br>`scripts/audit_docs.py` | AST quality report (link integrity, credential check, 100/100 score) |
|
|
77
86
|
|
|
78
87
|
---
|
|
79
88
|
|
|
@@ -147,13 +156,30 @@ project-root/
|
|
|
147
156
|
|
|
148
157
|
---
|
|
149
158
|
|
|
150
|
-
## 🚀 Quick Start
|
|
159
|
+
## 🚀 Installation & Quick Start
|
|
160
|
+
|
|
161
|
+
Choose your preferred installation method:
|
|
151
162
|
|
|
152
|
-
###
|
|
153
|
-
|
|
163
|
+
### Option A: Via TidyFactor CLI (Recommended)
|
|
164
|
+
Install directly using the official ecosystem package runner into your active workspace:
|
|
165
|
+
```bash
|
|
166
|
+
npx @tidyfactor/cli add doc
|
|
167
|
+
```
|
|
168
|
+
*Or if you have the CLI installed globally (`npm i -g @tidyfactor/cli`):*
|
|
169
|
+
```bash
|
|
170
|
+
tidyfactor add doc
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Option B: Via Open Agent Skills Ecosystem (skills.sh / Vercel Labs)
|
|
174
|
+
Install using the universal multi-agent standard across all supported IDEs (Cursor, Antigravity, Claude Code, Windsurf, Trae, Codex):
|
|
175
|
+
```bash
|
|
176
|
+
npx skills add tidyfactor/doc
|
|
177
|
+
```
|
|
154
178
|
|
|
179
|
+
### Option C: Standalone Zero-Dependency Runner (NPM Direct)
|
|
180
|
+
Run the dedicated skill installer directly with automatic cache invalidation:
|
|
155
181
|
```bash
|
|
156
|
-
npx @tidyfactor/
|
|
182
|
+
npx @tidyfactor/doc@latest
|
|
157
183
|
```
|
|
158
184
|
|
|
159
185
|
### 2. Universal Agent Compatibility
|
package/README.pt.md
CHANGED
package/README.zh.md
CHANGED
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tidyfactor-doc
|
|
3
|
-
description: "Code documentation builder and
|
|
3
|
+
description: "Code documentation builder, ADR generator, and triple-engine publishing platform (VitePress, MkDocs Material, and Docsify). Generates API references, READMEs, changelogs, ADRs, inline docblocks, and guides. Trigger on commands 'brief', 'init', 'collect', 'generate', 'adr', 'site', 'vitepress', 'mkdocs', 'docsify', 'audit', or requests like 'document this codebase', 'generate ADR', 'create changelog', 'audit docs', or 'set up VitePress'."
|
|
4
4
|
---
|
|
5
5
|
# TidyFactor Doc
|
|
6
6
|
|
|
@@ -10,12 +10,16 @@ A command dispatcher. This file does not do the work itself — it routes to the
|
|
|
10
10
|
|
|
11
11
|
| User intent | Command | What it loads |
|
|
12
12
|
|---|---|---|
|
|
13
|
+
| "Establish documentation context / interview / debate codebase architecture" / "brief" / "debate" | `references/commands/brief.md` | `workflows/brief.md` + `memory/decision-points.md` |
|
|
13
14
|
| "Set up docs for this project" / "scaffold /docs" | `references/commands/init.md` | `workflows/init-docs.md` + `memory/doc-tree.md` |
|
|
14
15
|
| "Document this codebase" / "gather what's needed to document X" | `references/commands/collect.md` | `workflows/collect.md` + `memory/collection-sources.md` |
|
|
15
|
-
| "
|
|
16
|
-
| "
|
|
16
|
+
| "Record architectural decision / generate ADR" / "adr" | `references/commands/adr.md` | `workflows/generate-adr.md` + `memory/adr-template.md` + `memory/tone-of-voice.md` |
|
|
17
|
+
| "Write API docs" / "generate a README" / "create CHANGELOG" / "add inline comments" / "write a guide" | `references/commands/generate.md` | `workflows/generate-api.md` (or `generate-readme.md` / `generate-changelog.md` / `generate-inline.md` / `generate-guide.md`) + `memory/doc-templates.md` + `memory/changelog-rules.md` + matching `memory/stacks/*.md` |
|
|
18
|
+
| "Publish documentation portal" / "turn /docs into a doc site" (Interactive) | `references/commands/site.md` | `memory/site-engines.md` + interactive selection (`workflows/vitepress.md`, `workflows/mkdocs.md`, or `workflows/docsify.md`) |
|
|
19
|
+
| "Set up VitePress" / "build modern Vue-powered doc portal" | `references/commands/vitepress.md` | `workflows/vitepress.md` + `memory/vitepress-config.md` |
|
|
17
20
|
| "Set up MkDocs Material" / "compile static documentation" | `references/commands/mkdocs.md` | `workflows/mkdocs.md` + `memory/mkdocs-config.md` |
|
|
18
21
|
| "Set up Docsify" / "build lightweight zero-build doc SPA" | `references/commands/docsify.md` | `workflows/docsify.md` + `memory/docsify-config.md` |
|
|
22
|
+
| "Audit docs quality / scan credential leaks / verify links & changelog" / "audit" | `references/commands/audit.md` | `workflows/audit.md` + `scripts/audit_docs.py` |
|
|
19
23
|
|
|
20
24
|
Read only the command file that matches the request. Do not read all commands simultaneously.
|
|
21
25
|
|
|
@@ -24,13 +28,32 @@ Read only the command file that matches the request. Do not read all commands si
|
|
|
24
28
|
1. **All generated documentation lives under `/docs`.** Never write API references, guides, or generated READMEs to another location. (`README.md` itself stays at the project root, per convention — everything else generated goes in `/docs`.)
|
|
25
29
|
2. **`generate` never invents content.** It only writes docs from what `collect` gathered (or equivalent detail the user supplies directly in the conversation) — never from assumed signatures, assumed env vars, or assumed behavior. If required detail is missing, `generate` says what's missing and asks or falls back to running `collect` first.
|
|
26
30
|
3. **Stack rules are looked up, never guessed.** Before writing any code-level doc (API reference, inline comments), load the matching file under `memory/stacks/` for the language/framework actually in use. Do not mix PHPDoc conventions into a TypeScript file or vice versa.
|
|
27
|
-
4. **`site`, `mkdocs`, and `docsify` only organize and publish what's already in `/docs`.** They never author new documentation content — that's `generate`'s job.
|
|
31
|
+
4. **`site`, `vitepress`, `mkdocs`, and `docsify` only organize and publish what's already in `/docs`.** They never author new documentation content — that's `generate`'s job.
|
|
32
|
+
- For **VitePress**: Generate ESM `config.mjs`, inject luxury typography (`Alexandria` + `Cairo` + `JetBrains Mono`), enforce surgical RTL navbar order, single-row Hero action CTAs (`white-space: nowrap`), and explicit 3-column card widths (`width: 33.333333% !important`) with BiDi protection (`unicode-bidi: plaintext`). Build cleanly with `npx vitepress build docs`.
|
|
28
33
|
- For **MkDocs Material**: Generate standard `mkdocs.yml`, configure Neo-Brutalist CSS tokens (`extra.css`), configure Arabic/English i18n (`*.ar.md` suffix), and build cleanly with `mkdocs build --strict`.
|
|
29
34
|
- For **Docsify**: Include `alias: { '/.*/_sidebar.md': '/_sidebar.md' }` and root-relative leading slashes `/` in `_sidebar.md` to guarantee persistent sidebar navigation across all subfolder routes.
|
|
30
35
|
5. **Standalone.** This skill does not read or depend on any other `tidyfactor-*` skill's conventions, even when the project happens to be built on one of those tracks.
|
|
31
36
|
6. **Zero Sensitive Data Leakage.** Under absolutely no circumstances should any real sensitive data (e.g., real API tokens, WHM/cPanel passwords, production server IPs, real DB credentials, secret keys, private auth tokens, or local absolute drive paths) be written into documentation. ALWAYS redact and replace these with safe generic placeholders.
|
|
32
37
|
7. **Clean Relative Links Only.** Never include local machine filesystem URLs (such as `file:///C:/...`, `file:c:`, or absolute workstation paths) in documentation links or markdown cross-references. All document cross-links must use clean relative markdown paths or standard public web URLs (`https://...`).
|
|
33
38
|
|
|
39
|
+
## Anti-Triggers
|
|
40
|
+
|
|
41
|
+
- Do NOT use for writing marketing campaigns or sales copywriting (use `tidyfactor-marketing`).
|
|
42
|
+
- Do NOT use for platform infrastructure management or deployment tasks (use `tidyfactor-github` or ops skills).
|
|
43
|
+
|
|
44
|
+
## Tooling Scope (Rule 10)
|
|
45
|
+
|
|
46
|
+
- **Execution Tools**:
|
|
47
|
+
- `audit_docs` (`scripts/audit_docs.py`): Sub-second AST scanner for documentation under `/docs`, root `README.md`, and `CHANGELOG.md`. Audits credential leaks, machine-specific paths, broken relative links, and Keep a Changelog formatting.
|
|
48
|
+
- `clean_orphaned_assets` (`scripts/clean_orphaned_assets.py`): Scans markdown documents for image references, detects unreferenced orphan assets in `assets/`, detects duplicate assets via SHA-256 hashing, and reports WebP compression opportunities.
|
|
49
|
+
- **Contract & Schema**: Portably declared in `manifest.json` with `"skill_root_anchor": "self"`.
|
|
50
|
+
- **Invocability**: Executable via direct CLI or through `tidyfactor-brain` MCP `run_skill_tool`.
|
|
51
|
+
|
|
52
|
+
## Skill vs MCP Boundary (Rule 12)
|
|
53
|
+
|
|
54
|
+
- **Inside Skill**: Static documentation templates, stack-specific docblock schemas, and local hygiene auditing scripts.
|
|
55
|
+
- **MCP Layer**: Sovereign Brain persistence (`search_knowledge_base`, `extract_knowledge_item`) operating under the strict Fail-Open protocol (`references/memory/20-brain-baas-integration.md`).
|
|
56
|
+
|
|
34
57
|
## Sequencing
|
|
35
58
|
|
|
36
|
-
`init` → `collect` → `generate` (repeatable, once per doc target) → `site` / `mkdocs` / `docsify` (
|
|
59
|
+
`brief` (optional, architectural alignment & debate) → `init` → `collect` → `adr` (record technical decisions) → `generate` (repeatable, once per doc target) → `site` / `vitepress` / `mkdocs` / `docsify` → `audit` (quality, links & orphan verification before release).
|
package/bin/add-skill.js
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* bin/add-skill.js — Multi-Agent Skill Installer Wrapper for tidyfactor-doc
|
|
4
|
+
* Supports Trae, Cursor, Windsurf, Antigravity, GitHub Copilot, RooCode, OpenCode, KiloCode, Warp, and Universal.
|
|
5
|
+
*
|
|
6
|
+
* @license Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
2
9
|
const fs = require('fs');
|
|
3
10
|
const path = require('path');
|
|
11
|
+
const os = require('os');
|
|
4
12
|
|
|
5
13
|
const targetDir = process.cwd();
|
|
6
14
|
const skillSource = path.resolve(__dirname, '..');
|
|
7
|
-
const
|
|
15
|
+
const skillName = 'tidyfactor-doc';
|
|
8
16
|
|
|
9
|
-
|
|
17
|
+
const AGENT_MAP = [
|
|
18
|
+
{ name: 'Trae AI IDE', dir: path.join(targetDir, '.trae', 'skills', skillName), test: path.join(targetDir, '.trae') },
|
|
19
|
+
{ name: 'Cursor IDE', dir: path.join(targetDir, '.cursor', 'skills', skillName), test: path.join(targetDir, '.cursor') },
|
|
20
|
+
{ name: 'Windsurf Cascade', dir: path.join(targetDir, '.windsurf', 'skills', skillName), test: path.join(targetDir, '.windsurf') },
|
|
21
|
+
{ name: 'GitHub Copilot', dir: path.join(targetDir, '.github', 'prompts', skillName), test: path.join(targetDir, '.github') },
|
|
22
|
+
{ name: 'RooCode', dir: path.join(targetDir, '.roo', 'skills', skillName), test: path.join(targetDir, '.roo') },
|
|
23
|
+
{ name: 'OpenCode / Zen', dir: path.join(targetDir, '.opencode', 'skills', skillName), test: path.join(targetDir, '.opencode') },
|
|
24
|
+
{ name: 'KiloCode', dir: path.join(targetDir, '.kilocode', 'skills', skillName), test: path.join(targetDir, '.kilocode') },
|
|
25
|
+
{ name: 'Warp Terminal', dir: path.join(targetDir, '.warp', 'skills', skillName), test: path.join(targetDir, '.warp') },
|
|
26
|
+
{ name: 'Kiro Spec IDE', dir: path.join(targetDir, '.kiro', 'skills', skillName), test: path.join(targetDir, '.kiro') },
|
|
27
|
+
{ name: 'Claude Code', dir: path.join(targetDir, '.claude', 'skills', skillName), test: path.join(targetDir, '.claude') },
|
|
28
|
+
{ name: 'Zed AI Agent', dir: path.join(targetDir, '.zed', 'skills', skillName), test: path.join(targetDir, '.zed') },
|
|
29
|
+
{ name: 'Google Antigravity/Gemini', dir: path.join(targetDir, '.agents', 'skills', skillName), test: path.join(targetDir, '.agents') },
|
|
30
|
+
];
|
|
10
31
|
|
|
11
32
|
function copyRecursive(src, dest) {
|
|
33
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
12
34
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
13
35
|
for (const entry of entries) {
|
|
14
36
|
const srcPath = path.join(src, entry.name);
|
|
15
37
|
const destPath = path.join(dest, entry.name);
|
|
16
|
-
if (['.git', 'node_modules', '
|
|
38
|
+
if (['.git', 'node_modules', 'dist'].includes(entry.name)) continue;
|
|
17
39
|
if (entry.isDirectory()) {
|
|
18
|
-
fs.mkdirSync(destPath, { recursive: true });
|
|
19
40
|
copyRecursive(srcPath, destPath);
|
|
20
41
|
} else {
|
|
21
42
|
fs.copyFileSync(srcPath, destPath);
|
|
@@ -23,5 +44,22 @@ function copyRecursive(src, dest) {
|
|
|
23
44
|
}
|
|
24
45
|
}
|
|
25
46
|
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
// Determine installation targets
|
|
48
|
+
let mountedTargets = [];
|
|
49
|
+
|
|
50
|
+
for (const agent of AGENT_MAP) {
|
|
51
|
+
if (fs.existsSync(agent.test)) {
|
|
52
|
+
copyRecursive(skillSource, agent.dir);
|
|
53
|
+
mountedTargets.push(agent.name + ' (' + path.relative(targetDir, agent.dir) + ')');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Always ensure universal fallback in .agents/skills/
|
|
58
|
+
const defaultDir = path.join(targetDir, '.agents', 'skills', skillName);
|
|
59
|
+
copyRecursive(skillSource, defaultDir);
|
|
60
|
+
if (!mountedTargets.some(t => t.includes('.agents'))) {
|
|
61
|
+
mountedTargets.push('Universal Default (.agents/skills/' + skillName + ')');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
console.log('✨ Successfully injected ' + skillName + ' into:');
|
|
65
|
+
mountedTargets.forEach(t => console.log(' • ' + t));
|
package/brand.json
CHANGED
package/brand.yaml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
name: "TidyFactor Doc"
|
|
2
|
+
version: "1.9.0"
|
|
3
|
+
publisher: "TidyFactor Ecosystem"
|
|
4
|
+
partner: "Alwkala Digital Agency (https://alwkala.com)"
|
|
5
|
+
contact:
|
|
6
|
+
website: "https://tidyfactor.com"
|
|
7
|
+
email: "hello@tidyfactor.com"
|
|
8
|
+
whatsapp: "+201016656899"
|
|
9
|
+
location: "Cairo, Egypt"
|
|
10
|
+
license: "Apache-2.0"
|