Skip to content

feat(wiki-engine): vendor deterministic extraction modules#50

Closed
m0Nst3r873 wants to merge 3 commits into
Tencent:mainfrom
m0Nst3r873:feat/wiki-engine-vendor
Closed

feat(wiki-engine): vendor deterministic extraction modules#50
m0Nst3r873 wants to merge 3 commits into
Tencent:mainfrom
m0Nst3r873:feat/wiki-engine-vendor

Conversation

@m0Nst3r873

Copy link
Copy Markdown
Contributor

Summary

  • Vendor interface-scanner (HTTP/MQ/RPC detection, 5 languages)
  • Vendor call-chain-tracer (4-layer entry→data tracing)
  • Vendor code-graph-overlay (directory-level CONTAINS edges)
  • Vendor doc-graph-extractor (API/config/error nodes from docs)
  • Vendor manifest-schema V2 (entrypoints, responsibilities)
  • Integrate into codebase-extract.ts pipeline

7 files, +931 lines. Pure deterministic code, no AI dependency.

Test plan

  • npx tsc --noEmit
  • npx vitest run (1470 passed)
  • teamai codebase --extract . produces interfaces.md + call-chains.md

m0Nst3r873 pushed a commit to m0Nst3r873/teamai-cli that referenced this pull request Jun 26, 2026
39 new tests covering PR Tencent#50 modules:

- interface-scanner: HTTP/MQ/RPC detection across 5 languages (12 tests)
- call-chain-tracer: entry detection, layer classification, depth limit (8 tests)
- code-graph-overlay: buildIndexHubOverlay node/edge generation (5 tests)
- doc-graph-extractor: structure + entity extraction (8 tests)
- hook-output: formatStopHookOutput multi-tool format (6 tests)

All tests use in-memory data, no filesystem/network dependencies.
m0Nst3r873 pushed a commit to m0Nst3r873/teamai-cli that referenced this pull request Jun 26, 2026
39 new tests covering PR Tencent#50 modules:

- interface-scanner: HTTP/MQ/RPC detection across 5 languages (12 tests)
- call-chain-tracer: entry detection, layer classification, depth limit (8 tests)
- code-graph-overlay: buildIndexHubOverlay node/edge generation (5 tests)
- doc-graph-extractor: structure + entity extraction (8 tests)
- hook-output: formatStopHookOutput multi-tool format (6 tests)

All tests use in-memory data, no filesystem/network dependencies.
@m0Nst3r873 m0Nst3r873 force-pushed the feat/wiki-engine-vendor branch 2 times, most recently from 8edd908 to f1d9380 Compare June 26, 2026 03:36
jaelgeng added 3 commits June 26, 2026 11:36
Vendored from team-wiki by @lurkacai (git.woa.com/lurkacai/team-wiki).
Import paths adjusted for teamai-cli project structure.

Files copied (all pure deterministic, no AI dependency):
- core/graph-index.schema.ts: graph node/edge types, merge, save/load
- core/wiki-protocol.ts: wiki category/confidence types, slugify
- code-knowledge/code-collector.ts: file collection with git-aware filtering
- code-knowledge/code-extractors.ts: multi-language fact extraction dispatch
- code-knowledge/code-graph.ts: build CodeGraphIndex from facts
- code-knowledge/code-incremental.ts: detect changed files via manifest
- code-knowledge/extractors/*: TS/Python/Go/Java/Rust/Config extractors
- interface-scanner.ts: HTTP/MQ/RPC endpoint detection (5 languages)
- call-chain-tracer.ts: 4-layer call chain tracing
- code-graph-overlay.ts: directory-level architecture nodes
- doc-graph-extractor.ts: extract API/config/error nodes from docs
- manifest-schema.ts: V2 manifest types (entrypoints, responsibilities)
Wire up vendored modules into the teamai extraction flow:

- adapters/index.ts: unified export layer for all wiki-engine modules
- adapters/templates.ts: router.md + index.md generation templates
- codebase-extract.ts: full extraction pipeline
  collectCode → extractCodeFacts → scanInterfaces → traceCallChains
  → buildEvidencePages (interfaces.md + call-chains.md)
  → buildIndexHubOverlay → mergedGraph → graph-index.json
  → buildModuleSummaries → detectKnowledgeGaps → router/index/hot/gaps
- utils/hook-output.ts: multi-tool Stop hook output formatting
- interface-scanner: HTTP/MQ/RPC detection across languages (12 tests)
- call-chain-tracer: entry detection, layer classification (8 tests)
- code-graph-overlay: buildIndexHubOverlay node/edge generation (5 tests)
- doc-graph-extractor: structure + entity extraction (8 tests)
- hook-output: formatStopHookOutput multi-tool format (6 tests)

All tests use in-memory data, no filesystem/network dependencies.
@m0Nst3r873 m0Nst3r873 force-pushed the feat/wiki-engine-vendor branch from f1d9380 to 212baab Compare June 26, 2026 03:37
@m0Nst3r873 m0Nst3r873 closed this Jun 26, 2026
@m0Nst3r873

Copy link
Copy Markdown
Contributor Author

Closing in favor of restructured PRs with bug fixes. The code has been reorganized into functionally-complete PRs where each PR includes its CLI entry point (no dead code). See the new PR series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant