mandrel 1.93.0 → 2.0.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/README.md +59 -73
- package/.agents/agents/acceptance-critic.md +129 -0
- package/.agents/agents/story-worker.md +161 -0
- package/.agents/docs/SDLC.md +489 -1285
- package/.agents/docs/agentrc-reference.json +177 -67
- package/.agents/docs/configuration.md +108 -136
- package/.agents/docs/execution-reference.md +44 -22
- package/.agents/docs/quality-gates.md +13 -19
- package/.agents/docs/workflows.md +3 -3
- package/.agents/instructions.md +107 -108
- package/.agents/rules/ci-remediation.md +8 -12
- package/.agents/rules/git-conventions-reference.md +224 -0
- package/.agents/rules/git-conventions.md +42 -223
- package/.agents/rules/security-baseline.md +5 -0
- package/.agents/rules/testing-standards.md +106 -13
- package/.agents/schemas/acceptance-eval-verdict.schema.json +1 -1
- package/.agents/schemas/agentrc.schema.json +71 -201
- package/.agents/schemas/lifecycle/ledger-record.schema.json +1 -1
- package/.agents/schemas/lifecycle/retro.end.schema.json +1 -1
- package/.agents/schemas/risk-verdict.schema.json +0 -13
- package/.agents/scripts/acceptance-eval.js +62 -18
- package/.agents/scripts/agents-bootstrap-github.js +1 -1
- package/.agents/scripts/analyze-execution.js +1 -1
- package/.agents/scripts/audit-to-stories.js +7 -7
- package/.agents/scripts/boot-sweep.js +1 -1
- package/.agents/scripts/check-context-budget.js +62 -5
- package/.agents/scripts/check-lifecycle-lint.js +6 -9
- package/.agents/scripts/check-prepush-recovery.js +1 -1
- package/.agents/scripts/cleanup-repo-test-temp.js +6 -1
- package/.agents/scripts/diagnose-friction.js +0 -6
- package/.agents/scripts/lib/Logger.js +6 -10
- package/.agents/scripts/lib/audit-suite/runner.js +2 -2
- package/.agents/scripts/lib/audit-suite/selector.js +5 -5
- package/.agents/scripts/lib/audit-to-stories/{seed-epic-from-findings.js → seed-from-findings.js} +9 -9
- package/.agents/scripts/lib/baselines/kernel.js +206 -18
- package/.agents/scripts/lib/baselines/kinds/maintainability.js +0 -4
- package/.agents/scripts/lib/baselines/reader.js +1 -6
- package/.agents/scripts/lib/bdd-runner-detect.js +5 -9
- package/.agents/scripts/lib/bootstrap/issue-forms-template.js +32 -33
- package/.agents/scripts/lib/bootstrap/project-bootstrap.js +56 -18
- package/.agents/scripts/lib/checks/core-bare-clean.js +2 -2
- package/.agents/scripts/lib/checks/index.js +2 -1
- package/.agents/scripts/lib/checks/story-init-not-backgrounded.js +23 -21
- package/.agents/scripts/lib/cli/standard-args.js +13 -22
- package/.agents/scripts/lib/cli-args.js +16 -7
- package/.agents/scripts/lib/close-validation/gates.js +160 -22
- package/.agents/scripts/lib/config/acceptance-eval.js +52 -5
- package/.agents/scripts/lib/config/ci.js +6 -31
- package/.agents/scripts/lib/config/delivery-routing.js +103 -0
- package/.agents/scripts/lib/config/explain.js +57 -36
- package/.agents/scripts/lib/config/limits.js +17 -58
- package/.agents/scripts/lib/config/paths.js +0 -2
- package/.agents/scripts/lib/config/quality.js +1 -1
- package/.agents/scripts/lib/config/runners.js +17 -50
- package/.agents/scripts/lib/config/temp-paths.js +19 -14
- package/.agents/scripts/lib/config/worktree-isolation.js +0 -5
- package/.agents/scripts/lib/config-resolver.js +3 -8
- package/.agents/scripts/lib/config-settings-schema-delivery.js +46 -136
- package/.agents/scripts/lib/config-settings-schema-quality.js +17 -14
- package/.agents/scripts/lib/config-settings-schema.js +52 -38
- package/.agents/scripts/lib/dependency-parser.js +3 -2
- package/.agents/scripts/lib/doc-tiers.js +39 -4
- package/.agents/scripts/lib/duplicate-search.js +211 -41
- package/.agents/scripts/lib/feedback-loop/retro-proposals-graduator.js +1 -1
- package/.agents/scripts/lib/findings/promote-finding.js +5 -5
- package/.agents/scripts/lib/framework-version.js +2 -3
- package/.agents/scripts/lib/git-branch-cleanup.js +1 -10
- package/.agents/scripts/lib/git-branch-lifecycle.js +17 -22
- package/.agents/scripts/lib/git-utils.js +32 -6
- package/.agents/scripts/lib/github/framework-repo.js +6 -0
- package/.agents/scripts/lib/label-constants.js +10 -23
- package/.agents/scripts/lib/label-taxonomy.js +9 -43
- package/.agents/scripts/lib/observability/active-story-env.js +112 -3
- package/.agents/scripts/lib/observability/hook-heartbeat.js +187 -0
- package/.agents/scripts/lib/observability/source-classifier.js +3 -3
- package/.agents/scripts/lib/observability/tool-trace-hook.js +15 -4
- package/.agents/scripts/lib/onboard/init-tail.js +1 -3
- package/.agents/scripts/lib/orchestration/acceptance-clusters.js +111 -0
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +32 -4
- package/.agents/scripts/lib/orchestration/audit-lens-routing.js +128 -0
- package/.agents/scripts/lib/orchestration/bookkeeping-outbox.js +273 -0
- package/.agents/scripts/lib/orchestration/ceremony-routing.js +204 -0
- package/.agents/scripts/lib/orchestration/code-review.js +20 -268
- package/.agents/scripts/lib/orchestration/column-sync.js +1 -1
- package/.agents/scripts/lib/orchestration/consolidation-precondition.js +1 -1
- package/.agents/scripts/lib/orchestration/context-envelope.js +2 -5
- package/.agents/scripts/lib/orchestration/docs-digest.js +8 -8
- package/.agents/scripts/lib/orchestration/file-assumptions.js +7 -13
- package/.agents/scripts/lib/orchestration/git-cleanup/phases/cli.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/emit-loop-tick.js +8 -8
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-heartbeat.js +2 -2
- package/.agents/scripts/lib/orchestration/lifecycle/ledger-writer.js +6 -3
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/README.md +17 -43
- package/.agents/scripts/lib/orchestration/lint-baseline-service.js +4 -4
- package/.agents/scripts/lib/orchestration/merge-block-class.js +1 -1
- package/.agents/scripts/lib/orchestration/phase-runner.js +3 -2
- package/.agents/scripts/lib/orchestration/plan-context.js +248 -266
- package/.agents/scripts/lib/orchestration/plan-critic-conditions.js +3 -2
- package/.agents/scripts/lib/orchestration/plan-critics-evaluate.js +1 -1
- package/.agents/scripts/lib/orchestration/plan-navigation.js +92 -0
- package/.agents/scripts/lib/orchestration/plan-persist/fan-out-gate.js +61 -0
- package/.agents/scripts/lib/orchestration/plan-persist/persist-helpers.js +97 -0
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +223 -854
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +361 -0
- package/.agents/scripts/lib/orchestration/plan-persist/summary.js +35 -108
- package/.agents/scripts/lib/orchestration/plan-reachability.js +9 -14
- package/.agents/scripts/lib/orchestration/plan-runner/worktree-sweep.js +1 -1
- package/.agents/scripts/lib/orchestration/{epic-plan-spec/phases → planning}/authoring-context.js +14 -14
- package/.agents/scripts/lib/orchestration/planning/decomposer-context.js +27 -0
- package/.agents/scripts/lib/orchestration/{epic-plan-spec/phases → planning}/risk-verdict.js +3 -4
- package/.agents/scripts/lib/orchestration/post-merge/phases/branch-cleanup.js +2 -2
- package/.agents/scripts/lib/orchestration/post-merge/phases/dashboard-refresh.js +8 -20
- package/.agents/scripts/lib/orchestration/post-merge/phases/worktree-reap.js +3 -2
- package/.agents/scripts/lib/orchestration/pr-base-guard.js +18 -28
- package/.agents/scripts/lib/orchestration/preflight-cache.js +5 -5
- package/.agents/scripts/lib/orchestration/remote-verifier.js +1 -1
- package/.agents/scripts/lib/orchestration/resolve-plan-run.js +155 -0
- package/.agents/scripts/lib/orchestration/resolves-token.js +1 -1
- package/.agents/scripts/lib/orchestration/retro-perf-heuristics.js +8 -8
- package/.agents/scripts/lib/orchestration/retro-proposals.js +140 -79
- package/.agents/scripts/lib/orchestration/review-depth.js +26 -12
- package/.agents/scripts/lib/orchestration/review-providers/codex.js +2 -2
- package/.agents/scripts/lib/orchestration/review-providers/review-provider-factory.js +21 -56
- package/.agents/scripts/lib/orchestration/run-epilogue.js +426 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/auto-merge.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/close-validation.js +1 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/code-review.js +95 -41
- package/.agents/scripts/lib/orchestration/single-story-close/phases/options.js +16 -13
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-block.js +40 -0
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +11 -3
- package/.agents/scripts/lib/orchestration/spec-freshness.js +14 -205
- package/.agents/scripts/lib/orchestration/spec-section-validator.js +4 -5
- package/.agents/scripts/lib/orchestration/spec-spill.js +60 -0
- package/.agents/scripts/lib/orchestration/split-policy-validator.js +188 -0
- package/.agents/scripts/lib/orchestration/story-close/emit-blocked.js +49 -0
- package/.agents/scripts/lib/orchestration/story-close/phases/code-review.js +15 -12
- package/.agents/scripts/lib/orchestration/story-follow-ups.js +237 -0
- package/.agents/scripts/lib/orchestration/story-init-remote.js +47 -0
- package/.agents/scripts/lib/orchestration/story-plan-state.js +48 -0
- package/.agents/scripts/lib/orchestration/{epic-runner → story-progress}/story-run-progress-writer.js +3 -3
- package/.agents/scripts/lib/orchestration/structured-comment-parser.js +1 -1
- package/.agents/scripts/lib/orchestration/task-body-validator.js +8 -18
- package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +11 -61
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +189 -373
- package/.agents/scripts/lib/orchestration/ticket-validator.js +3 -8
- package/.agents/scripts/lib/orchestration/ticketing/bulk.js +0 -25
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +29 -26
- package/.agents/scripts/lib/orchestration/ticketing/transition.js +5 -5
- package/.agents/scripts/lib/planning-corpus.js +16 -11
- package/.agents/scripts/lib/preflight-runner.js +2 -2
- package/.agents/scripts/lib/provider-factory.js +1 -1
- package/.agents/scripts/lib/qa/coverage-verdict.js +5 -5
- package/.agents/scripts/lib/single-story/confirm-merge-follow-ups.js +36 -0
- package/.agents/scripts/lib/single-story-sweep/protection-ctx.js +1 -1
- package/.agents/scripts/lib/story-adjacency.js +11 -14
- package/.agents/scripts/lib/story-body/story-body.js +124 -70
- package/.agents/scripts/lib/story-plan.js +2 -4
- package/.agents/scripts/lib/templates/decomposer-prompts.js +46 -45
- package/.agents/scripts/lib/templates/spec-author-prompts.js +47 -45
- package/.agents/scripts/lib/{epic-body-sections.js → ticket-body-sections.js} +26 -26
- package/.agents/scripts/lib/validation-evidence.js +1 -1
- package/.agents/scripts/lib/wave-runner/ready-set.js +6 -6
- package/.agents/scripts/lib/workspace-provisioner.js +1 -1
- package/.agents/scripts/lib/worktree/lifecycle/reap.js +5 -7
- package/.agents/scripts/lint-issue-body.js +71 -40
- package/.agents/scripts/mandrel-update-preflight.js +1 -1
- package/.agents/scripts/notify.js +4 -3
- package/.agents/scripts/plan-context.js +64 -74
- package/.agents/scripts/plan-persist.js +121 -280
- package/.agents/scripts/plan-run-epilogue.js +97 -0
- package/.agents/scripts/post-structured-comment.js +38 -0
- package/.agents/scripts/providers/github/issues.js +17 -33
- package/.agents/scripts/providers/github/mappers.js +0 -12
- package/.agents/scripts/providers/github/tickets.js +2 -5
- package/.agents/scripts/resolve-plan-run.js +117 -0
- package/.agents/scripts/signals-view.js +24 -19
- package/.agents/scripts/single-story-close.js +11 -14
- package/.agents/scripts/single-story-confirm-merge.js +39 -23
- package/.agents/scripts/single-story-init.js +29 -20
- package/.agents/scripts/stories-wave-tick.js +6 -6
- package/.agents/scripts/story-plan.js +26 -47
- package/.agents/scripts/sync-claude-agents.js +165 -0
- package/.agents/scripts/update-ticket-state.js +37 -15
- package/.agents/skills/core/analyze-execution/SKILL.md +21 -18
- package/.agents/skills/core/api-and-interface-design/SKILL.md +5 -3
- package/.agents/skills/core/code-review-and-quality/SKILL.md +63 -7
- package/.agents/skills/core/debugging-and-error-recovery/SKILL.md +1 -1
- package/.agents/skills/core/gates-and-baselines/SKILL.md +149 -0
- package/.agents/skills/core/idea-refinement/SKILL.md +8 -14
- package/.agents/skills/core/qa-coverage-mapping/SKILL.md +7 -7
- package/.agents/skills/core/scope-triage/SKILL.md +28 -172
- package/.agents/skills/skills.index.json +8 -418
- package/.agents/starter-agentrc.json +0 -5
- package/.agents/templates/agent-protocol.md +9 -10
- package/.agents/workflows/audit-architecture.md +3 -3
- package/.agents/workflows/audit-clean-code.md +3 -3
- package/.agents/workflows/audit-dependencies.md +3 -3
- package/.agents/workflows/audit-devops.md +3 -3
- package/.agents/workflows/audit-documentation.md +5 -5
- package/.agents/workflows/audit-lighthouse.md +3 -3
- package/.agents/workflows/audit-navigability.md +3 -2
- package/.agents/workflows/audit-performance.md +3 -3
- package/.agents/workflows/audit-privacy.md +3 -3
- package/.agents/workflows/audit-quality.md +3 -3
- package/.agents/workflows/audit-security.md +3 -3
- package/.agents/workflows/audit-seo.md +3 -3
- package/.agents/workflows/audit-sre.md +3 -3
- package/.agents/workflows/audit-to-stories.md +20 -20
- package/.agents/workflows/audit-ux-ui.md +3 -3
- package/.agents/workflows/deliver.md +122 -131
- package/.agents/workflows/git-cleanup.md +3 -4
- package/.agents/workflows/helpers/_merge-conflict-template.md +1 -1
- package/.agents/workflows/helpers/acceptance-self-eval.md +52 -40
- package/.agents/workflows/helpers/code-review.md +70 -193
- package/.agents/workflows/helpers/{single-story-deliver-reference.md → deliver-story-reference.md} +12 -14
- package/.agents/workflows/helpers/{single-story-deliver.md → deliver-story.md} +113 -139
- package/.agents/workflows/helpers/diagnose.md +10 -10
- package/.agents/workflows/helpers/mandrel-sync-config.md +1 -1
- package/.agents/workflows/helpers/parallel-tooling.md +1 -1
- package/.agents/workflows/helpers/signals.md +16 -16
- package/.agents/workflows/helpers/worktree-lifecycle.md +48 -64
- package/.agents/workflows/mandrel-update.md +3 -2
- package/.agents/workflows/plan.md +112 -145
- package/.agents/workflows/qa-assist.md +24 -30
- package/.agents/workflows/qa-explore.md +29 -38
- package/.agents/workflows/qa-run.md +2 -2
- package/README.md +9 -8
- package/docs/CHANGELOG.md +46 -0
- package/lib/cli/registry.js +95 -0
- package/lib/migrations/index.js +6 -5
- package/package.json +5 -3
- package/.agents/personas/architect.md +0 -113
- package/.agents/personas/devops-engineer.md +0 -38
- package/.agents/personas/engineer-mobile.md +0 -120
- package/.agents/personas/engineer-web.md +0 -111
- package/.agents/personas/engineer.md +0 -119
- package/.agents/personas/product.md +0 -94
- package/.agents/personas/project-manager.md +0 -114
- package/.agents/personas/qa-engineer.md +0 -95
- package/.agents/personas/refactorer.md +0 -113
- package/.agents/personas/security-engineer.md +0 -112
- package/.agents/personas/sre.md +0 -86
- package/.agents/personas/technical-writer.md +0 -101
- package/.agents/personas/ux-designer.md +0 -95
- package/.agents/schemas/dispatch-manifest.json +0 -232
- package/.agents/schemas/epic-spec.schema.json +0 -153
- package/.agents/scripts/acceptance-spec-reconciler.js +0 -642
- package/.agents/scripts/dispatcher.js +0 -295
- package/.agents/scripts/epic-audit-prepare.js +0 -497
- package/.agents/scripts/epic-audit-recheck.js +0 -274
- package/.agents/scripts/epic-deliver-note-intervention.js +0 -192
- package/.agents/scripts/epic-deliver-preflight.js +0 -462
- package/.agents/scripts/epic-deliver-prepare.js +0 -590
- package/.agents/scripts/epic-execute-record-wave.js +0 -449
- package/.agents/scripts/epic-plan-clarity.js +0 -211
- package/.agents/scripts/epic-plan-decompose.js +0 -54
- package/.agents/scripts/epic-plan-healthcheck.js +0 -581
- package/.agents/scripts/epic-plan-spec.js +0 -64
- package/.agents/scripts/epic-reconcile.js +0 -625
- package/.agents/scripts/lib/baseline-snapshot.js +0 -979
- package/.agents/scripts/lib/checks/epic-merge-lock-stale.js +0 -54
- package/.agents/scripts/lib/checks/stale-origin-epic.js +0 -49
- package/.agents/scripts/lib/config/lifecycle.js +0 -40
- package/.agents/scripts/lib/config/preflight.js +0 -58
- package/.agents/scripts/lib/config/retro.js +0 -77
- package/.agents/scripts/lib/epic-merge-lock.js +0 -322
- package/.agents/scripts/lib/epic-plan-clarity.js +0 -181
- package/.agents/scripts/lib/epic-plan-ideation.js +0 -261
- package/.agents/scripts/lib/orchestration/context-hydration-engine.js +0 -660
- package/.agents/scripts/lib/orchestration/dispatch-engine.js +0 -134
- package/.agents/scripts/lib/orchestration/dispatch-pipeline.js +0 -183
- package/.agents/scripts/lib/orchestration/epic-cleanup.js +0 -801
- package/.agents/scripts/lib/orchestration/epic-deliver-lease-guard.js +0 -310
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/context.js +0 -163
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/creation.js +0 -140
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/dag.js +0 -64
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/diagnostics.js +0 -72
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/persist-helpers.js +0 -156
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/persist.js +0 -345
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/planning-artifacts.js +0 -41
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/reconcile-spawn.js +0 -86
- package/.agents/scripts/lib/orchestration/epic-plan-lease-guard.js +0 -391
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/drain.js +0 -94
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/plan-epic.js +0 -236
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/run-spec-phase.js +0 -307
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/spec-freshness.js +0 -117
- package/.agents/scripts/lib/orchestration/epic-plan-state-store.js +0 -117
- package/.agents/scripts/lib/orchestration/epic-run-state-store.js +0 -388
- package/.agents/scripts/lib/orchestration/epic-runner/concurrency-gate.js +0 -186
- package/.agents/scripts/lib/orchestration/epic-runner/deliver-phases.js +0 -50
- package/.agents/scripts/lib/orchestration/epic-runner/phases/build-wave-dag.js +0 -129
- package/.agents/scripts/lib/orchestration/epic-runner/phases/snapshot.js +0 -103
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/composition.js +0 -267
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/signals.js +0 -210
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/transport.js +0 -238
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/_bullet-format.js +0 -32
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/component-drift.js +0 -203
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/crap-drift.js +0 -227
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/maintainability-drift.js +0 -117
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/stalled-worktree.js +0 -37
- package/.agents/scripts/lib/orchestration/epic-runner/story-launcher.js +0 -127
- package/.agents/scripts/lib/orchestration/epic-runner/sub-agent-return.js +0 -276
- package/.agents/scripts/lib/orchestration/epic-runner/wave-scheduler.js +0 -66
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-apply.js +0 -789
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-diff.js +0 -676
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-discriminator.js +0 -389
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-format.js +0 -230
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-ops.js +0 -361
- package/.agents/scripts/lib/orchestration/finalize/open-or-locate-pr.js +0 -306
- package/.agents/scripts/lib/orchestration/finalize/post-handoff-comment.js +0 -489
- package/.agents/scripts/lib/orchestration/finalize/sanitize-skip-ci.js +0 -88
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-dispatch-end.js +0 -147
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/acceptance-reconciler.js +0 -384
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-armer.js +0 -501
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-predicate.js +0 -984
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/branch-cleaner.js +0 -264
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/checkpoint-pointer-writer.js +0 -278
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/cleaner.js +0 -355
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/finalizer.js +0 -673
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/index.js +0 -378
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/intervention-recorder.js +0 -140
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/label-transitioner.js +0 -144
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/notify-dispatcher.js +0 -174
- package/.agents/scripts/lib/orchestration/manifest-builder.js +0 -222
- package/.agents/scripts/lib/orchestration/plan-persist/amend.js +0 -359
- package/.agents/scripts/lib/orchestration/plan-persist/delivery-mode.js +0 -127
- package/.agents/scripts/lib/orchestration/post-merge-pipeline.js +0 -205
- package/.agents/scripts/lib/orchestration/recurring-failure-detector.js +0 -152
- package/.agents/scripts/lib/orchestration/retro/phases/checks.js +0 -94
- package/.agents/scripts/lib/orchestration/retro/phases/compose-body.js +0 -571
- package/.agents/scripts/lib/orchestration/retro/phases/gather-signals.js +0 -450
- package/.agents/scripts/lib/orchestration/retro/phases/post-and-mirror.js +0 -191
- package/.agents/scripts/lib/orchestration/retro-heuristics.js +0 -57
- package/.agents/scripts/lib/orchestration/retro-runner.js +0 -197
- package/.agents/scripts/lib/orchestration/skill-capsule-loader.js +0 -109
- package/.agents/scripts/lib/orchestration/spec-renderer.js +0 -447
- package/.agents/scripts/lib/orchestration/story-close/auto-refresh-runner.js +0 -747
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/gate-failure.js +0 -211
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/pre-merge-attribution.js +0 -158
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/refresh-commit.js +0 -446
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/regression-projection.js +0 -297
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/scope-discovery.js +0 -48
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution-wiring.js +0 -67
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution.js +0 -161
- package/.agents/scripts/lib/orchestration/story-close/baseline-friction-body.js +0 -117
- package/.agents/scripts/lib/orchestration/story-close/cd-out-guard.js +0 -86
- package/.agents/scripts/lib/orchestration/story-close/cleanup-reconciler.js +0 -147
- package/.agents/scripts/lib/orchestration/story-close/close-inputs.js +0 -142
- package/.agents/scripts/lib/orchestration/story-close/comment-bodies.js +0 -62
- package/.agents/scripts/lib/orchestration/story-close/merge-runner.js +0 -658
- package/.agents/scripts/lib/orchestration/story-close/merge-subject.js +0 -198
- package/.agents/scripts/lib/orchestration/story-close/phases/branch-restore.js +0 -105
- package/.agents/scripts/lib/orchestration/story-close/phases/close.js +0 -222
- package/.agents/scripts/lib/orchestration/story-close/phases/gates.js +0 -292
- package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +0 -270
- package/.agents/scripts/lib/orchestration/story-close/phases/preflight.js +0 -110
- package/.agents/scripts/lib/orchestration/story-close/phases/refresh.js +0 -86
- package/.agents/scripts/lib/orchestration/story-close/phases/timeout-blocked-emitter.js +0 -112
- package/.agents/scripts/lib/orchestration/story-close/phases/timeout-blocked.js +0 -157
- package/.agents/scripts/lib/orchestration/story-close/post-merge-close.js +0 -421
- package/.agents/scripts/lib/orchestration/story-close/pre-merge-validation.js +0 -301
- package/.agents/scripts/lib/orchestration/story-close/shared-checkout-guard.js +0 -163
- package/.agents/scripts/lib/orchestration/story-close-recovery.js +0 -690
- package/.agents/scripts/lib/orchestration/wave-marker.js +0 -28
- package/.agents/scripts/lib/orchestration/wave-record-io.js +0 -218
- package/.agents/scripts/lib/orchestration/wave-record-notifications.js +0 -145
- package/.agents/scripts/lib/orchestration/wave-record-projection.js +0 -212
- package/.agents/scripts/lib/presentation/dispatch-manifest-render.js +0 -111
- package/.agents/scripts/lib/presentation/manifest-builder.js +0 -239
- package/.agents/scripts/lib/presentation/manifest-formatter.js +0 -242
- package/.agents/scripts/lib/presentation/manifest-helpers.js +0 -213
- package/.agents/scripts/lib/presentation/manifest-persistence.js +0 -261
- package/.agents/scripts/lib/presentation/manifest-procedures.js +0 -55
- package/.agents/scripts/lib/presentation/manifest-render-waves.js +0 -306
- package/.agents/scripts/lib/presentation/manifest-renderer.js +0 -188
- package/.agents/scripts/lib/presentation/manifest-story-views.js +0 -110
- package/.agents/scripts/lib/push-epic-retry.js +0 -209
- package/.agents/scripts/lib/spec/index.js +0 -36
- package/.agents/scripts/lib/spec/loader.js +0 -425
- package/.agents/scripts/lib/spec/state.js +0 -208
- package/.agents/scripts/lib/story-init/blocker-validator.js +0 -68
- package/.agents/scripts/lib/story-init/branch-initializer.js +0 -408
- package/.agents/scripts/lib/story-init/context-resolver.js +0 -92
- package/.agents/scripts/lib/story-init/donor-precheck.js +0 -207
- package/.agents/scripts/lib/story-init/state-transitioner.js +0 -80
- package/.agents/scripts/lib/story-init/task-graph-builder.js +0 -124
- package/.agents/scripts/lib/story-init/transition-summary.js +0 -34
- package/.agents/scripts/lib/test-reserved-epic-temp-ids.js +0 -35
- package/.agents/scripts/lib/wave-runner/tick.js +0 -754
- package/.agents/scripts/lib/wave-runner/wave-runner-error.js +0 -20
- package/.agents/scripts/lifecycle-emit-story-dispatch.js +0 -194
- package/.agents/scripts/lifecycle-emit.js +0 -510
- package/.agents/scripts/plan-critics.js +0 -199
- package/.agents/scripts/retro-run.js +0 -218
- package/.agents/scripts/standalone-feedback-rollup.js +0 -188
- package/.agents/scripts/story-close.js +0 -294
- package/.agents/scripts/story-init.js +0 -599
- package/.agents/scripts/story-phase.js +0 -369
- package/.agents/scripts/wave-tick.js +0 -335
- package/.agents/skills/core/baseline-refresh/SKILL.md +0 -181
- package/.agents/skills/core/ci-cd-and-automation/SKILL.md +0 -274
- package/.agents/skills/core/ci-cd-and-automation/examples.md +0 -211
- package/.agents/skills/core/code-simplification/SKILL.md +0 -389
- package/.agents/skills/core/context-engineering/SKILL.md +0 -309
- package/.agents/skills/core/context-engineering/examples.md +0 -58
- package/.agents/skills/core/deprecation-and-migration/SKILL.md +0 -250
- package/.agents/skills/core/epic-plan-consolidate/SKILL.md +0 -172
- package/.agents/skills/core/epic-plan-consolidate/examples.md +0 -51
- package/.agents/skills/core/epic-plan-decompose-author/SKILL.md +0 -441
- package/.agents/skills/core/epic-plan-decompose-author/examples.md +0 -47
- package/.agents/skills/core/epic-plan-premortem/SKILL.md +0 -146
- package/.agents/skills/core/epic-plan-premortem/examples.md +0 -53
- package/.agents/skills/core/epic-plan-spec-author/SKILL.md +0 -413
- package/.agents/skills/core/epic-plan-spec-author/examples.md +0 -91
- package/.agents/skills/core/frontend-ui-engineering/SKILL.md +0 -357
- package/.agents/skills/core/hydrate-context/SKILL.md +0 -123
- package/.agents/skills/core/idea-refinement/examples.md +0 -437
- package/.agents/skills/core/idea-refinement/frameworks.md +0 -135
- package/.agents/skills/core/incremental-implementation/SKILL.md +0 -271
- package/.agents/skills/core/introducing-a-baseline-gate/SKILL.md +0 -213
- package/.agents/skills/core/knowledge-transfer/SKILL.md +0 -180
- package/.agents/skills/core/mutation-survivor-remediation/SKILL.md +0 -117
- package/.agents/skills/core/performance-optimization/SKILL.md +0 -314
- package/.agents/skills/core/planning-and-task-breakdown/SKILL.md +0 -277
- package/.agents/skills/core/property-based-testing/SKILL.md +0 -148
- package/.agents/skills/core/refactoring-discipline/SKILL.md +0 -111
- package/.agents/skills/core/shipping-and-launch/SKILL.md +0 -328
- package/.agents/skills/core/spec-driven-development/SKILL.md +0 -252
- package/.agents/skills/core/test-driven-development/SKILL.md +0 -475
- package/.agents/skills/core/using-agent-skills/SKILL.md +0 -232
- package/.agents/skills/stack/architecture/monorepo-path-strategist/SKILL.md +0 -31
- package/.agents/skills/stack/architecture/structured-output-zod/SKILL.md +0 -51
- package/.agents/skills/stack/architecture/subagent-orchestration/SKILL.md +0 -76
- package/.agents/skills/stack/backend/cloudflare-hono-architect/SKILL.md +0 -31
- package/.agents/skills/stack/backend/cloudflare-hono-architect/examples/route-template.ts +0 -33
- package/.agents/skills/stack/backend/cloudflare-queue-manager/SKILL.md +0 -31
- package/.agents/skills/stack/backend/cloudflare-workers/SKILL.md +0 -51
- package/.agents/skills/stack/backend/highlevel-crm/SKILL.md +0 -54
- package/.agents/skills/stack/backend/sqlite-drizzle-expert/SKILL.md +0 -29
- package/.agents/skills/stack/backend/sqlite-drizzle-expert/examples/schema-template.ts +0 -30
- package/.agents/skills/stack/backend/stripe-integration/SKILL.md +0 -57
- package/.agents/skills/stack/backend/stripe-integration/scripts/listen-stripe.sh +0 -9
- package/.agents/skills/stack/backend/turso-sqlite/SKILL.md +0 -48
- package/.agents/skills/stack/frontend/astro/SKILL.md +0 -62
- package/.agents/skills/stack/frontend/astro-react-island-strategist/SKILL.md +0 -30
- package/.agents/skills/stack/frontend/expo-react-native-developer/SKILL.md +0 -29
- package/.agents/skills/stack/frontend/google-analytics-v4/SKILL.md +0 -50
- package/.agents/skills/stack/frontend/tailwind-v4/SKILL.md +0 -58
- package/.agents/skills/stack/frontend/ui-accessibility-engineer/SKILL.md +0 -34
- package/.agents/skills/stack/qa/audit-accessibility/SKILL.md +0 -51
- package/.agents/skills/stack/qa/lighthouse-baseline/SKILL.md +0 -199
- package/.agents/skills/stack/security/backend-security-patterns/SKILL.md +0 -68
- package/.agents/workflows/helpers/deliver-epic-reference.md +0 -534
- package/.agents/workflows/helpers/deliver-epic.md +0 -955
- package/.agents/workflows/helpers/deliver-stories.md +0 -440
- package/.agents/workflows/helpers/epic-audit.md +0 -189
- package/.agents/workflows/helpers/epic-deliver-story.md +0 -427
- package/.agents/workflows/helpers/epic-testing.md +0 -125
- package/.agents/workflows/helpers/plan-epic-reference.md +0 -160
- package/.agents/workflows/helpers/plan-epic.md +0 -351
- package/.agents/workflows/helpers/plan-story.md +0 -251
- package/.agents/workflows/helpers/scope-triage-gate.md +0 -108
- /package/.agents/scripts/lib/orchestration/{epic-plan-spec/phases → planning}/spec-authoring-grounding.js +0 -0
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: stripe-integration
|
|
3
|
-
description:
|
|
4
|
-
Implements secure Stripe payments and subscription billing. Use when handling
|
|
5
|
-
card data (PCI compliance via Elements/Checkout), verifying webhook
|
|
6
|
-
signatures, attaching `idempotencyKey` to mutations, or treating the
|
|
7
|
-
server-side webhook as the source of truth for entitlement changes.
|
|
8
|
-
vendor: stripe
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Skill: Stripe Payments & Billing
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Never let raw card data touch your servers; collect payment details through Stripe Elements or Checkout.
|
|
16
|
-
- Treat the server-side webhook as the source of truth for entitlement changes; never trust client-side success redirects.
|
|
17
|
-
- Verify the `Stripe-Signature` header against the raw request body using the configured webhook secret before parsing any payload.
|
|
18
|
-
- Attach an `idempotencyKey` to every Stripe API mutation to prevent duplicate charges on retry.
|
|
19
|
-
- Use the official `stripe` Node SDK for backend calls; do not hand-roll HTTP requests.
|
|
20
|
-
- Store Stripe object IDs (Customer, Price, Subscription) in your database — never store PCI-sensitive card data.
|
|
21
|
-
- Log Stripe event IDs for traceability, but exclude sensitive customer data from logs.
|
|
22
|
-
- Use Stripe's test environment and test cards for all development and QA.
|
|
23
|
-
|
|
24
|
-
Standard procedures for secure and robust payment + subscription billing
|
|
25
|
-
integration using Stripe.
|
|
26
|
-
|
|
27
|
-
## 1. Core Principles
|
|
28
|
-
|
|
29
|
-
- **PCI Compliance:** Never let sensitive card data touch your servers. Use
|
|
30
|
-
Stripe Elements or Checkout.
|
|
31
|
-
- **Webhooks are Mandatory:** Never rely on successful client-side redirects to
|
|
32
|
-
confirm payments. Always verify via webhooks. Webhook handlers MUST verify the
|
|
33
|
-
`Stripe-Signature` header using the raw request body and the configured
|
|
34
|
-
webhook secret before parsing any data.
|
|
35
|
-
- **Idempotency:** Every Stripe API mutation MUST include an `idempotencyKey` to
|
|
36
|
-
prevent duplicate charges or state changes during network retries.
|
|
37
|
-
- **Server is Source of Truth:** Never trust client-side success states for
|
|
38
|
-
granting access or upgrading tiers; always rely on the asynchronous
|
|
39
|
-
server-side webhook to update the database.
|
|
40
|
-
|
|
41
|
-
## 2. Technical Standards
|
|
42
|
-
|
|
43
|
-
- **Stripe SDK:** Use the official `stripe` Node.js library for backend
|
|
44
|
-
operations.
|
|
45
|
-
- **Elements / Checkout:** Use Stripe Elements for custom-branded checkout or
|
|
46
|
-
Checkout for the fastest implementation.
|
|
47
|
-
- **Error Handling:** Gracefully handle payment failures, card declines, and
|
|
48
|
-
expired sessions.
|
|
49
|
-
|
|
50
|
-
## 3. Best Practices
|
|
51
|
-
|
|
52
|
-
- **Test Mode:** Use Stripe's test environment and test card numbers for all
|
|
53
|
-
development and QA.
|
|
54
|
-
- **Logging:** Log Stripe event IDs for troubleshooting, but exclude any
|
|
55
|
-
sensitive customer data.
|
|
56
|
-
- **Sub-records:** Store Stripe IDs (Customer ID, Price ID, Subscription ID) in
|
|
57
|
-
your database, not PCI-sensitive data.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Description: Forwards Stripe webhooks to the local Cloudflare Worker environment.
|
|
3
|
-
# Prerequisite: Ensure stripe-cli is installed and authenticated.
|
|
4
|
-
|
|
5
|
-
echo "Starting Stripe webhook forwarding to local Hono API..."
|
|
6
|
-
echo "Ensure your worker is running on port 8787"
|
|
7
|
-
|
|
8
|
-
# Replace 8787 with the actual port your local Cloudflare worker uses
|
|
9
|
-
stripe listen --forward-to localhost:8787/v1/webhooks/stripe
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: turso-sqlite
|
|
3
|
-
description:
|
|
4
|
-
Develops with Turso's distributed SQLite (libSQL) platform. Use when working
|
|
5
|
-
with the `@libsql/client` driver — leverage edge replicas for low-latency
|
|
6
|
-
reads, route writes to the primary, and use parameterized queries plus a
|
|
7
|
-
versioned migration tool (drizzle-kit, atlas) for schema changes.
|
|
8
|
-
vendor: turso
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Skill: Turso (SQLite)
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Use the `@libsql/client` driver for all database operations; do not mix in other SQLite clients.
|
|
16
|
-
- Always use parameterized queries (`?` or `:name`); never interpolate user input into SQL strings.
|
|
17
|
-
- Route reads to the nearest edge replica and writes to the primary; do not write to a replica.
|
|
18
|
-
- Manage schema changes through a versioned migration tool (`drizzle-kit`, `atlas`) checked into git; never hand-mutate production schema.
|
|
19
|
-
- Reuse the libSQL client instance within a worker invocation to avoid repeated handshake overhead.
|
|
20
|
-
- Audit slow queries with `EXPLAIN QUERY PLAN` and add indexes where the plan shows a full scan on a large table.
|
|
21
|
-
|
|
22
|
-
Rules for developing with Turso's distributed SQLite database platform.
|
|
23
|
-
|
|
24
|
-
## 1. Core Principles
|
|
25
|
-
|
|
26
|
-
- **Edge Efficiency:** Leverage Turso's low-latency distribution for edge
|
|
27
|
-
applications.
|
|
28
|
-
- **SQLite Simplicity:** Use standard SQL syntax. SQLite is powerful—don't
|
|
29
|
-
over-engineer with complex ORMs unless necessary.
|
|
30
|
-
- **Replication:** Understand the primary/replica architecture for
|
|
31
|
-
geographically distributed workloads.
|
|
32
|
-
|
|
33
|
-
## 2. Technical Standards
|
|
34
|
-
|
|
35
|
-
- **Driver Usage:** Use the `@libsql/client` driver for all database operations.
|
|
36
|
-
- **Parameterized Queries:** Never use string interpolation for queries. Always
|
|
37
|
-
use placeholders (`?` or `:name`) to prevent SQL injection.
|
|
38
|
-
- **Migrations:** Use a structured migration tool (e.g., `drizzle-kit` or
|
|
39
|
-
`atlas`) to manage schema changes versioned in git.
|
|
40
|
-
|
|
41
|
-
## 3. Best Practices
|
|
42
|
-
|
|
43
|
-
- **Connection Management:** Reuse database client instances within a worker
|
|
44
|
-
invocation to minimize handshake overhead.
|
|
45
|
-
- **Read-Local, Write-Primary:** Direct read operations to the nearest replica
|
|
46
|
-
and write operations to the primary instance.
|
|
47
|
-
- **Profiling:** Use `EXPLAIN QUERY PLAN` to audit slow queries and ensure
|
|
48
|
-
proper indexing of large tables.
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: astro
|
|
3
|
-
description:
|
|
4
|
-
Builds ultra-fast content-driven websites with Astro. Use when defaulting to
|
|
5
|
-
SSG, opting into SSR only for dynamic data, picking the most restrictive
|
|
6
|
-
`client:*` hydration directive, leveraging Server Islands (`server:defer`),
|
|
7
|
-
Astro Actions for type-safe mutations, and the Content Layer with Zod-
|
|
8
|
-
validated collections.
|
|
9
|
-
vendor: astro
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Skill: Astro (Iron)
|
|
13
|
-
|
|
14
|
-
## Policy Capsule
|
|
15
|
-
|
|
16
|
-
- Default to SSG; opt into SSR only when a route requires per-request dynamic data.
|
|
17
|
-
- Ship zero JS by default — `.astro` components must not bundle client JavaScript unless a `client:*` directive is set explicitly.
|
|
18
|
-
- For personalized or dynamic islands, prefer `server:defer` (Server Islands) over shipping a fully hydrated client island.
|
|
19
|
-
- Use the most restrictive hydration directive that meets the interaction: `client:load` only for immediate interactivity, `client:visible` for below-the-fold, `client:idle` for non-critical logic.
|
|
20
|
-
- Handle data mutations and form submissions through Astro Actions, not ad-hoc fetch handlers, to preserve type safety.
|
|
21
|
-
- Source content through the Content Layer API with Zod-validated collections in `src/content/config.ts`.
|
|
22
|
-
- Use the built-in `<Image />` and `<Picture />` components for image optimization rather than raw `<img>` tags.
|
|
23
|
-
- Inject SEO metadata (`title`, `meta`, `og:image`, `canonical`) from a shared layout component.
|
|
24
|
-
|
|
25
|
-
Guidelines and best practices for building ultra-fast content-driven websites
|
|
26
|
-
using Astro.
|
|
27
|
-
|
|
28
|
-
## 1. Core Principles
|
|
29
|
-
|
|
30
|
-
- **Static First:** Default to SSG (Static Site Generation). Use SSR only when
|
|
31
|
-
dynamic user data or real-time interaction is required.
|
|
32
|
-
- **Island Architecture:** Use standard HTML for most of the page.
|
|
33
|
-
- **Server Islands (Astro 5):** Use the `server:defer` directive for components
|
|
34
|
-
that depend on personalized or dynamic data.
|
|
35
|
-
- **Astro Actions:** Use built-in Actions for all data mutations and form
|
|
36
|
-
submissions to ensure type-safety.
|
|
37
|
-
- **Zero JS by Default:** Ensure components use `.astro` syntax and do not ship
|
|
38
|
-
any JavaScript to the client unless explicitly requested via `client:*`
|
|
39
|
-
directives.
|
|
40
|
-
|
|
41
|
-
## 2. Technical Standards
|
|
42
|
-
|
|
43
|
-
- **Component Structure:**
|
|
44
|
-
- Logic (JS/TS) in the component script (top `---` fence).
|
|
45
|
-
- Markup in the HTML template.
|
|
46
|
-
- Scoped CSS in the `<style>` block.
|
|
47
|
-
- **Content Layer API:** Always use the new Content Layer for data sourcing.
|
|
48
|
-
Manage collections via `src/content/config.ts` with Zod schema validation for
|
|
49
|
-
all metadata.
|
|
50
|
-
- **Hydration Directives:** Use the most restrictive directive possible:
|
|
51
|
-
- `client:load` for immediate interactivity.
|
|
52
|
-
- `client:visible` for elements below the fold.
|
|
53
|
-
- `client:idle` for non-critical logic.
|
|
54
|
-
|
|
55
|
-
## 3. Best Practices
|
|
56
|
-
|
|
57
|
-
- **Image Optimization:** Always use the `<Image />` or `<Picture />` components
|
|
58
|
-
for automatic format conversion and resizing.
|
|
59
|
-
- **Metadata/SEO:** Use a layout component to inject standard SEO tags (`title`,
|
|
60
|
-
`meta`, `og:image`, `canonical`).
|
|
61
|
-
- **View Transitions:** Use Astro's built-in view transitions for SPA-like
|
|
62
|
-
navigation without the performance overhead.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: astro-react-island-strategist
|
|
3
|
-
description:
|
|
4
|
-
Maintains strict boundaries between Astro server components and React client
|
|
5
|
-
islands in hybrid Astro/React workspaces. Use when keeping `.astro` files
|
|
6
|
-
for static HTML/SEO and `.tsx` for interactive islands — embed React only
|
|
7
|
-
with explicit `client:*` directives and pass serializable props.
|
|
8
|
-
vendor: astro
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Astro & React Island Strategist
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Use `.astro` files for static HTML generation, routing, and SEO; do not reach for React when Astro suffices.
|
|
16
|
-
- Use React `.tsx` files only for genuinely interactive UI islands, not for static rendering.
|
|
17
|
-
- Embed a React component in Astro only with an explicit `client:*` directive (`client:load`, `client:idle`, `client:visible`).
|
|
18
|
-
- Pick the most restrictive `client:*` directive that satisfies the interaction — prefer `client:idle` or `client:visible` over `client:load` whenever possible.
|
|
19
|
-
- Pass only serializable data as props across the Astro → React island boundary; never pass functions or class instances.
|
|
20
|
-
|
|
21
|
-
**Description:** Maintains strict boundaries between Astro server components and
|
|
22
|
-
React client islands.
|
|
23
|
-
|
|
24
|
-
**Instruction:** For the `@repo/web` workspace:
|
|
25
|
-
|
|
26
|
-
- Use `.astro` files strictly for static HTML generation, routing, and SEO.
|
|
27
|
-
- Use React `.tsx` files ONLY for highly interactive UI components (islands).
|
|
28
|
-
- When embedding a React component in an Astro file, you MUST explicitly use
|
|
29
|
-
client directives (e.g., `client:load` or `client:idle`).
|
|
30
|
-
- Only pass serializable data as props from Astro to React.
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: expo-react-native-developer
|
|
3
|
-
description:
|
|
4
|
-
Prevents DOM element usage in React Native (Expo) workspaces. Use when
|
|
5
|
-
writing components for Expo apps — `<View>`, `<Text>`, `<TouchableOpacity>`
|
|
6
|
-
instead of `<div>`/`<span>`/`<p>`, no `window`/`document`, and styling
|
|
7
|
-
through the project's established solution.
|
|
8
|
-
vendor: expo
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Expo React Native Developer
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Never use HTML DOM elements (`<div>`, `<span>`, `<p>`, `<button>`, etc.) inside Expo or React Native components.
|
|
16
|
-
- Use React Native primitives instead: `<View>`, `<Text>`, `<TouchableOpacity>`, `<Pressable>`, `<ScrollView>`.
|
|
17
|
-
- Never reference browser globals (`window`, `document`, `localStorage`) in React Native code paths.
|
|
18
|
-
- Route all styling through the project's established styling solution; do not introduce a parallel CSS pipeline.
|
|
19
|
-
- Treat the `@repo/mobile` workspace as DOM-free — any DOM symbol that appears is a hallucination and must be replaced.
|
|
20
|
-
|
|
21
|
-
**Description:** Prevents DOM element usage in React Native.
|
|
22
|
-
|
|
23
|
-
**Instruction:** For the `@repo/mobile` workspace:
|
|
24
|
-
|
|
25
|
-
- YOU MUST NOT use HTML DOM elements like `<div>`, `<span>`, or `<p>`.
|
|
26
|
-
- Use strict React Native primitives: `<View>`, `<Text>`, `<TouchableOpacity>`,
|
|
27
|
-
etc.
|
|
28
|
-
- Ensure all styling uses the established styling solution.
|
|
29
|
-
- Never use `window` or `document` objects.
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: google-analytics-v4
|
|
3
|
-
description:
|
|
4
|
-
Implements privacy-compliant event tracking with Google Analytics 4. Use
|
|
5
|
-
when wiring analytics that must comply with GDPR/CCPA via Consent Mode V2 —
|
|
6
|
-
`snake_case` event names, no PII to GA servers, GTM-driven event firing,
|
|
7
|
-
and DebugView verification before deploy.
|
|
8
|
-
vendor: google
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Skill: Google Analytics 4 (GA4)
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Implement Consent Mode V2 and respect GDPR/CCPA; never send PII to GA servers.
|
|
16
|
-
- Track meaningful business actions (e.g. `start_checkout`, `share_article`) rather than relying solely on page views.
|
|
17
|
-
- Use `snake_case` for every event name and parameter — GA4 enforces this convention.
|
|
18
|
-
- Fire all events through Google Tag Manager rather than embedding measurement IDs directly in application code.
|
|
19
|
-
- Define critical user attributes (e.g. `user_type`, `pricing_plan`) as custom dimensions on the GA4 property.
|
|
20
|
-
- Verify every new event in GA4 DebugView before deploying to production.
|
|
21
|
-
- Filter development and internal traffic out of the production GA4 property.
|
|
22
|
-
- Keep IP anonymization enabled and configure cross-domain tracking when traffic spans multiple origins.
|
|
23
|
-
|
|
24
|
-
Guidelines for privacy-compliant and data-driven event tracking using GA4.
|
|
25
|
-
|
|
26
|
-
## 1. Core Principles
|
|
27
|
-
|
|
28
|
-
- **Privacy Compliance:** Adhere to GDPR and CCPA. Implement Consent Mode V2 and
|
|
29
|
-
never send PII to GA servers.
|
|
30
|
-
- **Event-Driven:** Focus on meaningful user actions (e.g., "start_checkout",
|
|
31
|
-
"share_article") rather than just page views.
|
|
32
|
-
- **Data Accuracy:** Filter out development and internal traffic from production
|
|
33
|
-
property data.
|
|
34
|
-
|
|
35
|
-
## 2. Technical Standards
|
|
36
|
-
|
|
37
|
-
- **GTM Integration:** Use Google Tag Manager for event firing to decouple
|
|
38
|
-
marketing tags from core application code.
|
|
39
|
-
- **Custom Dimensions:** Define critical data points (e.g., `user_type`,
|
|
40
|
-
`pricing_plan`) as custom dimensions in the GA4 property.
|
|
41
|
-
- **Enhanced Measurement:** Leverage GA4's built-in tracking for scrolls,
|
|
42
|
-
outbound clicks, and site searches.
|
|
43
|
-
|
|
44
|
-
## 3. Best Practices
|
|
45
|
-
|
|
46
|
-
- **Naming Convention:** Use `snake_case` for event names and parameters.
|
|
47
|
-
- **Debug View:** Use the GA4 DebugView in the browser to verify events fire
|
|
48
|
-
correctly before deploying.
|
|
49
|
-
- **Anonymization:** Ensure IP anonymization is enabled (default in GA4) and
|
|
50
|
-
cross-domain tracking is configured if necessary.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tailwind-v4
|
|
3
|
-
description:
|
|
4
|
-
Implements maintainable styling with Tailwind CSS v4. Use when writing
|
|
5
|
-
styles in v4 projects — CSS-first configuration via `@theme` blocks (never
|
|
6
|
-
`tailwind.config.ts/js`), mobile-first breakpoints, full class names (no
|
|
7
|
-
string interpolation), and no arbitrary `p-[13px]`-style values.
|
|
8
|
-
vendor: tailwind
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Skill: Tailwind CSS v4
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Configure the theme via CSS-first `@theme` blocks; never use `tailwind.config.ts` or `tailwind.config.js` in v4 projects.
|
|
16
|
-
- Prefer atomic utility classes (`flex`, `p-4`, `text-lg`) over hand-written CSS classes.
|
|
17
|
-
- Use mobile-first breakpoints (`sm:`, `md:`, `lg:`, `xl:`); never write desktop-first overrides.
|
|
18
|
-
- Define `hover:`, `focus-visible:`, and `active:` states explicitly on every interactive element.
|
|
19
|
-
- Arbitrary values (`p-[13px]`) are prohibited — map one-off values to a `@theme` CSS variable instead.
|
|
20
|
-
- Never build utility classes by string interpolation (e.g. `text-${color}`); always use full literal class names so the compiler detects them.
|
|
21
|
-
- Adhere to the design system's spacing, color, and typography tokens defined in `@theme` variables.
|
|
22
|
-
- For repeated UI patterns, extract a component or a CSS `@apply` block — do not let class strings bloat in JSX.
|
|
23
|
-
|
|
24
|
-
Rules for implementing high-performance, maintainable styling using the latest
|
|
25
|
-
Tailwind CSS specification.
|
|
26
|
-
|
|
27
|
-
## 1. Core Principles
|
|
28
|
-
|
|
29
|
-
- **CSS-First Configuration:** Use CSS variables for theme customization within
|
|
30
|
-
the `@theme` block. **NEVER** use `tailwind.config.ts` or `tailwind.config.js`
|
|
31
|
-
in v4 projects.
|
|
32
|
-
- **Modern Syntax:** Leverage the new `@theme` directive, fluid design
|
|
33
|
-
utilities, and lightning-fast compilation.
|
|
34
|
-
- **Token Consistency:** Strictly adhere to the design system's spacing, color,
|
|
35
|
-
and typography tokens defined in the CSS variables.
|
|
36
|
-
|
|
37
|
-
## 2. Technical Standards
|
|
38
|
-
|
|
39
|
-
- **Utility Usage:** Prefer atomic utility classes (`flex`, `p-4`, `text-lg`)
|
|
40
|
-
over custom CSS classes.
|
|
41
|
-
- **Responsive Design:** Use mobile-first breakpoints (`sm:`, `md:`, `lg:`,
|
|
42
|
-
`xl:`).
|
|
43
|
-
- **Interactive States:** Explicitly define `hover:`, `focus-visible:`, and
|
|
44
|
-
`active:` states for all interactive elements to ensure a premium feel.
|
|
45
|
-
- **Arbitrary Values:** **STRICTLY PROHIBITED** (`p-[13px]`) unless explicitly
|
|
46
|
-
required by a one-off legacy asset. Always map unique values to a temporary
|
|
47
|
-
CSS variable in the `@theme` block instead.
|
|
48
|
-
|
|
49
|
-
## 3. Best Practices
|
|
50
|
-
|
|
51
|
-
- **Class Ordering:** Use the standard Tailwind class ordering (Layout -> Box
|
|
52
|
-
Model -> Typography -> Visual -> Misc).
|
|
53
|
-
- **Component Patterns:** For repeated UI patterns (e.g., buttons), use a
|
|
54
|
-
dedicated component or a reusable `@apply` block in a CSS file to avoid
|
|
55
|
-
class-string bloat.
|
|
56
|
-
- **Dynamic Classes:** Never use string interpolation to create utility classes
|
|
57
|
-
(e.g., `text-${color}`). Always use full class names to ensure the compiler
|
|
58
|
-
detects them.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ui-accessibility-engineer
|
|
3
|
-
description:
|
|
4
|
-
Enforces mobile-first Tailwind CSS and strict WCAG 2.1 AA compliance for
|
|
5
|
-
user-facing UI. Use when building UI components — utility classes only (no
|
|
6
|
-
custom CSS or inline `style={{}}`), mobile-first breakpoints, visible focus
|
|
7
|
-
states, alt text, and 4.5:1 contrast.
|
|
8
|
-
vendor: tailwind
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# UI/UX Accessibility & Styling Engineer
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Style only with Tailwind utility classes; never write custom CSS files or inline `style={{}}` objects in components.
|
|
16
|
-
- Follow mobile-first responsive design: default classes target mobile, `md:` / `lg:` prefixes scale up.
|
|
17
|
-
- Give every interactive element a visible focus state (`focus:ring`, `focus-visible:*`).
|
|
18
|
-
- Provide meaningful `alt` text on every image; empty `alt=""` only for purely decorative imagery.
|
|
19
|
-
- Meet WCAG 2.1 AA contrast: minimum 4.5:1 for normal text, 3:1 for large text.
|
|
20
|
-
- Ensure every interactive element is reachable and triggerable via keyboard alone.
|
|
21
|
-
- Use semantic HTML elements (`<button>`, `<nav>`, `<main>`) before reaching for ARIA roles.
|
|
22
|
-
|
|
23
|
-
**Description:** Enforces mobile-first Tailwind CSS and strict WCAG AA
|
|
24
|
-
compliance.
|
|
25
|
-
|
|
26
|
-
**Instruction:** You are building user-facing interfaces.
|
|
27
|
-
|
|
28
|
-
- Strictly use Tailwind CSS utility classes. DO NOT write custom CSS or inline
|
|
29
|
-
`style={{}}` objects.
|
|
30
|
-
- Follow a mobile-first approach: default classes apply to mobile, using `md:`
|
|
31
|
-
and `lg:` prefixes for larger viewports.
|
|
32
|
-
- Enforce WCAG 2.1 AA accessibility: All interactive elements must have focus
|
|
33
|
-
states (`focus:ring`), images must have meaningful `alt` text, and color
|
|
34
|
-
contrasts must meet the 4.5:1 ratio.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: audit-accessibility
|
|
3
|
-
description:
|
|
4
|
-
Audits sites and apps for WCAG 2.1 Level AA compliance using automated and
|
|
5
|
-
manual testing tools. Use when running an accessibility audit or building a
|
|
6
|
-
remediation plan — semantic HTML, contrast, focus management, keyboard
|
|
7
|
-
reachability, and axe-core integration in Vitest/Playwright.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Skill: Accessibility Audit (A11y)
|
|
11
|
-
|
|
12
|
-
## Policy Capsule
|
|
13
|
-
|
|
14
|
-
- Use semantic HTML (`<nav>`, `<main>`, `<header>`, `<button>`) before reaching for ARIA roles.
|
|
15
|
-
- Maintain a minimum 4.5:1 contrast for normal text and 3:1 for large text.
|
|
16
|
-
- Ensure a visible focus indicator on every focusable element and a logical tab order across the page.
|
|
17
|
-
- Use `aria-label`, `aria-labelledby`, and `aria-describedby` only when semantic HTML cannot express the intent.
|
|
18
|
-
- Treat automated scans as 40–50% coverage only; follow every audit with manual keyboard and screen-reader checks.
|
|
19
|
-
- Integrate `axe-core` into Vitest or Playwright runs so a11y regressions are caught in CI.
|
|
20
|
-
- Give every `<img>` an `alt` attribute — empty for decorative, descriptive for functional.
|
|
21
|
-
- Verify every interactive element is reachable and triggerable via keyboard alone.
|
|
22
|
-
|
|
23
|
-
Protocols for ensuring WCAG 2.1 Level AA compliance using automated and manual
|
|
24
|
-
testing tools.
|
|
25
|
-
|
|
26
|
-
## 1. Core Principles
|
|
27
|
-
|
|
28
|
-
- **Inclusive Design:** The application must be usable by everyone, regardless
|
|
29
|
-
of disability.
|
|
30
|
-
- **Automated First, Not Only:** Use tools to catch 40-50% of issues, then
|
|
31
|
-
follow with manual keyboard and screen reader checks.
|
|
32
|
-
|
|
33
|
-
## 2. Technical Standards
|
|
34
|
-
|
|
35
|
-
- **Semantic HTML:** Use correct tags (e.g., `<nav>`, `<main>`, `<header>`,
|
|
36
|
-
`<button>`) to provide native accessibility features.
|
|
37
|
-
- **Contrast Ratios:** Maintain a minimum 4.5:1 contrast for normal text and 3:1
|
|
38
|
-
for large text.
|
|
39
|
-
- **Focus Management:** Ensure a visible focus indicator is always present and
|
|
40
|
-
the tab order is logical.
|
|
41
|
-
- **ARIA Labels:** Use `aria-label`, `aria-labelledby`, and `aria-describedby`
|
|
42
|
-
only when standard HTML is insufficient.
|
|
43
|
-
|
|
44
|
-
## 3. Best Practices
|
|
45
|
-
|
|
46
|
-
- **pa11y/axe:** Integrate `axe-core` into Vitest/Playwright tests for automated
|
|
47
|
-
regressions.
|
|
48
|
-
- **Alt Text:** Every image must have an `alt` attribute (empty for decorative
|
|
49
|
-
images, descriptive for functional ones).
|
|
50
|
-
- **Keyboard Navigation:** Every interactive element must be reachable and
|
|
51
|
-
triggerable via keyboard alone.
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lighthouse-baseline
|
|
3
|
-
description:
|
|
4
|
-
Codifies the capture-and-check baseline pattern for long-running quality
|
|
5
|
-
signals (Lighthouse scores, bundle size, p95 latency, runtime memory). Use
|
|
6
|
-
when wiring a new metric that needs a baseline file, paired :capture /
|
|
7
|
-
:check npm scripts, a tolerance-bounded gate, and a weekly refresh
|
|
8
|
-
cadence — the goal is a hard CI signal that ratchets only with intent.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Skill: Lighthouse-Style Quality Baseline
|
|
12
|
-
|
|
13
|
-
## Policy Capsule
|
|
14
|
-
|
|
15
|
-
- Use this pattern only for numeric, run-to-run-comparable signals with directional intent (higher-is-better or lower-is-better) and meaningful noise variance.
|
|
16
|
-
- Commit one canonical `baselines/<name>.json` per signal — never combine multiple metrics into a single baseline file.
|
|
17
|
-
- Provide paired `<name>:capture` and `<name>:check` npm scripts; `:capture` writes the baseline, `:check` compares with tolerance and exits non-zero on regression.
|
|
18
|
-
- Implement a `--self-test` mode that runs the comparator against known-good and known-regression fixtures so CI verifies the gate itself.
|
|
19
|
-
- Pick tolerance from observed run-to-run spread (~2σ); tolerance of 0 flaps and trains reviewers to rubber-stamp refreshes.
|
|
20
|
-
- Refresh baselines through deliberate, human-reviewed commits with the `baseline-refresh:` subject prefix; never auto-refresh on every CI run.
|
|
21
|
-
- Run a weekly scheduled `:capture` workflow that opens a PR only when drift exceeds tolerance.
|
|
22
|
-
- Keep baselines under source control — never store them in `temp/` or `coverage/` or anything covered by `.gitignore`.
|
|
23
|
-
|
|
24
|
-
Pattern for promoting an episodic measurement into a long-running quality
|
|
25
|
-
signal. The audit-lighthouse / audit-performance / audit-bundle-size
|
|
26
|
-
workflows produce a snapshot. This skill is for the next step: turning that
|
|
27
|
-
snapshot into a baseline a CI gate can ratchet against.
|
|
28
|
-
|
|
29
|
-
## When to reach for this
|
|
30
|
-
|
|
31
|
-
Reach for this pattern when **all** of these hold:
|
|
32
|
-
|
|
33
|
-
- The signal is **numeric and comparable** across runs (a score, a duration,
|
|
34
|
-
a byte count). Boolean pass/fail signals belong in a normal lint, not a
|
|
35
|
-
baseline.
|
|
36
|
-
- The signal has **noise floor variance** between runs, so equality checks
|
|
37
|
-
would flap. You need a tolerance band.
|
|
38
|
-
- The signal has **directional intent** — bigger is worse (bundle KB, p95
|
|
39
|
-
ms) or bigger is better (Lighthouse score). The gate enforces direction;
|
|
40
|
-
a refresh moves the line on purpose.
|
|
41
|
-
- Refreshing the baseline should be a **deliberate commit**, reviewed like
|
|
42
|
-
any other change. Auto-refreshing on every CI run defeats the gate.
|
|
43
|
-
|
|
44
|
-
If the signal is binary or one-shot (e.g. "page returns 200", "alt-text
|
|
45
|
-
present"), stay in the audit-* workflow space — don't spin up a baseline
|
|
46
|
-
for it.
|
|
47
|
-
|
|
48
|
-
## Anatomy
|
|
49
|
-
|
|
50
|
-
The five pieces every baseline of this shape carries:
|
|
51
|
-
|
|
52
|
-
1. **`baselines/<name>.json`** — canonical snapshot committed to the repo.
|
|
53
|
-
One file per signal. JSON, not YAML or TOML — diff tooling handles it
|
|
54
|
-
uniformly.
|
|
55
|
-
2. **`<name>:capture` npm script** — runs the measurement, writes the new
|
|
56
|
-
snapshot to a temp path. Never overwrites the canonical baseline
|
|
57
|
-
directly. Operator-driven.
|
|
58
|
-
3. **`<name>:check` npm script** — runs the measurement, compares against
|
|
59
|
-
`baselines/<name>.json` with a tolerance, exits non-zero on regression.
|
|
60
|
-
Wired into the close-validation gate chain (see `buildDefaultGates` in
|
|
61
|
-
`lib/close-validation/gates.js`) and into the PR gate.
|
|
62
|
-
4. **`--self-test` flag** — every check script accepts `--self-test`,
|
|
63
|
-
which runs the comparator against synthetic inputs (a known-good and a
|
|
64
|
-
known-regression fixture) and asserts the gate's verdict matches. CI
|
|
65
|
-
runs this on every PR so a comparator bug can't silently mask a real
|
|
66
|
-
regression.
|
|
67
|
-
5. **Weekly cadence workflow** — a scheduled CI job that runs `:capture`,
|
|
68
|
-
diffs against the committed baseline, opens a PR if drift is real
|
|
69
|
-
(above tolerance) or a comment if it is within band. Intent-driven
|
|
70
|
-
refresh: the PR is the place to argue the regression is justified.
|
|
71
|
-
|
|
72
|
-
## Worked example: Lighthouse Performance score
|
|
73
|
-
|
|
74
|
-
`baselines/lighthouse-performance.json`:
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
{
|
|
78
|
-
"$schema": "../.agents/schemas/baseline-numeric.schema.json",
|
|
79
|
-
"metric": "lighthouse.categories.performance",
|
|
80
|
-
"value": 92,
|
|
81
|
-
"direction": "higher-is-better",
|
|
82
|
-
"tolerance": 2,
|
|
83
|
-
"capturedAt": "2026-05-06T00:00:00Z",
|
|
84
|
-
"capturedFrom": {
|
|
85
|
-
"url": "https://preview.example.com/",
|
|
86
|
-
"lighthouseVersion": "12.2.1",
|
|
87
|
-
"formFactor": "desktop"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Two npm scripts in `package.json`:
|
|
93
|
-
|
|
94
|
-
```jsonc
|
|
95
|
-
{
|
|
96
|
-
"scripts": {
|
|
97
|
-
"lighthouse:capture": "node scripts/lighthouse-baseline.js --capture",
|
|
98
|
-
"lighthouse:check": "node scripts/lighthouse-baseline.js --check"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
The script implements three modes:
|
|
104
|
-
|
|
105
|
-
- `--capture` — Run Lighthouse, write `baselines/lighthouse-performance.json`.
|
|
106
|
-
- `--check` — Run Lighthouse, compare to the committed baseline. Exit 0 if
|
|
107
|
-
the value is within `(baseline ± tolerance)` or improving. Exit 1 if the
|
|
108
|
-
value falls below `(baseline − tolerance)` for higher-is-better metrics,
|
|
109
|
-
or above `(baseline + tolerance)` for lower-is-better metrics.
|
|
110
|
-
- `--self-test` — Skip the real measurement. Run the comparator against
|
|
111
|
-
fixtures (e.g. known-good=92, known-regression=87). Assert that the gate
|
|
112
|
-
verdicts match the expected pass/fail. Exit 0 on success.
|
|
113
|
-
|
|
114
|
-
## Gate hint shape
|
|
115
|
-
|
|
116
|
-
When the `:check` script fails, the error message must point at the exact
|
|
117
|
-
remediation path. A working hint:
|
|
118
|
-
|
|
119
|
-
```text
|
|
120
|
-
Lighthouse performance score 87 is below baseline 92 (tolerance ±2).
|
|
121
|
-
Either: (a) fix the regression, or (b) if the drop is justified, run
|
|
122
|
-
`npm run lighthouse:capture` and commit the refreshed baseline with a
|
|
123
|
-
`baseline-refresh:` tagged subject (non-empty body explaining why).
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
The `baseline-refresh:` subject prefix mirrors the existing CRAP / MI
|
|
127
|
-
convention so the same commit-tag tooling already validating those
|
|
128
|
-
baselines extends to this one.
|
|
129
|
-
|
|
130
|
-
## Weekly cadence
|
|
131
|
-
|
|
132
|
-
`.github/workflows/lighthouse-weekly.yml` (or the equivalent for your CI):
|
|
133
|
-
|
|
134
|
-
```yaml
|
|
135
|
-
on:
|
|
136
|
-
schedule:
|
|
137
|
-
- cron: "0 14 * * 1" # Mondays 14:00 UTC
|
|
138
|
-
workflow_dispatch: {}
|
|
139
|
-
|
|
140
|
-
jobs:
|
|
141
|
-
refresh:
|
|
142
|
-
steps:
|
|
143
|
-
- run: npm run lighthouse:capture
|
|
144
|
-
- run: |
|
|
145
|
-
if git diff --quiet baselines/lighthouse-performance.json; then
|
|
146
|
-
echo "No drift; baseline still valid."
|
|
147
|
-
exit 0
|
|
148
|
-
fi
|
|
149
|
-
# Drift exists — open a PR with the refreshed baseline.
|
|
150
|
-
gh pr create --title "baseline-refresh: lighthouse perf" \
|
|
151
|
-
--body "Auto-captured weekly baseline. Review the diff and merge if intentional."
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
The cadence is weekly, not daily — a daily refresh creates so many PRs
|
|
155
|
-
that reviewers stop reading them. The point is for a reviewer to read the
|
|
156
|
-
diff and say "yes, this is the new floor" or "no, that regression
|
|
157
|
-
shouldn't be in main."
|
|
158
|
-
|
|
159
|
-
## Tolerance picking
|
|
160
|
-
|
|
161
|
-
Tolerance encodes "what's noise". Pick it from the **observed run-to-run
|
|
162
|
-
spread** on a known-good build, not a vibe:
|
|
163
|
-
|
|
164
|
-
1. Capture the metric ten times against the same artifact.
|
|
165
|
-
2. Take the standard deviation σ.
|
|
166
|
-
3. Set tolerance ≈ 2σ. That gates real regressions without flapping on
|
|
167
|
-
warmup variance.
|
|
168
|
-
|
|
169
|
-
If σ is bigger than the regressions you care about, the metric is too
|
|
170
|
-
noisy for this pattern — invest in stabilising the measurement (warm-up
|
|
171
|
-
runs, pinned hardware, controlled network) before adding the gate.
|
|
172
|
-
|
|
173
|
-
## Anti-patterns
|
|
174
|
-
|
|
175
|
-
- **Auto-refresh on every CI run.** Defeats the gate; every regression
|
|
176
|
-
becomes the new normal. Refreshes must be commits.
|
|
177
|
-
- **Tolerance = 0.** Flaps on warmup noise, training reviewers to
|
|
178
|
-
rubber-stamp `baseline-refresh:` PRs without reading them. Then a real
|
|
179
|
-
regression sneaks through.
|
|
180
|
-
- **No `--self-test`.** A bug in the comparator silently disables the
|
|
181
|
-
gate. The self-test is the gate's gate.
|
|
182
|
-
- **Multiple metrics in one baseline file.** Couples unrelated drifts. A
|
|
183
|
-
bundle-size regression shouldn't block a Lighthouse refresh. One signal
|
|
184
|
-
per file.
|
|
185
|
-
- **Baseline lives in `temp/` or `coverage/`.** The baseline is source of
|
|
186
|
-
truth — committed and reviewed. Anything under `temp/` or in `.gitignore`
|
|
187
|
-
is a snapshot, not a baseline.
|
|
188
|
-
|
|
189
|
-
## Cross-references
|
|
190
|
-
|
|
191
|
-
- Existing baseline-shape conventions in this framework:
|
|
192
|
-
`baselines/maintainability.json`, `baselines/crap.json`,
|
|
193
|
-
`baselines/lint.json`. Their `:update` / `:check` script pairs and the
|
|
194
|
-
`baseline-refresh:` commit-subject contract are the prior art this
|
|
195
|
-
skill generalises.
|
|
196
|
-
- The audit-lighthouse workflow (`/audit-lighthouse`) produces the
|
|
197
|
-
one-shot Lighthouse snapshot that feeds the first `:capture`. Run it
|
|
198
|
-
once to confirm the script's measurement matches the workflow's, then
|
|
199
|
-
promote to a baseline.
|