aigent-team 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +150 -13
  2. package/dist/{chunk-U3NGK2UZ.js → chunk-OMO7OMKB.js} +264 -22
  3. package/dist/cli.js +1750 -217
  4. package/dist/index.d.ts +54 -0
  5. package/dist/index.js +1 -1
  6. package/package.json +1 -1
  7. package/templates/teams/ba/assets/story-template.md +49 -0
  8. package/templates/teams/ba/examples/acceptance-criteria.md +39 -0
  9. package/templates/teams/ba/output-contracts/user-story-rubric.md +33 -0
  10. package/templates/teams/ba/references/acceptance-criteria.md +7 -0
  11. package/templates/teams/ba/references/api-contract-design.md +7 -0
  12. package/templates/teams/ba/references/requirements-analysis.md +7 -0
  13. package/templates/teams/ba/references/user-story-mapping.md +7 -0
  14. package/templates/teams/ba/skills/requirement-validation.md +11 -0
  15. package/templates/teams/ba/skills/story-decomposition.md +16 -0
  16. package/templates/teams/be/references/api-design.md +7 -0
  17. package/templates/teams/be/references/async-processing.md +7 -0
  18. package/templates/teams/be/references/auth-security.md +7 -0
  19. package/templates/teams/be/references/caching.md +7 -0
  20. package/templates/teams/be/references/database.md +7 -0
  21. package/templates/teams/be/references/error-handling.md +7 -0
  22. package/templates/teams/be/references/observability.md +7 -0
  23. package/templates/teams/be/references/review-checklist.md +7 -0
  24. package/templates/teams/be/references/testing.md +7 -0
  25. package/templates/teams/be/skills/api-load-test.md +11 -0
  26. package/templates/teams/be/skills/database-migration.md +11 -0
  27. package/templates/teams/devops/references/ci-cd.md +7 -0
  28. package/templates/teams/devops/references/cost-optimization.md +7 -0
  29. package/templates/teams/devops/references/disaster-recovery.md +7 -0
  30. package/templates/teams/devops/references/docker.md +7 -0
  31. package/templates/teams/devops/references/infrastructure-as-code.md +7 -0
  32. package/templates/teams/devops/references/kubernetes.md +7 -0
  33. package/templates/teams/devops/references/monitoring.md +7 -0
  34. package/templates/teams/devops/references/review-checklist.md +7 -0
  35. package/templates/teams/devops/references/security.md +7 -0
  36. package/templates/teams/devops/scripts/health-check.sh +35 -0
  37. package/templates/teams/devops/skills/health-check.md +11 -0
  38. package/templates/teams/devops/skills/rollback-procedure.md +15 -0
  39. package/templates/teams/fe/examples/component-audit.md +35 -0
  40. package/templates/teams/fe/references/accessibility.md +7 -0
  41. package/templates/teams/fe/references/component-architecture.md +7 -0
  42. package/templates/teams/fe/references/css-styling.md +7 -0
  43. package/templates/teams/fe/references/forms.md +7 -0
  44. package/templates/teams/fe/references/performance.md +7 -0
  45. package/templates/teams/fe/references/review-checklist.md +7 -0
  46. package/templates/teams/fe/references/security.md +7 -0
  47. package/templates/teams/fe/references/state-management.md +7 -0
  48. package/templates/teams/fe/references/testing.md +7 -0
  49. package/templates/teams/fe/skills/analyze-bundle.md +16 -0
  50. package/templates/teams/fe/skills/component-audit.md +11 -0
  51. package/templates/teams/lead/references/cross-team-coordination.md +7 -0
  52. package/templates/teams/lead/references/quality-gates.md +7 -0
  53. package/templates/teams/lead/references/task-decomposition.md +7 -0
  54. package/templates/teams/lead/skills/parallel-orchestration.md +11 -0
  55. package/templates/teams/lead/skills/sprint-review.md +11 -0
  56. package/templates/teams/qa/assets/test-report-template.md +63 -0
  57. package/templates/teams/qa/output-contracts/test-plan-rubric.md +36 -0
  58. package/templates/teams/qa/references/ci-integration.md +7 -0
  59. package/templates/teams/qa/references/e2e-testing.md +7 -0
  60. package/templates/teams/qa/references/mocking.md +7 -0
  61. package/templates/teams/qa/references/performance-testing.md +7 -0
  62. package/templates/teams/qa/references/review-checklist.md +7 -0
  63. package/templates/teams/qa/references/security-testing.md +7 -0
  64. package/templates/teams/qa/references/test-data.md +7 -0
  65. package/templates/teams/qa/references/test-strategy.md +7 -0
  66. package/templates/teams/qa/skills/flaky-test-diagnosis.md +11 -0
  67. package/templates/teams/qa/skills/generate-test-data.md +15 -0
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: Component Audit Example
3
+ description: Example output of a frontend component audit report
4
+ skillRef: component-audit
5
+ tags: [fe, performance, accessibility]
6
+ ---
7
+
8
+ # Example: Component Audit Report
9
+
10
+ ## Component: `<DataTable>`
11
+
12
+ ### Summary
13
+ | Metric | Status | Notes |
14
+ |--------|--------|-------|
15
+ | Bundle size | ⚠️ Warning | 42 KB gzipped (target: <30 KB) |
16
+ | Render performance | ✅ Pass | 16ms initial, 4ms re-render (1000 rows) |
17
+ | Accessibility | ❌ Fail | Missing `aria-sort` on sortable columns |
18
+ | Test coverage | ✅ Pass | 87% line coverage |
19
+
20
+ ### Issues Found
21
+
22
+ 1. **[P1] Missing aria-sort on sortable columns**
23
+ - Impact: Screen readers cannot convey sort state
24
+ - Fix: Add `aria-sort="ascending|descending|none"` to `<th>` elements
25
+ - Effort: Small (< 1 hour)
26
+
27
+ 2. **[P2] Bundle size exceeds target**
28
+ - Impact: Adds ~12 KB over budget to page load
29
+ - Root cause: Inline SVG icons (14 KB) not tree-shaken
30
+ - Fix: Replace inline SVGs with icon sprite or lazy-load
31
+ - Effort: Medium (2-4 hours)
32
+
33
+ ### Recommendations
34
+ - Address P1 before next release (accessibility compliance)
35
+ - Schedule P2 for next sprint (performance budget)
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Accessibility (WCAG 2.1 AA)
3
+ description: Keyboard navigation, ARIA patterns, color contrast, screen reader support, and focus management rules.
4
+ whenToRead: When building or reviewing UI components for accessibility compliance
5
+ tags: [frontend, accessibility, wcag, aria]
6
+ ---
7
+
1
8
  # Accessibility (WCAG 2.1 AA)
2
9
 
3
10
  ## Keyboard Navigation
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Component Architecture
3
+ description: Props interface design, file structure conventions, composition patterns, and component responsibility boundaries.
4
+ whenToRead: When designing new components or refactoring existing component structure
5
+ tags: [frontend, components, architecture, react]
6
+ ---
7
+
1
8
  # Component Architecture
2
9
 
3
10
  ## Props Interface Design
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: CSS and Styling
3
+ description: Tailwind conventions, design token usage, responsive patterns, and styling best practices.
4
+ whenToRead: When writing or reviewing styles, Tailwind usage, or responsive layouts
5
+ tags: [frontend, css, tailwind, styling]
6
+ ---
7
+
1
8
  # CSS & Styling
2
9
 
3
10
  ## Tailwind Conventions
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Forms
3
+ description: React Hook Form with Zod validation patterns, error handling, and form UX best practices.
4
+ whenToRead: When building or reviewing form components and validation logic
5
+ tags: [frontend, forms, validation, react-hook-form]
6
+ ---
7
+
1
8
  # Forms
2
9
 
3
10
  ## Stack: React Hook Form + Zod
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Frontend Performance
3
+ description: Core Web Vitals targets, bundle analysis, render profiling, and lazy loading strategies.
4
+ whenToRead: When optimizing page load speed, bundle size, or runtime rendering performance
5
+ tags: [frontend, performance, web-vitals, optimization]
6
+ ---
7
+
1
8
  # Frontend Performance
2
9
 
3
10
  ## Core Web Vitals Targets
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Frontend Review Checklist
3
+ description: PR review checklist covering component design, rendering, accessibility, security, and testing standards.
4
+ whenToRead: When reviewing pull requests that include frontend component or UI changes
5
+ tags: [frontend, review, checklist, quality]
6
+ ---
7
+
1
8
  # Frontend Review Checklist
2
9
 
3
10
  ### Component Design
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Frontend Security
3
+ description: XSS prevention, content sanitization, CSP headers, auth token handling, and client-side security patterns.
4
+ whenToRead: When implementing or reviewing security-sensitive frontend code
5
+ tags: [frontend, security, xss, authentication]
6
+ ---
7
+
1
8
  # Frontend Security
2
9
 
3
10
  ## XSS Prevention
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: State Management
3
+ description: Decision tree for choosing state solutions, server state with React Query, and client state with Zustand/Jotai.
4
+ whenToRead: When deciding on state management approach or reviewing state-related code
5
+ tags: [frontend, state, react-query, zustand]
6
+ ---
7
+
1
8
  # State Management
2
9
 
3
10
  ## Decision Tree
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Frontend Testing
3
+ description: Behavior-driven testing philosophy, AAA pattern, component and integration test strategies, and coverage guidelines.
4
+ whenToRead: When writing or reviewing frontend tests or setting up test infrastructure
5
+ tags: [frontend, testing, vitest, react-testing-library]
6
+ ---
7
+
1
8
  # Frontend Testing
2
9
 
3
10
  ## Testing Philosophy
@@ -1,3 +1,19 @@
1
+ ---
2
+ name: Analyze Bundle Size
3
+ description: Analyze JavaScript bundle size and identify optimization opportunities
4
+ trigger: When adding new dependencies, investigating slow page loads, or performing a performance audit.
5
+ useCases:
6
+ - FE Agent performing dependency audit before a release
7
+ - Lead Agent requesting a performance review after adding new features
8
+ - FE Agent investigating slow page load times reported by QA
9
+ tags: [fe, performance, bundle, dependencies]
10
+ governance:
11
+ version: "1.0.0"
12
+ owner: fe-team
13
+ status: active
14
+ lastReviewedAt: "2025-03-15"
15
+ ---
16
+
1
17
  # Skill: Analyze Bundle Size
2
18
 
3
19
  **Trigger**: When adding new dependencies, investigating slow page loads, or performing a performance audit.
@@ -1,3 +1,14 @@
1
+ ---
2
+ name: Component Audit
3
+ description: Audit component library health by finding duplicates, dead code, and quality gaps
4
+ trigger: When reviewing component library health, finding duplicates, or preparing for a design system migration.
5
+ useCases:
6
+ - FE Agent cleaning up components before a design system migration
7
+ - Lead Agent assessing codebase health during sprint planning
8
+ - FE Agent identifying unused components for removal
9
+ tags: [fe, components, design-system, code-quality]
10
+ ---
11
+
1
12
  # Skill: Component Audit
2
13
 
3
14
  **Trigger**: When reviewing component library health, finding duplicates, or preparing for a design system migration.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Cross-Team Coordination
3
+ description: Patterns for managing API contract alignment, shared specs, and dependency resolution across frontend, backend, and other agent teams.
4
+ whenToRead: When orchestrating multi-team tasks or resolving cross-team dependencies and contract mismatches.
5
+ tags: [lead, coordination, contracts, cross-team]
6
+ ---
7
+
1
8
  # Cross-Team Coordination
2
9
 
3
10
  ## API Contract Alignment (FE ↔ BE)
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Quality Gates
3
+ description: Definition of done checklists and feature completeness criteria for validating subtask and release readiness.
4
+ whenToRead: When reviewing whether a subtask or feature meets completion criteria before sign-off.
5
+ tags: [lead, quality, definition-of-done, checklist]
6
+ ---
7
+
1
8
  # Quality Gates
2
9
 
3
10
  ## Definition of Done (per subtask)
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Task Decomposition
3
+ description: Framework for analyzing tasks, identifying dependencies, and breaking work into parallelizable single-agent subtasks.
4
+ whenToRead: When breaking down a new feature or task into subtasks for assignment to team agents.
5
+ tags: [lead, decomposition, planning, orchestration]
6
+ ---
7
+
1
8
  # Task Decomposition
2
9
 
3
10
  ## Analysis Framework
@@ -1,3 +1,14 @@
1
+ ---
2
+ name: Parallel Agent Orchestration
3
+ description: Coordinate multiple specialist agents working simultaneously on a shared feature
4
+ trigger: When implementing a feature that requires multiple specialist agents working simultaneously.
5
+ useCases:
6
+ - Lead Agent coordinating FE and BE agents building a new feature in parallel
7
+ - Lead Agent managing a cross-team effort with shared API contracts
8
+ - Lead Agent orchestrating BA, FE, BE, and QA agents for a full-stack deliverable
9
+ tags: [lead, orchestration, coordination, parallel]
10
+ ---
11
+
1
12
  # Skill: Parallel Agent Orchestration
2
13
 
3
14
  **Trigger**: When implementing a feature that requires multiple specialist agents working simultaneously.
@@ -1,3 +1,14 @@
1
+ ---
2
+ name: Sprint Review
3
+ description: Review completed sprint work for quality, completeness, and cross-team alignment
4
+ trigger: When reviewing completed work at the end of a sprint or milestone, assessing quality and completeness.
5
+ useCases:
6
+ - Lead Agent running end-of-sprint quality assessment across all teams
7
+ - Lead Agent preparing a sprint summary for stakeholders
8
+ - Lead Agent identifying carried-over work and technical debt for backlog grooming
9
+ tags: [lead, sprint, review, quality, planning]
10
+ ---
11
+
1
12
  # Skill: Sprint Review
2
13
 
3
14
  **Trigger**: When reviewing completed work at the end of a sprint or milestone, assessing quality and completeness.
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: Test Report Template
3
+ description: Standard template for test execution reports
4
+ format: markdown
5
+ tags: [qa, testing, template]
6
+ ---
7
+
8
+ # Test Report Template
9
+
10
+ ## Test Report: [Feature/Sprint Name]
11
+
12
+ **Date:** [YYYY-MM-DD]
13
+ **Tester:** [Name or Agent ID]
14
+ **Environment:** [staging / production / local]
15
+ **Build:** [Version or commit hash]
16
+
17
+ ### Summary
18
+
19
+ | Metric | Value |
20
+ |--------|-------|
21
+ | Total test cases | 0 |
22
+ | Passed | 0 |
23
+ | Failed | 0 |
24
+ | Blocked | 0 |
25
+ | Not executed | 0 |
26
+ | Pass rate | 0% |
27
+
28
+ ### Test Results by Category
29
+
30
+ #### Unit Tests
31
+ - **Status:** Pass / Fail
32
+ - **Coverage:** [X]%
33
+ - **Notes:** [Summary]
34
+
35
+ #### Integration Tests
36
+ - **Status:** Pass / Fail
37
+ - **Notes:** [Summary]
38
+
39
+ #### E2E Tests
40
+ - **Status:** Pass / Fail
41
+ - **Notes:** [Summary]
42
+
43
+ ### Failed Test Cases
44
+
45
+ | Test ID | Description | Expected | Actual | Severity |
46
+ |---------|-------------|----------|--------|----------|
47
+ | [ID] | [Description] | [Expected] | [Actual] | Critical/High/Medium/Low |
48
+
49
+ ### Blocked Test Cases
50
+
51
+ | Test ID | Description | Blocker |
52
+ |---------|-------------|---------|
53
+ | [ID] | [Description] | [Reason] |
54
+
55
+ ### Risks and Recommendations
56
+ - [Identified risks]
57
+ - [Recommended actions before release]
58
+
59
+ ### Sign-off
60
+ - [ ] All critical tests passed
61
+ - [ ] No open P0/P1 defects
62
+ - [ ] Performance within acceptable thresholds
63
+ - [ ] Ready for release: Yes / No
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Test Plan Quality Rubric
3
+ description: Self-validation checklist for QA agent test plan output
4
+ format: checklist
5
+ tags: [qa, quality]
6
+ ---
7
+
8
+ # Output Contract: Test Plan
9
+
10
+ Before delivering a test plan, validate against this rubric:
11
+
12
+ ## Structure (all required)
13
+ - [ ] Has a clear title and scope statement
14
+ - [ ] Links to the user story or feature being tested
15
+ - [ ] Includes test environment requirements
16
+ - [ ] Specifies entry and exit criteria
17
+
18
+ ## Test Coverage
19
+ - [ ] All acceptance criteria from the user story have corresponding test cases
20
+ - [ ] Happy path is covered with at least one positive test
21
+ - [ ] Error paths are covered (invalid input, network failures, auth failures)
22
+ - [ ] Boundary conditions are identified and tested
23
+ - [ ] Tests are categorized by type: unit, integration, E2E
24
+
25
+ ## Test Cases (each must have)
26
+ - [ ] Unique test case ID
27
+ - [ ] Clear preconditions
28
+ - [ ] Step-by-step actions
29
+ - [ ] Expected result for each step
30
+ - [ ] Priority (critical/high/medium/low)
31
+
32
+ ## Risk Assessment
33
+ - [ ] High-risk areas are identified
34
+ - [ ] Regression scope is defined
35
+ - [ ] Performance test needs are assessed
36
+ - [ ] Security test needs are assessed if applicable
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: CI Integration
3
+ description: Pipeline stage design, time budgets, test reporting, and failure response strategies for continuous integration.
4
+ whenToRead: When configuring CI pipeline test stages or troubleshooting test reporting and pipeline performance.
5
+ tags: [qa, ci, pipeline, reporting]
6
+ ---
7
+
1
8
  # CI Integration Reference
2
9
 
3
10
  ## Pipeline Stages
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: E2E Testing
3
+ description: Page Object Model patterns, selector strategies, and flakiness prevention techniques for end-to-end tests.
4
+ whenToRead: When writing or reviewing Playwright/Cypress E2E tests or debugging flaky end-to-end failures.
5
+ tags: [qa, e2e, playwright, page-object-model]
6
+ ---
7
+
1
8
  # E2E Testing Reference
2
9
 
3
10
  ## Page Object Model
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Mocking
3
+ description: Guidelines for mocking at system boundaries only, using MSW for HTTP mocks, and verifying mock-to-production contract fidelity.
4
+ whenToRead: When deciding what to mock, setting up MSW handlers, or reviewing tests that use mocks.
5
+ tags: [qa, mocking, msw, test-doubles]
6
+ ---
7
+
1
8
  # Mocking Reference
2
9
 
3
10
  ## Core Rule: Mock at System Boundaries Only
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Performance Testing
3
+ description: Load scenario types, k6 script templates, and threshold definitions for smoke, load, stress, soak, and spike tests.
4
+ whenToRead: When writing k6 performance scripts, defining load scenarios, or setting SLO-based thresholds.
5
+ tags: [qa, performance, k6, load-testing]
6
+ ---
7
+
1
8
  # Performance Testing Reference
2
9
 
3
10
  ## Load Scenario Types
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Test Code Review Checklist
3
+ description: Section-by-section checklist for reviewing PRs that add or modify test code, covering level selection, assertions, and isolation.
4
+ whenToRead: When reviewing any pull request that touches test files.
5
+ tags: [qa, review, checklist, code-review]
6
+ ---
7
+
1
8
  # Test Code Review Checklist
2
9
 
3
10
  Use this checklist when reviewing any PR that adds or modifies test code.
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Security Testing
3
+ description: OWASP Top 10 test coverage patterns, injection payload examples, and automated DAST scanning guidance.
4
+ whenToRead: When performing a security audit, writing injection tests, or setting up ZAP scans.
5
+ tags: [qa, security, owasp, dast]
6
+ ---
7
+
1
8
  # Security Testing Reference
2
9
 
3
10
  ## OWASP Top 10 — Test Coverage
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Test Data
3
+ description: Factory pattern examples and strategies for generating self-contained, isolated test data with sensible defaults.
4
+ whenToRead: When building test factories, seeding databases, or solving test data isolation problems.
5
+ tags: [qa, test-data, factories, fixtures]
6
+ ---
7
+
1
8
  # Test Data Reference
2
9
 
3
10
  ## Factory Pattern
@@ -1,3 +1,10 @@
1
+ ---
2
+ title: Test Strategy
3
+ description: Test pyramid enforcement ratios, time budgets per CI level, and mutation testing configuration guidance.
4
+ whenToRead: When planning a new test suite, reviewing pyramid balance, or setting up mutation testing.
5
+ tags: [qa, strategy, test-pyramid, mutation-testing]
6
+ ---
7
+
1
8
  # Test Strategy Reference
2
9
 
3
10
  ## Test Pyramid Enforcement
@@ -1,3 +1,14 @@
1
+ ---
2
+ name: Diagnose Flaky Test
3
+ description: Identify and fix the root cause of intermittently failing tests
4
+ trigger: When a test is intermittently failing in CI or locally, passing on retry but failing inconsistently.
5
+ useCases:
6
+ - QA Agent investigating a test that fails randomly in CI pipelines
7
+ - FE Agent debugging a component test that passes locally but fails in CI
8
+ - Lead Agent triaging a flaky test blocking a release
9
+ tags: [qa, testing, flaky-tests, debugging, ci]
10
+ ---
11
+
1
12
  # Skill: Diagnose Flaky Test
2
13
 
3
14
  **Trigger**: When a test is intermittently failing in CI or locally, passing on retry but failing inconsistently.
@@ -1,3 +1,18 @@
1
+ ---
2
+ name: Generate Test Data
3
+ description: Create factory functions, edge case data sets, and seed scripts for testing
4
+ trigger: When setting up test fixtures, creating seed data for E2E tests, or testing edge cases and boundary conditions.
5
+ useCases:
6
+ - QA Agent building test fixtures for a new feature's E2E test suite
7
+ - BE Agent creating seed data for integration tests with complex entity relationships
8
+ - QA Agent generating boundary-value data sets for input validation testing
9
+ tags: [qa, testing, test-data, fixtures, e2e]
10
+ governance:
11
+ version: "0.5.0"
12
+ status: deprecated
13
+ deprecatedReason: "Replaced by data-factory skill in v2.0"
14
+ ---
15
+
1
16
  # Skill: Generate Test Data
2
17
 
3
18
  **Trigger**: When setting up test fixtures, creating seed data for E2E tests, or testing edge cases and boundary conditions.