riskrails 3.0.0 → 3.1.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 +2 -2
- package/README.md +259 -812
- package/agents/ai-reviewer.md.tmpl +6 -4
- package/ai/policies/model-routing.md +7 -7
- package/ai/policies/production.md +3 -3
- package/ai/policies/release.md +2 -2
- package/ai/policies/review-economy.md +34 -32
- package/ai/using-riskrails.md +15 -0
- package/bin/claude-1m +15 -14
- package/bin/riskrails.js +113 -37
- package/codex/hooks.json +25 -2
- package/hooks/AGENTS.md +2 -2
- package/hooks/CLAUDE.md +2 -2
- package/hooks/ai-guard.py +29 -8
- package/hooks/ai-path-guard-defaults.json +3 -1
- package/hooks/codex-hooks.json +25 -2
- package/hooks/context-guard.py +252 -36
- package/hooks/dialog-gate.py +105 -0
- package/hooks/guard/common.py +7 -0
- package/hooks/guard/decision.py +123 -0
- package/hooks/guard/dialog.py +598 -0
- package/hooks/guard/git.py +49 -3
- package/hooks/guard/paths.py +89 -19
- package/hooks/hooks.json +37 -2
- package/hooks/memory-pre-push.py +28 -0
- package/hooks/project-scaffold.py +1 -5
- package/hooks/runtime-gate.py +65 -18
- package/hooks/update_notice.py +141 -0
- package/instructions/routing.md +4 -4
- package/instructions/stub.md +3 -3
- package/package.json +1 -1
- package/profiles/max.json +3 -1
- package/profiles/pro.json +3 -1
- package/scripts/merge-codex-config.py +134 -0
- package/scripts/resolve-profile.py +15 -3
- package/settings.common.json +39 -2
- package/skills/AGENTS.md +3 -3
- package/skills/CLAUDE.md +3 -3
- package/skills/ai-init/templates/.ai/AGENTS.md +3 -3
- package/skills/ai-init/templates/.ai/VERSION +1 -1
- package/skills/ai-init/templates/.ai/policies/dialog.json +1 -0
- package/skills/ai-init/templates/.ai/policies/safety.md +22 -2
- package/skills/ai-init/templates/.ai/policies/security.md +7 -1
- package/skills/ai-init/templates/.ai/policies/testing.md +19 -6
- package/skills/ai-init/templates/.ai/policies/weight.json +1 -0
- package/skills/ai-init/templates/.ai/policies/weight.md +2 -2
- package/skills/ai-init/templates/.ai/state/README.md +9 -6
- package/skills/ai-init/templates/AGENTS.block.md +2 -2
- package/skills/ai-init/templates/CLAUDE.block.md +2 -2
- package/skills/ai-init/templates/GEMINI.block.md +2 -2
- package/skills/ai-init/templates/gitignore.snippet +1 -0
- package/skills/ai-init/templates/junie-guidelines.block.md +2 -2
- package/skills/ai-task/memory_compact.py +968 -0
- package/skills/ai-task/memory_format.py +775 -0
- package/skills/ai-task/memory_store.py +528 -0
- package/skills/ai-task/memory_sync.py +1571 -0
- package/skills/ai-task/sensors.py +25 -5
- package/skills/ai-task/state.py +999 -79
- package/skills/ai-task/weight.py +3 -3
- package/skills/project-init/templates/constitution.md +1 -1
- package/skills/project-init/templates/sdlc-README.md +20 -14
- package/skills/project-update/history/blobs/00289f98434fed230eebe768dfb3425f83d737866a3aebc97aa95167c4fa0c6e +131 -0
- package/skills/project-update/history/blobs/079a91f976ad69b5cf49ccb9a28849576e4735ddd9485fc26599e528a69fd2f4 +30 -0
- package/skills/project-update/history/blobs/07ff7fa6f93d471ff533f553b4e523e4105ccde1f3dab70132c5237728f68422 +13 -0
- package/skills/project-update/history/blobs/0ef4a360c76da290173dea0f8073949cb0f8113710a38df95acae5d96bdd1286 +123 -0
- package/skills/project-update/history/blobs/164cd34c182de88c33de7df35beb29200d792419e1c13a5f0b2104f944e57be7 +1 -0
- package/skills/project-update/history/blobs/18c7a2753ce9cb6f6d3d1e9d5d1125d75950b879d56b7325225b200869631b29 +15 -0
- package/skills/project-update/history/blobs/1d1d907449ec74594d0ee923ac142ae746b9aedf0a1eda9469f075a44d23e3d7 +13 -0
- package/skills/project-update/history/blobs/23a42febbacaa7b52a802d428033a99c0694391c81d51fe3b6e1dff608a641d5 +67 -0
- package/skills/project-update/history/blobs/25d4f2a86deb5e2574bb3210b67bb24fcc4afb19f93a7b65a057daa874a9d18e +1 -0
- package/skills/project-update/history/blobs/48d9950f16e31d55475f566a80dc95f64b35f1c804d2f51729e313a4f29bac8d +13 -0
- package/skills/project-update/history/blobs/5353ca529c46f2443e12947ec205a6887fb594a4de1f87f0eb1c0e6c0f826133 +49 -0
- package/skills/project-update/history/blobs/5a93f78b4ed4d416c171139b2ce610a117f9c1dd46fbb56ca86729cb4c53d10c +6 -0
- package/skills/project-update/history/blobs/5f65bc7ab3fc3c4e75ae05d49eaf4331fafc398c661abe33c69f7380a720344c +32 -0
- package/skills/project-update/history/blobs/6a3be0e624e5ad91e44d08857b7183ee53b7903e1e8d56ff196dbc9dde271e4a +75 -0
- package/skills/project-update/history/blobs/7170553410bba904ffb7edb4b231e3b3579b85542d84de717299980938f82c9d +13 -0
- package/skills/project-update/history/blobs/774b1e3a04ef0d49d33c44a2cfecd92eb6f6b738a12b6a681103ba7fc13e7b86 +67 -0
- package/skills/project-update/history/blobs/7be527cd648b27cca6e267de30f8e33a2ce17d5631a82694f23ae5c0623efe1f +15 -0
- package/skills/project-update/history/blobs/7ee99edafe7cec45ff577376c0d0178fdb2690134d4656488f46e129aba3cc5a +67 -0
- package/skills/project-update/history/blobs/7f063e79195a5c85c37b7260dd20c184d3b9bea85e37202e0bbca73ad84bba49 +13 -0
- package/skills/project-update/history/blobs/8b3ef9586491a426767c01da5d01bdd6b0655c576c68c4cc6dfb093367817dc0 +67 -0
- package/skills/project-update/history/blobs/917df3320d778ddbaa5c5c7742bc4046bf803c36ed2b050f30844ed206783469 +1 -0
- package/skills/project-update/history/blobs/935af1019931058ec3a0b834fe230e127ec914f75edcc4a6c589cfe733b0b979 +13 -0
- package/skills/project-update/history/blobs/ae5ce131d6bae401199ff32d8c3dc4d8aec188010a9111624ac64506e2116ff4 +84 -0
- package/skills/project-update/history/blobs/c8573ca1f810ce6c4ac49456a4c1725b93e0d3b74c54ce95d46d8747777895f0 +13 -0
- package/skills/project-update/history/blobs/ca4499d829268c8766fb3b825a515e88dc55c237e9d202816b50959b4dac031f +13 -0
- package/skills/project-update/history/blobs/d6e5b34d475e7187d2a8cb2aac7e7f1a427142baf6461bda387d70ceb4d8a8c1 +30 -0
- package/skills/project-update/history/blobs/e120ff4e32b2e950fc94ada4e787d57dc9c790da37223e5a202d74f7e3aadf80 +13 -0
- package/skills/project-update/history/blobs/e9adb7a9905eb719ac78ab96671f055da53e5001810f5ad6d6c94306b0323fe7 +74 -0
- package/skills/project-update/history/blobs/fae3064e648cdc55be4aeb1177525b302a5e34ebd752e4a904f47dc0f4557b96 +71 -0
- package/skills/project-update/history/index.json +60 -20
- package/skills/project-update/migrations/0009_state_file.py +25 -0
- package/skills/project-update/migrations/0010_dialog_switch.py +30 -0
- package/skills/project-update/migrations/0011_retire_risk_tiers.py +37 -0
- package/skills/project-update/migrations/README.md +2 -1
- package/skills/project-update/migrations/__init__.py +6 -1
- package/skills/project-update/render_instructions.py +1 -1
- package/skills/project-update/update.py +385 -89
- package/skills/rr-build/SKILL.md +14 -5
- package/skills/rr-build-all/SKILL.md +190 -0
- package/skills/rr-plan/SKILL.md +16 -4
- package/skills/rr-review/SKILL.md +24 -9
- package/skills/rr-setup/SKILL.md +15 -2
- package/skills/rr-setup/setup.py +7 -1
- package/skills/rr-ship/SKILL.md +16 -8
- package/skills/rr-spec/SKILL.md +4 -2
- package/skills/rr-status/SKILL.md +2 -2
- package/skills/usage-report/usage-report.py +45 -10
- package/skills/ai-init/templates/.ai/policies/risk-tiers.json +0 -628
- package/skills/ai-init/templates/.ai/policies/risk-tiers.md +0 -180
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Safety policy
|
|
2
|
+
|
|
3
|
+
This is the file every agent reads first. It is short on purpose. It binds every
|
|
4
|
+
agent in every runtime — Claude Code and Codex alike.
|
|
5
|
+
|
|
6
|
+
## The one rule
|
|
7
|
+
|
|
8
|
+
**Production behaviour is the source of truth until proven otherwise.** Code that
|
|
9
|
+
looks wrong, dead, or badly written may be load-bearing. The repository's history
|
|
10
|
+
is evidence; your intuition about how the code "should" look is not.
|
|
11
|
+
|
|
12
|
+
## What an agent must never do
|
|
13
|
+
|
|
14
|
+
- Change application code that the current task did not ask about.
|
|
15
|
+
- Rename, move, reorganise or "clean up" anything as a side effect.
|
|
16
|
+
- Remove code because it looks unused. Find the callers first; if there are none,
|
|
17
|
+
say so in the report and leave the code alone.
|
|
18
|
+
- Combine a refactoring with a feature change in the same step.
|
|
19
|
+
- Modify database schemas, dependencies or framework versions outside a task that
|
|
20
|
+
is explicitly about that.
|
|
21
|
+
- Weaken a test, a linter rule or a static-analysis level to make a check pass.
|
|
22
|
+
- Commit, push, merge or deploy on its own initiative.
|
|
23
|
+
- Read production secrets or customer data into the model context.
|
|
24
|
+
|
|
25
|
+
If you find a problem outside the current task: **write it down, do not fix it.**
|
|
26
|
+
Unrelated findings are recorded with `state.py memory risk add` (in files mode it
|
|
27
|
+
writes `.ai/project/known-risks.md`) or go into the report's "observations"
|
|
28
|
+
section, and the human decides whether they become their own task.
|
|
29
|
+
|
|
30
|
+
The compact record is the human's to switch: `state.py memory enable`, `disable`,
|
|
31
|
+
`cleanup`, `pack`, `redact` and `migrate --move-logs` take the human route, as
|
|
32
|
+
`approve` does, and `.ai/memory/` and `.ai/local/memory/` are written by
|
|
33
|
+
`state.py` alone — an agent never edits them (`state.py memory --help`; the
|
|
34
|
+
plugin's `docs/local-memory.md`).
|
|
35
|
+
|
|
36
|
+
## Scope
|
|
37
|
+
|
|
38
|
+
Every implementation step names the files it may touch. Editing anything else is
|
|
39
|
+
refused by `ai-scope-guard` and must be answered with `SCOPE_CHANGE_REQUIRED`:
|
|
40
|
+
stop, say which file you need and why, and let the plan be amended. A step whose
|
|
41
|
+
scope keeps growing is a step that was planned wrong.
|
|
42
|
+
|
|
43
|
+
`ai-git-guard`, `ai-path-guard` and `ai-scope-guard` all run in both runtimes. A
|
|
44
|
+
multi-file edit in one call — Codex's `apply_patch` — is checked path by path, so
|
|
45
|
+
a single out-of-scope or protected file rejects the whole patch. What a guard
|
|
46
|
+
refuses is not a hint: do not reword the command to get past it.
|
|
47
|
+
|
|
48
|
+
A guard is a backstop, not the policy. Some checks exist in only one runtime —
|
|
49
|
+
Codex has no hookable read tool, so the large-read cap is Claude-only there — and
|
|
50
|
+
an agent that behaves correctly only because a hook is watching is not behaving
|
|
51
|
+
correctly. The rules above hold whether or not a hook enforces them.
|
|
52
|
+
|
|
53
|
+
## Evidence labels
|
|
54
|
+
|
|
55
|
+
Anything an agent writes into `.ai/project/` carries one of four labels:
|
|
56
|
+
|
|
57
|
+
- **KNOWN FACT** — read from the code, a config file, a migration or a test.
|
|
58
|
+
Cite `file:line`.
|
|
59
|
+
- **INFERENCE** — a conclusion drawn from facts. Say what it is drawn from.
|
|
60
|
+
- **UNKNOWN** — something that matters and could not be determined. Say what
|
|
61
|
+
would answer it.
|
|
62
|
+
- **RISK** — something that looks dangerous. Say what could go wrong.
|
|
63
|
+
|
|
64
|
+
Never present an inference as a fact. When documentation and code disagree,
|
|
65
|
+
record both under "Documented behaviour" and "Observed behaviour", with the
|
|
66
|
+
evidence for each, and let the human decide which is the bug.
|
|
67
|
+
|
|
68
|
+
## When in doubt
|
|
69
|
+
|
|
70
|
+
Stop and ask. An agent that pauses costs a message; an agent that guesses on a
|
|
71
|
+
payment path costs an incident.
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"31bb922076c8dadb4a84bb6a03d331dafc7157893aaf2f92b13792270fbece9b",
|
|
10
10
|
"a13cb0db5372c3ce3e71470165c17a2db76e7a2415717ba27fccd1b0593c61c4",
|
|
11
11
|
"54eefe3d8cd6cd1ed56764e7bd412a4c919a28fc64b56b69dcafeecd7a921678",
|
|
12
|
-
"fe513647c66e8883b326ea884a7e9cb045ce54c49b03d2e75a0b73c4756c423e"
|
|
12
|
+
"fe513647c66e8883b326ea884a7e9cb045ce54c49b03d2e75a0b73c4756c423e",
|
|
13
|
+
"8b3ef9586491a426767c01da5d01bdd6b0655c576c68c4cc6dfb093367817dc0",
|
|
14
|
+
"774b1e3a04ef0d49d33c44a2cfecd92eb6f6b738a12b6a681103ba7fc13e7b86"
|
|
13
15
|
],
|
|
14
16
|
"ai-init/.ai/VERSION": [
|
|
15
17
|
"4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865",
|
|
@@ -19,7 +21,9 @@
|
|
|
19
21
|
"f0b5c2c2211c8d67ed15e75e656c7862d086e9245420892a7de62cd9ec582a06",
|
|
20
22
|
"06e9d52c1720fca412803e3b07c4b228ff113e303f4c7ab94665319d832bbfb7",
|
|
21
23
|
"10159baf262b43a92d95db59dae1f72c645127301661e0a3ce4e38b295a97c58",
|
|
22
|
-
"aa67a169b0bba217aa0aa88a65346920c84c42447c36ba5f7ea65f422c1fe5d8"
|
|
24
|
+
"aa67a169b0bba217aa0aa88a65346920c84c42447c36ba5f7ea65f422c1fe5d8",
|
|
25
|
+
"917df3320d778ddbaa5c5c7742bc4046bf803c36ed2b050f30844ed206783469",
|
|
26
|
+
"25d4f2a86deb5e2574bb3210b67bb24fcc4afb19f93a7b65a057daa874a9d18e"
|
|
23
27
|
],
|
|
24
28
|
"ai-init/.ai/agents/context.md": [
|
|
25
29
|
"a213099429aff491b00e885c8d556465be2405072efbb9a3a297890a15a5b4ca",
|
|
@@ -87,6 +91,9 @@
|
|
|
87
91
|
"ai-init/.ai/policies/database.md": [
|
|
88
92
|
"894a37936b769203bbb880ff842cc0a04e62d53e01deb07af83179f6b1359cf4"
|
|
89
93
|
],
|
|
94
|
+
"ai-init/.ai/policies/dialog.json": [
|
|
95
|
+
"164cd34c182de88c33de7df35beb29200d792419e1c13a5f0b2104f944e57be7"
|
|
96
|
+
],
|
|
90
97
|
"ai-init/.ai/policies/git.md": [
|
|
91
98
|
"6bbcb8ea55726cdd49e0544725d224ac6d728cd1db757a269399342da92677ca"
|
|
92
99
|
],
|
|
@@ -102,24 +109,29 @@
|
|
|
102
109
|
"9a16ec8f5762032e4dc009974dfca5ed1dd0eae6d84391cbed872c83d7a4e75f",
|
|
103
110
|
"14f19a6745af0196f9be0ed8fe854e882bf90157b20b2bf680de909222f87138",
|
|
104
111
|
"a09b8d9154feeabaefced51d8b06b9cb794b3e41501c8b326771771b9a70a3ff",
|
|
105
|
-
"8b98d001f90f838f19fc7998792fc39a00e4264e594d557a338ef7393f5795e5"
|
|
112
|
+
"8b98d001f90f838f19fc7998792fc39a00e4264e594d557a338ef7393f5795e5",
|
|
113
|
+
"286187dbf77173f86c91d8a1ba8e8de68b7723d684aa47b4cb86feb507a3c7c1"
|
|
106
114
|
],
|
|
107
115
|
"ai-init/.ai/policies/path-guard.json": [
|
|
108
116
|
"099f3debfe1ce808502661de4a31c3a349f149f5fe7246691d41a4966179a63c"
|
|
109
117
|
],
|
|
110
118
|
"ai-init/.ai/policies/production.md": [
|
|
111
|
-
"13340bdd5d85314a2f7a9bac1776951178f9840cb8b75479d762a8082ab45d3a"
|
|
119
|
+
"13340bdd5d85314a2f7a9bac1776951178f9840cb8b75479d762a8082ab45d3a",
|
|
120
|
+
"a48fe8ac621456fc41362559f6caf3296bfa0bf7752dd8f287354a3b5d8c4a65"
|
|
112
121
|
],
|
|
113
122
|
"ai-init/.ai/policies/release.md": [
|
|
114
123
|
"7afd6c68d910439c19c1c190868be7596f487d30f867a1593d2084da6feea3bf",
|
|
115
|
-
"f6e7e18b3d6ad24bd87897d3a535020285cb98e7b8f41cfb2eb88f5a9d68a6fd"
|
|
124
|
+
"f6e7e18b3d6ad24bd87897d3a535020285cb98e7b8f41cfb2eb88f5a9d68a6fd",
|
|
125
|
+
"9909aed673a3135238dccb7e218f4a8ffc1fb98324686d3f73cfb604a7ce74c0"
|
|
116
126
|
],
|
|
117
127
|
"ai-init/.ai/policies/review-economy.md": [
|
|
118
128
|
"38b7363f9cd84c3bd0a82e48aa6dd19f9911fd212a08a5a8084706e45295be89",
|
|
119
129
|
"9984ac1e1b1edb7217df58e256002ae09913fdc598da6f7773f1c01e5a3e55e2",
|
|
120
130
|
"c392fd585241389355958099a95bd85358a80d9a10310301a430219f83c8962e",
|
|
121
131
|
"edecd502e22395300781a3c653b56c3587b1b894ce4b96f60e19c601a5cdae46",
|
|
122
|
-
"91e924527f51c8c36fa1156a8f30af4c07adab2d324b8c5a879145a1641c413a"
|
|
132
|
+
"91e924527f51c8c36fa1156a8f30af4c07adab2d324b8c5a879145a1641c413a",
|
|
133
|
+
"6a3f34706c31fc91fdace8ea8729bd7a74065f983032204f5aad3ec80cf13ce0",
|
|
134
|
+
"e1d3ac77700faee38d7f9ddd34679b8917418cffc5caf5f3e0ff66fe71890cf8"
|
|
123
135
|
],
|
|
124
136
|
"ai-init/.ai/policies/risk-tiers.json": [
|
|
125
137
|
"01c32f8ff038787e49070b8b0eb160eb4b4704a020b050678292051fc73a4fc6",
|
|
@@ -154,14 +166,18 @@
|
|
|
154
166
|
],
|
|
155
167
|
"ai-init/.ai/policies/safety.md": [
|
|
156
168
|
"0f00cbb216a20c7f67749ffb88835bcaaa29cc1a4c15d468edb3c6039bd291d3",
|
|
157
|
-
"ae9a22907ba9acbb7e80fac1ba4e3d1ff09e5f1df5c4456afb9099d7090fcaa6"
|
|
169
|
+
"ae9a22907ba9acbb7e80fac1ba4e3d1ff09e5f1df5c4456afb9099d7090fcaa6",
|
|
170
|
+
"fae3064e648cdc55be4aeb1177525b302a5e34ebd752e4a904f47dc0f4557b96",
|
|
171
|
+
"e9adb7a9905eb719ac78ab96671f055da53e5001810f5ad6d6c94306b0323fe7",
|
|
172
|
+
"ae5ce131d6bae401199ff32d8c3dc4d8aec188010a9111624ac64506e2116ff4"
|
|
158
173
|
],
|
|
159
174
|
"ai-init/.ai/policies/security.md": [
|
|
160
175
|
"cc808d5b940109f1703abfb3ca0334a3fcfd34267feefb2323627d0decc8b89a",
|
|
161
176
|
"40ac73f706ba7d2578627f420076cdb9fa6aa146e16d0da6c6a5c63f65c2b03c",
|
|
162
177
|
"4e67b352e2d7a29a83c4fa9f80a0d3ed9272da0f976a084c344b55e349f741b2",
|
|
163
178
|
"1fdc406be22d9ea39f41e738c6bbd36a31ef4adc84ece06cfceebddaa86c9798",
|
|
164
|
-
"1a8995e5f7e51b5be74fca82551e5d9e4d970c546d9fd6eecb6809a7f6af8821"
|
|
179
|
+
"1a8995e5f7e51b5be74fca82551e5d9e4d970c546d9fd6eecb6809a7f6af8821",
|
|
180
|
+
"6a3be0e624e5ad91e44d08857b7183ee53b7903e1e8d56ff196dbc9dde271e4a"
|
|
165
181
|
],
|
|
166
182
|
"ai-init/.ai/policies/testing.md": [
|
|
167
183
|
"930ccfac4ba1306341e32279278410b451246a52223c42e0597b5ee83706ff00",
|
|
@@ -169,16 +185,20 @@
|
|
|
169
185
|
"cb8b8328efd818835822dc60537e3ecdb648d4ca04e21a7c47c88bf1198a5474",
|
|
170
186
|
"dd174b27e5b3a2414d0605484f4e92423e2553931263f05ef15677b4aa389bab",
|
|
171
187
|
"3a492555cac3198136e239539466fb768cf672d5a972f5afd7d57c038d3cfed6",
|
|
172
|
-
"8ad13d2ca4504cfd8e4ab7fe3a49129b228d9979461f0f758a71daeec78b6ae1"
|
|
188
|
+
"8ad13d2ca4504cfd8e4ab7fe3a49129b228d9979461f0f758a71daeec78b6ae1",
|
|
189
|
+
"0ef4a360c76da290173dea0f8073949cb0f8113710a38df95acae5d96bdd1286",
|
|
190
|
+
"00289f98434fed230eebe768dfb3425f83d737866a3aebc97aa95167c4fa0c6e"
|
|
173
191
|
],
|
|
174
192
|
"ai-init/.ai/policies/tooling.md": [
|
|
175
193
|
"2c6afb3518714d35eaf0119bf2ae2154782bbece632dfdbd68988351abde61f5"
|
|
176
194
|
],
|
|
177
195
|
"ai-init/.ai/policies/weight.json": [
|
|
178
|
-
"7f3859c34035fe32abf937eebdd7240ac72ab32d254286cff7d939cf0cf6eaef"
|
|
196
|
+
"7f3859c34035fe32abf937eebdd7240ac72ab32d254286cff7d939cf0cf6eaef",
|
|
197
|
+
"5353ca529c46f2443e12947ec205a6887fb594a4de1f87f0eb1c0e6c0f826133"
|
|
179
198
|
],
|
|
180
199
|
"ai-init/.ai/policies/weight.md": [
|
|
181
|
-
"e639e99d3f59015dc21472de081ca7766231135399ac3a6f439e841e458251f4"
|
|
200
|
+
"e639e99d3f59015dc21472de081ca7766231135399ac3a6f439e841e458251f4",
|
|
201
|
+
"5f65bc7ab3fc3c4e75ae05d49eaf4331fafc398c661abe33c69f7380a720344c"
|
|
182
202
|
],
|
|
183
203
|
"ai-init/.ai/project/architecture.md": [
|
|
184
204
|
"5cbaaabe2c8d0e24582877aab05eeaaf4d53cb5e9515e81cd18368d13d2fe79e"
|
|
@@ -222,7 +242,9 @@
|
|
|
222
242
|
"962fd396da83337c3fadcc642d45e98429b18e79bb81f58915baaf2b9bffd3c5",
|
|
223
243
|
"d7b96902bf9d2078df1e09901327b02f565b174777af34a2b24be660cad81d01",
|
|
224
244
|
"ad4c4f81855725f7fe6e0e3d8f557df0de5fc063465d428546f69c54020c69d9",
|
|
225
|
-
"19b1a6390e96136619d23bc2ef9afed8f15e62107de7c1052bc5ea23e5bb5692"
|
|
245
|
+
"19b1a6390e96136619d23bc2ef9afed8f15e62107de7c1052bc5ea23e5bb5692",
|
|
246
|
+
"23a42febbacaa7b52a802d428033a99c0694391c81d51fe3b6e1dff608a641d5",
|
|
247
|
+
"7ee99edafe7cec45ff577376c0d0178fdb2690134d4656488f46e129aba3cc5a"
|
|
226
248
|
],
|
|
227
249
|
"ai-init/.ai/templates/architecture-decision.md": [
|
|
228
250
|
"78619b522826ba8f5f0422e9deb7359c8002553d1aeb29a3719da5ab11ff13a1"
|
|
@@ -246,7 +268,8 @@
|
|
|
246
268
|
"515df0eab178b5f53b50f95bec2671e861efef35b487a6e65d80e80de42c4d0d"
|
|
247
269
|
],
|
|
248
270
|
"ai-init/.ai/using-riskrails.md": [
|
|
249
|
-
"03282999978b2bfb5f65135e1884f9447f8a71021a88895d5436d377797b9acb"
|
|
271
|
+
"03282999978b2bfb5f65135e1884f9447f8a71021a88895d5436d377797b9acb",
|
|
272
|
+
"25d08ff01a4ab2069b0dd4e5ec52e888d33e00091dc467dd10d63f10223b6f80"
|
|
250
273
|
],
|
|
251
274
|
"ai-init/.ai/workflows.md": [
|
|
252
275
|
"500d93714106b1c4e21b13f248f7175c86073a9bcb6e0a849845f61f49b5a66d"
|
|
@@ -310,7 +333,10 @@
|
|
|
310
333
|
"815d78ce95d18454cf0842335f81755bf3aceb87ee9d2197e121d3ff734cd2b5",
|
|
311
334
|
"de0685f9bc2ac22c1b0178d6a1fc8d07fa23451f29d0c36571cbf85c69716fc2",
|
|
312
335
|
"c735911eb1a744f78213a9f7577b425c1605843f6d05fed798d7f41b47fa1e0c",
|
|
313
|
-
"7eee4ea9f6e778ff691c263621e717c021505b86386034cc64f8ebbfc9d8fe65"
|
|
336
|
+
"7eee4ea9f6e778ff691c263621e717c021505b86386034cc64f8ebbfc9d8fe65",
|
|
337
|
+
"ca4499d829268c8766fb3b825a515e88dc55c237e9d202816b50959b4dac031f",
|
|
338
|
+
"7170553410bba904ffb7edb4b231e3b3579b85542d84de717299980938f82c9d",
|
|
339
|
+
"48d9950f16e31d55475f566a80dc95f64b35f1c804d2f51729e313a4f29bac8d"
|
|
314
340
|
],
|
|
315
341
|
"ai-init/AGENTS.minimal.md": [
|
|
316
342
|
"b7b697fc987617449ba10634f12f70326281cc182f8b7f20f9e047a75f3f182b",
|
|
@@ -324,7 +350,10 @@
|
|
|
324
350
|
"3775eed295a794dda73b14f88af70bc2c99b5590f81da53f165423e4337dceed",
|
|
325
351
|
"ee7c8321fff228d967c5d200c316967195d93a26196383f57f474e837b1b3d33",
|
|
326
352
|
"da848b831443484c831fa630666c004e07c1c9669dd247e8e4066979c8599080",
|
|
327
|
-
"c076d603cffc731823d2acf096bcc17cca1d99eee24b0aa313776d7d01571b4f"
|
|
353
|
+
"c076d603cffc731823d2acf096bcc17cca1d99eee24b0aa313776d7d01571b4f",
|
|
354
|
+
"1d1d907449ec74594d0ee923ac142ae746b9aedf0a1eda9469f075a44d23e3d7",
|
|
355
|
+
"07ff7fa6f93d471ff533f553b4e523e4105ccde1f3dab70132c5237728f68422",
|
|
356
|
+
"7f063e79195a5c85c37b7260dd20c184d3b9bea85e37202e0bbca73ad84bba49"
|
|
328
357
|
],
|
|
329
358
|
"ai-init/CLAUDE.minimal.md": [
|
|
330
359
|
"7578025c0ce0a64dd37fe4c999541db5681199763df8b373ed0bfba11e2f581e",
|
|
@@ -335,20 +364,27 @@
|
|
|
335
364
|
"e8df28f07cb784d768bcafbced70fd15771afa61dbec7dc4c1c3f858f9002fec",
|
|
336
365
|
"c9ddacab2a6943af94c927799ba314877c1f19d40949e927c2d3825689005288",
|
|
337
366
|
"4d1f9073276936834747199393159f1badc0277b5bb394f78f408d52c36c4e35",
|
|
338
|
-
"65acd4be95c695d0cc20cb5f4faffe0f44e0873b385c124140b223c41328cb56"
|
|
367
|
+
"65acd4be95c695d0cc20cb5f4faffe0f44e0873b385c124140b223c41328cb56",
|
|
368
|
+
"935af1019931058ec3a0b834fe230e127ec914f75edcc4a6c589cfe733b0b979",
|
|
369
|
+
"e120ff4e32b2e950fc94ada4e787d57dc9c790da37223e5a202d74f7e3aadf80",
|
|
370
|
+
"c8573ca1f810ce6c4ac49456a4c1725b93e0d3b74c54ce95d46d8747777895f0"
|
|
339
371
|
],
|
|
340
372
|
"ai-init/GEMINI.minimal.md": [
|
|
341
373
|
"933629cd5c872a11837046b13051a9b02bbc1033e3ba74f41966af2ed4edee5d"
|
|
342
374
|
],
|
|
343
375
|
"ai-init/gitignore.snippet": [
|
|
344
376
|
"5c0619c1ee059477c9d92cf70b72da5d238d9176fc27ab0d38104ecba795624c",
|
|
345
|
-
"a00db51859bb7943174017a34b4a100f98e53d6c3b32f73d8f87d6072016a709"
|
|
377
|
+
"a00db51859bb7943174017a34b4a100f98e53d6c3b32f73d8f87d6072016a709",
|
|
378
|
+
"5a93f78b4ed4d416c171139b2ce610a117f9c1dd46fbb56ca86729cb4c53d10c"
|
|
346
379
|
],
|
|
347
380
|
"ai-init/junie-guidelines.block.md": [
|
|
348
381
|
"e8df28f07cb784d768bcafbced70fd15771afa61dbec7dc4c1c3f858f9002fec",
|
|
349
382
|
"c9ddacab2a6943af94c927799ba314877c1f19d40949e927c2d3825689005288",
|
|
350
383
|
"4d1f9073276936834747199393159f1badc0277b5bb394f78f408d52c36c4e35",
|
|
351
|
-
"65acd4be95c695d0cc20cb5f4faffe0f44e0873b385c124140b223c41328cb56"
|
|
384
|
+
"65acd4be95c695d0cc20cb5f4faffe0f44e0873b385c124140b223c41328cb56",
|
|
385
|
+
"935af1019931058ec3a0b834fe230e127ec914f75edcc4a6c589cfe733b0b979",
|
|
386
|
+
"e120ff4e32b2e950fc94ada4e787d57dc9c790da37223e5a202d74f7e3aadf80",
|
|
387
|
+
"c8573ca1f810ce6c4ac49456a4c1725b93e0d3b74c54ce95d46d8747777895f0"
|
|
352
388
|
],
|
|
353
389
|
"ai-init/junie-guidelines.minimal.md": [
|
|
354
390
|
"5551499579a0bceb74a79731d30213b1ddf9168b92f6d3dd0aecad91d8aff464"
|
|
@@ -371,7 +407,9 @@
|
|
|
371
407
|
"a349aaad234825ea429df33cafb7928579c0cb5b1801f0a237e103aa8d159642"
|
|
372
408
|
],
|
|
373
409
|
"project-init/constitution.md": [
|
|
374
|
-
"5e38d93c4f82300cc5d331f4ce3022d2872db15d108ae23bf33e2169a19b42f2"
|
|
410
|
+
"5e38d93c4f82300cc5d331f4ce3022d2872db15d108ae23bf33e2169a19b42f2",
|
|
411
|
+
"7be527cd648b27cca6e267de30f8e33a2ce17d5631a82694f23ae5c0623efe1f",
|
|
412
|
+
"18c7a2753ce9cb6f6d3d1e9d5d1125d75950b879d56b7325225b200869631b29"
|
|
375
413
|
],
|
|
376
414
|
"project-init/gitignore.snippet": [
|
|
377
415
|
"965a03be82000866cb5275acda18ebb2172c9a50f0011df2fa475f74a1124c35",
|
|
@@ -402,7 +440,9 @@
|
|
|
402
440
|
"17f88e362fa19b7f2741ea1393164dc75b9c300b8727322f91fe205a985e088f"
|
|
403
441
|
],
|
|
404
442
|
"project-init/sdlc-README.md": [
|
|
405
|
-
"a8cf15b33301a76e1d899064d5cb95914cc49412ab223f00394b702c4a4508f1"
|
|
443
|
+
"a8cf15b33301a76e1d899064d5cb95914cc49412ab223f00394b702c4a4508f1",
|
|
444
|
+
"079a91f976ad69b5cf49ccb9a28849576e4735ddd9485fc26599e528a69fd2f4",
|
|
445
|
+
"d6e5b34d475e7187d2a8cb2aac7e7f1a427142baf6461bda387d70ceb4d8a8c1"
|
|
406
446
|
],
|
|
407
447
|
"project-init/spec.md": [
|
|
408
448
|
"61d0e67d59802a695f546e0a77e11a4daf1fafe77f50bead5f94bc7f08fb8457"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""0009: the task's state file is `.ai/state/state.json`.
|
|
2
|
+
|
|
3
|
+
R34's contract half. 0008 shipped the expand half: the guards and state.py of
|
|
4
|
+
3.4b read `.ai/state/state.json` first and `current.json` otherwise, and write
|
|
5
|
+
the file where it is. This migration, run once such a version is installed,
|
|
6
|
+
moves a task in flight from `current.json` to `state.json`, and `state.py start`
|
|
7
|
+
opens every new task in `state.json`.
|
|
8
|
+
|
|
9
|
+
* The move goes through MOVES like any other: no task in flight means no
|
|
10
|
+
file, and nothing happens; a project that already holds `state.json` keeps
|
|
11
|
+
it (a `current.json` beside it is a conflict for a human, not overwritten).
|
|
12
|
+
* The file's bytes are not touched: every field of the task survives.
|
|
13
|
+
* Reverting to 3.4b after the move still guards the task, because that
|
|
14
|
+
version reads `state.json`.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
VERSION = 9
|
|
18
|
+
TITLE = "the task's state file is state.json"
|
|
19
|
+
STATE_LEGACY = ".ai/state/current.json"
|
|
20
|
+
STATE_NEW = ".ai/state/state.json"
|
|
21
|
+
MOVES = [(STATE_LEGACY, STATE_NEW)]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def plan(ctx):
|
|
25
|
+
ctx.move(STATE_LEGACY, STATE_NEW)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""0010: the command-choice dialog is on (R36.1).
|
|
2
|
+
|
|
3
|
+
`.ai/policies/dialog.json` is the project's switch for the dialog: the human
|
|
4
|
+
picks a commit, push or approval command in the runtime's dialog and the agent
|
|
5
|
+
runs that command, verbatim and once. This migration writes the switch, on, as
|
|
6
|
+
the scaffold does for a new project.
|
|
7
|
+
|
|
8
|
+
* A project that already has the file keeps it, whatever it says: `create`
|
|
9
|
+
does not overwrite, and a human's `"enabled": false` stays off.
|
|
10
|
+
* A second run finds the file and does nothing, and prints nothing.
|
|
11
|
+
* The task's state is not touched: a task in flight survives.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
VERSION = 10
|
|
15
|
+
TITLE = "the command-choice dialog switch"
|
|
16
|
+
SWITCH = ".ai/policies/dialog.json"
|
|
17
|
+
MOVES = []
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def plan(ctx):
|
|
21
|
+
if ctx.exists(SWITCH):
|
|
22
|
+
return
|
|
23
|
+
ctx.create(SWITCH, ctx.template(SWITCH))
|
|
24
|
+
ctx.hint("%s is new and the command-choice dialog is on; set \"enabled\": false in it to turn the dialog off"
|
|
25
|
+
% SWITCH)
|
|
26
|
+
ctx.hint("docs/sdlc/constitution.md C5 still says no agent commits, merges or deploys: if you keep the dialog "
|
|
27
|
+
"on, amend C5 to the new sentence (skills/project-init/templates/constitution.md, C5)")
|
|
28
|
+
if ctx.state is not None:
|
|
29
|
+
ctx.hint("a task is in flight: the dialog switch takes effect for it too; set \"enabled\": false in %s "
|
|
30
|
+
"to turn it off" % SWITCH)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""0011: the old tier policy is retired (register #20, #50, #58, #62).
|
|
2
|
+
|
|
3
|
+
`.ai/policies/risk-tiers.json` and its generated mirror `risk-tiers.md` were
|
|
4
|
+
replaced by `.ai/policies/weight.json` (migration 0007 converted the project's
|
|
5
|
+
edits) and nothing in the plugin reads them any more. The plugin stops shipping
|
|
6
|
+
both, and this migration proposes deleting the project's copies.
|
|
7
|
+
|
|
8
|
+
* Each file the project has is proposed for deletion: a `delete?` item that
|
|
9
|
+
waits for --apply --confirm-delete NAME, with the original kept under
|
|
10
|
+
`.ai/reports/project-update-<date>/original/`. Git is the rollback.
|
|
11
|
+
* A copy the project edited is proposed too, and the reason says it was
|
|
12
|
+
edited: the human decides, and may keep the file by never confirming (the
|
|
13
|
+
schema then stays at 10) or by copying what they need into weight.json first.
|
|
14
|
+
* A project without the files gets nothing, and so does a second run.
|
|
15
|
+
* The templates are retired in `migrations.RETIRED`, so the template walk never
|
|
16
|
+
re-creates a deleted file.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
VERSION = 11
|
|
20
|
+
TITLE = "retire risk-tiers.json and risk-tiers.md (weight.json replaced them)"
|
|
21
|
+
MOVES = []
|
|
22
|
+
|
|
23
|
+
PATHS = (".ai/policies/risk-tiers.json", ".ai/policies/risk-tiers.md")
|
|
24
|
+
REASON = "replaced by .ai/policies/weight.json; nothing reads it any more"
|
|
25
|
+
EDITED = REASON + " — your project edited this copy, check weight.json holds what you need"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def plan(ctx):
|
|
29
|
+
for path in PATHS:
|
|
30
|
+
if not ctx.exists(path):
|
|
31
|
+
continue
|
|
32
|
+
why = ctx.unsafe_target(path)
|
|
33
|
+
if why:
|
|
34
|
+
ctx.hint("%s: %s, so this update never deletes it — remove it by hand once weight.json holds "
|
|
35
|
+
"what you need" % (path, why))
|
|
36
|
+
continue
|
|
37
|
+
ctx.delete(path, REASON if ctx.is_shipped(path, ctx.read(path)) else EDITED)
|
|
@@ -16,7 +16,8 @@ this directory, named `NNNN_slug.py`, numbered contiguously from `0001`, with
|
|
|
16
16
|
- A migration that deletes must retire the template in the same release,
|
|
17
17
|
otherwise the next run re-creates the file.
|
|
18
18
|
- `ctx.patch_state` is the only way to change a task in flight, and the only
|
|
19
|
-
writer of `.ai/state/
|
|
19
|
+
writer of the task's state file (`.ai/state/state.json`, `current.json` in a
|
|
20
|
+
project not yet at schema 9) other than `state.py`. A migration that
|
|
20
21
|
moves a path a task's step may touch must patch it, or the scope guard will
|
|
21
22
|
stop that task on a file that no longer exists.
|
|
22
23
|
- Operations are planned, never written: the dry run must list everything.
|
|
@@ -29,7 +29,12 @@ NAME_RE = re.compile(r"(\d{4})_[a-z0-9_]+\.py")
|
|
|
29
29
|
# A successor key here joins the rename chain, so an edited file still merges
|
|
30
30
|
# against the version it was installed from. None means the template is simply
|
|
31
31
|
# gone: the key is not an orphan, and there is nothing to merge against.
|
|
32
|
-
RETIRED = {
|
|
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
|
+
}
|
|
33
38
|
|
|
34
39
|
|
|
35
40
|
class SchemaError(Exception):
|
|
@@ -166,7 +166,7 @@ def vocabulary(source, runtime):
|
|
|
166
166
|
|
|
167
167
|
# The budgets an installed plugin uses: install.sh copies skills/, not
|
|
168
168
|
# instructions/, so runtimes.json is only there in a checkout. Kept equal to
|
|
169
|
-
# `_budgets` in instructions/runtimes.json by tests/
|
|
169
|
+
# `_budgets` in instructions/runtimes.json by tests/test_project_update.py.
|
|
170
170
|
DEFAULT_BUDGETS = {"global": 2560, "project": 2048, "skeleton": 2048, "skeleton-sdlc": 2048}
|
|
171
171
|
|
|
172
172
|
|