Skip to content

Commit 474c6b0

Browse files
committed
fix(cli): 修正 bootstrap schema 提示语义
1 parent 2933420 commit 474c6b0

10 files changed

Lines changed: 48 additions & 12 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.1",
3+
"version": "0.7.2",
44
"interface": {
55
"displayName": "Aisee Plugin",
66
"description": "Aisee plugin marketplace for OpenSpec and Compound Engineering workflows."

docs/release.md

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

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

37+
## 0.7.2 Patch 提示
38+
39+
`0.7.2` 修复 bootstrap plan 的提示语义:
40+
41+
- `aisee bootstrap --plan --json` 在 Codex marketplace 已安装时,不再因为项目缺少 `openspec/schemas` 而提示重新安装 `aisee-plugin marketplace`
42+
- 缺少项目 schema 目录时,plan 改为提示用 marketplace 中的 `aisee:schema-pack` 初始化 `openspec/schemas`
43+
3744
## 0.7.1 Patch 提示
3845

3946
`0.7.1` 修复 `0.7.0` 插件发布面一致性问题:

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.1",
3+
"version": "0.7.2",
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: 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.1",
3+
"version": "0.7.2",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"

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.1",
3+
"version": "0.7.2",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"

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.1"
7+
version = "0.7.2"
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.1"
5+
__version__ = "0.7.2"

src/aisee_cli/bootstrap.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ def build_bootstrap_plan(project_root: Path) -> dict[str, Any]:
4040
sources = sources_path(root)
4141
if not sources.exists():
4242
actions.append(action("create", rel(root, sources), "Create empty sources registry."))
43-
if not (root / "openspec" / "schemas").exists():
43+
if doctor["codex_marketplace"]["status"] != "ok":
4444
actions.append(action(
4545
"install",
4646
"aisee-plugin marketplace",
47-
f"Install Aisee plugin content with `{MARKETPLACE_ADD_COMMAND}` and `{PLUGIN_ADD_COMMAND}`; the CLI no longer installs schema packs from PyPI.",
47+
f"Install Aisee plugin content with `{MARKETPLACE_ADD_COMMAND}` and `{PLUGIN_ADD_COMMAND}`.",
48+
))
49+
if not (root / "openspec" / "schemas").exists():
50+
actions.append(action(
51+
"create",
52+
"openspec/schemas",
53+
"Use the marketplace-installed `aisee:schema-pack` skill to initialize project schema packs; bootstrap only reports the missing project directory.",
4854
))
4955

5056
return {

tests/test_doctor_flow_schema.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,37 @@ def test_bootstrap_plan_is_read_only(tmp_path: Path) -> None:
328328
assert data["status"] == "ready"
329329
assert data["writes"] is False
330330
assert any(item["path"] == "AGENTS.md" for item in data["actions"])
331-
schema_action = next(item for item in data["actions"] if item["path"] == "aisee-plugin marketplace")
332-
assert "codex plugin marketplace add AISEE-LAB/aisee-plugin --ref main" in schema_action["reason"]
331+
marketplace_action = next(item for item in data["actions"] if item["path"] == "aisee-plugin marketplace")
332+
assert "codex plugin marketplace add AISEE-LAB/aisee-plugin --ref main" in marketplace_action["reason"]
333+
schema_action = next(item for item in data["actions"] if item["path"] == "openspec/schemas")
334+
assert schema_action["kind"] == "create"
335+
assert "aisee:schema-pack" in schema_action["reason"]
333336
assert "aisee schemas install" not in schema_action["reason"]
334337
assert all(not item["path"].endswith("id-registry.json") for item in data["actions"])
335338
assert not (tmp_path / "AGENTS.md").exists()
336339

337340

341+
def test_bootstrap_plan_does_not_reinstall_marketplace_when_only_project_schemas_are_missing(tmp_path: Path, monkeypatch) -> None:
342+
write(tmp_path / "AGENTS.md", "# Rules\n")
343+
write(tmp_path / "openspec" / "config.yaml", "schema: aisee-app-spec-driven\n")
344+
write(tmp_path / "openspec" / "changes" / ".gitkeep", "")
345+
write(tmp_path / "aisee" / "registry" / "sources.json", '{"version":1,"sources":[]}\n')
346+
codex_home = tmp_path / "home" / ".codex"
347+
write(codex_home / "config.toml", """[marketplaces.aisee-plugin]\nsource = "AISEE-LAB/aisee-plugin"\n\n[plugins."aisee-plugin@aisee-plugin"]\nenabled = true\n""")
348+
create_schema_pack(codex_home / ".tmp" / "marketplaces" / "aisee-plugin" / "plugins" / "aisee-plugin")
349+
write(
350+
codex_home / ".tmp" / "marketplaces" / "aisee-plugin" / "plugins" / "aisee-plugin" / ".codex-plugin" / "plugin.json",
351+
'{"name":"aisee-plugin","version":"0.7.2"}\n',
352+
)
353+
monkeypatch.setenv("CODEX_HOME", str(codex_home))
354+
355+
data = run_json(tmp_path, "bootstrap", "--plan", "--json")
356+
357+
assert not any(item["path"] == "aisee-plugin marketplace" for item in data["actions"])
358+
schema_action = next(item for item in data["actions"] if item["path"] == "openspec/schemas")
359+
assert schema_action["kind"] == "create"
360+
361+
338362
def test_doctor_and_bootstrap_report_legacy_aisee_layout(tmp_path: Path) -> None:
339363
write(tmp_path / "AGENTS.md", "# Rules\n")
340364
write(tmp_path / "openspec" / "config.yaml", "schema: aisee-app-spec-driven\n")
@@ -501,4 +525,3 @@ def test_root_resolution_falls_back_to_git_root_without_aisee_markers(tmp_path:
501525
assert data["project_rules"]["primary"] == "AGENTS.md"
502526
assert data["status"] == "blocked"
503527
assert any(item["code"] == "OPENSPEC_CONFIG_MISSING" for item in data["issues"])
504-

tests/test_plugin_packaging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def package_version() -> str:
4848
return str(data["project"]["version"])
4949

5050

51-
def create_plugin_root(path: Path, *, version: str = "0.7.1") -> Path:
51+
def create_plugin_root(path: Path, *, version: str = "0.7.2") -> Path:
5252
(path / "skills" / "aisee-srs").mkdir(parents=True)
5353
(path / "skills" / "aisee-srs" / "SKILL.md").write_text("# aisee:srs\n", encoding="utf-8")
5454
(path / "skills" / "aisee-schema-pack" / "assets" / "schema-pack" / "quick-fix").mkdir(parents=True)

0 commit comments

Comments
 (0)