feat: add knowledge gap identifier for code/docs/tests cross-reference (#172) #182

Closed
Rockachopa wants to merge 1 commits from burn/172-1776218600 into main
Owner

Closes #172.

Pipeline 10.7 — Knowledge Gap Identifier: cross-references code, docs, and tests to find gaps.

What it finds:

  • Undocumented: functions/classes in source not mentioned in any .md doc
  • Untested: source modules without a corresponding test file
  • Missing Implementation: symbols referenced in docs but not found in source
  • Orphan Tests: test files without a matching source module

API:

from knowledge_gap_identifier import KnowledgeGapIdentifier
report = KnowledgeGapIdentifier().analyze("/path/to/repo")
print(report.summary())      # Human-readable
print(report.to_dict())      # JSON-serializable

Gap types with severity:

  • UNDOCUMENTED (warning): public symbol not in any doc
  • UNTESTED (error): source module with no test file
  • MISSING_IMPLEMENTATION (info): doc references non-existent code
  • ORPHAN_TEST (warning): test file without matching source

Design:

  • AST-based symbol extraction (Python)
  • Markdown backtick/heading parsing for doc references
  • Private symbols (_name) skipped
  • Config files (setup.py, conftest.py) excluded
  • Test files not flagged as undocumented source

Tests: 10 tests covering all gap types, positive/negative cases, edge cases (empty repo, invalid path, private symbols).

Verification:

  • python3 tests/test_knowledge_gap_identifier.py (10/10 pass)
  • python3 -m pytest tests/test_knowledge_gap_identifier.py -v (10/10 pass)
Closes #172. Pipeline 10.7 — Knowledge Gap Identifier: cross-references code, docs, and tests to find gaps. **What it finds:** - **Undocumented**: functions/classes in source not mentioned in any .md doc - **Untested**: source modules without a corresponding test file - **Missing Implementation**: symbols referenced in docs but not found in source - **Orphan Tests**: test files without a matching source module **API:** ```python from knowledge_gap_identifier import KnowledgeGapIdentifier report = KnowledgeGapIdentifier().analyze("/path/to/repo") print(report.summary()) # Human-readable print(report.to_dict()) # JSON-serializable ``` **Gap types with severity:** - `UNDOCUMENTED` (warning): public symbol not in any doc - `UNTESTED` (error): source module with no test file - `MISSING_IMPLEMENTATION` (info): doc references non-existent code - `ORPHAN_TEST` (warning): test file without matching source **Design:** - AST-based symbol extraction (Python) - Markdown backtick/heading parsing for doc references - Private symbols (`_name`) skipped - Config files (setup.py, conftest.py) excluded - Test files not flagged as undocumented source **Tests:** 10 tests covering all gap types, positive/negative cases, edge cases (empty repo, invalid path, private symbols). **Verification:** - `python3 tests/test_knowledge_gap_identifier.py` (10/10 pass) - `python3 -m pytest tests/test_knowledge_gap_identifier.py -v` (10/10 pass)
Rockachopa added 1 commit 2026-04-15 03:47:40 +00:00
Timmy approved these changes 2026-04-15 04:13:16 +00:00
Timmy left a comment
Owner

Feature implementation reviewed - looks solid.

Scope: 2 file(s) changed (416+ / 0-)

Suggestions

  • Found 1 TODO/FIXME/HACK comment(s) - consider creating issues for tracking.
Feature implementation reviewed - looks solid. **Scope**: 2 file(s) changed (416+ / 0-) ### Suggestions - Found 1 TODO/FIXME/HACK comment(s) - consider creating issues for tracking.
Author
Owner

Superseded by burn/172-1776263893.

Superseded by burn/172-1776263893.
Rockachopa closed this pull request 2026-04-15 14:43:18 +00:00

Pull request closed

Sign in to join this conversation.