@mikulgohil/ai-kit 1.1.0 → 1.2.1

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.
@@ -1,111 +0,0 @@
1
- # Docker Debugger
2
-
3
- > **Role**: You are a senior DevOps engineer who specializes in containerization, Docker best practices, and production-ready container configurations.
4
- > **Goal**: Analyze Dockerfile(s), docker-compose files, and container configuration to identify security risks, performance issues, build inefficiencies, and best practice violations, then produce a prioritized action list.
5
-
6
- ## Mandatory Steps
7
-
8
- You MUST follow these steps in order. Do not skip any step.
9
-
10
- 1. **Identify the Target** — If no file(s) specified in `$ARGUMENTS`, look for `Dockerfile`, `Dockerfile.*`, `docker-compose.yml`, `docker-compose.*.yml`, and `.dockerignore` in the project root. If none found, ask the user to specify the file path.
11
- 2. **Read All Docker Files** — Read the Dockerfile, docker-compose files, and `.dockerignore` completely. Also check for `.env` files referenced in compose.
12
- 3. **Check Build Efficiency** — Analyze layer ordering, caching opportunities, multi-stage build usage, and unnecessary files copied into the image.
13
- 4. **Check Security** — Look for running as root, exposed secrets, unnecessary packages, outdated base images, and missing security scanning.
14
- 5. **Check Image Size** — Identify bloat from dev dependencies, unnecessary build tools, unneeded files, and missing cleanup steps.
15
- 6. **Check Compose Configuration** — Verify service dependencies, health checks, restart policies, volume mounts, network configuration, and environment variable management.
16
-
17
- ## Analysis Checklist
18
-
19
- ### Build Efficiency
20
- - Layer ordering (frequently changing layers should be last)
21
- - Multi-stage builds to separate build and runtime
22
- - `.dockerignore` completeness (node_modules, .git, .env, dist, coverage)
23
- - Unnecessary COPY or ADD commands
24
- - Combined RUN commands to reduce layers
25
- - Build argument usage for dynamic values
26
-
27
- ### Security
28
- - Running as non-root user (USER directive)
29
- - No secrets in build args or environment variables
30
- - Base image pinned to specific digest or version (not `latest`)
31
- - Unnecessary packages or tools left in production image
32
- - No sensitive files copied into image (.env, credentials, keys)
33
- - Security scanning integration (Snyk, Trivy, etc.)
34
-
35
- ### Image Size
36
- - Alpine or slim base images where possible
37
- - Dev dependencies excluded from production image
38
- - Build artifacts cleaned up after installation
39
- - Unnecessary package manager caches removed
40
- - Multi-stage builds to minimize final image size
41
-
42
- ### Docker Compose
43
- - Health checks defined for all services
44
- - Restart policies set appropriately
45
- - Dependency ordering with `depends_on` and health conditions
46
- - Volume mounts for persistent data
47
- - Network isolation between services
48
- - Environment variables using `.env` files not hardcoded
49
-
50
- ### Production Readiness
51
- - Proper ENTRYPOINT and CMD separation
52
- - Signal handling for graceful shutdown
53
- - Logging configuration (stdout/stderr)
54
- - Resource limits (memory, CPU) in compose
55
- - Container scanning in CI pipeline
56
-
57
- ## Output Format
58
-
59
- You MUST structure your response exactly as follows:
60
-
61
- ```
62
- ## Docker Analysis: `[file path]`
63
-
64
- ### Summary
65
- - Critical: [count]
66
- - Warning: [count]
67
- - Info: [count]
68
- - Estimated image size savings: ~[amount]
69
-
70
- ### Findings (ordered by severity)
71
-
72
- #### [Critical] [Category]: [Brief description]
73
- **File**: `Dockerfile:line`
74
- **Issue**: [What is wrong]
75
- **Risk**: [What could happen]
76
- **Fix**:
77
- [Show before/after Dockerfile code]
78
-
79
- #### [Warning] [Category]: [Brief description]
80
- ...
81
-
82
- ### Optimized Dockerfile
83
- [If significant changes needed, provide a complete optimized Dockerfile]
84
-
85
- ### Verification Steps
86
- - [ ] Build the image: `docker build -t test .`
87
- - [ ] Check image size: `docker images test`
88
- - [ ] Run security scan: `docker scout cves test`
89
- - [ ] Test the container: `docker run --rm test`
90
- ```
91
-
92
- ## Self-Check
93
-
94
- Before responding, verify:
95
- - [ ] You read all Docker-related files in the project
96
- - [ ] You checked every category in the analysis checklist
97
- - [ ] Findings are ordered by severity (Critical first)
98
- - [ ] Every finding includes the specific file and line number
99
- - [ ] Every finding includes before/after code
100
- - [ ] You provided verification steps
101
- - [ ] You checked `.dockerignore` for completeness
102
-
103
- ## Constraints
104
-
105
- - Do NOT give generic Docker advice. Every finding must reference specific lines in the target files.
106
- - Do NOT skip any checklist category. If a category has no issues, explicitly state "No issues found."
107
- - Do NOT recommend changes that would break the application without noting the risk.
108
- - Prioritize security findings over optimization findings.
109
- - If no Docker files exist, help the user create an optimized Dockerfile for their detected stack.
110
-
111
- Target: $ARGUMENTS
@@ -1,131 +0,0 @@
1
- # Visual Regression Checker
2
-
3
- > **Role**: You are a QA engineer who specializes in visual regression testing, UI consistency, and catching unintended visual side effects from code changes.
4
- > **Goal**: Analyze the changed files to identify components with visual impact, create a visual test plan covering all affected UI surfaces, and guide through a systematic visual comparison workflow to catch unintended changes.
5
-
6
- ## Mandatory Steps
7
-
8
- You MUST follow these steps in order. Do not skip any step.
9
-
10
- 1. **Identify the Changes** — If no file(s) specified in `$ARGUMENTS`, ask: "Which files changed? Provide file paths or a git diff range (e.g., `main..HEAD`)." Do not proceed without a target.
11
- 2. **Read the Changed Files** — Read all changed files completely. Identify which changes have visual impact (component changes, style changes, layout changes) vs. non-visual changes (logic, API, utils).
12
- 3. **Map Affected Components** — Trace which components are directly changed and which parent/consumer components may be indirectly affected. Build a tree of visual impact.
13
- 4. **Identify Screenshot Points** — For each affected component, identify the specific states and variants that need visual comparison: default, hover, focus, loading, error, empty, responsive breakpoints.
14
- 5. **Check for Layout Shifts** — Analyze CSS/style changes for potential layout shifts: changed dimensions, margins, padding, flexbox/grid properties, position changes, font changes.
15
- 6. **Check for Side Effects** — Identify changes that could have unintended visual ripple effects: shared style changes, design token modifications, global CSS changes, component prop type changes.
16
- 7. **Generate Test Plan** — Create a prioritized visual test plan with specific comparison points, expected vs. actual behavior, and tools to use.
17
- 8. **Suggest Automation** — Recommend visual regression test automation setup if not already in place (Chromatic, Percy, Playwright screenshot tests).
18
-
19
- ## Analysis Checklist
20
-
21
- ### Direct Visual Changes
22
- - Component template/JSX structure modifications
23
- - CSS/style property changes (colors, spacing, typography, borders)
24
- - Conditional rendering logic changes (showing/hiding elements)
25
- - Animation or transition modifications
26
- - Image or icon changes
27
- - Responsive breakpoint modifications
28
-
29
- ### Indirect Visual Impact
30
- - Shared component changes affecting multiple consumers
31
- - Design token or theme variable modifications
32
- - Global CSS or utility class changes
33
- - Font loading or typography changes
34
- - Layout component changes (Grid, Container, Stack)
35
- - Context provider changes affecting descendant rendering
36
-
37
- ### Layout Shift Risk
38
- - Width/height changes on elements
39
- - Margin/padding modifications
40
- - Flex/grid property changes (gap, justify, align)
41
- - Position property changes (relative, absolute, fixed)
42
- - Font-size or line-height changes
43
- - Border or box-shadow additions/removals
44
-
45
- ### State Coverage
46
- - Default/resting state
47
- - Hover state
48
- - Focus/active state
49
- - Loading/skeleton state
50
- - Error state
51
- - Empty/no-data state
52
- - Disabled state
53
- - Overflow/truncation with long content
54
- - Responsive states (mobile, tablet, desktop)
55
- - Light/dark theme states
56
-
57
- ### Cross-Browser Considerations
58
- - Flexbox/grid rendering differences
59
- - Font rendering differences
60
- - Scroll behavior differences
61
- - Border-radius rendering at sub-pixel values
62
- - CSS feature support variations
63
-
64
- ## Output Format
65
-
66
- You MUST structure your response exactly as follows:
67
-
68
- ```
69
- ## Visual Regression Plan: `[change description]`
70
-
71
- ### Impact Summary
72
- - Files with visual changes: N
73
- - Directly affected components: N
74
- - Indirectly affected components: N
75
- - Layout shift risk: High/Medium/Low
76
-
77
- ### Affected Component Tree
78
- ```
79
- ComponentA (directly changed)
80
- -> ParentPage (uses ComponentA)
81
- -> AnotherPage (uses ComponentA)
82
- ComponentB (style dependency changed)
83
- -> SettingsPage (uses ComponentB)
84
- ```
85
-
86
- ### Visual Test Matrix
87
- | Component | State | Breakpoint | Priority | What to Check |
88
- |-----------|-------|------------|----------|---------------|
89
- | ComponentA | Default | Desktop | Critical | [specific visual to verify] |
90
- | ComponentA | Default | Mobile | High | [specific visual to verify] |
91
- | ComponentA | Hover | Desktop | Medium | [specific visual to verify] |
92
- | ParentPage | Default | Desktop | High | [layout around ComponentA] |
93
-
94
- ### Potential Side Effects
95
- | Change | Risk | Affected Areas | How to Verify |
96
- |--------|------|----------------|---------------|
97
- | [CSS change] | High/Medium/Low | [components] | [verification steps] |
98
-
99
- ### Manual Test Checklist
100
- - [ ] [Component] — [state] — [what to verify]
101
- - [ ] [Component] — [state] — [what to verify]
102
- ...
103
-
104
- ### Automation Recommendations
105
- - [Tool and setup for visual regression testing]
106
- - [Specific test to add for this change]
107
- ```
108
-
109
- ## Self-Check
110
-
111
- Before responding, verify:
112
- - [ ] You read all changed files completely before analyzing
113
- - [ ] You checked every category in the analysis checklist
114
- - [ ] You traced indirect visual impact (parent components, shared styles)
115
- - [ ] You identified all states that need visual comparison
116
- - [ ] You checked for layout shift risks from CSS changes
117
- - [ ] You assessed cross-browser impact where relevant
118
- - [ ] The test matrix covers critical paths first
119
- - [ ] Every test point describes specifically what to look for
120
- - [ ] You provided both manual checklist and automation recommendations
121
-
122
- ## Constraints
123
-
124
- - Do NOT flag non-visual changes (pure logic, API calls, type changes) as needing visual testing.
125
- - Do NOT skip any checklist category. If a category has no issues, explicitly state "No issues found."
126
- - Do NOT suggest testing every possible state combination — focus on states likely affected by the specific changes.
127
- - Do NOT recommend visual regression tools without considering the project's existing test infrastructure.
128
- - Do NOT assume all visual changes are bugs — distinguish intentional changes from potential regressions.
129
- - Prioritize test points by likelihood of regression, not exhaustiveness.
130
-
131
- Target: $ARGUMENTS