chore: Create a skill file that captures the wizard architecture principles#438
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
gewenyu99
left a comment
There was a problem hiding this comment.
Some things to think about:
- Somewhere, maybe many places, we should tell it to update this if it makes conflicting hcnages
- What about tests? What needs tests?
- We should run this on PostHog Code with cloud runner on 4.7 max and let it do some iterative refactoring. I know for a fact we break these rules some places (probably my fault too)
|
|
||
| **New agent tool (in-process MCP):** Add it to `wizard-tools.ts` alongside `check_env_keys`, `set_env_values`, etc. The tool runs locally — secret values never leave the machine. Register the tool name in `WIZARD_TOOL_NAMES` so the SDK allowlist includes it. Follow the existing tool pattern: zod schema, path-traversal protection, logging. | ||
|
|
||
| **New security rule:** Add a `YaraRule` object to the `RULES` array in `yara-scanner.ts`. Each rule has a name, description, severity, category, `appliesTo` (which hook+tool combinations), and `patterns` (compiled regex). One match per rule is sufficient. The hooks in `yara-hooks.ts` don't need to change — they iterate the rules array automatically. |
There was a problem hiding this comment.
Is this the right extension surface always or should some go in the warlock repo?
|
|
||
| These are the early warning signs that a change is drifting from the discipline: | ||
|
|
||
| - **The runner is getting longer.** If you're adding lines to `agent-runner.ts` or `agent-interface.ts`, ask whether the concern belongs in a `WorkflowRun` config, a middleware, a post-run hook, or a skill file. |
There was a problem hiding this comment.
Almost nothing should go into the agent runners anymore. I find that this is a common trip up for agents
Co-authored-by: Vincent (Wen Yu) Ge <29069505+gewenyu99@users.noreply.github.com>
|
@gewenyu99 I just added a whole skill maintenance reference, plus guidance in the |
|
plus a note about tests in |
sarahxsanders
left a comment
There was a problem hiding this comment.
warlock stuff is gooooooood 🚀
Let's make it easy for other teams to extend the wizard, with pull requests that are easy to approve.
This skill is a collaboration between myself and Opus 4.7:
After extended discussion, the model took a swing at
SKILL.md, which I edited closely. I think it's pretty good!ARCHITECTURE.mdcues future agents with a low-cost survey of the project, sparing it around a dozen tool calls of reading.ANTI-PATTERNS.mdilluminates the failure modes of breaking the architecture bargains.Questions
ANTI-PATTERNS? It certainly follows the redirect strategy we know works well at a micro level (instead ofuseEffect, do…)