Skip to content

mikeparcewski/wicked-garden / skills/domain

wicked-garden-domain

Verified

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, fail-closed below the configured minimum share of real requirements (80% by default). Steers three 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. 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.

FileKindSize
SKILL.mdskill md16.3 KB
refs/domain-model-emit.mdmarkdown6.9 KB
refs/extraction-flow.mdmarkdown8.6 KB
refs/fixtures/example-domain-model.jsonconfig6.7 KB

refs/fixtures/example-domain-model.json

View on GitHub
{
  "metadata": {
    "schema_version": "1.0.0",
    "migration_mode": "functional",
    "source": "acme-billing-legacy"
  },
  "domains": {
    "billing": {
      "requirements": {
        "REQ-BILL-LATEFEE": {
          "title": "Assess late fee on overdue invoices",
          "description": "Invoices unpaid past the grace window accrue a late fee.",
          "legacy_components": [
            "sym synthetic billing::Invoice.assessLateFee::a1:",
            "sym synthetic billing::LateFee.calc::a3:"
          ],
          "data_access": [
            "invoices",
            "fee_schedule"
          ],
          "dependencies": [
            "REQ-BILL-CLOSE"
          ],
          "business_rules": [
            {
              "id": "RULE-001",
              "statement": "Invoices more than 30 days overdue accrue a 1.5% monthly late fee.",
              "confidence": 0.86,
              "provenance": {
                "source": "acme-billing-legacy",
                "ref": "sym synthetic billing::LateFee.calc::a3:",
                "source_kinds": [
                  "code-body"
                ]
              },
              "source_ref": "src/billing/late_fee.py#L40"
            },
            {
              "id": "RULE-002",
              "statement": "The late fee is capped at 25% of the original invoice amount.",
              "confidence": 0.72,
              "provenance": {
                "source": "acme-billing-legacy",
                "ref": "sym synthetic billing::LateFee.calc::a3:",
                "source_kinds": [
                  "code-body",
                  "comment"
                ]
              }
            }
          ],
          "validations": [
            {
              "id": "VAL-001",
              "statement": "Invoice amount must be positive.",
              "field": "amount_due",
              "error_ref": "ERR-001"
            }
          ],
          "error_paths": [
            {
              "id": "ERR-001",
              "statement": "Reject fee assessment when amount_due <= 0.",
              "code": "422"
            }
          ],
          "status": "active",
          "disposition": "keep"
        },
        "REQ-BILL-CLOSE": {
          "title": "Close a fully-paid invoice",
          "description": "An invoice with zero balance transitions to closed.",
          "legacy_components": [
            "sym synthetic billing::Invoice.close::a2:"
          ],
          "data_access": [
            "invoices"
          ],
          "dependencies": [],
          "business_rules": [
            {
              "id": "RULE-001",
              "statement": "An invoice closes automatically once amount_due reaches zero.",
              "confidence": 0.91,
              "provenance": {
                "source": "acme-billing-legacy",
                "ref": "sym synthetic billing::Invoice.close::a2:",
                "source_kinds": [
                  "code-body",
                  "type-def"
                ]
              }
            }
          ],
          "validations": [],
          "error_paths": [],
          "status": "active",
          "disposition": "modify"
        },
        "REQ-BILL-DUNNING": {
          "title": "Nightly paper dunning letter batch",
          "description": "Legacy overnight batch printed paper overdue notices.",
          "legacy_components": [
            "sym synthetic payments::Charge.entity::b3:"
          ],
          "data_access": [
            "invoices"
          ],
          "dependencies": [],
          "business_rules": [
            {
              "id": "RULE-001",
              "statement": "Overdue invoices generated a mailed paper dunning letter nightly.",
              "confidence": 0.64,
              "provenance": {
                "source": "acme-billing-legacy",
                "ref": "sym synthetic payments::Charge.entity::b3:",
                "source_kinds": [
                  "doc"
                ]
              }
            }
          ],
          "validations": [],
          "error_paths": [],
          "status": "review",
          "disposition": "drop",
          "disposition_reason": "Paper dunning is replaced by the email notification service in the target; no parity obligation."
        }
      },
      "entities": {
        "Invoice": {
          "description": "A customer invoice.",
          "fields": [
            {
              "name": "invoice_id",
              "type": "string",
              "description": "Unique invoice key."
            },
            {
              "name": "amount_due",
              "type": "decimal",
              "description": "Outstanding balance."
            },
            {
              "name": "status",
              "type": "string",
              "description": "open | closed | void."
            }
          ]
        }
      },
      "description": "Billing and invoice lifecycle",
      "cluster_id": 0
    },
    "payments": {
      "requirements": {
        "REQ-PAY-CHARGE": {
          "title": "Charge a payment method",
          "description": "Authorize and capture a charge against a saved method.",
          "legacy_components": [
            "sym synthetic payments::Payment.charge::b1:"
          ],
          "data_access": [
            "payments",
            "payment_methods"
          ],
          "dependencies": [
            "REQ-BILL-LATEFEE"
          ],
          "business_rules": [
            {
              "id": "RULE-001",
              "statement": "A charge is declined if the payment method is expired.",
              "confidence": 0.88,
              "provenance": {
                "source": "acme-billing-legacy",
                "ref": "sym synthetic payments::Payment.charge::b1:",
                "source_kinds": [
                  "code-body",
                  "type-def"
                ]
              }
            }
          ],
          "validations": [
            {
              "id": "VAL-001",
              "statement": "Charge amount must be > 0.",
              "field": "amount"
            }
          ],
          "error_paths": [
            {
              "id": "ERR-001",
              "statement": "Return DECLINED on expired method.",
              "code": "402"
            }
          ],
          "status": "active",
          "disposition": "keep"
        }
      },
      "entities": {
        "Payment": {
          "description": "A payment attempt.",
          "fields": [
            {
              "name": "payment_id",
              "type": "string",
              "description": "Unique payment key."
            },
            {
              "name": "amount",
              "type": "decimal",
              "description": "Charged amount."
            }
          ]
        }
      },
      "description": "Payment authorization and settlement",
      "cluster_id": 1
    }
  }
}
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall