@kennethsolomon/shipkit 3.10.1 → 3.11.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/README.md +121 -49
- package/commands/sk/autopilot.md +2 -2
- package/commands/sk/context-budget.md +5 -0
- package/commands/sk/eval.md +5 -0
- package/commands/sk/health.md +5 -0
- package/commands/sk/help.md +32 -8
- package/commands/sk/learn.md +5 -0
- package/commands/sk/resume-session.md +5 -0
- package/commands/sk/safety-guard.md +5 -0
- package/commands/sk/save-session.md +5 -0
- package/commands/sk/security-check.md +2 -2
- package/commands/sk/set-profile.md +8 -0
- package/commands/sk/status.md +4 -9
- package/package.json +1 -1
- package/skills/sk:accessibility/SKILL.md +10 -1
- package/skills/sk:autopilot/SKILL.md +26 -45
- package/skills/sk:brainstorming/SKILL.md +13 -0
- package/skills/sk:context/SKILL.md +11 -15
- package/skills/sk:context-budget/SKILL.md +126 -0
- package/skills/sk:dashboard/SKILL.md +3 -4
- package/skills/sk:dashboard/server.js +0 -65
- package/skills/sk:e2e/SKILL.md +3 -3
- package/skills/sk:eval/SKILL.md +188 -0
- package/skills/sk:fast-track/SKILL.md +0 -9
- package/skills/sk:frontend-design/SKILL.md +232 -0
- package/skills/sk:gates/SKILL.md +2 -3
- package/skills/sk:health/SKILL.md +146 -0
- package/skills/sk:learn/SKILL.md +138 -0
- package/skills/sk:lint/SKILL.md +3 -3
- package/skills/sk:perf/SKILL.md +3 -3
- package/skills/sk:resume-session/SKILL.md +95 -0
- package/skills/sk:retro/SKILL.md +1 -2
- package/skills/sk:review/SKILL.md +2 -2
- package/skills/sk:safety-guard/SKILL.md +134 -0
- package/skills/sk:save-session/SKILL.md +84 -0
- package/skills/sk:setup-claude/SKILL.md +40 -4
- package/skills/sk:setup-claude/scripts/__pycache__/apply_setup_claude.cpython-314.pyc +0 -0
- package/skills/sk:setup-claude/scripts/apply_setup_claude.py +0 -1
- package/skills/sk:setup-claude/templates/.claude/settings.json.template +110 -26
- package/skills/sk:setup-claude/templates/.claude/statusline.sh +1 -15
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +69 -138
- package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +2 -13
- package/skills/sk:setup-claude/templates/hooks/config-protection.sh +71 -0
- package/skills/sk:setup-claude/templates/hooks/console-log-warning.sh +42 -0
- package/skills/sk:setup-claude/templates/hooks/cost-tracker.sh +26 -0
- package/skills/sk:setup-claude/templates/hooks/post-edit-format.sh +53 -0
- package/skills/sk:setup-claude/templates/hooks/pre-compact.sh +1 -12
- package/skills/sk:setup-claude/templates/hooks/safety-guard.sh +72 -0
- package/skills/sk:setup-claude/templates/hooks/session-start.sh +0 -11
- package/skills/sk:setup-claude/templates/hooks/session-stop.sh +0 -7
- package/skills/sk:setup-claude/templates/hooks/suggest-compact.sh +35 -0
- package/skills/sk:setup-claude/tests/__pycache__/test_apply_setup_claude.cpython-314.pyc +0 -0
- package/skills/sk:setup-claude/tests/test_apply_setup_claude.py +2 -33
- package/skills/sk:setup-optimizer/SKILL.md +68 -15
- package/skills/sk:start/SKILL.md +34 -11
- package/skills/sk:test/SKILL.md +3 -3
- package/skills/sk:setup-claude/templates/tasks/workflow-status.md.template +0 -28
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:resume-session
|
|
3
|
+
description: "Resume a previously saved session with full context restoration."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /sk:resume-session — Restore Session Context
|
|
7
|
+
|
|
8
|
+
Lists available saved sessions and restores the selected one, injecting the saved context into the current conversation.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/sk:resume-session # list sessions, pick one
|
|
14
|
+
/sk:resume-session --latest # auto-pick most recent session
|
|
15
|
+
/sk:resume-session --name "auth-flow" # resume specific named session
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Model Routing
|
|
19
|
+
|
|
20
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
21
|
+
|
|
22
|
+
| Profile | Model |
|
|
23
|
+
|---------|-------|
|
|
24
|
+
| `full-sail` | haiku |
|
|
25
|
+
| `quality` | haiku |
|
|
26
|
+
| `balanced` | haiku |
|
|
27
|
+
| `budget` | haiku |
|
|
28
|
+
|
|
29
|
+
> Deserialization is lightweight — haiku is sufficient.
|
|
30
|
+
|
|
31
|
+
## How It Works
|
|
32
|
+
|
|
33
|
+
### Step 1: List Available Sessions
|
|
34
|
+
|
|
35
|
+
Read `.claude/sessions/` and display:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Available sessions:
|
|
39
|
+
|
|
40
|
+
1. [2026-03-25] feat/auth-flow — "auth-flow" (3 hours ago)
|
|
41
|
+
Task: Implement OAuth2 login with Google
|
|
42
|
+
Step: 5 (Write Tests + Implement)
|
|
43
|
+
|
|
44
|
+
2. [2026-03-24] feat/api-redesign — "api-v2" (1 day ago)
|
|
45
|
+
Task: Redesign REST API to v2 spec
|
|
46
|
+
Step: 7 (Gates)
|
|
47
|
+
|
|
48
|
+
3. [2026-03-23] fix/queue-timeout — auto-save (2 days ago)
|
|
49
|
+
Task: Fix Redis queue timeout in production
|
|
50
|
+
Step: 4 (Branch)
|
|
51
|
+
|
|
52
|
+
Select session (1-3) or 'q' to cancel:
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Step 2: Load Session
|
|
56
|
+
|
|
57
|
+
Read the selected session file and inject context:
|
|
58
|
+
|
|
59
|
+
1. **Verify branch** — check if the session's branch still exists
|
|
60
|
+
- If yes: suggest `git checkout [branch]` if not already on it
|
|
61
|
+
- If no: warn that the branch was deleted, proceed with context anyway
|
|
62
|
+
2. **Load task state** — read `tasks/todo.md` and cross-reference with saved state
|
|
63
|
+
3. **Load progress** — read `tasks/progress.md` for the full history
|
|
64
|
+
4. **Restore context** — output the session's findings, open questions, and next steps
|
|
65
|
+
|
|
66
|
+
### Step 3: Report
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Resumed session from 2026-03-25 on branch feat/auth-flow
|
|
70
|
+
|
|
71
|
+
Task: Implement OAuth2 login with Google
|
|
72
|
+
Step: 5 (Write Tests + Implement)
|
|
73
|
+
Commits since save: 2
|
|
74
|
+
|
|
75
|
+
Open Questions:
|
|
76
|
+
- Should we support refresh token rotation?
|
|
77
|
+
- Which scopes are required for profile access?
|
|
78
|
+
|
|
79
|
+
Next Steps:
|
|
80
|
+
- Write integration test for token exchange
|
|
81
|
+
- Implement callback controller
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 4: Continue
|
|
85
|
+
|
|
86
|
+
The workflow continues from wherever it left off. The session file provides enough context to avoid re-reading the entire codebase.
|
|
87
|
+
|
|
88
|
+
## Session Cleanup
|
|
89
|
+
|
|
90
|
+
Sessions older than 30 days are candidates for cleanup. Run manually:
|
|
91
|
+
```bash
|
|
92
|
+
find .claude/sessions/ -name "*.md" -mtime +30 -delete
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Future: add `--cleanup` flag to auto-remove old sessions.
|
package/skills/sk:retro/SKILL.md
CHANGED
|
@@ -23,7 +23,6 @@ Read these files to build the retrospective:
|
|
|
23
23
|
|------|----------------|
|
|
24
24
|
| `tasks/todo.md` | Planned tasks — count total, completed, dropped |
|
|
25
25
|
| `tasks/progress.md` | Work log — errors, resolutions, session timestamps |
|
|
26
|
-
| `tasks/workflow-status.md` | Step-by-step status — attempt counts, skip reasons |
|
|
27
26
|
| `tasks/findings.md` | Design decisions — were they validated? |
|
|
28
27
|
| `tasks/lessons.md` | New lessons added during this task |
|
|
29
28
|
| `tasks/tech-debt.md` | Tech debt logged during gates |
|
|
@@ -51,7 +50,7 @@ git rev-list main..HEAD --count
|
|
|
51
50
|
|--------|-----|
|
|
52
51
|
| **Completion rate** | Completed tasks / Planned tasks * 100 |
|
|
53
52
|
| **Velocity** | Commits per day, files changed per day |
|
|
54
|
-
| **Gate performance** |
|
|
53
|
+
| **Gate performance** | Count fix commits per gate from git log (e.g., `fix(lint):`, `fix(test):`) |
|
|
55
54
|
| **Blocker count** | Count "FAIL", "error", "blocked", "3-Strike" entries in tasks/progress.md |
|
|
56
55
|
| **Rework rate** | Count fix commits (fix(lint):, fix(test):, etc.) vs feature commits |
|
|
57
56
|
|
|
@@ -450,14 +450,14 @@ After presenting the review report, fix **all** findings regardless of severity
|
|
|
450
450
|
Severity: critical | high | medium | low
|
|
451
451
|
```
|
|
452
452
|
|
|
453
|
-
After all in-scope fixes are applied:
|
|
453
|
+
After all in-scope fixes are applied: make ONE squash commit with `fix(review): address review findings`. Do not ask the user. Re-run `/sk:review` from scratch.
|
|
454
454
|
|
|
455
455
|
Loop until the review is completely clean (0 findings across all severities for in-scope code).
|
|
456
456
|
|
|
457
457
|
When clean:
|
|
458
458
|
> "Review complete — 0 findings. Run `/sk:finish-feature` to finalize the branch and create a PR."
|
|
459
459
|
|
|
460
|
-
|
|
460
|
+
> Squash gate commits — collect all fixes for the pass, then one commit. Do not commit after each individual fix.
|
|
461
461
|
|
|
462
462
|
### Fix & Retest Protocol
|
|
463
463
|
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:safety-guard
|
|
3
|
+
description: "Protect against destructive operations with careful, freeze, and guard modes."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /sk:safety-guard — Destructive Operation Protection
|
|
7
|
+
|
|
8
|
+
Three modes of protection that prevent accidental destructive operations and constrain file edits to specific directories.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/sk:safety-guard careful # intercept destructive commands
|
|
14
|
+
/sk:safety-guard freeze --dir src/ # lock edits to src/ only
|
|
15
|
+
/sk:safety-guard guard --dir src/ # both careful + freeze
|
|
16
|
+
/sk:safety-guard off # disable all guards
|
|
17
|
+
/sk:safety-guard status # show current mode
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Model Routing
|
|
21
|
+
|
|
22
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
23
|
+
|
|
24
|
+
| Profile | Model |
|
|
25
|
+
|---------|-------|
|
|
26
|
+
| `full-sail` | haiku |
|
|
27
|
+
| `quality` | haiku |
|
|
28
|
+
| `balanced` | haiku |
|
|
29
|
+
| `budget` | haiku |
|
|
30
|
+
|
|
31
|
+
> Config read/write — haiku is sufficient.
|
|
32
|
+
|
|
33
|
+
## Modes
|
|
34
|
+
|
|
35
|
+
### Careful Mode
|
|
36
|
+
|
|
37
|
+
Intercepts destructive commands before execution:
|
|
38
|
+
|
|
39
|
+
| Command Pattern | Risk |
|
|
40
|
+
|----------------|------|
|
|
41
|
+
| `rm -rf`, `rm -fr` | File deletion |
|
|
42
|
+
| `git push --force`, `git push -f` | History rewrite |
|
|
43
|
+
| `git reset --hard` | Uncommitted changes lost |
|
|
44
|
+
| `git clean -f` | Untracked files deleted |
|
|
45
|
+
| `DROP TABLE`, `DROP DATABASE` | Data loss |
|
|
46
|
+
| `chmod 777`, `chmod -R 777` | Security vulnerability |
|
|
47
|
+
| `--no-verify` | Hook bypass |
|
|
48
|
+
|
|
49
|
+
When a destructive command is detected:
|
|
50
|
+
```
|
|
51
|
+
BLOCKED by safety-guard (careful mode): destructive command detected.
|
|
52
|
+
Command: rm -rf /tmp/build
|
|
53
|
+
Pattern: rm -rf
|
|
54
|
+
Disable: /sk:safety-guard off
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Freeze Mode
|
|
58
|
+
|
|
59
|
+
Locks file edits (Edit/Write tools) to a specific directory tree:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
/sk:safety-guard freeze --dir src/api/
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
After activation:
|
|
66
|
+
- Edit/Write to `src/api/**` → allowed
|
|
67
|
+
- Edit/Write to `src/models/**` → **BLOCKED**
|
|
68
|
+
- Edit/Write to `tests/**` → **BLOCKED**
|
|
69
|
+
- Bash commands → not restricted (use careful mode for that)
|
|
70
|
+
|
|
71
|
+
When a write outside the frozen directory is detected:
|
|
72
|
+
```
|
|
73
|
+
BLOCKED by safety-guard (freeze mode): write outside frozen directory.
|
|
74
|
+
File: tests/api/auth.test.ts
|
|
75
|
+
Allowed: src/api/
|
|
76
|
+
Disable: /sk:safety-guard off
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Guard Mode
|
|
80
|
+
|
|
81
|
+
Combines careful + freeze. Both protections active simultaneously.
|
|
82
|
+
|
|
83
|
+
### Off
|
|
84
|
+
|
|
85
|
+
Disables all guards. Removes `.claude/safety-guard.json`.
|
|
86
|
+
|
|
87
|
+
## Implementation
|
|
88
|
+
|
|
89
|
+
### Configuration File
|
|
90
|
+
|
|
91
|
+
Safety guard state is stored in `.claude/safety-guard.json`:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mode": "guard",
|
|
96
|
+
"freeze_dir": "src/api/",
|
|
97
|
+
"activated_at": "2026-03-25T10:30:00Z",
|
|
98
|
+
"activated_by": "user"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Hook Integration
|
|
103
|
+
|
|
104
|
+
The `safety-guard.sh` hook (deployed to `.claude/hooks/`) reads this config file on every PreToolUse event for Bash/Edit/Write tools. If no config file exists, the hook exits immediately (no overhead).
|
|
105
|
+
|
|
106
|
+
## Steps
|
|
107
|
+
|
|
108
|
+
When invoked:
|
|
109
|
+
|
|
110
|
+
1. Parse the mode argument (`careful` | `freeze` | `guard` | `off` | `status`)
|
|
111
|
+
2. For freeze/guard: require `--dir` argument
|
|
112
|
+
3. Write config to `.claude/safety-guard.json`
|
|
113
|
+
4. Confirm activation:
|
|
114
|
+
```
|
|
115
|
+
Safety guard activated: guard mode
|
|
116
|
+
Freeze directory: src/api/
|
|
117
|
+
Destructive commands: blocked
|
|
118
|
+
Disable: /sk:safety-guard off
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
For `status`:
|
|
122
|
+
```
|
|
123
|
+
Safety guard: guard mode (active since 2026-03-25 10:30)
|
|
124
|
+
Freeze directory: src/api/
|
|
125
|
+
Blocked actions: 3 (2 destructive commands, 1 out-of-scope write)
|
|
126
|
+
Log: .claude/safety-guard.log
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Best Practices
|
|
130
|
+
|
|
131
|
+
- Use **freeze mode** during `/sk:autopilot` to prevent scope creep in file edits
|
|
132
|
+
- Use **careful mode** as a default for new team members
|
|
133
|
+
- Use **guard mode** for production hotfixes — maximum protection
|
|
134
|
+
- Always disable after the focused task is complete
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:save-session
|
|
3
|
+
description: "Save current session state for cross-session continuity."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /sk:save-session — Persist Session State
|
|
7
|
+
|
|
8
|
+
Saves the current session state to `.claude/sessions/` so you can resume work in a future conversation. Essential for EPIC-scope tasks that span multiple sessions.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/sk:save-session # save with auto-generated name
|
|
14
|
+
/sk:save-session --name "auth-flow" # save with custom name
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Model Routing
|
|
18
|
+
|
|
19
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
20
|
+
|
|
21
|
+
| Profile | Model |
|
|
22
|
+
|---------|-------|
|
|
23
|
+
| `full-sail` | haiku |
|
|
24
|
+
| `quality` | haiku |
|
|
25
|
+
| `balanced` | haiku |
|
|
26
|
+
| `budget` | haiku |
|
|
27
|
+
|
|
28
|
+
> Serialization is lightweight — haiku is sufficient.
|
|
29
|
+
|
|
30
|
+
## What Gets Saved
|
|
31
|
+
|
|
32
|
+
The session file captures:
|
|
33
|
+
|
|
34
|
+
```markdown
|
|
35
|
+
---
|
|
36
|
+
saved: [YYYY-MM-DDTHH:MM:SSZ]
|
|
37
|
+
branch: [current git branch]
|
|
38
|
+
task: [current task title from tasks/todo.md]
|
|
39
|
+
step: [current workflow step number]
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Active Task
|
|
43
|
+
[Current task description from tasks/todo.md — first unchecked item]
|
|
44
|
+
|
|
45
|
+
## Branch State
|
|
46
|
+
- Branch: [name]
|
|
47
|
+
- Commits since main: [count]
|
|
48
|
+
- Uncommitted changes: [list of modified files]
|
|
49
|
+
|
|
50
|
+
## Progress Summary
|
|
51
|
+
[Last 10 lines from tasks/progress.md]
|
|
52
|
+
|
|
53
|
+
## Key Findings This Session
|
|
54
|
+
[Any entries added to tasks/findings.md during this session]
|
|
55
|
+
|
|
56
|
+
## Open Questions
|
|
57
|
+
[Questions that were raised but not resolved]
|
|
58
|
+
|
|
59
|
+
## Next Steps
|
|
60
|
+
[What should be done when resuming — derived from todo.md + progress]
|
|
61
|
+
|
|
62
|
+
## Context Notes
|
|
63
|
+
[Any important context that would be lost on session end]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Storage
|
|
67
|
+
|
|
68
|
+
- **Path**: `.claude/sessions/[YYYY-MM-DD]-[branch]-[name].md`
|
|
69
|
+
- **Example**: `.claude/sessions/2026-03-25-feat-auth-flow-auth-flow.md`
|
|
70
|
+
- **Gitignore**: Add `.claude/sessions/` to `.gitignore` (session state is personal, not shared)
|
|
71
|
+
|
|
72
|
+
## Steps
|
|
73
|
+
|
|
74
|
+
1. Read current git state (branch, uncommitted changes, recent commits)
|
|
75
|
+
2. Read `tasks/todo.md` — extract current task and step
|
|
76
|
+
3. Read `tasks/progress.md` — extract recent entries
|
|
77
|
+
4. Read `tasks/findings.md` — extract entries from today
|
|
78
|
+
5. Ask user: "Any open questions or context to preserve?" (optional)
|
|
79
|
+
6. Write session file to `.claude/sessions/`
|
|
80
|
+
7. Confirm save with file path
|
|
81
|
+
|
|
82
|
+
## Auto-Save via Hook
|
|
83
|
+
|
|
84
|
+
The `session-stop.sh` hook automatically saves a minimal session snapshot on every session end. The `/sk:save-session` command creates a richer, more detailed snapshot with user input.
|
|
@@ -22,7 +22,7 @@ After bootstrapping a project, the recommended workflow becomes:
|
|
|
22
22
|
## What Gets Bootstrapped In The Target Repo
|
|
23
23
|
|
|
24
24
|
### Planning / Memory Files (in `tasks/`)
|
|
25
|
-
- `tasks/todo.md` — plan + checkboxes + results
|
|
25
|
+
- `tasks/todo.md` — plan + checkboxes + results (also tracks workflow progress via checkboxes)
|
|
26
26
|
- `tasks/findings.md` — discoveries + decisions
|
|
27
27
|
- `tasks/progress.md` — chronological work log + test results
|
|
28
28
|
- `tasks/lessons.md` — durable “don’t repeat mistakes” log (**never overwrite**)
|
|
@@ -102,6 +102,28 @@ Never overwrite `tasks/lessons.md` — always append.
|
|
|
102
102
|
- `.claude/docs/changelog-guide.md`
|
|
103
103
|
- `.claude/docs/arch-changelog-guide.md`
|
|
104
104
|
|
|
105
|
+
## Phase 0: Reconnaissance (first setup only)
|
|
106
|
+
|
|
107
|
+
On **first-time setup** (no existing `CLAUDE.md` or `tasks/findings.md`), run a reconnaissance pass before stack detection:
|
|
108
|
+
|
|
109
|
+
1. **Directory scan** — list top 2 levels of the project tree (excluding node_modules, vendor, .git, dist, build)
|
|
110
|
+
2. **Entry point detection** — find main.*, index.*, app.*, server.*, manage.py, artisan, Makefile
|
|
111
|
+
3. **Architecture classification**:
|
|
112
|
+
- Monorepo: multiple package.json/go.mod files, `packages/` or `apps/` directory
|
|
113
|
+
- Monolith: single manifest, `src/` or `app/` directory
|
|
114
|
+
- Microservices: `services/` directory with separate manifests
|
|
115
|
+
4. **Data flow trace** — from entry point, identify: request handling → validation → business logic → data persistence
|
|
116
|
+
5. **Output** — append architecture summary to `tasks/findings.md`:
|
|
117
|
+
```
|
|
118
|
+
## Reconnaissance (auto-generated by /sk:setup-claude)
|
|
119
|
+
- Architecture: [monolith/monorepo/microservices]
|
|
120
|
+
- Entry points: [list]
|
|
121
|
+
- Key directories: [list with purposes]
|
|
122
|
+
- Data flow: [request → ... → response]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Skip this phase on re-runs (when `tasks/findings.md` already contains "Reconnaissance").
|
|
126
|
+
|
|
105
127
|
## Generation Inputs
|
|
106
128
|
|
|
107
129
|
This skill detects:
|
|
@@ -309,7 +331,7 @@ Additionally report:
|
|
|
309
331
|
|
|
310
332
|
### Hooks (in `.claude/hooks/`)
|
|
311
333
|
|
|
312
|
-
|
|
334
|
+
**Core hooks** — always deployed from `templates/hooks/` to `.claude/hooks/` (made executable):
|
|
313
335
|
|
|
314
336
|
- `session-start.sh` — runs on SessionStart, loads context
|
|
315
337
|
- `session-stop.sh` — runs on Stop, persists session state
|
|
@@ -318,6 +340,21 @@ Deployed from `templates/hooks/` to `.claude/hooks/` (made executable):
|
|
|
318
340
|
- `validate-push.sh` — PreToolUse hook for `git push*`, confirms before pushing
|
|
319
341
|
- `log-agent.sh` — SubagentStart hook, logs sub-agent launches
|
|
320
342
|
|
|
343
|
+
**Enhanced hooks** — deployed only when user opts in. After deploying core hooks, prompt:
|
|
344
|
+
|
|
345
|
+
> "Install enhanced hooks? These add config protection, auto-formatting, debug statement warnings, compact suggestions, and cost tracking. [y/n]"
|
|
346
|
+
|
|
347
|
+
If yes, deploy these additional hooks:
|
|
348
|
+
|
|
349
|
+
- `config-protection.sh` — PreToolUse hook for Edit/Write, blocks linter/formatter config modifications
|
|
350
|
+
- `post-edit-format.sh` — PostToolUse hook for Edit, auto-formats with project's formatter
|
|
351
|
+
- `console-log-warning.sh` — Stop hook, warns about debug statements in modified files
|
|
352
|
+
- `cost-tracker.sh` — Stop hook (async), logs session metadata to `.claude/sessions/cost-log.jsonl`
|
|
353
|
+
- `suggest-compact.sh` — PreToolUse hook, suggests `/compact` after 50+ tool calls
|
|
354
|
+
- `safety-guard.sh` — PreToolUse hook for Bash/Edit/Write, reads `.claude/safety-guard.json` for protection rules
|
|
355
|
+
|
|
356
|
+
If no, skip enhanced hooks — core hooks are always installed.
|
|
357
|
+
|
|
321
358
|
### Agent Definitions (in `.claude/agents/`)
|
|
322
359
|
|
|
323
360
|
Deployed from `templates/.claude/agents/` (create-if-missing):
|
|
@@ -345,14 +382,13 @@ Deployed from `templates/.claude/rules/` based on detected stack:
|
|
|
345
382
|
Rendered from `templates/.claude/settings.json.template`. Contains:
|
|
346
383
|
- Statusline configuration (points to `.claude/statusline.sh`)
|
|
347
384
|
- Permission allow/deny lists for safe Bash commands
|
|
348
|
-
- Hook wiring for all 6
|
|
385
|
+
- Hook wiring for all hooks (core 6 + enhanced 6 if opted in)
|
|
349
386
|
|
|
350
387
|
### Statusline Generation (`.claude/statusline.sh`)
|
|
351
388
|
|
|
352
389
|
Copied from `templates/.claude/statusline.sh` (made executable). Displays:
|
|
353
390
|
- Context window usage percentage
|
|
354
391
|
- Current model
|
|
355
|
-
- Current workflow step (from `tasks/workflow-status.md`)
|
|
356
392
|
- Git branch
|
|
357
393
|
- Current task name
|
|
358
394
|
|
|
Binary file
|
|
@@ -451,7 +451,6 @@ def apply(
|
|
|
451
451
|
add("templates/tasks/progress.md.template", "tasks/progress.md", "missing")
|
|
452
452
|
add("templates/tasks/lessons.md.template", "tasks/lessons.md", "missing")
|
|
453
453
|
add("templates/tasks/security-findings.md.template", "tasks/security-findings.md", "missing")
|
|
454
|
-
add("templates/tasks/workflow-status.md.template", "tasks/workflow-status.md", "missing")
|
|
455
454
|
add("templates/tasks/cross-platform.md.template", "tasks/cross-platform.md", "missing")
|
|
456
455
|
|
|
457
456
|
# commands (update if generated)
|
|
@@ -26,50 +26,134 @@
|
|
|
26
26
|
"hooks": {
|
|
27
27
|
"SessionStart": [
|
|
28
28
|
{
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
29
|
+
"matcher": "",
|
|
30
|
+
"hooks": [
|
|
31
|
+
{
|
|
32
|
+
"type": "command",
|
|
33
|
+
"command": "bash .claude/hooks/session-start.sh",
|
|
34
|
+
"timeout": 10000
|
|
35
|
+
}
|
|
36
|
+
]
|
|
32
37
|
}
|
|
33
38
|
],
|
|
34
39
|
"PreCompact": [
|
|
35
40
|
{
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
41
|
+
"matcher": "",
|
|
42
|
+
"hooks": [
|
|
43
|
+
{
|
|
44
|
+
"type": "command",
|
|
45
|
+
"command": "bash .claude/hooks/pre-compact.sh",
|
|
46
|
+
"timeout": 10000
|
|
47
|
+
}
|
|
48
|
+
]
|
|
39
49
|
}
|
|
40
50
|
],
|
|
41
51
|
"PreToolUse": [
|
|
42
52
|
{
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
"matcher": "Bash",
|
|
54
|
+
"hooks": [
|
|
55
|
+
{
|
|
56
|
+
"type": "command",
|
|
57
|
+
"command": "bash .claude/hooks/validate-commit.sh",
|
|
58
|
+
"timeout": 10000
|
|
59
|
+
}
|
|
60
|
+
]
|
|
50
61
|
},
|
|
51
62
|
{
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
"matcher": "Bash",
|
|
64
|
+
"hooks": [
|
|
65
|
+
{
|
|
66
|
+
"type": "command",
|
|
67
|
+
"command": "bash .claude/hooks/validate-push.sh",
|
|
68
|
+
"timeout": 5000
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"matcher": "Edit|Write",
|
|
74
|
+
"hooks": [
|
|
75
|
+
{
|
|
76
|
+
"type": "command",
|
|
77
|
+
"command": "bash .claude/hooks/config-protection.sh",
|
|
78
|
+
"timeout": 5000
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"matcher": "Edit|Write",
|
|
84
|
+
"hooks": [
|
|
85
|
+
{
|
|
86
|
+
"type": "command",
|
|
87
|
+
"command": "bash .claude/hooks/suggest-compact.sh",
|
|
88
|
+
"timeout": 3000
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"matcher": "Bash|Edit|Write",
|
|
94
|
+
"hooks": [
|
|
95
|
+
{
|
|
96
|
+
"type": "command",
|
|
97
|
+
"command": "bash .claude/hooks/safety-guard.sh",
|
|
98
|
+
"timeout": 5000
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"PostToolUse": [
|
|
104
|
+
{
|
|
105
|
+
"matcher": "Edit",
|
|
106
|
+
"hooks": [
|
|
107
|
+
{
|
|
108
|
+
"type": "command",
|
|
109
|
+
"command": "bash .claude/hooks/post-edit-format.sh",
|
|
110
|
+
"timeout": 10000
|
|
111
|
+
}
|
|
112
|
+
]
|
|
59
113
|
}
|
|
60
114
|
],
|
|
61
115
|
"SubagentStart": [
|
|
62
116
|
{
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
117
|
+
"matcher": "",
|
|
118
|
+
"hooks": [
|
|
119
|
+
{
|
|
120
|
+
"type": "command",
|
|
121
|
+
"command": "bash .claude/hooks/log-agent.sh",
|
|
122
|
+
"timeout": 5000
|
|
123
|
+
}
|
|
124
|
+
]
|
|
66
125
|
}
|
|
67
126
|
],
|
|
68
127
|
"Stop": [
|
|
69
128
|
{
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
129
|
+
"matcher": "",
|
|
130
|
+
"hooks": [
|
|
131
|
+
{
|
|
132
|
+
"type": "command",
|
|
133
|
+
"command": "bash .claude/hooks/session-stop.sh",
|
|
134
|
+
"timeout": 10000
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"matcher": "",
|
|
140
|
+
"hooks": [
|
|
141
|
+
{
|
|
142
|
+
"type": "command",
|
|
143
|
+
"command": "bash .claude/hooks/console-log-warning.sh",
|
|
144
|
+
"timeout": 10000
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"matcher": "",
|
|
150
|
+
"hooks": [
|
|
151
|
+
{
|
|
152
|
+
"type": "command",
|
|
153
|
+
"command": "bash .claude/hooks/cost-tracker.sh",
|
|
154
|
+
"timeout": 5000
|
|
155
|
+
}
|
|
156
|
+
]
|
|
73
157
|
}
|
|
74
158
|
]
|
|
75
159
|
}
|
|
@@ -26,20 +26,6 @@ fi
|
|
|
26
26
|
# Branch
|
|
27
27
|
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "none")
|
|
28
28
|
|
|
29
|
-
# Current workflow step
|
|
30
|
-
STEP="—"
|
|
31
|
-
if [ -f "tasks/workflow-status.md" ]; then
|
|
32
|
-
NEXT_LINE=$(grep -E ">>\s*next\s*<<" "tasks/workflow-status.md" 2>/dev/null | head -1)
|
|
33
|
-
if [ -n "$NEXT_LINE" ]; then
|
|
34
|
-
# Extract step number and name from table row
|
|
35
|
-
STEP_NUM=$(echo "$NEXT_LINE" | grep -oE '^\|[[:space:]]*[0-9]+' | grep -oE '[0-9]+')
|
|
36
|
-
STEP_NAME=$(echo "$NEXT_LINE" | sed 's/.*| *>> next << *|.*//' | sed 's/|.*//;s/^ *//;s/ *$//')
|
|
37
|
-
if [ -n "$STEP_NUM" ]; then
|
|
38
|
-
STEP="Step ${STEP_NUM}"
|
|
39
|
-
fi
|
|
40
|
-
fi
|
|
41
|
-
fi
|
|
42
|
-
|
|
43
29
|
# Task name from todo.md
|
|
44
30
|
TASK="—"
|
|
45
31
|
if [ -f "tasks/todo.md" ]; then
|
|
@@ -47,4 +33,4 @@ if [ -f "tasks/todo.md" ]; then
|
|
|
47
33
|
fi
|
|
48
34
|
|
|
49
35
|
# Output single line
|
|
50
|
-
echo "[${CTX_PCT}%] ${MODEL} | ${
|
|
36
|
+
echo "[${CTX_PCT}%] ${MODEL} | ${BRANCH} | ${TASK}"
|