dse120071750/m8m-harness-builder / skills/m8m/m8m-harness-builder
m8m-harness-builder
FlaggedBuild and edit M8M harnesses that coordinate existing tools and FlowSteps, validate milestone outputs, and track progress and resume. Reuse working implementations in place. Compile workflow changes without runtime packaging; build portable packages when requested and deliver server installations through the dedicated M8M server installer.
scripts/milestone_pair.py
View on GitHub"""Proposal-only Gem and worker hints; canonical authority must be authored."""
from __future__ import annotations
from typing import Any
GENERIC_JUDGE = {"ok_receipt", ""}
GATE_TOKENS = ("gate", "judge", "evaluate", "alignment")
WAIT_TOKENS = ("response", "reply", "confirm", "wait")
def gem_path(milestone_id: str) -> str:
return f"references/{milestone_id}.md"
def judge_worker_id(milestone_id: str) -> str:
return f"{milestone_id}_judge"
def asset_kind(item: dict[str, Any]) -> str:
asset = item.get("asset") if isinstance(item.get("asset"), dict) else {}
return str(
item.get("asset_kind")
or asset.get("kind")
or ""
).strip().lower()
def pick_gate_tool(tools: Any) -> str | None:
for raw in tools or []:
tool_id = str(raw or "").strip()
if not tool_id or tool_id in GENERIC_JUDGE:
continue
token = tool_id.lower().replace("-", "_")
parts = set(token.split("_"))
if parts & set(GATE_TOKENS) or any(g in token for g in GATE_TOKENS):
return tool_id
return None
def needs_judge(item: dict[str, Any]) -> bool:
"""Only an authored judge loop requests a separate review."""
return str(item.get("loop") or "none") == "judge"
def is_wait_milestone(item: dict[str, Any]) -> bool:
name = str(item.get("id") or "").lower().replace("-", "_")
return bool(set(name.split("_")) & set(WAIT_TOKENS))
def pair_milestone(item: dict[str, Any]) -> dict[str, Any]:
"""Attach non-authoritative review hints; canonical compilation rejects inferred judges."""
mid = str(item.get("id") or "").strip()
if not mid:
return item
item["gem"] = str(item.get("gem") or "").strip() or gem_path(mid)
if item.get("branch") and isinstance(item.get("branch"), dict):
br = item["branch"]
br.setdefault("worker", item.get("worker") or "branch_receipt")
item["worker"] = br["worker"]
return item
if item.get("cycle") and isinstance(item.get("cycle"), dict):
cy = item["cycle"]
cy.setdefault("worker", item.get("worker") or "cycle_receipt")
item["worker"] = cy["worker"]
return item
current = str(item.get("worker") or "").strip()
if needs_judge(item):
item["loop"] = "judge"
item["judge_abi"] = "m8m_milestone_judge_v1"
if is_wait_milestone(item) and str(item.get("intelligence") or "none") == "none":
item["intelligence"] = "completion"
item.setdefault(
"model_justification",
"pause until a usable reply is in the slot; FlowSteps read the Gem and any judge reads the derived expectation",
)
candidate_tools = {str(tool) for tool in item.get("tools") or []}
if not current or current in GENERIC_JUDGE or current in candidate_tools:
item["worker"] = judge_worker_id(mid)
item["receipt_schema"] = item.get("receipt_schema") or f"schemas/{mid}_receipt_v1.json"
return item
if not current or current in GENERIC_JUDGE:
item.pop("worker", None)
return item
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |