Skip to content

Commit 2933420

Browse files
committed
fix(plugin): 修复默认提示引用已删除 skill
1 parent b53b914 commit 2933420

10 files changed

Lines changed: 51 additions & 30 deletions

File tree

.agents/plugins/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"interface": {
55
"displayName": "Aisee Plugin",
66
"description": "Aisee plugin marketplace for OpenSpec and Compound Engineering workflows."

docs/release.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ Aisee 使用 SemVer:
3434

3535
公开契约分层和破坏性变更判断见 [Compatibility Policy](compatibility-policy.md)
3636

37+
## 0.7.1 Patch 提示
38+
39+
`0.7.1` 修复 `0.7.0` 插件发布面一致性问题:
40+
41+
- Codex plugin manifest 的 `defaultPrompt` 不再引用已删除的 `aisee:flow` skill。
42+
- 删除半残留的 `plugins/aisee-plugin/skills/aisee-flow/` 目录。
43+
- 增加 marketplace manifest 测试,确保默认提示引用的 `aisee:*` skill 都真实存在,且发布的 skill 目录都可被运行时加载。
44+
3745
## 0.7.0 合同提示
3846

3947
`0.7.0` 引入的是命令面重分层与 CLI 职责收缩:

plugins/aisee-plugin/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"

plugins/aisee-plugin/.codex-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"
@@ -27,8 +27,8 @@
2727
"Write"
2828
],
2929
"defaultPrompt": [
30-
"aisee:flow 判断当前项目下一步",
3130
"aisee:init 审计 AGENTS.md、OpenSpec 项目配置和 Codex hooks",
31+
"aisee:change-plan 规划当前需求的 OpenSpec changes",
3232
"aisee:srs 帮我整理这个需求"
3333
]
3434
}

plugins/aisee-plugin/.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"

plugins/aisee-plugin/skills/aisee-flow/references/route-hints.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "aisee-plugin"
7-
version = "0.7.0"
7+
version = "0.7.1"
88
description = "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows."
99
readme = "README.md"
1010
requires-python = ">=3.10"

src/aisee_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__all__ = ["__version__"]
44

5-
__version__ = "0.7.0"
5+
__version__ = "0.7.1"

tests/test_plugin_marketplace.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import json
4+
import re
45
from pathlib import Path
56

67
try:
@@ -45,3 +46,26 @@ def test_codex_manifest_is_loadable_from_marketplace_plugin_root() -> None:
4546
assert manifest["skills"] == "./skills/"
4647
assert (plugin_root / "skills" / "aisee-srs" / "SKILL.md").exists()
4748
assert (plugin_root / "skills" / "aisee-knowledge-curate" / "assets" / "team-knowledge" / "README.md").exists()
49+
50+
51+
def test_plugin_skill_directories_are_loadable_skills() -> None:
52+
marketplace = read_json(".agents/plugins/marketplace.json")
53+
plugin_root = ROOT / marketplace["plugins"][0]["source"]["path"]
54+
55+
skill_dirs = [path for path in (plugin_root / "skills").iterdir() if path.is_dir()]
56+
assert skill_dirs
57+
assert all((path / "SKILL.md").exists() for path in skill_dirs)
58+
59+
60+
def test_codex_default_prompts_reference_existing_skills() -> None:
61+
marketplace = read_json(".agents/plugins/marketplace.json")
62+
plugin_root = ROOT / marketplace["plugins"][0]["source"]["path"]
63+
manifest = json.loads((plugin_root / ".codex-plugin" / "plugin.json").read_text(encoding="utf-8"))
64+
65+
prompts = manifest["interface"]["defaultPrompt"]
66+
assert prompts
67+
68+
for prompt in prompts:
69+
match = re.search(r"\baisee:([a-z0-9-]+)\b", prompt)
70+
assert match, f"default prompt should name an aisee skill: {prompt}"
71+
assert (plugin_root / "skills" / f"aisee-{match.group(1)}" / "SKILL.md").exists()

tests/test_plugin_packaging.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
import sys
77
from pathlib import Path
88

9+
try:
10+
import tomllib
11+
except ModuleNotFoundError: # pragma: no cover - Python 3.10 compatibility
12+
import tomli as tomllib
13+
914

1015
def run_aisee(
1116
root: Path,
@@ -38,7 +43,12 @@ def run_json(root: Path, *args: str, env: dict[str, str] | None = None) -> dict:
3843
return json.loads(result.stdout)
3944

4045

41-
def create_plugin_root(path: Path, *, version: str = "0.7.0") -> Path:
46+
def package_version() -> str:
47+
data = tomllib.loads((Path(__file__).resolve().parents[1] / "pyproject.toml").read_text(encoding="utf-8"))
48+
return str(data["project"]["version"])
49+
50+
51+
def create_plugin_root(path: Path, *, version: str = "0.7.1") -> Path:
4252
(path / "skills" / "aisee-srs").mkdir(parents=True)
4353
(path / "skills" / "aisee-srs" / "SKILL.md").write_text("# aisee:srs\n", encoding="utf-8")
4454
(path / "skills" / "aisee-schema-pack" / "assets" / "schema-pack" / "quick-fix").mkdir(parents=True)
@@ -149,7 +159,7 @@ def test_schema_pack_reports_version_mismatch_for_installed_plugin_content(tmp_p
149159
assert data["status"] == "risk"
150160
mismatch = next(item for item in data["issues"] if item["code"] == "SCHEMA_PACK_VERSION_MISMATCH")
151161
assert mismatch["severity"] == "risk"
152-
assert data["cli_version"] == "0.7.0"
162+
assert data["cli_version"] == package_version()
153163
assert data["source_version"] == "0.5.0"
154164

155165

0 commit comments

Comments
 (0)