@ranger-testing/ranger-cli 1.0.14 → 1.1.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 +57 -131
- package/build/cli.js +60 -62
- package/build/cli.js.map +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/addEnv.js.map +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/clean.js.map +1 -1
- package/build/commands/dataMcpServer.js +1 -1
- package/build/commands/feature.js +91 -34
- package/build/commands/feature.js.map +1 -1
- package/build/commands/hook.js +27 -0
- package/build/commands/hook.js.map +1 -0
- package/build/commands/hooks/disable.js +25 -0
- package/build/commands/hooks/disable.js.map +1 -0
- package/build/commands/hooks/enable.js +44 -0
- package/build/commands/hooks/enable.js.map +1 -0
- package/build/commands/hooks/exitPlanMode.js +35 -0
- package/build/commands/hooks/exitPlanMode.js.map +1 -0
- package/build/commands/hooks/index.js +10 -0
- package/build/commands/hooks/index.js.map +1 -0
- package/build/commands/hooks/output.js +53 -0
- package/build/commands/hooks/output.js.map +1 -0
- package/build/commands/hooks/planReminder.js +46 -0
- package/build/commands/hooks/planReminder.js.map +1 -0
- package/build/commands/hooks/planStart.js +30 -0
- package/build/commands/hooks/planStart.js.map +1 -0
- package/build/commands/hooks/postEdit.js +41 -0
- package/build/commands/hooks/postEdit.js.map +1 -0
- package/build/commands/hooks/preCompact.js +30 -0
- package/build/commands/hooks/preCompact.js.map +1 -0
- package/build/commands/hooks/sessionStart.js +35 -0
- package/build/commands/hooks/sessionStart.js.map +1 -0
- package/build/commands/hooks/stopHook.js +54 -0
- package/build/commands/hooks/stopHook.js.map +1 -0
- package/build/commands/index.js +1 -3
- package/build/commands/index.js.map +1 -1
- package/build/commands/skillup.js +36 -69
- package/build/commands/skillup.js.map +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/start.js.map +1 -1
- package/build/commands/status.js +17 -21
- package/build/commands/status.js.map +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/updateEnv.js.map +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudePlugin.js +85 -0
- package/build/commands/utils/claudePlugin.js.map +1 -0
- package/build/commands/utils/cliSecret.js +1 -1
- package/build/commands/utils/featureApi.js +23 -0
- package/build/commands/utils/featureApi.js.map +1 -1
- package/build/commands/utils/git.js +44 -0
- package/build/commands/utils/git.js.map +1 -0
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/sessionCache.js +133 -0
- package/build/commands/utils/sessionCache.js.map +1 -0
- package/build/commands/utils/skillContent.js +3 -3
- package/build/commands/utils/skillContent.js.map +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/skills.js.map +1 -1
- package/build/commands/verifyFeature.js +22 -2
- package/build/commands/verifyFeature.js.map +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/build/skills/ranger/SKILL.md +164 -0
- package/build/skills/ranger/create.md +151 -0
- package/build/skills/ranger/start.md +122 -0
- package/build/skills/{feature-tracker → ranger}/verify.md +33 -3
- package/package.json +1 -1
- package/build/commands/postEditHook.js +0 -25
- package/build/commands/postEditHook.js.map +0 -1
- package/build/commands/preCompactHook.js +0 -85
- package/build/commands/preCompactHook.js.map +0 -1
- package/build/commands/sessionStartHook.js +0 -64
- package/build/commands/sessionStartHook.js.map +0 -1
- package/build/commands/utils/mcpConfig.js +0 -1
- package/build/commands/utils/mcpConfig.js.map +0 -1
- package/build/skills/feature-tracker/SKILL.md +0 -163
- package/build/skills/feature-tracker/create.md +0 -114
- package/build/skills/feature-tracker/report.md +0 -159
- package/build/skills/feature-tracker/start.md +0 -93
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ranger
|
|
3
|
+
description: "Ranger's core development workflow for building e2e features. Use this skill for ANY feature development, implementation, or code changes that touches UI. Automatically tracks progress with checklist items, verifies implementations in the browser, and generates completion reports with evidence. Start every coding task by checking for existing features to resume."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Ranger Skill
|
|
7
|
+
|
|
8
|
+
This skill covers three workflows for Ranger feature tracking:
|
|
9
|
+
|
|
10
|
+
## Supported Workflows
|
|
11
|
+
|
|
12
|
+
| Workflow | When to Use | Required Reading |
|
|
13
|
+
|----------|-------------|------------------|
|
|
14
|
+
| **Resuming a Feature** | Starting a session | **MUST read [start.md](./start.md)** |
|
|
15
|
+
| **Creating a Feature** | Starting new UI work | **MUST read [create.md](./create.md)** |
|
|
16
|
+
| **Verifying a Feature** | After implementing UI changes | **MUST read [verify.md](./verify.md)** |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Workflow 1: Resuming a Feature
|
|
21
|
+
|
|
22
|
+
**MANDATORY: Read [start.md](./start.md) at the start of any session.**
|
|
23
|
+
|
|
24
|
+
Use this workflow when:
|
|
25
|
+
- Starting a new coding session
|
|
26
|
+
- Returning to existing work
|
|
27
|
+
- Before creating a new feature (always check first!)
|
|
28
|
+
|
|
29
|
+
### Quick Start
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# List features to find one to resume
|
|
33
|
+
ranger feature list
|
|
34
|
+
|
|
35
|
+
# Resume a specific feature by ID
|
|
36
|
+
ranger feature resume <id>
|
|
37
|
+
|
|
38
|
+
# Add a checklist item if scope expanded (be detailed!)
|
|
39
|
+
ranger feature add-checklist-item "User navigates to /settings, clicks 'Edit Profile', updates display name, clicks Save, sees success toast, refreshes page, and confirms the new name persists"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# Workflow 2: Creating a Ranger Feature
|
|
45
|
+
|
|
46
|
+
**MANDATORY: Read [create.md](./create.md) before creating any feature.**
|
|
47
|
+
|
|
48
|
+
Use this workflow when:
|
|
49
|
+
- Starting new feature development
|
|
50
|
+
- Planning UI changes
|
|
51
|
+
- `ranger feature show` found no match
|
|
52
|
+
- The feature you are developin is not found in `ranger feature list`
|
|
53
|
+
|
|
54
|
+
### Quick Start
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
ranger feature create "<name>" \
|
|
58
|
+
--description "<description>" \
|
|
59
|
+
-c "<E2E checklist item 1>" \
|
|
60
|
+
-c "<E2E checklist item 2>"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Critical: Checklist Items Are E2E Tests
|
|
64
|
+
|
|
65
|
+
Checklist items are **E2E test scenarios**, NOT implementation tasks.
|
|
66
|
+
|
|
67
|
+
❌ **WRONG:** `"Add login form validation"` (implementation task)
|
|
68
|
+
❌ **WRONG:** `"API returns 200"` (backend task)
|
|
69
|
+
✅ **RIGHT:** `"User can log in with valid credentials and see dashboard"` (E2E flow)
|
|
70
|
+
|
|
71
|
+
**You MUST read [create.md](./create.md) for full guidance on writing checklist items.**
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
# Workflow 3: Verifying a Ranger Feature
|
|
76
|
+
|
|
77
|
+
**MANDATORY: Read [verify.md](./verify.md) before verifying any checklist item.**
|
|
78
|
+
|
|
79
|
+
Use this workflow when:
|
|
80
|
+
- You've implemented code for a checklist item
|
|
81
|
+
- Ready to verify the implementation works in a browser
|
|
82
|
+
|
|
83
|
+
### Quick Start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Verify a checklist item
|
|
87
|
+
ranger verify-feature --task "<description of what to verify>"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The verification agent will:
|
|
91
|
+
1. Execute the task in a real browser
|
|
92
|
+
2. Evaluate if the checklist item is satisfied
|
|
93
|
+
3. Mark the item as verified, partial, blocked, or failed
|
|
94
|
+
4. Capture evidence (screenshots, traces)
|
|
95
|
+
|
|
96
|
+
**You MUST read [verify.md](./verify.md) for full guidance on verification.**
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# Finally Report
|
|
101
|
+
|
|
102
|
+
Once you're done verifying, and just before stopping the session, share the feature review link with the user:
|
|
103
|
+
|
|
104
|
+
> Feature explored! All checklist items have been tested.
|
|
105
|
+
> **Link to feature review:** https://dashboard.ranger.net/features/{feature_id}
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
# Development Cycle
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
┌───────────────────────────────────────┐
|
|
113
|
+
│ 1. RESUME OR CREATE FEATURE │ ◀── MUST READ start.md, create.md
|
|
114
|
+
│ • ranger feature list │
|
|
115
|
+
│ • ranger feature resume <id> │
|
|
116
|
+
│ • OR ranger feature create │
|
|
117
|
+
└───────────────────┬───────────────────┘
|
|
118
|
+
│
|
|
119
|
+
▼
|
|
120
|
+
┌───────────────────────┐
|
|
121
|
+
│ │
|
|
122
|
+
│ ┌───────────────┐ │
|
|
123
|
+
│ │ 2. IMPLEMENT │ │ ◀── You write code
|
|
124
|
+
│ │ in code │ │
|
|
125
|
+
│ └───────┬───────┘ │
|
|
126
|
+
│ │ │
|
|
127
|
+
│ ▼ │
|
|
128
|
+
│ ┌───────────────┐ │
|
|
129
|
+
│ │ 3. VERIFY │ │ ◀── MUST READ verify.md
|
|
130
|
+
│ │ in browser │ │
|
|
131
|
+
│ └───────┬───────┘ │
|
|
132
|
+
│ │ │
|
|
133
|
+
│ ▼ │
|
|
134
|
+
│ More items? │
|
|
135
|
+
│ YES ─┘ │
|
|
136
|
+
│ │
|
|
137
|
+
└───────────┬───────────┘
|
|
138
|
+
│ NO (all verified)
|
|
139
|
+
▼
|
|
140
|
+
┌───────────────────────┐
|
|
141
|
+
│ Feature complete │
|
|
142
|
+
└───────────────────────┘
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
# Quick Reference
|
|
148
|
+
|
|
149
|
+
| Command | Purpose |
|
|
150
|
+
|---------|---------|
|
|
151
|
+
| `ranger feature list` | List features (check before creating) |
|
|
152
|
+
| `ranger feature resume <id>` | Resume a specific feature |
|
|
153
|
+
| `ranger feature show` | Show current feature status |
|
|
154
|
+
| `ranger feature create` | Create new feature with checklist |
|
|
155
|
+
| `ranger feature add-checklist-item` | Add a checklist item to active feature |
|
|
156
|
+
| `ranger verify-feature` | Verify checklist item in browser |
|
|
157
|
+
|
|
158
|
+
# Key Principles
|
|
159
|
+
|
|
160
|
+
1. **Read the docs first** - start.md before resuming, create.md before creating, verify.md before verifying
|
|
161
|
+
2. **Always list first** - Run `ranger feature list` at session start before creating new features
|
|
162
|
+
3. **Checklist items are E2E tests** - Not TODO lists, not backend tasks. BE DESCRIPTIVE and unambiguous when detailing the flow to cover.
|
|
163
|
+
4. **Verify after implementing** - Don't skip browser verification
|
|
164
|
+
5. **Link to dashboard** - Whenever you are mentioning a feature, send out the full URL instead of just the feature ID (e.g. https://dashboard.ranger.net/features/{feature_id})
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Creating a New Feature
|
|
2
|
+
|
|
3
|
+
Create a feature when starting new work that doesn't have an existing feature to resume.
|
|
4
|
+
|
|
5
|
+
## Basic Command
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
ranger feature create "<feature name>" \
|
|
9
|
+
--description "<description>" \
|
|
10
|
+
-c "<checklist item 1>" \
|
|
11
|
+
-c "<checklist item 2>"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Use multiple `-c` flags for multiple checklist items. Each item can contain commas.
|
|
15
|
+
|
|
16
|
+
## What Gets Captured Automatically
|
|
17
|
+
|
|
18
|
+
When you create a feature, the CLI automatically captures:
|
|
19
|
+
- **Git repo URL** - From `git remote get-url origin`
|
|
20
|
+
- **Git branch** - From current branch name
|
|
21
|
+
- **Created timestamp**
|
|
22
|
+
- **Your organization** - From API token
|
|
23
|
+
|
|
24
|
+
This enables `ranger feature list` to filter features by git context later.
|
|
25
|
+
|
|
26
|
+
## Writing Good Checklist Items
|
|
27
|
+
|
|
28
|
+
**CRITICAL: Checklist items are E2E test scenarios, NOT a TODO list.**
|
|
29
|
+
|
|
30
|
+
Ranger verifies checklist items by running them in a real browser. Each item must describe a **complete user journey** that can be tested through the UI.
|
|
31
|
+
|
|
32
|
+
### Key Principles
|
|
33
|
+
|
|
34
|
+
1. **E2E flows only** - Each item is a test a QA engineer would run in the browser
|
|
35
|
+
2. **Must be UI-testable** - No backend-only work, no code changes, no infrastructure tasks
|
|
36
|
+
3. **Happy path focus** - Describe the successful user journey, not edge cases
|
|
37
|
+
4. **Keep it minimal** - Prefer 1-2 items; only add more for genuinely distinct flows
|
|
38
|
+
|
|
39
|
+
### What Checklist Items Are NOT
|
|
40
|
+
|
|
41
|
+
❌ **NOT a TODO list** - Don't list implementation tasks
|
|
42
|
+
```
|
|
43
|
+
Bad: "Add validation to form"
|
|
44
|
+
Bad: "Write unit tests"
|
|
45
|
+
Bad: "Refactor auth module"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
❌ **NOT backend features** - Must be verifiable through UI
|
|
49
|
+
```
|
|
50
|
+
Bad: "API returns correct response"
|
|
51
|
+
Bad: "Database migration runs"
|
|
52
|
+
Bad: "Caching layer works"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
❌ **NOT granular UI checks** - Don't check individual elements
|
|
56
|
+
```
|
|
57
|
+
Bad: "Button is visible"
|
|
58
|
+
Bad: "Form has 3 fields"
|
|
59
|
+
Bad: "Error message is red"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### What Checklist Items ARE
|
|
63
|
+
|
|
64
|
+
✅ **Complete E2E user flows** that a QA tester would execute:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Good: "User can log in with valid credentials and see the dashboard"
|
|
68
|
+
Good: "User can add item to cart, proceed to checkout, and complete purchase"
|
|
69
|
+
Good: "User can create a new project, invite a team member, and see them in the members list"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Examples
|
|
73
|
+
|
|
74
|
+
**Bad - implementation tasks:**
|
|
75
|
+
```
|
|
76
|
+
1. Add login endpoint
|
|
77
|
+
2. Create session storage
|
|
78
|
+
3. Build login form component
|
|
79
|
+
4. Add form validation
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Good - E2E flow:**
|
|
83
|
+
```
|
|
84
|
+
1. User can log in with valid email/password and see their dashboard
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Bad - granular checks:**
|
|
88
|
+
```
|
|
89
|
+
1. Export button appears on Reports page
|
|
90
|
+
2. Clicking button opens modal
|
|
91
|
+
3. Modal has format dropdown
|
|
92
|
+
4. Selecting CSV triggers download
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Good - single flow:**
|
|
96
|
+
```
|
|
97
|
+
1. User can navigate to Reports, click Export, select CSV format, and download the file
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### When to Use Multiple Items
|
|
101
|
+
|
|
102
|
+
Only split into multiple items for **genuinely distinct user journeys**:
|
|
103
|
+
|
|
104
|
+
- Adding a button? **1 item** - the complete flow of using it
|
|
105
|
+
- Login + signup? **2 items** - separate user journeys
|
|
106
|
+
- Full CRUD? **3-4 items** - create, read, update, delete are distinct flows
|
|
107
|
+
|
|
108
|
+
## Complete Example
|
|
109
|
+
|
|
110
|
+
**Simple feature (1 item):**
|
|
111
|
+
```bash
|
|
112
|
+
ranger feature create "Add Export Button" \
|
|
113
|
+
--description "Add export functionality to the reports page" \
|
|
114
|
+
-c "Navigate to Reports page, click the new Export button, select CSV format, and verify the file downloads"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Larger feature (multiple items):**
|
|
118
|
+
```bash
|
|
119
|
+
ranger feature create "User Authentication" \
|
|
120
|
+
--description "Login and signup flows for the web app" \
|
|
121
|
+
-c "Go to login page and sign in with valid credentials, verify redirect to dashboard" \
|
|
122
|
+
-c "Go to signup page and create new account, verify welcome email and successful login"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Output
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Creating feature...
|
|
129
|
+
|
|
130
|
+
✅ Feature created: feat_01abc123
|
|
131
|
+
|
|
132
|
+
🔄 User Authentication (feat_01abc123)
|
|
133
|
+
Status: in_progress
|
|
134
|
+
Description: Login and signup flows...
|
|
135
|
+
Repository: github.com/myorg/myapp
|
|
136
|
+
Branch: feature/auth
|
|
137
|
+
Created: 1/21/2026, 10:30:00 AM
|
|
138
|
+
|
|
139
|
+
Checklist:
|
|
140
|
+
1. ⬜ Go to login page and sign in...
|
|
141
|
+
2. ⬜ Go to signup page and create...
|
|
142
|
+
|
|
143
|
+
➡️ Set as active feature
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## After Creation
|
|
147
|
+
|
|
148
|
+
The new feature is automatically set as the active feature. You can now:
|
|
149
|
+
|
|
150
|
+
1. Start implementing the first checklist item
|
|
151
|
+
2. View status with `ranger feature show`
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Starting a Feature Session
|
|
2
|
+
|
|
3
|
+
At the START of any coding session, check if there's an existing feature to resume before creating a new one.
|
|
4
|
+
|
|
5
|
+
## List Features
|
|
6
|
+
|
|
7
|
+
First, check what features exist:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ranger feature list
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or filter to the current git branch:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ranger feature list --current-branch
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This shows feature names, IDs, status, and branch info.
|
|
20
|
+
|
|
21
|
+
## Resume a Feature
|
|
22
|
+
|
|
23
|
+
If you find a pertinent feature to resume:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ranger feature resume <id>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This command:
|
|
30
|
+
1. Sets the feature as active
|
|
31
|
+
2. Starts the session if it's in `ready` status
|
|
32
|
+
3. Displays the feature with its checklist
|
|
33
|
+
|
|
34
|
+
## Check Current Status
|
|
35
|
+
|
|
36
|
+
After resuming, view the full status:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
ranger feature show
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This displays:
|
|
43
|
+
- Feature name and ID
|
|
44
|
+
- Current status (in_progress, blocked, completed)
|
|
45
|
+
- Git context (repo, branch)
|
|
46
|
+
- Checklist with item statuses
|
|
47
|
+
|
|
48
|
+
## Add Checklist Items
|
|
49
|
+
|
|
50
|
+
If you need to add new work to an existing feature:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
ranger feature add-checklist-item "User navigates to /settings, clicks 'Edit Profile', updates their display name, clicks Save, sees success toast, refreshes the page, and confirms the new name persists"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This adds a new pending checklist item to the active feature. Use this when:
|
|
57
|
+
- The scope of work has expanded
|
|
58
|
+
- You discover additional scenarios to verify
|
|
59
|
+
- A review requested additional coverage
|
|
60
|
+
|
|
61
|
+
### Writing Good Checklist Items
|
|
62
|
+
|
|
63
|
+
Checklist items should be **detailed, multi-step E2E flows** that can be verified in a browser:
|
|
64
|
+
|
|
65
|
+
**Bad (too vague):**
|
|
66
|
+
```bash
|
|
67
|
+
ranger feature add-checklist-item "Profile editing works"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Good (detailed flow):**
|
|
71
|
+
```bash
|
|
72
|
+
ranger feature add-checklist-item "User goes to /settings, clicks 'Edit Profile' button, changes display name to 'Test User', clicks Save, sees 'Profile updated' success message, refreshes the page, and verifies the name still shows 'Test User'"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Note:** You cannot add checklist items while a review is in progress.
|
|
76
|
+
|
|
77
|
+
## Decision Tree
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Start Session
|
|
81
|
+
│
|
|
82
|
+
▼
|
|
83
|
+
ranger feature list
|
|
84
|
+
│
|
|
85
|
+
├── Found pertinent feature? ──▶ ranger feature resume <id>
|
|
86
|
+
│ │
|
|
87
|
+
│ ▼
|
|
88
|
+
│ ranger feature show
|
|
89
|
+
│ │
|
|
90
|
+
│ ▼
|
|
91
|
+
│ Continue working
|
|
92
|
+
│
|
|
93
|
+
└── None exist? ──▶ See create.md
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Example
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Start of session - list features
|
|
100
|
+
$ ranger feature list
|
|
101
|
+
|
|
102
|
+
Showing 3 of 3:
|
|
103
|
+
|
|
104
|
+
🔄 User Authentication
|
|
105
|
+
ID: feat_abc123
|
|
106
|
+
Dev Status: In Progress
|
|
107
|
+
Branch: feature/auth
|
|
108
|
+
|
|
109
|
+
# Resume the feature
|
|
110
|
+
$ ranger feature resume feat_abc123
|
|
111
|
+
|
|
112
|
+
✅ Resumed feature: User Authentication (feat_abc123)
|
|
113
|
+
|
|
114
|
+
🔄 User Authentication (feat_abc123)
|
|
115
|
+
Dev Status: In Progress
|
|
116
|
+
Branch: feature/auth
|
|
117
|
+
|
|
118
|
+
Checklist:
|
|
119
|
+
1. ✅ Login flow works
|
|
120
|
+
2. ⬜ Signup creates account
|
|
121
|
+
3. ⬜ Password reset sends email
|
|
122
|
+
```
|
|
@@ -15,8 +15,8 @@ The URL is derived from your active environment's `baseUrl` setting.
|
|
|
15
15
|
`verify-feature` requires an active feature. If you don't have one:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
ranger feature
|
|
19
|
-
ranger feature
|
|
18
|
+
ranger feature list # Find features to resume
|
|
19
|
+
ranger feature resume <id> # Resume a specific feature
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## The Verification Flow
|
|
@@ -71,6 +71,36 @@ After verification, the agent evaluates if the result satisfies the checklist it
|
|
|
71
71
|
| **Blocked** | Bug or error prevents completion | 🛑 Blocked |
|
|
72
72
|
| **Failed** | Task couldn't be executed | ⬜ Pending (issues documented) |
|
|
73
73
|
|
|
74
|
+
## Parallel Verification
|
|
75
|
+
|
|
76
|
+
Run multiple non-conflicting verifications in parallel using background execution.
|
|
77
|
+
|
|
78
|
+
### How to Run
|
|
79
|
+
|
|
80
|
+
Use Bash with `run_in_background: true`:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
[Bash: ranger verify-feature --item 1, run_in_background: true] → task_abc
|
|
84
|
+
[Bash: ranger verify-feature --item 2, run_in_background: true] → task_def
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Poll with TaskOutput, report results as they complete.
|
|
88
|
+
|
|
89
|
+
### Safe to Parallelize
|
|
90
|
+
|
|
91
|
+
- Viewing pages, checking UI elements, navigation tests
|
|
92
|
+
- Read-only operations that don't modify shared state
|
|
93
|
+
|
|
94
|
+
### Do NOT Parallelize
|
|
95
|
+
|
|
96
|
+
- Logout tests (affects auth state for other sessions)
|
|
97
|
+
- Create/delete operations on shared data
|
|
98
|
+
- Tests with dependencies on each other
|
|
99
|
+
|
|
100
|
+
### CRITICAL: No Code Edits During Verification
|
|
101
|
+
|
|
102
|
+
File watchers (Next.js, Vite) will restart the dev server and break active browser sessions. Finish all code changes before running verifications.
|
|
103
|
+
|
|
74
104
|
## Examples
|
|
75
105
|
|
|
76
106
|
### Basic Verification
|
|
@@ -127,7 +157,7 @@ Access evidence via the report or dashboard.
|
|
|
127
157
|
## Troubleshooting
|
|
128
158
|
|
|
129
159
|
### "No active feature"
|
|
130
|
-
Run `ranger feature
|
|
160
|
+
Run `ranger feature list` to find features, then `ranger feature resume <id>` to resume one.
|
|
131
161
|
|
|
132
162
|
### "No active environment"
|
|
133
163
|
Run `ranger use <env-name>` to set an environment with browser access.
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PostToolUse (Write/Edit) hook handler for Claude Code plugin
|
|
3
|
-
*
|
|
4
|
-
* This command is invoked automatically after Write or Edit tools are used.
|
|
5
|
-
* It reminds Claude to verify features with Ranger before stopping the session.
|
|
6
|
-
*/
|
|
7
|
-
export async function postEditHook() {
|
|
8
|
-
try {
|
|
9
|
-
// Output reminder as JSON with additionalContext
|
|
10
|
-
const response = {
|
|
11
|
-
additionalContext: `REMINDER: You just edited a file. Before stopping this session:
|
|
12
|
-
1. If you haven't already, create a Ranger feature: \`ranger feature create "..." -c "..."\`
|
|
13
|
-
2. Verify your changes in the browser: \`ranger verify-feature --task "..."\`
|
|
14
|
-
|
|
15
|
-
The user expects you to NOT stop the session until the feature is fully verified with Ranger.
|
|
16
|
-
Use /feature-tracker for the complete workflow.`,
|
|
17
|
-
};
|
|
18
|
-
console.log(JSON.stringify(response));
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
// Silently fail - don't interrupt the user's workflow
|
|
22
|
-
// Hooks should be non-blocking
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=postEditHook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postEditHook.js","sourceRoot":"","sources":["../../src/commands/postEditHook.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,KAAK,UAAU,YAAY;IAC9B,IAAI,CAAC;QACD,iDAAiD;QACjD,MAAM,QAAQ,GAAG;YACb,iBAAiB,EAAE;;;;;gDAKiB;SACvC,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACL,sDAAsD;QACtD,+BAA+B;IACnC,CAAC;AACL,CAAC"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import { getActiveFeatureId } from './feature.js';
|
|
3
|
-
import { getFeature } from './utils/featureApi.js';
|
|
4
|
-
import { getToken } from './utils/keychain.js';
|
|
5
|
-
import { getFeatureTrackerSkillContent } from './utils/skillContent.js';
|
|
6
|
-
/**
|
|
7
|
-
* Get the current git branch
|
|
8
|
-
*/
|
|
9
|
-
function getGitBranch() {
|
|
10
|
-
try {
|
|
11
|
-
return execSync('git rev-parse --abbrev-ref HEAD', {
|
|
12
|
-
encoding: 'utf-8',
|
|
13
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
14
|
-
}).trim();
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* PreCompact hook handler for Claude Code plugin
|
|
22
|
-
*
|
|
23
|
-
* This command is invoked automatically before Claude Code compacts the conversation.
|
|
24
|
-
* It reminds Claude to preserve Ranger workflow context in the compaction summary.
|
|
25
|
-
*/
|
|
26
|
-
export async function preCompactHook() {
|
|
27
|
-
try {
|
|
28
|
-
// Check if Ranger is configured
|
|
29
|
-
const token = await getToken();
|
|
30
|
-
if (!token) {
|
|
31
|
-
// Silently exit if Ranger isn't configured
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
// Check for active feature and compare git branches
|
|
35
|
-
const featureId = await getActiveFeatureId();
|
|
36
|
-
if (featureId) {
|
|
37
|
-
try {
|
|
38
|
-
const feature = await getFeature(featureId);
|
|
39
|
-
const currentBranch = getGitBranch();
|
|
40
|
-
// If branches don't match, this feature isn't relevant to current work
|
|
41
|
-
if (feature.gitBranch &&
|
|
42
|
-
currentBranch &&
|
|
43
|
-
feature.gitBranch !== currentBranch) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
// Feature may have been deleted or API error, continue with reminder
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const skillContent = getFeatureTrackerSkillContent();
|
|
52
|
-
// Output reminder for compaction summary - mirrors sessionStartHook structure
|
|
53
|
-
console.log('='.repeat(60));
|
|
54
|
-
console.log('RANGER FEATURE TRACKER - INCLUDE IN COMPACTION SUMMARY');
|
|
55
|
-
console.log('='.repeat(60));
|
|
56
|
-
console.log();
|
|
57
|
-
console.log('IMPORTANT: For ANY feature work that touches UI, you MUST use');
|
|
58
|
-
console.log('the /feature-tracker skill to create a feature with a checklist');
|
|
59
|
-
console.log('and verify each item in the browser before completion.');
|
|
60
|
-
console.log();
|
|
61
|
-
console.log('--- SKILL.md START ---');
|
|
62
|
-
console.log(skillContent);
|
|
63
|
-
console.log('--- SKILL.md END ---');
|
|
64
|
-
console.log();
|
|
65
|
-
console.log('=== RANGER FEATURE TRACKING - REQUIRED FOR UI WORK ===');
|
|
66
|
-
console.log();
|
|
67
|
-
console.log('For ANY feature work that touches UI, you MUST create a Ranger feature and verify it.');
|
|
68
|
-
console.log();
|
|
69
|
-
console.log('**IF YOU ARE IN PLAN MODE:**');
|
|
70
|
-
console.log('Before you start making the rest of the plan, add instructions to use Ranger');
|
|
71
|
-
console.log('to verify the feature, assuming the feature requested impacts the UI in some way.');
|
|
72
|
-
console.log();
|
|
73
|
-
console.log('**IF YOU ARE NOT IN PLAN MODE:**');
|
|
74
|
-
console.log('Resume the feature by running: ranger feature resume && ranger feature show');
|
|
75
|
-
console.log('This will find the in-progress feature matching the current git branch');
|
|
76
|
-
console.log('and display the checklist status so you can continue.');
|
|
77
|
-
console.log();
|
|
78
|
-
console.log('=== END RANGER INSTRUCTIONS ===');
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
// Silently fail - don't interrupt compaction
|
|
82
|
-
// Hooks should be non-blocking
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=preCompactHook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preCompactHook.js","sourceRoot":"","sources":["../../src/commands/preCompactHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAExE;;GAEG;AACH,SAAS,YAAY;IACjB,IAAI,CAAC;QACD,OAAO,QAAQ,CAAC,iCAAiC,EAAE;YAC/C,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAClC,CAAC,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAChC,IAAI,CAAC;QACD,gCAAgC;QAChC,MAAM,KAAK,GAAG,MAAM,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,2CAA2C;YAC3C,OAAO;QACX,CAAC;QAED,oDAAoD;QACpD,MAAM,SAAS,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC7C,IAAI,SAAS,EAAE,CAAC;YACZ,IAAI,CAAC;gBACD,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;gBAC5C,MAAM,aAAa,GAAG,YAAY,EAAE,CAAC;gBAErC,uEAAuE;gBACvE,IACI,OAAO,CAAC,SAAS;oBACjB,aAAa;oBACb,OAAO,CAAC,SAAS,KAAK,aAAa,EACrC,CAAC;oBACC,OAAO;gBACX,CAAC;YACL,CAAC;YAAC,MAAM,CAAC;gBACL,qEAAqE;YACzE,CAAC;QACL,CAAC;QAED,MAAM,YAAY,GAAG,6BAA6B,EAAE,CAAC;QAErD,8EAA8E;QAC9E,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CACP,+DAA+D,CAClE,CAAC;QACF,OAAO,CAAC,GAAG,CACP,iEAAiE,CACpE,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CACP,uFAAuF,CAC1F,CAAC;QACF,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CACP,8EAA8E,CACjF,CAAC;QACF,OAAO,CAAC,GAAG,CACP,mFAAmF,CACtF,CAAC;QACF,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CACP,6EAA6E,CAChF,CAAC;QACF,OAAO,CAAC,GAAG,CACP,wEAAwE,CAC3E,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;QACrE,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACL,6CAA6C;QAC7C,+BAA+B;IACnC,CAAC;AACL,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { getFeatureTrackerSkillContent } from './utils/skillContent.js';
|
|
2
|
-
import { getToken } from './utils/keychain.js';
|
|
3
|
-
/**
|
|
4
|
-
* SessionStart hook handler for Claude Code plugin
|
|
5
|
-
*
|
|
6
|
-
* This command is invoked automatically when a new Claude Code session starts.
|
|
7
|
-
* It loads and displays the feature-tracker skill context to help Claude understand the workflow.
|
|
8
|
-
*/
|
|
9
|
-
export async function sessionStartHook() {
|
|
10
|
-
// Check if CLI is configured (has token)
|
|
11
|
-
const token = await getToken();
|
|
12
|
-
if (!token) {
|
|
13
|
-
console.log('='.repeat(60));
|
|
14
|
-
console.log('RANGER SETUP REQUIRED');
|
|
15
|
-
console.log('='.repeat(60));
|
|
16
|
-
console.log();
|
|
17
|
-
console.log('The Ranger CLI is not configured. To get started:');
|
|
18
|
-
console.log();
|
|
19
|
-
console.log('1. Install the CLI (in a regular terminal):');
|
|
20
|
-
console.log(' npm install -g @ranger-testing/ranger-cli');
|
|
21
|
-
console.log();
|
|
22
|
-
console.log('2. Get your API token: https://dashboard.ranger.net/cli');
|
|
23
|
-
console.log();
|
|
24
|
-
console.log('3. Initialize Ranger (in a regular terminal):');
|
|
25
|
-
console.log(' ranger start <your-token>');
|
|
26
|
-
console.log();
|
|
27
|
-
console.log('After setup, restart your Claude Code session.');
|
|
28
|
-
console.log('='.repeat(60));
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const skillContent = getFeatureTrackerSkillContent();
|
|
32
|
-
console.log('='.repeat(60));
|
|
33
|
-
console.log('RANGER FEATURE TRACKER - READ THIS CAREFULLY');
|
|
34
|
-
console.log('='.repeat(60));
|
|
35
|
-
console.log();
|
|
36
|
-
console.log('IMPORTANT: For ANY feature work that touches UI, you MUST use');
|
|
37
|
-
console.log('the /feature-tracker skill to create a feature with a checklist');
|
|
38
|
-
console.log('and verify each item in the browser before completion.');
|
|
39
|
-
console.log();
|
|
40
|
-
console.log('--- SKILL.md START ---');
|
|
41
|
-
console.log(skillContent);
|
|
42
|
-
console.log('--- SKILL.md END ---');
|
|
43
|
-
console.log();
|
|
44
|
-
console.log('='.repeat(60));
|
|
45
|
-
console.log();
|
|
46
|
-
console.log('=== RANGER FEATURE TRACKING - REQUIRED FOR UI WORK ===');
|
|
47
|
-
console.log();
|
|
48
|
-
console.log('For ANY feature work that touches UI, you MUST create a Ranger feature and verify it.');
|
|
49
|
-
console.log();
|
|
50
|
-
console.log('**IF YOU ARE IN PLAN MODE:**');
|
|
51
|
-
console.log('Before you start making the rest of the plan, add instructions to use Ranger');
|
|
52
|
-
console.log('to verify the feature, assuming the feature requested impacts the UI in some way.');
|
|
53
|
-
console.log();
|
|
54
|
-
console.log('**IF YOU ARE NOT IN PLAN MODE:**');
|
|
55
|
-
console.log('ALWAYS create the Ranger feature FIRST with `ranger feature create` before');
|
|
56
|
-
console.log('starting any development work. This way you can track progress and come back to it.');
|
|
57
|
-
console.log('After implementing, verify each item with `ranger verify-feature --task "..."`.');
|
|
58
|
-
console.log();
|
|
59
|
-
console.log('=== END RANGER INSTRUCTIONS ===');
|
|
60
|
-
// TODO: Re-enable active feature context display when ready
|
|
61
|
-
// const featureId = await getActiveFeatureId();
|
|
62
|
-
// if (featureId) { ... }
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=sessionStartHook.js.map
|