@sienklogic/plan-build-run 2.32.1 → 2.33.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/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to Plan-Build-Run will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.33.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.32.1...plan-build-run-v2.33.0) (2026-02-25)
9
+
10
+
11
+ ### Features
12
+
13
+ * **quick-008:** add block mode to checkNonPbrAgent for stronger enforcement ([57b2117](https://github.com/SienkLogic/plan-build-run/commit/57b2117bda206fd88f7bbf4b89895b6feec422eb))
14
+
8
15
  ## [2.32.1](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.32.0...plan-build-run-v2.32.1) (2026-02-24)
9
16
 
10
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sienklogic/plan-build-run",
3
- "version": "2.32.1",
3
+ "version": "2.33.0",
4
4
  "description": "Plan it, Build it, Run it — structured development workflow for Claude Code",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbr",
3
3
  "displayName": "Plan-Build-Run",
4
- "version": "2.32.1",
4
+ "version": "2.33.0",
5
5
  "description": "Plan-Build-Run — Structured development workflow for GitHub Copilot CLI. Solves context rot through disciplined agent delegation, structured planning, atomic execution, and goal-backward verification.",
6
6
  "author": {
7
7
  "name": "SienkLogic",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbr",
3
3
  "displayName": "Plan-Build-Run",
4
- "version": "2.32.1",
4
+ "version": "2.33.0",
5
5
  "description": "Plan-Build-Run — Structured development workflow for Cursor. Solves context rot through disciplined subagent delegation, structured planning, atomic execution, and goal-backward verification.",
6
6
  "author": {
7
7
  "name": "SienkLogic",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pbr",
3
- "version": "2.32.1",
3
+ "version": "2.33.0",
4
4
  "description": "Plan-Build-Run — Structured development workflow for Claude Code. Solves context rot through disciplined subagent delegation, structured planning, atomic execution, and goal-backward verification.",
5
5
  "author": {
6
6
  "name": "SienkLogic",
@@ -131,11 +131,11 @@ const AGENT_MAPPING = {
131
131
  * - subagent_type is missing/empty (can't determine type)
132
132
  * - Enforcement level is "off"
133
133
  *
134
- * NOTE: This function NEVER blocks Task() blocking is too disruptive.
135
- * It always returns an advisory (exitCode 0) or null.
134
+ * In "advisory" mode (default): returns exitCode 0 with additionalContext.
135
+ * In "block" mode: returns exitCode 2 with decision/reason to hard-block the agent spawn.
136
136
  *
137
137
  * @param {Object} data - parsed hook input from Claude Code
138
- * @returns {null|{ exitCode: 0, output: Object }}
138
+ * @returns {null|{ exitCode: number, output: Object }}
139
139
  */
140
140
  function checkNonPbrAgent(data) {
141
141
  const subagentType = data.tool_input && data.tool_input.subagent_type;
@@ -154,6 +154,22 @@ function checkNonPbrAgent(data) {
154
154
  if (config.level === 'off') return null;
155
155
 
156
156
  const suggestion = AGENT_MAPPING[subagentType] || 'a pbr:* agent (e.g., pbr:researcher, pbr:general, pbr:executor)';
157
+
158
+ if (config.level === 'block') {
159
+ const blockMessage =
160
+ `PBR workflow violation: spawning generic agent "${subagentType}" is blocked. ` +
161
+ `Use ${suggestion} instead. ` +
162
+ 'PBR agents are auto-loaded via subagent_type — just change the type, no extra setup needed. ' +
163
+ 'Set workflow.enforce_pbr_skills: "advisory" in config to allow with warnings.';
164
+
165
+ logHook('enforce-pbr-workflow', 'PreToolUse', 'block', { agentType: subagentType, suggestion });
166
+ return {
167
+ exitCode: 2,
168
+ output: { decision: 'block', reason: '[pbr] ' + blockMessage }
169
+ };
170
+ }
171
+
172
+ // advisory (default)
157
173
  const message =
158
174
  `PBR workflow advisory: spawning generic agent "${subagentType}" without PBR routing. ` +
159
175
  `Use ${suggestion} instead to maintain audit logging and workflow context. ` +