mandrel 2.3.0 → 2.5.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.
- package/.agents/audit-checklists/accessibility.md +29 -0
- package/.agents/audit-checklists/architecture.md +4 -5
- package/.agents/audit-checklists/clean-code.md +10 -0
- package/.agents/audit-checklists/data-model.md +22 -0
- package/.agents/audit-checklists/dependencies.md +11 -2
- package/.agents/audit-checklists/devops.md +4 -0
- package/.agents/audit-checklists/navigability.md +3 -0
- package/.agents/audit-checklists/performance.md +8 -11
- package/.agents/audit-checklists/privacy.md +3 -4
- package/.agents/audit-checklists/quality.md +2 -0
- package/.agents/audit-checklists/security.md +4 -5
- package/.agents/audit-checklists/seo.md +7 -1
- package/.agents/audit-checklists/sre.md +14 -12
- package/.agents/audit-checklists/ux-ui.md +4 -0
- package/.agents/docs/configuration.md +3 -0
- package/.agents/docs/workflows.md +4 -3
- package/.agents/schemas/agentrc.schema.json +17 -0
- package/.agents/schemas/audit-rules.json +134 -19
- package/.agents/schemas/audit-rules.schema.json +6 -2
- package/.agents/scripts/audit-labels-bootstrap.js +4 -4
- package/.agents/scripts/audit-to-stories.js +244 -19
- package/.agents/scripts/lib/audit-suite/checklist-threading.js +26 -3
- package/.agents/scripts/lib/audit-suite/dispatch-checklist.js +132 -0
- package/.agents/scripts/lib/audit-suite/index.js +1 -0
- package/.agents/scripts/lib/audit-suite/selector.js +290 -14
- package/.agents/scripts/lib/audit-to-stories/audit-lenses.js +2 -1
- package/.agents/scripts/lib/audit-to-stories/build-story-body.js +5 -1
- package/.agents/scripts/lib/audit-to-stories/dedupe-against-github.js +23 -3
- package/.agents/scripts/lib/audit-to-stories/finding-adapter.js +38 -0
- package/.agents/scripts/lib/audit-to-stories/ledger.js +256 -0
- package/.agents/scripts/lib/audit-to-stories/parse-audit-md.js +41 -7
- package/.agents/scripts/lib/audit-to-stories/seed-from-findings.js +20 -2
- package/.agents/scripts/lib/command-header.js +1 -1
- package/.agents/scripts/lib/config-settings-schema-delivery.js +21 -0
- package/.agents/scripts/lib/dynamic-workflow/performance-report-contract.js +5 -3
- package/.agents/scripts/lib/feedback-loop/audit-results-graduator.js +56 -0
- package/.agents/scripts/lib/findings/route-finding.js +108 -10
- package/.agents/scripts/lib/observability/runtime-friction.js +62 -0
- package/.agents/scripts/lib/orchestration/resolve-stories.js +9 -1
- package/.agents/scripts/lib/orchestration/retro-proposals.js +49 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/post-land.js +73 -15
- package/.agents/scripts/lib/orchestration/story-close/phases/local-lens-review.js +81 -1
- package/.agents/scripts/lib/orchestration/story-close/phases/review-core.js +1 -0
- package/.agents/scripts/lib/orchestration/ticket-lease.js +78 -10
- package/.agents/scripts/lib/orchestration/ticketing/transition.js +68 -16
- package/.agents/scripts/lib/single-story-sweep/sweep-lock.js +73 -0
- package/.agents/scripts/lib/wave-runner/live-probe.js +93 -12
- package/.agents/scripts/nav-registry-diff.js +449 -0
- package/.agents/scripts/single-story-init.js +189 -51
- package/.agents/scripts/stories-wave-tick.js +39 -2
- package/.agents/workflows/audit-accessibility.md +243 -0
- package/.agents/workflows/audit-architecture.md +89 -71
- package/.agents/workflows/audit-clean-code.md +87 -53
- package/.agents/workflows/audit-data-model.md +198 -0
- package/.agents/workflows/audit-dependencies.md +143 -28
- package/.agents/workflows/audit-devops.md +109 -18
- package/.agents/workflows/audit-documentation.md +25 -53
- package/.agents/workflows/audit-navigability.md +78 -22
- package/.agents/workflows/audit-performance.md +207 -103
- package/.agents/workflows/audit-privacy.md +51 -13
- package/.agents/workflows/audit-quality.md +71 -61
- package/.agents/workflows/audit-security.md +94 -71
- package/.agents/workflows/audit-seo.md +80 -25
- package/.agents/workflows/audit-sre.md +99 -66
- package/.agents/workflows/audit-to-stories.md +44 -5
- package/.agents/workflows/audit-ux-ui.md +71 -17
- package/.agents/workflows/deliver.md +32 -8
- package/.agents/workflows/helpers/audit-dual-path.md +59 -0
- package/.agents/workflows/helpers/audit-self-check.md +70 -0
- package/.agents/workflows/helpers/audit-severity-scale.md +19 -0
- package/.agents/workflows/helpers/deliver-story.md +25 -0
- package/docs/CHANGELOG.md +29 -0
- package/package.json +1 -1
- package/.agents/audit-checklists/lighthouse.md +0 -15
- package/.agents/schemas/audit-results.schema.json +0 -69
- package/.agents/workflows/audit-lighthouse.md +0 -269
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- GENERATED FILE — do not edit by hand.
|
|
2
|
+
Source of truth: .agents/workflows/audit-accessibility.md
|
|
3
|
+
Regenerate: node .agents/scripts/generate-lens-checklists.js
|
|
4
|
+
Drift is gated by: npm run docs:check
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Accessibility (WCAG) Audit — authoring checklist
|
|
8
|
+
|
|
9
|
+
> Audit WCAG accessibility conformance (static-first) with an optional runtime verification pass, and produce a structured findings report
|
|
10
|
+
|
|
11
|
+
Self-check your change against this lens's concerns before you ship:
|
|
12
|
+
|
|
13
|
+
- [ ] `audit-accessibility` (this lens)
|
|
14
|
+
- [ ] `audit-ux-ui`
|
|
15
|
+
- [ ] Renderable surface
|
|
16
|
+
- [ ] Static a11y tooling already in the repo
|
|
17
|
+
- [ ] Design tokens
|
|
18
|
+
- [ ] Runtime target (optional)
|
|
19
|
+
- [ ] Semantic structure
|
|
20
|
+
- [ ] ARIA correctness
|
|
21
|
+
- [ ] Keyboard operability & focus management
|
|
22
|
+
- [ ] Forms & labels
|
|
23
|
+
- [ ] Media alternatives
|
|
24
|
+
- [ ] Contrast where statically derivable
|
|
25
|
+
- [ ] Raw-element census
|
|
26
|
+
- [ ] Resolve the target from config — never a hardcoded URL.
|
|
27
|
+
- [ ] Sample routes from the navigability SSOT.
|
|
28
|
+
- [ ] Run an accessibility engine per sampled route.
|
|
29
|
+
- [ ] Median-of-3 or provisional.
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
+
- [ ] Cycle detection.
|
|
14
|
+
- [ ] Dead-export detection.
|
|
15
|
+
- [ ] Hotspot ranking.
|
|
16
|
+
- [ ] LLM triage on top.
|
|
13
17
|
- [ ] Documented architecture boundaries
|
|
14
18
|
- [ ] Automated boundary checks
|
|
15
|
-
- [ ] Over-Engineering & Abstractions
|
|
16
|
-
- [ ] Cognitive Load & Nesting
|
|
17
|
-
- [ ] Dead Code & Redundancy
|
|
18
|
-
- [ ] Naming & Self-Documentation
|
|
19
|
-
- [ ] Coupling & Cohesion
|
|
20
19
|
- [ ] Testable Surface (Humble-Object Boundary)
|
|
21
20
|
- [ ] High
|
|
22
21
|
- [ ] Medium
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
+
- [ ] Complexity / maintainability (scoped mode).
|
|
14
|
+
- [ ] Committed baselines (codebase-wide mode).
|
|
15
|
+
- [ ] Duplication.
|
|
16
|
+
- [ ] Dead code.
|
|
17
|
+
- [ ] Entry points
|
|
18
|
+
- [ ] Public API surface
|
|
19
|
+
- [ ] Dynamic imports
|
|
20
|
+
- [ ] Test-only seams
|
|
21
|
+
- [ ] Framework/registration hooks
|
|
22
|
+
- [ ] Churn-by-complexity hotspot cap.
|
|
13
23
|
- [ ] Logic Complexity
|
|
14
24
|
- [ ] Duplication
|
|
15
25
|
- [ ] Component Health
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- GENERATED FILE — do not edit by hand.
|
|
2
|
+
Source of truth: .agents/workflows/audit-data-model.md
|
|
3
|
+
Regenerate: node .agents/scripts/generate-lens-checklists.js
|
|
4
|
+
Drift is gated by: npm run docs:check
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Data Model & Persistence Audit — authoring checklist
|
|
8
|
+
|
|
9
|
+
> Audit the persistence layer as a first-class artifact — model↔migration↔seed drift, constraint completeness, migration hygiene, type fidelity, and access-pattern fit; gated by a persistence-layer applicability probe so DB-less repos skip cleanly.
|
|
10
|
+
|
|
11
|
+
Self-check your change against this lens's concerns before you ship:
|
|
12
|
+
|
|
13
|
+
- [ ] ORM drift tooling (preferred)
|
|
14
|
+
- [ ] Read-only file fallback
|
|
15
|
+
- [ ] Model & schema inventory
|
|
16
|
+
- [ ] Migration history
|
|
17
|
+
- [ ] Seed & fixture data
|
|
18
|
+
- [ ] Model↔migration↔seed drift
|
|
19
|
+
- [ ] Constraint completeness
|
|
20
|
+
- [ ] Migration hygiene
|
|
21
|
+
- [ ] Type fidelity
|
|
22
|
+
- [ ] Access-pattern fit
|
|
@@ -10,5 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
-
- [ ]
|
|
14
|
-
- [ ]
|
|
13
|
+
- [ ] Outdated inventory.
|
|
14
|
+
- [ ] Unused dependencies.
|
|
15
|
+
- [ ] Staleness.
|
|
16
|
+
- [ ] Node-engine drift.
|
|
17
|
+
- [ ] Two-pass audit diff.
|
|
18
|
+
- [ ] Severity rubric.
|
|
19
|
+
- [ ] Report shape — no flooding.
|
|
20
|
+
- [ ] Enumerate the delta.
|
|
21
|
+
- [ ] Provenance.
|
|
22
|
+
- [ ] New install scripts.
|
|
23
|
+
- [ ] Typosquat near-misses.
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
+
- [ ] Workflow static analysis (`actionlint`).
|
|
14
|
+
- [ ] Workflow security posture (`zizmor`).
|
|
15
|
+
- [ ] Container linting (`hadolint`), presence-gated on Dockerfiles.
|
|
16
|
+
- [ ] Pipeline reliability history (`gh run list`).
|
|
13
17
|
- [ ] Redundancy & Duplication
|
|
14
18
|
- [ ] Performance Gaps
|
|
15
19
|
- [ ] Security & Compliance
|
|
@@ -6,17 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
# Performance & Bottleneck Audit — authoring checklist
|
|
8
8
|
|
|
9
|
-
> Audit hot paths,
|
|
9
|
+
> Audit performance by measuring first — profile hot paths, I/O, memory, and payload against the repo's own numbers — and audit interleaving/partial-failure correctness (TOCTOU, unawaited promises, non-atomic writes) as a first-class dimension.
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
-
- [ ]
|
|
14
|
-
- [ ]
|
|
15
|
-
- [ ]
|
|
16
|
-
- [ ]
|
|
17
|
-
- [ ]
|
|
18
|
-
- [ ]
|
|
19
|
-
- [ ]
|
|
20
|
-
- [ ] Efficiency
|
|
21
|
-
- [ ] Scalability
|
|
22
|
-
- [ ] Core Web Vitals
|
|
13
|
+
- [ ] Diff against the previous baseline
|
|
14
|
+
- [ ] Suppress unchanged known findings.
|
|
15
|
+
- [ ] CPU & algorithmic hot paths
|
|
16
|
+
- [ ] I/O & syscall efficiency
|
|
17
|
+
- [ ] Memory & leaks
|
|
18
|
+
- [ ] Payload & bundle (web only)
|
|
19
|
+
- [ ] Interleaving & partial-failure correctness
|
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
-
- [ ]
|
|
14
|
-
- [ ]
|
|
15
|
-
- [ ]
|
|
16
|
-
- [ ] Analytics
|
|
13
|
+
- [ ] Enumerate the sinks.
|
|
14
|
+
- [ ] Secret scan.
|
|
15
|
+
- [ ] Trace PII sources to the enumerated sinks.
|
|
17
16
|
- [ ] Data Minimization
|
|
18
17
|
- [ ] Leaky Logging
|
|
19
18
|
- [ ] Insecure Transmission
|
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
-
- [ ]
|
|
14
|
-
- [ ]
|
|
15
|
-
- [ ]
|
|
16
|
-
- [ ]
|
|
17
|
-
- [ ] Secret Management
|
|
13
|
+
- [ ] Dependency CVEs (`npm audit`).
|
|
14
|
+
- [ ] Secret scanning (`gitleaks` / `trufflehog`), with a grep fallback.
|
|
15
|
+
- [ ] Grep battery (deterministic fallback / augmentation).
|
|
16
|
+
- [ ] Manual surface review.
|
|
18
17
|
- [ ] Injection
|
|
19
18
|
- [ ] Broken Access Control
|
|
20
19
|
- [ ] Cryptographic Failures
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
+
- [ ] Auth-walled / private surface
|
|
14
|
+
- [ ] Publicly indexable surface
|
|
15
|
+
- [ ] Mixed
|
|
16
|
+
- [ ] Step 1a — Identify the meta mechanism.
|
|
17
|
+
- [ ] Step 1b — Enumerate the routes.
|
|
18
|
+
- [ ] Step 1c — Per-route metadata probe.
|
|
13
19
|
- [ ] Traditional SEO
|
|
14
20
|
- [ ] AIO & GEO (Answer Engine Optimization)
|
|
15
|
-
- [ ] Core Web Vitals
|
|
21
|
+
- [ ] Statically-provable Core Web Vitals defects only
|
|
16
22
|
- [ ] Crawlability
|
|
@@ -10,15 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
-
- [ ]
|
|
14
|
-
- [ ]
|
|
15
|
-
- [ ]
|
|
16
|
-
- [ ]
|
|
17
|
-
- [ ]
|
|
18
|
-
- [ ]
|
|
19
|
-
- [ ]
|
|
20
|
-
- [ ]
|
|
21
|
-
- [ ]
|
|
22
|
-
- [ ]
|
|
23
|
-
- [ ]
|
|
24
|
-
- [ ]
|
|
13
|
+
- [ ] Run the resilience battery.
|
|
14
|
+
- [ ] Rollback Path
|
|
15
|
+
- [ ] Migration Reversibility
|
|
16
|
+
- [ ] Feature-Flag Kill Switch
|
|
17
|
+
- [ ] Structured Logging
|
|
18
|
+
- [ ] Metrics & Tracing
|
|
19
|
+
- [ ] Alerting & SLOs
|
|
20
|
+
- [ ] Timeouts & Cancellation
|
|
21
|
+
- [ ] Retry & Backoff
|
|
22
|
+
- [ ] Graceful Shutdown
|
|
23
|
+
- [ ] Error Boundaries
|
|
24
|
+
- [ ] Runbook Coverage
|
|
25
|
+
- [ ] Health & Readiness
|
|
26
|
+
- [ ] On-Call Escalation
|
|
@@ -10,8 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
Self-check your change against this lens's concerns before you ship:
|
|
12
12
|
|
|
13
|
+
- [ ] Design tokens / theme
|
|
14
|
+
- [ ] Component library
|
|
15
|
+
- [ ] Documented conventions
|
|
13
16
|
- [ ] Hardcoded Values
|
|
14
17
|
- [ ] Component Re-implementation
|
|
18
|
+
- [ ] Inline-style census
|
|
15
19
|
- [ ] Interactive States
|
|
16
20
|
- [ ] Typography
|
|
17
21
|
- [ ] Information Hierarchy
|
|
@@ -280,6 +280,9 @@ top-level keys are validation errors.
|
|
|
280
280
|
| `feedbackLoop` | No | `object` | — | Nested configuration block. |
|
|
281
281
|
| `feedbackLoop.auditResultsAutoFile` | No | `boolean` | `true` | When true (default), the close-time audit-results graduator auto-files non-blocking audit-results findings as follow-up issues routed by source classification. Set to false to suppress auto-filing; findings remain accessible in the structured comments on the Story. |
|
|
282
282
|
| `feedbackLoop.retroProposals` | No | `boolean` | `true` | When true (default), the retro auto-files its actionable routed proposals as meta::<framework-gap\|consumer-improvement> + friction::<category> issues via the graduator pre-parsed-findings seam, and the rendered retro sections list the filed issue numbers instead of paste-ready gh command stanzas. Set to false to fall back to the command stanzas. |
|
|
283
|
+
| `auditToStories` | No | `object` | — | Nested configuration block. |
|
|
284
|
+
| `auditToStories.severityFloor` | No | `"critical"` \| `"high"` \| `"medium"` \| `"low"` \| `"all"` | `"high"` | Minimum severity a finding must meet to be proposed as a Story on an unattended `/audit-to-stories --auto` sweep (Story #4626). Default high. |
|
|
285
|
+
| `auditToStories.autoComment` | No | `boolean` | `true` | When true (default), `/audit-to-stories --auto` posts a re-detected comment on an already-open matched Issue instead of silently skipping it. |
|
|
283
286
|
|
|
284
287
|
<!-- END GENERATED:agentrc -->
|
|
285
288
|
|
|
@@ -32,18 +32,19 @@ by `node .agents/scripts/generate-workflows-doc.js`; `npm run docs:check`
|
|
|
32
32
|
fails when it drifts from the on-disk workflow set. To change a command’s
|
|
33
33
|
description, edit the workflow file’s front-matter and regenerate.
|
|
34
34
|
|
|
35
|
-
## Commands (
|
|
35
|
+
## Commands (24)
|
|
36
36
|
|
|
37
37
|
| Command | Description |
|
|
38
38
|
| --- | --- |
|
|
39
|
+
| `/audit-accessibility` | Audit WCAG accessibility conformance (static-first) with an optional runtime verification pass, and produce a structured findings report |
|
|
39
40
|
| `/audit-architecture` | Audit architectural boundaries, module coupling, and layering violations; emit a structured findings report keyed to High/Medium/Low severity. |
|
|
40
41
|
| `/audit-clean-code` | Audit code smells, dead code, complexity hotspots, and maintainability-index outliers; emit a structured findings report. |
|
|
42
|
+
| `/audit-data-model` | Audit the persistence layer as a first-class artifact — model↔migration↔seed drift, constraint completeness, migration hygiene, type fidelity, and access-pattern fit; gated by a persistence-layer applicability probe so DB-less repos skip cleanly. |
|
|
41
43
|
| `/audit-dependencies` | Audit `package.json` for unused, outdated, and major-version-stale dependencies; surface Node-engine drift and propose upgrade batches. |
|
|
42
44
|
| `/audit-devops` | Audit CI/CD workflows, container images, infrastructure-as-code, and deployment pipelines; surface failure modes and hardening gaps. |
|
|
43
45
|
| `/audit-documentation` | Audit the repository's main documentation for staleness, semantic drift, and completeness; emit a structured High/Medium/Low findings report. |
|
|
44
|
-
| `/audit-lighthouse` | Run a Lighthouse audit (Performance / Accessibility / Best Practices / SEO) and produce a structured findings report |
|
|
45
46
|
| `/audit-navigability` | Audit the whole route tree against the consumer's nav-registry SSOT — every route has a persona nav door and no nav href is dead. A deliberately-global lens (Epic #4131, F2/F3) exempt from the cross-epic-leak guard and routed onto route-adding change sets. |
|
|
46
|
-
| `/audit-performance` | Audit hot paths,
|
|
47
|
+
| `/audit-performance` | Audit performance by measuring first — profile hot paths, I/O, memory, and payload against the repo's own numbers — and audit interleaving/partial-failure correctness (TOCTOU, unawaited promises, non-atomic writes) as a first-class dimension. |
|
|
47
48
|
| `/audit-privacy` | Audit logs, telemetry, and persistence paths for PII leakage and retention violations; surface secrets exposure and consent gaps. |
|
|
48
49
|
| `/audit-quality` | Audit test coverage gaps, flaky tests, missing assertions, and test-pyramid balance; recommend a remediation batch. |
|
|
49
50
|
| `/audit-security` | Audit dependency CVEs, input-validation gaps, secrets handling, and auth boundaries; emit a structured High/Medium/Low findings report. |
|
|
@@ -1368,6 +1368,23 @@
|
|
|
1368
1368
|
}
|
|
1369
1369
|
},
|
|
1370
1370
|
"additionalProperties": false
|
|
1371
|
+
},
|
|
1372
|
+
"auditToStories": {
|
|
1373
|
+
"type": "object",
|
|
1374
|
+
"properties": {
|
|
1375
|
+
"severityFloor": {
|
|
1376
|
+
"type": "string",
|
|
1377
|
+
"enum": ["critical", "high", "medium", "low", "all"],
|
|
1378
|
+
"default": "high",
|
|
1379
|
+
"description": "Minimum severity a finding must meet to be proposed as a Story on an unattended `/audit-to-stories --auto` sweep (Story #4626). Default high."
|
|
1380
|
+
},
|
|
1381
|
+
"autoComment": {
|
|
1382
|
+
"type": "boolean",
|
|
1383
|
+
"default": true,
|
|
1384
|
+
"description": "When true (default), `/audit-to-stories --auto` posts a re-detected comment on an already-open matched Issue instead of silently skipping it."
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
"additionalProperties": false
|
|
1371
1388
|
}
|
|
1372
1389
|
},
|
|
1373
1390
|
"additionalProperties": false
|
|
@@ -14,6 +14,33 @@
|
|
|
14
14
|
"scope": "cumulative",
|
|
15
15
|
"substitutionKeys": []
|
|
16
16
|
},
|
|
17
|
+
"audit-data-model": {
|
|
18
|
+
"triggers": {
|
|
19
|
+
"gates": ["gate1", "gate3"],
|
|
20
|
+
"keywords": [
|
|
21
|
+
"migration",
|
|
22
|
+
"schema",
|
|
23
|
+
"orm",
|
|
24
|
+
"prisma",
|
|
25
|
+
"foreign key",
|
|
26
|
+
"constraint",
|
|
27
|
+
"cascade",
|
|
28
|
+
"backfill"
|
|
29
|
+
],
|
|
30
|
+
"filePatterns": [
|
|
31
|
+
"**/migrations/**",
|
|
32
|
+
"**/migrate/**",
|
|
33
|
+
"**/seeds/**",
|
|
34
|
+
"**/*.sql",
|
|
35
|
+
"**/*.prisma",
|
|
36
|
+
"**/entities/**",
|
|
37
|
+
"**/models/**"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"target": "data-model",
|
|
41
|
+
"scope": "local",
|
|
42
|
+
"substitutionKeys": []
|
|
43
|
+
},
|
|
17
44
|
"audit-security": {
|
|
18
45
|
"triggers": {
|
|
19
46
|
"gates": ["gate1", "gate3"],
|
|
@@ -25,7 +52,19 @@
|
|
|
25
52
|
"password",
|
|
26
53
|
"encrypt"
|
|
27
54
|
],
|
|
28
|
-
"filePatterns": [
|
|
55
|
+
"filePatterns": [
|
|
56
|
+
"**/*.lock",
|
|
57
|
+
"**/auth/**",
|
|
58
|
+
"**/authn/**",
|
|
59
|
+
"**/authz/**",
|
|
60
|
+
"**/middleware/**",
|
|
61
|
+
"**/crypto/**",
|
|
62
|
+
"**/session/**",
|
|
63
|
+
"**/*credential*",
|
|
64
|
+
"**/*permission*",
|
|
65
|
+
"**/*.pem",
|
|
66
|
+
"**/*.key"
|
|
67
|
+
]
|
|
29
68
|
},
|
|
30
69
|
"scope": "local",
|
|
31
70
|
"substitutionKeys": []
|
|
@@ -33,31 +72,53 @@
|
|
|
33
72
|
"audit-privacy": {
|
|
34
73
|
"triggers": {
|
|
35
74
|
"gates": ["gate1", "gate3"],
|
|
36
|
-
"keywords": [
|
|
37
|
-
|
|
75
|
+
"keywords": [
|
|
76
|
+
"privacy",
|
|
77
|
+
"pii",
|
|
78
|
+
"gdpr",
|
|
79
|
+
"cookie",
|
|
80
|
+
"tracking",
|
|
81
|
+
"telemetry",
|
|
82
|
+
"analytics",
|
|
83
|
+
"logging",
|
|
84
|
+
"consent"
|
|
85
|
+
],
|
|
86
|
+
"filePatterns": [
|
|
87
|
+
"**/user-profile/**",
|
|
88
|
+
"**/*logger*",
|
|
89
|
+
"**/*logging*",
|
|
90
|
+
"**/logging/**",
|
|
91
|
+
"**/*telemetry*",
|
|
92
|
+
"**/telemetry/**",
|
|
93
|
+
"**/*analytics*",
|
|
94
|
+
"**/analytics/**"
|
|
95
|
+
]
|
|
38
96
|
},
|
|
39
97
|
"scope": "local",
|
|
40
98
|
"substitutionKeys": []
|
|
41
99
|
},
|
|
42
|
-
"audit-
|
|
100
|
+
"audit-accessibility": {
|
|
43
101
|
"triggers": {
|
|
44
102
|
"gates": ["gate2", "gate3"],
|
|
45
103
|
"keywords": [
|
|
46
|
-
"lighthouse",
|
|
47
104
|
"a11y",
|
|
48
105
|
"accessibility",
|
|
49
106
|
"wcag",
|
|
50
|
-
"ui",
|
|
51
|
-
"frontend",
|
|
52
107
|
"aria",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
108
|
+
"screen reader",
|
|
109
|
+
"keyboard",
|
|
110
|
+
"focus",
|
|
111
|
+
"contrast",
|
|
112
|
+
"alt text",
|
|
113
|
+
"label"
|
|
56
114
|
],
|
|
57
115
|
"filePatterns": [
|
|
58
116
|
"**/*.html",
|
|
59
|
-
"**/*.
|
|
60
|
-
"**/components/**/*.js",
|
|
117
|
+
"**/*.astro",
|
|
118
|
+
"**/components/**/*.{js,jsx,ts,tsx,vue,svelte}",
|
|
119
|
+
"**/app/**/{page,layout,route,head,default,template,loading,error,not-found}.{js,jsx,ts,tsx}",
|
|
120
|
+
"**/pages/**/*.{js,jsx,ts,tsx,vue}",
|
|
121
|
+
"**/routes/**/*.{jsx,tsx,vue,svelte}",
|
|
61
122
|
"**/frontend/**/*.js"
|
|
62
123
|
]
|
|
63
124
|
},
|
|
@@ -80,8 +141,30 @@
|
|
|
80
141
|
"substitutionKeys": []
|
|
81
142
|
},
|
|
82
143
|
"audit-sre": {
|
|
83
|
-
"triggers": {
|
|
84
|
-
|
|
144
|
+
"triggers": {
|
|
145
|
+
"gates": ["gate3"],
|
|
146
|
+
"keywords": [
|
|
147
|
+
"sre",
|
|
148
|
+
"slo",
|
|
149
|
+
"observability",
|
|
150
|
+
"runbook",
|
|
151
|
+
"rollback",
|
|
152
|
+
"error budget",
|
|
153
|
+
"on-call",
|
|
154
|
+
"incident",
|
|
155
|
+
"resilience"
|
|
156
|
+
],
|
|
157
|
+
"filePatterns": [
|
|
158
|
+
"**/Dockerfile",
|
|
159
|
+
"**/Dockerfile.*",
|
|
160
|
+
"**/migrations/**",
|
|
161
|
+
"**/deploy/**",
|
|
162
|
+
"**/*deploy*.sh",
|
|
163
|
+
".github/workflows/**",
|
|
164
|
+
"**/*health*"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"scope": "cumulative",
|
|
85
168
|
"substitutionKeys": []
|
|
86
169
|
},
|
|
87
170
|
"audit-documentation": {
|
|
@@ -130,8 +213,27 @@
|
|
|
130
213
|
"audit-performance": {
|
|
131
214
|
"triggers": {
|
|
132
215
|
"gates": ["gate1", "gate3"],
|
|
133
|
-
"keywords": [
|
|
134
|
-
|
|
216
|
+
"keywords": [
|
|
217
|
+
"performance",
|
|
218
|
+
"n+1",
|
|
219
|
+
"hot path",
|
|
220
|
+
"latency",
|
|
221
|
+
"throughput",
|
|
222
|
+
"concurrency",
|
|
223
|
+
"race",
|
|
224
|
+
"toctou",
|
|
225
|
+
"atomic",
|
|
226
|
+
"idempotent",
|
|
227
|
+
"bundle",
|
|
228
|
+
"memory leak"
|
|
229
|
+
],
|
|
230
|
+
"filePatterns": [
|
|
231
|
+
".agents/scripts/**",
|
|
232
|
+
"src/**/*.{ts,js}",
|
|
233
|
+
"**/*.html",
|
|
234
|
+
"**/*.css",
|
|
235
|
+
"**/components/**/*.js"
|
|
236
|
+
]
|
|
135
237
|
},
|
|
136
238
|
"scope": "local",
|
|
137
239
|
"substitutionKeys": []
|
|
@@ -140,7 +242,7 @@
|
|
|
140
242
|
"triggers": {
|
|
141
243
|
"gates": ["gate1", "gate3"],
|
|
142
244
|
"keywords": ["test", "coverage", "flaky", "assertion"],
|
|
143
|
-
"
|
|
245
|
+
"sourceWithoutSiblingTest": true
|
|
144
246
|
},
|
|
145
247
|
"scope": "local",
|
|
146
248
|
"substitutionKeys": []
|
|
@@ -149,7 +251,15 @@
|
|
|
149
251
|
"triggers": {
|
|
150
252
|
"gates": ["gate2", "gate3"],
|
|
151
253
|
"keywords": ["seo", "meta", "structured data", "schema.org", "sitemap"],
|
|
152
|
-
"filePatterns": [
|
|
254
|
+
"filePatterns": [
|
|
255
|
+
"**/*.html",
|
|
256
|
+
"**/*.astro",
|
|
257
|
+
"**/sitemap*",
|
|
258
|
+
"**/robots*",
|
|
259
|
+
"**/app/**/{page,layout,route,head,default,template,loading,error,not-found,opengraph-image,twitter-image}.{js,jsx,ts,tsx}",
|
|
260
|
+
"**/pages/**/*.{js,jsx,ts,tsx,vue}",
|
|
261
|
+
"**/routes/**/*.{jsx,tsx,vue,svelte}"
|
|
262
|
+
]
|
|
153
263
|
},
|
|
154
264
|
"target": "web",
|
|
155
265
|
"scope": "local",
|
|
@@ -162,7 +272,12 @@
|
|
|
162
272
|
"filePatterns": [
|
|
163
273
|
"**/components/**/*.{tsx,jsx,vue,svelte}",
|
|
164
274
|
"**/styles/**",
|
|
165
|
-
"**/*.css"
|
|
275
|
+
"**/*.css",
|
|
276
|
+
"**/*.{scss,sass,less}",
|
|
277
|
+
"**/tailwind.config.{js,ts,cjs,mjs}",
|
|
278
|
+
"**/theme/**",
|
|
279
|
+
"**/tokens/**",
|
|
280
|
+
"**/design-system/**"
|
|
166
281
|
]
|
|
167
282
|
},
|
|
168
283
|
"target": "web",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"target": {
|
|
63
63
|
"type": "string",
|
|
64
|
-
"enum": ["web", "any"],
|
|
65
|
-
"description": "Target-applicability gate: the kind of project this lens can say anything about. `web` — the lens reads a rendered web surface (pages, routes, HTML/CSS, design tokens) and is skipped entirely on a project that has none, however well its keyword or file-pattern triggers match. `any` — always applicable. ABSENT MEANS `any`: omitting the key never changes a lens's behaviour. Applicability is decided by
|
|
64
|
+
"enum": ["web", "data-model", "any"],
|
|
65
|
+
"description": "Target-applicability gate: the kind of project this lens can say anything about. `web` — the lens reads a rendered web surface (pages, routes, HTML/CSS, design tokens) and is skipped entirely on a project that has none, however well its keyword or file-pattern triggers match. `data-model` — the lens reads a persistence layer (ORM models, schema migrations, seed data) and is skipped entirely on a project that has none. `any` — always applicable. ABSENT MEANS `any`: omitting the key never changes a lens's behaviour. Applicability is decided by a probe in lib/audit-suite/selector.js from observables in the consumer's own checkout — hasWebSurface() for `web` (configured navigability routeGlobs, a declared web-framework dependency, or a tracked .html/.css/.jsx/.tsx source file), hasPersistenceLayer() for `data-model` (a declared ORM dependency, a database migrations directory, or a tracked .prisma/.sql schema file) — and NOT from an .agentrc key, so a consumer with a real surface keeps these lenses with no configuration. Each probe fails OPEN: an indeterminate answer treats the project as capable, because a wasted lens run is recoverable and silently dropped coverage is not.",
|
|
66
66
|
"default": "any"
|
|
67
67
|
},
|
|
68
68
|
"substitutionKeys": {
|
|
@@ -95,6 +95,10 @@
|
|
|
95
95
|
"items": { "type": "string", "minLength": 1 },
|
|
96
96
|
"uniqueItems": true,
|
|
97
97
|
"description": "Glob patterns matched against changed files in the diff."
|
|
98
|
+
},
|
|
99
|
+
"sourceWithoutSiblingTest": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"description": "Coverage-gap routing trigger (Story #4628). When true, the lens is selected whenever the change set touches a production source file whose sibling test (matched by stem, e.g. foo.js ↔ foo.test.js) is NOT also in the change set — the classic 'shipped source without a test' signal. Implemented by changeSetLacksSiblingTest() in lib/audit-suite/selector.js. Used by audit-quality in place of the backwards test-file filePatterns trigger, which fired the coverage-gap detector on test-only diffs."
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
}
|
|
@@ -38,6 +38,10 @@ import { gh as defaultGh, GhExecError } from './lib/gh-exec.js';
|
|
|
38
38
|
* register colour/description here first.
|
|
39
39
|
*/
|
|
40
40
|
const LENS_META = Object.freeze({
|
|
41
|
+
accessibility: {
|
|
42
|
+
color: 'c5def5',
|
|
43
|
+
description: 'Audit-sourced finding: WCAG accessibility conformance',
|
|
44
|
+
},
|
|
41
45
|
architecture: {
|
|
42
46
|
color: '6f42c1',
|
|
43
47
|
description: 'Audit-sourced finding: architectural concerns',
|
|
@@ -58,10 +62,6 @@ const LENS_META = Object.freeze({
|
|
|
58
62
|
color: '1d76db',
|
|
59
63
|
description: 'Audit-sourced finding: documentation staleness / gaps',
|
|
60
64
|
},
|
|
61
|
-
lighthouse: {
|
|
62
|
-
color: 'c5def5',
|
|
63
|
-
description: 'Audit-sourced finding: Lighthouse score regressions',
|
|
64
|
-
},
|
|
65
65
|
navigability: {
|
|
66
66
|
color: 'bfdadc',
|
|
67
67
|
description: 'Audit-sourced finding: route / nav reachability',
|