Skip to content

Commit 076bd0c

Browse files
authored
Merge pull request #18 from rohitg00/feat/v1.3.0-claude-code-2.1.49
feat: v1.3.0 — Claude Code 2.1.49 productivity improvements
2 parents 1f6e7f6 + 5e3ff50 commit 076bd0c

14 files changed

Lines changed: 383 additions & 114 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pro-workflow",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "Battle-tested Claude Code workflows with persistent storage and searchable learnings. Self-correcting memory, parallel worktrees, wrap-up rituals, and the 80/20 AI coding ratio.",
55
"author": {
66
"name": "Rohit Ghumare",

.claude-plugin/settings.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
3+
"permissions": {
4+
"allow": [
5+
"Bash(npm run lint)",
6+
"Bash(npm run typecheck)",
7+
"Bash(npm test)",
8+
"Bash(npm test -- *)",
9+
"Bash(pnpm run lint)",
10+
"Bash(pnpm run typecheck)",
11+
"Bash(pnpm test)",
12+
"Bash(pnpm test -- *)",
13+
"Bash(yarn lint)",
14+
"Bash(yarn typecheck)",
15+
"Bash(yarn test)",
16+
"Bash(yarn test -- *)",
17+
"Bash(pytest)",
18+
"Bash(pytest *)",
19+
"Bash(go test ./...)",
20+
"Bash(go test *)",
21+
"Bash(git worktree *)",
22+
"Bash(git status)",
23+
"Bash(git diff *)",
24+
"Bash(git log *)"
25+
]
26+
}
27+
}

.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pro-workflow",
33
"displayName": "Pro Workflow",
4-
"version": "1.2.0",
4+
"version": "1.3.0",
55
"description": "Battle-tested AI coding workflows from power users. Self-correcting memory, parallel worktrees, wrap-up rituals, quality gates, and the 80/20 AI coding ratio. Distilled from real production use.",
66
"author": {
77
"name": "Rohit Ghumare",

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ This skill optimizes for that ratio. Every pattern reduces correction cycles.
1616
| Pattern | What It Does |
1717
|---------|--------------|
1818
| **Self-Correction Loop** | Claude learns from your corrections automatically |
19-
| **Parallel Worktrees** | Zero dead time - work while Claude thinks |
19+
| **Parallel Worktrees** | Zero dead time - native `claude -w` worktrees |
2020
| **Wrap-Up Ritual** | End sessions with intention, capture learnings |
2121
| **Split Memory** | Modular CLAUDE.md for complex projects |
2222
| **80/20 Review** | Batch reviews at checkpoints |
23-
| **Model Selection** | Opus+Thinking for one-shot accuracy |
23+
| **Model Selection** | Opus 4.6 adaptive thinking, Sonnet 4.6 (1M context) |
2424
| **Context Discipline** | Manage your 200k token budget |
2525
| **Learning Log** | Auto-document insights |
2626

@@ -178,10 +178,11 @@ Automated enforcement of workflow patterns.
178178
| PreToolUse | Before git commit/push | Remind about quality gates, wrap-up |
179179
| PostToolUse | After code edits | Check for console.log, TODOs, secrets |
180180
| PostToolUse | After tests | Suggest [LEARN] from failures |
181-
| UserPromptSubmit | Each prompt |Drift detection — warns when straying from original intent |
181+
| UserPromptSubmit | Each prompt | Drift detection — warns when straying from original intent |
182182
| SessionStart | New session | Load learnings from database |
183-
| Stop | Each response | Periodic wrap-up reminders |
183+
| Stop | Each response | Context-aware reminders using `last_assistant_message` |
184184
| SessionEnd | Session close | Save session stats to database |
185+
| ConfigChange | Settings modified | Detect when quality gates or hooks are changed mid-session |
185186

186187
### Install Hooks
187188

@@ -205,7 +206,7 @@ cp -r /tmp/pw/commands/* ~/.claude/commands/
205206
|-------|---------|
206207
| planner | Break down complex tasks |
207208
| reviewer | Code review, security audit |
208-
| scout |Confidence-gated exploration before implementation |
209+
| scout | Background confidence-gated exploration with worktree isolation |
209210

210211
### Agent Teams (Experimental)
211212

@@ -219,7 +220,7 @@ Coordinate multiple Claude Code sessions working together:
219220
- Lead session coordinates, teammates work independently
220221
- Teammates message each other directly
221222
- Shared task list with dependency management
222-
- Display modes: in-process (`Shift+Up/Down`) or split panes (tmux/iTerm2)
223+
- Display modes: in-process (`Shift+Down` to navigate, wraps around) or split panes (tmux/iTerm2)
223224
- Delegate mode (`Shift+Tab`): lead orchestrates only
224225
- Docs: https://code.claude.com/docs/agent-teams
225226
@@ -230,6 +231,7 @@ pro-workflow/
230231
├── .claude-plugin/ # Claude Code plugin
231232
│ ├── plugin.json
232233
│ ├── marketplace.json
234+
│ ├── settings.json # Default permissions for quality gates
233235
│ └── README.md
234236
├── .cursor-plugin/ # Cursor plugin
235237
│ └── plugin.json
@@ -265,7 +267,7 @@ pro-workflow/
265267
│ └── ...
266268
├── hooks/ # Claude Code hooks
267269
│ └── hooks.json
268-
├── scripts/ # Hook scripts
270+
├── scripts/ # Hook scripts (includes config-watcher.js)
269271
├── contexts/ # Context modes
270272
│ ├── dev.md
271273
│ ├── review.md

agents/scout.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
name: scout
33
description: Confidence-gated exploration that assesses readiness before implementation. Scores 0-100 across five dimensions and gives GO/HOLD verdict.
44
tools: ["Read", "Glob", "Grep", "Bash"]
5+
background: true
6+
isolation: worktree
57
---
68

79
# Scout - Confidence-Gated Exploration
810

911
Assess whether there's enough context to implement a task confidently.
1012

13+
Runs in the background so you can continue working while it explores.
14+
1115
## Trigger
1216

1317
Use before starting implementation of unfamiliar or complex tasks.
@@ -52,3 +56,4 @@ VERDICT: GO / HOLD
5256
- Never edit files. Read-only exploration.
5357
- Be honest about gaps. A false GO wastes more time than a HOLD.
5458
- Re-score after gathering context. If still < 70 after 2 rounds, escalate to user.
59+
- Runs in isolated worktree to avoid interfering with main session.

commands/learn.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Learn Claude Code best practices and capture lessons into persistent memory.
1515
- Context window is finite (200k tokens). Use `/context` to check usage.
1616
- Use `/compact` at task boundaries — after planning, after a feature, when >70%.
1717
- Don't compact mid-task. You lose working context.
18+
- Plan mode now survives compaction (fixed in 2.1.49).
1819
- **Docs:** https://code.claude.com/docs/common-workflows
1920
- **Pattern:** Context Discipline (Pattern 7)
2021

@@ -30,6 +31,7 @@ Learn Claude Code best practices and capture lessons into persistent memory.
3031
- **Normal** — Claude asks before edits (default)
3132
- **Auto-Accept** — Claude edits without asking (trusted iteration)
3233
- **Plan** — Research first, then propose plan (complex tasks)
34+
- **Simple** — Bash + Edit tools only (lightweight, no extra overhead)
3335
- Use Plan mode when: >3 files, architecture decisions, multiple approaches, unclear requirements.
3436
- Toggle with `Shift+Tab`.
3537
- **Docs:** https://code.claude.com/docs/common-workflows
@@ -38,21 +40,30 @@ Learn Claude Code best practices and capture lessons into persistent memory.
3840
### CLI Shortcuts
3941
| Shortcut | Action |
4042
|----------|--------|
41-
| `Shift+Tab` | Cycle modes (Normal/Auto-Accept/Plan/Delegate) |
43+
| `Shift+Tab` | Cycle modes (Normal/Auto-Accept/Plan) |
4244
| `Ctrl+L` | Clear screen |
4345
| `Ctrl+C` | Cancel generation |
4446
| `Ctrl+B` | Run task in background |
47+
| `Ctrl+F` | Kill all background agents (two-press confirmation) |
4548
| `Ctrl+T` | Toggle task list (agent teams) |
46-
| `Shift+Up/Down` | Navigate teammates (agent teams) |
49+
| `Shift+Down` | Navigate teammates (wraps around) |
4750
| `Up/Down` | Prompt history |
4851
| `/compact` | Compact context |
4952
| `/context` | Check context usage |
5053
| `/clear` | Clear conversation |
5154
| `/agents` | Manage subagents |
55+
| `/model` | Switch models |
5256
| `/commit` | Smart commit with quality gates |
5357
| `/insights` | Session analytics and patterns |
5458
- **Docs:** https://code.claude.com/docs/cli-reference
5559

60+
### Worktrees
61+
Native worktree support (2.1.49+):
62+
```bash
63+
claude --worktree # or claude -w
64+
```
65+
Creates an isolated git worktree automatically. Subagents support `isolation: worktree` in frontmatter.
66+
5667
### Prompting
5768
Good prompts have four parts:
5869
1. **Scope** — What files/area to work in
@@ -81,8 +92,11 @@ Subagents run in separate context windows for parallel work.
8192
- Use for: parallel exploration, background tasks, independent research.
8293
- Avoid for: single-file reads, tasks needing conversation context.
8394
- Press `Ctrl+B` to send tasks to background.
95+
- Press `Ctrl+F` to kill all background agents (two-press confirmation).
96+
- ESC cancels the main thread only; background agents keep running.
8497
- Create custom subagents in `.claude/agents/` (project) or `~/.claude/agents/` (user).
85-
- Subagents support: custom tools, permission modes, persistent memory, hooks, and skill preloading.
98+
- Subagents support: custom tools, permission modes, persistent memory, hooks, skill preloading, and **worktree isolation**.
99+
- Agent definitions support `background: true` to always run as background tasks.
86100
- Built-in subagents: Explore (fast read-only), Plan (research), general-purpose (multi-step).
87101
- Use `/agents` to manage subagents interactively.
88102
- **Docs:** https://code.claude.com/docs/sub-agents
@@ -94,8 +108,8 @@ Coordinate multiple Claude Code instances working together as a team.
94108
- One lead session coordinates, teammates work independently with their own context windows.
95109
- Teammates can message each other directly (unlike subagents which only report back).
96110
- Shared task list with self-coordination and dependency management.
97-
- Display modes: in-process (Shift+Up/Down to navigate) or split panes (tmux/iTerm2).
98-
- Delegate mode (Shift+Tab): restricts lead to coordination only.
111+
- Display modes: in-process (`Shift+Down` to navigate, wraps around) or split panes (tmux/iTerm2).
112+
- Delegate mode (`Shift+Tab`): restricts lead to coordination only.
99113
- Best for: parallel code review, competing hypotheses debugging, cross-layer changes, research.
100114
- Avoid for: sequential tasks, same-file edits, simple operations.
101115
- **Docs:** https://code.claude.com/docs/agent-teams
@@ -104,21 +118,35 @@ Coordinate multiple Claude Code instances working together as a team.
104118
Claude calibrates reasoning depth to each task automatically.
105119
- Lightweight tasks get quick responses, complex tasks get deep analysis.
106120
- No configuration needed - works out of the box with Opus 4.6.
121+
- Extended thinking is built-in — no need to toggle a separate mode.
122+
123+
### Model Selection
124+
- **Sonnet 4.5 with 1M context has been retired** — switch to Sonnet 4.6 (now has 1M context) via `/model`.
125+
- Opus 4.6 has adaptive thinking built-in.
126+
- Use Haiku 4.5 for quick, read-only exploration subagents.
107127

108128
### Context Compaction
109129
Keeps long-running agents from hitting context limits.
110130
- Auto-compacts at ~95% capacity (configurable via `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`).
111131
- Compact manually at task boundaries with `/compact`.
112132
- Custom subagents support auto-compaction independently.
113133
- Use PreCompact hooks to save state before compaction.
134+
- Plan mode now survives compaction (2.1.49 fix).
114135

115136
### Hooks
116137
Hooks run scripts on events to automate quality enforcement.
117-
- Types: PreToolUse, PostToolUse, SessionStart, SessionEnd, Stop, UserPromptSubmit, PreCompact, SubagentStart, SubagentStop
118-
- Pro-Workflow ships hooks for edit tracking, quality gates, and learning capture.
138+
- Types: PreToolUse, PostToolUse, SessionStart, SessionEnd, Stop, UserPromptSubmit, PreCompact, SubagentStart, SubagentStop, **ConfigChange**, Notification
139+
- **ConfigChange** (2.1.49+): fires when settings files change mid-session — useful for security auditing.
140+
- **Stop hook** now receives `last_assistant_message` for context-aware reminders.
141+
- Pro-Workflow ships hooks for edit tracking, quality gates, config monitoring, and learning capture.
119142
- Subagent hooks: define in frontmatter or settings.json for lifecycle events.
120143
- **Docs:** https://code.claude.com/docs/hooks
121144

145+
### Plugins
146+
- Plugins can ship `settings.json` for default permission configuration (2.1.49+).
147+
- Pro-Workflow ships default permissions for quality gate commands (lint, test, typecheck).
148+
- **Docs:** https://code.claude.com/docs/plugins
149+
122150
### Security
123151
- Review permission requests carefully.
124152
- Don't auto-approve shell commands you don't understand.
@@ -130,6 +158,7 @@ Hooks run scripts on events to automate quality enforcement.
130158
- Keep <10 MCPs enabled, <80 tools total.
131159
- Disable MCPs you're not actively using.
132160
- Each MCP adds context overhead.
161+
- MCP auth failures are now cached to avoid repeated connection attempts.
133162
- **Docs:** https://code.claude.com/docs/mcp
134163

135164
### Integration

commands/parallel.md

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,78 @@
22

33
Set up parallel Claude Code sessions using git worktrees.
44

5+
## Native Worktree Mode (Claude Code 2.1.49+)
6+
7+
Claude Code now has built-in worktree support:
8+
9+
```bash
10+
claude --worktree
11+
claude -w
12+
```
13+
14+
This creates an isolated git worktree automatically and runs Claude inside it. No manual setup needed.
15+
16+
### Subagent Worktree Isolation
17+
18+
Subagents can also run in isolated worktrees:
19+
20+
```yaml
21+
# In .claude/agents/my-agent.md frontmatter
22+
isolation: worktree
23+
```
24+
25+
This gives each subagent its own working copy, preventing file conflicts.
26+
527
## Current State
628
729
```bash
830
git worktree list
931
```
1032

11-
## Create Worktree
33+
## Manual Worktree Setup
34+
35+
For cases where you want more control:
1236

1337
```bash
14-
# For a new feature
1538
git worktree add ../[project]-feat [branch-name]
16-
17-
# For a bugfix
1839
git worktree add ../[project]-fix [branch-name]
19-
20-
# For exploration
2140
git worktree add ../[project]-exp -b experiment
2241
```
2342

2443
## Usage Pattern
2544

2645
```
27-
Terminal 1: ~/project → Main work
28-
Terminal 2: ~/project-feat → Feature development
29-
Terminal 3: ~/project-fix → Bug fixes
46+
Terminal 1: ~/project → Main work (or `claude`)
47+
Terminal 2: ~/project-feat → claude --worktree (auto-isolated)
48+
Terminal 3: ~/project-fix → claude -w (shorthand)
3049
```
3150

3251
Each worktree runs its own Claude session independently.
3352

3453
## When to Use
3554

36-
| Scenario | Action |
37-
|----------|--------|
55+
| Scenario | Recommended Approach |
56+
|----------|---------------------|
57+
| Quick parallel task | `claude -w` (auto worktree) |
3858
| Tests running | Start feature in worktree |
3959
| Long build | Debug in parallel |
4060
| Exploring approaches | Compare 2-3 simultaneously |
4161
| Review + new work | Reviewer in one, dev in other |
62+
| Background exploration | Subagent with `isolation: worktree` |
63+
64+
## Managing Background Agents
65+
66+
- `Ctrl+F` — Kill all background agents (two-press confirmation)
67+
- `Ctrl+B` — Send current task to background
68+
- Background agents continue running when you press ESC
4269

4370
## Cleanup
4471

4572
```bash
46-
# Remove worktree when done
4773
git worktree remove ../[project]-feat
48-
49-
# Clean stale references
5074
git worktree prune
5175
```
5276

5377
---
5478

55-
**Tip:** "Like having a dev team you can clone" - zero dead time.
79+
**Tip:** `claude -w` is the fastest way to parallelize. Like having a dev team you can clone.

config.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
},
3535
"parallel_sessions": {
3636
"suggest_worktrees": true,
37-
"worktree_prefix": "../"
37+
"worktree_prefix": "../",
38+
"native_worktree": true
3839
},
3940
"model_preferences": {
40-
"quick_fixes": "sonnet",
41+
"quick_fixes": "haiku",
42+
"features": "sonnet",
4143
"refactors": "opus",
42-
"architecture": "opus-thinking",
43-
"debugging": "opus-thinking"
44+
"architecture": "opus",
45+
"debugging": "opus"
4446
}
4547
}

hooks/hooks.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-check.js\""
6565
}
6666
],
67-
"description": "Periodic wrap-up reminder and learning prompt"
67+
"description": "Context-aware wrap-up reminders using last_assistant_message"
6868
},
6969
{
7070
"matcher": "*",
@@ -135,6 +135,18 @@
135135
"description": "Save context state before compaction"
136136
}
137137
],
138+
"ConfigChange": [
139+
{
140+
"matcher": "*",
141+
"hooks": [
142+
{
143+
"type": "command",
144+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/config-watcher.js\""
145+
}
146+
],
147+
"description": "Detect when quality gates or hooks are modified mid-session"
148+
}
149+
],
138150
"Notification": [
139151
{
140152
"matcher": "*",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pro-workflow",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "Battle-tested Claude Code workflows with agent teams, smart commit, insights, and searchable learnings",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)