@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,28 @@
|
|
|
1
|
+
# Description Optimization
|
|
2
|
+
|
|
3
|
+
Use this path to improve skill triggering quality and reduce false matches.
|
|
4
|
+
|
|
5
|
+
## Trigger quality loop
|
|
6
|
+
|
|
7
|
+
1. Draft a description with realistic user language and concrete trigger phrases.
|
|
8
|
+
2. Build two query sets:
|
|
9
|
+
- should-trigger queries
|
|
10
|
+
- should-not-trigger queries
|
|
11
|
+
3. Evaluate the current description against both sets.
|
|
12
|
+
4. Edit description wording to improve precision/recall.
|
|
13
|
+
5. Repeat until false positives and false negatives are reduced to acceptable levels.
|
|
14
|
+
|
|
15
|
+
## Authoring rules
|
|
16
|
+
|
|
17
|
+
1. Keep the description in third person.
|
|
18
|
+
2. Include what the skill does and when to use it.
|
|
19
|
+
3. Avoid implementation details that do not help triggering.
|
|
20
|
+
4. Avoid provider-specific phrasing unless the skill is intentionally provider-specific.
|
|
21
|
+
5. For provider-agnostic skills, avoid naming Claude, Codex, or any provider in ways that would narrow portability expectations.
|
|
22
|
+
|
|
23
|
+
## Required output
|
|
24
|
+
|
|
25
|
+
- Final description text
|
|
26
|
+
- should-trigger query set
|
|
27
|
+
- should-not-trigger query set
|
|
28
|
+
- Summary of edits made to improve trigger behavior
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Skill Design Principles
|
|
2
|
+
|
|
3
|
+
Use this guide to keep skill instructions dense, scannable, and worth their token cost.
|
|
4
|
+
|
|
5
|
+
## Core Rule
|
|
6
|
+
|
|
7
|
+
- Every line should help the agent decide, do, or verify something.
|
|
8
|
+
- Prefer tables, checklists, templates, and input/output examples over explanatory prose.
|
|
9
|
+
- Keep rationale to one short sentence unless the agent is likely to make the wrong choice without it.
|
|
10
|
+
|
|
11
|
+
## Add Vs Cut
|
|
12
|
+
|
|
13
|
+
| Keep | Cut |
|
|
14
|
+
|------|-----|
|
|
15
|
+
| project-specific conventions | generic background the agent already knows |
|
|
16
|
+
| non-obvious gotchas | motivational filler |
|
|
17
|
+
| exact commands, schemas, and templates | repeated restatements of the same rule |
|
|
18
|
+
| branch logic and defaults | long essays where a table would work |
|
|
19
|
+
| one strong example | multiple weak examples saying the same thing |
|
|
20
|
+
|
|
21
|
+
## Match Structure To Fragility
|
|
22
|
+
|
|
23
|
+
| Fragility | Preferred structure | Avoid |
|
|
24
|
+
|-----------|---------------------|-------|
|
|
25
|
+
| high | exact steps, strict templates, validation gates | open-ended guidance |
|
|
26
|
+
| medium | short checklist plus examples | long rationale-heavy prose |
|
|
27
|
+
| low | brief goals and constraints | overspecified playbooks |
|
|
28
|
+
|
|
29
|
+
## Preferred Instruction Shapes
|
|
30
|
+
|
|
31
|
+
| Need | Preferred shape |
|
|
32
|
+
|------|-----------------|
|
|
33
|
+
| choose a path | decision table |
|
|
34
|
+
| do a repeatable task | numbered checklist |
|
|
35
|
+
| enforce output structure | template or schema |
|
|
36
|
+
| show style or tone | input/output examples |
|
|
37
|
+
| diagnose failures | symptom/cause/fix matrix |
|
|
38
|
+
| communicate exact facts | compact reference table |
|
|
39
|
+
|
|
40
|
+
## Description Rules
|
|
41
|
+
|
|
42
|
+
- Keep `description` in third person.
|
|
43
|
+
- Put trigger language in `description`, not the body.
|
|
44
|
+
- Front-load what the skill does and when to use it.
|
|
45
|
+
- Do not spend description space on internals unless they improve triggering.
|
|
46
|
+
|
|
47
|
+
## Runtime Writing Rules
|
|
48
|
+
|
|
49
|
+
- Use imperative voice.
|
|
50
|
+
- State one default path before mentioning alternatives.
|
|
51
|
+
- Use one term per concept; do not rotate synonyms.
|
|
52
|
+
- Put universal rules in `SKILL.md`; put optional depth in routed refs.
|
|
53
|
+
- If a section is mostly explanation, cut it or replace it with a denser structure.
|
|
54
|
+
|
|
55
|
+
## Reference Rules
|
|
56
|
+
|
|
57
|
+
- Reference filenames should predict their contents.
|
|
58
|
+
- Each reference should answer one lookup question.
|
|
59
|
+
- Subfolders are acceptable only when they make the lookup path clearer.
|
|
60
|
+
- Every bundled reference should have a direct "open when..." entry in `SKILL.md`.
|
|
61
|
+
- Do not create catch-all files for notes, context, or mixed patterns.
|
|
62
|
+
|
|
63
|
+
## Independence And Portability
|
|
64
|
+
|
|
65
|
+
- Do not require another skill by name at runtime.
|
|
66
|
+
- Use skill-root-relative paths by default.
|
|
67
|
+
- Reuse established repo-specific path variables only when the repo already standardizes on them.
|
|
68
|
+
- Label provider-specific mechanics explicitly and add portability notes when they matter.
|
|
69
|
+
|
|
70
|
+
## Long Files
|
|
71
|
+
|
|
72
|
+
- Keep `SKILL.md` short enough to scan as a router.
|
|
73
|
+
- For references over 100 lines, add `## Contents`.
|
|
74
|
+
- If a reference grows because it mixes multiple lookup needs, split it.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Evaluation Path
|
|
2
|
+
|
|
3
|
+
Load this only when the user asks for evaluation, the change is high-risk, or you need to verify a non-obvious architectural choice.
|
|
4
|
+
|
|
5
|
+
## Default approach (lightweight, guidance-only)
|
|
6
|
+
|
|
7
|
+
If you do run evaluation, start here:
|
|
8
|
+
|
|
9
|
+
1. Define representative prompts for the target skill task.
|
|
10
|
+
2. Compare observed behavior before/after edits in concise notes.
|
|
11
|
+
3. For material skill changes, judge the architectural choice as well as the prose:
|
|
12
|
+
- class selection: pass/fail
|
|
13
|
+
- execution shape selection: pass/fail
|
|
14
|
+
- reference routing clarity: pass/fail
|
|
15
|
+
- advanced mechanics justification: pass/fail
|
|
16
|
+
- portability/fallback notes: pass/fail
|
|
17
|
+
4. Mark outcomes as improved, unchanged, or regressed.
|
|
18
|
+
5. Record unresolved weaknesses and next steps.
|
|
19
|
+
|
|
20
|
+
For `integration-documentation` and `skill-authoring` skills, include a concise depth rubric:
|
|
21
|
+
|
|
22
|
+
1. API surface coverage: pass/fail.
|
|
23
|
+
2. Known issues/workarounds coverage: pass/fail.
|
|
24
|
+
3. Common use-case coverage: pass/fail.
|
|
25
|
+
4. Gap handling quality (explicit next retrieval actions for partials): pass/fail.
|
|
26
|
+
|
|
27
|
+
## Deeper eval playbook (optional)
|
|
28
|
+
|
|
29
|
+
Use this only when:
|
|
30
|
+
|
|
31
|
+
1. The user requests rigorous evals.
|
|
32
|
+
2. The skill is high-risk or high-cost if wrong.
|
|
33
|
+
3. You need regression-tracking over time.
|
|
34
|
+
|
|
35
|
+
Suggested workflow:
|
|
36
|
+
|
|
37
|
+
1. Build a prompt set with positives, implicit triggers, negatives, and wrong-shape temptations.
|
|
38
|
+
2. Capture deterministic run traces (for example `codex exec --json`).
|
|
39
|
+
3. Apply machine-checkable rubric/schema checks (for example `--output-schema` where applicable).
|
|
40
|
+
4. Compare baseline vs updated behavior and report deltas.
|
|
41
|
+
|
|
42
|
+
For advanced shapes, add targeted checks:
|
|
43
|
+
|
|
44
|
+
1. routers: should-route and should-not-route prompts
|
|
45
|
+
2. evaluator loops: stop-condition and acceptance checks
|
|
46
|
+
3. subagent-fork skills: task-oriented prompt vs passive-guidance negative
|
|
47
|
+
4. hook-backed skills: fallback behavior and security-note presence
|
|
48
|
+
|
|
49
|
+
## Optional quantitative benchmark
|
|
50
|
+
|
|
51
|
+
Run only when explicitly requested or when objective scoring is practical.
|
|
52
|
+
|
|
53
|
+
1. Define baseline (without skill guidance).
|
|
54
|
+
2. Define with-skill run.
|
|
55
|
+
3. Use the same prompt set and scoring rubric for both.
|
|
56
|
+
4. Report deltas and confidence in the result.
|
|
57
|
+
|
|
58
|
+
Do not block completion on deeper evals unless the user asks for them.
|
|
59
|
+
|
|
60
|
+
## Canonical eval prompts
|
|
61
|
+
|
|
62
|
+
Keep reusable, copy/paste eval prompts in `../EVAL.md`.
|
|
63
|
+
Use those prompts when you need a repeatable depth check against `skill-writer`.
|
|
64
|
+
|
|
65
|
+
## Agent-agnostic requirement
|
|
66
|
+
|
|
67
|
+
Keep evaluation instructions tool-agnostic so they work in both Codex and Claude environments.
|
|
68
|
+
|
|
69
|
+
## Required Output
|
|
70
|
+
|
|
71
|
+
- Qualitative evaluation summary
|
|
72
|
+
- Deeper eval or quantitative summary (optional, if run)
|
|
73
|
+
- Final acceptance decision and residual risks
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Case Study: Documentation Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill that helps an agent answer and author code for a library without repeatedly re-reading upstream docs.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case used breadth-first source collection and only stopped when new retrieval yielded mostly duplicates:
|
|
10
|
+
|
|
11
|
+
1. Official docs landing pages and navigation trees.
|
|
12
|
+
2. All API/class/module reference pages.
|
|
13
|
+
3. Configuration and environment reference pages.
|
|
14
|
+
4. Official examples/tutorials.
|
|
15
|
+
5. Troubleshooting/error catalog pages.
|
|
16
|
+
6. Migration/deprecation/changelog pages.
|
|
17
|
+
7. Upstream repo README plus canonical examples.
|
|
18
|
+
8. In-repo usage of the library (`rg` on imports and key APIs).
|
|
19
|
+
|
|
20
|
+
## Coverage matrix used
|
|
21
|
+
|
|
22
|
+
Required dimensions tracked during synthesis:
|
|
23
|
+
|
|
24
|
+
1. Setup and installation.
|
|
25
|
+
2. Core primitives and API surface.
|
|
26
|
+
3. Configuration and runtime options.
|
|
27
|
+
4. Normal usage patterns.
|
|
28
|
+
5. Edge cases and failure handling.
|
|
29
|
+
6. Version-specific differences.
|
|
30
|
+
7. Migration and deprecation guidance.
|
|
31
|
+
8. Instructional templates/examples for direct reuse.
|
|
32
|
+
|
|
33
|
+
## Synthesized artifacts produced
|
|
34
|
+
|
|
35
|
+
The resulting skill references included:
|
|
36
|
+
|
|
37
|
+
1. Happy-path implementation template.
|
|
38
|
+
2. Production-safe variant with defensive defaults.
|
|
39
|
+
3. Anti-pattern and corrected implementation.
|
|
40
|
+
4. Intent-to-reference routing guide (which section to load for which user request).
|
|
41
|
+
5. Gap log with explicit next retrieval steps.
|
|
42
|
+
|
|
43
|
+
## Source-to-decision trace (sample)
|
|
44
|
+
|
|
45
|
+
1. Source class: migration/changelog docs.
|
|
46
|
+
Decision: add a version-compatibility checklist section to the skill.
|
|
47
|
+
Why: multiple API signatures existed across versions; without this, answers were inconsistent.
|
|
48
|
+
2. Source class: troubleshooting/error catalog.
|
|
49
|
+
Decision: add an error-to-fix lookup table in references.
|
|
50
|
+
Why: user prompts often start from failures, not idealized setup.
|
|
51
|
+
3. Source class: in-repo usage scan (`rg`).
|
|
52
|
+
Decision: prioritize examples matching local project patterns.
|
|
53
|
+
Why: produced outputs became directly usable with fewer edits.
|
|
54
|
+
|
|
55
|
+
## Concrete artifacts (sample)
|
|
56
|
+
|
|
57
|
+
1. Prompt and output skeleton:
|
|
58
|
+
Prompt: "Configure <library> client for retries and auth in production."
|
|
59
|
+
Output: a production-safe template with retry/backoff, timeout defaults, and auth placeholders.
|
|
60
|
+
2. Anti-pattern transformation:
|
|
61
|
+
Before: single inline config with no timeout/error handling.
|
|
62
|
+
After: structured config with explicit timeout, retry policy, and failure handling notes.
|
|
63
|
+
3. Reference routing snippet:
|
|
64
|
+
If request mentions "migration" -> load migration/changelog reference first, then API reference.
|
|
65
|
+
|
|
66
|
+
## What made this high quality
|
|
67
|
+
|
|
68
|
+
1. Input retrieval was exhaustive across all doc classes, not just top pages.
|
|
69
|
+
2. The skill shipped transformed examples, not citation-only notes.
|
|
70
|
+
3. Coverage and gaps were explicit, so iteration could continue safely.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Case Study: Evaluator-Loop Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill where one pass is not enough and quality improves through critique and revision.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected:
|
|
10
|
+
|
|
11
|
+
1. examples of first-draft failures
|
|
12
|
+
2. existing review rubrics or acceptance criteria
|
|
13
|
+
3. evidence that critique materially improves output
|
|
14
|
+
4. stopping rules to avoid endless loops
|
|
15
|
+
|
|
16
|
+
## Coverage matrix used
|
|
17
|
+
|
|
18
|
+
Required dimensions tracked during synthesis:
|
|
19
|
+
|
|
20
|
+
1. rubric quality
|
|
21
|
+
2. feedback-to-edit mapping
|
|
22
|
+
3. loop stop conditions
|
|
23
|
+
4. evidence retention between rounds
|
|
24
|
+
|
|
25
|
+
## Synthesized artifacts produced
|
|
26
|
+
|
|
27
|
+
The resulting skill references included:
|
|
28
|
+
|
|
29
|
+
1. first-draft to critique to revision example
|
|
30
|
+
2. rubric reference
|
|
31
|
+
3. max-loop or plateau rule
|
|
32
|
+
4. acceptance checklist
|
|
33
|
+
|
|
34
|
+
## What made this high quality
|
|
35
|
+
|
|
36
|
+
1. the rubric was explicit
|
|
37
|
+
2. the loop had a clear stopping rule
|
|
38
|
+
3. the revision process produced measurable improvement rather than vague repetition
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Case Study: Hook-Backed Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill that enforces a deterministic check at a specific lifecycle or tool boundary.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected:
|
|
10
|
+
|
|
11
|
+
1. official hook lifecycle and schema docs
|
|
12
|
+
2. security guidance for shell-executed hooks
|
|
13
|
+
3. examples of narrow matchers vs over-broad hooks
|
|
14
|
+
4. fallback behavior for environments without hooks
|
|
15
|
+
|
|
16
|
+
## Coverage matrix used
|
|
17
|
+
|
|
18
|
+
Required dimensions tracked during synthesis:
|
|
19
|
+
|
|
20
|
+
1. event and matcher scope
|
|
21
|
+
2. decision behavior
|
|
22
|
+
3. security boundaries
|
|
23
|
+
4. fallback behavior
|
|
24
|
+
5. portability constraints
|
|
25
|
+
|
|
26
|
+
## Synthesized artifacts produced
|
|
27
|
+
|
|
28
|
+
The resulting skill references included:
|
|
29
|
+
|
|
30
|
+
1. hook configuration example
|
|
31
|
+
2. safety checklist
|
|
32
|
+
3. fallback path without hooks
|
|
33
|
+
4. anti-pattern showing over-broad or unsafe hook scope
|
|
34
|
+
|
|
35
|
+
## What made this high quality
|
|
36
|
+
|
|
37
|
+
1. the hook scope was narrow and auditable
|
|
38
|
+
2. security assumptions were explicit
|
|
39
|
+
3. the skill still described what to do when hooks were unavailable
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Case Study: Router Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill that classifies requests into distinct downstream paths without overloading one prompt.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected:
|
|
10
|
+
|
|
11
|
+
1. examples of request categories
|
|
12
|
+
2. known ambiguous cases
|
|
13
|
+
3. downstream resources for each route
|
|
14
|
+
4. historical misroutes and their fixes
|
|
15
|
+
|
|
16
|
+
Collection stopped only after route criteria and fallback behavior were explicit.
|
|
17
|
+
|
|
18
|
+
## Coverage matrix used
|
|
19
|
+
|
|
20
|
+
Required dimensions tracked during synthesis:
|
|
21
|
+
|
|
22
|
+
1. route categories and triggers
|
|
23
|
+
2. ambiguous or overlapping cases
|
|
24
|
+
3. downstream ownership per route
|
|
25
|
+
4. default/fallback path
|
|
26
|
+
5. misroute recovery behavior
|
|
27
|
+
|
|
28
|
+
## Synthesized artifacts produced
|
|
29
|
+
|
|
30
|
+
The resulting skill references included:
|
|
31
|
+
|
|
32
|
+
1. route-selection table
|
|
33
|
+
2. one reference or script per route
|
|
34
|
+
3. ambiguous-case examples
|
|
35
|
+
4. fallback rule for unclear input
|
|
36
|
+
|
|
37
|
+
## What made this high quality
|
|
38
|
+
|
|
39
|
+
1. the route table was explicit
|
|
40
|
+
2. every route had one clear downstream owner
|
|
41
|
+
3. the skill knew what to do when classification was uncertain
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Case Study: Security Review Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: build a skill that finds real vulnerabilities while minimizing false positives.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case required balanced collection across offensive and defensive material:
|
|
10
|
+
|
|
11
|
+
1. Canonical standards and cheat sheets.
|
|
12
|
+
2. Framework/language-specific secure coding docs.
|
|
13
|
+
3. Real-world exploit writeups and postmortems.
|
|
14
|
+
4. Fixed vulnerability diffs and secure rewrites.
|
|
15
|
+
5. Benign patterns often misclassified as vulnerabilities.
|
|
16
|
+
6. Existing in-repo security skills and review heuristics.
|
|
17
|
+
|
|
18
|
+
Collection continued until each vulnerability class had both exploit and mitigation evidence.
|
|
19
|
+
|
|
20
|
+
## Coverage matrix used
|
|
21
|
+
|
|
22
|
+
Required dimensions tracked during synthesis:
|
|
23
|
+
|
|
24
|
+
1. Vulnerability class definitions and prerequisites.
|
|
25
|
+
2. Exploitable dataflow examples.
|
|
26
|
+
3. False-positive controls.
|
|
27
|
+
4. Severity/confidence calibration.
|
|
28
|
+
5. Concrete remediation patterns.
|
|
29
|
+
6. Framework-specific caveats and exceptions.
|
|
30
|
+
|
|
31
|
+
## Synthesized artifacts produced
|
|
32
|
+
|
|
33
|
+
The resulting skill references included:
|
|
34
|
+
|
|
35
|
+
1. True-positive case with exploitation path.
|
|
36
|
+
2. False-positive case with proof of safety.
|
|
37
|
+
3. Fix/remediation case with corrected code pattern.
|
|
38
|
+
4. Severity and confidence decision rubric.
|
|
39
|
+
5. Evidence checklist to prevent pattern-only claims.
|
|
40
|
+
|
|
41
|
+
## Source-to-decision trace (sample)
|
|
42
|
+
|
|
43
|
+
1. Source class: exploit writeups.
|
|
44
|
+
Decision: require attacker-controlled input path in every high-confidence finding.
|
|
45
|
+
Why: removed pattern-only false alarms.
|
|
46
|
+
2. Source class: benign counterexamples.
|
|
47
|
+
Decision: add explicit safe-pattern checks before reporting.
|
|
48
|
+
Why: reduced repeated false positives on sanitized data paths.
|
|
49
|
+
3. Source class: fixed vulnerability diffs.
|
|
50
|
+
Decision: include remediation examples as patch-shaped guidance.
|
|
51
|
+
Why: improved downstream fix quality and speed.
|
|
52
|
+
|
|
53
|
+
## Concrete artifacts (sample)
|
|
54
|
+
|
|
55
|
+
1. True-positive case:
|
|
56
|
+
Input pattern: untrusted data reaches shell/API call without escaping.
|
|
57
|
+
Output: finding includes source, sink, exploit path, and minimal patch recommendation.
|
|
58
|
+
2. False-positive case:
|
|
59
|
+
Input pattern: potentially dangerous API with validated allowlist and strict escaping.
|
|
60
|
+
Output: no vulnerability finding; include reason for non-reporting.
|
|
61
|
+
3. Remediation case:
|
|
62
|
+
Before: dynamic query construction from user input.
|
|
63
|
+
After: parameterized query plus validation guard.
|
|
64
|
+
|
|
65
|
+
## What made this high quality
|
|
66
|
+
|
|
67
|
+
1. It was trained on both attacks and safe counterexamples.
|
|
68
|
+
2. Findings required evidence of exploitability, not keyword matching.
|
|
69
|
+
3. Remediation guidance was concrete and immediately applicable.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Case Study: Subagent-Fork Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill that runs a self-contained task in isolated context and returns a concise summary.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected:
|
|
10
|
+
|
|
11
|
+
1. official provider docs for skill execution in forked context
|
|
12
|
+
2. examples of self-contained tasks that benefit from isolation
|
|
13
|
+
3. failure cases where passive guidance was incorrectly put into subagents
|
|
14
|
+
4. summary expectations for returning results to the main thread
|
|
15
|
+
|
|
16
|
+
## Coverage matrix used
|
|
17
|
+
|
|
18
|
+
Required dimensions tracked during synthesis:
|
|
19
|
+
|
|
20
|
+
1. why isolation helps
|
|
21
|
+
2. task prompt clarity
|
|
22
|
+
3. output/summary contract
|
|
23
|
+
4. tool/model assumptions
|
|
24
|
+
5. portability constraints
|
|
25
|
+
|
|
26
|
+
## Synthesized artifacts produced
|
|
27
|
+
|
|
28
|
+
The resulting skill references included:
|
|
29
|
+
|
|
30
|
+
1. actionable task body
|
|
31
|
+
2. expected summary schema
|
|
32
|
+
3. portability note
|
|
33
|
+
4. anti-pattern showing passive guidance that should stay inline
|
|
34
|
+
|
|
35
|
+
## What made this high quality
|
|
36
|
+
|
|
37
|
+
1. the skill body was a task, not a convention list
|
|
38
|
+
2. the isolation benefit was concrete
|
|
39
|
+
3. the result expected back in the main thread was explicit
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Case Study: Workflow/Process Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill for repeatable operational workflows (for example PR prep, CI triage, branching, settings audit).
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected process truth from all authoritative locations:
|
|
10
|
+
|
|
11
|
+
1. Official tool docs and syntax references.
|
|
12
|
+
2. Repository workflow conventions and policy docs.
|
|
13
|
+
3. Existing local skills with adjacent process logic.
|
|
14
|
+
4. CI logs, failure patterns, and known operational pitfalls.
|
|
15
|
+
5. Positive and negative historical examples from prior runs.
|
|
16
|
+
|
|
17
|
+
Collection stopped only after failure and recovery paths were well represented.
|
|
18
|
+
|
|
19
|
+
## Coverage matrix used
|
|
20
|
+
|
|
21
|
+
Required dimensions tracked during synthesis:
|
|
22
|
+
|
|
23
|
+
1. Preconditions and required context.
|
|
24
|
+
2. Ordered execution flow.
|
|
25
|
+
3. Safety/permission boundaries.
|
|
26
|
+
4. Expected outputs and acceptance checks.
|
|
27
|
+
5. Failure handling and retry behavior.
|
|
28
|
+
6. Escalation and handoff behavior.
|
|
29
|
+
|
|
30
|
+
## Synthesized artifacts produced
|
|
31
|
+
|
|
32
|
+
The resulting skill references included:
|
|
33
|
+
|
|
34
|
+
1. Happy-path execution transcript.
|
|
35
|
+
2. Guarded variant with stricter safety constraints.
|
|
36
|
+
3. Failure-recovery transcript for a critical broken step.
|
|
37
|
+
4. Output template for deterministic reporting.
|
|
38
|
+
5. Changelog rules for iterative improvement from examples.
|
|
39
|
+
|
|
40
|
+
## Source-to-decision trace (sample)
|
|
41
|
+
|
|
42
|
+
1. Source class: repo policy docs.
|
|
43
|
+
Decision: add explicit precondition checks before running side-effecting steps.
|
|
44
|
+
Why: prevented invalid execution in partially configured environments.
|
|
45
|
+
2. Source class: CI failure logs.
|
|
46
|
+
Decision: add a mandatory failure triage branch with retry vs escalate criteria.
|
|
47
|
+
Why: reduced dead-end loops during workflow execution.
|
|
48
|
+
3. Source class: historical positive/negative examples.
|
|
49
|
+
Decision: standardize output format for easier review and iteration.
|
|
50
|
+
Why: made regressions and improvements comparable across runs.
|
|
51
|
+
|
|
52
|
+
## Concrete artifacts (sample)
|
|
53
|
+
|
|
54
|
+
1. Happy-path transcript snippet:
|
|
55
|
+
Preconditions pass -> execute steps 1..N -> emit structured summary with status per step.
|
|
56
|
+
2. Failure-recovery transcript snippet:
|
|
57
|
+
Step fails -> classify transient/permanent -> retry once or escalate with captured evidence.
|
|
58
|
+
3. Deterministic report template:
|
|
59
|
+
Sections: Preconditions, Actions Taken, Validation Results, Failures/Recoveries, Next Actions.
|
|
60
|
+
|
|
61
|
+
## What made this high quality
|
|
62
|
+
|
|
63
|
+
1. The workflow was executable without rediscovering steps.
|
|
64
|
+
2. Non-happy paths were first-class, not afterthoughts.
|
|
65
|
+
3. Outputs were structured for consistent review and iteration.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Execution Shapes
|
|
2
|
+
|
|
3
|
+
Use this guide to choose the runtime shape of a skill before you decide its files.
|
|
4
|
+
Default rule: choose the simplest adequate shape, then add complexity only when it clearly improves outcomes.
|
|
5
|
+
Once you pick a shape, load only the concrete leaf references it needs.
|
|
6
|
+
|
|
7
|
+
## Defaulting To The Simplest Shape
|
|
8
|
+
|
|
9
|
+
Start from these questions, in order:
|
|
10
|
+
|
|
11
|
+
1. Can one coherent set of instructions handle most requests?
|
|
12
|
+
If yes, prefer `inline-guidance`.
|
|
13
|
+
2. Is the main complexity optional knowledge rather than control flow?
|
|
14
|
+
If yes, prefer `reference-backed-expert`.
|
|
15
|
+
3. Is the hard part data extraction, validation, or repeatable automation?
|
|
16
|
+
If yes, prefer `script-backed-workflow`.
|
|
17
|
+
4. Does the user usually invoke the skill with explicit parameters?
|
|
18
|
+
If yes, add `argument-driven`.
|
|
19
|
+
5. Only then consider routing, worker delegation, evaluator loops, subagent execution, hooks, or templates.
|
|
20
|
+
|
|
21
|
+
Do not jump to advanced mechanics because they sound powerful.
|
|
22
|
+
|
|
23
|
+
## Shape Decision Table
|
|
24
|
+
|
|
25
|
+
| Shape | Use when | Open next | Portability notes |
|
|
26
|
+
|-------|----------|-----------|-------------------|
|
|
27
|
+
| `inline-guidance` | one coherent policy, checklist, or procedure is enough | `references/artifact-layouts/inline-skill-layout.md` | most portable default |
|
|
28
|
+
| `reference-backed-expert` | optional deep knowledge is the main complexity | `references/artifact-layouts/reference-backed-skill-layout.md` | portable if file references stay relative |
|
|
29
|
+
| `script-backed-workflow` | repeated parsing, validation, APIs, or transformations are fragile in plain shell | `references/artifact-layouts/script-backed-skill-layout.md` | portable if dependencies are explicit |
|
|
30
|
+
| `argument-driven` | the skill is usually invoked with issue numbers, paths, targets, or modes | `references/artifact-layouts/argument-driven-skill-layout.md` | often provider-specific beyond basic manual invocation |
|
|
31
|
+
| `router` | distinct categories need different downstream prompts, tools, or references | `references/workflow-mechanics/routing-workflows.md` | portable if routing stays in prompt logic |
|
|
32
|
+
| `parallelization` | independent subtasks or multiple votes improve speed or confidence | `references/workflow-mechanics/parallel-workflows.md` | often implemented with tools or agents |
|
|
33
|
+
| `orchestrator-workers` | the number or type of subtasks is discovered at runtime | `references/workflow-mechanics/orchestrator-workers.md` | usually higher-latency and provider-sensitive |
|
|
34
|
+
| `evaluator-optimizer` | critique-and-revise loops improve output quality materially | `references/workflow-mechanics/evaluator-loops.md` | portable in concept; costly if overused |
|
|
35
|
+
| `subagent-fork` | the skill needs isolated context, tools, or model defaults | `references/claude-code/subagent-fork-skills.md` | Claude Code-specific |
|
|
36
|
+
| `hook-backed` | deterministic enforcement is required beyond prompt guidance | `references/claude-code/hook-backed-skills.md` | highly provider-specific and security-sensitive |
|
|
37
|
+
| `asset-template` | reusable templates, schemas, or static artifacts carry most of the value | `references/artifact-layouts/asset-template-skill-layout.md` | portable if assets are generic files |
|
|
38
|
+
|
|
39
|
+
If the chosen shape also uses explicit arguments, Claude-specific frontmatter, or shell preprocessing, load the matching file from `references/claude-code/`.
|
|
40
|
+
|
|
41
|
+
## Secondary Workflow Mechanics
|
|
42
|
+
|
|
43
|
+
These are not usually primary execution shapes, but they often refine one:
|
|
44
|
+
|
|
45
|
+
- fixed ordered steps -> `references/workflow-mechanics/prompt-chaining.md`
|
|
46
|
+
- validate-fix-repeat loops -> `references/workflow-mechanics/validation-loops.md`
|
|
47
|
+
- plan-before-execute flows -> `references/workflow-mechanics/plan-validate-execute.md`
|
|
48
|
+
|
|
49
|
+
## Hybrid Shapes
|
|
50
|
+
|
|
51
|
+
Use a hybrid only when one primary shape is insufficient.
|
|
52
|
+
|
|
53
|
+
1. Declare one primary shape.
|
|
54
|
+
2. Add only the minimum secondary shapes needed.
|
|
55
|
+
3. Keep each secondary shape scoped to one concrete need.
|
|
56
|
+
4. Avoid stacking multiple advanced shapes without a clear base path.
|
|
57
|
+
|
|
58
|
+
## Advanced-Shape Hard Stops
|
|
59
|
+
|
|
60
|
+
Do not finalize a skill when any of these are true:
|
|
61
|
+
|
|
62
|
+
1. The chosen shape is implied but not named.
|
|
63
|
+
2. A simpler shape was not considered.
|
|
64
|
+
3. A router has no fallback or default path.
|
|
65
|
+
4. An evaluator loop has no stopping rule.
|
|
66
|
+
5. A subagent-fork skill contains only passive guidance.
|
|
67
|
+
6. A hook-backed skill lacks a security note or fallback behavior.
|
|
68
|
+
7. Provider-specific mechanics are used without portability notes.
|