agentleFS
mikeparcewskimikeparcewski/wicked-garden/skills/domain-coverage/SKILL.md

wicked-garden-domain-coverage

Skill9 starsChanged 7 months agoMITView on GitHub

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.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the coverage emitter from the estate store.

    line 25
  2. Distinctive:

    Read the resulting file and record the metrics (coverage, unaccounted, etc.).

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

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).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.