Commit 3e57141
feat(rsr): direct capability declaration primary; preset optional (#392)
## Summary
Refines the just-merged template-applicability model (#391) to the
**pure capability-gating** shape: a profile declares `capabilities =
[...]` directly as the primary form, and `preset` becomes **optional
sugar** (a named bundle expanded from the gate data). This matches the
chosen "capability-gated profile" approach while keeping presets
available for ergonomics.
Precedence: `capabilities`, `preset`, and `add` all union; `remove`
subtracts; at least one of `capabilities` / `preset` is required.
## Changes
- **`scripts/check-rsr-profile.sh`** — accept a direct `capabilities`
list; `preset` is now optional (error only if a profile declares
neither).
- **`TEMPLATE-APPLICABILITY-POLICY.adoc`** — capability declaration is
*the model*; presets are *optional shorthand* (updated Model, profile
example, and Presets section).
- **`.machine_readable/template-capability-gates.toml`** — note presets
are optional.
## Verification
- Direct-capabilities profile (no preset) → **OK**.
- Preset profile (arghda-core `rust-cli`) → still **OK**.
- A planted `abi.ipkg` under the direct form → still flagged
**VESTIGIAL**.
- A profile declaring neither `capabilities` nor `preset` → clean error
(exit 2).
Note: arghda-core's existing `rsr-profile.a2ml` (which uses `preset =
"rust-cli"`) remains valid — preset is now demonstrated as the optional
form, so no change is needed there.
Follow-up to #391 (per the agreed pure-gating-primary direction).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_019GiSiEfgZCte35dyykgBHs
---
_Generated by [Claude
Code](https://claude.ai/code/session_019GiSiEfgZCte35dyykgBHs)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 78b2900 commit 3e57141
3 files changed
Lines changed: 49 additions & 25 deletions
File tree
- .machine_readable
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
156 | | - | |
| 159 | + | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 165 | + | |
164 | 166 | | |
165 | 167 | | |
166 | | - | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
171 | 186 | | |
172 | 187 | | |
173 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | | - | |
| 41 | + | |
38 | 42 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | | - | |
44 | | - | |
| 50 | + | |
| 51 | + | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
| |||
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | | - | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
0 commit comments