Skip to content

feat(codebase): expose wiki deep-enrich - #480

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
jimpablo:feat/360-codebase-deep-enrich
Sep 10, 2026
Merged

jeff-r2026 merged 1 commit into
Tencent:mainfrom
jimpablo:feat/360-codebase-deep-enrich

Conversation

@jimpablo

Copy link
Copy Markdown
Contributor

Summary

Expose the existing deep-enrich engine as teamai codebase --deep-enrich, so the bundled team-wiki-codebase skill can generate deep knowledge without the hidden top-level teamai deep-enrich command or an external team-wiki CLI.

The command uses the same teamwiki path rules as --lint / --reconcile (--output is the repository root → <repo>/teamwiki), requires --project <slug>, honors the global teamai --dry-run option, and writes the deterministic graph docs the engine already emits. Missing teamwiki, missing evidence, empty manifests, and path-escaping slugs fail with a non-zero exit instead of reporting success. English and Chinese CLI documentation are kept in sync.

This is slice 3 of #360. Extraction path controls, local-document compilation, and quality evaluation remain separate follow-ups.

Type of Change

  • Bug fix (non-breaking change that fixes an existing issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature causing existing behavior to change)
  • Documentation only
  • Refactor / internal cleanup

Test Plan

  • npx tsc --noEmit — clean
  • npx vitest run src/__tests__/codebase-deep-enrich.test.ts src/__tests__/index-codebase-help.test.ts src/__tests__/deep-enrich-graph-preserve.test.ts src/__tests__/team-wiki-codebase-skill.test.ts — 9/9 passed (AI client mocked; no live LLM)
  • npx vitest run — 214 files / 2959 tests passed
  • npm run build then built CLI: teamai codebase --help lists --deep-enrich
  • npx vitest run --config vitest.e2e.config.ts src/__tests__/e2e/codebase-extract-cli.test.ts — 5/5 passed (help + skill command + missing teamwiki exits 1; does not spawn a live enrich)
  • git diff --check — clean

CLI test report

Check Result
codebase --help lists --deep-enrich PASS
Skill documents `teamai codebase --deep-enrich --project <slug> --output <repo>` PASS
Missing teamwiki exits 1 PASS
Fixture with _manifest.json components writes docs/graph-g1-relations.md (and G2/G3) when AI is mocked PASS
Empty evidence does not report complete: true PASS
--dry-run previews without writing PASS
project: '..' is rejected PASS

Related Issues

Related to #360 (slice 3 only; does not close the full issue).

Notes for Reviewers

  • --output remains the repository root, with knowledge read from <repo>/teamwiki/.
  • --project <slug> is required and selects teamwiki/evidence/code/<slug>/.
  • Writing is the default. Use teamai --dry-run codebase --deep-enrich ... to preview without calling the engine.
  • The hidden teamai deep-enrich command is unchanged.
  • AI phases skip when the AI client errors; deterministic G1/G2/G3 docs are the observable success path.

Expose the existing deep-enrich engine as `teamai codebase --deep-enrich`,
so the bundled wiki skill can generate deep knowledge without the hidden
top-level command or a separate team-wiki CLI.

Related to Tencent#360 (slice 3; does not close the full issue).
@jeff-r2026
jeff-r2026 self-requested a review September 10, 2026 07:29
@jeff-r2026
jeff-r2026 merged commit 7259a85 into Tencent:main Sep 10, 2026
7 checks passed
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
…nrich

feat(codebase): expose wiki deep-enrich
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.

2 participants