clawpowers 1.1.2 → 1.1.4
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 +197 -313
- package/bin/clawpowers.js +29 -13
- package/docs/quickstart-first-transaction.md +204 -0
- package/package.json +7 -3
- package/runtime/demo/README.md +78 -0
- package/runtime/demo/x402-mock-server.js +1 -1
- package/runtime/init.sh +1 -1
- package/runtime/payments/pipeline.js +455 -0
- package/skill.json +26 -5
- package/skills/agent-bounties/SKILL.md +553 -0
- package/skills/prospecting/SKILL.md +141 -0
- package/skills/using-clawpowers/SKILL.md +6 -1
- package/skills/validator/SKILL.md +281 -0
|
@@ -69,6 +69,8 @@ Skills activate automatically when you recognize a matching task pattern. You do
|
|
|
69
69
|
| Need roundtrip/idempotence/commutativity tests for a pure function | `formal-verification-lite` |
|
|
70
70
|
| Complex task where premium resources would improve quality | `economic-code-optimization` |
|
|
71
71
|
| Deciding whether to pay for expert review or premium model | `economic-code-optimization` |
|
|
72
|
+
| Hiring another agent to complete a task with payment escrow | `agent-bounties` |
|
|
73
|
+
| Want skin-in-the-game guarantees before a multi-agent task | `agent-bounties` |
|
|
72
74
|
|
|
73
75
|
## Reading a Skill
|
|
74
76
|
|
|
@@ -150,6 +152,9 @@ You never need to check the mode. Skills detect it themselves and adapt their in
|
|
|
150
152
|
24. `formal-verification-lite` — Property-based testing (fast-check/Hypothesis) after TDD GREEN; 1000+ iterations per invariant
|
|
151
153
|
25. `economic-code-optimization` — Autonomously spend micro-budgets on premium models, compute, expert reviews when ROI justifies it
|
|
152
154
|
|
|
155
|
+
### Agent Economy Layer (1) — NEW
|
|
156
|
+
26. `agent-bounties` — Post tasks with USDC rewards, escrow both-party collateral via MutualStakeEscrow, verify with automation, release or dispute on-chain
|
|
157
|
+
|
|
153
158
|
## Session Initialization Complete
|
|
154
159
|
|
|
155
|
-
ClawPowers is ready.
|
|
160
|
+
ClawPowers is ready. 26 skills active. Skills activate on pattern recognition. Runtime enhancements available when `~/.clawpowers/` exists. RSI Intelligence Layer (meta-skill-evolution, self-healing-code, cross-project-knowledge, formal-verification-lite) provides persistent learning across sessions and projects. Agent Economy Layer (agent-bounties) enables autonomous agent-to-agent hiring with on-chain escrow.
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validator
|
|
3
|
+
description: Multi-round automated validation pipeline for any software project. Runs 14 rounds of checks — compile gates, lint, tests, security scanning, documentation, secrets detection, link verification, spelling, cross-platform compatibility, dependency health, and PR-readiness. Auto-detects project language. Use before publish, deploy, merge, or external PR submission.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
requires:
|
|
6
|
+
tools: [bash, node, npm]
|
|
7
|
+
optional_tools: [trivy, gitleaks, codespell, markdownlint-cli2, eslint, cargo, go, python3]
|
|
8
|
+
runtime: false
|
|
9
|
+
metrics:
|
|
10
|
+
tracks: [rounds_passed, rounds_failed, rounds_warned, total_issues, critical_issues, test_count, test_pass_rate, type_coverage_pct, vulnerability_count]
|
|
11
|
+
improves: [code_quality, security_posture, documentation_completeness, publish_readiness]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Validator
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- Before `npm publish` / `cargo publish` / any package release
|
|
19
|
+
- Before merging a PR to your own repo
|
|
20
|
+
- Before submitting a PR to an external repo (NVIDIA, Google, CNCF, etc.)
|
|
21
|
+
- After a major refactor or dependency update
|
|
22
|
+
- On any project — auto-detects language from marker files
|
|
23
|
+
|
|
24
|
+
**Skip when:**
|
|
25
|
+
- Trivial docs-only changes (run rounds 5, 8 only)
|
|
26
|
+
- Quick iteration cycles (run round 0 + 2 only: compile + test)
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
Run the Validator on ~/DevDrive/my-project
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Target specific rounds:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
Run Validator round 0-2 on my-project (compile + lint + test only)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
PR-readiness for external submission:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
Run Validator PR-readiness checks on my-project for NVIDIA/NeMo-Agent-Toolkit-Examples
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Language Auto-Detection
|
|
47
|
+
|
|
48
|
+
Detect project type from marker files. When multiple markers exist, run checks for ALL detected languages.
|
|
49
|
+
|
|
50
|
+
| Marker File(s) | Language | Compile | Lint | Test | Security |
|
|
51
|
+
|---|---|---|---|---|---|
|
|
52
|
+
| `package.json` + `tsconfig.json` | TypeScript | `tsc --noEmit` | ESLint | `npm test` | `npm audit` |
|
|
53
|
+
| `package.json` (no tsconfig) | JavaScript | `node --check *.js` | ESLint | `npm test` | `npm audit` |
|
|
54
|
+
| `Cargo.toml` | Rust | `cargo check` | Clippy + rustfmt | `cargo test` | `cargo audit` |
|
|
55
|
+
| `go.mod` | Go | `go build ./...` | golangci-lint | `go test ./...` | `govulncheck` |
|
|
56
|
+
| `pyproject.toml` / `setup.py` | Python | `py_compile` | Ruff + Bandit | pytest | Bandit |
|
|
57
|
+
| `Dockerfile` | Docker | `docker build --check` | Hadolint | — | Trivy |
|
|
58
|
+
| `foundry.toml` | Solidity | `forge build` | `forge fmt --check` | `forge test` | Slither |
|
|
59
|
+
| `*.sh` | Shell | `bash -n` | ShellCheck | — | — |
|
|
60
|
+
|
|
61
|
+
## The 14 Rounds
|
|
62
|
+
|
|
63
|
+
Execute in order. Round 0 is a **blocking gate** — if it fails, stop everything.
|
|
64
|
+
|
|
65
|
+
### Round 0 — Compile Gate (BLOCKING)
|
|
66
|
+
|
|
67
|
+
If this fails, ALL subsequent rounds are blocked. Fix compile errors first.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# TypeScript
|
|
71
|
+
npx tsc --noEmit
|
|
72
|
+
|
|
73
|
+
# JavaScript
|
|
74
|
+
find . -name "*.js" -not -path "*/node_modules/*" -exec node --check {} \;
|
|
75
|
+
|
|
76
|
+
# Rust
|
|
77
|
+
cargo check
|
|
78
|
+
|
|
79
|
+
# Python
|
|
80
|
+
python3 -m py_compile <each .py file>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Pass criteria:** Zero compile errors.
|
|
84
|
+
|
|
85
|
+
### Round 1 — Lint
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# TypeScript/JavaScript
|
|
89
|
+
npx eslint . --ext .ts,.js,.tsx,.jsx 2>&1
|
|
90
|
+
|
|
91
|
+
# Rust
|
|
92
|
+
cargo clippy -- -D warnings
|
|
93
|
+
|
|
94
|
+
# Python
|
|
95
|
+
ruff check . 2>&1
|
|
96
|
+
|
|
97
|
+
# Go
|
|
98
|
+
golangci-lint run ./...
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Pass criteria:** Zero errors. Warnings are advisory.
|
|
102
|
+
|
|
103
|
+
### Round 2 — Test Suite
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Node.js
|
|
107
|
+
npm test
|
|
108
|
+
|
|
109
|
+
# Rust
|
|
110
|
+
cargo test
|
|
111
|
+
|
|
112
|
+
# Python
|
|
113
|
+
pytest -v
|
|
114
|
+
|
|
115
|
+
# Go
|
|
116
|
+
go test ./...
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Pass criteria:** All tests pass. Report total count and pass rate.
|
|
120
|
+
|
|
121
|
+
### Round 3 — Security Audit
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Node.js
|
|
125
|
+
npm audit --audit-level=high
|
|
126
|
+
|
|
127
|
+
# Rust
|
|
128
|
+
cargo audit
|
|
129
|
+
|
|
130
|
+
# Python
|
|
131
|
+
pip-audit
|
|
132
|
+
|
|
133
|
+
# Container
|
|
134
|
+
trivy fs --severity HIGH,CRITICAL .
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Pass criteria:** Zero HIGH or CRITICAL vulnerabilities. LOW/MODERATE are advisory.
|
|
138
|
+
|
|
139
|
+
### Round 4 — Type Coverage
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# TypeScript
|
|
143
|
+
npx type-coverage --at-least 90
|
|
144
|
+
|
|
145
|
+
# JavaScript (JSDoc)
|
|
146
|
+
# Count @param, @returns, @type annotations
|
|
147
|
+
grep -r "@param\|@returns\|@type" --include="*.js" -l | wc -l
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Pass criteria:** ≥90% for TypeScript. For JS, report JSDoc annotation count.
|
|
151
|
+
|
|
152
|
+
### Round 5 — Documentation
|
|
153
|
+
|
|
154
|
+
Check that these exist and are non-trivial:
|
|
155
|
+
- [ ] README.md (≥50 lines)
|
|
156
|
+
- [ ] Version mentioned in README or badge
|
|
157
|
+
- [ ] Installation instructions
|
|
158
|
+
- [ ] Usage examples with real code
|
|
159
|
+
- [ ] License declared (package.json or LICENSE file)
|
|
160
|
+
- [ ] CHANGELOG.md (if versioned package)
|
|
161
|
+
|
|
162
|
+
**Pass criteria:** All items checked.
|
|
163
|
+
|
|
164
|
+
### Round 6 — Changelog
|
|
165
|
+
|
|
166
|
+
- [ ] CHANGELOG.md exists
|
|
167
|
+
- [ ] Current version has an entry
|
|
168
|
+
- [ ] Entry describes what changed (not just "bug fixes")
|
|
169
|
+
|
|
170
|
+
**Pass criteria:** Current version documented.
|
|
171
|
+
|
|
172
|
+
### Round 7 — Secrets Detection
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# gitleaks (git history)
|
|
176
|
+
gitleaks detect --source . -v 2>&1
|
|
177
|
+
|
|
178
|
+
# detect-secrets (current files)
|
|
179
|
+
detect-secrets scan . 2>&1
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Pass criteria:** Zero real secrets. Document false positives (contract addresses, example values) and recommend `.gitleaksignore` entries.
|
|
183
|
+
|
|
184
|
+
### Round 8 — Spelling
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
codespell --skip="node_modules,dist,.git,package-lock.json,*.min.js" .
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Pass criteria:** Zero typos in source code and documentation.
|
|
191
|
+
|
|
192
|
+
### Round 9 — Link Verification
|
|
193
|
+
|
|
194
|
+
Check all URLs in README.md and documentation:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Extract URLs and test each
|
|
198
|
+
grep -oP 'https?://[^\s\)\"]+' README.md | while read url; do
|
|
199
|
+
code=$(curl -o /dev/null -s -w "%{http_code}" "$url")
|
|
200
|
+
if [ "$code" != "200" ] && [ "$code" != "301" ]; then
|
|
201
|
+
echo "BROKEN: $url → $code"
|
|
202
|
+
fi
|
|
203
|
+
done
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Pass criteria:** All links return 200 or 301. Flag example.com/placeholder URLs as advisory.
|
|
207
|
+
|
|
208
|
+
### Round 10 — PR-Readiness (for external submissions)
|
|
209
|
+
|
|
210
|
+
- [ ] Conventional commit messages (`feat:`, `fix:`, `docs:`, etc.)
|
|
211
|
+
- [ ] DCO sign-off on commits (`git commit -s`)
|
|
212
|
+
- [ ] SPDX license headers in source files
|
|
213
|
+
- [ ] No merge commits (rebase-clean history)
|
|
214
|
+
- [ ] Branch is up-to-date with target
|
|
215
|
+
|
|
216
|
+
**Pass criteria:** All items for external PR targets. DCO/SPDX are advisory for own repos.
|
|
217
|
+
|
|
218
|
+
### Round 11 — Cross-Platform Compatibility
|
|
219
|
+
|
|
220
|
+
- [ ] No hardcoded absolute paths
|
|
221
|
+
- [ ] No macOS-only or Linux-only commands without guards
|
|
222
|
+
- [ ] No case-sensitive filename conflicts
|
|
223
|
+
- [ ] `engines` field in package.json (Node.js)
|
|
224
|
+
- [ ] `.env.example` exists if `.env` is used
|
|
225
|
+
|
|
226
|
+
**Pass criteria:** Works on macOS, Linux, and CI runners.
|
|
227
|
+
|
|
228
|
+
### Round 12 — Dependency Health
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# All deps pinned (no * or latest)
|
|
232
|
+
grep -E '"[\*]"|"latest"' package.json
|
|
233
|
+
|
|
234
|
+
# Lock file committed
|
|
235
|
+
ls package-lock.json || ls yarn.lock || ls pnpm-lock.yaml
|
|
236
|
+
|
|
237
|
+
# Clean install
|
|
238
|
+
npm ci --dry-run
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Pass criteria:** Deps pinned, lock file committed, clean install works.
|
|
242
|
+
|
|
243
|
+
### Round 13 — Summary & Verdict
|
|
244
|
+
|
|
245
|
+
Compile results from all rounds:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
## Validator Report — [Project] v[Version]
|
|
249
|
+
|
|
250
|
+
| Round | Check | Result |
|
|
251
|
+
|-------|-------|--------|
|
|
252
|
+
| 0 | Compile | ✅/❌ |
|
|
253
|
+
| 1 | Lint | ✅/⚠️/❌ |
|
|
254
|
+
| ... | ... | ... |
|
|
255
|
+
|
|
256
|
+
**Verdict:** PASS ✅ / WARN ⚠️ / FAIL ❌
|
|
257
|
+
**Score:** X/14 rounds clean
|
|
258
|
+
|
|
259
|
+
Blocking issues: [list or "none"]
|
|
260
|
+
Advisory warnings: [list or "none"]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Verdicts
|
|
264
|
+
|
|
265
|
+
| Verdict | Meaning |
|
|
266
|
+
|---------|---------|
|
|
267
|
+
| **PASS ✅** | All rounds clean. Safe to publish/merge. |
|
|
268
|
+
| **WARN ⚠️** | No blockers but advisory issues exist. Safe to publish, address warnings when convenient. |
|
|
269
|
+
| **FAIL ❌** | Blocking issues in Round 0-3. Fix before proceeding. |
|
|
270
|
+
|
|
271
|
+
## Output
|
|
272
|
+
|
|
273
|
+
Save the full report to `ops/reports/validator-YYYY-MM-DD-HH-<project>.md` in the workspace.
|
|
274
|
+
|
|
275
|
+
## Tips
|
|
276
|
+
|
|
277
|
+
- Run rounds 0-2 frequently during development (fast feedback)
|
|
278
|
+
- Run full 14 rounds before any publish or external PR
|
|
279
|
+
- Round 7 (secrets) is critical before pushing to public repos
|
|
280
|
+
- Round 10 (PR-readiness) only matters for external repo submissions
|
|
281
|
+
- Use `--skip-round N` to skip specific rounds when re-running after fixes
|