@elvis1513/auto-coding-skill 4.2.6 → 4.2.8
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 +71 -12
- package/cli/assets/agents/reviewer.toml +6 -6
- package/cli/assets/managed-install.json +1 -1
- package/cli/assets/skill/SKILL.md +6 -7
- package/cli/assets/skill/data/contracts/orchestration-v1.schema.json +17 -0
- package/cli/assets/skill/data/policies/workflow-migrations-v1.json +2 -2
- package/cli/assets/skill/data/templates/ENGINEERING.md +2 -2
- package/cli/assets/skill/data/templates/bridges/AGENTS.md +13 -16
- package/cli/assets/skill/scripts/ap.py +2096 -142
- package/cli/tests/ap_concurrency_test.py +632 -46
- package/cli/tests/ap_profiles_test.py +382 -34
- package/cli/tests/index.test.js +23 -21
- package/package.json +1 -1
package/cli/tests/index.test.js
CHANGED
|
@@ -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.
|
|
317
|
+
assert(exists(path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.8", "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");
|
|
@@ -382,7 +382,7 @@ function testManagedPolicySummaryPreservesProjectConfiguration() {
|
|
|
382
382
|
const legacySummary = "- `structure` and `optimization`: advisory architecture and no-new-debt policy.";
|
|
383
383
|
const customized = current
|
|
384
384
|
.replace(/^ skill_version:.*$/m, " skill_version: 4.2.5")
|
|
385
|
-
.replace("managed-workflow:start version=4.2.
|
|
385
|
+
.replace("managed-workflow:start version=4.2.8", "managed-workflow:start version=4.2.5")
|
|
386
386
|
.replace(neutralSummary, legacySummary)
|
|
387
387
|
.replace(/^ enforcement:.*$/m, " enforcement: blocking")
|
|
388
388
|
.replace(" block_warnings: false", " block_warnings: true")
|
|
@@ -400,7 +400,7 @@ function testManagedPolicySummaryPreservesProjectConfiguration() {
|
|
|
400
400
|
run("node", [cli, "init"], { cwd: repo });
|
|
401
401
|
const upgraded = fs.readFileSync(engineering, "utf8");
|
|
402
402
|
const afterUpgrade = readEngineeringConfig(engineering);
|
|
403
|
-
assert(afterUpgrade.workflow?.skill_version === "4.2.
|
|
403
|
+
assert(afterUpgrade.workflow?.skill_version === "4.2.8", "init must upgrade the workflow version");
|
|
404
404
|
assert(canonicalJson(afterUpgrade.structure) === canonicalJson(beforeUpgrade.structure), "init must preserve the complete project structure policy");
|
|
405
405
|
assert(canonicalJson(afterUpgrade.optimization) === canonicalJson(beforeUpgrade.optimization), "init must preserve the complete project optimization policy");
|
|
406
406
|
assert(upgraded.includes(neutralSummary), "upgraded managed text must defer to frontmatter policy");
|
|
@@ -474,10 +474,11 @@ function testMinimalInitConvergesWithinBudget() {
|
|
|
474
474
|
const files = listProjectFiles(repo);
|
|
475
475
|
const lines = files.reduce((total, file) => total + fs.readFileSync(file, "utf8").split(/\r?\n/).length, 0);
|
|
476
476
|
assert(files.length <= 40, `minimal scaffold file budget exceeded: ${files.length}`);
|
|
477
|
-
// Integrity, staging, fail-closed classification,
|
|
478
|
-
//
|
|
479
|
-
//
|
|
480
|
-
|
|
477
|
+
// Integrity, staging, fail-closed classification, immutable Reviewer snapshots,
|
|
478
|
+
// bounded runtime supervision, failure-evidence binding, contract helpers, and
|
|
479
|
+
// the language-aware structure scanner are executable support code, not prompt
|
|
480
|
+
// context. Keep a measured ceiling while leaving safety checks readable.
|
|
481
|
+
assert(lines <= 17200, `minimal scaffold line budget exceeded: ${lines}`);
|
|
481
482
|
const engineering = fs.readFileSync(path.join(repo, "docs", "ENGINEERING.md"), "utf8");
|
|
482
483
|
assert(engineering.includes("profile: auto"), "engineering should enable adaptive profiles");
|
|
483
484
|
assert(engineering.includes("isolation: adaptive"), "engineering should default to adaptive clean-branch/worktree isolation");
|
|
@@ -498,8 +499,9 @@ function testMinimalInitConvergesWithinBudget() {
|
|
|
498
499
|
assert(reviewer.includes("diff_fingerprint"), "reviewer verdict should bind to a stable diff");
|
|
499
500
|
assert(reviewer.includes("agent-result-template"), "reviewer should use the complete result skeleton");
|
|
500
501
|
assert(reviewer.includes("AUTOCODING_REVIEW_ASSIGNMENT"), "reviewer should receive the supervised assignment path");
|
|
501
|
-
assert(reviewer.includes("
|
|
502
|
+
assert(reviewer.includes("150 秒"), "reviewer should enforce the focused review budget");
|
|
502
503
|
assert(agentsProtocol.includes("ap.py review-run"), "AGENTS should use the supervised Reviewer runtime");
|
|
504
|
+
assert(agentsProtocol.includes("review-runtime-override"), "AGENTS should document the audited runtime bypass");
|
|
503
505
|
assert(agentsProtocol.includes("cannot stop an in-app subagent"), "AGENTS should state the supervision boundary honestly");
|
|
504
506
|
assert(browserDebugger.includes('sandbox_mode = "read-only"'), "browser discovery should be read-only");
|
|
505
507
|
|
|
@@ -1016,7 +1018,7 @@ function testManagedEngineeringInitIsAuthoritativeAndIdempotent() {
|
|
|
1016
1018
|
|
|
1017
1019
|
const engineering = path.join(repo, "docs", "ENGINEERING.md");
|
|
1018
1020
|
const initial = fs.readFileSync(engineering, "utf8");
|
|
1019
|
-
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.2\.
|
|
1021
|
+
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.2\.8 -->/;
|
|
1020
1022
|
const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
|
|
1021
1023
|
assert(startPattern.test(initial), "new projects should include a versioned managed workflow marker");
|
|
1022
1024
|
assert(initial.includes(endMarker), "new projects should include the managed workflow end marker");
|
|
@@ -1030,21 +1032,21 @@ function testManagedEngineeringInitIsAuthoritativeAndIdempotent() {
|
|
|
1030
1032
|
const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
|
|
1031
1033
|
const dryResult = JSON.parse(dryRun.stdout).results[0];
|
|
1032
1034
|
assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
|
|
1033
|
-
assert(dryResult.managedWorkflow.version === "4.2.
|
|
1035
|
+
assert(dryResult.managedWorkflow.version === "4.2.8", "dry-run should expose the target workflow version");
|
|
1034
1036
|
assert(dryResult.actions.some(item => item.action === "would-update" && item.path === "docs/ENGINEERING.md"), "dry-run should plan the managed body update");
|
|
1035
1037
|
assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
|
|
1036
1038
|
|
|
1037
1039
|
run("node", [cli, "init"], { cwd: repo });
|
|
1038
1040
|
const updated = fs.readFileSync(engineering, "utf8");
|
|
1039
1041
|
assert(!updated.includes("project note before") && !updated.includes("project note after"), "init must remove text outside the canonical ENGINEERING body");
|
|
1040
|
-
assert(updated.includes("version=4.2.
|
|
1042
|
+
assert(updated.includes("version=4.2.8"), "init should install the current managed workflow version");
|
|
1041
1043
|
assert(updated.includes("The frontmatter contract is:"), "init should refresh stale managed workflow content");
|
|
1042
1044
|
|
|
1043
1045
|
fillRequiredAccess(repo);
|
|
1044
1046
|
const status = run("node", [cli, "status", "--projects", repo, "--json"]);
|
|
1045
1047
|
const statusResult = JSON.parse(status.stdout).results[0];
|
|
1046
1048
|
assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
|
|
1047
|
-
assert(statusResult.managedWorkflow.version === "4.2.
|
|
1049
|
+
assert(statusResult.managedWorkflow.version === "4.2.8", "status should expose the installed managed workflow version");
|
|
1048
1050
|
|
|
1049
1051
|
const beforeSecondInit = fs.readFileSync(engineering, "utf8");
|
|
1050
1052
|
run("node", [cli, "init"], { cwd: repo });
|
|
@@ -1071,7 +1073,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
|
|
|
1071
1073
|
assert(dryResult.actions.find(item => item.path === "docs/ENGINEERING.md")?.detail.includes("preserved-custom"), "custom legacy action should be labeled preserved-custom");
|
|
1072
1074
|
run("node", [cli, "sync", "--projects", repo]);
|
|
1073
1075
|
const migrated = fs.readFileSync(engineering, "utf8");
|
|
1074
|
-
assert(migrated.includes("version=4.2.
|
|
1076
|
+
assert(migrated.includes("version=4.2.8"), "legacy migration should insert the current managed workflow");
|
|
1075
1077
|
assert(migrated.includes(legacyNote), "legacy migration must preserve the complete existing body");
|
|
1076
1078
|
const stable = fs.readFileSync(engineering, "utf8");
|
|
1077
1079
|
run("node", [cli, "sync", "--projects", repo]);
|
|
@@ -1171,7 +1173,7 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
|
|
|
1171
1173
|
run("node", [cli, "sync", "--projects", repo]);
|
|
1172
1174
|
const agents = path.join(repo, "AGENTS.md");
|
|
1173
1175
|
const initial = fs.readFileSync(agents, "utf8");
|
|
1174
|
-
assert(initial.includes("managed-agents:start version=4.2.
|
|
1176
|
+
assert(initial.includes("managed-agents:start version=4.2.8"), "new projects should receive the versioned root AGENTS block");
|
|
1175
1177
|
|
|
1176
1178
|
const custom = [
|
|
1177
1179
|
"# Project rules",
|
|
@@ -1190,12 +1192,12 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
|
|
|
1190
1192
|
|
|
1191
1193
|
run("node", [cli, "sync", "--projects", repo]);
|
|
1192
1194
|
const migrated = fs.readFileSync(agents, "utf8");
|
|
1193
|
-
assert(migrated.includes("managed-agents:start version=4.2.
|
|
1195
|
+
assert(migrated.includes("managed-agents:start version=4.2.8"), "AGENTS migration should install the current managed block");
|
|
1194
1196
|
assert(!migrated.includes("Preserve this repository-specific rule exactly."), "root AGENTS must contain no project-specific tail");
|
|
1195
1197
|
assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
|
|
1196
1198
|
const canonical = fs.readFileSync(path.join(repoRoot, "cli", "assets", "skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
|
|
1197
1199
|
assert(migrated === canonical, "root AGENTS must be byte-identical to the packaged canonical file");
|
|
1198
|
-
const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.2.
|
|
1200
|
+
const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.2.8.md");
|
|
1199
1201
|
assert(fs.readFileSync(archive, "utf8").includes("Preserve this repository-specific rule exactly."), "previous AGENTS content must be archived once");
|
|
1200
1202
|
const stable = fs.readFileSync(agents);
|
|
1201
1203
|
run("node", [cli, "sync", "--projects", repo]);
|
|
@@ -1252,7 +1254,7 @@ function testEngineeringFrameworkRejectsAnyNonCanonicalWorkflowText() {
|
|
|
1252
1254
|
|
|
1253
1255
|
run("node", [cli, "init"], { cwd: repo });
|
|
1254
1256
|
assert(!fs.readFileSync(engineering, "utf8").includes("backend owns APIs"), "init must restore the canonical ENGINEERING body");
|
|
1255
|
-
const archived = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.
|
|
1257
|
+
const archived = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.8", "docs", "ENGINEERING.md");
|
|
1256
1258
|
assert(fs.readFileSync(archived, "utf8").includes("backend owns APIs"), "removed project text should remain in non-authoritative history");
|
|
1257
1259
|
}
|
|
1258
1260
|
|
|
@@ -1264,12 +1266,12 @@ function testManagedInstallIntegrityIsBoundedAndRepairable() {
|
|
|
1264
1266
|
|
|
1265
1267
|
const manifestPath = path.join(repo, ".agents", "managed-install.json");
|
|
1266
1268
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
1267
|
-
assert(manifest.schema_version === 1 && manifest.skill_version === "4.2.
|
|
1269
|
+
assert(manifest.schema_version === 1 && manifest.skill_version === "4.2.8", "installed manifest must identify the release");
|
|
1268
1270
|
assert(manifest.entries.length > 0, "installed manifest must list managed files");
|
|
1269
1271
|
for (const entry of manifest.entries) {
|
|
1270
1272
|
assert(typeof entry.path === "string" && !path.isAbsolute(entry.path) && !entry.path.includes(".."), "manifest paths must be safe relative paths");
|
|
1271
1273
|
assert(/^[0-9a-f]{64}$/.test(entry.sha256), `${entry.path}: manifest hash must be sha256`);
|
|
1272
|
-
assert(entry.version === "4.2.
|
|
1274
|
+
assert(entry.version === "4.2.8" && typeof entry.executable === "boolean", `${entry.path}: version/executable metadata missing`);
|
|
1273
1275
|
}
|
|
1274
1276
|
assert(!manifest.managed_namespaces.some(item => item.path === ".agents" || item.path === "docs"), "manifest must not mirror entire project-owned trees");
|
|
1275
1277
|
|
|
@@ -1339,14 +1341,14 @@ function testManagedInstallIntegrityIsBoundedAndRepairable() {
|
|
|
1339
1341
|
}
|
|
1340
1342
|
|
|
1341
1343
|
function testReleaseVersionMarkersStayInSync() {
|
|
1342
|
-
const expected = "4.2.
|
|
1344
|
+
const expected = "4.2.8";
|
|
1343
1345
|
const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"));
|
|
1344
1346
|
const lock = JSON.parse(fs.readFileSync(path.join(repoRoot, "package-lock.json"), "utf8"));
|
|
1345
1347
|
const policy = JSON.parse(fs.readFileSync(
|
|
1346
1348
|
path.join(repoRoot, "src", "auto-coding-skill", "data", "policies", "workflow-migrations-v1.json"),
|
|
1347
1349
|
"utf8",
|
|
1348
1350
|
));
|
|
1349
|
-
assert(pkg.version === expected, "package version must match the 4.2.
|
|
1351
|
+
assert(pkg.version === expected, "package version must match the 4.2.8 release");
|
|
1350
1352
|
assert(lock.version === expected && lock.packages[""].version === expected, "package-lock versions must match");
|
|
1351
1353
|
assert(policy.managed_versions.engineering === expected && policy.managed_versions.agents === expected, "managed workflow versions must match");
|
|
1352
1354
|
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.
|
|
3
|
+
"version": "4.2.8",
|
|
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": {
|