docs(skill): sync SKILL.md type enum with schema + add quickest-flow block#52
Merged
Conversation
…lock
Found during a live agent self-test: SKILL.md taught two type values
(transform, validation) the schema rejects, and didn't mention three
the schema accepts (docker, k8s, scheduler). An agent following SKILL.md
to the letter would write `type: transform`, hit a 400, and stall.
Changes to skills/openhop/SKILL.md:
- Sync the `type` enum (line ~181) to match packages/shared/src/schema.ts:
drop: transform, validation
add: docker, k8s, scheduler
- Sync the Node Type Variants table with the same set; add representative
variants for the three new types (containers/sidecars; pods/deployments;
cron/airflow/temporal/etc.).
- Add an explicit "types are categories, labels are names" callout —
redis is a label, not a type; oauth is a label, not a type. Use
`type: custom` when nothing fits.
- Add a "Quickest valid flow" copy-paste block at the top so agents
start from a known-valid skeleton instead of improvising the schema.
Includes the three most common gotchas: closed type enum, `data` is
string-or-object (not array), id charset.
- Add `validate` and `get` to the CLI command table (they were missing).
Note that every command supports --json and the semantic exit codes.
New test: packages/shared/__tests__/skill-md-sync.test.ts
- Locks in three invariants:
1. every type SKILL.md advertises is accepted by the schema
2. every schema type appears in the variants table
3. the type-bullet line lists every schema type
If anyone adds a new node type to NodeTypeEnum without updating SKILL.md
(or vice versa), CI fails. Drift is now structurally impossible.
Tests: 79/79 in @openhop/shared (was 76).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review WalkthroughA new test suite is introduced to enforce bidirectional compatibility between documentation and schema definitions, alongside updates to documentation that clarify validation rules, CLI commands, and node type specifications. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Real bug found during a live agent self-test (this session): SKILL.md taught two node types the schema rejects, and didn't document three it accepts. An agent following SKILL.md to the letter would write `type: transform` and hit a 400.
Changes
`skills/openhop/SKILL.md`
`packages/shared/tests/skill-md-sync.test.ts` (new)
Locks in three invariants:
If anyone adds a new node type without updating SKILL.md (or vice versa), CI fails. Drift is structurally impossible.
Test plan
Reproduction trail
Live this session, with `type: transform`-like guesses:
```
{"ok":false,"error":"validation","errors":[{"path":"flow.nodes.0.type",
"message":"Invalid option: expected one of "actor"|"endpoint"|"auth"
|"database"|"external"|"cache"|"queue"|"service"|"docker"|"k8s"
|"scheduler"|"custom""}]}
```
🤖 Generated with Claude Code
Summary by CodeRabbit