Skip to content

Jordanwei1/jiaojie-skill

jiaojie

Flagged

Create or receive human-first AI task handoffs across chats, models, devices, and languages. Use when the user asks to hand off, export context, resume from a handoff, switch sessions while preserving work, says "交接一下", "接收交接", or supplies handoff.md, handoff.zip, handoff-audit.zip, an LCH Bundle/T0 package, OCH Snapshot, or LTM Packet. Default to one readable handoff.md; upgrade to handoff.zip only when required files must travel, and to handoff-audit.zip only for formal audit, cross-organization delivery, or proof. Preserve current intent, stop point, next action, decisions, constraints, rejected and failed paths, answered questions, materials, omissions, and revalidation needs. Do not use for generic summaries, memory lookup, hidden reasoning, completed trivial chats, or after the user declines.

FileKindSize
SKILL.mdskill md8.1 KB
agents/openai.yamlconfig223 B
assets/hero-source.pngbinary1.3 MB
assets/hero.gifbinary1.2 MB
assets/profiles/materiality-v1.jsonconfig853 B
assets/protocol-version.jsonconfig2.6 KB
assets/registry/iana-language-subtag-registry-2026-08-08.txtmarkdown714.6 KB
assets/registry/iana-language-tag-extensions-registry-2014-04-02.txtmarkdown1.0 KB
assets/registry/profile-feature-registry-v0.1.jsonconfig3.3 KB
assets/registry/registry-lock.jsonconfig1.2 KB
assets/registry/schema-catalog-v0.1.jsonconfig4.1 KB
assets/schemas/action-graph.schema.jsonconfig5.6 KB
assets/schemas/common.schema.jsonconfig25.7 KB
assets/schemas/derived-digest-vector.schema.jsonconfig1.5 KB
assets/schemas/detached-envelope.schema.jsonconfig799 B
assets/schemas/event.schema.jsonconfig4.5 KB
assets/schemas/language-unicode-vector.schema.jsonconfig8.6 KB
assets/schemas/legacy-conversion-report.schema.jsonconfig4.4 KB
assets/schemas/manifest.schema.jsonconfig6.6 KB
assets/schemas/materiality-profile.schema.jsonconfig1.6 KB
assets/schemas/profile-feature-registry.schema.jsonconfig7.3 KB
assets/schemas/receipt.schema.jsonconfig15.6 KB
assets/schemas/registry-lock.schema.jsonconfig1.9 KB
assets/schemas/schema-catalog.schema.jsonconfig1.7 KB
assets/schemas/state.schema.jsonconfig11.9 KB
assets/schemas/t0-control.schema.jsonconfig2.7 KB
assets/schemas/vector-catalog.schema.jsonconfig5.3 KB
assets/schemas/verification-result.schema.jsonconfig24.2 KB
assets/templates/approval-statement.template.jsonconfig1.3 KB
assets/templates/approval-verification.template.jsonconfig1.6 KB
assets/templates/bundle-HANDOFF.template.mdmarkdown57 B
assets/templates/conversion-report.template.jsonconfig1.2 KB
assets/templates/handoff.template.mdmarkdown1.7 KB
assets/templates/manifest.template.jsonconfig8.6 KB
assets/templates/receipt.template.jsonconfig3.2 KB
assets/templates/t0-control.template.jsonconfig6.4 KB
assets/templates/t0-package.template.mdmarkdown337 B
assets/templates/warm-state.template.jsonconfig10.2 KB
assets/vectors/derived-digests-v1-001.jsonconfig10.8 KB
assets/vectors/index.jsonconfig2.1 KB
assets/vectors/jcs-sha256-basic-001.jsonconfig495 B
assets/vectors/language-unicode-v1-001.jsonconfig9.9 KB
assets/vectors/review-projection-v1-minimal-001.jsonconfig19.0 KB
examples/README.mdmarkdown1.4 KB
examples/business/business-external-state/case.jsonconfig559 B
examples/business/business-external-state/expected-next-action.mdmarkdown111 B
examples/business/business-external-state/expected-receipt.mdmarkdown342 B
examples/business/business-external-state/gold.jsonconfig498 B
examples/business/business-external-state/handoff.mdmarkdown1.8 KB
examples/business/business-external-state/source.mdmarkdown730 B
examples/coding/coding-cross-language/case.jsonconfig603 B
examples/coding/coding-cross-language/expected-next-action.mdmarkdown108 B
examples/coding/coding-cross-language/expected-receipt.mdmarkdown342 B
examples/coding/coding-cross-language/gold.jsonconfig495 B
examples/coding/coding-cross-language/handoff.mdmarkdown2.0 KB
examples/coding/coding-cross-language/source.mdmarkdown864 B
examples/general-chat/general-chat-mixed-constraints/case.jsonconfig577 B
examples/general-chat/general-chat-mixed-constraints/expected-next-action.mdmarkdown116 B
examples/general-chat/general-chat-mixed-constraints/expected-receipt.mdmarkdown347 B
examples/general-chat/general-chat-mixed-constraints/gold.jsonconfig508 B
examples/general-chat/general-chat-mixed-constraints/handoff.mdmarkdown1.8 KB
examples/general-chat/general-chat-mixed-constraints/source.mdmarkdown745 B
examples/index.jsonconfig4.9 KB
examples/learning/learning-intent-change/case.jsonconfig568 B
examples/learning/learning-intent-change/expected-next-action.mdmarkdown109 B
examples/learning/learning-intent-change/expected-receipt.mdmarkdown342 B
examples/learning/learning-intent-change/gold.jsonconfig496 B
examples/learning/learning-intent-change/handoff.mdmarkdown1.8 KB
examples/learning/learning-intent-change/source.mdmarkdown714 B
examples/product-design/product-design-parallel/case.jsonconfig572 B
examples/product-design/product-design-parallel/expected-next-action.mdmarkdown121 B
examples/product-design/product-design-parallel/expected-receipt.mdmarkdown342 B
examples/product-design/product-design-parallel/gold.jsonconfig508 B
examples/product-design/product-design-parallel/handoff.mdmarkdown1.8 KB
examples/product-design/product-design-parallel/source.mdmarkdown732 B
examples/research/research-partial/case.jsonconfig553 B
examples/research/research-partial/expected-next-action.mdmarkdown114 B
examples/research/research-partial/expected-receipt.mdmarkdown347 B
examples/research/research-partial/gold.jsonconfig506 B
examples/research/research-partial/handoff.mdmarkdown1.8 KB
examples/research/research-partial/source.mdmarkdown718 B
examples/writing/writing-authority/case.jsonconfig578 B
examples/writing/writing-authority/expected-next-action.mdmarkdown94 B
examples/writing/writing-authority/expected-receipt.mdmarkdown342 B
examples/writing/writing-authority/gold.jsonconfig481 B
examples/writing/writing-authority/handoff.mdmarkdown1.8 KB
examples/writing/writing-authority/source.mdmarkdown703 B
references/conformance.mdmarkdown42.5 KB
references/convert-legacy.mdmarkdown14.0 KB
references/domain-business.mdmarkdown3.3 KB
references/domain-coding.mdmarkdown3.4 KB
references/domain-general-chat.mdmarkdown3.2 KB
references/domain-learning.mdmarkdown3.2 KB
references/domain-product-design.mdmarkdown3.3 KB
references/domain-research.mdmarkdown3.3 KB
references/domain-writing.mdmarkdown3.2 KB
references/export-workflow.mdmarkdown14.9 KB
references/multilingual-workflow.mdmarkdown9.6 KB
references/profiles.mdmarkdown21.1 KB
references/protocol-core.mdmarkdown28.7 KB
references/receive-workflow.mdmarkdown23.2 KB
references/result-model.mdmarkdown22.3 KB
references/runtime-capabilities.mdmarkdown6.8 KB
references/security-boundary.mdmarkdown8.8 KB
references/simple-workflow.mdmarkdown7.0 KB
references/terminology.mdmarkdown13.3 KB
references/threat-model.mdmarkdown20.1 KB
references/verify-structure-workflow.mdmarkdown21.9 KB
references/wire-format.mdmarkdown44.0 KB
scripts/_vendor/lch/__init__.pyscript1.4 KB
scripts/_vendor/lch/canonicalize.pyscript7.6 KB
scripts/_vendor/lch/cli.pyscript10.2 KB
scripts/_vendor/lch/converters.pyscript46.0 KB
scripts/_vendor/lch/language.pyscript27.7 KB
scripts/_vendor/lch/package.pyscript56.8 KB
scripts/_vendor/lch/projection.pyscript22.7 KB
scripts/_vendor/lch/registry.pyscript7.9 KB
scripts/_vendor/lch/schema.pyscript19.5 KB
scripts/_vendor/lch/security.pyscript7.2 KB
scripts/_vendor/lch/simple.pyscript36.6 KB
scripts/_vendor/lch/util.pyscript14.7 KB
scripts/_vendor/lch/validate.pyscript128.4 KB
scripts/convert_handoff_md.pyscript207 B
scripts/convert_ltm.pyscript201 B
scripts/convert_och.pyscript205 B
scripts/handoff.pyscript190 B
scripts/pack_handoff.pyscript175 B
scripts/project_check.pyscript3.2 KB
scripts/scan_sensitive.pyscript183 B
scripts/validate_handoff.pyscript180 B
scripts/verify_handoff.pyscript188 B

scripts/_vendor/lch/schema.py

View on GitHub
"""Small Draft 2020-12 subset validator for the bundled v0.1 Schemas.

It implements every keyword used by the shipped Schema set.  Cross-object protocol
invariants remain in ``validate.py`` rather than being misrepresented as JSON Schema.
"""

from __future__ import annotations

import re
from dataclasses import dataclass
from pathlib import Path
from typing import Any
from urllib.parse import urlparse

from .canonicalize import canonicalize_text, loads_strict, sha256_digest

from .registry import (
    language_unicode_vector,
    profile_feature_registry,
    registry_lock,
    schema_catalog,
    vector_catalog,
)
from .util import LCHError


@dataclass(frozen=True)
class SchemaProblem:
    path: str
    message: str

    def as_dict(self) -> dict[str, str]:
        return {"path": self.path, "message": self.message}


class SchemaStore:
    def __init__(self, directory: Path):
        self.directory = directory.resolve()
        self.documents: dict[Path, Any] = {}
        self.ids: dict[str, Path] = {}
        catalog = schema_catalog()
        entries = catalog.get("schemas")
        if not isinstance(entries, list):
            raise LCHError("SCHEMA_CATALOG_INVALID", "Schema catalog entries are missing")
        expected_names: set[str] = set()
        for entry in entries:
            if not isinstance(entry, dict):
                raise LCHError("SCHEMA_CATALOG_INVALID", "Schema catalog entry is not an object")
            relative = entry.get("path")
            if not isinstance(relative, str) or not relative.startswith("schemas/"):
                raise LCHError("SCHEMA_CATALOG_INVALID", "Schema catalog path is invalid")
            name = relative.removeprefix("schemas/")
            if "/" in name or not name.endswith(".schema.json") or name in expected_names:
                raise LCHError("SCHEMA_CATALOG_INVALID", "Schema catalog path is unsafe or duplicated")
            expected_names.add(name)
            path = self.directory / name
            try:
                raw = path.read_bytes()
                if len(raw) != entry.get("byte_length") or sha256_digest(raw) != entry.get("sha256_raw"):
                    raise LCHError("SCHEMA_INTEGRITY_FAIL", f"Schema integrity mismatch: {path.name}")
                document = loads_strict(raw)
            except Exception as exc:
                if isinstance(exc, LCHError):
                    raise
                raise LCHError("SCHEMA_INVALID", f"cannot load Schema: {path.name}") from exc
            if not isinstance(document, dict) or document.get("$id") != entry.get("id"):
                raise LCHError("SCHEMA_ID_MISMATCH", f"Schema $id mismatch: {path.name}")
            self.documents[path.resolve()] = document
            identifier = document.get("$id") if isinstance(document, dict) else None
            if isinstance(identifier, str):
                if identifier in self.ids:
                    raise LCHError("SCHEMA_DUPLICATE_ID", "duplicate bundled Schema $id")
                self.ids[identifier] = path.resolve()
        actual_names = {path.name for path in self.directory.glob("*.schema.json")}
        if actual_names != expected_names:
            raise LCHError("SCHEMA_CATALOG_CLOSURE_FAIL", "bundled Schema set differs from the offline catalog")

        bootstrap = Validator(self)
        asset_checks = (
            (catalog, "schema-catalog.schema.json", "Schema catalog"),
            (profile_feature_registry(), "profile-feature-registry.schema.json", "profile and feature registry"),
            (registry_lock(), "registry-lock.schema.json", "language registry lock"),
            (vector_catalog(), "vector-catalog.schema.json", "golden vector catalog"),
            (language_unicode_vector(), "language-unicode-vector.schema.json", "language and Unicode vector"),
        )
        for value, schema_name, label in asset_checks:
            problems = bootstrap.validate(value, schema_name)
            if problems:
                raise LCHError(
                    "PROTOCOL_ASSET_SCHEMA_FAIL",
                    f"{label} fails its bundled Schema",
                    details=[problem.as_dict() for problem in problems],
                )

    def document(self, name: str) -> tuple[Path, Any]:
        path = (self.directory / name).resolve()
        if path not in self.documents:
            raise LCHError("SCHEMA_NOT_FOUND", f"unknown bundled Schema: {name}")
        return path, self.documents[path]

    def resolve(self, reference: str, current: Path) -> tuple[Path, Any]:
        base, marker, fragment = reference.partition("#")
        if base:
            if urlparse(base).scheme:
                target_path = self.ids.get(base)
                if target_path is None:
                    raise LCHError("SCHEMA_REF_UNRESOLVED", "external Schema reference is not bundled")
            else:
                target_path = (current.parent / base).resolve()
        else:
            target_path = current
        document = self.documents.get(target_path)
        if document is None:
            raise LCHError("SCHEMA_REF_UNRESOLVED", f"Schema reference is not bundled: {reference}")
        node = document
        if marker and fragment:
            if not fragment.startswith("/"):
                raise LCHError("SCHEMA_REF_UNRESOLVED", "only JSON Pointer fragments are supported")
            for raw in fragment[1:].split("/"):
                token = raw.replace("~1", "/").replace("~0", "~")
                try:
                    if isinstance(node, list):
                        node = node[int(token)]
                    else:
                        node = node[token]
                except (KeyError, IndexError, TypeError, ValueError) as exc:
                    raise LCHError("SCHEMA_REF_UNRESOLVED", f"unresolved Schema reference: {reference}") from exc
        return target_path, node


def _type_matches(value: Any, expected: str) -> bool:
    if expected == "null":
        return value is None
    if expected == "boolean":
        return isinstance(value, bool)
    if expected == "integer":
        return isinstance(value, int) and not isinstance(value, bool)
    if expected == "number":
        return isinstance(value, (int, float)) and not isinstance(value, bool)
    if expected == "string":
        return isinstance(value, str)
    if expected == "array":
        return isinstance(value, list)
    if expected == "object":
        return isinstance(value, dict)
    return False


_URI_UNRESERVED = r"[A-Za-z0-9._~-]"
_URI_PCT_ENCODED = r"%[0-9A-Fa-f]{2}"
_URI_SUB_DELIM = r"[!$&'()*+,;=]"
_URI_PCHAR = rf"(?:{_URI_UNRESERVED}|{_URI_PCT_ENCODED}|{_URI_SUB_DELIM}|[:@])"
_URI_AUTHORITY_CHAR = rf"(?:{_URI_UNRESERVED}|{_URI_PCT_ENCODED}|{_URI_SUB_DELIM}|[:@\[\]])"
_URI_QUERY_CHAR = rf"(?:{_URI_PCHAR}|[/?])"
_ABSOLUTE_URI_RE = re.compile(
    rf"[A-Za-z][A-Za-z0-9+.-]*:"
    rf"(?:"
    rf"//{_URI_AUTHORITY_CHAR}*(?:/{_URI_PCHAR}*)*"
    rf"|/(?:{_URI_PCHAR}+(?:/{_URI_PCHAR}*)*)?"
    rf"|{_URI_PCHAR}+(?:/{_URI_PCHAR}*)*"
    rf"|"
    rf")"
    rf"(?:\?{_URI_QUERY_CHAR}*)?"
    rf"(?:#{_URI_QUERY_CHAR}*)?"
)


def format_matches(value: str, name: str) -> bool:
    if name == "date-time":
        match = re.fullmatch(
            r"([0-9]{4})-([0-9]{2})-([0-9]{2})[Tt]"
            r"([0-9]{2}):([0-9]{2}):([0-9]{2})"
            r"(?:\.[0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})",
            value,
        )
        if match is None:
            return False
        year, month, day, hour, minute, second = map(int, match.groups()[:6])
        if hour > 23 or minute > 59 or second > 60:
            return False
        leap = year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
        month_lengths = (31, 29 if leap else 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
        if month < 1 or month > 12 or day < 1 or day > month_lengths[month - 1]:
            return False
        offset = match.group(7)
        if offset.casefold() != "z":
            offset_hour, offset_minute = map(int, offset[1:].split(":"))
            if offset_hour > 23 or offset_minute > 59:
                return False
        return True
    if name == "uri":
        if not value or any(ord(character) < 0x21 or ord(character) > 0x7E for character in value):
            return False
        if _ABSOLUTE_URI_RE.fullmatch(value) is None:
            return False
        try:
            parsed = urlparse(value)
            if not parsed.scheme:
                return False
            if parsed.netloc.count("@") > 1:
                return False
            # Accessing hostname makes urllib reject malformed bracketed hosts.
            # Validate the generic RFC 3986 port grammar ourselves: ``*DIGIT`` has
            # no 0..65535 network-semantics range restriction.
            _ = parsed.hostname
            host_port = parsed.netloc.rsplit("@", 1)[-1]
            if host_port.startswith("["):
                close = host_port.find("]")
                if close < 0:
                    return False
                suffix = host_port[close + 1 :]
                if suffix and (
                    not suffix.startswith(":")
                    or re.fullmatch(r"[0-9]*", suffix[1:]) is None
                ):
                    return False
            else:
                if "[" in host_port or "]" in host_port or host_port.count(":") > 1:
                    return False
                if ":" in host_port:
                    port = host_port.rsplit(":", 1)[1]
                    if re.fullmatch(r"[0-9]*", port) is None:
                        return False
        except ValueError:
            return False
        return True
    if name == "bcp47":
        # Syntax prefilter only.  The pinned registry-aware validator performs
        # qualification; this intentionally admits grandfathered/private-use tags.
        return bool(re.fullmatch(r"[A-Za-z0-9]{1,8}(?:-[A-Za-z0-9]{1,8})*", value))
    return True


def _value_key(value: Any) -> str:
    try:
        return canonicalize_text(value)
    except Exception:
        return repr(value)


class Validator:
    def __init__(self, store: SchemaStore, *, max_problems: int = 100):
        self.store = store
        self.max_problems = max_problems

    def validate(self, value: Any, schema_name: str) -> list[SchemaProblem]:
        path, schema = self.store.document(schema_name)
        problems: list[SchemaProblem] = []
        self._check(value, schema, path, "$", problems)
        return problems[: self.max_problems]

    def _trial(self, value: Any, schema: Any, document: Path, path: str) -> bool:
        trial: list[SchemaProblem] = []
        self._check(value, schema, document, path, trial)
        return not trial

    def _add(self, problems: list[SchemaProblem], path: str, message: str) -> None:
        if len(problems) < self.max_problems:
            problems.append(SchemaProblem(path, message))

    def _evaluated_properties(
        self,
        value: Any,
        schema: Any,
        document: Path,
        seen: set[tuple[Path, int]],
    ) -> set[str]:
        if not isinstance(value, dict) or not isinstance(schema, dict):
            return set()
        marker = (document, id(schema))
        if marker in seen:
            return set()
        seen.add(marker)
        properties = schema.get("properties")
        result = value.keys() & properties.keys() if isinstance(properties, dict) else set()
        if "$ref" in schema:
            target_document, target = self.store.resolve(schema["$ref"], document)
            result.update(self._evaluated_properties(value, target, target_document, seen))
        branches = schema.get("allOf", [])
        if isinstance(branches, list):
            for branch in branches:
                if self._trial(value, branch, document, "$"):
                    result.update(self._evaluated_properties(value, branch, document, seen))
        for keyword in ("anyOf", "oneOf"):
            branches = schema.get(keyword, [])
            if isinstance(branches, list):
                for branch in branches:
                    if self._trial(value, branch, document, "$"):
                        result.update(self._evaluated_properties(value, branch, document, seen))
        if_schema = schema.get("if")
        if isinstance(if_schema, dict):
            chosen = schema.get("then") if self._trial(value, if_schema, document, "$") else schema.get("else")
            if chosen is not None and self._trial(value, chosen, document, "$"):
                result.update(self._evaluated_properties(value, chosen, document, seen))
        return result

    def _check(
        self,
        value: Any,
        schema: Any,
        document: Path,
        path: str,
        problems: list[SchemaProblem],
    ) -> None:
        if len(problems) >= self.max_problems:
            return
        if schema is True:
            return
        if schema is False:
            self._add(problems, path, "value is forbidden by Schema")
            return
        if not isinstance(schema, dict):
            self._add(problems, path, "invalid bundled Schema node")
            return

        if "$ref" in schema:
            target_document, target = self.store.resolve(schema["$ref"], document)
            self._check(value, target, target_document, path, problems)

        for branch in schema.get("allOf", []):
            self._check(value, branch, document, path, problems)

        one_of = schema.get("oneOf")
        if isinstance(one_of, list):
            matches = sum(self._trial(value, branch, document, path) for branch in one_of)
            if matches != 1:
                self._add(problems, path, f"must match exactly one oneOf branch; matched {matches}")

        any_of = schema.get("anyOf")
        if isinstance(any_of, list) and not any(self._trial(value, branch, document, path) for branch in any_of):
            self._add(problems, path, "must match at least one anyOf branch")

        if_schema = schema.get("if")
        if isinstance(if_schema, dict):
            chosen = schema.get("then") if self._trial(value, if_schema, document, path) else schema.get("else")
            if chosen is not None:
                self._check(value, chosen, document, path, problems)

        if "not" in schema and self._trial(value, schema["not"], document, path):
            self._add(problems, path, "matches forbidden not branch")

        expected_type = schema.get("type")
        if isinstance(expected_type, str):
            if not _type_matches(value, expected_type):
                self._add(problems, path, f"expected {expected_type}")
                return
        elif isinstance(expected_type, list):
            if not any(isinstance(item, str) and _type_matches(value, item) for item in expected_type):
                self._add(problems, path, "value has no allowed type")
                return

        if "const" in schema and value != schema["const"]:
            self._add(problems, path, "value does not equal const")
        enum = schema.get("enum")
        if isinstance(enum, list) and value not in enum:
            self._add(problems, path, "value is not in enum")

        if isinstance(value, str):
            minimum = schema.get("minLength")
            maximum = schema.get("maxLength")
            if isinstance(minimum, int) and len(value) < minimum:
                self._add(problems, path, f"string is shorter than {minimum}")
            if isinstance(maximum, int) and len(value) > maximum:
                self._add(problems, path, f"string is longer than {maximum}")
            pattern = schema.get("pattern")
            if isinstance(pattern, str):
                try:
                    if re.search(pattern, value) is None:
                        self._add(problems, path, "string does not match pattern")
                except re.error:
                    self._add(problems, path, "bundled Schema pattern is unsupported")
            format_name = schema.get("format")
            if isinstance(format_name, str) and not format_matches(value, format_name):
                self._add(problems, path, f"string does not match format {format_name}")

        if isinstance(value, (int, float)) and not isinstance(value, bool):
            if "minimum" in schema and value < schema["minimum"]:
                self._add(problems, path, "number is below minimum")
            if "maximum" in schema and value > schema["maximum"]:
                self._add(problems, path, "number is above maximum")

        if isinstance(value, list):
            if isinstance(schema.get("minItems"), int) and len(value) < schema["minItems"]:
                self._add(problems, path, "array has too few items")
            if isinstance(schema.get("maxItems"), int) and len(value) > schema["maxItems"]:
                self._add(problems, path, "array has too many items")
            if schema.get("uniqueItems") is True:
                keys = [_value_key(item) for item in value]
                if len(keys) != len(set(keys)):
                    self._add(problems, path, "array items are not unique")
            prefix_items = schema.get("prefixItems")
            prefix_length = 0
            if isinstance(prefix_items, list):
                prefix_length = len(prefix_items)
                for index, child_schema in enumerate(prefix_items):
                    if index < len(value):
                        self._check(
                            value[index],
                            child_schema,
                            document,
                            f"{path}[{index}]",
                            problems,
                        )
            if "items" in schema:
                for index in range(prefix_length, len(value)):
                    self._check(
                        value[index],
                        schema["items"],
                        document,
                        f"{path}[{index}]",
                        problems,
                    )
            contains = schema.get("contains")
            if contains is not None:
                matches = sum(self._trial(item, contains, document, f"{path}[*]") for item in value)
                minimum = schema.get("minContains", 1)
                maximum = schema.get("maxContains")
                if matches < minimum:
                    self._add(problems, path, f"contains matched {matches}, below {minimum}")
                if isinstance(maximum, int) and matches > maximum:
                    self._add(problems, path, f"contains matched {matches}, above {maximum}")

        if isinstance(value, dict):
            required = schema.get("required", [])
            if isinstance(required, list):
                for key in required:
                    if key not in value:
                        self._add(problems, path, f"missing required property {key}")
            properties = schema.get("properties", {})
            if isinstance(properties, dict):
                for key, child_schema in properties.items():
                    if key in value:
                        self._check(value[key], child_schema, document, f"{path}.{key}", problems)
            if isinstance(schema.get("minProperties"), int) and len(value) < schema["minProperties"]:
                self._add(problems, path, "object has too few properties")
            if schema.get("additionalProperties") is False and isinstance(properties, dict):
                for key in value.keys() - properties.keys():
                    self._add(problems, f"{path}.{key}", "additional property is forbidden")
            if schema.get("unevaluatedProperties") is False:
                evaluated = self._evaluated_properties(value, schema, document, set())
                for key in value.keys() - evaluated:
                    self._add(problems, f"{path}.{key}", "unevaluated property is forbidden")
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall