start-vibing 4.3.1 → 4.3.3
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 +2 -2
- package/template/.claude/skills/super-design/SKILL.md +108 -5
- package/template/.claude/skills/super-design/audit-state.schema.json +226 -0
- package/template/.claude/skills/super-design/scripts/build-import-graph.sh +208 -0
- package/template/.claude/skills/super-design/scripts/detect-apps.sh +180 -0
- package/template/.claude/skills/super-design/scripts/detect-changes.sh +73 -12
- package/template/.claude/skills/super-design/scripts/discover-routes.sh +120 -13
- package/template/.claude/skills/super-design/scripts/extract-tokens.mjs +153 -9
- package/template/.claude/skills/super-design/scripts/harvest-typeui.sh +131 -0
- package/template/.claude/skills/super-design/scripts/hash-pages.sh +208 -28
- package/template/.claude/skills/super-design/scripts/score-typeui.mjs +224 -0
- package/template/.claude/skills/super-design/scripts/validate-state.sh +46 -15
- package/template/.claude/skills/super-design/scripts/verify-audit.sh +62 -9
- package/template/.claude/skills/super-design/scripts/visual-regression.sh +275 -0
- package/template/.claude/skills/super-design/scripts/write-state.sh +29 -2
- package/template/.claude/skills/super-design/templates/audit-state.schema.json +0 -57
|
@@ -1,13 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Usage: write-state.sh [<
|
|
2
|
+
# Usage: write-state.sh [<app_path>] [<explicit_target>]
|
|
3
|
+
# (reads JSON body from stdin)
|
|
3
4
|
#
|
|
4
5
|
# Atomic state writer: accepts JSON on stdin, writes to <target>.tmp,
|
|
5
6
|
# validates with jq, then renames in place. Referenced from
|
|
6
7
|
# docs/compass_artifact §11 ("Write-then-rename (atomic)") and SKILL.md
|
|
7
8
|
# Step 4 ("Atomic write .audit-state.json").
|
|
9
|
+
#
|
|
10
|
+
# Monorepo support (artifact §11 line 902): first positional arg is the
|
|
11
|
+
# app root (e.g. `apps/web`). Target state path is derived as
|
|
12
|
+
# `<app_path>/docs/super-design/.audit-state.json`. For single-app
|
|
13
|
+
# repos pass "." or omit (default behavior preserved).
|
|
14
|
+
# Back-compat: if the first arg already ends in `.audit-state.json`, it
|
|
15
|
+
# is treated as an explicit target path (legacy one-arg call sites).
|
|
8
16
|
set -euo pipefail
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
APP_PATH="${1:-.}"
|
|
19
|
+
EXPLICIT="${2:-}"
|
|
20
|
+
|
|
21
|
+
if [ -n "$EXPLICIT" ]; then
|
|
22
|
+
TARGET="$EXPLICIT"
|
|
23
|
+
else
|
|
24
|
+
case "$APP_PATH" in
|
|
25
|
+
*.audit-state.json)
|
|
26
|
+
# Legacy single-arg call: treat $APP_PATH as the full target path.
|
|
27
|
+
TARGET="$APP_PATH"
|
|
28
|
+
;;
|
|
29
|
+
.|"")
|
|
30
|
+
TARGET="docs/super-design/.audit-state.json"
|
|
31
|
+
;;
|
|
32
|
+
*)
|
|
33
|
+
TARGET="${APP_PATH%/}/docs/super-design/.audit-state.json"
|
|
34
|
+
;;
|
|
35
|
+
esac
|
|
36
|
+
fi
|
|
37
|
+
|
|
11
38
|
TMP="${TARGET}.tmp"
|
|
12
39
|
|
|
13
40
|
mkdir -p "$(dirname "$TARGET")"
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "super-design/audit-state.schema.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["schema_version","skill_version","last_audit_at","git_sha_at_audit","theory_doc_sha","tools","pages_audited","findings_counts"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"schema_version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
8
|
-
"skill_version": { "type": "string" },
|
|
9
|
-
"last_audit_at": { "type": "string", "format": "date-time" },
|
|
10
|
-
"git_sha_at_audit": { "type": "string", "pattern": "^[0-9a-f]{7,64}$" },
|
|
11
|
-
"git_branch": { "type": "string" },
|
|
12
|
-
"is_shallow_clone": { "type": "boolean" },
|
|
13
|
-
"theory_doc_sha": { "type": "string" },
|
|
14
|
-
"market_analysis_sha": { "type": "string" },
|
|
15
|
-
"tools": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
16
|
-
"framework": {
|
|
17
|
-
"type": "object",
|
|
18
|
-
"properties": {
|
|
19
|
-
"name": { "type": "string" },
|
|
20
|
-
"router": { "type": "string" },
|
|
21
|
-
"version": { "type": "string" }
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"route_map": { "type": "array", "items": { "type": "string" } },
|
|
25
|
-
"pages_audited": {
|
|
26
|
-
"type": "array",
|
|
27
|
-
"items": {
|
|
28
|
-
"type": "object",
|
|
29
|
-
"required": ["url","last_audited"],
|
|
30
|
-
"properties": {
|
|
31
|
-
"url": { "type": "string" },
|
|
32
|
-
"route_file": { "type": "string" },
|
|
33
|
-
"html_hash": { "type": "string" },
|
|
34
|
-
"dom_structure_hash": { "type": "string" },
|
|
35
|
-
"viewport_hashes": { "type": "object" },
|
|
36
|
-
"last_audited": { "type": "string", "format": "date-time" },
|
|
37
|
-
"findings_ids": { "type": "array", "items": { "type": "string" } }
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"components": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
42
|
-
"token_hash": { "type": "string" },
|
|
43
|
-
"import_graph_sha": { "type": "string" },
|
|
44
|
-
"findings_counts": {
|
|
45
|
-
"type": "object",
|
|
46
|
-
"required": ["blockers","high","medium","nitpicks"],
|
|
47
|
-
"properties": {
|
|
48
|
-
"blockers": { "type": "integer" },
|
|
49
|
-
"high": { "type": "integer" },
|
|
50
|
-
"medium": { "type": "integer" },
|
|
51
|
-
"nitpicks": { "type": "integer" }
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"research_at": { "type": "string", "format": "date-time" },
|
|
55
|
-
"ignored_paths": { "type": "array", "items": { "type": "string" } }
|
|
56
|
-
}
|
|
57
|
-
}
|