@hustle-together/api-dev-tools 3.12.3 → 4.5.1
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/adr-requests/.gitkeep +10 -0
- package/.claude/agents/adr-researcher.md +109 -0
- package/.claude/agents/visual-analyzer.md +183 -0
- package/.claude/api-dev-state.json +7 -463
- package/.claude/documentation-audit.json +114 -0
- package/.claude/registry.json +289 -0
- package/.claude/settings.json +45 -1
- package/.claude/workflow-logs/None.json +49 -0
- package/.claude/workflow-logs/session-20251230-143727.json +106 -0
- package/.skills/adr-deep-research/SKILL.md +351 -0
- package/.skills/api-create/SKILL.md +116 -17
- package/.skills/api-research/SKILL.md +130 -0
- package/.skills/docs-sync/SKILL.md +260 -0
- package/.skills/docs-update/SKILL.md +205 -0
- package/.skills/hustle-brand/SKILL.md +368 -0
- package/.skills/hustle-build/SKILL.md +786 -0
- package/.skills/hustle-build-review/SKILL.md +518 -0
- package/.skills/parallel-spawn/SKILL.md +212 -0
- package/.skills/ralph-continue/SKILL.md +151 -0
- package/.skills/ralph-loop/SKILL.md +341 -0
- package/.skills/ralph-status/SKILL.md +87 -0
- package/.skills/refactor/SKILL.md +59 -0
- package/.skills/shadcn/SKILL.md +522 -0
- package/.skills/test-all/SKILL.md +210 -0
- package/.skills/test-builds/SKILL.md +208 -0
- package/.skills/test-debug/SKILL.md +212 -0
- package/.skills/test-e2e/SKILL.md +168 -0
- package/.skills/test-review/SKILL.md +707 -0
- package/.skills/test-unit/SKILL.md +143 -0
- package/.skills/test-visual/SKILL.md +301 -0
- package/.skills/token-report/SKILL.md +132 -0
- package/CHANGELOG.md +575 -0
- package/README.md +426 -56
- package/bin/cli.js +1538 -88
- package/commands/hustle-api-create.md +22 -0
- package/commands/hustle-build.md +259 -0
- package/commands/hustle-combine.md +81 -2
- package/commands/hustle-ui-create-page.md +84 -2
- package/commands/hustle-ui-create.md +82 -2
- package/hooks/__pycache__/api-workflow-check.cpython-314.pyc +0 -0
- package/hooks/__pycache__/auto-answer.cpython-314.pyc +0 -0
- package/hooks/__pycache__/cache-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-api-routes.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-playwright-setup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-storybook-setup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-update.cpython-314.pyc +0 -0
- package/hooks/__pycache__/completion-promise-detector.cpython-314.pyc +0 -0
- package/hooks/__pycache__/context-capacity-warning.cpython-314.pyc +0 -0
- package/hooks/__pycache__/detect-interruption.cpython-314.pyc +0 -0
- package/hooks/__pycache__/docs-update-check.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-a11y-audit.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-brand-guide.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-component-type-confirm.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-deep-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-disambiguation.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-documentation.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-dry-run.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-environment.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-external-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-freshness.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-interview.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-page-components.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-page-data-schema.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-questions-sourced.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-refactor.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-schema-from-interview.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-schema.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-scope.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-tdd-red.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-ui-disambiguation.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-ui-interview.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-verify.cpython-314.pyc +0 -0
- package/hooks/__pycache__/generate-adr-options.cpython-314.pyc +0 -0
- package/hooks/__pycache__/generate-manifest-entry.cpython-314.pyc +0 -0
- package/hooks/__pycache__/hook_utils.cpython-314.pyc +0 -0
- package/hooks/__pycache__/notify-input-needed.cpython-314.pyc +0 -0
- package/hooks/__pycache__/notify-phase-complete.cpython-314.pyc +0 -0
- package/hooks/__pycache__/ntfy-on-question.cpython-314.pyc +0 -0
- package/hooks/__pycache__/orchestrator-completion.cpython-314.pyc +0 -0
- package/hooks/__pycache__/orchestrator-handoff.cpython-314.pyc +0 -0
- package/hooks/__pycache__/orchestrator-session-startup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/parallel-orchestrator.cpython-314.pyc +0 -0
- package/hooks/__pycache__/periodic-reground.cpython-314.pyc +0 -0
- package/hooks/__pycache__/project-document-prompt.cpython-314.pyc +0 -0
- package/hooks/__pycache__/remote-question-proxy.cpython-314.pyc +0 -0
- package/hooks/__pycache__/remote-question-server.cpython-314.pyc +0 -0
- package/hooks/__pycache__/run-code-review.cpython-314.pyc +0 -0
- package/hooks/__pycache__/run-visual-qa.cpython-314.pyc +0 -0
- package/hooks/__pycache__/session-logger.cpython-314.pyc +0 -0
- package/hooks/__pycache__/session-startup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/track-scope-coverage.cpython-314.pyc +0 -0
- package/hooks/__pycache__/track-token-usage.cpython-314.pyc +0 -0
- package/hooks/__pycache__/track-tool-use.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-adr-decision.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-api-showcase.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-registry.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-ui-showcase.cpython-314.pyc +0 -0
- package/hooks/__pycache__/verify-after-green.cpython-314.pyc +0 -0
- package/hooks/__pycache__/verify-implementation.cpython-314.pyc +0 -0
- package/hooks/api-workflow-check.py +34 -0
- package/hooks/auto-answer.py +305 -0
- package/hooks/check-update.py +132 -0
- package/hooks/completion-promise-detector.py +293 -0
- package/hooks/context-capacity-warning.py +171 -0
- package/hooks/docs-update-check.py +120 -0
- package/hooks/enforce-dry-run.py +134 -0
- package/hooks/enforce-external-research.py +25 -0
- package/hooks/enforce-interview.py +20 -0
- package/hooks/generate-adr-options.py +282 -0
- package/hooks/hook_utils.py +609 -0
- package/hooks/lib/__pycache__/__init__.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/greptile.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
- package/hooks/ntfy-on-question.py +240 -0
- package/hooks/orchestrator-completion.py +313 -0
- package/hooks/orchestrator-handoff.py +267 -0
- package/hooks/orchestrator-session-startup.py +146 -0
- package/hooks/parallel-orchestrator.py +451 -0
- package/hooks/periodic-reground.py +270 -67
- package/hooks/project-document-prompt.py +302 -0
- package/hooks/remote-question-proxy.py +284 -0
- package/hooks/remote-question-server.py +1224 -0
- package/hooks/run-code-review.py +176 -29
- package/hooks/run-visual-qa.py +338 -0
- package/hooks/session-logger.py +27 -1
- package/hooks/session-startup.py +113 -0
- package/hooks/update-adr-decision.py +236 -0
- package/hooks/update-api-showcase.py +13 -1
- package/hooks/update-testing-checklist.py +195 -0
- package/hooks/update-ui-showcase.py +13 -1
- package/package.json +7 -3
- package/scripts/extract-schema-docs.cjs +322 -0
- package/templates/.skills/hustle-interview/SKILL.md +174 -0
- package/templates/CLAUDE-SECTION.md +89 -64
- package/templates/adr-viewer/_components/ADRViewer.tsx +326 -0
- package/templates/api-dev-state.json +33 -1
- package/templates/api-showcase/_components/APIModal.tsx +100 -8
- package/templates/api-showcase/_components/APIShowcase.tsx +36 -4
- package/templates/api-showcase/_components/APITester.tsx +367 -58
- package/templates/brand-page/page.tsx +645 -0
- package/templates/component/Component.visual.spec.ts +30 -24
- package/templates/docs/page.tsx +230 -0
- package/templates/eslint-plugin-zod-schema/index.js +446 -0
- package/templates/eslint-plugin-zod-schema/package.json +26 -0
- package/templates/github-workflows/security.yml +274 -0
- package/templates/hustle-build-defaults.json +136 -0
- package/templates/hustle-dev-dashboard/page.tsx +365 -0
- package/templates/page/page.e2e.test.ts +30 -26
- package/templates/performance-budgets.json +63 -5
- package/templates/playwright-report/page.tsx +258 -0
- package/templates/registry.json +279 -3
- package/templates/review-dashboard/page.tsx +510 -0
- package/templates/settings.json +155 -7
- package/templates/test-results/page.tsx +237 -0
- package/templates/typedoc.json +19 -0
- package/templates/ui-showcase/_components/UIShowcase.tsx +48 -1
- package/templates/ui-showcase/_components/VisualTestingDashboard.tsx +579 -0
- package/templates/ui-showcase/page.tsx +1 -1
|
@@ -42,6 +42,103 @@ Run 2-3 targeted searches:
|
|
|
42
42
|
- WebSearch: "site:[domain] api reference" (if known domain)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
### Table of Contents Scraping (CRITICAL)
|
|
46
|
+
|
|
47
|
+
**Always fetch and parse the documentation Table of Contents first!**
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
51
|
+
│ TOC DISCOVERY FLOW │
|
|
52
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
53
|
+
│ │
|
|
54
|
+
│ Step 1: Find Docs Root │
|
|
55
|
+
│ ├─ WebSearch: "[name] documentation" │
|
|
56
|
+
│ └─ Extract: docs.example.com or example.com/docs │
|
|
57
|
+
│ │
|
|
58
|
+
│ Step 2: Fetch TOC Page │
|
|
59
|
+
│ ├─ WebFetch: docs.example.com + look for sidebar/nav │
|
|
60
|
+
│ ├─ WebFetch: docs.example.com/api-reference │
|
|
61
|
+
│ └─ WebFetch: docs.example.com/sitemap.xml (if available) │
|
|
62
|
+
│ │
|
|
63
|
+
│ Step 3: Extract All Sections │
|
|
64
|
+
│ ├─ Getting Started │
|
|
65
|
+
│ ├─ Authentication │
|
|
66
|
+
│ ├─ API Reference │
|
|
67
|
+
│ │ ├─ Endpoints │
|
|
68
|
+
│ │ ├─ Parameters │
|
|
69
|
+
│ │ ├─ Response Codes │
|
|
70
|
+
│ │ └─ Webhooks │
|
|
71
|
+
│ ├─ SDKs & Libraries │
|
|
72
|
+
│ ├─ Rate Limits │
|
|
73
|
+
│ ├─ Errors │
|
|
74
|
+
│ └─ Changelog │
|
|
75
|
+
│ │
|
|
76
|
+
│ Step 4: Prioritize for Interview │
|
|
77
|
+
│ ├─ Which sections have parameters we need to ask about? │
|
|
78
|
+
│ ├─ Which sections have optional features? │
|
|
79
|
+
│ └─ Which sections have configuration options? │
|
|
80
|
+
│ │
|
|
81
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Comprehensive Discovery Checklist
|
|
85
|
+
|
|
86
|
+
Before proceeding to interview, ensure we've discovered:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
## Pre-Interview Discovery Checklist
|
|
90
|
+
|
|
91
|
+
### Authentication & Authorization
|
|
92
|
+
- [ ] Auth method (API key, OAuth, Bearer token, Basic)
|
|
93
|
+
- [ ] Where to get credentials (dashboard URL)
|
|
94
|
+
- [ ] Token refresh mechanism
|
|
95
|
+
- [ ] Scopes/permissions available
|
|
96
|
+
|
|
97
|
+
### Endpoints
|
|
98
|
+
- [ ] All available endpoints listed
|
|
99
|
+
- [ ] HTTP methods for each
|
|
100
|
+
- [ ] Path parameters identified
|
|
101
|
+
- [ ] Query parameters with types
|
|
102
|
+
- [ ] Request body schemas
|
|
103
|
+
|
|
104
|
+
### Parameters (CRITICAL for Interview)
|
|
105
|
+
- [ ] Required vs optional distinction
|
|
106
|
+
- [ ] Parameter types (string, number, enum, array)
|
|
107
|
+
- [ ] Enum values listed
|
|
108
|
+
- [ ] Default values documented
|
|
109
|
+
- [ ] Validation rules/constraints
|
|
110
|
+
- [ ] Continuous parameters (ranges for testing)
|
|
111
|
+
|
|
112
|
+
### Response Schemas
|
|
113
|
+
- [ ] Success response structure
|
|
114
|
+
- [ ] Error response format
|
|
115
|
+
- [ ] HTTP status codes used
|
|
116
|
+
- [ ] Pagination format
|
|
117
|
+
|
|
118
|
+
### Rate Limits & Quotas
|
|
119
|
+
- [ ] Requests per minute/hour/day
|
|
120
|
+
- [ ] Rate limit headers
|
|
121
|
+
- [ ] Retry behavior
|
|
122
|
+
- [ ] Quota types (per key, per user)
|
|
123
|
+
|
|
124
|
+
### Webhooks (if applicable)
|
|
125
|
+
- [ ] Available webhook events
|
|
126
|
+
- [ ] Payload structure
|
|
127
|
+
- [ ] Signature verification
|
|
128
|
+
- [ ] Retry behavior
|
|
129
|
+
|
|
130
|
+
### SDKs & Libraries
|
|
131
|
+
- [ ] Official SDK availability
|
|
132
|
+
- [ ] npm/pip/cargo package names
|
|
133
|
+
- [ ] TypeScript types available?
|
|
134
|
+
- [ ] Version compatibility
|
|
135
|
+
|
|
136
|
+
### Errors
|
|
137
|
+
- [ ] Error code catalog
|
|
138
|
+
- [ ] Error message format
|
|
139
|
+
- [ ] Troubleshooting steps
|
|
140
|
+
```
|
|
141
|
+
|
|
45
142
|
Present initial summary:
|
|
46
143
|
|
|
47
144
|
```
|
|
@@ -367,4 +464,37 @@ All research is tracked in `.claude/api-dev-state.json`:
|
|
|
367
464
|
- Phase 5 uses adaptive proposal flow
|
|
368
465
|
- Phase 10 (Verify) triggers re-research
|
|
369
466
|
- Freshness check prevents stale data
|
|
467
|
+
|
|
468
|
+
## ADR Integration (Automatic)
|
|
469
|
+
|
|
470
|
+
When research discovers **multiple options for a significant decision**, the
|
|
471
|
+
`generate-adr-options.py` hook automatically:
|
|
472
|
+
|
|
473
|
+
1. Detects significant decisions (database, auth, cache, hosting, etc.)
|
|
474
|
+
2. Creates a research request in `.claude/adr-requests/pending-{category}.json`
|
|
475
|
+
3. Injects context telling you to run `/adr-deep-research {category}`
|
|
476
|
+
|
|
477
|
+
**You should then run the deep research skill to:**
|
|
478
|
+
|
|
479
|
+
- Spawn parallel agents to research each option
|
|
480
|
+
- Fetch official documentation for each technology
|
|
481
|
+
- Extract real pros, cons, pricing, and best-use cases
|
|
482
|
+
- Create a substantive ADR before the interview phase
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
Example Flow:
|
|
486
|
+
1. /api-research supabase
|
|
487
|
+
→ Hook detects: database options (supabase, firebase, postgres)
|
|
488
|
+
→ Creates: .claude/adr-requests/pending-database.json
|
|
489
|
+
→ Injects: "Run /adr-deep-research database"
|
|
490
|
+
|
|
491
|
+
2. /adr-deep-research database
|
|
492
|
+
→ Spawns 3 parallel agents (one per option)
|
|
493
|
+
→ Each agent fetches docs, extracts pros/cons
|
|
494
|
+
→ Creates: .claude/adrs/ADR-0001-database-choice.md (with real content)
|
|
495
|
+
|
|
496
|
+
3. Interview phase references ADR for informed decision
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
See `/adr-deep-research` skill and `docs/ARCHITECTURE_DECISION_RECORDS.md`.
|
|
370
500
|
</claude-commands-template>
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-sync
|
|
3
|
+
description: Synchronize documentation after code changes. Updates existing docs, creates new ones for features, and ensures README links.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires Claude Code with hooks
|
|
6
|
+
metadata:
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
category: "documentation"
|
|
9
|
+
tags: ["docs", "readme", "sync", "maintenance"]
|
|
10
|
+
author: "Hustle Together"
|
|
11
|
+
allowed-tools: Read Write Edit Glob Grep
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Docs Sync - Documentation Synchronization Skill
|
|
15
|
+
|
|
16
|
+
Ensures documentation stays in sync with code changes. Run after implementing features, fixing gaps, or adding new capabilities.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/docs-sync # Analyze and sync all docs
|
|
22
|
+
/docs-sync [feature-name] # Sync docs for specific feature
|
|
23
|
+
/docs-sync --check # Check what needs updating (no writes)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## What This Skill Does
|
|
27
|
+
|
|
28
|
+
### 1. Analyze Recent Changes
|
|
29
|
+
|
|
30
|
+
First, examine what changed:
|
|
31
|
+
- Read git diff or recent file modifications
|
|
32
|
+
- Identify new hooks, skills, agents, or features
|
|
33
|
+
- Detect removed or deprecated functionality
|
|
34
|
+
|
|
35
|
+
### 2. Update Existing Documentation
|
|
36
|
+
|
|
37
|
+
For each affected area, update the relevant doc:
|
|
38
|
+
|
|
39
|
+
| Change Type | Doc to Update |
|
|
40
|
+
|-------------|---------------|
|
|
41
|
+
| New hook | `docs/HOOKS.md` |
|
|
42
|
+
| New skill | `docs/SKILLS.md` |
|
|
43
|
+
| New agent | `docs/AGENTS.md` |
|
|
44
|
+
| Orchestrator change | `docs/ORCHESTRATOR.md` |
|
|
45
|
+
| Re-grounding change | `docs/REGROUNDING.md` |
|
|
46
|
+
| Gap fixed | `docs/GAP_ANALYSIS.md` |
|
|
47
|
+
| Best practice added | `docs/CLAUDE_CODE_BEST_PRACTICES.md` |
|
|
48
|
+
|
|
49
|
+
### 3. Create New Documentation
|
|
50
|
+
|
|
51
|
+
If a feature warrants its own doc:
|
|
52
|
+
|
|
53
|
+
1. Create `docs/[FEATURE_NAME].md`
|
|
54
|
+
2. Use the standard header template (see below)
|
|
55
|
+
3. Add link to README.md Core Reference table
|
|
56
|
+
|
|
57
|
+
### 4. Ensure Problem/Solution Headers
|
|
58
|
+
|
|
59
|
+
Every doc MUST have this header format:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
# [Document Title]
|
|
63
|
+
|
|
64
|
+
**Version:** X.X.X
|
|
65
|
+
**Last Updated:** YYYY-MM-DD
|
|
66
|
+
|
|
67
|
+
> **The Problem**
|
|
68
|
+
>
|
|
69
|
+
> [Clear description of the pain point this addresses]
|
|
70
|
+
|
|
71
|
+
> **The Solution**
|
|
72
|
+
>
|
|
73
|
+
> [How this document/feature solves the problem]
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 5. Update README Links
|
|
79
|
+
|
|
80
|
+
Add any new docs to the appropriate section in README.md:
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
### Core Reference
|
|
84
|
+
|
|
85
|
+
| Document | Purpose |
|
|
86
|
+
| -------- | ------- |
|
|
87
|
+
| **[docs/NEW_DOC.md](./docs/NEW_DOC.md)** | Brief description |
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Document Header Template
|
|
93
|
+
|
|
94
|
+
Use this exact format for all documentation:
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
# [Title]
|
|
98
|
+
|
|
99
|
+
**Version:** [version]
|
|
100
|
+
**Last Updated:** [date]
|
|
101
|
+
|
|
102
|
+
> **The Problem**
|
|
103
|
+
>
|
|
104
|
+
> [Describe the specific pain point, frustration, or gap this addresses.
|
|
105
|
+
> Be concrete - what goes wrong without this? What do users struggle with?]
|
|
106
|
+
|
|
107
|
+
> **The Solution**
|
|
108
|
+
>
|
|
109
|
+
> [Explain how this document/feature solves the problem.
|
|
110
|
+
> What improvements does it provide? What's the benefit?]
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Table of Contents
|
|
115
|
+
...
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Execution Steps
|
|
121
|
+
|
|
122
|
+
### Step 1: Identify Changes
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Check what files changed recently
|
|
126
|
+
git diff --name-only HEAD~5
|
|
127
|
+
# Or check specific areas
|
|
128
|
+
ls -la hooks/
|
|
129
|
+
ls -la .skills/
|
|
130
|
+
ls -la docs/
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Look for:
|
|
134
|
+
- New `.py` files in `hooks/`
|
|
135
|
+
- New folders in `.skills/`
|
|
136
|
+
- New `.md` files in `.claude/agents/`
|
|
137
|
+
- Modified core files
|
|
138
|
+
|
|
139
|
+
### Step 2: Categorize Updates Needed
|
|
140
|
+
|
|
141
|
+
Create a checklist:
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
## Documentation Updates Needed
|
|
145
|
+
|
|
146
|
+
### Existing Docs to Update
|
|
147
|
+
- [ ] docs/HOOKS.md - Add [hook name]
|
|
148
|
+
- [ ] docs/SKILLS.md - Add [skill name]
|
|
149
|
+
- [ ] docs/GAP_ANALYSIS.md - Mark [gap] as fixed
|
|
150
|
+
|
|
151
|
+
### New Docs to Create
|
|
152
|
+
- [ ] docs/[FEATURE].md - New feature documentation
|
|
153
|
+
|
|
154
|
+
### README Updates
|
|
155
|
+
- [ ] Add link to [new doc]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Step 3: Update Each Document
|
|
159
|
+
|
|
160
|
+
For each doc that needs updating:
|
|
161
|
+
|
|
162
|
+
1. **Read current content**
|
|
163
|
+
2. **Add/update the Problem/Solution header if missing**
|
|
164
|
+
3. **Add new sections for new features**
|
|
165
|
+
4. **Update version and date**
|
|
166
|
+
5. **Ensure See Also section includes related docs**
|
|
167
|
+
|
|
168
|
+
### Step 4: Create New Documents
|
|
169
|
+
|
|
170
|
+
For genuinely new features that need their own doc:
|
|
171
|
+
|
|
172
|
+
1. Create file with header template
|
|
173
|
+
2. Write comprehensive content
|
|
174
|
+
3. Add to README Core Reference table
|
|
175
|
+
4. Cross-link from related docs
|
|
176
|
+
|
|
177
|
+
### Step 5: Verify Links
|
|
178
|
+
|
|
179
|
+
Check all links work:
|
|
180
|
+
- Internal doc links (`[text](./OTHER_DOC.md)`)
|
|
181
|
+
- README links to docs
|
|
182
|
+
- See Also sections
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Problem/Solution Examples
|
|
187
|
+
|
|
188
|
+
### Good Example (REGROUNDING.md)
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
> **The Problem**
|
|
192
|
+
>
|
|
193
|
+
> LLMs suffer from "context dilution" - as conversations grow longer,
|
|
194
|
+
> the original instructions (CLAUDE.md, system prompts) get pushed to
|
|
195
|
+
> the "middle" of the context where attention is weakest. Claude starts
|
|
196
|
+
> forgetting the endpoint name, re-asking answered questions, and
|
|
197
|
+
> recreating existing components.
|
|
198
|
+
|
|
199
|
+
> **The Solution**
|
|
200
|
+
>
|
|
201
|
+
> The Re-Grounding System injects a comprehensive state reminder every
|
|
202
|
+
> 7 turns, pushing critical context to the END where attention is
|
|
203
|
+
> strongest. This includes current phase, key decisions, existing
|
|
204
|
+
> registry elements, and deferred features - preventing the "lost in
|
|
205
|
+
> the middle" problem.
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Good Example (ORCHESTRATOR.md)
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
> **The Problem**
|
|
212
|
+
>
|
|
213
|
+
> Building complex features requires multiple workflows (APIs, components,
|
|
214
|
+
> pages) that depend on each other. Running them manually means answering
|
|
215
|
+
> the same questions repeatedly, managing dependency order yourself, and
|
|
216
|
+
> manually wiring completed elements together.
|
|
217
|
+
|
|
218
|
+
> **The Solution**
|
|
219
|
+
>
|
|
220
|
+
> The Orchestrator decomposes natural language requests into workflows,
|
|
221
|
+
> orders them by dependency, shares decisions across all sub-workflows
|
|
222
|
+
> (ask once, apply everywhere), and automatically wires completed
|
|
223
|
+
> elements with proper imports and types.
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Checklist Before Completing
|
|
229
|
+
|
|
230
|
+
- [ ] All affected docs have Problem/Solution headers
|
|
231
|
+
- [ ] New features are documented
|
|
232
|
+
- [ ] README links are updated
|
|
233
|
+
- [ ] Version numbers are bumped
|
|
234
|
+
- [ ] Dates are updated
|
|
235
|
+
- [ ] See Also sections cross-reference related docs
|
|
236
|
+
- [ ] GAP_ANALYSIS.md reflects current state
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Output
|
|
241
|
+
|
|
242
|
+
After running this skill, report:
|
|
243
|
+
|
|
244
|
+
```markdown
|
|
245
|
+
## Documentation Sync Complete
|
|
246
|
+
|
|
247
|
+
### Updated
|
|
248
|
+
- docs/HOOKS.md - Added auto-format hook
|
|
249
|
+
- docs/GAP_ANALYSIS.md - Marked 3 gaps as fixed
|
|
250
|
+
|
|
251
|
+
### Created
|
|
252
|
+
- docs/NEW_FEATURE.md - New feature documentation
|
|
253
|
+
|
|
254
|
+
### README
|
|
255
|
+
- Added link to NEW_FEATURE.md
|
|
256
|
+
|
|
257
|
+
### Headers Added
|
|
258
|
+
- docs/SKILLS.md - Added Problem/Solution header
|
|
259
|
+
- docs/AGENTS.md - Added Problem/Solution header
|
|
260
|
+
```
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-update
|
|
3
|
+
description: Ensure README, CHANGELOG, and docs stay current with features
|
|
4
|
+
tools: Read, Write, Edit, Glob, Grep, Task, TodoWrite
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Documentation Update Skill
|
|
9
|
+
|
|
10
|
+
Automatically maintains documentation consistency when features are added or changed. This skill is invoked by the `docs-update-check.py` hook after significant changes.
|
|
11
|
+
|
|
12
|
+
## Philosophy
|
|
13
|
+
|
|
14
|
+
> **README is the single source of truth** - It should provide a comprehensive overview
|
|
15
|
+
> without becoming too long. Detailed docs live in `/docs/*.md`.
|
|
16
|
+
|
|
17
|
+
### Update Rules
|
|
18
|
+
|
|
19
|
+
1. **README.md** - Update only when:
|
|
20
|
+
- New major feature added (new skill, new workflow)
|
|
21
|
+
- Links section needs new doc reference
|
|
22
|
+
- Counts change (skills, hooks, agents)
|
|
23
|
+
- Version number changes
|
|
24
|
+
- Never let it exceed ~500 lines
|
|
25
|
+
|
|
26
|
+
2. **CHANGELOG.md** - Always update when:
|
|
27
|
+
- New features added
|
|
28
|
+
- Breaking changes
|
|
29
|
+
- Bug fixes
|
|
30
|
+
- Version bump
|
|
31
|
+
|
|
32
|
+
3. **docs/*.md** - Create/update when:
|
|
33
|
+
- New feature needs detailed explanation
|
|
34
|
+
- Existing doc is out of date
|
|
35
|
+
- Command signature changes
|
|
36
|
+
|
|
37
|
+
## When This Skill Runs
|
|
38
|
+
|
|
39
|
+
Triggered by `docs-update-check.py` hook when:
|
|
40
|
+
- New skill created in `.skills/`
|
|
41
|
+
- New hook added to `hooks/`
|
|
42
|
+
- New agent defined in `.claude/agents/`
|
|
43
|
+
- New doc created in `docs/`
|
|
44
|
+
- registry.json sections added/changed
|
|
45
|
+
|
|
46
|
+
## Execution Flow
|
|
47
|
+
|
|
48
|
+
### Step 1: Detect What Changed
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Get recently modified files
|
|
52
|
+
git diff --name-only HEAD~1 HEAD
|
|
53
|
+
|
|
54
|
+
# Or for uncommitted changes
|
|
55
|
+
git status --porcelain
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Step 2: Categorize Changes
|
|
59
|
+
|
|
60
|
+
| File Pattern | Category | Action |
|
|
61
|
+
|--------------|----------|--------|
|
|
62
|
+
| `.skills/*/SKILL.md` | New Skill | Update README skills count, add to docs/SKILLS.md |
|
|
63
|
+
| `hooks/*.py` | New Hook | Update README hooks count, add to docs/HOOKS.md |
|
|
64
|
+
| `.claude/agents/*.md` | New Agent | Update README agents count, add to docs/AGENTS.md |
|
|
65
|
+
| `docs/*.md` | New Doc | Add to README Documentation section |
|
|
66
|
+
| `templates/*.tsx` | New Template | Consider dashboard integration |
|
|
67
|
+
|
|
68
|
+
### Step 3: Update README Links
|
|
69
|
+
|
|
70
|
+
Check if new docs need to be linked:
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
## Documentation
|
|
74
|
+
|
|
75
|
+
### Core Reference
|
|
76
|
+
|
|
77
|
+
| Document | Purpose |
|
|
78
|
+
| -------- | ------- |
|
|
79
|
+
| **[docs/NEW_DOC.md](./docs/NEW_DOC.md)** | Description here |
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 4: Update CHANGELOG
|
|
83
|
+
|
|
84
|
+
Add entry under current version or create new version:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
## [X.Y.Z] - YYYY-MM-DD
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
- **`/new-skill`** - Description of what it does
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Step 5: Update Feature Doc
|
|
94
|
+
|
|
95
|
+
If change affects an existing command, update its doc:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Map skill to doc
|
|
99
|
+
/api-create → docs/API-CREATE.md
|
|
100
|
+
/hustle-ui-create → docs/HUSTLE-UI-CREATE.md
|
|
101
|
+
/test-review → docs/SKILLS.md (test skills section)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Output Format
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
═══════════════════════════════════════════════════════════════
|
|
108
|
+
DOCUMENTATION UPDATE
|
|
109
|
+
═══════════════════════════════════════════════════════════════
|
|
110
|
+
|
|
111
|
+
Changes Detected:
|
|
112
|
+
• New skill: /docs-update
|
|
113
|
+
• New doc: docs/PARALLEL_AUTONOMOUS_WORKFLOW.md
|
|
114
|
+
• Modified: .skills/hustle-build/SKILL.md
|
|
115
|
+
|
|
116
|
+
Updates Made:
|
|
117
|
+
✅ README.md - Added parallel workflow to docs section
|
|
118
|
+
✅ CHANGELOG.md - Added v4.3.0 entry
|
|
119
|
+
✅ docs/SKILLS.md - Added docs-update skill reference
|
|
120
|
+
⏭️ docs/HOOKS.md - No changes needed
|
|
121
|
+
|
|
122
|
+
Verification:
|
|
123
|
+
• README length: 516 lines (target: <600)
|
|
124
|
+
• All new docs linked: Yes
|
|
125
|
+
• CHANGELOG has entry: Yes
|
|
126
|
+
|
|
127
|
+
═══════════════════════════════════════════════════════════════
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Decision Tree
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
New Feature Added?
|
|
134
|
+
│
|
|
135
|
+
├─► Is it a major workflow change?
|
|
136
|
+
│ │
|
|
137
|
+
│ ├─► YES: Create new doc in docs/
|
|
138
|
+
│ │ Update README links
|
|
139
|
+
│ │ Update CHANGELOG
|
|
140
|
+
│ │
|
|
141
|
+
│ └─► NO: Is it an enhancement to existing command?
|
|
142
|
+
│ │
|
|
143
|
+
│ ├─► YES: Update that command's doc
|
|
144
|
+
│ │ Update CHANGELOG
|
|
145
|
+
│ │
|
|
146
|
+
│ └─► NO: Is it a minor fix?
|
|
147
|
+
│ │
|
|
148
|
+
│ └─► YES: Update CHANGELOG only
|
|
149
|
+
│
|
|
150
|
+
└─► Removing a feature?
|
|
151
|
+
│
|
|
152
|
+
├─► WARNING: Removal requires justification
|
|
153
|
+
│ Only remove if:
|
|
154
|
+
│ - Feature never worked
|
|
155
|
+
│ - Replaced by better feature
|
|
156
|
+
│ - Security issue
|
|
157
|
+
│
|
|
158
|
+
└─► Update CHANGELOG with [BREAKING] if public API
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## README Structure Limits
|
|
162
|
+
|
|
163
|
+
| Section | Max Lines | Current |
|
|
164
|
+
|---------|-----------|---------|
|
|
165
|
+
| Header/Banner | 30 | - |
|
|
166
|
+
| Quick Start | 20 | - |
|
|
167
|
+
| Workflows | 50 | - |
|
|
168
|
+
| Phases Diagram | 30 | - |
|
|
169
|
+
| What Gets Installed | 20 | - |
|
|
170
|
+
| Subagents | 20 | - |
|
|
171
|
+
| Commands | 40 | - |
|
|
172
|
+
| Documentation Links | 60 | - |
|
|
173
|
+
| FAQ | 150 | - |
|
|
174
|
+
| **Total** | **~500** | - |
|
|
175
|
+
|
|
176
|
+
If README exceeds 600 lines, move content to dedicated docs.
|
|
177
|
+
|
|
178
|
+
## Commands
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Run documentation update check
|
|
182
|
+
/docs-update
|
|
183
|
+
|
|
184
|
+
# Check what would be updated (dry run)
|
|
185
|
+
/docs-update --dry-run
|
|
186
|
+
|
|
187
|
+
# Force update all docs
|
|
188
|
+
/docs-update --force
|
|
189
|
+
|
|
190
|
+
# Update specific doc only
|
|
191
|
+
/docs-update --target README
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Integration
|
|
195
|
+
|
|
196
|
+
This skill integrates with:
|
|
197
|
+
- `docs-update-check.py` hook (PostToolUse on Write/Edit)
|
|
198
|
+
- Phase 13 (Documentation) of all workflows
|
|
199
|
+
- `/commit` skill (suggests doc updates before commit)
|
|
200
|
+
|
|
201
|
+
## See Also
|
|
202
|
+
|
|
203
|
+
- [docs/SKILLS.md](../../docs/SKILLS.md) - All skills reference
|
|
204
|
+
- [docs/HOOKS.md](../../docs/HOOKS.md) - All hooks reference
|
|
205
|
+
- [CHANGELOG.md](../../CHANGELOG.md) - Version history
|