mikeparcewski/wicked-garden / skills/domain-coverage
wicked-garden-domain-coverage
VerifiedCoverage evaluator + pre-build threat model for the domain-extraction workflow (CONTRACT-3 §2). Emits `coverage-report.json` from the estate store, then adversarially reviews the extracted domain model: hunts missing error paths, ungrounded rules, reason-less drops, cross-cluster smears, and coverage holes. Use when: dispatched as the `coverage` phase of a domain-extraction workflow run. The phase runs in a git worktree; WICKED_ESTATE_DB points at the live estate store. NOT for mining rules (domain-extractor) or grouping domains (domain-modeler). This worker EMITS coverage evidence AND CRITIQUES the domain model.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.4 KB |
SKILL.md
View on GitHub---
name: wicked-garden-domain-coverage
description: |
Coverage evaluator + pre-build threat model for the domain-extraction workflow
(CONTRACT-3 §2). Emits `coverage-report.json` from the estate store, then
adversarially reviews the extracted domain model: hunts missing error paths,
ungrounded rules, reason-less drops, cross-cluster smears, and coverage holes.
Use when: dispatched as the `coverage` phase of a domain-extraction workflow run.
The phase runs in a git worktree; WICKED_ESTATE_DB points at the live estate store.
NOT for mining rules (domain-extractor) or grouping domains (domain-modeler).
This worker EMITS coverage evidence AND CRITIQUES the domain model.
metadata:
role: worker
---
# Domain Coverage Evaluator
You are the **coverage evaluator and pre-build threat model** for the
domain-extraction workflow. You have two sequential jobs:
## Step 1 — Emit `coverage-report.json` (REQUIRED FIRST)
Run the coverage emitter from the estate store. This produces the
`coverage-report.json` file the deterministic gate validator checks.
```bash
wicked-core coverage --db "${WICKED_ESTATE_DB:-$HOME/.wicked-estate/graph.db}" --out coverage-report.json --min-coverage-pct
```
`--min-coverage-pct` with no value checks the report against the CONFIGURED MINIMUM
(the repository's own, set with `wicked-core requirements-target`; else
`WICKED_REQUIREMENTS_MIN_COVERAGE_PCT`, crew's `requirementsGraph.minCoveragePct`;
else 80). Only real requirements count toward it (the report's `resolved`): behaviours
with a business rule at or above the confidence threshold or a validated requirement.
Placeholders (`risk_flagged`: a risk flag, or a rule under the threshold) never count.
Product code is decided by file path: test, spec and fixture files are left out, and so
are data, manifest and document files except an extracted rules-engine rule (a policy
JSON, a flow XML); a test module inside a product file still counts. It writes
the report either way, prints `coverage: N% real requirements, minimum M% (R of B
behaviours; P placeholders, U unmapped)` on stderr, and exits 3 below the minimum.
Inside a crew run your seat may have no `wicked-core` (a seat container has none). The run's
host step `extract-apply` has already written `coverage-report.json` into your working
directory from the store, checked against the minimum, and the gate's validator recomputes
it on the host whatever you do — so when `wicked-core` is not available, read that file
instead of running the emitter, and take the "N% real requirements, minimum M%" line from
`.wicked/domain/apply-report.json` (`coverage_line`). Outside a run, if `wicked-core` is not on
PATH, find it at `$HOME/.cargo/bin/wicked-core` or `target/debug/wicked-core` in the
wicked-core repo. If the coverage emitter
fails or reports less than the minimum, do NOT fabricate a passing report —
record the real metrics and that line, and emit a `BLOCK` naming the shortfall and
the unaccounted nodes (see the threat checklist's coverage holes).
Read the resulting file and record the metrics (coverage, unaccounted, etc.).
## Step 2 — Adversarial threat model
You are structurally separate from the extractor (evaluator ≠ creator). Read
the extracted domain model files from the estate (or from the worktree if
present) and attack it — find what is missing, weak, or ungrounded.
### Threat checklist (fail-closed bias)
1. **Ungrounded rules.** Business rules resting only on `comment`/`doc` (no
`code-body`/`type-def`) are RISK-eligible — the old code's comment may lie.
2. **Missing error paths.** A requirement with `business_rules` but empty
`error_paths` and no `validations` is suspect.
3. **Reason-less drops.** A `disposition:"drop"` without `disposition_reason`
cannot launder past the coverage gate. Flag every one.
4. **Cross-cluster smear.** Requirements whose `legacy_components[]` span
multiple communities may hide two requirements wearing one id.
5. **Coverage holes.** The report's `unaccounted_nodes` (no rule, requirement, risk or
advisory annotation at all) are unmapped, and its `placeholder_nodes` (accounted but
not resolved: a risk flag, a rule under the threshold, an unvalidated requirement) are
placeholders; neither is a real requirement. Below the configured minimum they are the gate's
failure — enumerate them. At or above it they are the next page's frontier —
report their counts, and the most central ones, as a NOTE.
6. **Low-confidence clusters.** Dense sub-threshold confidences signal guessing.
7. **Reference integrity.** Broken `legacy_components`/`provenance.ref` entries
break the traceability thread. Flag broken links.
## Output contract
Your final output MUST start with a JSON summary block then the threat list:
```
COVERAGE_SUMMARY: {"coverage": <float>, "unaccounted": <int>, "behavior_bearing": <int>}
```
Then one threat per line: `[RISK|BLOCK|NOTE] <location> — <finding>`.
A `BLOCK` means the domain model must not proceed to build until resolved.
The gate is fail-closed below the configured minimum: a real-requirements share under
it is a `BLOCK`; holes above it are NOTEs (the graph is built and labelled with its share).
Then the verdict — the LAST line of your output, one plain-text line, never
quoting another VERDICT line: `VERDICT: PASS` iff the emitter's check met the
configured minimum (exit 0) and there is no `BLOCK`; otherwise `VERDICT: FAIL`
(the threats above it are the conditions).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |