@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.
Files changed (51) hide show
  1. package/.tidyfactor +3 -3
  2. package/CHANGELOG.md +103 -4
  3. package/README.ar.md +34 -8
  4. package/README.de.md +1 -1
  5. package/README.es.md +1 -1
  6. package/README.fa.md +1 -1
  7. package/README.fr.md +1 -1
  8. package/README.md +34 -8
  9. package/README.pt.md +1 -1
  10. package/README.zh.md +1 -1
  11. package/SKILL.md +28 -5
  12. package/bin/add-skill.js +44 -6
  13. package/brand.json +1 -1
  14. package/brand.yaml +10 -0
  15. package/manifest.json +216 -0
  16. package/package.json +4 -2
  17. package/references/commands/adr.md +25 -0
  18. package/references/commands/audit.md +15 -0
  19. package/references/commands/brief.md +16 -0
  20. package/references/commands/generate.md +7 -6
  21. package/references/commands/site.md +25 -23
  22. package/references/commands/vitepress.md +20 -0
  23. package/references/memory/20-brain-baas-integration.md +83 -0
  24. package/references/memory/adr-template.md +84 -0
  25. package/references/memory/changelog-rules.md +58 -0
  26. package/references/memory/collection-sources.md +48 -47
  27. package/references/memory/decision-points.md +72 -0
  28. package/references/memory/doc-templates.md +102 -73
  29. package/references/memory/doc-tree.md +38 -37
  30. package/references/memory/docsify-config.md +274 -273
  31. package/references/memory/git-doc-sync-hook.md +54 -0
  32. package/references/memory/mkdocs-config.md +171 -170
  33. package/references/memory/naming-conventions.md +40 -0
  34. package/references/memory/project-mindmap.md +66 -0
  35. package/references/memory/site-engines.md +32 -34
  36. package/references/memory/stacks/js-ts.md +47 -45
  37. package/references/memory/stacks/php.md +35 -33
  38. package/references/memory/stacks/react-vue-next.md +52 -50
  39. package/references/memory/tone-of-voice.md +31 -0
  40. package/references/memory/vitepress-config.md +174 -0
  41. package/references/workflows/audit.md +42 -0
  42. package/references/workflows/brief.md +105 -0
  43. package/references/workflows/collect.md +60 -25
  44. package/references/workflows/generate-adr.md +41 -0
  45. package/references/workflows/generate-changelog.md +52 -0
  46. package/references/workflows/init-docs.md +44 -18
  47. package/references/workflows/vitepress.md +57 -0
  48. package/scripts/audit_docs.py +190 -0
  49. package/scripts/clean_orphaned_assets.py +185 -0
  50. package/tools/build-skill.js +3 -0
  51. package/assets/og-default.png +0 -0
@@ -1,170 +1,171 @@
1
- # Memory: MkDocs Material Configuration Spec
2
-
3
- Complete architectural specification for scaffolding and compiling production-grade documentation portals with MkDocs Material.
4
-
5
- ---
6
-
7
- ## 1. Package Requirements (`requirements.txt`)
8
-
9
- ```text
10
- mkdocs-material>=9.5
11
- mkdocs-static-i18n>=1.2
12
- ```
13
-
14
- ---
15
-
16
- ## 2. Master Configuration Schema (`mkdocs.yml`)
17
-
18
- ```yaml
19
- site_name: Project Documentation
20
- site_url: https://example.com/docs/
21
- site_description: "Production Documentation Portal"
22
- site_author: Engineering Team
23
-
24
- docs_dir: docs
25
- site_dir: site
26
-
27
- theme:
28
- name: material
29
- language: en
30
- direction: ltr
31
- custom_dir: overrides
32
-
33
- logo: assets/logo.png
34
- favicon: assets/favicon.png
35
-
36
- font:
37
- text: Plus Jakarta Sans
38
- code: Fira Code
39
-
40
- palette:
41
- # Light Mode
42
- - media: "(prefers-color-scheme: light)"
43
- scheme: tidyfactor-light
44
- primary: custom
45
- accent: custom
46
- toggle:
47
- icon: material/brightness-7
48
- name: Switch to Dark Mode
49
-
50
- # Dark Mode
51
- - media: "(prefers-color-scheme: dark)"
52
- scheme: tidyfactor-dark
53
- primary: custom
54
- accent: custom
55
- toggle:
56
- icon: material/brightness-4
57
- name: Switch to Light Mode
58
-
59
- features:
60
- - navigation.tracking
61
- - navigation.tabs
62
- - navigation.tabs.sticky
63
- - navigation.sections
64
- - navigation.expand
65
- - navigation.path
66
- - navigation.top
67
- - navigation.indexes
68
- - navigation.footer
69
- - search.suggest
70
- - search.highlight
71
- - search.share
72
- - content.code.copy
73
- - content.code.annotate
74
- - content.tabs.link
75
- - header.autohide
76
- - toc.follow
77
-
78
- plugins:
79
- - search:
80
- separator: '[\s\-\.]+'
81
- lang:
82
- - en
83
- - ar
84
-
85
- - i18n:
86
- docs_structure: suffix
87
- languages:
88
- - locale: en
89
- name: English
90
- default: true
91
- build: true
92
- - locale: ar
93
- name: العربية
94
- build: true
95
- theme:
96
- language: ar
97
- direction: rtl
98
- font:
99
- text: Tajawal
100
- code: Fira Code
101
-
102
- markdown_extensions:
103
- - abbr
104
- - admonition
105
- - attr_list
106
- - def_list
107
- - footnotes
108
- - md_in_html
109
- - tables
110
- - toc:
111
- permalink: true
112
- toc_depth: 3
113
- - pymdownx.arithmatex:
114
- generic: true
115
- - pymdownx.betterem:
116
- smart_enable: all
117
- - pymdownx.caret
118
- - pymdownx.details
119
- - pymdownx.emoji:
120
- emoji_index: !!python/name:material.extensions.emoji.twemoji
121
- emoji_generator: !!python/name:material.extensions.emoji.to_svg
122
- - pymdownx.highlight:
123
- anchor_linenums: true
124
- line_spans: __span
125
- pygments_lang_class: true
126
- - pymdownx.inlinehilite
127
- - pymdownx.keys
128
- - pymdownx.mark
129
- - pymdownx.smartsymbols
130
- - pymdownx.superfences:
131
- custom_fences:
132
- - name: mermaid
133
- class: mermaid
134
- format: !!python/name:pymdownx.superfences.fence_code_format
135
- - pymdownx.tabbed:
136
- alternate_style: true
137
- - pymdownx.tasklist:
138
- custom_checkbox: true
139
- - pymdownx.tilde
140
-
141
- extra_css:
142
- - stylesheets/extra.css
143
-
144
- extra_javascript:
145
- - javascripts/extra.js
146
- ```
147
-
148
- ---
149
-
150
- ## 3. Bilingual Suffix Rule (i18n)
151
-
152
- - English source files: `docs/guides/architecture.md`, `docs/index.md`
153
- - Arabic source files: `docs/guides/architecture.ar.md`, `docs/index.ar.md`
154
- - Rule: Never link directly to `.ar.md` from `.md` files; the `i18n` plugin handles language linking automatically via the header switcher.
155
-
156
- ---
157
-
158
- ## 4. Local Apache Subfolder Routing (`.htaccess`)
159
-
160
- When hosting the documentation inside a subfolder during local Apache/WAMP development:
161
-
162
- ```apache
163
- <IfModule mod_rewrite.c>
164
- RewriteEngine On
165
- RewriteRule ^site(/.*)?$ - [L]
166
- RewriteCond %{REQUEST_FILENAME} !-f
167
- RewriteRule ^(.*)$ site/$1 [L]
168
- </IfModule>
169
- ```
170
- In production: upload the contents of `site/` directly into `public_html/docs/`.
1
+ <!-- last-verified: 2026-09-02 -->
2
+ # Memory: MkDocs Material Configuration Spec
3
+
4
+ Complete architectural specification for scaffolding and compiling production-grade documentation portals with MkDocs Material.
5
+
6
+ ---
7
+
8
+ ## 1. Package Requirements (`requirements.txt`)
9
+
10
+ ```text
11
+ mkdocs-material>=9.5
12
+ mkdocs-static-i18n>=1.2
13
+ ```
14
+
15
+ ---
16
+
17
+ ## 2. Master Configuration Schema (`mkdocs.yml`)
18
+
19
+ ```yaml
20
+ site_name: Project Documentation
21
+ site_url: https://example.com/docs/
22
+ site_description: "Production Documentation Portal"
23
+ site_author: Engineering Team
24
+
25
+ docs_dir: docs
26
+ site_dir: site
27
+
28
+ theme:
29
+ name: material
30
+ language: en
31
+ direction: ltr
32
+ custom_dir: overrides
33
+
34
+ logo: assets/logo.png
35
+ favicon: assets/favicon.png
36
+
37
+ font:
38
+ text: Plus Jakarta Sans
39
+ code: Fira Code
40
+
41
+ palette:
42
+ # Light Mode
43
+ - media: "(prefers-color-scheme: light)"
44
+ scheme: tidyfactor-light
45
+ primary: custom
46
+ accent: custom
47
+ toggle:
48
+ icon: material/brightness-7
49
+ name: Switch to Dark Mode
50
+
51
+ # Dark Mode
52
+ - media: "(prefers-color-scheme: dark)"
53
+ scheme: tidyfactor-dark
54
+ primary: custom
55
+ accent: custom
56
+ toggle:
57
+ icon: material/brightness-4
58
+ name: Switch to Light Mode
59
+
60
+ features:
61
+ - navigation.tracking
62
+ - navigation.tabs
63
+ - navigation.tabs.sticky
64
+ - navigation.sections
65
+ - navigation.expand
66
+ - navigation.path
67
+ - navigation.top
68
+ - navigation.indexes
69
+ - navigation.footer
70
+ - search.suggest
71
+ - search.highlight
72
+ - search.share
73
+ - content.code.copy
74
+ - content.code.annotate
75
+ - content.tabs.link
76
+ - header.autohide
77
+ - toc.follow
78
+
79
+ plugins:
80
+ - search:
81
+ separator: '[\s\-\.]+'
82
+ lang:
83
+ - en
84
+ - ar
85
+
86
+ - i18n:
87
+ docs_structure: suffix
88
+ languages:
89
+ - locale: en
90
+ name: English
91
+ default: true
92
+ build: true
93
+ - locale: ar
94
+ name: العربية
95
+ build: true
96
+ theme:
97
+ language: ar
98
+ direction: rtl
99
+ font:
100
+ text: Tajawal
101
+ code: Fira Code
102
+
103
+ markdown_extensions:
104
+ - abbr
105
+ - admonition
106
+ - attr_list
107
+ - def_list
108
+ - footnotes
109
+ - md_in_html
110
+ - tables
111
+ - toc:
112
+ permalink: true
113
+ toc_depth: 3
114
+ - pymdownx.arithmatex:
115
+ generic: true
116
+ - pymdownx.betterem:
117
+ smart_enable: all
118
+ - pymdownx.caret
119
+ - pymdownx.details
120
+ - pymdownx.emoji:
121
+ emoji_index: !!python/name:material.extensions.emoji.twemoji
122
+ emoji_generator: !!python/name:material.extensions.emoji.to_svg
123
+ - pymdownx.highlight:
124
+ anchor_linenums: true
125
+ line_spans: __span
126
+ pygments_lang_class: true
127
+ - pymdownx.inlinehilite
128
+ - pymdownx.keys
129
+ - pymdownx.mark
130
+ - pymdownx.smartsymbols
131
+ - pymdownx.superfences:
132
+ custom_fences:
133
+ - name: mermaid
134
+ class: mermaid
135
+ format: !!python/name:pymdownx.superfences.fence_code_format
136
+ - pymdownx.tabbed:
137
+ alternate_style: true
138
+ - pymdownx.tasklist:
139
+ custom_checkbox: true
140
+ - pymdownx.tilde
141
+
142
+ extra_css:
143
+ - stylesheets/extra.css
144
+
145
+ extra_javascript:
146
+ - javascripts/extra.js
147
+ ```
148
+
149
+ ---
150
+
151
+ ## 3. Bilingual Suffix Rule (i18n)
152
+
153
+ - English source files: `docs/guides/architecture.md`, `docs/index.md`
154
+ - Arabic source files: `docs/guides/architecture.ar.md`, `docs/index.ar.md`
155
+ - Rule: Never link directly to `.ar.md` from `.md` files; the `i18n` plugin handles language linking automatically via the header switcher.
156
+
157
+ ---
158
+
159
+ ## 4. Local Apache Subfolder Routing (`.htaccess`)
160
+
161
+ When hosting the documentation inside a subfolder during local Apache/WAMP development:
162
+
163
+ ```apache
164
+ <IfModule mod_rewrite.c>
165
+ RewriteEngine On
166
+ RewriteRule ^site(/.*)?$ - [L]
167
+ RewriteCond %{REQUEST_FILENAME} !-f
168
+ RewriteRule ^(.*)$ site/$1 [L]
169
+ </IfModule>
170
+ ```
171
+ In production: upload the contents of `site/` directly into `public_html/docs/`.
@@ -0,0 +1,40 @@
1
+ <!-- last-verified: 2026-09-09 -->
2
+ # Memory: naming-conventions
3
+
4
+ Authoritative naming conventions across supported code stacks and documentation files.
5
+
6
+ ## 1. Documentation File System Conventions
7
+
8
+ | Element | Format | Example | Anti-Pattern |
9
+ |---|---|---|---|
10
+ | Guide Slugs | `kebab-case.md` | `setup-guide.md` | `Setup_Guide.MD` |
11
+ | ADR Records | `NNNN-kebab-case.md` | `0001-database-choice.md` | `1_db.md` |
12
+ | Localized Guides | `[slug].[locale].md` | `architecture.ar.md` | `architecture_arabic.md` |
13
+ | API References | `[component-or-class].md` | `user-service.md` | `UserServiceAPI.md` |
14
+ | Internal Findings | `docs/.collected/[target].md` | `docs/.collected/auth.md` | `docs/.collected/Auth-Module.md` |
15
+
16
+ ## 2. Multi-Language Code Symbol Conventions
17
+
18
+ ### PHP (PSR-1 / PSR-12)
19
+ - **Namespaces**: `PascalCase` (`App\Core\Registry`, `App\Modules\Blog`)
20
+ - **Classes / Interfaces / Traits**: `PascalCase` (`AuthService`, `ModuleInterface`)
21
+ - **Methods**: `camelCase` (`validateSession()`, `getUserById()`)
22
+ - **Constants**: `UPPER_SNAKE_CASE` (`DEFAULT_TIMEOUT`, `MAX_RETRIES`)
23
+ - **Variables / Properties**: `camelCase` (`$userId`, `$databaseConnection`)
24
+
25
+ ### TypeScript & JavaScript (ESM)
26
+ - **Files & Modules**: `kebab-case.ts` (`auth-service.ts`) or `PascalCase.tsx` for React components (`UserProfile.tsx`)
27
+ - **Types / Interfaces / Enums**: `PascalCase` (`UserSession`, `ApiResponse<T>`, `LogLevel`)
28
+ - **Functions / Methods**: `camelCase` (`parseManifest()`, `fetchUserData()`)
29
+ - **Constants**: `UPPER_SNAKE_CASE` (`API_BASE_URL`, `TOKEN_EXPIRATION`)
30
+
31
+ ### Python (PEP 8)
32
+ - **Modules / Packages**: `snake_case` (`audit_docs.py`, `clean_orphaned_assets.py`)
33
+ - **Classes**: `PascalCase` (`DocumentationAuditor`, `MarkdownLinkScanner`)
34
+ - **Functions / Methods**: `snake_case` (`scan_file()`, `check_relative_links()`)
35
+ - **Constants**: `UPPER_SNAKE_CASE` (`SENSITIVE_PATTERNS`, `DEFAULT_SCORE`)
36
+
37
+ ## 3. REST API & Route Conventions
38
+
39
+ - **Resource URIs**: Lowercase `kebab-case` plural nouns (`/api/v1/user-profiles`, `/api/v1/projects`).
40
+ - **Query Parameters**: `snake_case` or `camelCase` (must be uniform per project, e.g. `page_size` or `pageSize`).
@@ -0,0 +1,66 @@
1
+ <!-- last-verified: 2026-09-09 -->
2
+ # Memory: project-mindmap
3
+
4
+ Codified guidelines and Mermaid AST templates for generating clear, interactive architectural mind maps and component topology diagrams in documentation.
5
+
6
+ ## 1. Top-Level Architectural Layering (Mermaid C4 / Graph)
7
+
8
+ ```mermaid
9
+ graph TD
10
+ Client["Client Layer (Browser / Agents)"]
11
+ Gateway["API & Router Layer"]
12
+ Core["Core Domain & Business Logic"]
13
+ Storage["Data Layer (SQLite / MySQL / Files)"]
14
+
15
+ Client -->|HTTP / JSON-RPC| Gateway
16
+ Gateway --> Core
17
+ Core --> Storage
18
+ ```
19
+
20
+ ## 2. Component Topology & Responsibility Mind Map
21
+
22
+ ```mermaid
23
+ mindmap
24
+ root((System Architecture))
25
+ Presentation Layer
26
+ VitePress SSG
27
+ Docsify SPA
28
+ MkDocs Material
29
+ Core Logic
30
+ Command Dispatcher
31
+ Workflow Engine
32
+ Operational Memory
33
+ Execution Tooling
34
+ Link Integrity Auditor
35
+ AST Docblock Parser
36
+ Asset Hygiene Cleaner
37
+ Data & Context
38
+ Single Source of Truth
39
+ Brain Context Layer
40
+ Local File Snapshots
41
+ ```
42
+
43
+ ## 3. Data Flow & Execution Sequence Diagram
44
+
45
+ ```mermaid
46
+ sequenceDiagram
47
+ autonumber
48
+ actor Dev as Developer / Agent
49
+ participant Dispatcher as SKILL.md Dispatcher
50
+ participant Workflow as Workflow Engine
51
+ participant Collector as Codebase Collector
52
+ participant Target as /docs Surface
53
+
54
+ Dev->>Dispatcher: Issue Command (brief / collect / generate)
55
+ Dispatcher->>Workflow: Load Matching Workflow & Memory
56
+ Workflow->>Collector: Scrape Signatures & Env Context
57
+ Collector-->>Workflow: Return 5-Dimension Findings
58
+ Workflow->>Target: Write Clean Markdown Artifacts
59
+ Workflow->>Dev: Emit Success Checklist & Audit Score
60
+ ```
61
+
62
+ ## 4. Usage Guidelines
63
+
64
+ 1. Place overarching mind maps in `docs/README.md` or `docs/guides/architecture.md`.
65
+ 2. Do not use raw image screenshots when Mermaid diagrams can represent topology directly in text.
66
+ 3. Keep node labels concise (≤ 4 words) to maintain high readability across mobile and desktop viewports.
@@ -1,54 +1,52 @@
1
- # Memory: Site Engines (Docsify vs. MkDocs Material)
1
+ <!-- last-verified: 2026-09-09 -->
2
+ # Memory: Site Engines (VitePress vs. MkDocs Material vs. Docsify)
2
3
 
3
4
  Technical evaluation matrix for documentation publishing engines supported by `tidyfactor-doc`.
4
5
 
5
6
  ## Engine Comparison Matrix
6
7
 
7
- | Capability / Factor | ⚡ MkDocs Material (Static Compiler) | 📄 Docsify (Client-Side SPA) |
8
- |---|---|---|
9
- | **Architecture** | Static Site Generator (Python Markdown) | Client-Side SPA (`marked.js` in browser) |
10
- | **Output Type** | Pre-rendered static HTML (`site/`) | Single `index.html` fetching `.md` via AJAX |
11
- | **Build Dependency** | Python 3.10+, `pip install mkdocs-material` | Zero build step, zero compiler required |
12
- | **SEO & Crawlers** | 100/100 Perfect static HTML indexing | Limited (requires JS execution by bots) |
13
- | **Performance & CWV** | Instant initial paint, pre-cached assets | Client-side fetch delay on slow mobile networks |
14
- | **i18n & Localization** | Native parallel builds (`/` and `/ar/`) via `mkdocs-static-i18n` | Single page language or manual separate SPAs |
15
- | **Search Engine** | Lunr.js pre-indexed offline search (bilingual) | In-browser client-side fuzzy search |
16
- | **Styling & Theming** | Material for MkDocs + Neo-Brutalist CSS tokens | Custom CSS over Docsify default theme |
17
- | **Code Highlighting** | Pygments build-time syntax highlighting + line spans | Prism.js client-side syntax highlighting |
18
- | **Target Deployment** | Production doc portals, public SaaS products, multi-language sites | Rapid internal repo docs, single-file lightweight guides |
8
+ | Capability / Factor | ⚡ VitePress (Vue 3 / Vite SSG) | 📦 MkDocs Material (Python Static) | 📄 Docsify (Client SPA) |
9
+ |---|---|---|---|
10
+ | **Architecture** | Static Site Generator (Vite + Vue 3 SSR) | Static Site Generator (Python Markdown) | Client-Side SPA (`marked.js`) |
11
+ | **Output Type** | Pre-rendered static HTML (`dist/`) + Vue hydration | Pre-rendered static HTML (`site/`) | Single `index.html` fetching `.md` |
12
+ | **Build Dependency** | Node.js >= 18, `npm i -D vitepress` | Python 3.10+, `pip install mkdocs-material` | Zero build step, zero compiler |
13
+ | **SEO & Crawlers** | 100/100 Perfect static HTML indexing | 100/100 Perfect static HTML indexing | Limited (requires bot JS execution) |
14
+ | **Performance & CWV** | Instant Vite dev server, sub-second HMR | High compilation speed, pre-cached assets | Client-side fetch delay on slow mobile |
15
+ | **i18n & Localization** | Native subdirectory routing (`/`, `/en/`, `/es/`) | Parallel builds via `mkdocs-static-i18n` | Single language or manual SPAs |
16
+ | **Search Engine** | Minisearch pre-indexed local search | Lunr.js pre-indexed offline search | In-browser client-side fuzzy search |
17
+ | **Styling & Theming** | Custom CSS tokens, Vue components, Luxury RTL | Material theme + Neo-Brutalist tokens | Custom CSS over Docsify default |
18
+ | **Code Highlighting** | Shiki build-time syntax highlighting | Pygments build-time syntax highlighting | Prism.js client-side syntax |
19
+ | **Target Deployment** | Modern JS/TS repos, SaaS portals, luxury RTL | Python/Backend repos, enterprise wikis | Internal quick prototyping, single guides |
19
20
 
20
21
  ---
21
22
 
22
23
  ## Decision Logic & Recommendation Rules
23
24
 
24
- 1. **Choose MkDocs Material if:**
25
- - The documentation has more than 10 pages or complex multi-level hierarchy.
26
- - Public SEO visibility and search engine discoverability are critical.
27
- - The project is bilingual (Arabic RTL + English LTR) requiring dedicated language switches.
28
- - The local environment has Python installed (`python --version` returns 3.10+).
29
- - Production hosting supports static directory routing (`public_html/documentation/`).
25
+ 1. **Choose VitePress if (Recommended for Modern Web / Monorepos):**
26
+ - The project is in the Node.js / TypeScript / Frontend ecosystem.
27
+ - Requires custom interactive Vue components, modern UI aesthetics, or luxury typography (`Alexandria` + `Cairo` + `JetBrains Mono`).
28
+ - Needs seamless multi-language subdirectory routing with zero 404s.
29
+ - Developer desires sub-second Vite HMR during drafting.
30
30
 
31
- 2. **Choose Docsify if:**
32
- - The developer or server environment has **no Python runtime** and requires zero installation.
33
- - The project needs an instant browsable site by dropping a single `index.html` into `/docs`.
34
- - The documentation is primarily for internal developers within a repository.
35
- - The site is hosted on GitHub Pages with zero CI build workflows.
36
-
37
- ---
31
+ 2. **Choose MkDocs Material if:**
32
+ - The project is Python-centric or backend-heavy.
33
+ - The team is already using Python toolchains (`pip`, `virtualenv`).
34
+ - The documentation requires MkDocs-specific plugin ecosystems.
38
35
 
39
- ## Two-Tier Multi-Language Documentation Pattern
40
-
41
- Both engines adhere to the TidyFactor Two-Tier Documentation standard:
42
- - **Canonical Technical SSOT**: Full API specifications, architecture, and code deep-dives maintained in Canonical English (`/docs/en/` or root) with First-Class Arabic (`/docs/ar/`).
43
- - **Localized Adoption Guides**: Quickstarts, tutorials, concepts, and command matrices for Tier 1/2 growth languages (`es`, `pt`, `fa`, `zh`, `de`, `fr`) providing high-conversion onboarding.
36
+ 3. **Choose Docsify if:**
37
+ - The developer environment has neither Node.js nor Python build workflows.
38
+ - The project needs an instant browsable site by dropping a single `index.html` into `/docs`.
39
+ - The documentation is strictly internal within a small Git repository.
44
40
 
45
41
  ---
46
42
 
47
43
  ## Toolchain Verification Command
48
44
 
49
45
  ```bash
50
- # Check if Python is available for MkDocs
46
+ # Check available runtimes
47
+ node --version 2>&1
51
48
  python --version 2>&1 || python3 --version 2>&1
52
49
  ```
53
- - If Python is available: recommend **MkDocs Material** as primary production track.
54
- - If Python is not available: recommend **Docsify** as zero-dependency fallback.
50
+ - If Node.js is available: recommend **VitePress** as primary luxury web documentation portal.
51
+ - If Python is available without Node.js: recommend **MkDocs Material**.
52
+ - If no build runtime is available: recommend **Docsify** zero-dependency fallback.
@@ -1,45 +1,47 @@
1
- # Memory: stacks/js-ts
2
-
3
- Documentation conventions for JavaScript and TypeScript targets. Applies whenever the target's manifest is `package.json` and files are `.js`/`.mjs` (JS) or `.ts`/`.tsx` (TS). The two share JSDoc-style block syntax but differ in what needs restating.
4
-
5
- ## JavaScript JSDoc (types belong in the comment, since the code itself is untyped)
6
-
7
- ```js
8
- /**
9
- * <one-line summary>
10
- *
11
- * @param {string} name Description.
12
- * @param {number} [limit] Optional, defaults to undefined.
13
- * @returns {Promise<object>} Description of the resolved shape.
14
- * @throws {RangeError} When <condition, from error-patterns findings>.
15
- */
16
- ```
17
-
18
- - Always include `@param`/`@returns` types — JS has no compile-time types, so the comment is the only source of truth.
19
- - Optional params use `[name]` bracket syntax.
20
-
21
- ## TypeScript TSDoc (types live in the signature, don't restate them in the comment)
22
-
23
- ```ts
24
- /**
25
- * <one-line summary>
26
- *
27
- * @param name - Description only, no type (already in the signature).
28
- * @param limit - Description only.
29
- * @returns Description only.
30
- * @throws {RangeError} When <condition, from error-patterns findings>.
31
- */
32
- function example(name: string, limit?: number): Promise<Result> { ... }
33
- ```
34
-
35
- - Do NOT restate types already visible in the TS signature (`{string}`, `{number}`) — that's a JSDoc habit that's redundant and can drift out of sync in TS. Description only after the `-`.
36
- - Exported `interface`/`type` declarations get their own TSDoc block above the declaration, one line per member if the member itself isn't self-explanatory.
37
-
38
- ## API reference formatting
39
-
40
- - Show the actual signature from the source (JS: as written; TS: full typed signature).
41
- - For TS, prefer documenting the public exported types directly rather than re-describing them in prose.
42
-
43
- ## What NOT to document inline
44
-
45
- - Non-exported (module-private) helper functions with obvious names: skip full blocks unless the error-patterns findings show them as a common failure point.
1
+ # Memory: stacks/js-ts
2
+
3
+ <!-- last-verified: 2026-09-08 -->
4
+
5
+ Documentation conventions for JavaScript and TypeScript targets. Applies whenever the target's manifest is `package.json` and files are `.js`/`.mjs` (JS) or `.ts`/`.tsx` (TS). The two share JSDoc-style block syntax but differ in what needs restating.
6
+
7
+ ## JavaScript — JSDoc (types belong in the comment, since the code itself is untyped)
8
+
9
+ ```js
10
+ /**
11
+ * <one-line summary>
12
+ *
13
+ * @param {string} name Description.
14
+ * @param {number} [limit] Optional, defaults to undefined.
15
+ * @returns {Promise<object>} Description of the resolved shape.
16
+ * @throws {RangeError} When <condition, from error-patterns findings>.
17
+ */
18
+ ```
19
+
20
+ - Always include `@param`/`@returns` types — JS has no compile-time types, so the comment is the only source of truth.
21
+ - Optional params use `[name]` bracket syntax.
22
+
23
+ ## TypeScript — TSDoc (types live in the signature, don't restate them in the comment)
24
+
25
+ ```ts
26
+ /**
27
+ * <one-line summary>
28
+ *
29
+ * @param name - Description only, no type (already in the signature).
30
+ * @param limit - Description only.
31
+ * @returns Description only.
32
+ * @throws {RangeError} When <condition, from error-patterns findings>.
33
+ */
34
+ function example(name: string, limit?: number): Promise<Result> { ... }
35
+ ```
36
+
37
+ - Do NOT restate types already visible in the TS signature (`{string}`, `{number}`) — that's a JSDoc habit that's redundant and can drift out of sync in TS. Description only after the `-`.
38
+ - Exported `interface`/`type` declarations get their own TSDoc block above the declaration, one line per member if the member itself isn't self-explanatory.
39
+
40
+ ## API reference formatting
41
+
42
+ - Show the actual signature from the source (JS: as written; TS: full typed signature).
43
+ - For TS, prefer documenting the public exported types directly rather than re-describing them in prose.
44
+
45
+ ## What NOT to document inline
46
+
47
+ - Non-exported (module-private) helper functions with obvious names: skip full blocks unless the error-patterns findings show them as a common failure point.