@elvis1513/auto-coding-skill 4.2.4 → 4.2.5

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,6 +9,7 @@ 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.2.5 keeps JSX self-closing and closing-tag slashes out of regex state.
12
13
  Version 4.2.4 fixes TypeScript function-body detection after an explicit return
13
14
  type. Version 4.2.3 restores an explicit opt-in strict size-warning policy without
14
15
  changing the default, makes semicolon-terminated Java/Kotlin imports visible to
@@ -290,6 +291,12 @@ model overrides, complete project `risk.rules`, supported project/access/
290
291
  concurrency/route/structure values, and an existing project-owned structure
291
292
  standard byte-for-byte. Removed content is archived outside active docs.
292
293
 
294
+ ## What changed in 4.2.5
295
+
296
+ - Prevented standalone JSX `/>` and closing-tag `</...>` slashes from starting a
297
+ JavaScript regex token during function-range scans. GeeStack now matches its
298
+ TypeScript AST size baseline, and XJMate strict full structure passes cleanly.
299
+
293
300
  ## What changed in 4.2.4
294
301
 
295
302
  - Fixed TypeScript/TSX named and arrow function ranges across generic constraints,
@@ -1 +1 @@
1
- {"schema_version":1,"skill_version":"4.2.4","manifest_path":".agents/managed-install.json","entries":[{"path":".agents/agents/browser-debugger.toml","source":"agents/browser-debugger.toml","ownership":"normalized-agent","sha256":"40727952944917eb0b573bb96dca2906c27bc794737f3b6b392b56df7b4208aa","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/agents/docs-researcher.toml","source":"agents/docs-researcher.toml","ownership":"normalized-agent","sha256":"aa1fed6a6a1cde282fc152c7a88b8e097a6c53bcf447d35978607d594e3cb3e4","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/agents/explorer.toml","source":"agents/explorer.toml","ownership":"normalized-agent","sha256":"4cd89888acf7c0c04fbbcd0b9a0f346c6efed42fb723ec2037af9331a84a1cac","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/agents/fixer.toml","source":"agents/fixer.toml","ownership":"normalized-agent","sha256":"7bc00a45b9d1bcc90b8b0f06d773556eba1d52effff664472c3cb81073f6abfb","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/agents/reviewer.toml","source":"agents/reviewer.toml","ownership":"normalized-agent","sha256":"d68c472fab6aef7679330798d753b3c495515545522b6f0a54cabccc0f523c39","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/SKILL.md","source":"skill/SKILL.md","ownership":"exact","sha256":"f4c5a340bf3387700385959848dbfa2cc4d90d1312f330d11b0cedc307426eb5","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/data/contracts/orchestration-v1.schema.json","source":"skill/data/contracts/orchestration-v1.schema.json","ownership":"exact","sha256":"0e8d5ebb06b47414be1218a1fc93cdbba94a7300fc7ba1c0e12d9c1ca60aeb43","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/data/policies/workflow-migrations-v1.json","source":"skill/data/policies/workflow-migrations-v1.json","ownership":"exact","sha256":"90472b2aacb36de4af2ba0b6e4802e3ffd1c21afacdb3bcef33fed874964ecd3","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/data/templates/ENGINEERING.md","source":"skill/data/templates/ENGINEERING.md","ownership":"exact","sha256":"b316217a4fa83f10dc53756acd99c250cb53c87ce90780f01c5840e313683dc4","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/data/templates/bridges/AGENTS.md","source":"skill/data/templates/bridges/AGENTS.md","ownership":"exact","sha256":"7b2709d5b64cc13df6a3077217a58145243e4702754a927197343f8f2b9c2d59","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/data/templates/tools/ap.py","source":"skill/data/templates/tools/ap.py","ownership":"exact","sha256":"c352fbf2cbcb9692a34fd952d8541b1cbe6d475c6e11e64500a1f6b5283a00be","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/requirements.txt","source":"skill/requirements.txt","ownership":"exact","sha256":"0969da99a0bc2a1b71ed50584560f4588a37567ac63af3ddbaf3c4617ca5621a","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/scripts/ap.py","source":"skill/scripts/ap.py","ownership":"exact","sha256":"3636f84a9b29b5ab8f5db43607d3505d45ae87021a4e206d5488fda1947467bd","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/scripts/core.py","source":"skill/scripts/core.py","ownership":"exact","sha256":"640c37e8b274d90d6b7765d4243e054360d5a5a85b3150fbfe6449527c1cd28f","executable":true,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/scripts/http_checks.py","source":"skill/scripts/http_checks.py","ownership":"exact","sha256":"5620e187a0129f135621425a84b3a4e8f31137263c7e549a36a801fc36ff54ea","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/scripts/install_integrity.py","source":"skill/scripts/install_integrity.py","ownership":"exact","sha256":"a9ca7bd67893bbd2d7b35ece30a40457f0cbcb9ae01580cfc5daca2cd96fd676","executable":false,"scope":"shared","version":"4.2.4"},{"path":".agents/skills/auto-coding-skill/scripts/scaffold_templates.py","source":"skill/scripts/scaffold_templates.py","ownership":"exact","sha256":"6f0ee92eff2d5db9627a64b332738c9c917a93cc559d5bbacf771c5966215821","executable":false,"scope":"shared","version":"4.2.4"},{"path":"AGENTS.md","source":"skill/data/templates/bridges/AGENTS.md","ownership":"exact","sha256":"7b2709d5b64cc13df6a3077217a58145243e4702754a927197343f8f2b9c2d59","executable":false,"scope":"project","version":"4.2.4"},{"path":"docs/ENGINEERING.md","source":"skill/data/templates/ENGINEERING.md#managed-workflow","ownership":"managed-workflow","sha256":"83aa173407bd3096a3f7d1d861dc7dedeb17d322d1889ef18ee2da841a2c1e6c","executable":false,"scope":"project","version":"4.2.4"},{"path":"docs/architecture/adr/_TEMPLATE-ADR.md","source":"generated:scaffold_templates:docs/architecture/adr/_TEMPLATE-ADR.md","ownership":"exact","sha256":"88c89065ae0f8555412dbe096c05342152efc7becae8d8981e6442cdfee8e672","executable":false,"scope":"project","version":"4.2.4"},{"path":"docs/deployment/deploy-records/_TEMPLATE-DEPLOY-RECORD.md","source":"generated:scaffold_templates:docs/deployment/deploy-records/_TEMPLATE-DEPLOY-RECORD.md","ownership":"exact","sha256":"f2c17c0febc322b0ad50fb9d6f7e64e6c0cfb15c8a3e445a99da40f0a0dd1901","executable":false,"scope":"project","version":"4.2.4"},{"path":"docs/design/_TEMPLATE-DD.md","source":"generated:scaffold_templates:docs/design/_TEMPLATE-DD.md","ownership":"exact","sha256":"6ca022d127bfff68521f466b60bace4f1206baf0913daa855b9f751e74198db3","executable":false,"scope":"project","version":"4.2.4"},{"path":"docs/reviews/_TEMPLATE-REVIEW.md","source":"generated:scaffold_templates:docs/reviews/_TEMPLATE-REVIEW.md","ownership":"exact","sha256":"134f0d1bd3c7a317ef3cf4c2aea9f0539f3d53dccd5bcdabf6915b3629ef8802","executable":false,"scope":"project","version":"4.2.4"},{"path":"docs/tools/autopipeline/ap.py","source":"skill/data/templates/tools/ap.py","ownership":"exact","sha256":"c352fbf2cbcb9692a34fd952d8541b1cbe6d475c6e11e64500a1f6b5283a00be","executable":false,"scope":"project","version":"4.2.4"}],"managed_namespaces":[{"path":".agents/skills/auto-coding-skill","scope":"shared"},{"path":"docs/tools/autopipeline","scope":"project"}],"preserved":[".agents/archive/**",".agents/agents/* (except paths listed in entries)","docs/project/**","docs/architecture/structure-standard.md","docs/architecture/adr/[0-9]*.md","docs/design/*.md","docs/interfaces/*.md","docs/deployment/deploy-records/*.md","docs/reviews/*.md"]}
1
+ {"schema_version":1,"skill_version":"4.2.5","manifest_path":".agents/managed-install.json","entries":[{"path":".agents/agents/browser-debugger.toml","source":"agents/browser-debugger.toml","ownership":"normalized-agent","sha256":"40727952944917eb0b573bb96dca2906c27bc794737f3b6b392b56df7b4208aa","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/agents/docs-researcher.toml","source":"agents/docs-researcher.toml","ownership":"normalized-agent","sha256":"aa1fed6a6a1cde282fc152c7a88b8e097a6c53bcf447d35978607d594e3cb3e4","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/agents/explorer.toml","source":"agents/explorer.toml","ownership":"normalized-agent","sha256":"4cd89888acf7c0c04fbbcd0b9a0f346c6efed42fb723ec2037af9331a84a1cac","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/agents/fixer.toml","source":"agents/fixer.toml","ownership":"normalized-agent","sha256":"7bc00a45b9d1bcc90b8b0f06d773556eba1d52effff664472c3cb81073f6abfb","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/agents/reviewer.toml","source":"agents/reviewer.toml","ownership":"normalized-agent","sha256":"d68c472fab6aef7679330798d753b3c495515545522b6f0a54cabccc0f523c39","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/SKILL.md","source":"skill/SKILL.md","ownership":"exact","sha256":"f4c5a340bf3387700385959848dbfa2cc4d90d1312f330d11b0cedc307426eb5","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/data/contracts/orchestration-v1.schema.json","source":"skill/data/contracts/orchestration-v1.schema.json","ownership":"exact","sha256":"0e8d5ebb06b47414be1218a1fc93cdbba94a7300fc7ba1c0e12d9c1ca60aeb43","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/data/policies/workflow-migrations-v1.json","source":"skill/data/policies/workflow-migrations-v1.json","ownership":"exact","sha256":"2e312960a4778de96753590dbf6b910f505280fb418d86fc3e1d0b64b4ba1367","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/data/templates/ENGINEERING.md","source":"skill/data/templates/ENGINEERING.md","ownership":"exact","sha256":"3f1aa5c89af4faa8738a3b348b3c977e4a5ce9084a0f526b8741d415c8518034","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/data/templates/bridges/AGENTS.md","source":"skill/data/templates/bridges/AGENTS.md","ownership":"exact","sha256":"cfff9ef1e2575dfcd9701565240e9c59399ce67feb7a3c0902aee6dea25649b0","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/data/templates/tools/ap.py","source":"skill/data/templates/tools/ap.py","ownership":"exact","sha256":"c352fbf2cbcb9692a34fd952d8541b1cbe6d475c6e11e64500a1f6b5283a00be","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/requirements.txt","source":"skill/requirements.txt","ownership":"exact","sha256":"0969da99a0bc2a1b71ed50584560f4588a37567ac63af3ddbaf3c4617ca5621a","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/scripts/ap.py","source":"skill/scripts/ap.py","ownership":"exact","sha256":"7888829396f649e5eab4a81ede25be4e272e5947eb891f98f662286b53724076","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/scripts/core.py","source":"skill/scripts/core.py","ownership":"exact","sha256":"640c37e8b274d90d6b7765d4243e054360d5a5a85b3150fbfe6449527c1cd28f","executable":true,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/scripts/http_checks.py","source":"skill/scripts/http_checks.py","ownership":"exact","sha256":"5620e187a0129f135621425a84b3a4e8f31137263c7e549a36a801fc36ff54ea","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/scripts/install_integrity.py","source":"skill/scripts/install_integrity.py","ownership":"exact","sha256":"a9ca7bd67893bbd2d7b35ece30a40457f0cbcb9ae01580cfc5daca2cd96fd676","executable":false,"scope":"shared","version":"4.2.5"},{"path":".agents/skills/auto-coding-skill/scripts/scaffold_templates.py","source":"skill/scripts/scaffold_templates.py","ownership":"exact","sha256":"6f0ee92eff2d5db9627a64b332738c9c917a93cc559d5bbacf771c5966215821","executable":false,"scope":"shared","version":"4.2.5"},{"path":"AGENTS.md","source":"skill/data/templates/bridges/AGENTS.md","ownership":"exact","sha256":"cfff9ef1e2575dfcd9701565240e9c59399ce67feb7a3c0902aee6dea25649b0","executable":false,"scope":"project","version":"4.2.5"},{"path":"docs/ENGINEERING.md","source":"skill/data/templates/ENGINEERING.md#managed-workflow","ownership":"managed-workflow","sha256":"7b88b6a5283fc2f5755933e182e0e80a1d72e13be13d16b417a75503ee1a9720","executable":false,"scope":"project","version":"4.2.5"},{"path":"docs/architecture/adr/_TEMPLATE-ADR.md","source":"generated:scaffold_templates:docs/architecture/adr/_TEMPLATE-ADR.md","ownership":"exact","sha256":"88c89065ae0f8555412dbe096c05342152efc7becae8d8981e6442cdfee8e672","executable":false,"scope":"project","version":"4.2.5"},{"path":"docs/deployment/deploy-records/_TEMPLATE-DEPLOY-RECORD.md","source":"generated:scaffold_templates:docs/deployment/deploy-records/_TEMPLATE-DEPLOY-RECORD.md","ownership":"exact","sha256":"f2c17c0febc322b0ad50fb9d6f7e64e6c0cfb15c8a3e445a99da40f0a0dd1901","executable":false,"scope":"project","version":"4.2.5"},{"path":"docs/design/_TEMPLATE-DD.md","source":"generated:scaffold_templates:docs/design/_TEMPLATE-DD.md","ownership":"exact","sha256":"6ca022d127bfff68521f466b60bace4f1206baf0913daa855b9f751e74198db3","executable":false,"scope":"project","version":"4.2.5"},{"path":"docs/reviews/_TEMPLATE-REVIEW.md","source":"generated:scaffold_templates:docs/reviews/_TEMPLATE-REVIEW.md","ownership":"exact","sha256":"134f0d1bd3c7a317ef3cf4c2aea9f0539f3d53dccd5bcdabf6915b3629ef8802","executable":false,"scope":"project","version":"4.2.5"},{"path":"docs/tools/autopipeline/ap.py","source":"skill/data/templates/tools/ap.py","ownership":"exact","sha256":"c352fbf2cbcb9692a34fd952d8541b1cbe6d475c6e11e64500a1f6b5283a00be","executable":false,"scope":"project","version":"4.2.5"}],"managed_namespaces":[{"path":".agents/skills/auto-coding-skill","scope":"shared"},{"path":"docs/tools/autopipeline","scope":"project"}],"preserved":[".agents/archive/**",".agents/agents/* (except paths listed in entries)","docs/project/**","docs/architecture/structure-standard.md","docs/architecture/adr/[0-9]*.md","docs/design/*.md","docs/interfaces/*.md","docs/deployment/deploy-records/*.md","docs/reviews/*.md"]}
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "managed_versions": {
4
- "agents": "4.2.4",
5
- "engineering": "4.2.4"
4
+ "agents": "4.2.5",
5
+ "engineering": "4.2.5"
6
6
  },
7
7
  "known_official_agents_sha256": [
8
8
  "ebaaadab60327b3a4852948443d7191a4d48cb00bf4910038ab78c9149089373"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  workflow:
3
- skill_version: "4.2.4"
3
+ skill_version: "4.2.5"
4
4
  mode: "dev"
5
5
  profile: "auto"
6
6
  completion: "push"
@@ -83,7 +83,7 @@ docs:
83
83
  api_change_log: "docs/interfaces/api-change-log.md"
84
84
  ---
85
85
  # Engineering Configuration and Project Facts
86
- <!-- auto-coding-skill:managed-workflow:start version=4.2.4 -->
86
+ <!-- auto-coding-skill:managed-workflow:start version=4.2.5 -->
87
87
  Root `AGENTS.md` is the single shared behavioral protocol. The installed
88
88
  `SKILL.md` contains invocation guidance. This file is the exact-schema source for
89
89
  project workflow configuration and access values that neither file can infer.
@@ -1,4 +1,4 @@
1
- <!-- auto-coding-skill:managed-agents:start version=4.2.4 -->
1
+ <!-- auto-coding-skill:managed-agents:start version=4.2.5 -->
2
2
  # Shared Engineering Protocol
3
3
 
4
4
  This file is fully managed by `auto-coding-skill`. Keep project-specific facts,
@@ -85,7 +85,7 @@ _FINAL_GATE_CACHE_ALGORITHM = "final-gate-v1"
85
85
  _WORKFLOW_MIGRATION_POLICY = Path("data/policies/workflow-migrations-v1.json")
86
86
  _FALLBACK_WORKFLOW_MIGRATION_POLICY = {
87
87
  "schema_version": 1,
88
- "managed_versions": {"agents": "4.2.4", "engineering": "4.2.4"},
88
+ "managed_versions": {"agents": "4.2.5", "engineering": "4.2.5"},
89
89
  "known_official_engineering_body_sha256": [
90
90
  "d1306cc626e8baf8c83c953b760fd771066de2bf125168eca3a7b7d6ff2b87a2",
91
91
  "305931c6edef770033a4f1970b00e5fb1c1728351856a173dbfa497daf563021",
@@ -1148,8 +1148,8 @@ def _migrate_fast_development_defaults(cfg: dict, repo: Path) -> list[str]:
1148
1148
  if _text(workflow_cfg.get("completion")).lower() != "push":
1149
1149
  workflow_cfg["completion"] = "push"
1150
1150
  changed.append("workflow.completion")
1151
- if _text(workflow_cfg.get("skill_version")) != "4.2.4":
1152
- workflow_cfg["skill_version"] = "4.2.4"
1151
+ if _text(workflow_cfg.get("skill_version")) != "4.2.5":
1152
+ workflow_cfg["skill_version"] = "4.2.5"
1153
1153
  changed.append("workflow.skill_version")
1154
1154
 
1155
1155
  commands_cfg = cfg.setdefault("commands", {})
@@ -1462,16 +1462,16 @@ def cmd_upgrade(args: argparse.Namespace) -> None:
1462
1462
  if current_agents:
1463
1463
  archive_dir = repo / "docs" / "archive" / "workflow"
1464
1464
  archive_header = (
1465
- "# Archived AGENTS.md before auto-coding-skill 4.2.4\n\n"
1465
+ "# Archived AGENTS.md before auto-coding-skill 4.2.5\n\n"
1466
1466
  "This file is historical and non-authoritative. The root AGENTS.md is fully managed.\n"
1467
1467
  "Move any still-current project facts into docs/ENGINEERING.md or docs/project/,\n"
1468
1468
  "without copying workflow rules back into the root AGENTS.md.\n\n---\n\n"
1469
1469
  )
1470
1470
  archive_content = archive_header + current_agents
1471
- archive = archive_dir / "AGENTS.pre-4.2.4.md"
1471
+ archive = archive_dir / "AGENTS.pre-4.2.5.md"
1472
1472
  if archive.exists() and archive.read_text(encoding="utf-8") != archive_content:
1473
1473
  digest = hashlib.sha256(current_agents.encode("utf-8")).hexdigest()[:12]
1474
- archive = archive_dir / f"AGENTS.pre-4.2.4-{digest}.md"
1474
+ archive = archive_dir / f"AGENTS.pre-4.2.5-{digest}.md"
1475
1475
  if not archive.exists():
1476
1476
  add_action("policy", archive, "archive", "historical and non-authoritative")
1477
1477
  if write:
@@ -4370,13 +4370,138 @@ def _ensure_structure_deadline(deadline: Optional[float]) -> None:
4370
4370
  raise APError("Final changed-scope gate timed out during structure check.")
4371
4371
 
4372
4372
 
4373
+ _JSX_TAG_RE = re.compile(r"</?>|</?[A-Za-z_$][A-Za-z0-9_.$:-]*(?:\s[^<>]*?)?/?>")
4374
+ _JSX_NONCODE_RE = re.compile(
4375
+ r'''"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`|//.*|/\*.*?\*/'''
4376
+ )
4377
+
4378
+
4379
+ def _mask_jsx_noncode(text: str) -> str:
4380
+ masked = list(_JSX_NONCODE_RE.sub(lambda match: " " * len(match.group(0)), text))
4381
+ for index, char in enumerate(masked):
4382
+ if char != "/":
4383
+ continue
4384
+ prefix = "".join(masked[:index]).rstrip()
4385
+ regex_context = prefix.endswith(("=", "(", "[", "{", ",", ":", ";", "!", "?")) or bool(
4386
+ re.search(r"\b(?:return|case|throw|yield)\s*$", prefix)
4387
+ )
4388
+ if not regex_context:
4389
+ continue
4390
+ terminator = _regex_line_terminator(text, index)
4391
+ if terminator is None:
4392
+ continue
4393
+ suffix = terminator + 1
4394
+ while suffix < len(text) and text[suffix] in "dgimsuvy":
4395
+ suffix += 1
4396
+ masked[index:suffix] = " " * (suffix - index)
4397
+ return "".join(masked)
4398
+
4399
+
4400
+ def _jsx_prefix_has_open_tag(text: str) -> bool:
4401
+ masked = _mask_jsx_noncode(text)
4402
+ depth = 0
4403
+ expression_depth = 0
4404
+ cursor = 0
4405
+ for match in _JSX_TAG_RE.finditer(masked):
4406
+ for char in masked[cursor:match.start()]:
4407
+ if depth <= 0:
4408
+ continue
4409
+ if char == "{":
4410
+ expression_depth += 1
4411
+ elif char == "}" and expression_depth > 0:
4412
+ expression_depth -= 1
4413
+ token = match.group(0)
4414
+ if token.startswith("</"):
4415
+ depth = max(0, depth - 1)
4416
+ elif token != "</>" and not token.endswith("/>"):
4417
+ previous = masked[:match.start()].rstrip()
4418
+ following = masked[match.end():].lstrip()
4419
+ if (
4420
+ previous
4421
+ and (previous[-1].isalnum() or previous[-1] in {"_", "$"})
4422
+ and (
4423
+ depth == 0
4424
+ or expression_depth > 0
4425
+ or following.startswith(("(", ".", "?."))
4426
+ )
4427
+ ):
4428
+ cursor = match.end()
4429
+ continue
4430
+ depth += 1
4431
+ if depth == 0:
4432
+ expression_depth = 0
4433
+ cursor = match.end()
4434
+ return depth > 0
4435
+
4436
+
4437
+ def _regex_line_terminator(line: str, index: int) -> Optional[int]:
4438
+ escaped = False
4439
+ char_class = False
4440
+ for char_index in range(index + 1, len(line)):
4441
+ char = line[char_index]
4442
+ if escaped:
4443
+ escaped = False
4444
+ elif char == "\\":
4445
+ escaped = True
4446
+ elif char == "[":
4447
+ char_class = True
4448
+ elif char == "]":
4449
+ char_class = False
4450
+ elif char == "/" and not char_class:
4451
+ suffix_index = char_index + 1
4452
+ while suffix_index < len(line) and line[suffix_index] in "dgimsuvy":
4453
+ suffix_index += 1
4454
+ if suffix_index < len(line) and (
4455
+ line[suffix_index].isalnum() or line[suffix_index] in {"_", "$"}
4456
+ ):
4457
+ return None
4458
+ token_index = suffix_index
4459
+ while token_index < len(line) and line[token_index].isspace():
4460
+ token_index += 1
4461
+ if token_index < len(line) and (
4462
+ line[token_index].isalnum() or line[token_index] in {"_", "$"}
4463
+ ):
4464
+ token = re.match(r"[A-Za-z_$][A-Za-z0-9_$]*", line[token_index:])
4465
+ if token is None or token.group(0) not in {"as", "in", "instanceof", "satisfies"}:
4466
+ return None
4467
+ return char_index
4468
+ return None
4469
+
4470
+
4373
4471
  def _looks_like_regex_start(line: str, index: int) -> bool:
4374
4472
  prefix = line[:index].rstrip()
4375
- if not prefix:
4376
- return True
4377
- if prefix.endswith(("=", "(", "[", "{", ",", ":", ";", "!", "?", "=>")):
4473
+ next_char = line[index + 1] if index + 1 < len(line) else ""
4474
+ terminator = _regex_line_terminator(line, index)
4475
+ if terminator is None:
4476
+ return False
4477
+ closing_tag = re.match(r"/[A-Za-z_$][A-Za-z0-9_.$:-]*\s*>", line[index:])
4478
+ keyword_context = bool(re.search(r"\b(?:return|case|throw|yield)\s*$", prefix))
4479
+ operator_context = prefix.endswith(("=", "(", "[", "{", ",", ":", ";", "!", "?", "<", ">", "=>"))
4480
+ if prefix.endswith("<") and closing_tag:
4481
+ before_less_than = prefix[:-1].rstrip()
4482
+ operand_context = bool(re.search(r"(?:[A-Za-z0-9_$\]\)}'\"`]|\+\+|--)$", before_less_than))
4483
+ tag_end = index + closing_tag.end()
4484
+ between = line[tag_end:terminator]
4485
+ terminator_next = line[terminator + 1] if terminator + 1 < len(line) else ""
4486
+ if (
4487
+ _jsx_prefix_has_open_tag(before_less_than)
4488
+ or not operand_context
4489
+ or (between and not between.strip())
4490
+ or terminator_next in {"/", "*"}
4491
+ ):
4492
+ return False
4493
+ if next_char == ">":
4494
+ if not prefix:
4495
+ return False
4496
+ if prefix.endswith("<"):
4497
+ before_less_than = prefix[:-1].rstrip()
4498
+ if not re.search(r"(?:[A-Za-z0-9_$\]\)}'\"`]|\+\+|--)$", before_less_than):
4499
+ return False
4500
+ elif not (operator_context or keyword_context):
4501
+ return False
4502
+ if not prefix or operator_context:
4378
4503
  return True
4379
- return bool(re.search(r"\b(?:return|case|throw|yield)\s*$", prefix))
4504
+ return keyword_context
4380
4505
 
4381
4506
 
4382
4507
  def _python_function_end(
@@ -4812,9 +4937,6 @@ _EXPRESSION_CONTINUATION_SUFFIXES = (
4812
4937
  _EXPRESSION_CONTINUATION_PREFIXES = (
4813
4938
  ".", "?.", "+", "-", "*", "/", "%", "&&", "||", "??", "?", ":", ",",
4814
4939
  )
4815
- _JSX_TAG_RE = re.compile(r"</?>|</?[A-Za-z][A-Za-z0-9_.:-]*(?:\s[^<>]*?)?/?>")
4816
-
4817
-
4818
4940
  def _expression_arrow_end(
4819
4941
  lines: list[str],
4820
4942
  start: int,
@@ -4880,7 +5002,16 @@ def _expression_arrow_end(
4880
5002
  state = "block_comment"
4881
5003
  char_index += 2
4882
5004
  continue
4883
- if char == "/" and _looks_like_regex_start(line, char_index):
5005
+ jsx_token_slash = (
5006
+ suffix in {".jsx", ".tsx"}
5007
+ and jsx_mode
5008
+ and brace_depth == 0
5009
+ and (
5010
+ next_char == ">"
5011
+ or (char_index > 0 and line[char_index - 1] == "<")
5012
+ )
5013
+ )
5014
+ if char == "/" and not jsx_token_slash and _looks_like_regex_start(line, char_index):
4884
5015
  state = "regex"
4885
5016
  regex_char_class = False
4886
5017
  escaped = False
@@ -1911,6 +1911,72 @@ class AutoCodingProfileTests(unittest.TestCase):
1911
1911
  1,
1912
1912
  5,
1913
1913
  ),
1914
+ (
1915
+ "self-closing-jsx.tsx",
1916
+ [
1917
+ "function CompactView({ value }: { value: string }) {",
1918
+ " return (",
1919
+ " <section>",
1920
+ " <Widget",
1921
+ " value={value}",
1922
+ " />",
1923
+ ' <span title="login/payment">{value}</span>',
1924
+ " </section>",
1925
+ " );",
1926
+ "}",
1927
+ "const after = 1;",
1928
+ ],
1929
+ 1,
1930
+ 10,
1931
+ ),
1932
+ (
1933
+ "self-closing-expression-jsx.tsx",
1934
+ [
1935
+ "const CompactIcon = () => (",
1936
+ " <svg>",
1937
+ " <path",
1938
+ " d=\"M0 0\"",
1939
+ " />",
1940
+ ' <text aria-label="login/payment">ok</text>',
1941
+ " </svg>",
1942
+ ");",
1943
+ "const after = 1;",
1944
+ ],
1945
+ 1,
1946
+ 8,
1947
+ ),
1948
+ (
1949
+ "conditional-self-closing-jsx.tsx",
1950
+ [
1951
+ "function ConditionalView({ show }: { show: boolean }) {",
1952
+ " return (",
1953
+ " <section>",
1954
+ " {show && <Widget",
1955
+ ' value="ready"',
1956
+ " />}",
1957
+ " </section>",
1958
+ " );",
1959
+ "}",
1960
+ "const after = 1;",
1961
+ ],
1962
+ 1,
1963
+ 9,
1964
+ ),
1965
+ (
1966
+ "conditional-self-closing-expression.tsx",
1967
+ [
1968
+ "const ConditionalView = ({ show }: { show: boolean }) => (",
1969
+ " <section>",
1970
+ " {show && <Widget",
1971
+ ' value="ready"',
1972
+ " />}",
1973
+ " </section>",
1974
+ ");",
1975
+ "const after = 1;",
1976
+ ],
1977
+ 1,
1978
+ 7,
1979
+ ),
1914
1980
  ]
1915
1981
  trailing_top_level_lines = [f"top_level_{index} = {index}" for index in range(20)]
1916
1982
  for path, lines, start_line, expected_size in fixtures:
@@ -1971,6 +2037,207 @@ class AutoCodingProfileTests(unittest.TestCase):
1971
2037
  ]
1972
2038
  self.assertEqual(1, len(ap._function_size_warnings("regex.js", js_lines, 120)))
1973
2039
 
2040
+ regex_gt_lines = [
2041
+ "function block() {",
2042
+ " const matcher = />}/;",
2043
+ *[f" const value_{index} = {index};" for index in range(130)],
2044
+ "}",
2045
+ ]
2046
+ self.assertEqual(1, len(ap._function_size_warnings("regex-gt.js", regex_gt_lines, 120)))
2047
+ closing_tag_regex_lines = [
2048
+ "function block() {",
2049
+ " const matcher = /section>}/;",
2050
+ *[f" const value_{index} = {index};" for index in range(130)],
2051
+ "}",
2052
+ ]
2053
+ self.assertEqual(
2054
+ 1,
2055
+ len(ap._function_size_warnings("closing-tag-regex.js", closing_tag_regex_lines, 120)),
2056
+ )
2057
+ comparison_regex_lines = [
2058
+ "function block() {",
2059
+ ' const matched = value</section>}/.test("section>}");',
2060
+ *[f" const value_{index} = {index};" for index in range(130)],
2061
+ "}",
2062
+ ]
2063
+ self.assertEqual(
2064
+ 1,
2065
+ len(ap._function_size_warnings("comparison-regex.js", comparison_regex_lines, 120)),
2066
+ )
2067
+ semicolon_regex_lines = [
2068
+ "function block() {",
2069
+ r' const matched = value</section>;\}/.test("section>;} ");',
2070
+ *[f" const value_{index} = {index};" for index in range(130)],
2071
+ "}",
2072
+ ]
2073
+ self.assertEqual(
2074
+ 1,
2075
+ len(ap._function_size_warnings("semicolon-regex.js", semicolon_regex_lines, 120)),
2076
+ )
2077
+ for suffix_expression in ["/}/ as RegExp", "/}/ satisfies RegExp"]:
2078
+ ts_regex_lines = [
2079
+ "function block() {",
2080
+ f" const matcher = {suffix_expression};",
2081
+ *[f" const value_{index} = {index};" for index in range(130)],
2082
+ "}",
2083
+ ]
2084
+ with self.subTest(suffix_expression=suffix_expression):
2085
+ self.assertEqual(
2086
+ 1,
2087
+ len(ap._function_size_warnings("regex-suffix.ts", ts_regex_lines, 120)),
2088
+ )
2089
+ for prefix_expression in [
2090
+ 'const html = "<Tag>";',
2091
+ "const pattern = /<Tag>/;",
2092
+ "foo<Tag>();",
2093
+ "const typed: Box<Tag> | null = null;",
2094
+ "const cast = box as Box<Tag>;",
2095
+ "const first = <A></A>; const second = <B></B>;",
2096
+ ]:
2097
+ prefixed_regex_lines = [
2098
+ "function block() {",
2099
+ f" {prefix_expression} const matched = value</section>}}/.test(text);",
2100
+ *[f" const value_{index} = {index};" for index in range(130)],
2101
+ "}",
2102
+ ]
2103
+ with self.subTest(prefix_expression=prefix_expression):
2104
+ self.assertEqual(
2105
+ 1,
2106
+ len(ap._function_size_warnings("prefixed-regex.ts", prefixed_regex_lines, 120)),
2107
+ )
2108
+ for generic_comparison in [
2109
+ " const matched = (box as Box<Tag>).value</section>}/.test(text);",
2110
+ " const matched: boolean | Box<Tag> = value</section>}/.test(text);",
2111
+ " const matched = (<Outer>{foo<Tag>()}</Outer>) && value</section>}/.test(text);",
2112
+ " const matched = (<Outer>{(box as Box<Tag>).value}</Outer>) && value</section>}/.test(text);",
2113
+ " const matched = (<Outer>{show && <Tag>hello</Tag>}</Outer>) && value</section>}/.test(text);",
2114
+ " const matched = (<Outer>hello<Tag>world</Tag></Outer>) && value</section>}/.test(text);",
2115
+ ]:
2116
+ generic_regex_lines = [
2117
+ "function block() {",
2118
+ generic_comparison,
2119
+ *[f" const value_{index} = {index};" for index in range(130)],
2120
+ "}",
2121
+ ]
2122
+ with self.subTest(generic_comparison=generic_comparison):
2123
+ self.assertEqual(
2124
+ 1,
2125
+ len(ap._function_size_warnings("generic-regex.ts", generic_regex_lines, 120)),
2126
+ )
2127
+ comparison = "const matched = value</>}/.test(text);"
2128
+ self.assertTrue(ap._looks_like_regex_start(comparison, comparison.index("/")))
2129
+ named_comparison = "const matched = value</section>}/.test(text);"
2130
+ self.assertTrue(ap._looks_like_regex_start(named_comparison, named_comparison.index("/")))
2131
+ assigned = "const matcher = /section>}/;"
2132
+ self.assertTrue(ap._looks_like_regex_start(assigned, assigned.index("/")))
2133
+ returned = "return /foo>/;"
2134
+ self.assertTrue(ap._looks_like_regex_start(returned, returned.index("/")))
2135
+ self.assertFalse(ap._looks_like_regex_start(" />", 4))
2136
+ self.assertFalse(ap._looks_like_regex_start(" </section>", 5))
2137
+ self.assertFalse(ap._looks_like_regex_start(" </_Private>", 5))
2138
+ self.assertFalse(ap._looks_like_regex_start(" </$Component>", 5))
2139
+ self.assertFalse(ap._looks_like_regex_start(" />}", 4))
2140
+ self.assertFalse(ap._looks_like_regex_start(" /> : null}", 4))
2141
+ jsx_close_same_line = " />}</section>;"
2142
+ self.assertFalse(ap._looks_like_regex_start(jsx_close_same_line, 4))
2143
+
2144
+ jsx_block = [
2145
+ "function F() {",
2146
+ " return <section>",
2147
+ " {show && <Widget",
2148
+ " x={1}",
2149
+ " />}</section>;",
2150
+ *[f" const value_{index} = {index};" for index in range(130)],
2151
+ "}",
2152
+ ]
2153
+ self.assertEqual(1, len(ap._function_size_warnings("jsx-block.tsx", jsx_block, 120)))
2154
+
2155
+ jsx_expression = [
2156
+ "const F = () => (",
2157
+ " <section>",
2158
+ " {show && <Widget",
2159
+ " x={1}",
2160
+ " />}</section>",
2161
+ ");",
2162
+ "const after = 1;",
2163
+ ]
2164
+ arrow_location = ap._find_arrow_locations(jsx_expression, 0, None)[0]
2165
+ self.assertEqual(
2166
+ (6, False),
2167
+ ap._expression_arrow_end(jsx_expression, 0, arrow_location, 6, None, ".tsx"),
2168
+ )
2169
+ self.assertEqual([], ap._function_size_warnings("jsx-expression.tsx", jsx_expression, 6))
2170
+
2171
+ trailing_jsx_expressions = [
2172
+ ["const F = () => <Tag></Tag>; // comment", "const after = 1;"],
2173
+ ["const F = () => <Tag></Tag>; /* comment */", "const after = 1;"],
2174
+ ["const F = () => <Tag></Tag> / divisor;", "const after = 1;"],
2175
+ ["const F = () => <Tag>hello</Tag>/(divisor);", "const after = 1;"],
2176
+ ["const F = () => <></>; // comment", "const after = 1;"],
2177
+ [
2178
+ "const F = () => (",
2179
+ " <Widget",
2180
+ " value={1}",
2181
+ " />); // comment",
2182
+ "const after = 1;",
2183
+ ],
2184
+ ]
2185
+ for expression in trailing_jsx_expressions:
2186
+ with self.subTest(expression=expression):
2187
+ arrow_location = ap._find_arrow_locations(expression, 0, None)[0]
2188
+ expected_end = len(expression) - 1
2189
+ self.assertEqual(
2190
+ (expected_end, False),
2191
+ ap._expression_arrow_end(
2192
+ expression, 0, arrow_location, expected_end, None, ".tsx"
2193
+ ),
2194
+ )
2195
+ self.assertEqual(
2196
+ [],
2197
+ ap._function_size_warnings("trailing-jsx.tsx", expression, expected_end),
2198
+ )
2199
+
2200
+ multiline_jsx_text = [
2201
+ "const F = () => (",
2202
+ " <Tag>",
2203
+ " hello</Tag>/(divisor)",
2204
+ ");",
2205
+ "const after = 1;",
2206
+ ]
2207
+ arrow_location = ap._find_arrow_locations(multiline_jsx_text, 0, None)[0]
2208
+ self.assertEqual(
2209
+ (4, False),
2210
+ ap._expression_arrow_end(multiline_jsx_text, 0, arrow_location, 4, None, ".tsx"),
2211
+ )
2212
+ self.assertEqual([], ap._function_size_warnings("multiline-jsx.tsx", multiline_jsx_text, 4))
2213
+
2214
+ for jsx_expression_body in [
2215
+ ' {value</section>}/.test(text) ? "yes" : "no"}',
2216
+ ' {/>}/.test(text) ? "yes" : "no"}',
2217
+ ]:
2218
+ jsx_regex_expression = [
2219
+ "const F = () => <Tag>",
2220
+ jsx_expression_body,
2221
+ "</Tag>;",
2222
+ "const after = 1;",
2223
+ ]
2224
+ with self.subTest(jsx_expression_body=jsx_expression_body):
2225
+ arrow_location = ap._find_arrow_locations(jsx_regex_expression, 0, None)[0]
2226
+ self.assertEqual(
2227
+ (3, False),
2228
+ ap._expression_arrow_end(
2229
+ jsx_regex_expression, 0, arrow_location, 3, None, ".tsx"
2230
+ ),
2231
+ )
2232
+ self.assertEqual(
2233
+ 1,
2234
+ len(
2235
+ ap._function_size_warnings(
2236
+ "jsx-regex-expression.tsx", jsx_regex_expression, 2
2237
+ )
2238
+ ),
2239
+ )
2240
+
1974
2241
  separate_declarations = [
1975
2242
  'const label = "ready"',
1976
2243
  "const block = () => {",
@@ -314,7 +314,7 @@ function testInitFullyConvergesExistingProject() {
314
314
  }
315
315
  assert(exists(path.join(repo, ".agents", "agents", "custom.toml")), "project-owned custom agents must survive init");
316
316
  assert(!exists(path.join(repo, ".agents", "skills", "auto-coding-skill", "obsolete.txt")), "extra Skill files must be removed");
317
- assert(exists(path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.4", "docs", "legacy", "old-taskbook.md")), "removed docs must be archived outside active docs");
317
+ assert(exists(path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.5", "docs", "legacy", "old-taskbook.md")), "removed docs must be archived outside active docs");
318
318
  assert(fs.readFileSync(structureStandard, "utf8") === customStructureStandard, "init must preserve a project-owned structure standard");
319
319
  assert(fs.readFileSync(path.join(repo, "docs", "architecture", "adr", "0042-project-choice.md"), "utf8").includes("Keep me"), "numbered ADR artifacts must survive init");
320
320
  assert(fs.readFileSync(path.join(repo, "docs", "architecture", "system-context.md"), "utf8").includes("Keep me"), "architecture artifacts must survive init");
@@ -440,7 +440,7 @@ function testMinimalInitConvergesWithinBudget() {
440
440
  // Integrity, staging, fail-closed classification, contract helpers, and the
441
441
  // language-aware structure scanner are executable support code, not prompt
442
442
  // context. Keep a measured ceiling while leaving deterministic checks readable.
443
- assert(lines <= 14990, `minimal scaffold line budget exceeded: ${lines}`);
443
+ assert(lines <= 15120, `minimal scaffold line budget exceeded: ${lines}`);
444
444
  const engineering = fs.readFileSync(path.join(repo, "docs", "ENGINEERING.md"), "utf8");
445
445
  assert(engineering.includes("profile: auto"), "engineering should enable adaptive profiles");
446
446
  assert(engineering.includes("isolation: adaptive"), "engineering should default to adaptive clean-branch/worktree isolation");
@@ -979,7 +979,7 @@ function testManagedEngineeringInitIsAuthoritativeAndIdempotent() {
979
979
 
980
980
  const engineering = path.join(repo, "docs", "ENGINEERING.md");
981
981
  const initial = fs.readFileSync(engineering, "utf8");
982
- const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.2\.4 -->/;
982
+ const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.2\.5 -->/;
983
983
  const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
984
984
  assert(startPattern.test(initial), "new projects should include a versioned managed workflow marker");
985
985
  assert(initial.includes(endMarker), "new projects should include the managed workflow end marker");
@@ -993,21 +993,21 @@ function testManagedEngineeringInitIsAuthoritativeAndIdempotent() {
993
993
  const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
994
994
  const dryResult = JSON.parse(dryRun.stdout).results[0];
995
995
  assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
996
- assert(dryResult.managedWorkflow.version === "4.2.4", "dry-run should expose the target workflow version");
996
+ assert(dryResult.managedWorkflow.version === "4.2.5", "dry-run should expose the target workflow version");
997
997
  assert(dryResult.actions.some(item => item.action === "would-update" && item.path === "docs/ENGINEERING.md"), "dry-run should plan the managed body update");
998
998
  assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
999
999
 
1000
1000
  run("node", [cli, "init"], { cwd: repo });
1001
1001
  const updated = fs.readFileSync(engineering, "utf8");
1002
1002
  assert(!updated.includes("project note before") && !updated.includes("project note after"), "init must remove text outside the canonical ENGINEERING body");
1003
- assert(updated.includes("version=4.2.4"), "init should install the current managed workflow version");
1003
+ assert(updated.includes("version=4.2.5"), "init should install the current managed workflow version");
1004
1004
  assert(updated.includes("The frontmatter contract is:"), "init should refresh stale managed workflow content");
1005
1005
 
1006
1006
  fillRequiredAccess(repo);
1007
1007
  const status = run("node", [cli, "status", "--projects", repo, "--json"]);
1008
1008
  const statusResult = JSON.parse(status.stdout).results[0];
1009
1009
  assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
1010
- assert(statusResult.managedWorkflow.version === "4.2.4", "status should expose the installed managed workflow version");
1010
+ assert(statusResult.managedWorkflow.version === "4.2.5", "status should expose the installed managed workflow version");
1011
1011
 
1012
1012
  const beforeSecondInit = fs.readFileSync(engineering, "utf8");
1013
1013
  run("node", [cli, "init"], { cwd: repo });
@@ -1034,7 +1034,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
1034
1034
  assert(dryResult.actions.find(item => item.path === "docs/ENGINEERING.md")?.detail.includes("preserved-custom"), "custom legacy action should be labeled preserved-custom");
1035
1035
  run("node", [cli, "sync", "--projects", repo]);
1036
1036
  const migrated = fs.readFileSync(engineering, "utf8");
1037
- assert(migrated.includes("version=4.2.4"), "legacy migration should insert the current managed workflow");
1037
+ assert(migrated.includes("version=4.2.5"), "legacy migration should insert the current managed workflow");
1038
1038
  assert(migrated.includes(legacyNote), "legacy migration must preserve the complete existing body");
1039
1039
  const stable = fs.readFileSync(engineering, "utf8");
1040
1040
  run("node", [cli, "sync", "--projects", repo]);
@@ -1134,7 +1134,7 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
1134
1134
  run("node", [cli, "sync", "--projects", repo]);
1135
1135
  const agents = path.join(repo, "AGENTS.md");
1136
1136
  const initial = fs.readFileSync(agents, "utf8");
1137
- assert(initial.includes("managed-agents:start version=4.2.4"), "new projects should receive the versioned root AGENTS block");
1137
+ assert(initial.includes("managed-agents:start version=4.2.5"), "new projects should receive the versioned root AGENTS block");
1138
1138
 
1139
1139
  const custom = [
1140
1140
  "# Project rules",
@@ -1153,12 +1153,12 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
1153
1153
 
1154
1154
  run("node", [cli, "sync", "--projects", repo]);
1155
1155
  const migrated = fs.readFileSync(agents, "utf8");
1156
- assert(migrated.includes("managed-agents:start version=4.2.4"), "AGENTS migration should install the current managed block");
1156
+ assert(migrated.includes("managed-agents:start version=4.2.5"), "AGENTS migration should install the current managed block");
1157
1157
  assert(!migrated.includes("Preserve this repository-specific rule exactly."), "root AGENTS must contain no project-specific tail");
1158
1158
  assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
1159
1159
  const canonical = fs.readFileSync(path.join(repoRoot, "cli", "assets", "skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
1160
1160
  assert(migrated === canonical, "root AGENTS must be byte-identical to the packaged canonical file");
1161
- const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.2.4.md");
1161
+ const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.2.5.md");
1162
1162
  assert(fs.readFileSync(archive, "utf8").includes("Preserve this repository-specific rule exactly."), "previous AGENTS content must be archived once");
1163
1163
  const stable = fs.readFileSync(agents);
1164
1164
  run("node", [cli, "sync", "--projects", repo]);
@@ -1215,7 +1215,7 @@ function testEngineeringFrameworkRejectsAnyNonCanonicalWorkflowText() {
1215
1215
 
1216
1216
  run("node", [cli, "init"], { cwd: repo });
1217
1217
  assert(!fs.readFileSync(engineering, "utf8").includes("backend owns APIs"), "init must restore the canonical ENGINEERING body");
1218
- const archived = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.4", "docs", "ENGINEERING.md");
1218
+ const archived = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.5", "docs", "ENGINEERING.md");
1219
1219
  assert(fs.readFileSync(archived, "utf8").includes("backend owns APIs"), "removed project text should remain in non-authoritative history");
1220
1220
  }
1221
1221
 
@@ -1227,12 +1227,12 @@ function testManagedInstallIntegrityIsBoundedAndRepairable() {
1227
1227
 
1228
1228
  const manifestPath = path.join(repo, ".agents", "managed-install.json");
1229
1229
  const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
1230
- assert(manifest.schema_version === 1 && manifest.skill_version === "4.2.4", "installed manifest must identify the release");
1230
+ assert(manifest.schema_version === 1 && manifest.skill_version === "4.2.5", "installed manifest must identify the release");
1231
1231
  assert(manifest.entries.length > 0, "installed manifest must list managed files");
1232
1232
  for (const entry of manifest.entries) {
1233
1233
  assert(typeof entry.path === "string" && !path.isAbsolute(entry.path) && !entry.path.includes(".."), "manifest paths must be safe relative paths");
1234
1234
  assert(/^[0-9a-f]{64}$/.test(entry.sha256), `${entry.path}: manifest hash must be sha256`);
1235
- assert(entry.version === "4.2.4" && typeof entry.executable === "boolean", `${entry.path}: version/executable metadata missing`);
1235
+ assert(entry.version === "4.2.5" && typeof entry.executable === "boolean", `${entry.path}: version/executable metadata missing`);
1236
1236
  }
1237
1237
  assert(!manifest.managed_namespaces.some(item => item.path === ".agents" || item.path === "docs"), "manifest must not mirror entire project-owned trees");
1238
1238
 
@@ -1302,14 +1302,14 @@ function testManagedInstallIntegrityIsBoundedAndRepairable() {
1302
1302
  }
1303
1303
 
1304
1304
  function testReleaseVersionMarkersStayInSync() {
1305
- const expected = "4.2.4";
1305
+ const expected = "4.2.5";
1306
1306
  const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"));
1307
1307
  const lock = JSON.parse(fs.readFileSync(path.join(repoRoot, "package-lock.json"), "utf8"));
1308
1308
  const policy = JSON.parse(fs.readFileSync(
1309
1309
  path.join(repoRoot, "src", "auto-coding-skill", "data", "policies", "workflow-migrations-v1.json"),
1310
1310
  "utf8",
1311
1311
  ));
1312
- assert(pkg.version === expected, "package version must match the 4.2.4 release");
1312
+ assert(pkg.version === expected, "package version must match the 4.2.5 release");
1313
1313
  assert(lock.version === expected && lock.packages[""].version === expected, "package-lock versions must match");
1314
1314
  assert(policy.managed_versions.engineering === expected && policy.managed_versions.agents === expected, "managed workflow versions must match");
1315
1315
  const manifest = JSON.parse(fs.readFileSync(path.join(repoRoot, "cli", "assets", "managed-install.json"), "utf8"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvis1513/auto-coding-skill",
3
- "version": "4.2.4",
3
+ "version": "4.2.5",
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": {