@erclx/canon 4.113.0 → 4.115.0
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/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/codebase-layout/SKILL.md +1 -1
- package/claude/skills/document-health/references/axes.md +1 -1
- package/claude/skills/target-setup/SKILL.md +3 -1
- package/claude/skills/target-setup/references/detect.md +43 -9
- package/claude/skills/target-setup/references/verify.md +26 -10
- package/claude/skills/teach-workspace/SKILL.md +5 -3
- package/claude/skills/test-craft/SKILL.md +1 -1
- package/docs/agents/audits.md +4 -2
- package/docs/agents/commands.md +2 -2
- package/docs/agents/context-audit-checks.md +6 -6
- package/docs/agents/context-audit.md +1 -1
- package/docs/agents/context-classify.md +1 -1
- package/docs/agents/counts.md +3 -3
- package/docs/agents/install-and-sync.md +2 -0
- package/docs/agents/records.md +22 -15
- package/docs/agents/teach.md +12 -4
- package/docs/target-projects.md +11 -2
- package/docs/workflow/ai-workflow.md +1 -1
- package/governance/rules/lang/130-go.md +40 -0
- package/governance/rules/lang/140-php.md +31 -0
- package/governance/rules/lib/335-testing-go.md +35 -0
- package/governance/rules/lib/336-testing-php.md +30 -0
- package/governance/rules/lib/360-security-server.md +2 -0
- package/governance/rules/lib/370-database.md +2 -0
- package/governance/rules/ui/410-a11y.md +1 -0
- package/governance/rules/ui/440-surface-capture.md +2 -0
- package/governance/stacks/nextjs.toml +2 -0
- package/governance/stacks/react.toml +1 -1
- package/package.json +1 -1
- package/src/audits/catalog.ts +52 -0
- package/src/commands/context.ts +30 -10
- package/src/commands/records.ts +18 -1
- package/src/commands/teach.ts +4 -1
- package/src/commands/tooling.ts +25 -2
- package/src/context/audit.ts +54 -18
- package/src/design/components.ts +17 -0
- package/src/design/tokens.ts +1 -1
- package/src/gate/measures.ts +13 -2
- package/src/records/backup.ts +197 -27
- package/src/records/push-guard.ts +71 -0
- package/src/teach/nav.ts +278 -34
- package/src/tooling/inject.ts +43 -4
- package/src/tooling/scan.ts +35 -0
- package/src/tooling/subfolder.ts +110 -0
- package/standards/teach.md +13 -12
- package/tooling/base/configs/.husky/post-merge +5 -1
- package/tooling/go/configs/.golangci.yml +25 -0
- package/tooling/go/configs/scripts/verify.sh +95 -0
- package/tooling/go/manifest.toml +13 -0
- package/tooling/go/reference.md +60 -0
- package/tooling/go/seeds/.cspell/tech-stack.txt +16 -0
- package/tooling/go/seeds/smoke_test.go +9 -0
- package/tooling/php/configs/.php-cs-fixer.dist.php +18 -0
- package/tooling/php/configs/phpstan.neon +5 -0
- package/tooling/php/configs/phpunit.xml +18 -0
- package/tooling/php/configs/scripts/verify.sh +100 -0
- package/tooling/php/manifest.toml +15 -0
- package/tooling/php/reference.md +74 -0
- package/tooling/php/seeds/.cspell/tech-stack.txt +5 -0
- package/tooling/php/seeds/tests/SmokeTest.php +13 -0
- package/tooling/python/configs/scripts/verify.sh +32 -15
- package/tooling/web/configs/scripts/verify.sh +32 -15
|
@@ -16,6 +16,7 @@ log_error() {
|
|
|
16
16
|
exit 1
|
|
17
17
|
}
|
|
18
18
|
log_step() { echo -e "${GREY}│${NC}\n${GREY}├${NC} ${WHITE}$1${NC}"; }
|
|
19
|
+
log_skip() { echo -e "${GREY}│ - $1${NC}"; }
|
|
19
20
|
|
|
20
21
|
pipe_output() { while IFS= read -r line; do echo -e "${GREY}│${NC} $line"; done; }
|
|
21
22
|
|
|
@@ -24,6 +25,32 @@ check_dependencies() {
|
|
|
24
25
|
command -v uv >/dev/null 2>&1 || log_error "uv is not installed"
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
check_package() {
|
|
29
|
+
[ -f package.json ] || log_error "No package.json here. Run 'bun init', then sync the stack again"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
has_script() {
|
|
33
|
+
bun -e 'process.exit(require(process.cwd() + "/package.json").scripts?.[process.argv[1]] ? 0 : 1)' "$1"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
# A subfolder synced with --skip base declares none of base's scripts, since
|
|
37
|
+
# the repository root owns them. Each base phase runs only where its script is
|
|
38
|
+
# declared, so this script passes on its own in that subfolder.
|
|
39
|
+
run_base_phase() {
|
|
40
|
+
local title=$1
|
|
41
|
+
local script=$2
|
|
42
|
+
local err_msg=$3
|
|
43
|
+
local pass_msg=$4
|
|
44
|
+
|
|
45
|
+
log_step "$title"
|
|
46
|
+
if ! has_script "$script"; then
|
|
47
|
+
log_skip "Skipped: $script is not declared here, so the repository root runs it"
|
|
48
|
+
return
|
|
49
|
+
fi
|
|
50
|
+
run_check "bun run $script" "$err_msg"
|
|
51
|
+
log_info "$pass_msg"
|
|
52
|
+
}
|
|
53
|
+
|
|
27
54
|
run_check() {
|
|
28
55
|
local cmd=$1
|
|
29
56
|
local err_msg=$2
|
|
@@ -37,6 +64,7 @@ run_check() {
|
|
|
37
64
|
|
|
38
65
|
main() {
|
|
39
66
|
check_dependencies
|
|
67
|
+
check_package
|
|
40
68
|
|
|
41
69
|
if [ "$NESTED" = false ]; then echo -e "${GREY}┌${NC}"; fi
|
|
42
70
|
|
|
@@ -48,21 +76,10 @@ main() {
|
|
|
48
76
|
run_check "bun run lint" "Lint failed"
|
|
49
77
|
log_info "Lint passed"
|
|
50
78
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
log_step "Format check"
|
|
56
|
-
run_check "bun run check:format" "Format check failed"
|
|
57
|
-
log_info "Format check passed"
|
|
58
|
-
|
|
59
|
-
log_step "Spelling"
|
|
60
|
-
run_check "bun run check:spell" "Spell check failed"
|
|
61
|
-
log_info "Spell check passed"
|
|
62
|
-
|
|
63
|
-
log_step "Shell"
|
|
64
|
-
run_check "bun run check:shell" "Shell check failed"
|
|
65
|
-
log_info "Shell check passed"
|
|
79
|
+
run_base_phase "Formatting" "format" "Format failed" "Format applied"
|
|
80
|
+
run_base_phase "Format check" "check:format" "Format check failed" "Format check passed"
|
|
81
|
+
run_base_phase "Spelling" "check:spell" "Spell check failed" "Spell check passed"
|
|
82
|
+
run_base_phase "Shell" "check:shell" "Shell check failed" "Shell check passed"
|
|
66
83
|
|
|
67
84
|
log_step "Unit tests"
|
|
68
85
|
run_check "bun run test:run" "Unit tests failed"
|
|
@@ -16,6 +16,7 @@ log_error() {
|
|
|
16
16
|
exit 1
|
|
17
17
|
}
|
|
18
18
|
log_step() { echo -e "${GREY}│${NC}\n${GREY}├${NC} ${WHITE}$1${NC}"; }
|
|
19
|
+
log_skip() { echo -e "${GREY}│ - $1${NC}"; }
|
|
19
20
|
|
|
20
21
|
pipe_output() { while IFS= read -r line; do echo -e "${GREY}│${NC} $line"; done; }
|
|
21
22
|
|
|
@@ -23,6 +24,32 @@ check_dependencies() {
|
|
|
23
24
|
command -v bun >/dev/null 2>&1 || log_error "bun is not installed"
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
check_package() {
|
|
28
|
+
[ -f package.json ] || log_error "No package.json here. Run 'bun init', then sync the stack again"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
has_script() {
|
|
32
|
+
bun -e 'process.exit(require(process.cwd() + "/package.json").scripts?.[process.argv[1]] ? 0 : 1)' "$1"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# A subfolder synced with --skip base declares none of base's scripts, since
|
|
36
|
+
# the repository root owns them. Each base phase runs only where its script is
|
|
37
|
+
# declared, so this script passes on its own in that subfolder.
|
|
38
|
+
run_base_phase() {
|
|
39
|
+
local title=$1
|
|
40
|
+
local script=$2
|
|
41
|
+
local err_msg=$3
|
|
42
|
+
local pass_msg=$4
|
|
43
|
+
|
|
44
|
+
log_step "$title"
|
|
45
|
+
if ! has_script "$script"; then
|
|
46
|
+
log_skip "Skipped: $script is not declared here, so the repository root runs it"
|
|
47
|
+
return
|
|
48
|
+
fi
|
|
49
|
+
run_check "bun run $script" "$err_msg"
|
|
50
|
+
log_info "$pass_msg"
|
|
51
|
+
}
|
|
52
|
+
|
|
26
53
|
run_check() {
|
|
27
54
|
local cmd=$1
|
|
28
55
|
local err_msg=$2
|
|
@@ -36,6 +63,7 @@ run_check() {
|
|
|
36
63
|
|
|
37
64
|
main() {
|
|
38
65
|
check_dependencies
|
|
66
|
+
check_package
|
|
39
67
|
|
|
40
68
|
if [ "$NESTED" = false ]; then echo -e "${GREY}┌${NC}"; fi
|
|
41
69
|
|
|
@@ -47,21 +75,10 @@ main() {
|
|
|
47
75
|
run_check "bun run lint" "Lint failed"
|
|
48
76
|
log_info "Lint passed"
|
|
49
77
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
log_step "Format check"
|
|
55
|
-
run_check "bun run check:format" "Format check failed"
|
|
56
|
-
log_info "Format check passed"
|
|
57
|
-
|
|
58
|
-
log_step "Spelling"
|
|
59
|
-
run_check "bun run check:spell" "Spell check failed"
|
|
60
|
-
log_info "Spell check passed"
|
|
61
|
-
|
|
62
|
-
log_step "Shell"
|
|
63
|
-
run_check "bun run check:shell" "Shell check failed"
|
|
64
|
-
log_info "Shell check passed"
|
|
78
|
+
run_base_phase "Formatting" "format" "Format failed" "Format applied"
|
|
79
|
+
run_base_phase "Format check" "check:format" "Format check failed" "Format check passed"
|
|
80
|
+
run_base_phase "Spelling" "check:spell" "Spell check failed" "Spell check passed"
|
|
81
|
+
run_base_phase "Shell" "check:shell" "Shell check failed" "Shell check passed"
|
|
65
82
|
|
|
66
83
|
log_step "Unit tests"
|
|
67
84
|
run_check "bun run test:run" "Unit tests failed"
|