@elvis1513/auto-coding-skill 4.1.4 → 4.1.7

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/README.md CHANGED
@@ -9,8 +9,11 @@ The Skill is a selectable guardrail, not a command sequence that must run for
9
9
  every task. The model skips machinery whose expected benefit does not exceed its
10
10
  cost; read-only work and obvious small clean-checkout changes normally stay direct.
11
11
 
12
- Version 4.1.4 makes direct continuation provably pre-write, closes self-review and
13
- risk-classification gaps, validates Agent contracts, and makes tag publication
12
+ Version 4.1.7 makes the Python runtime check, release verification, and tag
13
+ publication environment reproducible while removing the unnecessary `requests`
14
+ dependency. Version 4.1.4
15
+ made direct continuation provably pre-write, closed self-review and
16
+ risk-classification gaps, validated Agent contracts, and made tag publication
14
17
  idempotent. Version 4.1.3 closed classification bypasses. Version 4.1.2 made mechanisms required,
15
18
  model-selectable when beneficial, or forbidden for the current task. Version
16
19
  4.1.1 consolidated the 4.x delivery-first workflow into one canonical
@@ -23,9 +26,9 @@ affected-scope checks are enabled only when concurrency or risk justifies them.
23
26
 
24
27
  ```bash
25
28
  npm install -g @elvis1513/auto-coding-skill
29
+ python3 -m pip install PyYAML==6.0.3
26
30
  autocoding init
27
31
  autocoding sync --projects .
28
- pip install pyyaml requests
29
32
  ```
30
33
 
31
34
  The project install contains:
@@ -210,6 +213,18 @@ project-specific facts outside the managed ENGINEERING block. Root `AGENTS.md` i
210
213
  replaced as a whole; its previous content is archived under
211
214
  `docs/archive/workflow/` as historical, non-authoritative context.
212
215
 
216
+ ## What changed in 4.1.7
217
+
218
+ - Made tag publication reproducible with explicit Node 24, Python 3.12, and pinned
219
+ PyYAML setup before package verification.
220
+ - Made `autocoding init` fail before writes with one interpreter-specific recovery
221
+ command when its Python runtime cannot import PyYAML.
222
+ - Removed the `requests` runtime dependency by using Python's standard HTTP library.
223
+ - Made concurrency tests self-contained instead of borrowing local thread and Git
224
+ identity configuration.
225
+ - Supported both GitHub-secret publication and local-token publication followed by
226
+ idempotent tag verification.
227
+
213
228
  ## What changed in 4.1.4
214
229
 
215
230
  - Added clean pre-write direct claims so broad paths cannot adopt unknown existing
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "managed_versions": {
4
- "agents": "4.1.4",
5
- "engineering": "4.1.4"
4
+ "agents": "4.1.7",
5
+ "engineering": "4.1.7"
6
6
  },
7
7
  "known_official_agents_sha256": [
8
8
  "ebaaadab60327b3a4852948443d7191a4d48cb00bf4910038ab78c9149089373"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  workflow:
3
- skill_version: "4.1.4"
3
+ skill_version: "4.1.7"
4
4
  mode: "dev"
5
5
  profile: "auto"
6
6
  completion: "push"
@@ -94,7 +94,7 @@ docs:
94
94
 
95
95
  # Engineering Configuration and Project Facts
96
96
 
97
- <!-- auto-coding-skill:managed-workflow:start version=4.1.4 -->
97
+ <!-- auto-coding-skill:managed-workflow:start version=4.1.7 -->
98
98
 
99
99
  Root `AGENTS.md` is the single shared behavioral protocol. The installed
100
100
  `SKILL.md` contains invocation guidance. This file is the single source for the
@@ -1,4 +1,4 @@
1
- <!-- auto-coding-skill:managed-agents:start version=4.1.4 -->
1
+ <!-- auto-coding-skill:managed-agents:start version=4.1.7 -->
2
2
  # Shared Engineering Protocol
3
3
 
4
4
  This file is fully managed by `auto-coding-skill`. Keep project-specific facts,
@@ -1,2 +1 @@
1
- pyyaml>=6.0
2
- requests>=2.31.0
1
+ PyYAML==6.0.3
@@ -24,12 +24,7 @@ import uuid
24
24
  from pathlib import Path
25
25
  from typing import Iterator, Optional, List
26
26
 
27
- try:
28
- import yaml # type: ignore
29
- except Exception:
30
- yaml = None
31
-
32
- from core import APError, ensure_git_repo, copy_tree, run, load_yaml, find_config, run_shell, http_get_status
27
+ from core import APError, ensure_git_repo, copy_tree, run, load_yaml, find_config, run_shell, http_get_status, require_yaml
33
28
  from scaffold_templates import scaffold_groups, templates_for
34
29
 
35
30
 
@@ -51,7 +46,7 @@ _RECOMMENDED_FINAL_TOTAL_SECONDS = 180.0
51
46
  _WORKFLOW_MIGRATION_POLICY = Path("data/policies/workflow-migrations-v1.json")
52
47
  _FALLBACK_WORKFLOW_MIGRATION_POLICY = {
53
48
  "schema_version": 1,
54
- "managed_versions": {"agents": "4.1.4", "engineering": "4.1.4"},
49
+ "managed_versions": {"agents": "4.1.7", "engineering": "4.1.7"},
55
50
  "known_official_engineering_body_sha256": [
56
51
  "d1306cc626e8baf8c83c953b760fd771066de2bf125168eca3a7b7d6ff2b87a2",
57
52
  "305931c6edef770033a4f1970b00e5fb1c1728351856a173dbfa497daf563021",
@@ -638,8 +633,8 @@ def _migrate_fast_development_defaults(cfg: dict, repo: Path) -> list[str]:
638
633
  if _text(workflow_cfg.get("completion")).lower() != "push":
639
634
  workflow_cfg["completion"] = "push"
640
635
  changed.append("workflow.completion")
641
- if _text(workflow_cfg.get("skill_version")) != "4.1.4":
642
- workflow_cfg["skill_version"] = "4.1.4"
636
+ if _text(workflow_cfg.get("skill_version")) != "4.1.7":
637
+ workflow_cfg["skill_version"] = "4.1.7"
643
638
  changed.append("workflow.skill_version")
644
639
 
645
640
  commands_cfg = cfg.setdefault("commands", {})
@@ -952,16 +947,16 @@ def cmd_upgrade(args: argparse.Namespace) -> None:
952
947
  if current_agents:
953
948
  archive_dir = repo / "docs" / "archive" / "workflow"
954
949
  archive_header = (
955
- "# Archived AGENTS.md before auto-coding-skill 4.1.4\n\n"
950
+ "# Archived AGENTS.md before auto-coding-skill 4.1.7\n\n"
956
951
  "This file is historical and non-authoritative. The root AGENTS.md is fully managed.\n"
957
952
  "Move any still-current project facts into docs/ENGINEERING.md or docs/project/,\n"
958
953
  "without copying workflow rules back into the root AGENTS.md.\n\n---\n\n"
959
954
  )
960
955
  archive_content = archive_header + current_agents
961
- archive = archive_dir / "AGENTS.pre-4.1.4.md"
956
+ archive = archive_dir / "AGENTS.pre-4.1.7.md"
962
957
  if archive.exists() and archive.read_text(encoding="utf-8") != archive_content:
963
958
  digest = hashlib.sha256(current_agents.encode("utf-8")).hexdigest()[:12]
964
- archive = archive_dir / f"AGENTS.pre-4.1.4-{digest}.md"
959
+ archive = archive_dir / f"AGENTS.pre-4.1.7-{digest}.md"
965
960
  if not archive.exists():
966
961
  add_action("policy", archive, "archive", "historical and non-authoritative")
967
962
  if write:
@@ -1606,9 +1601,7 @@ def _parse_frontmatter_markdown_text(text: str, path: Path) -> tuple[dict, str]:
1606
1601
  m = re.match(r"^---\s*\n(.*?)\n---\s*(\n|$)(.*)$", text, flags=re.DOTALL)
1607
1602
  if not m:
1608
1603
  raise APError(f"Markdown frontmatter not found: {path}")
1609
- if yaml is None:
1610
- raise APError("PyYAML not installed. Install dependencies with: pip install pyyaml requests")
1611
- data = yaml.safe_load(m.group(1)) or {}
1604
+ data = require_yaml().safe_load(m.group(1)) or {}
1612
1605
  return data, m.group(3)
1613
1606
 
1614
1607
 
@@ -1619,9 +1612,7 @@ def _read_frontmatter_markdown(path: Path) -> tuple[dict, str]:
1619
1612
 
1620
1613
 
1621
1614
  def _write_frontmatter_markdown(path: Path, data: dict, body: str) -> None:
1622
- if yaml is None:
1623
- raise APError("PyYAML not installed. Install dependencies with: pip install pyyaml requests")
1624
- dumped = yaml.safe_dump(data, allow_unicode=True, sort_keys=False).strip()
1615
+ dumped = require_yaml().safe_dump(data, allow_unicode=True, sort_keys=False).strip()
1625
1616
  path.write_text(f"---\n{dumped}\n---\n{body}", encoding="utf-8")
1626
1617
 
1627
1618
 
@@ -7,8 +7,12 @@ from __future__ import annotations
7
7
  import os
8
8
  import re
9
9
  import signal
10
+ import shlex
10
11
  import shutil
11
12
  import subprocess
13
+ import sys
14
+ import urllib.error
15
+ import urllib.request
12
16
  from pathlib import Path
13
17
  from typing import Iterable, Optional, Dict, Any
14
18
 
@@ -17,16 +21,32 @@ try:
17
21
  except Exception:
18
22
  yaml = None
19
23
 
20
- try:
21
- import requests # type: ignore
22
- except Exception:
23
- requests = None
24
-
25
-
26
24
  class APError(RuntimeError):
27
25
  pass
28
26
 
29
27
 
28
+ def runtime_requirements_path() -> Path:
29
+ return Path(__file__).resolve().parents[1] / "requirements.txt"
30
+
31
+
32
+ def require_yaml() -> Any:
33
+ if yaml is None:
34
+ install = shlex.join(
35
+ [
36
+ sys.executable,
37
+ "-m",
38
+ "pip",
39
+ "install",
40
+ "--requirement",
41
+ str(runtime_requirements_path()),
42
+ ]
43
+ )
44
+ raise APError(
45
+ f"PyYAML is missing from {sys.executable}. Run: {install}"
46
+ )
47
+ return yaml
48
+
49
+
30
50
  def run(cmd: Iterable[str], cwd: Optional[Path] = None, check: bool = True) -> subprocess.CompletedProcess:
31
51
  p = subprocess.run(list(cmd), cwd=str(cwd) if cwd else None, text=True, capture_output=True)
32
52
  if check and p.returncode != 0:
@@ -46,10 +66,7 @@ def ensure_git_repo(repo: Path) -> None:
46
66
  def load_yaml(path: Path) -> Dict[str, Any]:
47
67
  if not path.exists():
48
68
  raise APError(f"YAML not found: {path}")
49
- if yaml is None:
50
- raise APError(
51
- "PyYAML not installed. Install dependencies with: pip install pyyaml requests"
52
- )
69
+ yaml_module = require_yaml()
53
70
  if path.suffix.lower() in {".md", ".markdown"}:
54
71
  text = path.read_text(encoding="utf-8")
55
72
  m = re.match(r"^---\s*\n(.*?)\n---\s*(\n|$)", text, flags=re.DOTALL)
@@ -58,10 +75,10 @@ def load_yaml(path: Path) -> Dict[str, Any]:
58
75
  f"Config markdown frontmatter not found: {path}\n"
59
76
  "Expected YAML frontmatter wrapped by '---' at top of file."
60
77
  )
61
- data = yaml.safe_load(m.group(1))
78
+ data = yaml_module.safe_load(m.group(1))
62
79
  else:
63
80
  with path.open("r", encoding="utf-8") as f:
64
- data = yaml.safe_load(f)
81
+ data = yaml_module.safe_load(f)
65
82
  return data or {}
66
83
 
67
84
 
@@ -87,12 +104,12 @@ def copy_tree(src: Path, dst: Path) -> None:
87
104
 
88
105
 
89
106
  def http_get_status(url: str, timeout_s: int = 5) -> int:
90
- if requests is None:
91
- raise APError(
92
- "requests not installed. Install dependencies with: pip install pyyaml requests"
93
- )
94
- r = requests.get(url, timeout=timeout_s)
95
- return r.status_code
107
+ request = urllib.request.Request(url, method="GET")
108
+ try:
109
+ with urllib.request.urlopen(request, timeout=timeout_s) as response:
110
+ return int(response.status)
111
+ except urllib.error.HTTPError as exc:
112
+ return int(exc.code)
96
113
 
97
114
 
98
115
  def find_config(repo: Path) -> Path:
package/cli/src/index.js CHANGED
@@ -3,7 +3,7 @@ import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import os from "node:os";
5
5
  import crypto from "node:crypto";
6
- import { execFileSync } from "node:child_process";
6
+ import { execFileSync, spawnSync } from "node:child_process";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
9
  function die(msg){
@@ -118,6 +118,26 @@ function validateCommandArgs(args){
118
118
 
119
119
  function exists(p){ try { fs.accessSync(p); return true; } catch { return false; } }
120
120
  function rmrf(p){ fs.rmSync(p, { recursive: true, force: true }); }
121
+ function quoted(value){ return JSON.stringify(String(value)); }
122
+
123
+ function requireRuntimeDependencies(assetSkill){
124
+ const defaultPython = process.platform === "win32" ? "python" : "python3";
125
+ const python = String(process.env.AUTOCODING_PYTHON || defaultPython).trim() || defaultPython;
126
+ const requirements = path.join(assetSkill, "requirements.txt");
127
+ if (!exists(requirements)) die(`missing runtime dependency definition: ${requirements}`);
128
+ const check = spawnSync(
129
+ python,
130
+ ["-c", "import yaml"],
131
+ { encoding: "utf8", stdio: "pipe" },
132
+ );
133
+ if (check.status === 0) return;
134
+ const detail = String(check.stderr || check.error?.message || "PyYAML import failed").trim().split(/\r?\n/).slice(-1)[0];
135
+ const install = `${quoted(python)} -m pip install --requirement ${quoted(requirements)}`;
136
+ die(
137
+ `Python runtime dependency check failed${detail ? `: ${detail}` : ""}\n`
138
+ + `Run: ${install}\nThen rerun autocoding init.`,
139
+ );
140
+ }
121
141
  function shouldSkip(name){
122
142
  return name === "__pycache__" || name === ".DS_Store" || name.endsWith(".pyc");
123
143
  }
@@ -1470,6 +1490,8 @@ Compatibility:
1470
1490
 
1471
1491
  if (args.ai) console.warn("[autocoding] --ai is deprecated and ignored; installing generic .agents.");
1472
1492
 
1493
+ requireRuntimeDependencies(assetSkill);
1494
+
1473
1495
  const { skillDir, agentsDir } = resolveInstallDirs(args.mode, args.dest);
1474
1496
  const existingTargets = [skillDir, agentsDir].filter(target => exists(target));
1475
1497
  if (existingTargets.length && !args.force) {
@@ -16,6 +16,7 @@ import yaml
16
16
  REPO_ROOT = Path(__file__).resolve().parents[2]
17
17
  AP_SCRIPT = REPO_ROOT / "src" / "auto-coding-skill" / "scripts" / "ap.py"
18
18
  _MISSING = object()
19
+ _TEST_OWNER = os.environ.get("CODEX_THREAD_ID") or "concurrency-test-owner"
19
20
 
20
21
 
21
22
  def command(
@@ -25,7 +26,7 @@ def command(
25
26
  input_text: str | None = None,
26
27
  ) -> subprocess.CompletedProcess[str]:
27
28
  env = os.environ.copy()
28
- env.setdefault("CODEX_THREAD_ID", "concurrency-test-owner")
29
+ env.setdefault("CODEX_THREAD_ID", _TEST_OWNER)
29
30
  result = subprocess.run(
30
31
  list(args),
31
32
  cwd=cwd,
@@ -655,7 +656,7 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
655
656
 
656
657
  def test_writer_lease_requires_match_and_owner_handoff_uses_generation_cas(self) -> None:
657
658
  _, repo, _ = self.make_repo()
658
- owner = os.environ["CODEX_THREAD_ID"]
659
+ owner = _TEST_OWNER
659
660
  self.ap(
660
661
  repo,
661
662
  "task-start",
@@ -1337,6 +1338,8 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
1337
1338
  git(task_module, "update-ref", "-d", "refs/heads/extra-check", extra_tip)
1338
1339
 
1339
1340
  git(task_module, "checkout", "-qb", "hidden")
1341
+ git(task_module, "config", "user.email", "test@example.com")
1342
+ git(task_module, "config", "user.name", "Auto Coding Test")
1340
1343
  (task_module / "hidden.txt").write_text("local-only history\n", encoding="utf-8")
1341
1344
  git(task_module, "add", "hidden.txt")
1342
1345
  git(task_module, "commit", "-qm", "hidden local commit")
@@ -1683,6 +1686,8 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
1683
1686
 
1684
1687
  module_b = worktree / "vendor" / "b"
1685
1688
  baseline = git_output(module_b, "rev-parse", "HEAD")
1689
+ git(module_b, "config", "user.email", "test@example.com")
1690
+ git(module_b, "config", "user.name", "Auto Coding Test")
1686
1691
  git(module_b, "checkout", "-qb", "hidden")
1687
1692
  (module_b / "hidden.txt").write_text("local-only residual history\n", encoding="utf-8")
1688
1693
  git(module_b, "add", "hidden.txt")
@@ -169,6 +169,23 @@ function testPreflightAvoidsPartialInstall() {
169
169
  assert(exists(path.join(repo, ".agents", "agents", "custom.toml")), "existing custom agent should remain");
170
170
  }
171
171
 
172
+ function testInitRejectsMissingPythonRuntimeBeforeWrites() {
173
+ if (process.platform === "win32") return;
174
+ const repo = tmpdir("missing-python-runtime");
175
+ const fakePython = path.join(repo, "python-without-yaml");
176
+ writeFile(fakePython, "#!/bin/sh\necho 'No module named yaml' >&2\nexit 1\n");
177
+ fs.chmodSync(fakePython, 0o755);
178
+ const result = run("node", [cli, "init"], {
179
+ cwd: repo,
180
+ check: false,
181
+ env: { AUTOCODING_PYTHON: fakePython },
182
+ });
183
+ assert(result.status !== 0, "init should fail when its Python runtime cannot import PyYAML");
184
+ assert(result.stderr.includes("Python runtime dependency check failed"), "init should identify the runtime dependency failure");
185
+ assert(result.stderr.includes("requirements.txt") && result.stderr.includes("Then rerun autocoding init"), "init should print one deterministic recovery command");
186
+ assert(!exists(path.join(repo, ".agents")), "runtime preflight must fail before writing .agents");
187
+ }
188
+
172
189
  function testDestVariants() {
173
190
  const variants = [
174
191
  { name: "repo-root", dest(root) { return root; } },
@@ -735,7 +752,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
735
752
 
736
753
  const engineering = path.join(repo, "docs", "ENGINEERING.md");
737
754
  const initial = fs.readFileSync(engineering, "utf8");
738
- const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.1\.4 -->/;
755
+ const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.1\.7 -->/;
739
756
  const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
740
757
  assert(startPattern.test(initial), "new projects should include a versioned managed workflow marker");
741
758
  assert(initial.includes(endMarker), "new projects should include the managed workflow end marker");
@@ -754,7 +771,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
754
771
  const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
755
772
  const dryResult = JSON.parse(dryRun.stdout).results[0];
756
773
  assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
757
- assert(dryResult.managedWorkflow.version === "4.1.4", "dry-run should expose the target workflow version");
774
+ assert(dryResult.managedWorkflow.version === "4.1.7", "dry-run should expose the target workflow version");
758
775
  assert(dryResult.actions.some(item => item.action === "would-update" && item.path === "docs/ENGINEERING.md"), "dry-run should plan the managed body update");
759
776
  assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
760
777
 
@@ -764,14 +781,14 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
764
781
  const updatedEnd = updated.indexOf(endMarker) + endMarker.length;
765
782
  assert(updated.slice(0, updatedStart) === outsideBefore, "sync must preserve frontmatter and content before the managed block byte-for-byte");
766
783
  assert(updated.slice(updatedEnd) === outsideAfter, "sync must preserve content after the managed block byte-for-byte");
767
- assert(updated.includes("version=4.1.4"), "sync should install the current managed workflow version");
784
+ assert(updated.includes("version=4.1.7"), "sync should install the current managed workflow version");
768
785
  assert(updated.includes("The frontmatter contract is:"), "sync should refresh stale managed workflow content");
769
786
 
770
787
  fillRequiredAccess(repo);
771
788
  const status = run("node", [cli, "status", "--projects", repo, "--json"]);
772
789
  const statusResult = JSON.parse(status.stdout).results[0];
773
790
  assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
774
- assert(statusResult.managedWorkflow.version === "4.1.4", "status should expose the installed managed workflow version");
791
+ assert(statusResult.managedWorkflow.version === "4.1.7", "status should expose the installed managed workflow version");
775
792
 
776
793
  const beforeSecondSync = fs.readFileSync(engineering, "utf8");
777
794
  const second = run("node", [cli, "sync", "--projects", repo, "--json"]);
@@ -799,7 +816,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
799
816
  assert(dryResult.actions.find(item => item.path === "docs/ENGINEERING.md")?.detail.includes("preserved-custom"), "custom legacy action should be labeled preserved-custom");
800
817
  run("node", [cli, "sync", "--projects", repo]);
801
818
  const migrated = fs.readFileSync(engineering, "utf8");
802
- assert(migrated.includes("version=4.1.4"), "legacy migration should insert the current managed workflow");
819
+ assert(migrated.includes("version=4.1.7"), "legacy migration should insert the current managed workflow");
803
820
  assert(migrated.includes(legacyNote), "legacy migration must preserve the complete existing body");
804
821
  const migratedStart = migrated.indexOf("<!-- auto-coding-skill:managed-workflow:start");
805
822
  const migratedEnd = migrated.indexOf(endMarker) + endMarker.length;
@@ -903,7 +920,7 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
903
920
  run("node", [cli, "sync", "--projects", repo]);
904
921
  const agents = path.join(repo, "AGENTS.md");
905
922
  const initial = fs.readFileSync(agents, "utf8");
906
- assert(initial.includes("managed-agents:start version=4.1.4"), "new projects should receive the versioned root AGENTS block");
923
+ assert(initial.includes("managed-agents:start version=4.1.7"), "new projects should receive the versioned root AGENTS block");
907
924
 
908
925
  const custom = [
909
926
  "# Project rules",
@@ -922,12 +939,12 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
922
939
 
923
940
  run("node", [cli, "sync", "--projects", repo]);
924
941
  const migrated = fs.readFileSync(agents, "utf8");
925
- assert(migrated.includes("managed-agents:start version=4.1.4"), "AGENTS migration should install the current managed block");
942
+ assert(migrated.includes("managed-agents:start version=4.1.7"), "AGENTS migration should install the current managed block");
926
943
  assert(!migrated.includes("Preserve this repository-specific rule exactly."), "root AGENTS must contain no project-specific tail");
927
944
  assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
928
945
  const canonical = fs.readFileSync(path.join(repoRoot, "cli", "assets", "skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
929
946
  assert(migrated === canonical, "root AGENTS must be byte-identical to the packaged canonical file");
930
- const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.1.4.md");
947
+ const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.1.7.md");
931
948
  assert(fs.readFileSync(archive, "utf8").includes("Preserve this repository-specific rule exactly."), "previous AGENTS content must be archived once");
932
949
  const stable = fs.readFileSync(agents);
933
950
  run("node", [cli, "sync", "--projects", repo]);
@@ -986,7 +1003,7 @@ function testEngineeringFrameworkAllowsProjectFactsButRejectsDuplicateWorkflow()
986
1003
  const migrationResult = JSON.parse(migration.stdout).results[0];
987
1004
  assert(migrationResult.managedWorkflow.state === "stale", "known duplicate sections should use controlled migration");
988
1005
  assert(migrationResult.managedWorkflow.migrations.includes("engineering-section-delivery-flow"), "known section migration should be explicit");
989
- assert(migrationResult.actions.some(item => item.action === "would-archive" && item.path.includes("ENGINEERING.pre-4.1.4")), "controlled section cleanup should archive the previous ENGINEERING file");
1006
+ assert(migrationResult.actions.some(item => item.action === "would-archive" && item.path.includes("ENGINEERING.pre-4.1.7")), "controlled section cleanup should archive the previous ENGINEERING file");
990
1007
  run("node", [cli, "sync", "--projects", repo]);
991
1008
  assert(!fs.readFileSync(engineering, "utf8").includes("Known obsolete workflow"), "known duplicate workflow section should be removed");
992
1009
 
@@ -998,18 +1015,23 @@ function testEngineeringFrameworkAllowsProjectFactsButRejectsDuplicateWorkflow()
998
1015
  }
999
1016
 
1000
1017
  function testReleaseVersionMarkersStayInSync() {
1001
- const expected = "4.1.4";
1018
+ const expected = "4.1.7";
1002
1019
  const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"));
1003
1020
  const lock = JSON.parse(fs.readFileSync(path.join(repoRoot, "package-lock.json"), "utf8"));
1004
1021
  const policy = JSON.parse(fs.readFileSync(
1005
1022
  path.join(repoRoot, "src", "auto-coding-skill", "data", "policies", "workflow-migrations-v1.json"),
1006
1023
  "utf8",
1007
1024
  ));
1008
- assert(pkg.version === expected, "package version must match the 4.1.4 release");
1025
+ assert(pkg.version === expected, "package version must match the 4.1.7 release");
1009
1026
  assert(lock.version === expected && lock.packages[""].version === expected, "package-lock versions must match");
1010
1027
  assert(policy.managed_versions.engineering === expected && policy.managed_versions.agents === expected, "managed workflow versions must match");
1011
1028
  const publishWorkflow = fs.readFileSync(path.join(repoRoot, ".github", "workflows", "npm-publish.yml"), "utf8");
1029
+ const runtimeRequirements = fs.readFileSync(path.join(repoRoot, "src", "auto-coding-skill", "requirements.txt"), "utf8");
1012
1030
  assert(publishWorkflow.includes("tags:\n - \"v*\""), "npm publish must run from version tag pushes");
1031
+ assert(publishWorkflow.includes("actions/setup-python@v6") && publishWorkflow.includes("src/auto-coding-skill/requirements.txt"), "npm publish must install the pinned Python runtime before verification");
1032
+ assert(publishWorkflow.includes("NPM_TOKEN_AVAILABLE") && publishWorkflow.includes("Require external publication"), "npm publish must support local-token publication when no GitHub secret exists");
1033
+ assert(runtimeRequirements.trim() === "PyYAML==6.0.3", "the runtime must have one pinned third-party dependency");
1034
+ assert(!runtimeRequirements.toLowerCase().includes("requests"), "HTTP checks must stay on the Python standard library");
1013
1035
  assert(publishWorkflow.includes("Verify release identity"), "npm publish must bind the tag to package version");
1014
1036
  assert(publishWorkflow.includes("Check npm registry") && publishWorkflow.includes("Verify npm publication"), "npm publish must be idempotent and registry-verified");
1015
1037
  for (const rel of [
@@ -1034,6 +1056,7 @@ function testProtocolResponsibilitiesStaySeparated() {
1034
1056
  }
1035
1057
 
1036
1058
  testPreflightAvoidsPartialInstall();
1059
+ testInitRejectsMissingPythonRuntimeBeforeWrites();
1037
1060
  testDestVariants();
1038
1061
  testLauncherFallsBackToGlobalRuntime();
1039
1062
  testMinimalSyncConvergesWithinBudget();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvis1513/auto-coding-skill",
3
- "version": "4.1.4",
3
+ "version": "4.1.7",
4
4
  "description": "CLI installer for a delivery-first .agents workflow with adaptive Git isolation, routed changed-scope validation, risk-based review, push completion, and safe cleanup.",
5
5
  "type": "module",
6
6
  "bin": {