mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-17 23:28:04 +02:00
* fix: make the installer runtime pass strict supply-chain vetting
Remediate the four enterprise supply-chain vetting blockers from
affaan-m/ECC#2502 so the installer runtime (package.json + manifests +
scripts/lib/**) passes strict exact-pin evidence policy:
1. Remove the package.json `postinstall` lifecycle script (it only echoed a
post-install banner) and move that banner to an explicit opt-in
`npm run welcome` command. No install-time lifecycle script remains.
2. Exact-pin every dependency in package.json (dependencies + devDependencies)
to the versions already resolved in package-lock.json; no ^/~ ranges.
3. Replace non-ASCII characters on the installer runtime script/config surface:
em-dashes (U+2014) in scripts/lib/{path-safety,install-executor,
install/link-rewrite}.js comments and the two "Itô" (U+00F4) occurrences in
manifests/{install-components,install-modules}.json descriptions become
ASCII, so strict-surface Unicode scanners are clean.
4. Drop the bare `require("ajv")` from scripts/lib/install-state.js; the file
already carries a complete hand-rolled validator enforcing the same
schemas/install-state.schema.json (ecc.install.v1) constraints, so the
installer closure is dependency-free (zero non-builtin bare requires).
Refs affaan-m/ECC#2502
* fix: avoid unpinned welcome invocations
Signed-off-by: Samar Tomar <samar_tomar@hotmail.com>
* fix: validate translated skill frontmatter
Signed-off-by: Samar Tomar <samar_tomar@hotmail.com>
* fix: repair skill frontmatter YAML
Signed-off-by: Samar Tomar <samar_tomar@hotmail.com>
* fix: add MIT license to core skill manifests; pin verification-loop tsc invocation
* fix: preserve tsc/pyright exit status in verification-loop type-check (set -o pipefail)
* chore(deps): sync lockfiles with exact-pinned package.json
Regenerate package-lock.json and yarn.lock so the pinned dependency
specs are reflected in both lockfiles. npm ci and Yarn's --immutable
install now pass the sync check. The resolution tree is unchanged
(231 yarn resolutions, byte-identical set; zero npm transitive drift);
only the root descriptor strings move from ranges to the versions
already resolved in the committed lockfiles.
Addresses the Codex P1 on #2503.
---------
Signed-off-by: Samar Tomar <samar_tomar@hotmail.com>
Co-authored-by: Samarjeet Singh Tomar <samartomar@gmail.com>
96 lines
2.3 KiB
Markdown
96 lines
2.3 KiB
Markdown
---
|
|
name: benchmark
|
|
description: Use this skill to measure performance baselines, detect regressions before/after PRs, and compare stack alternatives.
|
|
license: MIT
|
|
metadata:
|
|
origin: ECC
|
|
---
|
|
|
|
# Benchmark — Performance Baseline & Regression Detection
|
|
|
|
## When to Use
|
|
|
|
- Before and after a PR to measure performance impact
|
|
- Setting up performance baselines for a project
|
|
- When users report "it feels slow"
|
|
- Before a launch — ensure you meet performance targets
|
|
- Comparing your stack against alternatives
|
|
|
|
## How It Works
|
|
|
|
### Mode 1: Page Performance
|
|
|
|
Measures real browser metrics via browser MCP:
|
|
|
|
```
|
|
1. Navigate to each target URL
|
|
2. Measure Core Web Vitals:
|
|
- LCP (Largest Contentful Paint) — target < 2.5s
|
|
- CLS (Cumulative Layout Shift) — target < 0.1
|
|
- INP (Interaction to Next Paint) — target < 200ms
|
|
- FCP (First Contentful Paint) — target < 1.8s
|
|
- TTFB (Time to First Byte) — target < 800ms
|
|
3. Measure resource sizes:
|
|
- Total page weight (target < 1MB)
|
|
- JS bundle size (target < 200KB gzipped)
|
|
- CSS size
|
|
- Image weight
|
|
- Third-party script weight
|
|
4. Count network requests
|
|
5. Check for render-blocking resources
|
|
```
|
|
|
|
### Mode 2: API Performance
|
|
|
|
Benchmarks API endpoints:
|
|
|
|
```
|
|
1. Hit each endpoint 100 times
|
|
2. Measure: p50, p95, p99 latency
|
|
3. Track: response size, status codes
|
|
4. Test under load: 10 concurrent requests
|
|
5. Compare against SLA targets
|
|
```
|
|
|
|
### Mode 3: Build Performance
|
|
|
|
Measures development feedback loop:
|
|
|
|
```
|
|
1. Cold build time
|
|
2. Hot reload time (HMR)
|
|
3. Test suite duration
|
|
4. TypeScript check time
|
|
5. Lint time
|
|
6. Docker build time
|
|
```
|
|
|
|
### Mode 4: Before/After Comparison
|
|
|
|
Run before and after a change to measure impact:
|
|
|
|
```
|
|
/benchmark baseline # saves current metrics
|
|
# ... make changes ...
|
|
/benchmark compare # compares against baseline
|
|
```
|
|
|
|
Output:
|
|
```
|
|
| Metric | Before | After | Delta | Verdict |
|
|
|--------|--------|-------|-------|---------|
|
|
| LCP | 1.2s | 1.4s | +200ms | WARNING: WARN |
|
|
| Bundle | 180KB | 175KB | -5KB | ✓ BETTER |
|
|
| Build | 12s | 14s | +2s | WARNING: WARN |
|
|
```
|
|
|
|
## Output
|
|
|
|
Stores baselines in `.ecc/benchmarks/` as JSON. Git-tracked so the team shares baselines.
|
|
|
|
## Integration
|
|
|
|
- CI: run `/benchmark compare` on every PR
|
|
- Pair with `/canary-watch` for post-deploy monitoring
|
|
- Pair with `/browser-qa` for full pre-ship checklist
|