Skip to content

Conversation

@dimaMachina
Copy link
Collaborator

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: c651266

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@inkeep/agents-core Major
@inkeep/agents-sdk Major
@inkeep/agents-api Major
@inkeep/agents-cli Major
@inkeep/agents-manage-ui Major
@inkeep/ai-sdk-provider Major
@inkeep/create-agents Major
@inkeep/agents-manage-mcp Major
@inkeep/agents-mcp Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
agents-api Ready Ready Preview, Comment Jan 28, 2026 8:22am
agents-docs Ready Ready Preview, Comment Jan 28, 2026 8:22am
agents-manage-ui Ready Ready Preview, Comment Jan 28, 2026 8:22am

Request Review

@claude
Copy link

claude bot commented Jan 27, 2026

Claude finished @dimaMachina's task —— View job


Code Review: Remove unused files

Todo List

  • Examine repository structure and understand codebase context
  • Analyze each deleted file for potential impacts
  • Review the new knip.config.ts configuration
  • Evaluate the major version bump strategy in changeset
  • Check for missing considerations or side effects
  • Provide comprehensive review feedback

Review Summary

This PR removes several unused files and adds tooling to detect unused code in the future. The changes are generally well-considered, but there are several important concerns that need attention.

🚨 Critical Issues

1. Breaking Change to agents-cli vitest configuration

agents-cli/vitest.config.ts:2 imports the deleted vitest.config.ci.ts file:

import vitestCIConfig from './vitest.config.ci';

Impact: This will cause the agents-cli package to fail to run tests, breaking CI/CD pipelines.

Recommendation: Update the vitest config to handle the missing CI config or provide an alternative solution.

2. Changeset Version Strategy Mismatch

The changeset in .changeset/neat-lies-attend.md uses minor bumps for file removals:

"@inkeep/agents-sdk": minor
"@inkeep/agents-api": minor  
"@inkeep/agents-cli": minor

Issue: According to the repo's CLAUDE.md semver guidelines:

  • Minor: Schema changes requiring migration, significant behavior changes
  • Patch: Bug fixes, additive features, non-breaking changes

Recommendation: File cleanup should be patch level unless removing files constitutes a breaking API change. The CLAUDE.md guidance states: "Major: Reserved - do not use without explicit approval" and typically file removals (if truly unused) should be patch-level changes.

⚠️ Moderate Concerns

3. Coverage Script Reference Still Exists

package.json:23 still references generate-badges.mjs which was deleted:

"coverage:badges": "node scripts/generate-badges.mjs"

Impact: Coverage workflow will fail when trying to generate badges.

Options:

  • Remove the script reference entirely if badges are no longer needed
  • Replace with an alternative badge generation solution
  • Keep a simplified version if badges are still required

4. Knip Configuration Scope

The new knip.config.ts has extensive ignore rules but may be missing some validation:

Considerations:

  • Large ignore list (30+ entries) may hide legitimate unused code issues
  • Consider whether some ignored paths could be cleaned up instead
  • The config looks comprehensive but should be validated against actual usage

Good Practices Observed

  1. Systematic Approach: Using knip to identify truly unused files
  2. Conservative Ignores: The knip config appropriately ignores template files, documentation, and tooling configs
  3. Clean Deletions: Removed files appear to be genuinely unused based on grep searches

Files Analyzed & Assessment

File Purpose Removal Justification Risk
.opencode/plugin/notification.js OpenCode IDE notifications ✅ IDE-specific, not core functionality Low
agents-api/src/__tests__/manage/utils/cleanup.ts Test utilities ✅ Likely unused test helper Low
agents-api/workflow-bootstrap.ts Workflow setup ⚠️ Could be infrastructure - verify not needed Medium
agents-cli/src/commands/pull-v3/__tests__/test-introspect-cli.ts Manual CLI test ✅ Manual test script, not automated test Low
vitest.config.ci.ts CI-specific test config 🚨 Still referenced in agents-cli High
agents-docs/src/lib/analytics/posthog-*.ts PostHog analytics ✅ No references found in codebase Low
packages/agents-sdk/example-project.ts SDK examples ✅ Example code, likely moved to cookbook Low
scripts/generate-badge.mjs Badge generation ⚠️ Still referenced in package.json Medium

Recommended Actions

  1. IMMEDIATE: Fix the breaking vitest import in agents-cli/vitest.config.ts
  2. IMMEDIATE: Update or remove the coverage:badges script reference
  3. CONSIDER: Downgrade changeset from minor to patch for most packages (unless APIs are affected)
  4. OPTIONAL: Validate the knip configuration catches genuinely unused files without being overly broad

Test Strategy Validation

The PR should be tested by:

  1. Running pnpm build across all packages to catch import issues
  2. Running pnpm test to ensure test configurations work
  3. Running pnpm coverage:badges to verify script references
  4. Running the new knip configuration to ensure it works as expected

@dimaMachina dimaMachina changed the base branch from main to simplify-autotypetable January 28, 2026 08:13
@dimaMachina
Copy link
Collaborator Author

@claude verify pr from scratch

@claude
Copy link

claude bot commented Jan 28, 2026

Claude finished @dimaMachina's task in 4m 10s —— View job


PR Verification Complete

Todo List

  • Check for broken imports in agents-cli vitest config
  • Check coverage script references
  • Analyze changeset version strategy
  • Check what files are actually deleted in this PR
  • Verify knip configuration completeness
  • Identify any other broken references
  • Provide comprehensive verification summary

Verification Results

🚨 Critical Issues Found

1. Broken Import in agents-cli/vitest.config.ts

  • Issue: Line 2 imports vitestCIConfig from './vitest.config.ci' but vitest.config.ci.ts was deleted from the root
  • Impact: The agents-cli package vitest config will break when CI environment is detected (line 32)
  • Fix needed: Either restore the file or update the config to handle the missing import

2. Missing Script File Referenced in package.json

  • Issue: Lines 23 and 25 in package.json reference scripts/generate-badge.mjs which was deleted
  • Note: The file scripts/generate-badges.mjs (with 's') exists, but generate-badge.mjs was deleted
  • Impact: Coverage scripts may fail if they depend on the deleted file
  • Fix needed: Update references or ensure the correct file is used

⚠️ Version Strategy Concerns

3. Inappropriate Version Bumps in Changeset

The changeset uses minor version bumps for all packages:

"@inkeep/agents-core": minor
"@inkeep/agents-sdk": minor
"@inkeep/agents-api": minor
"@inkeep/agents-cli": minor

Issue: According to CLAUDE.md guidelines:

  • Minor: Schema changes requiring migration, significant behavior changes
  • Patch: Bug fixes, additive features, non-breaking changes

Recommendation: File cleanup should be patch level changes unless the removed files constitute breaking API changes

Verified Items

Files Successfully Deleted (21 files total):

  1. .opencode/plugin/notification.js - IDE-specific config ✓
  2. agents-api/src/__tests__/manage/utils/cleanup.ts - Unused test utility ✓
  3. agents-api/workflow-bootstrap.ts - Workflow setup file ✓
  4. agents-cli/src/commands/pull-v3/__tests__/test-introspect-cli.ts - Manual test ✓
  5. agents-cli/src/commands/pull-v3/utils/component-tracker.ts - Unused utility ✓
  6. agents-cli/src/exports.ts - Unused exports ✓
  7. agents-cli/src/types/agent.ts - Unused types ✓
  8. agents-cli/src/utils/file-finder.ts - Unused utility ✓
  9. agents-cli/src/utils/json-comparison.ts - Unused utility ✓
  10. agents-cli/src/utils/mcp-runner.ts - Unused utility ✓
  11. agents-cli/src/utils/profile-config.ts - Unused utility ✓
  12. agents-cli/src/utils/schema-introspection.ts - Unused utility ✓
  13. agents-docs/content/talk-to-your-agents/types.ts - Unused types ✓
  14. agents-docs/content/typescript-sdk/types.ts - Unused types ✓
  15. agents-docs/src/lib/analytics/posthog-events.ts - Analytics code ✓
  16. agents-docs/src/lib/analytics/posthog-server.ts - Analytics code ✓
  17. packages/agents-core/src/utils/tracer.ts - Unused tracer ✓
  18. packages/agents-sdk/example-project.ts - Example code ✓
  19. packages/agents-sdk/src/module-hosted-tool-manager.ts - Unused manager ✓
  20. scripts/generate-badge.mjs - Badge generation script ✓
  21. vitest.config.ci.ts - Root CI config ✓

References Check:

  • No imports found for any of the deleted files (except the known issues above)
  • Knip configuration appears comprehensive with appropriate ignores

📋 Recommended Actions

  1. IMMEDIATE: Fix the vitest import in agents-cli/vitest.config.ts:

    • Option A: Remove the CI-specific logic and use the same config for all environments
    • Option B: Move the CI config logic directly into the main config file
  2. IMMEDIATE: Update or remove the coverage script references in package.json

  3. CONSIDER: Change version bumps from minor to patch in the changeset unless there are breaking changes

  4. OPTIONAL: The knip configuration looks good but consider running pnpm knip to ensure it catches genuinely unused files

Summary

The PR successfully removes 21 unused files and adds knip configuration for future unused code detection. However, there are 2 critical issues that will break the build/tests if not addressed, and the version bump strategy should be reconsidered.

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