grow
Automatically reviews and improves the knowledge base. Identifies stale docs, missing cross-references, category misplacements, formatting issues, and knowledge gaps. Designed to run as a scheduled task for continuous self-improvement.
Knowledge Base Self-Improvement
Review the entire knowledge base and make it better. This skill is designed to run automatically on a schedule so the KB improves over time without manual effort.
Process
Step 1: Inventory
Call list_documents to get all documents. For each document, call read_document to load its content and metadata.
Step 2: Analyze
For each document, check:
-
Staleness — Is the
modifieddate very old? Does the content reference outdated tools, deprecated APIs, or resolved issues? If so, flag it. -
Category placement — Does the document belong in its current folder?
decisions/should contain decision records with rationalearchitecture/should contain system design docsprocesses/should contain how-to guides and runbooksmeeting-notes/should contain meeting summariescontext/should contain reference material- If misplaced, move it (delete old path, write to new path).
-
Cross-references — Does this document mention topics covered by other documents? If so, add a
## Related Documentssection with[[doc-name]]wiki-links. Check therelatedDocumentsfrontmatter field too. -
Formatting — Is there a single H1 title? Logical H2/H3 hierarchy? Consistent markdown style? Clean up if needed.
-
Completeness — Are there TODOs, placeholders, or obviously incomplete sections? Flag these.
Step 3: Identify Gaps
After reading all documents, consider what's missing:
- Are there documents that reference concepts with no corresponding doc?
- Are there obvious topics (based on existing content) that should have documentation but don't?
- Create stub documents for critical gaps with a
TODO: flesh out this documentnote.
Step 4: Execute Improvements
For each improvement:
- Formatting fixes, cross-references, category moves: Apply directly via
write_document(anddelete_documentfor moves). These are safe, non-destructive improvements. - Content updates to stale docs: Write the update. Mark
aiProcessedtimestamp. - New stub docs for gaps: Create with clear TODO markers.
- Significant content changes: Note these in a summary document at
context/kb-improvement-log.mdso the team can review what changed.
Step 5: Run /process-kb
After all improvements, run the process-kb skill to normalize formatting and ensure cross-references are consistent across all documents.
Document Style
When improving or creating documents, follow these principles:
- Fewer, larger documents — Merge related small docs into comprehensive ones. One thorough doc per topic is better than 5 stubs.
- Rich prose over bullet points — Write in full sentences and paragraphs. Bullet lists are fine for genuinely list-like data (tool inventories, settings) but most content should be narrative.
- Clear H2/H3 headers — Each H2 becomes a semantic search chunk in Bedrock. Use descriptive headers like "Conflict Resolution Flow" not just "Conflicts".
- Include rationale — Explain "why", not just "what". Context helps both humans and AI understand intent.
- Target 1,000–3,000 words — Short docs (< 300 words) produce weak embeddings. Merge them into parent docs.
General Guidelines
- Never delete user content — only reorganize, enhance, and add to it
- Quality over quantity — a few meaningful improvements are better than touching every file
- Log what you did — append a summary to
context/kb-improvement-log.mdwith the date and list of changes - Be conservative with content changes — formatting and cross-refs are safe; changing meaning requires care