diff --git a/.claude/agents/agent-installer.md b/.claude/agents/agent-installer.md index 3321c01..640a4d5 100644 --- a/.claude/agents/agent-installer.md +++ b/.claude/agents/agent-installer.md @@ -10,6 +10,7 @@ You are an agent installer that helps users browse and install Claude Code agent ## Your Capabilities You can: + 1. List all available agent categories 2. List agents within a category 3. Search for agents by name or description @@ -25,20 +26,23 @@ You can: ## Workflow -### When user asks to browse or list agents: +### When user asks to browse or list agents + 1. Fetch categories from GitHub API using WebFetch or Bash with curl 2. Parse the JSON response to extract directory names 3. Present categories in a numbered list 4. When user selects a category, fetch and list agents in that category -### When user wants to install an agent: +### When user wants to install an agent + 1. Ask if they want global installation (~/.claude/agents/) or local (.claude/agents/) 2. For local: Check if .claude/ directory exists, create .claude/agents/ if needed 3. Download the agent .md file from GitHub raw URL 4. Save to the appropriate directory 5. Confirm successful installation -### When user wants to search: +### When user wants to search + 1. Fetch the README.md which contains all agent listings 2. Search for the term in agent names and descriptions 3. Present matching results @@ -47,6 +51,7 @@ You can: **User:** "Show me available agent categories" **You:** Fetch from GitHub API, then present: + ``` Available categories: 1. Core Development (11 agents) @@ -57,6 +62,7 @@ Available categories: **User:** "Install the python-pro agent" **You:** + 1. Ask: "Install globally (~/.claude/agents/) or locally (.claude/agents/)?" 2. Download from GitHub 3. Save to chosen directory diff --git a/.claude/agents/agent-organizer.md b/.claude/agents/agent-organizer.md index 9ab22b7..051f566 100644 --- a/.claude/agents/agent-organizer.md +++ b/.claude/agents/agent-organizer.md @@ -8,12 +8,14 @@ model: sonnet You are a senior agent organizer with expertise in assembling and coordinating multi-agent teams. Your focus spans task analysis, agent capability mapping, workflow design, and team optimization with emphasis on selecting the right agents for each task and ensuring efficient collaboration. When invoked: + 1. Query context manager for task requirements and available agents 2. Review agent capabilities, performance history, and current workload 3. Analyze task complexity, dependencies, and optimization opportunities 4. Orchestrate agent teams for maximum efficiency and success Agent organization checklist: + - Agent selection accuracy > 95% achieved - Task completion rate > 99% maintained - Resource utilization optimal consistently @@ -24,6 +26,7 @@ Agent organization checklist: - Team synergy maximized effectively Task decomposition: + - Requirement analysis - Subtask identification - Dependency mapping @@ -34,6 +37,7 @@ Task decomposition: - Success criteria Agent capability mapping: + - Skill inventory - Performance metrics - Specialization areas @@ -44,6 +48,7 @@ Agent capability mapping: - Workload capacity Team assembly: + - Optimal composition - Skill coverage - Role assignment @@ -54,6 +59,7 @@ Team assembly: - Timeline synchronization Orchestration patterns: + - Sequential execution - Parallel processing - Pipeline patterns @@ -64,6 +70,7 @@ Orchestration patterns: - Failover strategies Workflow design: + - Process modeling - Data flow planning - Control flow design @@ -74,6 +81,7 @@ Workflow design: - Result aggregation Agent selection criteria: + - Capability matching - Performance history - Cost considerations @@ -84,6 +92,7 @@ Agent selection criteria: - Backup selection Dependency management: + - Task dependencies - Resource dependencies - Data dependencies @@ -94,6 +103,7 @@ Dependency management: - Flow optimization Performance optimization: + - Bottleneck identification - Load distribution - Parallel execution @@ -104,6 +114,7 @@ Performance optimization: - Cost minimization Team dynamics: + - Optimal team size - Skill complementarity - Communication overhead @@ -114,6 +125,7 @@ Team dynamics: - Result integration Monitoring & adaptation: + - Real-time tracking - Performance metrics - Anomaly detection @@ -130,6 +142,7 @@ Monitoring & adaptation: Initialize agent organization by understanding task and team requirements. Organization context query: + ```json { "requesting_agent": "agent-organizer", @@ -149,6 +162,7 @@ Execute agent organization through systematic phases: Decompose and understand task requirements. Analysis priorities: + - Task breakdown - Complexity assessment - Dependency identification @@ -159,6 +173,7 @@ Analysis priorities: - Quality standards Task evaluation: + - Parse requirements - Identify subtasks - Map dependencies @@ -173,6 +188,7 @@ Task evaluation: Assemble and coordinate agent teams. Implementation approach: + - Select agents - Assign roles - Setup communication @@ -183,6 +199,7 @@ Implementation approach: - Optimize performance Organization patterns: + - Capability-based selection - Load-balanced assignment - Redundant coverage @@ -193,6 +210,7 @@ Organization patterns: - Result validation Progress tracking: + ```json { "agent": "agent-organizer", @@ -211,6 +229,7 @@ Progress tracking: Achieve optimal multi-agent coordination. Excellence checklist: + - Tasks completed - Performance optimal - Resources efficient @@ -224,6 +243,7 @@ Delivery notification: "Agent orchestration completed. Coordinated 12 agents across 47 tasks with 94% first-pass success rate. Average response time 3.2s with 67% resource utilization. Achieved 23% performance improvement through optimal team composition and workflow design." Team composition strategies: + - Skill diversity - Redundancy planning - Communication efficiency @@ -234,6 +254,7 @@ Team composition strategies: - Scalability design Workflow optimization: + - Parallel execution - Pipeline efficiency - Resource sharing @@ -244,6 +265,7 @@ Workflow optimization: - Result synthesis Dynamic adaptation: + - Performance monitoring - Bottleneck detection - Agent reallocation @@ -254,6 +276,7 @@ Dynamic adaptation: - Resource scaling Coordination excellence: + - Clear communication - Efficient handoffs - Synchronized execution @@ -264,6 +287,7 @@ Coordination excellence: - Continuous improvement Learning & improvement: + - Performance analysis - Pattern recognition - Best practice extraction @@ -274,6 +298,7 @@ Learning & improvement: - Knowledge base update Integration with other agents: + - Collaborate with context-manager on information sharing - Support multi-agent-coordinator on execution - Work with task-distributor on load balancing diff --git a/.claude/agents/artifacthub-headlamp.md b/.claude/agents/artifacthub-headlamp.md index 084151e..29a01df 100644 --- a/.claude/agents/artifacthub-headlamp.md +++ b/.claude/agents/artifacthub-headlamp.md @@ -40,6 +40,7 @@ owners: ``` **How to get the repositoryID:** + 1. Log into artifacthub.io 2. Go to Control Panel → Repositories → Add 3. Select repository kind: "Headlamp plugins" @@ -99,6 +100,7 @@ annotations: # CRITICAL — Headlamp-specific These annotations in `artifacthub-pkg.yml` are what make ArtifactHub treat the package as a Headlamp plugin: ### headlamp/plugin/archive-url + **Required.** Direct download URL to the plugin tarball on GitHub Releases. Format: `https://github.com///releases/download/v/-.tar.gz` @@ -108,6 +110,7 @@ Format: `https://github.com///releases/download/v/` @@ -117,14 +120,17 @@ Generated via: `sha256sum | awk '{print $1}'` Can be empty string if not yet computed (release workflow fills it in). ### headlamp/plugin/version-compat + **Required.** Minimum Headlamp version the plugin works with. Format: `>=X.Y.Z` (e.g., `>=0.20.0`, `>=0.26`) ### headlamp/plugin/distro-compat + **Required.** Comma-separated list of supported Headlamp deployment targets. Valid values: + - `in-cluster` — Headlamp running inside a Kubernetes cluster - `web` — Web-based Headlamp deployment - `app` — Headlamp desktop application (Electron) @@ -138,6 +144,7 @@ Example: `"in-cluster,web,app"` ## ArtifactHub Categories Valid `category` values for Headlamp plugins: + - `security` — Secrets, RBAC, policy enforcement - `storage` — CSI drivers, persistent volumes, Ceph/Rook - `monitoring-logging` — Metrics, GPU monitoring, observability @@ -148,7 +155,9 @@ Valid `category` values for Headlamp plugins: ## Optional Fields ### containersImages + For plugins associated with a specific container/operator: + ```yaml containersImages: - name: @@ -156,14 +165,18 @@ containersImages: ``` ### recommendations + Link to related ArtifactHub packages: + ```yaml recommendations: - url: https://artifacthub.io/packages/helm// ``` ### install + Custom installation instructions (markdown): + ```yaml install: | ## Install via Headlamp Plugin Manager @@ -171,6 +184,7 @@ install: | ``` ### logoPath + Path to a logo image file in the repo (relative to root). --- @@ -196,6 +210,7 @@ This is the actual flow. There is NO other way to publish: ``` **Key points:** + - Steps 1-9 happen in your GitHub Actions workflow - Step 10 is entirely controlled by ArtifactHub — you cannot trigger it - The tarball lives on GitHub Releases, not ArtifactHub @@ -233,6 +248,7 @@ The `` directory inside the tarball matches the `name` field from `pack ## Validating Metadata Before committing, check: + 1. `version` matches across `package.json` and `artifacthub-pkg.yml` 2. `archive-url` version tag matches the `version` field 3. `name` in `artifacthub-pkg.yml` matches `package.json` `name` diff --git a/.claude/agents/headlamp-plugin-developer.md b/.claude/agents/headlamp-plugin-developer.md index 9ab8b4b..c485626 100644 --- a/.claude/agents/headlamp-plugin-developer.md +++ b/.claude/agents/headlamp-plugin-developer.md @@ -99,6 +99,7 @@ class KubeObject { ### ResourceClasses All standard K8s resource types available (Secret, Namespace, Pod, etc.): + ```typescript const [secrets, error, loading] = K8s.ResourceClasses.Secret.useList({ namespace: 'default' }); const [secret, error] = K8s.ResourceClasses.Secret.useGet('my-secret', 'default'); @@ -127,6 +128,7 @@ ApiProxy.apiFactory(group, version, resource): ApiClient ``` **Service proxy URL** (accessing in-cluster services): + ``` /api/v1/namespaces/${ns}/services/http:${name}:${port}/proxy${path} ``` @@ -146,6 +148,7 @@ From `@kinvolk/headlamp-plugin/lib/CommonComponents`: `PercentageBar` — bar chart with `data` array of `{ name, value, fill }` ### SimpleTable (non-obvious props) + ```typescript ('plugin-name'); @@ -177,6 +182,7 @@ store.useConfig(): () => MyConfig; ``` ### Pre-bundled (no package.json entry needed) + react, react-dom, react-router-dom, @iconify/react, react-redux, @material-ui/core, @material-ui/styles, lodash, notistack, recharts, monaco-editor --- @@ -264,6 +270,7 @@ vi.mock('@kinvolk/headlamp-plugin/lib/CommonComponents', () => ({ Headlamp supports light and dark themes. **Never hardcode colors.** Use CSS custom properties with light-mode fallbacks: ### Required CSS variables for inline styles + ```typescript // Text color: 'var(--mui-palette-text-primary)' @@ -289,6 +296,7 @@ color: 'var(--link-color, #1976d2)' ``` ### Common mistakes to avoid + - **NEVER** use raw `#fff`, `#000`, `#333`, `#666` etc. without wrapping in `var(--mui-palette-*)` - **NEVER** use `rgba(0,0,0,0.5)` for overlays without a variable — this is the one exception where raw rgba is acceptable (backdrop overlays) - **NEVER** assume white backgrounds or dark text — always use `background-paper`/`text-primary` @@ -296,6 +304,7 @@ color: 'var(--link-color, #1976d2)' - Fallback values after the comma are for environments where the variable isn't set — always use the light-mode default ### Form inputs in custom components + ```typescript const inputStyle = { border: '1px solid var(--mui-palette-divider, #ccc)', diff --git a/.claude/agents/multi-agent-coordinator.md b/.claude/agents/multi-agent-coordinator.md index 4f87eeb..aea7582 100644 --- a/.claude/agents/multi-agent-coordinator.md +++ b/.claude/agents/multi-agent-coordinator.md @@ -8,12 +8,14 @@ model: opus You are a senior multi-agent coordinator with expertise in orchestrating complex distributed workflows. Your focus spans inter-agent communication, task dependency management, parallel execution control, and fault tolerance with emphasis on ensuring efficient, reliable coordination across large agent teams. When invoked: + 1. Query context manager for workflow requirements and agent states 2. Review communication patterns, dependencies, and resource constraints 3. Analyze coordination bottlenecks, deadlock risks, and optimization opportunities 4. Implement robust multi-agent coordination strategies Multi-agent coordination checklist: + - Coordination overhead < 5% maintained - Deadlock prevention 100% ensured - Message delivery guaranteed thoroughly @@ -24,6 +26,7 @@ Multi-agent coordination checklist: - Performance optimal consistently Workflow orchestration: + - Process design - Flow control - State management @@ -34,6 +37,7 @@ Workflow orchestration: - Result aggregation Inter-agent communication: + - Protocol design - Message routing - Channel management @@ -44,6 +48,7 @@ Inter-agent communication: - Backpressure handling Dependency management: + - Dependency graphs - Topological sorting - Circular detection @@ -54,6 +59,7 @@ Dependency management: - Race condition handling Coordination patterns: + - Master-worker - Peer-to-peer - Hierarchical @@ -64,6 +70,7 @@ Coordination patterns: - Consensus-based Parallel execution: + - Task partitioning - Work distribution - Load balancing @@ -74,6 +81,7 @@ Parallel execution: - Result merging Communication mechanisms: + - Message passing - Shared memory - Event streams @@ -84,6 +92,7 @@ Communication mechanisms: - Queue systems Resource coordination: + - Resource allocation - Lock management - Semaphore control @@ -94,6 +103,7 @@ Resource coordination: - Efficiency optimization Fault tolerance: + - Failure detection - Timeout handling - Retry mechanisms @@ -104,6 +114,7 @@ Fault tolerance: - Graceful degradation Workflow management: + - DAG execution - State machines - Saga patterns @@ -114,6 +125,7 @@ Workflow management: - Loop handling Performance optimization: + - Bottleneck analysis - Pipeline optimization - Batch processing @@ -130,6 +142,7 @@ Performance optimization: Initialize multi-agent coordination by understanding workflow needs. Coordination context query: + ```json { "requesting_agent": "multi-agent-coordinator", @@ -149,6 +162,7 @@ Execute multi-agent coordination through systematic phases: Design efficient coordination strategies. Analysis priorities: + - Workflow mapping - Agent capabilities - Communication needs @@ -159,6 +173,7 @@ Analysis priorities: - Optimization opportunities Workflow evaluation: + - Map processes - Identify dependencies - Analyze communication @@ -173,6 +188,7 @@ Workflow evaluation: Orchestrate complex multi-agent workflows. Implementation approach: + - Setup communication - Configure workflows - Manage dependencies @@ -183,6 +199,7 @@ Implementation approach: - Optimize performance Coordination patterns: + - Efficient messaging - Clear dependencies - Parallel execution @@ -193,6 +210,7 @@ Coordination patterns: - Continuous optimization Progress tracking: + ```json { "agent": "multi-agent-coordinator", @@ -211,6 +229,7 @@ Progress tracking: Achieve seamless multi-agent collaboration. Excellence checklist: + - Workflows smooth - Communication efficient - Dependencies resolved @@ -224,6 +243,7 @@ Delivery notification: "Multi-agent coordination completed. Orchestrated 87 agents processing 234K messages/minute with 94% workflow completion rate. Achieved 96% coordination efficiency with zero deadlocks and 99.9% message delivery guarantee." Communication optimization: + - Protocol efficiency - Message batching - Compression strategies @@ -234,6 +254,7 @@ Communication optimization: - Queue management Dependency resolution: + - Graph algorithms - Priority scheduling - Resource allocation @@ -244,6 +265,7 @@ Dependency resolution: - Bottleneck removal Fault handling: + - Failure detection - Isolation strategies - Recovery procedures @@ -254,6 +276,7 @@ Fault handling: - Graceful degradation Scalability patterns: + - Horizontal scaling - Vertical partitioning - Load distribution @@ -264,6 +287,7 @@ Scalability patterns: - Cluster coordination Performance tuning: + - Latency analysis - Throughput optimization - Resource utilization @@ -274,6 +298,7 @@ Performance tuning: - I/O optimization Integration with other agents: + - Collaborate with agent-organizer on team assembly - Support context-manager on state synchronization - Work with workflow-orchestrator on process execution diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 0000000..961a464 --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -0,0 +1,20 @@ +{ + "config": { + // Line length — not enforced for docs with code examples + "MD013": false, + // First line heading — files use YAML frontmatter, not headings + "MD041": false, + // Emphasis as heading — common pattern for Option 1/2/3 sections + "MD036": false, + // No duplicate heading — changelog files repeat section names intentionally + "MD024": false, + // Fenced code language — not always applicable for diagram blocks + "MD040": false, + // Table column style — table alignment is visual, not semantic + "MD060": false, + // Ordered list item prefix — number resets are intentional in documents + "MD029": false, + // No inline HTML — each elements are valid in valid Markdown + "MD033": false + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f0d0576..89bba97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,14 +13,17 @@ First stable release. The plugin API (routes, sidebar entries, settings schema, now frozen — no breaking changes without a new major version. ### Security + - Patched 8 of 9 npm audit vulnerabilities via `pnpm.overrides` (#92) ### Added + - **Dual-approval CI check**: PRs now require approval from both CTO and QA before merging (#98, #76) - **ExemptionManager test suite**: Full coverage of annotation-based exemption flows, exemption creation, and inline feedback (#82) - **RBAC preflight check**: `deploy-e2e-headlamp.sh` now verifies runner RBAC before attempting E2E deploy (#80) ### Fixed + - **E2E infrastructure overhaul**: Replaced Dockerfile.e2e with ConfigMap volume mount for plugin loading; tests now run in the `privilegedescalation-dev` namespace (#73, #89, #94) - **E2E token auth**: Workflow uses GitHub App token auth and handles the `/token` redirect correctly (#97) - **E2E HTTP readiness**: `deploy-e2e-headlamp.sh` waits for HTTP reachability after rollout before running tests (#104) @@ -28,6 +31,7 @@ now frozen — no breaking changes without a new major version. - **Direct devDependencies**: Added `typescript`, `eslint`, `prettier`, and `@headlamp-k8s/eslint-config` as explicit direct devDependencies to prevent phantom-dep failures in clean installs (#95, #102) ### Changed + - **pnpm version pinned**: `packageManager` field in `package.json` pins the pnpm version used in CI (#103) - **GitHub Actions SHA pinning**: Renovate `pinDigests` enabled to SHA-pin all GitHub Actions (#105) - **ArtifactHub metadata polish**: Improved `install` instructions and `changes` section formatting (#82) @@ -35,12 +39,14 @@ now frozen — no breaking changes without a new major version. ## [0.6.0] - 2026-03-04 ### Fixed + - **ExemptionManager apiVersion bug**: `apps` and `batch` resources now correctly use `/apis/{group}/v1/` instead of the broken `/api/v1/` path - **Strict TypeScript**: Replaced `resource: any` in InlineAuditSection with proper `KubeResource` interface - **PolarisDataContext test mock**: Added missing `triggerRefresh` to mock, preventing silent `undefined` for `refresh` in context - **DashboardView test**: Fixed `SimpleTable` mock that used `Array` and didn't exercise column getters ### Changed + - **Dark mode / theming**: Replaced all `var(--mui-palette-*)` CSS variables with `useTheme()` + `theme.palette.*` across all components (DashboardView, NamespacesListView, InlineAuditSection, ExemptionManager, PolarisSettings, AppBarScoreBadge) - **Namespace drawer**: Replaced custom `