riskrails 4.1.0 → 4.2.0
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 +11 -11
- package/hooks/AGENTS.md +0 -6
- package/hooks/CLAUDE.md +0 -6
- package/hooks/guard/paths.py +48 -1406
- package/hooks/guard/paths_base.py +59 -0
- package/hooks/guard/paths_bash.py +176 -0
- package/hooks/guard/paths_classify.py +205 -0
- package/hooks/guard/paths_fs.py +137 -0
- package/hooks/guard/paths_human.py +105 -0
- package/hooks/guard/paths_interp.py +162 -0
- package/hooks/guard/paths_movers.py +393 -0
- package/hooks/guard/paths_shell.py +288 -0
- package/package.json +1 -1
- package/skills/AGENTS.md +0 -6
- package/skills/CLAUDE.md +0 -6
- package/skills/ai-init/templates/gitignore.snippet +2 -0
- package/skills/ai-task/memory_cleanup.py +213 -0
- package/skills/ai-task/memory_compact.py +25 -0
- package/skills/ai-task/memory_config.py +120 -0
- package/skills/ai-task/memory_export.py +246 -0
- package/skills/ai-task/memory_format.py +7 -3
- package/skills/ai-task/memory_hook.py +172 -0
- package/skills/ai-task/memory_io.py +122 -0
- package/skills/ai-task/memory_migrate.py +187 -0
- package/skills/ai-task/memory_packages.py +83 -0
- package/skills/ai-task/memory_risks.py +84 -0
- package/skills/ai-task/memory_status.py +76 -0
- package/skills/ai-task/memory_sync.py +20 -1481
- package/skills/ai-task/memory_verify.py +316 -0
- package/skills/ai-task/rr_state/cli.py +1 -0
- package/skills/ai-task/rr_state/close.py +2 -2
- package/skills/ai-task/rr_state/memory_cmd.py +84 -64
- package/skills/project-update/history/blobs/fa0cb370b024e1a30e1355912032657b08f609e47773a603c193b1e609b0f997 +8 -0
- package/skills/project-update/history/index.json +2 -1
- package/skills/project-update/rr_update/__init__.py +1 -0
- package/skills/project-update/rr_update/apply.py +188 -0
- package/skills/project-update/rr_update/blocks.py +38 -0
- package/skills/project-update/rr_update/build.py +96 -0
- package/skills/project-update/rr_update/cleanup.py +194 -0
- package/skills/project-update/rr_update/cli.py +102 -0
- package/skills/project-update/rr_update/files.py +106 -0
- package/skills/project-update/rr_update/gate.py +60 -0
- package/skills/project-update/rr_update/hints.py +128 -0
- package/skills/project-update/rr_update/history.py +117 -0
- package/skills/project-update/rr_update/kept.py +120 -0
- package/skills/project-update/rr_update/paths.py +108 -0
- package/skills/project-update/rr_update/plan.py +123 -0
- package/skills/project-update/rr_update/report.py +51 -0
- package/skills/project-update/rr_update/rules.py +178 -0
- package/skills/project-update/rr_update/shared.py +74 -0
- package/skills/project-update/rr_update/siblings.py +37 -0
- package/skills/project-update/rr_update/weights.py +171 -0
- package/skills/project-update/update.py +8 -1682
- package/skills/rr-setup/SKILL.md +4 -2
- package/skills/rr-setup/setup.py +13 -12
package/skills/rr-setup/SKILL.md
CHANGED
|
@@ -164,7 +164,9 @@ formatting fix. Problems you find are written down, never fixed. Never read
|
|
|
164
164
|
line as printed (the `enabledPlugins` line is the human's to add — never
|
|
165
165
|
write it), and the suggested first task:
|
|
166
166
|
`/rr-plan <it>`. Claim nothing was validated that was not run. Suggest
|
|
167
|
-
`git add .ai .gitignore docs/sdlc` plus the instruction files created
|
|
167
|
+
`git add .ai .gitignore docs/sdlc` plus the instruction files created
|
|
168
|
+
(`.ai/memory/` and `.ai/reports/` are git-ignored; memory stays local unless the human runs
|
|
169
|
+
`memory enable --share git`).
|
|
168
170
|
|
|
169
171
|
## --options
|
|
170
172
|
|
|
@@ -243,7 +245,7 @@ riskrails is installed: until then the project's old shapes are not read.
|
|
|
243
245
|
second machine runs the same before its next pull, else a modify/delete
|
|
244
246
|
conflict); never run it yourself.
|
|
245
247
|
7. `$UPDATE --check` and `git diff --stat`; say what changed, what you merged
|
|
246
|
-
and what is the human's. Suggest `git add -A .ai docs/sdlc .gitignore` plus
|
|
248
|
+
and what is the human's. Suggest `git add -A .ai docs/sdlc .gitignore` (the record and task logs are git-ignored) plus
|
|
247
249
|
the runtime directories and instruction files.
|
|
248
250
|
|
|
249
251
|
## --audit
|
package/skills/rr-setup/setup.py
CHANGED
|
@@ -440,7 +440,7 @@ def write(path, text):
|
|
|
440
440
|
|
|
441
441
|
def sibling(directory, name):
|
|
442
442
|
"""A module of this skill or of another, imported once its directory leads sys.path: `python3 -I` puts none
|
|
443
|
-
there, and the module's own imports are by name (
|
|
443
|
+
there, and the module's own imports are by name (memory_export reaches memory_compact that way). Skills are
|
|
444
444
|
installed independently, so a missing module is an ImportError for the caller to answer."""
|
|
445
445
|
if directory not in sys.path:
|
|
446
446
|
sys.path.insert(0, directory)
|
|
@@ -477,7 +477,7 @@ def dialog_on(root):
|
|
|
477
477
|
|
|
478
478
|
|
|
479
479
|
def author_source(cfg):
|
|
480
|
-
"""Where `cfg.author` comes from, in the order
|
|
480
|
+
"""Where `cfg.author` comes from, in the order memory_config.MemoryConfig.author tries them."""
|
|
481
481
|
if cfg.local.get("author"):
|
|
482
482
|
return "local config"
|
|
483
483
|
return next(("$" + name for name in ("USER", "USERNAME") if os.environ.get(name)), "default")
|
|
@@ -494,22 +494,23 @@ def fts5():
|
|
|
494
494
|
|
|
495
495
|
def memory_option(root, git):
|
|
496
496
|
"""Packages-mode project memory: set once memory.json exists, its mode being `current`. `author` is what
|
|
497
|
-
`memory enable` writes without --author (the local config, else $USER):
|
|
497
|
+
`memory enable` writes without --author (the local config, else $USER): memory_config's own answer, never git's."""
|
|
498
498
|
def unavailable(why):
|
|
499
499
|
return {"key": "memory", "state": "unavailable", "why": why}
|
|
500
500
|
if not git:
|
|
501
501
|
return unavailable("not a git work tree")
|
|
502
502
|
try:
|
|
503
|
-
|
|
503
|
+
memory_config = sibling(AI_TASK, "memory_config")
|
|
504
|
+
memory_io = sibling(AI_TASK, "memory_io")
|
|
504
505
|
except ImportError as exc:
|
|
505
506
|
return unavailable("the memory modules are not installed beside state.py (%s)" % exc)
|
|
506
507
|
try:
|
|
507
|
-
cfg =
|
|
508
|
-
except
|
|
508
|
+
cfg = memory_config.load_config(root)
|
|
509
|
+
except memory_io.MemoryError_ as exc:
|
|
509
510
|
return unavailable(str(exc))
|
|
510
511
|
return {"key": "memory", "state": "set" if cfg.present else "unset", "current": cfg.mode if cfg.present else None,
|
|
511
512
|
"author": cfg.author, "author_from": author_source(cfg),
|
|
512
|
-
"period": None if cfg.present else
|
|
513
|
+
"period": None if cfg.present else memory_config.DEFAULTS["period"], "fts5": fts5()}
|
|
513
514
|
|
|
514
515
|
|
|
515
516
|
def runtime_option(root):
|
|
@@ -602,17 +603,17 @@ def memory_decision(option, root, name):
|
|
|
602
603
|
if option["state"] == "set":
|
|
603
604
|
first = choice_option("Keep — %s mode" % option["current"], "keep")
|
|
604
605
|
question = ("Project memory for %s is in %s mode: off keeps closed tasks only in .ai/reports/. packages also writes "
|
|
605
|
-
"one compact
|
|
606
|
-
"%s. Keep it, or run memory enable?" % (name, option["current"], who))
|
|
606
|
+
"one compact file per developer per period under .ai/memory/; both stay local (git-ignored) unless you "
|
|
607
|
+
"run 'state.py memory enable --share git' in your own terminal. %s. Keep it, or run memory enable?" % (name, option["current"], who))
|
|
607
608
|
else:
|
|
608
609
|
first = choice_option("Off — keep files mode", "off")
|
|
609
610
|
question = ("Project memory for %s: off keeps closed tasks only in .ai/reports/. packages also writes one compact "
|
|
610
|
-
"
|
|
611
|
-
"Turn it on?" % (name, option["period"], who, option["period"]))
|
|
611
|
+
"file per developer per %s under .ai/memory/; both stay local (git-ignored) unless you run "
|
|
612
|
+
"'state.py memory enable --share git' in your own terminal. %s, period %s. Turn it on?" % (name, option["period"], who, option["period"]))
|
|
612
613
|
return decision("memory", question, [
|
|
613
614
|
first,
|
|
614
615
|
command_option(state_label(root, "memory", "enable", *period),
|
|
615
|
-
"packages;
|
|
616
|
+
"packages; local, git-ignored record under .ai/memory/"),
|
|
616
617
|
command_option(state_label(root, "memory", "enable", *period, "--index", "sqlite"),
|
|
617
618
|
"plus a local, git-ignored SQLite index; FTS5 %s — without it search scans: same results, slower"
|
|
618
619
|
% ("yes" if option["fts5"] else "no"))])
|