ace-docs 0.31.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.
- checksums.yaml +7 -0
- data/.ace-defaults/docs/config.yml +169 -0
- data/.ace-defaults/docs/multi-subject-example.md +130 -0
- data/.ace-defaults/docs/single-subject-example.md +150 -0
- data/.ace-defaults/nav/protocols/guide-sources/ace-docs.yml +10 -0
- data/.ace-defaults/nav/protocols/prompt-sources/ace-docs.yml +34 -0
- data/.ace-defaults/nav/protocols/tmpl-sources/ace-docs.yml +10 -0
- data/.ace-defaults/nav/protocols/wfi-sources/ace-docs.yml +19 -0
- data/CHANGELOG.md +1082 -0
- data/LICENSE +21 -0
- data/README.md +40 -0
- data/Rakefile +14 -0
- data/exe/ace-docs +14 -0
- data/handbook/guides/documentation/ruby.md +16 -0
- data/handbook/guides/documentation/rust.md +35 -0
- data/handbook/guides/documentation/typescript.md +18 -0
- data/handbook/guides/documentation.g.md +437 -0
- data/handbook/guides/documents-embedded-sync.g.md +473 -0
- data/handbook/guides/documents-embedding.g.md +276 -0
- data/handbook/guides/markdown-style.g.md +290 -0
- data/handbook/prompts/ace-change-analyzer.system.md +113 -0
- data/handbook/prompts/ace-change-analyzer.user.md +95 -0
- data/handbook/prompts/document-analysis.md +74 -0
- data/handbook/prompts/document-analysis.system.md +129 -0
- data/handbook/prompts/markdown-style.system.md +113 -0
- data/handbook/skills/as-docs-create-adr/SKILL.md +35 -0
- data/handbook/skills/as-docs-create-api/SKILL.md +35 -0
- data/handbook/skills/as-docs-create-user/SKILL.md +35 -0
- data/handbook/skills/as-docs-maintain-adrs/SKILL.md +35 -0
- data/handbook/skills/as-docs-squash-changelog/SKILL.md +42 -0
- data/handbook/skills/as-docs-update/SKILL.md +36 -0
- data/handbook/skills/as-docs-update-blueprint/SKILL.md +28 -0
- data/handbook/skills/as-docs-update-roadmap/SKILL.md +24 -0
- data/handbook/skills/as-docs-update-tools/SKILL.md +36 -0
- data/handbook/skills/as-docs-update-usage/SKILL.md +26 -0
- data/handbook/templates/code-docs/javascript-jsdoc.template.md +102 -0
- data/handbook/templates/code-docs/ruby-yard.template.md +85 -0
- data/handbook/templates/project-docs/README.template.md +73 -0
- data/handbook/templates/project-docs/architecture.template.md +300 -0
- data/handbook/templates/project-docs/blueprint.template.md +165 -0
- data/handbook/templates/project-docs/context/ownership.yml +160 -0
- data/handbook/templates/project-docs/decisions/adr.template.md +60 -0
- data/handbook/templates/project-docs/prd.template.md +144 -0
- data/handbook/templates/project-docs/roadmap/roadmap.template.md +47 -0
- data/handbook/templates/project-docs/vision.template.md +233 -0
- data/handbook/templates/user-docs/user-guide.template.md +107 -0
- data/handbook/workflow-instructions/docs/create-adr.wf.md +334 -0
- data/handbook/workflow-instructions/docs/create-api.wf.md +448 -0
- data/handbook/workflow-instructions/docs/create-cookbook.wf.md +434 -0
- data/handbook/workflow-instructions/docs/create-user.wf.md +399 -0
- data/handbook/workflow-instructions/docs/maintain-adrs.wf.md +589 -0
- data/handbook/workflow-instructions/docs/squash-changelog.wf.md +246 -0
- data/handbook/workflow-instructions/docs/update-blueprint.wf.md +361 -0
- data/handbook/workflow-instructions/docs/update-context.wf.md +336 -0
- data/handbook/workflow-instructions/docs/update-roadmap.wf.md +421 -0
- data/handbook/workflow-instructions/docs/update-tools.wf.md +307 -0
- data/handbook/workflow-instructions/docs/update-usage.wf.md +710 -0
- data/handbook/workflow-instructions/docs/update.wf.md +418 -0
- data/lib/ace/docs/atoms/diff_filterer.rb +131 -0
- data/lib/ace/docs/atoms/frontmatter_free_matcher.rb +20 -0
- data/lib/ace/docs/atoms/git_date_resolver.rb +16 -0
- data/lib/ace/docs/atoms/readme_metadata_inferrer.rb +60 -0
- data/lib/ace/docs/atoms/terminology_extractor.rb +308 -0
- data/lib/ace/docs/atoms/time_range_calculator.rb +96 -0
- data/lib/ace/docs/atoms/timestamp_parser.rb +106 -0
- data/lib/ace/docs/atoms/type_inferrer.rb +70 -0
- data/lib/ace/docs/cli/commands/analyze.rb +351 -0
- data/lib/ace/docs/cli/commands/analyze_consistency.rb +185 -0
- data/lib/ace/docs/cli/commands/discover.rb +75 -0
- data/lib/ace/docs/cli/commands/scope_options.rb +71 -0
- data/lib/ace/docs/cli/commands/status.rb +241 -0
- data/lib/ace/docs/cli/commands/update.rb +198 -0
- data/lib/ace/docs/cli/commands/validate.rb +225 -0
- data/lib/ace/docs/cli.rb +60 -0
- data/lib/ace/docs/models/analysis_report.rb +120 -0
- data/lib/ace/docs/models/consistency_report.rb +259 -0
- data/lib/ace/docs/models/document.rb +354 -0
- data/lib/ace/docs/molecules/change_detector.rb +389 -0
- data/lib/ace/docs/molecules/document_loader.rb +133 -0
- data/lib/ace/docs/molecules/frontmatter_manager.rb +85 -0
- data/lib/ace/docs/molecules/git_date_resolver.rb +30 -0
- data/lib/ace/docs/organisms/cross_document_analyzer.rb +274 -0
- data/lib/ace/docs/organisms/document_registry.rb +318 -0
- data/lib/ace/docs/organisms/validator.rb +164 -0
- data/lib/ace/docs/prompts/compact_diff_prompt.rb +119 -0
- data/lib/ace/docs/prompts/consistency_prompt.rb +286 -0
- data/lib/ace/docs/prompts/document_analysis_prompt.rb +389 -0
- data/lib/ace/docs/version.rb +7 -0
- data/lib/ace/docs.rb +82 -0
- data/lib/test.rb +4 -0
- metadata +347 -0
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
---
|
|
2
|
+
doc-type: guide
|
|
3
|
+
title: Documents Embedded Synchronization Guide
|
|
4
|
+
purpose: Documentation for ace-docs/handbook/guides/documents-embedded-sync.g.md
|
|
5
|
+
ace-docs:
|
|
6
|
+
last-updated: 2026-03-12
|
|
7
|
+
last-checked: 2026-03-21
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Documents Embedded Synchronization Guide
|
|
11
|
+
|
|
12
|
+
This guide covers the operational aspects of the document synchronization system, focusing on the `handbook sync-templates` tool usage, maintenance procedures, and troubleshooting. The system supports embedding both templates and guides within workflow instructions using the universal `<documents>` container format.
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
> **Note**: This guide uses the current gem-scoped handbook layout.
|
|
17
|
+
> In ACE, handbook content lives under package directories such as `ace-docs/handbook/`
|
|
18
|
+
> and `ace-review/handbook/`. Adjust example paths to the package you are working in.
|
|
19
|
+
|
|
20
|
+
The document synchronization system keeps embedded documents in workflow instructions synchronized with their corresponding source files. This ensures consistency and enables automated document updates across the development handbook.
|
|
21
|
+
|
|
22
|
+
### Key Components
|
|
23
|
+
|
|
24
|
+
- **Sync Script**: `handbook sync-templates` - CLI tool for synchronization
|
|
25
|
+
- **Template Directory**: `handbook/templates/` - Package template repository
|
|
26
|
+
- **Guide Directory**: `handbook/guides/` - Reference documentation and best practices
|
|
27
|
+
- **Workflow Instructions**: `handbook/workflow-instructions/` - Files with embedded documents
|
|
28
|
+
- **Universal Format**: `<documents>` container with `<template>` and `<guide>` tags
|
|
29
|
+
|
|
30
|
+
## Script Usage
|
|
31
|
+
|
|
32
|
+
### Basic Operations
|
|
33
|
+
|
|
34
|
+
The synchronization script provides several modes of operation:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Basic synchronization (default)
|
|
38
|
+
handbook sync-templates
|
|
39
|
+
|
|
40
|
+
# Preview changes without modifying files
|
|
41
|
+
handbook sync-templates --dry-run
|
|
42
|
+
|
|
43
|
+
# Detailed output with verbose logging
|
|
44
|
+
handbook sync-templates --verbose
|
|
45
|
+
|
|
46
|
+
# Automatic commit after synchronization
|
|
47
|
+
handbook sync-templates --commit
|
|
48
|
+
|
|
49
|
+
# Custom directory path
|
|
50
|
+
handbook sync-templates --path handbook/workflow-instructions
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Command Options
|
|
54
|
+
|
|
55
|
+
| Option | Description | Use Case |
|
|
56
|
+
|--------|-------------|----------|
|
|
57
|
+
| `--dry-run` | Preview changes without modifying files | Testing changes before applying |
|
|
58
|
+
| `--verbose` | Show detailed processing information | Debugging synchronization issues |
|
|
59
|
+
| `--path PATH` | Directory to scan (default: handbook/workflow-instructions) | Custom workflow locations |
|
|
60
|
+
| `--commit` | Automatically commit changes after synchronization | Automated workflows and CI |
|
|
61
|
+
| `-h, --help` | Show help message | Reference and option discovery |
|
|
62
|
+
|
|
63
|
+
### Common Usage Patterns
|
|
64
|
+
|
|
65
|
+
**Development Workflow:**
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# 1. Preview changes first
|
|
69
|
+
handbook sync-templates --dry-run
|
|
70
|
+
|
|
71
|
+
# 2. Apply changes with detailed output
|
|
72
|
+
handbook sync-templates --verbose
|
|
73
|
+
|
|
74
|
+
# 3. Review changes manually
|
|
75
|
+
git diff
|
|
76
|
+
|
|
77
|
+
# 4. Commit if satisfied
|
|
78
|
+
git add -A && git commit -m "chore: sync embedded documents"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Automated/CI Workflow:**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Single command for automated synchronization
|
|
85
|
+
handbook sync-templates --verbose --commit
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Troubleshooting Workflow:**
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Check for issues without changes
|
|
92
|
+
handbook sync-templates --dry-run --verbose
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Quick Commands Reference
|
|
96
|
+
|
|
97
|
+
### Essential Operations
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Preview what will change
|
|
101
|
+
handbook sync-templates --dry-run
|
|
102
|
+
|
|
103
|
+
# Synchronize with detailed output
|
|
104
|
+
handbook sync-templates --verbose
|
|
105
|
+
|
|
106
|
+
# Synchronize and auto-commit
|
|
107
|
+
handbook sync-templates --verbose --commit
|
|
108
|
+
|
|
109
|
+
# Check script help
|
|
110
|
+
handbook sync-templates --help
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Status Checks
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Check if documents need synchronization
|
|
117
|
+
handbook sync-templates --dry-run | grep -E "(Template|Guide|Summary)"
|
|
118
|
+
|
|
119
|
+
# Verify all embedded templates exist
|
|
120
|
+
grep -r 'path="handbook/templates/' handbook/workflow-instructions/ | cut -d'"' -f2 | while read path; do
|
|
121
|
+
[ -f "$path" ] || echo "Missing template: $path"
|
|
122
|
+
done
|
|
123
|
+
|
|
124
|
+
# Verify all embedded guides exist
|
|
125
|
+
grep -r 'path="handbook/guides/' handbook/workflow-instructions/ | cut -d'"' -f2 | while read path; do
|
|
126
|
+
[ -f "$path" ] || echo "Missing guide: $path"
|
|
127
|
+
done
|
|
128
|
+
|
|
129
|
+
# Count embedded documents
|
|
130
|
+
echo "Templates: $(grep -r "<template path=" handbook/workflow-instructions/ | wc -l)"
|
|
131
|
+
echo "Guides: $(grep -r "<guide path=" handbook/workflow-instructions/ | wc -l)"
|
|
132
|
+
echo "Total: $(grep -r -E "(<template|<guide) path=" handbook/workflow-instructions/ | wc -l)"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Common Workflows
|
|
136
|
+
|
|
137
|
+
### Daily Development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# 1. Check for document changes (morning routine)
|
|
141
|
+
handbook sync-templates --dry-run
|
|
142
|
+
|
|
143
|
+
# 2. If changes needed, apply them
|
|
144
|
+
handbook sync-templates --verbose
|
|
145
|
+
|
|
146
|
+
# 3. Review and commit changes
|
|
147
|
+
git diff
|
|
148
|
+
git add -A && git commit -m "chore: sync embedded documents"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Document Updates
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# After modifying a template file:
|
|
155
|
+
# 1. Identify affected workflow files
|
|
156
|
+
grep -r "path=\"handbook/templates/your-template.template.md\"" handbook/workflow-instructions/
|
|
157
|
+
|
|
158
|
+
# After modifying a guide file:
|
|
159
|
+
# 1. Identify affected workflow files
|
|
160
|
+
grep -r "path=\"handbook/guides/your-guide.g.md\"" handbook/workflow-instructions/
|
|
161
|
+
|
|
162
|
+
# 2. Preview synchronization
|
|
163
|
+
handbook sync-templates --dry-run --verbose
|
|
164
|
+
|
|
165
|
+
# 3. Apply synchronization
|
|
166
|
+
handbook sync-templates --verbose
|
|
167
|
+
|
|
168
|
+
# 4. Commit both source and workflow changes
|
|
169
|
+
git add handbook/templates/ handbook/guides/
|
|
170
|
+
git add handbook/workflow-instructions/
|
|
171
|
+
git commit -m "feat: update document and sync embedded instances"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Pre-Release Checklist
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# 1. Ensure all documents are synchronized
|
|
178
|
+
handbook sync-templates --dry-run
|
|
179
|
+
if [ $? -eq 0 ]; then echo "✅ All documents in sync"; else echo "❌ Documents need sync"; fi
|
|
180
|
+
|
|
181
|
+
# 2. Verify document directory organization
|
|
182
|
+
echo "Template structure:"
|
|
183
|
+
tree handbook/templates -L 2
|
|
184
|
+
echo "Guide structure:"
|
|
185
|
+
tree handbook/guides -L 2
|
|
186
|
+
|
|
187
|
+
# 3. Check for broken document references
|
|
188
|
+
echo "Checking template references..."
|
|
189
|
+
find handbook/workflow-instructions -name "*.wf.md" -exec grep -l "<template path=" {} \; | while read file; do
|
|
190
|
+
grep 'path="[^"]*"' "$file" | grep -o '"[^"]*"' | tr -d '"' | while read path; do
|
|
191
|
+
[ -f "$path" ] || echo "Broken template reference in $file: $path"
|
|
192
|
+
done
|
|
193
|
+
done
|
|
194
|
+
|
|
195
|
+
echo "Checking guide references..."
|
|
196
|
+
find handbook/workflow-instructions -name "*.wf.md" -exec grep -l "<guide path=" {} \; | while read file; do
|
|
197
|
+
grep 'path="[^"]*"' "$file" | grep -o '"[^"]*"' | tr -d '"' | while read path; do
|
|
198
|
+
[ -f "$path" ] || echo "Broken guide reference in $file: $path"
|
|
199
|
+
done
|
|
200
|
+
done
|
|
201
|
+
|
|
202
|
+
# 4. Final synchronization and commit
|
|
203
|
+
handbook sync-templates --verbose --commit
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Troubleshooting
|
|
207
|
+
|
|
208
|
+
### Quick Fixes
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Fix XML format issues
|
|
212
|
+
# Find malformed documents sections
|
|
213
|
+
grep -rn "<documents>" handbook/workflow-instructions/ | grep -v "</documents>"
|
|
214
|
+
|
|
215
|
+
# Find template sections without closing tags
|
|
216
|
+
grep -rn "<template" handbook/workflow-instructions/ | grep -v "</template>"
|
|
217
|
+
|
|
218
|
+
# Find guide sections without closing tags
|
|
219
|
+
grep -rn "<guide" handbook/workflow-instructions/ | grep -v "</guide>"
|
|
220
|
+
|
|
221
|
+
# Find missing path attributes
|
|
222
|
+
grep -rn "<template[^>]*>" handbook/workflow-instructions/ | grep -v 'path='
|
|
223
|
+
grep -rn "<guide[^>]*>" handbook/workflow-instructions/ | grep -v 'path='
|
|
224
|
+
|
|
225
|
+
# Find mixed format usage (documents + legacy containers)
|
|
226
|
+
grep -r -l "<documents>" handbook/workflow-instructions/ | while read file; do
|
|
227
|
+
if grep -q "<templates>" "$file"; then
|
|
228
|
+
echo "Mixed format in: $file"
|
|
229
|
+
fi
|
|
230
|
+
done
|
|
231
|
+
|
|
232
|
+
# Reset and re-sync if needed
|
|
233
|
+
git checkout -- handbook/workflow-instructions/
|
|
234
|
+
handbook sync-templates --verbose
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Common Issues
|
|
238
|
+
|
|
239
|
+
#### Missing Source Files
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Check for broken references
|
|
243
|
+
handbook sync-templates --dry-run --verbose | grep "ERROR"
|
|
244
|
+
|
|
245
|
+
# Fix by creating missing files or updating paths
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
#### XML Format Errors
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Validate XML structure in workflow files
|
|
252
|
+
find handbook/workflow-instructions -name "*.wf.md" -exec xmllint --xpath "//documents" {} \; 2>/dev/null
|
|
253
|
+
|
|
254
|
+
# Look for common XML issues
|
|
255
|
+
grep -r "<documents>" handbook/workflow-instructions/ | grep -v -E "(</documents>|<!--)"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### Sync Failures
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Run with verbose output to identify issues
|
|
262
|
+
handbook sync-templates --dry-run --verbose
|
|
263
|
+
|
|
264
|
+
# Check file permissions
|
|
265
|
+
ls -la handbook/workflow-instructions/*.wf.md
|
|
266
|
+
|
|
267
|
+
# Verify Git status
|
|
268
|
+
git status handbook/workflow-instructions/
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Document Management Operations
|
|
272
|
+
|
|
273
|
+
### Adding New Templates
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# 1. Create template file
|
|
277
|
+
touch handbook/templates/new-category/new-template.template.md
|
|
278
|
+
|
|
279
|
+
# 2. Add content to template
|
|
280
|
+
|
|
281
|
+
# 3. Embed in workflow file using documents format
|
|
282
|
+
echo '<documents>
|
|
283
|
+
<template path="handbook/templates/new-category/new-template.template.md">
|
|
284
|
+
<!-- Content will be synced automatically -->
|
|
285
|
+
</template>
|
|
286
|
+
</documents>' >> workflow-file.wf.md
|
|
287
|
+
|
|
288
|
+
# 4. Run initial sync
|
|
289
|
+
handbook sync-templates --verbose
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Adding New Guides
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# 1. Create guide file
|
|
296
|
+
touch handbook/guides/new-guide.g.md
|
|
297
|
+
|
|
298
|
+
# 2. Add content to guide
|
|
299
|
+
|
|
300
|
+
# 3. Embed in workflow file using documents format
|
|
301
|
+
echo '<documents>
|
|
302
|
+
<guide path="handbook/guides/new-guide.g.md">
|
|
303
|
+
<!-- Content will be synced automatically -->
|
|
304
|
+
</guide>
|
|
305
|
+
</documents>' >> workflow-file.wf.md
|
|
306
|
+
|
|
307
|
+
# 4. Run initial sync
|
|
308
|
+
handbook sync-templates --verbose
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Removing Documents
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# 1. Remove embedded references from workflow files
|
|
315
|
+
grep -r "path=\"path/to/document\"" handbook/workflow-instructions/
|
|
316
|
+
|
|
317
|
+
# 2. Delete the source file
|
|
318
|
+
rm handbook/templates/path/to/template.template.md
|
|
319
|
+
# or
|
|
320
|
+
rm handbook/guides/path/to/guide.g.md
|
|
321
|
+
|
|
322
|
+
# 3. Verify no broken references remain
|
|
323
|
+
handbook sync-templates --dry-run --verbose
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Moving Documents
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# 1. Move the source file
|
|
330
|
+
mv handbook/templates/old/path.template.md handbook/templates/new/path.template.md
|
|
331
|
+
|
|
332
|
+
# 2. Update all embedded path references
|
|
333
|
+
grep -r "old/path.template.md" handbook/workflow-instructions/ | cut -d: -f1 | sort -u | while read file; do
|
|
334
|
+
sed -i 's|old/path.template.md|new/path.template.md|g' "$file"
|
|
335
|
+
done
|
|
336
|
+
|
|
337
|
+
# 3. Sync to update content
|
|
338
|
+
handbook sync-templates --verbose
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
## Directory Organization
|
|
342
|
+
|
|
343
|
+
### Template Directory Structure
|
|
344
|
+
|
|
345
|
+
Templates are organized by purpose and type:
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
handbook/templates/
|
|
349
|
+
├── code-docs/ # API and code documentation
|
|
350
|
+
│ ├── javascript-jsdoc.template.md
|
|
351
|
+
│ └── ruby-yard.template.md
|
|
352
|
+
├── project-docs/ # Core project documentation
|
|
353
|
+
│ ├── architecture.template.md
|
|
354
|
+
│ ├── blueprint.template.md
|
|
355
|
+
│ ├── decisions/
|
|
356
|
+
│ │ └── adr.template.md
|
|
357
|
+
│ ├── prd.template.md
|
|
358
|
+
│ └── vision.template.md
|
|
359
|
+
├── release-docs/ # Release documentation
|
|
360
|
+
│ └── documentation.template.md
|
|
361
|
+
├── release-management/ # Release planning and tracking
|
|
362
|
+
│ ├── changelog.template.md
|
|
363
|
+
│ └── release-overview.template.md
|
|
364
|
+
├── release-planning/ # Release preparation
|
|
365
|
+
│ └── release-readme.template.md
|
|
366
|
+
├── release-reflections/ # Post-release analysis
|
|
367
|
+
│ └── retrospective.template.md
|
|
368
|
+
├── release-tasks/ # Task templates
|
|
369
|
+
│ └── task.template.md
|
|
370
|
+
├── release-testing/ # Testing templates
|
|
371
|
+
│ └── test-case.template.md
|
|
372
|
+
├── session-management/ # Session and context templates
|
|
373
|
+
│ └── session-context.template.md
|
|
374
|
+
└── user-docs/ # User-facing documentation
|
|
375
|
+
└── user-guide.template.md
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Guide Directory Structure
|
|
379
|
+
|
|
380
|
+
Guides are organized by purpose and include `.g.md` extension:
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
handbook/guides/
|
|
384
|
+
├── development/ # Development practices
|
|
385
|
+
│ ├── testing.g.md
|
|
386
|
+
│ ├── code-review.g.md
|
|
387
|
+
│ └── debugging.g.md
|
|
388
|
+
├── project-management/ # Project management guides
|
|
389
|
+
│ ├── task-management.g.md
|
|
390
|
+
│ └── release-planning.g.md
|
|
391
|
+
├── documentation/ # Documentation standards
|
|
392
|
+
│ ├── writing-style.g.md
|
|
393
|
+
│ └── template-creation.g.md
|
|
394
|
+
└── workflows/ # Workflow-specific guides
|
|
395
|
+
├── git-workflow.g.md
|
|
396
|
+
└── deployment.g.md
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Naming Conventions
|
|
400
|
+
|
|
401
|
+
- **Template Extension**: All templates use `.template.md` extension
|
|
402
|
+
- **Guide Extension**: All guides use `.g.md` extension
|
|
403
|
+
- **Directory Names**: Descriptive, kebab-case names indicating purpose
|
|
404
|
+
- **File Names**: Clear, specific names without redundant type prefix
|
|
405
|
+
|
|
406
|
+
## Integration with Development Workflow
|
|
407
|
+
|
|
408
|
+
### Git Hooks Integration
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
# Pre-commit hook to ensure documents are synchronized
|
|
412
|
+
#!/bin/bash
|
|
413
|
+
# .git/hooks/pre-commit
|
|
414
|
+
|
|
415
|
+
echo "Checking document synchronization..."
|
|
416
|
+
if ! handbook sync-templates --dry-run --verbose; then
|
|
417
|
+
echo "❌ Documents out of sync. Run: handbook sync-templates --verbose"
|
|
418
|
+
exit 1
|
|
419
|
+
fi
|
|
420
|
+
echo "✅ Documents synchronized"
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### CI/CD Integration
|
|
424
|
+
|
|
425
|
+
```yaml
|
|
426
|
+
# GitHub Actions example
|
|
427
|
+
name: Document Sync Check
|
|
428
|
+
on: [push, pull_request]
|
|
429
|
+
|
|
430
|
+
jobs:
|
|
431
|
+
check-docs:
|
|
432
|
+
runs-on: ubuntu-latest
|
|
433
|
+
steps:
|
|
434
|
+
- uses: actions/checkout@v2
|
|
435
|
+
- name: Check document synchronization
|
|
436
|
+
run: |
|
|
437
|
+
handbook sync-templates --dry-run --verbose
|
|
438
|
+
if [ $? -ne 0 ]; then
|
|
439
|
+
echo "Documents need synchronization"
|
|
440
|
+
exit 1
|
|
441
|
+
fi
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
## Performance Considerations
|
|
445
|
+
|
|
446
|
+
### Large Document Sets
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
# Process specific directories only
|
|
450
|
+
handbook sync-templates --path handbook/workflow-instructions/specific-dir/
|
|
451
|
+
|
|
452
|
+
# Use dry-run for quick checks
|
|
453
|
+
handbook sync-templates --dry-run
|
|
454
|
+
|
|
455
|
+
# Parallelize for large repositories (advanced)
|
|
456
|
+
find handbook/workflow-instructions -name "*.wf.md" | xargs -P 4 -I {} handbook sync-templates --path {}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Optimization Tips
|
|
460
|
+
|
|
461
|
+
1. **Regular Sync**: Run synchronization regularly to catch issues early
|
|
462
|
+
2. **Dry-Run First**: Always preview changes before applying
|
|
463
|
+
3. **Focused Paths**: Use specific paths when working on subsets
|
|
464
|
+
4. **Batch Operations**: Group related document changes together
|
|
465
|
+
5. **Monitor Performance**: Use verbose output to identify slow operations
|
|
466
|
+
|
|
467
|
+
## Related Documentation
|
|
468
|
+
|
|
469
|
+
- [Documents Embedding Guide](handbook/guides/documents-embedding.g.md) - XML standards and principles
|
|
470
|
+
- [Workflow Instructions Organization](handbook/guides/workflow-instructions-organization.g.md) - Workflow structure
|
|
471
|
+
- [Template Creation Guide](handbook/guides/template-creation.g.md) - Creating new templates
|
|
472
|
+
|
|
473
|
+
This guide provides comprehensive coverage of the `handbook sync-templates` tool and related operational procedures for maintaining document synchronization across the development handbook system.
|