5-phase-workflow 1.7.1 → 1.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5-phase-workflow",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "A 5-phase feature development workflow for Claude Code",
5
5
  "bin": {
6
6
  "5-phase-workflow": "bin/install.js"
@@ -18,6 +18,7 @@ HARD CONSTRAINTS — violations waste tokens and get blocked by plan-guard:
18
18
  - NEVER describe HOW something will be implemented (file contents, signatures, class structures)
19
19
  - NEVER spawn Task agents with subagent_type other than Explore
20
20
  - NEVER write to any file except .5/features/{name}/feature.md and .5/.planning-active
21
+ - NEVER call EnterPlanMode — the workflow has its own planning process
21
22
  - The feature spec describes WHAT and WHY, never HOW
22
23
  - If you feel the urge to implement, STOP and ask a clarifying question instead
23
24
  - Your output is a SPECIFICATION, not a design document. No code. No file layouts. No API shapes.
@@ -16,6 +16,7 @@ After creating the plan, you are DONE.
16
16
  HARD CONSTRAINTS — violations waste tokens and get blocked by plan-guard:
17
17
  - NEVER write code, pseudo-code, or implementation snippets
18
18
  - NEVER create source files — you create ONE file: plan.md
19
+ - NEVER call EnterPlanMode — the workflow has its own planning process
19
20
  - NEVER spawn Task agents with subagent_type other than Explore
20
21
  - The plan describes WHAT to build and WHERE. Agents figure out HOW by reading existing code.
21
22
  - Each component in the table gets: name, action, file path, one-sentence description, complexity
@@ -20,8 +20,8 @@ process.stdin.on('end', () => {
20
20
  const data = JSON.parse(input);
21
21
  const toolName = data.tool_name || '';
22
22
 
23
- // Short-circuit: only check Task, Write, and Edit tools
24
- if (toolName !== 'Task' && toolName !== 'Write' && toolName !== 'Edit') {
23
+ // Short-circuit: only check Task, Write, Edit, and EnterPlanMode tools
24
+ if (toolName !== 'Task' && toolName !== 'Write' && toolName !== 'Edit' && toolName !== 'EnterPlanMode') {
25
25
  process.exit(0);
26
26
  }
27
27
 
@@ -41,6 +41,20 @@ process.stdin.on('end', () => {
41
41
  }
42
42
 
43
43
  // Planning mode enforcement
44
+ if (toolName === 'EnterPlanMode') {
45
+ const blockCount = incrementBlockCount(workspaceDir);
46
+ const escalation = blockCount >= 3
47
+ ? ` WARNING: Block #${blockCount}. Repeated violations. Complete your planning artifact and STOP.`
48
+ : '';
49
+ process.stderr.write(
50
+ `BLOCKED: EnterPlanMode is not allowed during workflow planning phases. ` +
51
+ `The 5-phase workflow has its own planning process. ` +
52
+ `REDIRECT: Continue with your current planning task. ` +
53
+ `Write your output to .5/features/{name}/ and output the completion message when done.${escalation}`
54
+ );
55
+ process.exit(2);
56
+ }
57
+
44
58
  if (toolName === 'Task') {
45
59
  const agentType = toolInput.subagent_type || '';
46
60
  if (agentType && agentType !== 'Explore') {
package/src/settings.json CHANGED
@@ -38,7 +38,7 @@
38
38
  ]
39
39
  },
40
40
  {
41
- "matcher": "Task|Write|Edit",
41
+ "matcher": "Task|Write|Edit|EnterPlanMode",
42
42
  "hooks": [
43
43
  {
44
44
  "type": "command",