Skip to content

Feature/multi agent taskid collab 20251114#58

Merged
crazygo merged 9 commits intomainfrom
feature/multi-agent-taskid-collab-20251114
Nov 20, 2025
Merged

Feature/multi agent taskid collab 20251114#58
crazygo merged 9 commits intomainfrom
feature/multi-agent-taskid-collab-20251114

Conversation

@crazygo
Copy link
Owner

@crazygo crazygo commented Nov 14, 2025

No description provided.

…(taskagent, task); yarn publish runs npm publish
- Added a new README for the Multi-Agent Communication demo, detailing the design targets, use cases, and code review processes.
- Refactored import paths across multiple files to streamline access to shared modules and improve code organization.
- Updated the TypeScript configuration to support composite projects and adjusted paths for better module resolution.
- Enhanced the CLI components by updating logger imports and ensuring consistent usage of shared utilities.
- Improved the architecture of the agents by implementing a Programming Agent structure for better validation and error handling.
Copilot AI review requested due to automatic review settings November 14, 2025 16:28
@gemini-code-assist-2025-10-22

Summary of Changes

Hello @crazygo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces foundational changes for a sophisticated multi-agent system, detailing a new demo for streamlined communication and task-ID centric collaboration. A major refactoring effort was undertaken to simplify module import paths across the entire project, enhancing code readability and maintainability. Additionally, TypeScript configurations were upgraded to leverage composite projects for better build efficiency, and package publishing scripts were modernized. These changes collectively aim to improve the developer experience, clarify system architecture, and prepare the groundwork for advanced agent interactions.

Highlights

  • Multi-Agent Communication Demo: A new README file outlines a comprehensive plan for rebuilding and streamlining multi-agent communication, focusing on task-ID centric collaboration, introducing atomic agent types (Prompt Agent, Programming Agent), and detailing use cases like a feature-updater agent and a code review agent. It also describes a planned upgrade to a sequential Feature-Updater Agent and further agent evolution for Blueprint, UI Review, and a new Notes Agent.
  • Module Import Alias Refactoring: The codebase underwent a significant refactoring of internal module import aliases. Previously, imports used a @taskagent/<package-name> prefix (e.g., @taskagent/core/event-bus), which has now been shortened to @<package-name> (e.g., @core/event-bus). This change affects numerous files across agents, cli, core, execution, presets, and shared packages, aiming for cleaner and more concise import statements.
  • TypeScript Configuration Enhancements: Several tsconfig.json files (packages/agents, packages/core, packages/cli) were updated to include "composite": true, enabling TypeScript project references for improved build performance and modularity in the monorepo. The root tsconfig.json's paths configuration was also extensively updated to support the new, shorter module aliases.
  • Package Publishing Script Update: The package.json file was updated to replace the prepublishOnly script with prepack and to directly execute yarn npm publish --access public in the publish script, aligning with modern Yarn publishing workflows.
  • User Interface Text Adjustment: A minor but notable change in the CLI's main UI (packages/cli/main.tsx) updates the prompt text from "Switch Driver: Ctrl+P/N" to "Switch Agent: Ctrl+P/N", reflecting a conceptual shift in how different operational modes are referred to within the application.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist-2025-10-22 gemini-code-assist-2025-10-22 bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant and valuable refactoring of the project's import path aliases, moving from @taskagent/... to shorter, more modular aliases like @core, @shared, etc. This greatly improves code maintainability and readability. The updates to package.json scripts and tsconfig.json files are also positive changes that align with modern TypeScript monorepo best practices. Overall, this is a solid architectural improvement. I've included one minor suggestion to remove a couple of unused imports.

Comment on lines +3 to +4
import fs from 'fs';
import path from 'path';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These fs and path imports are not used in this file and can be removed to keep the code clean.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 3 to 6
"compilerOptions": {
"outDir": "./dist",
"rootDir": ".",
"rootDir": "..",
"jsx": "react"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep CLI rootDir at package level

Changing compilerOptions.rootDir to ".." makes tsc emit files under dist/cli/... instead of dist/... (TypeScript mirrors the directory structure relative to rootDir). The CLI package still declares its bin as ./dist/main.js in packages/cli/package.json, so after yarn workspace @taskagent/cli build the expected entry point is missing and npx taskagent/node dist/main.js fails with ENOENT. Please keep rootDir at "." (or adjust the bin/output paths) so the compiled artifact stays at dist/main.js.

Useful? React with 👍 / 👎.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the codebase to use shorter, simpler TypeScript path aliases, migrating from @taskagent/* prefixes to cleaner aliases like @agents, @shared, @core, @execution, @presets, and @tabs. It also includes minor improvements to package scripts and adds project reference configurations for better build performance.

  • Replaced verbose @taskagent/ path aliases with concise alternatives (@agents, @shared, @core, etc.)
  • Updated package.json scripts: prepublishOnlyprepack and streamlined publish command
  • Added TypeScript composite project configurations to improve incremental builds
  • Updated UI text from "Switch Driver" to "Switch Agent" for better terminology

Reviewed Changes

Copilot reviewed 53 out of 54 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tsconfig.json Refactored path aliases from @taskagent/* to shorter forms like @agents, @shared, @core, with specific mappings for commonly-used subpaths
packages/presets/index.ts Updated example import in documentation comment to use new @presets alias
packages/execution/types.ts Updated comment and imports to use new @agents alias
packages/execution/TabExecutor.ts Updated imports to use @core/event-bus and @agents aliases
packages/execution/MessageAdapter.ts Updated imports to use new path aliases
packages/core/tsconfig.json Added composite: true for TypeScript project references
packages/cli/workspace/settings.ts Changed from node:fs/node:path to fs/path, updated to @shared/logger
packages/cli/types.ts Updated comment and export to use @core alias
packages/cli/tsconfig.json Changed rootDir to parent directory, added execution package reference
packages/cli/store/MessageStore.ts Updated import to @shared/logger (but still has relative import to core/event-bus)
packages/cli/src/contexts/KeypressProvider.tsx Updated import to @shared/logger
packages/cli/main.tsx Updated all imports to new aliases, changed "Switch Driver" to "Switch Agent"
packages/cli/hooks/useStreamSession.ts Updated import to @shared/logger
packages/cli/hooks/useMessageQueue.ts Updated import to @shared/logger
packages/cli/hooks/useAgentEventBridge.ts Updated imports to new aliases
packages/cli/drivers/types.ts Updated import to @shared/task-manager
packages/cli/drivers/registry.ts Updated import to @agents alias
packages/cli/drivers/plan-review-do/index.ts Updated import to @shared/logger
packages/cli/drivers/plan-review-do/flow.ts Updated import to @shared/logger
packages/cli/domain/taskStore.ts Updated imports to new aliases, added blank line for readability
packages/cli/config/ai-provider.ts Updated import to @shared/logger, added blank line
packages/cli/components/TaskSpecificView.tsx Updated import to @shared/task-manager
packages/cli/components/StatusControls.tsx Updated imports to new aliases
packages/cli/components/InputBar.tsx Updated import to @shared/logger
packages/cli/components/ChatPanel.tsx Updated import to @shared/logger
packages/cli/cli/config.ts Updated imports to @shared aliases
packages/cli/cli/args.ts Updated import to @shared/logger, added unused fs/path imports
packages/agents/workflow-agents/LoopAgent.ts Updated import to @shared/logger
packages/agents/tsconfig.json Added composite: true for TypeScript project references
packages/agents/runtime/workflowTools.ts Updated import to @core/event-bus (but has relative import to execution)
packages/agents/runtime/types.ts Updated imports to new aliases
packages/agents/runtime/runPromptAgentStart.ts Updated import to @shared/logger
packages/agents/runtime/runClaudeStream.ts Updated import to @shared/logger
packages/agents/runtime/flows/baseClaudeFlow.ts Updated imports to @core aliases
packages/agents/runtime/async-task/types.ts Updated import to @core/event-bus
packages/agents/runtime/async-task/helpers.ts Updated comment and imports, reordered imports
packages/agents/review/index.ts Updated import to @core/event-bus (but has relative import to execution)
packages/agents/review/ReviewAgent.ts Updated import to @shared/logger
packages/agents/registry/AgentRegistry.ts Updated imports to new aliases
packages/agents/feature-writer/index.ts Updated import to @core/event-bus (but has relative import to execution)
packages/agents/feature-writer/FeatureWriterAgent.ts Updated import, removed unused imports
packages/agents/devhub/summarizer/SummarizerAgent.ts Updated import to @shared/logger
packages/agents/devhub/judge/JudgeAgent.ts Updated import to @shared/logger
packages/agents/devhub/coding-loop/index.ts Updated import to @shared/logger
packages/agents/devhub/coding-loop/event-collector.ts Updated import to @shared/logger
packages/agents/devhub/coding-loop/SummarizationCallback.ts Updated import to @shared/logger
packages/agents/devhub/DevHub.ts Updated imports to new aliases
packages/agents/desktop/index.ts Updated imports to new aliases
packages/agents/coder/index.ts Updated import to @core/event-bus (but has relative import to execution)
packages/agents/coder/CoderAgent.ts Updated import to @core/event-bus
packages/agents/blueprint/index.ts Updated import to @core/event-bus, added blank line
packages/agents/blueprint/BlueprintLoop.ts Updated imports to new aliases
package.json Changed prepublishOnly to prepack, updated publish script to run actual command
.askman/tasks/20251114-2255-rebuild-multi-agent-comm-demo/README.md New task documentation file
Comments suppressed due to low confidence (2)

packages/cli/cli/args.ts:3

  • Unused import fs.
import fs from 'fs';

packages/cli/cli/args.ts:4

  • Unused import path.
import path from 'path';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -12,7 +12,7 @@
import { EventEmitter } from 'node:events';
import type { Message } from '../types.js';
import type { EventBus } from '../../core/event-bus/EventBus.js';
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relative import should be updated to use the new path alias @core/event-bus instead of ../../core/event-bus/EventBus.js to be consistent with the rest of the PR's refactoring from @taskagent/* aliases to shorter aliases like @core, @shared, etc.

Copilot uses AI. Check for mistakes.
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'url';
import { loadAgentPipelineConfig } from '../runtime/agentLoader.js';
import type { RunnableAgent } from '../runtime/types.js';
import type { TabExecutor } from '../../execution/TabExecutor.js';
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.

Suggested change
import type { TabExecutor } from '../../execution/TabExecutor.js';
import type { TabExecutor } from '@execution/TabExecutor.js';

Copilot uses AI. Check for mistakes.
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'url';
import { loadAgentPipelineConfig } from '../runtime/agentLoader.js';
import type { RunnableAgent } from '../runtime/types.js';
import type { TabExecutor } from '../../execution/TabExecutor.js';
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.

Suggested change
import type { TabExecutor } from '../../execution/TabExecutor.js';
import type { TabExecutor } from '@execution/TabExecutor.js';

Copilot uses AI. Check for mistakes.
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'url';
import { loadAgentPipelineConfig } from '../runtime/agentLoader.js';
import type { RunnableAgent } from '../runtime/types.js';
import type { TabExecutor } from '../../execution/TabExecutor.js';
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.

Suggested change
import type { TabExecutor } from '../../execution/TabExecutor.js';
import type { TabExecutor } from '@execution/TabExecutor.js';

Copilot uses AI. Check for mistakes.
@@ -1,7 +1,7 @@
import { tool } from '@anthropic-ai/claude-agent-sdk';
import type { TabExecutor } from '../../execution/TabExecutor.js';
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.

Suggested change
import type { TabExecutor } from '../../execution/TabExecutor.js';
import type { TabExecutor } from '@execution/TabExecutor.js';

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +4
import fs from 'fs';
import path from 'path';
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused imports: fs and path are imported but not used anywhere in this file. These imports should be removed.

Suggested change
import fs from 'fs';
import path from 'path';

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@
import { addLog } from '@taskagent/shared/logger';
import { addLog } from '@shared/logger';
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import addLog.

Suggested change
import { addLog } from '@shared/logger';

Copilot uses AI. Check for mistakes.
crazygo and others added 2 commits November 17, 2025 17:00
Fixes Yarn PnP resolution error where vite-tsconfig-paths couldn't
find its peer dependency 'vite'. Added vite v6.0.1 to devDependencies
and updated .gitignore to exclude .vite-cache directory.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@crazygo crazygo merged commit 63a0c78 into main Nov 20, 2025
4 checks passed
@crazygo crazygo deleted the feature/multi-agent-taskid-collab-20251114 branch November 20, 2025 02:32
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