forge-lcdl

Task `pw_mechanics_repair` v1

Given previous mechanics JSON plus a structured validation_failure payload from the source-ingest runtime, propose repaired_mechanics and a concise patch_summary. Intended for iterative loops against deterministic…

Task pw_mechanics_repair v1

Summary

Given previous mechanics JSON plus a structured validation_failure payload from the source-ingest runtime, propose repaired_mechanics and a concise patch_summary. Intended for iterative loops against deterministic validators—LCDL does not run Playwright.

Inputs

Field Type Required Notes
url string yes Context URL (non-empty when stripped).
previous_mechanics object yes Last mechanics spec (may be {}).
validation_failure object yes Failure facts (stage, expected, actual, etc.).
operator_hints string no Extra hints; omit or "".
temperature number no Default 0.05.
timeout_sec int no Default profile.timeout_sec.

Output

Field Type Notes
repaired_mechanics object Updated mechanics object for runtime retry (may be {}).
patch_summary string Human-readable delta summary.
confidence number Coerced to [0.0, 1.0].
issues array of string Residual risks or open problems (may be []).

Post-validation

  • Code-carrier keys rejected recursively (extractor_python, code, script, etc.—see reject_code_carrier_keys_tree).
  • When actions is present as object or array, every kind must be an allowed ACTION_KINDS token and not eval / execute_js / script.

Changelog

  • v1 — Initial mechanics repair path.