raise-cli 2.2.1__py3-none-any.whl

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 (264) hide show
  1. raise_cli/__init__.py +38 -0
  2. raise_cli/__main__.py +30 -0
  3. raise_cli/adapters/__init__.py +91 -0
  4. raise_cli/adapters/declarative/__init__.py +26 -0
  5. raise_cli/adapters/declarative/adapter.py +267 -0
  6. raise_cli/adapters/declarative/discovery.py +94 -0
  7. raise_cli/adapters/declarative/expressions.py +150 -0
  8. raise_cli/adapters/declarative/reference/__init__.py +1 -0
  9. raise_cli/adapters/declarative/reference/github.yaml +143 -0
  10. raise_cli/adapters/declarative/schema.py +98 -0
  11. raise_cli/adapters/filesystem.py +299 -0
  12. raise_cli/adapters/mcp_bridge.py +10 -0
  13. raise_cli/adapters/mcp_confluence.py +246 -0
  14. raise_cli/adapters/mcp_jira.py +405 -0
  15. raise_cli/adapters/models.py +205 -0
  16. raise_cli/adapters/protocols.py +180 -0
  17. raise_cli/adapters/registry.py +90 -0
  18. raise_cli/adapters/sync.py +149 -0
  19. raise_cli/agents/__init__.py +14 -0
  20. raise_cli/agents/antigravity.yaml +8 -0
  21. raise_cli/agents/claude.yaml +8 -0
  22. raise_cli/agents/copilot.yaml +8 -0
  23. raise_cli/agents/copilot_plugin.py +124 -0
  24. raise_cli/agents/cursor.yaml +7 -0
  25. raise_cli/agents/roo.yaml +8 -0
  26. raise_cli/agents/windsurf.yaml +8 -0
  27. raise_cli/artifacts/__init__.py +30 -0
  28. raise_cli/artifacts/models.py +43 -0
  29. raise_cli/artifacts/reader.py +55 -0
  30. raise_cli/artifacts/renderer.py +104 -0
  31. raise_cli/artifacts/story_design.py +69 -0
  32. raise_cli/artifacts/writer.py +45 -0
  33. raise_cli/backlog/__init__.py +1 -0
  34. raise_cli/backlog/sync.py +115 -0
  35. raise_cli/cli/__init__.py +3 -0
  36. raise_cli/cli/commands/__init__.py +3 -0
  37. raise_cli/cli/commands/_resolve.py +153 -0
  38. raise_cli/cli/commands/adapters.py +362 -0
  39. raise_cli/cli/commands/artifact.py +137 -0
  40. raise_cli/cli/commands/backlog.py +333 -0
  41. raise_cli/cli/commands/base.py +31 -0
  42. raise_cli/cli/commands/discover.py +551 -0
  43. raise_cli/cli/commands/docs.py +130 -0
  44. raise_cli/cli/commands/doctor.py +177 -0
  45. raise_cli/cli/commands/gate.py +223 -0
  46. raise_cli/cli/commands/graph.py +1086 -0
  47. raise_cli/cli/commands/info.py +81 -0
  48. raise_cli/cli/commands/init.py +746 -0
  49. raise_cli/cli/commands/journal.py +167 -0
  50. raise_cli/cli/commands/mcp.py +524 -0
  51. raise_cli/cli/commands/memory.py +467 -0
  52. raise_cli/cli/commands/pattern.py +348 -0
  53. raise_cli/cli/commands/profile.py +59 -0
  54. raise_cli/cli/commands/publish.py +80 -0
  55. raise_cli/cli/commands/release.py +338 -0
  56. raise_cli/cli/commands/session.py +528 -0
  57. raise_cli/cli/commands/signal.py +410 -0
  58. raise_cli/cli/commands/skill.py +350 -0
  59. raise_cli/cli/commands/skill_set.py +145 -0
  60. raise_cli/cli/error_handler.py +158 -0
  61. raise_cli/cli/main.py +163 -0
  62. raise_cli/compat.py +66 -0
  63. raise_cli/config/__init__.py +41 -0
  64. raise_cli/config/agent_plugin.py +105 -0
  65. raise_cli/config/agent_registry.py +233 -0
  66. raise_cli/config/agents.py +120 -0
  67. raise_cli/config/ide.py +32 -0
  68. raise_cli/config/paths.py +379 -0
  69. raise_cli/config/settings.py +180 -0
  70. raise_cli/context/__init__.py +42 -0
  71. raise_cli/context/analyzers/__init__.py +16 -0
  72. raise_cli/context/analyzers/models.py +36 -0
  73. raise_cli/context/analyzers/protocol.py +43 -0
  74. raise_cli/context/analyzers/python.py +292 -0
  75. raise_cli/context/builder.py +1569 -0
  76. raise_cli/context/diff.py +213 -0
  77. raise_cli/context/extractors/__init__.py +13 -0
  78. raise_cli/context/extractors/skills.py +121 -0
  79. raise_cli/core/__init__.py +37 -0
  80. raise_cli/core/files.py +66 -0
  81. raise_cli/core/text.py +174 -0
  82. raise_cli/core/tools.py +441 -0
  83. raise_cli/discovery/__init__.py +50 -0
  84. raise_cli/discovery/analyzer.py +691 -0
  85. raise_cli/discovery/drift.py +355 -0
  86. raise_cli/discovery/scanner.py +1687 -0
  87. raise_cli/doctor/__init__.py +4 -0
  88. raise_cli/doctor/checks/__init__.py +1 -0
  89. raise_cli/doctor/checks/environment.py +110 -0
  90. raise_cli/doctor/checks/project.py +238 -0
  91. raise_cli/doctor/fix.py +80 -0
  92. raise_cli/doctor/models.py +56 -0
  93. raise_cli/doctor/protocol.py +43 -0
  94. raise_cli/doctor/registry.py +100 -0
  95. raise_cli/doctor/report.py +141 -0
  96. raise_cli/doctor/runner.py +95 -0
  97. raise_cli/engines/__init__.py +3 -0
  98. raise_cli/exceptions.py +215 -0
  99. raise_cli/gates/__init__.py +19 -0
  100. raise_cli/gates/builtin/__init__.py +1 -0
  101. raise_cli/gates/builtin/coverage.py +52 -0
  102. raise_cli/gates/builtin/lint.py +48 -0
  103. raise_cli/gates/builtin/tests.py +48 -0
  104. raise_cli/gates/builtin/types.py +48 -0
  105. raise_cli/gates/models.py +40 -0
  106. raise_cli/gates/protocol.py +41 -0
  107. raise_cli/gates/registry.py +141 -0
  108. raise_cli/governance/__init__.py +11 -0
  109. raise_cli/governance/extractor.py +412 -0
  110. raise_cli/governance/models.py +134 -0
  111. raise_cli/governance/parsers/__init__.py +35 -0
  112. raise_cli/governance/parsers/_convert.py +38 -0
  113. raise_cli/governance/parsers/adr.py +274 -0
  114. raise_cli/governance/parsers/backlog.py +356 -0
  115. raise_cli/governance/parsers/constitution.py +119 -0
  116. raise_cli/governance/parsers/epic.py +323 -0
  117. raise_cli/governance/parsers/glossary.py +316 -0
  118. raise_cli/governance/parsers/guardrails.py +345 -0
  119. raise_cli/governance/parsers/prd.py +112 -0
  120. raise_cli/governance/parsers/roadmap.py +118 -0
  121. raise_cli/governance/parsers/vision.py +116 -0
  122. raise_cli/graph/__init__.py +1 -0
  123. raise_cli/graph/backends/__init__.py +57 -0
  124. raise_cli/graph/backends/api.py +137 -0
  125. raise_cli/graph/backends/dual.py +139 -0
  126. raise_cli/graph/backends/pending.py +84 -0
  127. raise_cli/handlers/__init__.py +3 -0
  128. raise_cli/hooks/__init__.py +54 -0
  129. raise_cli/hooks/builtin/__init__.py +1 -0
  130. raise_cli/hooks/builtin/backlog.py +216 -0
  131. raise_cli/hooks/builtin/gate_bridge.py +83 -0
  132. raise_cli/hooks/builtin/jira_sync.py +127 -0
  133. raise_cli/hooks/builtin/memory.py +117 -0
  134. raise_cli/hooks/builtin/telemetry.py +72 -0
  135. raise_cli/hooks/emitter.py +184 -0
  136. raise_cli/hooks/events.py +262 -0
  137. raise_cli/hooks/protocol.py +38 -0
  138. raise_cli/hooks/registry.py +117 -0
  139. raise_cli/mcp/__init__.py +33 -0
  140. raise_cli/mcp/bridge.py +218 -0
  141. raise_cli/mcp/models.py +43 -0
  142. raise_cli/mcp/registry.py +77 -0
  143. raise_cli/mcp/schema.py +41 -0
  144. raise_cli/memory/__init__.py +58 -0
  145. raise_cli/memory/loader.py +247 -0
  146. raise_cli/memory/migration.py +241 -0
  147. raise_cli/memory/models.py +169 -0
  148. raise_cli/memory/writer.py +598 -0
  149. raise_cli/onboarding/__init__.py +103 -0
  150. raise_cli/onboarding/bootstrap.py +324 -0
  151. raise_cli/onboarding/claudemd.py +17 -0
  152. raise_cli/onboarding/conventions.py +742 -0
  153. raise_cli/onboarding/detection.py +374 -0
  154. raise_cli/onboarding/governance.py +443 -0
  155. raise_cli/onboarding/instructions.py +672 -0
  156. raise_cli/onboarding/manifest.py +201 -0
  157. raise_cli/onboarding/memory_md.py +399 -0
  158. raise_cli/onboarding/migration.py +207 -0
  159. raise_cli/onboarding/profile.py +624 -0
  160. raise_cli/onboarding/skill_conflict.py +100 -0
  161. raise_cli/onboarding/skill_manifest.py +176 -0
  162. raise_cli/onboarding/skills.py +437 -0
  163. raise_cli/onboarding/workflows.py +101 -0
  164. raise_cli/output/__init__.py +28 -0
  165. raise_cli/output/console.py +394 -0
  166. raise_cli/output/formatters/__init__.py +9 -0
  167. raise_cli/output/formatters/adapters.py +135 -0
  168. raise_cli/output/formatters/discover.py +439 -0
  169. raise_cli/output/formatters/skill.py +298 -0
  170. raise_cli/publish/__init__.py +3 -0
  171. raise_cli/publish/changelog.py +80 -0
  172. raise_cli/publish/check.py +179 -0
  173. raise_cli/publish/version.py +172 -0
  174. raise_cli/rai_base/__init__.py +22 -0
  175. raise_cli/rai_base/framework/__init__.py +7 -0
  176. raise_cli/rai_base/framework/methodology.yaml +233 -0
  177. raise_cli/rai_base/governance/__init__.py +1 -0
  178. raise_cli/rai_base/governance/architecture/__init__.py +1 -0
  179. raise_cli/rai_base/governance/architecture/domain-model.md +20 -0
  180. raise_cli/rai_base/governance/architecture/system-context.md +34 -0
  181. raise_cli/rai_base/governance/architecture/system-design.md +24 -0
  182. raise_cli/rai_base/governance/backlog.md +8 -0
  183. raise_cli/rai_base/governance/guardrails.md +17 -0
  184. raise_cli/rai_base/governance/prd.md +25 -0
  185. raise_cli/rai_base/governance/vision.md +16 -0
  186. raise_cli/rai_base/identity/__init__.py +8 -0
  187. raise_cli/rai_base/identity/core.md +119 -0
  188. raise_cli/rai_base/identity/perspective.md +119 -0
  189. raise_cli/rai_base/memory/__init__.py +7 -0
  190. raise_cli/rai_base/memory/patterns-base.jsonl +55 -0
  191. raise_cli/schemas/__init__.py +3 -0
  192. raise_cli/schemas/journal.py +49 -0
  193. raise_cli/schemas/session_state.py +117 -0
  194. raise_cli/session/__init__.py +5 -0
  195. raise_cli/session/bundle.py +820 -0
  196. raise_cli/session/close.py +268 -0
  197. raise_cli/session/journal.py +119 -0
  198. raise_cli/session/resolver.py +126 -0
  199. raise_cli/session/state.py +187 -0
  200. raise_cli/skills/__init__.py +44 -0
  201. raise_cli/skills/locator.py +141 -0
  202. raise_cli/skills/name_checker.py +199 -0
  203. raise_cli/skills/parser.py +145 -0
  204. raise_cli/skills/scaffold.py +212 -0
  205. raise_cli/skills/schema.py +132 -0
  206. raise_cli/skills/skillsets.py +195 -0
  207. raise_cli/skills/validator.py +197 -0
  208. raise_cli/skills_base/__init__.py +80 -0
  209. raise_cli/skills_base/contract-template.md +60 -0
  210. raise_cli/skills_base/preamble.md +37 -0
  211. raise_cli/skills_base/rai-architecture-review/SKILL.md +137 -0
  212. raise_cli/skills_base/rai-debug/SKILL.md +171 -0
  213. raise_cli/skills_base/rai-discover/SKILL.md +167 -0
  214. raise_cli/skills_base/rai-discover-document/SKILL.md +128 -0
  215. raise_cli/skills_base/rai-discover-scan/SKILL.md +147 -0
  216. raise_cli/skills_base/rai-discover-start/SKILL.md +145 -0
  217. raise_cli/skills_base/rai-discover-validate/SKILL.md +142 -0
  218. raise_cli/skills_base/rai-docs-update/SKILL.md +142 -0
  219. raise_cli/skills_base/rai-doctor/SKILL.md +120 -0
  220. raise_cli/skills_base/rai-epic-close/SKILL.md +165 -0
  221. raise_cli/skills_base/rai-epic-close/templates/retrospective.md +68 -0
  222. raise_cli/skills_base/rai-epic-design/SKILL.md +146 -0
  223. raise_cli/skills_base/rai-epic-design/templates/design.md +24 -0
  224. raise_cli/skills_base/rai-epic-design/templates/scope.md +76 -0
  225. raise_cli/skills_base/rai-epic-plan/SKILL.md +153 -0
  226. raise_cli/skills_base/rai-epic-plan/_references/sequencing-strategies.md +67 -0
  227. raise_cli/skills_base/rai-epic-plan/templates/plan-section.md +49 -0
  228. raise_cli/skills_base/rai-epic-run/SKILL.md +208 -0
  229. raise_cli/skills_base/rai-epic-start/SKILL.md +136 -0
  230. raise_cli/skills_base/rai-epic-start/templates/brief.md +34 -0
  231. raise_cli/skills_base/rai-mcp-add/SKILL.md +176 -0
  232. raise_cli/skills_base/rai-mcp-remove/SKILL.md +120 -0
  233. raise_cli/skills_base/rai-mcp-status/SKILL.md +147 -0
  234. raise_cli/skills_base/rai-problem-shape/SKILL.md +138 -0
  235. raise_cli/skills_base/rai-project-create/SKILL.md +144 -0
  236. raise_cli/skills_base/rai-project-onboard/SKILL.md +162 -0
  237. raise_cli/skills_base/rai-quality-review/SKILL.md +189 -0
  238. raise_cli/skills_base/rai-research/SKILL.md +143 -0
  239. raise_cli/skills_base/rai-research/references/research-prompt-template.md +317 -0
  240. raise_cli/skills_base/rai-session-close/SKILL.md +176 -0
  241. raise_cli/skills_base/rai-session-start/SKILL.md +110 -0
  242. raise_cli/skills_base/rai-story-close/SKILL.md +198 -0
  243. raise_cli/skills_base/rai-story-design/SKILL.md +203 -0
  244. raise_cli/skills_base/rai-story-design/references/tech-design-story-v2.md +293 -0
  245. raise_cli/skills_base/rai-story-implement/SKILL.md +115 -0
  246. raise_cli/skills_base/rai-story-plan/SKILL.md +135 -0
  247. raise_cli/skills_base/rai-story-review/SKILL.md +178 -0
  248. raise_cli/skills_base/rai-story-run/SKILL.md +282 -0
  249. raise_cli/skills_base/rai-story-start/SKILL.md +166 -0
  250. raise_cli/skills_base/rai-story-start/templates/story.md +38 -0
  251. raise_cli/skills_base/rai-welcome/SKILL.md +134 -0
  252. raise_cli/telemetry/__init__.py +42 -0
  253. raise_cli/telemetry/schemas.py +285 -0
  254. raise_cli/telemetry/writer.py +217 -0
  255. raise_cli/tier/__init__.py +0 -0
  256. raise_cli/tier/context.py +134 -0
  257. raise_cli/viz/__init__.py +7 -0
  258. raise_cli/viz/generator.py +406 -0
  259. raise_cli-2.2.1.dist-info/METADATA +433 -0
  260. raise_cli-2.2.1.dist-info/RECORD +264 -0
  261. raise_cli-2.2.1.dist-info/WHEEL +4 -0
  262. raise_cli-2.2.1.dist-info/entry_points.txt +40 -0
  263. raise_cli-2.2.1.dist-info/licenses/LICENSE +190 -0
  264. raise_cli-2.2.1.dist-info/licenses/NOTICE +4 -0
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: rai-mcp-status
3
+ description: >
4
+ Health overview of all registered MCP servers plus stack-aware
5
+ recommendations for missing capabilities. Lists servers, runs
6
+ health checks, detects project stack, and suggests relevant
7
+ servers from the governance catalog.
8
+
9
+ license: MIT
10
+
11
+ metadata:
12
+ raise.work_cycle: utility
13
+ raise.frequency: on-demand
14
+ raise.fase: ""
15
+ raise.prerequisites: ""
16
+ raise.next: ""
17
+ raise.gate: ""
18
+ raise.adaptable: "true"
19
+ raise.version: "1.0.0"
20
+ raise.visibility: public
21
+ raise.inputs: |
22
+ - server_name: string, optional, argument (check single server)
23
+ raise.outputs: |
24
+ - status_report: text (markdown table)
25
+ ---
26
+
27
+ # MCP Status
28
+
29
+ ## Purpose
30
+
31
+ Show the health and availability of all registered MCP servers in one view.
32
+
33
+ ## Mastery Levels (ShuHaRi)
34
+
35
+ - **Shu**: Explain each server's status and what it means
36
+ - **Ha**: Show summary table, explain only issues
37
+ - **Ri**: Table only, no explanation unless problems found
38
+
39
+ ## Context
40
+
41
+ **When to use:** Developer wants to check if their MCP servers are working.
42
+
43
+ **When to skip:** Checking a single server — use `rai mcp health <name>` directly.
44
+
45
+ ## Steps
46
+
47
+ ### Step 1: Discover Servers
48
+
49
+ Run `rai mcp list` to get all registered servers.
50
+
51
+ If no servers registered: "No MCP servers registered. Use `/rai-mcp-add` to add one."
52
+
53
+ <verification>
54
+ Server list retrieved (or empty state handled).
55
+ </verification>
56
+
57
+ ### Step 2: Health Check Each Server
58
+
59
+ For each registered server, run `rai mcp health <name>`.
60
+
61
+ Collect: status (healthy/unhealthy), tool count, latency, error message (if any).
62
+
63
+ <verification>
64
+ All servers checked.
65
+ </verification>
66
+
67
+ ### Step 3: Present Summary
68
+
69
+ Present a markdown table:
70
+
71
+ ```
72
+ MCP Server Status:
73
+
74
+ | Server | Status | Tools | Latency | Notes |
75
+ |----------|-----------|-------|---------|--------------|
76
+ | context7 | ✓ healthy | 2 | 1.2s | |
77
+ | github | ✗ error | — | — | timeout |
78
+
79
+ {healthy_count}/{total_count} servers healthy.
80
+ ```
81
+
82
+ If all healthy: "{count} servers, all healthy."
83
+
84
+ If any unhealthy, suggest: "Run `/rai-mcp-add` to reinstall problematic servers, or check environment variables."
85
+
86
+ <verification>
87
+ Summary presented with actionable guidance for issues.
88
+ </verification>
89
+
90
+ ### Step 4: Recommend Missing Capabilities
91
+
92
+ Read the governance catalog at `.raise/mcp/catalog.yaml`. If catalog is missing, skip this step gracefully.
93
+
94
+ **Detect project languages:**
95
+ 1. Read `work/discovery/analysis.json` if it exists — derive languages from file extensions in `components[].file`
96
+ 2. If no analysis artifact, glob for source files: `**/*.py`, `**/*.ts`, `**/*.js`, `**/*.php`, `**/*.cs`, `**/*.dart`
97
+ 3. Map extensions to languages using scanner's `EXTENSION_TO_LANGUAGE`
98
+
99
+ **Filter recommendations:**
100
+ 1. For each catalog server, check `recommended_for` (note: value is either the string `all` or a list):
101
+ - String `all` → always recommend regardless of detected languages
102
+ - List of languages (e.g. `[python, typescript]`) → recommend if any detected language matches
103
+ - Empty list `[]` → never recommend (opt-in only, must use `/rai-mcp-add` explicitly)
104
+ 2. Exclude servers already registered in `.raise/mcp/`
105
+ 3. If no recommendations remain: skip section silently
106
+
107
+ **Present recommendations:**
108
+
109
+ ```
110
+ Recommended for your stack ({detected_languages}):
111
+
112
+ | Server | Description | Add with |
113
+ |--------|------------------------------|-----------------------|
114
+ | github | GitHub repository operations | /rai-mcp-add github |
115
+ | fetch | HTTP fetch for web content | /rai-mcp-add fetch |
116
+
117
+ Use /rai-mcp-add <name> to install.
118
+ ```
119
+
120
+ <verification>
121
+ Recommendations shown (or skipped if none). Already-registered servers excluded.
122
+ </verification>
123
+
124
+ ## Output
125
+
126
+ | Item | Destination |
127
+ |------|-------------|
128
+ | Status report | Displayed inline |
129
+ | Next | Fix unhealthy servers via `/rai-mcp-add` or manual troubleshooting |
130
+
131
+ ## Quality Checklist
132
+
133
+ - [ ] All registered servers checked (not just a subset)
134
+ - [ ] Unhealthy servers show error details
135
+ - [ ] Actionable guidance provided for issues
136
+ - [ ] Empty state handled gracefully
137
+ - [ ] Catalog read from `.raise/mcp/catalog.yaml` (graceful if missing)
138
+ - [ ] Already-registered servers excluded from recommendations
139
+ - [ ] Languages detected from discovery artifact or file glob fallback
140
+
141
+ ## References
142
+
143
+ - CLI: `rai mcp list`, `rai mcp health`
144
+ - Catalog: `.raise/mcp/catalog.yaml` (governance — known servers + stack mapping)
145
+ - Discovery: `work/discovery/analysis.json` (stack detection source)
146
+ - Complement: `/rai-mcp-add`, `/rai-mcp-remove`
147
+ - Epic: E338 MCP Platform
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: rai-problem-shape
3
+ description: >
4
+ Guided problem definition at portfolio level. Takes a vague business idea
5
+ and shapes it into a well-formed problem statement before it enters the
6
+ epic pipeline. Produces a Problem Brief that feeds /rai-epic-design.
7
+
8
+ license: MIT
9
+
10
+ metadata:
11
+ raise.work_cycle: utility
12
+ raise.frequency: per-initiative
13
+ raise.fase: "0"
14
+ raise.prerequisites: ""
15
+ raise.next: "rai-epic-design"
16
+ raise.gate: ""
17
+ raise.adaptable: "true"
18
+ raise.version: "2.0.0"
19
+ raise.visibility: public
20
+ ---
21
+
22
+ # Problem Shape
23
+
24
+ ## Purpose
25
+
26
+ Guide a stakeholder from a vague initiative to a well-formed problem statement in ≤10 minutes. Produces a Problem Brief that feeds `/rai-epic-design`.
27
+
28
+ ## Mastery Levels (ShuHaRi)
29
+
30
+ - **Shu**: Follow all 6 steps in sequence with multiple-choice options
31
+ - **Ha**: Adapt option labels to project domain from memory context
32
+ - **Ri**: Facilitate multi-stakeholder problem-shaping workshops
33
+
34
+ ## Context
35
+
36
+ **When to use:** A stakeholder has a vague initiative or idea that hasn't entered `/rai-epic-design` yet.
37
+
38
+ **When to skip:** Problem is already well-defined (go to `/rai-epic-design`), or this is story-level (use `/rai-story-design`).
39
+
40
+ **Inputs:** Project name (required), rough business idea.
41
+
42
+ **Pipeline:** `[vague idea]` → `/rai-problem-shape` → `/rai-epic-design` → `/rai-epic-plan` → `[stories]`
43
+
44
+ **Frameworks:** Impact Mapping (Adzic), Lean UX Canvas (Gothelf), SAFe Epic Hypothesis, Toyota 5 Whys.
45
+
46
+ ## Steps
47
+
48
+ ### Step 1: APUESTA — Anchor the Domain (~30s)
49
+
50
+ Present multiple choice (Spanish-first):
51
+ > "¿Qué tipo de problema crees que estás resolviendo?"
52
+ > A) Velocidad de entrega B) Calidad / retrabajo C) Visibilidad / control D) Otro
53
+
54
+ If "Otro": accept free text, summarize back in one sentence, confirm.
55
+
56
+ <verification>
57
+ Domain anchored.
58
+ </verification>
59
+
60
+ ### Step 2: PARA QUIÉN — Identify Stakeholder (~60s)
61
+
62
+ > "¿Quién experimenta este problema directamente?"
63
+ > A) Equipo de desarrollo B) Área de negocio C) Portafolio / liderazgo D) Cliente final
64
+
65
+ If multiple apply: ask which suffers most, pick one.
66
+
67
+ <verification>
68
+ Primary stakeholder identified.
69
+ </verification>
70
+
71
+ ### Step 3: ESTADO ACTUAL — Describe the Gap
72
+
73
+ > "Completa: **[quién] no puede [hacer qué] porque [razón]**"
74
+
75
+ **Anti-solution gate:** Scan for solution-shaped language ("queremos construir", "necesitamos implementar", "la solución es", etc.). If triggered, challenge **once**:
76
+ > "Eso suena a una solución. ¿Qué está pasando hoy sin eso?"
77
+
78
+ If second response also solution-shaped: accept it, add warning flag to Brief. Do not challenge twice.
79
+
80
+ <verification>
81
+ Gap described (observable, not solution-shaped).
82
+ </verification>
83
+
84
+ ### Step 4: 3 WHYS — Find Root Cause
85
+
86
+ Ask exactly 3 sequential "why" questions, then name the root cause:
87
+ > "La raíz que identificamos es: **[síntesis]**. ¿Correcto?"
88
+
89
+ Confirm with stakeholder before continuing.
90
+
91
+ <verification>
92
+ Root cause named and confirmed.
93
+ </verification>
94
+
95
+ ### Step 5: EARLY SIGNAL — Leading Indicator (~30s)
96
+
97
+ > "¿Qué cambiaría primero en **4 semanas**?"
98
+ > A) Métrica que mejora B) Comportamiento que cambia C) Proceso que desaparece D) Queja que deja de escucharse
99
+
100
+ 4-week horizon forces leading indicators, not lagging KPIs.
101
+
102
+ <verification>
103
+ Concrete early signal identified.
104
+ </verification>
105
+
106
+ ### Step 6: HIPÓTESIS & Save Brief
107
+
108
+ Draft SAFe hypothesis: `Si [estado actual], entonces [early signal] para [stakeholder], medido por [métrica].`
109
+
110
+ Present to stakeholder for corrections. Save to `work/problem-briefs/{slug}-{YYYY-MM-DD}.md` with all 6 sections.
111
+
112
+ <verification>
113
+ Brief saved. Stakeholder confirmed hypothesis.
114
+ </verification>
115
+
116
+ ## Output
117
+
118
+ | Item | Destination |
119
+ |------|-------------|
120
+ | Problem Brief | `work/problem-briefs/{slug}-{YYYY-MM-DD}.md` |
121
+ | Next | `/rai-epic-design` (loads Brief at Step 0.7) |
122
+
123
+ ## Quality Checklist
124
+
125
+ - [ ] Project name confirmed before starting (gate)
126
+ - [ ] Anti-solution gate applied in Step 3 (challenge once, max)
127
+ - [ ] Exactly 3 Whys executed (not 2, not 5)
128
+ - [ ] Root cause confirmed by stakeholder before continuing
129
+ - [ ] Early signal is 4-week horizon (leading, not lagging)
130
+ - [ ] Hypothesis uses SAFe format (Si/entonces/para/medido por)
131
+ - [ ] NEVER challenge solution language more than once — trust damages outweigh precision
132
+
133
+ ## References
134
+
135
+ - Pipeline next: `/rai-epic-design` (Step 0.7 loads Brief)
136
+ - Output directory: `work/problem-briefs/`
137
+ - Frameworks: Impact Mapping, Lean UX, SAFe Hypothesis, Toyota 5 Whys
138
+ - Research: `work/research/RES-problem-definition-frameworks/`
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: rai-project-create
3
+ description: >
4
+ Guide greenfield project setup through conversation. Fills governance templates
5
+ with project-specific content and builds the knowledge graph. Use after rai init
6
+ on a new project.
7
+
8
+ license: MIT
9
+
10
+ metadata:
11
+ raise.work_cycle: utility
12
+ raise.frequency: on-demand
13
+ raise.fase: ""
14
+ raise.prerequisites: ""
15
+ raise.next: "session-start"
16
+ raise.gate: "rai graph build produces 30+ governance nodes"
17
+ raise.adaptable: "true"
18
+ raise.version: "2.0.0"
19
+ raise.visibility: public
20
+ ---
21
+
22
+ # Project Create
23
+
24
+ ## Purpose
25
+
26
+ Guide a developer through greenfield project setup via conversation. Collect project identity, requirements, constraints, and architecture, then fill 6 governance templates. Gate: `rai graph build` produces 30+ governance nodes.
27
+
28
+ ## Mastery Levels (ShuHaRi)
29
+
30
+ - **Shu**: Walk through every step with explanations, confirm each doc before writing
31
+ - **Ha**: Collect info conversationally, confirm full set before writing
32
+ - **Ri**: Collect all info in 1-2 exchanges, write all docs, build graph
33
+
34
+ ## Context
35
+
36
+ **When to use:** After `rai init` on a new (greenfield) project with placeholder governance templates.
37
+
38
+ **When to skip:** Brownfield project with existing code → use `/rai-project-onboard`. Project not initialized → run `rai init` first.
39
+
40
+ **Inputs:** Project with `rai init` completed (`governance/` exists). Developer's knowledge of what they're building.
41
+
42
+ ## Steps
43
+
44
+ ### Step 1: Verify Prerequisites
45
+
46
+ ```bash
47
+ ls governance/prd.md governance/vision.md governance/guardrails.md governance/backlog.md governance/architecture/system-context.md governance/architecture/system-design.md 2>/dev/null | wc -l
48
+ ```
49
+
50
+ | Result | Action |
51
+ |--------|--------|
52
+ | 6 files | Continue |
53
+ | 0 files | Stop: "Run `rai init` first." |
54
+ | Source code exists | Suggest `/rai-project-onboard` instead |
55
+
56
+ Check for existing non-placeholder content — ask before overwriting.
57
+
58
+ <verification>
59
+ Governance templates exist and ready to fill.
60
+ </verification>
61
+
62
+ ### Step 2: Collect Project Info (Conversational)
63
+
64
+ Ask in sequence, adapting to ShuHaRi level:
65
+
66
+ 1. **Identity:** Project name + one-paragraph description (who, what, why)
67
+ 2. **Capabilities:** 3-5 core things it must do → decompose into 5-8 RF-XX requirements
68
+ 3. **Quality:** Testing, code quality, security, performance constraints → 5+ guardrails
69
+ 4. **Architecture:** External actors/systems, internal components, protocols
70
+ 5. **Branches:** Main branch name, development branch name (default both to `main`)
71
+
72
+ <verification>
73
+ All governance fields covered from conversation.
74
+ </verification>
75
+
76
+ ### Step 3: Write 6 Governance Docs
77
+
78
+ Write all docs following parser contracts exactly. Graph parsers use regex — format must match.
79
+
80
+ **Parser contracts (critical):**
81
+ - `vision.md`: Outcomes table with `| **{Bold Name}** | {description} |`. Regex: `\|\s*\*\*([^*]+)\*\*\s*\|\s*(.+?)\s*\|`
82
+ - `prd.md`: Requirements as `### RF-XX: Title`. Regex: `^### (RF-\d+):\s*(.+)$`
83
+ - `guardrails.md`: YAML frontmatter `type: guardrails`. Table with `| ID | Level | Guardrail | Verification | Derived from |`. ID format: `{level}-{category}-{NNN}`
84
+ - `backlog.md`: Header `# Backlog: {name}`. Epic rows `| E{N} | ... |`
85
+ - `system-context.md`: External interfaces table
86
+ - `system-design.md`: Components table with responsibility and technology
87
+
88
+ Update `.raise/manifest.yaml` with branch configuration.
89
+
90
+ <verification>
91
+ All 6 docs written. No placeholder content remains.
92
+ </verification>
93
+
94
+ ### Step 4: Build Graph & Verify Gate
95
+
96
+ ```bash
97
+ rai graph build
98
+ rai graph query "requirement outcome guardrail" --types requirement,outcome,guardrail --limit 50
99
+ ```
100
+
101
+ Need 30+ governance nodes total: requirements (~5-8), outcomes (~5-7), guardrails (~10-13), project (1), epics (~3-5).
102
+
103
+ | Result | Action |
104
+ |--------|--------|
105
+ | 30+ nodes | Gate passed → Step 5 |
106
+ | <30 nodes | Check format against parser contracts, fix specific doc, rebuild |
107
+
108
+ <verification>
109
+ Graph build succeeds. 30+ governance nodes extracted.
110
+ </verification>
111
+
112
+ ### Step 5: Summary
113
+
114
+ ```
115
+ ## Project Created: {project_name}
116
+ Governance: {N} outcomes, {N} requirements, {N} guardrails, {N} epics
117
+ Graph: {total} governance nodes
118
+ Next: /rai-session-start
119
+ ```
120
+
121
+ ## Output
122
+
123
+ | Item | Destination |
124
+ |------|-------------|
125
+ | Governance docs | `governance/` (6 files) |
126
+ | Knowledge graph | `.raise/rai/memory/index.json` |
127
+ | Next | `/rai-session-start` |
128
+
129
+ ## Quality Checklist
130
+
131
+ - [ ] Prerequisites verified before collecting info (poka-yoke)
132
+ - [ ] Parser contracts followed exactly (regex-compatible format)
133
+ - [ ] 30+ governance nodes gate passed
134
+ - [ ] Branch configuration saved to manifest
135
+ - [ ] Brownfield signals detected → suggest `/rai-project-onboard`
136
+ - [ ] NEVER overwrite existing non-placeholder governance content without asking
137
+
138
+ ## References
139
+
140
+ - Prerequisite: `rai init`
141
+ - Sibling: `/rai-project-onboard` (brownfield)
142
+ - Parser sources: `src/raise_cli/governance/parsers/*.py`
143
+ - Template sources: `src/raise_cli/rai_base/governance/*.md`
144
+ - Next: `/rai-session-start`
@@ -0,0 +1,162 @@
1
+ ---
2
+ name: rai-project-onboard
3
+ description: >
4
+ Guide brownfield project onboarding through discovery and conversation. Analyzes
5
+ existing codebase, detects conventions, fills governance templates with discovered
6
+ and conversational content, and builds the knowledge graph. Use after rai init --detect
7
+ on an existing project.
8
+
9
+ license: MIT
10
+
11
+ metadata:
12
+ raise.work_cycle: utility
13
+ raise.frequency: on-demand
14
+ raise.fase: ""
15
+ raise.prerequisites: "rai init --detect"
16
+ raise.next: "session-start"
17
+ raise.gate: "4-dimensional coverage gate"
18
+ raise.adaptable: "true"
19
+ raise.version: "3.0.0"
20
+ raise.inputs: |
21
+ - project_root: path, required, argument
22
+ raise.outputs: |
23
+ - governance_docs: file_path[] (governance/*.md)
24
+ - knowledge_graph: file_path (.raise/rai/memory/index.json)
25
+ raise.visibility: public
26
+ ---
27
+
28
+ # Project Onboard
29
+
30
+ ## Purpose
31
+
32
+ Guide brownfield project onboarding by combining codebase discovery with conversation. Analyze what exists, ask what code can't tell us, fill 6 governance templates. Gate: 4-dimensional coverage check.
33
+
34
+ ## Mastery Levels (ShuHaRi)
35
+
36
+ - **Shu**: Walk through every step, show discovery results, confirm each doc
37
+ - **Ha**: Run discovery, present summary, collect gaps in one exchange
38
+ - **Ri**: Discovery + 1 exchange + write all docs + build graph
39
+
40
+ ## Context
41
+
42
+ **When to use:** After `rai init --detect` on an existing project with source code.
43
+
44
+ **When to skip:** Greenfield project → `/rai-project-create`. Not initialized → `rai init --detect` first. Governance already filled.
45
+
46
+ **Key difference from `/rai-project-create`:** Starts from WHAT EXISTS (discovery), then asks WHY. Create starts from WHAT YOU WANT.
47
+
48
+ **Inputs:** Project with `rai init --detect` completed, existing codebase.
49
+
50
+ ## Steps
51
+
52
+ ### Step 1: Verify Prerequisites
53
+
54
+ ```bash
55
+ ls .raise/manifest.yaml 2>/dev/null || echo "MISSING"
56
+ ls governance/prd.md governance/vision.md governance/guardrails.md 2>/dev/null | wc -l
57
+ grep -ciE "must-|should-" governance/guardrails.md 2>/dev/null || echo "0"
58
+ ```
59
+
60
+ | Result | Action |
61
+ |--------|--------|
62
+ | Manifest + 6 files + conventions detected | Continue |
63
+ | No manifest | Stop: "Run `rai init --detect` first." |
64
+ | No conventions in guardrails | Suggest re-running with `--detect` flag |
65
+ | No source code | Suggest `/rai-project-create` instead |
66
+
67
+ <verification>
68
+ Manifest exists, governance templates exist, conventions detected.
69
+ </verification>
70
+
71
+ ### Step 2: Run Discovery
72
+
73
+ If `/rai-discover` has not been run yet (no `work/discovery/components-validated.json`), run it now. It handles the full pipeline: detect → extract → describe → document → build graph.
74
+
75
+ If already run, skip to Step 3 — discovery data is available.
76
+
77
+ Also auto-read existing project documentation (README, ARCHITECTURE, CONTRIBUTING, etc.) to pre-populate governance fields. No need to ask — always read what's available.
78
+
79
+ <verification>
80
+ Discovery complete. Existing docs read.
81
+ </verification>
82
+
83
+ ### Step 3: Fill Governance Gaps
84
+
85
+ Present what discovery + docs already covered. Ask ONLY for unfilled fields:
86
+ - **Vision:** description, who uses it, why it exists
87
+ - **Capabilities:** 3-5 core things it does → 5-8 RF-XX requirements
88
+ - **Architecture gaps:** external actors/systems, interfaces, branch model
89
+
90
+ <verification>
91
+ All governance fields covered (from discovery + docs + conversation).
92
+ </verification>
93
+
94
+ ### Step 4: Write 6 Governance Docs
95
+
96
+ Same parser contracts as `/rai-project-create`:
97
+ - `vision.md`: `| **{Bold Name}** | {description} |`
98
+ - `prd.md`: `### RF-XX: Title`
99
+ - `guardrails.md`: MERGE detected conventions (don't overwrite), YAML frontmatter `type: guardrails`
100
+ - `backlog.md`: `# Backlog: {name}`, `| E{N} | ... |`
101
+ - `system-context.md`: external interfaces table
102
+ - `system-design.md`: components from DISCOVERED modules (enriched by discovery)
103
+
104
+ Update `.raise/manifest.yaml` with branch configuration.
105
+
106
+ <verification>
107
+ All 6 docs written. Detected conventions preserved in guardrails.
108
+ </verification>
109
+
110
+ ### Step 5: 4-Dimensional Coverage Gate
111
+
112
+ ```bash
113
+ rai graph build
114
+ ```
115
+
116
+ | Gate | Check | Pass criteria |
117
+ |------|-------|---------------|
118
+ | G1: Governance structure | Parser-extractable content per doc | ≥2 outcomes, ≥3 RF-XX, ≥3 guardrails, ≥1 epic |
119
+ | G2: Module coverage | Discovered modules in governance | ≥80% modules referenced |
120
+ | G3: Doc coverage | Docs read → governance elements | 100% of docs read contributed |
121
+ | G4: Traceability | Guardrails→RF-XX, RF-XX→body text | ≥80% linked |
122
+
123
+ Present gate results. If PARTIAL (1-2 items): fix specific items. If FAIL: fix docs, rebuild.
124
+
125
+ <verification>
126
+ All 4 gate dimensions pass (or user accepts documented exceptions).
127
+ </verification>
128
+
129
+ ### Step 6: Summary
130
+
131
+ ```
132
+ ## Project Onboarded: {project_name}
133
+ Discovery: {N} modules, {N} components, {N} conventions
134
+ Governance: {N} outcomes, {N} requirements, {N} guardrails, {N} epics
135
+ Graph: {total} governance nodes
136
+ Next: /rai-session-start
137
+ ```
138
+
139
+ ## Output
140
+
141
+ | Item | Destination |
142
+ |------|-------------|
143
+ | Governance docs | `governance/` (6 files) |
144
+ | Knowledge graph | `.raise/rai/memory/index.json` |
145
+ | Next | `/rai-session-start` |
146
+
147
+ ## Quality Checklist
148
+
149
+ - [ ] Discovery run before asking questions (code-first, not conversation-first)
150
+ - [ ] Existing docs checked before asking user (minimize redundant questions)
151
+ - [ ] Detected conventions MERGED into guardrails (not overwritten)
152
+ - [ ] Parser contracts followed exactly (same as `/rai-project-create`)
153
+ - [ ] 4-dimensional gate checked (not just node count)
154
+ - [ ] NEVER overwrite `guardrails.md` conventions from `--detect`
155
+
156
+ ## References
157
+
158
+ - Prerequisite: `rai init --detect`
159
+ - Sibling: `/rai-project-create` (greenfield)
160
+ - Discovery: `/rai-discover` (unified pipeline)
161
+ - Parser sources: `src/raise_cli/governance/parsers/*.py`
162
+ - Next: `/rai-session-start`