@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.
Files changed (46) hide show
  1. package/.united-we-stand/README.md +19 -14
  2. package/.united-we-stand/agents/1-initializer.md +3 -1
  3. package/.united-we-stand/agents/2-planner.md +4 -0
  4. package/.united-we-stand/agents/3-designer.md +2 -0
  5. package/.united-we-stand/agents/4-implementer.md +4 -2
  6. package/.united-we-stand/agents/5-code-reviewer.md +16 -2
  7. package/.united-we-stand/agents/accessibility-reviewer.md +4 -1
  8. package/.united-we-stand/agents/optimizer.md +53 -0
  9. package/.united-we-stand/agents-md-block.md +5 -3
  10. package/.united-we-stand/antigravity-workflow.md +2 -2
  11. package/.united-we-stand/copilot-instructions.md +2 -2
  12. package/.united-we-stand/cursor-rule.mdc +2 -2
  13. package/.united-we-stand/framework/00-index.md +4 -0
  14. package/.united-we-stand/framework/01-core-rules.md +9 -6
  15. package/.united-we-stand/framework/04-command-routing.md +16 -12
  16. package/.united-we-stand/framework/06-spec-writing-standard.md +7 -0
  17. package/.united-we-stand/framework/07-definition-of-done.md +10 -6
  18. package/.united-we-stand/framework/08-skip-force-policy.md +7 -7
  19. package/.united-we-stand/framework/10-review-model.md +20 -3
  20. package/.united-we-stand/framework/12-react-frontend-review-checklist.md +97 -0
  21. package/.united-we-stand/framework/13-vulnerability-audit-matrix.md +54 -0
  22. package/.united-we-stand/framework/profiles/csharp.md +2 -0
  23. package/.united-we-stand/framework/profiles/go.md +2 -1
  24. package/.united-we-stand/framework/profiles/java.md +2 -1
  25. package/.united-we-stand/framework/profiles/javascript-typescript.md +8 -5
  26. package/.united-we-stand/framework/profiles/php.md +2 -0
  27. package/.united-we-stand/framework/profiles/python.md +2 -1
  28. package/.united-we-stand/framework/profiles/ruby.md +2 -0
  29. package/.united-we-stand/framework/profiles/rust.md +2 -1
  30. package/.united-we-stand/framework/profiles/web-app.md +4 -1
  31. package/.united-we-stand/spec-driven/branch-template/01-init.md +3 -0
  32. package/.united-we-stand/spec-driven/branch-template/02-plan.md +3 -0
  33. package/.united-we-stand/spec-driven/branch-template/03-design.md +4 -1
  34. package/.united-we-stand/spec-driven/branch-template/05-code-review.md +13 -1
  35. package/PACKAGE-PUBLISHING.md +403 -0
  36. package/README.md +8 -5
  37. package/dist/commands/branch-init.d.ts.map +1 -1
  38. package/dist/commands/branch-init.js +8 -7
  39. package/dist/commands/branch-init.js.map +1 -1
  40. package/dist/commands/doctor.d.ts.map +1 -1
  41. package/dist/commands/doctor.js +22 -21
  42. package/dist/commands/doctor.js.map +1 -1
  43. package/dist/lib/templates.d.ts.map +1 -1
  44. package/dist/lib/templates.js +1 -0
  45. package/dist/lib/templates.js.map +1 -1
  46. package/package.json +2 -1
@@ -15,11 +15,11 @@ A stage is done when all are true:
15
15
 
16
16
  ## Role-Specific Completion Expectations
17
17
 
18
- - **Initializer**: goal, scope, assumptions, open questions, and success criteria captured.
19
- - **Planner**: objectives, tasks, dependencies, and risks are actionable.
20
- - **Designer**: architecture, boundaries, and implementation guidance are clear.
21
- - **Implementer**: changes, rationale, tests, and validation are recorded.
22
- - **Code Reviewer**: findings, severity, scope, and recommendations are explicit.
18
+ - **Initializer**: goal, scope, assumptions, open questions, success criteria, and relevant security/dependency concerns are captured.
19
+ - **Planner**: objectives, tasks, dependencies, risks, and security/dependency risk handling are actionable.
20
+ - **Designer**: architecture, boundaries, attack surface, and implementation guidance are clear.
21
+ - **Implementer**: changes, rationale, tests, and validation are recorded, including post-fix verification when relevant.
22
+ - **Code Reviewer**: quality, vulnerability, security, and optimization findings, severity, scope, and recommendations are explicit.
23
23
  - **Finalizer**: delivered scope, known gaps, uncaptured spec/code differences, doc impact, and user closure confirmation status are clear; the workflow is only closed after explicit user confirmation.
24
24
 
25
25
  ## Implementation and Review Quality Gates
@@ -33,8 +33,12 @@ These gates must be applied through profile + review-model rules:
33
33
  - error handling and logging are intentional
34
34
  - tests are proportionate and meaningful
35
35
  - security boundaries are reviewed
36
- - dependency/security checks are run when dependency changes occur
36
+ - earlier stages identify dependency risk and attack surface when relevant
37
+ - dependency/security checks are run according to the selected stack/package manager when a safe no-extra-install command exists, or the gap is explicitly disclosed
38
+ - all detected dependency vulnerabilities are surfaced as high priority review findings
39
+ - fix requests are not done until post-fix verification was attempted for build/compile health, available tests, and functionality preservation
37
40
  - available lint/parser/static-analysis checks relevant to the changed scope were run, or their absence/non-execution is explicitly disclosed
41
+ - for website/frontend changes, predictable mobile Lighthouse/PageSpeed blockers such as cache lifetime failures, render-blocking requests, late-discovered LCP assets, oversized images, unused JS/CSS, unnamed controls, and low-contrast UI are either fixed or explicitly documented before review is treated as clean
38
42
 
39
43
  Profile-specific mandates (for example JS/TS style, audit commands, JSDoc practices) must be enforced via selected profile docs.
40
44
 
@@ -18,22 +18,21 @@ When force/bypass is applied:
18
18
  - set new `Current stage` explicitly
19
19
  - update `Next recommended step` accordingly
20
20
 
21
- ## Outside-Framework Work
21
+ ## Direct Work Before Initialization
22
22
 
23
- If branch memory does not exist yet, working outside the framework is a separate mode from force/bypass:
23
+ If branch memory does not exist yet, direct repo work without explicit initialization is separate from force/bypass:
24
24
 
25
- - warn that united-we-stand is not initialized for the branch
26
- - ask the user to confirm they want to continue outside the framework
25
+ - continue helping with the requested work normally
27
26
  - do not create `.spec-driven/...` files unless the user explicitly asks to initialize
28
- - once the user confirms outside-framework work for the current chat, continue without repeating that confirmation unless they later ask to initialize or return to framework flow
27
+ - do not interrupt to explain framework setup unless the user explicitly asks to initialize or explicitly mentions the framework
29
28
 
30
29
  ## Default Branch Initialization Warning
31
30
 
32
- If the current branch is detected as the repository default branch and the user asks to initialize framework memory:
31
+ If the current branch is detected as the repository default branch and the framework would create or rewrite branch memory there:
33
32
 
34
33
  - warn about the risks of anchoring branch-specific workflow state on the default branch
35
34
  - ask for explicit confirmation before creating `.spec-driven/...` files
36
- - only skip that confirmation when the user explicitly uses `--force` or equivalent force/bypass wording
35
+ - never skip that confirmation because of `--force` or equivalent force/bypass wording
37
36
 
38
37
  ## Mandatory Stage Warning
39
38
 
@@ -41,6 +40,7 @@ If user bypasses a mandatory stage (`1-initializer` or `4-implementer`):
41
40
 
42
41
  - warn clearly about risk and missing guarantees
43
42
  - proceed only if user confirms bypass intent
43
+ - create only the single explicitly targeted stage file for that pass; do not backfill the bypassed stage file in the same pass
44
44
 
45
45
  ## Traceability Requirement
46
46
 
@@ -19,10 +19,11 @@ A **gap** is any requirement, feature, or constraint requested in earlier stages
19
19
 
20
20
  Use for implementation review requests.
21
21
 
22
- Default scope includes both:
22
+ Default scope includes all of:
23
23
 
24
24
  - Quality and Maintainability
25
25
  - Adversarial Security and Boundaries
26
+ - Optimization (default third check)
26
27
 
27
28
  User may explicitly narrow scope.
28
29
 
@@ -36,14 +37,25 @@ User may explicitly narrow scope.
36
37
  - oversized or multi-responsibility functions
37
38
  - routine SonarQube-style maintainability findings that should have been prevented during implementation
38
39
  - lint, parser-based analysis, and static-analysis findings relevant to the changed scope
40
+ - React/frontend static-review checklist findings when that stack is in scope
39
41
  3. **Security**
42
+ - dependency vulnerability audit findings from safe repo-native/package-manager-native commands when available
40
43
  - input validation/injection boundaries
44
+ - XSS, SQL/NoSQL injection, command injection, path traversal, SSRF, CSRF, open redirects, unsafe deserialization, and secret exposure when relevant
41
45
  - authn/authz ownership checks (BOLA/IDOR)
42
46
  - data exposure minimization
43
47
  - dependency/supply-chain considerations
44
- 4. **Testing**
48
+ 4. **Optimization**
49
+ - initial page work, lazy-loading, and startup cost
50
+ - duplicated initialization, unnecessary listeners, and repeated bootstrap work
51
+ - media, image, font, and third-party delivery cost
52
+ - main-thread work, forced reflow, DOM size, and offscreen rendering cost
53
+ - mobile behavior, layout stability, caching, render-blocking requests, LCP breakdown/resource discovery, network dependency chains, and production-only bundle risks
54
+ - unused JS/CSS and late-discovered critical resources
55
+ - Lighthouse-scored accessibility issues that materially affect launch-readiness, especially unnamed interactive controls and insufficient contrast
56
+ 5. **Testing**
45
57
  - tests exist and cover high-risk paths proportionately
46
- 5. **Documentation**
58
+ 6. **Documentation**
47
59
  - implementation and finalization notes are complete and truthful
48
60
 
49
61
  ## Output Requirements
@@ -53,6 +65,9 @@ Review output should state:
53
65
  - what was reviewed
54
66
  - what was not reviewed
55
67
  - findings
68
+ - vulnerability audit findings or an explicit unavailable/not-run note
69
+ - optimization findings or an explicit not-applicable note
70
+ - for website/frontend scope, an explicit note on whether the remaining findings are compatible with a realistic strong mobile Lighthouse/PageSpeed outcome
56
71
  - severity/priority
57
72
  - recommended fixes
58
73
  - lint/parser/static-analysis observations and whether those checks were run
@@ -61,6 +76,8 @@ Review output should state:
61
76
  ## Reviewer Behavior Constraints
62
77
 
63
78
  - report discrepancies by default
79
+ - run safe repo-native vulnerability audit commands when available for the selected stack/package manager, or explicitly disclose that no no-install command was available
80
+ - report detected dependency vulnerabilities as high priority findings in review output
64
81
  - treat mandatory coding-steering violations as review findings that block a clean review
65
82
  - use available lint/parser/static-analysis results as first-class review evidence instead of optional background context
66
83
  - do not rewrite lower stages unless user explicitly requests it
@@ -0,0 +1,97 @@
1
+ # React / Frontend Review Checklist
2
+
3
+ Use this document as a framework-native checklist for React, Next.js, Vite, Remix, Gatsby, Expo web, and similar frontend reviews when no extra dependency is installed.
4
+
5
+ This is a review lens, not a bundled parser or external tool requirement.
6
+
7
+ ## Scope
8
+
9
+ Apply when the reviewed code materially includes:
10
+
11
+ - React components or hooks
12
+ - frontend routing/layout code
13
+ - client rendering and hydration
14
+ - bundle-size or delivery concerns
15
+ - Next.js/App Router or similar framework code
16
+
17
+ ## State And Effects
18
+
19
+ Check for:
20
+
21
+ - derived state computed in `useEffect` instead of during render
22
+ - `fetch()` in effects where a server/data-layer approach is more appropriate
23
+ - too many `setState` calls in one effect
24
+ - effects being used like event handlers
25
+ - `useState` initialized from props and then expected to stay in sync
26
+ - related local state that should likely be modeled with `useReducer`
27
+ - stale-closure `setState(value + 1)` patterns
28
+ - object/array literals in hook dependency arrays
29
+
30
+ ## Rendering And Performance
31
+
32
+ Check for:
33
+
34
+ - unnecessary `useMemo`/memoization for trivially cheap expressions
35
+ - inline object/array/function props that defeat memoized child components
36
+ - hydration flicker from mount-only `useEffect` state resets
37
+ - sequential async work that should use `Promise.all()`
38
+ - repeated expensive work during render
39
+ - unnecessary rerenders from unstable references
40
+
41
+ ## Animation And Motion
42
+
43
+ Check for:
44
+
45
+ - `transition: all`
46
+ - layout-property animation instead of transform/opacity
47
+ - permanent `will-change`
48
+ - large animated blur effects
49
+ - `scale(0)` entrance animations
50
+ - lack of reduced-motion handling when motion libraries are used
51
+ - hover-only behavior on touch devices
52
+
53
+ ## Bundle Size And Delivery
54
+
55
+ Check for:
56
+
57
+ - barrel imports that weaken tree-shaking
58
+ - full-library imports such as `lodash` instead of path imports
59
+ - heavy date/moment-style libraries without justification
60
+ - heavy client libraries that should be lazy/dynamically loaded
61
+ - synchronous third-party scripts
62
+ - full `framer-motion` usage where a lighter pattern would work
63
+ - dead code, unused files, unused exports, unused types, and duplicate exports
64
+
65
+ ## Next.js And Route Delivery
66
+
67
+ Check for:
68
+
69
+ - `<img>` instead of `next/image`
70
+ - missing `sizes` for responsive `next/image`
71
+ - native `<script>` instead of `next/script`
72
+ - inline `Script` without a stable `id`
73
+ - Google Fonts `<link>` usage instead of `next/font`
74
+ - stylesheet `<link>` usage that bypasses bundling
75
+ - polyfill CDN scripts that duplicate framework behavior
76
+ - missing page metadata
77
+ - client-side redirects in effects when framework-native redirect handling should be used
78
+ - `useSearchParams` without the required suspense boundary
79
+ - GET handlers with side effects or mutating route semantics
80
+
81
+ ## Security Crossover
82
+
83
+ Check for:
84
+
85
+ - hardcoded client-side secrets
86
+ - unsafe redirects
87
+ - GET handlers that mutate state
88
+ - direct use of `eval`, `new Function`, or string-based timers
89
+ - user-controlled content flowing into unsafe rendering or execution sinks
90
+
91
+ ## Review Output Guidance
92
+
93
+ When these checks produce findings:
94
+
95
+ - surface them under quality, security, or optimization as appropriate
96
+ - treat them as first-class review evidence, not optional polish
97
+ - keep manual findings explicit about affected files/components and likely user impact
@@ -0,0 +1,54 @@
1
+ # Vulnerability Audit Matrix
2
+
3
+ Use the safest available path first:
4
+
5
+ 1. Prefer repo-native or package-manager-native vulnerability audit commands that require no extra install.
6
+ 2. If no native command exists, use repo-configured tooling only when it is already present.
7
+ 3. Do not install a new audit tool during review unless the user explicitly asks.
8
+ 4. If no safe no-install command exists, state that explicitly in the review output.
9
+ 5. Any detected dependency vulnerability must be reported as a high-priority review finding, even if the underlying tool labels it lower severity.
10
+
11
+ ## JavaScript / TypeScript
12
+
13
+ - `package-lock.json`: `npm audit`
14
+ - `pnpm-lock.yaml`: `pnpm audit`
15
+ - `yarn.lock`: `yarn audit`, or the repo-configured Yarn equivalent if the active Yarn version does not expose that command
16
+
17
+ ## PHP / Composer
18
+
19
+ - `composer.lock`: `composer audit`
20
+
21
+ ## .NET / NuGet
22
+
23
+ - SDK-style projects when supported: `dotnet list package --vulnerable`
24
+
25
+ ## Python
26
+
27
+ - No guaranteed no-extra-install native audit command in this framework baseline
28
+ - Use repo-configured tooling only if it already exists
29
+
30
+ ## Ruby
31
+
32
+ - No guaranteed no-extra-install native audit command in this framework baseline
33
+ - Use repo-configured tooling only if it already exists
34
+
35
+ ## Rust
36
+
37
+ - No guaranteed no-extra-install native audit command in this framework baseline
38
+ - Use repo-configured `cargo audit` only if it already exists
39
+
40
+ ## Go
41
+
42
+ - No guaranteed no-extra-install native audit command in this framework baseline
43
+ - Use repo-configured `govulncheck` only if it already exists
44
+
45
+ ## Java
46
+
47
+ - No guaranteed no-extra-install native audit command in this framework baseline
48
+ - Use repo-configured Maven/Gradle security tasks only if they already exist
49
+
50
+ ## General Review Notes
51
+
52
+ - Preserve the original command output details in your notes when they matter.
53
+ - If a command fails because the package manager or runtime is missing, disclose that rather than pretending the audit passed.
54
+ - Dependency-audit results do not replace manual review for injection, authz, or data-exposure issues.
@@ -8,3 +8,5 @@
8
8
  ## Verification Guidance
9
9
 
10
10
  - Run build, test, analyzer, and package safety checks appropriate to the repo.
11
+ - When supported by the active SDK/project style, run `dotnet list package --vulnerable`.
12
+ - Review deserialization, injection, path handling, SSRF, authz, and secret exposure when relevant.
@@ -9,4 +9,5 @@
9
9
  ## Verification Guidance
10
10
 
11
11
  - Run formatting, vetting, tests, and module checks appropriate to the repo.
12
- - Review dependency safety when modules change.
12
+ - If `govulncheck` is already available or already configured by the repo, run it; otherwise explicitly disclose that this framework baseline has no guaranteed no-extra-install native Go vulnerability audit command.
13
+ - Review dependency safety, input validation, path handling, SSRF, command execution, and auth boundaries when relevant.
@@ -8,4 +8,5 @@
8
8
  ## Verification Guidance
9
9
 
10
10
  - Run build, test, and static checks appropriate to Maven/Gradle or the repo build system.
11
- - Check dependency safety when dependencies change.
11
+ - Run repo-configured dependency vulnerability tasks when present; otherwise explicitly disclose that this framework baseline has no guaranteed no-extra-install native Java audit command.
12
+ - Review injection, unsafe deserialization, SSRF, file-path handling, command execution, and auth boundaries when relevant.
@@ -24,13 +24,15 @@
24
24
  - Avoid introducing vulnerable, deprecated, or unmaintained packages.
25
25
  - Keep dependencies minimal and justify new ones.
26
26
  - Treat ESLint, parser-based AST analysis, and similar static-analysis tooling as mandatory quality inputs when the repository provides them.
27
- - Run package audit commands when dependency graph changes:
28
- - `npm audit`
29
- - `pnpm audit`
30
- - `yarn audit`
31
- - In npm-based repos, prefer running `npm audit` at implementation close when feasible.
27
+ - Run the package-manager-native audit command for the active repo when a no-extra-install path exists:
28
+ - `package-lock.json` -> `npm audit`
29
+ - `pnpm-lock.yaml` -> `pnpm audit`
30
+ - `yarn.lock` -> `yarn audit`, or the repo-configured Yarn equivalent if the active Yarn version does not expose `yarn audit`
31
+ - If no safe native audit command is available in the active environment, disclose that explicitly in implementation/review notes instead of silently skipping it.
32
32
  - Ensure user-controlled values do not flow into unsafe sinks without validation.
33
+ - Review for XSS, SQL/NoSQL injection, command injection, path traversal, SSRF, CSRF, open redirects, unsafe deserialization, and secret exposure when relevant.
33
34
  - Ensure authn/authz ownership checks for resource-level operations.
35
+ - For React/Next/Vite-style frontend work, apply `../12-react-frontend-review-checklist.md`.
34
36
 
35
37
  ## Testing and Validation
36
38
 
@@ -48,4 +50,5 @@ Reviewers should additionally check:
48
50
  - stale or dead code
49
51
  - unsafe data exposure in API responses
50
52
  - dependency risk introduced by new packages
53
+ - dependency vulnerability findings reported as high priority regardless of underlying tool severity
51
54
  - lint/parser/static-analysis findings for the changed scope and whether they were addressed or intentionally deferred
@@ -8,3 +8,5 @@
8
8
  ## Verification Guidance
9
9
 
10
10
  - Run lint, tests, static analysis, and dependency checks appropriate to Composer and the repo.
11
+ - When `composer.lock` is present, run `composer audit`.
12
+ - Review input validation, injection boundaries, file-path handling, authz, and secret exposure when relevant.
@@ -13,4 +13,5 @@
13
13
  ## Verification Guidance
14
14
 
15
15
  - Run formatter, linter, tests, and packaging/build checks appropriate to the repo.
16
- - Run dependency vulnerability checks appropriate to the environment when dependencies change.
16
+ - Prefer repo-configured dependency vulnerability tooling when present; otherwise explicitly disclose that Python has no guaranteed no-extra-install native audit command in this framework baseline.
17
+ - Review input handling, deserialization, SSRF/file-path boundaries, command execution, and secret exposure when relevant.
@@ -8,3 +8,5 @@
8
8
  ## Verification Guidance
9
9
 
10
10
  - Run tests, linters, and dependency safety checks appropriate to the repo.
11
+ - Prefer repo-configured Ruby dependency safety tooling when present; otherwise explicitly disclose that this framework baseline has no guaranteed no-extra-install native Ruby audit command.
12
+ - Review injection, unsafe metaprogramming/deserialization, command execution, and secret exposure when relevant.
@@ -8,4 +8,5 @@
8
8
  ## Verification Guidance
9
9
 
10
10
  - Run formatting, clippy, tests, and build checks appropriate to the repo.
11
- - Review crate safety when dependencies change.
11
+ - If `cargo audit` is already available or already configured by the repo, run it; otherwise explicitly disclose that this framework baseline has no guaranteed no-extra-install native Rust vulnerability audit command.
12
+ - Review unsafe blocks, deserialization/input boundaries, command execution, path handling, and crate safety when dependencies change.
@@ -3,9 +3,12 @@
3
3
  ## Product Boundaries
4
4
 
5
5
  - Consider routing, screen states, loading/error states, form validation, auth boundaries, and accessibility.
6
+ - Consider user-controlled input paths, client-visible secrets, unsafe redirects, third-party script impact, and reduced-motion handling when relevant.
7
+ - For React/Next/Vite-style web apps, apply `../12-react-frontend-review-checklist.md` during implementation and review.
6
8
 
7
9
  ## Verification
8
10
 
9
11
  - Verify affected pages, components, or flows render correctly in local/dev environment when applicable.
10
12
  - Confirm client-visible error handling and loading states where impacted.
11
- - Confirm impacted routes boot without runtime crashes.
13
+ - Confirm impacted routes boot without runtime crashes.
14
+ - After fixes, verify that key user-facing flows still work and that no intended functionality was removed while resolving the issue.
@@ -22,3 +22,6 @@ TBD
22
22
 
23
23
  ## Success criteria
24
24
  TBD
25
+
26
+ ## Security / dependency concerns
27
+ TBD
@@ -12,6 +12,9 @@ TBD
12
12
  ## Risks / unknowns
13
13
  TBD
14
14
 
15
+ ## Security / dependency risk plan
16
+ TBD
17
+
15
18
  ## Suggested execution order
16
19
  TBD
17
20
 
@@ -15,8 +15,11 @@ TBD
15
15
  ## Constraints
16
16
  TBD
17
17
 
18
+ ## Security boundaries / attack surface
19
+ TBD
20
+
18
21
  ## Design decisions
19
22
  TBD
20
23
 
21
24
  ## Mermaid diagrams
22
- TBD
25
+ TBD
@@ -3,14 +3,26 @@
3
3
  ## Quality & maintainability findings
4
4
  TBD
5
5
 
6
+ ## Vulnerability audit findings
7
+ TBD
8
+
6
9
  ## Security / boundary findings
7
10
  TBD
8
11
 
12
+ ## Optimization findings
13
+ TBD
14
+
9
15
  ## Severity / priority
10
16
  TBD
11
17
 
12
18
  ## Recommended fixes
13
19
  TBD
14
20
 
21
+ ## Lint/parser/static-analysis observations
22
+ TBD
23
+
24
+ ## Residual risks
25
+ TBD
26
+
15
27
  ## Reviewed scope and non-reviewed scope
16
- TBD
28
+ TBD