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,208 @@
1
+ ---
2
+ name: rai-epic-run
3
+ description: >
4
+ Execute epic lifecycle phases (start → design → AR → plan → close),
5
+ pausing at story iteration for human-driven /rai-story-run execution.
6
+ Resumes from last completed phase. Delegation profile controls pause
7
+ behavior at natural gates.
8
+
9
+ license: MIT
10
+
11
+ metadata:
12
+ raise.work_cycle: epic
13
+ raise.frequency: per-epic
14
+ raise.fase: ""
15
+ raise.prerequisites: ""
16
+ raise.next: ""
17
+ raise.gate: ""
18
+ raise.adaptable: "true"
19
+ raise.version: "2.0.0"
20
+ raise.visibility: public
21
+ raise.inputs: |
22
+ - epic_id: string, required, argument (e.g. "E325")
23
+ - epic_slug: string, optional, argument (inferred from scope or prompted)
24
+ raise.outputs: |
25
+ - merge_commit: string, git
26
+ - retrospective: file_path (work/epics/e{N}-{name}/retrospective.md)
27
+ ---
28
+
29
+ # Epic Run
30
+
31
+ ## Purpose
32
+
33
+ Execute the epic lifecycle phases (start → design → AR → plan → close), pausing at delegation gates and at story iteration for human-driven `/rai-story-run` execution. Resumes automatically from the last completed phase.
34
+
35
+ ## Mastery Levels (ShuHaRi)
36
+
37
+ - **Shu**: Show phase progress, explain each skill's output, pause at both gates
38
+ - **Ha**: Brief progress between phases, pause only when delegation says REVIEW
39
+ - **Ri**: Minimal output, AUTO delegation, gates stop only on failure
40
+
41
+ ## Context
42
+
43
+ **When to use:** Starting or resuming any epic. Replaces manual sequential skill and story invocation.
44
+
45
+ **When to skip:** Single-phase work (e.g., only closing an already-completed epic). Individual skills remain independently invocable.
46
+
47
+ ## Steps
48
+
49
+ ### Step 0: Detect Phase
50
+
51
+ Resolve the epic path from `epic_id`. Check artifacts in **reverse order** — take the most advanced phase:
52
+
53
+ | Check | Condition | Resume at |
54
+ |:-----:|-----------|-----------|
55
+ | 4 | `### Progress Tracking` exists AND all rows Status = "Done" | **close** |
56
+ | 3 | `### Progress Tracking` exists AND any row Status != "Done" | **stories** |
57
+ | 2 | `scope.md` exists, no `### Progress Tracking` heading | **plan** |
58
+ | 1 | epic directory exists, no `scope.md` | **design** |
59
+ | 0 | (nothing) | **start** |
60
+
61
+ Present: "Phase detection: resuming at **{phase}**" with context (e.g., "3/5 stories done, 2 remaining").
62
+
63
+ <verification>
64
+ Phase identified. Epic path resolved.
65
+ </verification>
66
+
67
+ ### Step 1: Resolve Delegation
68
+
69
+ Load developer profile from `~/.rai/developer.yaml`. Resolve delegation level:
70
+
71
+ | Source | Resolution |
72
+ |--------|-----------|
73
+ | `delegation.overrides.rai-epic-run` | Per-skill override (highest priority) |
74
+ | `delegation.default_level` | Explicit default |
75
+ | `experience_level` ShuHaRi | Shu→REVIEW, Ha→NOTIFY, Ri→AUTO |
76
+ | No profile | Default to REVIEW |
77
+
78
+ Present: "Delegation: **{level}**"
79
+
80
+ <verification>
81
+ Delegation level resolved.
82
+ </verification>
83
+
84
+ ### Step 2: Execute Epic Skill Chain
85
+
86
+ Run each epic skill from the detected phase forward. Show `── Phase {N}/6: {skill_name} ──` between phases.
87
+
88
+ | Phase | Skill | Gate after? |
89
+ |:-----:|-------|:-----------:|
90
+ | 1 | `/rai-epic-start {epic_id}` | — |
91
+ | 2 | `/rai-epic-design {epic_id}` | **POST-DESIGN** |
92
+ | 3 | `/rai-architecture-review {epic_id} epic` | **POST-AR** |
93
+ | 4 | `/rai-epic-plan {epic_id}` | **POST-PLAN** |
94
+ | 5 | Story iteration (see Step 3) | — |
95
+ | 6 | `/rai-epic-close {epic_id}` | — |
96
+
97
+ **Full execution rule:** For each phase, you MUST:
98
+ 1. Load the skill's SKILL.md (read the file, don't rely on memory)
99
+ 2. Execute every step in the skill's SKILL.md sequentially — no compression, no skipping
100
+ 3. Produce all artifacts the skill specifies
101
+ 4. Only then move to the next phase
102
+
103
+ The orchestrator delegates — it does not summarize, compress, or shortcut individual skill behavior. A skill invoked through the orchestrator must produce the same output as when invoked standalone.
104
+
105
+ <if-blocked>
106
+ Skill fails → STOP immediately. Report which phase failed and why. Developer re-invokes `/rai-epic-run` after fixing — phase detection resumes automatically.
107
+ </if-blocked>
108
+
109
+ ### Step 3: Hand Off Stories
110
+
111
+ When reaching phase 5 (story iteration), read the `### Progress Tracking` table from `scope.md`:
112
+
113
+ 1. Parse rows — columns: Story, Size, Status, Actual, Velocity, Notes
114
+ 2. Filter rows where Status != "Done"
115
+ 3. Present in table order (plan already resolved dependencies)
116
+
117
+ > **Quality rule — epic-run NEVER executes story-run.**
118
+ > Each `/rai-story-run` must run in a fresh session/context so it can
119
+ > fork its heavy phases via Agent tool with full context budget.
120
+ > Running story-run inside epic-run would accumulate context across
121
+ > stories, degrading quality in later stories — the exact problem
122
+ > Checkpoint & Fork (ADR-043) was designed to eliminate.
123
+ > We never operate at known lower quality levels.
124
+
125
+ **Present the pending stories and STOP:**
126
+
127
+ ```markdown
128
+ ## Stories Ready for Execution
129
+
130
+ | # | Story | Size | Status |
131
+ |:-:|-------|:----:|--------|
132
+ | 1 | S{N}.1 — {name} | S | Pending |
133
+ | 2 | S{N}.2 — {name} | M | Pending |
134
+
135
+ **Next:** Run each story independently with `/rai-story-run {story_id}`
136
+ **Resume:** Re-invoke `/rai-epic-run {epic_id}` when all stories are Done → resumes at close
137
+ ```
138
+
139
+ **STOP here.** Do not proceed to phase 6. Do not invoke story-run.
140
+ The developer runs each story in a separate session with fresh context.
141
+ When all stories are Done, re-invoking `/rai-epic-run` detects phase=close and proceeds.
142
+
143
+ <verification>
144
+ Pending stories presented. Execution paused for human-driven story iteration.
145
+ </verification>
146
+
147
+ ### Step 4: Apply Delegation Gates
148
+
149
+ After **phase 2 (design)**, **phase 3 (AR)**, and **phase 4 (plan)**, apply the delegation gate:
150
+
151
+ | Level | Behavior |
152
+ |-------|----------|
153
+ | REVIEW | Present summary. Wait for explicit approval. |
154
+ | NOTIFY | Present summary. Continue unless user intervenes. |
155
+ | AUTO | Continue immediately. AR SIMPLIFY verdict stops regardless. |
156
+
157
+ **Post-design summary:** Story count, sizes, key architectural decisions.
158
+ **Post-AR summary:** Verdict (PASS/PASS WITH QUESTIONS/SIMPLIFY), proportionality findings, systemic heuristics (H13-H16).
159
+ **Post-plan summary:** Milestones, story sequence, estimated timeline.
160
+
161
+ If AR verdict is SIMPLIFY, STOP regardless of delegation level. Design must be revised before planning.
162
+
163
+ Story iteration is a mandatory STOP — stories run in separate sessions (see Step 3).
164
+
165
+ <verification>
166
+ Gate applied. Approval received (REVIEW) or notification shown (NOTIFY/AUTO).
167
+ </verification>
168
+
169
+ ### Step 5: Complete & Report
170
+
171
+ After all phases, present summary: phases executed, stories completed/total, delegation level, merge target. Confirm epic merged and branch cleaned up.
172
+
173
+ <verification>
174
+ All phases complete. Epic merged.
175
+ </verification>
176
+
177
+ ## Output
178
+
179
+ | Item | Destination |
180
+ |------|-------------|
181
+ | All epic + story artifacts | `work/epics/e{N}-{name}/` |
182
+ | Merge commit | Development branch |
183
+ | Patterns | `.raise/rai/memory/patterns.jsonl` |
184
+ | Next | Next epic or release |
185
+
186
+ ## Quality Checklist
187
+
188
+ - [ ] Phase detection checked in reverse order (most advanced first)
189
+ - [ ] `### Progress Tracking` heading used as plan presence marker
190
+ - [ ] Story iteration filters Status != "Done" (handles spikes naturally)
191
+ - [ ] Each skill's SKILL.md was loaded (read from file) before execution
192
+ - [ ] Every step in each skill executed — no compression or shortcuts
193
+ - [ ] Gates applied at post-design, post-AR, and post-plan
194
+ - [ ] Failure stops immediately — no cascading
195
+ - [ ] NEVER create a state file — phase detection is git-derived only
196
+ - [ ] NEVER skip stories or reorder them — table order is plan order
197
+ - [ ] NEVER compress a skill's steps into a summary — execute each step fully
198
+ - [ ] NEVER invoke story-run from epic-run — present list and STOP (ADR-043 quality rule)
199
+ - [ ] Stories run in separate sessions with fresh context
200
+
201
+ ## References
202
+
203
+ - Epic skills: `/rai-epic-start`, `/rai-epic-design`, `/rai-architecture-review`, `/rai-epic-plan`, `/rai-epic-close`
204
+ - Story orchestrator: `/rai-story-run` (S325.6)
205
+ - Delegation: `~/.rai/developer.yaml`, S325.2
206
+ - BacklogHook: S325.4 (fires on `rai signal emit-work` in start/close)
207
+ - Design: `s325.7-design.md` (decisions D1-D2-D3-D4)
208
+ - F5 constraint & checkpoint protocol: E353 (ADR-043), S353.2, S353.3
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: rai-epic-start
3
+ description: >
4
+ Initialize an epic with scope artifacts and tracker entry.
5
+ Epics are logical containers — no epic branch is created.
6
+ Story branches are created directly from the development branch.
7
+
8
+ license: MIT
9
+
10
+ metadata:
11
+ raise.work_cycle: epic
12
+ raise.frequency: per-epic
13
+ raise.fase: "2"
14
+ raise.prerequisites: ""
15
+ raise.next: epic-design
16
+ raise.gate: ""
17
+ raise.adaptable: "true"
18
+ raise.version: "3.0.0"
19
+ raise.visibility: public
20
+ raise.inputs: |
21
+ - epic_id: string, required, argument
22
+ - epic_slug: string, required, argument
23
+ - dev_branch: string, required, config
24
+ raise.outputs: |
25
+ - brief: file_path, next_skill
26
+ - scope: file_path, next_skill
27
+ ---
28
+
29
+ # Epic Start
30
+
31
+ ## Purpose
32
+
33
+ Initialize an epic with scope artifacts and a tracker entry. Epics are logical containers (directory + tracker), not branches. Story branches are created directly from the development branch.
34
+
35
+ ## Mastery Levels (ShuHaRi)
36
+
37
+ - **Shu**: Follow all steps, verify each before proceeding
38
+ - **Ha**: Streamline scope for well-understood epics
39
+ - **Ri**: Integrate with release workflows and automated setup
40
+
41
+ ## Context
42
+
43
+ **When to use:** Starting a new body of work (3-10 stories), beginning a planned epic from the backlog.
44
+
45
+ **When to skip:** Small fixes or single stories (no epic needed). Continuation of existing epic.
46
+
47
+ **Inputs:** Epic number (E{N}), epic name/slug, high-level objective.
48
+
49
+ **Branch config:** Read `branches.development` from `.raise/manifest.yaml` for `{dev_branch}`. Default: `main`.
50
+
51
+ ## Steps
52
+
53
+ ### Step 1: Verify Development Branch
54
+
55
+ Ensure on `{dev_branch}` (for creating scope artifacts):
56
+
57
+ ```bash
58
+ git branch --show-current
59
+ ```
60
+
61
+ | Condition | Action |
62
+ |-----------|--------|
63
+ | On `{dev_branch}` | Continue |
64
+ | On other branch | `git checkout {dev_branch} && git pull` |
65
+
66
+ <verification>
67
+ On `{dev_branch}`, up to date with remote.
68
+ </verification>
69
+
70
+ ### Step 2: Define Scope & Commit
71
+
72
+ Create TWO artifacts:
73
+
74
+ 1. `work/epics/e{N}-{name}/brief.md` using `templates/brief.md` — hypothesis, success metrics, appetite, rabbit holes.
75
+ 2. `work/epics/e{N}-{name}/scope.md` — objective, in/out scope, planned stories, done criteria.
76
+
77
+ Commit:
78
+
79
+ ```bash
80
+ git add -A
81
+ git commit -m "epic(e{N}): initialize {epic-name}
82
+
83
+ Objective: {1-line}
84
+
85
+ In scope:
86
+ - {item 1}
87
+ - {item 2}
88
+
89
+ Co-Authored-By: Rai <rai@humansys.ai>"
90
+ ```
91
+
92
+ Register epic in the backlog tracker via CLI:
93
+
94
+ - **If Jira issue exists:** `rai backlog transition {JIRA_KEY} "In Progress" -a jira`
95
+ - **If new epic (no Jira key):** `rai backlog create "{title}" -p RAISE -t Epic -l epic`
96
+ - **Fallback (no adapter):** Edit `governance/backlog.md` directly — add or update the row with status `In Progress`.
97
+
98
+ <verification>
99
+ Scope commit on `{dev_branch}`. Epic visible in backlog.
100
+ </verification>
101
+
102
+ <if-blocked>
103
+ Backlog file missing → create it. Row already exists → update status only.
104
+ </if-blocked>
105
+
106
+ ### Step 3: Present Next Steps
107
+
108
+ Show the developer:
109
+ - Commit hash and epic directory path
110
+ - Quick scope summary (objective + story count)
111
+ - **Next:** `/rai-epic-design` to formalize scope and stories
112
+
113
+ ## Output
114
+
115
+ | Item | Destination |
116
+ |------|-------------|
117
+ | Epic Brief | `work/epics/e{N}-{name}/brief.md` |
118
+ | Scope | `work/epics/e{N}-{name}/scope.md` |
119
+ | Scope commit | On `{dev_branch}` |
120
+ | Backlog entry | Tracker (Jira via `rai backlog`) or `governance/backlog.md` fallback |
121
+ | Next | `/rai-epic-design` |
122
+
123
+ ## Quality Checklist
124
+
125
+ - [ ] Epic Brief created from `templates/brief.md`
126
+ - [ ] Scope commit includes objective and boundaries
127
+ - [ ] Epic registered in tracker (`rai backlog`) or `governance/backlog.md` fallback
128
+ - [ ] No epic branch created — epics are logical containers only
129
+ - [ ] NEVER create epic branches — story branches go directly from `{dev_branch}`
130
+
131
+ ## References
132
+
133
+ - Next: `/rai-epic-design`
134
+ - Stories: `/rai-story-start` (branches from `{dev_branch}`)
135
+ - Close: `/rai-epic-close`
136
+ - Branch model: `CLAUDE.md` § Branch Model
@@ -0,0 +1,34 @@
1
+ ---
2
+ epic_id: "{EPIC_ID}"
3
+ title: "{title}"
4
+ status: "draft"
5
+ created: "YYYY-MM-DD"
6
+ ---
7
+
8
+ # Epic Brief: {title}
9
+
10
+ ## Hypothesis
11
+ For [target users] who [need/pain],
12
+ the [solution] is a [category]
13
+ that [delivers this value].
14
+ Unlike [current state], our solution [key differentiator].
15
+
16
+ ## Success Metrics
17
+ - **Leading:** [early signal measurable in first story]
18
+ - **Lagging:** [outcome measurable after epic complete]
19
+
20
+ ## Appetite
21
+ [S/M/L] — [S=2-4 stories, M=5-7, L=8-10]
22
+
23
+ ## Scope Boundaries
24
+ ### In (MUST)
25
+ - [non-negotiable 1]
26
+
27
+ ### In (SHOULD)
28
+ - [nice-to-have 1]
29
+
30
+ ### No-Gos
31
+ - [explicit exclusion with rationale]
32
+
33
+ ### Rabbit Holes
34
+ - [attractive trap to avoid]
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: rai-mcp-add
3
+ description: >
4
+ Guided MCP server registration. Collects intent conversationally,
5
+ resolves package details, and delegates to `rai mcp install` or
6
+ `rai mcp scaffold`. Human never constructs CLI commands.
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: ""
16
+ raise.gate: ""
17
+ raise.adaptable: "true"
18
+ raise.version: "1.0.0"
19
+ raise.visibility: public
20
+ raise.inputs: |
21
+ - server_intent: string, optional, argument (e.g. "Context7", "GitHub MCP")
22
+ raise.outputs: |
23
+ - config_path: file_path (.raise/mcp/<name>.yaml)
24
+ ---
25
+
26
+ # MCP Add
27
+
28
+ ## Purpose
29
+
30
+ Guide a developer through MCP server registration without requiring CLI knowledge. Collect intent, resolve details conversationally, delegate to CLI.
31
+
32
+ ## Mastery Levels (ShuHaRi)
33
+
34
+ - **Shu**: Ask each question individually, explain what each answer means
35
+ - **Ha**: Batch questions when context is clear, suggest defaults
36
+ - **Ri**: One-shot if intent is unambiguous (e.g. "add Context7" → install directly)
37
+
38
+ ## Context
39
+
40
+ **When to use:** Developer wants to add an MCP server to their project.
41
+
42
+ **When to skip:** Developer already knows the exact CLI command and prefers to run it directly.
43
+
44
+ ## Steps
45
+
46
+ ### Step 1: Understand Intent
47
+
48
+ Ask the developer what MCP server they want to add. Accept free-text descriptions:
49
+ - "Context7 for documentation lookups"
50
+ - "GitHub MCP server"
51
+ - "a Snyk security scanner"
52
+ - "I have a custom server running locally"
53
+
54
+ If the developer provides a name as an argument (e.g. `/rai-mcp-add context7`), skip this question.
55
+
56
+ <verification>
57
+ Server intent captured.
58
+ </verification>
59
+
60
+ ### Step 2: Resolve Package Details
61
+
62
+ Based on the intent, determine:
63
+
64
+ 1. **Package type** — ask: "Is this an npm package (npx), a Python package (uvx/pip), or a locally running server?"
65
+ 2. **Package identifier** — ask for the exact package name (e.g. `@upstash/context7-mcp`, `mcp-github`)
66
+ 3. **Server name** — suggest a slug derived from the package name, let the developer override
67
+ 4. **Environment variables** — ask: "Does this server need any API keys or tokens? (e.g. GITHUB_TOKEN)"
68
+ 5. **Python module** (pip only) — ask: "What's the Python module name to run? (e.g. mcp_server_fetch)"
69
+
70
+ **For known servers, read `.raise/mcp/catalog.yaml`:**
71
+
72
+ If the developer's intent matches a server name in the catalog, pre-fill all fields (package, type, env, module) from the catalog entry. No need to ask questions already answered by governance data.
73
+
74
+ If the catalog is missing or the server isn't in it, ask the developer for each field individually.
75
+
76
+ If uncertain, ask. Never guess package names.
77
+
78
+ <verification>
79
+ All required fields collected: type, package, name, env (if any), module (if pip).
80
+ </verification>
81
+
82
+ ### Step 3: Confirm Before Installing
83
+
84
+ Present a summary of what will be installed:
85
+
86
+ ```
87
+ I'll set up the following MCP server:
88
+
89
+ Name: {name}
90
+ Package: {package}
91
+ Type: {type}
92
+ Env: {env_vars or "none"}
93
+ Config: .raise/mcp/{name}.yaml
94
+
95
+ Proceed?
96
+ ```
97
+
98
+ Wait for confirmation.
99
+
100
+ <verification>
101
+ Developer confirmed installation.
102
+ </verification>
103
+
104
+ ### Step 4: Install
105
+
106
+ Run the appropriate CLI command:
107
+
108
+ ```bash
109
+ rai mcp install {package} --type {type} --name {name} [--env {env}] [--module {module}]
110
+ ```
111
+
112
+ If the config file already exists, ask whether to overwrite (adds `--force`).
113
+
114
+ For a locally running server (no package to install), use scaffold instead:
115
+
116
+ ```bash
117
+ rai mcp scaffold {name} --command {command} --args "{args}" [--env {env}]
118
+ ```
119
+
120
+ <verification>
121
+ CLI command executed successfully. Config file created.
122
+ </verification>
123
+
124
+ ### Step 5: Report Result
125
+
126
+ After installation, report:
127
+ - Config file location
128
+ - Health check result (healthy/unhealthy)
129
+ - Number of tools discovered
130
+ - List of available tools
131
+
132
+ If health check failed, suggest troubleshooting:
133
+ - Check if the package is installed correctly
134
+ - Verify environment variables are set
135
+ - Try `rai mcp health {name}` manually
136
+
137
+ ```
138
+ ✓ MCP server '{name}' added successfully!
139
+
140
+ Config: .raise/mcp/{name}.yaml
141
+ Health: healthy
142
+ Tools: {count} available
143
+ - {tool1}
144
+ - {tool2}
145
+
146
+ Use `rai mcp call {name} <tool> --args '{{...}}'` to invoke tools.
147
+ ```
148
+
149
+ <verification>
150
+ Result reported. Developer knows the server is ready (or what to fix).
151
+ </verification>
152
+
153
+ ## Output
154
+
155
+ | Item | Destination |
156
+ |------|-------------|
157
+ | MCP config | `.raise/mcp/{name}.yaml` |
158
+ | Next | Use the server via `rai mcp call` or reference via `server.ref` in adapters |
159
+
160
+ ## Quality Checklist
161
+
162
+ - [ ] Intent captured before asking technical details
163
+ - [ ] Catalog read from `.raise/mcp/catalog.yaml` for known server defaults
164
+ - [ ] Confirmation shown before running install
165
+ - [ ] Health check result reported
166
+ - [ ] Available tools listed after successful install
167
+ - [ ] NEVER require the human to know CLI syntax
168
+ - [ ] NEVER guess package names — ask when uncertain
169
+
170
+ ## References
171
+
172
+ - CLI: `rai mcp install`, `rai mcp scaffold`, `rai mcp health`, `rai mcp tools`
173
+ - Catalog: `.raise/mcp/catalog.yaml` (governance — known servers + package details)
174
+ - Complement: `/rai-mcp-remove`, `/rai-mcp-status`
175
+ - Pattern: PAT-E-608 (CLI = agent tools, Skills = human interface)
176
+ - Epic: E338 MCP Platform
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: rai-mcp-remove
3
+ description: >
4
+ Safe MCP server removal with adapter dependency checking.
5
+ Shows registered servers, warns about references, deletes config.
6
+
7
+ license: MIT
8
+
9
+ metadata:
10
+ raise.work_cycle: utility
11
+ raise.frequency: on-demand
12
+ raise.fase: ""
13
+ raise.prerequisites: ""
14
+ raise.next: ""
15
+ raise.gate: ""
16
+ raise.adaptable: "true"
17
+ raise.version: "1.0.0"
18
+ raise.visibility: public
19
+ raise.inputs: |
20
+ - server_name: string, optional, argument (e.g. "context7")
21
+ raise.outputs: |
22
+ - removed: boolean
23
+ ---
24
+
25
+ # MCP Remove
26
+
27
+ ## Purpose
28
+
29
+ Safely remove an MCP server from the project, checking for adapter dependencies before deletion.
30
+
31
+ ## Mastery Levels (ShuHaRi)
32
+
33
+ - **Shu**: Show each check step, explain dependencies found
34
+ - **Ha**: Skip listing if server name provided, streamline confirmation
35
+ - **Ri**: Remove immediately if no dependencies, warn only when needed
36
+
37
+ ## Context
38
+
39
+ **When to use:** Developer wants to remove a registered MCP server.
40
+
41
+ **When to skip:** Developer prefers to delete the YAML file manually.
42
+
43
+ ## Steps
44
+
45
+ ### Step 1: Identify Server
46
+
47
+ If no server name provided as argument:
48
+
49
+ 1. List registered servers using `rai mcp list`
50
+ 2. Ask: "Which server would you like to remove?"
51
+
52
+ If server name provided, verify it exists in `.raise/mcp/`.
53
+
54
+ <verification>
55
+ Target server identified and exists.
56
+ </verification>
57
+
58
+ ### Step 2: Check Dependencies
59
+
60
+ Search for references to this server in declarative adapter configs:
61
+
62
+ ```bash
63
+ grep -rl "ref:.*{server_name}" .raise/adapters/ 2>/dev/null
64
+ ```
65
+
66
+ If references found, present them:
67
+
68
+ ```
69
+ ⚠ Found adapters referencing '{server_name}':
70
+ - .raise/adapters/{adapter1}.yaml
71
+ - .raise/adapters/{adapter2}.yaml
72
+
73
+ Removing this server will break these adapters.
74
+ ```
75
+
76
+ If no references found: "No adapter dependencies found."
77
+
78
+ <verification>
79
+ Dependencies checked and reported.
80
+ </verification>
81
+
82
+ ### Step 3: Confirm and Remove
83
+
84
+ If dependencies exist, ask for explicit confirmation: "Remove anyway? This will break the listed adapters."
85
+
86
+ If no dependencies (or confirmed), delete the config:
87
+
88
+ ```bash
89
+ rm .raise/mcp/{server_name}.yaml
90
+ ```
91
+
92
+ Report: "Removed .raise/mcp/{server_name}.yaml"
93
+
94
+ If dependencies were found, add: "Update the listed adapters to use inline config or reference another server."
95
+
96
+ <verification>
97
+ Config file deleted. Developer informed of any follow-up actions.
98
+ </verification>
99
+
100
+ ## Output
101
+
102
+ | Item | Destination |
103
+ |------|-------------|
104
+ | Deleted config | `.raise/mcp/{name}.yaml` removed |
105
+ | Next | Update dependent adapters if any |
106
+
107
+ ## Quality Checklist
108
+
109
+ - [ ] Server existence verified before attempting removal
110
+ - [ ] Adapter dependencies checked via grep
111
+ - [ ] Explicit confirmation required when dependencies exist
112
+ - [ ] Follow-up guidance provided for broken adapters
113
+ - [ ] NEVER delete without checking dependencies first
114
+
115
+ ## References
116
+
117
+ - CLI: `rai mcp list`
118
+ - Complement: `/rai-mcp-add`, `/rai-mcp-status`
119
+ - Adapter config: `.raise/adapters/*.yaml` (`server.ref` field)
120
+ - Epic: E338 MCP Platform