Skip to content

Commit 860856f

Browse files
committed
fix: align skills docs with current nb cli
1 parent fdd8df5 commit 860856f

16 files changed

Lines changed: 60 additions & 74 deletions

File tree

skills/nocobase-acl-manage/SKILL.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,18 @@ Default behavior when user says `you decide`:
225225
- never execute write commands with uncertain, unresolved, or type-mismatched parameters
226226
- lock execution base-dir before any ACL discovery/write (use one stable project root for the whole task)
227227
- run execution guard sequence before ACL writes:
228-
- `nb env list -s project`
228+
- `nb env list`
229229
- `nb env update <current_env_name>`
230230
- `nb api acl --help`
231231
- `nb api acl roles --help`
232232
- fail-closed policy:
233233
- if `nb api acl --help` or `nb api acl roles --help` fails, stop and return capability-boundary message; do not switch to ad-hoc script execution.
234-
- confirm current env context through direct CLI: run `nb env list -s project` and resolve current env from the row marked with `*`
235-
- if no env is configured/current, stop writes and ask user whether to add/switch env using direct CLI (`nb env add ...` or `nb env use ... -s project`)
234+
- confirm current env context through direct CLI: run `nb env list` and resolve current env from the row marked with `*`
235+
- if no env is configured/current, stop writes and ask user whether to add/switch env using direct CLI (`nb env add ...` or `nb env use ...`)
236236
- if runtime command cache is missing/stale or command schema changed, run `nb env update <current_env_name>`
237237
- if runtime refresh fails with `swagger:get` 404 or API documentation plugin errors, activate dependency bundle and retry:
238-
- `nb pm enable @nocobase/plugin-api-doc`
239-
- `nb pm enable @nocobase/plugin-api-keys`
238+
- `nb plugin enable @nocobase/plugin-api-doc`
239+
- `nb plugin enable @nocobase/plugin-api-keys`
240240
- restart app before retrying runtime refresh
241241
- if token is missing/invalid, ensure `@nocobase/plugin-api-keys` is active and refresh token env first
242242
- resolve runtime command names via [intent-to-tool-map-v1](references/intent-to-tool-map-v1.md) and command help discovery
@@ -315,10 +315,10 @@ When a scenario is not supported by current CLI/runtime/tool policy:
315315

316316
- task normalized to canonical task
317317
- required inputs complete before writes
318-
- CLI capability gate passes (env context available via direct `nb env list -s project`, runtime commands resolvable)
318+
- CLI capability gate passes (env context available via direct `nb env list`, runtime commands resolvable)
319319
- CLI dependency plugins (`@nocobase/plugin-api-doc`, `@nocobase/plugin-api-keys`) are active or explicit recovery guidance is emitted
320320
- runtime command names resolved from command map/help
321-
- execution guard evidence includes locked `base-dir` plus `nb env list -s project`, `nb env update <current_env_name>`, `nb api acl --help`, and `nb api acl roles --help`
321+
- execution guard evidence includes locked `base-dir` plus `nb env list`, `nb env update <current_env_name>`, `nb api acl --help`, and `nb api acl roles --help`
322322
- every write has immediate readback evidence
323323
- for `permission.data-source.resource.set`, data source + resolved collections + actions + scope were confirmed before write
324324
- when user did not provide scope, confirmation/readback shows `all` as the applied default scope

skills/nocobase-acl-manage/references/_archive/scopes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Common scope-related CLI commands:
140140
- `data_sources_roles_resources_scopes_update`
141141
- `data_sources_roles_resources_scopes_destroy`
142142

143-
All calls should use resolved `nb` runtime commands through direct nb CLI (`nb <command> [subcommand ...] [flags ...]`) discovered from CLI help, after env context is confirmed by `nb env list -s project`.
143+
All calls should use resolved `nb` runtime commands through direct nb CLI (`nb <command> [subcommand ...] [flags ...]`) discovered from CLI help, after env context is confirmed by `nb env list`.
144144

145145
Business rules:
146146

@@ -174,4 +174,3 @@ Recommended usage:
174174
- `own` does not mean owner, assignee, approver, manager, or department member
175175
- for those semantics, create a custom scope and reference `$user` against real business relation paths
176176

177-

skills/nocobase-acl-manage/references/configuration.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,10 @@ Use CLI command contracts when auditing results. Do not fallback to direct HTTP
373373
4. `roles_data_source_resources_get`
374374
5. `data_sources_roles_resources_scopes_get` or `data_sources_roles_resources_scopes_list`
375375

376-
All checks above should be executed through resolved CLI runtime commands via direct nb CLI (`nb <command> [subcommand ...] [flags ...]`) and command help discovery, with env context resolved first by `nb env list -s project`.
376+
All checks above should be executed through resolved CLI runtime commands via direct nb CLI (`nb <command> [subcommand ...] [flags ...]`) and command help discovery, with env context resolved first by `nb env list`.
377377

378378
For scoped actions, do not rely only on appended `actions.scope` payloads. Prefer:
379379

380380
- read the resource action and record its `scopeId`
381381
- read the target scope record separately by id
382382

383-

skills/nocobase-acl-manage/references/execution-guard-template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Use this template before any ACL write (for example `role.create-blank`, role mo
1717
## Guard Sequence (Mandatory)
1818

1919
```bash
20-
nb env list -s project
20+
nb env list
2121
nb env update <current_env_name>
2222
nb api acl --help
2323
nb api acl roles --help
2424
```
2525

2626
Pass criteria:
2727

28-
- `env list -s project` returns an active project env (`*` row).
28+
- `env list` returns an active env (`*` row).
2929
- `env update <current_env_name>` succeeds or returns actionable recovery guidance.
3030
- `nb api acl --help` resolves successfully.
3131
- `nb api acl roles --help` resolves successfully and lists role lifecycle commands (`create/get/list/update/destroy`).
@@ -76,7 +76,7 @@ nb api acl roles get --filter-by-tk <role_name> -j
7676
```text
7777
execution_guard:
7878
- base_dir: <acl_base_dir>
79-
- env_project_scope: <summary of env list -s project>
79+
- env_current_state: <summary of env list>
8080
- env_update: pass|fail
8181
- acl_help: pass|fail
8282
- acl_roles_help: pass|fail

skills/nocobase-acl-manage/references/intent-to-tool-map-v1.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Execute ACL commands through direct nb CLI:
2020

2121
Resolve current env context through direct CLI:
2222

23-
- `nb env list -s project` (resolve current env from row marked with `*`)
23+
- `nb env list` (resolve current env from row marked with `*`)
2424

2525
## Runtime Command Discovery
2626

@@ -29,15 +29,15 @@ Because runtime commands are generated from swagger, command names can vary by b
2929
Prerequisite gate before runtime discovery:
3030

3131
0. Lock one `base-dir` for the whole task (do not switch base-dir mid-task).
32-
1. Run `nb env list -s project` to get `current_env_name` from the `*` row.
32+
1. Run `nb env list` to get `current_env_name` from the `*` row.
3333
2. If there is no current env, add/use one first:
34-
- local URL: `nb env add <env> --scope project --api-base-url <local_url>/api --auth-type oauth`
35-
- remote URL (token): `nb env add <env> --scope project --api-base-url <remote_url>/api --auth-type token --access-token <token>`
36-
- switch: `nb env use <env> -s project`
34+
- local URL: `nb env add <env> --api-base-url <local_url>/api --auth-type oauth`
35+
- remote URL (token): `nb env add <env> --api-base-url <remote_url>/api --auth-type token --access-token <token>`
36+
- switch: `nb env use <env>`
3737
3. Run `nb env update <current_env_name>`.
3838
4. If output shows `swagger:get` 404 or API documentation plugin error, activate dependency bundle and retry:
39-
- `nb pm enable @nocobase/plugin-api-doc`
40-
- `nb pm enable @nocobase/plugin-api-keys`
39+
- `nb plugin enable @nocobase/plugin-api-doc`
40+
- `nb plugin enable @nocobase/plugin-api-keys`
4141
- restart app before rerun.
4242
5. If output shows `401/403/Auth required`, ensure `@nocobase/plugin-api-keys` is active and refresh token env first.
4343
6. If `nb api acl --help` or `nb api acl roles --help` still fails in this same `base-dir`, fail closed:

skills/nocobase-acl-manage/references/refactor-plan-v2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ Current transport strategy is CLI-first:
6666
CLI capability gate requires:
6767

6868
- direct nb CLI exists (`nb`) and `node` exists
69-
- current env is available via direct CLI (`nb env list -s project`; switch/add through `nb env use` / `nb env add`)
69+
- current env is available via direct CLI (`nb env list`; switch/add through `nb env use` / `nb env add`)
7070
- runtime commands are available (`nb env update` when needed)
7171
- `@nocobase/plugin-api-doc` is active so `swagger:get` can provide runtime command schema
7272
- `@nocobase/plugin-api-keys` is active so token bootstrap/refresh can recover auth failures
7373
- recovery command for missing dependencies:
74-
- `nb pm enable @nocobase/plugin-api-doc`
75-
- `nb pm enable @nocobase/plugin-api-keys`
74+
- `nb plugin enable @nocobase/plugin-api-doc`
75+
- `nb plugin enable @nocobase/plugin-api-keys`
7676

7777
## 4. Current Constraints
7878

skills/nocobase-acl-manage/tests/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This folder tracks runtime verification for `nocobase-acl-manage` v2.
1414
```bash
1515
cd <BASE_DIR>
1616
nb --help
17-
nb env list -s project
17+
nb env list
1818
nb env update <ENV_NAME> # use current env from the `*` row
1919
nb api acl --help
2020
nb api acl roles --help
@@ -23,11 +23,11 @@ nb api acl roles --help
2323
2. If env context is missing, recover through direct CLI:
2424

2525
```bash
26-
nb env list -s project
26+
nb env list
2727
# add env when missing
28-
nb env add <ENV_NAME> --scope project --api-base-url <BASE_URL>/api --auth-type oauth
28+
nb env add <ENV_NAME> --api-base-url <BASE_URL>/api --auth-type oauth
2929
# or switch to existing env
30-
nb env use <ENV_NAME> -s project
30+
nb env use <ENV_NAME>
3131
```
3232

3333
If needed, follow with add/use actions before continuing ACL tests.

skills/nocobase-acl-manage/tests/capability-test-plan.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Excluded:
2525

2626
| ID | Domain | Capability | Validation Mode |
2727
|---|---|---|---|
28-
| ACL-SMOKE-001 | cli | `nb --help` + `nb env list -s project` availability | runtime |
29-
| ACL-SMOKE-002 | cli | execution guard fail-closed check (`env list -s project`, `env update`, `nb api acl --help`, `nb api acl roles --help`) in one locked base-dir | runtime |
28+
| ACL-SMOKE-001 | cli | `nb --help` + `nb env list` availability | runtime |
29+
| ACL-SMOKE-002 | cli | execution guard fail-closed check (`env list`, `env update`, `nb api acl --help`, `nb api acl roles --help`) in one locked base-dir | runtime |
3030
| ACL-ROLE-001 | role | create blank role | runtime |
3131
| ACL-ROLE-002 | role | audit roles read chain | runtime |
3232
| ACL-GLOBAL-001 | global-role-mode | read current global role mode | runtime |
@@ -56,7 +56,7 @@ Excluded:
5656
Required:
5757

5858
- `nb` CLI available in PATH
59-
- direct env commands available (`nb env list -s project`, `nb env use`, `nb env add`)
59+
- direct env commands available (`nb env list`, `nb env use`, `nb env add`)
6060
- configured current env context and token (when remote env requires it)
6161
- `@nocobase/plugin-api-doc` active (`swagger:get` available for runtime command discovery)
6262
- `@nocobase/plugin-api-keys` active (token generation/refresh recovery path)

skills/nocobase-acl-manage/tests/test-playbook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Runtime Command:
165165
```bash
166166
cd <BASE_DIR>
167167
nb --help
168-
nb env list -s project
168+
nb env list
169169
nb env update <ENV_NAME>
170170
```
171171

@@ -187,7 +187,7 @@ Runtime Command:
187187

188188
```bash
189189
cd <WRONG_BASE_DIR>
190-
nb env list -s project
190+
nb env list
191191
nb api acl --help
192192
nb api acl roles --help
193193
```

skills/nocobase-env-manage/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ For `current`, derive from the row marked with leading `*` in `nb env list` outp
135135
When CLI returns:
136136

137137
- `No envs configured.`
138-
- `Run 'nb env add <name> --base-url <url>' to add one.`
138+
- `Run 'nb env add <name> --api-base-url <url>' to add one.`
139139

140140
surface this message directly and ask whether to create a new app (`nb init --ui`) or add env.
141141

0 commit comments

Comments
 (0)