claude-turing 4.5.0 → 4.7.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-plugin/marketplace.json +18 -0
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +1 -1
- package/commands/turing.md +85 -77
- package/config/commands.yaml +928 -0
- package/package.json +11 -4
- package/skills/turing/SKILL.md +180 -0
- package/skills/turing/ablate/SKILL.md +47 -0
- package/skills/turing/annotate/SKILL.md +23 -0
- package/skills/turing/archive/SKILL.md +23 -0
- package/skills/turing/audit/SKILL.md +56 -0
- package/skills/turing/baseline/SKILL.md +45 -0
- package/skills/turing/brief/SKILL.md +95 -0
- package/skills/turing/budget/SKILL.md +52 -0
- package/skills/turing/calibrate/SKILL.md +47 -0
- package/skills/turing/card/SKILL.md +36 -0
- package/skills/turing/changelog/SKILL.md +22 -0
- package/skills/turing/checkpoint/SKILL.md +47 -0
- package/skills/turing/cite/SKILL.md +23 -0
- package/skills/turing/compare/SKILL.md +24 -0
- package/skills/turing/counterfactual/SKILL.md +27 -0
- package/skills/turing/curriculum/SKILL.md +43 -0
- package/skills/turing/design/SKILL.md +97 -0
- package/skills/turing/diagnose/SKILL.md +52 -0
- package/skills/turing/diff/SKILL.md +48 -0
- package/skills/turing/distill/SKILL.md +56 -0
- package/skills/turing/doctor/SKILL.md +31 -0
- package/skills/turing/ensemble/SKILL.md +54 -0
- package/skills/turing/explore/SKILL.md +107 -0
- package/skills/turing/export/SKILL.md +48 -0
- package/skills/turing/feature/SKILL.md +42 -0
- package/skills/turing/flashback/SKILL.md +22 -0
- package/skills/turing/fork/SKILL.md +40 -0
- package/skills/turing/frontier/SKILL.md +45 -0
- package/skills/turing/init/SKILL.md +154 -0
- package/skills/turing/leak/SKILL.md +47 -0
- package/skills/turing/lit/SKILL.md +47 -0
- package/skills/turing/logbook/SKILL.md +51 -0
- package/skills/turing/merge/SKILL.md +24 -0
- package/skills/turing/mode/SKILL.md +43 -0
- package/skills/turing/onboard/SKILL.md +20 -0
- package/skills/turing/paper/SKILL.md +44 -0
- package/skills/turing/plan/SKILL.md +27 -0
- package/skills/turing/poster/SKILL.md +89 -0
- package/skills/turing/postmortem/SKILL.md +28 -0
- package/skills/turing/preflight/SKILL.md +75 -0
- package/skills/turing/present/SKILL.md +23 -0
- package/skills/turing/profile/SKILL.md +43 -0
- package/skills/turing/prune/SKILL.md +26 -0
- package/skills/turing/quantize/SKILL.md +24 -0
- package/skills/turing/queue/SKILL.md +48 -0
- package/skills/turing/registry/SKILL.md +31 -0
- package/skills/turing/regress/SKILL.md +53 -0
- package/skills/turing/replay/SKILL.md +23 -0
- package/skills/turing/report/SKILL.md +97 -0
- package/skills/turing/reproduce/SKILL.md +48 -0
- package/skills/turing/retry/SKILL.md +41 -0
- package/skills/turing/review/SKILL.md +20 -0
- package/skills/turing/rules/loop-protocol.md +91 -0
- package/skills/turing/sanity/SKILL.md +48 -0
- package/skills/turing/scale/SKILL.md +55 -0
- package/skills/turing/search/SKILL.md +22 -0
- package/skills/turing/seed/SKILL.md +47 -0
- package/skills/turing/sensitivity/SKILL.md +41 -0
- package/skills/turing/share/SKILL.md +20 -0
- package/skills/turing/simulate/SKILL.md +28 -0
- package/skills/turing/status/SKILL.md +24 -0
- package/skills/turing/stitch/SKILL.md +49 -0
- package/skills/turing/suggest/SKILL.md +159 -0
- package/skills/turing/surgery/SKILL.md +27 -0
- package/skills/turing/sweep/SKILL.md +45 -0
- package/skills/turing/template/SKILL.md +22 -0
- package/skills/turing/train/SKILL.md +75 -0
- package/skills/turing/transfer/SKILL.md +54 -0
- package/skills/turing/trend/SKILL.md +21 -0
- package/skills/turing/try/SKILL.md +63 -0
- package/skills/turing/update/SKILL.md +27 -0
- package/skills/turing/validate/SKILL.md +34 -0
- package/skills/turing/warm/SKILL.md +53 -0
- package/skills/turing/watch/SKILL.md +60 -0
- package/skills/turing/whatif/SKILL.md +31 -0
- package/skills/turing/xray/SKILL.md +43 -0
- package/src/command-registry.js +160 -0
- package/src/install.js +8 -34
- package/src/sync-skills-layout.js +149 -0
- package/src/verify.js +5 -88
- package/templates/__pycache__/evaluate.cpython-312.pyc +0 -0
- package/templates/__pycache__/evaluate.cpython-314.pyc +0 -0
- package/templates/__pycache__/prepare.cpython-312.pyc +0 -0
- package/templates/__pycache__/prepare.cpython-314.pyc +0 -0
- package/templates/features/__pycache__/__init__.cpython-312.pyc +0 -0
- package/templates/features/__pycache__/__init__.cpython-314.pyc +0 -0
- package/templates/features/__pycache__/featurizers.cpython-312.pyc +0 -0
- package/templates/features/__pycache__/featurizers.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/ablation_study.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/ablation_study.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/architecture_surgery.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/architecture_surgery.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/budget_manager.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/budget_manager.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/build_ensemble.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/build_ensemble.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/calibration.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/calibration.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/check_convergence.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/check_convergence.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/checkpoint_manager.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/checkpoint_manager.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/citation_manager.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/citation_manager.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/cost_frontier.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/cost_frontier.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/counterfactual_explanation.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/counterfactual_explanation.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/critique_hypothesis.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/critique_hypothesis.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/curriculum_optimizer.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/curriculum_optimizer.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/diagnose_errors.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/diagnose_errors.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/draft_paper_sections.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/draft_paper_sections.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/equivalence_checker.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/equivalence_checker.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_annotations.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_annotations.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_archive.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_archive.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_diff.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_diff.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_index.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_index.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_queue.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_queue.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_replay.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_replay.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_search.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_search.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_simulator.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_simulator.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_templates.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/experiment_templates.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/export_card.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/export_card.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/export_formats.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/export_formats.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/failure_postmortem.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/failure_postmortem.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/feature_intelligence.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/feature_intelligence.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/fork_experiment.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/fork_experiment.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/generate_baselines.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/generate_baselines.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/generate_brief.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/generate_brief.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/generate_changelog.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/generate_changelog.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/generate_figures.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/generate_figures.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/generate_logbook.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/generate_logbook.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/generate_model_card.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/generate_model_card.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/generate_onboarding.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/generate_onboarding.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/harness_doctor.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/harness_doctor.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/incremental_update.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/incremental_update.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/knowledge_transfer.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/knowledge_transfer.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/latency_benchmark.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/latency_benchmark.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/leakage_detector.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/leakage_detector.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/literature_search.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/literature_search.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/log_experiment.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/log_experiment.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/manage_hypotheses.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/manage_hypotheses.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/methodology_audit.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/methodology_audit.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/model_distiller.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/model_distiller.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/model_lifecycle.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/model_lifecycle.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/model_merger.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/model_merger.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/model_pruning.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/model_pruning.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/model_quantization.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/model_quantization.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/model_xray.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/model_xray.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/novelty_guard.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/novelty_guard.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/package_experiments.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/package_experiments.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/pareto_frontier.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/pareto_frontier.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/parse_metrics.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/parse_metrics.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/pipeline_manager.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/pipeline_manager.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/profile_training.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/profile_training.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/regression_gate.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/regression_gate.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/reproduce_experiment.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/reproduce_experiment.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/research_planner.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/research_planner.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/sanity_checks.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/sanity_checks.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/scaffold.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/scaffold.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/scaling_estimator.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/scaling_estimator.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/seed_runner.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/seed_runner.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/sensitivity_analysis.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/sensitivity_analysis.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/session_flashback.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/session_flashback.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/show_experiment_tree.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/show_experiment_tree.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/show_families.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/show_families.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/simulate_review.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/simulate_review.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/smart_retry.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/smart_retry.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/statistical_compare.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/statistical_compare.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/suggest_next.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/suggest_next.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/sweep.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/sweep.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/synthesize_decision.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/synthesize_decision.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/training_monitor.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/training_monitor.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/treequest_suggest.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/treequest_suggest.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/trend_analysis.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/trend_analysis.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/turing_io.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/turing_io.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/update_state.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/update_state.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/verify_placeholders.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/verify_placeholders.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/warm_start.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/warm_start.cpython-314.pyc +0 -0
- package/templates/scripts/__pycache__/whatif_engine.cpython-312.pyc +0 -0
- package/templates/scripts/__pycache__/whatif_engine.cpython-314.pyc +0 -0
package/src/install.js
CHANGED
|
@@ -14,43 +14,24 @@ import { join, dirname } from "path";
|
|
|
14
14
|
import { fileURLToPath } from "url";
|
|
15
15
|
import { getTargetPaths } from "./paths.js";
|
|
16
16
|
import { updateClaudeMd } from "./claude-md.js";
|
|
17
|
+
import { getCommandNames, getConfigFiles } from "./command-registry.js";
|
|
17
18
|
|
|
18
19
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
20
|
const PLUGIN_ROOT = join(__dirname, "..");
|
|
20
21
|
|
|
21
|
-
// Single source of truth for sub-commands (DRY — used for dirs and file copy)
|
|
22
|
-
const SUB_COMMANDS = [
|
|
23
|
-
"init", "train", "status", "compare", "sweep", "validate",
|
|
24
|
-
"try", "brief", "suggest", "explore", "design", "logbook", "poster",
|
|
25
|
-
"report", "mode", "preflight", "card", "seed", "reproduce",
|
|
26
|
-
"diagnose", "ablate", "frontier", "profile", "checkpoint", "export",
|
|
27
|
-
"lit", "paper", "queue", "retry", "fork",
|
|
28
|
-
"diff", "watch", "regress",
|
|
29
|
-
"ensemble", "stitch", "warm",
|
|
30
|
-
"scale", "budget", "distill",
|
|
31
|
-
"transfer", "audit",
|
|
32
|
-
"sanity", "baseline", "leak",
|
|
33
|
-
"xray", "sensitivity", "calibrate",
|
|
34
|
-
"feature", "curriculum",
|
|
35
|
-
"prune", "quantize", "merge", "surgery",
|
|
36
|
-
"trend", "flashback", "archive", "annotate", "search", "template", "replay",
|
|
37
|
-
"cite", "present", "changelog",
|
|
38
|
-
"onboard", "share", "review",
|
|
39
|
-
"whatif", "counterfactual", "simulate",
|
|
40
|
-
"update", "registry",
|
|
41
|
-
"postmortem", "doctor", "plan",
|
|
42
|
-
];
|
|
43
22
|
|
|
44
23
|
export async function install(opts = {}) {
|
|
45
24
|
const scope = opts.global ? "global" : opts.project ? "project" : "global";
|
|
46
25
|
const paths = getTargetPaths(scope);
|
|
26
|
+
const subCommands = await getCommandNames();
|
|
27
|
+
const configFiles = await getConfigFiles();
|
|
47
28
|
|
|
48
29
|
console.log("Turing ML Research Harness — Installer");
|
|
49
30
|
console.log(`Target: ${paths.commands} (${scope})`);
|
|
50
31
|
console.log("");
|
|
51
32
|
|
|
52
33
|
// Create directories for each sub-command + agents + config
|
|
53
|
-
for (const subDir of ["", "agents", "config", "rules", "templates", ...
|
|
34
|
+
for (const subDir of ["", "agents", "config", "rules", "templates", ...subCommands]) {
|
|
54
35
|
await mkdir(join(paths.commands, subDir), { recursive: true });
|
|
55
36
|
}
|
|
56
37
|
|
|
@@ -62,13 +43,13 @@ export async function install(opts = {}) {
|
|
|
62
43
|
console.log(" Router -> SKILL.md");
|
|
63
44
|
|
|
64
45
|
// Copy sub-commands as <name>/SKILL.md
|
|
65
|
-
for (const cmd of
|
|
46
|
+
for (const cmd of subCommands) {
|
|
66
47
|
await copyFile(
|
|
67
48
|
join(PLUGIN_ROOT, "commands", `${cmd}.md`),
|
|
68
49
|
join(paths.commands, cmd, "SKILL.md"),
|
|
69
50
|
);
|
|
70
51
|
}
|
|
71
|
-
console.log(` ${
|
|
52
|
+
console.log(` ${subCommands.length} commands installed`);
|
|
72
53
|
|
|
73
54
|
// Copy rules
|
|
74
55
|
await copyFile(
|
|
@@ -88,20 +69,13 @@ export async function install(opts = {}) {
|
|
|
88
69
|
console.log(` ${agentFiles.length} agents installed`);
|
|
89
70
|
|
|
90
71
|
// Copy config (static schema files only)
|
|
91
|
-
const
|
|
92
|
-
"defaults.yaml", "lifecycle.toml", "taxonomy.toml",
|
|
93
|
-
"experiment_archetypes.yaml", "novelty_aliases.yaml",
|
|
94
|
-
"relationships.toml", "state.toml", "task_taxonomy.yaml",
|
|
95
|
-
"failure_modes.yaml",
|
|
96
|
-
"watch_alerts.yaml",
|
|
97
|
-
];
|
|
98
|
-
for (const file of CONFIG_FILES) {
|
|
72
|
+
for (const file of configFiles) {
|
|
99
73
|
await copyFile(
|
|
100
74
|
join(PLUGIN_ROOT, "config", file),
|
|
101
75
|
join(paths.config, file),
|
|
102
76
|
);
|
|
103
77
|
}
|
|
104
|
-
console.log(` ${
|
|
78
|
+
console.log(` ${configFiles.length} config files installed`);
|
|
105
79
|
|
|
106
80
|
// Copy templates used by /turing:init
|
|
107
81
|
await cp(
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Synchronize the modern skills/turing package mirror from commands/.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* node src/sync-skills-layout.js [--check]
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { mkdir, readdir, readFile, rm, writeFile } from "fs/promises";
|
|
10
|
+
import { dirname, join, relative } from "path";
|
|
11
|
+
import { fileURLToPath } from "url";
|
|
12
|
+
import { getCommandNames } from "./command-registry.js";
|
|
13
|
+
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const PLUGIN_ROOT = join(__dirname, "..");
|
|
16
|
+
const COMMANDS_DIR = join(PLUGIN_ROOT, "commands");
|
|
17
|
+
const SKILLS_DIR = join(PLUGIN_ROOT, "skills", "turing");
|
|
18
|
+
|
|
19
|
+
async function readUtf8(path) {
|
|
20
|
+
return readFile(path, "utf8");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function copyTextFile(source, target) {
|
|
24
|
+
await mkdir(dirname(target), { recursive: true });
|
|
25
|
+
await writeFile(target, await readUtf8(source));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function mirrorEntries() {
|
|
29
|
+
const names = await getCommandNames();
|
|
30
|
+
return [
|
|
31
|
+
{
|
|
32
|
+
source: join(COMMANDS_DIR, "turing.md"),
|
|
33
|
+
target: join(SKILLS_DIR, "SKILL.md"),
|
|
34
|
+
},
|
|
35
|
+
...names.map((name) => ({
|
|
36
|
+
source: join(COMMANDS_DIR, `${name}.md`),
|
|
37
|
+
target: join(SKILLS_DIR, name, "SKILL.md"),
|
|
38
|
+
})),
|
|
39
|
+
{
|
|
40
|
+
source: join(COMMANDS_DIR, "rules", "loop-protocol.md"),
|
|
41
|
+
target: join(SKILLS_DIR, "rules", "loop-protocol.md"),
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function existingMirrorEntries(dir = SKILLS_DIR) {
|
|
47
|
+
let entries;
|
|
48
|
+
try {
|
|
49
|
+
entries = await readdir(dir, { withFileTypes: true });
|
|
50
|
+
} catch (error) {
|
|
51
|
+
if (error.code === "ENOENT") {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const paths = [];
|
|
58
|
+
for (const entry of entries) {
|
|
59
|
+
const path = join(dir, entry.name);
|
|
60
|
+
paths.push(path);
|
|
61
|
+
if (entry.isDirectory()) {
|
|
62
|
+
paths.push(...await existingMirrorEntries(path));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return paths;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function findDrift() {
|
|
69
|
+
const entries = await mirrorEntries();
|
|
70
|
+
const expectedTargets = new Set(entries.map(({ target }) => target));
|
|
71
|
+
const expectedPaths = new Set([SKILLS_DIR]);
|
|
72
|
+
for (const target of expectedTargets) {
|
|
73
|
+
let current = target;
|
|
74
|
+
while (current.startsWith(SKILLS_DIR)) {
|
|
75
|
+
expectedPaths.add(current);
|
|
76
|
+
if (current === SKILLS_DIR) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
current = dirname(current);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const issues = [];
|
|
83
|
+
|
|
84
|
+
for (const { source, target } of entries) {
|
|
85
|
+
let sourceText;
|
|
86
|
+
try {
|
|
87
|
+
sourceText = await readUtf8(source);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
issues.push(`missing source ${relative(PLUGIN_ROOT, source)}: ${error.message}`);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
let targetText;
|
|
94
|
+
try {
|
|
95
|
+
targetText = await readUtf8(target);
|
|
96
|
+
} catch (error) {
|
|
97
|
+
if (error.code === "ENOENT") {
|
|
98
|
+
issues.push(`missing mirror ${relative(PLUGIN_ROOT, target)}`);
|
|
99
|
+
} else {
|
|
100
|
+
issues.push(`cannot read mirror ${relative(PLUGIN_ROOT, target)}: ${error.message}`);
|
|
101
|
+
}
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (targetText !== sourceText) {
|
|
106
|
+
issues.push(`diverged mirror ${relative(PLUGIN_ROOT, target)}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
for (const path of await existingMirrorEntries()) {
|
|
111
|
+
if (!expectedPaths.has(path)) {
|
|
112
|
+
issues.push(`stale mirror ${relative(PLUGIN_ROOT, path)}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return issues;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export async function syncSkillsLayout({ check = false } = {}) {
|
|
120
|
+
if (check) {
|
|
121
|
+
const issues = await findDrift();
|
|
122
|
+
if (issues.length > 0) {
|
|
123
|
+
for (const issue of issues) {
|
|
124
|
+
console.error(issue);
|
|
125
|
+
}
|
|
126
|
+
process.exitCode = 1;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
console.log("skills/turing mirror is in sync");
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
await rm(SKILLS_DIR, { recursive: true, force: true });
|
|
134
|
+
for (const { source, target } of await mirrorEntries()) {
|
|
135
|
+
await copyTextFile(source, target);
|
|
136
|
+
}
|
|
137
|
+
console.log("skills/turing mirror synchronized");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const isDirectRun =
|
|
141
|
+
process.argv[1] &&
|
|
142
|
+
fileURLToPath(import.meta.url).endsWith(process.argv[1].replace(/^.*\//, ""));
|
|
143
|
+
|
|
144
|
+
if (isDirectRun) {
|
|
145
|
+
syncSkillsLayout({ check: process.argv.includes("--check") }).catch((error) => {
|
|
146
|
+
console.error(error.message);
|
|
147
|
+
process.exitCode = 1;
|
|
148
|
+
});
|
|
149
|
+
}
|
package/src/verify.js
CHANGED
|
@@ -11,99 +11,14 @@
|
|
|
11
11
|
import { access, readdir } from "fs/promises";
|
|
12
12
|
import { dirname, join } from "path";
|
|
13
13
|
import { fileURLToPath } from "url";
|
|
14
|
+
import { getConfigFiles, getExpectedCommandPaths } from "./command-registry.js";
|
|
14
15
|
import { getTargetPaths } from "./paths.js";
|
|
15
16
|
|
|
16
17
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
17
18
|
const PLUGIN_ROOT = join(__dirname, "..");
|
|
18
19
|
|
|
19
|
-
const EXPECTED_COMMANDS = [
|
|
20
|
-
"SKILL.md",
|
|
21
|
-
"init/SKILL.md",
|
|
22
|
-
"train/SKILL.md",
|
|
23
|
-
"status/SKILL.md",
|
|
24
|
-
"compare/SKILL.md",
|
|
25
|
-
"sweep/SKILL.md",
|
|
26
|
-
"validate/SKILL.md",
|
|
27
|
-
"try/SKILL.md",
|
|
28
|
-
"brief/SKILL.md",
|
|
29
|
-
"suggest/SKILL.md",
|
|
30
|
-
"explore/SKILL.md",
|
|
31
|
-
"design/SKILL.md",
|
|
32
|
-
"logbook/SKILL.md",
|
|
33
|
-
"poster/SKILL.md",
|
|
34
|
-
"report/SKILL.md",
|
|
35
|
-
"mode/SKILL.md",
|
|
36
|
-
"preflight/SKILL.md",
|
|
37
|
-
"card/SKILL.md",
|
|
38
|
-
"seed/SKILL.md",
|
|
39
|
-
"reproduce/SKILL.md",
|
|
40
|
-
"diagnose/SKILL.md",
|
|
41
|
-
"ablate/SKILL.md",
|
|
42
|
-
"frontier/SKILL.md",
|
|
43
|
-
"profile/SKILL.md",
|
|
44
|
-
"checkpoint/SKILL.md",
|
|
45
|
-
"export/SKILL.md",
|
|
46
|
-
"lit/SKILL.md",
|
|
47
|
-
"paper/SKILL.md",
|
|
48
|
-
"queue/SKILL.md",
|
|
49
|
-
"retry/SKILL.md",
|
|
50
|
-
"fork/SKILL.md",
|
|
51
|
-
"diff/SKILL.md",
|
|
52
|
-
"watch/SKILL.md",
|
|
53
|
-
"regress/SKILL.md",
|
|
54
|
-
"ensemble/SKILL.md",
|
|
55
|
-
"stitch/SKILL.md",
|
|
56
|
-
"warm/SKILL.md",
|
|
57
|
-
"scale/SKILL.md",
|
|
58
|
-
"budget/SKILL.md",
|
|
59
|
-
"distill/SKILL.md",
|
|
60
|
-
"transfer/SKILL.md",
|
|
61
|
-
"audit/SKILL.md",
|
|
62
|
-
"sanity/SKILL.md",
|
|
63
|
-
"baseline/SKILL.md",
|
|
64
|
-
"leak/SKILL.md",
|
|
65
|
-
"xray/SKILL.md",
|
|
66
|
-
"sensitivity/SKILL.md",
|
|
67
|
-
"calibrate/SKILL.md",
|
|
68
|
-
"feature/SKILL.md",
|
|
69
|
-
"curriculum/SKILL.md",
|
|
70
|
-
"prune/SKILL.md",
|
|
71
|
-
"quantize/SKILL.md",
|
|
72
|
-
"merge/SKILL.md",
|
|
73
|
-
"surgery/SKILL.md",
|
|
74
|
-
"trend/SKILL.md",
|
|
75
|
-
"flashback/SKILL.md",
|
|
76
|
-
"archive/SKILL.md",
|
|
77
|
-
"annotate/SKILL.md",
|
|
78
|
-
"search/SKILL.md",
|
|
79
|
-
"template/SKILL.md",
|
|
80
|
-
"replay/SKILL.md",
|
|
81
|
-
"cite/SKILL.md",
|
|
82
|
-
"present/SKILL.md",
|
|
83
|
-
"changelog/SKILL.md",
|
|
84
|
-
"onboard/SKILL.md",
|
|
85
|
-
"share/SKILL.md",
|
|
86
|
-
"review/SKILL.md",
|
|
87
|
-
"whatif/SKILL.md",
|
|
88
|
-
"counterfactual/SKILL.md",
|
|
89
|
-
"simulate/SKILL.md",
|
|
90
|
-
"update/SKILL.md",
|
|
91
|
-
"registry/SKILL.md",
|
|
92
|
-
"postmortem/SKILL.md",
|
|
93
|
-
"doctor/SKILL.md",
|
|
94
|
-
"plan/SKILL.md",
|
|
95
|
-
];
|
|
96
|
-
|
|
97
20
|
const EXPECTED_AGENTS = ["ml-researcher.md", "ml-evaluator.md"];
|
|
98
21
|
|
|
99
|
-
const EXPECTED_CONFIG = [
|
|
100
|
-
"defaults.yaml", "lifecycle.toml", "taxonomy.toml",
|
|
101
|
-
"experiment_archetypes.yaml", "novelty_aliases.yaml",
|
|
102
|
-
"relationships.toml", "state.toml", "task_taxonomy.yaml",
|
|
103
|
-
"failure_modes.yaml",
|
|
104
|
-
"watch_alerts.yaml",
|
|
105
|
-
];
|
|
106
|
-
|
|
107
22
|
async function templateFiles(root, relativeDir = "templates") {
|
|
108
23
|
const dir = join(root, relativeDir);
|
|
109
24
|
const entries = await readdir(dir, { withFileTypes: true });
|
|
@@ -135,6 +50,8 @@ async function fileExists(path) {
|
|
|
135
50
|
}
|
|
136
51
|
|
|
137
52
|
export async function verify(opts = {}) {
|
|
53
|
+
const expectedCommands = await getExpectedCommandPaths();
|
|
54
|
+
const expectedConfig = await getConfigFiles();
|
|
138
55
|
const scopes = opts.scope ? [opts.scope] : ["global", "project"];
|
|
139
56
|
const expectedTemplates = await templateFiles(PLUGIN_ROOT);
|
|
140
57
|
let found = false;
|
|
@@ -151,7 +68,7 @@ export async function verify(opts = {}) {
|
|
|
151
68
|
let missing = 0;
|
|
152
69
|
|
|
153
70
|
console.log("Commands:");
|
|
154
|
-
for (const cmd of
|
|
71
|
+
for (const cmd of expectedCommands) {
|
|
155
72
|
const ok = await fileExists(join(paths.commands, cmd));
|
|
156
73
|
console.log(` ${ok ? "✓" : "✗"} commands/${cmd}`);
|
|
157
74
|
if (!ok) missing++;
|
|
@@ -165,7 +82,7 @@ export async function verify(opts = {}) {
|
|
|
165
82
|
}
|
|
166
83
|
|
|
167
84
|
console.log("\nConfig:");
|
|
168
|
-
for (const cfg of
|
|
85
|
+
for (const cfg of expectedConfig) {
|
|
169
86
|
const ok = await fileExists(join(paths.config, cfg));
|
|
170
87
|
console.log(` ${ok ? "✓" : "✗"} config/${cfg}`);
|
|
171
88
|
if (!ok) missing++;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|