@sentry/warden 0.35.1 → 0.36.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.
Files changed (113) hide show
  1. package/dist/cli/args.d.ts +12 -0
  2. package/dist/cli/args.d.ts.map +1 -1
  3. package/dist/cli/args.js +14 -0
  4. package/dist/cli/args.js.map +1 -1
  5. package/dist/cli/commands/init.js +2 -2
  6. package/dist/cli/commands/init.js.map +1 -1
  7. package/dist/cli/help.d.ts.map +1 -1
  8. package/dist/cli/help.js +16 -0
  9. package/dist/cli/help.js.map +1 -1
  10. package/dist/cli/main.d.ts +4 -2
  11. package/dist/cli/main.d.ts.map +1 -1
  12. package/dist/cli/main.js +34 -13
  13. package/dist/cli/main.js.map +1 -1
  14. package/dist/cli/output/jsonl-schema-gen.d.ts.map +1 -1
  15. package/dist/cli/output/jsonl-schema-gen.js +3 -1
  16. package/dist/cli/output/jsonl-schema-gen.js.map +1 -1
  17. package/dist/cli/output/jsonl.d.ts +54 -0
  18. package/dist/cli/output/jsonl.d.ts.map +1 -1
  19. package/dist/cli/output/jsonl.js +6 -1
  20. package/dist/cli/output/jsonl.js.map +1 -1
  21. package/dist/cli/output/tasks.d.ts.map +1 -1
  22. package/dist/cli/output/tasks.js +7 -0
  23. package/dist/cli/output/tasks.js.map +1 -1
  24. package/dist/config/loader.d.ts +2 -2
  25. package/dist/config/loader.d.ts.map +1 -1
  26. package/dist/config/loader.js +3 -3
  27. package/dist/config/loader.js.map +1 -1
  28. package/dist/config/schema.d.ts +5 -5
  29. package/dist/config/schema.d.ts.map +1 -1
  30. package/dist/config/schema.js +3 -3
  31. package/dist/config/schema.js.map +1 -1
  32. package/dist/index.d.ts +4 -4
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +2 -2
  35. package/dist/index.js.map +1 -1
  36. package/dist/sdk/analyze.d.ts.map +1 -1
  37. package/dist/sdk/analyze.js +139 -10
  38. package/dist/sdk/analyze.js.map +1 -1
  39. package/dist/sdk/auth.d.ts +5 -4
  40. package/dist/sdk/auth.d.ts.map +1 -1
  41. package/dist/sdk/auth.js +9 -7
  42. package/dist/sdk/auth.js.map +1 -1
  43. package/dist/sdk/circuit-breaker.js +3 -3
  44. package/dist/sdk/circuit-breaker.js.map +1 -1
  45. package/dist/sdk/errors.d.ts +8 -0
  46. package/dist/sdk/errors.d.ts.map +1 -1
  47. package/dist/sdk/errors.js +44 -1
  48. package/dist/sdk/errors.js.map +1 -1
  49. package/dist/sdk/haiku.d.ts +4 -0
  50. package/dist/sdk/haiku.d.ts.map +1 -1
  51. package/dist/sdk/haiku.js +76 -26
  52. package/dist/sdk/haiku.js.map +1 -1
  53. package/dist/sdk/otel.d.ts +39 -2
  54. package/dist/sdk/otel.d.ts.map +1 -1
  55. package/dist/sdk/otel.js +116 -11
  56. package/dist/sdk/otel.js.map +1 -1
  57. package/dist/sdk/post-process.d.ts +2 -2
  58. package/dist/sdk/post-process.d.ts.map +1 -1
  59. package/dist/sdk/post-process.js +1 -1
  60. package/dist/sdk/post-process.js.map +1 -1
  61. package/dist/sdk/runtimes/claude.d.ts.map +1 -1
  62. package/dist/sdk/runtimes/claude.js +134 -60
  63. package/dist/sdk/runtimes/claude.js.map +1 -1
  64. package/dist/sdk/runtimes/pi.d.ts.map +1 -1
  65. package/dist/sdk/runtimes/pi.js +143 -12
  66. package/dist/sdk/runtimes/pi.js.map +1 -1
  67. package/dist/sdk/runtimes/types.d.ts +2 -2
  68. package/dist/sdk/runtimes/types.d.ts.map +1 -1
  69. package/dist/sdk/types.d.ts +12 -4
  70. package/dist/sdk/types.d.ts.map +1 -1
  71. package/dist/sdk/verify.d.ts +2 -2
  72. package/dist/sdk/verify.d.ts.map +1 -1
  73. package/dist/sdk/verify.js +1 -1
  74. package/dist/sdk/verify.js.map +1 -1
  75. package/dist/sentry-trace.d.ts +29 -0
  76. package/dist/sentry-trace.d.ts.map +1 -0
  77. package/dist/sentry-trace.js +154 -0
  78. package/dist/sentry-trace.js.map +1 -0
  79. package/dist/sentry.d.ts.map +1 -1
  80. package/dist/sentry.js +56 -0
  81. package/dist/sentry.js.map +1 -1
  82. package/dist/types/index.d.ts +72 -0
  83. package/dist/types/index.d.ts.map +1 -1
  84. package/dist/types/index.js +37 -0
  85. package/dist/types/index.js.map +1 -1
  86. package/package.json +1 -1
  87. package/skills/warden/SKILL.md +0 -76
  88. package/skills/warden/SOURCES.md +0 -39
  89. package/skills/warden/SPEC.md +0 -112
  90. package/skills/warden/references/cli-reference.md +0 -149
  91. package/skills/warden/references/config-schema.md +0 -141
  92. package/skills/warden/references/configuration.md +0 -143
  93. package/skills/warden/references/creating-skills.md +0 -87
  94. package/skills/warden-sweep/SKILL.md +0 -78
  95. package/skills/warden-sweep/SOURCES.md +0 -43
  96. package/skills/warden-sweep/SPEC.md +0 -126
  97. package/skills/warden-sweep/references/issue-phase.md +0 -24
  98. package/skills/warden-sweep/references/organize-phase.md +0 -31
  99. package/skills/warden-sweep/references/patch-phase.md +0 -142
  100. package/skills/warden-sweep/references/patch-prompt.md +0 -72
  101. package/skills/warden-sweep/references/resume-and-artifacts.md +0 -51
  102. package/skills/warden-sweep/references/scan-phase.md +0 -46
  103. package/skills/warden-sweep/references/script-interfaces.md +0 -127
  104. package/skills/warden-sweep/references/verify-phase.md +0 -69
  105. package/skills/warden-sweep/references/verify-prompt.md +0 -25
  106. package/skills/warden-sweep/scripts/_utils.py +0 -99
  107. package/skills/warden-sweep/scripts/create_issue.py +0 -189
  108. package/skills/warden-sweep/scripts/extract_findings.py +0 -219
  109. package/skills/warden-sweep/scripts/find_reviewers.py +0 -114
  110. package/skills/warden-sweep/scripts/generate_report.py +0 -266
  111. package/skills/warden-sweep/scripts/index_prs.py +0 -187
  112. package/skills/warden-sweep/scripts/organize.py +0 -422
  113. package/skills/warden-sweep/scripts/scan.py +0 -584
@@ -1,39 +0,0 @@
1
- # Warden Skill Sources
2
-
3
- ## Source Inventory
4
-
5
- | Source | Trust tier | Confidence | Usage constraints |
6
- |--------|------------|------------|-------------------|
7
- | `skills/warden/SKILL.md` | canonical runtime | high | Keep concise; runtime instructions only. |
8
- | `skills/warden/references/*.md` | bundled runtime references | high | Keep focused by lookup need. |
9
- | `packages/warden/src/cli/` | implementation | high | Verify CLI flags and behavior here before changing examples. |
10
- | `packages/warden/src/config/` and `packages/warden/src/types/` | implementation | high | Verify config field names, defaults, and validation rules here. |
11
- | `packages/docs/src/pages/cli.astro` | generated/user docs source | medium | Useful for CLI descriptions, but implementation wins on conflicts. |
12
- | `packages/docs/src/pages/config.astro` | generated/user docs source | medium | Useful for config examples, but implementation wins on conflicts. |
13
- | `packages/docs/src/pages/skill.astro` | generated/user docs source | medium | Useful for install and skill-discovery language. |
14
-
15
- ## Coverage Matrix
16
-
17
- | Dimension | Coverage status | Evidence |
18
- |-----------|-----------------|----------|
19
- | CLI surface | covered | `references/cli-reference.md` lists commands, targets, flags, exit codes, and examples. |
20
- | Config/runtime options | covered | `references/configuration.md` and `references/config-schema.md` cover `warden.toml` structure, fields, defaults, triggers, and environment variables. |
21
- | Common use cases | covered | `SKILL.md` covers run-before-commit, explicit skill runs, file targets, git refs, fix mode, and config edits. |
22
- | Known issues/workarounds | partial | `references/configuration.md` has troubleshooting; CLI auth and install failures could use more detail. |
23
- | Version/migration variance | partial | Remote skill pinning and cache behavior are documented; package-version migration notes are not maintained here. |
24
-
25
- ## Decisions
26
-
27
- - Keep `SKILL.md` as a quick router because agents often need only a command, not the full CLI documentation.
28
- - Keep CLI, config, schema, and skill creation in separate references so agents can load only the relevant detail.
29
- - Keep Warden-specific skill creation guidance in this skill even though generic skill authoring belongs elsewhere, because Warden has its own discovery, config, and remote-skill behavior.
30
-
31
- ## Open Gaps
32
-
33
- - Add or verify an auth/setup troubleshooting reference if repeated agent runs fail before Warden can execute.
34
- - Confirm CLI examples after each release that changes flags, output modes, or init/add/sync behavior.
35
- - Add migration notes if Warden introduces breaking config changes beyond `version = 1`.
36
-
37
- ## Changelog
38
-
39
- - 2026-04-27: Reverse-engineered maintenance spec and source inventory from the distributed `warden` skill.
@@ -1,112 +0,0 @@
1
- # Warden Skill Specification
2
-
3
- ## Intent
4
-
5
- The `warden` skill teaches coding agents how to run Warden during local development, interpret its output, and update Warden configuration or skill definitions when asked.
6
-
7
- It exists as the lightweight runtime companion to the Warden CLI. The skill should get agents to the right command or reference quickly without duplicating the full product documentation.
8
-
9
- ## Scope
10
-
11
- In scope:
12
-
13
- - Running Warden against uncommitted changes, explicit files, or git refs.
14
- - Reading and editing `warden.toml`.
15
- - Explaining Warden CLI flags, exit codes, severity thresholds, and output modes.
16
- - Creating or wiring local Warden analysis skills.
17
- - Directing agents to focused bundled references for detailed CLI, config, and skill-authoring behavior.
18
-
19
- Out of scope:
20
-
21
- - Replacing Warden product documentation.
22
- - Running full-repository batch sweeps; use `warden-sweep` for that workflow.
23
- - Defining project-specific review policy.
24
- - Teaching generic agent skill authoring beyond Warden-specific discovery and config.
25
-
26
- ## Users And Trigger Context
27
-
28
- - Primary users: coding agents working in repositories that use Warden.
29
- - Common user requests: "run warden", "check my changes", "review before commit", "update warden.toml", "add a Warden trigger", "create a Warden skill".
30
- - Should not trigger for: ordinary code review requests with no Warden context, generic testing, PR writing, or full-repository sweep requests.
31
-
32
- ## Runtime Contract
33
-
34
- - Required first actions:
35
- - Identify whether the user wants to run Warden, edit config, inspect output, or create/update a Warden skill.
36
- - Load only the reference needed for that task.
37
- - Prefer local repository configuration over generic examples.
38
- - Required outputs:
39
- - For runs: summarize command used, findings count, failure threshold, and next action.
40
- - For config edits: state the changed trigger or setting and how to validate it.
41
- - For skill creation: state where the skill was created and how it is referenced.
42
- - Non-negotiable constraints:
43
- - Do not loop Warden repeatedly on unchanged work.
44
- - Do not invent config fields; check `references/config-schema.md` for exact names.
45
- - Do not treat Warden findings as advisory text to suppress; fix the code or explicitly explain why a finding is not actionable.
46
- - Expected bundled files loaded at runtime:
47
- - `references/cli-reference.md`
48
- - `references/configuration.md`
49
- - `references/config-schema.md`
50
- - `references/creating-skills.md`
51
-
52
- ## Source And Evidence Model
53
-
54
- Authoritative sources:
55
-
56
- - Warden CLI behavior in `src/cli/`.
57
- - Warden config loading and schemas in `src/config/` and `src/types/`.
58
- - Documentation pages in `packages/docs/src/pages/`.
59
- - Existing runtime references in `skills/warden/references/`.
60
-
61
- Useful improvement sources:
62
-
63
- - positive examples: agent sessions where Warden was run once, findings were fixed, and config edits used valid schema fields
64
- - negative examples: repeated Warden reruns with no changes, invented config fields, stale CLI flags, or generic skill instructions that do not match Warden discovery
65
- - commit logs/changelogs: CLI flag changes, config schema changes, and skill discovery changes
66
- - issue or PR feedback: reports of confusing Warden setup, missing command coverage, or stale agent skill docs
67
- - eval results: local prompts covering run, config, output interpretation, and skill creation paths
68
-
69
- Data that must not be stored:
70
-
71
- - secrets, tokens, or API keys
72
- - customer data
73
- - private repository URLs or identifiers not needed for reproduction
74
- - raw Warden logs containing sensitive code or findings
75
-
76
- ## Reference Architecture
77
-
78
- - `SKILL.md` contains task routing, quick commands, core constraints, and the reference map.
79
- - `SOURCES.md` contains source inventory, coverage, gaps, and changelog.
80
- - `references/` contains focused CLI, config, schema, and Warden skill creation guides.
81
- - `references/evidence/` is unused until repeated examples need durable storage.
82
- - `scripts/` is unused; this skill delegates execution to the installed `warden` CLI.
83
- - `assets/` is unused.
84
-
85
- ## Evaluation
86
-
87
- - Lightweight validation:
88
- - Run the skill validator against `skills/warden`.
89
- - Check that every referenced bundled file exists.
90
- - Spot-check CLI flags and config fields against source or generated docs.
91
- - Deeper evaluation:
92
- - Exercise prompts for running Warden, adding a trigger, explaining output, and creating a skill.
93
- - Holdout examples:
94
- - Preserve only redacted examples if recurring failures appear.
95
- - Acceptance gates:
96
- - `SKILL.md` stays concise and routes to focused references.
97
- - Long references include navigation.
98
- - Config examples use valid field names.
99
- - Trigger description catches Warden-specific local development tasks without matching generic code review.
100
-
101
- ## Known Limitations
102
-
103
- - The skill assumes the `warden` CLI is installed and authenticated where required.
104
- - CLI and config details can drift when source changes without updating the bundled references.
105
- - Some host agents expose different skill-root variables; references are written as bundled file paths, while examples may need host-specific substitution.
106
-
107
- ## Maintenance Notes
108
-
109
- - Update `SKILL.md` when task routing, trigger language, or universal run constraints change.
110
- - Update `SOURCES.md` when source inventory, decisions, coverage, or gaps change.
111
- - Update references when CLI flags, config fields, remote skill behavior, or examples change.
112
- - Update `references/evidence/` only for durable positive or negative examples that should guide future iterations.
@@ -1,149 +0,0 @@
1
- # CLI Reference
2
-
3
- ## Contents
4
-
5
- - Usage
6
- - Commands
7
- - Targets
8
- - Options
9
- - Per-Command Options
10
- - Severity Levels
11
- - Exit Codes
12
- - Examples
13
-
14
- ## Usage
15
-
16
- ```
17
- warden [command] [targets...] [options]
18
- ```
19
-
20
- ## Commands
21
-
22
- | Command | Description |
23
- |---------|-------------|
24
- | `(default)` | Run analysis on targets or using warden.toml skills |
25
- | `init` | Initialize warden.toml and GitHub workflow |
26
- | `add [skill]` | Add a skill to warden.toml |
27
- | `sync [remote]` | Update cached remote skills to latest |
28
- | `setup-app` | Create a GitHub App for Warden via manifest flow |
29
-
30
- ## Targets
31
-
32
- | Target | Description |
33
- |--------|-------------|
34
- | `<files>` | Analyze specific files (e.g., `src/auth.ts`) |
35
- | `<glob>` | Analyze files matching pattern (e.g., `"src/**/*.ts"`) |
36
- | `<git-ref>` | Analyze changes from git ref (e.g., `HEAD~3`, `main..feature`) |
37
- | `(none)` | Analyze uncommitted changes using warden.toml skills |
38
-
39
- Ambiguous targets (no path separator, no extension) are resolved by checking if a file exists at the path. Use `--git` to force git ref interpretation.
40
-
41
- ## Options
42
-
43
- | Option | Description |
44
- |--------|-------------|
45
- | `--skill <name>` | Run only this skill by name or path; names fall back to built-ins |
46
- | `--config-path <path>` | Path to warden.toml or a directory containing it (default: `./warden.toml`). `--config` is a deprecated alias. |
47
- | `-m, --model <model>` | Model to use (fallback when not set in config) |
48
- | `--json` | Output results as JSON |
49
- | `-o, --output <path>` | Write full run output to a JSONL file |
50
- | `--fail-on <severity>` | Exit with code 1 if findings >= severity |
51
- | `--report-on <severity>` | Only show findings >= severity in output |
52
- | `--fix` | Automatically apply all suggested fixes |
53
- | `--parallel <n>` | Max concurrent skill executions (default: 4) |
54
- | `--git` | Force ambiguous targets to be treated as git refs |
55
- | `--offline` | Use cached remote skills without network access |
56
- | `-q, --quiet` | Errors and final summary only |
57
- | `-v, --verbose` | Show real-time findings and hunk details |
58
- | `-vv` | Show debug info (token counts, latencies) |
59
- | `--debug` | Enable debug output (equivalent to `-vv`) |
60
- | `--log` | Use log output (no animations, timestamped) |
61
- | `--color / --no-color` | Override color detection |
62
- | `-h, --help` | Show help message |
63
- | `-V, --version` | Show version number |
64
-
65
- ## Per-Command Options
66
-
67
- **Init:**
68
- | Option | Description |
69
- |--------|-------------|
70
- | `-f, --force` | Overwrite existing files |
71
-
72
- **Add:**
73
- | Option | Description |
74
- |--------|-------------|
75
- | `--list` | List available skills |
76
- | `--remote <ref>` | Remote repository (`owner/repo`, URL, or with `@sha`) |
77
- | `--force` | Bypass skill cache and fetch latest |
78
-
79
- **Sync:**
80
- | Option | Description |
81
- |--------|-------------|
82
- | `--remote <ref>` | Specific remote to sync (default: all) |
83
-
84
- **Setup-app:**
85
- | Option | Description |
86
- |--------|-------------|
87
- | `--org <name>` | Create under organization (default: personal) |
88
- | `--port <number>` | Local server port (default: 3000) |
89
- | `--timeout <sec>` | Callback timeout in seconds (default: 300) |
90
- | `--name <string>` | Custom app name (default: Warden) |
91
- | `--no-open` | Print URL instead of opening browser |
92
-
93
- ## Severity Levels
94
-
95
- | Level | Meaning |
96
- |-------|---------|
97
- | `high` | Must fix before merge |
98
- | `medium` | Worth reviewing |
99
- | `low` | Minor improvement |
100
- | `off` | Disable the threshold |
101
-
102
- ## Exit Codes
103
-
104
- | Code | Meaning |
105
- |------|---------|
106
- | `0` | No findings at or above `--fail-on` threshold |
107
- | `1` | Findings at or above `--fail-on` threshold |
108
-
109
- ## Examples
110
-
111
- ```bash
112
- # Initialize
113
- warden init
114
-
115
- # Interactive skill selection
116
- warden add
117
- warden add security-review
118
- warden add --list
119
-
120
- # Remote skills
121
- warden add --remote <org>/<repo> --skill <skill-name>
122
- warden add --remote https://github.com/<org>/<repo> --skill <skill-name>
123
- warden add --remote <org>/<repo>@<ref> --skill <skill-name>
124
-
125
- # Run analysis
126
- warden # Skills from warden.toml
127
- warden src/auth.ts # Specific file
128
- warden src/auth.ts --skill <skill-name>
129
- warden "src/**/*.ts" # Glob pattern
130
- warden HEAD~3 # Git changes
131
- warden HEAD~3 --skill <skill-name>
132
- warden main..HEAD # Branch diff
133
-
134
- # Output control
135
- warden --json
136
- warden --fail-on high
137
- warden -o results.jsonl
138
-
139
- # Fix mode
140
- warden --fix
141
-
142
- # Cached skills only
143
- warden --offline
144
- warden sync # Update all unpinned remote skills
145
-
146
- # GitHub App setup
147
- warden setup-app
148
- warden setup-app --org myorg
149
- ```
@@ -1,141 +0,0 @@
1
- # warden.toml Configuration Schema
2
-
3
- ## Contents
4
-
5
- - Top-Level Structure
6
- - Defaults Section
7
- - Skills Section
8
- - Severity Values
9
- - Built-in Skip Patterns
10
- - Environment Variables
11
-
12
- ## Top-Level Structure
13
-
14
- ```toml
15
- version = 1 # Required, must be 1
16
-
17
- [defaults] # Optional, inherited by all skills
18
- [defaults.agent] # Optional, default analysis runtime settings
19
- [defaults.auxiliary] # Optional, default helper model settings
20
- [defaults.synthesis] # Optional, default synthesis model settings
21
- [[skills]] # Required, array of skill configs
22
- ```
23
-
24
- ## Defaults Section
25
-
26
- ```toml
27
- [defaults]
28
- runtime = "pi" # Default runtime
29
- model = "openai/gpt-5.5" # Legacy default analysis model
30
- maxTurns = 50 # Legacy default analysis turns
31
- defaultBranch = "main" # Base branch for comparisons
32
- failOn = "high" # Exit 1 if findings >= this severity
33
- reportOn = "medium" # Show findings >= this severity
34
- maxFindings = 50 # Max findings to report (0 = unlimited)
35
- reportOnSuccess = false # Post report even with no findings
36
- ignorePaths = ["*.test.ts"] # Exclude matching files
37
-
38
- [defaults.agent]
39
- model = "openai/gpt-5.5" # Default repo-aware analysis model
40
- maxTurns = 50 # Max agentic turns per hunk
41
- reasoningEffort = "medium" # off | low | medium | high | xhigh
42
-
43
- [defaults.auxiliary]
44
- model = "anthropic/claude-haiku-4-5" # Helper model for extraction and fix gates
45
- maxRetries = 5 # Retries for auxiliary structured calls
46
-
47
- [defaults.synthesis]
48
- model = "anthropic/claude-opus-4-5" # Consolidation and generated-skill build model
49
-
50
- [defaults.chunking]
51
- enabled = true # Enable hunk-based chunking
52
-
53
- [defaults.chunking.coalesce]
54
- enabled = true # Merge nearby hunks
55
- maxGapLines = 30 # Lines between hunks to merge
56
- maxChunkSize = 8000 # Max chars per chunk
57
-
58
- [[defaults.chunking.filePatterns]]
59
- pattern = "*.config.*" # Glob pattern
60
- mode = "whole-file" # per-hunk | whole-file | skip
61
- ```
62
-
63
- `[defaults.agent].reasoningEffort` controls repo-aware skill reasoning across runtimes. When omitted, each runtime uses its own default.
64
-
65
- `[defaults.synthesis].model` falls back to `[defaults.auxiliary].model` when omitted. Legacy `[defaults].model` and `[defaults].maxTurns` are still supported as analysis fallbacks.
66
-
67
- ## Skills Section
68
-
69
- ```toml
70
- [[skills]]
71
- name = "skill-name" # Required, unique identifier
72
- remote = "owner/repo@sha" # Optional, fetch skill from GitHub repo
73
- paths = ["src/**"] # Include only matching files
74
- ignorePaths = ["**/*.test.ts"] # Exclude matching files
75
-
76
- # Optional overrides (inherit from defaults if not set)
77
- model = "anthropic/claude-opus-4-5"
78
- maxTurns = 100
79
- failOn = "high"
80
- reportOn = "medium"
81
- maxFindings = 20
82
- reportOnSuccess = true
83
-
84
- [[skills.triggers]]
85
- type = "pull_request" # Required: pull_request | local | schedule
86
- actions = ["opened", "synchronize"] # Required for pull_request
87
-
88
- # Schedule-specific (only for type = "schedule")
89
- [[skills.triggers]]
90
- type = "schedule"
91
-
92
- [skills.triggers.schedule]
93
- issueTitle = "Daily Security Review" # GitHub issue title for tracking
94
- createFixPR = true # Create PR with fixes
95
- fixBranchPrefix = "security-fix" # Branch name prefix
96
- ```
97
-
98
- **Trigger types:**
99
- - `pull_request` - Triggers on PR events
100
- - `local` - Local CLI only (will not run in CI)
101
- - `schedule` - Cron schedule (GitHub Action only)
102
-
103
- All skills run locally regardless of trigger type. Skills with no triggers run everywhere (wildcard). Use `type = "local"` for skills that should *only* run locally.
104
-
105
- **Actions (for pull_request):**
106
- - `opened`, `synchronize`, `reopened`, `closed`
107
-
108
- ## Severity Values
109
-
110
- Used in `failOn` and `reportOn`:
111
- - `high` - Must fix before merge
112
- - `medium` - Worth reviewing
113
- - `low` - Minor improvement
114
- - `off` - Disable threshold
115
-
116
- ## Built-in Skip Patterns
117
-
118
- Always skipped (cannot be overridden):
119
- - Package locks: `pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`, `Cargo.lock`, etc.
120
- - Minified files: `**/*.min.js`, `**/*.min.css`
121
- - Build artifacts: `dist/`, `build/`, `node_modules/`, `.next/`, `__pycache__/`
122
- - Generated code: `*.generated.*`, `*.g.ts`, `__generated__/`
123
-
124
- ## Environment Variables
125
-
126
- | Variable | Purpose |
127
- |----------|---------|
128
- | `WARDEN_MODEL` | Default model (lowest priority) |
129
- | `WARDEN_OPENAI_API_KEY` | OpenAI API key for OpenAI Pi models |
130
- | `WARDEN_ANTHROPIC_API_KEY` | Anthropic API key for Anthropic Pi models or Claude runtime |
131
- | `WARDEN_STATE_DIR` | Override cache location (default: `~/.local/warden`) |
132
- | `WARDEN_SKILL_CACHE_TTL` | Cache TTL in seconds for unpinned remotes (default: 86400) |
133
-
134
- ## Model Precedence (highest to lowest)
135
-
136
- 1. Skill-level `model`
137
- 2. `[defaults.agent]` `model`
138
- 3. `[defaults]` `model` (legacy fallback)
139
- 4. CLI `--model` flag
140
- 5. `WARDEN_MODEL` env var
141
- 6. SDK default
@@ -1,143 +0,0 @@
1
- # Configuration (warden.toml)
2
-
3
- ## Contents
4
-
5
- - Minimal Example
6
- - Skill Configuration
7
- - Common Patterns
8
- - Model Lanes
9
- - Model Precedence
10
- - Environment Variables
11
- - Troubleshooting
12
-
13
- See [config-schema.md](config-schema.md) for the complete schema reference.
14
-
15
- ## Minimal Example
16
-
17
- The `name` field references a skill you've created (via `warden add`) or defined in `.agents/skills/<name>/SKILL.md`. Use that same name everywhere — in config, CLI flags, and triggers.
18
-
19
- ```toml
20
- version = 1
21
-
22
- [defaults.agent]
23
- model = "openai/gpt-5.5"
24
- reasoningEffort = "medium"
25
-
26
- [[skills]]
27
- name = "my-skill" # matches .agents/skills/my-skill/SKILL.md
28
- paths = ["src/**/*.ts"]
29
-
30
- [[skills.triggers]]
31
- type = "pull_request"
32
- actions = ["opened", "synchronize"]
33
- ```
34
-
35
- ## Skill Configuration
36
-
37
- Skills define what to analyze and when. Each skill requires a name. Triggers are optional — skills with no triggers run everywhere (PR, local, schedule). All skills run locally regardless of trigger type.
38
-
39
- ```toml
40
- [[skills]]
41
- name = "my-skill"
42
- paths = ["src/auth/**", "src/payments/**"]
43
- failOn = "high"
44
- reportOn = "medium"
45
- maxFindings = 20
46
-
47
- [[skills.triggers]]
48
- type = "pull_request"
49
- actions = ["opened", "synchronize"]
50
- ```
51
-
52
- **Trigger types:** `pull_request`, `local` (local-only), `schedule` (CI-only)
53
-
54
- **Actions (pull_request):** `opened`, `synchronize`, `reopened`, `closed`
55
-
56
- ## Common Patterns
57
-
58
- **Strict checks on critical files:**
59
- ```toml
60
- [[skills]]
61
- name = "my-skill"
62
- model = "anthropic/claude-opus-4-5"
63
- maxTurns = 100
64
- paths = ["src/auth/**", "src/payments/**"]
65
- failOn = "high"
66
-
67
- [[skills.triggers]]
68
- type = "pull_request"
69
- actions = ["opened", "synchronize"]
70
- ```
71
-
72
- **Skip test files:**
73
- ```toml
74
- [[skills]]
75
- name = "my-skill"
76
- paths = ["src/**/*.ts"]
77
- ignorePaths = ["**/*.test.ts", "**/*.spec.ts"]
78
- ```
79
-
80
- **Whole-file analysis for configs:**
81
- ```toml
82
- [[defaults.chunking.filePatterns]]
83
- pattern = "*.config.*"
84
- mode = "whole-file"
85
- ```
86
-
87
- ## Model Lanes
88
-
89
- Warden uses different model lanes for different kinds of work:
90
-
91
- - Analysis: repo-aware skill execution uses `[[skills]].model`, then `[defaults.agent].model`, then legacy `[defaults].model`
92
- - Auxiliary: structured helper calls use `[defaults.auxiliary].model`
93
- - Synthesis: post-analysis consolidation and generated-skill builds use `[defaults.synthesis].model`
94
-
95
- If `[defaults.synthesis].model` is omitted, synthesis falls back to `[defaults.auxiliary].model`.
96
-
97
- `[defaults.agent].reasoningEffort` optionally controls repo-aware skill reasoning across runtimes. Supported values are `off`, `low`, `medium`, `high`, and `xhigh`. When omitted, each runtime uses its own default.
98
-
99
- ## Model Precedence
100
-
101
- From highest to lowest priority:
102
-
103
- 1. Skill-level `model`
104
- 2. `[defaults.agent]` `model`
105
- 3. `[defaults]` `model` (legacy fallback)
106
- 4. CLI `--model` flag
107
- 5. `WARDEN_MODEL` env var
108
- 6. SDK default
109
-
110
- ## Environment Variables
111
-
112
- | Variable | Purpose |
113
- |----------|---------|
114
- | `WARDEN_MODEL` | Default model (lowest priority) |
115
- | `WARDEN_{PROVIDER}_API_KEY` | API key for the named Pi provider (e.g. `WARDEN_OPENAI_API_KEY`, `WARDEN_FIREWORKS_API_KEY`). Mirrored to the native `{PROVIDER}_API_KEY` at runtime. |
116
- | `WARDEN_OPENAI_API_KEY` | OpenAI API key for OpenAI Pi models |
117
- | `WARDEN_ANTHROPIC_API_KEY` | Anthropic API key for Anthropic Pi models or Claude runtime |
118
- | `WARDEN_FIREWORKS_API_KEY` | Fireworks API key for Fireworks Pi models |
119
- | `WARDEN_GROQ_API_KEY` | Groq API key for Groq Pi models |
120
- | `WARDEN_OPENROUTER_API_KEY` | OpenRouter API key for OpenRouter Pi models |
121
- | `WARDEN_STATE_DIR` | Override cache location (default: `~/.local/warden`) |
122
- | `WARDEN_SKILL_CACHE_TTL` | Cache TTL in seconds for unpinned remotes (default: 86400) |
123
-
124
- Native provider env vars (e.g. `OPENAI_API_KEY`) also work. The `WARDEN_`-prefixed forms are
125
- preferred in CI so they do not collide with locally-set provider keys.
126
-
127
- ## Troubleshooting
128
-
129
- **No findings reported:**
130
- - Check `--report-on` threshold (default shows all)
131
- - Verify skill matches file types in `paths`
132
- - Use `-v` to see which files are being analyzed
133
-
134
- **Files being skipped:**
135
- - Built-in skip patterns: lock files, minified, `node_modules/`, `dist/`
136
- - Check `ignorePaths` in config
137
- - Use `-vv` to see skip reasons
138
-
139
- **Token/cost issues:**
140
- - Reduce `maxTurns` (default: 50)
141
- - Lower `[defaults.agent].reasoningEffort` when the runtime supports cheaper reasoning levels
142
- - Use chunking settings to control chunk size
143
- - Filter to relevant files with `paths`
@@ -1,87 +0,0 @@
1
- # Creating Skills
2
-
3
- Skills are markdown files that tell Warden what to look for. They follow the [agentskills.io](https://agentskills.io) specification.
4
-
5
- ## Skill Discovery
6
-
7
- Warden searches these directories in order (first match wins):
8
-
9
- ```
10
- .warden/skills/{name}/SKILL.md # Warden-local generated skills
11
- .agents/skills/{name}/SKILL.md # Primary (recommended)
12
- .claude/skills/{name}/SKILL.md # Backup (Claude Code convention)
13
- ```
14
-
15
- If no repo-local skill matches, names fall back to Warden's built-in skills such as `security-review`.
16
-
17
- ## SKILL.md Format
18
-
19
- ```markdown
20
- ---
21
- name: my-skill
22
- description: What this skill analyzes
23
- allowed-tools: Read Grep Glob
24
- ---
25
-
26
- [Analysis instructions for the agent]
27
-
28
- ## What to Look For
29
- - Specific issue type 1
30
- - Specific issue type 2
31
-
32
- ## Output Format
33
- Report findings with severity, location, and suggested fix.
34
- ```
35
-
36
- ## Available Tools
37
-
38
- `Read`, `Glob`, `Grep`, `WebFetch`, `WebSearch`, `Bash`, `Write`, `Edit`
39
-
40
- Most review skills only need `Read`, `Grep`, and `Glob` for exploring context.
41
-
42
- ## Writing Checklist
43
-
44
- - One skill, one concern ("security review" not "code quality")
45
- - Clear criteria for what counts as an issue and at what severity
46
- - Actionable findings that include how to fix
47
- - Examples of good and bad code where helpful
48
-
49
- ## Remote Skills
50
-
51
- Skills can be fetched from GitHub repositories:
52
-
53
- ```bash
54
- # Add a remote skill
55
- warden add --remote <org>/<repo> --skill <skill-name>
56
-
57
- # Add with version pinning (recommended for reproducibility)
58
- warden add --remote <org>/<repo>@<ref> --skill <skill-name>
59
-
60
- # List skills in a remote repo
61
- warden add --remote <org>/<repo> --list
62
-
63
- # Update all unpinned remote skills
64
- warden sync
65
-
66
- # Update specific repo
67
- warden sync <org>/<repo>
68
-
69
- # Run with cached skills only (no network)
70
- warden --offline
71
- ```
72
-
73
- **Remote skill in warden.toml:**
74
-
75
- ```toml
76
- [[skills]]
77
- name = "my-skill"
78
- remote = "<org>/<repo>@<ref>"
79
-
80
- [[skills.triggers]]
81
- type = "pull_request"
82
- actions = ["opened", "synchronize"]
83
- ```
84
-
85
- **Cache location:** `~/.local/warden/skills/` (override with `WARDEN_STATE_DIR`)
86
-
87
- **Cache TTL:** 24 hours for unpinned refs (override with `WARDEN_SKILL_CACHE_TTL` in seconds)