@elvis1513/auto-coding-skill 4.3.0 → 4.3.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 +41 -5
- package/cli/assets/managed-install.json +1 -1
- package/cli/assets/skill/data/policies/feedback-resolutions-v1.json +20 -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 +5 -3
- package/cli/assets/skill/scripts/ap.py +351 -75
- package/cli/assets/skill/scripts/install_integrity.py +7 -7
- package/cli/assets/skill/scripts/scaffold_templates.py +53 -6
- package/cli/src/index.js +76 -5
- package/cli/tests/ap_profiles_test.py +26 -0
- package/cli/tests/core_shell_test.py +5 -5
- package/cli/tests/index.test.js +164 -35
- package/package.json +1 -1
|
@@ -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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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/
|
|
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
|
@@ -1723,10 +1723,10 @@ function engineeringArchivePlan(root, current, version){
|
|
|
1723
1723
|
"",
|
|
1724
1724
|
].join("\n");
|
|
1725
1725
|
const archiveOutput = `${archiveHeader}${current}`;
|
|
1726
|
-
const archiveDir = path.join(root, "
|
|
1726
|
+
const archiveDir = path.join(root, ".agents", "archive", "auto-coding-skill", version, "workflow");
|
|
1727
1727
|
const selected = selectProjectArchiveTarget(
|
|
1728
1728
|
root,
|
|
1729
|
-
path.join(archiveDir,
|
|
1729
|
+
path.join(archiveDir, "ENGINEERING.md"),
|
|
1730
1730
|
archiveOutput,
|
|
1731
1731
|
{ legacyDigestPayload: current },
|
|
1732
1732
|
);
|
|
@@ -1765,10 +1765,16 @@ function planAgentsDocumentSync(project, assetSkill, policy = loadWorkflowMigrat
|
|
|
1765
1765
|
"",
|
|
1766
1766
|
].join("\n");
|
|
1767
1767
|
const archiveOutput = `${archiveHeader}${current}`;
|
|
1768
|
-
const archiveDir = path.join(
|
|
1768
|
+
const archiveDir = path.join(
|
|
1769
|
+
root,
|
|
1770
|
+
".agents",
|
|
1771
|
+
"archive",
|
|
1772
|
+
"auto-coding-skill",
|
|
1773
|
+
templateRegion.version,
|
|
1774
|
+
);
|
|
1769
1775
|
const selected = selectProjectArchiveTarget(
|
|
1770
1776
|
root,
|
|
1771
|
-
path.join(archiveDir,
|
|
1777
|
+
path.join(archiveDir, "AGENTS.md"),
|
|
1772
1778
|
archiveOutput,
|
|
1773
1779
|
{ legacyDigestPayload: current },
|
|
1774
1780
|
);
|
|
@@ -1867,6 +1873,50 @@ function readPackageVersion(){
|
|
|
1867
1873
|
}
|
|
1868
1874
|
}
|
|
1869
1875
|
|
|
1876
|
+
function feedbackLifecycleStatus(root, assetSkill){
|
|
1877
|
+
if (!exists(path.join(root, "docs", "skill-feedback", "reports"))) {
|
|
1878
|
+
return {
|
|
1879
|
+
available: true,
|
|
1880
|
+
skillVersion: "",
|
|
1881
|
+
reportCount: 0,
|
|
1882
|
+
activeReportCount: 0,
|
|
1883
|
+
closedReportCount: 0,
|
|
1884
|
+
actionRequiredCount: 0,
|
|
1885
|
+
lifecycleCounts: {},
|
|
1886
|
+
actionRequired: [],
|
|
1887
|
+
};
|
|
1888
|
+
}
|
|
1889
|
+
const result = spawnSync(
|
|
1890
|
+
runtimePython(),
|
|
1891
|
+
[path.join(assetSkill, "scripts", "ap.py"), "feedback-collect", "--project", root, "--json"],
|
|
1892
|
+
{ encoding: "utf8", stdio: "pipe", maxBuffer: 2 * 1024 * 1024 },
|
|
1893
|
+
);
|
|
1894
|
+
if (result.error || result.signal || result.status !== 0) {
|
|
1895
|
+
return {
|
|
1896
|
+
available: false,
|
|
1897
|
+
advisory: "run autocoding feedback --projects . --json to inspect Skill feedback metadata",
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
try {
|
|
1901
|
+
const parsed = JSON.parse(result.stdout);
|
|
1902
|
+
return {
|
|
1903
|
+
available: true,
|
|
1904
|
+
skillVersion: parsed.projects?.[0]?.skill_version || "",
|
|
1905
|
+
reportCount: parsed.report_count || 0,
|
|
1906
|
+
activeReportCount: parsed.active_report_count || 0,
|
|
1907
|
+
closedReportCount: parsed.closed_report_count || 0,
|
|
1908
|
+
actionRequiredCount: parsed.action_required_count || 0,
|
|
1909
|
+
lifecycleCounts: parsed.lifecycle_counts || {},
|
|
1910
|
+
actionRequired: parsed.action_required || [],
|
|
1911
|
+
};
|
|
1912
|
+
} catch {
|
|
1913
|
+
return {
|
|
1914
|
+
available: false,
|
|
1915
|
+
advisory: "run autocoding feedback --projects . --json to inspect Skill feedback metadata",
|
|
1916
|
+
};
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1870
1920
|
function projectStatus(project, assetSkill, assetAgents, assetManifest, releaseManifest){
|
|
1871
1921
|
const root = path.resolve(project);
|
|
1872
1922
|
validateInstallTransactionInputs(root, assetSkill, assetManifest);
|
|
@@ -2010,6 +2060,7 @@ function projectStatus(project, assetSkill, assetAgents, assetManifest, releaseM
|
|
|
2010
2060
|
installManifestDiffs.push({ path: ".agents/managed-install.json", status: "stale" });
|
|
2011
2061
|
}
|
|
2012
2062
|
const installIntegrity = installIntegrityStatus(root, "project", releaseManifest.skill_version);
|
|
2063
|
+
const feedback = feedbackLifecycleStatus(root, assetSkill);
|
|
2013
2064
|
const ok = !transactionPending
|
|
2014
2065
|
&& skillDiffs.length === 0
|
|
2015
2066
|
&& agentDiffs.length === 0
|
|
@@ -2055,6 +2106,7 @@ function projectStatus(project, assetSkill, assetAgents, assetManifest, releaseM
|
|
|
2055
2106
|
invalidConfigTokens,
|
|
2056
2107
|
managedWorkflow,
|
|
2057
2108
|
managedAgentsDocument,
|
|
2109
|
+
feedback,
|
|
2058
2110
|
next,
|
|
2059
2111
|
};
|
|
2060
2112
|
}
|
|
@@ -2090,6 +2142,14 @@ function printProjectStatus(result){
|
|
|
2090
2142
|
console.log(`[autocoding] agents managed-document: ${result.managedAgentsDocument?.state || "unknown"} target=${result.managedAgentsDocument?.version || "unknown"}${detail}`);
|
|
2091
2143
|
}
|
|
2092
2144
|
for (const item of result.agentBindings || []) console.log(`[autocoding] agent model: ${item.agent} -> ${item.model}`);
|
|
2145
|
+
if (result.feedback?.available && result.feedback.actionRequiredCount) {
|
|
2146
|
+
console.log(`[autocoding] feedback advisory: ${result.feedback.actionRequiredCount} report(s) need maintenance`);
|
|
2147
|
+
for (const item of result.feedback.actionRequired || []) {
|
|
2148
|
+
console.log(`[autocoding] feedback action: ${item.report_id} ${item.lifecycle} -> ${item.recommended_action}`);
|
|
2149
|
+
}
|
|
2150
|
+
} else if (result.feedback && !result.feedback.available) {
|
|
2151
|
+
console.log(`[autocoding] feedback advisory: ${result.feedback.advisory}`);
|
|
2152
|
+
}
|
|
2093
2153
|
if (result.next) console.log(`[autocoding] next: ${result.next}`);
|
|
2094
2154
|
}
|
|
2095
2155
|
|
|
@@ -2215,6 +2275,7 @@ function syncProject(project, assetSkill, assetAgents, assetManifest, releaseMan
|
|
|
2215
2275
|
components,
|
|
2216
2276
|
managedWorkflow: publicEngineeringPlan(reportedPlans.engineering),
|
|
2217
2277
|
managedAgentsDocument: publicEngineeringPlan(reportedPlans.agents),
|
|
2278
|
+
feedback: feedbackLifecycleStatus(root, assetSkill),
|
|
2218
2279
|
actions,
|
|
2219
2280
|
};
|
|
2220
2281
|
}
|
|
@@ -2316,7 +2377,7 @@ function convergeProjectInstall(project, assetSkill, assetAgents, assetManifest,
|
|
|
2316
2377
|
const integrity = requireInstallIntegrity(root, "project", releaseManifest.skill_version);
|
|
2317
2378
|
actions.push({ action: "verify", path: ".agents/managed-install.json", detail: `${integrity.checked} managed files` });
|
|
2318
2379
|
completeInstallTransaction(root, transaction);
|
|
2319
|
-
return { project: root, actions };
|
|
2380
|
+
return { project: root, feedback: feedbackLifecycleStatus(root, assetSkill), actions };
|
|
2320
2381
|
}
|
|
2321
2382
|
|
|
2322
2383
|
function projectRoot(){ return process.cwd(); }
|
|
@@ -2519,6 +2580,11 @@ Compatibility:
|
|
|
2519
2580
|
const detail = item.detail ? ` - ${item.detail}` : "";
|
|
2520
2581
|
console.log(`[autocoding] ${item.action}: ${item.path}${detail}`);
|
|
2521
2582
|
}
|
|
2583
|
+
if (result.feedback?.available && result.feedback.actionRequiredCount) {
|
|
2584
|
+
console.log(`[autocoding] feedback advisory: ${result.feedback.actionRequiredCount} report(s) need maintenance`);
|
|
2585
|
+
} else if (result.feedback && !result.feedback.available) {
|
|
2586
|
+
console.log(`[autocoding] feedback advisory: ${result.feedback.advisory}`);
|
|
2587
|
+
}
|
|
2522
2588
|
}
|
|
2523
2589
|
}
|
|
2524
2590
|
process.exit(0);
|
|
@@ -2547,6 +2613,11 @@ Compatibility:
|
|
|
2547
2613
|
const detail = item.detail ? ` - ${item.detail}` : "";
|
|
2548
2614
|
console.log(`[autocoding] ${item.action}: ${item.path}${detail}`);
|
|
2549
2615
|
}
|
|
2616
|
+
if (result.feedback?.available && result.feedback.actionRequiredCount) {
|
|
2617
|
+
console.log(`[autocoding] feedback advisory: ${result.feedback.actionRequiredCount} report(s) need maintenance`);
|
|
2618
|
+
} else if (result.feedback && !result.feedback.available) {
|
|
2619
|
+
console.log(`[autocoding] feedback advisory: ${result.feedback.advisory}`);
|
|
2620
|
+
}
|
|
2550
2621
|
console.log("[autocoding] next: fill any blank access.* values and validation.routes in docs/project/auto-coding-skill.yaml, then run doctor.");
|
|
2551
2622
|
} else {
|
|
2552
2623
|
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.
|
|
90
|
+
skill_version: "4.3.2"
|
|
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.
|
|
133
|
+
self.assertEqual("4.3.2", 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.
|
|
156
|
+
self.assertEqual("4.3.2", 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.
|
|
295
|
+
'workflow:\n skill_version: "4.3.2"\n',
|
|
296
296
|
body="x" * (core.MANAGED_CONFIG_FRONTMATTER_MAX_BYTES + 1),
|
|
297
297
|
)
|
|
298
298
|
|
|
299
|
-
self.assertEqual("4.3.
|
|
299
|
+
self.assertEqual("4.3.2", 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"
|