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.
- raise_cli/__init__.py +38 -0
- raise_cli/__main__.py +30 -0
- raise_cli/adapters/__init__.py +91 -0
- raise_cli/adapters/declarative/__init__.py +26 -0
- raise_cli/adapters/declarative/adapter.py +267 -0
- raise_cli/adapters/declarative/discovery.py +94 -0
- raise_cli/adapters/declarative/expressions.py +150 -0
- raise_cli/adapters/declarative/reference/__init__.py +1 -0
- raise_cli/adapters/declarative/reference/github.yaml +143 -0
- raise_cli/adapters/declarative/schema.py +98 -0
- raise_cli/adapters/filesystem.py +299 -0
- raise_cli/adapters/mcp_bridge.py +10 -0
- raise_cli/adapters/mcp_confluence.py +246 -0
- raise_cli/adapters/mcp_jira.py +405 -0
- raise_cli/adapters/models.py +205 -0
- raise_cli/adapters/protocols.py +180 -0
- raise_cli/adapters/registry.py +90 -0
- raise_cli/adapters/sync.py +149 -0
- raise_cli/agents/__init__.py +14 -0
- raise_cli/agents/antigravity.yaml +8 -0
- raise_cli/agents/claude.yaml +8 -0
- raise_cli/agents/copilot.yaml +8 -0
- raise_cli/agents/copilot_plugin.py +124 -0
- raise_cli/agents/cursor.yaml +7 -0
- raise_cli/agents/roo.yaml +8 -0
- raise_cli/agents/windsurf.yaml +8 -0
- raise_cli/artifacts/__init__.py +30 -0
- raise_cli/artifacts/models.py +43 -0
- raise_cli/artifacts/reader.py +55 -0
- raise_cli/artifacts/renderer.py +104 -0
- raise_cli/artifacts/story_design.py +69 -0
- raise_cli/artifacts/writer.py +45 -0
- raise_cli/backlog/__init__.py +1 -0
- raise_cli/backlog/sync.py +115 -0
- raise_cli/cli/__init__.py +3 -0
- raise_cli/cli/commands/__init__.py +3 -0
- raise_cli/cli/commands/_resolve.py +153 -0
- raise_cli/cli/commands/adapters.py +362 -0
- raise_cli/cli/commands/artifact.py +137 -0
- raise_cli/cli/commands/backlog.py +333 -0
- raise_cli/cli/commands/base.py +31 -0
- raise_cli/cli/commands/discover.py +551 -0
- raise_cli/cli/commands/docs.py +130 -0
- raise_cli/cli/commands/doctor.py +177 -0
- raise_cli/cli/commands/gate.py +223 -0
- raise_cli/cli/commands/graph.py +1086 -0
- raise_cli/cli/commands/info.py +81 -0
- raise_cli/cli/commands/init.py +746 -0
- raise_cli/cli/commands/journal.py +167 -0
- raise_cli/cli/commands/mcp.py +524 -0
- raise_cli/cli/commands/memory.py +467 -0
- raise_cli/cli/commands/pattern.py +348 -0
- raise_cli/cli/commands/profile.py +59 -0
- raise_cli/cli/commands/publish.py +80 -0
- raise_cli/cli/commands/release.py +338 -0
- raise_cli/cli/commands/session.py +528 -0
- raise_cli/cli/commands/signal.py +410 -0
- raise_cli/cli/commands/skill.py +350 -0
- raise_cli/cli/commands/skill_set.py +145 -0
- raise_cli/cli/error_handler.py +158 -0
- raise_cli/cli/main.py +163 -0
- raise_cli/compat.py +66 -0
- raise_cli/config/__init__.py +41 -0
- raise_cli/config/agent_plugin.py +105 -0
- raise_cli/config/agent_registry.py +233 -0
- raise_cli/config/agents.py +120 -0
- raise_cli/config/ide.py +32 -0
- raise_cli/config/paths.py +379 -0
- raise_cli/config/settings.py +180 -0
- raise_cli/context/__init__.py +42 -0
- raise_cli/context/analyzers/__init__.py +16 -0
- raise_cli/context/analyzers/models.py +36 -0
- raise_cli/context/analyzers/protocol.py +43 -0
- raise_cli/context/analyzers/python.py +292 -0
- raise_cli/context/builder.py +1569 -0
- raise_cli/context/diff.py +213 -0
- raise_cli/context/extractors/__init__.py +13 -0
- raise_cli/context/extractors/skills.py +121 -0
- raise_cli/core/__init__.py +37 -0
- raise_cli/core/files.py +66 -0
- raise_cli/core/text.py +174 -0
- raise_cli/core/tools.py +441 -0
- raise_cli/discovery/__init__.py +50 -0
- raise_cli/discovery/analyzer.py +691 -0
- raise_cli/discovery/drift.py +355 -0
- raise_cli/discovery/scanner.py +1687 -0
- raise_cli/doctor/__init__.py +4 -0
- raise_cli/doctor/checks/__init__.py +1 -0
- raise_cli/doctor/checks/environment.py +110 -0
- raise_cli/doctor/checks/project.py +238 -0
- raise_cli/doctor/fix.py +80 -0
- raise_cli/doctor/models.py +56 -0
- raise_cli/doctor/protocol.py +43 -0
- raise_cli/doctor/registry.py +100 -0
- raise_cli/doctor/report.py +141 -0
- raise_cli/doctor/runner.py +95 -0
- raise_cli/engines/__init__.py +3 -0
- raise_cli/exceptions.py +215 -0
- raise_cli/gates/__init__.py +19 -0
- raise_cli/gates/builtin/__init__.py +1 -0
- raise_cli/gates/builtin/coverage.py +52 -0
- raise_cli/gates/builtin/lint.py +48 -0
- raise_cli/gates/builtin/tests.py +48 -0
- raise_cli/gates/builtin/types.py +48 -0
- raise_cli/gates/models.py +40 -0
- raise_cli/gates/protocol.py +41 -0
- raise_cli/gates/registry.py +141 -0
- raise_cli/governance/__init__.py +11 -0
- raise_cli/governance/extractor.py +412 -0
- raise_cli/governance/models.py +134 -0
- raise_cli/governance/parsers/__init__.py +35 -0
- raise_cli/governance/parsers/_convert.py +38 -0
- raise_cli/governance/parsers/adr.py +274 -0
- raise_cli/governance/parsers/backlog.py +356 -0
- raise_cli/governance/parsers/constitution.py +119 -0
- raise_cli/governance/parsers/epic.py +323 -0
- raise_cli/governance/parsers/glossary.py +316 -0
- raise_cli/governance/parsers/guardrails.py +345 -0
- raise_cli/governance/parsers/prd.py +112 -0
- raise_cli/governance/parsers/roadmap.py +118 -0
- raise_cli/governance/parsers/vision.py +116 -0
- raise_cli/graph/__init__.py +1 -0
- raise_cli/graph/backends/__init__.py +57 -0
- raise_cli/graph/backends/api.py +137 -0
- raise_cli/graph/backends/dual.py +139 -0
- raise_cli/graph/backends/pending.py +84 -0
- raise_cli/handlers/__init__.py +3 -0
- raise_cli/hooks/__init__.py +54 -0
- raise_cli/hooks/builtin/__init__.py +1 -0
- raise_cli/hooks/builtin/backlog.py +216 -0
- raise_cli/hooks/builtin/gate_bridge.py +83 -0
- raise_cli/hooks/builtin/jira_sync.py +127 -0
- raise_cli/hooks/builtin/memory.py +117 -0
- raise_cli/hooks/builtin/telemetry.py +72 -0
- raise_cli/hooks/emitter.py +184 -0
- raise_cli/hooks/events.py +262 -0
- raise_cli/hooks/protocol.py +38 -0
- raise_cli/hooks/registry.py +117 -0
- raise_cli/mcp/__init__.py +33 -0
- raise_cli/mcp/bridge.py +218 -0
- raise_cli/mcp/models.py +43 -0
- raise_cli/mcp/registry.py +77 -0
- raise_cli/mcp/schema.py +41 -0
- raise_cli/memory/__init__.py +58 -0
- raise_cli/memory/loader.py +247 -0
- raise_cli/memory/migration.py +241 -0
- raise_cli/memory/models.py +169 -0
- raise_cli/memory/writer.py +598 -0
- raise_cli/onboarding/__init__.py +103 -0
- raise_cli/onboarding/bootstrap.py +324 -0
- raise_cli/onboarding/claudemd.py +17 -0
- raise_cli/onboarding/conventions.py +742 -0
- raise_cli/onboarding/detection.py +374 -0
- raise_cli/onboarding/governance.py +443 -0
- raise_cli/onboarding/instructions.py +672 -0
- raise_cli/onboarding/manifest.py +201 -0
- raise_cli/onboarding/memory_md.py +399 -0
- raise_cli/onboarding/migration.py +207 -0
- raise_cli/onboarding/profile.py +624 -0
- raise_cli/onboarding/skill_conflict.py +100 -0
- raise_cli/onboarding/skill_manifest.py +176 -0
- raise_cli/onboarding/skills.py +437 -0
- raise_cli/onboarding/workflows.py +101 -0
- raise_cli/output/__init__.py +28 -0
- raise_cli/output/console.py +394 -0
- raise_cli/output/formatters/__init__.py +9 -0
- raise_cli/output/formatters/adapters.py +135 -0
- raise_cli/output/formatters/discover.py +439 -0
- raise_cli/output/formatters/skill.py +298 -0
- raise_cli/publish/__init__.py +3 -0
- raise_cli/publish/changelog.py +80 -0
- raise_cli/publish/check.py +179 -0
- raise_cli/publish/version.py +172 -0
- raise_cli/rai_base/__init__.py +22 -0
- raise_cli/rai_base/framework/__init__.py +7 -0
- raise_cli/rai_base/framework/methodology.yaml +233 -0
- raise_cli/rai_base/governance/__init__.py +1 -0
- raise_cli/rai_base/governance/architecture/__init__.py +1 -0
- raise_cli/rai_base/governance/architecture/domain-model.md +20 -0
- raise_cli/rai_base/governance/architecture/system-context.md +34 -0
- raise_cli/rai_base/governance/architecture/system-design.md +24 -0
- raise_cli/rai_base/governance/backlog.md +8 -0
- raise_cli/rai_base/governance/guardrails.md +17 -0
- raise_cli/rai_base/governance/prd.md +25 -0
- raise_cli/rai_base/governance/vision.md +16 -0
- raise_cli/rai_base/identity/__init__.py +8 -0
- raise_cli/rai_base/identity/core.md +119 -0
- raise_cli/rai_base/identity/perspective.md +119 -0
- raise_cli/rai_base/memory/__init__.py +7 -0
- raise_cli/rai_base/memory/patterns-base.jsonl +55 -0
- raise_cli/schemas/__init__.py +3 -0
- raise_cli/schemas/journal.py +49 -0
- raise_cli/schemas/session_state.py +117 -0
- raise_cli/session/__init__.py +5 -0
- raise_cli/session/bundle.py +820 -0
- raise_cli/session/close.py +268 -0
- raise_cli/session/journal.py +119 -0
- raise_cli/session/resolver.py +126 -0
- raise_cli/session/state.py +187 -0
- raise_cli/skills/__init__.py +44 -0
- raise_cli/skills/locator.py +141 -0
- raise_cli/skills/name_checker.py +199 -0
- raise_cli/skills/parser.py +145 -0
- raise_cli/skills/scaffold.py +212 -0
- raise_cli/skills/schema.py +132 -0
- raise_cli/skills/skillsets.py +195 -0
- raise_cli/skills/validator.py +197 -0
- raise_cli/skills_base/__init__.py +80 -0
- raise_cli/skills_base/contract-template.md +60 -0
- raise_cli/skills_base/preamble.md +37 -0
- raise_cli/skills_base/rai-architecture-review/SKILL.md +137 -0
- raise_cli/skills_base/rai-debug/SKILL.md +171 -0
- raise_cli/skills_base/rai-discover/SKILL.md +167 -0
- raise_cli/skills_base/rai-discover-document/SKILL.md +128 -0
- raise_cli/skills_base/rai-discover-scan/SKILL.md +147 -0
- raise_cli/skills_base/rai-discover-start/SKILL.md +145 -0
- raise_cli/skills_base/rai-discover-validate/SKILL.md +142 -0
- raise_cli/skills_base/rai-docs-update/SKILL.md +142 -0
- raise_cli/skills_base/rai-doctor/SKILL.md +120 -0
- raise_cli/skills_base/rai-epic-close/SKILL.md +165 -0
- raise_cli/skills_base/rai-epic-close/templates/retrospective.md +68 -0
- raise_cli/skills_base/rai-epic-design/SKILL.md +146 -0
- raise_cli/skills_base/rai-epic-design/templates/design.md +24 -0
- raise_cli/skills_base/rai-epic-design/templates/scope.md +76 -0
- raise_cli/skills_base/rai-epic-plan/SKILL.md +153 -0
- raise_cli/skills_base/rai-epic-plan/_references/sequencing-strategies.md +67 -0
- raise_cli/skills_base/rai-epic-plan/templates/plan-section.md +49 -0
- raise_cli/skills_base/rai-epic-run/SKILL.md +208 -0
- raise_cli/skills_base/rai-epic-start/SKILL.md +136 -0
- raise_cli/skills_base/rai-epic-start/templates/brief.md +34 -0
- raise_cli/skills_base/rai-mcp-add/SKILL.md +176 -0
- raise_cli/skills_base/rai-mcp-remove/SKILL.md +120 -0
- raise_cli/skills_base/rai-mcp-status/SKILL.md +147 -0
- raise_cli/skills_base/rai-problem-shape/SKILL.md +138 -0
- raise_cli/skills_base/rai-project-create/SKILL.md +144 -0
- raise_cli/skills_base/rai-project-onboard/SKILL.md +162 -0
- raise_cli/skills_base/rai-quality-review/SKILL.md +189 -0
- raise_cli/skills_base/rai-research/SKILL.md +143 -0
- raise_cli/skills_base/rai-research/references/research-prompt-template.md +317 -0
- raise_cli/skills_base/rai-session-close/SKILL.md +176 -0
- raise_cli/skills_base/rai-session-start/SKILL.md +110 -0
- raise_cli/skills_base/rai-story-close/SKILL.md +198 -0
- raise_cli/skills_base/rai-story-design/SKILL.md +203 -0
- raise_cli/skills_base/rai-story-design/references/tech-design-story-v2.md +293 -0
- raise_cli/skills_base/rai-story-implement/SKILL.md +115 -0
- raise_cli/skills_base/rai-story-plan/SKILL.md +135 -0
- raise_cli/skills_base/rai-story-review/SKILL.md +178 -0
- raise_cli/skills_base/rai-story-run/SKILL.md +282 -0
- raise_cli/skills_base/rai-story-start/SKILL.md +166 -0
- raise_cli/skills_base/rai-story-start/templates/story.md +38 -0
- raise_cli/skills_base/rai-welcome/SKILL.md +134 -0
- raise_cli/telemetry/__init__.py +42 -0
- raise_cli/telemetry/schemas.py +285 -0
- raise_cli/telemetry/writer.py +217 -0
- raise_cli/tier/__init__.py +0 -0
- raise_cli/tier/context.py +134 -0
- raise_cli/viz/__init__.py +7 -0
- raise_cli/viz/generator.py +406 -0
- raise_cli-2.2.1.dist-info/METADATA +433 -0
- raise_cli-2.2.1.dist-info/RECORD +264 -0
- raise_cli-2.2.1.dist-info/WHEEL +4 -0
- raise_cli-2.2.1.dist-info/entry_points.txt +40 -0
- raise_cli-2.2.1.dist-info/licenses/LICENSE +190 -0
- 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
|
+
)
|