@izkac/forgekit 0.3.7 → 0.3.8
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/package.json
CHANGED
package/src/brief-cli.mjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Operator-brief CLI (core in brief.mjs).
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
|
-
* forge brief stamp [--session <id>]
|
|
7
|
-
* forge brief check [--session <id>]
|
|
8
|
-
* forge brief open [--session <id>]
|
|
6
|
+
* forge brief stamp [--session <id>] stamp freshness hash (never auto-opens)
|
|
7
|
+
* forge brief check [--session <id>] exit 1 when missing/stale/unstamped
|
|
8
|
+
* forge brief open [--session <id>] open in default browser (explicit only)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import fs from 'node:fs';
|
|
@@ -16,7 +16,7 @@ import { BRIEF_FILE, briefPath, checkBrief, openInBrowser, stampBrief } from './
|
|
|
16
16
|
const [cmd, ...rest] = process.argv.slice(2);
|
|
17
17
|
if (!cmd || !['stamp', 'check', 'open'].includes(cmd)) {
|
|
18
18
|
process.stderr.write(
|
|
19
|
-
'Usage: forge brief stamp [--session <id>]
|
|
19
|
+
'Usage: forge brief stamp [--session <id>] | check [--session <id>] | open [--session <id>]\n',
|
|
20
20
|
);
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
@@ -45,12 +45,13 @@ if (!changeDir) {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
if (cmd === 'stamp') {
|
|
48
|
+
// Never auto-open: re-stamps happen several times a session and each open
|
|
49
|
+
// stole the operator's focus. `forge brief open` is the explicit opt-in.
|
|
48
50
|
const hash = stampBrief(changeDir);
|
|
49
51
|
process.stdout.write(`Stamped ${briefPath(changeDir)} (specs hash ${hash})\n`);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
52
|
+
process.stdout.write(
|
|
53
|
+
`Operator: review the brief at ${briefPath(changeDir)} — open it with \`forge brief open\`.\n`,
|
|
54
|
+
);
|
|
54
55
|
} else {
|
|
55
56
|
const file = briefPath(changeDir);
|
|
56
57
|
if (!fs.existsSync(file)) {
|
|
@@ -37,7 +37,7 @@ Thin wrapper around the project **`openspec-propose`** skill (or `/opsx:propose`
|
|
|
37
37
|
where helpful), then:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
forge brief stamp # records specs hash
|
|
40
|
+
forge brief stamp # records specs hash (does NOT auto-open)
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
`forge phase implement` hard-refuses while the brief is missing or stale
|
|
@@ -51,7 +51,8 @@ Thin wrapper around the project **`openspec-propose`** skill (or `/opsx:propose`
|
|
|
51
51
|
Count tasks from `tasks.md` checkboxes.
|
|
52
52
|
|
|
53
53
|
7. Get user approval to proceed to implement (unless they already said "go").
|
|
54
|
-
The brief
|
|
54
|
+
The brief is what the operator reviews — tell them its path and that
|
|
55
|
+
`forge brief open` launches it; never open it for them.
|
|
55
56
|
|
|
56
57
|
## Session tracking
|
|
57
58
|
|
|
@@ -85,7 +85,7 @@ OpenSpec propose flow without the vendor CLI. Change lives under
|
|
|
85
85
|
where helpful), then:
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
forge brief stamp # records specs hash
|
|
88
|
+
forge brief stamp # records specs hash (does NOT auto-open)
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
`forge phase implement` hard-refuses while the brief is missing or stale
|
|
@@ -102,7 +102,8 @@ OpenSpec propose flow without the vendor CLI. Change lives under
|
|
|
102
102
|
name for both engines.)
|
|
103
103
|
|
|
104
104
|
7. Get user approval on the artefacts before implementing (unless they already said "go").
|
|
105
|
-
The brief
|
|
105
|
+
The brief is what the operator reviews — tell them its path and that
|
|
106
|
+
`forge brief open` launches it; never open it for them.
|
|
106
107
|
|
|
107
108
|
## Compatibility
|
|
108
109
|
|
|
@@ -21,7 +21,8 @@ freshness and opens the file.
|
|
|
21
21
|
```bash
|
|
22
22
|
# 1. specs are final (proposal.md / design.md / tasks.md)
|
|
23
23
|
# 2. write <changeDir>/brief.html (structure below)
|
|
24
|
-
forge brief stamp # records specs hash
|
|
24
|
+
forge brief stamp # records specs hash — tell the operator where the brief is
|
|
25
|
+
# (it is NOT auto-opened; they can run `forge brief open`)
|
|
25
26
|
forge phase implement --tasks-total <N> # hard-gated on a fresh stamped brief
|
|
26
27
|
```
|
|
27
28
|
|