Skip to content

updated cli to remove unneeded project flag#898

Merged
tim-inkeep merged 3 commits into
mainfrom
bugfix/project-flag-unneeded
Nov 5, 2025
Merged

updated cli to remove unneeded project flag#898
tim-inkeep merged 3 commits into
mainfrom
bugfix/project-flag-unneeded

Conversation

@tim-inkeep

Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot

changeset-bot Bot commented Nov 5, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ad9f31a

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-cli Patch
@inkeep/agents-manage-api Patch
@inkeep/agents-manage-ui Patch
@inkeep/agents-run-api Patch
@inkeep/agents-core Patch
@inkeep/agents-sdk Patch
@inkeep/ai-sdk-provider Patch
@inkeep/create-agents Patch
test-agents Patch

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

vercel Bot commented Nov 5, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
agents-manage-api Ready Ready Preview Comment Nov 5, 2025 9:25pm
agents-manage-ui Ready Ready Preview Comment Nov 5, 2025 9:25pm
agents-run-api Ready Ready Preview Comment Nov 5, 2025 9:25pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
agents-docs Skipped Skipped Nov 5, 2025 9:25pm

@claude

claude Bot commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Claude finished @tim-inkeep's task —— View job


TypeScript Staff Engineer Review

Todo List

  • Read and analyze the changed files
  • Research existing codebase patterns and related functionality
  • Evaluate the impact of removing the project flag
  • Provide comprehensive architectural and engineering review
  • Submit final review feedback

Review Summary

This PR removes an "unneeded project flag" by refactoring the pull command to automatically determine the project ID from the local index.ts file, aligning its behavior with the existing push command. This is a well-executed refactoring that improves consistency and user experience.

Architecture & Design Improvements ✅

Excellent Pattern Consistency

The changes align the pull command with the established push command pattern:

  • Before: Required manual --project <id> flag specification
  • After: Automatically discovers project ID from local index.ts via loadProject(projectDir).getId()

This eliminates a significant UX friction point and follows the DRY principle by reusing existing utilities.

Smart Refactoring Decisions

  1. Reused initializeCommand() utility - Replaced custom config loading with the standardized CLI pipeline
  2. Leveraged existing loadProject() utility - Same pattern used successfully in push command
  3. Maintained backward compatibility - --project flag still works as an override option

Code Quality Assessment ✅

Clean Implementation

  • Reduced complexity: Removed ~40 lines of duplicate config loading logic
  • Better error handling: Standardized error messages and user guidance
  • Consistent project discovery: Same logic as push command (agents-cli/src/commands/push.ts:34-61)

Proper Error Boundaries

  • Validates index.ts exists in specified/current directory
  • Clear error messages with actionable guidance for users
  • Graceful fallback behavior maintained

Customer Impact Assessment ✅

Positive Breaking Change

  • Simplified workflow: Users no longer need to remember/specify project IDs
  • Intuitive behavior: Command behavior matches user mental model (work in project directory)
  • Enhanced error messaging: Better guidance when projects aren't found

Backward Compatibility Maintained

The --project flag description change is accurate:

// Before: 'Project ID to pull from backend'
// After: 'Override project ID (defaults to local project ID from index.ts)'

Technical Considerations ✅

Performance Impact: Minimal

  • Single additional loadProject() call to get project ID
  • Same index.ts file would be read later anyway during validation

Security: No concerns

  • No new attack vectors introduced
  • Same project loading mechanism as existing push command

System Design Validation ✅

Consistent CLI Patterns

This change makes the CLI commands more cohesive:

  • push: Auto-discovers project from local files ✓
  • pull: Now also auto-discovers project from local files ✓
  • Both commands use initializeCommand() pipeline ✓

Future Extensibility

The refactoring positions the codebase well for future enhancements:

  • Centralized configuration loading via initializeCommand()
  • Reusable project discovery patterns
  • Consistent error handling patterns

Minor Considerations

Documentation Gap:

The PR description is empty. Consider adding:

  • Brief explanation of the change's purpose
  • Any migration notes for existing workflows

Missing Changeset:

As noted by the changeset bot, this appears to be a user-facing change that would benefit from a changelog entry.

Recommendation: APPROVE

This is a thoughtful refactoring that:

  1. Improves user experience by removing friction
  2. Increases code consistency across CLI commands
  3. Reduces maintenance burden by eliminating duplicate code
  4. Maintains backward compatibility through the override flag

The implementation follows established patterns and best practices. No architectural concerns or code quality issues identified.


Job Run

@vercel vercel Bot temporarily deployed to Preview – agents-docs November 5, 2025 21:23 Inactive
@tim-inkeep tim-inkeep merged commit 2b515de into main Nov 5, 2025
8 checks passed
@tim-inkeep tim-inkeep deleted the bugfix/project-flag-unneeded branch November 5, 2025 21:34
specimba pushed a commit to specimba/agents that referenced this pull request Jun 5, 2026
…#898) (inkeep#3268)

* Introduce check:fast tier for in-vivo agent verification (G1)

Closes G1 from the merge-gates audit (inkeep#892): "No check:fast script tier
— Layer 1 (in-vivo) is undocumented for agents."

Adds `check:fast` as the canonical fast-verification command name across
root + 6 subtrees. Aliased to each subtree's existing `typecheck` (the
fastest reliable signal of real errors). Agents doing in-vivo iteration
inside a subtree can now run `pnpm check:fast` (or `bun run check:fast`
in OK) regardless of subtree — same command name, subtree-appropriate
implementation.

Scope:
- Root `check:fast` fans out to all 6 subtrees with typecheck coverage
  (matches existing `typecheck` root fan-out shape)
- Per-subtree `check:fast` script added; each aliases the subtree's
  existing typecheck command verbatim (no behavior change, just a
  named alias for discoverability)
- subtrees: public/agents, public/open-knowledge, private/agents-ui,
  private/chat-to-edit, private/copilot-app, private/copilot-chrome-extension

Why typecheck and not something broader:
- typecheck catches the most common in-vivo error (type mismatches,
  missing imports, broken refactors) with cache hits in <10s warm
- No tests: tests are slow and not in-vivo-fast
- No lint: lint is fast but typecheck already covers most real bugs
- No format:check: pre-commit's lint-staged covers that

This is naming, not new behavior. If we later want check:fast to mean
something different (e.g., typecheck + lint), the alias changes in one
place per subtree. The name is the durable contract; the implementation
is a script value.

Local verification: `pnpm --dir public/agents check:fast` runs `turbo
typecheck` correctly, 5.2s with 14/16 cached. (One pre-existing
typecheck error in agents-manage-ui — react-google-recaptcha-v3 types
missing — surfaced; that's on main, unrelated to this PR.)

Follow-up: update .github/QUALITY_GATES.md Layer 1 to reference
`check:fast` once inkeep#892 lands (QUALITY_GATES.md doesn't exist on this
branch yet — it's introduced by inkeep#892).

* Address PR inkeep#898 review: fold check:fast → typecheck alias (eliminates drift risk)

pullfrog[bot] flagged that the previous shape duplicated each subtree's
typecheck command verbatim under a `check:fast` key — 6 independent
string literals had to stay in lockstep with the matching `typecheck`
strings. A future PR changing a subtree's `typecheck` (e.g. adding a
`--filter` exclusion) could silently forget the `check:fast` twin and
the two would diverge.

Fix: each subtree's `check:fast` now invokes `pnpm typecheck` (or
`bun run typecheck` for OK) — a literal alias of the existing typecheck
script in the same package.json. The typecheck script stays canonical;
check:fast is its discoverable name. Single source of truth per subtree,
zero drift surface.

Per-subtree:
- public/agents: `check:fast: pnpm typecheck` (delegates to existing
  `typecheck: turbo typecheck --filter='!agents-cookbook-templates'`)
- public/open-knowledge: `check:fast: bun run typecheck` (delegates to
  existing `typecheck: turbo run typecheck`)
- private/agents-ui: `check:fast: pnpm typecheck`
- private/chat-to-edit: `check:fast: pnpm typecheck`
- private/copilot-app: `check:fast: pnpm typecheck`
- private/copilot-chrome-extension: `check:fast: pnpm typecheck`

Local verification (alias chain runs end-to-end):
- `pnpm --dir public/agents check:fast` → invokes typecheck → 16/16 turbo
  tasks success, 14/16 cached, 1m3s cold
- `pnpm --dir private/agents-ui check:fast` → recursive typecheck across
  packages/agents-ui, packages/react, packages/docusaurus — all green

(pullfrog's second finding about other AGENTS.md docs still referencing
`pnpm typecheck`: addressed in PR body reply — keeping deferred since the
alias means existing docs aren't wrong, just don't surface the new name.)

GitOrigin-RevId: 86ed0df4b6e7d9fa68bd67adb0df85661f61e055

Co-authored-by: Varun Varahabhotla <vnv-varun@users.noreply.github.com>
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