liteagents 2.4.6 → 2.4.7

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.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: docs-builder
3
- description: Create comprehensive project documentation with structured /docs hierarchy
3
+ description: Create or reorganize project documentation with structured /docs hierarchy
4
4
  usage: /docs-builder
5
5
  auto_trigger: false
6
6
  ---
7
7
 
8
8
  # Documentation Architecture Skill
9
9
 
10
- Create systematic /docs structure following this 5-tier hierarchy:
10
+ Create or reorganize `/docs` following a 5-tier hierarchy:
11
11
 
12
12
  ```
13
13
  /docs
@@ -16,91 +16,243 @@ Create systematic /docs structure following this 5-tier hierarchy:
16
16
  ├── 02-features/ # HOW features are designed & built
17
17
  ├── 03-logs/ # MEMORY (what changed over time)
18
18
  ├── 04-process/ # HOW to work with this system
19
+ ├── archive/ # Old/unclear docs preserved here
19
20
  └── README.md # Navigation guide
20
21
  ```
21
22
 
22
- ## Workflow
23
+ ---
24
+
25
+ ## Step 1: Detect Mode
26
+
27
+ Check if `/docs` exists and has content:
28
+
29
+ ```bash
30
+ find docs -name "*.md" 2>/dev/null | wc -l
31
+ ```
32
+
33
+ - **0 files** → **Fresh Mode** (skip to Step 3)
34
+ - **1+ files** → **Existing Mode** (continue to Step 2)
35
+
36
+ ---
23
37
 
24
- ### 1. Discover Project
25
- - Scan: README, existing /docs, package.json/pyproject.toml, src/, tests/
26
- - Map existing docs: commands/ → where? development/ → where?
27
- - Ask: "What's built? What's planned? What's missing?"
38
+ ## Step 2: Existing Mode - Analyze First
28
39
 
29
- ### 2. Create Directories
40
+ ### 2.1 Inventory
41
+
42
+ List all markdown files:
30
43
  ```bash
31
- mkdir -p docs/{00-context,01-product,02-features,03-logs,04-process}
44
+ find docs -name "*.md" -exec wc -l {} \; | sort -n
32
45
  ```
33
46
 
34
- ### 3. Create Files with TodoWrite
47
+ ### 2.2 Read and Categorize
48
+
49
+ **For each file**, read first 50-100 lines and categorize:
50
+
51
+ | Category | Criteria | Action |
52
+ |----------|----------|--------|
53
+ | **KEEP** | Evergreen guides, references, architecture, troubleshooting | Move to appropriate tier |
54
+ | **CONSOLIDATE** | Duplicate/overlapping content | Merge into one, originals to archive |
55
+ | **ARCHIVE** | Work logs, status reports, old phase docs, unclear purpose | Move to `/docs/archive/` |
56
+
57
+ ### 2.3 Categorization Heuristics
58
+
59
+ **Likely KEEP/MOVE:**
60
+ - Filename contains: GUIDE, REFERENCE, HOWTO, ARCHITECTURE, COMMANDS, TROUBLESHOOTING, QUICKSTART
61
+ - Content: Has TOC, structured sections, explains "how to" or "what is"
62
+ - Purpose: Teaches something reusable
35
63
 
36
- Track progress:
37
- - [ ] 00-context (3 files: vision.md, assumptions.md, system-state.md)
38
- - [ ] 01-product (1 file: prd.md)
39
- - [ ] 02-features (per feature discovered: feature-spec.md, tech-design.md, dev-tasks.md, test-plan.md)
40
- - [ ] 03-logs (5 files: implementation-log.md, decisions-log.md, bug-log.md, validation-log.md, insights.md)
41
- - [ ] 04-process (3 files: dev-workflow.md, definition-of-done.md, llm-prompts.md)
42
- - [ ] docs/README.md
64
+ **Likely ARCHIVE:**
65
+ - Filename contains: REPORT, STATUS, SUMMARY, FIX_, PHASE_, SPRINT_, _LOG, DRAFT, WIP, OLD, TEMP
66
+ - Filename has dates: 2024-01-15-meeting.md
67
+ - Located in: archive/, old/, reports/, fixes/, phases/
68
+ - Content: Dated entries, task IDs, one-time status updates
69
+ - Under ~20 lines and looks like placeholder
43
70
 
44
- Mark each **completed** before next.
71
+ **When uncertain → ARCHIVE** (can always recover later)
45
72
 
46
- For detailed templates, see: `docs-builder/templates.md`
73
+ ### 2.4 Present Plan to User
47
74
 
48
- ### 4. Integrate with Existing Docs
75
+ Before making changes, show categorization:
49
76
 
50
- **If CLAUDE.md/KNOWLEDGE_BASE.md exist**:
51
- Update KNOWLEDGE_BASE.md to reference new structure:
77
+ ```
78
+ KEEP Move to new structure (X files):
79
+ - guides/COMMANDS.md → 02-features/cli/COMMANDS.md
80
+ - reference/CONFIG.md → 04-process/reference/CONFIG.md
81
+ ...
82
+
83
+ CONSOLIDATE (X groups):
84
+ - architecture.md + ARCHITECTURE.md → 00-context/system-state.md
85
+ ...
86
+
87
+ ARCHIVE (X files):
88
+ - PHASE1_STATUS.md
89
+ - FIX_SUMMARY_2024.md
90
+ - reports/old-metrics.md
91
+ ...
92
+ ```
93
+
94
+ **Wait for user approval before proceeding.**
95
+
96
+ ### 2.5 Execute Reorganization
97
+
98
+ 1. Create directory structure (including archive):
99
+ ```bash
100
+ mkdir -p docs/{00-context,01-product,02-features,03-logs,04-process,archive}
101
+ ```
102
+
103
+ 2. Move ARCHIVE files first:
104
+ ```bash
105
+ mv docs/old-file.md docs/archive/
106
+ ```
107
+
108
+ 3. Move KEEP files to appropriate tiers
109
+
110
+ 4. For CONSOLIDATE: read both files, merge content into new file, move originals to archive
111
+
112
+ 5. Remove empty old directories
113
+
114
+ ---
115
+
116
+ ## Step 3: Create Structure
117
+
118
+ ### 3.1 Create Directories
119
+
120
+ ```bash
121
+ mkdir -p docs/{00-context,01-product,02-features,03-logs,04-process,archive}
122
+ ```
123
+
124
+ ### 3.2 Required Files
125
+
126
+ Create these files (see `docs-builder/templates.md` for content):
127
+
128
+ **00-context/** (3 files):
129
+ - [ ] `vision.md` - Product purpose & boundaries
130
+ - [ ] `assumptions.md` - Constraints, risks, unknowns
131
+ - [ ] `system-state.md` - What's currently built
132
+
133
+ **01-product/** (1 file):
134
+ - [ ] `prd.md` - Product requirements
135
+
136
+ **02-features/** (per feature):
137
+ - [ ] `feature-<name>/` subdirectories as needed
138
+ - [ ] Or flat files for simpler projects
139
+
140
+ **03-logs/** (5 files):
141
+ - [ ] `implementation-log.md`
142
+ - [ ] `decisions-log.md`
143
+ - [ ] `bug-log.md`
144
+ - [ ] `validation-log.md`
145
+ - [ ] `insights.md`
146
+
147
+ **04-process/** (3+ files):
148
+ - [ ] `dev-workflow.md`
149
+ - [ ] `definition-of-done.md`
150
+ - [ ] `llm-prompts.md`
151
+
152
+ **Root:**
153
+ - [ ] `README.md` - Navigation guide
154
+
155
+ ---
156
+
157
+ ## Step 4: Populate Files
158
+
159
+ ### Content Sources
160
+
161
+ Pull content from:
162
+ - Project README.md
163
+ - Package files (package.json, pyproject.toml)
164
+ - Existing code comments/docstrings
165
+ - Existing docs being reorganized
166
+
167
+ ### For Existing Mode
168
+
169
+ When moving files:
170
+ - Update any internal links to match new locations
171
+ - Merge duplicate content thoughtfully
172
+ - Preserve useful information, don't just copy-paste
173
+
174
+ ---
175
+
176
+ ## Step 5: Integration
177
+
178
+ **If CLAUDE.md exists:**
179
+ Add or update documentation pointer:
52
180
  ```markdown
53
- ## Project Documentation
54
- Full /docs structure with context, product, features, logs, process
55
- → `docs/README.md`
181
+ ## Documentation
182
+ See `docs/README.md` for full documentation structure.
56
183
  ```
57
184
 
58
- **If existing /docs subdirs exist**:
59
- - Don't delete - add migration note in docs/README.md
60
- - Reference existing content where relevant
61
- - Note in system-state.md that migration in progress
185
+ **If KNOWLEDGE_BASE.md exists:**
186
+ Update to reference new structure with quick links.
187
+
188
+ ---
62
189
 
63
- ### 5. Validate
190
+ ## Step 6: Validate
64
191
 
65
192
  ```bash
66
- # Check structure
67
- ls -la docs/{00-context,01-product,02-features,03-logs,04-process}
193
+ # Check structure exists
194
+ ls -la docs/{00-context,01-product,02-features,03-logs,04-process,archive}
68
195
 
69
- # Count minimum files
196
+ # Verify minimum files
197
+ test -f docs/00-context/vision.md && echo "✓ vision.md"
198
+ test -f docs/00-context/system-state.md && echo "✓ system-state.md"
199
+ test -f docs/01-product/prd.md && echo "✓ prd.md"
200
+ test -f docs/README.md && echo "✓ README.md"
201
+
202
+ # Count files per tier
70
203
  find docs/00-context -name "*.md" | wc -l # >= 3
71
204
  find docs/03-logs -name "*.md" | wc -l # >= 5
72
205
  find docs/04-process -name "*.md" | wc -l # >= 3
73
- test -f docs/01-product/prd.md && echo "✓ PRD exists"
74
- test -f docs/README.md && echo "✓ README exists"
75
206
  ```
76
207
 
208
+ ---
209
+
77
210
  ## Rules
78
211
 
79
- **DO**:
80
- - Complete one section fully before next
81
- - Use TodoWrite to track progress
82
- - Populate files (don't leave empty templates)
83
- - Use discovered content from project
84
- - Create feature-<name>/ for each major feature found
85
- - Initialize all 5 log files with format
86
- - Mark todos completed immediately after finishing
87
-
88
- **DON'T**:
89
- - Skip sections
90
- - Create empty placeholders
91
- - Duplicate content across files
92
- - Delete existing docs
93
- - Forget to validate at end
212
+ **DO:**
213
+ - Read files before categorizing (don't guess from filename alone)
214
+ - Present plan to user before bulk changes
215
+ - Archive instead of delete
216
+ - Complete one section before moving to next
217
+ - Populate files with real content (not empty templates)
218
+ - Preserve original files in archive when consolidating
219
+
220
+ **DON'T:**
221
+ - Delete any files (archive instead)
222
+ - Move files without reading them first
223
+ - Make bulk changes without user approval
224
+ - Create empty placeholder files
225
+ - Skip the analysis phase for existing docs
226
+
227
+ ---
94
228
 
95
229
  ## Success Criteria
96
230
 
97
- All 5 tier directories created
98
- Minimum files in each (00-context: 3, 01-product: 1, 03-logs: 5, 04-process: 3)
231
+ Mode correctly detected (fresh vs existing)
232
+ For existing: categorization presented and approved
233
+ ✅ All 5 tier directories created (+ archive)
234
+ ✅ Minimum files in each tier
99
235
  ✅ Files populated with project-specific content
100
- Feature folders created for discovered features
101
- ✅ docs/README.md complete with navigation
102
- ✅ Integration with CLAUDE.md/KNOWLEDGE_BASE.md done
236
+ Archive contains old/unclear docs (not deleted)
237
+ ✅ docs/README.md with navigation
103
238
  ✅ Validation checks pass
104
- ✅ All todos marked completed
105
239
 
106
- Complete when /docs structure is fully populated and navigable.
240
+ ---
241
+
242
+ ## Quick Reference
243
+
244
+ ### Tier Mapping
245
+
246
+ | Old Location | New Location |
247
+ |--------------|--------------|
248
+ | guides/, howto/ | 02-features/ or 04-process/ |
249
+ | reference/, api/ | 04-process/reference/ |
250
+ | architecture/ | 00-context/ |
251
+ | commands/ | 02-features/cli/ |
252
+ | development/ | 04-process/development/ |
253
+ | troubleshooting/ | 04-process/troubleshooting/ |
254
+ | reports/, status/, phases/ | archive/ |
255
+
256
+ ### File Templates
257
+
258
+ See: `docs-builder/templates.md`
@@ -264,7 +264,7 @@ Subagent workflows require manual coordination.
264
264
  ```
265
265
  ~/.factory/
266
266
  ├── AGENTS.md # Reference doc (subagents + commands)
267
- └── commands/ # 20 commands (*.md)
267
+ └── commands/ # 21 commands (*.md)
268
268
  ```
269
269
 
270
270
  **Features**:
@@ -276,7 +276,7 @@ Subagent workflows require manual coordination.
276
276
  ```
277
277
  ~/.config/opencode/
278
278
  ├── AGENTS.md # Reference doc (subagents + commands)
279
- └── command/ # 20 commands (*.md)
279
+ └── command/ # 21 commands (*.md)
280
280
  ```
281
281
 
282
282
  **Features**: