@bluestep-systems/bspecs 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -22
- package/package.json +1 -1
- package/src/scaffold.js +11 -0
- package/templates/claude/skills/b6p-audit/SKILL.md +15 -1
- package/templates/claude/skills/b6p-pull/SKILL.md +15 -1
- package/templates/claude/skills/b6p-push/SKILL.md +15 -1
- package/templates/root/CLAUDE.md.template +2 -0
package/README.md
CHANGED
|
@@ -22,28 +22,21 @@ token or `~/.npmrc` setup — install in one command:
|
|
|
22
22
|
npm install -g @bluestep-systems/bspecs
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
This
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
>
|
|
41
|
-
> ```ini
|
|
42
|
-
> @bluestep-systems:registry=https://npm.pkg.github.com
|
|
43
|
-
> ```
|
|
44
|
-
>
|
|
45
|
-
> Remove it (and the matching `//npm.pkg.github.com/:_authToken=...` line). Left in place it keeps
|
|
46
|
-
> routing `@bluestep-systems/*` to GitHub Packages and the public install will 404.
|
|
25
|
+
This installs the `bspecs` command. The `b6p` CLI is wired into each scaffolded project as a
|
|
26
|
+
devDependency and invoked via `npx b6p` — the scaffolder installs it for you (re-run `npm install` in
|
|
27
|
+
the project if you were offline).
|
|
28
|
+
|
|
29
|
+
### Set your platform credentials (required, once per machine)
|
|
30
|
+
|
|
31
|
+
The npm install needs no token, but the `/b6p-pull`, `/b6p-push`, and `/b6p-audit` skills will not
|
|
32
|
+
work until you set your BlueStep platform credentials:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx b6p auth set
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Run this **once per machine** — credentials are stored globally in `~/.b6p`, not per project. This is
|
|
39
|
+
unrelated to the npm registry. See the scaffolded project's own README for details.
|
|
47
40
|
|
|
48
41
|
## Usage
|
|
49
42
|
|
package/package.json
CHANGED
package/src/scaffold.js
CHANGED
|
@@ -78,6 +78,17 @@ export async function scaffold(answers) {
|
|
|
78
78
|
'Skipped git init. The implementer agent relies on `git diff` to summarize its work — run `git init` in the project before using /spec-execute.'
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
log.info(
|
|
83
|
+
[
|
|
84
|
+
'Next step — set your BlueStep platform credentials (required, once per machine):',
|
|
85
|
+
'',
|
|
86
|
+
' npx b6p auth set',
|
|
87
|
+
'',
|
|
88
|
+
'Until you do, the /b6p-pull, /b6p-push, and /b6p-audit skills cannot run. Credentials are',
|
|
89
|
+
'stored globally in ~/.b6p, so you only do this once — not per project.',
|
|
90
|
+
].join('\n')
|
|
91
|
+
);
|
|
81
92
|
}
|
|
82
93
|
|
|
83
94
|
// Detect whether the freshly created project directory sits inside an existing
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: b6p-audit
|
|
3
3
|
description: Compare a local component's state against what lives on the BlueStep platform, listing files that differ. Use when the user wants to know if they (or someone else) changed something on the platform side, or before a push to be sure nothing unexpected will be overwritten.
|
|
4
|
-
allowed-tools: Bash(npx b6p *)
|
|
4
|
+
allowed-tools: Bash(npx b6p *) Bash(test -f *)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /b6p-audit — Compare local vs. platform
|
|
@@ -26,6 +26,20 @@ Always pass `--yes` so b6p does not show interactive prompts that Claude cannot
|
|
|
26
26
|
|
|
27
27
|
## Steps
|
|
28
28
|
|
|
29
|
+
### 0. Auth preflight (do this first, before any `b6p` call)
|
|
30
|
+
|
|
31
|
+
`b6p` stores BlueStep platform credentials globally in `~/.b6p/`. On a machine that has never run `npx b6p auth set`, the first `audit` prompts for credentials **interactively** — a prompt you (Claude) cannot answer, so the call hangs silently. `--yes` does **not** save you here: it guards the *confirmation* prompt, not the *missing-credentials* one.
|
|
32
|
+
|
|
33
|
+
Before running the audit, check that credentials exist:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
test -f ~/.b6p/secrets.enc && echo OK
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- If it prints `OK` → credentials are set, continue.
|
|
40
|
+
- If it prints nothing (file absent) → STOP. Do **not** run the audit. Tell the user:
|
|
41
|
+
> `b6p` has no BlueStep platform credentials on this machine yet, so the audit would hang on an interactive prompt I can't answer. Run `npx b6p auth set` once (it stores credentials globally in `~/.b6p/`, so you only do this per machine), then retry `/b6p-audit <component>`.
|
|
42
|
+
|
|
29
43
|
### 1. Identify the component
|
|
30
44
|
|
|
31
45
|
If `$ARGUMENTS` contains a component path (e.g. `U######/Combined Scheduler`), use it. If empty, ask the user which component to audit.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: b6p-pull
|
|
3
3
|
description: Pull a B6P component from the BlueStep platform into the local workspace using its DAV URL, and scaffold draft/README.md if missing. Use when the user wants to bring a component down for the first time or re-sync after platform edits.
|
|
4
|
-
allowed-tools: Bash(npx b6p *)
|
|
4
|
+
allowed-tools: Bash(npx b6p *) Bash(test -f *)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /b6p-pull — Pull a component from BlueStep
|
|
@@ -30,6 +30,20 @@ If `node_modules` is missing, the user has not run `npm install` yet (see the "I
|
|
|
30
30
|
|
|
31
31
|
## Steps
|
|
32
32
|
|
|
33
|
+
### 0. Auth preflight (do this first, before any `b6p` call)
|
|
34
|
+
|
|
35
|
+
`b6p` stores BlueStep platform credentials globally in `~/.b6p/`. On a machine that has never run `npx b6p auth set`, the first `pull` prompts for credentials **interactively** — a prompt you (Claude) cannot answer, so the call hangs silently. `--yes` does **not** save you here: it guards the *confirmation* prompt, not the *missing-credentials* one.
|
|
36
|
+
|
|
37
|
+
Before running the pull, check that credentials exist:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
test -f ~/.b6p/secrets.enc && echo OK
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- If it prints `OK` → credentials are set, continue.
|
|
44
|
+
- If it prints nothing (file absent) → STOP. Do **not** run the pull. Tell the user:
|
|
45
|
+
> `b6p` has no BlueStep platform credentials on this machine yet, so the pull would hang on an interactive prompt I can't answer. Run `npx b6p auth set` once (it stores credentials globally in `~/.b6p/`, so you only do this per machine), then retry `/b6p-pull <DAV URL>`.
|
|
46
|
+
|
|
33
47
|
### 1. Get the DAV URL
|
|
34
48
|
|
|
35
49
|
- If `$ARGUMENTS` looks like a URL (starts with `http://` or `https://`), use it.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: b6p-push
|
|
3
3
|
description: Push local changes for a component back to the BlueStep platform. Use when the user is ready to deploy local edits.
|
|
4
|
-
allowed-tools: Bash(npx b6p *) Bash(git*)
|
|
4
|
+
allowed-tools: Bash(npx b6p *) Bash(git*) Bash(test -f *)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /b6p-push — Push a component to BlueStep
|
|
@@ -22,6 +22,20 @@ Any file inside the component works as the `--file` argument; the CLI walks up t
|
|
|
22
22
|
|
|
23
23
|
## Steps
|
|
24
24
|
|
|
25
|
+
### 0. Auth preflight (do this first, before any `b6p` call)
|
|
26
|
+
|
|
27
|
+
`b6p` stores BlueStep platform credentials globally in `~/.b6p/`. On a machine that has never run `npx b6p auth set`, the first `push` prompts for credentials **interactively** — a prompt you (Claude) cannot answer, so the call hangs silently. `--yes` does **not** save you here: it guards the *confirmation* prompt, not the *missing-credentials* one.
|
|
28
|
+
|
|
29
|
+
Before running the push, check that credentials exist:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
test -f ~/.b6p/secrets.enc && echo OK
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- If it prints `OK` → credentials are set, continue.
|
|
36
|
+
- If it prints nothing (file absent) → STOP. Do **not** run the push. Tell the user:
|
|
37
|
+
> `b6p` has no BlueStep platform credentials on this machine yet, so the push would hang on an interactive prompt I can't answer. Run `npx b6p auth set` once (it stores credentials globally in `~/.b6p/`, so you only do this per machine), then retry `/b6p-push <component>`.
|
|
38
|
+
|
|
25
39
|
### 1. Identify the component
|
|
26
40
|
|
|
27
41
|
If `$ARGUMENTS` contains a component path (relative to the project root), use it. Otherwise ask the user which component to push.
|
|
@@ -123,6 +123,8 @@ The skills above wrap these commands. You can run them directly if you need to,
|
|
|
123
123
|
|
|
124
124
|
`b6p` ships as a devDependency of this project (`@bluestep-systems/b6p-cli`). Invoke it with `npx b6p`, which resolves `node_modules/.bin/b6p` cross-platform — no global install, no shell or PATH detection. Run `npm install` once if `node_modules` is missing.
|
|
125
125
|
|
|
126
|
+
**One-time platform auth (required before any pull/push/audit).** `b6p` needs BlueStep platform credentials, stored globally in `~/.b6p/` (once per machine — not per project). On a machine that has never run it, the **first** `b6p` command prompts for credentials interactively, which hangs Claude (`--yes` does not cover the credentials prompt). Before the first sync command, verify credentials exist with `test -f ~/.b6p/secrets.enc`; if absent, run `npx b6p auth set` once, then retry. The `/b6p-*` skills do this preflight automatically.
|
|
127
|
+
|
|
126
128
|
- **Pull (DAV URL required):** `npx b6p --yes pull "<DAV URL>"`. The DAV URL is copied from the component's page in the BlueStep platform UI — `b6p pull` does not accept display names. First pull creates the `U######/` folder and the component skeleton.
|
|
127
129
|
- **Push (file-driven):** `npx b6p --yes push --file "U######/<Component>/draft/scripts/app.ts"`. `--file` lets the CLI derive the destination from local metadata.
|
|
128
130
|
- **Audit (read-only):** `npx b6p --yes --json audit --file "U######/<Component>/draft/scripts/app.ts"`. Lists files that differ between local and platform.
|