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.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/.ace-defaults/docs/config.yml +169 -0
  3. data/.ace-defaults/docs/multi-subject-example.md +130 -0
  4. data/.ace-defaults/docs/single-subject-example.md +150 -0
  5. data/.ace-defaults/nav/protocols/guide-sources/ace-docs.yml +10 -0
  6. data/.ace-defaults/nav/protocols/prompt-sources/ace-docs.yml +34 -0
  7. data/.ace-defaults/nav/protocols/tmpl-sources/ace-docs.yml +10 -0
  8. data/.ace-defaults/nav/protocols/wfi-sources/ace-docs.yml +19 -0
  9. data/CHANGELOG.md +1082 -0
  10. data/LICENSE +21 -0
  11. data/README.md +40 -0
  12. data/Rakefile +14 -0
  13. data/exe/ace-docs +14 -0
  14. data/handbook/guides/documentation/ruby.md +16 -0
  15. data/handbook/guides/documentation/rust.md +35 -0
  16. data/handbook/guides/documentation/typescript.md +18 -0
  17. data/handbook/guides/documentation.g.md +437 -0
  18. data/handbook/guides/documents-embedded-sync.g.md +473 -0
  19. data/handbook/guides/documents-embedding.g.md +276 -0
  20. data/handbook/guides/markdown-style.g.md +290 -0
  21. data/handbook/prompts/ace-change-analyzer.system.md +113 -0
  22. data/handbook/prompts/ace-change-analyzer.user.md +95 -0
  23. data/handbook/prompts/document-analysis.md +74 -0
  24. data/handbook/prompts/document-analysis.system.md +129 -0
  25. data/handbook/prompts/markdown-style.system.md +113 -0
  26. data/handbook/skills/as-docs-create-adr/SKILL.md +35 -0
  27. data/handbook/skills/as-docs-create-api/SKILL.md +35 -0
  28. data/handbook/skills/as-docs-create-user/SKILL.md +35 -0
  29. data/handbook/skills/as-docs-maintain-adrs/SKILL.md +35 -0
  30. data/handbook/skills/as-docs-squash-changelog/SKILL.md +42 -0
  31. data/handbook/skills/as-docs-update/SKILL.md +36 -0
  32. data/handbook/skills/as-docs-update-blueprint/SKILL.md +28 -0
  33. data/handbook/skills/as-docs-update-roadmap/SKILL.md +24 -0
  34. data/handbook/skills/as-docs-update-tools/SKILL.md +36 -0
  35. data/handbook/skills/as-docs-update-usage/SKILL.md +26 -0
  36. data/handbook/templates/code-docs/javascript-jsdoc.template.md +102 -0
  37. data/handbook/templates/code-docs/ruby-yard.template.md +85 -0
  38. data/handbook/templates/project-docs/README.template.md +73 -0
  39. data/handbook/templates/project-docs/architecture.template.md +300 -0
  40. data/handbook/templates/project-docs/blueprint.template.md +165 -0
  41. data/handbook/templates/project-docs/context/ownership.yml +160 -0
  42. data/handbook/templates/project-docs/decisions/adr.template.md +60 -0
  43. data/handbook/templates/project-docs/prd.template.md +144 -0
  44. data/handbook/templates/project-docs/roadmap/roadmap.template.md +47 -0
  45. data/handbook/templates/project-docs/vision.template.md +233 -0
  46. data/handbook/templates/user-docs/user-guide.template.md +107 -0
  47. data/handbook/workflow-instructions/docs/create-adr.wf.md +334 -0
  48. data/handbook/workflow-instructions/docs/create-api.wf.md +448 -0
  49. data/handbook/workflow-instructions/docs/create-cookbook.wf.md +434 -0
  50. data/handbook/workflow-instructions/docs/create-user.wf.md +399 -0
  51. data/handbook/workflow-instructions/docs/maintain-adrs.wf.md +589 -0
  52. data/handbook/workflow-instructions/docs/squash-changelog.wf.md +246 -0
  53. data/handbook/workflow-instructions/docs/update-blueprint.wf.md +361 -0
  54. data/handbook/workflow-instructions/docs/update-context.wf.md +336 -0
  55. data/handbook/workflow-instructions/docs/update-roadmap.wf.md +421 -0
  56. data/handbook/workflow-instructions/docs/update-tools.wf.md +307 -0
  57. data/handbook/workflow-instructions/docs/update-usage.wf.md +710 -0
  58. data/handbook/workflow-instructions/docs/update.wf.md +418 -0
  59. data/lib/ace/docs/atoms/diff_filterer.rb +131 -0
  60. data/lib/ace/docs/atoms/frontmatter_free_matcher.rb +20 -0
  61. data/lib/ace/docs/atoms/git_date_resolver.rb +16 -0
  62. data/lib/ace/docs/atoms/readme_metadata_inferrer.rb +60 -0
  63. data/lib/ace/docs/atoms/terminology_extractor.rb +308 -0
  64. data/lib/ace/docs/atoms/time_range_calculator.rb +96 -0
  65. data/lib/ace/docs/atoms/timestamp_parser.rb +106 -0
  66. data/lib/ace/docs/atoms/type_inferrer.rb +70 -0
  67. data/lib/ace/docs/cli/commands/analyze.rb +351 -0
  68. data/lib/ace/docs/cli/commands/analyze_consistency.rb +185 -0
  69. data/lib/ace/docs/cli/commands/discover.rb +75 -0
  70. data/lib/ace/docs/cli/commands/scope_options.rb +71 -0
  71. data/lib/ace/docs/cli/commands/status.rb +241 -0
  72. data/lib/ace/docs/cli/commands/update.rb +198 -0
  73. data/lib/ace/docs/cli/commands/validate.rb +225 -0
  74. data/lib/ace/docs/cli.rb +60 -0
  75. data/lib/ace/docs/models/analysis_report.rb +120 -0
  76. data/lib/ace/docs/models/consistency_report.rb +259 -0
  77. data/lib/ace/docs/models/document.rb +354 -0
  78. data/lib/ace/docs/molecules/change_detector.rb +389 -0
  79. data/lib/ace/docs/molecules/document_loader.rb +133 -0
  80. data/lib/ace/docs/molecules/frontmatter_manager.rb +85 -0
  81. data/lib/ace/docs/molecules/git_date_resolver.rb +30 -0
  82. data/lib/ace/docs/organisms/cross_document_analyzer.rb +274 -0
  83. data/lib/ace/docs/organisms/document_registry.rb +318 -0
  84. data/lib/ace/docs/organisms/validator.rb +164 -0
  85. data/lib/ace/docs/prompts/compact_diff_prompt.rb +119 -0
  86. data/lib/ace/docs/prompts/consistency_prompt.rb +286 -0
  87. data/lib/ace/docs/prompts/document_analysis_prompt.rb +389 -0
  88. data/lib/ace/docs/version.rb +7 -0
  89. data/lib/ace/docs.rb +82 -0
  90. data/lib/test.rb +4 -0
  91. metadata +347 -0
@@ -0,0 +1,336 @@
1
+ ---
2
+ doc-type: workflow
3
+ title: "Workflow Instruction: Update Context Documents"
4
+ purpose: Documentation for ace-docs/handbook/workflow-instructions/docs/update-context.wf.md
5
+ ace-docs:
6
+ last-updated: 2026-02-23
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # Workflow Instruction: Update Context Documents
11
+
12
+ **Goal:** Analyze repository changes and update the core context documents ensuring they remain accurate, focused, and
13
+ free of duplication.
14
+
15
+ > **Note:** This workflow can now be enhanced with the `ace-docs` tool for automated document management. See
16
+ > `wfi://docs/update` for the tooling-based approach. Use `/update-docs` command
17
+ > for the automated workflow.
18
+
19
+ ## Prerequisites
20
+
21
+ * Write access to context documents in `docs/` directory
22
+ * Understanding of each document's specific purpose
23
+ * Access to Git for analyzing changes
24
+
25
+ ## Project Context Loading
26
+
27
+ * Read and follow: `ace-bundle wfi://bundle`
28
+
29
+ ## Core Context Documents
30
+
31
+ This workflow maintains five essential project documents, each with a distinct purpose.
32
+
33
+ **IMPORTANT: Update documents in this exact order to prevent duplication:**
34
+
35
+ 1. **`docs/vision.md`** - Vision, Philosophy & Goals (UPDATE FIRST)
36
+ * Project vision and philosophy
37
+ * Core principles (Same Environment, DX/AX, Config Without Lock-In, Distribution Without Friction)
38
+ * Current capabilities with workflow examples
39
+ * Architecture patterns overview **Target**: ~600 lines (comprehensive after consolidation)
40
+ **MUST NOT CONTAIN:**
41
+
42
+ * Detailed directory structures (in blueprint.md)
43
+ * Full ADR content (in decisions/)
44
+ * Step-by-step setup instructions
45
+ 2. **`docs/blueprint.md`** - Navigation Guide (UPDATE SECOND)
46
+ * Simple top-level directory list
47
+ * Read-only paths for AI agents
48
+ * Ignored paths for normal operations **Target**: ~50 lines
49
+ **MUST NOT CONTAIN:**
50
+
51
+ * Project vision or goals (in vision.md)
52
+ * Architecture patterns or decisions
53
+ * Tool usage instructions
54
+ * References to `git ls-files` or `eza`
55
+ * Detailed file listings
56
+ 3. **`docs/architecture.md`** - Technical Design (UPDATE THIRD)
57
+ * ATOM architecture pattern
58
+ * Component types (tools, workflows, agents, guides)
59
+ * Key architectural decisions with ADR references
60
+ * AI integration architecture
61
+ * Reference to blueprint.md for file structure **Target**: ~150 lines
62
+ **MUST NOT CONTAIN:**
63
+
64
+ * Project vision (in vision.md)
65
+ * Directory trees (in blueprint.md)
66
+ * Setup instructions (move to mise tasks)
67
+ * Tool usage examples
68
+ * Performance metrics or implementation details
69
+ 4. **`docs/tools.md`** - Command Reference (UPDATE FOURTH)
70
+ * Current tools only with practical examples
71
+ * Brief usage examples (2-4 per tool)
72
+ * Table of available commands **Target**: ~30 lines
73
+ **MUST NOT CONTAIN:**
74
+
75
+ * Future/planned tools (in vision.md)
76
+ * Architecture explanations (in architecture.md)
77
+ * Setup instructions
78
+ * Configuration details
79
+ 5. **`docs/decisions.md`** - Actionable Decisions (UPDATE LAST)
80
+ * Condensed, actionable decisions from ADRs
81
+ * Behavioral impacts for AI agents and developers
82
+ * Links to full ADR documents
83
+ **MUST NOT CONTAIN:**
84
+
85
+ * Content from any previous document
86
+ * Full ADR content
87
+ * Implementation details
88
+
89
+ ## Process Steps
90
+
91
+ ### 0. Load Ownership Model
92
+
93
+ Check if ownership model exists and load it for validation:
94
+
95
+ # Load ownership rules
96
+ ownership_file="docs/context/ownership.yml"
97
+ if [[ -f "$ownership_file" ]]; then
98
+ echo "Ownership model found, will validate against it"
99
+ fi
100
+ {: .language-bash}
101
+
102
+ ### 1. Analyze Repository Changes
103
+
104
+ **Option A: Review Recent Changes**
105
+
106
+ # Check recent commits
107
+ git log --oneline -20
108
+
109
+ # View detailed changes
110
+ git diff HEAD~5..HEAD --stat
111
+
112
+ # Examine specific file changes
113
+ git diff HEAD~5..HEAD -- <path>
114
+ {: .language-bash}
115
+
116
+ **Option B: Full Repository Analysis**
117
+
118
+ * Review major directories for structural changes
119
+ * Check for new features or components
120
+ * Identify architectural modifications
121
+ * Scan for new or updated ADRs in `docs/decisions/`
122
+
123
+ ### 2. Load Current Context Documents
124
+
125
+ Read each document to understand current state:
126
+
127
+ * `docs/vision.md`
128
+ * `docs/blueprint.md`
129
+ * `docs/architecture.md`
130
+ * `docs/tools.md`
131
+ * `docs/decisions.md` (if exists)
132
+
133
+ ### 3. Identify Required Updates
134
+
135
+ Based on repository analysis, determine updates needed for each document:
136
+
137
+ | Change Type | Affected Documents |
138
+ |----------
139
+ | New features/capabilities | vision.md |
140
+ | Directory/file reorganization | blueprint.md |
141
+ | Architecture/design changes | architecture.md |
142
+ | New tools or commands | tools.md |
143
+ | New ADRs or decisions | decisions.md |
144
+ | Technology stack updates | architecture.md |
145
+ | Build/setup changes | Remove from docs, create mise task |
146
+
147
+ ### 4. Update vision.md (FIRST)
148
+
149
+ This is the comprehensive vision document (after consolidation of philosophy + what-do-we-build):
150
+
151
+ * Project vision and philosophy
152
+ * Core principles with explanations
153
+ * Current capabilities with workflow examples
154
+ * Architecture patterns overview
155
+
156
+ **Ensure:**
157
+
158
+ * Principles are clearly articulated
159
+ * Workflow examples demonstrate real usage
160
+ * Cross-references to other docs where appropriate
161
+ * Target: ~600 lines (comprehensive document)
162
+
163
+ ### 5. Update blueprint.md (SECOND)
164
+
165
+ Navigation guidance only:
166
+
167
+ * Simple top-level directory list
168
+ * Read-only paths
169
+ * Ignored paths
170
+
171
+ **Check against vision.md:**
172
+
173
+ * Remove any duplicated content
174
+ * Keep under 50 lines total
175
+
176
+ ### 6. Update architecture.md (THIRD)
177
+
178
+ Focus on patterns and decisions:
179
+
180
+ * ATOM architecture explanation
181
+ * Component types
182
+ * Key architectural decisions
183
+ * AI integration patterns
184
+
185
+ **Check against previous documents:**
186
+
187
+ * Remove any content from vision.md
188
+ * Remove any content from blueprint.md
189
+ * Reference blueprint.md for structure
190
+ * Keep under 150 lines total
191
+
192
+ ### 7. Update tools.md (FOURTH)
193
+
194
+ Current tools only:
195
+
196
+ * Table of available commands
197
+ * 2-4 practical examples per tool
198
+ * No future/planned tools
199
+
200
+ **Check against previous documents:**
201
+
202
+ * Remove any content covered in previous docs
203
+ * Keep under 30 lines total
204
+
205
+ ### 8. Generate/Update decisions.md (LAST)
206
+
207
+ Extract actionable decisions from ADRs:
208
+
209
+ # List all ADR files
210
+ ls -la docs/decisions/ADR-*.md
211
+ {: .language-bash}
212
+
213
+ For each ADR, extract:
214
+
215
+ 1. **Core Decision**: The actual rule or decision made
216
+ 2. **Behavioral Impact**: How this affects development/agent behavior
217
+ 3. **Reference**: Link to full ADR document
218
+
219
+ Format each decision as:
220
+
221
+ ### [Decision Title]
222
+ **Decision**: [Concise statement of what must be done]
223
+ **Impact**: [How this affects behavior/development]
224
+ **Details**: [ADR-XXX](decisions/ADR-XXX-title.md)
225
+ {: .language-markdown}
226
+
227
+ ### 9. Eliminate Duplication
228
+
229
+ **Critical: Check each document against all previous ones:**
230
+
231
+ * No content should appear in multiple documents
232
+ * Use cross-references instead of repeating
233
+ * Later documents must not duplicate earlier ones
234
+ * Each document must serve its distinct purpose
235
+
236
+ ### 10. Validate Updates
237
+
238
+ Verify each document:
239
+
240
+ * vision.md is comprehensive with philosophy, principles, and workflow examples (~600 lines)
241
+ * blueprint.md has navigation guidance only (~50 lines)
242
+ * architecture.md focuses on patterns/decisions (~150 lines)
243
+ * tools.md has current tools only (~30 lines)
244
+ * decisions.md contains actionable ADR summaries
245
+ * NO content is duplicated across documents
246
+ * Update order was followed: vision → blueprint → architecture → tools → decisions
247
+
248
+
249
+ ### 11. Run Ownership Validation
250
+
251
+ If ownership model exists, validate all documents:
252
+
253
+ # Run validation script
254
+ if [[ -f "$ownership_file" ]]; then
255
+ validate-context --preset project
256
+ if [ $? -eq 0 ]; then
257
+ echo "✅ All documents comply with ownership model"
258
+ else
259
+ echo "❌ Ownership violations detected - review and fix"
260
+ fi
261
+ fi
262
+ {: .language-bash}
263
+
264
+ ### 12. Commit Changes
265
+
266
+ Create atomic commits for each document (in update order):
267
+
268
+ git add docs/vision.md
269
+ git commit -m "docs: update project vision and features"
270
+
271
+ git add docs/blueprint.md
272
+ git commit -m "docs: update navigation and restrictions"
273
+
274
+ git add docs/architecture.md
275
+ git commit -m "docs: update technical architecture"
276
+
277
+ git add docs/tools.md
278
+ git commit -m "docs: update command reference"
279
+
280
+ git add docs/decisions.md
281
+ git commit -m "docs: update actionable decisions from ADRs"
282
+ {: .language-bash}
283
+
284
+ ## Success Criteria
285
+
286
+ * All five context documents are current and accurate
287
+ * Documents are compact: vision (~600), blueprint (~50), architecture (~150), tools (~30)
288
+ * Update order was followed: vision → blueprint → architecture → tools → decisions
289
+ * NO duplication exists between documents
290
+ * Each document maintains its specific focus
291
+ * Changes are committed with clear messages
292
+
293
+ ## Common Patterns
294
+
295
+ ### Adding a New Feature
296
+
297
+ 1. Update vision.md with high-level feature description
298
+ 2. Update architecture.md if it introduces new technical patterns
299
+ 3. Update blueprint.md if new directories/files were added
300
+
301
+ ### New Architecture Decision
302
+
303
+ 1. Scan docs/decisions/ for new ADR files
304
+ 2. Extract the core decision and its impact
305
+ 3. Add to decisions.md with proper formatting
306
+
307
+ ### Directory Reorganization
308
+
309
+ 1. Update blueprint.md with new structure
310
+ 2. Update architecture.md if it affects system design
311
+ 3. Check if changes reflect completed roadmap items
312
+
313
+ ## Error Handling
314
+
315
+ **Missing Documents:**
316
+
317
+ * Create missing documents using appropriate templates
318
+ * Focus on extracting relevant information from existing files
319
+
320
+ **Conflicting Information:**
321
+
322
+ * Identify source of truth (usually the code itself)
323
+ * Update all documents to reflect correct state
324
+ * Note conflicts in commit messages
325
+
326
+ **Large Changes:**
327
+
328
+ * Break updates into logical sections
329
+ * Create separate commits for major changes
330
+ * Consider updating documents incrementally
331
+
332
+ * * *
333
+
334
+ This workflow ensures the core context documents remain accurate, focused, and valuable for both human developers and AI
335
+ agents navigating the project.
336
+