vigiles 3.0.0 → 4.0.1
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +35 -22
- package/action.yml +4 -4
- package/dist/adapters/claude-code/adapter.js +1 -1
- package/dist/claude-code.d.ts +1 -1
- package/dist/claude-code.js +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +387 -162
- package/dist/e2e.d.ts +1 -1
- package/dist/e2e.js +1 -1
- package/dist/{adapters/claude-code/eval-cache.d.ts → eval-cache.d.ts} +1 -1
- package/dist/{adapters/claude-code/eval-cache.js → eval-cache.js} +1 -1
- package/dist/{adapters/claude-code/eval.js → eval.js} +2 -2
- package/dist/harness-assert.d.ts +8 -8
- package/dist/harness-assert.js +5 -5
- package/dist/{adapters/claude-code/harness-test.d.ts → harness-test.d.ts} +4 -4
- package/dist/{adapters/claude-code/harness-test.js → harness-test.js} +4 -4
- package/dist/integration.d.ts +3 -3
- package/dist/integration.js +2 -3
- package/dist/{adapters/claude-code/mock-model.d.ts → mock-model.d.ts} +2 -2
- package/dist/{adapters/claude-code/run-hook.d.ts → run-hook.d.ts} +1 -1
- package/dist/{adapters/claude-code/run-hook.js → run-hook.js} +1 -1
- package/dist/{adapters/claude-code/sandbox.js → sandbox.js} +1 -1
- package/dist/setup-plan.d.ts +47 -7
- package/dist/setup-plan.js +104 -29
- package/dist/testing.d.ts +8 -3
- package/dist/testing.js +8 -3
- package/dist/unit.d.ts +2 -2
- package/dist/unit.js +1 -1
- package/hooks/session-start.sh +3 -3
- package/package.json +6 -6
- package/skills/audit-feedback-loop/SKILL.md +0 -76
- package/skills/enforce-rules-format/SKILL.md +0 -71
- package/skills/generate-logo/SKILL.md +0 -103
- package/skills/pr-to-lint-rule/SKILL.md +0 -97
- /package/dist/{adapters/claude-code/egress-entry.d.ts → egress-entry.d.ts} +0 -0
- /package/dist/{adapters/claude-code/egress-entry.js → egress-entry.js} +0 -0
- /package/dist/{adapters/claude-code/egress-proxy.d.ts → egress-proxy.d.ts} +0 -0
- /package/dist/{adapters/claude-code/egress-proxy.js → egress-proxy.js} +0 -0
- /package/dist/{adapters/claude-code/egress.d.ts → egress.d.ts} +0 -0
- /package/dist/{adapters/claude-code/egress.js → egress.js} +0 -0
- /package/dist/{adapters/claude-code/eval-baseline.d.ts → eval-baseline.d.ts} +0 -0
- /package/dist/{adapters/claude-code/eval-baseline.js → eval-baseline.js} +0 -0
- /package/dist/{adapters/claude-code/eval.d.ts → eval.d.ts} +0 -0
- /package/dist/{adapters/claude-code/judge.d.ts → judge.d.ts} +0 -0
- /package/dist/{adapters/claude-code/judge.js → judge.js} +0 -0
- /package/dist/{adapters/claude-code/mock-entry.d.ts → mock-entry.d.ts} +0 -0
- /package/dist/{adapters/claude-code/mock-entry.js → mock-entry.js} +0 -0
- /package/dist/{adapters/claude-code/mock-model.js → mock-model.js} +0 -0
- /package/dist/{adapters/claude-code/sandbox.d.ts → sandbox.d.ts} +0 -0
- /package/dist/{adapters/claude-code/stats.d.ts → stats.d.ts} +0 -0
- /package/dist/{adapters/claude-code/stats.js → stats.js} +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: enforce-rules-format
|
|
3
|
-
description: Validate that all rules have proper enforcement classification (enforce/check/guidance)
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Validate that every rule in the project's instruction files has a proper enforcement classification, and fix any that are missing.
|
|
8
|
-
|
|
9
|
-
## Instructions
|
|
10
|
-
|
|
11
|
-
### Step 1: Detect Format
|
|
12
|
-
|
|
13
|
-
Check which format the project uses:
|
|
14
|
-
|
|
15
|
-
**v2 (spec-based):** Look for `CLAUDE.md.spec.ts` or any `*.spec.ts` files. If found, this is a v2 project — rules must use `enforce()`, `check()`, or `guidance()`.
|
|
16
|
-
|
|
17
|
-
**v1 (hand-written):** Look for `CLAUDE.md`, `AGENTS.md`, `.cursorrules`. If found without a spec file, this is a v1 project — rules need `**Enforced by:**` or `**Guidance only**` annotations.
|
|
18
|
-
|
|
19
|
-
### Step 2: Validate
|
|
20
|
-
|
|
21
|
-
**For v2 specs:**
|
|
22
|
-
|
|
23
|
-
The TypeScript type system already prevents unannotated rules — you can't create a rule without calling `enforce()`, `check()`, or `guidance()`. So focus on:
|
|
24
|
-
|
|
25
|
-
1. Do `enforce()` rules reference real linter rules? Run `npx vigiles compile` to check.
|
|
26
|
-
2. Are there guidance rules that COULD be `enforce()`? Check linter configs for matching rules.
|
|
27
|
-
3. Are there `check()` assertions that could be delegated to a linter? Suggest `enforce()` instead.
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npx vigiles compile
|
|
31
|
-
npx vigiles discover
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**For v1 hand-written files:**
|
|
35
|
-
|
|
36
|
-
Scan for `###` headings. Each must have one of:
|
|
37
|
-
|
|
38
|
-
- `**Enforced by:** \`linter/rule-name\``
|
|
39
|
-
- `**Guidance only** — reason`
|
|
40
|
-
- `<!-- vigiles-disable -->`
|
|
41
|
-
|
|
42
|
-
Report missing annotations with a summary table.
|
|
43
|
-
|
|
44
|
-
### Step 3: Fix Issues
|
|
45
|
-
|
|
46
|
-
For each issue found:
|
|
47
|
-
|
|
48
|
-
1. Check the project's linter configuration for matching rules
|
|
49
|
-
2. Suggest `enforce("linter/rule")` (v2) or `**Enforced by:** \`linter/rule\`` (v1)
|
|
50
|
-
3. If no linter rule exists, suggest `guidance()` (v2) or `**Guidance only**` (v1)
|
|
51
|
-
4. **Ask the user** before making changes
|
|
52
|
-
|
|
53
|
-
### Step 4: Suggest Migration
|
|
54
|
-
|
|
55
|
-
If the project uses v1 format, suggest migrating to v2 specs for type safety:
|
|
56
|
-
|
|
57
|
-
> Your rules could benefit from type-safe specs. Run the `migrate-to-spec` skill to convert your CLAUDE.md to a typed .spec.ts file.
|
|
58
|
-
|
|
59
|
-
### Step 5: Verify
|
|
60
|
-
|
|
61
|
-
Run the appropriate command:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# v2
|
|
65
|
-
npx vigiles compile && npx vigiles check
|
|
66
|
-
|
|
67
|
-
# validate
|
|
68
|
-
npx vigiles check
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Report the validation result.
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: generate-logo
|
|
3
|
-
description: Generate or iterate on the vigiles logo using ImageRouter API
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Generate Logo
|
|
7
|
-
|
|
8
|
-
Generate logo variations for vigiles using the ImageRouter API (imagerouter.io).
|
|
9
|
-
|
|
10
|
-
## Setup
|
|
11
|
-
|
|
12
|
-
Get an API key from https://imagerouter.io/api-keys. Pass it as an argument or set `IMAGEROUTER_API_KEY` env var. Do NOT commit the key.
|
|
13
|
-
|
|
14
|
-
## API
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
Endpoint: https://api.imagerouter.io/v1/openai/images/generations
|
|
18
|
-
Auth: Bearer token in Authorization header
|
|
19
|
-
Method: POST, Content-Type: application/json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Request body
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"prompt": "...",
|
|
27
|
-
"model": "google/nano-banana-2",
|
|
28
|
-
"quality": "high",
|
|
29
|
-
"size": "1024x1024",
|
|
30
|
-
"response_format": "url",
|
|
31
|
-
"output_format": "png"
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Available models (image generation)
|
|
36
|
-
|
|
37
|
-
List models: `GET https://api.imagerouter.io/v1/models`
|
|
38
|
-
|
|
39
|
-
Known good models:
|
|
40
|
-
|
|
41
|
-
- `google/nano-banana-2` — best quality, $0.07/image
|
|
42
|
-
- `google/nano-banana-2:free` — free tier
|
|
43
|
-
- `openai/gpt-image-1` — OpenAI's image model
|
|
44
|
-
- `black-forest-labs/FLUX-1.1-pro` — FLUX pro
|
|
45
|
-
|
|
46
|
-
### Response
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
{
|
|
50
|
-
"created": 1775430873,
|
|
51
|
-
"data": [{ "url": "https://storage.imagerouter.io/..." }],
|
|
52
|
-
"cost": 0.069,
|
|
53
|
-
"latency": 27627
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Download the image from the URL in `data[0].url`.
|
|
58
|
-
|
|
59
|
-
## Current logo
|
|
60
|
-
|
|
61
|
-
The current logo (`logo.png`) is v6: overlapping translucent flame petals on dark background, amber-orange palette. Generated with `google/nano-banana-2`.
|
|
62
|
-
|
|
63
|
-
### Prompt that produced it
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
A premium, refined logo icon for a developer tool called vigiles that compiles
|
|
67
|
-
typed TypeScript specs to AI instruction files. Inspired by OpenAI geometric aesthetic and Apple
|
|
68
|
-
minimalism. A single abstract geometric shape: an upward-pointing flame composed
|
|
69
|
-
of 3 overlapping translucent rounded shapes, creating depth through overlap —
|
|
70
|
-
similar to how the OpenAI logo uses overlapping curves. Warm amber to deep orange
|
|
71
|
-
color palette. Black background. No text. No letters. Pure abstract mark. Clean
|
|
72
|
-
enough to be an app icon. Luxurious, premium, modern tech company feel.
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Design principles
|
|
76
|
-
|
|
77
|
-
- **Flame/torch motif** — vigiles were Rome's night watchmen who carried torches
|
|
78
|
-
- **Amber/orange palette** — matches GitHub Action branding color
|
|
79
|
-
- **No text in the icon** — must work at 16px favicon size
|
|
80
|
-
- **Dark background variant** for README, light/transparent variant for npm
|
|
81
|
-
|
|
82
|
-
## Example curl
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
curl 'https://api.imagerouter.io/v1/openai/images/generations' \
|
|
86
|
-
-H "Authorization: Bearer $IMAGEROUTER_API_KEY" \
|
|
87
|
-
-H 'Content-Type: application/json' \
|
|
88
|
-
-d '{
|
|
89
|
-
"prompt": "YOUR PROMPT HERE",
|
|
90
|
-
"model": "google/nano-banana-2",
|
|
91
|
-
"quality": "high",
|
|
92
|
-
"size": "1024x1024",
|
|
93
|
-
"response_format": "url",
|
|
94
|
-
"output_format": "png"
|
|
95
|
-
}'
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Workflow
|
|
99
|
-
|
|
100
|
-
1. Generate variations with different prompts
|
|
101
|
-
2. Save as `logo-v*.png` (gitignored)
|
|
102
|
-
3. Pick the best, copy to `logo.png`
|
|
103
|
-
4. Commit `logo.png` only
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pr-to-lint-rule
|
|
3
|
-
description: Convert a recurring PR review comment into an automated lint rule with tests and spec entry
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
argument-hint: <description of recurring PR feedback>
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Convert a recurring PR review comment into an automated lint rule.
|
|
9
|
-
|
|
10
|
-
## Arguments
|
|
11
|
-
|
|
12
|
-
$ARGUMENTS — A natural language description of the pattern to enforce. Examples:
|
|
13
|
-
|
|
14
|
-
- "we keep telling people not to import directly from antd, use our design system barrel file instead"
|
|
15
|
-
- "people forget to use our custom logger instead of console.log"
|
|
16
|
-
- "don't use unwrap() in production code, use expect() or proper error handling"
|
|
17
|
-
- "API route handlers must use the withAuth wrapper"
|
|
18
|
-
|
|
19
|
-
## Instructions
|
|
20
|
-
|
|
21
|
-
You are generating an automated lint rule from a recurring code review pattern. Follow these steps:
|
|
22
|
-
|
|
23
|
-
### Step 1: Detect the Project Language and Toolchain
|
|
24
|
-
|
|
25
|
-
Look at the repository to determine:
|
|
26
|
-
|
|
27
|
-
- **Primary language** (JS/TS, Python, Rust, Go, Ruby, etc.)
|
|
28
|
-
- **Linter in use** (ESLint, Ruff, Clippy, golangci-lint, RuboCop, etc.)
|
|
29
|
-
- **Testing framework** (Vitest, Jest, pytest, cargo test, etc.)
|
|
30
|
-
- **Existing custom rules** (to match conventions)
|
|
31
|
-
|
|
32
|
-
**If the language or linter cannot be confidently detected** (e.g. polyglot repo, no linter config, or multiple candidates), **ask the user** which language and linter to target before generating anything.
|
|
33
|
-
|
|
34
|
-
### Step 2: Generate the Lint Rule
|
|
35
|
-
|
|
36
|
-
Based on the detected (or user-specified) language, generate the appropriate rule type:
|
|
37
|
-
|
|
38
|
-
**Read the linter-specific reference doc before generating.** Each doc covers existing plugins to check first, rule/lint anatomy, AST patterns, auto-fix safety, testing, and edge cases.
|
|
39
|
-
|
|
40
|
-
| Language | Linter | Reference doc |
|
|
41
|
-
| --------------------- | --------- | ----------------------------- |
|
|
42
|
-
| JavaScript/TypeScript | ESLint | `../linter-docs/eslint.md` |
|
|
43
|
-
| Python | Ruff | `../linter-docs/ruff.md` |
|
|
44
|
-
| Python | Pylint | `../linter-docs/pylint.md` |
|
|
45
|
-
| Ruby | RuboCop | `../linter-docs/rubocop.md` |
|
|
46
|
-
| Rust | Clippy | `../linter-docs/clippy.md` |
|
|
47
|
-
| CSS | Stylelint | `../linter-docs/stylelint.md` |
|
|
48
|
-
|
|
49
|
-
For all linters, follow this order:
|
|
50
|
-
|
|
51
|
-
1. **Check existing plugins/rules first** — see the plugin table in the linter doc
|
|
52
|
-
2. **Try built-in config options** — most linters have `no-restricted-*` or equivalent rules that handle one-off patterns without custom code
|
|
53
|
-
3. **Only write a custom rule** when you need AST analysis, auto-fix, or configurable options beyond what exists
|
|
54
|
-
|
|
55
|
-
If a custom rule is needed, the reference doc provides: rule anatomy, AST node cheat sheet, auto-fix/suggest patterns, testing examples, and registration instructions.
|
|
56
|
-
|
|
57
|
-
#### For Go (go/analysis)
|
|
58
|
-
|
|
59
|
-
No linter doc yet. Generate an analyzer using `golang.org/x/tools/go/analysis` with `analysistest` tests.
|
|
60
|
-
|
|
61
|
-
#### For other languages
|
|
62
|
-
|
|
63
|
-
Generate the most idiomatic linting approach with test cases and integration instructions.
|
|
64
|
-
|
|
65
|
-
### Step 3: Add to Instruction File
|
|
66
|
-
|
|
67
|
-
**If the project uses v2 specs** (has `CLAUDE.md.spec.ts`):
|
|
68
|
-
|
|
69
|
-
Add an `enforce()` rule to the spec file:
|
|
70
|
-
|
|
71
|
-
```typescript
|
|
72
|
-
"<rule-id>": enforce("<linter>/<rule-name>", "<why>"),
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Then run `npx vigiles compile` to regenerate CLAUDE.md.
|
|
76
|
-
|
|
77
|
-
**If the project uses v1** (hand-written CLAUDE.md):
|
|
78
|
-
|
|
79
|
-
Append an annotation block:
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
### <Rule title — imperative, concise>
|
|
83
|
-
|
|
84
|
-
**Enforced by:** `<linter>/<rule-name>`
|
|
85
|
-
**Why:** <One sentence explaining the architectural reason>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Step 4: Present the Output
|
|
89
|
-
|
|
90
|
-
Show the user:
|
|
91
|
-
|
|
92
|
-
1. All generated files with full contents
|
|
93
|
-
2. Step-by-step integration instructions
|
|
94
|
-
3. The spec rule or CLAUDE.md block to add
|
|
95
|
-
4. How to verify it works (run the linter, expect it to catch a violation)
|
|
96
|
-
|
|
97
|
-
Ask the user if they want you to write the files and update the spec/CLAUDE.md.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|