Skip to content

feat(hyper-agents): Hyper Agents Core - Week 1 Foundation [DRAFT]#48

Open
welshDog wants to merge 27 commits intodevelopfrom
feature/hyper-agents-core
Open

feat(hyper-agents): Hyper Agents Core - Week 1 Foundation [DRAFT]#48
welshDog wants to merge 27 commits intodevelopfrom
feature/hyper-agents-core

Conversation

@welshDog
Copy link
Copy Markdown
Owner

What this PR does

This is the Week 1-2 foundation commit for the Hyper Agents feature integration into HyperCode V2.0.

This PR implements the complete project structure, CI/CD pipelines, SKILL.md, base agent code, templates, and documentation. Zero disruption to existing V2.0 functionality - fully additive.

What's included in this initial commit

  • src/agents/hyper_agents/base_agent.py - HyperAgent base class with ND-friendly error handling, Crew registration, health endpoints
  • .claude/skills/hypercode-new-agent-onboarding/SKILL.md - Full neurodivergent-friendly agent onboarding skill (v1.0.0)
  • .github/workflows/hyper-agents-ci.yml - Gate 1 CI pipeline (lint, unit tests 80%, integration, security, ND UX, Docker build)
  • .github/workflows/hyper-agents-gate2-e2e.yml - Gate 2 E2E pipeline (regression guard, E2E, load test 50 concurrent, full stack Docker, perf benchmark)
  • .github/ISSUE_TEMPLATE/hyper-agent-bug-report.yml - ND-friendly bug report template
  • .github/PULL_REQUEST_TEMPLATE/hyper-agents-pr.md - PR template with Gate 1 + Gate 2 checklists
  • docs/hyper-agents/README.md - Complete developer guide

Merge path

feature/hyper-agents-core --> develop --> main

Gate 1 status (required before merging to develop)

Weeks 1-8 of 10-week plan. Gate 1 will be ready at Week 9.

  • Unit test coverage >= 80%
  • 2 peer approvals
  • ND UX review completed
  • All CI passes without warnings

Timeline

See docs/hyper-agents/README.md for full 10-week integration plan.


DRAFT - Not ready for review. Tracking Week 1-2 foundation work.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 44361411-80f5-4fe3-9b50-deb6cbfc27a5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/hyper-agents-core

Comment @coderabbitai help to get the list of available commands and usage tips.

welshDog and others added 20 commits March 28, 2026 14:27
Implements WorkerAgent archetype with:
- Priority-based task queuing (LOW/NORMAL/HIGH/HYPERFOCUS)
- Async execution with configurable timeout
- Exponential backoff retry (max 3 retries)
- Hyperfocus mode: single-task lock until completion
- ND-friendly error messages via NDErrorResponse
- Full stats tracking and structured logging

Part of Week 3 deliverable: hyper-agent archetypes.
Implements ObserverAgent archetype with:
- Real-time metric collection (COUNTER/GAUGE/HISTOGRAM/RATE)
- Threshold-based alerting with severity levels (INFO/WARNING/CRITICAL)
- Alert cooldown to prevent notification floods
- Statistical summaries: min/max/avg/latest per metric
- Rate-of-change calculation with configurable windows
- Event log for structured system events
- ND-friendly: silent by default, only alerts when thresholds crossed

Part of Week 3 deliverable: hyper-agent archetypes.
Implements ArchitectAgent archetype with:
- Goal decomposition into executable PlanSteps
- Dependency management between steps
- Multi-agent registration and task assignment
- Real-time progress tracking and status aggregation
- ND-friendly: planning phase before execution, clear milestones
- Graceful shutdown and state management

Completes archetype implementations for Week 3.
…API improvements

- Add graceful shutdown method to base agent with STOPPING status
- Refactor agent constructors to use name and archetype parameters consistently
- Improve error handling in worker agent with formatted ND errors
- Simplify architect API with create_goal, add_step, complete_step, and fail_step methods
- Add comprehensive testing infrastructure with Docker setup, requirements, and unit tests
- Fix test imports and update test cases to match new API
- Add memory agent (FastAPI/Redis) for shared key/value storage
- Add architect agent (NestJS) for planning and goal decomposition
- Create cross-platform init scripts (PowerShell/bash) for first-time setup
- Update docker-compose.agents.yml with localhost-only ports and dependency fixes
- Remove duplicate project-strategist-v2 service from main docker-compose
- Update Makefile with new start/stop/agents commands for better workflow
- Add healthchecks to crew-orchestrator agents in docker-compose
- Fix timezone handling for daily login rewards in broski_service
- Implement WebSocket task execution and BROski$ reward events in orchestrator
- Add proxy endpoint in Core API for authenticated task execution
- Update Pydantic settings to v2 syntax in crew-orchestrator
- Fix test mocking for Pydantic v2 compatibility
- Expand Prometheus scrape configs to include all agent services
- Add unit tests for BROski$ service with 33 test cases
- Create Grafana dashboard for agent health and BROski$ metrics
- Add gap analysis documentation and action plan
…cker secrets management

- Introduce comprehensive Helm chart with all required K8s resources
(deployments, services, configmaps, secrets, ingress, HPA)

- Add Docker secrets overlay with init scripts for secure credential management

- Implement deterministic LLM evaluation stub for reliable testing

- Add end-to-end tests for CodeRabbit
webhook integration

- Include health checks, observability configuration, and production-ready defaults
- Add LLM eval stub tests verifying deterministic behavior
, no network calls, and spec handling

- Add Helm chart validation tests covering metadata, templates, and security checks

- Fix CodeRabbit webhook issue classification to handle both description and
 message fields

- Update Redis test to use correct FakeRedis instantiation and
 guard pattern

- Extend Claude settings with additional test commands for new test suites
- Add new views: Tasks, Logs, and Planning with real-time polling

- Create API endpoints for tasks, logs, planning, orchestrator, and BROski

- Implement useTasks and useLogs hooks for data fetching

- Update HyperShellLayout to include 7-pane grid layout

- Add testing setup with @testing-library/jest-dom

- Fix scrollIntoView safety check in TimelineView

- Update Claude settings with new test commands
- Change relative import to absolute import in mape_k_api.py to
 resolve ImportError when loaded as top-level module

- Fix mixed indentation in mape_k_engine.py try block to prevent IndentationError

- Add additional allowed shell commands to Claude IDE settings for development workflow
- Enable Prometheus metrics collection in docker-compose

- Update Prometheus config to comment out throttle-agent (profile-gated)

- Add Docker monitoring commands to Claude tool settings
MCP Tools (A)
- New service: services/hypercode-mcp-server/ — FastMCP SSE server on port 8823
- 10 tools: system_health, list_agents, agent_system_health, list/create_tasks,
  generate_plan, get_logs, broski_wallet, broski_leaderboard, execute_agent
- .mcp.json in project root — Claude Code auto-discovers on project open
- docs/MCP_IDE_INTEGRATION.md — connection guide for Claude Code, Cursor, Windsurf

WebSocket Streaming (C)
- orchestrator: /ws/events WebSocket endpoint — Redis pub/sub fan-out to all
  connected dashboard clients (ws_tasks, broski_events, approval_requests)
- Seeds last 20 log entries as logs:history on connect
- useEventStream: rewritten to WebSocket (was broken SSE proxy), auto-reconnect
- useLogs: WebSocket primary + HTTP poll fallback, exposes liveWs flag
- LogsView: live/polling status indicator (green/amber)

Observability fixes
- PROMETHEUS_METRICS_DISABLED=false — /metrics endpoint now live on core API
- prometheus.yml: throttle-agent target commented out (profile-gated)
- docs/DOCKER_HEALTH_REPORT_v2.4.md — full stack audit report
- Prometheus: 8/8 targets UP (was 7/9)

Tests
- vitest testTimeout: 15000ms (7-pane DOM is larger, getAllByRole needs more time)
- HyperShellLayout tests: updated mocks for liveWs, getAllByRole for focus buttons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add additional Bash commands to allowlist for enhanced development workflow
support, including file searching, Docker operations, and Python module checks.
@welshDog welshDog marked this pull request as ready for review March 29, 2026 22:08
@welshDog welshDog force-pushed the feature/hyper-agents-core branch from d935f75 to ea91ea9 Compare March 30, 2026 18:06
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