riskrails 3.2.1 → 4.0.1
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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +40 -83
- package/agents/ai-reviewer.md.tmpl +1 -1
- package/ai/using-riskrails.md +0 -3
- package/bin/riskrails.js +13 -59
- package/hooks/ai-path-guard-defaults.json +1 -1
- package/hooks/context-guard.py +2 -4
- package/hooks/guard/paths.py +3 -6
- package/hooks/guard/scope.py +1 -3
- package/hooks/runtime-gate.py +18 -58
- package/instructions/routing.md +2 -2
- package/package.json +1 -1
- package/scripts/ai-path +1 -1
- package/scripts/resolve-profile.py +0 -3
- package/skills/ai-audit/templates/ai-sdlc-adoption-plan.md +1 -1
- package/skills/ai-audit/templates/play-scoring-rubric.md +1 -1
- package/skills/ai-init/templates/.ai/AGENTS.md +6 -6
- package/skills/ai-init/templates/.ai/VERSION +1 -1
- package/skills/ai-init/templates/.ai/policies/security.md +1 -2
- package/skills/ai-init/templates/.ai/policies/testing.md +5 -12
- package/skills/ai-init/templates/.ai/policies/verification.md +18 -0
- package/skills/ai-init/templates/.ai/policies/weight.json +0 -1
- package/skills/ai-init/templates/.ai/policies/weight.md +1 -2
- package/skills/ai-init/templates/.ai/policies/weight.project.json +4 -0
- package/skills/ai-init/templates/.ai/project/architecture.md +1 -1
- package/skills/ai-init/templates/.ai/project/initial-assessment.md +2 -2
- package/skills/ai-init/templates/.ai/project/overview.md +1 -1
- package/skills/ai-init/templates/.ai/rules/README.md +2 -2
- package/skills/ai-init/templates/.ai/state/README.md +1 -1
- package/skills/ai-task/memory_store.py +8 -9
- package/skills/ai-task/rr_state/cli.py +1 -1
- package/skills/ai-task/rr_state/dialog.py +2 -4
- package/skills/ai-task/rr_state/fs.py +5 -13
- package/skills/ai-task/rr_state/profile.py +2 -4
- package/skills/ai-task/rr_state/questions_cmd.py +1 -1
- package/skills/ai-task/rr_state/report.py +3 -4
- package/skills/ai-task/rr_state/runtime.py +1 -1
- package/skills/ai-task/rr_state/start.py +7 -7
- package/skills/ai-task/sensors.py +10 -11
- package/skills/ai-task/state.py +4 -24
- package/skills/ai-task/weight.py +17 -17
- package/skills/ai-task/weight_overlay.py +38 -0
- package/skills/project-init/templates/constitution.md +2 -2
- package/skills/project-update/history/blobs/00f5e27ce2d66e3a1d8b222b013ae8fa1fed32612d91a551e0c661cee3ef9c2d +34 -0
- package/skills/project-update/history/blobs/0a6b1b6dd06a35582b2e9989a1f41c40abc29254b8e482714fcc6f0a7b16c406 +32 -0
- package/skills/project-update/history/blobs/0aeb04b04262683cac6513545683486a73dc473b447bba43b5aaab18403957a6 +34 -0
- package/skills/project-update/history/blobs/0ce913a28996f546f72d570b0e5a376362e993ce4d805bc4aae57d38caa44212 +41 -0
- package/skills/project-update/history/blobs/0ea9e36446b624b73b2a821231b2ee66a357b43d584a5b23da48b3c800855e65 +41 -0
- package/skills/project-update/history/blobs/0fb1d68678a1349195b2e79433bb20174d25874e3bfd0b70410bb4e428b4e4b8 +35 -0
- package/skills/project-update/history/blobs/119b2b9d0f9c647a243540724edac6b29afa020c69aa205797bcfa9eb06bc021 +35 -0
- package/skills/project-update/history/blobs/1d0fe3ee5fb8260ba610942d4bbdfff7410fbe80ed826ac07f32985031dc2b3f +34 -0
- package/skills/project-update/history/blobs/1de9a37ed6402893dcab6e61ddbf15ffd35f15a6d84b18e675a0c5bf4e981f85 +42 -0
- package/skills/project-update/history/blobs/1f44e1a236233dcbab58064f39b69f798b35d1d9a29f8c615b5b12854ce633cb +15 -0
- package/skills/project-update/history/blobs/1f824645299579cbdd8141642ddbb4bca9fd5fe9d3112f036d8221f0811e0abf +40 -0
- package/skills/project-update/history/blobs/235fb88393cfe20dd58b35fe9785cc45baf5ffe21a13d926652d76ec68cea8b7 +35 -0
- package/skills/project-update/history/blobs/3918b4ee011d9477b9d2779e2893ab599749c406d4b09439a9748b64fbff58f3 +18 -0
- package/skills/project-update/history/blobs/449273200dfec2a56885c881ff34d40e8ecc00da53c24c2d09b7fbeb1004d255 +40 -0
- package/skills/project-update/history/blobs/4c45aee9b9fc5f6b4e1d9739e434c4094975a5a8dec6b9703fb25f3080680c77 +124 -0
- package/skills/project-update/history/blobs/4dd3fa12bc45acc8c836ab65d790248ca7504a021bca6677499d17bb3d798ed9 +64 -0
- package/skills/project-update/history/blobs/51e3f15095d7123ea8566b512479ee10a6cb2f336b7352a259a083a887bd7116 +33 -0
- package/skills/project-update/history/blobs/5497a204967bea7dab29079a6e1dfa3d8713b2d2cb294c2779378039f03a55fc +36 -0
- package/skills/project-update/history/blobs/60c4d7e7fde7049d92d84295fc13ca9a91eb2de423be08f093b3ee5d5e817ff8 +64 -0
- package/skills/project-update/history/blobs/6221b7c14cc04634e485e562d464c6860d45666a7f63e293c06bb2944ff556cc +27 -0
- package/skills/project-update/history/blobs/637971cfb844ef4285e2886a4b1c834fb2ed5c46e773adb88c2c147fea626ad3 +33 -0
- package/skills/project-update/history/blobs/65af2282eea2a51fcc27a4acf2c26c727b0961c30e1be13176369200c460c219 +34 -0
- package/skills/project-update/history/blobs/66ecd73e303e7bbc1aa8ee72435d0d10812ff7b2eff0adac59bbf0a303e2cc01 +41 -0
- package/skills/project-update/history/blobs/6a43bf32461b22b87fafe2865529dc04fa66cd00182a2a7598aa071667ca255a +35 -0
- package/skills/project-update/history/blobs/6d6dee8634abf9ac057bb206828b83a893a2afcf4f86bbe69e839a3b47d0adde +48 -0
- package/skills/project-update/history/blobs/7224ede803ea81e65a456e21b6028a0e848e8a880456c6503eebe7534ca4f6aa +74 -0
- package/skills/project-update/history/blobs/765a39a202617096c232017822ae738d37e4405430c71700dc7bc14bf1ba794e +33 -0
- package/skills/project-update/history/blobs/77577440a933d1cabd8c6f4a6401cf361a784aa09a25500a6f7b44ead8ab5e55 +41 -0
- package/skills/project-update/history/blobs/7bae90789625d6fb9071ecb412d14a8d1eb0bc5659d8d284c4eaf213e1b5de56 +67 -0
- package/skills/project-update/history/blobs/7bcdf9a0e6b85277b9b60669150224b9414d2e32821ff06f4d148eb1d18785bb +42 -0
- package/skills/project-update/history/blobs/7f834103e9d97aea44e76717bcdcbbe349c560e5b81a42ce85a1cec341041281 +4 -0
- package/skills/project-update/history/blobs/7fb3acb0211818efebc2234863db0b8c846022a7280a6d2d69f267dbf63db48c +34 -0
- package/skills/project-update/history/blobs/87f0855859ff68cc6c988cc0b631ee7f56af7fbba062172bf80e01f4982cc054 +35 -0
- package/skills/project-update/history/blobs/8abab74759766d02b5cb7b0c3e59a3d440b25a454216cd8fea325c23fd822d36 +33 -0
- package/skills/project-update/history/blobs/a1fb50e6c86fae1679ef3351296fd6713411a08cf8dd1790a4fd05fae8688164 +1 -0
- package/skills/project-update/history/blobs/a3df7268feb0780be0d2cf9acced6ed81780a7790f36fe024b6ea0b1bd6eb7a6 +35 -0
- package/skills/project-update/history/blobs/b28721136482dafb9fd2801af340364cb97e9f6eaa987908606c786045b8d334 +28 -0
- package/skills/project-update/history/blobs/b3726422d767f9219fea633bea77f0c99ad9af843c591e6e928e1ccd2a47f374 +27 -0
- package/skills/project-update/history/blobs/b3839425f9d0ab2efa42a6f5e9488ec2d26ca5fb8dcd694b8ab098e10743ca46 +32 -0
- package/skills/project-update/history/blobs/ba14a457e83f9dde65e4190fdfab83b912f7398c1442a2a1cb3d89bfac741cf3 +8 -0
- package/skills/project-update/history/blobs/bceb7189444bb6291b262ca08e34db01010dda2f6e64d696231ec3c343c95c66 +34 -0
- package/skills/project-update/history/blobs/bf82a2bb4fce1bd349ff66118930a01d61a7af8e2bd8d200c721d43afc58c713 +34 -0
- package/skills/project-update/history/blobs/c4dbeb180292a6199ad73a3be861ece07c1f8bf6bf0cc7ca204412bc8e1bb1d8 +31 -0
- package/skills/project-update/history/blobs/c644838866df2001a42501a988dd7b77aacf862bf09d22b465f3cd8a22c6b6eb +33 -0
- package/skills/project-update/history/blobs/c980d74f76a4bdfb38c94b573ac10a54eb50b850b052e15fa6f2442889b36ccb +32 -0
- package/skills/project-update/history/blobs/ceed2f3bd937f862d0e6ca59ce1b1e3603e19a0d7f85d90d6dfeb7bf690153be +29 -0
- package/skills/project-update/history/blobs/d51ea2e893482a20c5882056cf8043327ca1dc1c957927f6746929a47ee8368e +45 -0
- package/skills/project-update/history/blobs/d78f5e0bb1380259fce2cce009785a9a11f6de8b87a160080b9872c059f95060 +34 -0
- package/skills/project-update/history/blobs/d97f46a2cca020406252b1f7baa4184617fa71faca3885e2379c44ae4e1d9327 +67 -0
- package/skills/project-update/history/blobs/da3ecd4c4c414c93d04488685931df39a56bf959bfeb9c45cb1aea2c13bd991b +38 -0
- package/skills/project-update/history/blobs/e129bf71a5a922e24b2c1bc8daa8a5d2b5589b0069770e17ce17e7db5ed4e7a4 +27 -0
- package/skills/project-update/history/blobs/e504529519a371892838725f8b89b5d32e3300e345bcbf2643a3a1a48434b3dd +24 -0
- package/skills/project-update/history/blobs/e9e62d03ca70b3dffccef8dceeb214173352cfef005145e519f0e037993f1c03 +36 -0
- package/skills/project-update/history/blobs/effefbaaf4beb8f1ba55081d6b7e74bf25ebb91045dd10613418f17b95fa7182 +33 -0
- package/skills/project-update/history/blobs/f6af4581bafbf62b257d57e06c3ae2c5998aeca608ee7df037fcc3c3e4b563a9 +34 -0
- package/skills/project-update/history/blobs/fc35045777d29630303430752a651b3e553580a581036a02cc103eb96a46f4b0 +34 -0
- package/skills/project-update/history/blobs/fdc21345c77f92a42d244aa104f393f439a0ff9981a9fd462bd837e8a47931bb +48 -0
- package/skills/project-update/history/index.json +32 -13
- package/skills/project-update/render_instructions.py +12 -45
- package/skills/project-update/update.py +757 -1172
- package/skills/rr-setup/SKILL.md +42 -81
- package/skills/rr-setup/scaffold_ai.py +7 -7
- package/skills/rr-setup/setup.py +96 -164
- package/skills/rr-status/status.py +7 -10
- package/skills/usage-report/usage-report.py +4 -5
- package/skills/ai-audit/SKILL.md +0 -9
- package/skills/ai-init/SKILL.md +0 -9
- package/skills/ai-status/SKILL.md +0 -9
- package/skills/ai-task/SKILL.md +0 -9
- package/skills/project-init/SKILL.md +0 -9
- package/skills/project-update/SKILL.md +0 -9
- package/skills/project-update/adopt-map.json +0 -91
- package/skills/project-update/adopt.py +0 -2225
- package/skills/project-update/migrations/0001_schema_version.py +0 -13
- package/skills/project-update/migrations/0002_task_journal.py +0 -123
- package/skills/project-update/migrations/0003_context_diet.py +0 -65
- package/skills/project-update/migrations/0004_deterministic_gates.py +0 -57
- package/skills/project-update/migrations/0005_runtimes_and_plans.py +0 -35
- package/skills/project-update/migrations/0006_shared_files.py +0 -154
- package/skills/project-update/migrations/0007_weight_model.py +0 -295
- package/skills/project-update/migrations/0008_renames.py +0 -43
- package/skills/project-update/migrations/0009_state_file.py +0 -25
- package/skills/project-update/migrations/0010_dialog_switch.py +0 -30
- package/skills/project-update/migrations/0011_retire_risk_tiers.py +0 -37
- package/skills/project-update/migrations/README.md +0 -76
- package/skills/project-update/migrations/__init__.py +0 -186
- package/skills/sdlc-intent/SKILL.md +0 -9
- package/skills/sdlc-plan/SKILL.md +0 -9
- package/skills/sdlc-spec/SKILL.md +0 -9
- package/skills/usage-report/SKILL.md +0 -10
- /package/{ai/workflows/refactoring.md → skills/project-update/history/blobs/36cb593293496fbcf38df828a9b9b2bc0d5a53333f584a5319ebc3d799016e24} +0 -0
- /package/{ai/workflows/feature.md → skills/project-update/history/blobs/56e16072c2f3edc6c8897c690d09a11d12fc414c3e3f361f359f7dc609a21282} +0 -0
- /package/{ai/workflows/hotfix.md → skills/project-update/history/blobs/8cbefbf1aa412bae3e5019acd40b8fe0598fceba6c781906b3bc6dbd014f6b23} +0 -0
- /package/{ai/workflows/bugfix.md → skills/project-update/history/blobs/af56dc16e44ae1d8c3dac4c3ca82e2163b719553c02ea455e77430bab9a14089} +0 -0
- /package/{ai/workflows/investigation.md → skills/project-update/history/blobs/b9e09cb24958cd6831589997558974bd6356305306e8f9685e226bcdc30d60ac} +0 -0
- /package/{ai/agents/manager.md → skills/project-update/history/blobs/d0cf6388f35a92a0cf607d33909278382f6d7b6a4c32e281b9f9e0ea652c7b91} +0 -0
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"""Schema migrations for /project-update.
|
|
2
|
-
|
|
3
|
-
A project's schema is the integer in .ai/VERSION (missing = 0). Each migration is
|
|
4
|
-
one module NNNN_slug.py in this directory, numbered contiguously from 0001:
|
|
5
|
-
|
|
6
|
-
VERSION = 1 # equals the NNNN prefix
|
|
7
|
-
TITLE = "one line" # shown in the dry run
|
|
8
|
-
MOVES = [("src", "dst"), ...] # project-relative, static; the only moves plan() may make
|
|
9
|
-
def plan(ctx): ... # records operations on update.py's MigrationContext
|
|
10
|
-
|
|
11
|
-
update.py runs every migration with version < VERSION <= CURRENT before the
|
|
12
|
-
three-way merge. There is no down(): moves and deletions keep the original under
|
|
13
|
-
.ai/reports/project-update-<date>/original/.
|
|
14
|
-
|
|
15
|
-
RISKRAILS_MIGRATIONS (CLAUDE_AGENTIC_MIGRATIONS before 3.4b) points the registry
|
|
16
|
-
at another directory (tests).
|
|
17
|
-
"""
|
|
18
|
-
import importlib.util, os, posixpath, re, sys
|
|
19
|
-
|
|
20
|
-
DIR = os.environ.get("RISKRAILS_MIGRATIONS", os.environ.get("CLAUDE_AGENTIC_MIGRATIONS",
|
|
21
|
-
os.path.dirname(os.path.abspath(__file__))))
|
|
22
|
-
NAME_RE = re.compile(r"(\d{4})_[a-z0-9_]+\.py")
|
|
23
|
-
|
|
24
|
-
# Templates the plugin stopped shipping under a key that no MOVES pair can
|
|
25
|
-
# describe: {old history key: the key that replaces it, or None when nothing
|
|
26
|
-
# does}. A project-init key is the template's file name, so renaming the file
|
|
27
|
-
# (sdlc-README.md -> sdlc-index.md) changes the key without moving any project
|
|
28
|
-
# path; the block, minimal and gitignore templates have no project path at all.
|
|
29
|
-
# A successor key here joins the rename chain, so an edited file still merges
|
|
30
|
-
# against the version it was installed from. None means the template is simply
|
|
31
|
-
# gone: the key is not an orphan, and there is nothing to merge against.
|
|
32
|
-
RETIRED = {
|
|
33
|
-
# Migration 0011: weight.json replaced the tier policy; the project's copies
|
|
34
|
-
# are proposed for deletion and the plugin no longer ships either file.
|
|
35
|
-
"ai-init/.ai/policies/risk-tiers.json": None,
|
|
36
|
-
"ai-init/.ai/policies/risk-tiers.md": None,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class SchemaError(Exception):
|
|
41
|
-
pass
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def _files():
|
|
45
|
-
try:
|
|
46
|
-
names = sorted(os.listdir(DIR))
|
|
47
|
-
except OSError as exc:
|
|
48
|
-
raise SchemaError("migrations directory unreadable: %s" % exc) from exc
|
|
49
|
-
return [n for n in names if n.endswith(".py") and n != "__init__.py"]
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def path_error(path):
|
|
53
|
-
"""Why a MOVES path is unusable, or None. Paths are project-relative and
|
|
54
|
-
normalised, so template_key() and the plan's targets see one spelling."""
|
|
55
|
-
if not isinstance(path, str) or not path:
|
|
56
|
-
return "not a path"
|
|
57
|
-
if path in (".", "..") or path.startswith(("/", "../")) or path.endswith("/") \
|
|
58
|
-
or posixpath.normpath(path) != path:
|
|
59
|
-
return "not a normalised project-relative file path"
|
|
60
|
-
return None
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def _check(mod, name, num, vacated, destinations):
|
|
64
|
-
"""Validate one loaded module; vacated holds the MOVES sources of earlier
|
|
65
|
-
migrations and destinations their destinations."""
|
|
66
|
-
sources = set()
|
|
67
|
-
version = getattr(mod, "VERSION", None)
|
|
68
|
-
if type(version) is not int or version != num: # pylint: disable=unidiomatic-typecheck # True == 1
|
|
69
|
-
raise SchemaError("%s: VERSION is %r, the file name says %d" % (name, version, num))
|
|
70
|
-
title = getattr(mod, "TITLE", None)
|
|
71
|
-
if not isinstance(title, str) or not title.strip() or "\n" in title or "\r" in title:
|
|
72
|
-
raise SchemaError("%s: TITLE must be one non-empty line" % name)
|
|
73
|
-
moves = getattr(mod, "MOVES", None)
|
|
74
|
-
if not isinstance(moves, list):
|
|
75
|
-
raise SchemaError("%s: MOVES must be a list of (src, dst) path pairs" % name)
|
|
76
|
-
for pair in moves:
|
|
77
|
-
if not isinstance(pair, tuple) or len(pair) != 2:
|
|
78
|
-
raise SchemaError("%s: MOVES must be a list of (src, dst) path pairs" % name)
|
|
79
|
-
src, dst = pair
|
|
80
|
-
for path in (src, dst):
|
|
81
|
-
why = path_error(path)
|
|
82
|
-
if why:
|
|
83
|
-
raise SchemaError("%s: MOVES path %r is %s" % (name, path, why))
|
|
84
|
-
if src == dst:
|
|
85
|
-
raise SchemaError("%s: MOVES pair %r moves a file onto itself" % (name, src))
|
|
86
|
-
if src in vacated or src in sources:
|
|
87
|
-
raise SchemaError("%s: MOVES source %r was already moved away" % (name, src))
|
|
88
|
-
if dst in destinations:
|
|
89
|
-
raise SchemaError("%s: MOVES destination %r is already the destination of another move" % (name, dst))
|
|
90
|
-
sources.add(src)
|
|
91
|
-
destinations.add(dst)
|
|
92
|
-
# A path once moved away is never a destination again, in this migration or a
|
|
93
|
-
# later one: its history key would then name two templates, and rename chains
|
|
94
|
-
# could loop.
|
|
95
|
-
for src, dst in moves:
|
|
96
|
-
if dst in vacated or dst in sources:
|
|
97
|
-
raise SchemaError("%s: MOVES destination %r is a path that was moved away" % (name, dst))
|
|
98
|
-
if not callable(getattr(mod, "plan", None)):
|
|
99
|
-
raise SchemaError("%s: no plan(ctx) function" % name)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
def _current():
|
|
103
|
-
nums = [int(m.group(1)) for m in map(NAME_RE.fullmatch, _files() if os.path.isdir(DIR) else []) if m]
|
|
104
|
-
return max(nums, default=0)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
CURRENT = _current()
|
|
108
|
-
_loaded = None
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def load():
|
|
112
|
-
"""Every migration module, oldest first. Raises SchemaError on a misnamed file,
|
|
113
|
-
a gap, a duplicate, a VERSION that differs from its prefix, a missing field,
|
|
114
|
-
or an unusable MOVES pair. Call it before trusting CURRENT, which is read from
|
|
115
|
-
the file names alone."""
|
|
116
|
-
global _loaded # pylint: disable=global-statement # loaded once per run
|
|
117
|
-
if _loaded is not None:
|
|
118
|
-
return _loaded
|
|
119
|
-
by_num = {}
|
|
120
|
-
for name in _files():
|
|
121
|
-
m = NAME_RE.fullmatch(name)
|
|
122
|
-
if not m:
|
|
123
|
-
raise SchemaError("%s: not a migration name (NNNN_slug.py)" % name)
|
|
124
|
-
num = int(m.group(1))
|
|
125
|
-
if num < 1:
|
|
126
|
-
raise SchemaError("%s: migrations are numbered from 0001" % name)
|
|
127
|
-
if num in by_num:
|
|
128
|
-
raise SchemaError("%s: duplicate migration %04d" % (name, num))
|
|
129
|
-
spec = importlib.util.spec_from_file_location("riskrails_migration_%04d" % num, os.path.join(DIR, name))
|
|
130
|
-
mod = importlib.util.module_from_spec(spec)
|
|
131
|
-
sys.modules[spec.name] = mod # dataclasses and pickle look the module up by name
|
|
132
|
-
try:
|
|
133
|
-
spec.loader.exec_module(mod)
|
|
134
|
-
except Exception as exc: # pylint: disable=broad-exception-caught # any import failure is a broken registry
|
|
135
|
-
del sys.modules[spec.name]
|
|
136
|
-
raise SchemaError("%s: cannot be loaded: %s: %s" % (name, type(exc).__name__, exc)) from exc
|
|
137
|
-
by_num[num] = (name, mod)
|
|
138
|
-
nums = sorted(by_num)
|
|
139
|
-
if nums != list(range(1, len(nums) + 1)):
|
|
140
|
-
missing = sorted(set(range(1, max(nums) + 1)) - set(nums))
|
|
141
|
-
raise SchemaError("migrations are not contiguous from 0001: missing %s" % ", ".join("%04d" % n for n in missing))
|
|
142
|
-
vacated, destinations = set(), set()
|
|
143
|
-
for n in nums: # in order, so "moved away earlier" means earlier
|
|
144
|
-
name, mod = by_num[n]
|
|
145
|
-
_check(mod, name, n, vacated, destinations)
|
|
146
|
-
vacated.update(src for src, _ in mod.MOVES)
|
|
147
|
-
_loaded = [by_num[n][1] for n in nums]
|
|
148
|
-
return _loaded
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
def template_key(target, mapped=None):
|
|
152
|
-
"""The history key of the template shipped at a project path, or None.
|
|
153
|
-
mapped: {project target: "project-init/<template>"} for templates that land
|
|
154
|
-
outside .ai/. The caller builds it from update.py's PROJECT_INIT_MAP and the
|
|
155
|
-
RUNTIME_MAP entries of every runtime, not only the project's, so a rename
|
|
156
|
-
resolves the same way for Claude, Codex and dual-runtime projects."""
|
|
157
|
-
if target.startswith(".ai/"):
|
|
158
|
-
return "ai-init/" + target
|
|
159
|
-
return (mapped or {}).get(target)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
def renames(mapped=None):
|
|
163
|
-
"""{new history key: [old history keys, oldest migration first]} from every
|
|
164
|
-
migration's MOVES, plus the successors named in RETIRED. A move between paths
|
|
165
|
-
without history adds nothing. Chains (A -> B, then B -> C) appear hop by hop.
|
|
166
|
-
load() rules out cycles between paths; two paths can share a history key (the
|
|
167
|
-
per-runtime memory README), so a cycle between keys is refused here too, and
|
|
168
|
-
the map is always acyclic."""
|
|
169
|
-
out = {}
|
|
170
|
-
for old, new in RETIRED.items():
|
|
171
|
-
if new:
|
|
172
|
-
out.setdefault(new, []).append(old)
|
|
173
|
-
for mod in load():
|
|
174
|
-
for src, dst in mod.MOVES:
|
|
175
|
-
old, new = template_key(src, mapped), template_key(dst, mapped)
|
|
176
|
-
if old and new and old != new and old not in out.setdefault(new, []):
|
|
177
|
-
out[new].append(old)
|
|
178
|
-
|
|
179
|
-
def walk(key, seen):
|
|
180
|
-
for old in out.get(key, []):
|
|
181
|
-
if old in seen:
|
|
182
|
-
raise SchemaError("MOVES make the history of %s a cycle through %s" % (key, old))
|
|
183
|
-
walk(old, seen | {old})
|
|
184
|
-
for key in out:
|
|
185
|
-
walk(key, {key})
|
|
186
|
-
return out
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdlc-intent
|
|
3
|
-
description: Deprecated alias of /rr-spec — the intent, now part of the spec.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
deprecated → /rr-spec
|
|
7
|
-
|
|
8
|
-
Read `skills/rr-spec/SKILL.md` in the install root this skill was loaded from
|
|
9
|
-
(`~/.claude` or `~/.codex`) and follow it with these arguments: $ARGUMENTS
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdlc-plan
|
|
3
|
-
description: Deprecated alias of /rr-plan — plan the work.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
deprecated → /rr-plan
|
|
7
|
-
|
|
8
|
-
Read `skills/rr-plan/SKILL.md` in the install root this skill was loaded from
|
|
9
|
-
(`~/.claude` or `~/.codex`) and follow it with these arguments: $ARGUMENTS
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdlc-spec
|
|
3
|
-
description: Deprecated alias of /rr-spec — write the spec.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
deprecated → /rr-spec
|
|
7
|
-
|
|
8
|
-
Read `skills/rr-spec/SKILL.md` in the install root this skill was loaded from
|
|
9
|
-
(`~/.claude` or `~/.codex`) and follow it with these arguments: $ARGUMENTS
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: usage-report
|
|
3
|
-
description: Deprecated alias of /rr-status --cost — token usage and cost.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
deprecated → /rr-status --cost
|
|
7
|
-
|
|
8
|
-
Read `skills/rr-status/SKILL.md` in the install root this skill was loaded from
|
|
9
|
-
(`~/.claude` or `~/.codex`) and follow its `--cost` section with these
|
|
10
|
-
arguments: $ARGUMENTS
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|