voidmachine 6.0.0 → 7.0.1
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/core-assets/.claude-plugin/plugin.json +2 -2
- package/core-assets/PHILOSOPHY.md +18 -5
- package/core-assets/data/catalog.v3.json +29 -109
- package/core-assets/data/certification.json +1 -1
- package/core-assets/data/model.json +28 -52
- package/core-assets/hooks/_syntax-worker.cjs +1 -1
- package/core-assets/hooks/_void-hook.mjs +8 -6
- package/core-assets/hooks/tdd-guard.md +45 -88
- package/core-assets/hooks/viewport-screenshot-gate.sh +3 -3
- package/core-assets/packs/pack-monorepo/skills/void-dependency-direction/SKILL.md +27 -146
- package/core-assets/packs/pack-monorepo/skills/void-service-package/SKILL.md +5 -8
- package/core-assets/packs/pack-server/skills/void-webhook-handler-pattern/.source +4 -2
- package/core-assets/packs/pack-server/skills/void-webhook-handler-pattern/SKILL.md +32 -132
- package/core-assets/skills/void-accessibility/SKILL.md +2 -2
- package/core-assets/skills/void-async-safety/SKILL.md +37 -24
- package/core-assets/skills/void-autopilot/SKILL.md +17 -15
- package/core-assets/skills/void-autopilot/references/publication.md +82 -0
- package/core-assets/skills/void-code-review/SKILL.md +1 -1
- package/core-assets/skills/void-commit-discipline/SKILL.md +5 -11
- package/core-assets/skills/void-frontend-design/SKILL.md +2 -2
- package/core-assets/skills/void-hexagonal-architecture/SKILL.md +5 -5
- package/core-assets/skills/void-implement/SKILL.md +11 -5
- package/core-assets/skills/void-observability/SKILL.md +4 -4
- package/core-assets/skills/void-orchestrate/SKILL.md +57 -224
- package/core-assets/skills/void-testing/SKILL.md +4 -4
- package/core-assets/skills/void-verify/SKILL.md +1 -1
- package/core-assets/skills/void-verify/references/ci-admission.mjs +1 -1
- package/core-assets/skills/void-verify/references/ci-feedback.md +33 -4
- package/core-assets/templates/github/void-dependency-audit.yml +18 -2
- package/dist/main.js +2941 -2449
- package/package.json +2 -2
- package/core-assets/hooks/block-protected-push.sh +0 -81
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voidmachine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "void-machine CLI — install an opinionated engineering doctrine on any project; render deterministic project health. Run via `npx voidmachine`; command: void-machine (alias vm).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Folpe @ VoidCorp",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"ws": "8.21.0",
|
|
59
59
|
"yaml": "^2.5.0",
|
|
60
60
|
"zod": "^4.6.5",
|
|
61
|
-
"@voidcorp/harness-graph": "
|
|
61
|
+
"@voidcorp/harness-graph": "7.0.1",
|
|
62
62
|
"@voidcorp/hook-runner": "0.0.0",
|
|
63
63
|
"@voidcorp/mission-engine": "0.0.0",
|
|
64
64
|
"@voidcorp/void-machine": "0.0.0"
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# block-protected-push — l hook. Reads the agent's tool-call JSON from stdin and
|
|
3
|
-
# refuses any `git push` whose resolved target is a protected branch (main /
|
|
4
|
-
# master). This is a SECONDARY net, NOT the boundary: the real A1 boundary is
|
|
5
|
-
# server-side branch protection plus the orchestrator owning push + PR (the
|
|
6
|
-
# worker has no `git push` in its allowlist). A string-matching hook is
|
|
7
|
-
# bypassable by an agent with arbitrary code execution (node -e "git push ..."),
|
|
8
|
-
# so it backstops regressions; it does not stand alone. Runtime-agnostic: Claude
|
|
9
|
-
# "Bash" + Codex "shell" (string or argv array).
|
|
10
|
-
#
|
|
11
|
-
# Override (a deliberate, reviewed run that intends to push a protected branch):
|
|
12
|
-
# AUTO_MERGE=1. The orchestrator derives this from --auto-merge, never the
|
|
13
|
-
# ambient env (preflight fails on divergence). Exit codes: 0 allow, 2 block.
|
|
14
|
-
|
|
15
|
-
set -euo pipefail
|
|
16
|
-
|
|
17
|
-
INPUT=$(cat)
|
|
18
|
-
# Guard the jq calls: under `set -e`, malformed JSON on stdin would otherwise
|
|
19
|
-
# exit non-0/non-2, which the hook runner treats as an error that lets the call
|
|
20
|
-
# through. Empty TOOL → the case below exits 0 (allow + no-op), a deterministic
|
|
21
|
-
# fail-safe for this secondary net (the real boundary is server-side).
|
|
22
|
-
TOOL=$(printf "%s" "$INPUT" | jq -r '.tool_name // empty' 2>/dev/null || true)
|
|
23
|
-
CMD=$(printf "%s" "$INPUT" | jq -r 'if (.tool_input.command? | type) == "array" then (.tool_input.command | join(" ")) else (.tool_input.command // empty) end' 2>/dev/null || true)
|
|
24
|
-
|
|
25
|
-
case "$TOOL" in Bash | shell) ;; *) exit 0 ;; esac
|
|
26
|
-
[[ -z "$CMD" ]] && exit 0
|
|
27
|
-
[[ "${AUTO_MERGE:-}" == "1" ]] && exit 0
|
|
28
|
-
printf "%s" "$CMD" | grep -qE '\bgit\b([^&|;]*\s)?push\b' || exit 0
|
|
29
|
-
|
|
30
|
-
block() {
|
|
31
|
-
printf "block-protected-push: refusing a push to a protected branch (main/master).\n" >&2
|
|
32
|
-
printf "Matched: %s\n" "$1" >&2
|
|
33
|
-
printf "The orchestrator owns protected-branch pushes; AUTO_MERGE=1 to override.\n" >&2
|
|
34
|
-
exit 2
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
is_protected() { case "$1" in main | master) return 0 ;; *) return 1 ;; esac; }
|
|
38
|
-
|
|
39
|
-
# Always-dangerous forms, independent of any refspec: --mirror / --all push every
|
|
40
|
-
# ref (main included); a `-c push.default=` override changes where a bare push
|
|
41
|
-
# lands. None are ever needed here.
|
|
42
|
-
printf "%s" "$CMD" | grep -qE '(^|[[:space:]])--mirror([[:space:]]|$)' && block "git push --mirror"
|
|
43
|
-
printf "%s" "$CMD" | grep -qE '(^|[[:space:]])--all([[:space:]]|$)' && block "git push --all"
|
|
44
|
-
printf "%s" "$CMD" | grep -qE 'push\.default' && block "git -c push.default override"
|
|
45
|
-
|
|
46
|
-
# Positional args after `push` (the remote, then refspecs), stopping at a shell
|
|
47
|
-
# chain operator so `git push && echo` is still seen as a bare push. Flags are
|
|
48
|
-
# dropped; `-c push.default=` sits before `push` so it is never captured here.
|
|
49
|
-
POSITIONALS=$(printf "%s" "$CMD" | awk '{
|
|
50
|
-
seen = 0
|
|
51
|
-
for (i = 1; i <= NF; i++) {
|
|
52
|
-
if ($i == "push") { seen = 1; continue }
|
|
53
|
-
if (!seen) continue
|
|
54
|
-
if ($i == "&&" || $i == "||" || $i == ";" || $i == "|") break
|
|
55
|
-
if ($i ~ /^-/) continue
|
|
56
|
-
print $i
|
|
57
|
-
}
|
|
58
|
-
}')
|
|
59
|
-
|
|
60
|
-
# Drop the remote (first positional); whatever remains are refspecs / branches.
|
|
61
|
-
REFSPECS=$(printf "%s\n" "$POSITIONALS" | sed '/^$/d' | tail -n +2)
|
|
62
|
-
|
|
63
|
-
if [[ -n "$REFSPECS" ]]; then
|
|
64
|
-
# Explicit destination(s): block only if one resolves to a protected branch.
|
|
65
|
-
while IFS= read -r r; do
|
|
66
|
-
[[ -z "$r" ]] && continue
|
|
67
|
-
dst="${r##*:}" # part after the last colon (delete refspec ":main" → main)
|
|
68
|
-
dst="${dst#refs/heads/}" # normalise refs/heads/main → main
|
|
69
|
-
is_protected "$dst" && block "explicit push to $dst"
|
|
70
|
-
done <<<"$REFSPECS"
|
|
71
|
-
exit 0
|
|
72
|
-
fi
|
|
73
|
-
|
|
74
|
-
# Bare push (no refspec): resolve the current branch + upstream in the cwd (the
|
|
75
|
-
# worker's worktree) and block if either is a protected branch.
|
|
76
|
-
CUR=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || true)
|
|
77
|
-
UP=$(git rev-parse --abbrev-ref '@{u}' 2>/dev/null || true)
|
|
78
|
-
is_protected "$CUR" && block "bare push on $CUR"
|
|
79
|
-
is_protected "${UP##*/}" && block "bare push tracking $UP"
|
|
80
|
-
|
|
81
|
-
exit 0
|