vigiles 2.5.0 → 3.0.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/.claude-plugin/plugin.json +9 -0
- package/README.md +73 -434
- package/action.yml +143 -7
- package/dist/action-gate.d.ts +1 -1
- package/dist/action-gate.js +1 -1
- package/dist/adapter-conformance.d.ts +30 -0
- package/dist/adapter-conformance.js +153 -0
- package/dist/adapter-registry.d.ts +42 -0
- package/dist/adapter-registry.js +55 -0
- package/dist/adapter.d.ts +26 -0
- package/dist/adapter.js +16 -0
- package/dist/adapters/claude-code/adapter.d.ts +3 -0
- package/dist/adapters/claude-code/adapter.js +46 -0
- package/dist/{agent-result.d.ts → adapters/claude-code/agent-result.d.ts} +1 -1
- package/dist/adapters/claude-code/dialect.d.ts +13 -0
- package/dist/adapters/claude-code/dialect.js +51 -0
- package/dist/adapters/claude-code/egress-entry.d.ts +2 -0
- package/dist/adapters/claude-code/egress-entry.js +115 -0
- package/dist/adapters/claude-code/egress-proxy.d.ts +2 -0
- package/dist/adapters/claude-code/egress-proxy.js +60 -0
- package/dist/adapters/claude-code/egress.d.ts +114 -0
- package/dist/adapters/claude-code/egress.js +276 -0
- package/dist/adapters/claude-code/eval-baseline.d.ts +68 -0
- package/dist/adapters/claude-code/eval-baseline.js +173 -0
- package/dist/{eval-cache.d.ts → adapters/claude-code/eval-cache.d.ts} +1 -1
- package/dist/{eval-cache.js → adapters/claude-code/eval-cache.js} +1 -1
- package/dist/{eval.d.ts → adapters/claude-code/eval.d.ts} +28 -4
- package/dist/{eval.js → adapters/claude-code/eval.js} +61 -25
- package/dist/{harness-test.d.ts → adapters/claude-code/harness-test.d.ts} +33 -37
- package/dist/{harness-test.js → adapters/claude-code/harness-test.js} +124 -43
- package/dist/adapters/claude-code/hook-protocol.d.ts +10 -0
- package/dist/adapters/claude-code/hook-protocol.js +10 -0
- package/dist/adapters/claude-code/layout.d.ts +8 -0
- package/dist/adapters/claude-code/layout.js +18 -0
- package/dist/{mock-model.d.ts → adapters/claude-code/mock-model.d.ts} +2 -24
- package/dist/adapters/claude-code/model-mock.d.ts +11 -0
- package/dist/adapters/claude-code/model-mock.js +10 -0
- package/dist/adapters/claude-code/plugin-loader.d.ts +25 -0
- package/dist/adapters/claude-code/plugin-loader.js +19 -0
- package/dist/adapters/claude-code/run-hook.d.ts +204 -0
- package/dist/adapters/claude-code/run-hook.js +418 -0
- package/dist/adapters/claude-code/run-scripts.d.ts +52 -0
- package/dist/adapters/claude-code/run-scripts.js +150 -0
- package/dist/adapters/claude-code/runtime.d.ts +16 -0
- package/dist/adapters/claude-code/runtime.js +39 -0
- package/dist/{sandbox.d.ts → adapters/claude-code/sandbox.d.ts} +45 -4
- package/dist/{sandbox.js → adapters/claude-code/sandbox.js} +76 -8
- package/dist/{skill-driver.d.ts → adapters/claude-code/skill-driver.d.ts} +1 -1
- package/dist/adapters/codex/adapter.d.ts +3 -0
- package/dist/adapters/codex/adapter.js +49 -0
- package/dist/adapters/codex/dialect.d.ts +10 -0
- package/dist/adapters/codex/dialect.js +30 -0
- package/dist/adapters/codex/driver.d.ts +20 -0
- package/dist/adapters/codex/driver.js +89 -0
- package/dist/adapters/codex/hook-protocol.d.ts +10 -0
- package/dist/adapters/codex/hook-protocol.js +18 -0
- package/dist/adapters/codex/layout.d.ts +16 -0
- package/dist/adapters/codex/layout.js +18 -0
- package/dist/adapters/codex/mock-model.d.ts +52 -0
- package/dist/adapters/codex/mock-model.js +210 -0
- package/dist/adapters/codex/model-mock.d.ts +11 -0
- package/dist/adapters/codex/model-mock.js +10 -0
- package/dist/adapters/codex/runtime.d.ts +38 -0
- package/dist/adapters/codex/runtime.js +62 -0
- package/dist/adapters/opencode/adapter.d.ts +3 -0
- package/dist/adapters/opencode/adapter.js +48 -0
- package/dist/adapters/opencode/dialect.d.ts +10 -0
- package/dist/adapters/opencode/dialect.js +36 -0
- package/dist/adapters/opencode/layout.d.ts +9 -0
- package/dist/adapters/opencode/layout.js +25 -0
- package/dist/adapters/opencode/model-mock.d.ts +10 -0
- package/dist/adapters/opencode/model-mock.js +10 -0
- package/dist/adapters/opencode/runtime.d.ts +9 -0
- package/dist/adapters/opencode/runtime.js +21 -0
- package/dist/claude-code.d.ts +16 -0
- package/dist/claude-code.js +32 -0
- package/dist/cli-flags.d.ts +22 -0
- package/dist/cli-flags.js +38 -0
- package/dist/cli.js +406 -206
- package/dist/codex.d.ts +20 -0
- package/dist/codex.js +36 -0
- package/dist/community-skills.d.ts +1 -1
- package/dist/community-skills.js +2 -2
- package/dist/core/adapter.d.ts +88 -0
- package/dist/core/adapter.js +3 -0
- package/dist/{compile.d.ts → core/compile.d.ts} +11 -2
- package/dist/{compile.js → core/compile.js} +68 -53
- package/dist/core/compose.d.ts +79 -0
- package/dist/core/compose.js +145 -0
- package/dist/core/dialect.d.ts +51 -0
- package/dist/core/dialect.js +3 -0
- package/dist/core/harness-driver.d.ts +134 -0
- package/dist/core/harness-driver.js +3 -0
- package/dist/core/hook-protocol.d.ts +28 -0
- package/dist/core/hook-protocol.js +3 -0
- package/dist/core/layout.d.ts +43 -0
- package/dist/core/layout.js +3 -0
- package/dist/core/model-mock.d.ts +27 -0
- package/dist/core/model-mock.js +3 -0
- package/dist/core/refs.d.ts +62 -0
- package/dist/{refs.js → core/refs.js} +49 -23
- package/dist/core/runtime.d.ts +38 -0
- package/dist/core/runtime.js +3 -0
- package/dist/{types.d.ts → core/types.d.ts} +29 -0
- package/dist/{validate.d.ts → core/validate.d.ts} +1 -1
- package/dist/{validate.js → core/validate.js} +41 -4
- package/dist/e2e.d.ts +19 -0
- package/dist/e2e.js +39 -0
- package/dist/harness-assert.d.ts +60 -11
- package/dist/harness-assert.js +111 -9
- package/dist/integration.d.ts +16 -0
- package/dist/integration.js +32 -0
- package/dist/leaderboard.d.ts +33 -0
- package/dist/leaderboard.js +107 -0
- package/dist/linting.d.ts +9 -0
- package/dist/linting.js +25 -0
- package/dist/plugin-loader.d.ts +6 -3
- package/dist/plugin-loader.js +101 -49
- package/dist/scan.d.ts +49 -0
- package/dist/scan.js +177 -0
- package/dist/setup-plan.d.ts +51 -0
- package/dist/setup-plan.js +85 -0
- package/dist/skill-test.d.ts +1 -1
- package/dist/skill-test.js +1 -1
- package/dist/test-coverage.d.ts +71 -0
- package/dist/test-coverage.js +228 -0
- package/dist/testing.d.ts +12 -0
- package/dist/testing.js +28 -0
- package/dist/unit.d.ts +17 -0
- package/dist/unit.js +36 -0
- package/hooks/refs-nudge.sh +24 -0
- package/package.json +35 -16
- package/skills/audit-feedback-loop/SKILL.md +76 -0
- package/skills/edit-spec/SKILL.md +131 -0
- package/skills/enforce-rules-format/SKILL.md +71 -0
- package/skills/generate-logo/SKILL.md +103 -0
- package/skills/generate-rule/SKILL.md +64 -0
- package/skills/linter-docs/clippy.md +241 -0
- package/skills/linter-docs/eslint.md +384 -0
- package/skills/linter-docs/pylint.md +288 -0
- package/skills/linter-docs/rubocop.md +277 -0
- package/skills/linter-docs/ruff.md +187 -0
- package/skills/linter-docs/stylelint.md +247 -0
- package/skills/migrate-to-spec/SKILL.md +126 -0
- package/skills/pr-to-lint-rule/SKILL.md +97 -0
- package/skills/strengthen/SKILL.md +168 -0
- package/skills/test-harness/SKILL.md +157 -0
- package/dist/action.d.ts +0 -7
- package/dist/action.js +0 -180
- package/dist/refs.d.ts +0 -44
- package/dist/run-hook.d.ts +0 -77
- package/dist/run-hook.js +0 -80
- package/dist/run-scripts.d.ts +0 -20
- package/dist/run-scripts.js +0 -70
- /package/dist/{agent-result.js → adapters/claude-code/agent-result.js} +0 -0
- /package/dist/{agent-runtime.d.ts → adapters/claude-code/agent-runtime.d.ts} +0 -0
- /package/dist/{agent-runtime.js → adapters/claude-code/agent-runtime.js} +0 -0
- /package/dist/{judge.d.ts → adapters/claude-code/judge.d.ts} +0 -0
- /package/dist/{judge.js → adapters/claude-code/judge.js} +0 -0
- /package/dist/{mock-entry.d.ts → adapters/claude-code/mock-entry.d.ts} +0 -0
- /package/dist/{mock-entry.js → adapters/claude-code/mock-entry.js} +0 -0
- /package/dist/{mock-model.js → adapters/claude-code/mock-model.js} +0 -0
- /package/dist/{skill-driver.js → adapters/claude-code/skill-driver.js} +0 -0
- /package/dist/{skill-runtime.d.ts → adapters/claude-code/skill-runtime.d.ts} +0 -0
- /package/dist/{skill-runtime.js → adapters/claude-code/skill-runtime.js} +0 -0
- /package/dist/{stats.d.ts → adapters/claude-code/stats.d.ts} +0 -0
- /package/dist/{stats.js → adapters/claude-code/stats.js} +0 -0
- /package/dist/{compile-generator.d.ts → core/compile-generator.d.ts} +0 -0
- /package/dist/{compile-generator.js → core/compile-generator.js} +0 -0
- /package/dist/{coverage.d.ts → core/coverage.d.ts} +0 -0
- /package/dist/{coverage.js → core/coverage.js} +0 -0
- /package/dist/{doc-refs.d.ts → core/doc-refs.d.ts} +0 -0
- /package/dist/{doc-refs.js → core/doc-refs.js} +0 -0
- /package/dist/{evolve.d.ts → core/evolve.d.ts} +0 -0
- /package/dist/{evolve.js → core/evolve.js} +0 -0
- /package/dist/{frontmatter.d.ts → core/frontmatter.d.ts} +0 -0
- /package/dist/{frontmatter.js → core/frontmatter.js} +0 -0
- /package/dist/{generate-schema.d.ts → core/generate-schema.d.ts} +0 -0
- /package/dist/{generate-schema.js → core/generate-schema.js} +0 -0
- /package/dist/{generate-types.d.ts → core/generate-types.d.ts} +0 -0
- /package/dist/{generate-types.js → core/generate-types.js} +0 -0
- /package/dist/{hash.d.ts → core/hash.d.ts} +0 -0
- /package/dist/{hash.js → core/hash.js} +0 -0
- /package/dist/{inline.d.ts → core/inline.d.ts} +0 -0
- /package/dist/{inline.js → core/inline.js} +0 -0
- /package/dist/{integrity.d.ts → core/integrity.d.ts} +0 -0
- /package/dist/{integrity.js → core/integrity.js} +0 -0
- /package/dist/{linters.d.ts → core/linters.d.ts} +0 -0
- /package/dist/{linters.js → core/linters.js} +0 -0
- /package/dist/{mcp.d.ts → core/mcp.d.ts} +0 -0
- /package/dist/{mcp.js → core/mcp.js} +0 -0
- /package/dist/{orphans.d.ts → core/orphans.d.ts} +0 -0
- /package/dist/{orphans.js → core/orphans.js} +0 -0
- /package/dist/{proofs.d.ts → core/proofs.d.ts} +0 -0
- /package/dist/{proofs.js → core/proofs.js} +0 -0
- /package/dist/{session.d.ts → core/session.d.ts} +0 -0
- /package/dist/{session.js → core/session.js} +0 -0
- /package/dist/{sidecar.d.ts → core/sidecar.d.ts} +0 -0
- /package/dist/{sidecar.js → core/sidecar.js} +0 -0
- /package/dist/{spec.d.ts → core/spec.d.ts} +0 -0
- /package/dist/{spec.js → core/spec.js} +0 -0
- /package/dist/{symbols.d.ts → core/symbols.d.ts} +0 -0
- /package/dist/{symbols.js → core/symbols.js} +0 -0
- /package/dist/{test-utils.d.ts → core/test-utils.d.ts} +0 -0
- /package/dist/{test-utils.js → core/test-utils.js} +0 -0
- /package/dist/{types.js → core/types.js} +0 -0
- /package/{.claude-plugin/hooks → hooks}/post-edit.sh +0 -0
- /package/{.claude-plugin/hooks → hooks}/pre-edit.sh +0 -0
- /package/{.claude-plugin/hooks → hooks}/session-start.sh +0 -0
package/package.json
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vigiles",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Compile .spec.ts files to instruction files (CLAUDE.md, AGENTS.md) with linter cross-referencing",
|
|
5
5
|
"bin": {
|
|
6
6
|
"vigiles": "dist/cli.js"
|
|
7
7
|
},
|
|
8
|
-
"main": "./dist/spec.js",
|
|
9
|
-
"types": "./dist/spec.d.ts",
|
|
8
|
+
"main": "./dist/core/spec.js",
|
|
9
|
+
"types": "./dist/core/spec.d.ts",
|
|
10
10
|
"exports": {
|
|
11
|
-
".": "./dist/spec.js",
|
|
12
|
-
"./
|
|
13
|
-
"./
|
|
14
|
-
"./
|
|
15
|
-
"./
|
|
16
|
-
"./
|
|
11
|
+
".": "./dist/core/spec.js",
|
|
12
|
+
"./unit": "./dist/unit.js",
|
|
13
|
+
"./integration": "./dist/integration.js",
|
|
14
|
+
"./e2e": "./dist/e2e.js",
|
|
15
|
+
"./linting": "./dist/linting.js",
|
|
16
|
+
"./testing": "./dist/testing.js",
|
|
17
|
+
"./claude-code": "./dist/claude-code.js",
|
|
18
|
+
"./codex": "./dist/codex.js",
|
|
19
|
+
"./adapter": "./dist/adapter.js",
|
|
20
|
+
"./spec": "./dist/core/spec.js",
|
|
21
|
+
"./compile": "./dist/core/compile.js",
|
|
22
|
+
"./linters": "./dist/core/linters.js",
|
|
23
|
+
"./eval": "./dist/adapters/claude-code/eval.js",
|
|
24
|
+
"./harness-test": "./dist/adapters/claude-code/harness-test.js",
|
|
17
25
|
"./harness-assert": "./dist/harness-assert.js",
|
|
18
|
-
"./run-hook": "./dist/run-hook.js",
|
|
19
|
-
"./plugin-loader": "./dist/plugin-loader.js",
|
|
20
|
-
"./mcp": "./dist/mcp.js",
|
|
21
|
-
"./judge": "./dist/judge.js",
|
|
22
|
-
"./mock-model": "./dist/mock-model.js",
|
|
26
|
+
"./run-hook": "./dist/adapters/claude-code/run-hook.js",
|
|
27
|
+
"./plugin-loader": "./dist/adapters/claude-code/plugin-loader.js",
|
|
28
|
+
"./mcp": "./dist/core/mcp.js",
|
|
29
|
+
"./judge": "./dist/adapters/claude-code/judge.js",
|
|
30
|
+
"./mock-model": "./dist/adapters/claude-code/mock-model.js",
|
|
23
31
|
"./vitest": {
|
|
24
32
|
"types": "./dist/vitest.d.mts",
|
|
25
33
|
"default": "./dist/vitest.mjs"
|
|
@@ -35,6 +43,9 @@
|
|
|
35
43
|
"!dist/**/*.test.d.ts",
|
|
36
44
|
"action.yml",
|
|
37
45
|
".claude-plugin",
|
|
46
|
+
"hooks",
|
|
47
|
+
"skills",
|
|
48
|
+
"!skills/**/*.spec.ts",
|
|
38
49
|
"README.md",
|
|
39
50
|
"LICENSE"
|
|
40
51
|
],
|
|
@@ -46,12 +57,16 @@
|
|
|
46
57
|
"fmt": "prettier --write .",
|
|
47
58
|
"fmt:check": "prettier --check .",
|
|
48
59
|
"demo": "npm run build && bash examples/demo/run.sh",
|
|
49
|
-
"test:
|
|
60
|
+
"test:unit": "npm run build && vitest run --project unit",
|
|
61
|
+
"test:integration": "npm run build && vitest run --project integration",
|
|
62
|
+
"test:e2e": "npm run build && vitest run --project e2e",
|
|
63
|
+
"test:cli-e2e": "bash test/e2e/run.sh",
|
|
50
64
|
"test:harness": "npm run build && node dist/cli.js test",
|
|
51
65
|
"test:eval": "npm run build && node dist/cli.js eval",
|
|
52
66
|
"test:vitest": "npm run build && vitest run --project runners",
|
|
53
67
|
"test:jest": "npm run build && jest",
|
|
54
|
-
"test:types": "npm run build && tsc --noEmit -p test/types/tsconfig.json"
|
|
68
|
+
"test:types": "npm run build && tsc --noEmit -p test/types/tsconfig.json",
|
|
69
|
+
"demo:plugin": "npm run build && node examples/plugin-test-demo.mjs"
|
|
55
70
|
},
|
|
56
71
|
"devDependencies": {
|
|
57
72
|
"@eslint/js": "^10.0.1",
|
|
@@ -62,6 +77,8 @@
|
|
|
62
77
|
"@typescript-eslint/parser": "^8.58.0",
|
|
63
78
|
"@vitest/coverage-v8": "^4.1.8",
|
|
64
79
|
"eslint": "^10.1.0",
|
|
80
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
81
|
+
"eslint-plugin-boundaries": "^6.0.2",
|
|
65
82
|
"eslint-plugin-sonarjs": "^4.0.2",
|
|
66
83
|
"globals": "^17.4.0",
|
|
67
84
|
"jest": "^30.4.2",
|
|
@@ -87,11 +104,13 @@
|
|
|
87
104
|
"@ast-grep/lang-ruby": "^0.0.7",
|
|
88
105
|
"@ast-grep/lang-rust": "^0.0.7",
|
|
89
106
|
"@ast-grep/napi": "^0.43.0",
|
|
107
|
+
"@iarna/toml": "^2.2.5",
|
|
90
108
|
"@jackchuka/mdschema": "^0.12.8",
|
|
91
109
|
"cosmiconfig": "^9.0.1",
|
|
92
110
|
"glob": "^13.0.6",
|
|
93
111
|
"js-yaml": "^4.1.0",
|
|
94
112
|
"minimatch": "^10.0.1",
|
|
113
|
+
"ts-essentials": "^10.2.1",
|
|
95
114
|
"typescript": "^5.9.3"
|
|
96
115
|
}
|
|
97
116
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-feedback-loop
|
|
3
|
+
description: Scan the current repo and score its feedback loop maturity for AI-assisted development
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Scan the current repository and score its feedback loop maturity for AI-assisted development.
|
|
8
|
+
|
|
9
|
+
## Instructions
|
|
10
|
+
|
|
11
|
+
Analyze this repository and score its **feedback loop maturity** using the levels below. Check for each signal, then output a summary report.
|
|
12
|
+
|
|
13
|
+
### Maturity Levels
|
|
14
|
+
|
|
15
|
+
**Level 0 — Vibes**
|
|
16
|
+
No CI config, no linter rules, no CLAUDE.md. The AI agent is flying blind.
|
|
17
|
+
|
|
18
|
+
**Level 1 — Guardrails**
|
|
19
|
+
Has CI + standard linters, but no custom rules. The agent gets basic feedback but can't learn project-specific conventions.
|
|
20
|
+
|
|
21
|
+
**Level 2 — Architecture as Code**
|
|
22
|
+
Has custom lint rules, CLAUDE.md rules have enforcement annotations. The agent gets rich, project-specific feedback.
|
|
23
|
+
|
|
24
|
+
**Level 3 — The Organism**
|
|
25
|
+
Has CI + custom rules + screenshot/visual tests + observability + scheduled agent tasks. The entire development loop is instrumented.
|
|
26
|
+
|
|
27
|
+
### Signals to Check
|
|
28
|
+
|
|
29
|
+
Scan the repository for the following and note which exist:
|
|
30
|
+
|
|
31
|
+
1. **CI Configuration**: Look for `.github/workflows/`, `.circleci/`, `Jenkinsfile`, `.gitlab-ci.yml`, `bitbucket-pipelines.yml`, `.travis.yml`, etc.
|
|
32
|
+
2. **Linter Config** (language-aware):
|
|
33
|
+
- **JS/TS**: `eslint.config.*`, `.eslintrc*`, `biome.json`, `.prettierrc*`, `deno.json`
|
|
34
|
+
- **Python**: `pyproject.toml` (look for `[tool.ruff]`, `[tool.pylint]`, `[tool.flake8]`), `setup.cfg`, `.flake8`, `ruff.toml`
|
|
35
|
+
- **Rust**: `clippy.toml`, `.clippy.toml`, `rustfmt.toml`
|
|
36
|
+
- **Go**: `.golangci.yml`, `.golangci.yaml`
|
|
37
|
+
- **Ruby**: `.rubocop.yml`
|
|
38
|
+
- **Java/Kotlin**: `checkstyle.xml`, `pmd.xml`, `detekt.yml`
|
|
39
|
+
3. **Custom Lint Rules**: Look for custom plugins, rule directories, or inline rule definitions in linter configs
|
|
40
|
+
- JS/TS: `eslint-plugin-*`, `eslint-rules/` directories
|
|
41
|
+
- Python: custom Ruff/Pylint plugins, AST-based checks
|
|
42
|
+
- Rust: custom Clippy lints
|
|
43
|
+
- Go: custom analyzers
|
|
44
|
+
4. **CLAUDE.md**: Check if `CLAUDE.md` exists at the repo root
|
|
45
|
+
5. **CLAUDE.md Enforcement**: Check if using vigiles v2 specs (`CLAUDE.md.spec.ts` exists) or v1 annotations (`**Enforced by:**` in CLAUDE.md). v2 specs = higher maturity.
|
|
46
|
+
6. **Type-Safe Specs**: Check for `CLAUDE.md.spec.ts` or `*.spec.ts` files — indicates typed spec compilation via vigiles v2
|
|
47
|
+
7. **Generated Types**: Check for `.vigiles/generated.d.ts` — indicates linter rules are type-checked at authoring time
|
|
48
|
+
8. **Screenshot/Visual Tests**: Look for Playwright (`playwright.config.*`), Cypress (`cypress.config.*`), Chromatic, Percy, BackstopJS configs
|
|
49
|
+
9. **Observability**: Search for imports/usage of `@sentry/`, `dd-trace`, `@datadog/`, `newrelic`, `@opentelemetry/`, `sentry_sdk`, `structlog`, `tracing` (Rust), `opentelemetry` in source files
|
|
50
|
+
10. **Scheduled Agent Tasks**: Look for cron patterns in CI configs, `.github/workflows/` with `schedule:` triggers, or references to scheduled Claude Code tasks
|
|
51
|
+
|
|
52
|
+
### Output Format
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
## Feedback Loop Audit
|
|
56
|
+
|
|
57
|
+
**Repository:** <repo name>
|
|
58
|
+
**Primary language(s):** <detected languages>
|
|
59
|
+
**Score: Level X — <Name>**
|
|
60
|
+
|
|
61
|
+
### Signals Found
|
|
62
|
+
- [x] CI Configuration: <details>
|
|
63
|
+
- [ ] Custom Lint Rules: not found
|
|
64
|
+
- [x] CLAUDE.md: found, 5 enforced / 2 guidance / 1 missing
|
|
65
|
+
...
|
|
66
|
+
|
|
67
|
+
### Recommendations
|
|
68
|
+
1. <Most impactful next step to level up>
|
|
69
|
+
2. <Second recommendation>
|
|
70
|
+
3. <Third recommendation>
|
|
71
|
+
|
|
72
|
+
### How to Level Up
|
|
73
|
+
<Specific, actionable advice for reaching the next maturity level>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Be specific about file paths and what you found. Give actionable recommendations tailored to the project's language and toolchain.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: edit-spec
|
|
3
|
+
description: Edit a vigiles spec file to update instruction files (CLAUDE.md, AGENTS.md)
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: <what to change — e.g., "add a rule about error handling" or "update the testing section">
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Edit a `.spec.ts` file to update the project's instruction files. The spec is the source of truth — CLAUDE.md and AGENTS.md are compiled build artifacts that must not be edited directly.
|
|
9
|
+
|
|
10
|
+
## Arguments
|
|
11
|
+
|
|
12
|
+
$ARGUMENTS — What the user wants to change. Examples:
|
|
13
|
+
|
|
14
|
+
- "add a rule about always using the custom logger"
|
|
15
|
+
- "update the architecture section"
|
|
16
|
+
- "add src/services/auth.ts to key files"
|
|
17
|
+
- "add npm run lint to commands"
|
|
18
|
+
- "change the testing guidance"
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
### Step 1: Find the Spec
|
|
23
|
+
|
|
24
|
+
Look for spec files in the repo root:
|
|
25
|
+
|
|
26
|
+
- `CLAUDE.md.spec.ts` — source for CLAUDE.md
|
|
27
|
+
- `AGENTS.md.spec.ts` — source for AGENTS.md
|
|
28
|
+
- Any `*.spec.ts` matching instruction files
|
|
29
|
+
|
|
30
|
+
If no spec exists, suggest: `npx vigiles setup`
|
|
31
|
+
|
|
32
|
+
### Step 2: Read and Understand the Spec
|
|
33
|
+
|
|
34
|
+
Read the spec file. It's a TypeScript file that exports a `claude()` call with these fields:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { claude, enforce, guidance, check, every } from "vigiles/spec";
|
|
38
|
+
|
|
39
|
+
export default claude({
|
|
40
|
+
// Optional: output target (defaults to "CLAUDE.md")
|
|
41
|
+
target: "CLAUDE.md",
|
|
42
|
+
// or multi-target:
|
|
43
|
+
// target: ["CLAUDE.md", "AGENTS.md"],
|
|
44
|
+
|
|
45
|
+
// Prose sections — become ## headings in compiled output
|
|
46
|
+
sections: {
|
|
47
|
+
positioning: "What this project does...",
|
|
48
|
+
architecture: "How the codebase is structured...",
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// File paths verified to exist at compile time
|
|
52
|
+
keyFiles: {
|
|
53
|
+
"src/index.ts": "Main entry point",
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
// Commands verified against package.json
|
|
57
|
+
commands: {
|
|
58
|
+
"npm run build": "Compile the project",
|
|
59
|
+
"npm test": "Run all tests",
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// Rules — three types
|
|
63
|
+
rules: {
|
|
64
|
+
// enforce() — backed by a linter rule, verified to exist AND be enabled
|
|
65
|
+
"no-any": enforce(
|
|
66
|
+
"@typescript-eslint/no-explicit-any",
|
|
67
|
+
"Use unknown and narrow with type guards.",
|
|
68
|
+
),
|
|
69
|
+
|
|
70
|
+
// check() — filesystem assertion run by vigiles
|
|
71
|
+
"test-pairing": check(
|
|
72
|
+
every("src/**/*.service.ts").has("{name}.test.ts"),
|
|
73
|
+
"Every service must have tests.",
|
|
74
|
+
),
|
|
75
|
+
|
|
76
|
+
// guidance() — prose only, no enforcement
|
|
77
|
+
"research-first": guidance("Google unfamiliar APIs before implementing."),
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 3: Make the Changes
|
|
83
|
+
|
|
84
|
+
Based on what the user asked for:
|
|
85
|
+
|
|
86
|
+
**Adding a rule:**
|
|
87
|
+
|
|
88
|
+
- Determine the type: `enforce()` if a linter rule exists, `check()` for filesystem conventions, `guidance()` for prose-only
|
|
89
|
+
- For `enforce()`: find the actual linter rule name (e.g., `eslint/no-console`, `@typescript-eslint/no-explicit-any`, `ruff/T201`)
|
|
90
|
+
- Add to the `rules` object with a descriptive key
|
|
91
|
+
|
|
92
|
+
**Updating a section:**
|
|
93
|
+
|
|
94
|
+
- Edit the string in `sections`. Sections are plain strings or tagged template literals with `file()`, `cmd()`, `ref()` for verified references
|
|
95
|
+
- Do NOT add `#` or `##` headers inside sections — they break the document structure
|
|
96
|
+
|
|
97
|
+
**Adding a key file or command:**
|
|
98
|
+
|
|
99
|
+
- Add to `keyFiles` or `commands`. The compiler verifies these exist at compile time
|
|
100
|
+
- For commands: must match a script in `package.json`
|
|
101
|
+
- For key files: must exist on disk
|
|
102
|
+
|
|
103
|
+
### Step 4: Compile
|
|
104
|
+
|
|
105
|
+
After editing the spec, run:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx vigiles compile
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This regenerates the compiled instruction file(s). Review the output for any errors:
|
|
112
|
+
|
|
113
|
+
- `stale-file` — a key file path doesn't exist
|
|
114
|
+
- `stale-command` — a command isn't in package.json
|
|
115
|
+
- `invalid-rule` — a linter rule doesn't exist or is disabled
|
|
116
|
+
- `section-has-header` — a section contains `#` headers (break into separate named sections)
|
|
117
|
+
|
|
118
|
+
### Step 5: Verify
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx vigiles check
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
If the PostToolUse hook is installed (via `npx skills add zernie/vigiles`), compilation happens automatically after you save the spec.
|
|
125
|
+
|
|
126
|
+
## Important
|
|
127
|
+
|
|
128
|
+
- **Never edit CLAUDE.md or AGENTS.md directly** — they have a vigiles hash comment and are build artifacts
|
|
129
|
+
- **The spec is TypeScript** — you get type checking, autocomplete, and verified references
|
|
130
|
+
- **`enforce()` rules are verified** — the compiler checks the rule exists AND is enabled in your linter config
|
|
131
|
+
- **Sections must not contain `#` or `##` headers** — use separate named sections instead
|
|
@@ -0,0 +1,71 @@
|
|
|
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.
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!-- vigiles:sha256:a9df2c1748576753 compiled from skills/generate-rule/SKILL.md.spec.ts -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
name: generate-rule
|
|
6
|
+
description: Add a new enforce(), check(), or guidance() rule to an existing spec file
|
|
7
|
+
disable-model-invocation: true
|
|
8
|
+
argument-hint: <rule>
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Arguments
|
|
13
|
+
|
|
14
|
+
- `$1` **rule** — natural-language description of what the rule should enforce, e.g. "no console.log in production code"
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
### Step 1
|
|
19
|
+
|
|
20
|
+
**Find the spec file.** Look for `CLAUDE.md.spec.ts` in the repo root. If it doesn't exist:
|
|
21
|
+
|
|
22
|
+
- If there's a hand-written `CLAUDE.md`, suggest running the `migrate-to-spec` skill first.
|
|
23
|
+
- If there's no `CLAUDE.md` either, suggest `npx vigiles init` to scaffold one.
|
|
24
|
+
|
|
25
|
+
### Step 2
|
|
26
|
+
|
|
27
|
+
**Classify the rule** from the description ($1):
|
|
28
|
+
|
|
29
|
+
- **enforce()** — if a linter rule can back it. Check the project's linter configs (ESLint, Ruff, Clippy, Pylint, RuboCop, Stylelint) for a matching rule; also consider an architectural tool (ast-grep, Dependency Cruiser, Steiger). If uncertain whether a rule exists, **ask the user** rather than guessing.
|
|
30
|
+
- **check()** — if it's a filesystem structural convention ("every X needs a Y"). Only for file-pairing; never for code content.
|
|
31
|
+
- **guidance()** — if it can't be mechanically enforced (subjective conventions, process rules, migration context).
|
|
32
|
+
|
|
33
|
+
### Step 3
|
|
34
|
+
|
|
35
|
+
**Generate the rule.** Create an entry with a kebab-case ID derived from the description. Examples:
|
|
36
|
+
|
|
37
|
+
"no-console": enforce("eslint/no-console", "Use structured logger for observability."),
|
|
38
|
+
|
|
39
|
+
"controller-tests": check(
|
|
40
|
+
every("src/**/*.controller.ts").has("{name}.controller.test.ts"),
|
|
41
|
+
"Every controller must have a co-located test file.",
|
|
42
|
+
),
|
|
43
|
+
|
|
44
|
+
"research-before-implementing": guidance(
|
|
45
|
+
"Google unfamiliar APIs before implementing.",
|
|
46
|
+
),
|
|
47
|
+
|
|
48
|
+
### Step 4
|
|
49
|
+
|
|
50
|
+
**Add it to the spec.** Read the existing spec file and add the new rule to the `rules` object, preserving alphabetical ordering if the existing rules are alphabetical. Import any new builders needed (e.g. `check` and `every` for the first `check()` rule).
|
|
51
|
+
|
|
52
|
+
### Step 5
|
|
53
|
+
|
|
54
|
+
**Compile and verify.** Build and recompile; if compilation fails (e.g. the linter rule doesn't exist), report the error and suggest alternatives. Show the user the updated spec and the compiled `CLAUDE.md` diff.
|
|
55
|
+
|
|
56
|
+
**Gate** — run the project's build command (retry up to 2×); do not proceed until it passes.
|
|
57
|
+
|
|
58
|
+
<!-- vigiles:gate role:build retry:2 -->
|
|
59
|
+
|
|
60
|
+
## Result
|
|
61
|
+
|
|
62
|
+
This skill is complete when the project's build command passes.
|
|
63
|
+
|
|
64
|
+
<!-- vigiles:result role:build -->
|