-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathMakefile
More file actions
149 lines (103 loc) · 6.1 KB
/
Copy pathMakefile
File metadata and controls
149 lines (103 loc) · 6.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
.PHONY: help lint lint-fix eval eval-all eval-fix eval-full eval-ci eval-triggers eval-tournament eval-skills eval-agents eval-multimodel eval-compare-models test validate amp-skills amp-skills-sync amp-skills-validate amp-runtime-smoke codex-skills codex-skills-sync codex-skills-validate codex-runtime-smoke pi-skills pi-skills-sync pi-skills-validate pi-runtime-smoke opencode-skills opencode-skills-sync opencode-skills-validate opencode-runtime-smoke generated-skills-sync generated-skills-snapshots generated-skills-snapshots-validate security ci clean
# Default target
help: ## Show available commands
@echo "Plugin Quality Commands:"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
# --- Lint ---
lint: ## Lint markdown, YAML, JSON
@npx markdownlint "**/*.md" --ignore node_modules --ignore docs --ignore reports --ignore analysis --ignore scratchpad --ignore lab/findings
lint-fix: ## Auto-fix markdown lint errors
@npx markdownlint "**/*.md" --fix --ignore node_modules --ignore docs --ignore reports --ignore analysis --ignore scratchpad --ignore lab/findings
# --- Eval ---
eval: ## Quick: lint + score changed skills/agents only
@bash lab/eval/run_eval.sh --changed
eval-all: ## Score all 51 skills + 26 agents (structural)
@bash lab/eval/run_eval.sh --all
eval-fix: ## Auto-fix lint + show failures + suggest autoresearch command
@bash lab/eval/run_eval.sh --fix
eval-full: ## Structural + fresh behavioral gate; every skill must reach 75% (~60 min)
@bash lab/eval/run_eval.sh --all && bash lab/eval/run_eval.sh --triggers
eval-ci: ## CI gate: lint + all skills + all agents
@bash lab/eval/run_eval.sh --ci
eval-triggers: ## Re-run behavioral gate; every skill must reach 75% (~60 min, Haiku)
@bash lab/eval/run_eval.sh --triggers
eval-multimodel: ## Run trigger eval against sonnet (slow, ~$$3, ~3 hr). Override: MODEL=opus make eval-multimodel
@python3 -m lab.eval.trigger_scorer --all --model $${MODEL:-sonnet}
eval-compare-models: ## Compare per-skill accuracy across models. Override: MODELS=haiku,sonnet,opus make eval-compare-models
@python3 -m lab.eval.compare_models --models $${MODELS:-haiku,sonnet}
eval-tournament: ## Run tournament on weak skills (<75% trigger accuracy)
@python3 -m lab.tournament.description_tournament --weak
eval-skills: ## Score all skills only
@bash lab/eval/run_eval.sh --skills
eval-agents: ## Score all agents only
@bash lab/eval/run_eval.sh --agents
# --- Test ---
test: ## Run pytest for eval framework and port primitives
@python3 -m pytest lab/eval/tests/ scripts/tests/ -v --tb=short
test-quick: ## Run pytest (no verbose, fast)
@python3 -m pytest lab/eval/tests/ scripts/tests/ -q
# --- Validate ---
validate: ## Run claude plugin validate on plugin structure
@claude plugin validate plugins/elixir-phoenix
amp-skills: ## Generate Amp skills from the canonical Claude plugin
@python3 -m scripts.build_amp_skills
amp-skills-sync: ## Regenerate and verify the committed Amp target
@$(MAKE) amp-skills
@$(MAKE) amp-skills-validate
amp-skills-validate: ## Check committed Amp skills for generated drift
@python3 -m scripts.build_amp_skills --check
amp-runtime-smoke: ## Optional: smoke-test local target with an isolated Amp runtime
@python3 -m scripts.runtime_smoke amp
codex-skills: ## Generate the Codex skills plugin from the canonical Claude plugin
@python3 -m scripts.build_codex_skills
codex-skills-sync: ## Regenerate and verify the committed Codex target
@$(MAKE) codex-skills
@$(MAKE) codex-skills-validate
codex-skills-validate: ## Check committed Codex skills for generated drift
@python3 -m scripts.build_codex_skills --check
codex-runtime-smoke: ## Optional: smoke-test local target with an isolated Codex runtime
@python3 -m scripts.runtime_smoke codex
pi-skills: ## Generate the Pi skills package from the canonical Claude plugin
@python3 -m scripts.build_pi_skills
pi-skills-sync: ## Regenerate and verify the committed Pi target
@$(MAKE) pi-skills
@$(MAKE) pi-skills-validate
pi-skills-validate: ## Check committed Pi skills for generated drift
@python3 -m scripts.build_pi_skills --check
pi-runtime-smoke: ## Optional: smoke-test local target with an isolated Pi runtime
@python3 -m scripts.runtime_smoke pi
opencode-skills: ## Generate the OpenCode skills target
@python3 -m scripts.build_opencode_skills
opencode-skills-sync: ## Regenerate and verify the committed OpenCode target
@$(MAKE) opencode-skills
@$(MAKE) opencode-skills-validate
opencode-skills-validate: ## Check committed OpenCode skills for generated drift
@python3 -m scripts.build_opencode_skills --check
opencode-runtime-smoke: ## Optional: smoke-test local target with an isolated OpenCode runtime
@python3 -m scripts.runtime_smoke opencode
generated-skills-sync: ## Regenerate and verify Amp, Codex, Pi, and OpenCode targets
@$(MAKE) amp-skills-sync
@$(MAKE) codex-skills-sync
@$(MAKE) pi-skills-sync
@$(MAKE) opencode-skills-sync
@$(MAKE) generated-skills-snapshots-validate
generated-skills-snapshots: ## Update reviewed byte-and-mode digests for all targets
@python3 -m scripts.generated_target_snapshots
generated-skills-snapshots-validate: ## Check all targets against golden digests
@python3 -m scripts.generated_target_snapshots --check
# --- Security ---
security: ## SkillSpector scan of all skills + agents (skips if not installed)
@if command -v skillspector >/dev/null 2>&1; then \
bash lab/skillspector/scan.sh; \
else \
echo "⊘ skillspector not installed — skipping security scan."; \
echo " Install: pipx install --python python3.13 \"git+https://github.com/NVIDIA/skillspector.git\""; \
fi
# --- CI (full pipeline) ---
ci: lint test validate amp-skills-validate codex-skills-validate pi-skills-validate opencode-skills-validate generated-skills-snapshots-validate eval-all security ## Full CI: lint + test + validate + eval + security (same as GitHub Actions)
# --- Clean ---
clean: ## Remove Python cache files
@find lab/ scripts/ -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
@find lab/ scripts/ -name "*.pyc" -delete 2>/dev/null || true
@echo "Cleaned"