@elvis1513/auto-coding-skill 2.1.1 → 2.1.2

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 CHANGED
@@ -22,6 +22,11 @@ npm install -g git+https://github.com/elvis1513/auto-coding-skill.git
22
22
 
23
23
  ## Release Notes
24
24
 
25
+ ### v2.1.2
26
+
27
+ - Fixed `docs-ledger-archive` so settled task states such as `Superseded by ...`, `External Dependency`, `Deployed`, `Completed`, `Archived`, `Local PASS`, and `Local Verified` are recognized as archivable instead of blocking physical ledger cleanup.
28
+ - Added a package-safe regression test for those docs ledger archive states.
29
+
25
30
  ### v2.1.1
26
31
 
27
32
  - Removed client-specific init targets from the npm CLI; installs now target the shared `.agents` layout only.
@@ -1880,18 +1880,31 @@ _TASK_RESULT_RE = re.compile(r"(?:^|\n)\s*-\s*Result\s*[::]\s*(DEV-CLOSED|PASS
1880
1880
  _TASK_STATUS_RE = re.compile(r"(?:^|\n)\s*-\s*(?:状态|Status)\s*[::]\s*([^|\n]+)", re.IGNORECASE)
1881
1881
  _DESIGN_TASK_FILE_RE = re.compile(r"^([Tt][A-Za-z0-9]*\d+(?:-\d+)?)")
1882
1882
  _CLOSED_TASK_STATUSES = {
1883
+ "archived",
1884
+ "completed",
1885
+ "deployed",
1883
1886
  "done",
1884
1887
  "closed",
1885
1888
  "dev-closed",
1889
+ "external",
1886
1890
  "pass",
1887
1891
  "passed",
1888
1892
  "fail",
1889
1893
  "failed",
1890
1894
  "partial",
1895
+ "superseded",
1891
1896
  "完成",
1892
1897
  "已完成",
1893
1898
  "关闭",
1894
1899
  "已关闭",
1900
+ "已部署",
1901
+ "已归档",
1902
+ "外部依赖",
1903
+ "已转外部依赖",
1904
+ "被替代",
1905
+ "已替代",
1906
+ "废弃",
1907
+ "已废弃",
1895
1908
  }
1896
1909
 
1897
1910
 
@@ -1958,8 +1971,16 @@ def _is_closed_task_section(section: dict) -> bool:
1958
1971
  if not status_match:
1959
1972
  return False
1960
1973
  status = status_match.group(1).strip()
1961
- status = re.split(r"[\s/,,;;。]+", status, maxsplit=1)[0].strip().lower()
1962
- return status in _CLOSED_TASK_STATUSES
1974
+ normalized = re.sub(r"\s+", " ", status).strip().lower()
1975
+ first_token = re.split(r"[\s/,,;;。]+", normalized, maxsplit=1)[0].strip()
1976
+ if first_token in _CLOSED_TASK_STATUSES or normalized in _CLOSED_TASK_STATUSES:
1977
+ return True
1978
+ return normalized.startswith((
1979
+ "local pass",
1980
+ "local verified",
1981
+ "本地通过",
1982
+ "本地验证通过",
1983
+ ))
1963
1984
 
1964
1985
 
1965
1986
  def _append_archive_sections(path: Path, title: str, period: str, sections: list[dict]) -> bool:
@@ -136,11 +136,55 @@ function testUpgradeCleansManagedBridgeExtrasOnly() {
136
136
  assert(exists(path.join(repo, ".agents", "skills", "auto-coding-skill", "custom.txt")), "non-managed extra should remain");
137
137
  }
138
138
 
139
+ function testLedgerArchiveRecognizesSettledStatuses() {
140
+ const repo = tmpdir("ledger-status");
141
+ run("git", ["init", "-q"], { cwd: repo });
142
+ run("node", [cli, "init", "--force"], { cwd: repo });
143
+ run("node", [cli, "sync", "--projects", repo]);
144
+ writeFile(path.join(repo, "docs", "tasks", "taskbook.md"), [
145
+ "# Taskbook",
146
+ "",
147
+ "## Task T001 - superseded work",
148
+ "- Status: Superseded by T002",
149
+ "",
150
+ "## Task T002 - external dependency",
151
+ "- Status: External Dependency",
152
+ "",
153
+ "## Task T003 - deployed work",
154
+ "- Status: Deployed / Jenkins #123 SUCCESS",
155
+ "",
156
+ "## Task T004 - local pass",
157
+ "- Status: Local PASS,待生产迁移窗口",
158
+ "",
159
+ ].join("\n"));
160
+ writeFile(path.join(repo, "docs", "tasks", "closure-log.md"), [
161
+ "# Closure Log",
162
+ "",
163
+ "## T001 - superseded work",
164
+ "- Result: DEV-CLOSED",
165
+ "",
166
+ "## T002 - external dependency",
167
+ "- Result: PARTIAL",
168
+ "",
169
+ "## T003 - deployed work",
170
+ "- Result: PASS",
171
+ "",
172
+ "## T004 - local pass",
173
+ "- Result: DEV-CLOSED",
174
+ "",
175
+ ].join("\n"));
176
+ const result = run("python3", [assetAp, "--repo", repo, "docs-ledger-archive", "--plan", "--period", "2026-06", "--json"]);
177
+ const parsed = JSON.parse(result.stdout);
178
+ assert(parsed.counts.taskbook_sections === 4, `settled task sections should archive: ${result.stdout}`);
179
+ assert(parsed.active_task_conflicts.length === 0, `settled statuses should not conflict: ${result.stdout}`);
180
+ }
181
+
139
182
  testPreflightAvoidsPartialInstall();
140
183
  testDestVariants();
141
184
  testSyncCreatesScaffoldAndStatusConverges();
142
185
  testForcePreservesCustomAgents();
143
186
  testBridgeIsGeneric();
144
187
  testUpgradeCleansManagedBridgeExtrasOnly();
188
+ testLedgerArchiveRecognizesSettledStatuses();
145
189
 
146
190
  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": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "CLI installer for a generic .agents engineering workflow with optional CI/Jenkins and target-environment verification.",
5
5
  "type": "module",
6
6
  "bin": {