@elvis1513/auto-coding-skill 4.2.6 → 4.2.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 +33 -4
- package/cli/assets/agents/reviewer.toml +4 -4
- package/cli/assets/managed-install.json +1 -1
- package/cli/assets/skill/SKILL.md +4 -4
- 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 +4 -4
- package/cli/assets/skill/scripts/ap.py +829 -58
- package/cli/tests/ap_concurrency_test.py +315 -17
- package/cli/tests/ap_profiles_test.py +58 -0
- package/cli/tests/index.test.js +21 -20
- 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.7", "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.7", "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.7", "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
|
-
// language-aware structure scanner are
|
|
479
|
-
// context. Keep a measured ceiling while
|
|
480
|
-
|
|
477
|
+
// Integrity, staging, fail-closed classification, immutable Reviewer
|
|
478
|
+
// snapshots, contract helpers, and the language-aware structure scanner are
|
|
479
|
+
// executable support code, not prompt context. Keep a measured ceiling while
|
|
480
|
+
// leaving deterministic checks readable.
|
|
481
|
+
assert(lines <= 16000, `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");
|
|
@@ -1016,7 +1017,7 @@ function testManagedEngineeringInitIsAuthoritativeAndIdempotent() {
|
|
|
1016
1017
|
|
|
1017
1018
|
const engineering = path.join(repo, "docs", "ENGINEERING.md");
|
|
1018
1019
|
const initial = fs.readFileSync(engineering, "utf8");
|
|
1019
|
-
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.2\.
|
|
1020
|
+
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.2\.7 -->/;
|
|
1020
1021
|
const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
|
|
1021
1022
|
assert(startPattern.test(initial), "new projects should include a versioned managed workflow marker");
|
|
1022
1023
|
assert(initial.includes(endMarker), "new projects should include the managed workflow end marker");
|
|
@@ -1030,21 +1031,21 @@ function testManagedEngineeringInitIsAuthoritativeAndIdempotent() {
|
|
|
1030
1031
|
const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
|
|
1031
1032
|
const dryResult = JSON.parse(dryRun.stdout).results[0];
|
|
1032
1033
|
assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
|
|
1033
|
-
assert(dryResult.managedWorkflow.version === "4.2.
|
|
1034
|
+
assert(dryResult.managedWorkflow.version === "4.2.7", "dry-run should expose the target workflow version");
|
|
1034
1035
|
assert(dryResult.actions.some(item => item.action === "would-update" && item.path === "docs/ENGINEERING.md"), "dry-run should plan the managed body update");
|
|
1035
1036
|
assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
|
|
1036
1037
|
|
|
1037
1038
|
run("node", [cli, "init"], { cwd: repo });
|
|
1038
1039
|
const updated = fs.readFileSync(engineering, "utf8");
|
|
1039
1040
|
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.
|
|
1041
|
+
assert(updated.includes("version=4.2.7"), "init should install the current managed workflow version");
|
|
1041
1042
|
assert(updated.includes("The frontmatter contract is:"), "init should refresh stale managed workflow content");
|
|
1042
1043
|
|
|
1043
1044
|
fillRequiredAccess(repo);
|
|
1044
1045
|
const status = run("node", [cli, "status", "--projects", repo, "--json"]);
|
|
1045
1046
|
const statusResult = JSON.parse(status.stdout).results[0];
|
|
1046
1047
|
assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
|
|
1047
|
-
assert(statusResult.managedWorkflow.version === "4.2.
|
|
1048
|
+
assert(statusResult.managedWorkflow.version === "4.2.7", "status should expose the installed managed workflow version");
|
|
1048
1049
|
|
|
1049
1050
|
const beforeSecondInit = fs.readFileSync(engineering, "utf8");
|
|
1050
1051
|
run("node", [cli, "init"], { cwd: repo });
|
|
@@ -1071,7 +1072,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
|
|
|
1071
1072
|
assert(dryResult.actions.find(item => item.path === "docs/ENGINEERING.md")?.detail.includes("preserved-custom"), "custom legacy action should be labeled preserved-custom");
|
|
1072
1073
|
run("node", [cli, "sync", "--projects", repo]);
|
|
1073
1074
|
const migrated = fs.readFileSync(engineering, "utf8");
|
|
1074
|
-
assert(migrated.includes("version=4.2.
|
|
1075
|
+
assert(migrated.includes("version=4.2.7"), "legacy migration should insert the current managed workflow");
|
|
1075
1076
|
assert(migrated.includes(legacyNote), "legacy migration must preserve the complete existing body");
|
|
1076
1077
|
const stable = fs.readFileSync(engineering, "utf8");
|
|
1077
1078
|
run("node", [cli, "sync", "--projects", repo]);
|
|
@@ -1171,7 +1172,7 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
|
|
|
1171
1172
|
run("node", [cli, "sync", "--projects", repo]);
|
|
1172
1173
|
const agents = path.join(repo, "AGENTS.md");
|
|
1173
1174
|
const initial = fs.readFileSync(agents, "utf8");
|
|
1174
|
-
assert(initial.includes("managed-agents:start version=4.2.
|
|
1175
|
+
assert(initial.includes("managed-agents:start version=4.2.7"), "new projects should receive the versioned root AGENTS block");
|
|
1175
1176
|
|
|
1176
1177
|
const custom = [
|
|
1177
1178
|
"# Project rules",
|
|
@@ -1190,12 +1191,12 @@ function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
|
|
|
1190
1191
|
|
|
1191
1192
|
run("node", [cli, "sync", "--projects", repo]);
|
|
1192
1193
|
const migrated = fs.readFileSync(agents, "utf8");
|
|
1193
|
-
assert(migrated.includes("managed-agents:start version=4.2.
|
|
1194
|
+
assert(migrated.includes("managed-agents:start version=4.2.7"), "AGENTS migration should install the current managed block");
|
|
1194
1195
|
assert(!migrated.includes("Preserve this repository-specific rule exactly."), "root AGENTS must contain no project-specific tail");
|
|
1195
1196
|
assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
|
|
1196
1197
|
const canonical = fs.readFileSync(path.join(repoRoot, "cli", "assets", "skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
|
|
1197
1198
|
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.
|
|
1199
|
+
const archive = path.join(repo, "docs", "archive", "workflow", "AGENTS.pre-4.2.7.md");
|
|
1199
1200
|
assert(fs.readFileSync(archive, "utf8").includes("Preserve this repository-specific rule exactly."), "previous AGENTS content must be archived once");
|
|
1200
1201
|
const stable = fs.readFileSync(agents);
|
|
1201
1202
|
run("node", [cli, "sync", "--projects", repo]);
|
|
@@ -1252,7 +1253,7 @@ function testEngineeringFrameworkRejectsAnyNonCanonicalWorkflowText() {
|
|
|
1252
1253
|
|
|
1253
1254
|
run("node", [cli, "init"], { cwd: repo });
|
|
1254
1255
|
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.
|
|
1256
|
+
const archived = path.join(repo, ".agents", "archive", "auto-coding-skill", "4.2.7", "docs", "ENGINEERING.md");
|
|
1256
1257
|
assert(fs.readFileSync(archived, "utf8").includes("backend owns APIs"), "removed project text should remain in non-authoritative history");
|
|
1257
1258
|
}
|
|
1258
1259
|
|
|
@@ -1264,12 +1265,12 @@ function testManagedInstallIntegrityIsBoundedAndRepairable() {
|
|
|
1264
1265
|
|
|
1265
1266
|
const manifestPath = path.join(repo, ".agents", "managed-install.json");
|
|
1266
1267
|
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
1267
|
-
assert(manifest.schema_version === 1 && manifest.skill_version === "4.2.
|
|
1268
|
+
assert(manifest.schema_version === 1 && manifest.skill_version === "4.2.7", "installed manifest must identify the release");
|
|
1268
1269
|
assert(manifest.entries.length > 0, "installed manifest must list managed files");
|
|
1269
1270
|
for (const entry of manifest.entries) {
|
|
1270
1271
|
assert(typeof entry.path === "string" && !path.isAbsolute(entry.path) && !entry.path.includes(".."), "manifest paths must be safe relative paths");
|
|
1271
1272
|
assert(/^[0-9a-f]{64}$/.test(entry.sha256), `${entry.path}: manifest hash must be sha256`);
|
|
1272
|
-
assert(entry.version === "4.2.
|
|
1273
|
+
assert(entry.version === "4.2.7" && typeof entry.executable === "boolean", `${entry.path}: version/executable metadata missing`);
|
|
1273
1274
|
}
|
|
1274
1275
|
assert(!manifest.managed_namespaces.some(item => item.path === ".agents" || item.path === "docs"), "manifest must not mirror entire project-owned trees");
|
|
1275
1276
|
|
|
@@ -1339,14 +1340,14 @@ function testManagedInstallIntegrityIsBoundedAndRepairable() {
|
|
|
1339
1340
|
}
|
|
1340
1341
|
|
|
1341
1342
|
function testReleaseVersionMarkersStayInSync() {
|
|
1342
|
-
const expected = "4.2.
|
|
1343
|
+
const expected = "4.2.7";
|
|
1343
1344
|
const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"));
|
|
1344
1345
|
const lock = JSON.parse(fs.readFileSync(path.join(repoRoot, "package-lock.json"), "utf8"));
|
|
1345
1346
|
const policy = JSON.parse(fs.readFileSync(
|
|
1346
1347
|
path.join(repoRoot, "src", "auto-coding-skill", "data", "policies", "workflow-migrations-v1.json"),
|
|
1347
1348
|
"utf8",
|
|
1348
1349
|
));
|
|
1349
|
-
assert(pkg.version === expected, "package version must match the 4.2.
|
|
1350
|
+
assert(pkg.version === expected, "package version must match the 4.2.7 release");
|
|
1350
1351
|
assert(lock.version === expected && lock.packages[""].version === expected, "package-lock versions must match");
|
|
1351
1352
|
assert(policy.managed_versions.engineering === expected && policy.managed_versions.agents === expected, "managed workflow versions must match");
|
|
1352
1353
|
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.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": {
|