Writing principles
Write with an agent
Your coding agent can write principles for you. The plugin serves every authoring step as an MCP tool, so the agent can go from an idea to a tested, released principle on its own.
Set up#
Install the plugin and sign in with its login skill: /wellactually:login in Claude Code, $wellactually:login in Codex, @wellactually-login in OpenCode or /skill:wellactually-login in pi.
Signing in is what lets publish_draft upload.
Building a principle needs esbuild, and the plugin takes it from the repository that holds your principles. The SDK brings it, so install that once in the repository, with Node 22.18 or newer:
npm install --save-dev github:passsy/wellactually#sdk vitestThe loop#
The server tells the agent how a principle is built, so a short ask is enough:
Write a principle that tells agents to use clock.now() instead of DateTime.now() in Dart.
Probe it against ~/code/my_app, and publish it when the tests pass.The agent then works through these tools:
scaffoldcreates a principle that already passes its tests.- It edits
principle.md,detector.tsand the tests. run_testsbuilds the principle and runs its tests in the isolate, until they pass.tryshows it a file, a prompt or a command, and returns what an agent would read.proberuns it over a real repository and reports how often it fires, with samples. For every false positive, the agent adds a test that stays quiet on it.publish_draftuploads it and releases it as the next revision, and returns its link. A new principle is private. Ask the agent to make it public, and it passesvisibility: publicor callsset_visibility.
To change a principle you already have, the agent uses pull, edits, run_tests and publish_draft.
history shows its revisions.
What the agent cannot do#
It cannot approve a package licence that does not pass by itself. Such a revision stays a draft until you approve the package on the principle's page.
MCP tools lists every tool with its inputs.