From laravel-api-tool-kit
Consolidates scattered investigation docs, notes, and findings into feature-specific knowledge files, merging classified content without duplicates and deleting originals.
How this command is triggered — by the user, by Claude, or both
Slash command
/laravel-api-tool-kit:organize-knowledgelaravel-api-tool-kit/workflows/The summary Claude sees in its command listing — used to decide when to auto-load this command
# Workflow: Organize Knowledge Base Consolidates scattered investigation docs, notes, and findings into the correct knowledge files. Prevents knowledge sprawl and ensures ONE file per feature. **Trigger phrases**: "organize knowledge", "consolidate docs", "clean up knowledge", `/organize-knowledge` --- ## The Problem This Solves Over time, investigations produce scattered files: - `INVESTIGATION_ORDER_BUG.md` - `FIX_WALLET_ISSUE.md` - `NOTES_ON_CACHE_PROBLEM.md` - Duplicate findings across multiple files This workflow consolidates everything into the correct `knowledge/[FEATURE].md` f...
Consolidates scattered investigation docs, notes, and findings into the correct knowledge files. Prevents knowledge sprawl and ensures ONE file per feature.
Trigger phrases: "organize knowledge", "consolidate docs", "clean up knowledge", /organize-knowledge
Over time, investigations produce scattered files:
INVESTIGATION_ORDER_BUG.mdFIX_WALLET_ISSUE.mdNOTES_ON_CACHE_PROBLEM.mdThis workflow consolidates everything into the correct knowledge/[FEATURE].md file — one file per feature, not one file per ticket.
Search for investigation artifacts that should be consolidated:
*_INVESTIGATION.md
INVESTIGATION_*.md
*_FIX.md
*_NOTES.md
*_DEBUG.md
*_FINDINGS.md
Also check:
knowledge/ for files that overlap in topic.claude/knowledge/, .agent/knowledge/, or knowledge/ for orphaned docsFor each scattered doc, determine which feature it belongs to:
| Doc | Feature Area | Target File |
|---|---|---|
INVESTIGATION_ORDER_BUG.md | Orders | knowledge/orders.md |
FIX_WALLET_ISSUE.md | Wallet | knowledge/wallet.md |
CACHE_NOTES.md | General | rules/anti-patterns.md or knowledge/caching.md |
Rules:
knowledge/_TEMPLATE.mdrules/*.md fileFrom each scattered doc, extract:
| Finding Type | Goes Into |
|---|---|
| Root cause of a bug | Knowledge file → "Issues Found & Fixed" |
| Diagnostic query that was useful | Knowledge file → "Diagnostic Queries" |
| Lesson / pattern discovered | Knowledge file → "Key Lessons" |
| DB column type gotcha | Knowledge file → "DB Gotchas" |
| General coding rule | rules/code-quality.md or closest rule file |
| Anti-pattern with wrong/correct | rules/anti-patterns.md |
Convert narrative to directive:
For each target knowledge file:
For new knowledge files:
knowledge/_TEMPLATE.md → knowledge/[feature].mdAfter merging:
knowledge/_archived/ directory firstConsolidated 4 scattered docs into knowledge files:
knowledge/orders.md (created):
→ Merged INVESTIGATION_ORDER_BUG.md (root cause + 2 queries)
→ Merged ORDER_NOTES.md (3 lessons)
knowledge/wallet.md (updated):
→ Merged FIX_WALLET_ISSUE.md (1 issue + 1 gotcha)
rules/anti-patterns.md (updated):
→ Added: NEVER skip currency_id in wallet queries
Deleted: INVESTIGATION_ORDER_BUG.md, ORDER_NOTES.md, FIX_WALLET_ISSUE.md
❌ Multiple knowledge files for the same feature (orders_investigation.md AND orders_bugs.md)
❌ Keeping session-specific IDs in consolidated docs
❌ Narrative prose ("On Tuesday we found...") — use directives
❌ Creating a knowledge file when a rules/*.md file is the right home
❌ Leaving scattered docs after consolidating (creates confusion about which is authoritative)
✅ ONE file per feature area
✅ Directive format: "When X → check Y"
✅ Generic placeholders: ORDER_ID, USER_ID
✅ Delete originals after merging
npx claudepluginhub ahmedesa/laravel-api-tool-kit/merge-docsConsolidates ephemeral LLM-generated markdown reports into permanent documentation. Scans repo or specific files, supports --scan-only dry-run and --docs-dir option.
/import-knowledgeImports external knowledge from URL, file, or text into project's Memory Bank after semantic analysis, categorization into guides/workflows/patterns/commands/skills, similarity check, and user confirmation.
/compoundDocuments a recently solved problem via parallel subagents, assembling a single structured Markdown file with YAML frontmatter in docs/solutions/.
/transferScans recent .living/learnings.md entries across all subprojects, identifies actionable knowledge transfers, and automatically appends them to target projects' learnings files. Produces an audit report.
/flow-docsRuns Flow project documentation lifecycle: validate quality gates, capture knowledge from PRDs, archive completed items, cleanup artifacts, or full cycle. Produces reports and updated knowledge base.