Conversation
Research-based analysis with two recommendation sets: - 13 product recommendations (CLI commands, flags, UX) - 12 codebase recommendations (architecture, testing, tooling) Key product items: whoami, doctor, dry-run, cycles, issue comments, bulk ops, stdin piping, column selection, help examples. Key codebase items: split cli.ts/linear-client.ts monoliths, consolidate caching, add unit tests, structured logging, CI/CD. https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
Product improvements: - Add whoami command showing authenticated user and organization info - Add doctor command for diagnostic checks (API, config, cache, aliases) - Add cycle list/view/sync-aliases commands - Add issue comment subcommand - Add --dry-run flag to issue/project create/update commands - Add --columns flag to issue/project/members list commands - Add date range filters (--created-after, --created-before, etc.) to issue list - Add stdin piping support for issue create (title from stdin) - Add bulk update support (--bulk) for issue update - Add --no-color global flag to disable emojis - Document no-delete design decision in README Codebase improvements: - Fix version mismatch (0.24.0 → 0.24.1) - Move WalkthroughScreen.tsx to src/ui/components/ - Add GitHub Actions CI/CD workflows - Add ESLint import ordering plugin - Add unit tests for parsers, validators, and error handler (71 new tests) - Add LinearClient singleton caching - Add structured logging (logger.ts) with --quiet/--verbose flags - Add generic fetchWithCache helper to entity cache - Add command-runner.ts middleware for standardized error handling - Begin splitting cli.ts into per-entity register.ts files - Begin splitting linear-client.ts into domain API modules https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
Continuation of cli.ts split refactoring (C1) - adds registration modules for alias and config commands. https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
Continuation of C1 (cli.ts split) and C2 (linear-client.ts split) refactoring - adds issue command registration and projects API module. https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
Continuation of C1 cli.ts split refactoring. https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
Adds registration modules for: colors, icons, issue-labels, project-labels, templates, and workflow-states commands. Completes C1 cli.ts split refactoring. https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
Reduces cli.ts from 1831 to 176 lines by extracting command registration into 17 dedicated register.ts files under each command directory. Global options and top-level commands remain in cli.ts. https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
Reduces linear-client.ts from 4195 to 3 lines (thin re-export) by extracting all API functions into 10 domain modules under src/lib/api/: client, projects, issues, teams, initiatives, members, labels, workflow-states, templates, cycles. Barrel re-export in index.ts ensures backward compatibility for all existing imports. https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
- Auto-fix 122 import/export sorting warnings (simple-import-sort) - Remove unused parseAdvancedDependency import in parsers.test.ts - Replace all 55 no-explicit-any warnings with proper types: - Use unknown for error handler catch parameters - Use specific interfaces for Commander.js options (IssueListCommandOptions, ProjectListCommandOptions) - Use Record<string, unknown> for generic API response objects - Use proper GraphQL response interfaces for raw queries - Type API call tracker and issue resolver parameters https://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR significantly restructures the agent2linear codebase by extracting command registration logic into dedicated modules and creating a centralized API layer. The changes improve maintainability, reduce code duplication, and establish clearer separation of concerns.
Key Changes
Command Architecture Refactoring
register.tsfiles for each command group (config, initiatives, projects, issues, teams, members, aliases, templates, milestone-templates, workflow-states, labels, cycles, cache, colors, icons)src/cli.tsfrom 551 lines to 69 lines by delegating command setup to registration modulesregisterXxxCommands(cli)functionsCentralized API Layer
src/lib/api/directory: Created domain-specific API modules:client.ts: Singleton Linear SDK client with error handlingprojects.ts: Project CRUD and filtering (1557 lines with performance optimizations)issues.ts: Issue operations with comment support (977 lines)labels.ts: Issue and project label management (431 lines)members.ts: Member/user operations (342 lines)workflow-states.ts: Workflow state management (247 lines)teams.ts,initiatives.ts,templates.ts,cycles.ts: Entity-specific operationsindex.ts: Barrel export for convenient importinglinear-client.ts: Reduced from 4084 lines to a focused client wrapperTesting & Validation
src/lib/validators.test.ts: Validation function testssrc/lib/parsers.test.ts: Parser function testssrc/lib/error-handler.test.ts: Error handling testsNew Utilities & Commands
src/lib/logger.ts): Structured logging with level supportsrc/lib/command-runner.ts): Shared middleware for standardized error handling and alias resolutionwhoami,doctor,issue commentConfiguration & Infrastructure
eslint-plugin-simple-import-sortfor import organizationRECOMMENDATIONS.mdwith product and codebase improvement suggestionsWalkthroughScreentosrc/ui/components/Enhanced Features
Notable Implementation Details
LinearClientErrorsetLogLevel()andsetNoColor()functions provide global output controlhttps://claude.ai/code/session_01LE3Rf4kmo1TBCozoF14LCa