@zalom/plastic 1.0.0-alpha.30 → 1.0.0-alpha.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zalom/plastic",
3
- "version": "1.0.0-alpha.30",
3
+ "version": "1.0.0-alpha.31",
4
4
  "description": "Intent-driven idea development system for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,8 @@ require "time"
9
9
  # (intent 60).
10
10
  #
11
11
  # An intent is born complete when its frontmatter carries every required field
12
- # and its `sources` and `chain` are well-formed arrays of Folgezettel id strings.
12
+ # and its `sources` and `chain` are well-formed arrays of Folgezettel id references
13
+ # (bare ids like `1a2`, or cross-store refs like `global:1a2`; integer ids are coerced).
13
14
  # This module is the only definition of that contract; the `validate-intent` CLI,
14
15
  # the doctor diagnostics, and the creating-intent skill all consult it so the
15
16
  # definition never drifts across copies.
@@ -28,11 +29,11 @@ module IntentValidator
28
29
 
29
30
  # Folgezettel id form: digits then an optional lowercase-letter/digit suffix
30
31
  # (for example "14", "14a", "4a1"). Mirrors scripts/folgezettel-id.
31
- ID_PATTERN = /\A\d+[a-z0-9]*\z/
32
+ ID_PATTERN = /\A([a-z0-9-]+:)?\d+[a-z0-9]*\z/
32
33
 
33
34
  # True iff `value` is a String matching the Folgezettel id form.
34
35
  def valid_id?(value)
35
- value.is_a?(String) && value.match?(ID_PATTERN)
36
+ value.to_s.match?(ID_PATTERN)
36
37
  end
37
38
 
38
39
  # Read a file's YAML frontmatter, returning the parsed Hash (or {} when the