Skip to content

skein v0.2.2

Choose a tag to compare

@vr000m vr000m released this 13 Jun 00:58
f8c5d1c

Fixed

  • Quoted SKILL.md frontmatter values that contain multiple bracketed argument tokens or colon-bearing prose so Codex can load all bundled skein:* skills without YAML parse warnings.
  • /conduct review-marker hashing (conduct/marker.py) is now byte-faithful, matching the documented recipe (git hash-object of the bytes above the marker line). strip_marker_for_hashing previously popped the blank line that normally precedes the marker and round-tripped through splitlines()/join(), silently normalizing CRLF→LF; compute_plan_hash also read via read_text, translating line endings before hashing. Together these made the computed hash disagree with git hash-object of the above-marker bytes whenever a plan had a blank line before its marker (the common markdown style) or used CRLF endings — so preflight false-flagged a valid plan as stale (hard-stopping a first run, or, on --resume, rewriting the marker into a form no byte-faithful external checker accepts). Hashing now slices the plan at the marker line's exact byte offset with line endings preserved. Migration: markers written by /review-plan with a blank line before them now validate correctly; any marker previously written by the old marker.py blank-popping path on such a plan reports stale once and refreshes on the next /review-plan or --resume.
  • write_marker now hashes the exact bytes it writes above the marker. It previously hashed the contract before appending the trailing newline that separates the contract from the marker line, so marking a plan that had no trailing newline (e.g. a freshly authored plan) recorded a hash of bytes that were never written above the marker — leaving the plan stale the instant /review-plan marked it, and /conduct would then reject a plan the user had just reviewed. (Pre-existing; surfaced by adversarial review.)
  • write_marker reads and writes plan bytes directly (read_bytes/write_bytes) instead of text-mode read_text/write_text. Text mode applies universal-newline translation whose direction is platform-dependent — on Windows write_text re-expands \n to \r\n on disk — so the bytes write_marker hashed could differ from the bytes compute_plan_hash (byte-faithful since this release) reads back, marking a CRLF plan stale on Windows the instant it was written. Reading and writing raw bytes keeps both sides on identical bytes on every platform and preserves a plan's existing line endings.

Changed

  • Hardened the review-marker locators: last_marker_index (line index) and _marker_line_span (byte offset) now share one _scan_marker_lines fence-tracking core so they can never drift to different markers on the same plan. Documented the byte-faithful invariant in conduct and review-plan SKILL.md (both mirrors) to prevent re-introducing line-ending/blank-line normalization. Added tests/parity/test-conduct-marker-parity.sh (wired into just parity-tests) asserting conduct/marker.py stays byte-identical across the skein and skein-codex mirrors.

Full changelog: CHANGELOG.md