@@ -68,7 +68,7 @@ Table of contents
6868
6969---
7070
71- 0 ) TL;DR (copy‑paste template)
71+ ## 0) TL;DR (copy‑paste template) { # 0 -tldr-copy-paste-template}
7272
7373``` python
7474# API/my_plugin/__init__.py
@@ -116,7 +116,7 @@ def bcasl_register(manager):
116116
117117---
118118
119- 1 ) Quick checklist
119+ ## 1) Quick checklist { # 1 -quick-checklist}
120120- [ ] Package under API/<plugin_id>/ with __ init__ .py
121121- [ ] BCASL signature: BCASL_PLUGIN=True, BCASL_ID, BCASL_DESCRIPTION
122122- [ ] Extended metadata (recommended): NAME, VERSION, AUTHOR, CREATED, LICENSE, COMPATIBILITY, TAGS
@@ -129,7 +129,7 @@ def bcasl_register(manager):
129129
130130---
131131
132- 2 ) Folder layout
132+ ## 2) Folder layout { # 2 -folder-layout}
133133
134134Place plugins exclusively under API/<plugin_id>/ (never under acasl/ or bcasl/):
135135```
@@ -141,7 +141,7 @@ Place plugins exclusively under API/<plugin_id>/ (never under acasl/ or bcasl/):
141141
142142---
143143
144- 3 ) Minimal plugin (with metadata)
144+ ## 3) Minimal plugin (with metadata) { # 3 -minimal-plugin-with-metadata}
145145
146146``` python
147147from __future__ import annotations
@@ -183,7 +183,7 @@ def bcasl_register(manager):
183183
184184---
185185
186- 4 ) Tag taxonomy and default ordering (minify before obfuscation)
186+ ## 4) Tag taxonomy and default ordering (minify before obfuscation) { # 4 -tag-taxonomy-and-default-ordering-minify-before-obfuscation}
187187
188188The host computes a default order from BCASL_TAGS (no IDs are hard‑coded):
189189- clean, cleanup, sanitize, prune, tidy → earliest
@@ -221,7 +221,7 @@ Recommended baseline tags by stage:
221221
222222---
223223
224- 5 ) Progress and non‑interactive considerations
224+ ## 5) Progress and non‑interactive considerations { # 5 -progress-and-non-interactive-considerations}
225225
226226- Always use progress(...) for long operations; it is non‑blocking and UI‑safe.
227227- Ask confirmation only when interactive. Detect non‑interactive mode (best‑effort):
@@ -245,7 +245,7 @@ if ask and not sctx.msg_question("Proceed?", "Run heavy step now?", default_yes=
245245
246246---
247247
248- 6 ) Configuration patterns
248+ ## 6) Configuration patterns { # 6 -configuration-patterns}
249249
250250- Workspace config (bcasl.* ) can be JSON/YAML/TOML/INI/CFG; the UI can create and edit it.
251251- Per‑plugin settings: use ensure_settings_file(...) to materialize a user‑editable file under the workspace.
@@ -257,7 +257,7 @@ settings = ensure_settings_file(sctx, subdir="config", basename="my_plugin", fmt
257257
258258---
259259
260- 6.1) System install helpers (pip global + package managers)
260+ ## 6.1) System install helpers (pip global + package managers) { # 61 -system-install-helpers-pip-global--package-managers}
261261
262262- Use the standardized helpers to request consent and install dependencies system‑wide.
263263- In non‑interactive mode these helpers return False and skip installation safely.
@@ -294,7 +294,7 @@ if not ok:
294294
295295---
296296
297- 7 ) Context essentials
297+ ## 7) Context essentials { # 7 -context-essentials}
298298
299299- Safe paths: sctx.safe_path(rel_or_abs) and sctx.is_within_workspace(Path)
300300- Scans: sctx.iter_files(patterns=[ ...] , exclude=[ ...] , enforce_workspace=True)
@@ -303,7 +303,7 @@ if not ok:
303303
304304---
305305
306- 8 ) i18n (async)
306+ ## 8) i18n (async) { # 8 -i18n-async}
307307
308308- Place a languages/ folder in your package; load with API_SDK helpers:
309309``` python
@@ -314,7 +314,7 @@ tr = asyncio.run(load_plugin_translations(__file__, "System"))
314314
315315---
316316
317- 9 ) Workspace switching (safe)
317+ ## 9) Workspace switching (safe) { # 9 -workspace-switching-safe}
318318
319319``` python
320320from API_SDK import set_selected_workspace
@@ -325,7 +325,7 @@ if ok:
325325
326326---
327327
328- 10 ) Examples
328+ ## 10) Examples { # 10 -examples}
329329
330330A) Minifier (minify before obfuscation via tags)
331331``` python
@@ -472,7 +472,7 @@ def bcasl_register(manager):
472472
473473---
474474
475- 11 ) Troubleshooting
475+ ## 11) Troubleshooting { # 11 -troubleshooting}
476476- Plugin not visible → ensure BCASL_PLUGIN/ID/DESCRIPTION exist; it's under API/<plugin_id>/ (not under acasl/ or bcasl/); use @plugin ; register via bcasl_register; open API Loader; check logs
477477- Config invalid → use UI raw editor; validate formats; fall back to JSON
478478- Long operations → use progress; split work; no modal blocking in background
0 commit comments