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,467 @@
1
+ """Backward-compatible aliases for commands extracted to graph, pattern, and signal groups.
2
+
3
+ All active commands have been extracted to dedicated groups (RAISE-247):
4
+ - Graph: query, context, build, validate, extract, list, viz
5
+ - Pattern: add-pattern, reinforce
6
+ - Signal: emit-work, emit-session, emit-calibration
7
+
8
+ These aliases print deprecation warnings and delegate to the canonical commands.
9
+ They will be removed in a future release (RAISE-247/S9).
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ from pathlib import Path
15
+ from typing import Annotated
16
+
17
+ import typer
18
+ from rich.console import Console
19
+
20
+ memory_app = typer.Typer(
21
+ name="memory",
22
+ help="Query and manage Rai's memory",
23
+ no_args_is_help=True,
24
+ )
25
+
26
+
27
+ # =============================================================================
28
+ # Deprecation Helpers
29
+ # =============================================================================
30
+
31
+
32
+ _stderr_console = Console(stderr=True)
33
+
34
+
35
+ def _deprecation_warning(
36
+ old_cmd: str, new_group: str = "graph", new_cmd: str | None = None
37
+ ) -> None:
38
+ """Print deprecation warning to stderr."""
39
+ target = new_cmd or old_cmd
40
+ _stderr_console.print(
41
+ f"[yellow]DEPRECATED:[/yellow] 'rai memory {old_cmd}' → "
42
+ f"use 'rai {new_group} {target}' instead",
43
+ )
44
+
45
+
46
+ # =============================================================================
47
+ # Backward-Compat Aliases: graph commands (extracted to graph.py in RAISE-247)
48
+ # These wrappers will be removed in a future release (RAISE-247/S9).
49
+ # =============================================================================
50
+
51
+
52
+ @memory_app.command()
53
+ def query(
54
+ query_str: Annotated[
55
+ str, typer.Argument(help="Query string (keywords or concept ID)")
56
+ ],
57
+ format: Annotated[
58
+ str,
59
+ typer.Option("--format", "-f", help="Output format (human or json)"),
60
+ ] = "human",
61
+ output: Annotated[
62
+ Path | None,
63
+ typer.Option("--output", "-o", help="Output file path (default: stdout)"),
64
+ ] = None,
65
+ strategy: Annotated[
66
+ str | None,
67
+ typer.Option(
68
+ "--strategy",
69
+ "-s",
70
+ help="Query strategy (keyword_search, concept_lookup)",
71
+ ),
72
+ ] = None,
73
+ types: Annotated[
74
+ str | None,
75
+ typer.Option(
76
+ "--types",
77
+ "-t",
78
+ help="Filter by types (comma-separated: pattern,calibration,principle,etc.)",
79
+ ),
80
+ ] = None,
81
+ edge_types: Annotated[
82
+ str | None,
83
+ typer.Option(
84
+ "--edge-types",
85
+ help="Filter by edge types (comma-separated: constrained_by,depends_on,etc.)",
86
+ ),
87
+ ] = None,
88
+ limit: Annotated[
89
+ int,
90
+ typer.Option("--limit", "-l", help="Maximum number of results"),
91
+ ] = 10,
92
+ index_path: Annotated[
93
+ Path | None,
94
+ typer.Option("--index", "-i", help="Memory index path"),
95
+ ] = None,
96
+ ) -> None:
97
+ """Deprecated: use 'rai graph query'."""
98
+ _deprecation_warning("query")
99
+ from raise_cli.cli.commands.graph import query as graph_query
100
+
101
+ graph_query(
102
+ query_str=query_str,
103
+ format=format,
104
+ output=output,
105
+ strategy=strategy,
106
+ types=types,
107
+ edge_types=edge_types,
108
+ limit=limit,
109
+ index_path=index_path,
110
+ )
111
+
112
+
113
+ @memory_app.command("context")
114
+ def context_cmd(
115
+ module_id: Annotated[str, typer.Argument(help="Module ID (e.g., mod-memory)")],
116
+ format: Annotated[
117
+ str,
118
+ typer.Option("--format", "-f", help="Output format (human or json)"),
119
+ ] = "human",
120
+ index_path: Annotated[
121
+ Path | None,
122
+ typer.Option("--index", "-i", help="Memory index path"),
123
+ ] = None,
124
+ ) -> None:
125
+ """Deprecated: use 'rai graph context'."""
126
+ _deprecation_warning("context")
127
+ from raise_cli.cli.commands.graph import context_cmd as graph_context
128
+
129
+ graph_context(module_id=module_id, format=format, index_path=index_path)
130
+
131
+
132
+ @memory_app.command()
133
+ def build(
134
+ output: Annotated[
135
+ Path | None,
136
+ typer.Option("--output", "-o", help="Path to save index JSON"),
137
+ ] = None,
138
+ no_diff: Annotated[
139
+ bool,
140
+ typer.Option("--no-diff", help="Skip diff computation"),
141
+ ] = False,
142
+ ) -> None:
143
+ """Deprecated: use 'rai graph build'."""
144
+ _deprecation_warning("build")
145
+ from raise_cli.cli.commands.graph import build as graph_build
146
+
147
+ graph_build(output=output, no_diff=no_diff)
148
+
149
+
150
+ @memory_app.command()
151
+ def validate(
152
+ index_file: Annotated[
153
+ Path | None,
154
+ typer.Option("--index", "-i", help="Path to index JSON file"),
155
+ ] = None,
156
+ ) -> None:
157
+ """Deprecated: use 'rai graph validate'."""
158
+ _deprecation_warning("validate")
159
+ from raise_cli.cli.commands.graph import validate as graph_validate
160
+
161
+ graph_validate(index_file=index_file)
162
+
163
+
164
+ @memory_app.command()
165
+ def extract(
166
+ file_path: Annotated[
167
+ Path | None,
168
+ typer.Argument(
169
+ help="Path to governance file (optional, extracts all if not provided)"
170
+ ),
171
+ ] = None,
172
+ format: Annotated[
173
+ str,
174
+ typer.Option("--format", "-f", help="Output format (human or json)"),
175
+ ] = "human",
176
+ ) -> None:
177
+ """Deprecated: use 'rai graph extract'."""
178
+ _deprecation_warning("extract")
179
+ from raise_cli.cli.commands.graph import extract as graph_extract
180
+
181
+ graph_extract(file_path=file_path, format=format)
182
+
183
+
184
+ @memory_app.command("list")
185
+ def list_memory(
186
+ format: Annotated[
187
+ str,
188
+ typer.Option("--format", "-f", help="Output format (human, json, or table)"),
189
+ ] = "table",
190
+ output: Annotated[
191
+ Path | None,
192
+ typer.Option("--output", "-o", help="Output file path (default: stdout)"),
193
+ ] = None,
194
+ index_path: Annotated[
195
+ Path | None,
196
+ typer.Option("--index", "-i", help="Memory index path"),
197
+ ] = None,
198
+ memory_only: Annotated[
199
+ bool,
200
+ typer.Option(
201
+ "--memory-only/--all",
202
+ help="Show only memory types (pattern, calibration, session) or all",
203
+ ),
204
+ ] = False,
205
+ ) -> None:
206
+ """Deprecated: use 'rai graph list'."""
207
+ _deprecation_warning("list")
208
+ from raise_cli.cli.commands.graph import list_graph
209
+
210
+ list_graph(
211
+ format=format, output=output, index_path=index_path, memory_only=memory_only
212
+ )
213
+
214
+
215
+ @memory_app.command("viz")
216
+ def viz(
217
+ output: Annotated[
218
+ Path | None,
219
+ typer.Option("--output", "-o", help="Output HTML file path"),
220
+ ] = None,
221
+ index_path: Annotated[
222
+ Path | None,
223
+ typer.Option("--index", "-i", help="Memory index path"),
224
+ ] = None,
225
+ open_browser: Annotated[
226
+ bool,
227
+ typer.Option("--open/--no-open", help="Open in browser after generating"),
228
+ ] = True,
229
+ ) -> None:
230
+ """Deprecated: use 'rai graph viz'."""
231
+ _deprecation_warning("viz")
232
+ from raise_cli.cli.commands.graph import viz as graph_viz
233
+
234
+ graph_viz(output=output, index_path=index_path, open_browser=open_browser)
235
+
236
+
237
+ # =============================================================================
238
+ # Backward-Compat Aliases: pattern commands (extracted to pattern.py in RAISE-247)
239
+ # These wrappers will be removed in a future release (RAISE-247/S9).
240
+ # =============================================================================
241
+
242
+
243
+ @memory_app.command("reinforce")
244
+ def reinforce_cmd(
245
+ pattern_id: Annotated[
246
+ str, typer.Argument(help="Pattern ID to reinforce (e.g., PAT-E-183)")
247
+ ],
248
+ vote: Annotated[
249
+ int,
250
+ typer.Option(
251
+ "--vote",
252
+ "-v",
253
+ help="Vote: 1 (applied), 0 (N/A — not counted), -1 (contradicted)",
254
+ ),
255
+ ],
256
+ story_id: Annotated[
257
+ str | None,
258
+ typer.Option(
259
+ "--from", "-f", help="Story ID for traceability (e.g., RAISE-170)"
260
+ ),
261
+ ] = None,
262
+ scope: Annotated[
263
+ str,
264
+ typer.Option("--scope", "-s", help="Memory scope (global, project, personal)"),
265
+ ] = "project",
266
+ memory_dir: Annotated[
267
+ Path | None,
268
+ typer.Option(
269
+ "--memory-dir", "-m", help="Memory directory path (overrides scope)"
270
+ ),
271
+ ] = None,
272
+ ) -> None:
273
+ """Deprecated: use 'rai pattern reinforce'."""
274
+ _deprecation_warning("reinforce", "pattern")
275
+ from raise_cli.cli.commands.pattern import reinforce_cmd as _reinforce
276
+
277
+ _reinforce(
278
+ pattern_id=pattern_id,
279
+ vote=vote,
280
+ story_id=story_id,
281
+ scope=scope,
282
+ memory_dir=memory_dir,
283
+ )
284
+
285
+
286
+ @memory_app.command("add-pattern")
287
+ def add_pattern(
288
+ content: Annotated[str, typer.Argument(help="Pattern description")],
289
+ context: Annotated[
290
+ str,
291
+ typer.Option("--context", "-c", help="Context keywords (comma-separated)"),
292
+ ] = "",
293
+ sub_type: Annotated[
294
+ str,
295
+ typer.Option(
296
+ "--type",
297
+ "-t",
298
+ help="Pattern type (codebase, process, architecture, technical)",
299
+ ),
300
+ ] = "process",
301
+ learned_from: Annotated[
302
+ str | None,
303
+ typer.Option("--from", "-f", help="Story/session where learned"),
304
+ ] = None,
305
+ scope: Annotated[
306
+ str,
307
+ typer.Option("--scope", "-s", help="Memory scope (global, project, personal)"),
308
+ ] = "project",
309
+ memory_dir: Annotated[
310
+ Path | None,
311
+ typer.Option(
312
+ "--memory-dir", "-m", help="Memory directory path (overrides scope)"
313
+ ),
314
+ ] = None,
315
+ ) -> None:
316
+ """Deprecated: use 'rai pattern add'."""
317
+ _deprecation_warning("add-pattern", "pattern", new_cmd="add")
318
+ from raise_cli.cli.commands.pattern import add_pattern as _add
319
+
320
+ _add(
321
+ content=content,
322
+ context=context,
323
+ sub_type=sub_type,
324
+ learned_from=learned_from,
325
+ scope=scope,
326
+ memory_dir=memory_dir,
327
+ )
328
+
329
+
330
+ # =============================================================================
331
+ # Backward-Compat Aliases: signal commands (extracted to signal.py in RAISE-247)
332
+ # These wrappers will be removed in a future release (RAISE-247/S9).
333
+ # =============================================================================
334
+
335
+
336
+ @memory_app.command("emit-work")
337
+ def emit_work(
338
+ work_type: Annotated[
339
+ str,
340
+ typer.Argument(help="Work type (epic, story)"),
341
+ ],
342
+ work_id: Annotated[
343
+ str,
344
+ typer.Argument(help="Work ID (e.g., E9, F9.4)"),
345
+ ],
346
+ event_type: Annotated[
347
+ str,
348
+ typer.Option(
349
+ "--event",
350
+ "-e",
351
+ help="Event type (start, complete, blocked, unblocked, abandoned)",
352
+ ),
353
+ ] = "start",
354
+ phase: Annotated[
355
+ str,
356
+ typer.Option("--phase", "-p", help="Phase (design, plan, implement, review)"),
357
+ ] = "design",
358
+ blocker: Annotated[
359
+ str,
360
+ typer.Option(
361
+ "--blocker", "-b", help="Blocker description (for blocked events)"
362
+ ),
363
+ ] = "",
364
+ session: Annotated[
365
+ str | None,
366
+ typer.Option(
367
+ "--session",
368
+ help="Session ID (e.g., SES-177). Falls back to RAI_SESSION_ID env var.",
369
+ ),
370
+ ] = None,
371
+ ) -> None:
372
+ """Deprecated: use 'rai signal emit-work'."""
373
+ _deprecation_warning("emit-work", "signal")
374
+ from raise_cli.cli.commands.signal import emit_work as _emit_work
375
+
376
+ _emit_work(
377
+ work_type=work_type,
378
+ work_id=work_id,
379
+ event_type=event_type,
380
+ phase=phase,
381
+ blocker=blocker,
382
+ session=session,
383
+ )
384
+
385
+
386
+ @memory_app.command("emit-session")
387
+ def emit_session_event(
388
+ session_type: Annotated[
389
+ str,
390
+ typer.Option(
391
+ "--type", "-t", help="Session type (e.g., story, research, maintenance)"
392
+ ),
393
+ ] = "story",
394
+ outcome: Annotated[
395
+ str,
396
+ typer.Option(
397
+ "--outcome",
398
+ "-o",
399
+ help="Session outcome (success, partial, abandoned)",
400
+ ),
401
+ ] = "success",
402
+ duration: Annotated[
403
+ int,
404
+ typer.Option("--duration", "-d", help="Session duration in minutes"),
405
+ ] = 0,
406
+ stories: Annotated[
407
+ str,
408
+ typer.Option("--stories", "-f", help="Stories worked on (comma-separated)"),
409
+ ] = "",
410
+ session: Annotated[
411
+ str | None,
412
+ typer.Option(
413
+ "--session",
414
+ help="Session ID (e.g., SES-177). Falls back to RAI_SESSION_ID env var.",
415
+ ),
416
+ ] = None,
417
+ ) -> None:
418
+ """Deprecated: use 'rai signal emit-session'."""
419
+ _deprecation_warning("emit-session", "signal")
420
+ from raise_cli.cli.commands.signal import emit_session as _emit_session
421
+
422
+ _emit_session(
423
+ session_type=session_type,
424
+ outcome=outcome,
425
+ duration=duration,
426
+ stories=stories,
427
+ session=session,
428
+ )
429
+
430
+
431
+ @memory_app.command("emit-calibration")
432
+ def emit_calibration_event(
433
+ story: Annotated[
434
+ str,
435
+ typer.Argument(help="Story ID (e.g., F9.4)"),
436
+ ],
437
+ size: Annotated[
438
+ str,
439
+ typer.Option("--size", "-s", help="T-shirt size (XS, S, M, L)"),
440
+ ] = "S",
441
+ estimated: Annotated[
442
+ int,
443
+ typer.Option("--estimated", "-e", help="Estimated duration in minutes"),
444
+ ] = 0,
445
+ actual: Annotated[
446
+ int,
447
+ typer.Option("--actual", "-a", help="Actual duration in minutes"),
448
+ ] = 0,
449
+ session: Annotated[
450
+ str | None,
451
+ typer.Option(
452
+ "--session",
453
+ help="Session ID (e.g., SES-177). Falls back to RAI_SESSION_ID env var.",
454
+ ),
455
+ ] = None,
456
+ ) -> None:
457
+ """Deprecated: use 'rai signal emit-calibration'."""
458
+ _deprecation_warning("emit-calibration", "signal")
459
+ from raise_cli.cli.commands.signal import emit_calibration as _emit_calibration
460
+
461
+ _emit_calibration(
462
+ story=story,
463
+ size=size,
464
+ estimated=estimated,
465
+ actual=actual,
466
+ session=session,
467
+ )