@rudinmax87/united-we-stand 0.1.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.
Files changed (169) hide show
  1. package/.united-we-stand/README.md +523 -0
  2. package/.united-we-stand/agents/0-status-checker.md +65 -0
  3. package/.united-we-stand/agents/1-initializer.md +48 -0
  4. package/.united-we-stand/agents/2-planner.md +44 -0
  5. package/.united-we-stand/agents/3-designer.md +50 -0
  6. package/.united-we-stand/agents/4-implementer.md +56 -0
  7. package/.united-we-stand/agents/5-code-reviewer.md +51 -0
  8. package/.united-we-stand/agents/6-finalizer.md +53 -0
  9. package/.united-we-stand/agents/accessibility-reviewer.md +15 -0
  10. package/.united-we-stand/agents/api-contract-writer.md +15 -0
  11. package/.united-we-stand/agents/data-modeler.md +15 -0
  12. package/.united-we-stand/agents/debugger.md +15 -0
  13. package/.united-we-stand/agents/documentation-writer.md +15 -0
  14. package/.united-we-stand/agents/migration-planner.md +15 -0
  15. package/.united-we-stand/agents/observability-reviewer.md +15 -0
  16. package/.united-we-stand/agents/performance-reviewer.md +15 -0
  17. package/.united-we-stand/agents/project-manager.md +15 -0
  18. package/.united-we-stand/agents/refactorer.md +15 -0
  19. package/.united-we-stand/agents/release-coordinator.md +15 -0
  20. package/.united-we-stand/agents/sql-database-designer.md +24 -0
  21. package/.united-we-stand/agents/test-strategist.md +15 -0
  22. package/.united-we-stand/agents/web-designer.md +19 -0
  23. package/.united-we-stand/agents-md-block.md +153 -0
  24. package/.united-we-stand/antigravity-workflow.md +15 -0
  25. package/.united-we-stand/copilot-instructions.md +15 -0
  26. package/.united-we-stand/cursor-rule.mdc +18 -0
  27. package/.united-we-stand/framework/00-index.md +53 -0
  28. package/.united-we-stand/framework/01-core-rules.md +157 -0
  29. package/.united-we-stand/framework/02-state-model.md +143 -0
  30. package/.united-we-stand/framework/03-stage-lifecycle.md +67 -0
  31. package/.united-we-stand/framework/04-command-routing.md +258 -0
  32. package/.united-we-stand/framework/05-conflict-resolution.md +41 -0
  33. package/.united-we-stand/framework/06-spec-writing-standard.md +156 -0
  34. package/.united-we-stand/framework/07-definition-of-done.md +52 -0
  35. package/.united-we-stand/framework/08-skip-force-policy.md +51 -0
  36. package/.united-we-stand/framework/09-traceability-model.md +37 -0
  37. package/.united-we-stand/framework/10-review-model.md +67 -0
  38. package/.united-we-stand/framework/11-glossary.md +16 -0
  39. package/.united-we-stand/framework/profiles/00-profile-selection.md +21 -0
  40. package/.united-we-stand/framework/profiles/api-service.md +11 -0
  41. package/.united-we-stand/framework/profiles/cli-tool.md +9 -0
  42. package/.united-we-stand/framework/profiles/csharp.md +10 -0
  43. package/.united-we-stand/framework/profiles/data-pipeline.md +9 -0
  44. package/.united-we-stand/framework/profiles/generic.md +37 -0
  45. package/.united-we-stand/framework/profiles/go.md +12 -0
  46. package/.united-we-stand/framework/profiles/java.md +11 -0
  47. package/.united-we-stand/framework/profiles/javascript-typescript.md +51 -0
  48. package/.united-we-stand/framework/profiles/library-package.md +10 -0
  49. package/.united-we-stand/framework/profiles/mobile-app.md +9 -0
  50. package/.united-we-stand/framework/profiles/php.md +10 -0
  51. package/.united-we-stand/framework/profiles/python.md +16 -0
  52. package/.united-we-stand/framework/profiles/ruby.md +10 -0
  53. package/.united-we-stand/framework/profiles/rust.md +11 -0
  54. package/.united-we-stand/framework/profiles/web-app.md +11 -0
  55. package/.united-we-stand/playbooks/00-index.md +19 -0
  56. package/.united-we-stand/playbooks/api-change.md +3 -0
  57. package/.united-we-stand/playbooks/bugfix.md +3 -0
  58. package/.united-we-stand/playbooks/data-model-change.md +3 -0
  59. package/.united-we-stand/playbooks/docs-only-change.md +3 -0
  60. package/.united-we-stand/playbooks/existing-feature-enhancement.md +3 -0
  61. package/.united-we-stand/playbooks/greenfield-feature.md +3 -0
  62. package/.united-we-stand/playbooks/migration.md +3 -0
  63. package/.united-we-stand/playbooks/refactor.md +3 -0
  64. package/.united-we-stand/playbooks/release-preparation.md +3 -0
  65. package/.united-we-stand/playbooks/security-hotfix.md +3 -0
  66. package/.united-we-stand/playbooks/ui-ux-change.md +3 -0
  67. package/.united-we-stand/spec-driven/branch-template/00-current-status.md +46 -0
  68. package/.united-we-stand/spec-driven/branch-template/01-init.md +24 -0
  69. package/.united-we-stand/spec-driven/branch-template/02-plan.md +19 -0
  70. package/.united-we-stand/spec-driven/branch-template/03-design.md +22 -0
  71. package/.united-we-stand/spec-driven/branch-template/04-implementation.md +19 -0
  72. package/.united-we-stand/spec-driven/branch-template/05-code-review.md +16 -0
  73. package/.united-we-stand/spec-driven/branch-template/06-finalization.md +22 -0
  74. package/.united-we-stand/spec-driven/branch-template/07-decisions.md +10 -0
  75. package/.united-we-stand/spec-driven/branch-template/08-traceability.md +7 -0
  76. package/.united-we-stand/spec-driven/branch-template/09-risks-issues.md +10 -0
  77. package/.united-we-stand/spec-driven/branch-template/10-test-strategy.md +16 -0
  78. package/.united-we-stand/spec-driven/branch-template/11-change-log.md +5 -0
  79. package/.united-we-stand/spec-driven/branch-template/12-handoff.md +10 -0
  80. package/.united-we-stand/spec-driven/branch-template/13-retrospective.md +10 -0
  81. package/.united-we-stand/spec-driven/branch-template/api/auth-boundaries.md +3 -0
  82. package/.united-we-stand/spec-driven/branch-template/api/contracts.md +3 -0
  83. package/.united-we-stand/spec-driven/branch-template/api/endpoints.md +3 -0
  84. package/.united-we-stand/spec-driven/branch-template/data/data-boundaries.md +3 -0
  85. package/.united-we-stand/spec-driven/branch-template/data/migrations.md +3 -0
  86. package/.united-we-stand/spec-driven/branch-template/data/schema-notes.md +3 -0
  87. package/.united-we-stand/spec-driven/branch-template/modules/example-module.md +12 -0
  88. package/.united-we-stand/spec-driven/branch-template/ux/copy-notes.md +3 -0
  89. package/.united-we-stand/spec-driven/branch-template/ux/screen-states.md +3 -0
  90. package/.united-we-stand/spec-driven/branch-template/ux/user-flows.md +3 -0
  91. package/.united-we-stand/steering/00-index.md +15 -0
  92. package/.united-we-stand/steering/architecture-steering.md +13 -0
  93. package/.united-we-stand/steering/coding-steering.md +77 -0
  94. package/.united-we-stand/steering/data-steering.md +31 -0
  95. package/.united-we-stand/steering/documentation-steering.md +11 -0
  96. package/.united-we-stand/steering/observability-steering.md +11 -0
  97. package/.united-we-stand/steering/product-steering.md +16 -0
  98. package/.united-we-stand/steering/repo-conventions.md +12 -0
  99. package/.united-we-stand/steering/security-steering.md +12 -0
  100. package/.united-we-stand/steering/testing-steering.md +11 -0
  101. package/.united-we-stand/steering/ux-steering.md +26 -0
  102. package/LICENSE +21 -0
  103. package/README.md +595 -0
  104. package/dist/cli.d.ts +7 -0
  105. package/dist/cli.d.ts.map +1 -0
  106. package/dist/cli.js +96 -0
  107. package/dist/cli.js.map +1 -0
  108. package/dist/commands/branch-init.d.ts +16 -0
  109. package/dist/commands/branch-init.d.ts.map +1 -0
  110. package/dist/commands/branch-init.js +337 -0
  111. package/dist/commands/branch-init.js.map +1 -0
  112. package/dist/commands/doctor.d.ts +17 -0
  113. package/dist/commands/doctor.d.ts.map +1 -0
  114. package/dist/commands/doctor.js +527 -0
  115. package/dist/commands/doctor.js.map +1 -0
  116. package/dist/commands/install.d.ts +18 -0
  117. package/dist/commands/install.d.ts.map +1 -0
  118. package/dist/commands/install.js +127 -0
  119. package/dist/commands/install.js.map +1 -0
  120. package/dist/commands/refresh.d.ts +17 -0
  121. package/dist/commands/refresh.d.ts.map +1 -0
  122. package/dist/commands/refresh.js +69 -0
  123. package/dist/commands/refresh.js.map +1 -0
  124. package/dist/index.d.ts +8 -0
  125. package/dist/index.d.ts.map +1 -0
  126. package/dist/index.js +8 -0
  127. package/dist/index.js.map +1 -0
  128. package/dist/lib/branch-routing.d.ts +14 -0
  129. package/dist/lib/branch-routing.d.ts.map +1 -0
  130. package/dist/lib/branch-routing.js +62 -0
  131. package/dist/lib/branch-routing.js.map +1 -0
  132. package/dist/lib/branch.d.ts +12 -0
  133. package/dist/lib/branch.d.ts.map +1 -0
  134. package/dist/lib/branch.js +19 -0
  135. package/dist/lib/branch.js.map +1 -0
  136. package/dist/lib/fs.d.ts +37 -0
  137. package/dist/lib/fs.d.ts.map +1 -0
  138. package/dist/lib/fs.js +123 -0
  139. package/dist/lib/fs.js.map +1 -0
  140. package/dist/lib/git.d.ts +20 -0
  141. package/dist/lib/git.d.ts.map +1 -0
  142. package/dist/lib/git.js +87 -0
  143. package/dist/lib/git.js.map +1 -0
  144. package/dist/lib/github.d.ts +13 -0
  145. package/dist/lib/github.d.ts.map +1 -0
  146. package/dist/lib/github.js +105 -0
  147. package/dist/lib/github.js.map +1 -0
  148. package/dist/lib/logger.d.ts +26 -0
  149. package/dist/lib/logger.d.ts.map +1 -0
  150. package/dist/lib/logger.js +37 -0
  151. package/dist/lib/logger.js.map +1 -0
  152. package/dist/lib/markers.d.ts +25 -0
  153. package/dist/lib/markers.d.ts.map +1 -0
  154. package/dist/lib/markers.js +60 -0
  155. package/dist/lib/markers.js.map +1 -0
  156. package/dist/lib/package-version.d.ts +6 -0
  157. package/dist/lib/package-version.d.ts.map +1 -0
  158. package/dist/lib/package-version.js +18 -0
  159. package/dist/lib/package-version.js.map +1 -0
  160. package/dist/lib/runtime-state.d.ts +35 -0
  161. package/dist/lib/runtime-state.d.ts.map +1 -0
  162. package/dist/lib/runtime-state.js +131 -0
  163. package/dist/lib/runtime-state.js.map +1 -0
  164. package/dist/lib/templates.d.ts +88 -0
  165. package/dist/lib/templates.d.ts.map +1 -0
  166. package/dist/lib/templates.js +213 -0
  167. package/dist/lib/templates.js.map +1 -0
  168. package/package.json +57 -0
  169. package/public/united-we-stand-logo.png +0 -0
@@ -0,0 +1,523 @@
1
+ # .united-we-stand
2
+
3
+ This folder is the installed runtime framework for `united-we-stand`.
4
+
5
+ It is meant for people using the package inside their repositories.
6
+
7
+ ## Install The Package
8
+
9
+ The primary public package in npm is:
10
+
11
+ - `@rudinmax87/united-we-stand`
12
+
13
+ This is the current public npm example for this repository. If you are using a fork or republished variant, replace that scope and package name with your own.
14
+
15
+ Install it globally from npm:
16
+
17
+ ```bash
18
+ npm install -g @rudinmax87/united-we-stand
19
+ ```
20
+
21
+ Requirements:
22
+
23
+ - Node.js 18+
24
+ - git
25
+
26
+ ### Alternative: install from GitHub Packages
27
+
28
+ If you are intentionally installing from GitHub Packages instead, authenticate npm first.
29
+
30
+ Treat `@mrudinal` below as the current example GitHub Packages scope for this repository. If you install from your own fork or organization, replace it with your own GitHub owner scope.
31
+
32
+ ### 1. Create a GitHub personal access token (classic)
33
+
34
+ Create a token with at least:
35
+
36
+ - `read:packages`
37
+
38
+ If the package is tied to a private repository and your account needs repository access through the token, also include the repository permissions required by your GitHub account setup.
39
+
40
+ ### 2. Authenticate npm to GitHub Packages
41
+
42
+ Option A: add your token to `~/.npmrc`
43
+
44
+ ```ini
45
+ @YOUR_GITHUB_SCOPE:registry=https://npm.pkg.github.com
46
+ //npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT_CLASSIC
47
+ ```
48
+
49
+ Example for this repository:
50
+
51
+ ```ini
52
+ @mrudinal:registry=https://npm.pkg.github.com
53
+ //npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT_CLASSIC
54
+ ```
55
+
56
+ Option B: log in with npm
57
+
58
+ ```bash
59
+ npm login --scope=@YOUR_GITHUB_SCOPE --auth-type=legacy --registry=https://npm.pkg.github.com
60
+ ```
61
+
62
+ Example for this repository:
63
+
64
+ ```bash
65
+ npm login --scope=@mrudinal --auth-type=legacy --registry=https://npm.pkg.github.com
66
+ ```
67
+
68
+ When prompted, use:
69
+
70
+ - Username: your GitHub username
71
+ - Password: your GitHub personal access token (classic)
72
+ - Email: your GitHub account email
73
+
74
+ ### 3. Install the package globally from GitHub Packages
75
+
76
+ ```bash
77
+ npm install -g @YOUR_GITHUB_SCOPE/united-we-stand
78
+ ```
79
+
80
+ Installing this specific package:
81
+
82
+ ```bash
83
+ npm install -g @mrudinal/united-we-stand
84
+ ```
85
+
86
+ If your scope mapping is not already in `~/.npmrc`, you can also install with the registry flag explicitly:
87
+
88
+ ```bash
89
+ npm install -g @YOUR_GITHUB_SCOPE/united-we-stand --registry=https://npm.pkg.github.com
90
+ ```
91
+
92
+ Installing this specific package from github:
93
+
94
+ ```bash
95
+ npm install -g @mrudinal/united-we-stand --registry=https://npm.pkg.github.com
96
+ ```
97
+
98
+ ### 4. Verify the CLI is available
99
+
100
+ ```bash
101
+ united-we-stand --version
102
+ ```
103
+
104
+ ## Use It In A Repository
105
+
106
+ Go to the target repository:
107
+
108
+ ```bash
109
+ cd /path/to/your-repository
110
+ ```
111
+
112
+ Install the framework files:
113
+
114
+ ```bash
115
+ united-we-stand install
116
+ ```
117
+
118
+ For resetting the framework back to the defaults and overwrite everything under `.united-we-stand/`:
119
+
120
+ ```bash
121
+ united-we-stand install --force
122
+ ```
123
+
124
+ Use `install --force` when you want to discard local edits to the installed framework and restore the default framework files shipped by the package. Treat `.united-we-stand/` as resettable package content, not as the place for branch-specific working memory. Branch-specific and request-specific custom rules, decisions, notes, and execution state should live under `.spec-driven/<branch-folder>/` in the files created by `branch-init`.
125
+
126
+ ## What Gets Installed
127
+
128
+ `united-we-stand install` writes:
129
+
130
+ - `AGENTS.md`
131
+ - `.github/copilot-instructions.md`
132
+ - `.agents/workflows/united-we-stand.md`
133
+ - `.cursor/rules/united-we-stand.mdc`
134
+ - the installed framework docs and agent files under `.united-we-stand/`
135
+
136
+ `united-we-stand install --force` resets the installed framework back to the package defaults and overwrites the shipped files under:
137
+
138
+ - the installed framework docs and agent files under `.united-we-stand/`
139
+
140
+ Use that when `.united-we-stand/` was edited locally and you want the default framework back.
141
+
142
+ Branch templates remain package-internal assets used during initialization and normal chat-driven framework usage. They are not meant to be treated as user-edited installed docs.
143
+
144
+ `united-we-stand branch-init` writes:
145
+
146
+ - `.spec-driven/<branch-folder>/00-current-status.md`
147
+ - `.spec-driven/<branch-folder>/01-init.md`
148
+ - `.spec-driven/<branch-folder>/state.json`
149
+ - `.spec-driven/.branch-routing.json` when a branch uses a non-default folder mapping
150
+
151
+ ### Use It In Chat First
152
+
153
+ After `united-we-stand install`, the intended primary interface is the AI chat, not a long CLI workflow.
154
+
155
+ Typical chat bootstrap examples:
156
+
157
+ - `initialize this`
158
+ - `init the following`
159
+ - `let's start this`
160
+ - `help me with the following idea, i want...`
161
+ - `plan this`
162
+ - `design this`
163
+ - `implement this`
164
+ - `do a code review`
165
+ - `wrap this up`
166
+ - `what's my status`
167
+
168
+ How chat usage works:
169
+
170
+ - if branch memory does not exist yet, explicit initialization prompts should start `1-initializer`
171
+ - broad start-of-work prompts should also default to `1-initializer` unless you explicitly ask for a later stage
172
+ - if branch memory does not exist yet and you ask for direct code changes, the AI should warn that united-we-stand is not initialized and ask whether to proceed outside the framework for the current chat
173
+ - once you confirm outside-framework work for the current chat, the AI should not ask that same confirmation again unless you later return to framework mode
174
+ - if the current branch is the detected default branch, initialization should warn and ask for confirmation before creating branch memory unless you explicitly use `--force`
175
+
176
+ The workflow is mainly used in chat after installation:
177
+
178
+ 1. `1-initializer`: `AGENTS.md initialize this branch for adding OAuth login`
179
+ 2. `2-planner`: `plan this feature`
180
+ 3. `3-designer`: `design the architecture for this change`
181
+ 4. `4-implementer`: `implement this now`
182
+ 5. `5-code-reviewer`: `do a code review`
183
+ 6. `6-finalizer`: `wrap this up`
184
+
185
+ `0-status-checker` is a routing and validation stage, not a delivery stage. Example: `what's my status`
186
+
187
+ For the most reliable initialization bootstrap, explicitly reference an installed framework file in the prompt, for example `.united-we-stand/README.md initialize this` or `AGENTS.md init the following`.
188
+ In normal chat usage, the AI should create branch memory during initialization, follow the numbered workflow stages, and use standalone agents only when the task calls for specialized help.
189
+
190
+ After the workflow is initialized, each stage writes or updates its branch file as follows:
191
+
192
+ | Stage | File name | General description |
193
+ |-------|-----------|---------------------|
194
+ | `0-status-checker` | `00-current-status.md` | Current branch status, blockers, recommended next step, and routing state |
195
+ | `1-initializer` | `01-init.md` | Raw idea, scope, assumptions, open questions, and success criteria |
196
+ | `2-planner` | `02-plan.md` | Ordered plan, dependencies, risks, and suggested execution order |
197
+ | `3-designer` | `03-design.md` | Architecture, interfaces, boundaries, data flow, and design decisions |
198
+ | `4-implementer` | `04-implementation.md` | What changed in code, validation performed, and remaining gaps |
199
+ | `5-code-reviewer` | `05-code-review.md` | Quality, maintainability, security, and review findings |
200
+ | `6-finalizer` | `06-finalization.md` | Final summary, uncaptured changes, doc updates, and closure confirmation |
201
+
202
+ ## Runtime Branch Memory
203
+
204
+ Runtime branch memory is intentionally stored outside this folder at:
205
+
206
+ - `.spec-driven/<sanitized-branch>/`
207
+ - `.spec-driven/.branch-routing.json`
208
+ - `.spec-driven/<sanitized-branch>/state.json`
209
+
210
+ `state.json` is the machine-readable branch record and includes:
211
+
212
+ - original branch name
213
+ - sanitized branch name
214
+ - resolved branch memory folder
215
+ - current workflow stage
216
+ - completed and incompleted stages
217
+ - next recommended step
218
+ - update metadata
219
+
220
+ Fresh `branch-init` creates the branch folder, captures the raw idea in `01-init.md`, writes `00-current-status.md` and `state.json`, and leaves the branch in active `1-initializer` mode until initializer content is completed.
221
+ It should not pre-create later numbered stage files just from initialization alone.
222
+
223
+ Keep branch-specific and request-specific working context in `.spec-driven/<branch-folder>/`. The installed `.united-we-stand/` directory should be treated as the default framework layer that can be refreshed or reset back to package defaults.
224
+ For branch-scoped work, the AI should operate inside `.spec-driven/<branch-folder>/` by default and update the relevant spec files first unless you explicitly say not to, or the request is unrelated, informational only, or does not require repository/spec changes.
225
+
226
+ ## What To Read First
227
+
228
+ Normal read order after installation:
229
+
230
+ 1. repository `AGENTS.md`
231
+ 2. `.united-we-stand/framework/00-index.md`
232
+ 3. relevant profile docs under `.united-we-stand/framework/profiles/`
233
+ 4. relevant steering docs under `.united-we-stand/steering/`
234
+ 5. branch runtime files under `.spec-driven/<branch-folder>/`
235
+
236
+ ## Framework Stage Order
237
+
238
+ The numbered framework stages are:
239
+
240
+ 0. `0-status-checker`: inspect workflow state, detect gaps, validate consistency, and route the next correct action
241
+ 1. `1-initializer`: capture the branch intent, scope, assumptions, open questions, and success criteria
242
+ 2. `2-planner`: turn initialized intent into an ordered execution plan with dependencies and risks
243
+ 3. `3-designer`: define architecture, interfaces, boundaries, and implementation approach before coding
244
+ 4. `4-implementer`: make the code changes and record what changed plus how it was validated
245
+ 5. `5-code-reviewer`: review implementation quality, security, test sufficiency, and remaining issues
246
+ 6. `6-finalizer`: summarize delivered scope, identify spec/code mismatches or uncaptured changes, ask for explicit user approval, and only then close the workflow with `Current stage = none`
247
+
248
+ ### Proper Order
249
+
250
+ Normal workflow order:
251
+
252
+ 1. `1-initializer`
253
+ 2. `2-planner`
254
+ 3. `3-designer`
255
+ 4. `4-implementer`
256
+ 5. `5-code-reviewer`
257
+ 6. `6-finalizer`
258
+
259
+ `0-status-checker` is a routing and validation stage, not a delivery stage.
260
+
261
+ ### Mandatory vs Optional
262
+
263
+ Mandatory framework stages:
264
+
265
+ - `1-initializer`
266
+ - `4-implementer`
267
+
268
+ Optional framework stages:
269
+
270
+ - `0-status-checker`
271
+ - `2-planner`
272
+ - `3-designer`
273
+ - `5-code-reviewer`
274
+ - `6-finalizer`
275
+
276
+ ### Important Workflow Rules
277
+
278
+ - a fresh branch starts in active `1-initializer` mode
279
+ - the current stage stays anchored until the user explicitly advances or bypasses it
280
+ - never auto-advance to the next phase
281
+ - adding or modifying content inside a stage does not advance that stage by itself
282
+ - never move the workflow backward to an earlier numbered stage once a later stage has been reached
283
+ - while workflow is active, `Current stage` should match the highest created numbered stage file in `.spec-driven/<branch-folder>/` among `01-init.md` through `06-finalization.md`; after explicit finalizer approval, closed workflow may use `Current stage = none`
284
+ - if you ask to change planning, init, design, review, or finalization content, the AI should update that stage in place without creating the next stage
285
+ - if you ask for earlier-stage work after the workflow has already moved forward, the AI should do that work without regressing `Current stage`, `Completed steps`, or `Incompleted stages`; it should record the stale downstream impact in status metadata instead
286
+ - if a request could be interpreted as advancing through two or more phases at once, the AI should ask for confirmation first and explicitly list the phases it would run together
287
+ - for branch-scoped work, the AI should stay inside `.spec-driven/<branch-folder>/` by default and update specs first unless you explicitly say otherwise
288
+ - later stage files should be created when those stages are actually started or explicitly amended
289
+ - `4-implementer` is the first framework stage allowed to change code
290
+ - `6-finalizer` should check for meaningful code/doc changes that were not captured in the specs, ask the user to confirm the final state, and only then close the workflow with `Current stage = none`
291
+ - if a closed branch receives new work later, the workflow should reopen `6-finalizer` and require final approval again
292
+ - standalone specialist agents are separate from the numbered framework stages
293
+
294
+ ## CLI Commands vs Chat Commands
295
+
296
+ There are only four CLI commands:
297
+
298
+ - `united-we-stand install`
299
+ - `united-we-stand branch-init "Describe the change"`
300
+ - `united-we-stand refresh`
301
+ - `united-we-stand doctor`
302
+
303
+ There are no CLI subcommands for the numbered framework stages such as `united-we-stand planner` or `united-we-stand finalizer`.
304
+
305
+ The numbered stages are meant to be called from the AI chat, not from the CLI.
306
+
307
+ ## Using Natural Language In Chat
308
+
309
+ You can talk to the AI very naturally. You do not need rigid command syntax as long as the intent is clear.
310
+
311
+ Examples:
312
+
313
+ - `initialize this branch for adding OAuth login`
314
+ - `let's start this`
315
+ - `help me with the following idea, i want a community tab`
316
+ - `i want to build a community section`
317
+ - `i want to create an admin login flow`
318
+ - `let's work on the admin login flow`
319
+ - `plan this feature`
320
+ - `design the architecture for this change`
321
+ - `implement this now`
322
+ - `do a code review`
323
+ - `wrap this up`
324
+ - `what's my status`
325
+ - `continue`
326
+ - `next step`
327
+
328
+ The framework is designed to route short natural requests such as `continue`, `fix it`, `implement this`, `review this`, and `check for gaps` to the nearest safe workflow action.
329
+
330
+ - If you ask to modify a specific stage, for example `add this in planning` or `update init`, that should be treated as an in-place stage amendment and not as permission to auto-advance to the next stage.
331
+ - If you ask for earlier-stage work while the branch is already in a later stage, the AI should perform that work without moving the workflow backward; instead it should mark downstream state as needing refresh in the status metadata.
332
+ - The most reliable direct NLP bootstrap for initialization is to reference any installed united-we-stand file together with the init request, for example `AGENTS.md initialize this` or `.united-we-stand/README.md init the following`.
333
+ - If branch memory does not exist yet, an explicit request such as `init the following` or `initialize this` should be treated as permission to create the branch spec and start `1-initializer`.
334
+ - If branch memory does not exist yet and the current branch is detected as the repository default branch, explicit init requests should still warn and ask for confirmation before creating `.spec-driven/...` unless you explicitly use `--force`.
335
+ - If branch memory does not exist yet, broader natural phrases such as `let's start this`, `help me with the following idea, i want...`, `i want to build...`, `i want to create...`, or `let's work on...` should also default to `1-initializer` unless you explicitly ask for a later stage.
336
+ - If branch memory does not exist yet and you ask for concrete code changes or other persistent repo work without explicitly asking to initialize the framework, the AI should first warn that united-we-stand is not initialized for that branch and ask whether you want to proceed outside the framework for the current chat.
337
+ - If you confirm that outside-framework work is fine, the AI should continue outside the framework for the rest of the current chat without asking for the same confirmation again unless you later ask to initialize or return to framework flow.
338
+
339
+ ## Framework Stage Chat Routes
340
+
341
+ Examples for each numbered stage:
342
+
343
+ - `initialize this` -> `1-initializer`
344
+ - `init the following` -> `1-initializer`
345
+ - `plan this` -> `2-planner`
346
+ - `design this` -> `3-designer`
347
+ - `implement this` -> `4-implementer`
348
+ - `review this` or `do a code review` -> `5-code-reviewer`
349
+ - `finalize this` or `wrap this up` -> `6-finalizer`
350
+
351
+ These route labels describe which framework behavior handles the request. They do not mean the workflow metadata should move backward if the branch is already in a later stage.
352
+
353
+ More example prompts:
354
+
355
+ - `initialize this branch for adding OAuth login`
356
+ - `let's start this`
357
+ - `help me with the following idea, i want a community tab`
358
+ - `i want to build a community section`
359
+ - `i want to create an admin login flow`
360
+ - `let's work on the admin login flow`
361
+ - `plan this feature`
362
+ - `design the architecture for this change`
363
+ - `implement this now`
364
+ - `do a code review`
365
+ - `wrap this up`
366
+
367
+ Related status and progression prompts:
368
+
369
+ - `what's my status`
370
+ - `show my status`
371
+ - `check for gaps`
372
+ - `continue`
373
+ - `next step`
374
+ - `do the next step`
375
+
376
+ Status answers should always state both:
377
+
378
+ - the current stage
379
+ - the recommended next stage
380
+
381
+ ## Direct Chat Routes
382
+
383
+ Framework-stage routes:
384
+
385
+ - `what's my status` -> `0-status-checker`
386
+ - `show my status` -> `0-status-checker`
387
+ - `check for gaps` -> `0-status-checker`
388
+ - `initialize this` -> `1-initializer`
389
+ - `init the following` -> `1-initializer`
390
+ - `let's start this` -> `1-initializer` when branch memory does not exist yet
391
+ - `help me with the following idea, i want...` -> `1-initializer` when branch memory does not exist yet
392
+ - `i want to build...` -> `1-initializer` when branch memory does not exist yet
393
+ - `i want to create...` -> `1-initializer` when branch memory does not exist yet
394
+ - `let's work on...` -> `1-initializer` when branch memory does not exist yet
395
+ - `plan this` -> `2-planner`
396
+ - `design this` -> `3-designer`
397
+ - `implement this` -> `4-implementer`
398
+ - `review this` -> `5-code-reviewer`
399
+ - `do a code review` -> `5-code-reviewer`
400
+ - `review quality` -> `5-code-reviewer` with quality scope
401
+ - `review security` -> `5-code-reviewer` with security scope
402
+ - `security compliance check` -> `5-code-reviewer` with security scope
403
+ - `finalize this` -> `6-finalizer`
404
+ - `wrap this up` -> `6-finalizer`
405
+
406
+ These direct route labels select the acting stage behavior. If the workflow is already in a later stage, they must not regress `Current stage`, `Completed steps`, or `Incompleted stages`.
407
+
408
+ If branch memory does not exist yet and a direct request such as `implement this`, `fix these vulnerabilities`, `upgrade this dependency`, or `refactor this module` would otherwise cause repo changes, the AI should not silently enter that framework stage. It should first warn that united-we-stand is not initialized for the branch and ask whether you want to proceed outside the framework for the current chat.
409
+
410
+ Standalone specialist routes:
411
+
412
+ - `debug this` -> `debugger`
413
+ - `document this` -> `documentation-writer`
414
+ - `manage this project` -> `project-manager`
415
+ - `refactor this` -> `refactorer`
416
+ - `plan tests for this` -> `test-strategist`
417
+ - `check performance` -> `performance-reviewer`
418
+ - `check accessibility` -> `accessibility-reviewer`
419
+ - `write api contracts` -> `api-contract-writer`
420
+ - `model the data` -> `data-modeler`
421
+ - `design sql schema` / `create database diagrams` / `modelo entidad relacion` -> `sql-database-designer`
422
+ - `plan migration` -> `migration-planner`
423
+ - `review observability` -> `observability-reviewer`
424
+ - `prepare release` -> `release-coordinator`
425
+ - `design the website layout` / `improve the palette` / `make the UI more formal` -> `web-designer`
426
+
427
+ Standalone route examples:
428
+
429
+ - `debug this failing branch-init flow`
430
+ - `document this install process`
431
+ - `refactor this CLI without changing behavior`
432
+ - `plan tests for this doctor command`
433
+ - `write api contracts for the new endpoint`
434
+ - `design sql schema for the booking tables`
435
+ - `create database diagrams for this workflow`
436
+ - `make this website more formal`
437
+ - `make the landing page more llamativa`
438
+ - `prepare release for this package`
439
+
440
+ ## Standalone Agents
441
+
442
+ Standalone agents can be used at any time when the task needs specialized help. They do not automatically become framework stages.
443
+
444
+ - `debugger`: investigate failures, isolate likely causes, and propose or implement minimal fixes when asked
445
+ - `documentation-writer`: write or improve documentation without automatically changing framework stage files
446
+ - `project-manager`: summarize scope, blockers, milestones, dependencies, and coordination needs
447
+ - `refactorer`: plan or execute structural improvements while preserving behavior
448
+ - `test-strategist`: design proportionate test strategy and identify critical test coverage gaps
449
+ - `performance-reviewer`: review latency, throughput, memory, and performance hotspots
450
+ - `accessibility-reviewer`: review accessibility concerns for UI work, including semantics and navigation
451
+ - `api-contract-writer`: define API request/response boundaries, contracts, and field exposure rules
452
+ - `data-modeler`: design or review schemas, migrations, and data boundaries
453
+ - `sql-database-designer`: design SQL schemas, migration layout, and required database flowcharts, sequence diagrams, entity-relationship models, and relational models
454
+ - `migration-planner`: plan safe technical or data migrations, including rollback and compatibility concerns
455
+ - `observability-reviewer`: review logging, metrics, tracing, and operational diagnosability
456
+ - `release-coordinator`: prepare release-readiness summaries, rollout notes, and follow-up actions
457
+ - `web-designer`: define or refine layout direction, palette, contrast, and audience-appropriate visual design for website changes
458
+
459
+ ## Layers
460
+
461
+ - `framework/`: canonical reusable workflow rules
462
+ - `steering/`: repository-specific steering
463
+ - `agents/`: numbered framework agents plus standalone specialists
464
+ - `playbooks/`: scenario-specific routing guides
465
+
466
+ ## Using The CLI
467
+
468
+ Initialize branch memory for the branch you are working on:
469
+
470
+ ```bash
471
+ united-we-stand branch-init "Describe the change you want to make"
472
+ ```
473
+
474
+ If you are on the repository default branch, `branch-init` should warn and ask for confirmation before creating branch memory there. This is meant to reduce long-lived workflow state on `main`/`master`-style branches when a feature branch would be safer.
475
+
476
+ If you are in detached HEAD, provide the branch name explicitly:
477
+
478
+ ```bash
479
+ united-we-stand branch-init --branch feature/my-change "Describe the change you want to make"
480
+ ```
481
+
482
+ If branch memory already exists and you intentionally want to reset only that branch memory back to initializer bootstrap files, use:
483
+
484
+ ```bash
485
+ united-we-stand branch-init --force "Describe the change you want to make"
486
+ ```
487
+
488
+ `branch-init --force` resets `.spec-driven/<branch-folder>/` for that branch only. It does not revert or roll back code changes in your repository.
489
+
490
+ Check the repository health:
491
+
492
+ ```bash
493
+ united-we-stand doctor
494
+ ```
495
+
496
+ Check a specific branch explicitly:
497
+
498
+ ```bash
499
+ united-we-stand doctor --branch feature/my-change
500
+ ```
501
+
502
+ Refresh missing framework files and managed blocks:
503
+
504
+ ```bash
505
+ united-we-stand refresh
506
+ ```
507
+
508
+ ## Typical First-Time Flow
509
+
510
+ ```bash
511
+ git checkout -b feature/my-change
512
+ united-we-stand install
513
+ united-we-stand branch-init "Describe the change you want to make"
514
+ united-we-stand doctor
515
+ ```
516
+
517
+ Chat-first alternative:
518
+
519
+ ```text
520
+ git checkout -b feature/my-change
521
+ united-we-stand install
522
+ then ask the AI: "initialize this" or "let's start this"
523
+ ```
@@ -0,0 +1,65 @@
1
+ # 0 - Status Checker
2
+
3
+ > **Category:** Framework agent (optional)
4
+ > **May change code:** No
5
+ > **Updates:** `00-current-status.md`
6
+
7
+ ## Purpose
8
+
9
+ Establish reliable branch state and route the next action.
10
+
11
+ ## Canonical References
12
+
13
+ - Core invariants: `../framework/01-core-rules.md`
14
+ - State semantics: `../framework/02-state-model.md`
15
+ - Stage progression: `../framework/03-stage-lifecycle.md`
16
+ - Routing behavior: `../framework/04-command-routing.md`
17
+ - Review depth checks: `../framework/10-review-model.md`
18
+
19
+ ## Behavior
20
+
21
+ - Read current branch status and available stage files.
22
+ - Detect contradictions in stage categories or next-step logic.
23
+ - Validate that required status fields exist.
24
+ - Validate that `Current stage` matches the highest created numbered stage file present in the branch folder while workflow is active, or that closed workflow state is represented correctly when `Current stage = none`.
25
+ - For status requests, always state the current stage and the recommended next stage explicitly, then provide completed/incompleted, blockers, and stale areas.
26
+ - For closed workflows, state that the branch is finalized/closed, that `Current stage = none`, and whether any new request would reopen `6-finalizer`.
27
+ - For explicit progression commands, route to the next valid stage.
28
+ - For stage amendment requests, preserve the anchored `Current stage` unless the user explicitly asks to advance, skip, or bypass.
29
+ - If a lower stage was amended, do not treat that amendment as permission to create or populate a later stage.
30
+ - If earlier-stage work was changed after the workflow had already moved forward, report the stale downstream areas in status output without regressing workflow metadata.
31
+ - If a request could be interpreted as advancing through multiple stages at once, stop and ask for confirmation while naming the exact stages that would be run together.
32
+ - Perform deterministic auto-correction for status contradictions when safe.
33
+ - If auto-correction is made in `00-current-status.md`, include a brief note to user explaining what was corrected.
34
+
35
+ ## Modes
36
+
37
+ ### Mode 1: Deep Review
38
+
39
+ Default for general status and gap checks.
40
+
41
+ - verify plan/design feasibility
42
+ - identify requirement gaps across stages
43
+ - detect stale or contradictory sections
44
+ - detect spec-vs-code mismatch signals
45
+
46
+ ### Mode 2: Workflow Routing
47
+
48
+ Used for explicit progression commands (`continue`, `next step`).
49
+
50
+ - return concise state summary
51
+ - provide exact next valid stage
52
+ - do not run deep architecture/security analysis unless asked
53
+
54
+ ## Outputs
55
+
56
+ - Current branch
57
+ - Current stage
58
+ - Recommended next stage
59
+ - Completed steps
60
+ - Incompleted stages
61
+ - Next recommended step
62
+ - Status note
63
+ - Blockers / warnings
64
+ - Last updated by
65
+ - Last updated at
@@ -0,0 +1,48 @@
1
+ # 1 - Initializer
2
+
3
+ > **Category:** Framework agent (**mandatory**)
4
+ > **May change code:** No
5
+ > **Updates:** `01-init.md`, `00-current-status.md`
6
+
7
+ ## Purpose
8
+
9
+ Capture and structure branch intent before planning/design/implementation.
10
+
11
+ ## Canonical References
12
+
13
+ - Core invariants: `../framework/01-core-rules.md`
14
+ - State updates: `../framework/02-state-model.md`
15
+ - Spec schema: `../framework/06-spec-writing-standard.md`
16
+
17
+ ## Prerequisites
18
+
19
+ None.
20
+
21
+ ## Behavior
22
+
23
+ - Convert user idea into initial branch definition.
24
+ - Capture scope boundaries, assumptions, questions, and success criteria.
25
+ - Capture out-of-scope explicitly to reduce downstream ambiguity.
26
+ - If branch memory does not exist yet and the user explicitly asks to initialize or init the work, create the branch spec for `1-initializer`.
27
+ - If branch memory does not exist yet and the user uses natural bootstrap language such as `let's start this`, `help me with this idea`, `i want to build...`, or `let's work on...`, treat that as initialization intent by default.
28
+ - If the current branch is detected as the repository default branch and branch memory does not exist yet, warn about default-branch risks and ask for confirmation before creating the branch spec unless the user explicitly used `--force` or equivalent force/bypass wording.
29
+ - Do not implement code.
30
+ - If the user asks to modify initializer content, update `01-init.md` in place and keep `Current stage = 1-initializer` unless the user explicitly advances.
31
+ - Do not create or populate planning content just because initializer content now looks complete.
32
+ - Do not create `02-plan.md`, `03-design.md`, or any later-stage file from an initialization request alone.
33
+ - If a user request could be interpreted as asking for initialization plus later stages in the same pass, ask for confirmation first and name the exact stages that would be executed.
34
+
35
+ ## Required Output (`01-init.md`)
36
+
37
+ - Raw idea / problem statement
38
+ - Scope (in)
39
+ - Scope (out)
40
+ - Assumptions
41
+ - Open questions
42
+ - Success criteria
43
+
44
+ ## Next-Step Status Rules
45
+
46
+ - Unfinished -> keep `Current stage = 1-initializer`, recommend continuing `1-initializer`.
47
+ - Skipped/forced -> move to `Incompleted stages`, set explicit new current stage.
48
+ - Completed/not advanced -> keep `Current stage = 1-initializer`, recommend `2-planner`.
@@ -0,0 +1,44 @@
1
+ # 2 - Planner
2
+
3
+ > **Category:** Framework agent (optional)
4
+ > **May change code:** No
5
+ > **Updates:** `02-plan.md`, `00-current-status.md`
6
+
7
+ ## Purpose
8
+
9
+ Turn initialized intent into an actionable sequence.
10
+
11
+ ## Canonical References
12
+
13
+ - Prerequisite and role rules: `../framework/01-core-rules.md`
14
+ - State updates: `../framework/02-state-model.md`
15
+ - Conflict handling: `../framework/05-conflict-resolution.md`
16
+ - Spec schema: `../framework/06-spec-writing-standard.md`
17
+
18
+ ## Prerequisites
19
+
20
+ - Step `1-initializer` complete unless explicit bypass/force behavior applies.
21
+
22
+ ## Behavior
23
+
24
+ - Produce ordered plan, dependencies, and risk visibility.
25
+ - Define suggested execution order and critical blockers.
26
+ - Do not implement code.
27
+ - If code/spec drift is observed, apply canonical conflict policy.
28
+ - If the user asks to add or modify planning content, update `02-plan.md` in place.
29
+ - Do not create or populate `03-design.md` from a planning amendment alone.
30
+ - Keep `Current stage = 2-planner` unless the user explicitly advances, skips, or bypasses.
31
+
32
+ ## Required Output (`02-plan.md`)
33
+
34
+ - Objectives
35
+ - High-level task breakdown
36
+ - Dependencies
37
+ - Risks / unknowns
38
+ - Suggested execution order
39
+
40
+ ## Next-Step Status Rules
41
+
42
+ - Unfinished -> continue `2-planner`.
43
+ - Skipped/forced -> move to `Incompleted stages`, set explicit next stage.
44
+ - Completed/not advanced -> keep `Current stage = 2-planner`, recommend `3-designer`.