@slope-dev/slope 1.27.0 → 1.27.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/README.md CHANGED
@@ -2,133 +2,322 @@
2
2
 
3
3
  **Sprint Lifecycle & Operational Performance Engine**
4
4
 
5
- Replace subjective retrospectives with quantified sprint metrics. Track every ticket's approach, outcome, and hazards then use rolling analytics to spot patterns and improve over time.
5
+ Quantified sprint metrics for AI-assisted development. Scorecards, handicap tracking, and real-time agent guidance for Claude Code, Cursor, Windsurf, Cline, OB1, and OpenCode.
6
6
 
7
- ## Why SLOPE?
7
+ ## Setup
8
8
 
9
- - **Quantified retros** structured scorecards with objective scoring instead of "how did it feel?"
10
- - **Pattern detection** — rolling handicap windows reveal if you consistently over-engineer, under-scope, or pick the wrong approach
11
- - **AI agent guidance** — 16 guard hooks give real-time hints to Claude Code, Cursor, Windsurf, Cline, and OpenCode
12
- - **Pluggable metaphors** — golf, tennis, baseball, gaming, D&D, matrix, or agile terminology — same math, your vocabulary
13
- - **Zero infrastructure** — SQLite store, CLI-driven, lives in your repo
14
-
15
- ## Quick Start
9
+ Install SLOPE as a dev dependency in your project:
16
10
 
17
11
  ```bash
18
- # Install
19
- npm install -g @slope-dev/slope
12
+ npm install --save-dev @slope-dev/slope
13
+ ```
14
+
15
+ Then initialize from inside your AI coding tool. Pick your platform below and paste the prompt.
16
+
17
+ ---
18
+
19
+ ### Claude Code
20
+
21
+ The most fully-featured integration — context injection, guard hooks, slash commands, and MCP.
22
+
23
+ **Paste this prompt into Claude Code:**
24
+
25
+ ```
26
+ Install and initialize SLOPE for this project. Run:
27
+
28
+ 1. npx slope init --claude-code --interactive --smart
29
+ 2. npx slope hook add --level=full
30
+ 3. npx slope map
31
+
32
+ This will create .claude/rules/, .claude/hooks/, .claude/commands/, .mcp.json, and CLAUDE.md.
33
+ After init, verify the MCP server works by running the `search` MCP tool with an empty query.
34
+ ```
35
+
36
+ **What you get:**
37
+
38
+ | Component | Location | Purpose |
39
+ |-----------|----------|---------|
40
+ | Rules | `.claude/rules/*.md` | Sprint checklist, commit discipline, review loop, codebase context |
41
+ | Guard hooks | `.claude/hooks/slope-guard.sh` | 22 real-time guards configured in `.claude/settings.json` |
42
+ | Slash commands | `.claude/commands/*.md` | `/start-sprint`, `/post-sprint`, `/review-pr` workflow automation |
43
+ | MCP server | `.mcp.json` | `search()` to discover API, `execute()` to run SLOPE commands |
44
+ | Project context | `CLAUDE.md` | Project-wide context with SLOPE workflow summary |
45
+ | Codebase map | `CODEBASE.md` | Auto-generated index for agent navigation |
46
+
47
+ **Slash commands** (Claude Code exclusive):
48
+ - `/start-sprint` — pre-sprint setup: briefing, branch creation, sprint state, prior scorecard verification
49
+ - `/post-sprint` — scorecard creation, validation, review, common-issues distillation
50
+ - `/review-pr` — structured PR review with finding tracking and scorecard amendment
51
+
52
+ ---
53
+
54
+ ### Cursor
55
+
56
+ Full guard support with context injection and MCP.
57
+
58
+ **Paste this prompt into Cursor:**
59
+
60
+ ```
61
+ Install and initialize SLOPE for this project. Run these commands in the terminal:
62
+
63
+ 1. npx slope init --cursor --interactive --smart
64
+ 2. npx slope hook add --level=full --harness=cursor
65
+ 3. npx slope map
66
+
67
+ This will create .cursor/rules/, .cursor/hooks/, .cursor/mcp.json, .cursorrules, and CODEBASE.md.
68
+ ```
69
+
70
+ **What you get:**
71
+
72
+ | Component | Location | Purpose |
73
+ |-----------|----------|---------|
74
+ | Rules | `.cursor/rules/*.mdc` | Sprint checklist, commit discipline, review loop, codebase context |
75
+ | Guard hooks | `.cursor/hooks/slope-guard.sh` | Guards configured in `.cursor/hooks.json` |
76
+ | MCP server | `.cursor/mcp.json` | API search and command execution |
77
+ | Project context | `.cursorrules` | Project-wide context |
78
+
79
+ ---
80
+
81
+ ### Windsurf
82
+
83
+ Guard support with blocking (no context injection).
84
+
85
+ **Paste this prompt into Windsurf:**
86
+
87
+ ```
88
+ Install and initialize SLOPE for this project. Run these commands in the terminal:
89
+
90
+ 1. npx slope init --windsurf --interactive --smart
91
+ 2. npx slope hook add --level=full --harness=windsurf
92
+ 3. npx slope map
93
+
94
+ This will create .windsurf/rules/, .windsurf/hooks/, .windsurf/mcp.json, .windsurfrules, and CODEBASE.md.
95
+ ```
96
+
97
+ **What you get:**
98
+
99
+ | Component | Location | Purpose |
100
+ |-----------|----------|---------|
101
+ | Rules | `.windsurf/rules/*.mdc` | Sprint checklist, commit discipline, review loop, codebase context |
102
+ | Guard hooks | `.windsurf/hooks/slope-guard.sh` | Exit-code based guards in `.windsurf/hooks.json` |
103
+ | MCP server | `.windsurf/mcp.json` | API search and command execution |
104
+ | Project context | `.windsurfrules` | Project-wide context |
105
+
106
+ **Note:** Guards can block/allow actions but cannot inject guidance text into agent context.
107
+
108
+ ---
109
+
110
+ ### Cline
111
+
112
+ Full guard support with per-event hook scripts. MCP requires manual setup.
113
+
114
+ **Paste this prompt into Cline:**
115
+
116
+ ```
117
+ Install and initialize SLOPE for this project. Run these commands in the terminal:
118
+
119
+ 1. npx slope init --cline --interactive --smart
120
+ 2. npx slope hook add --level=full --harness=cline
121
+ 3. npx slope map
122
+
123
+ This will create .clinerules/, .clinerules/hooks/, and CODEBASE.md.
124
+
125
+ After init, I need to manually add the MCP server through the Cline VS Code extension.
126
+ Read .clinerules/slope-context.md for the MCP configuration instructions.
127
+ ```
128
+
129
+ **What you get:**
130
+
131
+ | Component | Location | Purpose |
132
+ |-----------|----------|---------|
133
+ | Rules | `.clinerules/*.md` | Sprint checklist, commit discipline, review loop, codebase context |
134
+ | Guard hooks | `.clinerules/hooks/` | Per-event scripts (PreToolUse, PostToolUse, TaskCancel, PreCompact) |
135
+ | MCP instructions | `.clinerules/slope-context.md` | Setup guide for manual MCP configuration |
136
+
137
+ **Note:** MCP server must be configured manually through the Cline VS Code extension UI.
138
+
139
+ ---
20
140
 
21
- # Initialize (auto-detects your AI coding tool)
22
- slope init
141
+ ### OB1
142
+
143
+ Guard support with per-event hook scripts and MCP.
144
+
145
+ **Paste this prompt into OB1:**
146
+
147
+ ```
148
+ Install and initialize SLOPE for this project. Run these commands:
149
+
150
+ 1. npx slope init --ob1
151
+ 2. npx slope hook add --level=full --harness=ob1
152
+ 3. npx slope map
153
+
154
+ This will create .ob1/hooks/, .ob1/mcp.json, and CODEBASE.md.
155
+ ```
156
+
157
+ **What you get:**
158
+
159
+ | Component | Location | Purpose |
160
+ |-----------|----------|---------|
161
+ | Guard hooks | `.ob1/hooks/` | Per-event scripts (pre_tool, post_tool, post_agent) |
162
+ | MCP server | `.ob1/mcp.json` | API search and command execution |
163
+
164
+ ---
165
+
166
+ ### OpenCode
167
+
168
+ Plugin-based integration with MCP.
169
+
170
+ **Paste this prompt into OpenCode:**
23
171
 
24
- # View your handicap card
25
- slope card
26
172
  ```
173
+ Install and initialize SLOPE for this project. Run these commands:
27
174
 
28
- > Installed locally? Use `npx slope` instead.
175
+ 1. npx slope init --opencode
176
+ 2. npx slope map
29
177
 
30
- ## Core Concepts
178
+ This will create opencode.json, .opencode/plugins/, AGENTS.md, and CODEBASE.md.
179
+ ```
180
+
181
+ **What you get:**
182
+
183
+ | Component | Location | Purpose |
184
+ |-----------|----------|---------|
185
+ | Plugin | `.opencode/plugins/slope-plugin.ts` | Session lifecycle hooks |
186
+ | MCP server | `opencode.json` | API search and command execution |
187
+ | Project context | `AGENTS.md` | Project-wide context |
188
+
189
+ ---
190
+
191
+ ### Platform Capabilities
192
+
193
+ | | Claude Code | Cursor | Windsurf | Cline | OB1 | OpenCode |
194
+ |---|:---:|:---:|:---:|:---:|:---:|:---:|
195
+ | Context injection | Yes | Yes | -- | Yes | Yes | -- |
196
+ | PreToolUse guards | Yes | Yes | Yes | Yes | Yes | -- |
197
+ | PostToolUse guards | Yes | Yes | Yes | Yes | Yes | -- |
198
+ | Stop/session-end | Yes | Yes | -- | Yes | Yes | Yes |
199
+ | PreCompact | Yes | -- | -- | Yes | -- | -- |
200
+ | Slash commands | Yes | -- | -- | -- | -- | -- |
201
+ | MCP auto-install | Yes | Yes | Yes | Manual | Yes | Yes |
202
+ | Rules/context files | Yes | Yes | Yes | Yes | -- | Yes |
203
+
204
+ ## What SLOPE Does
31
205
 
32
- Every sprint has a **par** (expected baseline from ticket count: 1–2 → par 3, 3–4 → par 4, 5+ → par 5). Each ticket is a **shot** with an approach complexity (**club**: driver → putter) and an outcome (**result**: in_the_hole → missed). Over time, your **handicap card** shows rolling averages, miss patterns, and trend direction.
206
+ SLOPE replaces subjective retrospectives with quantified sprint metrics. Every sprint gets a **scorecard** that tracks each ticket's approach complexity, outcome, and hazards encountered. Over time, your **handicap card** reveals patterns do you consistently over-engineer? Under-scope? Pick the wrong approach?
207
+
208
+ For AI-assisted development, SLOPE also provides **real-time agent guidance**: 22 guard hooks that inject context, warnings, and blocks into your coding agent's workflow as you work.
209
+
210
+ ### Core Concepts
33
211
 
34
212
  | Concept | What it measures |
35
213
  |---------|-----------------|
36
- | Par | Expected sprint baseline (from ticket count) |
37
- | Slope | Difficulty modifier (cross-package, migrations, etc.) |
38
- | Club | Approach complexity (driver = risky, putter = trivial) |
39
- | Result | Outcome (in_the_hole = perfect, missed_long = over-engineered) |
40
- | Hazard | Gotchas encountered (bunker, water, rough, trees) |
41
- | Handicap| Rolling performance trend across sprints |
42
-
43
- ## Features
44
-
45
- ### Scoring & Analysis
46
- - **Scorecards** — structured JSON retros with shot-by-shot tracking
47
- - **Handicap card** — rolling windows (last 5, 10, all-time) with trend arrows
48
- - **Dispersion analysis** — miss pattern heatmaps and area performance
49
- - **HTML reports** — self-contained visual dashboards with charts
50
- - **Auto-card** — generate draft scorecards from git commits + CI signals
51
-
52
- ### Planning & Workflow
53
- - **Briefings** — pre-sprint hazard index, nutrition alerts, filtered gotchas
54
- - **Sessions & claims** — track who's working on what, detect conflicts
55
- - **Roadmap tools** — validate dependencies, find critical path, parallel opportunities
56
- - **Club advisor** — complexity recommendations based on historical performance
57
-
58
- ### AI Agent Guidance
59
- - **16 guard hooks** — real-time hints injected into agent context
60
- - **MCP server** — search API functions and execute SLOPE commands from your agent
61
- - **5 platform adapters** — Claude Code, Cursor, Windsurf, Cline, OpenCode
62
- - **Codebase map** — auto-generated index for agent navigation
63
-
64
- ### Team & Multi-Developer
65
- - **Team handicap** — aggregate performance across team members
66
- - **Leaderboard** — multi-developer performance ranking
67
- - **Standups** — structured standup reports with handoff tracking
68
- - **Escalation** — severity-based alerts for blocked work
69
-
70
- ## Platform Compatibility
71
-
72
- | Platform | Rules | Hooks | MCP | Session Tracking |
73
- |-------------|-------|-------|-----|------------------|
74
- | Claude Code | .claude/rules/ | .claude/hooks/ | .mcp.json | Auto (hooks) |
75
- | Cursor | .cursor/rules/ | .cursor/hooks/ | .cursor/mcp.json | Auto (hooks) |
76
- | Windsurf | .windsurf/rules/ | .windsurf/hooks/ | .windsurf/mcp.json | Auto (hooks) |
77
- | Cline | .clinerules/ | .clinerules/hooks/ | Manual setup | Auto (hooks) |
78
- | OpenCode | AGENTS.md | Plugin | opencode.json | Auto (plugin) |
214
+ | Par | Expected sprint baseline (1-2 tickets = 3, 3-4 = 4, 5+ = 5) |
215
+ | Slope | Difficulty modifier (cross-package changes, migrations, new infra) |
216
+ | Club | Approach complexity (driver = risky/new, putter = trivial) |
217
+ | Result | Outcome (in_the_hole = perfect, missed_long = over-engineered) |
218
+ | Hazard | Gotchas encountered (rough = code quality, water = security, bunker = architecture) |
219
+ | Handicap | Rolling performance trend across sprints |
79
220
 
80
- ```bash
81
- slope init --claude-code # or --cursor, --windsurf, --cline, --opencode, --all
221
+ > Don't like golf terms? SLOPE supports 7 [pluggable metaphors](#metaphors) — same math, your vocabulary.
222
+
223
+ ## Guard Hooks
224
+
225
+ Guards are the real-time guidance system. They fire on specific tool calls and inject context, warnings, or blocks into your agent's workflow. They're installed automatically by `slope hook add --level=full`.
226
+
227
+ | Guard | Fires on | What it does |
228
+ |-------|----------|-------------|
229
+ | `explore` | Read/Glob/Grep/Edit/Write | Suggests checking codebase map; blocks edits when map is 31+ commits stale |
230
+ | `hazard` | Edit/Write | Warns about known issues in areas being edited |
231
+ | `sprint-completion` | `gh pr create` / session end | Blocks PR without scorecard; blocks session end with incomplete gates |
232
+ | `commit-nudge` | Edit/Write | Nudges to commit after prolonged editing |
233
+ | `push-nudge` | Bash (git commit) | Nudges to push when unpushed commits pile up |
234
+ | `scope-drift` | Edit/Write | Warns when editing files outside claimed ticket scope |
235
+ | `subagent-gate` | Agent | Enforces model selection on Explore/Plan subagents |
236
+ | `branch-before-commit` | Bash (git commit) | Blocks commits directly on main/master |
237
+ | `workflow-gate` | ExitPlanMode | Blocks plan exit until review rounds complete |
238
+ | `version-check` | Bash (git push) | Blocks push when package versions haven't been bumped |
239
+ | `stop-check` | Session end | Warns about uncommitted/unpushed work |
240
+ | `next-action` | Session end | Suggests next actions before session ends |
241
+
242
+ Plus 10 more for review workflows, transcript recording, worktree safety, and flow staleness detection. Run `npx slope guard list` to see all available guards.
243
+
244
+ ## MCP Server
245
+
246
+ The SLOPE MCP server gives your agent direct access to the scoring engine. It's auto-configured during `slope init` for all platforms except Cline.
247
+
248
+ ```
249
+ # Discover all available API functions
250
+ search({})
251
+
252
+ # Search for specific functionality
253
+ search({ query: 'handicap' })
254
+ search({ module: 'map' }) # Get the codebase map
255
+
256
+ # Execute SLOPE code in a sandbox
257
+ execute({ code: 'return computeHandicapCard(loadScorecards())' })
82
258
  ```
83
259
 
84
- ## CLI Quick Reference
260
+ ## CLI Reference
85
261
 
86
- ### Setup & Config
262
+ All commands use `npx slope` when installed locally.
263
+
264
+ ### Setup
87
265
 
88
266
  | Command | Description |
89
267
  |---------|-------------|
90
- | `slope init` | Initialize SLOPE (auto-detects platform) |
91
- | `slope init --interactive --smart` | Guided setup with repo analysis |
92
- | `slope hook add --level=full` | Install all guidance hooks |
93
- | `slope map` | Generate/update codebase map |
268
+ | `npx slope init` | Initialize SLOPE (auto-detects platform) |
269
+ | `npx slope init --interactive --smart` | Guided setup with repo analysis |
270
+ | `npx slope hook add --level=full` | Install all guidance hooks |
271
+ | `npx slope map` | Generate/update codebase map |
94
272
 
95
273
  ### Scoring
96
274
 
97
275
  | Command | Description |
98
276
  |---------|-------------|
99
- | `slope card` | Display handicap card |
100
- | `slope validate [path]` | Validate scorecard(s) |
101
- | `slope review [path]` | Generate sprint review markdown |
102
- | `slope report --html` | Generate HTML performance report |
103
- | `slope auto-card --sprint=N` | Generate scorecard from git + CI |
104
- | `slope dashboard` | Live local performance dashboard |
277
+ | `npx slope card` | Display handicap card |
278
+ | `npx slope validate [path]` | Validate scorecard(s) |
279
+ | `npx slope review [path]` | Generate sprint review markdown |
280
+ | `npx slope auto-card --sprint=N` | Generate scorecard from git + CI signals |
281
+ | `npx slope report --html` | Generate HTML performance report |
282
+ | `npx slope dashboard` | Live local performance dashboard |
105
283
 
106
284
  ### Planning
107
285
 
108
286
  | Command | Description |
109
287
  |---------|-------------|
110
- | `slope briefing` | Pre-sprint briefing with hazards and gotchas |
111
- | `slope plan --complexity=<level>` | Club recommendation + training plan |
112
- | `slope next` | Show next sprint number |
113
- | `slope roadmap validate` | Validate roadmap dependencies |
288
+ | `npx slope briefing` | Pre-sprint hazard index, nutrition alerts, filtered gotchas |
289
+ | `npx slope plan --complexity=<level>` | Club recommendation + training plan |
290
+ | `npx slope next` | Show next sprint number |
291
+ | `npx slope roadmap validate` | Validate roadmap dependencies and sprint status |
292
+
293
+ ### Review & Findings
294
+
295
+ | Command | Description |
296
+ |---------|-------------|
297
+ | `npx slope review recommend` | Which review types to run based on sprint characteristics |
298
+ | `npx slope review findings add` | Record a review finding |
299
+ | `npx slope review amend` | Inject findings as hazards into scorecard |
300
+ | `npx slope review defer --from=N --to=M` | Defer a finding to a future sprint |
301
+ | `npx slope review deferred --sprint=N` | List deferred findings targeting a sprint |
302
+ | `npx slope review resolve --id=<uuid>` | Mark a deferred finding as resolved |
114
303
 
115
304
  ### Sessions
116
305
 
117
306
  | Command | Description |
118
307
  |---------|-------------|
119
- | `slope session start\|end\|list` | Manage live sessions |
120
- | `slope claim --target=<t>` | Claim a ticket or area |
121
- | `slope release --target=<t>` | Release a claim |
122
- | `slope status` | Sprint status + conflicts |
308
+ | `npx slope session start\|end\|list` | Manage live sessions |
309
+ | `npx slope claim --target=<t>` | Claim a ticket or area |
310
+ | `npx slope status` | Sprint status + conflicts |
311
+ | `npx slope sprint start --number=N` | Initialize sprint state with gate tracking |
123
312
 
124
313
  ### Maintenance
125
314
 
126
315
  | Command | Description |
127
316
  |---------|-------------|
128
- | `slope extract --file=<path>` | Extract events into store |
129
- | `slope distill` | Promote patterns to common issues |
130
- | `slope store health\|backup\|restore` | Store diagnostics and management |
131
- | `slope flows init\|list\|check` | Manage user flow definitions |
317
+ | `npx slope extract --file=<path>` | Extract events into store |
318
+ | `npx slope distill` | Promote patterns to common issues |
319
+ | `npx slope store health\|backup\|restore` | Store diagnostics and management |
320
+ | `npx slope flows init\|list\|check` | Manage user flow definitions |
132
321
 
133
322
  ## Metaphors
134
323
 
@@ -145,20 +334,10 @@ slope init --claude-code # or --cursor, --windsurf, --cline, --opencode, --all
145
334
  | **Agile** | Sprint | Story | Shipped | Accepted |
146
335
 
147
336
  ```bash
148
- slope init --metaphor=gaming # Set during init
149
- slope card --metaphor=tennis # Override per-command
337
+ npx slope init --metaphor=gaming # Set during init
338
+ npx slope card --metaphor=tennis # Override per-command
150
339
  ```
151
340
 
152
- ## Documentation
153
-
154
- - **[Getting Started](docs/getting-started.md)** — installation, setup, core concepts, platform guides
155
- - **[Tutorial: First Sprint](docs/tutorial-first-sprint.md)** — end-to-end walkthrough with example scorecard
156
- - **[Framework Reference](docs/framework.md)** — full scoring system specification
157
- - **[Dashboard Guide](docs/guides/dashboard.md)** — live performance dashboard
158
- - **[Multi-Developer Guide](docs/guides/multi-developer.md)** — team handicap and leaderboard
159
- - **[Cline Setup](docs/guides/cline-setup.md)** — Cline-specific configuration
160
- - **[Scorecard Template](docs/scorecard-template.md)** — field-by-field reference
161
-
162
341
  ## Core API
163
342
 
164
343
  ```typescript
@@ -168,14 +347,24 @@ import {
168
347
  computeHandicapCard,
169
348
  computeDispersion,
170
349
  formatSprintReview,
171
- buildReportData,
172
- generateHtmlReport,
173
350
  loadScorecards,
174
351
  getMetaphor,
352
+ createDeferred,
353
+ listDeferred,
175
354
  } from '@slope-dev/slope';
176
355
  ```
177
356
 
178
- Published as [`@slope-dev/slope`](https://www.npmjs.com/package/@slope-dev/slope) — includes the scoring engine, SQLite store, CLI (30 commands), and MCP server.
357
+ Published as [`@slope-dev/slope`](https://www.npmjs.com/package/@slope-dev/slope).
358
+
359
+ ## Documentation
360
+
361
+ - **[Getting Started](docs/getting-started.md)** — installation, setup, core concepts
362
+ - **[Tutorial: First Sprint](docs/tutorial-first-sprint.md)** — end-to-end walkthrough
363
+ - **[Framework Reference](docs/framework.md)** — full scoring system specification
364
+ - **[Dashboard Guide](docs/guides/dashboard.md)** — live performance dashboard
365
+ - **[Multi-Developer Guide](docs/guides/multi-developer.md)** — team handicap and leaderboard
366
+ - **[Cline Setup](docs/guides/cline-setup.md)** — Cline-specific MCP configuration
367
+ - **[Scorecard Template](docs/scorecard-template.md)** — field-by-field reference
179
368
 
180
369
  ## Contributing
181
370
 
@@ -43,10 +43,10 @@ export const GUARD_DOCS = {
43
43
  level: 'full',
44
44
  },
45
45
  'subagent-gate': {
46
- purpose: 'Controls subagent resource usage by forcing haiku model and capping max_turns on Explore/Plan subagents. Prevents expensive long-running subagent calls.',
47
- triggers: 'PreToolUse on Task (Agent tool). Fires when the agent launches a subagent.',
48
- behavior: 'Modifies input overrides model to haiku and caps max_turns for Explore and Plan subagent types.',
49
- configuration: 'guidance.subagentExploreTurns (default: 10), guidance.subagentPlanTurns (default: 15), guidance.subagentAllowModels (default: [\'haiku\']). Disable: add "subagent-gate" to guidance.disabled.',
46
+ purpose: 'Controls subagent resource usage by enforcing model selection on Explore/Plan subagents. Prevents expensive long-running subagent calls.',
47
+ triggers: 'PreToolUse on Agent. Fires when the agent launches a subagent.',
48
+ behavior: 'Blocks subagents using models not in the allowed list. Injects codebase orientation context for allowed subagents.',
49
+ configuration: 'guidance.subagentAllowModels (default: [\'haiku\']). Disable: add "subagent-gate" to guidance.disabled.',
50
50
  level: 'full',
51
51
  },
52
52
  'push-nudge': {
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../src/cli/guards/docs.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAehF,MAAM,CAAC,MAAM,UAAU,GAA6B;IAClD,OAAO,EAAE;QACP,OAAO,EAAE,gKAAgK;QACzK,QAAQ,EAAE,qFAAqF;QAC/F,QAAQ,EAAE,oJAAoJ;QAC9J,aAAa,EAAE,0HAA0H;QACzI,KAAK,EAAE,MAAM;KACd;IACD,MAAM,EAAE;QACN,OAAO,EAAE,8HAA8H;QACvI,QAAQ,EAAE,4EAA4E;QACtF,QAAQ,EAAE,uIAAuI;QACjJ,aAAa,EAAE,qIAAqI;QACpJ,KAAK,EAAE,MAAM;KACd;IACD,cAAc,EAAE;QACd,OAAO,EAAE,kGAAkG;QAC3G,QAAQ,EAAE,wEAAwE;QAClF,QAAQ,EAAE,uHAAuH;QACjI,aAAa,EAAE,+HAA+H;QAC9I,KAAK,EAAE,MAAM;KACd;IACD,aAAa,EAAE;QACb,OAAO,EAAE,wHAAwH;QACjI,QAAQ,EAAE,yEAAyE;QACnF,QAAQ,EAAE,6IAA6I;QACvJ,aAAa,EAAE,wGAAwG;QACvH,KAAK,EAAE,MAAM;KACd;IACD,UAAU,EAAE;QACV,OAAO,EAAE,6IAA6I;QACtJ,QAAQ,EAAE,2EAA2E;QACrF,QAAQ,EAAE,6GAA6G;QACvH,aAAa,EAAE,2IAA2I;QAC1J,KAAK,EAAE,MAAM;KACd;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,wGAAwG;QACjH,QAAQ,EAAE,+CAA+C;QACzD,QAAQ,EAAE,kIAAkI;QAC5I,aAAa,EAAE,iDAAiD;QAChE,KAAK,EAAE,MAAM;KACd;IACD,eAAe,EAAE;QACf,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C,GAAG,CAAC,qBAAqB,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,qBAAqB,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { HookInput, GuardResult } from '../../core/index.js';
2
2
  /**
3
3
  * Subagent gate guard: fires PreToolUse on Agent.
4
- * Enforces model selection on Explore/Plan subagents (Agent tool has no max_turns).
4
+ * Enforces model selection on Explore/Plan subagents.
5
5
  */
6
6
  export declare function subagentGateGuard(input: HookInput, _cwd: string): Promise<GuardResult>;
7
7
  //# sourceMappingURL=subagent-gate.d.ts.map
@@ -31,7 +31,7 @@ function buildOrientation(cwd) {
31
31
  }
32
32
  /**
33
33
  * Subagent gate guard: fires PreToolUse on Agent.
34
- * Enforces model selection on Explore/Plan subagents (Agent tool has no max_turns).
34
+ * Enforces model selection on Explore/Plan subagents.
35
35
  */
36
36
  export async function subagentGateGuard(input, _cwd) {
37
37
  const toolInput = input.tool_input ?? {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slope-dev/slope",
3
- "version": "1.27.0",
3
+ "version": "1.27.1",
4
4
  "description": "Quantified sprint metrics for AI-assisted development. Scorecards, handicap tracking, and real-time agent guidance for Claude Code, Cursor, Windsurf, Cline, and OpenCode.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",