@theglitchking/hit-em-with-the-docs 2.0.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/.claude-plugin/marketplace.json +46 -0
- package/.claude-plugin/plugin.json +114 -0
- package/LICENSE +21 -0
- package/MIGRATION.md +255 -0
- package/README.backup.md +714 -0
- package/README.md +869 -0
- package/action.yml +56 -0
- package/dist/action/action/index.d.ts +2 -0
- package/dist/action/action/index.d.ts.map +1 -0
- package/dist/action/cli/index.d.ts +3 -0
- package/dist/action/cli/index.d.ts.map +1 -0
- package/dist/action/core/audit/auditor.d.ts +43 -0
- package/dist/action/core/audit/auditor.d.ts.map +1 -0
- package/dist/action/core/audit/rules.d.ts +37 -0
- package/dist/action/core/audit/rules.d.ts.map +1 -0
- package/dist/action/core/discover/antipatterns.d.ts +24 -0
- package/dist/action/core/discover/antipatterns.d.ts.map +1 -0
- package/dist/action/core/discover/dependencies.d.ts +57 -0
- package/dist/action/core/discover/dependencies.d.ts.map +1 -0
- package/dist/action/core/discover/patterns.d.ts +38 -0
- package/dist/action/core/discover/patterns.d.ts.map +1 -0
- package/dist/action/core/discover/standards.d.ts +58 -0
- package/dist/action/core/discover/standards.d.ts.map +1 -0
- package/dist/action/core/domains/classifier.d.ts +41 -0
- package/dist/action/core/domains/classifier.d.ts.map +1 -0
- package/dist/action/core/domains/constants.d.ts +40 -0
- package/dist/action/core/domains/constants.d.ts.map +1 -0
- package/dist/action/core/domains/detector.d.ts +35 -0
- package/dist/action/core/domains/detector.d.ts.map +1 -0
- package/dist/action/core/integrate/integrator.d.ts +35 -0
- package/dist/action/core/integrate/integrator.d.ts.map +1 -0
- package/dist/action/core/links/checker.d.ts +64 -0
- package/dist/action/core/links/checker.d.ts.map +1 -0
- package/dist/action/core/links/tracker.d.ts +69 -0
- package/dist/action/core/links/tracker.d.ts.map +1 -0
- package/dist/action/core/maintain/orchestrator.d.ts +39 -0
- package/dist/action/core/maintain/orchestrator.d.ts.map +1 -0
- package/dist/action/core/metadata/generator.d.ts +26 -0
- package/dist/action/core/metadata/generator.d.ts.map +1 -0
- package/dist/action/core/metadata/schema.d.ts +201 -0
- package/dist/action/core/metadata/schema.d.ts.map +1 -0
- package/dist/action/core/metadata/sync.d.ts +36 -0
- package/dist/action/core/metadata/sync.d.ts.map +1 -0
- package/dist/action/generators/index-generator.d.ts +19 -0
- package/dist/action/generators/index-generator.d.ts.map +1 -0
- package/dist/action/generators/registry-generator.d.ts +11 -0
- package/dist/action/generators/registry-generator.d.ts.map +1 -0
- package/dist/action/generators/scaffold.d.ts +30 -0
- package/dist/action/generators/scaffold.d.ts.map +1 -0
- package/dist/action/generators/templates/document.d.ts +14 -0
- package/dist/action/generators/templates/document.d.ts.map +1 -0
- package/dist/action/generators/templates/domain-index.d.ts +6 -0
- package/dist/action/generators/templates/domain-index.d.ts.map +1 -0
- package/dist/action/generators/templates/domain-registry.d.ts +6 -0
- package/dist/action/generators/templates/domain-registry.d.ts.map +1 -0
- package/dist/action/index.d.ts +31 -0
- package/dist/action/index.d.ts.map +1 -0
- package/dist/action/index.js +17 -0
- package/dist/action/index.js.map +1 -0
- package/dist/action/package.json +3 -0
- package/dist/action/reports/audit-report.d.ts +15 -0
- package/dist/action/reports/audit-report.d.ts.map +1 -0
- package/dist/action/reports/health-report.d.ts +15 -0
- package/dist/action/reports/health-report.d.ts.map +1 -0
- package/dist/action/reports/link-report.d.ts +15 -0
- package/dist/action/reports/link-report.d.ts.map +1 -0
- package/dist/action/utils/frontmatter.d.ts +50 -0
- package/dist/action/utils/frontmatter.d.ts.map +1 -0
- package/dist/action/utils/glob.d.ts +63 -0
- package/dist/action/utils/glob.d.ts.map +1 -0
- package/dist/action/utils/logger.d.ts +42 -0
- package/dist/action/utils/logger.d.ts.map +1 -0
- package/dist/action/utils/markdown.d.ts +89 -0
- package/dist/action/utils/markdown.d.ts.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +287 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/audit/auditor.d.ts +43 -0
- package/dist/core/audit/auditor.d.ts.map +1 -0
- package/dist/core/audit/auditor.js +273 -0
- package/dist/core/audit/auditor.js.map +1 -0
- package/dist/core/audit/rules.d.ts +37 -0
- package/dist/core/audit/rules.d.ts.map +1 -0
- package/dist/core/audit/rules.js +223 -0
- package/dist/core/audit/rules.js.map +1 -0
- package/dist/core/discover/antipatterns.d.ts +24 -0
- package/dist/core/discover/antipatterns.d.ts.map +1 -0
- package/dist/core/discover/antipatterns.js +354 -0
- package/dist/core/discover/antipatterns.js.map +1 -0
- package/dist/core/discover/dependencies.d.ts +57 -0
- package/dist/core/discover/dependencies.d.ts.map +1 -0
- package/dist/core/discover/dependencies.js +311 -0
- package/dist/core/discover/dependencies.js.map +1 -0
- package/dist/core/discover/patterns.d.ts +38 -0
- package/dist/core/discover/patterns.d.ts.map +1 -0
- package/dist/core/discover/patterns.js +371 -0
- package/dist/core/discover/patterns.js.map +1 -0
- package/dist/core/discover/standards.d.ts +58 -0
- package/dist/core/discover/standards.d.ts.map +1 -0
- package/dist/core/discover/standards.js +359 -0
- package/dist/core/discover/standards.js.map +1 -0
- package/dist/core/domains/classifier.d.ts +41 -0
- package/dist/core/domains/classifier.d.ts.map +1 -0
- package/dist/core/domains/classifier.js +208 -0
- package/dist/core/domains/classifier.js.map +1 -0
- package/dist/core/domains/constants.d.ts +40 -0
- package/dist/core/domains/constants.d.ts.map +1 -0
- package/dist/core/domains/constants.js +252 -0
- package/dist/core/domains/constants.js.map +1 -0
- package/dist/core/domains/detector.d.ts +35 -0
- package/dist/core/domains/detector.d.ts.map +1 -0
- package/dist/core/domains/detector.js +176 -0
- package/dist/core/domains/detector.js.map +1 -0
- package/dist/core/integrate/integrator.d.ts +35 -0
- package/dist/core/integrate/integrator.d.ts.map +1 -0
- package/dist/core/integrate/integrator.js +216 -0
- package/dist/core/integrate/integrator.js.map +1 -0
- package/dist/core/links/checker.d.ts +64 -0
- package/dist/core/links/checker.d.ts.map +1 -0
- package/dist/core/links/checker.js +190 -0
- package/dist/core/links/checker.js.map +1 -0
- package/dist/core/links/tracker.d.ts +69 -0
- package/dist/core/links/tracker.d.ts.map +1 -0
- package/dist/core/links/tracker.js +184 -0
- package/dist/core/links/tracker.js.map +1 -0
- package/dist/core/maintain/orchestrator.d.ts +39 -0
- package/dist/core/maintain/orchestrator.d.ts.map +1 -0
- package/dist/core/maintain/orchestrator.js +372 -0
- package/dist/core/maintain/orchestrator.js.map +1 -0
- package/dist/core/metadata/generator.d.ts +26 -0
- package/dist/core/metadata/generator.d.ts.map +1 -0
- package/dist/core/metadata/generator.js +221 -0
- package/dist/core/metadata/generator.js.map +1 -0
- package/dist/core/metadata/schema.d.ts +201 -0
- package/dist/core/metadata/schema.d.ts.map +1 -0
- package/dist/core/metadata/schema.js +184 -0
- package/dist/core/metadata/schema.js.map +1 -0
- package/dist/core/metadata/sync.d.ts +36 -0
- package/dist/core/metadata/sync.d.ts.map +1 -0
- package/dist/core/metadata/sync.js +195 -0
- package/dist/core/metadata/sync.js.map +1 -0
- package/dist/generators/index-generator.d.ts +19 -0
- package/dist/generators/index-generator.d.ts.map +1 -0
- package/dist/generators/index-generator.js +191 -0
- package/dist/generators/index-generator.js.map +1 -0
- package/dist/generators/registry-generator.d.ts +11 -0
- package/dist/generators/registry-generator.d.ts.map +1 -0
- package/dist/generators/registry-generator.js +156 -0
- package/dist/generators/registry-generator.js.map +1 -0
- package/dist/generators/scaffold.d.ts +30 -0
- package/dist/generators/scaffold.d.ts.map +1 -0
- package/dist/generators/scaffold.js +213 -0
- package/dist/generators/scaffold.js.map +1 -0
- package/dist/generators/templates/document.d.ts +14 -0
- package/dist/generators/templates/document.d.ts.map +1 -0
- package/dist/generators/templates/document.js +305 -0
- package/dist/generators/templates/document.js.map +1 -0
- package/dist/generators/templates/domain-index.d.ts +6 -0
- package/dist/generators/templates/domain-index.d.ts.map +1 -0
- package/dist/generators/templates/domain-index.js +68 -0
- package/dist/generators/templates/domain-index.js.map +1 -0
- package/dist/generators/templates/domain-registry.d.ts +6 -0
- package/dist/generators/templates/domain-registry.d.ts.map +1 -0
- package/dist/generators/templates/domain-registry.js +59 -0
- package/dist/generators/templates/domain-registry.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/reports/audit-report.d.ts +15 -0
- package/dist/reports/audit-report.d.ts.map +1 -0
- package/dist/reports/audit-report.js +150 -0
- package/dist/reports/audit-report.js.map +1 -0
- package/dist/reports/health-report.d.ts +15 -0
- package/dist/reports/health-report.d.ts.map +1 -0
- package/dist/reports/health-report.js +175 -0
- package/dist/reports/health-report.js.map +1 -0
- package/dist/reports/link-report.d.ts +15 -0
- package/dist/reports/link-report.d.ts.map +1 -0
- package/dist/reports/link-report.js +165 -0
- package/dist/reports/link-report.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +50 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +93 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/glob.d.ts +63 -0
- package/dist/utils/glob.d.ts.map +1 -0
- package/dist/utils/glob.js +128 -0
- package/dist/utils/glob.js.map +1 -0
- package/dist/utils/logger.d.ts +42 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +118 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/markdown.d.ts +89 -0
- package/dist/utils/markdown.d.ts.map +1 -0
- package/dist/utils/markdown.js +192 -0
- package/dist/utils/markdown.js.map +1 -0
- package/package.json +100 -0
- package/templates/claude/CLAUDE.md +204 -0
package/README.backup.md
ADDED
|
@@ -0,0 +1,714 @@
|
|
|
1
|
+
# hit-em-with-the-docs
|
|
2
|
+
|
|
3
|
+
> Self-managing documentation system with hierarchical structure, intelligent automation, pattern discovery, and agent orchestration.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/marketplace/actions/hit-em-with-the-docs)
|
|
6
|
+
[](https://www.npmjs.com/package/hit-em-with-the-docs)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Hierarchical Architecture**: 15-domain structure with 85% token reduction
|
|
12
|
+
- **22-Field Metadata System**: Comprehensive YAML frontmatter with auto-generation
|
|
13
|
+
- **Intelligent Automation**: Metadata sync, link checking, auditing, and maintenance
|
|
14
|
+
- **Pattern Discovery**: Extract coding patterns, anti-patterns, and standards from your codebase
|
|
15
|
+
- **Self-Healing**: Auto-detect and fix documentation issues
|
|
16
|
+
- **GitHub Action**: Automate documentation health checks in CI/CD
|
|
17
|
+
- **CLI Tool**: Full-featured command-line interface
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
### GitHub Action
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
name: Documentation Health Check
|
|
25
|
+
|
|
26
|
+
on:
|
|
27
|
+
push:
|
|
28
|
+
paths:
|
|
29
|
+
- '.documentation/**'
|
|
30
|
+
schedule:
|
|
31
|
+
- cron: '0 16 * * 5' # Weekly on Fridays
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
docs-check:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
|
|
39
|
+
- name: Run Documentation Health Check
|
|
40
|
+
uses: username/hit-em-with-the-docs@v1
|
|
41
|
+
with:
|
|
42
|
+
command: maintain
|
|
43
|
+
mode: quick
|
|
44
|
+
fail-on-error: true
|
|
45
|
+
|
|
46
|
+
- name: Upload Report
|
|
47
|
+
uses: actions/upload-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: docs-health-report
|
|
50
|
+
path: .documentation/reports/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### CLI Installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# npm
|
|
57
|
+
npm install -g hit-em-with-the-docs
|
|
58
|
+
|
|
59
|
+
# Or use npx
|
|
60
|
+
npx hit-em-with-the-docs <command>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Initialize Documentation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Create .documentation structure with all 15 domains
|
|
67
|
+
npx hit-em-with-the-docs init
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
This creates:
|
|
71
|
+
```
|
|
72
|
+
.documentation/
|
|
73
|
+
├── INDEX.md # Navigation hub
|
|
74
|
+
├── REGISTRY.md # Quick reference
|
|
75
|
+
├── README.md # Overview
|
|
76
|
+
├── security/ # Security domain
|
|
77
|
+
│ ├── INDEX.md
|
|
78
|
+
│ └── REGISTRY.md
|
|
79
|
+
├── api/ # API domain
|
|
80
|
+
├── devops/ # DevOps domain
|
|
81
|
+
├── database/ # Database domain
|
|
82
|
+
├── standards/ # Standards domain
|
|
83
|
+
└── ... (15 domains total)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## CLI Commands Reference
|
|
87
|
+
|
|
88
|
+
### `init` - Initialize Documentation Structure
|
|
89
|
+
|
|
90
|
+
**When to use**: First-time setup when starting documentation in a new project.
|
|
91
|
+
|
|
92
|
+
**What it does**: Creates the complete 15-domain hierarchical structure with INDEX/REGISTRY files.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Initialize in current directory
|
|
96
|
+
hewtd init
|
|
97
|
+
|
|
98
|
+
# Initialize in specific path
|
|
99
|
+
hewtd init --path ./my-docs
|
|
100
|
+
|
|
101
|
+
# Choose template
|
|
102
|
+
hewtd init --template minimal
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Output**: Creates 53 files/directories including:
|
|
106
|
+
- Root INDEX.md, REGISTRY.md, README.md
|
|
107
|
+
- 15 domain folders (security, api, devops, etc.)
|
|
108
|
+
- Each domain gets INDEX.md + REGISTRY.md
|
|
109
|
+
- Empty reports/ and drafts/ folders
|
|
110
|
+
|
|
111
|
+
**Use cases**:
|
|
112
|
+
- Starting documentation from scratch
|
|
113
|
+
- Migrating from flat documentation structure
|
|
114
|
+
- Setting up new projects with best practices
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### `maintain` - Full Documentation Maintenance
|
|
119
|
+
|
|
120
|
+
**When to use**: Weekly/monthly maintenance, pre-release checks, or after major documentation updates.
|
|
121
|
+
|
|
122
|
+
**What it does**: Runs complete maintenance workflow (metadata sync + link check + audit) and generates health report.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Full maintenance (recommended weekly)
|
|
126
|
+
hewtd maintain
|
|
127
|
+
|
|
128
|
+
# Quick mode - skip link checking (faster for daily checks)
|
|
129
|
+
hewtd maintain --quick
|
|
130
|
+
|
|
131
|
+
# Auto-fix issues automatically
|
|
132
|
+
hewtd maintain --quick --fix
|
|
133
|
+
|
|
134
|
+
# Specific path
|
|
135
|
+
hewtd maintain --path ./docs
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Output**:
|
|
139
|
+
- Health score (0-100)
|
|
140
|
+
- Fixed metadata issues
|
|
141
|
+
- Broken link detection
|
|
142
|
+
- Audit compliance report
|
|
143
|
+
- Saved to `.documentation/reports/`
|
|
144
|
+
|
|
145
|
+
**Use cases**:
|
|
146
|
+
- Weekly documentation health checks
|
|
147
|
+
- Pre-release validation
|
|
148
|
+
- After adding multiple new documents
|
|
149
|
+
- CI/CD pipeline integration
|
|
150
|
+
- Preparing for documentation review
|
|
151
|
+
|
|
152
|
+
**Recommended schedule**:
|
|
153
|
+
- Daily: `hewtd maintain --quick` (fast check)
|
|
154
|
+
- Weekly: `hewtd maintain --quick --fix` (auto-fix issues)
|
|
155
|
+
- Monthly: `hewtd maintain --fix` (full with link checking)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### `integrate` - Auto-Classify and Place Documents
|
|
160
|
+
|
|
161
|
+
**When to use**: Adding existing documents to the hierarchical structure.
|
|
162
|
+
|
|
163
|
+
**What it does**: Analyzes content, detects appropriate domain, generates metadata, adds frontmatter, and moves file.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Integrate a single document
|
|
167
|
+
hewtd integrate ./docs/my-guide.md
|
|
168
|
+
|
|
169
|
+
# Preview without changes
|
|
170
|
+
hewtd integrate ./docs/my-guide.md --dry-run
|
|
171
|
+
|
|
172
|
+
# Auto mode (no prompts)
|
|
173
|
+
hewtd integrate ./docs/my-guide.md --auto
|
|
174
|
+
|
|
175
|
+
# Force integration even with duplicates
|
|
176
|
+
hewtd integrate ./docs/my-guide.md --force
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**What it analyzes**:
|
|
180
|
+
- Content keywords (security, API, testing, etc.)
|
|
181
|
+
- Document structure (guide, reference, example)
|
|
182
|
+
- Audience level (developers, admin)
|
|
183
|
+
- Automatically generates 22-field metadata
|
|
184
|
+
|
|
185
|
+
**Output**:
|
|
186
|
+
- Detected domain with confidence %
|
|
187
|
+
- Generated metadata (title, tier, domains, status)
|
|
188
|
+
- Target path in .documentation structure
|
|
189
|
+
- File moved with frontmatter added
|
|
190
|
+
|
|
191
|
+
**Use cases**:
|
|
192
|
+
- Migrating existing documentation
|
|
193
|
+
- Adding new guides without manual classification
|
|
194
|
+
- Organizing scattered documentation files
|
|
195
|
+
- Bulk import from legacy systems
|
|
196
|
+
|
|
197
|
+
**Example workflow**:
|
|
198
|
+
```bash
|
|
199
|
+
# Preview where documents will go
|
|
200
|
+
for file in docs/*.md; do
|
|
201
|
+
hewtd integrate "$file" --dry-run
|
|
202
|
+
done
|
|
203
|
+
|
|
204
|
+
# If happy with classification, integrate them
|
|
205
|
+
for file in docs/*.md; do
|
|
206
|
+
hewtd integrate "$file" --auto
|
|
207
|
+
done
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### `metadata-sync` - Sync Metadata Across Documents
|
|
213
|
+
|
|
214
|
+
**When to use**: After manual edits, when metadata is missing, or for bulk metadata updates.
|
|
215
|
+
|
|
216
|
+
**What it does**: Validates, generates missing fields, calculates read times, and ensures consistency.
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
# Sync all metadata (dry-run by default)
|
|
220
|
+
hewtd metadata-sync
|
|
221
|
+
|
|
222
|
+
# Auto-fix missing fields
|
|
223
|
+
hewtd metadata-sync --fix
|
|
224
|
+
|
|
225
|
+
# Specific domain only
|
|
226
|
+
hewtd metadata-sync --domain security --fix
|
|
227
|
+
|
|
228
|
+
# Specific path
|
|
229
|
+
hewtd metadata-sync --path ./docs --fix
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Auto-generates**:
|
|
233
|
+
- `word_count` - Character analysis
|
|
234
|
+
- `estimated_read_time` - Based on word count
|
|
235
|
+
- `last_validated` - Current date
|
|
236
|
+
- Missing required fields with sensible defaults
|
|
237
|
+
|
|
238
|
+
**Validates**:
|
|
239
|
+
- Required fields present (title, tier, domains, status)
|
|
240
|
+
- Date formats (YYYY-MM-DD)
|
|
241
|
+
- Domain names match available domains
|
|
242
|
+
- Tier values (guide|standard|example|reference|admin)
|
|
243
|
+
|
|
244
|
+
**Use cases**:
|
|
245
|
+
- After bulk document edits
|
|
246
|
+
- Standardizing metadata across team
|
|
247
|
+
- Fixing validation errors
|
|
248
|
+
- Preparing for audits
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### `link-check` - Validate Internal Links
|
|
253
|
+
|
|
254
|
+
**When to use**: Before releases, after restructuring, or monthly maintenance.
|
|
255
|
+
|
|
256
|
+
**What it does**: Checks all internal markdown links, detects broken references, and generates topology report.
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# Check all links
|
|
260
|
+
hewtd link-check
|
|
261
|
+
|
|
262
|
+
# Specific domain
|
|
263
|
+
hewtd link-check --domain api
|
|
264
|
+
|
|
265
|
+
# Generate detailed link topology report
|
|
266
|
+
hewtd link-check --report
|
|
267
|
+
|
|
268
|
+
# Specific path
|
|
269
|
+
hewtd link-check --path ./docs
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Detects**:
|
|
273
|
+
- Broken internal links
|
|
274
|
+
- Links to non-existent files
|
|
275
|
+
- Case-sensitivity issues
|
|
276
|
+
- Cross-domain link patterns
|
|
277
|
+
|
|
278
|
+
**Output**:
|
|
279
|
+
- Total links checked
|
|
280
|
+
- Broken links with file locations
|
|
281
|
+
- Link topology (cross-domain relationships)
|
|
282
|
+
- Saved to `.documentation/reports/`
|
|
283
|
+
|
|
284
|
+
**Use cases**:
|
|
285
|
+
- Pre-release validation
|
|
286
|
+
- After renaming/moving files
|
|
287
|
+
- Monthly documentation health checks
|
|
288
|
+
- Detecting orphaned documents
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### `audit` - Documentation Compliance Audit
|
|
293
|
+
|
|
294
|
+
**When to use**: Code reviews, quality gates, or establishing baselines.
|
|
295
|
+
|
|
296
|
+
**What it does**: Audits against naming conventions, file placement, metadata completeness, and best practices.
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
# Audit all documentation
|
|
300
|
+
hewtd audit
|
|
301
|
+
|
|
302
|
+
# Specific domain
|
|
303
|
+
hewtd audit --domain standards
|
|
304
|
+
|
|
305
|
+
# Show only failures
|
|
306
|
+
hewtd audit --issues-only
|
|
307
|
+
|
|
308
|
+
# Generate detailed audit report
|
|
309
|
+
hewtd audit --report
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Checks**:
|
|
313
|
+
- File naming conventions (kebab-case)
|
|
314
|
+
- Correct domain placement
|
|
315
|
+
- Metadata completeness (required fields)
|
|
316
|
+
- Tier appropriateness
|
|
317
|
+
- Frontmatter formatting
|
|
318
|
+
|
|
319
|
+
**Scoring**:
|
|
320
|
+
- Overall health score (0-100)
|
|
321
|
+
- Per-domain compliance %
|
|
322
|
+
- Metadata completeness %
|
|
323
|
+
- Naming compliance %
|
|
324
|
+
|
|
325
|
+
**Use cases**:
|
|
326
|
+
- Establishing documentation quality baseline
|
|
327
|
+
- Pre-merge validation in PRs
|
|
328
|
+
- Quarterly documentation reviews
|
|
329
|
+
- Compliance reporting
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
### `discover` - Pattern Discovery from Codebase
|
|
334
|
+
|
|
335
|
+
**When to use**: Documenting existing patterns, creating style guides, or architectural documentation.
|
|
336
|
+
|
|
337
|
+
**What it does**: Analyzes codebase to extract patterns, anti-patterns, standards, and dependencies.
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
# Discover coding patterns (singleton, factory, repository, etc.)
|
|
341
|
+
hewtd discover patterns
|
|
342
|
+
|
|
343
|
+
# Filter by language
|
|
344
|
+
hewtd discover patterns --language typescript
|
|
345
|
+
|
|
346
|
+
# Find anti-patterns and code smells
|
|
347
|
+
hewtd discover anti-patterns
|
|
348
|
+
|
|
349
|
+
# Extract implicit coding standards
|
|
350
|
+
hewtd discover standards
|
|
351
|
+
|
|
352
|
+
# Analyze package dependencies
|
|
353
|
+
hewtd discover dependencies
|
|
354
|
+
|
|
355
|
+
# Save to specific domain
|
|
356
|
+
hewtd discover patterns --output standards/
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Pattern types detected**:
|
|
360
|
+
- **Patterns**: Singleton, Factory, Repository, Service Layer, etc.
|
|
361
|
+
- **Anti-patterns**: God objects, circular dependencies, etc.
|
|
362
|
+
- **Standards**: Naming conventions, file organization, etc.
|
|
363
|
+
- **Dependencies**: Package usage, version patterns, etc.
|
|
364
|
+
|
|
365
|
+
**Output**: Markdown files with:
|
|
366
|
+
- Pattern name and description
|
|
367
|
+
- Code examples
|
|
368
|
+
- Occurrence count
|
|
369
|
+
- File locations
|
|
370
|
+
- Recommendations
|
|
371
|
+
|
|
372
|
+
**Use cases**:
|
|
373
|
+
- Creating architecture documentation from code
|
|
374
|
+
- Generating style guides automatically
|
|
375
|
+
- Onboarding documentation
|
|
376
|
+
- Technical debt identification
|
|
377
|
+
- Code review guidelines
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
### `list` - List All Domains
|
|
382
|
+
|
|
383
|
+
**When to use**: Quick reference, exploring structure, or scripting.
|
|
384
|
+
|
|
385
|
+
**What it does**: Displays all 15 domains with descriptions, categories, and priorities.
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# List all domains
|
|
389
|
+
hewtd list
|
|
390
|
+
|
|
391
|
+
# JSON output for scripting
|
|
392
|
+
hewtd list --format json
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Output**: Table with:
|
|
396
|
+
- Domain name
|
|
397
|
+
- Category (core, features, development, advanced)
|
|
398
|
+
- Load priority (1-10, higher = more important)
|
|
399
|
+
- Description
|
|
400
|
+
|
|
401
|
+
**Use cases**:
|
|
402
|
+
- Learning the domain structure
|
|
403
|
+
- Deciding where to place new documentation
|
|
404
|
+
- Quick reference during writing
|
|
405
|
+
- Scripting and automation
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
### `search` - Search Documentation
|
|
410
|
+
|
|
411
|
+
**When to use**: Finding specific information, cross-referencing, or validating coverage.
|
|
412
|
+
|
|
413
|
+
**What it does**: Full-text search across all documentation with relevance ranking.
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
# Search all documentation
|
|
417
|
+
hewtd search "authentication"
|
|
418
|
+
|
|
419
|
+
# Search in specific domain
|
|
420
|
+
hewtd search "authentication" --domain security
|
|
421
|
+
|
|
422
|
+
# Case-sensitive search
|
|
423
|
+
hewtd search "Authentication" --case-sensitive
|
|
424
|
+
|
|
425
|
+
# Search in titles only
|
|
426
|
+
hewtd search "API" --titles-only
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**Output**:
|
|
430
|
+
- Matching documents with relevance score
|
|
431
|
+
- Context snippets
|
|
432
|
+
- File paths
|
|
433
|
+
- Domain classification
|
|
434
|
+
|
|
435
|
+
**Use cases**:
|
|
436
|
+
- Finding existing documentation on a topic
|
|
437
|
+
- Checking for duplicate content
|
|
438
|
+
- Researching before writing new docs
|
|
439
|
+
- Validating documentation coverage
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
### `report` - Generate Reports
|
|
444
|
+
|
|
445
|
+
**When to use**: Dashboards, metrics, or stakeholder updates.
|
|
446
|
+
|
|
447
|
+
**What it does**: Generates comprehensive reports in markdown or JSON format.
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
# Health report (overall documentation health)
|
|
451
|
+
hewtd report health
|
|
452
|
+
|
|
453
|
+
# Audit report (compliance and issues)
|
|
454
|
+
hewtd report audit
|
|
455
|
+
|
|
456
|
+
# Link topology report
|
|
457
|
+
hewtd report links
|
|
458
|
+
|
|
459
|
+
# Export as JSON for dashboards
|
|
460
|
+
hewtd report health --format json
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
**Report types**:
|
|
464
|
+
|
|
465
|
+
**Health Report**:
|
|
466
|
+
- Overall health score
|
|
467
|
+
- Domain statistics
|
|
468
|
+
- Document counts per tier
|
|
469
|
+
- Metadata completeness
|
|
470
|
+
- Recent changes
|
|
471
|
+
|
|
472
|
+
**Audit Report**:
|
|
473
|
+
- Compliance by domain
|
|
474
|
+
- Critical issues
|
|
475
|
+
- Warnings
|
|
476
|
+
- Recommendations
|
|
477
|
+
- Historical trends
|
|
478
|
+
|
|
479
|
+
**Link Report**:
|
|
480
|
+
- Total links analyzed
|
|
481
|
+
- Broken links by file
|
|
482
|
+
- Cross-domain link patterns
|
|
483
|
+
- Link topology visualization
|
|
484
|
+
- Orphaned documents
|
|
485
|
+
|
|
486
|
+
**Use cases**:
|
|
487
|
+
- Weekly documentation metrics
|
|
488
|
+
- Stakeholder reporting
|
|
489
|
+
- Trend analysis
|
|
490
|
+
- Quality dashboards
|
|
491
|
+
- CI/CD reporting
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## Common Workflows
|
|
496
|
+
|
|
497
|
+
### Daily Development
|
|
498
|
+
```bash
|
|
499
|
+
# Quick health check before committing
|
|
500
|
+
hewtd maintain --quick
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Adding New Documentation
|
|
504
|
+
```bash
|
|
505
|
+
# 1. Write your document
|
|
506
|
+
vim my-new-guide.md
|
|
507
|
+
|
|
508
|
+
# 2. Integrate it (auto-classifies and places)
|
|
509
|
+
hewtd integrate my-new-guide.md
|
|
510
|
+
|
|
511
|
+
# 3. Run quick check
|
|
512
|
+
hewtd maintain --quick --fix
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
### Weekly Maintenance
|
|
516
|
+
```bash
|
|
517
|
+
# Auto-fix all issues
|
|
518
|
+
hewtd maintain --quick --fix
|
|
519
|
+
|
|
520
|
+
# Review the report
|
|
521
|
+
cat .documentation/reports/maintenance-*.md
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
### Pre-Release Checklist
|
|
525
|
+
```bash
|
|
526
|
+
# 1. Full maintenance with link checking
|
|
527
|
+
hewtd maintain --fix
|
|
528
|
+
|
|
529
|
+
# 2. Generate health report
|
|
530
|
+
hewtd report health
|
|
531
|
+
|
|
532
|
+
# 3. Ensure health score > 80%
|
|
533
|
+
# 4. Review and commit
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
### Migrating Existing Docs
|
|
537
|
+
```bash
|
|
538
|
+
# 1. Initialize structure
|
|
539
|
+
hewtd init
|
|
540
|
+
|
|
541
|
+
# 2. Preview integration (dry-run)
|
|
542
|
+
for file in old-docs/*.md; do
|
|
543
|
+
hewtd integrate "$file" --dry-run
|
|
544
|
+
done
|
|
545
|
+
|
|
546
|
+
# 3. Integrate all documents
|
|
547
|
+
for file in old-docs/*.md; do
|
|
548
|
+
hewtd integrate "$file" --auto
|
|
549
|
+
done
|
|
550
|
+
|
|
551
|
+
# 4. Run full maintenance
|
|
552
|
+
hewtd maintain --fix
|
|
553
|
+
|
|
554
|
+
# 5. Review health score
|
|
555
|
+
hewtd report health
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Creating Architecture Docs from Code
|
|
559
|
+
```bash
|
|
560
|
+
# 1. Discover patterns
|
|
561
|
+
hewtd discover patterns
|
|
562
|
+
|
|
563
|
+
# 2. Extract standards
|
|
564
|
+
hewtd discover standards
|
|
565
|
+
|
|
566
|
+
# 3. Analyze dependencies
|
|
567
|
+
hewtd discover dependencies
|
|
568
|
+
|
|
569
|
+
# 4. Review generated docs in appropriate domains
|
|
570
|
+
cat .documentation/standards/*.md
|
|
571
|
+
cat .documentation/architecture/*.md
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
## Domain Structure
|
|
575
|
+
|
|
576
|
+
The system organizes documentation into 15 specialized domains:
|
|
577
|
+
|
|
578
|
+
| Domain | Description |
|
|
579
|
+
|--------|-------------|
|
|
580
|
+
| `security` | Security, auth, Vault, Keycloak, RLS |
|
|
581
|
+
| `devops` | Deployment, CI/CD, Docker, infrastructure |
|
|
582
|
+
| `database` | Schema, migrations, RLS, queries |
|
|
583
|
+
| `api` | API endpoints, routes, specifications |
|
|
584
|
+
| `standards` | Coding standards (backend, frontend, etc.) |
|
|
585
|
+
| `testing` | Test strategies, fixtures, patterns |
|
|
586
|
+
| `architecture` | System design, patterns, decisions |
|
|
587
|
+
| `features` | Feature implementation guides |
|
|
588
|
+
| `quickstart` | Setup guides, onboarding |
|
|
589
|
+
| `procedures` | Step-by-step operational procedures |
|
|
590
|
+
| `workflows` | Process documentation |
|
|
591
|
+
| `agents` | AI agent documentation |
|
|
592
|
+
| `backups` | Backup/restore guides |
|
|
593
|
+
| `troubleshooting` | Debug guides, common issues |
|
|
594
|
+
| `plans` | Planning documents, roadmaps |
|
|
595
|
+
|
|
596
|
+
## Metadata Schema (22 Fields)
|
|
597
|
+
|
|
598
|
+
Every document uses a comprehensive YAML frontmatter:
|
|
599
|
+
|
|
600
|
+
```yaml
|
|
601
|
+
---
|
|
602
|
+
# Core Identity (Required)
|
|
603
|
+
title: "Document Title"
|
|
604
|
+
tier: guide|standard|example|reference|admin
|
|
605
|
+
domains: [primary-domain, secondary-domain]
|
|
606
|
+
audience: [all|developers|devops|admin]
|
|
607
|
+
tags: [tag1, tag2]
|
|
608
|
+
|
|
609
|
+
# Status & Lifecycle (Required)
|
|
610
|
+
status: draft|active|deprecated|archived
|
|
611
|
+
last_updated: 'YYYY-MM-DD'
|
|
612
|
+
version: '1.0.0'
|
|
613
|
+
|
|
614
|
+
# Discovery & Navigation (Optional)
|
|
615
|
+
purpose: "One-sentence purpose"
|
|
616
|
+
related_docs:
|
|
617
|
+
- path/to/related.md
|
|
618
|
+
load_priority: 1-10
|
|
619
|
+
|
|
620
|
+
# Ownership (Optional)
|
|
621
|
+
author: "Name"
|
|
622
|
+
maintainer: "Team"
|
|
623
|
+
review_frequency: monthly|quarterly|annually
|
|
624
|
+
|
|
625
|
+
# Implementation (Optional)
|
|
626
|
+
implementation_status: planned|in_progress|complete
|
|
627
|
+
tested: true|false
|
|
628
|
+
production_ready: true|false
|
|
629
|
+
|
|
630
|
+
# Auto-generated
|
|
631
|
+
estimated_read_time: "X minutes"
|
|
632
|
+
word_count: 1234
|
|
633
|
+
last_validated: 'YYYY-MM-DD'
|
|
634
|
+
backlinks: []
|
|
635
|
+
---
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
## GitHub Action Inputs
|
|
639
|
+
|
|
640
|
+
| Input | Description | Required | Default |
|
|
641
|
+
|-------|-------------|----------|---------|
|
|
642
|
+
| `command` | Command to run | Yes | `maintain` |
|
|
643
|
+
| `mode` | Execution mode (quick/full/fix) | No | `quick` |
|
|
644
|
+
| `docs-path` | Path to documentation | No | `.documentation` |
|
|
645
|
+
| `domain` | Specific domain to operate on | No | - |
|
|
646
|
+
| `discover-type` | Discovery type | No | `patterns` |
|
|
647
|
+
| `fail-on-error` | Fail on critical errors | No | `false` |
|
|
648
|
+
| `fail-threshold` | Health score threshold | No | `50` |
|
|
649
|
+
|
|
650
|
+
## GitHub Action Outputs
|
|
651
|
+
|
|
652
|
+
| Output | Description |
|
|
653
|
+
|--------|-------------|
|
|
654
|
+
| `health-score` | Documentation health score (0-100) |
|
|
655
|
+
| `total-documents` | Total number of documentation files |
|
|
656
|
+
| `issues-found` | Number of issues found |
|
|
657
|
+
| `issues-fixed` | Number of issues auto-fixed |
|
|
658
|
+
| `broken-links` | Number of broken links |
|
|
659
|
+
| `metadata-compliance` | Percentage with complete metadata |
|
|
660
|
+
| `report-path` | Path to generated report |
|
|
661
|
+
|
|
662
|
+
## Configuration
|
|
663
|
+
|
|
664
|
+
Create `.hewtd.config.json` in your project root:
|
|
665
|
+
|
|
666
|
+
```json
|
|
667
|
+
{
|
|
668
|
+
"docsPath": ".documentation",
|
|
669
|
+
"domains": {
|
|
670
|
+
"custom-domain": {
|
|
671
|
+
"description": "Custom domain description",
|
|
672
|
+
"keywords": ["keyword1", "keyword2"]
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
"metadata": {
|
|
676
|
+
"requiredFields": ["title", "tier", "domains", "status"],
|
|
677
|
+
"autoGenerate": ["word_count", "estimated_read_time"]
|
|
678
|
+
},
|
|
679
|
+
"audit": {
|
|
680
|
+
"namingConvention": "kebab-case",
|
|
681
|
+
"maxFileSize": 50000
|
|
682
|
+
},
|
|
683
|
+
"discover": {
|
|
684
|
+
"excludePaths": ["node_modules", "dist", "vendor"],
|
|
685
|
+
"languages": ["typescript", "python", "go"]
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
## Integration with Claude Code
|
|
691
|
+
|
|
692
|
+
This tool can be used as a Claude Code plugin. Add to your project:
|
|
693
|
+
|
|
694
|
+
```markdown
|
|
695
|
+
# .claude/CLAUDE.md
|
|
696
|
+
|
|
697
|
+
## Documentation System
|
|
698
|
+
|
|
699
|
+
Use hit-em-with-the-docs for documentation management:
|
|
700
|
+
|
|
701
|
+
- `/docs load <domain>` - Load domain documentation
|
|
702
|
+
- `/docs list` - List all domains
|
|
703
|
+
- `/docs search <query>` - Search documentation
|
|
704
|
+
- `/docs stats` - Show statistics
|
|
705
|
+
- `/docs maintain` - Run maintenance
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
## Contributing
|
|
709
|
+
|
|
710
|
+
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
711
|
+
|
|
712
|
+
## License
|
|
713
|
+
|
|
714
|
+
MIT - see [LICENSE](LICENSE) for details.
|