@elvis1513/auto-coding-skill 2.2.0 → 3.0.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.
@@ -27,6 +27,7 @@ def run(repo: Path, *args: str) -> None:
27
27
  def base_config() -> dict:
28
28
  return {
29
29
  "workflow": {"mode": "dev", "profile": "auto"},
30
+ "concurrency": {"isolation": "legacy"},
30
31
  "project": {"name": "profile-test"},
31
32
  "commands": {
32
33
  "gate_changed": "true",
@@ -162,9 +162,10 @@ function testMinimalSyncConvergesWithinBudget() {
162
162
  const files = listProjectFiles(repo);
163
163
  const lines = files.reduce((total, file) => total + fs.readFileSync(file, "utf8").split(/\r?\n/).length, 0);
164
164
  assert(files.length <= 20, `minimal scaffold file budget exceeded: ${files.length}`);
165
- assert(lines <= 5500, `minimal scaffold line budget exceeded: ${lines}`);
165
+ assert(lines <= 8200, `minimal scaffold line budget exceeded: ${lines}`);
166
166
  const engineering = fs.readFileSync(path.join(repo, "docs", "ENGINEERING.md"), "utf8");
167
167
  assert(engineering.includes("profile: \"auto\""), "engineering should enable adaptive profiles");
168
+ assert(engineering.includes("isolation: \"worktree\""), "engineering should require task worktree isolation");
168
169
  assert(engineering.includes("target_env_required: false"), "target verification should be opt-in in generic scaffold");
169
170
  assert(engineering.includes(`name: "${path.basename(repo)}"`), "project name should be initialized automatically");
170
171
  assertStatusOk(repo);
@@ -464,19 +465,48 @@ function testLedgerArchiveRecognizesSettledStatuses() {
464
465
  "## Task T002 - external dependency", "- Status: External Dependency", "",
465
466
  "## Task T003 - deployed work", "- Status: Deployed / Jenkins #123 SUCCESS", "",
466
467
  "## Task T004 - local pass", "- Status: Local PASS,待生产迁移窗口", "",
468
+ "## Task T005 - markdown done", "- Status: `Done / PASS`", "",
469
+ "## Task T006 - localized done", "- 状态:Done(PASS)", "",
467
470
  ].join("\n"));
468
471
  writeFile(path.join(repo, "docs", "tasks", "closure-log.md"), [
469
472
  "# Closure Log", "", "## T001 - superseded work", "- Result: DEV-CLOSED", "",
470
473
  "## T002 - external dependency", "- Result: PARTIAL", "",
471
474
  "## T003 - deployed work", "- Result: PASS", "",
472
475
  "## T004 - local pass", "- Result: DEV-CLOSED", "",
476
+ "## T005 - markdown done", "- Result: PASS", "",
477
+ "## T006 - localized done", "- Result: PASS", "",
473
478
  ].join("\n"));
474
479
  const result = run("python3", [assetAp, "--repo", repo, "docs-ledger-archive", "--plan", "--period", "2026-06", "--json"]);
475
480
  const parsed = JSON.parse(result.stdout);
476
- assert(parsed.counts.taskbook_sections === 4, `settled task sections should archive: ${result.stdout}`);
481
+ assert(parsed.counts.taskbook_sections === 6, `settled task sections should archive: ${result.stdout}`);
477
482
  assert(parsed.active_task_conflicts.length === 0, `settled statuses should not conflict: ${result.stdout}`);
478
483
  }
479
484
 
485
+ function testLedgerArchiveUpdatesExistingPeriodIndex() {
486
+ const repo = tmpdir("ledger-index-update");
487
+ run("git", ["init", "-q"], { cwd: repo });
488
+ run("node", [cli, "init", "--force"], { cwd: repo });
489
+ run("node", [cli, "sync", "--projects", repo]);
490
+
491
+ const taskbook = path.join(repo, "docs", "tasks", "taskbook.md");
492
+ const closure = path.join(repo, "docs", "tasks", "closure-log.md");
493
+ const designDir = path.join(repo, "docs", "design");
494
+ writeFile(taskbook, "# Taskbook\n\n## Task T001 - first\n- Status: Done\n");
495
+ writeFile(closure, "# Closure Log\n\n## T001 - first\n- Result: PASS\n");
496
+ writeFile(path.join(designDir, "T001-first.md"), "# T001\n");
497
+ run("python3", [assetAp, "--repo", repo, "docs-ledger-archive", "--write", "--period", "2026-06", "--json"]);
498
+
499
+ fs.appendFileSync(taskbook, "\n## Task T002 - second\n- Status: `Done / PASS`\n");
500
+ fs.appendFileSync(closure, "\n## T002 - second\n- Result: PASS\n");
501
+ writeFile(path.join(designDir, "T002-second.md"), "# T002\n");
502
+ run("python3", [assetAp, "--repo", repo, "docs-ledger-archive", "--write", "--period", "2026-06", "--json"]);
503
+
504
+ const index = fs.readFileSync(path.join(repo, "docs", "tasks", "archive-index.md"), "utf8");
505
+ assert((index.match(/^## 2026-06$/gm) || []).length === 1, `archive period should be unique: ${index}`);
506
+ assert(index.includes("(2 sections)"), `archive index should report cumulative task/closure counts: ${index}`);
507
+ assert(index.includes("(2 files)"), `archive index should report cumulative design count: ${index}`);
508
+ }
509
+
480
510
  testPreflightAvoidsPartialInstall();
481
511
  testDestVariants();
482
512
  testLauncherFallsBackToGlobalRuntime();
@@ -497,5 +527,6 @@ testUpgradePrefersModernProjectAssetsAndIgnoresRetiredTemplates();
497
527
  testUpgradeInitializesNewEngineeringDefaults();
498
528
  testUpgradeInstallsRuntimeRequiredByLauncher();
499
529
  testLedgerArchiveRecognizesSettledStatuses();
530
+ testLedgerArchiveUpdatesExistingPeriodIndex();
500
531
 
501
532
  console.log("cli-installer-regression-ok");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elvis1513/auto-coding-skill",
3
- "version": "2.2.0",
4
- "description": "CLI installer for a generic .agents engineering workflow with optional CI/Jenkins and target-environment verification.",
3
+ "version": "3.0.0",
4
+ "description": "CLI installer for an isolated .agents engineering workflow with parallel Git worktrees, adaptive gates, safe integration, and verified closure.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "autocoding": "cli/src/index.js"
@@ -15,7 +15,7 @@
15
15
  "LICENSE"
16
16
  ],
17
17
  "scripts": {
18
- "test": "node -c cli/src/index.js && node -c cli/src/sync-assets.js && node -c cli/tests/index.test.js && node cli/tests/index.test.js && python3 -c \"import ast, pathlib; files = ['cli/assets/skill/scripts/ap.py', 'cli/assets/skill/scripts/core.py', 'cli/assets/skill/scripts/http_checks.py', 'cli/assets/skill/scripts/scaffold_templates.py']; [ast.parse(pathlib.Path(rel).read_text(encoding='utf-8'), filename=rel, feature_version=(3, 11)) for rel in files]; print('python311-asset-grammar-ok')\" && python3 -m py_compile cli/assets/skill/scripts/ap.py cli/assets/skill/scripts/core.py cli/assets/skill/scripts/http_checks.py cli/assets/skill/scripts/scaffold_templates.py && python3 cli/tests/ap_profiles_test.py && python3 -c \"import pathlib, tomllib; files = sorted(pathlib.Path('cli/assets/agents').glob('*.toml')); [tomllib.loads(path.read_text(encoding='utf-8')) for path in files]; print('asset-agent-toml-ok')\" && find cli -type d -name '__pycache__' -prune -exec rm -rf {} +",
18
+ "test": "node -c cli/src/index.js && node -c cli/src/sync-assets.js && node -c cli/tests/index.test.js && node cli/tests/index.test.js && python3 -c \"import ast, pathlib; files = ['cli/assets/skill/scripts/ap.py', 'cli/assets/skill/scripts/core.py', 'cli/assets/skill/scripts/http_checks.py', 'cli/assets/skill/scripts/scaffold_templates.py']; [ast.parse(pathlib.Path(rel).read_text(encoding='utf-8'), filename=rel, feature_version=(3, 11)) for rel in files]; print('python311-asset-grammar-ok')\" && python3 -m py_compile cli/assets/skill/scripts/ap.py cli/assets/skill/scripts/core.py cli/assets/skill/scripts/http_checks.py cli/assets/skill/scripts/scaffold_templates.py && python3 cli/tests/ap_profiles_test.py && python3 cli/tests/ap_concurrency_test.py && python3 -c \"import pathlib, tomllib; files = sorted(pathlib.Path('cli/assets/agents').glob('*.toml')); [tomllib.loads(path.read_text(encoding='utf-8')) for path in files]; print('asset-agent-toml-ok')\" && find cli -type d -name '__pycache__' -prune -exec rm -rf {} +",
19
19
  "test:src": "python3 -c \"import ast, pathlib; files = ['src/auto-coding-skill/scripts/ap.py', 'src/auto-coding-skill/scripts/core.py', 'src/auto-coding-skill/scripts/http_checks.py', 'src/auto-coding-skill/scripts/scaffold_templates.py']; [ast.parse(pathlib.Path(rel).read_text(encoding='utf-8'), filename=rel, feature_version=(3, 11)) for rel in files]; print('python311-src-grammar-ok')\" && python3 -m py_compile src/auto-coding-skill/scripts/ap.py src/auto-coding-skill/scripts/core.py src/auto-coding-skill/scripts/http_checks.py src/auto-coding-skill/scripts/scaffold_templates.py && python3 -c \"import pathlib, tomllib; files = sorted(pathlib.Path('src/agents').glob('*.toml')); [tomllib.loads(path.read_text(encoding='utf-8')) for path in files]; print('src-agent-toml-ok')\" && find src -type d -name '__pycache__' -prune -exec rm -rf {} +",
20
20
  "check:assets": "node cli/src/sync-assets.js --check",
21
21
  "sync-assets": "node cli/src/sync-assets.js",