chore(hq): daily sync 2026-02-16
This commit is contained in:
@@ -62,6 +62,7 @@ DELEGATION_ACL = {
|
||||
# Required handoff fields for strict validation
|
||||
REQUIRED_FIELDS = ["status", "result"]
|
||||
STRICT_FIELDS = ["schemaVersion", "status", "result", "confidence", "timestamp"]
|
||||
DELIVERABLE_TYPES = ["document", "code", "analysis", "recommendation", "review", "data"]
|
||||
|
||||
# ── Helpers ──────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -132,11 +133,17 @@ IMPORTANT: When you complete this task, write your response as a JSON file to:
|
||||
Use this exact format:
|
||||
```json
|
||||
{{
|
||||
"schemaVersion": "1.0",
|
||||
"schemaVersion": "1.1",
|
||||
"runId": "{run_id}",
|
||||
"agent": "{agent}",
|
||||
"status": "complete",
|
||||
"result": "<your findings/output here>",
|
||||
"deliverable": {{
|
||||
"type": "<document|code|analysis|recommendation|review|data>",
|
||||
"title": "<short title of what you produced>",
|
||||
"path": "<path to artifact file, or null if result is self-contained>",
|
||||
"summary": "<one-line summary of the deliverable>"
|
||||
}},
|
||||
"artifacts": [],
|
||||
"confidence": "high|medium|low",
|
||||
"notes": "<any caveats or open questions>",
|
||||
@@ -145,6 +152,8 @@ Use this exact format:
|
||||
```
|
||||
|
||||
Status values: complete | partial | blocked | failed
|
||||
⚠️ The "deliverable" block is MANDATORY. Every task must produce a concrete deliverable.
|
||||
If your result is self-contained in "result", set deliverable.path to null and deliverable.type to "analysis" or "recommendation".
|
||||
Write the file BEFORE posting to Discord. The orchestrator is waiting for it."""
|
||||
|
||||
if context:
|
||||
@@ -266,6 +275,18 @@ def validate_handoff(data: dict, strict: bool = False) -> tuple[bool, str]:
|
||||
if status == "blocked":
|
||||
return False, f"Agent blocked: {data.get('notes', 'no details')}"
|
||||
|
||||
# Deliverable enforcement (schema v1.1+)
|
||||
if strict and status == "complete":
|
||||
deliverable = data.get("deliverable")
|
||||
if not deliverable or not isinstance(deliverable, dict):
|
||||
return False, "Missing deliverable block — every completed task must include a deliverable"
|
||||
if not deliverable.get("type"):
|
||||
return False, "Deliverable missing 'type' field"
|
||||
if deliverable["type"] not in DELIVERABLE_TYPES:
|
||||
return False, f"Invalid deliverable type: '{deliverable['type']}' (valid: {', '.join(DELIVERABLE_TYPES)})"
|
||||
if not deliverable.get("summary"):
|
||||
return False, "Deliverable missing 'summary' field"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
@@ -376,8 +397,10 @@ def main():
|
||||
parser.add_argument("--run-id", type=str, default=None)
|
||||
parser.add_argument("--retries", type=int, default=1,
|
||||
help="Max attempts (default: 1, max: 3)")
|
||||
parser.add_argument("--validate", action="store_true",
|
||||
help="Strict validation of handoff fields")
|
||||
parser.add_argument("--validate", action="store_true", default=True,
|
||||
help="Strict validation of handoff fields (default: True since v1.1)")
|
||||
parser.add_argument("--no-validate", action="store_false", dest="validate",
|
||||
help="Disable strict validation")
|
||||
parser.add_argument("--workflow-id", type=str, default=None,
|
||||
help="Workflow run ID for tracing")
|
||||
parser.add_argument("--step-id", type=str, default=None,
|
||||
|
||||
Reference in New Issue
Block a user