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,172 @@
|
|
|
1
|
+
"""Version parsing, validation, and bumping for PEP 440 compliance."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import re
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Literal
|
|
9
|
+
|
|
10
|
+
# PEP 440 pattern: N.N.N[{a|b|rc}N]
|
|
11
|
+
_PEP440_RE = re.compile(
|
|
12
|
+
r"^(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"
|
|
13
|
+
r"(?:(?P<pre_type>a|b|rc)(?P<pre_num>\d+))?$"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
BumpType = Literal["major", "minor", "patch", "alpha", "beta", "rc", "release"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@dataclass(frozen=True)
|
|
20
|
+
class VersionInfo:
|
|
21
|
+
"""Parsed PEP 440 version."""
|
|
22
|
+
|
|
23
|
+
major: int
|
|
24
|
+
minor: int
|
|
25
|
+
patch: int
|
|
26
|
+
pre_type: str | None = None
|
|
27
|
+
pre_num: int | None = None
|
|
28
|
+
|
|
29
|
+
def __str__(self) -> str:
|
|
30
|
+
base = f"{self.major}.{self.minor}.{self.patch}"
|
|
31
|
+
if self.pre_type is not None and self.pre_num is not None:
|
|
32
|
+
return f"{base}{self.pre_type}{self.pre_num}"
|
|
33
|
+
return base
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def is_prerelease(self) -> bool:
|
|
37
|
+
"""Check if this is a pre-release version."""
|
|
38
|
+
return self.pre_type is not None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def is_pep440(version: str) -> bool:
|
|
42
|
+
"""Check if a version string is PEP 440 compliant.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
version: Version string to validate.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
True if the version is valid PEP 440.
|
|
49
|
+
"""
|
|
50
|
+
return _PEP440_RE.match(version) is not None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def parse_version(version: str) -> VersionInfo:
|
|
54
|
+
"""Parse a PEP 440 version string into components.
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
version: Version string to parse.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Parsed version info.
|
|
61
|
+
|
|
62
|
+
Raises:
|
|
63
|
+
ValueError: If the version is not valid PEP 440.
|
|
64
|
+
"""
|
|
65
|
+
match = _PEP440_RE.match(version)
|
|
66
|
+
if not match:
|
|
67
|
+
msg = f"'{version}' is not a valid PEP 440 version"
|
|
68
|
+
raise ValueError(msg)
|
|
69
|
+
|
|
70
|
+
pre_type = match.group("pre_type")
|
|
71
|
+
pre_num_str = match.group("pre_num")
|
|
72
|
+
|
|
73
|
+
return VersionInfo(
|
|
74
|
+
major=int(match.group("major")),
|
|
75
|
+
minor=int(match.group("minor")),
|
|
76
|
+
patch=int(match.group("patch")),
|
|
77
|
+
pre_type=pre_type,
|
|
78
|
+
pre_num=int(pre_num_str) if pre_num_str is not None else None,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def bump_version(current: str, bump_type: BumpType) -> str:
|
|
83
|
+
"""Bump a version string according to the bump type.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
current: Current version string (must be PEP 440 compliant).
|
|
87
|
+
bump_type: Type of bump to apply.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
New version string.
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
ValueError: If the current version is not valid PEP 440.
|
|
94
|
+
"""
|
|
95
|
+
v = parse_version(current)
|
|
96
|
+
|
|
97
|
+
if bump_type == "major":
|
|
98
|
+
return str(VersionInfo(major=v.major + 1, minor=0, patch=0))
|
|
99
|
+
|
|
100
|
+
if bump_type == "minor":
|
|
101
|
+
return str(VersionInfo(major=v.major, minor=v.minor + 1, patch=0))
|
|
102
|
+
|
|
103
|
+
if bump_type == "patch":
|
|
104
|
+
return str(VersionInfo(major=v.major, minor=v.minor, patch=v.patch + 1))
|
|
105
|
+
|
|
106
|
+
if bump_type == "alpha":
|
|
107
|
+
if v.pre_type == "a":
|
|
108
|
+
return str(
|
|
109
|
+
VersionInfo(v.major, v.minor, v.patch, "a", (v.pre_num or 0) + 1)
|
|
110
|
+
)
|
|
111
|
+
# From stable or other pre-release: next patch alpha
|
|
112
|
+
if v.pre_type is None:
|
|
113
|
+
return str(VersionInfo(v.major, v.minor, v.patch + 1, "a", 1))
|
|
114
|
+
return str(VersionInfo(v.major, v.minor, v.patch, "a", 1))
|
|
115
|
+
|
|
116
|
+
if bump_type == "beta":
|
|
117
|
+
if v.pre_type == "b":
|
|
118
|
+
return str(
|
|
119
|
+
VersionInfo(v.major, v.minor, v.patch, "b", (v.pre_num or 0) + 1)
|
|
120
|
+
)
|
|
121
|
+
return str(VersionInfo(v.major, v.minor, v.patch, "b", 1))
|
|
122
|
+
|
|
123
|
+
if bump_type == "rc":
|
|
124
|
+
if v.pre_type == "rc":
|
|
125
|
+
return str(
|
|
126
|
+
VersionInfo(v.major, v.minor, v.patch, "rc", (v.pre_num or 0) + 1)
|
|
127
|
+
)
|
|
128
|
+
return str(VersionInfo(v.major, v.minor, v.patch, "rc", 1))
|
|
129
|
+
|
|
130
|
+
# bump_type == "release"
|
|
131
|
+
return str(VersionInfo(v.major, v.minor, v.patch))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def sync_version_files(
|
|
135
|
+
new_version: str,
|
|
136
|
+
*,
|
|
137
|
+
pyproject_path: Path,
|
|
138
|
+
init_path: Path,
|
|
139
|
+
) -> None:
|
|
140
|
+
"""Update version in pyproject.toml and __init__.py.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
new_version: New version string (must be PEP 440 compliant).
|
|
144
|
+
pyproject_path: Path to pyproject.toml.
|
|
145
|
+
init_path: Path to __init__.py.
|
|
146
|
+
|
|
147
|
+
Raises:
|
|
148
|
+
ValueError: If the new version is not valid PEP 440.
|
|
149
|
+
"""
|
|
150
|
+
if not is_pep440(new_version):
|
|
151
|
+
msg = f"'{new_version}' is not a valid PEP 440 version"
|
|
152
|
+
raise ValueError(msg)
|
|
153
|
+
|
|
154
|
+
# Update pyproject.toml
|
|
155
|
+
pyproject_content = pyproject_path.read_text(encoding="utf-8")
|
|
156
|
+
pyproject_content = re.sub(
|
|
157
|
+
r'version\s*=\s*"[^"]*"',
|
|
158
|
+
f'version = "{new_version}"',
|
|
159
|
+
pyproject_content,
|
|
160
|
+
count=1,
|
|
161
|
+
)
|
|
162
|
+
pyproject_path.write_text(pyproject_content, encoding="utf-8")
|
|
163
|
+
|
|
164
|
+
# Update __init__.py
|
|
165
|
+
init_content = init_path.read_text(encoding="utf-8")
|
|
166
|
+
init_content = re.sub(
|
|
167
|
+
r'__version__\s*=\s*"[^"]*"',
|
|
168
|
+
f'__version__ = "{new_version}"',
|
|
169
|
+
init_content,
|
|
170
|
+
count=1,
|
|
171
|
+
)
|
|
172
|
+
init_path.write_text(init_content, encoding="utf-8")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Base Rai package for distribution.
|
|
2
|
+
|
|
3
|
+
This package contains the base identity, patterns, and methodology
|
|
4
|
+
that ship with raise-cli. On `raise init`, these files are copied
|
|
5
|
+
to the project's `.raise/rai/` directory.
|
|
6
|
+
|
|
7
|
+
Contents:
|
|
8
|
+
identity/ Base identity files (core.md, perspective.md)
|
|
9
|
+
memory/ Base patterns (patterns-base.jsonl) [F14.2]
|
|
10
|
+
framework/ Methodology definition (methodology.yaml) [F14.3]
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
from importlib.resources import files
|
|
14
|
+
|
|
15
|
+
base_files = files("raise_cli.rai_base")
|
|
16
|
+
identity_dir = base_files / "identity"
|
|
17
|
+
core_md = (identity_dir / "core.md").read_text(encoding="utf-8")
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
__version__ = "1.0.0"
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# RaiSE Methodology Definition
|
|
2
|
+
# Used to generate MEMORY.md Part 1 (static process knowledge)
|
|
3
|
+
version: 1
|
|
4
|
+
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Work Lifecycle
|
|
7
|
+
# =============================================================================
|
|
8
|
+
lifecycle:
|
|
9
|
+
epic:
|
|
10
|
+
phases: [start, design, plan, implement, close]
|
|
11
|
+
flow: "/rai-epic-start → /rai-epic-design → /rai-epic-plan → [stories] → /rai-epic-close"
|
|
12
|
+
|
|
13
|
+
story:
|
|
14
|
+
phases: [start, design, plan, implement, review, close]
|
|
15
|
+
flow: "/rai-story-start → /rai-story-design* → /rai-story-plan → /rai-story-implement → /rai-story-review → /rai-story-close"
|
|
16
|
+
note: "*design optional for S/XS stories"
|
|
17
|
+
|
|
18
|
+
session:
|
|
19
|
+
phases: [start, work, close]
|
|
20
|
+
flow: "/rai-session-start → [work] → /rai-session-close"
|
|
21
|
+
|
|
22
|
+
# =============================================================================
|
|
23
|
+
# Skills by Category
|
|
24
|
+
# =============================================================================
|
|
25
|
+
skills:
|
|
26
|
+
session:
|
|
27
|
+
- name: /rai-session-start
|
|
28
|
+
purpose: Load memory, analyze progress, propose focused work
|
|
29
|
+
when: Beginning of any working session
|
|
30
|
+
adapts_to: Shu/Ha/Ri experience level
|
|
31
|
+
|
|
32
|
+
- name: /rai-session-close
|
|
33
|
+
purpose: Capture learnings, update memory, log session
|
|
34
|
+
when: End of working session
|
|
35
|
+
creates: Session record, pattern updates
|
|
36
|
+
|
|
37
|
+
epic:
|
|
38
|
+
- name: /rai-epic-start
|
|
39
|
+
purpose: Initialize epic scope and directory structure
|
|
40
|
+
when: Starting a new epic
|
|
41
|
+
creates: Epic directory, scope document, tracker entry
|
|
42
|
+
|
|
43
|
+
- name: /rai-epic-design
|
|
44
|
+
purpose: Design epic scope, stories, architecture
|
|
45
|
+
when: After epic initialized
|
|
46
|
+
creates: Epic scope document with story breakdown
|
|
47
|
+
|
|
48
|
+
- name: /rai-epic-plan
|
|
49
|
+
purpose: Sequence stories with milestones and dependencies
|
|
50
|
+
when: After epic design approved
|
|
51
|
+
creates: Implementation roadmap
|
|
52
|
+
|
|
53
|
+
- name: /rai-epic-close
|
|
54
|
+
purpose: Epic retrospective, metrics capture, tracking update
|
|
55
|
+
when: All stories complete
|
|
56
|
+
creates: Retrospective, tracking update
|
|
57
|
+
|
|
58
|
+
story:
|
|
59
|
+
- name: /rai-story-start
|
|
60
|
+
purpose: Create story branch and scope commit
|
|
61
|
+
when: Starting a new story
|
|
62
|
+
creates: Story branch from dev, scope documentation
|
|
63
|
+
|
|
64
|
+
- name: /rai-story-design
|
|
65
|
+
purpose: Create lean specification for complex stories
|
|
66
|
+
when: Story has >3 components or needs architectural decisions
|
|
67
|
+
creates: Design spec optimized for AI alignment
|
|
68
|
+
optional_for: S/XS sized stories
|
|
69
|
+
|
|
70
|
+
- name: /rai-story-plan
|
|
71
|
+
purpose: Decompose into atomic executable tasks
|
|
72
|
+
when: After design (or directly for simple stories)
|
|
73
|
+
creates: Task list with dependencies
|
|
74
|
+
|
|
75
|
+
- name: /rai-story-implement
|
|
76
|
+
purpose: Execute tasks with TDD and validation gates
|
|
77
|
+
when: Plan exists
|
|
78
|
+
creates: Working code, tests, documentation
|
|
79
|
+
|
|
80
|
+
- name: /rai-story-review
|
|
81
|
+
purpose: Extract learnings, identify improvements
|
|
82
|
+
when: Implementation complete
|
|
83
|
+
creates: Retrospective, pattern updates
|
|
84
|
+
|
|
85
|
+
- name: /rai-story-close
|
|
86
|
+
purpose: Verify, merge, cleanup
|
|
87
|
+
when: Review complete
|
|
88
|
+
creates: Merged code, deleted branch
|
|
89
|
+
|
|
90
|
+
discovery:
|
|
91
|
+
- name: /rai-discover-start
|
|
92
|
+
purpose: Initialize codebase discovery
|
|
93
|
+
when: Setting up discovery for a codebase
|
|
94
|
+
creates: Discovery context file
|
|
95
|
+
|
|
96
|
+
- name: /rai-discover-scan
|
|
97
|
+
purpose: Extract symbols and synthesize descriptions
|
|
98
|
+
when: After discovery initialized
|
|
99
|
+
creates: Draft component catalog (YAML)
|
|
100
|
+
|
|
101
|
+
- name: /rai-discover-validate
|
|
102
|
+
purpose: Human review of synthesized descriptions, then export to graph format
|
|
103
|
+
when: After scan complete
|
|
104
|
+
creates: Validated component catalog + JSON for graph integration
|
|
105
|
+
|
|
106
|
+
meta:
|
|
107
|
+
- name: /rai-skill-create
|
|
108
|
+
purpose: Create new skills with framework integration
|
|
109
|
+
when: Adding workflow automation
|
|
110
|
+
creates: Skill directory with prompt.md
|
|
111
|
+
|
|
112
|
+
other:
|
|
113
|
+
- name: /rai-research
|
|
114
|
+
purpose: Epistemologically rigorous research
|
|
115
|
+
when: Before ADRs, evaluating approaches, unfamiliar domains
|
|
116
|
+
creates: Evidence catalog with triangulated claims
|
|
117
|
+
|
|
118
|
+
- name: /rai-debug
|
|
119
|
+
purpose: Root cause analysis using lean methods
|
|
120
|
+
when: Encountering unexpected behavior or defects
|
|
121
|
+
method: 5 Whys, Ishikawa diagram, Gemba
|
|
122
|
+
|
|
123
|
+
- name: /rai-framework-sync
|
|
124
|
+
purpose: Sync framework files across locations
|
|
125
|
+
when: Framework updates need propagation
|
|
126
|
+
|
|
127
|
+
# =============================================================================
|
|
128
|
+
# Gates (Poka-Yoke)
|
|
129
|
+
# =============================================================================
|
|
130
|
+
gates:
|
|
131
|
+
blocking:
|
|
132
|
+
- before: Epic design
|
|
133
|
+
require: Epic directory and scope initialized
|
|
134
|
+
enforced_by: /rai-epic-start
|
|
135
|
+
rationale: Epics need scope before design work begins
|
|
136
|
+
|
|
137
|
+
- before: Story work
|
|
138
|
+
require: Story branch and scope commit
|
|
139
|
+
enforced_by: /rai-story-start
|
|
140
|
+
rationale: Traceability from first commit
|
|
141
|
+
|
|
142
|
+
- before: Implementation
|
|
143
|
+
require: Plan exists
|
|
144
|
+
enforced_by: /rai-story-plan
|
|
145
|
+
rationale: No coding without decomposed tasks
|
|
146
|
+
|
|
147
|
+
- before: Story close
|
|
148
|
+
require: Retrospective complete
|
|
149
|
+
enforced_by: /rai-story-review
|
|
150
|
+
rationale: Learning is part of done
|
|
151
|
+
|
|
152
|
+
- before: Epic close
|
|
153
|
+
require: Epic retrospective complete
|
|
154
|
+
enforced_by: /rai-epic-close
|
|
155
|
+
rationale: Meso-layer learning captured
|
|
156
|
+
|
|
157
|
+
quality:
|
|
158
|
+
- gate: Tests pass
|
|
159
|
+
when: Before any commit
|
|
160
|
+
rationale: TDD is non-negotiable
|
|
161
|
+
|
|
162
|
+
- gate: Type checks pass
|
|
163
|
+
when: Before any commit
|
|
164
|
+
tool: pyright --strict
|
|
165
|
+
|
|
166
|
+
- gate: Linting passes
|
|
167
|
+
when: Before any commit
|
|
168
|
+
tool: ruff check && ruff format
|
|
169
|
+
|
|
170
|
+
# =============================================================================
|
|
171
|
+
# Principles (Critical Rules)
|
|
172
|
+
# =============================================================================
|
|
173
|
+
principles:
|
|
174
|
+
process:
|
|
175
|
+
- name: TDD Always
|
|
176
|
+
rule: RED-GREEN-REFACTOR, no exceptions
|
|
177
|
+
rationale: Tests are specification, not afterthought
|
|
178
|
+
|
|
179
|
+
- name: Commit After Task
|
|
180
|
+
rule: Commit after each completed task, not just story end
|
|
181
|
+
rationale: Enables recovery, shows progress
|
|
182
|
+
|
|
183
|
+
- name: Full Skill Cycle
|
|
184
|
+
rule: Use skills even for small stories
|
|
185
|
+
rationale: Structure helps; overhead is minimal
|
|
186
|
+
|
|
187
|
+
- name: Ask Before Subagents
|
|
188
|
+
rule: Get permission before spawning subagents
|
|
189
|
+
rationale: Inference economy - AI computation is precious
|
|
190
|
+
|
|
191
|
+
- name: Delete Branches After Merge
|
|
192
|
+
rule: Clean up merged branches immediately
|
|
193
|
+
rationale: Prevent accumulation, reduce confusion
|
|
194
|
+
|
|
195
|
+
collaboration:
|
|
196
|
+
- name: HITL Default
|
|
197
|
+
rule: Pause after significant work for human review
|
|
198
|
+
rationale: Slow is smooth, smooth is fast
|
|
199
|
+
|
|
200
|
+
- name: Direct Communication
|
|
201
|
+
rule: No praise-padding, say what needs saying
|
|
202
|
+
rationale: Efficiency and respect for time
|
|
203
|
+
|
|
204
|
+
- name: Redirect When Dispersing
|
|
205
|
+
rule: Gently redirect tangents to parking lot
|
|
206
|
+
rationale: Maintain focus on stated goal
|
|
207
|
+
|
|
208
|
+
technical:
|
|
209
|
+
- name: Type Everything
|
|
210
|
+
rule: Type annotations on all code
|
|
211
|
+
rationale: Pyright strict is the standard
|
|
212
|
+
|
|
213
|
+
- name: Pydantic Models
|
|
214
|
+
rule: Use Pydantic for all data structures
|
|
215
|
+
rationale: Validation at boundaries, serialization free
|
|
216
|
+
|
|
217
|
+
- name: Simple First
|
|
218
|
+
rule: Simple heuristics over complex solutions
|
|
219
|
+
rationale: Complexity must earn its place
|
|
220
|
+
|
|
221
|
+
# =============================================================================
|
|
222
|
+
# Branch Model
|
|
223
|
+
# =============================================================================
|
|
224
|
+
branches:
|
|
225
|
+
structure: |
|
|
226
|
+
main (stable)
|
|
227
|
+
└── {development_branch} (development)
|
|
228
|
+
└── story/s{N}.{M}/{name}
|
|
229
|
+
|
|
230
|
+
flow:
|
|
231
|
+
- "Stories branch from and merge to {development_branch}"
|
|
232
|
+
- "{development_branch} merges to main at release"
|
|
233
|
+
- "Epics are logical containers (directory + tracker), not branches"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Bundled governance templates for project scaffolding."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Bundled architecture document templates."""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: architecture_domain_model
|
|
3
|
+
project: "{project_name}"
|
|
4
|
+
status: draft
|
|
5
|
+
bounded_contexts: []
|
|
6
|
+
shared_kernel: {}
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Domain Model: {project_name}
|
|
10
|
+
|
|
11
|
+
> Bounded contexts and shared kernel
|
|
12
|
+
> Fill with /rai-project-create or /rai-project-onboard
|
|
13
|
+
|
|
14
|
+
## Bounded Contexts
|
|
15
|
+
|
|
16
|
+
<!-- Group modules into bounded contexts based on domain boundaries -->
|
|
17
|
+
|
|
18
|
+
## Shared Kernel
|
|
19
|
+
|
|
20
|
+
<!-- Modules shared across bounded contexts -->
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: architecture_context
|
|
3
|
+
project: "{project_name}"
|
|
4
|
+
status: draft
|
|
5
|
+
tech_stack: {}
|
|
6
|
+
external_dependencies: []
|
|
7
|
+
users: []
|
|
8
|
+
governed_by: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# System Context: {project_name}
|
|
12
|
+
|
|
13
|
+
> C4 Level 1 — System Context diagram and description
|
|
14
|
+
> Fill with /rai-project-create or /rai-project-onboard
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
<!-- High-level description: what is this system and who uses it? -->
|
|
19
|
+
|
|
20
|
+
## Context Diagram
|
|
21
|
+
|
|
22
|
+
<!-- System context showing external actors and systems -->
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
┌──────────┐ ┌──────────────┐ ┌──────────┐
|
|
26
|
+
│ Users │──────►│ {project_name} │◄──────│ External │
|
|
27
|
+
│ │ │ │ │ Systems │
|
|
28
|
+
└──────────┘ └──────────────┘ └──────────┘
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## External Interfaces
|
|
32
|
+
|
|
33
|
+
| System | Direction | Protocol | Description |
|
|
34
|
+
|--------|-----------|----------|-------------|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: architecture_design
|
|
3
|
+
project: "{project_name}"
|
|
4
|
+
status: draft
|
|
5
|
+
layers: []
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# System Design: {project_name}
|
|
9
|
+
|
|
10
|
+
> C4 Level 2 — Container/component decomposition
|
|
11
|
+
> Fill with /rai-project-create or /rai-project-onboard
|
|
12
|
+
|
|
13
|
+
## Architecture Overview
|
|
14
|
+
|
|
15
|
+
<!-- High-level architecture description -->
|
|
16
|
+
|
|
17
|
+
## Components
|
|
18
|
+
|
|
19
|
+
| Component | Responsibility | Technology |
|
|
20
|
+
|-----------|---------------|------------|
|
|
21
|
+
|
|
22
|
+
## Key Decisions
|
|
23
|
+
|
|
24
|
+
<!-- Reference ADRs when available: dev/decisions/adr-XXX.md -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: guardrails
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Guardrails: {project_name}
|
|
7
|
+
|
|
8
|
+
> Code and architecture guardrails — fill with /rai-project-create or /rai-project-onboard
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Guardrails Activos
|
|
13
|
+
|
|
14
|
+
### Code Quality
|
|
15
|
+
|
|
16
|
+
| ID | Level | Guardrail | Verification | Derived from |
|
|
17
|
+
|----|-------|-----------|--------------|--------------|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# PRD: {project_name}
|
|
2
|
+
|
|
3
|
+
> Product Requirements Document — fill with /rai-project-create or /rai-project-onboard
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
<!-- Describe the problem this project solves -->
|
|
10
|
+
|
|
11
|
+
## Goals
|
|
12
|
+
|
|
13
|
+
<!-- What success looks like -->
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
### RF-01: Core Functionality
|
|
20
|
+
|
|
21
|
+
<!-- Describe the primary capability this project must provide -->
|
|
22
|
+
|
|
23
|
+
### RF-02: User Experience
|
|
24
|
+
|
|
25
|
+
<!-- Describe how users interact with the project -->
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Solution Vision: {project_name}
|
|
2
|
+
|
|
3
|
+
> Solution vision — fill with /rai-project-create or /rai-project-onboard
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
|
|
7
|
+
### Description
|
|
8
|
+
|
|
9
|
+
<!-- One-paragraph description of what this project is and why it exists -->
|
|
10
|
+
|
|
11
|
+
## Outcomes
|
|
12
|
+
|
|
13
|
+
| **Outcome** | **Description** |
|
|
14
|
+
|-------------|-----------------|
|
|
15
|
+
| **Core Value** | <!-- Primary value delivered to users --> |
|
|
16
|
+
| **Quality** | <!-- Quality standards this project meets --> |
|