@elvis1513/auto-coding-skill 4.1.0 → 4.1.1
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 +24 -6
- package/cli/assets/skill/SKILL.md +40 -123
- package/cli/assets/skill/data/contracts/orchestration-v1.schema.json +16 -1
- package/cli/assets/skill/data/policies/workflow-migrations-v1.json +2 -2
- package/cli/assets/skill/data/templates/ENGINEERING.md +38 -159
- package/cli/assets/skill/data/templates/bridges/AGENTS.md +98 -114
- package/cli/assets/skill/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/cli/assets/skill/scripts/__pycache__/scaffold_templates.cpython-314.pyc +0 -0
- package/cli/assets/skill/scripts/ap.py +192 -13
- package/cli/assets/skill/scripts/core.py +21 -5
- package/cli/src/index.js +20 -0
- package/cli/tests/ap_concurrency_test.py +15 -1
- package/cli/tests/ap_profiles_test.py +39 -3
- package/cli/tests/index.test.js +34 -18
- package/package.json +1 -1
package/cli/src/index.js
CHANGED
|
@@ -1083,6 +1083,8 @@ function projectStatus(project, assetSkill, assetAgents){
|
|
|
1083
1083
|
{ label: "concurrency.delete_remote_branch", path: ["concurrency", "delete_remote_branch"] },
|
|
1084
1084
|
{ label: "concurrency.disposable_ignored", path: ["concurrency", "disposable_ignored"] },
|
|
1085
1085
|
{ label: "validation.on_unmapped", path: ["validation", "on_unmapped"] },
|
|
1086
|
+
{ label: "validation.max_command_seconds", path: ["validation", "max_command_seconds"] },
|
|
1087
|
+
{ label: "validation.max_total_seconds", path: ["validation", "max_total_seconds"] },
|
|
1086
1088
|
{ label: "validation.routes", path: ["validation", "routes"], sequence: true },
|
|
1087
1089
|
{ label: "risk.rules", path: ["risk", "rules"] },
|
|
1088
1090
|
{ label: "docs.framework", path: ["docs", "framework"], filled: true },
|
|
@@ -1123,6 +1125,24 @@ function projectStatus(project, assetSkill, assetAgents){
|
|
|
1123
1125
|
if (isolationState.present && !["adaptive", "worktree"].includes(frontmatterScalarValue(isolationState.value).toLowerCase())) {
|
|
1124
1126
|
invalidConfigTokens.push("concurrency.isolation (must be adaptive or worktree)");
|
|
1125
1127
|
}
|
|
1128
|
+
for (const [pathParts, maximum] of [
|
|
1129
|
+
[["validation", "max_command_seconds"], 120],
|
|
1130
|
+
[["validation", "max_total_seconds"], 180],
|
|
1131
|
+
]) {
|
|
1132
|
+
const state = frontmatterPathState(text, pathParts);
|
|
1133
|
+
if (!state.present) continue;
|
|
1134
|
+
const value = Number(frontmatterScalarValue(state.value));
|
|
1135
|
+
if (!Number.isFinite(value) || value <= 0 || value > maximum) {
|
|
1136
|
+
invalidConfigTokens.push(`${pathParts.join(".")} (must be > 0 and <= ${maximum})`);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
const commandState = frontmatterPathState(text, ["validation", "max_command_seconds"]);
|
|
1140
|
+
const totalState = frontmatterPathState(text, ["validation", "max_total_seconds"]);
|
|
1141
|
+
const commandBudget = Number(frontmatterScalarValue(commandState.value));
|
|
1142
|
+
const totalBudget = Number(frontmatterScalarValue(totalState.value));
|
|
1143
|
+
if (commandState.present && totalState.present && Number.isFinite(commandBudget) && Number.isFinite(totalBudget) && commandBudget > totalBudget) {
|
|
1144
|
+
invalidConfigTokens.push("validation.max_command_seconds (cannot exceed max_total_seconds)");
|
|
1145
|
+
}
|
|
1126
1146
|
invalidConfigTokens.push(...legacyGateEscalationTokens(text));
|
|
1127
1147
|
}
|
|
1128
1148
|
const missingConfigTokens = [...missingConfigPaths, ...unfilledConfigTokens, ...invalidConfigTokens];
|
|
@@ -377,6 +377,19 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
|
|
|
377
377
|
def test_clean_serial_task_uses_direct_branch_and_no_diff_is_noop(self) -> None:
|
|
378
378
|
_, repo, remote = self.make_repo("adaptive", require_review=False)
|
|
379
379
|
worktrees_before = git_output(repo, "worktree", "list", "--porcelain")
|
|
380
|
+
unnecessary = self.ap(
|
|
381
|
+
repo,
|
|
382
|
+
"task-start",
|
|
383
|
+
"DIRECT-SKIP",
|
|
384
|
+
"--base",
|
|
385
|
+
"origin/dev",
|
|
386
|
+
"--owned-path",
|
|
387
|
+
"shared.txt",
|
|
388
|
+
check=False,
|
|
389
|
+
)
|
|
390
|
+
self.assertNotEqual(0, unnecessary.returncode)
|
|
391
|
+
self.assertIn("does not need a machine task lifecycle", unnecessary.stdout + unnecessary.stderr)
|
|
392
|
+
self.assertFalse(self.registry_manifest_path(repo, "DIRECT-SKIP").exists())
|
|
380
393
|
start = self.ap(
|
|
381
394
|
repo,
|
|
382
395
|
"task-start",
|
|
@@ -385,6 +398,7 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
|
|
|
385
398
|
"origin/dev",
|
|
386
399
|
"--owned-path",
|
|
387
400
|
"shared.txt",
|
|
401
|
+
"--force-lifecycle",
|
|
388
402
|
)
|
|
389
403
|
self.assertIn("execution_mode=direct", start.stdout)
|
|
390
404
|
self.assertEqual(worktrees_before, git_output(repo, "worktree", "list", "--porcelain"))
|
|
@@ -400,7 +414,7 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
|
|
|
400
414
|
self.assertFalse(self.registry_manifest_path(repo, "DIRECT-1").exists())
|
|
401
415
|
|
|
402
416
|
before = git_output(repo, "rev-parse", "HEAD")
|
|
403
|
-
self.ap(repo, "task-start", "DIRECT-NOOP", "--owned-path", "shared.txt")
|
|
417
|
+
self.ap(repo, "task-start", "DIRECT-NOOP", "--owned-path", "shared.txt", "--force-lifecycle")
|
|
404
418
|
noop = self.ap(repo, "commit-push", "DIRECT-NOOP", "--msg", "DIRECT-NOOP: none")
|
|
405
419
|
self.assertIn("NOOP", noop.stdout)
|
|
406
420
|
self.assertEqual(before, git_output(repo, "rev-parse", "HEAD"))
|
|
@@ -240,9 +240,8 @@ class AutoCodingProfileTests(unittest.TestCase):
|
|
|
240
240
|
self.assertNotIn("新增登录鉴权页面并发布", str(plan))
|
|
241
241
|
|
|
242
242
|
def test_ordinary_code_resolves_standard(self) -> None:
|
|
243
|
-
repo, cfg = self.make_repo(
|
|
244
|
-
|
|
245
|
-
plan = self.plan(repo, cfg)
|
|
243
|
+
repo, cfg = self.make_repo()
|
|
244
|
+
plan = self.plan(repo, cfg, planned_paths=["src/widget.py"])
|
|
246
245
|
self.assertEqual("standard", plan["profile"])
|
|
247
246
|
self.assertEqual("changed", plan["selected_scope"])
|
|
248
247
|
self.assertEqual("dev", plan["effective_mode"])
|
|
@@ -265,6 +264,12 @@ class AutoCodingProfileTests(unittest.TestCase):
|
|
|
265
264
|
delivery = next(stage for stage in agent_plan["stages"] if stage["id"] == "delivery")
|
|
266
265
|
self.assertEqual("serial", delivery["mode"])
|
|
267
266
|
self.assertFalse(plan["review_required"])
|
|
267
|
+
self.assertEqual(
|
|
268
|
+
["analysis", "final_changed_scope_gate", "commit_push"],
|
|
269
|
+
plan["mechanism_plan"]["required"],
|
|
270
|
+
)
|
|
271
|
+
self.assertFalse(plan["mechanism_plan"]["lifecycle_required"])
|
|
272
|
+
self.assertIn("task_lifecycle", plan["mechanism_plan"]["not_required"])
|
|
268
273
|
|
|
269
274
|
def test_execution_mode_is_none_direct_isolated_or_parallel(self) -> None:
|
|
270
275
|
repo, cfg = self.make_repo()
|
|
@@ -275,6 +280,8 @@ class AutoCodingProfileTests(unittest.TestCase):
|
|
|
275
280
|
dirty.write_text("user change\n", encoding="utf-8")
|
|
276
281
|
isolated = self.plan(repo, cfg, planned_paths=["src/widget.py"])
|
|
277
282
|
self.assertEqual("isolated", isolated["execution_mode"])
|
|
283
|
+
self.assertTrue(isolated["mechanism_plan"]["lifecycle_required"])
|
|
284
|
+
self.assertIn("worktree", isolated["mechanism_plan"]["required"])
|
|
278
285
|
dirty.unlink()
|
|
279
286
|
parallel = self.plan(
|
|
280
287
|
repo,
|
|
@@ -285,6 +292,7 @@ class AutoCodingProfileTests(unittest.TestCase):
|
|
|
285
292
|
self.assertEqual("isolated", parallel["execution_mode"])
|
|
286
293
|
self.assertTrue(parallel["review_required"])
|
|
287
294
|
self.assertIn("fixer", parallel["recommended_agents"])
|
|
295
|
+
self.assertIn("parallel_fixers", parallel["mechanism_plan"]["required"])
|
|
288
296
|
|
|
289
297
|
def test_validation_routes_collect_all_commands_and_reject_unmapped_code(self) -> None:
|
|
290
298
|
repo, cfg = self.make_repo()
|
|
@@ -304,6 +312,34 @@ class AutoCodingProfileTests(unittest.TestCase):
|
|
|
304
312
|
ap._validate_validation_plan(cfg, ap._validation_plan(cfg, ["contracts/api.yaml"]))
|
|
305
313
|
self.assertIn("no validation route", str(context.exception))
|
|
306
314
|
|
|
315
|
+
def test_final_gate_budget_is_hard_bounded_and_times_out(self) -> None:
|
|
316
|
+
cfg = base_config()
|
|
317
|
+
cfg["validation"] = {
|
|
318
|
+
"on_unmapped": "error",
|
|
319
|
+
"max_command_seconds": 0.05,
|
|
320
|
+
"max_total_seconds": 0.1,
|
|
321
|
+
"routes": [{"name": "slow", "paths": ["src/**"], "commands": ["slow"]}],
|
|
322
|
+
}
|
|
323
|
+
cfg["commands"]["slow"] = f'{sys.executable} -c "import time; time.sleep(1)"'
|
|
324
|
+
repo, cfg = self.make_repo("src/widget.py", cfg)
|
|
325
|
+
with self.assertRaises(APError) as context:
|
|
326
|
+
ap.cmd_light_gate(
|
|
327
|
+
argparse.Namespace(
|
|
328
|
+
repo=str(repo),
|
|
329
|
+
scope="changed",
|
|
330
|
+
profile="",
|
|
331
|
+
mode="dev",
|
|
332
|
+
base="",
|
|
333
|
+
explain=False,
|
|
334
|
+
)
|
|
335
|
+
)
|
|
336
|
+
self.assertIn("timed out", str(context.exception))
|
|
337
|
+
|
|
338
|
+
cfg["validation"]["max_command_seconds"] = 121
|
|
339
|
+
with self.assertRaises(APError) as context:
|
|
340
|
+
ap._final_gate_budget(cfg)
|
|
341
|
+
self.assertIn("cannot exceed 120", str(context.exception))
|
|
342
|
+
|
|
307
343
|
def test_test_only_change_resolves_micro(self) -> None:
|
|
308
344
|
repo, cfg = self.make_repo("tests/widget_test.py")
|
|
309
345
|
(repo / "docs" / "tasks" / "evidence.jsonl").write_text("{}\n", encoding="utf-8")
|
package/cli/tests/index.test.js
CHANGED
|
@@ -225,9 +225,13 @@ function testMinimalSyncConvergesWithinBudget() {
|
|
|
225
225
|
assert(engineering.includes("isolation: \"adaptive\""), "engineering should default to adaptive clean-branch/worktree isolation");
|
|
226
226
|
assert(engineering.includes('completion: "push"'), "engineering should complete normal development at push");
|
|
227
227
|
assert(engineering.includes('project_fast: ""'), "generic projects should expose an optional project-fast command");
|
|
228
|
+
assert(engineering.includes("max_command_seconds: 120"), "engineering should bound each final route command");
|
|
229
|
+
assert(engineering.includes("max_total_seconds: 180"), "engineering should bound the complete final gate");
|
|
228
230
|
assert(engineering.includes(`name: "${path.basename(repo)}"`), "project name should be initialized automatically");
|
|
229
|
-
assert(engineering.includes("## Design, review, and subagents"), "engineering
|
|
230
|
-
|
|
231
|
+
assert(!engineering.includes("## Design, review, and subagents"), "engineering must not duplicate the behavioral protocol");
|
|
232
|
+
const agentsProtocol = fs.readFileSync(path.join(repo, "AGENTS.md"), "utf8");
|
|
233
|
+
assert(agentsProtocol.includes("## Minimum mechanism budget"), "AGENTS should own the shared behavioral protocol");
|
|
234
|
+
assert(agentsProtocol.includes("One writer in a clean checkout works directly"), "AGENTS should enforce direct clean serial work");
|
|
231
235
|
const fixer = fs.readFileSync(path.join(repo, ".agents", "agents", "fixer.toml"), "utf8");
|
|
232
236
|
const reviewer = fs.readFileSync(path.join(repo, ".agents", "agents", "reviewer.toml"), "utf8");
|
|
233
237
|
const browserDebugger = fs.readFileSync(path.join(repo, ".agents", "agents", "browser-debugger.toml"), "utf8");
|
|
@@ -482,8 +486,8 @@ function testBridgeIsGeneric() {
|
|
|
482
486
|
run("python3", [assetAp, "--repo", repo, "install", "--bridges"]);
|
|
483
487
|
assert(exists(path.join(repo, "AGENTS.md")), "generic bridge should be created");
|
|
484
488
|
const bridge = fs.readFileSync(path.join(repo, "AGENTS.md"), "utf8");
|
|
485
|
-
assert(bridge.includes("
|
|
486
|
-
assert(bridge.includes("integrates
|
|
489
|
+
assert(bridge.includes("Every writing agent owns a distinct task ID, worktree"), "bridge should expose writer isolation");
|
|
490
|
+
assert(bridge.includes("integrates in dependency order"), "bridge should expose dependency ordering");
|
|
487
491
|
for (const filename of [`CO${"DEX.md"}`, `CLA${"UDE.md"}`]) {
|
|
488
492
|
assert(!exists(path.join(repo, filename)), "client-named bridge should not be created");
|
|
489
493
|
}
|
|
@@ -729,7 +733,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
729
733
|
|
|
730
734
|
const engineering = path.join(repo, "docs", "ENGINEERING.md");
|
|
731
735
|
const initial = fs.readFileSync(engineering, "utf8");
|
|
732
|
-
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.1\.
|
|
736
|
+
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.1\.1 -->/;
|
|
733
737
|
const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
|
|
734
738
|
assert(startPattern.test(initial), "new projects should include a versioned managed workflow marker");
|
|
735
739
|
assert(initial.includes(endMarker), "new projects should include the managed workflow end marker");
|
|
@@ -738,7 +742,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
738
742
|
.replace("workflow:\n", "# project-frontmatter-comment\nworkflow:\n")
|
|
739
743
|
.replace(startPattern, "project note before managed workflow\n<!-- auto-coding-skill:managed-workflow:start version=3.0.0 -->")
|
|
740
744
|
.replace(endMarker, `${endMarker}\nproject note after managed workflow`)
|
|
741
|
-
.replace("
|
|
745
|
+
.replace("The frontmatter contract is:", "Stale managed workflow contract:");
|
|
742
746
|
writeFile(engineering, customized);
|
|
743
747
|
const staleStart = customized.indexOf("<!-- auto-coding-skill:managed-workflow:start");
|
|
744
748
|
const staleEnd = customized.indexOf(endMarker) + endMarker.length;
|
|
@@ -748,7 +752,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
748
752
|
const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
|
|
749
753
|
const dryResult = JSON.parse(dryRun.stdout).results[0];
|
|
750
754
|
assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
|
|
751
|
-
assert(dryResult.managedWorkflow.version === "4.1.
|
|
755
|
+
assert(dryResult.managedWorkflow.version === "4.1.1", "dry-run should expose the target workflow version");
|
|
752
756
|
assert(dryResult.actions.some(item => item.action === "would-update" && item.path === "docs/ENGINEERING.md"), "dry-run should plan the managed body update");
|
|
753
757
|
assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
|
|
754
758
|
|
|
@@ -758,14 +762,14 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
758
762
|
const updatedEnd = updated.indexOf(endMarker) + endMarker.length;
|
|
759
763
|
assert(updated.slice(0, updatedStart) === outsideBefore, "sync must preserve frontmatter and content before the managed block byte-for-byte");
|
|
760
764
|
assert(updated.slice(updatedEnd) === outsideAfter, "sync must preserve content after the managed block byte-for-byte");
|
|
761
|
-
assert(updated.includes("version=4.1.
|
|
762
|
-
assert(updated.includes("
|
|
765
|
+
assert(updated.includes("version=4.1.1"), "sync should install the current managed workflow version");
|
|
766
|
+
assert(updated.includes("The frontmatter contract is:"), "sync should refresh stale managed workflow content");
|
|
763
767
|
|
|
764
768
|
fillRequiredAccess(repo);
|
|
765
769
|
const status = run("node", [cli, "status", "--projects", repo, "--json"]);
|
|
766
770
|
const statusResult = JSON.parse(status.stdout).results[0];
|
|
767
771
|
assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
|
|
768
|
-
assert(statusResult.managedWorkflow.version === "4.1.
|
|
772
|
+
assert(statusResult.managedWorkflow.version === "4.1.1", "status should expose the installed managed workflow version");
|
|
769
773
|
|
|
770
774
|
const beforeSecondSync = fs.readFileSync(engineering, "utf8");
|
|
771
775
|
const second = run("node", [cli, "sync", "--projects", repo, "--json"]);
|
|
@@ -793,7 +797,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
|
|
|
793
797
|
assert(dryResult.actions.find(item => item.path === "docs/ENGINEERING.md")?.detail.includes("preserved-custom"), "custom legacy action should be labeled preserved-custom");
|
|
794
798
|
run("node", [cli, "sync", "--projects", repo]);
|
|
795
799
|
const migrated = fs.readFileSync(engineering, "utf8");
|
|
796
|
-
assert(migrated.includes("version=4.1.
|
|
800
|
+
assert(migrated.includes("version=4.1.1"), "legacy migration should insert the current managed workflow");
|
|
797
801
|
assert(migrated.includes(legacyNote), "legacy migration must preserve the complete existing body");
|
|
798
802
|
const migratedStart = migrated.indexOf("<!-- auto-coding-skill:managed-workflow:start");
|
|
799
803
|
const migratedEnd = migrated.indexOf(endMarker) + endMarker.length;
|
|
@@ -823,7 +827,7 @@ function testOfficialLegacyEngineeringBodyIsReplacedWithoutDuplication() {
|
|
|
823
827
|
const migrated = fs.readFileSync(engineering, "utf8");
|
|
824
828
|
assert(migrated.startsWith(customizedFrontmatter), "official legacy migration must preserve YAML frontmatter byte-for-byte");
|
|
825
829
|
assert((migrated.match(/auto-coding-skill:managed-workflow:start/g) || []).length === 1, "official legacy migration should install exactly one managed workflow");
|
|
826
|
-
assert((migrated.match(/^## Delivery levels$/gm) || []).length ===
|
|
830
|
+
assert((migrated.match(/^## Delivery levels$/gm) || []).length === 0, "official legacy migration must remove the old duplicated workflow body");
|
|
827
831
|
|
|
828
832
|
const stable = fs.readFileSync(engineering, "utf8");
|
|
829
833
|
run("node", [cli, "sync", "--projects", repo]);
|
|
@@ -897,7 +901,7 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
|
|
|
897
901
|
run("node", [cli, "sync", "--projects", repo]);
|
|
898
902
|
const agents = path.join(repo, "AGENTS.md");
|
|
899
903
|
const initial = fs.readFileSync(agents, "utf8");
|
|
900
|
-
assert(initial.includes("managed-agents:start version=4.1.
|
|
904
|
+
assert(initial.includes("managed-agents:start version=4.1.1"), "new projects should receive the versioned root AGENTS block");
|
|
901
905
|
|
|
902
906
|
const custom = [
|
|
903
907
|
"# Project rules",
|
|
@@ -916,12 +920,12 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
|
|
|
916
920
|
|
|
917
921
|
run("node", [cli, "sync", "--projects", repo]);
|
|
918
922
|
const migrated = fs.readFileSync(agents, "utf8");
|
|
919
|
-
assert(migrated.includes("managed-agents:start version=4.1.
|
|
923
|
+
assert(migrated.includes("managed-agents:start version=4.1.1"), "AGENTS migration should install the current managed block");
|
|
920
924
|
assert(!migrated.includes("Preserve this repository-specific rule exactly."), "root AGENTS must contain no project-specific tail");
|
|
921
925
|
assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
|
|
922
926
|
const canonical = fs.readFileSync(path.join(repoRoot, "cli", "assets", "skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
|
|
923
927
|
assert(migrated === canonical, "root AGENTS must be byte-identical to the packaged canonical file");
|
|
924
|
-
const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.1.
|
|
928
|
+
const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.1.1.md");
|
|
925
929
|
assert(fs.readFileSync(archive, "utf8").includes("Preserve this repository-specific rule exactly."), "previous AGENTS content must be archived once");
|
|
926
930
|
const stable = fs.readFileSync(agents);
|
|
927
931
|
run("node", [cli, "sync", "--projects", repo]);
|
|
@@ -980,7 +984,7 @@ function testEngineeringFrameworkAllowsProjectFactsButRejectsDuplicateWorkflow()
|
|
|
980
984
|
const migrationResult = JSON.parse(migration.stdout).results[0];
|
|
981
985
|
assert(migrationResult.managedWorkflow.state === "stale", "known duplicate sections should use controlled migration");
|
|
982
986
|
assert(migrationResult.managedWorkflow.migrations.includes("engineering-section-delivery-flow"), "known section migration should be explicit");
|
|
983
|
-
assert(migrationResult.actions.some(item => item.action === "would-archive" && item.path.includes("ENGINEERING.pre-4.1.
|
|
987
|
+
assert(migrationResult.actions.some(item => item.action === "would-archive" && item.path.includes("ENGINEERING.pre-4.1.1")), "controlled section cleanup should archive the previous ENGINEERING file");
|
|
984
988
|
run("node", [cli, "sync", "--projects", repo]);
|
|
985
989
|
assert(!fs.readFileSync(engineering, "utf8").includes("Known obsolete workflow"), "known duplicate workflow section should be removed");
|
|
986
990
|
|
|
@@ -992,14 +996,14 @@ function testEngineeringFrameworkAllowsProjectFactsButRejectsDuplicateWorkflow()
|
|
|
992
996
|
}
|
|
993
997
|
|
|
994
998
|
function testReleaseVersionMarkersStayInSync() {
|
|
995
|
-
const expected = "4.1.
|
|
999
|
+
const expected = "4.1.1";
|
|
996
1000
|
const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"));
|
|
997
1001
|
const lock = JSON.parse(fs.readFileSync(path.join(repoRoot, "package-lock.json"), "utf8"));
|
|
998
1002
|
const policy = JSON.parse(fs.readFileSync(
|
|
999
1003
|
path.join(repoRoot, "src", "auto-coding-skill", "data", "policies", "workflow-migrations-v1.json"),
|
|
1000
1004
|
"utf8",
|
|
1001
1005
|
));
|
|
1002
|
-
assert(pkg.version === expected, "package version must match the 4.1.
|
|
1006
|
+
assert(pkg.version === expected, "package version must match the 4.1.1 release");
|
|
1003
1007
|
assert(lock.version === expected && lock.packages[""].version === expected, "package-lock versions must match");
|
|
1004
1008
|
assert(policy.managed_versions.engineering === expected && policy.managed_versions.agents === expected, "managed workflow versions must match");
|
|
1005
1009
|
for (const rel of [
|
|
@@ -1012,6 +1016,17 @@ function testReleaseVersionMarkersStayInSync() {
|
|
|
1012
1016
|
}
|
|
1013
1017
|
}
|
|
1014
1018
|
|
|
1019
|
+
function testProtocolResponsibilitiesStaySeparated() {
|
|
1020
|
+
const skill = fs.readFileSync(path.join(repoRoot, "src", "auto-coding-skill", "SKILL.md"), "utf8");
|
|
1021
|
+
const agents = fs.readFileSync(path.join(repoRoot, "src", "auto-coding-skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
|
|
1022
|
+
const engineering = fs.readFileSync(path.join(repoRoot, "src", "auto-coding-skill", "data", "templates", "ENGINEERING.md"), "utf8");
|
|
1023
|
+
const totalLines = [skill, agents, engineering].reduce((sum, text) => sum + text.split(/\r?\n/).length, 0);
|
|
1024
|
+
assert(totalLines <= 350, `shared protocol context budget exceeded: ${totalLines} lines`);
|
|
1025
|
+
assert(agents.includes("## Minimum mechanism budget") && agents.includes("## Bounded real validation"), "AGENTS must remain the behavioral protocol");
|
|
1026
|
+
assert(skill.includes("## Select the minimum mechanism set") && !skill.includes("## Authority"), "SKILL must remain invocation guidance");
|
|
1027
|
+
assert(engineering.includes("The frontmatter contract is:") && !engineering.includes("## Git and parallel work"), "ENGINEERING must remain project configuration/facts");
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1015
1030
|
testPreflightAvoidsPartialInstall();
|
|
1016
1031
|
testDestVariants();
|
|
1017
1032
|
testLauncherFallsBackToGlobalRuntime();
|
|
@@ -1049,5 +1064,6 @@ testUnknownWorkflowConflictFailsWholeBatchBeforeWrites();
|
|
|
1049
1064
|
testEngineeringMarkerBoundaryIsNormalized();
|
|
1050
1065
|
testEngineeringFrameworkAllowsProjectFactsButRejectsDuplicateWorkflow();
|
|
1051
1066
|
testReleaseVersionMarkersStayInSync();
|
|
1067
|
+
testProtocolResponsibilitiesStaySeparated();
|
|
1052
1068
|
|
|
1053
1069
|
console.log("cli-installer-regression-ok");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elvis1513/auto-coding-skill",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
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": {
|