clawpowers 1.1.4 → 2.2.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/CHANGELOG.md +126 -0
- package/COMPATIBILITY.md +13 -0
- package/KNOWN_LIMITATIONS.md +19 -0
- package/LICENSE +44 -0
- package/LICENSING.md +10 -0
- package/README.md +378 -210
- package/SECURITY.md +52 -0
- package/dist/index.d.ts +1477 -0
- package/dist/index.js +3464 -0
- package/dist/index.js.map +1 -0
- package/native/Cargo.lock +4863 -0
- package/native/Cargo.toml +73 -0
- package/native/crates/canonical/Cargo.toml +24 -0
- package/native/crates/canonical/src/lib.rs +673 -0
- package/native/crates/compression/Cargo.toml +20 -0
- package/native/crates/compression/benches/compression_bench.rs +42 -0
- package/native/crates/compression/src/lib.rs +393 -0
- package/native/crates/evm-eth/Cargo.toml +13 -0
- package/native/crates/evm-eth/src/lib.rs +105 -0
- package/native/crates/fee/Cargo.toml +15 -0
- package/native/crates/fee/src/lib.rs +281 -0
- package/native/crates/index/Cargo.toml +16 -0
- package/native/crates/index/src/lib.rs +277 -0
- package/native/crates/policy/Cargo.toml +17 -0
- package/native/crates/policy/src/lib.rs +614 -0
- package/native/crates/security/Cargo.toml +22 -0
- package/native/crates/security/src/lib.rs +478 -0
- package/native/crates/tokens/Cargo.toml +13 -0
- package/native/crates/tokens/src/lib.rs +534 -0
- package/native/crates/verification/Cargo.toml +23 -0
- package/native/crates/verification/src/lib.rs +333 -0
- package/native/crates/wallet/Cargo.toml +20 -0
- package/native/crates/wallet/src/lib.rs +261 -0
- package/native/crates/x402/Cargo.toml +30 -0
- package/native/crates/x402/src/lib.rs +423 -0
- package/native/ffi/Cargo.toml +34 -0
- package/native/ffi/build.rs +4 -0
- package/native/ffi/index.node +0 -0
- package/native/ffi/src/lib.rs +352 -0
- package/native/ffi/tests/integration.rs +354 -0
- package/native/pyo3/Cargo.toml +26 -0
- package/native/pyo3/pyproject.toml +16 -0
- package/native/pyo3/src/lib.rs +407 -0
- package/native/pyo3/tests/test_smoke.py +180 -0
- package/native/wasm/Cargo.toml +44 -0
- package/native/wasm/pkg/.gitignore +6 -0
- package/native/wasm/pkg/clawpowers_wasm.d.ts +208 -0
- package/native/wasm/pkg/clawpowers_wasm.js +872 -0
- package/native/wasm/pkg/clawpowers_wasm_bg.wasm +0 -0
- package/native/wasm/pkg/clawpowers_wasm_bg.wasm.d.ts +40 -0
- package/native/wasm/pkg/package.json +17 -0
- package/native/wasm/pkg-node/.gitignore +6 -0
- package/native/wasm/pkg-node/clawpowers_wasm.d.ts +143 -0
- package/native/wasm/pkg-node/clawpowers_wasm.js +798 -0
- package/native/wasm/pkg-node/clawpowers_wasm_bg.wasm +0 -0
- package/native/wasm/pkg-node/clawpowers_wasm_bg.wasm.d.ts +40 -0
- package/native/wasm/pkg-node/package.json +13 -0
- package/native/wasm/src/lib.rs +433 -0
- package/package.json +71 -44
- package/src/skills/catalog.ts +435 -0
- package/src/skills/executor.ts +56 -0
- package/src/skills/index.ts +3 -0
- package/src/skills/itp/SKILL.md +112 -0
- package/src/skills/loader.ts +193 -0
- package/.claude-plugin/manifest.json +0 -19
- package/.codex/INSTALL.md +0 -36
- package/.cursor-plugin/manifest.json +0 -21
- package/.opencode/INSTALL.md +0 -52
- package/ARCHITECTURE.md +0 -69
- package/bin/clawpowers.js +0 -625
- package/bin/clawpowers.sh +0 -91
- package/docs/demo/clawpowers-demo.cast +0 -197
- package/docs/demo/clawpowers-demo.gif +0 -0
- package/docs/launch-images/25-skills-breakdown.jpg +0 -0
- package/docs/launch-images/clawpowers-vs-superpowers.jpg +0 -0
- package/docs/launch-images/economic-code-optimization.jpg +0 -0
- package/docs/launch-images/native-vs-bridge-2.jpg +0 -0
- package/docs/launch-images/native-vs-bridge.jpg +0 -0
- package/docs/launch-images/post1-hero-lobster.jpg +0 -0
- package/docs/launch-images/post2-dashboard.jpg +0 -0
- package/docs/launch-images/post3-superpowers.jpg +0 -0
- package/docs/launch-images/post4-before-after.jpg +0 -0
- package/docs/launch-images/post5-install-now.jpg +0 -0
- package/docs/launch-images/ultimate-stack.jpg +0 -0
- package/docs/launch-posts.md +0 -76
- package/docs/quickstart-first-transaction.md +0 -204
- package/gemini-extension.json +0 -32
- package/hooks/session-start +0 -205
- package/hooks/session-start.cmd +0 -43
- package/hooks/session-start.js +0 -163
- package/runtime/demo/README.md +0 -78
- package/runtime/demo/x402-mock-server.js +0 -230
- package/runtime/feedback/analyze.js +0 -621
- package/runtime/feedback/analyze.sh +0 -546
- package/runtime/init.js +0 -210
- package/runtime/init.sh +0 -178
- package/runtime/metrics/collector.js +0 -361
- package/runtime/metrics/collector.sh +0 -308
- package/runtime/payments/ledger.js +0 -305
- package/runtime/payments/ledger.sh +0 -262
- package/runtime/payments/pipeline.js +0 -455
- package/runtime/persistence/store.js +0 -433
- package/runtime/persistence/store.sh +0 -303
- package/skill.json +0 -106
- package/skills/agent-bounties/SKILL.md +0 -553
- package/skills/agent-payments/SKILL.md +0 -479
- package/skills/brainstorming/SKILL.md +0 -233
- package/skills/content-pipeline/SKILL.md +0 -282
- package/skills/cross-project-knowledge/SKILL.md +0 -345
- package/skills/dispatching-parallel-agents/SKILL.md +0 -305
- package/skills/economic-code-optimization/SKILL.md +0 -265
- package/skills/executing-plans/SKILL.md +0 -255
- package/skills/finishing-a-development-branch/SKILL.md +0 -260
- package/skills/formal-verification-lite/SKILL.md +0 -441
- package/skills/learn-how-to-learn/SKILL.md +0 -235
- package/skills/market-intelligence/SKILL.md +0 -323
- package/skills/meta-skill-evolution/SKILL.md +0 -325
- package/skills/prospecting/SKILL.md +0 -454
- package/skills/receiving-code-review/SKILL.md +0 -225
- package/skills/requesting-code-review/SKILL.md +0 -206
- package/skills/security-audit/SKILL.md +0 -353
- package/skills/self-healing-code/SKILL.md +0 -369
- package/skills/subagent-driven-development/SKILL.md +0 -244
- package/skills/systematic-debugging/SKILL.md +0 -355
- package/skills/test-driven-development/SKILL.md +0 -416
- package/skills/using-clawpowers/SKILL.md +0 -160
- package/skills/using-git-worktrees/SKILL.md +0 -261
- package/skills/validator/SKILL.md +0 -281
- package/skills/verification-before-completion/SKILL.md +0 -254
- package/skills/writing-plans/SKILL.md +0 -276
- package/skills/writing-skills/SKILL.md +0 -260
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: using-git-worktrees
|
|
3
|
-
description: Manage isolated Git worktrees for parallel branch development. Activate when you need to work on multiple branches simultaneously or isolate subagent work.
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
requires:
|
|
6
|
-
tools: [git, bash]
|
|
7
|
-
runtime: false
|
|
8
|
-
metrics:
|
|
9
|
-
tracks: [worktrees_created, conflicts_encountered, isolation_violations, lifecycle_completion_rate]
|
|
10
|
-
improves: [conflict_prediction, worktree_naming, cleanup_timing]
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Using Git Worktrees
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
|
|
17
|
-
Apply this skill when:
|
|
18
|
-
|
|
19
|
-
- Working on 2+ branches simultaneously without switching
|
|
20
|
-
- Running subagents in parallel (each needs its own working directory)
|
|
21
|
-
- Testing a feature while bug-fixing on another branch
|
|
22
|
-
- Reviewing a colleague's branch while continuing your own work
|
|
23
|
-
- Running long-running processes (tests, builds) on one branch while editing another
|
|
24
|
-
|
|
25
|
-
**Skip when:**
|
|
26
|
-
- You only have one branch active at a time
|
|
27
|
-
- Your editor doesn't handle multiple root directories well
|
|
28
|
-
- The branches share files that would conflict on disk (same path, different content)
|
|
29
|
-
|
|
30
|
-
## Core Methodology
|
|
31
|
-
|
|
32
|
-
### Understanding Worktrees
|
|
33
|
-
|
|
34
|
-
A Git worktree is a separate working directory linked to the same repository. Each worktree:
|
|
35
|
-
- Has its own checked-out branch
|
|
36
|
-
- Has its own working tree state (staged/unstaged changes)
|
|
37
|
-
- Shares the repository's history, objects, and refs
|
|
38
|
-
- Cannot have the same branch checked out as another worktree
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
.git/ ← Shared repository database
|
|
42
|
-
worktrees/
|
|
43
|
-
feature-auth/ ← Worktree metadata
|
|
44
|
-
feature-payments/ ← Worktree metadata
|
|
45
|
-
|
|
46
|
-
../feature-auth/ ← Separate directory on disk
|
|
47
|
-
src/
|
|
48
|
-
tests/
|
|
49
|
-
|
|
50
|
-
../feature-payments/ ← Separate directory on disk
|
|
51
|
-
src/
|
|
52
|
-
tests/
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Worktree Lifecycle
|
|
56
|
-
|
|
57
|
-
#### Create
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
# Create worktree for existing branch
|
|
61
|
-
git worktree add ../feature-auth feature/auth-service
|
|
62
|
-
|
|
63
|
-
# Create worktree and new branch simultaneously
|
|
64
|
-
git worktree add -b feature/payments ../feature-payments main
|
|
65
|
-
|
|
66
|
-
# Create worktree from specific commit
|
|
67
|
-
git worktree add ../hotfix-3.1 v3.1.0
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Naming convention for parallel subagent work:**
|
|
71
|
-
```bash
|
|
72
|
-
# Use task or feature name as both branch and directory
|
|
73
|
-
git worktree add ../clawpowers-task-auth feature/task-auth
|
|
74
|
-
git worktree add ../clawpowers-task-db feature/task-db
|
|
75
|
-
git worktree add ../clawpowers-task-api feature/task-api
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
#### Verify
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
git worktree list
|
|
82
|
-
# output:
|
|
83
|
-
# /Users/you/project a3f9b2c [main]
|
|
84
|
-
# /Users/you/feature-auth 0000000 [feature/auth-service]
|
|
85
|
-
# /Users/you/feature-payments 0000000 [feature/payments]
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
#### Work in the Worktree
|
|
89
|
-
|
|
90
|
-
Each worktree is a full working directory. Navigate to it and work normally:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
cd ../feature-auth
|
|
94
|
-
git status # Independent of main working tree
|
|
95
|
-
git add src/auth.py
|
|
96
|
-
git commit -m "feat(auth): implement JWT issuance"
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Changes in one worktree are invisible to others until merged.
|
|
100
|
-
|
|
101
|
-
#### Sync with Main
|
|
102
|
-
|
|
103
|
-
When you need to update a worktree with latest main:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
cd ../feature-auth
|
|
107
|
-
git fetch origin
|
|
108
|
-
git rebase origin/main # Preferred: linear history
|
|
109
|
-
# or
|
|
110
|
-
git merge origin/main # If rebase would cause conflicts
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Run `git worktree list` first — if another worktree has the same base, check for merge conflicts proactively.
|
|
114
|
-
|
|
115
|
-
#### Cleanup
|
|
116
|
-
|
|
117
|
-
When the branch is merged:
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
# From main repository directory
|
|
121
|
-
git worktree remove ../feature-auth # Removes directory
|
|
122
|
-
git branch -d feature/auth-service # Remove branch
|
|
123
|
-
|
|
124
|
-
# If the worktree has uncommitted changes and you want to force:
|
|
125
|
-
git worktree remove --force ../feature-auth
|
|
126
|
-
|
|
127
|
-
# List remaining worktrees to verify
|
|
128
|
-
git worktree list
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**Cleanup checklist:**
|
|
132
|
-
- [ ] Branch is merged to main (or PR is approved)
|
|
133
|
-
- [ ] Worktree has no uncommitted changes
|
|
134
|
-
- [ ] No processes are running in the worktree directory
|
|
135
|
-
- [ ] Remove directory, then remove branch
|
|
136
|
-
|
|
137
|
-
### Conflict Prevention
|
|
138
|
-
|
|
139
|
-
Worktrees share the index but have separate working trees. Common conflicts:
|
|
140
|
-
|
|
141
|
-
**Same branch in two worktrees:** Git prevents this — you'll get an error:
|
|
142
|
-
```
|
|
143
|
-
fatal: 'feature/auth-service' is already checked out
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
**Solution:** Use separate branches even for related work.
|
|
147
|
-
|
|
148
|
-
**Both worktrees editing the same file:** Legal, but merging will require conflict resolution:
|
|
149
|
-
```bash
|
|
150
|
-
# Check overlap before creating worktrees
|
|
151
|
-
git diff --name-only main..feature/branch-a
|
|
152
|
-
git diff --name-only main..feature/branch-b
|
|
153
|
-
# If outputs overlap, consider sequential rather than parallel work
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**Submodule issues:** Worktrees and submodules interact poorly. If your repo uses submodules, test worktree creation in a non-submodule path first.
|
|
157
|
-
|
|
158
|
-
### Pattern: Subagent Work Isolation
|
|
159
|
-
|
|
160
|
-
The primary ClawPowers use case: give each subagent its own worktree.
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
# Main orchestrator creates worktrees
|
|
164
|
-
TASKS=("auth" "db" "api" "tests")
|
|
165
|
-
for task in "${TASKS[@]}"; do
|
|
166
|
-
git worktree add "../${REPO_NAME}-task-${task}" -b "feature/task-${task}" main
|
|
167
|
-
echo "Created worktree for task-${task} at ../${REPO_NAME}-task-${task}"
|
|
168
|
-
done
|
|
169
|
-
|
|
170
|
-
# Each subagent receives its worktree path
|
|
171
|
-
# Subagent-auth works in: ../project-task-auth/
|
|
172
|
-
# Subagent-db works in: ../project-task-db/
|
|
173
|
-
# They cannot interfere with each other's files
|
|
174
|
-
|
|
175
|
-
# After all subagents complete, merge in dependency order
|
|
176
|
-
MERGE_ORDER=("db" "auth" "api" "tests")
|
|
177
|
-
git checkout main
|
|
178
|
-
for task in "${MERGE_ORDER[@]}"; do
|
|
179
|
-
git merge --no-ff "feature/task-${task}" -m "merge: task-${task}"
|
|
180
|
-
git worktree remove "../${REPO_NAME}-task-${task}"
|
|
181
|
-
git branch -d "feature/task-${task}"
|
|
182
|
-
done
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Pattern: Hotfix While Feature Work Continues
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
# You're in the middle of a long feature
|
|
189
|
-
git worktree list
|
|
190
|
-
# /Users/you/project [feature/auth-service]
|
|
191
|
-
|
|
192
|
-
# Production alert fires — need to hotfix
|
|
193
|
-
git worktree add ../hotfix main
|
|
194
|
-
cd ../hotfix
|
|
195
|
-
# ... fix the bug ...
|
|
196
|
-
git commit -m "fix: critical payment timeout in production"
|
|
197
|
-
git push origin hotfix/payment-timeout
|
|
198
|
-
# PR/merge the hotfix from this worktree
|
|
199
|
-
|
|
200
|
-
# Back to feature work
|
|
201
|
-
cd ../project # Original feature work untouched
|
|
202
|
-
git status # Clean, feature work is exactly where you left it
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## ClawPowers Enhancement
|
|
206
|
-
|
|
207
|
-
When `~/.clawpowers/` runtime is initialized:
|
|
208
|
-
|
|
209
|
-
**Worktree Lifecycle Management:**
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
# Register a worktree
|
|
213
|
-
bash runtime/persistence/store.sh set "worktree:task-auth:path" "../project-task-auth"
|
|
214
|
-
bash runtime/persistence/store.sh set "worktree:task-auth:branch" "feature/task-auth"
|
|
215
|
-
bash runtime/persistence/store.sh set "worktree:task-auth:status" "active"
|
|
216
|
-
bash runtime/persistence/store.sh set "worktree:task-auth:created_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
217
|
-
|
|
218
|
-
# List all active worktrees with their status
|
|
219
|
-
bash runtime/persistence/store.sh list "worktree:*:status"
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
If a session is interrupted, the worktree registry shows which are active and which branches they hold — preventing orphaned worktrees.
|
|
223
|
-
|
|
224
|
-
**Conflict Prediction:**
|
|
225
|
-
|
|
226
|
-
Before creating parallel worktrees, the framework checks for file overlap:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
# For each planned worktree pair, check for overlapping file changes
|
|
230
|
-
# High overlap = schedule sequentially; low overlap = safe to parallelize
|
|
231
|
-
bash runtime/persistence/store.sh set "worktree:conflict_check:task-auth_vs_task-db" "no_overlap"
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
**Cleanup Automation:**
|
|
235
|
-
|
|
236
|
-
After merge detection, automatically prompt for worktree cleanup:
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
bash runtime/feedback/analyze.sh --worktrees
|
|
240
|
-
# Output:
|
|
241
|
-
# Merged branches with active worktrees:
|
|
242
|
-
# - feature/task-auth (merged 3 hours ago) → worktree at ../project-task-auth
|
|
243
|
-
# Run: git worktree remove ../project-task-auth && git branch -d feature/task-auth
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
## Anti-Patterns
|
|
247
|
-
|
|
248
|
-
| Anti-Pattern | Why It Fails | Correct Approach |
|
|
249
|
-
|-------------|-------------|-----------------|
|
|
250
|
-
| Checking out same branch in two worktrees | Git prevents this — error on checkout | Each worktree must have a unique branch |
|
|
251
|
-
| Never cleaning up worktrees | Disk fills up, confusion about active branches | Cleanup immediately after branch merges |
|
|
252
|
-
| `--force` on worktree with uncommitted work | Loses uncommitted changes permanently | Commit or stash before removing |
|
|
253
|
-
| Parallel worktrees editing the same file | Merge conflicts on integration | Check file overlap before creating parallel worktrees |
|
|
254
|
-
| Forgetting which worktree you're in | Wrong branch gets commits | `git worktree list` before committing |
|
|
255
|
-
| Long-lived worktrees diverging from main | Painful rebase/merge on integration | Regularly sync worktrees with `git rebase origin/main` |
|
|
256
|
-
|
|
257
|
-
## Integration with Other Skills
|
|
258
|
-
|
|
259
|
-
- Used by `subagent-driven-development` for task isolation
|
|
260
|
-
- Used by `dispatching-parallel-agents` for concurrent work
|
|
261
|
-
- Used by `finishing-a-development-branch` when cleaning up
|
|
@@ -1,281 +0,0 @@
|
|
|
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
|