Skip to content

Commit ada71cf

Browse files
committed
chore(D5-3C): pre-launch doc/script cleanup
- docs: remove ghost path .github/instructions/sopify.instructions.md (actual install target is .github/copilot-instructions.md) - install.sh: add python3 → python → py -3 fallback chain (align with install.ps1) - tests: delete ~compare dead tests (command removed, 656 tests pass) - tasks.md: mark 3.11/3.12/3.15 done, skip 3.14 (script exists)
1 parent 0943bcf commit ada71cf

5 files changed

Lines changed: 23 additions & 20 deletions

File tree

.sopify-skills/plan/20260529_pre_launch_consolidation/tasks.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
### 3C. 审计修复 — 🟡 P1 建议级
5757

5858
- [ ] 3.10 `scripts/sopify_init.py` docstring 补全 `--no-copilot``--language` 参数说明
59-
- [ ] 3.11 📌 `examples/external-repo-quickstart/README.md` + `docs/getting-started.md` 修正 `sopify.instructions.md` 为实际安装路径(getting-started.md 有 3 处、quickstart 有 2 处)
60-
- [ ] 3.12 📌 `install.sh` 添加 `python`/`py` 回退链(与 `install.ps1` 对齐)
59+
- [x] 3.11 📌 `examples/external-repo-quickstart/README.md` + `docs/getting-started.md` 修正 `sopify.instructions.md` 为实际安装路径(getting-started.md 有 3 处、quickstart 有 2 处)
60+
- [x] 3.12 📌 `install.sh` 添加 `python`/`py` 回退链(与 `install.ps1` 对齐)
6161
- [ ] 3.13 `examples/sopify.config.yaml` 补全缺失配置项(`advanced.kb_init` 等)
62-
- [ ] 3.14 📌 `CONTRIBUTING.md` 更新 `scripts/install-sopify.sh` 等旧脚本路径引用
63-
- [ ] 3.15 删除 `tests/test_action_intent.py``~compare` 死测试(L351-353, L368-370)
62+
- [-] 3.14 📌 `CONTRIBUTING.md` 更新 `scripts/install-sopify.sh` 等旧脚本路径引用 — 脚本实际存在,引用未断
63+
- [x] 3.15 删除 `tests/test_action_intent.py``~compare` 死测试(L351-353, L368-370)
6464
- [ ] 3.16 绝对路径清理(scope:6 个文件,3.1/3.7 已处理的除外,不做 git history rewrite):`.sopify-skills/history/` 5 文件 + `tests/fixtures/p4d_smoke/current_gate_receipt.json`,替换为相对路径或占位符
6565
- [ ] 3.17 Wave 1 末尾统一运行测试套件验证无回归:`python3 -m pytest tests -v`(D2 + D3 + D5 全部完成后统一跑一次)
6666
- [ ] 3.18 🟡 创建 `.github/ISSUE_TEMPLATE/`:bug_report.md + feature_request.md(标准 issue 模板)

docs/getting-started.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ This creates:
3232
| `.sopify-skills/sopify.json` | Workspace marker — tells the host that Sopify is active |
3333
| `.gitignore` | Managed block — excludes transient state from version control |
3434
| `.github/copilot-instructions.md` | Copilot entry — project-level instruction for Copilot |
35-
| `.github/instructions/sopify.instructions.md` | Copilot detail — full Sopify rule set |
3635

3736
> **Skip Copilot files:** Pass `--no-copilot` with `--target copilot` if you only want workspace markers.
3837
@@ -73,8 +72,7 @@ After install, use `~go` in your AI host to start a managed workflow.
7372
### Copilot
7473

7574
Copilot discovers instructions via project-level files. The install command
76-
writes `.github/copilot-instructions.md` and
77-
`.github/instructions/sopify.instructions.md` automatically.
75+
writes `.github/copilot-instructions.md` automatically.
7876

7977
```bash
8078
curl -fsSL https://github.com/evidentloop/sopify/releases/latest/download/install.sh | bash -s -- --target copilot
@@ -167,7 +165,6 @@ what changed.
167165
```bash
168166
rm -rf .sopify-skills/
169167
rm -f .github/copilot-instructions.md
170-
rm -rf .github/instructions/sopify.instructions.md
171168
```
172169

173170
Then remove the `# BEGIN sopify-managed` / `# END sopify-managed` block from

examples/external-repo-quickstart/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ The bootstrap also updated:
6363
| `.sopify-skills/sopify.json` | Workspace marker — version anchor + capability declaration |
6464
| `.gitignore` | Managed ignore block — excludes transient state from version control |
6565
| `.github/copilot-instructions.md` | Copilot instruction entry — tells Copilot about Sopify conventions |
66-
| `.github/instructions/sopify.instructions.md` | Detailed Copilot instructions — full rule set |
6766

6867
## Step 3 — Start Using
6968

@@ -110,7 +109,6 @@ To remove Sopify from your project:
110109
```bash
111110
rm -rf .sopify-skills/
112111
rm -f .github/copilot-instructions.md
113-
rm -rf .github/instructions/sopify.instructions.md
114112
# Then remove the sopify-managed block from .gitignore
115113
```
116114

install.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,23 @@ fi
153153
spin_start "Checking requirements..."
154154
require_command "curl" "MISSING_CURL" "Install curl, or use the inspect-first flow to download the release asset manually."
155155
require_command "tar" "MISSING_TAR" "Install tar, or use a machine with basic archive support."
156-
require_command "python3" "MISSING_PYTHON3" "Install Python 3, then rerun the installer."
156+
157+
# Python fallback chain: python3 → python → py -3 (aligned with install.ps1)
158+
PYTHON_CMD=""
159+
for _candidate in python3 python py; do
160+
if command -v "$_candidate" >/dev/null 2>&1; then
161+
PYTHON_CMD="$_candidate"
162+
break
163+
fi
164+
done
165+
if [[ -z "$PYTHON_CMD" ]]; then
166+
fail "preflight" "MISSING_PYTHON" "None of python3, python, or py is available." "Install Python 3, then rerun the installer."
167+
fi
168+
PYTHON_ARGS=()
169+
if [[ "$PYTHON_CMD" == "py" ]]; then
170+
PYTHON_ARGS+=("-3")
171+
fi
172+
157173
spin_stop "Requirements OK"
158174

159175
TMP_DIR="$(mktemp -d "${TMPDIR:-/tmp}/sopify-install.XXXXXX")"
@@ -214,7 +230,7 @@ elif [[ -t 1 ]]; then
214230
"╚══════╝ ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝" \
215231
""
216232
fi
217-
SOPIFY_LOGO_PRINTED=1 python3 "$ENTRYPOINT" \
233+
SOPIFY_LOGO_PRINTED=1 "$PYTHON_CMD" "${PYTHON_ARGS[@]}" "$ENTRYPOINT" \
218234
--source-channel "$SOURCE_CHANNEL" \
219235
--source-resolved-ref "$RESOLVED_REF" \
220236
--source-asset-name "$ASSET_NAME" \

tests/test_action_intent.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,6 @@ def test_is_command_prefix_go(self) -> None:
348348
from runtime.gate import _is_command_prefix_request
349349
self.assertTrue(_is_command_prefix_request("~go plan 补一下"))
350350

351-
def test_is_not_command_prefix_compare_removed(self) -> None:
352-
from runtime.gate import _is_command_prefix_request
353-
self.assertFalse(_is_command_prefix_request("~compare 对比 A 和 B"))
354-
355351
def test_is_not_command_prefix_normal_request(self) -> None:
356352
from runtime.gate import _is_command_prefix_request
357353
self.assertFalse(_is_command_prefix_request("请帮我修复一下 bug"))
@@ -365,10 +361,6 @@ def test_is_not_command_prefix_gofoo(self) -> None:
365361
from runtime.gate import _is_command_prefix_request
366362
self.assertFalse(_is_command_prefix_request("~gofoo 实现功能"))
367363

368-
def test_is_not_command_prefix_comparex(self) -> None:
369-
from runtime.gate import _is_command_prefix_request
370-
self.assertFalse(_is_command_prefix_request("~comparex 对比"))
371-
372364
def test_is_command_prefix_go_bare(self) -> None:
373365
from runtime.gate import _is_command_prefix_request
374366
self.assertTrue(_is_command_prefix_request("~go"))

0 commit comments

Comments
 (0)