@canivel/ralph 0.2.0 → 0.2.3

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.
Files changed (39) hide show
  1. package/.agents/ralph/PROMPT_build.md +126 -126
  2. package/.agents/ralph/agents.sh +17 -15
  3. package/.agents/ralph/config.sh +25 -25
  4. package/.agents/ralph/log-activity.sh +15 -15
  5. package/.agents/ralph/loop.sh +1027 -1001
  6. package/.agents/ralph/references/CONTEXT_ENGINEERING.md +126 -126
  7. package/.agents/ralph/references/GUARDRAILS.md +174 -174
  8. package/AGENTS.md +20 -20
  9. package/README.md +270 -266
  10. package/bin/ralph +766 -765
  11. package/diagram.svg +55 -55
  12. package/examples/commands.md +46 -46
  13. package/package.json +39 -39
  14. package/skills/commit/SKILL.md +219 -219
  15. package/skills/commit/references/commit_examples.md +292 -292
  16. package/skills/dev-browser/SKILL.md +211 -211
  17. package/skills/dev-browser/bun.lock +443 -443
  18. package/skills/dev-browser/package-lock.json +2988 -2988
  19. package/skills/dev-browser/package.json +31 -31
  20. package/skills/dev-browser/references/scraping.md +155 -155
  21. package/skills/dev-browser/scripts/start-relay.ts +32 -32
  22. package/skills/dev-browser/scripts/start-server.ts +117 -117
  23. package/skills/dev-browser/server.sh +24 -24
  24. package/skills/dev-browser/src/client.ts +474 -474
  25. package/skills/dev-browser/src/index.ts +287 -287
  26. package/skills/dev-browser/src/relay.ts +731 -731
  27. package/skills/dev-browser/src/snapshot/__tests__/snapshot.test.ts +223 -223
  28. package/skills/dev-browser/src/snapshot/browser-script.ts +877 -877
  29. package/skills/dev-browser/src/snapshot/index.ts +14 -14
  30. package/skills/dev-browser/src/snapshot/inject.ts +13 -13
  31. package/skills/dev-browser/src/types.ts +34 -34
  32. package/skills/dev-browser/tsconfig.json +36 -36
  33. package/skills/dev-browser/vitest.config.ts +12 -12
  34. package/skills/prd/SKILL.md +235 -235
  35. package/tests/agent-loops.mjs +79 -79
  36. package/tests/agent-ping.mjs +39 -39
  37. package/tests/audit.md +56 -56
  38. package/tests/cli-smoke.mjs +47 -47
  39. package/tests/real-agents.mjs +127 -127
@@ -1,219 +1,219 @@
1
- ---
2
- name: commit
3
- description: Write conventional commit messages with type, scope, and subject when the user wants to commit changes or save work.
4
- ---
5
-
6
- # Git Commit
7
-
8
- Creates git commits following Conventional Commits format with proper type, scope, and subject.
9
-
10
- ## Quick Start
11
-
12
- ```bash
13
- # 1. Stage changes
14
- git add <files> # or: git add -A
15
-
16
- # 2. Create commit (branch commit format)
17
- git commit -m "type(scope): subject
18
-
19
- Body explaining HOW and WHY.
20
- Reference: Task X.Y, Req N"
21
- ```
22
-
23
- ## Commit Types
24
-
25
- ### Regular Branch Commits (During Development)
26
-
27
- **Format**: `type(scope): subject`
28
-
29
- | Type | Purpose |
30
- |------|---------|
31
- | `feat` | New feature or functionality |
32
- | `fix` | Bug fix or issue resolution |
33
- | `refactor` | Code refactoring without behavior change |
34
- | `perf` | Performance improvements |
35
- | `test` | Test additions or modifications |
36
- | `ci` | CI/CD configuration changes |
37
- | `docs` | Documentation updates |
38
- | `chore` | Maintenance, dependencies, tooling |
39
- | `style` | Code formatting, linting (non-functional) |
40
- | `security` | Security vulnerability fixes or hardening |
41
-
42
- ### Scope (Required, kebab-case)
43
-
44
- Examples: `validation`, `auth`, `cookie-service`, `template`, `config`, `tests`, `api`
45
-
46
- ### Subject Line Rules
47
-
48
- - Max 50 characters after colon
49
- - Present tense imperative: add, implement, fix, improve, enhance, refactor, remove, prevent
50
- - NO period at the end
51
- - Specific and descriptive - state WHAT, not WHY
52
-
53
- ## Core Workflow
54
-
55
- ### 1. Review Changes
56
-
57
- ```bash
58
- git status
59
- git diff --staged # if already staged
60
- git diff # if not staged
61
- ```
62
-
63
- ### 2. Stage Files
64
-
65
- ```bash
66
- git add <specific-files> # preferred
67
- # or
68
- git add -A # all changes
69
- ```
70
-
71
- **NEVER commit**:
72
- - `.env`, `credentials.json`, secrets
73
- - `node_modules/`, `__pycache__/`, `.venv/`
74
- - Large binary files without explicit approval
75
-
76
- ### 3. Create Commit
77
-
78
- **Simple change**:
79
- ```bash
80
- git commit -m "fix(auth): use hmac.compare_digest for secure comparison"
81
- ```
82
-
83
- **Complex change (with body)**:
84
- ```bash
85
- git commit -m "$(cat <<'EOF'
86
- feat(validation): add URLValidator with domain whitelist
87
-
88
- Implement URLValidator class supporting:
89
- - Domain whitelist enforcement (youtube.com, youtu.be)
90
- - Dangerous scheme blocking (javascript, data, file)
91
- - URL parsing with embedded credentials handling
92
-
93
- Addresses Requirement 31: Input validation
94
- Part of Task 5.1: Input Validation Utilities
95
- EOF
96
- )"
97
- ```
98
-
99
- ### 4. Verify Commit
100
-
101
- ```bash
102
- git log -1 --format="%h %s"
103
- git show --stat HEAD
104
- ```
105
-
106
- ## Body Format (Recommended for Complex Changes)
107
-
108
- ```
109
- <blank line>
110
- Explain HOW and WHY the change was made.
111
- - Use bullet points for multiple items
112
- - Wrap at 72 characters
113
-
114
- Reference: Task X.Y
115
- Addresses: Req N
116
- ```
117
-
118
- ## Git Trailers
119
-
120
- | Trailer | Purpose |
121
- |---------|---------|
122
- | `Fixes #N` | Links and closes issue on merge |
123
- | `Closes #N` | Same as Fixes |
124
- | `Co-authored-by: Name <email>` | Credit co-contributors |
125
-
126
- Place trailers at end of body after blank line. See `references/commit_examples.md` for examples.
127
-
128
- ## Breaking Changes
129
-
130
- For incompatible API/behavior changes, use `!` after scope OR `BREAKING CHANGE:` footer:
131
-
132
- ```
133
- feat(api)!: change response format to JSON:API
134
-
135
- BREAKING CHANGE: Response envelope changed from `{ data }` to `{ data: { type, id, attributes } }`.
136
- ```
137
-
138
- Triggers major version bump in semantic-release.
139
-
140
- ## Merge Commits (PR Closure)
141
-
142
- For PRs, use extended description with sections:
143
-
144
- ```bash
145
- gh pr create --title "feat(security): implement input validation (Task 5)" --body "$(cat <<'EOF'
146
- ## Summary
147
- - Input validation utilities (URLValidator, FormatValidator)
148
- - Secure template processor with path traversal prevention
149
- - API key authentication middleware
150
-
151
- ## Task Breakdown
152
- Task 5.1: Input Validation - URLValidator, FormatValidator
153
- Task 5.2: Template Processing - Path traversal prevention
154
- Task 5.3: API Key Auth - Multi-key support, excluded paths
155
- Task 5.4: Security Tests - 102 path traversal tests
156
-
157
- ## Requirements Covered
158
- Req 7, Req 9, Req 31, Req 33
159
-
160
- ## Test Coverage
161
- - All 473 tests passing
162
- - Coverage: 93%
163
- - Pre-commit checks: passing
164
- EOF
165
- )"
166
- ```
167
-
168
- ## Integration with Other Skills
169
-
170
- ### From github-pr-review
171
-
172
- When fixing review comments, use this format:
173
-
174
- ```bash
175
- git commit -m "fix(scope): address review comment #ID
176
-
177
- Brief explanation of what was wrong and how it's fixed.
178
- Addresses review comment #123456789."
179
- ```
180
-
181
- ### From github-pr-creation
182
-
183
- Before creating PR, ensure all commits follow this format. The PR skill will:
184
- 1. Analyze commits for proper format
185
- 2. Extract types for PR labels
186
- 3. Build PR description from commit bodies
187
-
188
- ## Important Rules
189
-
190
- - **ALWAYS** include scope in parentheses
191
- - **ALWAYS** use present tense imperative verb
192
- - **NEVER** end subject with period
193
- - **NEVER** commit secrets or credentials
194
- - **NEVER** use generic messages ("update code", "fix bug", "changes")
195
- - **NEVER** exceed 50 chars in subject line
196
- - Group related changes -> single focused commit
197
-
198
- ## Examples
199
-
200
- **Good**:
201
- ```
202
- feat(validation): add URLValidator with domain whitelist
203
- fix(auth): use hmac.compare_digest for secure key comparison
204
- refactor(template): consolidate filename sanitization logic
205
- test(security): add 102 path traversal prevention tests
206
- ```
207
-
208
- **Bad**:
209
- ```
210
- update validation code # no type, no scope, vague
211
- feat: add stuff # missing scope, too vague
212
- fix(auth): fix bug # circular, not specific
213
- chore: make changes # missing scope, vague
214
- feat(security): improve things. # has period, vague
215
- ```
216
-
217
- ## References
218
-
219
- - `references/commit_examples.md` - Extended examples by type
1
+ ---
2
+ name: commit
3
+ description: Write conventional commit messages with type, scope, and subject when the user wants to commit changes or save work.
4
+ ---
5
+
6
+ # Git Commit
7
+
8
+ Creates git commits following Conventional Commits format with proper type, scope, and subject.
9
+
10
+ ## Quick Start
11
+
12
+ ```bash
13
+ # 1. Stage changes
14
+ git add <files> # or: git add -A
15
+
16
+ # 2. Create commit (branch commit format)
17
+ git commit -m "type(scope): subject
18
+
19
+ Body explaining HOW and WHY.
20
+ Reference: Task X.Y, Req N"
21
+ ```
22
+
23
+ ## Commit Types
24
+
25
+ ### Regular Branch Commits (During Development)
26
+
27
+ **Format**: `type(scope): subject`
28
+
29
+ | Type | Purpose |
30
+ |------|---------|
31
+ | `feat` | New feature or functionality |
32
+ | `fix` | Bug fix or issue resolution |
33
+ | `refactor` | Code refactoring without behavior change |
34
+ | `perf` | Performance improvements |
35
+ | `test` | Test additions or modifications |
36
+ | `ci` | CI/CD configuration changes |
37
+ | `docs` | Documentation updates |
38
+ | `chore` | Maintenance, dependencies, tooling |
39
+ | `style` | Code formatting, linting (non-functional) |
40
+ | `security` | Security vulnerability fixes or hardening |
41
+
42
+ ### Scope (Required, kebab-case)
43
+
44
+ Examples: `validation`, `auth`, `cookie-service`, `template`, `config`, `tests`, `api`
45
+
46
+ ### Subject Line Rules
47
+
48
+ - Max 50 characters after colon
49
+ - Present tense imperative: add, implement, fix, improve, enhance, refactor, remove, prevent
50
+ - NO period at the end
51
+ - Specific and descriptive - state WHAT, not WHY
52
+
53
+ ## Core Workflow
54
+
55
+ ### 1. Review Changes
56
+
57
+ ```bash
58
+ git status
59
+ git diff --staged # if already staged
60
+ git diff # if not staged
61
+ ```
62
+
63
+ ### 2. Stage Files
64
+
65
+ ```bash
66
+ git add <specific-files> # preferred
67
+ # or
68
+ git add -A # all changes
69
+ ```
70
+
71
+ **NEVER commit**:
72
+ - `.env`, `credentials.json`, secrets
73
+ - `node_modules/`, `__pycache__/`, `.venv/`
74
+ - Large binary files without explicit approval
75
+
76
+ ### 3. Create Commit
77
+
78
+ **Simple change**:
79
+ ```bash
80
+ git commit -m "fix(auth): use hmac.compare_digest for secure comparison"
81
+ ```
82
+
83
+ **Complex change (with body)**:
84
+ ```bash
85
+ git commit -m "$(cat <<'EOF'
86
+ feat(validation): add URLValidator with domain whitelist
87
+
88
+ Implement URLValidator class supporting:
89
+ - Domain whitelist enforcement (youtube.com, youtu.be)
90
+ - Dangerous scheme blocking (javascript, data, file)
91
+ - URL parsing with embedded credentials handling
92
+
93
+ Addresses Requirement 31: Input validation
94
+ Part of Task 5.1: Input Validation Utilities
95
+ EOF
96
+ )"
97
+ ```
98
+
99
+ ### 4. Verify Commit
100
+
101
+ ```bash
102
+ git log -1 --format="%h %s"
103
+ git show --stat HEAD
104
+ ```
105
+
106
+ ## Body Format (Recommended for Complex Changes)
107
+
108
+ ```
109
+ <blank line>
110
+ Explain HOW and WHY the change was made.
111
+ - Use bullet points for multiple items
112
+ - Wrap at 72 characters
113
+
114
+ Reference: Task X.Y
115
+ Addresses: Req N
116
+ ```
117
+
118
+ ## Git Trailers
119
+
120
+ | Trailer | Purpose |
121
+ |---------|---------|
122
+ | `Fixes #N` | Links and closes issue on merge |
123
+ | `Closes #N` | Same as Fixes |
124
+ | `Co-authored-by: Name <email>` | Credit co-contributors |
125
+
126
+ Place trailers at end of body after blank line. See `references/commit_examples.md` for examples.
127
+
128
+ ## Breaking Changes
129
+
130
+ For incompatible API/behavior changes, use `!` after scope OR `BREAKING CHANGE:` footer:
131
+
132
+ ```
133
+ feat(api)!: change response format to JSON:API
134
+
135
+ BREAKING CHANGE: Response envelope changed from `{ data }` to `{ data: { type, id, attributes } }`.
136
+ ```
137
+
138
+ Triggers major version bump in semantic-release.
139
+
140
+ ## Merge Commits (PR Closure)
141
+
142
+ For PRs, use extended description with sections:
143
+
144
+ ```bash
145
+ gh pr create --title "feat(security): implement input validation (Task 5)" --body "$(cat <<'EOF'
146
+ ## Summary
147
+ - Input validation utilities (URLValidator, FormatValidator)
148
+ - Secure template processor with path traversal prevention
149
+ - API key authentication middleware
150
+
151
+ ## Task Breakdown
152
+ Task 5.1: Input Validation - URLValidator, FormatValidator
153
+ Task 5.2: Template Processing - Path traversal prevention
154
+ Task 5.3: API Key Auth - Multi-key support, excluded paths
155
+ Task 5.4: Security Tests - 102 path traversal tests
156
+
157
+ ## Requirements Covered
158
+ Req 7, Req 9, Req 31, Req 33
159
+
160
+ ## Test Coverage
161
+ - All 473 tests passing
162
+ - Coverage: 93%
163
+ - Pre-commit checks: passing
164
+ EOF
165
+ )"
166
+ ```
167
+
168
+ ## Integration with Other Skills
169
+
170
+ ### From github-pr-review
171
+
172
+ When fixing review comments, use this format:
173
+
174
+ ```bash
175
+ git commit -m "fix(scope): address review comment #ID
176
+
177
+ Brief explanation of what was wrong and how it's fixed.
178
+ Addresses review comment #123456789."
179
+ ```
180
+
181
+ ### From github-pr-creation
182
+
183
+ Before creating PR, ensure all commits follow this format. The PR skill will:
184
+ 1. Analyze commits for proper format
185
+ 2. Extract types for PR labels
186
+ 3. Build PR description from commit bodies
187
+
188
+ ## Important Rules
189
+
190
+ - **ALWAYS** include scope in parentheses
191
+ - **ALWAYS** use present tense imperative verb
192
+ - **NEVER** end subject with period
193
+ - **NEVER** commit secrets or credentials
194
+ - **NEVER** use generic messages ("update code", "fix bug", "changes")
195
+ - **NEVER** exceed 50 chars in subject line
196
+ - Group related changes -> single focused commit
197
+
198
+ ## Examples
199
+
200
+ **Good**:
201
+ ```
202
+ feat(validation): add URLValidator with domain whitelist
203
+ fix(auth): use hmac.compare_digest for secure key comparison
204
+ refactor(template): consolidate filename sanitization logic
205
+ test(security): add 102 path traversal prevention tests
206
+ ```
207
+
208
+ **Bad**:
209
+ ```
210
+ update validation code # no type, no scope, vague
211
+ feat: add stuff # missing scope, too vague
212
+ fix(auth): fix bug # circular, not specific
213
+ chore: make changes # missing scope, vague
214
+ feat(security): improve things. # has period, vague
215
+ ```
216
+
217
+ ## References
218
+
219
+ - `references/commit_examples.md` - Extended examples by type