@sentry/warden 0.21.0 → 0.23.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/.oxlintrc.json +169 -0
- package/CHANGELOG.md +390 -0
- package/README.md +4 -4
- package/dist/cli/args.d.ts +6 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +175 -207
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +16 -5
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/build.d.ts +13 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +384 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +10 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/runs.d.ts.map +1 -1
- package/dist/cli/commands/runs.js +79 -15
- package/dist/cli/commands/runs.js.map +1 -1
- package/dist/cli/commands/sync.d.ts.map +1 -1
- package/dist/cli/commands/sync.js +4 -1
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +8 -1
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/files.d.ts.map +1 -1
- package/dist/cli/files.js +27 -9
- package/dist/cli/files.js.map +1 -1
- package/dist/cli/help.d.ts +4 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +448 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/index.js +2 -13
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/input.d.ts +12 -0
- package/dist/cli/input.d.ts.map +1 -1
- package/dist/cli/input.js +60 -0
- package/dist/cli/input.js.map +1 -1
- package/dist/cli/log-cleanup.d.ts.map +1 -1
- package/dist/cli/log-cleanup.js +4 -0
- package/dist/cli/log-cleanup.js.map +1 -1
- package/dist/cli/main.d.ts +39 -2
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +482 -100
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output/box.js +1 -1
- package/dist/cli/output/formatters.d.ts +10 -2
- package/dist/cli/output/formatters.d.ts.map +1 -1
- package/dist/cli/output/formatters.js +32 -9
- package/dist/cli/output/formatters.js.map +1 -1
- package/dist/cli/output/index.d.ts +2 -2
- package/dist/cli/output/index.d.ts.map +1 -1
- package/dist/cli/output/index.js +2 -2
- package/dist/cli/output/index.js.map +1 -1
- package/dist/cli/output/ink-runner.d.ts +3 -1
- package/dist/cli/output/ink-runner.d.ts.map +1 -1
- package/dist/cli/output/ink-runner.js +79 -25
- package/dist/cli/output/ink-runner.js.map +1 -1
- package/dist/cli/output/jsonl-schema-gen.d.ts.map +1 -1
- package/dist/cli/output/jsonl-schema-gen.js +4 -2
- package/dist/cli/output/jsonl-schema-gen.js.map +1 -1
- package/dist/cli/output/jsonl.d.ts +147 -4
- package/dist/cli/output/jsonl.d.ts.map +1 -1
- package/dist/cli/output/jsonl.js +183 -7
- package/dist/cli/output/jsonl.js.map +1 -1
- package/dist/cli/output/live-status.d.ts +48 -0
- package/dist/cli/output/live-status.d.ts.map +1 -0
- package/dist/cli/output/live-status.js +173 -0
- package/dist/cli/output/live-status.js.map +1 -0
- package/dist/cli/output/reporter.d.ts +4 -0
- package/dist/cli/output/reporter.d.ts.map +1 -1
- package/dist/cli/output/reporter.js +20 -3
- package/dist/cli/output/reporter.js.map +1 -1
- package/dist/cli/output/tasks.d.ts +11 -5
- package/dist/cli/output/tasks.d.ts.map +1 -1
- package/dist/cli/output/tasks.js +126 -68
- package/dist/cli/output/tasks.js.map +1 -1
- package/dist/cli/signals.d.ts +15 -0
- package/dist/cli/signals.d.ts.map +1 -0
- package/dist/cli/signals.js +26 -0
- package/dist/cli/signals.js.map +1 -0
- package/dist/config/loader.d.ts +48 -7
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +228 -32
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +55 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +34 -2
- package/dist/config/schema.js.map +1 -1
- package/dist/diff/context.d.ts +9 -2
- package/dist/diff/context.d.ts.map +1 -1
- package/dist/diff/context.js +65 -17
- package/dist/diff/context.js.map +1 -1
- package/dist/evals/runner.d.ts.map +1 -1
- package/dist/evals/runner.js +16 -0
- package/dist/evals/runner.js.map +1 -1
- package/dist/event/context.d.ts.map +1 -1
- package/dist/event/context.js +1 -0
- package/dist/event/context.js.map +1 -1
- package/dist/event/schedule-context.d.ts.map +1 -1
- package/dist/event/schedule-context.js +1 -0
- package/dist/event/schedule-context.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/output/dedup.d.ts +8 -11
- package/dist/output/dedup.d.ts.map +1 -1
- package/dist/output/dedup.js +39 -37
- package/dist/output/dedup.js.map +1 -1
- package/dist/output/github-checks.d.ts +1 -0
- package/dist/output/github-checks.d.ts.map +1 -1
- package/dist/output/github-checks.js +9 -7
- package/dist/output/github-checks.js.map +1 -1
- package/dist/sdk/analyze.d.ts.map +1 -1
- package/dist/sdk/analyze.js +166 -276
- package/dist/sdk/analyze.js.map +1 -1
- package/dist/sdk/circuit-breaker.d.ts +26 -0
- package/dist/sdk/circuit-breaker.d.ts.map +1 -0
- package/dist/sdk/circuit-breaker.js +53 -0
- package/dist/sdk/circuit-breaker.js.map +1 -0
- package/dist/sdk/errors.d.ts +5 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +27 -0
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/extract.d.ts +18 -9
- package/dist/sdk/extract.d.ts.map +1 -1
- package/dist/sdk/extract.js +95 -87
- package/dist/sdk/extract.js.map +1 -1
- package/dist/sdk/fix-quality.d.ts +5 -0
- package/dist/sdk/fix-quality.d.ts.map +1 -1
- package/dist/sdk/fix-quality.js +42 -23
- package/dist/sdk/fix-quality.js.map +1 -1
- package/dist/sdk/haiku.d.ts +6 -0
- package/dist/sdk/haiku.d.ts.map +1 -1
- package/dist/sdk/haiku.js +75 -49
- package/dist/sdk/haiku.js.map +1 -1
- package/dist/sdk/json-output.d.ts +31 -0
- package/dist/sdk/json-output.d.ts.map +1 -0
- package/dist/sdk/json-output.js +98 -0
- package/dist/sdk/json-output.js.map +1 -0
- package/dist/sdk/model-pricing.json +56 -16
- package/dist/sdk/post-process.d.ts +29 -0
- package/dist/sdk/post-process.d.ts.map +1 -0
- package/dist/sdk/post-process.js +65 -0
- package/dist/sdk/post-process.js.map +1 -0
- package/dist/sdk/prepare.d.ts.map +1 -1
- package/dist/sdk/prepare.js +4 -1
- package/dist/sdk/prepare.js.map +1 -1
- package/dist/sdk/pricing.d.ts +18 -0
- package/dist/sdk/pricing.d.ts.map +1 -1
- package/dist/sdk/pricing.js +108 -3
- package/dist/sdk/pricing.js.map +1 -1
- package/dist/sdk/prompt-sections.d.ts +56 -0
- package/dist/sdk/prompt-sections.d.ts.map +1 -0
- package/dist/sdk/prompt-sections.js +118 -0
- package/dist/sdk/prompt-sections.js.map +1 -0
- package/dist/sdk/prompt.d.ts +2 -17
- package/dist/sdk/prompt.d.ts.map +1 -1
- package/dist/sdk/prompt.js +15 -37
- package/dist/sdk/prompt.js.map +1 -1
- package/dist/sdk/report-files.d.ts +15 -0
- package/dist/sdk/report-files.d.ts.map +1 -0
- package/dist/sdk/report-files.js +20 -0
- package/dist/sdk/report-files.js.map +1 -0
- package/dist/sdk/runner.d.ts +9 -1
- package/dist/sdk/runner.d.ts.map +1 -1
- package/dist/sdk/runner.js +6 -0
- package/dist/sdk/runner.js.map +1 -1
- package/dist/sdk/runtimes/claude.d.ts +3 -0
- package/dist/sdk/runtimes/claude.d.ts.map +1 -0
- package/dist/sdk/runtimes/claude.js +376 -0
- package/dist/sdk/runtimes/claude.js.map +1 -0
- package/dist/sdk/runtimes/index.d.ts +12 -0
- package/dist/sdk/runtimes/index.d.ts.map +1 -0
- package/dist/sdk/runtimes/index.js +22 -0
- package/dist/sdk/runtimes/index.js.map +1 -0
- package/dist/sdk/runtimes/types.d.ts +116 -0
- package/dist/sdk/runtimes/types.d.ts.map +1 -0
- package/dist/sdk/runtimes/types.js +17 -0
- package/dist/sdk/runtimes/types.js.map +1 -0
- package/dist/sdk/types.d.ts +42 -2
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/types.js.map +1 -1
- package/dist/sdk/usage.d.ts +21 -6
- package/dist/sdk/usage.d.ts.map +1 -1
- package/dist/sdk/usage.js +36 -23
- package/dist/sdk/usage.js.map +1 -1
- package/dist/sdk/verify.d.ts +25 -0
- package/dist/sdk/verify.d.ts.map +1 -0
- package/dist/sdk/verify.js +226 -0
- package/dist/sdk/verify.js.map +1 -0
- package/dist/skill-builder/agentic.d.ts +33 -0
- package/dist/skill-builder/agentic.d.ts.map +1 -0
- package/dist/skill-builder/agentic.js +240 -0
- package/dist/skill-builder/agentic.js.map +1 -0
- package/dist/skill-builder/authoring-provider.d.ts +5 -0
- package/dist/skill-builder/authoring-provider.d.ts.map +1 -0
- package/dist/skill-builder/authoring-provider.js +70 -0
- package/dist/skill-builder/authoring-provider.js.map +1 -0
- package/dist/skill-builder/definition.d.ts +46 -0
- package/dist/skill-builder/definition.d.ts.map +1 -0
- package/dist/skill-builder/definition.js +171 -0
- package/dist/skill-builder/definition.js.map +1 -0
- package/dist/skill-builder/outline-contract.d.ts +113 -0
- package/dist/skill-builder/outline-contract.d.ts.map +1 -0
- package/dist/skill-builder/outline-contract.js +73 -0
- package/dist/skill-builder/outline-contract.js.map +1 -0
- package/dist/skill-builder/outline-state.d.ts +158 -0
- package/dist/skill-builder/outline-state.d.ts.map +1 -0
- package/dist/skill-builder/outline-state.js +87 -0
- package/dist/skill-builder/outline-state.js.map +1 -0
- package/dist/skill-builder/outline.d.ts +36 -0
- package/dist/skill-builder/outline.d.ts.map +1 -0
- package/dist/skill-builder/outline.js +345 -0
- package/dist/skill-builder/outline.js.map +1 -0
- package/dist/skill-builder/skill-contract.d.ts +97 -0
- package/dist/skill-builder/skill-contract.d.ts.map +1 -0
- package/dist/skill-builder/skill-contract.js +58 -0
- package/dist/skill-builder/skill-contract.js.map +1 -0
- package/dist/skill-builder/skill-prompts.d.ts +61 -0
- package/dist/skill-builder/skill-prompts.d.ts.map +1 -0
- package/dist/skill-builder/skill-prompts.js +285 -0
- package/dist/skill-builder/skill-prompts.js.map +1 -0
- package/dist/skill-builder/skill.d.ts +23 -0
- package/dist/skill-builder/skill.d.ts.map +1 -0
- package/dist/skill-builder/skill.js +563 -0
- package/dist/skill-builder/skill.js.map +1 -0
- package/dist/skills/index.d.ts +2 -2
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +20 -6
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +88 -141
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/remote.d.ts +11 -7
- package/dist/skills/remote.d.ts.map +1 -1
- package/dist/skills/remote.js +62 -162
- package/dist/skills/remote.js.map +1 -1
- package/dist/triggers/matcher.d.ts.map +1 -1
- package/dist/triggers/matcher.js +28 -15
- package/dist/triggers/matcher.js.map +1 -1
- package/dist/types/index.d.ts +41 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +24 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/path.d.ts +17 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +36 -0
- package/dist/utils/path.js.map +1 -0
- package/package.json +8 -8
- package/policies/README.md +22 -0
- package/policies/code-comments.md +20 -0
- package/policies/policy-template.md +14 -0
- package/skills/warden/SKILL.md +5 -5
- package/skills/warden/SOURCES.md +39 -0
- package/skills/warden/SPEC.md +112 -0
- package/skills/warden/references/cli-reference.md +11 -4
- package/skills/warden/references/config-schema.md +38 -13
- package/skills/warden/references/configuration.md +29 -8
- package/skills/warden-sweep/SKILL.md +43 -365
- package/skills/warden-sweep/SOURCES.md +43 -0
- package/skills/warden-sweep/SPEC.md +126 -0
- package/skills/warden-sweep/references/issue-phase.md +24 -0
- package/skills/warden-sweep/references/organize-phase.md +31 -0
- package/skills/warden-sweep/references/patch-phase.md +142 -0
- package/skills/warden-sweep/references/resume-and-artifacts.md +51 -0
- package/skills/warden-sweep/references/scan-phase.md +46 -0
- package/skills/warden-sweep/references/script-interfaces.md +127 -0
- package/skills/warden-sweep/references/verify-phase.md +69 -0
- package/src/builtin-skills/security-review/SKILL.md +81 -0
- package/src/builtin-skills/security-review/SPEC.md +77 -0
- package/src/builtin-skills/security-review/references/github-workflows.md +186 -0
- package/src/builtin-skills/security-review/references/javascript-typescript.md +69 -0
- package/src/builtin-skills/security-review/references/python.md +70 -0
- package/src/internal-skills/skill-writer/EVAL.md +124 -0
- package/src/internal-skills/skill-writer/SKILL.md +159 -0
- package/src/internal-skills/skill-writer/SOURCES.md +94 -0
- package/src/internal-skills/skill-writer/SPEC.md +153 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/argument-driven-skill-layout.md +32 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/asset-template-skill-layout.md +30 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/inline-skill-layout.md +28 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/reference-backed-skill-layout.md +35 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/script-backed-skill-layout.md +31 -0
- package/src/internal-skills/skill-writer/references/authoring-path.md +91 -0
- package/src/internal-skills/skill-writer/references/claude-code/argument-substitutions.md +20 -0
- package/src/internal-skills/skill-writer/references/claude-code/dynamic-context.md +16 -0
- package/src/internal-skills/skill-writer/references/claude-code/frontmatter-and-invocation.md +33 -0
- package/src/internal-skills/skill-writer/references/claude-code/hook-backed-skills.md +28 -0
- package/src/internal-skills/skill-writer/references/claude-code/subagent-fork-skills.md +22 -0
- package/src/internal-skills/skill-writer/references/description-optimization.md +28 -0
- package/src/internal-skills/skill-writer/references/design-principles.md +74 -0
- package/src/internal-skills/skill-writer/references/evaluation-path.md +73 -0
- package/src/internal-skills/skill-writer/references/examples/documentation-skill.md +70 -0
- package/src/internal-skills/skill-writer/references/examples/evaluator-loop-skill.md +38 -0
- package/src/internal-skills/skill-writer/references/examples/hook-backed-skill.md +39 -0
- package/src/internal-skills/skill-writer/references/examples/router-skill.md +41 -0
- package/src/internal-skills/skill-writer/references/examples/security-review-skill.md +69 -0
- package/src/internal-skills/skill-writer/references/examples/subagent-fork-skill.md +39 -0
- package/src/internal-skills/skill-writer/references/examples/workflow-process-skill.md +65 -0
- package/src/internal-skills/skill-writer/references/execution-shapes.md +68 -0
- package/src/internal-skills/skill-writer/references/iteration-evidence.md +82 -0
- package/src/internal-skills/skill-writer/references/iteration-path.md +40 -0
- package/src/internal-skills/skill-writer/references/mode-selection.md +67 -0
- package/src/internal-skills/skill-writer/references/output-contracts.md +68 -0
- package/src/internal-skills/skill-writer/references/reference-architecture.md +71 -0
- package/src/internal-skills/skill-writer/references/registration-validation.md +67 -0
- package/src/internal-skills/skill-writer/references/source-discovery.md +60 -0
- package/src/internal-skills/skill-writer/references/spec-template.md +118 -0
- package/src/internal-skills/skill-writer/references/structure-troubleshooting.md +111 -0
- package/src/internal-skills/skill-writer/references/synthesis-path.md +119 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/evaluator-loops.md +25 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/orchestrator-workers.md +25 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/parallel-workflows.md +21 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/plan-validate-execute.md +26 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/prompt-chaining.md +24 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/routing-workflows.md +28 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/validation-loops.md +26 -0
- package/src/internal-skills/skill-writer/scripts/quick_validate.py +158 -0
- package/src/internal-skills/skill-writer/scripts/quick_validate_test.py +79 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Iteration Evidence
|
|
2
|
+
|
|
3
|
+
Use this guide when improving a skill from positive examples, negative examples, review feedback, eval results, or observed agent behavior.
|
|
4
|
+
|
|
5
|
+
## Storage Layout
|
|
6
|
+
|
|
7
|
+
Store persistent improvement evidence under:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
references/evidence/
|
|
11
|
+
├── findings-log.md
|
|
12
|
+
├── working-set.md
|
|
13
|
+
└── holdout-set.md
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Use this directory only when examples should outlive the current task. For a one-off small fix, summarize the examples in `SOURCES.md` instead.
|
|
17
|
+
|
|
18
|
+
## File Roles
|
|
19
|
+
|
|
20
|
+
`references/evidence/findings-log.md` records interpreted findings:
|
|
21
|
+
|
|
22
|
+
- repeated failure patterns
|
|
23
|
+
- preserved success patterns
|
|
24
|
+
- suspected root causes
|
|
25
|
+
- instruction changes made in response
|
|
26
|
+
- unresolved risks
|
|
27
|
+
|
|
28
|
+
`references/evidence/working-set.md` stores examples used while editing the skill.
|
|
29
|
+
|
|
30
|
+
`references/evidence/holdout-set.md` stores examples reserved for validation after edits. Do not tune directly against holdout examples unless the user explicitly moves them into the working set.
|
|
31
|
+
|
|
32
|
+
## Example Record Schema
|
|
33
|
+
|
|
34
|
+
Use one record per example:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## EX-001: Short label
|
|
38
|
+
|
|
39
|
+
- Label: positive | negative
|
|
40
|
+
- Kind: true-positive | false-positive | false-negative | fix | regression | edge-case
|
|
41
|
+
- Origin: human-verified | mixed | synthetic
|
|
42
|
+
- Source: issue/PR/commit/log/user note/local eval pointer
|
|
43
|
+
- Status: working | holdout | resolved | deferred
|
|
44
|
+
- Expected behavior: concise statement
|
|
45
|
+
- Observed behavior: concise statement
|
|
46
|
+
- Skill delta: instruction, reference, description, or eval change
|
|
47
|
+
- Anonymization: what was removed or generalized
|
|
48
|
+
|
|
49
|
+
### Content
|
|
50
|
+
|
|
51
|
+
Summarized or redacted example content.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Keep records concise. Preserve enough detail to reproduce the behavior, but redact secrets, customer data, private URLs, and unnecessary user content.
|
|
55
|
+
|
|
56
|
+
## Positive And Negative Findings
|
|
57
|
+
|
|
58
|
+
Positive findings are not just success stories. Use them to protect behaviors that must not regress.
|
|
59
|
+
|
|
60
|
+
Negative findings should identify the smallest failing decision:
|
|
61
|
+
|
|
62
|
+
- wrong trigger behavior
|
|
63
|
+
- missing source type
|
|
64
|
+
- skipped reference file
|
|
65
|
+
- overloaded or hidden instruction
|
|
66
|
+
- weak output contract
|
|
67
|
+
- missing validation step
|
|
68
|
+
- unsafe or non-portable path assumption
|
|
69
|
+
|
|
70
|
+
Each negative finding should map to a concrete skill delta or an explicit deferred reason.
|
|
71
|
+
|
|
72
|
+
## Promotion Rules
|
|
73
|
+
|
|
74
|
+
Promote evidence into the skill artifacts only when it changes future behavior:
|
|
75
|
+
|
|
76
|
+
- Put universal behavioral rules in `SKILL.md`.
|
|
77
|
+
- Put domain-specific examples in a focused reference.
|
|
78
|
+
- Put source provenance and decisions in `SOURCES.md`.
|
|
79
|
+
- Put reusable eval prompts in `EVAL.md`.
|
|
80
|
+
- Keep raw or semi-raw examples in `references/evidence/`.
|
|
81
|
+
|
|
82
|
+
Do not turn `references/evidence/` into a changelog. The changelog belongs in `SOURCES.md`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Iteration Path
|
|
2
|
+
|
|
3
|
+
Use this path when improving a skill based on outcomes and examples.
|
|
4
|
+
|
|
5
|
+
## Example intake
|
|
6
|
+
|
|
7
|
+
Read `references/iteration-evidence.md` when examples should be persisted across future skill revisions.
|
|
8
|
+
|
|
9
|
+
Capture example records with:
|
|
10
|
+
|
|
11
|
+
- label (`positive` or `negative`)
|
|
12
|
+
- example kind (`true-positive`, `false-positive`, `fix`, `regression`, `edge-case`)
|
|
13
|
+
- evidence origin (`human-verified`, `mixed`, `synthetic`)
|
|
14
|
+
- anonymized content
|
|
15
|
+
- source provenance pointer (where the example came from)
|
|
16
|
+
|
|
17
|
+
## Replay and evaluation
|
|
18
|
+
|
|
19
|
+
1. Evaluate against working set.
|
|
20
|
+
2. Evaluate against holdout set.
|
|
21
|
+
3. Record improved/unchanged/regressed outcomes.
|
|
22
|
+
4. Confirm both positive and negative behavior changed in the expected direction.
|
|
23
|
+
|
|
24
|
+
## Improvement rules
|
|
25
|
+
|
|
26
|
+
1. Prioritize fixes for repeated negative patterns.
|
|
27
|
+
2. Preserve behavior that consistently succeeds on positives.
|
|
28
|
+
3. Update transformed examples when guidance changes.
|
|
29
|
+
4. Record deltas in `SOURCES.md` changelog.
|
|
30
|
+
5. Expand input collection when failures indicate coverage gaps.
|
|
31
|
+
6. Store durable positive/negative examples in `references/evidence/` instead of overloading `SKILL.md`, `SOURCES.md`, or a generic reference file.
|
|
32
|
+
7. Keep holdout examples separate from working examples until validation is complete.
|
|
33
|
+
8. Update `SPEC.md` when iteration changes the skill's intended scope, evidence model, evaluation gates, or known limitations.
|
|
34
|
+
|
|
35
|
+
## Required output
|
|
36
|
+
|
|
37
|
+
- Example intake summary
|
|
38
|
+
- Behavior deltas
|
|
39
|
+
- Updated artifacts
|
|
40
|
+
- Replay summary
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Mode Selection
|
|
2
|
+
|
|
3
|
+
Choose the minimal set of paths needed for the request.
|
|
4
|
+
Regardless of path, prioritize input quality and coverage depth before finalizing outputs.
|
|
5
|
+
Do not add evaluation unless the user asks for it, the change is high-risk, or the architecture choice is genuinely uncertain.
|
|
6
|
+
|
|
7
|
+
## Path mapping
|
|
8
|
+
|
|
9
|
+
| Request shape | Required paths |
|
|
10
|
+
|---------------|----------------|
|
|
11
|
+
| New skill from scratch | synthesis + authoring + description optimization + registration/validation |
|
|
12
|
+
| Update existing skill wording/structure | authoring + description optimization + registration/validation |
|
|
13
|
+
| Improve skill from outcomes/examples | iteration + authoring + description optimization + registration/validation |
|
|
14
|
+
| Research-first skill planning | synthesis only, then authoring if requested |
|
|
15
|
+
| Risky, disputed, or explicitly reviewed change | add `evaluation` to the selected path |
|
|
16
|
+
|
|
17
|
+
## Skill class selection
|
|
18
|
+
|
|
19
|
+
Classify the target skill before synthesis. This determines the coverage dimensions that must be represented in sources, references, and validation.
|
|
20
|
+
|
|
21
|
+
| Skill class | Typical request shape | Required dimensions |
|
|
22
|
+
|-------------|-----------------------|---------------------|
|
|
23
|
+
| `workflow-process` | repeatable operations, CI/task orchestration | preconditions, ordered flow, failure handling, safety boundaries |
|
|
24
|
+
| `integration-documentation` | library/framework integration, SDK usage, API correctness | API surface, config/runtime options, common use cases, known issues/workarounds, version/migration variance |
|
|
25
|
+
| `security-review` | vulnerability finding, exploitability review | vulnerability classes, exploit paths, false-positive controls, remediations |
|
|
26
|
+
| `skill-authoring` | creating/updating/evaluating other skills | source provenance, depth gates, transformed examples, registration/validation |
|
|
27
|
+
| `generic` | does not match above | explicit dimensions chosen and justified in synthesis |
|
|
28
|
+
|
|
29
|
+
When the class is ambiguous, ask one direct clarification question before synthesis.
|
|
30
|
+
|
|
31
|
+
## Execution shape selection
|
|
32
|
+
|
|
33
|
+
Choose the skill's primary execution shape separately from the skill class.
|
|
34
|
+
Class answers "what domain/problem is this skill for?"
|
|
35
|
+
Shape answers "how should this skill run?"
|
|
36
|
+
|
|
37
|
+
Use `references/execution-shapes.md` for the full decision table and the next leaf reference to load.
|
|
38
|
+
|
|
39
|
+
Record:
|
|
40
|
+
|
|
41
|
+
1. primary execution shape
|
|
42
|
+
2. simpler-shape rejection when the chosen shape is advanced
|
|
43
|
+
3. exact leaf references opened because of that choice
|
|
44
|
+
|
|
45
|
+
## Required outputs by path
|
|
46
|
+
|
|
47
|
+
- `synthesis`: source inventory, decisions, coverage matrix, gaps.
|
|
48
|
+
- `synthesis`: selected class, selected execution shape, and selected example profile path(s), including profile-requirement coverage.
|
|
49
|
+
- `synthesis`: simplicity rationale showing why the chosen shape is necessary and which simpler shapes were rejected.
|
|
50
|
+
- `synthesis`: portability note when provider-specific mechanics are used.
|
|
51
|
+
- `synthesis`: explicit retrieval stopping rationale showing why further collection is currently low-yield.
|
|
52
|
+
- `authoring`: updated `SKILL.md` and required supporting files.
|
|
53
|
+
- `description optimization`: should/should-not trigger sets and final description.
|
|
54
|
+
- `iteration`: example intake summary and behavior deltas.
|
|
55
|
+
- `evaluation`: qualitative summary and any deeper checks run.
|
|
56
|
+
- `registration/validation`: registration edits and validator results.
|
|
57
|
+
|
|
58
|
+
## Hard stop rules
|
|
59
|
+
|
|
60
|
+
Do not claim completion when any required path output is missing.
|
|
61
|
+
Evaluation output is required only when `evaluation` was selected.
|
|
62
|
+
|
|
63
|
+
For authoring/generator skills, missing transformed example artifacts is a hard failure.
|
|
64
|
+
Missing selected-profile requirements is also a hard failure.
|
|
65
|
+
Missing required class dimensions is a hard failure.
|
|
66
|
+
Missing an explicit execution-shape choice for a material skill change is a hard failure.
|
|
67
|
+
Using advanced mechanics without justification or portability notes is a hard failure.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Output Contracts
|
|
2
|
+
|
|
3
|
+
Use this guide when the skill needs a predictable response shape.
|
|
4
|
+
|
|
5
|
+
## Choose The Contract
|
|
6
|
+
|
|
7
|
+
| Need | Use |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| exact sections or headings | strict template |
|
|
10
|
+
| default structure with adaptation | flexible template |
|
|
11
|
+
| style is easier to imitate than describe | input/output examples |
|
|
12
|
+
| format depends on task type | decision table |
|
|
13
|
+
| scripts or tools parse the output | structured schema |
|
|
14
|
+
|
|
15
|
+
## Strict Template
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
# [Title]
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
[Required summary]
|
|
22
|
+
|
|
23
|
+
## Findings
|
|
24
|
+
- ...
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Flexible Template
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
# [Title]
|
|
31
|
+
|
|
32
|
+
## Summary
|
|
33
|
+
[Default summary section; adapt if needed]
|
|
34
|
+
|
|
35
|
+
## Findings
|
|
36
|
+
[Adapt based on context]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Input/Output Example
|
|
40
|
+
|
|
41
|
+
````markdown
|
|
42
|
+
Input: fix date formatting bug
|
|
43
|
+
Output:
|
|
44
|
+
```text
|
|
45
|
+
fix(reports): correct timezone date formatting
|
|
46
|
+
```
|
|
47
|
+
````
|
|
48
|
+
|
|
49
|
+
## Decision Table
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
| Input Type | Output Format |
|
|
53
|
+
|------------|---------------|
|
|
54
|
+
| single file | inline summary |
|
|
55
|
+
| many files | grouped report |
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Structured Schema
|
|
59
|
+
|
|
60
|
+
````markdown
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"status": "success",
|
|
64
|
+
"summary": "One-line result",
|
|
65
|
+
"findings": []
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
````
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Reference Architecture
|
|
2
|
+
|
|
3
|
+
Use this guide before adding bundled files or long sections to `SKILL.md`.
|
|
4
|
+
|
|
5
|
+
## Router Rule
|
|
6
|
+
|
|
7
|
+
- `SKILL.md` is the router.
|
|
8
|
+
- References are lookup leaves.
|
|
9
|
+
- `SPEC.md` is the maintenance contract.
|
|
10
|
+
- `SOURCES.md` stores provenance and decisions.
|
|
11
|
+
- `EVAL.md` stores reusable eval prompts or runbooks.
|
|
12
|
+
|
|
13
|
+
## Lookup Test
|
|
14
|
+
|
|
15
|
+
Before creating a reference, finish this sentence:
|
|
16
|
+
|
|
17
|
+
- "I need to decide X, so read `...`."
|
|
18
|
+
- "I need to do Y, so read `...`."
|
|
19
|
+
- "I need to diagnose Z, so read `...`."
|
|
20
|
+
|
|
21
|
+
If the sentence sounds like "I need context" or "I need patterns", the file is too vague.
|
|
22
|
+
|
|
23
|
+
## Placement Table
|
|
24
|
+
|
|
25
|
+
| Put it in... | When it belongs there |
|
|
26
|
+
|--------------|-----------------------|
|
|
27
|
+
| `SKILL.md` | every run needs it |
|
|
28
|
+
| `references/` | only some branches need it |
|
|
29
|
+
| `SPEC.md` | it explains maintenance, scope, or evidence policy |
|
|
30
|
+
| `SOURCES.md` | it is provenance, a decision record, or a gap |
|
|
31
|
+
| `EVAL.md` | it is a reusable eval prompt or grading runbook |
|
|
32
|
+
|
|
33
|
+
## Reference Types
|
|
34
|
+
|
|
35
|
+
| Need | Shape |
|
|
36
|
+
|------|-------|
|
|
37
|
+
| choose a path | decision guide |
|
|
38
|
+
| execute a procedure | task guide |
|
|
39
|
+
| look up exact facts | reference table |
|
|
40
|
+
| diagnose a failure | troubleshooting matrix |
|
|
41
|
+
| imitate quality | example set |
|
|
42
|
+
| judge completeness | evaluation rubric |
|
|
43
|
+
|
|
44
|
+
## Naming Rules
|
|
45
|
+
|
|
46
|
+
- Name files for the question or action they answer.
|
|
47
|
+
- Good: `mode-selection.md`, `output-contracts.md`, `routing-workflows.md`
|
|
48
|
+
- Bad: `notes.md`, `context.md`, `patterns.md`, `research.md`
|
|
49
|
+
- Use subfolders only when the subtree name clarifies the lookup path.
|
|
50
|
+
|
|
51
|
+
## Split Rules
|
|
52
|
+
|
|
53
|
+
Create a new reference when:
|
|
54
|
+
|
|
55
|
+
- the content is only needed after a branch decision
|
|
56
|
+
- the content has one dominant type
|
|
57
|
+
- the section would make `SKILL.md` harder to scan
|
|
58
|
+
- the file is approaching 100 lines and contains multiple lookup needs
|
|
59
|
+
|
|
60
|
+
Keep content in `SKILL.md` when:
|
|
61
|
+
|
|
62
|
+
- every invocation needs it
|
|
63
|
+
- it is short
|
|
64
|
+
- moving it would force unnecessary file loads
|
|
65
|
+
|
|
66
|
+
## Final Checks
|
|
67
|
+
|
|
68
|
+
1. Every runtime reference has a direct "open when..." reason in `SKILL.md`.
|
|
69
|
+
2. The filename tells the agent why to open it.
|
|
70
|
+
3. No required instruction is hidden only in an optional reference.
|
|
71
|
+
4. No reference has become a second `SKILL.md`.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Registration and Validation
|
|
2
|
+
|
|
3
|
+
Apply registration and quality checks before completion.
|
|
4
|
+
|
|
5
|
+
## Registration checklist
|
|
6
|
+
|
|
7
|
+
1. Inspect the workspace and identify the active skill layout before editing files.
|
|
8
|
+
2. Create/update `<skill-root>/SKILL.md`, `<skill-root>/SPEC.md` when required by change scope, and any bundled `references/`, `scripts/`, or `assets/` beneath that root.
|
|
9
|
+
3. Default to `.agents/skills/<name>/` when there is no stronger prior art.
|
|
10
|
+
4. If the workspace clearly uses a different canonical layout, follow that layout instead of forcing `.agents/skills/`.
|
|
11
|
+
5. Common established alternatives include:
|
|
12
|
+
- `skills/<name>/` when the workspace uses a canonical root skill tree
|
|
13
|
+
- `.claude/skills/<name>/` for project-scoped Claude skills
|
|
14
|
+
- `plugins/<plugin>/skills/<name>/` for plugin-scoped skills
|
|
15
|
+
- another repository-managed skill root that is already established by neighboring skills or docs
|
|
16
|
+
6. If multiple plausible locations exist and inspection does not make the canonical target clear, ask the user before editing files.
|
|
17
|
+
7. Only apply repository-specific registration steps when the workspace conventions explicitly require them.
|
|
18
|
+
|
|
19
|
+
When a repository does maintain its own skill catalog, verify and update any required registration files such as:
|
|
20
|
+
|
|
21
|
+
- public skill inventories or tables
|
|
22
|
+
- project or plugin settings files
|
|
23
|
+
- allowlists used by other skills or automation
|
|
24
|
+
|
|
25
|
+
## Validation checklist
|
|
26
|
+
|
|
27
|
+
1. Run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv run scripts/quick_validate.py <path/to/skill-directory> --strict-depth
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use the skill-root-relative form above when running from the `skill-writer` directory.
|
|
34
|
+
If you must run the validator from another working directory, convert both paths to the correct relative path from that directory instead of introducing absolute or host-specific paths into the skill docs.
|
|
35
|
+
|
|
36
|
+
2. Confirm for authoring/generator skills:
|
|
37
|
+
- transformed examples exist in references (happy-path, secure/robust, anti-pattern+fix)
|
|
38
|
+
- synthesis depth gates are satisfied
|
|
39
|
+
- selected example profile requirements are satisfied and reported
|
|
40
|
+
- `SPEC.md` exists or was updated when the change creates a skill or materially changes intent, scope, evidence model, evaluation, or maintenance expectations
|
|
41
|
+
- every bundled reference file is directly discoverable from `SKILL.md`
|
|
42
|
+
|
|
43
|
+
3. Confirm for integration/documentation skills:
|
|
44
|
+
- focused references cover API surface, common use cases, known issues/workarounds, and version variance
|
|
45
|
+
- reference file names fit the skill's domain rather than a fixed template
|
|
46
|
+
- `SKILL.md` and `references/*.md` avoid host-specific absolute filesystem paths
|
|
47
|
+
|
|
48
|
+
4. Confirm portability for skills that are expected to be portable by default:
|
|
49
|
+
- bundled file references use skill-root-relative paths such as `references/...`, `scripts/...`, or `assets/...`
|
|
50
|
+
- provider-specific path variables (for example `${CLAUDE_SKILL_ROOT}`) either follow established repository prior art or are explicitly scoped, rather than being introduced ad hoc
|
|
51
|
+
- provider-specific behavior, if any, is labeled as compatibility guidance rather than the primary workflow
|
|
52
|
+
|
|
53
|
+
5. If evaluation was run, include:
|
|
54
|
+
- lightweight qualitative summary
|
|
55
|
+
- concise depth rubric status for integration/documentation and skill-authoring skills
|
|
56
|
+
- deeper eval or quantitative summary only if user requested it or risk warranted it
|
|
57
|
+
|
|
58
|
+
6. Review validator warnings for long reference files and split files when warnings indicate mixed concerns or poor navigation.
|
|
59
|
+
7. Reject shallow handoffs that omit required artifacts.
|
|
60
|
+
|
|
61
|
+
## Required output
|
|
62
|
+
|
|
63
|
+
- Registration changes summary
|
|
64
|
+
- Selected skill root and why it was chosen
|
|
65
|
+
- Validator output
|
|
66
|
+
- Evaluation summary, if run
|
|
67
|
+
- Any residual risks or open gaps
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Source Discovery
|
|
2
|
+
|
|
3
|
+
Use this guide during synthesis when obvious docs are shallow, stale, incomplete, or too polished to reveal real behavior.
|
|
4
|
+
|
|
5
|
+
## Source Priority
|
|
6
|
+
|
|
7
|
+
Prefer sources in this order:
|
|
8
|
+
|
|
9
|
+
1. Local repository authority: `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, manifests, validators, scripts, tests, and existing neighboring skills.
|
|
10
|
+
2. Primary upstream material: official specifications, product docs, API references, release notes, changelogs, and source code.
|
|
11
|
+
3. Operational evidence: issue threads, PR discussions, CI failures, incident notes, support patterns, and migration notes.
|
|
12
|
+
4. Historical evidence: commit logs, blame, reverted changes, and changelog diffs.
|
|
13
|
+
5. Secondary summaries: blog posts, tutorials, and community examples.
|
|
14
|
+
|
|
15
|
+
Treat secondary and generated content as leads, not authority.
|
|
16
|
+
|
|
17
|
+
## High-Signal Retrieval Passes
|
|
18
|
+
|
|
19
|
+
Run the passes that match the skill's risk:
|
|
20
|
+
|
|
21
|
+
- Core behavior: official docs, source exports, public interfaces, happy-path examples.
|
|
22
|
+
- Edge behavior: tests, fixtures, error handling, retries, permissions, validation, and cleanup paths.
|
|
23
|
+
- Negative behavior: bug fixes, reverted commits, issue reports, support threads, review comments, and skipped tests.
|
|
24
|
+
- Usage behavior: in-repo callers, downstream examples, configuration samples, and migration guides.
|
|
25
|
+
- Maintenance behavior: changelog entries, release notes, deprecations, and commits touching the same files repeatedly.
|
|
26
|
+
|
|
27
|
+
## Commit Log Mining
|
|
28
|
+
|
|
29
|
+
Use commit history when the task depends on lived behavior rather than only intended behavior.
|
|
30
|
+
|
|
31
|
+
Good candidates:
|
|
32
|
+
|
|
33
|
+
- Security, access-control, CI, deployment, or migration skills.
|
|
34
|
+
- Skills for internal systems with sparse public docs.
|
|
35
|
+
- Skills being improved after repeated failures.
|
|
36
|
+
- Areas with many regressions, reversions, or subtle edge cases.
|
|
37
|
+
|
|
38
|
+
Useful commands:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git log --oneline -- <path>
|
|
42
|
+
git log --stat -- <path>
|
|
43
|
+
git log -G '<behavior|symbol|error>' -- <path>
|
|
44
|
+
git blame <path>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Capture findings as source records with commit SHA, date, affected path, observed behavior, and whether the finding is adopted, rejected, or deferred.
|
|
48
|
+
|
|
49
|
+
Do not copy large commit messages or diffs into `SKILL.md`. Summarize the behavior and keep provenance in `SOURCES.md` or an evidence file.
|
|
50
|
+
|
|
51
|
+
## Stop Conditions
|
|
52
|
+
|
|
53
|
+
Stop collecting when:
|
|
54
|
+
|
|
55
|
+
- Required coverage dimensions are complete or have explicit next retrieval actions.
|
|
56
|
+
- New retrieval mostly repeats known facts.
|
|
57
|
+
- Remaining unknowns are low impact or require access the agent does not have.
|
|
58
|
+
- The source mix includes both intended behavior and observed behavior for high-risk workflows.
|
|
59
|
+
|
|
60
|
+
Record the stopping rationale in `SOURCES.md`.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# SPEC.md Template
|
|
2
|
+
|
|
3
|
+
Use this guide to create or update a root-level `SPEC.md`.
|
|
4
|
+
|
|
5
|
+
## Use `SPEC.md` For
|
|
6
|
+
|
|
7
|
+
- intent
|
|
8
|
+
- scope
|
|
9
|
+
- trigger context
|
|
10
|
+
- evidence model
|
|
11
|
+
- evaluation expectations
|
|
12
|
+
- limitations
|
|
13
|
+
- maintenance rules
|
|
14
|
+
|
|
15
|
+
Do not put runtime instructions or full provenance tables here.
|
|
16
|
+
|
|
17
|
+
## Update `SPEC.md` When
|
|
18
|
+
|
|
19
|
+
- intent or scope changes
|
|
20
|
+
- trigger strategy changes
|
|
21
|
+
- evidence sources or storage policy changes
|
|
22
|
+
- reference architecture changes
|
|
23
|
+
- evaluation gates change
|
|
24
|
+
- privacy, security, or data-handling assumptions change
|
|
25
|
+
|
|
26
|
+
For tiny wording-only fixes, update `SOURCES.md` changelog instead.
|
|
27
|
+
|
|
28
|
+
## Relationship To Other Files
|
|
29
|
+
|
|
30
|
+
| File | Purpose |
|
|
31
|
+
|------|---------|
|
|
32
|
+
| `SKILL.md` | runtime activation and execution |
|
|
33
|
+
| `SPEC.md` | maintenance contract |
|
|
34
|
+
| `SOURCES.md` | source inventory, decisions, gaps, changelog |
|
|
35
|
+
| `EVAL.md` | reusable eval prompts or runbooks |
|
|
36
|
+
| `references/` | runtime-loadable depth |
|
|
37
|
+
| `references/evidence/` | persistent iteration examples |
|
|
38
|
+
|
|
39
|
+
## Template
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
# <Skill Name> Specification
|
|
43
|
+
|
|
44
|
+
## Intent
|
|
45
|
+
|
|
46
|
+
<1-2 short paragraphs>
|
|
47
|
+
|
|
48
|
+
## Scope
|
|
49
|
+
|
|
50
|
+
In scope:
|
|
51
|
+
- ...
|
|
52
|
+
|
|
53
|
+
Out of scope:
|
|
54
|
+
- ...
|
|
55
|
+
|
|
56
|
+
## Users And Trigger Context
|
|
57
|
+
|
|
58
|
+
- Primary users:
|
|
59
|
+
- Common user requests:
|
|
60
|
+
- Should not trigger for:
|
|
61
|
+
|
|
62
|
+
## Runtime Contract
|
|
63
|
+
|
|
64
|
+
- Required first actions:
|
|
65
|
+
- Required outputs:
|
|
66
|
+
- Non-negotiable constraints:
|
|
67
|
+
- Expected bundled files loaded at runtime:
|
|
68
|
+
|
|
69
|
+
## Source And Evidence Model
|
|
70
|
+
|
|
71
|
+
Authoritative sources:
|
|
72
|
+
- ...
|
|
73
|
+
|
|
74
|
+
Useful improvement sources:
|
|
75
|
+
- positive examples:
|
|
76
|
+
- negative examples:
|
|
77
|
+
- commit logs/changelogs:
|
|
78
|
+
- issue or PR feedback:
|
|
79
|
+
- eval results:
|
|
80
|
+
|
|
81
|
+
Data that must not be stored:
|
|
82
|
+
- secrets
|
|
83
|
+
- customer data
|
|
84
|
+
- private URLs or identifiers not needed for reproduction
|
|
85
|
+
|
|
86
|
+
## Reference Architecture
|
|
87
|
+
|
|
88
|
+
- `SKILL.md` contains:
|
|
89
|
+
- `references/` contains:
|
|
90
|
+
- `references/evidence/` contains:
|
|
91
|
+
- `scripts/` contains:
|
|
92
|
+
- `assets/` contains:
|
|
93
|
+
|
|
94
|
+
## Evaluation
|
|
95
|
+
|
|
96
|
+
- Lightweight validation:
|
|
97
|
+
- Deeper evaluation:
|
|
98
|
+
- Holdout examples:
|
|
99
|
+
- Acceptance gates:
|
|
100
|
+
|
|
101
|
+
## Known Limitations
|
|
102
|
+
|
|
103
|
+
- ...
|
|
104
|
+
|
|
105
|
+
## Maintenance Notes
|
|
106
|
+
|
|
107
|
+
- When to update `SKILL.md`:
|
|
108
|
+
- When to update `SOURCES.md`:
|
|
109
|
+
- When to update `EVAL.md`:
|
|
110
|
+
- When to update `references/evidence/`:
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Design Rules
|
|
114
|
+
|
|
115
|
+
1. Keep `SPEC.md` concise.
|
|
116
|
+
2. Link to `SOURCES.md` or refs instead of duplicating them.
|
|
117
|
+
3. Keep raw examples in `references/evidence/`.
|
|
118
|
+
4. Keep sensitive data redacted.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Structure Troubleshooting
|
|
2
|
+
|
|
3
|
+
Load this when the skill layout is unclear, overloaded, or drifting away from focused routing.
|
|
4
|
+
|
|
5
|
+
## Over-long SKILL.md
|
|
6
|
+
|
|
7
|
+
Problem: `SKILL.md` exceeds 500 lines and becomes a second encyclopedia.
|
|
8
|
+
|
|
9
|
+
Fix: extract detailed material into focused `references/` files and keep `SKILL.md` as the router.
|
|
10
|
+
|
|
11
|
+
## Missing Trigger Keywords
|
|
12
|
+
|
|
13
|
+
Problem: the description is too vague to match user language.
|
|
14
|
+
|
|
15
|
+
Fix: include the phrases users actually say.
|
|
16
|
+
|
|
17
|
+
## Trigger Info In Body Instead Of Description
|
|
18
|
+
|
|
19
|
+
Problem: "when to use" guidance appears only in the body, after triggering has already happened.
|
|
20
|
+
|
|
21
|
+
Fix: move trigger language into `description`.
|
|
22
|
+
|
|
23
|
+
## Duplicating CLAUDE.md Or AGENTS.md
|
|
24
|
+
|
|
25
|
+
Problem: the skill repeats repo-wide conventions instead of adding net-new value.
|
|
26
|
+
|
|
27
|
+
Fix: reference existing project docs and keep the skill focused on domain-specific behavior.
|
|
28
|
+
|
|
29
|
+
## Unconditional Reference Loading
|
|
30
|
+
|
|
31
|
+
Problem: the skill tells the agent to read every reference up front.
|
|
32
|
+
|
|
33
|
+
Fix: add a decision table so references load only when needed.
|
|
34
|
+
|
|
35
|
+
## Large References Without Navigation
|
|
36
|
+
|
|
37
|
+
Problem: long reference files are hard to preview and easy to misuse.
|
|
38
|
+
|
|
39
|
+
Fix: add a table of contents or split by lookup need.
|
|
40
|
+
|
|
41
|
+
## Extraneous Files
|
|
42
|
+
|
|
43
|
+
Problem: the skill directory accumulates user-facing docs or miscellaneous notes that do not help runtime, evaluation, or maintenance.
|
|
44
|
+
|
|
45
|
+
Fix: keep only `SKILL.md`, `SPEC.md`, `SOURCES.md`, `EVAL.md`, `references/`, `scripts/`, `assets/`, and `LICENSE` when needed.
|
|
46
|
+
|
|
47
|
+
## Scripts Without Documentation
|
|
48
|
+
|
|
49
|
+
Problem: `SKILL.md` names a script but does not document arguments, output, or fallback behavior.
|
|
50
|
+
|
|
51
|
+
Fix: document the script interface and expected output shape in `SKILL.md`.
|
|
52
|
+
|
|
53
|
+
## Hardcoded Paths
|
|
54
|
+
|
|
55
|
+
Problem: the skill embeds host-specific or repo-hardcoded paths.
|
|
56
|
+
|
|
57
|
+
Fix: use skill-root-relative paths or established portable placeholders.
|
|
58
|
+
|
|
59
|
+
## First/Second Person Descriptions
|
|
60
|
+
|
|
61
|
+
Problem: the description says "I can..." or "You can use this..."
|
|
62
|
+
|
|
63
|
+
Fix: write in third person so skill discovery stays consistent.
|
|
64
|
+
|
|
65
|
+
## Time-Sensitive Information
|
|
66
|
+
|
|
67
|
+
Problem: the skill bakes in dates or transitional logic that will quietly rot.
|
|
68
|
+
|
|
69
|
+
Fix: move legacy behavior into a clearly labeled deprecated section or remove it.
|
|
70
|
+
|
|
71
|
+
## Advanced Mechanics Without Justification
|
|
72
|
+
|
|
73
|
+
Problem: the skill uses routing, `context: fork`, hooks, or evaluator loops because they seem sophisticated.
|
|
74
|
+
|
|
75
|
+
Fix: name the shape, explain why simpler shapes were rejected, and add portability/safety notes.
|
|
76
|
+
|
|
77
|
+
## Router Without Fallback
|
|
78
|
+
|
|
79
|
+
Problem: the skill has multiple downstream paths but no default route or clarification step.
|
|
80
|
+
|
|
81
|
+
Fix: add a fallback branch that asks one clarifying question or picks a documented safe default.
|
|
82
|
+
|
|
83
|
+
## Evaluator Loop Without Stop Condition
|
|
84
|
+
|
|
85
|
+
Problem: the skill says "iterate until good" with no rubric or cap.
|
|
86
|
+
|
|
87
|
+
Fix: add a rubric plus a max-loop or plateau rule.
|
|
88
|
+
|
|
89
|
+
## Passive Guidance In Forked Context
|
|
90
|
+
|
|
91
|
+
Problem: `context: fork` is used for conventions or reference material instead of a concrete delegated task.
|
|
92
|
+
|
|
93
|
+
Fix: keep passive guidance inline; use forked execution only for actionable isolated tasks.
|
|
94
|
+
|
|
95
|
+
## Hook-Backed Enforcement Without Safety Notes
|
|
96
|
+
|
|
97
|
+
Problem: the skill uses hooks but does not explain event scope, fallback behavior, or shell risk.
|
|
98
|
+
|
|
99
|
+
Fix: add hook event scope, fallback path, and explicit security notes.
|
|
100
|
+
|
|
101
|
+
## Hidden Reference File
|
|
102
|
+
|
|
103
|
+
Problem: a bundled reference exists, but `SKILL.md` never tells the agent when to open it.
|
|
104
|
+
|
|
105
|
+
Fix: add the file to the main router with a one-line "open when..." reason, or remove/split the file if no clear reason exists.
|
|
106
|
+
|
|
107
|
+
## Generic Bucket Reference
|
|
108
|
+
|
|
109
|
+
Problem: a file groups unrelated techniques under a vague name such as "patterns", "notes", or "context".
|
|
110
|
+
|
|
111
|
+
Fix: split the file by lookup need and rename each leaf so the filename predicts why it should be opened.
|