@elvis1513/auto-coding-skill 4.0.0 → 4.1.0
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 +38 -9
- package/cli/assets/agents/reviewer.toml +3 -2
- package/cli/assets/skill/SKILL.md +45 -16
- package/cli/assets/skill/data/policies/workflow-migrations-v1.json +291 -5
- package/cli/assets/skill/data/templates/ENGINEERING.md +46 -19
- package/cli/assets/skill/data/templates/bridges/AGENTS.md +133 -27
- package/cli/assets/skill/scripts/ap.py +241 -50
- package/cli/assets/skill/scripts/scaffold_templates.py +40 -5
- package/cli/src/index.js +172 -85
- package/cli/tests/ap_concurrency_test.py +62 -10
- package/cli/tests/ap_profiles_test.py +27 -20
- package/cli/tests/index.test.js +78 -62
- package/package.json +1 -1
- package/cli/assets/skill/data/templates/docs/tasks/closure-log.md +0 -17
- package/cli/assets/skill/data/templates/docs/tasks/taskbook.md +0 -30
package/cli/tests/index.test.js
CHANGED
|
@@ -137,7 +137,18 @@ function fillRequiredAccess(repo, password = "local-dev-password") {
|
|
|
137
137
|
` password: ${JSON.stringify(password)}`,
|
|
138
138
|
].join("\n");
|
|
139
139
|
const withAccess = text.replace(/^access:\r?\n[\s\S]*?(?=^concurrency:)/m, `${block}\n\n`);
|
|
140
|
-
const updated = withAccess
|
|
140
|
+
const updated = withAccess
|
|
141
|
+
.replace(' project_fast: ""', ' project_fast: "true"')
|
|
142
|
+
.replace(
|
|
143
|
+
" routes: []",
|
|
144
|
+
[
|
|
145
|
+
" routes:",
|
|
146
|
+
' - name: "project-code"',
|
|
147
|
+
' paths: ["**"]',
|
|
148
|
+
' exclude: ["*.md", "docs/**"]',
|
|
149
|
+
' commands: ["project_fast"]',
|
|
150
|
+
].join("\n"),
|
|
151
|
+
);
|
|
141
152
|
assert(updated !== text || text.includes(password), "required project values should be replaceable");
|
|
142
153
|
fs.writeFileSync(engineering, updated);
|
|
143
154
|
}
|
|
@@ -208,15 +219,15 @@ function testMinimalSyncConvergesWithinBudget() {
|
|
|
208
219
|
const files = listProjectFiles(repo);
|
|
209
220
|
const lines = files.reduce((total, file) => total + fs.readFileSync(file, "utf8").split(/\r?\n/).length, 0);
|
|
210
221
|
assert(files.length <= 23, `minimal scaffold file budget exceeded: ${files.length}`);
|
|
211
|
-
assert(lines <=
|
|
222
|
+
assert(lines <= 10800, `minimal scaffold line budget exceeded: ${lines}`);
|
|
212
223
|
const engineering = fs.readFileSync(path.join(repo, "docs", "ENGINEERING.md"), "utf8");
|
|
213
224
|
assert(engineering.includes("profile: \"auto\""), "engineering should enable adaptive profiles");
|
|
214
225
|
assert(engineering.includes("isolation: \"adaptive\""), "engineering should default to adaptive clean-branch/worktree isolation");
|
|
215
226
|
assert(engineering.includes('completion: "push"'), "engineering should complete normal development at push");
|
|
216
|
-
assert(engineering.includes('project_fast: ""'), "generic projects should
|
|
227
|
+
assert(engineering.includes('project_fast: ""'), "generic projects should expose an optional project-fast command");
|
|
217
228
|
assert(engineering.includes(`name: "${path.basename(repo)}"`), "project name should be initialized automatically");
|
|
218
229
|
assert(engineering.includes("## Design, review, and subagents"), "engineering should install adaptive orchestration guidance");
|
|
219
|
-
assert(engineering.includes("concurrent writers always use separate worktrees"), "engineering should enforce one writer per worktree");
|
|
230
|
+
assert(engineering.includes("concurrent writers always use separate task IDs/worktrees"), "engineering should enforce one writer per worktree");
|
|
220
231
|
const fixer = fs.readFileSync(path.join(repo, ".agents", "agents", "fixer.toml"), "utf8");
|
|
221
232
|
const reviewer = fs.readFileSync(path.join(repo, ".agents", "agents", "reviewer.toml"), "utf8");
|
|
222
233
|
const browserDebugger = fs.readFileSync(path.join(repo, ".agents", "agents", "browser-debugger.toml"), "utf8");
|
|
@@ -471,14 +482,14 @@ function testBridgeIsGeneric() {
|
|
|
471
482
|
run("python3", [assetAp, "--repo", repo, "install", "--bridges"]);
|
|
472
483
|
assert(exists(path.join(repo, "AGENTS.md")), "generic bridge should be created");
|
|
473
484
|
const bridge = fs.readFileSync(path.join(repo, "AGENTS.md"), "utf8");
|
|
474
|
-
assert(bridge.includes("
|
|
475
|
-
assert(bridge.includes("
|
|
485
|
+
assert(bridge.includes("Each parallel writer gets one registered worktree"), "bridge should expose writer isolation");
|
|
486
|
+
assert(bridge.includes("integrates by dependency order"), "bridge should expose dependency ordering");
|
|
476
487
|
for (const filename of [`CO${"DEX.md"}`, `CLA${"UDE.md"}`]) {
|
|
477
488
|
assert(!exists(path.join(repo, filename)), "client-named bridge should not be created");
|
|
478
489
|
}
|
|
479
490
|
}
|
|
480
491
|
|
|
481
|
-
function
|
|
492
|
+
function testUpgradeCleansAllManagedSkillExtras() {
|
|
482
493
|
const repo = tmpdir("upgrade-extra");
|
|
483
494
|
run("git", ["init", "-q"], { cwd: repo });
|
|
484
495
|
run("node", [cli, "init", "--force"], { cwd: repo });
|
|
@@ -487,7 +498,7 @@ function testUpgradeCleansManagedBridgeExtrasOnly() {
|
|
|
487
498
|
writeFile(path.join(repo, ".agents", "skills", "auto-coding-skill", "custom.txt"), "custom\n");
|
|
488
499
|
run("python3", [assetAp, "--repo", repo, "upgrade", "--write"]);
|
|
489
500
|
assert(!exists(path.join(repo, ".agents", "skills", "auto-coding-skill", "data", "templates", "bridges", "OLD.md")), "managed bridge extra should be removed");
|
|
490
|
-
assert(exists(path.join(repo, ".agents", "skills", "auto-coding-skill", "custom.txt")), "
|
|
501
|
+
assert(!exists(path.join(repo, ".agents", "skills", "auto-coding-skill", "custom.txt")), "fully managed Skill extras should be removed");
|
|
491
502
|
}
|
|
492
503
|
|
|
493
504
|
function testOptionalDocsAndLegacyToolsDoNotCauseDrift() {
|
|
@@ -718,7 +729,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
718
729
|
|
|
719
730
|
const engineering = path.join(repo, "docs", "ENGINEERING.md");
|
|
720
731
|
const initial = fs.readFileSync(engineering, "utf8");
|
|
721
|
-
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.
|
|
732
|
+
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=4\.1\.0 -->/;
|
|
722
733
|
const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
|
|
723
734
|
assert(startPattern.test(initial), "new projects should include a versioned managed workflow marker");
|
|
724
735
|
assert(initial.includes(endMarker), "new projects should include the managed workflow end marker");
|
|
@@ -737,7 +748,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
737
748
|
const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
|
|
738
749
|
const dryResult = JSON.parse(dryRun.stdout).results[0];
|
|
739
750
|
assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
|
|
740
|
-
assert(dryResult.managedWorkflow.version === "4.
|
|
751
|
+
assert(dryResult.managedWorkflow.version === "4.1.0", "dry-run should expose the target workflow version");
|
|
741
752
|
assert(dryResult.actions.some(item => item.action === "would-update" && item.path === "docs/ENGINEERING.md"), "dry-run should plan the managed body update");
|
|
742
753
|
assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
|
|
743
754
|
|
|
@@ -747,14 +758,14 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
747
758
|
const updatedEnd = updated.indexOf(endMarker) + endMarker.length;
|
|
748
759
|
assert(updated.slice(0, updatedStart) === outsideBefore, "sync must preserve frontmatter and content before the managed block byte-for-byte");
|
|
749
760
|
assert(updated.slice(updatedEnd) === outsideAfter, "sync must preserve content after the managed block byte-for-byte");
|
|
750
|
-
assert(updated.includes("version=4.
|
|
761
|
+
assert(updated.includes("version=4.1.0"), "sync should install the current managed workflow version");
|
|
751
762
|
assert(updated.includes("## Delivery levels"), "sync should refresh stale managed workflow content");
|
|
752
763
|
|
|
753
764
|
fillRequiredAccess(repo);
|
|
754
765
|
const status = run("node", [cli, "status", "--projects", repo, "--json"]);
|
|
755
766
|
const statusResult = JSON.parse(status.stdout).results[0];
|
|
756
767
|
assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
|
|
757
|
-
assert(statusResult.managedWorkflow.version === "4.
|
|
768
|
+
assert(statusResult.managedWorkflow.version === "4.1.0", "status should expose the installed managed workflow version");
|
|
758
769
|
|
|
759
770
|
const beforeSecondSync = fs.readFileSync(engineering, "utf8");
|
|
760
771
|
const second = run("node", [cli, "sync", "--projects", repo, "--json"]);
|
|
@@ -771,7 +782,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
|
|
|
771
782
|
const start = current.indexOf("<!-- auto-coding-skill:managed-workflow:start");
|
|
772
783
|
const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
|
|
773
784
|
const end = current.indexOf(endMarker) + endMarker.length;
|
|
774
|
-
const legacyNote = "\n## Legacy project
|
|
785
|
+
const legacyNote = "\n## Legacy project facts\n\nKeep this project note exactly.\n";
|
|
775
786
|
const legacy = `${current.slice(0, start)}${legacyNote}${current.slice(end)}`;
|
|
776
787
|
writeFile(engineering, legacy);
|
|
777
788
|
|
|
@@ -782,7 +793,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
|
|
|
782
793
|
assert(dryResult.actions.find(item => item.path === "docs/ENGINEERING.md")?.detail.includes("preserved-custom"), "custom legacy action should be labeled preserved-custom");
|
|
783
794
|
run("node", [cli, "sync", "--projects", repo]);
|
|
784
795
|
const migrated = fs.readFileSync(engineering, "utf8");
|
|
785
|
-
assert(migrated.includes("version=4.
|
|
796
|
+
assert(migrated.includes("version=4.1.0"), "legacy migration should insert the current managed workflow");
|
|
786
797
|
assert(migrated.includes(legacyNote), "legacy migration must preserve the complete existing body");
|
|
787
798
|
const migratedStart = migrated.indexOf("<!-- auto-coding-skill:managed-workflow:start");
|
|
788
799
|
const migratedEnd = migrated.indexOf(endMarker) + endMarker.length;
|
|
@@ -847,44 +858,16 @@ function testMalformedManagedMarkersFailClosed() {
|
|
|
847
858
|
}
|
|
848
859
|
}
|
|
849
860
|
|
|
850
|
-
function
|
|
851
|
-
const repo = tmpdir("skill-
|
|
861
|
+
function testPartialSkillSyncIsRejectedWithoutWrites() {
|
|
862
|
+
const repo = tmpdir("partial-skill-sync");
|
|
852
863
|
run("git", ["init", "-q"], { cwd: repo });
|
|
853
864
|
run("node", [cli, "init"], { cwd: repo });
|
|
854
865
|
run("node", [cli, "sync", "--projects", repo]);
|
|
855
866
|
const skill = path.join(repo, ".agents", "skills", "auto-coding-skill", "SKILL.md");
|
|
856
|
-
const agent = path.join(repo, ".agents", "agents", "explorer.toml");
|
|
857
|
-
const engineering = path.join(repo, "docs", "ENGINEERING.md");
|
|
858
|
-
const launcher = path.join(repo, "docs", "tools", "autopipeline", "ap.py");
|
|
859
867
|
writeFile(skill, "stale skill\n");
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
const untouched = new Map([[agent, fs.readFileSync(agent)], [engineering, fs.readFileSync(engineering)], [launcher, fs.readFileSync(launcher)]]);
|
|
864
|
-
|
|
865
|
-
const dryRun = run("node", [cli, "sync", "--projects", repo, "--components", "skill", "--dry-run", "--json"]);
|
|
866
|
-
const dryResult = JSON.parse(dryRun.stdout).results[0];
|
|
867
|
-
assert(dryResult.components === "skill", "skill-only dry-run should expose its component scope");
|
|
868
|
-
assert(dryResult.actions.length === 1 && dryResult.actions[0].path === ".agents/skills/auto-coding-skill", "skill-only dry-run must plan only the skill directory");
|
|
869
|
-
assert(fs.readFileSync(skill, "utf8") === "stale skill\n", "skill-only dry-run must not write the skill");
|
|
870
|
-
|
|
871
|
-
run("node", [cli, "sync", "--projects", repo, "--components", "skill"]);
|
|
872
|
-
assert(fs.readFileSync(skill, "utf8").includes("# Auto Coding Skill"), "skill-only sync should refresh the managed skill");
|
|
873
|
-
for (const [file, content] of untouched) {
|
|
874
|
-
assert(fs.readFileSync(file).equals(content), `skill-only sync must not touch ${file}`);
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
const invalid = run("node", [cli, "sync", "--projects", repo, "--components", "docs"], { check: false });
|
|
878
|
-
assert(invalid.status !== 0 && invalid.stderr.includes("--components"), "sync should reject unknown component scopes");
|
|
879
|
-
const conflicting = run("node", [cli, "sync", "--projects", repo, "--components", "skill", "--reset-agent-models"], { check: false });
|
|
880
|
-
assert(conflicting.status !== 0, "skill-only sync should reject irrelevant agent reset options");
|
|
881
|
-
|
|
882
|
-
writeFile(skill, "legacy-task-sentinel\n");
|
|
883
|
-
writeFile(path.join(repo, ".git", "auto-coding-skill", "tasks", "T-LEGACY.json"), JSON.stringify({ schema: 1, task_id: "T-LEGACY" }));
|
|
884
|
-
const blocked = run("node", [cli, "sync", "--projects", repo, "--components", "skill"], { check: false });
|
|
885
|
-
assert(blocked.status !== 0 && blocked.stderr.includes("schema < 3"), "skill-only sync must block registered legacy tasks");
|
|
886
|
-
assert(blocked.stderr.includes("3.x runtime") && blocked.stderr.includes("lifecycle semantics"), "legacy task error should give safe completion guidance");
|
|
887
|
-
assert(fs.readFileSync(skill, "utf8") === "legacy-task-sentinel\n", "blocked skill-only sync must not write the skill");
|
|
868
|
+
const rejected = run("node", [cli, "sync", "--projects", repo, "--components", "skill"], { check: false });
|
|
869
|
+
assert(rejected.status !== 0 && rejected.stderr.includes("removed in 4.1"), "partial sync must explain whole-install convergence");
|
|
870
|
+
assert(fs.readFileSync(skill, "utf8") === "stale skill\n", "rejected partial sync must not write the skill");
|
|
888
871
|
}
|
|
889
872
|
|
|
890
873
|
function testLegacyTaskPreflightRejectsWholeBatchAtomically() {
|
|
@@ -900,7 +883,7 @@ function testLegacyTaskPreflightRejectsWholeBatchAtomically() {
|
|
|
900
883
|
writeFile(firstSkill, "first-project-sentinel\n");
|
|
901
884
|
writeFile(secondAgent, `${fs.readFileSync(secondAgent, "utf8")}\n# second-project-sentinel\n`);
|
|
902
885
|
const secondAgentBefore = fs.readFileSync(secondAgent);
|
|
903
|
-
writeFile(path.join(second, ".git", "auto-coding-skill", "tasks", "T-V3.json"), JSON.stringify({ schema:
|
|
886
|
+
writeFile(path.join(second, ".git", "auto-coding-skill", "tasks", "T-V3.json"), JSON.stringify({ schema: 3, task_id: "T-V3", state: "active" }));
|
|
904
887
|
|
|
905
888
|
const result = run("node", [cli, "sync", "--projects", `${first},${second}`], { check: false });
|
|
906
889
|
assert(result.status !== 0 && result.stderr.includes("entire sync batch"), "one legacy task should reject the complete multi-project batch");
|
|
@@ -908,13 +891,13 @@ function testLegacyTaskPreflightRejectsWholeBatchAtomically() {
|
|
|
908
891
|
assert(fs.readFileSync(secondAgent).equals(secondAgentBefore), "batch preflight must not write the project containing the legacy task");
|
|
909
892
|
}
|
|
910
893
|
|
|
911
|
-
function
|
|
894
|
+
function testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules() {
|
|
912
895
|
const repo = tmpdir("managed-agents-document");
|
|
913
896
|
run("node", [cli, "init"], { cwd: repo });
|
|
914
897
|
run("node", [cli, "sync", "--projects", repo]);
|
|
915
898
|
const agents = path.join(repo, "AGENTS.md");
|
|
916
899
|
const initial = fs.readFileSync(agents, "utf8");
|
|
917
|
-
assert(initial.includes("managed-agents:start version=4.
|
|
900
|
+
assert(initial.includes("managed-agents:start version=4.1.0"), "new projects should receive the versioned root AGENTS block");
|
|
918
901
|
|
|
919
902
|
const custom = [
|
|
920
903
|
"# Project rules",
|
|
@@ -927,13 +910,19 @@ function testManagedAgentsMigrationPreservesCustomRules() {
|
|
|
927
910
|
const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
|
|
928
911
|
const plan = JSON.parse(dryRun.stdout).results[0].managedAgentsDocument;
|
|
929
912
|
assert(plan.state === "legacy-custom", `unmarked custom AGENTS should be migrated: ${dryRun.stdout}`);
|
|
930
|
-
assert(plan.migrations.includes("agents-
|
|
913
|
+
assert(plan.migrations.includes("agents-whole-file-replacement"), "AGENTS should use the whole-file convergence migration");
|
|
914
|
+
const dryActions = JSON.parse(dryRun.stdout).results[0].actions;
|
|
915
|
+
assert(dryActions.some(item => item.action === "would-archive"), "dry-run should expose the historical AGENTS archive");
|
|
931
916
|
|
|
932
917
|
run("node", [cli, "sync", "--projects", repo]);
|
|
933
918
|
const migrated = fs.readFileSync(agents, "utf8");
|
|
934
|
-
assert(migrated.includes("managed-agents:start version=4.
|
|
935
|
-
assert(migrated.includes("Preserve this repository-specific rule exactly."), "AGENTS
|
|
919
|
+
assert(migrated.includes("managed-agents:start version=4.1.0"), "AGENTS migration should install the current managed block");
|
|
920
|
+
assert(!migrated.includes("Preserve this repository-specific rule exactly."), "root AGENTS must contain no project-specific tail");
|
|
936
921
|
assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
|
|
922
|
+
const canonical = fs.readFileSync(path.join(repoRoot, "cli", "assets", "skill", "data", "templates", "bridges", "AGENTS.md"), "utf8");
|
|
923
|
+
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.0.md");
|
|
925
|
+
assert(fs.readFileSync(archive, "utf8").includes("Preserve this repository-specific rule exactly."), "previous AGENTS content must be archived once");
|
|
937
926
|
const stable = fs.readFileSync(agents);
|
|
938
927
|
run("node", [cli, "sync", "--projects", repo]);
|
|
939
928
|
assert(fs.readFileSync(agents).equals(stable), "managed AGENTS sync should be idempotent");
|
|
@@ -949,14 +938,14 @@ function testUnknownWorkflowConflictFailsWholeBatchBeforeWrites() {
|
|
|
949
938
|
}
|
|
950
939
|
const firstSkill = path.join(first, ".agents", "skills", "auto-coding-skill", "SKILL.md");
|
|
951
940
|
writeFile(firstSkill, "batch-sentinel\n");
|
|
952
|
-
const
|
|
953
|
-
fs.appendFileSync(
|
|
941
|
+
const secondEngineering = path.join(second, "docs", "ENGINEERING.md");
|
|
942
|
+
fs.appendFileSync(secondEngineering, "\nHigh-risk changes must run the real full gate before push.\n");
|
|
954
943
|
|
|
955
944
|
const status = run("node", [cli, "status", "--projects", second, "--json"], { check: false });
|
|
956
945
|
assert(status.status !== 0, "status must be non-ok for an unknown conflicting workflow rule");
|
|
957
|
-
const statusPlan = JSON.parse(status.stdout).results[0].
|
|
946
|
+
const statusPlan = JSON.parse(status.stdout).results[0].managedWorkflow;
|
|
958
947
|
assert(statusPlan.state === "conflict", `status should expose the document conflict: ${status.stdout}`);
|
|
959
|
-
assert(statusPlan.conflicts[0].file === "
|
|
948
|
+
assert(statusPlan.conflicts[0].file === "docs/ENGINEERING.md" && statusPlan.conflicts[0].line > 0, "status conflict should include file and line");
|
|
960
949
|
|
|
961
950
|
const sync = run("node", [cli, "sync", "--projects", `${first},${second}`], { check: false });
|
|
962
951
|
assert(sync.status !== 0 && sync.stderr.includes("entire sync batch before writes"), "one unknown conflict must reject the complete batch");
|
|
@@ -976,15 +965,41 @@ function testEngineeringMarkerBoundaryIsNormalized() {
|
|
|
976
965
|
assert(normalized.includes(`${marker}\n# Project-specific workflow\n`), "sync should normalize a heading glued to the managed end marker");
|
|
977
966
|
}
|
|
978
967
|
|
|
968
|
+
function testEngineeringFrameworkAllowsProjectFactsButRejectsDuplicateWorkflow() {
|
|
969
|
+
const repo = tmpdir("engineering-framework");
|
|
970
|
+
run("node", [cli, "init"], { cwd: repo });
|
|
971
|
+
run("node", [cli, "sync", "--projects", repo]);
|
|
972
|
+
fillRequiredAccess(repo);
|
|
973
|
+
const engineering = path.join(repo, "docs", "ENGINEERING.md");
|
|
974
|
+
fs.appendFileSync(engineering, "\n# Project Facts\n\n## Repository boundaries\n\n- backend owns APIs.\n");
|
|
975
|
+
const projectFactsStatus = run("node", [cli, "status", "--projects", repo, "--json"]);
|
|
976
|
+
assert(JSON.parse(projectFactsStatus.stdout).results[0].managedWorkflow.state === "current", "project fact sections should remain outside the managed block");
|
|
977
|
+
|
|
978
|
+
fs.appendFileSync(engineering, "\n## Delivery flow\n\n1. Known obsolete workflow.\n");
|
|
979
|
+
const migration = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
|
|
980
|
+
const migrationResult = JSON.parse(migration.stdout).results[0];
|
|
981
|
+
assert(migrationResult.managedWorkflow.state === "stale", "known duplicate sections should use controlled migration");
|
|
982
|
+
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.0")), "controlled section cleanup should archive the previous ENGINEERING file");
|
|
984
|
+
run("node", [cli, "sync", "--projects", repo]);
|
|
985
|
+
assert(!fs.readFileSync(engineering, "utf8").includes("Known obsolete workflow"), "known duplicate workflow section should be removed");
|
|
986
|
+
|
|
987
|
+
fs.appendFileSync(engineering, "\n## Team workflow\n\n1. Unknown competing workflow.\n");
|
|
988
|
+
const duplicateStatus = run("node", [cli, "status", "--projects", repo, "--json"], { check: false });
|
|
989
|
+
assert(duplicateStatus.status !== 0, "duplicate workflow sections must make status non-current");
|
|
990
|
+
const plan = JSON.parse(duplicateStatus.stdout).results[0].managedWorkflow;
|
|
991
|
+
assert(plan.state === "conflict" && plan.conflicts.some(item => item.ruleId === "duplicate-managed-workflow-section"), "duplicate workflow conflict should identify the docs framework rule");
|
|
992
|
+
}
|
|
993
|
+
|
|
979
994
|
function testReleaseVersionMarkersStayInSync() {
|
|
980
|
-
const expected = "4.
|
|
995
|
+
const expected = "4.1.0";
|
|
981
996
|
const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"));
|
|
982
997
|
const lock = JSON.parse(fs.readFileSync(path.join(repoRoot, "package-lock.json"), "utf8"));
|
|
983
998
|
const policy = JSON.parse(fs.readFileSync(
|
|
984
999
|
path.join(repoRoot, "src", "auto-coding-skill", "data", "policies", "workflow-migrations-v1.json"),
|
|
985
1000
|
"utf8",
|
|
986
1001
|
));
|
|
987
|
-
assert(pkg.version === expected, "package version must match the 4.
|
|
1002
|
+
assert(pkg.version === expected, "package version must match the 4.1.0 release");
|
|
988
1003
|
assert(lock.version === expected && lock.packages[""].version === expected, "package-lock versions must match");
|
|
989
1004
|
assert(policy.managed_versions.engineering === expected && policy.managed_versions.agents === expected, "managed workflow versions must match");
|
|
990
1005
|
for (const rel of [
|
|
@@ -1011,7 +1026,7 @@ testInvalidManagedAgentModelsFailStatusAndAreDroppedOnSync();
|
|
|
1011
1026
|
testModelTextInsideInstructionsIsNotPromotedToOverride();
|
|
1012
1027
|
testCommandSpecificArgumentsAreRejectedBeforeWrites();
|
|
1013
1028
|
testBridgeIsGeneric();
|
|
1014
|
-
|
|
1029
|
+
testUpgradeCleansAllManagedSkillExtras();
|
|
1015
1030
|
testOptionalDocsAndLegacyToolsDoNotCauseDrift();
|
|
1016
1031
|
testOptionalScaffoldIsOnDemandAndIdempotent();
|
|
1017
1032
|
testTestingScaffoldMatchesCheckMatrixSchema();
|
|
@@ -1027,11 +1042,12 @@ testManagedEngineeringSyncIsControlledAndIdempotent();
|
|
|
1027
1042
|
testLegacyEngineeringMigrationPreservesExistingBody();
|
|
1028
1043
|
testOfficialLegacyEngineeringBodyIsReplacedWithoutDuplication();
|
|
1029
1044
|
testMalformedManagedMarkersFailClosed();
|
|
1030
|
-
|
|
1045
|
+
testPartialSkillSyncIsRejectedWithoutWrites();
|
|
1031
1046
|
testLegacyTaskPreflightRejectsWholeBatchAtomically();
|
|
1032
|
-
|
|
1047
|
+
testManagedAgentsMigrationReplacesWholeFileAndArchivesPreviousRules();
|
|
1033
1048
|
testUnknownWorkflowConflictFailsWholeBatchBeforeWrites();
|
|
1034
1049
|
testEngineeringMarkerBoundaryIsNormalized();
|
|
1050
|
+
testEngineeringFrameworkAllowsProjectFactsButRejectsDuplicateWorkflow();
|
|
1035
1051
|
testReleaseVersionMarkersStayInSync();
|
|
1036
1052
|
|
|
1037
1053
|
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.
|
|
3
|
+
"version": "4.1.0",
|
|
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": {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Closure Log
|
|
2
|
-
|
|
3
|
-
Record one development closure per task. `DEV-CLOSED` means the fast local gate
|
|
4
|
-
passed and the code was pushed. Jenkins, deployment, and owner acceptance happen
|
|
5
|
-
later and do not change the coding closure.
|
|
6
|
-
|
|
7
|
-
## <TASK_ID> — <Title> — YYYY-MM-DD HH:MM
|
|
8
|
-
|
|
9
|
-
- Commit:
|
|
10
|
-
- Effective profile: micro | standard | high-risk
|
|
11
|
-
- Fast local gate:
|
|
12
|
-
- Target push:
|
|
13
|
-
- External build/deploy/acceptance: owner-managed
|
|
14
|
-
- Result: DEV-CLOSED
|
|
15
|
-
- Follow-up:
|
|
16
|
-
|
|
17
|
-
---
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Taskbook
|
|
2
|
-
|
|
3
|
-
Keep active tasks here. Archive closed history when the configured ledger budget
|
|
4
|
-
is reached. Add DD/ADR or other optional documents only when classification says
|
|
5
|
-
they are useful.
|
|
6
|
-
|
|
7
|
-
## Task T0001 — <Title>
|
|
8
|
-
|
|
9
|
-
- Status: Planned | Designing | Implementing | Checking | Pushed | Blocked
|
|
10
|
-
- Scope:
|
|
11
|
-
- Orchestrator:
|
|
12
|
-
- Owning fixer:
|
|
13
|
-
- Registered worktree / branch:
|
|
14
|
-
- Owned paths:
|
|
15
|
-
- Depends on integrated tasks:
|
|
16
|
-
- Reviewer / stable diff:
|
|
17
|
-
- Review verdict: pending | approved | changes-requested
|
|
18
|
-
- Non-goals:
|
|
19
|
-
- Effective profile: micro | standard | high-risk
|
|
20
|
-
- Classification reasons:
|
|
21
|
-
- Existing owner / reuse points:
|
|
22
|
-
- Minimal design:
|
|
23
|
-
- Development acceptance criteria:
|
|
24
|
-
- Fast local gate evidence:
|
|
25
|
-
- Commit / target push:
|
|
26
|
-
- Follow-up:
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
Append new active tasks below.
|