Commit Graph
2 Commits
Author SHA1 Message Date
Andrew Hundt 74cbdadfab notes: add feature matrix with composability analysis and mermaid diagrams
Comprehensive feature matrix documenting:
- Branch availability for all 13 existing + new features
- Composability matrix showing how features interact when combined
- Detailed interaction table with justifications for each combination
- Strengths and limitations of each feature with specific measurements
- AI grounding 7-layer defense failure mode analysis
- Architecture diagram showing composable pipeline stages
- 5 generalizable design patterns extracted from the implementation

Key composability findings:
- summary mode overrides limit (uses 10K for accurate aggregation)
- signature mode overrides max_lines (no file I/O needed)
- compact applies independently at serialization stage
- include_dependencies composes with all token reduction features
- _result_bytes/_est_tokens always reflects final output size

Tests: 2064 passed, 0 failed
Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
2026-03-20 15:10:49 -04:00
Andrew Hundt 7626a5b14f mcp.c: OOM-safe guards + notes/ documentation with mermaid diagrams
OOM fixes (applied to both feature branches):
1. trace_call_path: calloc for seen_out/seen_in dedup arrays gracefully
   degrades on OOM — skips dedup instead of NULL-dereference crash
2. build_snippet_response: head_tail combined buffer malloc falls back
   to head-only output on OOM instead of NULL snprintf

Documentation (notes/ folder):
- notes/token-reduction-changes.md: 8 RTK-inspired strategies, config
  system, real-world results, mermaid architecture diagram
- notes/reference-api-indexing-changes.md: 7-layer AI grounding defense,
  QN prefix format, deferred work, mermaid flow diagram
- notes/merged-branch-changes.md: branch lineage gitGraph, combined
  architecture diagram, snippet mode decision flow, token reduction
  pipeline per tool, test coverage, merge conflict resolution

Tests: 2064 passed, 0 failed
Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
2026-03-20 14:30:46 -04:00