Commit ab14237
Add MCP/skill governance, agent-permissions, readiness benchmark (priorities 3, 4, 7)
Priority 4 - Machine-readable permissions
src/coding_scaffold/permissions.py:
permissions write writes .coding-scaffold/agent-permissions.json
with filesystem read/write/deny patterns, shell
allowed + requires_approval lists, network=
disabled_by_default, mcp defaults. Lightly
project-aware (Python -> pytest/ruff,
Node -> npm test, etc.). Idempotent; --force
to regenerate.
Priority 3 - MCP governance
src/coding_scaffold/mcp.py:
mcp policy init writes .coding-scaffold/mcp-policy.json
mcp scan inspects opencode.json + .claude/settings.json;
parses servers; flags remote/unpinned/risky-
launcher/broad-fs-arg/unapproved/denied/
review-required-capability findings
mcp snapshot writes .coding-scaffold/mcp-snapshot.json with
server fingerprints
mcp diff compares scan vs snapshot; exits 1 on drift
No commands executed. No network. Pure config parsing.
Priority 3 - Reviewable skill packs
src/coding_scaffold/skills.py:
skills new <name> scaffolds .coding-scaffold/skills/<name>/ with
SKILL.md, manifest.json, README.md, scripts/,
tests/
skills lint flags broad-usage, hidden-instruction (error),
undeclared-capability, missing sections,
missing manifest fields, invalid risk_level,
placeholder owner, checksum drift
skills approve <n> writes CHECKSUM (sha256 of SKILL.md ||
manifest.json) so future drift surfaces in lint
skills export <n> bundles the skill as tar.gz
Priority 7 - Readiness benchmark
src/coding_scaffold/eval_harness.py:
eval init writes .coding-scaffold/eval-config.json with toggles
eval run runs deterministic checks for build/test/lint signals,
agent instructions, policy, denied files, PR template,
MCP policy (when MCP detected), session trace location,
context lint clean, context budget acceptable
eval report prints the most recent report (--cached for last run)
Reuses lint_context and inspect_context_budget; no model-intelligence
scoring; no shell execution.
CLI
12 new commands wired through src/coding_scaffold/cli.py with --json
output on every one. Existing commands unchanged.
Tests
61 new tests across 4 test files (test_permissions.py, test_mcp.py,
test_skills.py, test_eval_harness.py). 266 total pass, ruff clean.
Docs
- New "Machine-Readable Permissions Artifact", "MCP Governance", and
"Skill Pack Governance" sections in Security.md.
- New "Readiness Benchmark" section in Team-Rollout.md.
- CHANGELOG [Unreleased] covers all 12 new commands.
Zero new dependencies, zero LLM calls, zero network calls. Existing
behavior unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2ac4c58 commit ab14237
12 files changed
Lines changed: 3065 additions & 0 deletions
File tree
- docs/wiki
- src/coding_scaffold
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
12 | 42 | | |
13 | 43 | | |
14 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
121 | 195 | | |
122 | 196 | | |
123 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
198 | 229 | | |
199 | 230 | | |
200 | 231 | | |
| |||
0 commit comments