forked from diegoecab/oci-deal-accelerator
Route skill pre-flight through Makefile to avoid hardcoded Python
Codex users hit `python: command not found` on the welcome-flow pre-flight because SKILL.md called `python tools/kb_freshness.py` directly. Any hardcoded version (python/python3/python3.12) breaks for somebody — users have 3.8, 3.10, 3.11, 3.12 in the wild. Fix: channel all skill-initiated Python calls through `make` targets so the Makefile's single $(PYTHON) variable (auto-detected venv > 3.12 > 3.11 > 3.10 > python3) is the only place Python resolution lives. - Makefile: add `kb-check` target emitting JSON for the skill pre-flight - SKILL.md + .agents/skills/.../SKILL.md: call `make kb-check` and `make freshness-refresh` instead of bare `python tools/...` - CLAUDE.md: same fix in the Welcome Flow instructions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ When the user starts a conversation without providing discovery notes or a speci
|
||||
|
||||
### Pre-flight: KB freshness check
|
||||
|
||||
**Before showing the welcome message**, run `python tools/kb_freshness.py --check --json` and parse the JSON output. Behavior based on the result:
|
||||
**Before showing the welcome message**, run `make kb-check 2>/dev/null` and parse the JSON output. Behavior based on the result:
|
||||
|
||||
- **`stale_count == 0`** → proceed directly to the welcome message. No banner.
|
||||
- **`stale_count > 0` and at least one file has `refreshable: true`** → prepend this banner above the menu and ask the user inline:
|
||||
@@ -30,8 +30,8 @@ When the user starts a conversation without providing discovery notes or a speci
|
||||
Refresh now before showing the menu? [y/N]
|
||||
```
|
||||
|
||||
- If the user replies `y` / `yes` / `sí` → run `python tools/kb_freshness.py --auto-refresh`, wait for completion, then show the menu.
|
||||
- If the user replies `n` / anything else → show the menu immediately, with a one-line compact reminder above it: `⚠️ <N> KB file(s) stale — run /freshness or python tools/kb_freshness.py --auto-refresh later.`
|
||||
- If the user replies `y` / `yes` / `sí` → run `make freshness-refresh`, wait for completion, then show the menu.
|
||||
- If the user replies `n` / anything else → show the menu immediately, with a one-line compact reminder above it: `⚠️ <N> KB file(s) stale — run /freshness or make freshness-refresh later.`
|
||||
|
||||
- **`stale_count > 0` but no file has `refreshable: true`** (only manual files stale) → prepend a non-blocking informational banner above the menu, do NOT ask:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user