@elvis1513/auto-coding-skill 4.3.0 → 4.3.1

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.
@@ -12,16 +12,23 @@ This directory is the project-owned inbox for candidate defects or capability
12
12
  gaps in the shared `auto-coding-skill`. It is not the project's business bug
13
13
  list and it does not make a reported issue an accepted shared defect.
14
14
 
15
- Create a report only after checking the project/Skill boundary. Project-specific
16
- `risk.rules`, validation routes, access values, structure policy, and business
17
- constraints stay in project configuration unless the same behavior is reproduced
18
- in managed Skill code or independently observed in another project.
15
+ Route the observation before writing a report:
16
+
17
+ | Observation | Project-owned destination |
18
+ | --- | --- |
19
+ | Risk rules, commands, validation routes, access values, structure policy, budgets, or project preferences | `docs/project/auto-coding-skill.yaml` |
20
+ | Durable product, repository, runtime, or operating facts | `docs/project/*.md` |
21
+ | A defect or capability gap reproducible in managed defaults, scripts, agents, CLI, or installer | `docs/skill-feedback/reports/*.md` |
22
+
23
+ Project configuration may intentionally override managed defaults. A preference
24
+ that is correct for only this project is not shared-Skill feedback.
19
25
 
20
26
  ## Record a candidate
21
27
 
22
28
  1. Copy `_TEMPLATE-SKILL-FEEDBACK.md` into `reports/`.
23
29
  2. Name it `YYYY-MM-DD-<short-slug>-<8-hex>.md`.
24
- 3. Fill every frontmatter field and all six body sections.
30
+ 3. Fill every frontmatter field and all six body sections. Set
31
+ `last_verified_skill_version` to the version actually reproduced.
25
32
  4. Use one stable root-cause signature for duplicate observations.
26
33
  5. Redact credentials, tokens, private keys, customer/device data, absolute user
27
34
  paths, complete patches, Reviewer artifacts, and raw logs.
@@ -38,6 +45,29 @@ lowercase UTF-8 key `<component>|<origin_surface>|<short-root-cause-slug>` and
38
45
  prefix the 64-hex digest with `sha256:`. Exclude project names, paths, versions,
39
46
  timestamps, and log text so another project can independently reuse the key.
40
47
 
48
+ ## Keep reports current
49
+
50
+ Each Skill release carries a managed resolution catalog keyed by `signature`.
51
+ The collector compares that catalog, the project's installed Skill version, and
52
+ `last_verified_skill_version` without changing the report. It may request an
53
+ upgrade, recheck, fix verification, closure, or routing into the project overlay.
54
+
55
+ After upgrading a project:
56
+
57
+ - If the issue is fixed, verify it and either delete a local-only report or set
58
+ `status: resolved`, `resolution: fixed`, update `updated_at`, and set
59
+ `last_verified_skill_version` to the verified release.
60
+ - If it still reproduces, keep an active status and update the verification
61
+ version; the collector treats it as a current regression.
62
+ - If triage says it is project configuration, maintain the value in
63
+ `docs/project/auto-coding-skill.yaml`, then delete the report or set
64
+ `status: rejected` and `resolution: project-config`.
65
+ - Use `duplicate` or another supported rejected resolution for closed reports.
66
+ Closed reports remain project history but are excluded from active grouping.
67
+
68
+ Do not reopen a closed historical report. Create a new report with the same
69
+ signature if the behavior later regresses.
70
+
41
71
  ## Periodic read-only collection
42
72
 
43
73
  From the Skill source checkout, explicitly list the projects to inspect:
@@ -52,18 +82,21 @@ whether the result is a shared defect, project configuration, environment issue,
52
82
  duplicate, or insufficient evidence before any Skill fix or release is planned.
53
83
  """,
54
84
  "docs/skill-feedback/_TEMPLATE-SKILL-FEEDBACK.md": """---
55
- schema: auto-coding-skill-feedback/v1
85
+ schema: auto-coding-skill-feedback/v2
56
86
  report_id: ACSF-<project>-YYYYMMDD-<8-hex>
57
87
  status: open
58
88
  created_at: YYYY-MM-DDTHH:MM:SS+08:00
89
+ updated_at: YYYY-MM-DDTHH:MM:SS+08:00
59
90
  project: <project>
60
91
  observed_skill_version: 0.0.0
92
+ last_verified_skill_version: 0.0.0
61
93
  component: <reviewer-runtime|installer|classification|validation|structure|docs|other>
62
94
  kind: defect
63
95
  impact: <blocking|degraded|minor>
64
96
  origin_surface: <managed-template|managed-script|managed-agent|cli|installer>
65
97
  suspected_scope: shared
66
98
  signature: sha256:<64-lowercase-hex>
99
+ resolution: pending
67
100
  export: metadata-only
68
101
  ---
69
102
  # <Short title>
@@ -263,6 +296,20 @@ PROJECT_FEEDBACK_PATTERNS = (
263
296
  )
264
297
 
265
298
 
299
+ # Files below these roots are project-owned artifacts regardless of extension or
300
+ # nesting. Exact managed entries inside the same roots still converge first.
301
+ PROJECT_OWNED_DOC_ROOTS = (
302
+ "docs/architecture",
303
+ "docs/bugs",
304
+ "docs/deployment",
305
+ "docs/design",
306
+ "docs/interfaces",
307
+ "docs/project",
308
+ "docs/reviews",
309
+ "docs/testing",
310
+ )
311
+
312
+
266
313
  def scaffold_groups() -> list[str]:
267
314
  return sorted(TEMPLATES)
268
315
 
package/cli/src/index.js CHANGED
@@ -1867,6 +1867,50 @@ function readPackageVersion(){
1867
1867
  }
1868
1868
  }
1869
1869
 
1870
+ function feedbackLifecycleStatus(root, assetSkill){
1871
+ if (!exists(path.join(root, "docs", "skill-feedback", "reports"))) {
1872
+ return {
1873
+ available: true,
1874
+ skillVersion: "",
1875
+ reportCount: 0,
1876
+ activeReportCount: 0,
1877
+ closedReportCount: 0,
1878
+ actionRequiredCount: 0,
1879
+ lifecycleCounts: {},
1880
+ actionRequired: [],
1881
+ };
1882
+ }
1883
+ const result = spawnSync(
1884
+ runtimePython(),
1885
+ [path.join(assetSkill, "scripts", "ap.py"), "feedback-collect", "--project", root, "--json"],
1886
+ { encoding: "utf8", stdio: "pipe", maxBuffer: 2 * 1024 * 1024 },
1887
+ );
1888
+ if (result.error || result.signal || result.status !== 0) {
1889
+ return {
1890
+ available: false,
1891
+ advisory: "run autocoding feedback --projects . --json to inspect Skill feedback metadata",
1892
+ };
1893
+ }
1894
+ try {
1895
+ const parsed = JSON.parse(result.stdout);
1896
+ return {
1897
+ available: true,
1898
+ skillVersion: parsed.projects?.[0]?.skill_version || "",
1899
+ reportCount: parsed.report_count || 0,
1900
+ activeReportCount: parsed.active_report_count || 0,
1901
+ closedReportCount: parsed.closed_report_count || 0,
1902
+ actionRequiredCount: parsed.action_required_count || 0,
1903
+ lifecycleCounts: parsed.lifecycle_counts || {},
1904
+ actionRequired: parsed.action_required || [],
1905
+ };
1906
+ } catch {
1907
+ return {
1908
+ available: false,
1909
+ advisory: "run autocoding feedback --projects . --json to inspect Skill feedback metadata",
1910
+ };
1911
+ }
1912
+ }
1913
+
1870
1914
  function projectStatus(project, assetSkill, assetAgents, assetManifest, releaseManifest){
1871
1915
  const root = path.resolve(project);
1872
1916
  validateInstallTransactionInputs(root, assetSkill, assetManifest);
@@ -2010,6 +2054,7 @@ function projectStatus(project, assetSkill, assetAgents, assetManifest, releaseM
2010
2054
  installManifestDiffs.push({ path: ".agents/managed-install.json", status: "stale" });
2011
2055
  }
2012
2056
  const installIntegrity = installIntegrityStatus(root, "project", releaseManifest.skill_version);
2057
+ const feedback = feedbackLifecycleStatus(root, assetSkill);
2013
2058
  const ok = !transactionPending
2014
2059
  && skillDiffs.length === 0
2015
2060
  && agentDiffs.length === 0
@@ -2055,6 +2100,7 @@ function projectStatus(project, assetSkill, assetAgents, assetManifest, releaseM
2055
2100
  invalidConfigTokens,
2056
2101
  managedWorkflow,
2057
2102
  managedAgentsDocument,
2103
+ feedback,
2058
2104
  next,
2059
2105
  };
2060
2106
  }
@@ -2090,6 +2136,14 @@ function printProjectStatus(result){
2090
2136
  console.log(`[autocoding] agents managed-document: ${result.managedAgentsDocument?.state || "unknown"} target=${result.managedAgentsDocument?.version || "unknown"}${detail}`);
2091
2137
  }
2092
2138
  for (const item of result.agentBindings || []) console.log(`[autocoding] agent model: ${item.agent} -> ${item.model}`);
2139
+ if (result.feedback?.available && result.feedback.actionRequiredCount) {
2140
+ console.log(`[autocoding] feedback advisory: ${result.feedback.actionRequiredCount} report(s) need maintenance`);
2141
+ for (const item of result.feedback.actionRequired || []) {
2142
+ console.log(`[autocoding] feedback action: ${item.report_id} ${item.lifecycle} -> ${item.recommended_action}`);
2143
+ }
2144
+ } else if (result.feedback && !result.feedback.available) {
2145
+ console.log(`[autocoding] feedback advisory: ${result.feedback.advisory}`);
2146
+ }
2093
2147
  if (result.next) console.log(`[autocoding] next: ${result.next}`);
2094
2148
  }
2095
2149
 
@@ -2215,6 +2269,7 @@ function syncProject(project, assetSkill, assetAgents, assetManifest, releaseMan
2215
2269
  components,
2216
2270
  managedWorkflow: publicEngineeringPlan(reportedPlans.engineering),
2217
2271
  managedAgentsDocument: publicEngineeringPlan(reportedPlans.agents),
2272
+ feedback: feedbackLifecycleStatus(root, assetSkill),
2218
2273
  actions,
2219
2274
  };
2220
2275
  }
@@ -2316,7 +2371,7 @@ function convergeProjectInstall(project, assetSkill, assetAgents, assetManifest,
2316
2371
  const integrity = requireInstallIntegrity(root, "project", releaseManifest.skill_version);
2317
2372
  actions.push({ action: "verify", path: ".agents/managed-install.json", detail: `${integrity.checked} managed files` });
2318
2373
  completeInstallTransaction(root, transaction);
2319
- return { project: root, actions };
2374
+ return { project: root, feedback: feedbackLifecycleStatus(root, assetSkill), actions };
2320
2375
  }
2321
2376
 
2322
2377
  function projectRoot(){ return process.cwd(); }
@@ -2519,6 +2574,11 @@ Compatibility:
2519
2574
  const detail = item.detail ? ` - ${item.detail}` : "";
2520
2575
  console.log(`[autocoding] ${item.action}: ${item.path}${detail}`);
2521
2576
  }
2577
+ if (result.feedback?.available && result.feedback.actionRequiredCount) {
2578
+ console.log(`[autocoding] feedback advisory: ${result.feedback.actionRequiredCount} report(s) need maintenance`);
2579
+ } else if (result.feedback && !result.feedback.available) {
2580
+ console.log(`[autocoding] feedback advisory: ${result.feedback.advisory}`);
2581
+ }
2522
2582
  }
2523
2583
  }
2524
2584
  process.exit(0);
@@ -2547,6 +2607,11 @@ Compatibility:
2547
2607
  const detail = item.detail ? ` - ${item.detail}` : "";
2548
2608
  console.log(`[autocoding] ${item.action}: ${item.path}${detail}`);
2549
2609
  }
2610
+ if (result.feedback?.available && result.feedback.actionRequiredCount) {
2611
+ console.log(`[autocoding] feedback advisory: ${result.feedback.actionRequiredCount} report(s) need maintenance`);
2612
+ } else if (result.feedback && !result.feedback.available) {
2613
+ console.log(`[autocoding] feedback advisory: ${result.feedback.advisory}`);
2614
+ }
2550
2615
  console.log("[autocoding] next: fill any blank access.* values and validation.routes in docs/project/auto-coding-skill.yaml, then run doctor.");
2551
2616
  } else {
2552
2617
  rmrf(skillDir);
@@ -3124,6 +3124,32 @@ class AutoCodingProfileTests(unittest.TestCase):
3124
3124
  closure = closure_path.read_text(encoding="utf-8")
3125
3125
  self.assertIn("- Effective Profile: high-risk", closure)
3126
3126
 
3127
+ def test_feedback_lifecycle_tracks_upgrade_verification_regression_and_closure(self) -> None:
3128
+ signature = "sha256:" + "a" * 64
3129
+ catalog = {
3130
+ signature: {
3131
+ "signature": signature,
3132
+ "disposition": "fixed",
3133
+ "effective_skill_version": "4.3.1",
3134
+ }
3135
+ }
3136
+ report = {
3137
+ "status": "open",
3138
+ "signature": signature,
3139
+ "last_verified_skill_version": "4.3.0",
3140
+ }
3141
+ self.assertEqual("upgrade-due", ap._feedback_lifecycle(report, "4.3.0", catalog)[0])
3142
+ self.assertEqual("verification-due", ap._feedback_lifecycle(report, "4.3.1", catalog)[0])
3143
+ report["last_verified_skill_version"] = "4.3.1"
3144
+ self.assertEqual("regression-current", ap._feedback_lifecycle(report, "4.3.1", catalog)[0])
3145
+ self.assertEqual("recheck-due", ap._feedback_lifecycle(report, "4.3.2", catalog)[0])
3146
+ report["last_verified_skill_version"] = "4.3.2"
3147
+ self.assertEqual("recheck-due", ap._feedback_lifecycle(report, "4.3.1", catalog)[0])
3148
+ report["last_verified_skill_version"] = "4.3.1"
3149
+ self.assertEqual("recheck-due", ap._feedback_lifecycle(report, "4.3.2", {})[0])
3150
+ report["status"] = "resolved"
3151
+ self.assertEqual("closed", ap._feedback_lifecycle(report, "4.3.2", catalog)[0])
3152
+
3127
3153
 
3128
3154
  if __name__ == "__main__":
3129
3155
  unittest.main()
@@ -87,7 +87,7 @@ class ProjectConfigResolverTests(unittest.TestCase):
87
87
  (self.repo / "docs" / "project").mkdir(parents=True)
88
88
  self.write_managed(
89
89
  """workflow:
90
- skill_version: "4.3.0"
90
+ skill_version: "4.3.1"
91
91
  mode: dev
92
92
  profile: auto
93
93
  completion: push
@@ -130,7 +130,7 @@ access:
130
130
  effective = core.load_effective_config(self.repo)
131
131
 
132
132
  self.assertEqual("sample", effective["project"]["name"])
133
- self.assertEqual("4.3.0", effective["workflow"]["skill_version"])
133
+ self.assertEqual("4.3.1", effective["workflow"]["skill_version"])
134
134
  self.assertEqual(self.repo / "docs" / "ENGINEERING.md", core.find_config(self.repo))
135
135
  self.assertEqual({}, core.load_project_overrides(self.repo))
136
136
 
@@ -153,7 +153,7 @@ access:
153
153
 
154
154
  effective = core.load_effective_config(self.repo)
155
155
 
156
- self.assertEqual("4.3.0", effective["workflow"]["skill_version"])
156
+ self.assertEqual("4.3.1", effective["workflow"]["skill_version"])
157
157
  self.assertEqual("dev", effective["workflow"]["mode"])
158
158
  self.assertEqual("project-profile", effective["workflow"]["profile"])
159
159
  self.assertEqual("push", effective["workflow"]["completion"])
@@ -292,11 +292,11 @@ access:
292
292
 
293
293
  def test_large_managed_body_is_not_part_of_frontmatter_bound(self) -> None:
294
294
  self.write_managed(
295
- 'workflow:\n skill_version: "4.3.0"\n',
295
+ 'workflow:\n skill_version: "4.3.1"\n',
296
296
  body="x" * (core.MANAGED_CONFIG_FRONTMATTER_MAX_BYTES + 1),
297
297
  )
298
298
 
299
- self.assertEqual("4.3.0", core.load_effective_config(self.repo)["workflow"]["skill_version"])
299
+ self.assertEqual("4.3.1", core.load_effective_config(self.repo)["workflow"]["skill_version"])
300
300
 
301
301
  def test_yaml_failure_does_not_echo_content_or_absolute_path(self) -> None:
302
302
  secret = "NEVER_ECHO_THIS_SECRET"