@rudinmax87/united-we-stand 0.1.2 → 0.2.1
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/.united-we-stand/README.md +19 -14
- package/.united-we-stand/agents/1-initializer.md +3 -1
- package/.united-we-stand/agents/2-planner.md +4 -0
- package/.united-we-stand/agents/3-designer.md +2 -0
- package/.united-we-stand/agents/4-implementer.md +4 -2
- package/.united-we-stand/agents/5-code-reviewer.md +16 -2
- package/.united-we-stand/agents/accessibility-reviewer.md +4 -1
- package/.united-we-stand/agents/optimizer.md +53 -0
- package/.united-we-stand/agents-md-block.md +5 -3
- package/.united-we-stand/antigravity-workflow.md +2 -2
- package/.united-we-stand/copilot-instructions.md +2 -2
- package/.united-we-stand/cursor-rule.mdc +2 -2
- package/.united-we-stand/framework/00-index.md +4 -0
- package/.united-we-stand/framework/01-core-rules.md +9 -6
- package/.united-we-stand/framework/04-command-routing.md +16 -12
- package/.united-we-stand/framework/06-spec-writing-standard.md +7 -0
- package/.united-we-stand/framework/07-definition-of-done.md +10 -6
- package/.united-we-stand/framework/08-skip-force-policy.md +7 -7
- package/.united-we-stand/framework/10-review-model.md +20 -3
- package/.united-we-stand/framework/12-react-frontend-review-checklist.md +97 -0
- package/.united-we-stand/framework/13-vulnerability-audit-matrix.md +54 -0
- package/.united-we-stand/framework/profiles/csharp.md +2 -0
- package/.united-we-stand/framework/profiles/go.md +2 -1
- package/.united-we-stand/framework/profiles/java.md +2 -1
- package/.united-we-stand/framework/profiles/javascript-typescript.md +8 -5
- package/.united-we-stand/framework/profiles/php.md +2 -0
- package/.united-we-stand/framework/profiles/python.md +2 -1
- package/.united-we-stand/framework/profiles/ruby.md +2 -0
- package/.united-we-stand/framework/profiles/rust.md +2 -1
- package/.united-we-stand/framework/profiles/web-app.md +4 -1
- package/.united-we-stand/spec-driven/branch-template/01-init.md +3 -0
- package/.united-we-stand/spec-driven/branch-template/02-plan.md +3 -0
- package/.united-we-stand/spec-driven/branch-template/03-design.md +4 -1
- package/.united-we-stand/spec-driven/branch-template/05-code-review.md +13 -1
- package/PACKAGE-PUBLISHING.md +403 -0
- package/README.md +8 -5
- package/dist/commands/branch-init.d.ts.map +1 -1
- package/dist/commands/branch-init.js +8 -7
- package/dist/commands/branch-init.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +22 -21
- package/dist/commands/doctor.js.map +1 -1
- package/dist/lib/templates.d.ts.map +1 -1
- package/dist/lib/templates.js +1 -0
- package/dist/lib/templates.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
# Package Publishing
|
|
2
|
+
|
|
3
|
+
## Local Development
|
|
4
|
+
|
|
5
|
+
Install dependencies:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Build the package:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm run build
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Run unit/integration tests:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm test
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Run built-CLI smoke tests:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run test:e2e
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Source Of Truth Areas
|
|
30
|
+
|
|
31
|
+
- framework runtime assets: `.united-we-stand/**`
|
|
32
|
+
- CLI behavior: `src/commands/**` and `src/lib/**`
|
|
33
|
+
- package metadata: `package.json`
|
|
34
|
+
- publish preparation for GitHub Packages: `scripts/prepare-github-publish.mjs`
|
|
35
|
+
|
|
36
|
+
## Installed Editor Integration Files
|
|
37
|
+
|
|
38
|
+
When users run `united-we-stand install`, the framework also installs lightweight editor/agent integration pointers that redirect tools back to the root `AGENTS.md` file instead of duplicating rules.
|
|
39
|
+
|
|
40
|
+
Installed pointer files:
|
|
41
|
+
|
|
42
|
+
- `.github/copilot-instructions.md`
|
|
43
|
+
- `.agents/workflows/united-we-stand.md`
|
|
44
|
+
- `.cursor/rules/united-we-stand.mdc`
|
|
45
|
+
|
|
46
|
+
## Publish Targets
|
|
47
|
+
|
|
48
|
+
This repository is prepared for two scoped publish targets.
|
|
49
|
+
|
|
50
|
+
Current examples in this repository:
|
|
51
|
+
|
|
52
|
+
- public npm package: `@rudinmax87/united-we-stand`
|
|
53
|
+
- GitHub Packages package: `@mrudinal/united-we-stand`
|
|
54
|
+
|
|
55
|
+
If you adapt this publish flow for your own fork or package, replace those scopes with your own npm scope and GitHub owner scope.
|
|
56
|
+
|
|
57
|
+
Because the required scopes are different, the repository uses:
|
|
58
|
+
|
|
59
|
+
- the root `package.json` for npm publishing
|
|
60
|
+
- a generated temporary artifact for GitHub Packages publishing
|
|
61
|
+
|
|
62
|
+
## Build The Publish Artifact
|
|
63
|
+
|
|
64
|
+
When you publish to npm, you are publishing the package artifact generated from this repository, not a Docker image.
|
|
65
|
+
|
|
66
|
+
The npm package artifact for this repository consists of:
|
|
67
|
+
|
|
68
|
+
- compiled CLI output
|
|
69
|
+
- `.united-we-stand/**`
|
|
70
|
+
- `README.md`
|
|
71
|
+
- `LICENSE`
|
|
72
|
+
|
|
73
|
+
Those shipped files are defined in `package.json` under `files`.
|
|
74
|
+
|
|
75
|
+
If you want to inspect the package tarball locally before publishing, run:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm pack
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
That creates a local `.tgz` archive containing the exact npm package contents that would be published from the root package.
|
|
82
|
+
|
|
83
|
+
## Publish To Scoped npm
|
|
84
|
+
|
|
85
|
+
This repository is currently configured to publish the root package as:
|
|
86
|
+
|
|
87
|
+
- `@rudinmax87/united-we-stand`
|
|
88
|
+
|
|
89
|
+
If you are publishing your own scoped variant, replace that name with your own npm scope and package name.
|
|
90
|
+
|
|
91
|
+
### Requirements
|
|
92
|
+
|
|
93
|
+
Before publishing to npm, make sure all of the following are true:
|
|
94
|
+
|
|
95
|
+
- you have Node.js 18+ installed
|
|
96
|
+
- you have npm installed
|
|
97
|
+
- you have an npm account
|
|
98
|
+
- your npm account has access to the package scope you plan to publish under
|
|
99
|
+
- you are logged in with the npm CLI
|
|
100
|
+
- the package `version` in `package.json` is the version you want to publish
|
|
101
|
+
- the package builds and tests pass locally
|
|
102
|
+
|
|
103
|
+
Optional but recommended checks:
|
|
104
|
+
|
|
105
|
+
- confirm the current npm user with `npm whoami`
|
|
106
|
+
- confirm the target registry with `npm config get registry`
|
|
107
|
+
- inspect the tarball with `npm pack`
|
|
108
|
+
|
|
109
|
+
### Step-by-step
|
|
110
|
+
|
|
111
|
+
#### 1. Install dependencies
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm install
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### 2. Build the package
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm run build
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
#### 3. Run the test suite
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm test
|
|
127
|
+
npm run test:e2e
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### 4. Confirm the package version and scoped name
|
|
131
|
+
|
|
132
|
+
Check `package.json` and confirm:
|
|
133
|
+
|
|
134
|
+
- `name` is the package name you intend to publish
|
|
135
|
+
- `version` is the release version you want to publish
|
|
136
|
+
|
|
137
|
+
For this repository today, the configured name is `@rudinmax87/united-we-stand`.
|
|
138
|
+
|
|
139
|
+
#### 5. Log in to npm
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npm login
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
If you want to verify the authenticated user:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npm whoami
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
#### 6. Optionally build the publish tarball locally
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npm pack
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
This lets you inspect the exact package contents before publishing.
|
|
158
|
+
|
|
159
|
+
#### 7. Publish the scoped package
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
npm publish --access public
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The root `package.json` already includes:
|
|
166
|
+
|
|
167
|
+
- scoped package name for this repository
|
|
168
|
+
- `publishConfig.access = public`
|
|
169
|
+
|
|
170
|
+
So `npm publish` is usually enough, but `npm publish --access public` makes the intended access mode explicit for a scoped public package.
|
|
171
|
+
|
|
172
|
+
### Quick publish command sequence
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
npm install
|
|
176
|
+
npm run build
|
|
177
|
+
npm test
|
|
178
|
+
npm run test:e2e
|
|
179
|
+
npm login
|
|
180
|
+
npm whoami
|
|
181
|
+
npm pack
|
|
182
|
+
npm publish --access public
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Publish To GitHub Packages
|
|
186
|
+
|
|
187
|
+
This repository can also be published to GitHub Packages as:
|
|
188
|
+
|
|
189
|
+
- `@mrudinal/united-we-stand`
|
|
190
|
+
|
|
191
|
+
GitHub Packages for npm uses:
|
|
192
|
+
|
|
193
|
+
- registry: `https://npm.pkg.github.com`
|
|
194
|
+
- scoped package name: `@mrudinal/united-we-stand`
|
|
195
|
+
|
|
196
|
+
Treat `@mrudinal` as the current example owner scope for this repository. If you publish from your own fork or organization, replace it with your own GitHub Packages scope.
|
|
197
|
+
|
|
198
|
+
### Requirements
|
|
199
|
+
|
|
200
|
+
Before publishing to GitHub Packages, make sure all of the following are true:
|
|
201
|
+
|
|
202
|
+
- you have Node.js 18+ and npm installed
|
|
203
|
+
- you have a GitHub account with access to the repository that owns the package
|
|
204
|
+
- you have a GitHub `personal access token (classic)`
|
|
205
|
+
- that token has at least:
|
|
206
|
+
- `write:packages`
|
|
207
|
+
- `read:packages`
|
|
208
|
+
- you are authenticated to `https://npm.pkg.github.com`
|
|
209
|
+
- the package builds and tests pass locally
|
|
210
|
+
|
|
211
|
+
Important:
|
|
212
|
+
|
|
213
|
+
- GitHub Packages for npm currently uses `personal access token (classic)` authentication
|
|
214
|
+
- for npm CLI v9+, GitHub recommends `--auth-type=legacy` when logging in from the command line
|
|
215
|
+
|
|
216
|
+
### Step-by-step
|
|
217
|
+
|
|
218
|
+
#### 1. Build and validate the package
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
npm install
|
|
222
|
+
npm run build
|
|
223
|
+
npm test
|
|
224
|
+
npm run test:e2e
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
#### 2. Create a GitHub personal access token (classic)
|
|
228
|
+
|
|
229
|
+
Create a token in GitHub with:
|
|
230
|
+
|
|
231
|
+
- `write:packages`
|
|
232
|
+
- `read:packages`
|
|
233
|
+
|
|
234
|
+
If you also want to delete packages later, add:
|
|
235
|
+
|
|
236
|
+
- `delete:packages`
|
|
237
|
+
|
|
238
|
+
#### 3. Authenticate npm to GitHub Packages
|
|
239
|
+
|
|
240
|
+
You can authenticate in either of these ways.
|
|
241
|
+
|
|
242
|
+
Option A: add your token to `~/.npmrc`
|
|
243
|
+
|
|
244
|
+
```ini
|
|
245
|
+
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT_CLASSIC
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Option B: log in with npm
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
npm login --scope=@YOUR_GITHUB_SCOPE --auth-type=legacy --registry=https://npm.pkg.github.com
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Example for this repository:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npm login --scope=@mrudinal --auth-type=legacy --registry=https://npm.pkg.github.com
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
When prompted, use:
|
|
261
|
+
|
|
262
|
+
- Username: your GitHub username
|
|
263
|
+
- Password: your GitHub personal access token (classic)
|
|
264
|
+
- Email: your GitHub account email
|
|
265
|
+
|
|
266
|
+
#### 4. Prepare the GitHub-scoped publish artifact
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
npm run prepare:publish:github
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
That creates:
|
|
273
|
+
|
|
274
|
+
- a temporary GitHub-scoped publish artifact
|
|
275
|
+
- a GitHub-scoped package manifest
|
|
276
|
+
- the compiled CLI output and installed framework assets needed for publication
|
|
277
|
+
|
|
278
|
+
#### 5. Inspect the generated publish artifact
|
|
279
|
+
|
|
280
|
+
Confirm that these files exist:
|
|
281
|
+
|
|
282
|
+
- the generated GitHub-scoped package manifest
|
|
283
|
+
- the generated compiled CLI output
|
|
284
|
+
- the generated `.united-we-stand/` asset copy
|
|
285
|
+
|
|
286
|
+
The generated `package.json` in that folder is already configured for:
|
|
287
|
+
|
|
288
|
+
- package name: `@mrudinal/united-we-stand`
|
|
289
|
+
- registry: `https://npm.pkg.github.com`
|
|
290
|
+
|
|
291
|
+
#### 6. Publish from the generated folder
|
|
292
|
+
|
|
293
|
+
Publish from the generated GitHub artifact directory created by `npm run prepare:publish:github`.
|
|
294
|
+
|
|
295
|
+
The publish command is typically:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
npm publish .publish/github
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Run it from the repository root after inspecting the prepared package manifest.
|
|
302
|
+
|
|
303
|
+
The generated GitHub Packages artifact uses:
|
|
304
|
+
|
|
305
|
+
- package name: `@mrudinal/united-we-stand`
|
|
306
|
+
- registry: `https://npm.pkg.github.com`
|
|
307
|
+
|
|
308
|
+
### Quick GitHub Packages publish sequence
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
npm install
|
|
312
|
+
npm run build
|
|
313
|
+
npm test
|
|
314
|
+
npm run test:e2e
|
|
315
|
+
npm login --scope=@YOUR_GITHUB_SCOPE --auth-type=legacy --registry=https://npm.pkg.github.com
|
|
316
|
+
npm run prepare:publish:github
|
|
317
|
+
npm publish .publish/github
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Example scope for this repository: `@mrudinal`
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
npm install
|
|
325
|
+
npm run build
|
|
326
|
+
npm test
|
|
327
|
+
npm run test:e2e
|
|
328
|
+
npm login --scope=@mrudinal --auth-type=legacy --registry=https://npm.pkg.github.com
|
|
329
|
+
npm run prepare:publish:github
|
|
330
|
+
npm publish .publish/github
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Verify The GitHub Package Exists
|
|
334
|
+
|
|
335
|
+
After publishing, verify the package in both the CLI and the GitHub UI.
|
|
336
|
+
|
|
337
|
+
#### Verify from the CLI
|
|
338
|
+
|
|
339
|
+
If you already authenticated npm to GitHub Packages, run:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
npm view @YOUR_GITHUB_SCOPE/united-we-stand version --registry=https://npm.pkg.github.com
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
Example for this repository:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
npm view @mrudinal/united-we-stand version --registry=https://npm.pkg.github.com
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
You can also inspect more package metadata:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
npm view @YOUR_GITHUB_SCOPE/united-we-stand --registry=https://npm.pkg.github.com
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Example for this repository:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
npm view @mrudinal/united-we-stand --registry=https://npm.pkg.github.com
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
If the package is visible and the publish succeeded, npm will return the published version and metadata instead of a not found or auth error.
|
|
364
|
+
|
|
365
|
+
#### Verify in the GitHub UI
|
|
366
|
+
|
|
367
|
+
Open GitHub and check the package in the UI:
|
|
368
|
+
|
|
369
|
+
1. Go to your GitHub profile or the owning account.
|
|
370
|
+
2. Open the `Packages` tab.
|
|
371
|
+
3. Look for `united-we-stand`.
|
|
372
|
+
4. Open the package page and confirm:
|
|
373
|
+
- package name matches your published scope and package name
|
|
374
|
+
- the newly published version is listed
|
|
375
|
+
- installation instructions and package metadata are visible
|
|
376
|
+
|
|
377
|
+
For this repository today, the example package name is `@mrudinal/united-we-stand`.
|
|
378
|
+
|
|
379
|
+
You can also check the repository sidebar for the linked package if GitHub associates the package with your repository.
|
|
380
|
+
|
|
381
|
+
#### Visibility Warning for First GitHub Packages Publish
|
|
382
|
+
|
|
383
|
+
If you publish a GitHub npm package under a personal account scope for the first time, GitHub may create it as `private` by default even if your package is intended to be public.
|
|
384
|
+
|
|
385
|
+
After the first publish, check the package page in GitHub:
|
|
386
|
+
|
|
387
|
+
1. Open the package.
|
|
388
|
+
2. Go to `Package settings`.
|
|
389
|
+
3. In the visibility controls, change the package to `Public` if needed.
|
|
390
|
+
|
|
391
|
+
Important:
|
|
392
|
+
|
|
393
|
+
- this visibility change is done in the GitHub UI, not by regenerating the package artifact
|
|
394
|
+
- you do not need to publish a new package just to change a newly created package from private to public
|
|
395
|
+
- once a GitHub package is made public, GitHub may not allow changing it back to private
|
|
396
|
+
|
|
397
|
+
### Notes
|
|
398
|
+
|
|
399
|
+
- publish to npmjs.com and publish to GitHub Packages are separate flows
|
|
400
|
+
- the root package publishes to npm as `@rudinmax87/united-we-stand`
|
|
401
|
+
- the generated temporary GitHub artifact publishes to GitHub Packages as `@mrudinal/united-we-stand`
|
|
402
|
+
- replace those example scopes with your own if you publish from a different owner account or fork
|
|
403
|
+
- if authentication fails during GitHub Packages publish, re-check that your token is a `personal access token (classic)` with `write:packages`
|
package/README.md
CHANGED
|
@@ -55,6 +55,7 @@ The built package ships:
|
|
|
55
55
|
|
|
56
56
|
- compiled CLI output
|
|
57
57
|
- `.united-we-stand/**`
|
|
58
|
+
- `PACKAGE-PUBLISHING.md`
|
|
58
59
|
- `README.md`
|
|
59
60
|
- `LICENSE`
|
|
60
61
|
|
|
@@ -134,6 +135,7 @@ It also installs the framework agents, including:
|
|
|
134
135
|
- `project-manager`
|
|
135
136
|
- `refactorer`
|
|
136
137
|
- `test-strategist`
|
|
138
|
+
- `optimizer`
|
|
137
139
|
- `performance-reviewer`
|
|
138
140
|
- `accessibility-reviewer`
|
|
139
141
|
- `api-contract-writer`
|
|
@@ -167,11 +169,11 @@ After the workflow is initialized, each stage writes or updates its branch file
|
|
|
167
169
|
| Stage | File name | General description |
|
|
168
170
|
|-------|-----------|---------------------|
|
|
169
171
|
| `0-status-checker` | `00-current-status.md` | Current branch status, blockers, recommended next step, and routing state |
|
|
170
|
-
| `1-initializer` | `01-init.md` | Raw idea, scope, assumptions, open questions,
|
|
171
|
-
| `2-planner` | `02-plan.md` | Ordered plan, dependencies, risks, and suggested execution order |
|
|
172
|
-
| `3-designer` | `03-design.md` | Architecture, interfaces, boundaries, data flow, and design decisions |
|
|
172
|
+
| `1-initializer` | `01-init.md` | Raw idea, scope, assumptions, open questions, success criteria, and early security/dependency concerns |
|
|
173
|
+
| `2-planner` | `02-plan.md` | Ordered plan, dependencies, risks, security/dependency risk handling, and suggested execution order |
|
|
174
|
+
| `3-designer` | `03-design.md` | Architecture, interfaces, boundaries, attack surface, data flow, and design decisions |
|
|
173
175
|
| `4-implementer` | `04-implementation.md` | What changed in code, validation performed, and remaining gaps |
|
|
174
|
-
| `5-code-reviewer` | `05-code-review.md` | Quality, maintainability, security, and review findings |
|
|
176
|
+
| `5-code-reviewer` | `05-code-review.md` | Quality, maintainability, vulnerability, security, optimization, and review findings |
|
|
175
177
|
| `6-finalizer` | `06-finalization.md` | Final summary, uncaptured changes, doc updates, and closure confirmation |
|
|
176
178
|
|
|
177
179
|
Each stage document can be updated later, either manually or by asking the agent in the chat, if the work changes or the plan evolves. When moving to the next stage, the AI should use the latest version of those written documents as the main source of truth, instead of depending only on the chat.
|
|
@@ -245,7 +247,7 @@ what is the current status of united-we-stand
|
|
|
245
247
|
|
|
246
248
|
## Creating Your Own Package
|
|
247
249
|
|
|
248
|
-
If you want to generate and publish your own package variant of this framework, follow [
|
|
250
|
+
If you want to generate and publish your own package variant of this framework, follow [PACKAGE-PUBLISHING.md](./PACKAGE-PUBLISHING.md).
|
|
249
251
|
|
|
250
252
|
## Contents in this repository
|
|
251
253
|
|
|
@@ -278,6 +280,7 @@ repo-root/
|
|
|
278
280
|
| `-- lib/
|
|
279
281
|
|-- tests/
|
|
280
282
|
|-- LICENSE
|
|
283
|
+
|-- PACKAGE-PUBLISHING.md
|
|
281
284
|
|-- package-lock.json
|
|
282
285
|
|-- package.json
|
|
283
286
|
|-- README.md
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-init.d.ts","sourceRoot":"","sources":["../../src/commands/branch-init.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiCH,MAAM,WAAW,kBAAkB;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAgMD,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"branch-init.d.ts","sourceRoot":"","sources":["../../src/commands/branch-init.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiCH,MAAM,WAAW,kBAAkB;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAgMD,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8NrF"}
|
|
@@ -152,7 +152,7 @@ async function promptForCollisionResolution(defaultFolderName) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
|
-
* Prompts the user before
|
|
155
|
+
* Prompts the user before writing framework memory on the repository default branch.
|
|
156
156
|
*/
|
|
157
157
|
async function promptForDefaultBranchInitialization(branchName) {
|
|
158
158
|
if (!input.isTTY || !output.isTTY) {
|
|
@@ -160,7 +160,7 @@ async function promptForDefaultBranchInitialization(branchName) {
|
|
|
160
160
|
}
|
|
161
161
|
const prompt = createInterface({ input, output });
|
|
162
162
|
try {
|
|
163
|
-
const answer = (await prompt.question(`Branch "${branchName}" is the repository default branch. Continue framework
|
|
163
|
+
const answer = (await prompt.question(`Branch "${branchName}" is the repository default branch. Continue writing framework memory on it? [y/N]: `)).trim().toLowerCase();
|
|
164
164
|
return answer === 'y' || answer === 'yes';
|
|
165
165
|
}
|
|
166
166
|
finally {
|
|
@@ -255,17 +255,18 @@ export async function runBranchInitCommand(options) {
|
|
|
255
255
|
&& (branchRoutingMap[currentBranch] === branchMemoryFolderName
|
|
256
256
|
|| isSpecFolderAlreadyLinkedToBranch(specDrivenDirectory, currentBranch));
|
|
257
257
|
const isDefaultBranchTarget = defaultBranchName !== null && currentBranch === defaultBranchName;
|
|
258
|
-
|
|
258
|
+
const isDefaultBranchWrite = isDefaultBranchTarget && (!branchAlreadyInitialized || force);
|
|
259
|
+
if (isDefaultBranchWrite) {
|
|
259
260
|
logger.warn(`"${currentBranch}" is detected as the repository default branch.`);
|
|
260
|
-
logger.warn('
|
|
261
|
+
logger.warn('Writing framework memory on the default branch can make later feature work, branch-specific specs, and long-lived workflow state harder to manage.');
|
|
261
262
|
const didConfirmDefaultBranchInitialization = await promptForDefaultBranchInitialization(currentBranch);
|
|
262
263
|
if (didConfirmDefaultBranchInitialization !== true) {
|
|
263
|
-
logger.error('Default-branch
|
|
264
|
-
logger.info('Create or checkout a feature branch first, rerun `branch-init` interactively and confirm
|
|
264
|
+
logger.error('Default-branch framework writes require explicit confirmation.');
|
|
265
|
+
logger.info('Create or checkout a feature branch first, or rerun `branch-init` interactively and confirm if you intentionally want to write framework memory on the default branch.');
|
|
265
266
|
process.exitCode = 1;
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
|
-
logger.info(`Proceeding with
|
|
269
|
+
logger.info(`Proceeding with framework writes on default branch "${currentBranch}" by user confirmation.`);
|
|
269
270
|
}
|
|
270
271
|
if (branchAlreadyInitialized && !force) {
|
|
271
272
|
const branchStatusSummary = readExistingBranchStatusSummary(specDrivenDirectory);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-init.js","sourceRoot":"","sources":["../../src/commands/branch-init.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACH,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,aAAa,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACH,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,GAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,oBAAoB,EACpB,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,kCAA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BAAoB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpF,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,WAAW,aAAa,gBAAgB,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsBH,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsBH,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAuYD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CA6TpE"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -32,11 +32,13 @@ const REQUIRED_STAGE_SECTIONS = {
|
|
|
32
32
|
'## Assumptions',
|
|
33
33
|
'## Open questions',
|
|
34
34
|
'## Success criteria',
|
|
35
|
+
'## Security / dependency concerns',
|
|
35
36
|
],
|
|
36
37
|
'02-plan.md': [
|
|
37
38
|
'## Objectives',
|
|
38
39
|
'## Dependencies',
|
|
39
40
|
'## Risks / unknowns',
|
|
41
|
+
'## Security / dependency risk plan',
|
|
40
42
|
'## Suggested execution order',
|
|
41
43
|
'## Detailed task list',
|
|
42
44
|
'## Status',
|
|
@@ -46,6 +48,7 @@ const REQUIRED_STAGE_SECTIONS = {
|
|
|
46
48
|
'## Key components',
|
|
47
49
|
'## Interfaces / data flow',
|
|
48
50
|
'## Constraints',
|
|
51
|
+
'## Security boundaries / attack surface',
|
|
49
52
|
'## Design decisions',
|
|
50
53
|
],
|
|
51
54
|
'04-implementation.md': [
|
|
@@ -57,9 +60,13 @@ const REQUIRED_STAGE_SECTIONS = {
|
|
|
57
60
|
],
|
|
58
61
|
'05-code-review.md': [
|
|
59
62
|
'## Quality & maintainability findings',
|
|
63
|
+
'## Vulnerability audit findings',
|
|
60
64
|
'## Security / boundary findings',
|
|
65
|
+
'## Optimization findings',
|
|
61
66
|
'## Severity / priority',
|
|
62
67
|
'## Recommended fixes',
|
|
68
|
+
'## Lint/parser/static-analysis observations',
|
|
69
|
+
'## Residual risks',
|
|
63
70
|
'## Reviewed scope and non-reviewed scope',
|
|
64
71
|
],
|
|
65
72
|
'06-finalization.md': [
|
|
@@ -80,10 +87,6 @@ const STAGE_FILE_TO_STAGE_NAME = {
|
|
|
80
87
|
'05-code-review.md': '5-code-reviewer',
|
|
81
88
|
'06-finalization.md': '6-finalizer',
|
|
82
89
|
};
|
|
83
|
-
const REQUIRED_BOOTSTRAP_BRANCH_FILES = [
|
|
84
|
-
'00-current-status.md',
|
|
85
|
-
'01-init.md',
|
|
86
|
-
];
|
|
87
90
|
/**
|
|
88
91
|
* Returns the highest existing stage file and stage name within a branch folder.
|
|
89
92
|
*/
|
|
@@ -111,10 +114,7 @@ function validateStageMetadataAgainstFiles(specDrivenDirectory, metadataLabel, m
|
|
|
111
114
|
alignmentErrors.push(`${metadataLabel} marks the workflow closed but the highest existing stage file is not `
|
|
112
115
|
+ '"06-finalization.md" (6-finalizer).');
|
|
113
116
|
}
|
|
114
|
-
for (const recordedStage of
|
|
115
|
-
...metadata.completedSteps,
|
|
116
|
-
...metadata.incompletedStages,
|
|
117
|
-
]) {
|
|
117
|
+
for (const recordedStage of metadata.completedSteps) {
|
|
118
118
|
const expectedStageFile = Object.entries(STAGE_FILE_TO_STAGE_NAME).find(([, stageName]) => stageName === recordedStage)?.[0];
|
|
119
119
|
if (expectedStageFile && !doesFileExist(join(specDrivenDirectory, expectedStageFile))) {
|
|
120
120
|
alignmentErrors.push(`${metadataLabel} references stage "${recordedStage}" but "${expectedStageFile}" is missing.`);
|
|
@@ -129,7 +129,6 @@ function validateStageMetadataAgainstFiles(specDrivenDirectory, metadataLabel, m
|
|
|
129
129
|
for (const recordedStage of [
|
|
130
130
|
metadata.currentStage,
|
|
131
131
|
...metadata.completedSteps,
|
|
132
|
-
...metadata.incompletedStages,
|
|
133
132
|
]) {
|
|
134
133
|
const expectedStageFile = Object.entries(STAGE_FILE_TO_STAGE_NAME).find(([, stageName]) => stageName === recordedStage)?.[0];
|
|
135
134
|
if (expectedStageFile && !doesFileExist(join(specDrivenDirectory, expectedStageFile))) {
|
|
@@ -450,21 +449,23 @@ export function runDoctorCommand(options) {
|
|
|
450
449
|
const specDirectoryExists = doesFileExist(specDrivenDirectory);
|
|
451
450
|
reportCheck(`.spec-driven/${branchMemoryFolderName}/ directory exists`, specDirectoryExists, 'branch');
|
|
452
451
|
if (specDirectoryExists) {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
452
|
+
const statusMarkdownPath = join(specDrivenDirectory, '00-current-status.md');
|
|
453
|
+
const statusMarkdownExists = doesFileExist(statusMarkdownPath);
|
|
454
|
+
reportCheck(' 00-current-status.md', statusMarkdownExists, 'branch');
|
|
456
455
|
const runtimeStatePath = join(specDrivenDirectory, 'state.json');
|
|
457
456
|
const runtimeStateExists = doesFileExist(runtimeStatePath);
|
|
458
457
|
reportCheck(' state.json', runtimeStateExists, 'branch');
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
458
|
+
const parsedStatus = statusMarkdownExists
|
|
459
|
+
? parseStatusSnapshot(readFileOrNull(statusMarkdownPath) ?? '')
|
|
460
|
+
: { snapshot: null, errors: [] };
|
|
461
|
+
if (statusMarkdownExists) {
|
|
462
|
+
reportCheck(' status required fields are present', parsedStatus.errors.length === 0, 'branch', parsedStatus.errors.length > 0 ? parsedStatus.errors.join(' | ') : undefined);
|
|
463
|
+
if (parsedStatus.snapshot) {
|
|
464
|
+
const statusSemanticErrors = validateStatusSnapshot(parsedStatus.snapshot);
|
|
465
|
+
reportCheck(' status semantics are consistent', statusSemanticErrors.length === 0, 'branch', statusSemanticErrors.length > 0 ? statusSemanticErrors.join(' | ') : undefined);
|
|
466
|
+
const statusFileAlignmentErrors = validateStageMetadataAgainstFiles(specDrivenDirectory, 'Status metadata', parsedStatus.snapshot);
|
|
467
|
+
reportCheck(' status metadata matches created stage files', statusFileAlignmentErrors.length === 0, 'branch', statusFileAlignmentErrors.length > 0 ? statusFileAlignmentErrors.join(' | ') : undefined);
|
|
468
|
+
}
|
|
468
469
|
}
|
|
469
470
|
if (runtimeStateExists) {
|
|
470
471
|
const runtimeStateContent = readFileOrNull(runtimeStatePath) ?? '';
|