skills/platform/gate-benchmark-rebaseline/SKILL.md
Re-baseline procedure for the AC-11 gate-result benchmark lane (`tests/crew/test_gate_result_benchmark.py`). The benchmark enforces a 2× p95 SLO on `gate-result.json` ingestion. When a deliberate perf change lands on main (validator hardening, cache tuning, schema expansion), the baseline needs updating. Never re-baseline to silence a regression. Use when: "re-baseline AC-11 benchmark", "gate-result benchmark regression", "p95 benchmark baseline out of date", "update benchmark_baseline.json", "benchmark.yml failure", "gate-result p95 exceeds 2x baseline", "rebaseline procedure", or `AC-11` baseline drift.
npx skillsauth add mikeparcewski/wicked-garden wicked-garden-platform-gate-benchmark-rebaselineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Operational procedure for updating tests/crew/benchmark_baseline.json after a legitimate perf change on main.
Re-baseline only when a deliberate perf change lands on main. Examples:
gate-result.json)scripts/qe/content_sanitizer.py)Do not re-baseline to silence a regression. If the benchmark fails on a PR that didn't intend perf work, treat it as a real regression and find the cause.
.github/workflows/benchmark.ymlscripts/crew/phase_manager.py, the gate-result schema/sanitizer (scripts/qe/content_sanitizer.py), or the benchmark test/baseline themselves. Other PRs skip the lane to keep default CI cost flat.tests/crew/test_gate_result_benchmark.py::test_load_gate_result_p95_within_2x_baselinebenchmark — opt-in. Local uv run pytest deselects it (see pyproject.toml addopts = "-m 'not benchmark'").uv run pytest -m benchmarkgate-result.json files cycling through 1 KB / 4 KB / 16 KB / 60 KB (bounded by MAX_SUMMARY_BYTES). Each round clears the memoization cache so the full validate + sanitize + cache-insert path is measured. Cache-hit timing is not part of the SLO.tests/crew/benchmark_baseline.json — p95_ns in nanoseconds.p95_current ≤ slo_multiplier × p95_baseline (default slo_multiplier = 2.0). The workflow comments the delta on every triggered PR.benchmark_baseline.json is deleted or malformed, the test soft-skips with a directive to record one. The SLO is not enforced until a valid baseline is present — so a re-baseline PR can merge without a circular dependency.Check out the target main commit.
git checkout main && git pull
Run the benchmark three times. The SLO is against p95, and CI noise varies — taking the highest of three local runs adds margin.
uv run pytest -m benchmark tests/crew/test_gate_result_benchmark.py -s
uv run pytest -m benchmark tests/crew/test_gate_result_benchmark.py -s
uv run pytest -m benchmark tests/crew/test_gate_result_benchmark.py -s
Record the highest p95_current reading from the three runs.
Update tests/crew/benchmark_baseline.json:
| Field | New value |
|-------|-----------|
| p95_ns | The highest p95_current from step 3, rounded up |
| recorded_on | Today's date (YYYY-MM-DD) |
| recorded_from_commit | Short SHA of the target main commit |
| slo_multiplier | Leave at 2.0 unless the AC-11 contract changes |
| rebaseline_procedure | Leave at wicked-garden:platform:gate-benchmark-rebaseline |
Commit the baseline update in a dedicated PR. Title convention:
chore(benchmark): re-baseline AC-11 after {change-summary}
The benchmark workflow runs on the PR and must pass (p95 should be well under 2× the new baseline since you just measured it).
Strict mode for gate-result ingestion (WG_GATE_RESULT_STRICT_AFTER, default 2026-06-18) requires the AC-11 benchmark lane to be active in CI. Rationale: once strict-mode activates, a silent 2×+ perf regression would push every approve_phase call over the SLO without a guard.
If the benchmark lane is broken or disabled on main:
WG_GATE_RESULT_STRICT_AFTER out (env var or default-constant update). Do not let strict-mode activate without benchmark enforcement.For production rollback of a specific ingestion check, prefer env-var soft-disable over git-revert:
| Variable | Effect |
|----------|--------|
| WG_GATE_RESULT_SCHEMA_VALIDATION=off | Skip schema validator |
| WG_GATE_RESULT_CONTENT_SANITIZATION=off | Skip content sanitizer |
| WG_GATE_RESULT_DISPATCH_CHECK=off | Skip dispatch-log orphan check |
All flags auto-expire at WG_GATE_RESULT_STRICT_AFTER.
tests/crew/test_gate_result_benchmark.pytests/crew/benchmark_baseline.json.github/workflows/benchmark.ymlscripts/crew/phase_manager.py (gate-result load + memoization)scripts/qe/content_sanitizer.pydevelopment
Pattern-conformance agent-half: evaluates a produced artifact or diff against a set of architectural/design pattern rules from the conformance-rule store (wicked_governance schema). Returns structured findings with rule ID, severity, and rationale — the deterministic half (mechanical rule recall) is done by the guard pipeline; this is the semantic evaluation step. Triggered by: the guard_pipeline `outgov_pattern` check (session-close), or explicitly by an engineering review when WICKED_OUTGOV_RULES_DIR is populated. NOT a replacement for the full `engineering` review skill — focuses only on conformance to stored Pattern rules; architecture and code-quality checks live in the `engineering` skill. Semantic evaluation reuses `wicked-garden-qe-semantic-reviewer` as the designated agent-half evaluator (per garden#983 spec). This skill is the orchestrating wrapper that loads applicable Pattern rules and delegates the per-rule semantic judgment to qe-semantic-reviewer.
tools
The FOUNDATIONAL domain-model capability: extract a codebase's domain — testable business rules (with confidence + provenance), entities, requirements — as a schema-conformant model on the estate graph. The workers annotate the store; wicked-core reads it and builds the requirements graph, coverage-gating fail-closed. Steers three fork workers. A shared substrate, not a modernization tool. The `modernize` archetype DERIVES from it; build / migrate / review / specify / explore consume the SAME domain model — none OWN it. Understanding a codebase's domain is upstream of almost everything else garden does. Use when: "extract the business rules / domain model from this codebase", "build a requirements graph from the code", "what does this system actually require", "reverse-engineer the domain before we build/port/migrate". Works on ANY codebase (modern or legacy) — the value is the domain model, not the porting. NOT the code transform itself (that is the archetype consuming this model). This skill produces the DOMAIN MODEL, not new code.
development
Domain-graph fork worker for the modernize archetype. Groups the estate's Louvain communities into business domains, attaches each requirement to its cluster (advisory cluster_id provenance), and invokes wicked-core's domain-graph build (which reads the annotated estate store, recomputes coverage fail-closed, and builds the requirements graph) — then validates core's output against the vendored schema. Use when: dispatched by wicked-garden-domain after rule extraction to turn a flat rule set into cluster-keyed domains; "group these into domains", "build the requirements graph", "translate clusters into a domain model". NOT for mining the rules themselves (that is domain-extractor) or threat-modeling (that is domain-coverage).
tools
Rule-extraction fork worker for the FOUNDATIONAL domain-model capability. Mines testable business rules from a codebase — each with a numeric confidence and a provenance{source, ref, source_kinds} — and annotates them into the estate store so wicked-core can build the domain-model requirements graph (coverage-gated). This is a substrate, not a modernization tool: the `modernize` archetype DERIVES from it, and build / migrate / review / specify / explore can consume the same domain model — none OWN it. Use when: dispatched by wicked-garden-domain to mine the business_rules of a codebase (or a module); "extract the domain rules", "what does this system require", building the requirements half of a domain model. NOT for grouping into domains (that is domain-modeler) or judging coverage (that is domain-coverage — a seat-distinct evaluator).