@leeovery/claude-technical-workflows 2.0.33 → 2.0.34
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
|
@@ -15,15 +15,31 @@ SPEC_DIR="docs/workflow/specification"
|
|
|
15
15
|
CACHE_FILE="docs/workflow/.cache/discussion-consolidation-analysis.md"
|
|
16
16
|
|
|
17
17
|
# Helper: Extract a frontmatter field value from a file
|
|
18
|
+
# Supports both YAML frontmatter and markdown format (**Field**: Value)
|
|
18
19
|
# Usage: extract_field <file> <field_name>
|
|
19
20
|
extract_field() {
|
|
20
21
|
local file="$1"
|
|
21
22
|
local field="$2"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
sed "
|
|
23
|
+
local value=""
|
|
24
|
+
|
|
25
|
+
# Try YAML frontmatter first (only if file starts with ---)
|
|
26
|
+
if head -1 "$file" 2>/dev/null | grep -q "^---$"; then
|
|
27
|
+
value=$(sed -n '2,/^---$/p' "$file" 2>/dev/null | \
|
|
28
|
+
grep -m1 "^${field}:" | \
|
|
29
|
+
sed "s/^${field}:[[:space:]]*//" || true)
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# If empty, try markdown format: **Field**: Value
|
|
33
|
+
# Only search the header (before first ## heading) to avoid body matches
|
|
34
|
+
if [ -z "$value" ]; then
|
|
35
|
+
value=$(awk '/^## /{exit} {print}' "$file" 2>/dev/null | \
|
|
36
|
+
grep -i -m1 "^\*\*${field}\*\*:" | \
|
|
37
|
+
sed -E "s/^\*\*[^*]+\*\*:[[:space:]]*//" || true)
|
|
38
|
+
# Normalize to lowercase for consistency
|
|
39
|
+
value=$(echo "$value" | tr '[:upper:]' '[:lower:]')
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
echo "$value"
|
|
27
43
|
}
|
|
28
44
|
|
|
29
45
|
# Helper: Extract array field from frontmatter (returns space-separated values)
|